Merge "Fix <UCP>[Power] toggled the power status"
diff --git a/Android.bp b/Android.bp
index 4d781125..773c9b7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -97,6 +97,7 @@
"core/java/android/app/backup/IRestoreObserver.aidl",
"core/java/android/app/backup/IRestoreSession.aidl",
"core/java/android/app/backup/ISelectBackupTransportCallback.aidl",
+ "core/java/android/app/timedetector/ITimeDetectorService.aidl",
"core/java/android/app/timezone/ICallback.aidl",
"core/java/android/app/timezone/IRulesManager.aidl",
"core/java/android/app/usage/ICacheQuotaService.aidl",
@@ -133,6 +134,8 @@
"core/java/android/content/pm/IPackageStatsObserver.aidl",
"core/java/android/content/pm/IPinItemRequest.aidl",
"core/java/android/content/pm/IShortcutService.aidl",
+ "core/java/android/content/pm/dex/IArtManager.aidl",
+ "core/java/android/content/pm/dex/ISnapshotRuntimeProfileCallback.aidl",
"core/java/android/content/pm/permission/IRuntimePermissionPresenter.aidl",
"core/java/android/database/IContentObserver.aidl",
":libcamera_client_aidl",
@@ -162,8 +165,6 @@
"core/java/android/hardware/location/IActivityRecognitionHardwareClient.aidl",
"core/java/android/hardware/location/IActivityRecognitionHardwareSink.aidl",
"core/java/android/hardware/location/IActivityRecognitionHardwareWatcher.aidl",
- "core/java/android/hardware/location/IFusedLocationHardware.aidl",
- "core/java/android/hardware/location/IFusedLocationHardwareSink.aidl",
"core/java/android/hardware/location/IGeofenceHardware.aidl",
"core/java/android/hardware/location/IGeofenceHardwareCallback.aidl",
"core/java/android/hardware/location/IGeofenceHardwareMonitorCallback.aidl",
@@ -200,6 +201,11 @@
"core/java/android/nfc/INfcUnlockHandler.aidl",
"core/java/android/nfc/INfcDta.aidl",
"core/java/android/nfc/ITagRemovedCallback.aidl",
+ "core/java/android/se/omapi/ISecureElementService.aidl",
+ "core/java/android/se/omapi/ISecureElementListener.aidl",
+ "core/java/android/se/omapi/ISecureElementChannel.aidl",
+ "core/java/android/se/omapi/ISecureElementReader.aidl",
+ "core/java/android/se/omapi/ISecureElementSession.aidl",
"core/java/android/os/IBatteryPropertiesListener.aidl",
"core/java/android/os/IBatteryPropertiesRegistrar.aidl",
"core/java/android/os/ICancellationSignal.aidl",
@@ -381,7 +387,6 @@
"location/java/android/location/IBatchedLocationCallback.aidl",
"location/java/android/location/ICountryDetector.aidl",
"location/java/android/location/ICountryListener.aidl",
- "location/java/android/location/IFusedProvider.aidl",
"location/java/android/location/IGeocodeProvider.aidl",
"location/java/android/location/IGeofenceProvider.aidl",
"location/java/android/location/IGnssStatusListener.aidl",
@@ -455,24 +460,29 @@
"telecomm/java/com/android/internal/telecom/IInCallService.aidl",
"telecomm/java/com/android/internal/telecom/ITelecomService.aidl",
"telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl",
- "telephony/java/android/telephony/data/IDataService.aidl",
- "telephony/java/android/telephony/data/IDataServiceCallback.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsCallSessionListener.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsCapabilityCallback.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsConfig.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsConfigCallback.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsMmTelListener.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsServiceController.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl",
+ "telephony/java/android/telephony/data/IDataService.aidl",
+ "telephony/java/android/telephony/data/IDataServiceCallback.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsCapabilityCallback.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsConfig.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsConfigCallback.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsRegistration.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsRcsFeature.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsServiceController.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsServiceControllerListener.aidl",
+ "telephony/java/android/telephony/ims/aidl/IImsSmsListener.aidl",
"telephony/java/android/telephony/mbms/IMbmsDownloadSessionCallback.aidl",
"telephony/java/android/telephony/mbms/IMbmsStreamingSessionCallback.aidl",
- "telephony/java/android/telephony/mbms/IDownloadStateCallback.aidl",
+ "telephony/java/android/telephony/mbms/IDownloadStatusListener.aidl",
+ "telephony/java/android/telephony/mbms/IDownloadProgressListener.aidl",
"telephony/java/android/telephony/mbms/IStreamingServiceCallback.aidl",
"telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl",
"telephony/java/android/telephony/mbms/vendor/IMbmsStreamingService.aidl",
+ "telephony/java/android/telephony/INetworkService.aidl",
+ "telephony/java/android/telephony/INetworkServiceCallback.aidl",
"telephony/java/com/android/ims/internal/IImsCallSession.aidl",
"telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl",
"telephony/java/com/android/ims/internal/IImsConfig.aidl",
@@ -483,8 +493,6 @@
"telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl",
"telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl",
"telephony/java/com/android/ims/internal/IImsMultiEndpoint.aidl",
- "telephony/java/com/android/ims/internal/IImsRegistration.aidl",
- "telephony/java/com/android/ims/internal/IImsRegistrationCallback.aidl",
"telephony/java/com/android/ims/internal/IImsRcsFeature.aidl",
"telephony/java/com/android/ims/internal/IImsService.aidl",
"telephony/java/com/android/ims/internal/IImsServiceController.aidl",
@@ -728,13 +736,17 @@
"core/tests/utiltests/jni",
]
+// TODO(b/77285514): remove this once the last few hidl interfaces have been
+// updated to use hwbinder.stubs.
java_library {
name: "hwbinder",
no_framework_libs: true,
srcs: [
"core/java/android/os/HidlSupport.java",
+ "core/java/android/annotation/IntDef.java",
"core/java/android/annotation/NonNull.java",
+ "core/java/android/annotation/SystemApi.java",
"core/java/android/os/HwBinder.java",
"core/java/android/os/HwBlob.java",
"core/java/android/os/HwParcel.java",
@@ -775,3 +787,375 @@
"fontTools",
],
}
+
+// TODO: Don't rely on this list once droiddoc can take a list of packages to document
+frameworks_base_subdirs = [
+ "core/java",
+ "graphics/java",
+ "location/java",
+ "media/java",
+ "media/mca/effect/java",
+ "media/mca/filterfw/java",
+ "media/mca/filterpacks/java",
+ "drm/java",
+ "opengl/java",
+ "sax/java",
+ "telecomm/java",
+ "telephony/java",
+ "wifi/java",
+ "lowpan/java",
+ "keystore/java",
+ "rs/java",
+]
+
+packages_to_document = [
+ "android",
+ "javax/microedition/khronos",
+ "org/apache/http/conn",
+ "org/apache/http/params",
+]
+
+// The since flag (-since N.xml API_LEVEL) is used to add API Level information
+// to the reference documentation. Must be in order of oldest to newest.
+//
+// Conscrypt (com.android.org.conscrypt) is an implementation detail and should
+// not be referenced in the documentation.
+framework_docs_args = "-android -manifest $(location core/res/AndroidManifest.xml) " +
+ "-hidePackage com.android.okhttp -hidePackage com.android.org.conscrypt -hidePackage com.android.server " +
+ "-since $(location 1/public/api/android.xml) 1 " +
+ "-since $(location 2/public/api/android.xml) 2 " +
+ "-since $(location 3/public/api/android.xml) 3 " +
+ "-since $(location 4/public/api/android.xml) 4 " +
+ "-since $(location 5/public/api/android.xml) 5 " +
+ "-since $(location 6/public/api/android.xml) 6 " +
+ "-since $(location 7/public/api/android.xml) 7 " +
+ "-since $(location 8/public/api/android.xml) 8 " +
+ "-since $(location 9/public/api/android.xml) 9 " +
+ "-since $(location 10/public/api/android.xml) 10 " +
+ "-since $(location 11/public/api/android.xml) 11 " +
+ "-since $(location 12/public/api/android.xml) 12 " +
+ "-since $(location 13/public/api/android.xml) 13 " +
+ "-since $(location 14/public/api/android.txt) 14 " +
+ "-since $(location 15/public/api/android.txt) 15 " +
+ "-since $(location 16/public/api/android.txt) 16 " +
+ "-since $(location 17/public/api/android.txt) 17 " +
+ "-since $(location 18/public/api/android.txt) 18 " +
+ "-since $(location 19/public/api/android.txt) 19 " +
+ "-since $(location 20/public/api/android.txt) 20 " +
+ "-since $(location 21/public/api/android.txt) 21 " +
+ "-since $(location 22/public/api/android.txt) 22 " +
+ "-since $(location 23/public/api/android.txt) 23 " +
+ "-since $(location 24/public/api/android.txt) 24 " +
+ "-since $(location 25/public/api/android.txt) 25 " +
+ "-since $(location 26/public/api/android.txt) 26 " +
+ "-since $(location 27/public/api/android.txt) 27 " +
+ "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
+ "-overview $(location core/java/overview.html) " +
+ // Federate Support Library references against local API file.
+ "-federate SupportLib https://developer.android.com " +
+ "-federationapi SupportLib $(location current/support-api.txt) "
+
+doc_defaults {
+ name: "framework-docs-default",
+ srcs: [
+ // test mock src files.
+ "test-mock/src/android/test/mock/**/*.java",
+ // test runner excluding mock src files.
+ "test-runner/src/**/*.java",
+ "test-base/src/**/*.java",
+ ":opt-telephony-srcs",
+ ":opt-net-voip-srcs",
+ ":openjdk_javadoc_files",
+ ":non_openjdk_javadoc_files",
+ ":android_icu4j_src_files_for_docs",
+ ":gen-ojluni-jaif-annotated-srcs",
+ ],
+ exclude_srcs: [
+ ":annotated_ojluni_files",
+ ],
+ srcs_lib: "framework",
+ srcs_lib_whitelist_dirs: frameworks_base_subdirs,
+ srcs_lib_whitelist_pkgs: packages_to_document,
+ libs: [
+ "core-oj",
+ "core-libart",
+ "conscrypt",
+ "bouncycastle",
+ "okhttp",
+ "ext",
+ "framework",
+ "voip-common",
+ "android.test.mock",
+ ],
+ local_sourcepaths: frameworks_base_subdirs,
+ html_dirs: [
+ "docs/html",
+ ],
+ knowntags: [
+ "docs/knowntags.txt",
+ ":known-oj-tags",
+ ],
+ custom_template: "droiddoc-templates-sdk",
+ hdf: [
+ "dac true",
+ "sdk.codename O",
+ "sdk.preview.version 1",
+ "sdk.version 7.0",
+ "sdk.rel.id 1",
+ "sdk.preview 0",
+ ],
+ resourcesdir: "docs/html/reference/images",
+ resourcesoutdir: "reference/android/images",
+ installable: false,
+}
+
+check_last_released_api_args = "-hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " +
+ "-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 " +
+ "-error 16 -error 17 -error 18"
+
+check_current_api_args = "-error 2 -error 3 -error 4 -error 5 -error 6 " +
+ "-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 "+
+ "-error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 " +
+ "-error 25 -error 26 -error 27"
+
+droiddoc {
+ name: "api-stubs-docs",
+ defaults: ["framework-docs-default"],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ":api-version-xml",
+ "core/java/overview.html",
+ ":current-support-api",
+ ],
+ api_filename: "public_api.txt",
+ private_api_filename: "private.txt",
+ removed_api_filename: "removed.txt",
+ args: framework_docs_args + " -referenceonly -nodocs",
+ check_api: {
+ last_released: {
+ api_file: ":last-released-public-api",
+ removed_api_file: "api/removed.txt",
+ args: check_last_released_api_args,
+ },
+ current: {
+ api_file: "api/current.txt",
+ removed_api_file: "api/removed.txt",
+ args: check_current_api_args,
+ },
+ },
+}
+
+droiddoc {
+ name: "system-api-stubs-docs",
+ defaults: ["framework-docs-default"],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ":api-version-xml",
+ "core/java/overview.html",
+ ":current-support-api",
+ ],
+ api_tag_name: "SYSTEM",
+ api_filename: "system-api.txt",
+ private_api_filename: "system-private.txt",
+ private_dex_api_filename: "system-private-dex.txt",
+ removed_api_filename: "system-removed.txt",
+ exact_api_filename: "system-exact.txt",
+ args: framework_docs_args + " -referenceonly -showAnnotation android.annotation.SystemApi -nodocs",
+ check_api: {
+ last_released: {
+ api_file: ":last-released-system-api",
+ removed_api_file: "api/system-removed.txt",
+ args: check_last_released_api_args,
+ },
+ current: {
+ api_file: "api/system-current.txt",
+ removed_api_file: "api/system-removed.txt",
+ args: check_current_api_args,
+ },
+ },
+}
+
+droiddoc {
+ name: "test-api-stubs-docs",
+ defaults: ["framework-docs-default"],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ":api-version-xml",
+ "core/java/overview.html",
+ ":current-support-api",
+ ],
+ api_tag_name: "TEST",
+ api_filename: "test-api.txt",
+ removed_api_filename: "test-removed.txt",
+ exact_api_filename: "test-exact.txt",
+ args: framework_docs_args + " -referenceonly -showAnnotation android.annotation.TestApi -nodocs",
+ check_api: {
+ current: {
+ api_file: "api/test-current.txt",
+ removed_api_file: "api/test-removed.txt",
+ args: check_current_api_args,
+ },
+ },
+}
+
+droiddoc {
+ name: "hwbinder-stubs-docs",
+ srcs: [
+ "core/java/android/os/HidlSupport.java",
+ "core/java/android/annotation/IntDef.java",
+ "core/java/android/annotation/NonNull.java",
+ "core/java/android/annotation/SystemApi.java",
+ "core/java/android/os/HwBinder.java",
+ "core/java/android/os/HwBlob.java",
+ "core/java/android/os/HwParcel.java",
+ "core/java/android/os/IHwBinder.java",
+ "core/java/android/os/IHwInterface.java",
+ "core/java/android/os/DeadObjectException.java",
+ "core/java/android/os/DeadSystemException.java",
+ "core/java/android/os/RemoteException.java",
+ "core/java/android/util/AndroidException.java",
+ ],
+ custom_template: "droiddoc-templates-sdk",
+ installable: false,
+ no_framework_libs: true,
+ args: "-showAnnotation android.annotation.SystemApi -nodocs -stubsourceonly",
+}
+
+java_library_static {
+ name: "hwbinder.stubs",
+ sdk_version: "core_current",
+ srcs: [
+ ":hwbinder-stubs-docs",
+ ],
+}
+
+droiddoc {
+ name: "hiddenapi-lists",
+ defaults: ["framework-docs-default"],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ":api-version-xml",
+ "core/java/overview.html",
+ ":current-support-api",
+ ],
+ dex_api_filename: "public-dex.txt",
+ private_dex_api_filename: "private-dex.txt",
+ removed_dex_api_filename: "removed-dex.txt",
+ args: framework_docs_args +
+ " -referenceonly" +
+ " -nodocs" +
+ " -showUnannotated" +
+ " -showAnnotation android.annotation.SystemApi" +
+ " -showAnnotation android.annotation.TestApi",
+}
+
+filegroup {
+ name: "apache-http-stubs-sources",
+ srcs: [
+ "core/java/org/apache/http/conn/ConnectTimeoutException.java",
+ "core/java/org/apache/http/conn/scheme/HostNameResolver.java",
+ "core/java/org/apache/http/conn/scheme/LayeredSocketFactory.java",
+ "core/java/org/apache/http/conn/scheme/SocketFactory.java",
+ "core/java/org/apache/http/conn/ssl/AbstractVerifier.java",
+ "core/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java",
+ "core/java/org/apache/http/conn/ssl/AndroidDistinguishedNameParser.java",
+ "core/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java",
+ "core/java/org/apache/http/conn/ssl/SSLSocketFactory.java",
+ "core/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java",
+ "core/java/org/apache/http/conn/ssl/X509HostnameVerifier.java",
+ "core/java/org/apache/http/params/CoreConnectionPNames.java",
+ "core/java/org/apache/http/params/HttpConnectionParams.java",
+ "core/java/org/apache/http/params/HttpParams.java",
+ "core/java/android/net/http/HttpResponseCache.java",
+ "core/java/android/net/http/SslCertificate.java",
+ "core/java/android/net/http/SslError.java",
+ "core/java/com/android/internal/util/HexDump.java",
+ ],
+}
+
+metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
+ "--hide-package com.android.okhttp " +
+ "--hide-package com.android.org.conscrypt --hide-package com.android.server " +
+ "--hide RequiresPermission " +
+ "--hide MissingPermission --hide BroadcastBehavior " +
+ "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
+ "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo"
+
+doc_defaults {
+ name: "metalava-framework-docs-default",
+ srcs: [
+ // test mock src files.
+ "test-mock/src/android/test/mock/**/*.java",
+ // test runner excluding mock src files.
+ "test-runner/src/**/*.java",
+ "test-base/src/**/*.java",
+ ":opt-telephony-srcs",
+ ":opt-net-voip-srcs",
+ ":openjdk_javadoc_files",
+ ":non_openjdk_javadoc_files",
+ ":android_icu4j_src_files_for_docs",
+ ":gen-ojluni-jaif-annotated-srcs",
+ ],
+ exclude_srcs: [
+ ":annotated_ojluni_files",
+ ],
+ srcs_lib: "framework",
+ srcs_lib_whitelist_dirs: frameworks_base_subdirs,
+ srcs_lib_whitelist_pkgs: packages_to_document,
+ libs: [
+ "core-oj",
+ "core-libart",
+ "conscrypt",
+ "bouncycastle",
+ "okhttp",
+ "ext",
+ "framework",
+ "voip-common",
+ "android.test.mock",
+ ],
+ local_sourcepaths: frameworks_base_subdirs,
+ installable: false,
+ metalava_enabled: true,
+ metalava_annotations_enabled: true,
+ metalava_previous_api: ":public-api-for-metalava-annotations",
+ metalava_merge_annotations_dir: "tools/metalava/manual",
+}
+
+droiddoc {
+ name: "metalava-api-stubs-docs",
+ defaults: ["metalava-framework-docs-default"],
+ api_tag_name: "METALAVA_PUBLIC",
+ api_filename: "public_api.txt",
+ private_api_filename: "private.txt",
+ removed_api_filename: "removed.txt",
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ args: metalava_framework_docs_args,
+}
+
+droiddoc {
+ name: "metalava-system-api-stubs-docs",
+ defaults: ["metalava-framework-docs-default"],
+ api_tag_name: "METALAVA_SYSTEM",
+ api_filename: "system-api.txt",
+ private_api_filename: "system-private.txt",
+ private_dex_api_filename: "system-private-dex.txt",
+ removed_api_filename: "system-removed.txt",
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
+}
+
+droiddoc {
+ name: "metalava-test-api-stubs-docs",
+ defaults: ["metalava-framework-docs-default"],
+ api_tag_name: "METALAVA_TEST",
+ api_filename: "test-api.txt",
+ removed_api_filename: "test-removed.txt",
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
+}
diff --git a/Android.mk b/Android.mk
index 5dfa81c..eddcada 100644
--- a/Android.mk
+++ b/Android.mk
@@ -36,7 +36,7 @@
define stubs-to-aidl-parcelables
gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/$1.aidl
aidl_parcelables += $$(gen)
- $$(gen): $(call java-lib-header-files,$1) | $(HOST_OUT_EXECUTABLES)/sdkparcelables
+ $$(gen): $(call java-lib-header-files,$1) $(HOST_OUT_EXECUTABLES)/sdkparcelables
@echo Extract SDK parcelables: $$@
rm -f $$@
$(HOST_OUT_EXECUTABLES)/sdkparcelables $$< $$@
@@ -151,7 +151,6 @@
bouncycastle \
okhttp \
ext \
- icu4j \
framework \
voip-common \
android.test.mock \
@@ -174,38 +173,29 @@
-knowntags ./frameworks/base/docs/knowntags.txt \
-knowntags ./libcore/known_oj_tags.txt \
-manifest ./frameworks/base/core/res/AndroidManifest.xml \
+ -hidePackage com.android.internal \
+ -hidePackage com.android.internal.util \
-hidePackage com.android.okhttp \
-hidePackage com.android.org.conscrypt \
- -hidePackage com.android.server \
- -since $(SRC_API_DIR)/1.xml 1 \
- -since $(SRC_API_DIR)/2.xml 2 \
- -since $(SRC_API_DIR)/3.xml 3 \
- -since $(SRC_API_DIR)/4.xml 4 \
- -since $(SRC_API_DIR)/5.xml 5 \
- -since $(SRC_API_DIR)/6.xml 6 \
- -since $(SRC_API_DIR)/7.xml 7 \
- -since $(SRC_API_DIR)/8.xml 8 \
- -since $(SRC_API_DIR)/9.xml 9 \
- -since $(SRC_API_DIR)/10.xml 10 \
- -since $(SRC_API_DIR)/11.xml 11 \
- -since $(SRC_API_DIR)/12.xml 12 \
- -since $(SRC_API_DIR)/13.xml 13 \
- -since $(SRC_API_DIR)/14.txt 14 \
- -since $(SRC_API_DIR)/15.txt 15 \
- -since $(SRC_API_DIR)/16.txt 16 \
- -since $(SRC_API_DIR)/17.txt 17 \
- -since $(SRC_API_DIR)/18.txt 18 \
- -since $(SRC_API_DIR)/19.txt 19 \
- -since $(SRC_API_DIR)/20.txt 20 \
- -since $(SRC_API_DIR)/21.txt 21 \
- -since $(SRC_API_DIR)/22.txt 22 \
- -since $(SRC_API_DIR)/23.txt 23 \
- -since $(SRC_API_DIR)/24.txt 24 \
- -since $(SRC_API_DIR)/25.txt 25 \
- -since $(SRC_API_DIR)/26.txt 26 \
- -since $(SRC_API_DIR)/27.txt 27 \
+ -hidePackage com.android.server
+
+# Convert an sdk level to a "since" argument.
+since-arg = -since $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/$(1)/public/api/android.*) $(1)
+
+finalized_sdks := $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.xml,%,\
+ $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.xml))
+finalized_sdks += $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.txt,%,\
+ $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.txt))
+finalized_sdks := $(call numerically_sort,$(finalized_sdks))
+
+framework_docs_LOCAL_DROIDDOC_OPTIONS += $(foreach sdk,$(finalized_sdks),$(call since-arg,$(sdk)))
+ifneq ($(PLATFORM_VERSION_CODENAME),REL)
+ framework_docs_LOCAL_DROIDDOC_OPTIONS += \
+ -since ./frameworks/base/api/current.txt $(PLATFORM_VERSION_CODENAME)
+endif
+framework_docs_LOCAL_DROIDDOC_OPTIONS += \
-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
- -overview $(LOCAL_PATH)/core/java/overview.html \
+ -overview $(LOCAL_PATH)/core/java/overview.html
framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
$(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
@@ -259,116 +249,9 @@
-federate SupportLib https://developer.android.com \
-federationapi SupportLib prebuilts/sdk/current/support-api.txt
-# ==== the api stubs and current.xml ===========================
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := api-stubs
-
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -api $(INTERNAL_PLATFORM_API_FILE) \
- -privateApi $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
- -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
- -removedApi $(INTERNAL_PLATFORM_REMOVED_API_FILE) \
- -nodocs
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_API_FILE) \
- $(INTERNAL_PLATFORM_PRIVATE_API_FILE) \
- $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
-
-# ==== the system api stubs ===================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := system-api-stubs
-
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -showAnnotation android.annotation.SystemApi \
- -api $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
- -privateApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
- -privateDexApi $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE) \
- -removedApi $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) \
- -exactApi $(INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE) \
- -nodocs
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
- $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_API_FILE) \
- $(INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
-
-# ==== the test api stubs ===================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := test-api-stubs
-
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src \
- -showAnnotation android.annotation.TestApi \
- -api $(INTERNAL_PLATFORM_TEST_API_FILE) \
- -removedApi $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) \
- -exactApi $(INTERNAL_PLATFORM_TEST_EXACT_API_FILE) \
- -nodocs
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(INTERNAL_PLATFORM_TEST_API_FILE): $(full_target)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
# ==== check javadoc comments but don't generate docs ========
@@ -694,9 +577,140 @@
LOCAL_SRC_FILES := \
$(call all-proto-files-under, core/proto) \
$(call all-proto-files-under, libs/incident/proto)
+# b/72714520
+LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
include $(BUILD_HOST_JAVA_LIBRARY)
+# ==== hiddenapi lists =======================================
+include $(CLEAR_VARS)
+
+# File names of final API lists
+LOCAL_LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
+LOCAL_DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
+LOCAL_BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)
+
+# File names of source files we will use to generate the final API lists.
+LOCAL_SRC_GREYLIST := frameworks/base/config/hiddenapi-light-greylist.txt
+LOCAL_SRC_VENDOR_LIST := frameworks/base/config/hiddenapi-vendor-list.txt
+LOCAL_SRC_FORCE_BLACKLIST := frameworks/base/config/hiddenapi-force-blacklist.txt
+LOCAL_SRC_PUBLIC_API := $(INTERNAL_PLATFORM_DEX_API_FILE)
+LOCAL_SRC_PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
+LOCAL_SRC_REMOVED_API := $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE)
+
+LOCAL_SRC_ALL := \
+ $(LOCAL_SRC_GREYLIST) \
+ $(LOCAL_SRC_VENDOR_LIST) \
+ $(LOCAL_SRC_FORCE_BLACKLIST) \
+ $(LOCAL_SRC_PUBLIC_API) \
+ $(LOCAL_SRC_PRIVATE_API) \
+ $(LOCAL_SRC_REMOVED_API)
+
+define assert-has-no-overlap
+if [ ! -z "`comm -12 <(sort $(1)) <(sort $(2))`" ]; then \
+ echo "$(1) and $(2) should not overlap" 1>&2; \
+ comm -12 <(sort $(1)) <(sort $(2)) 1>&2; \
+ exit 1; \
+fi
+endef
+
+define assert-is-subset
+if [ ! -z "`comm -23 <(sort $(1)) <(sort $(2))`" ]; then \
+ echo "$(1) must be a subset of $(2)" 1>&2; \
+ comm -23 <(sort $(1)) <(sort $(2)) 1>&2; \
+ exit 1; \
+fi
+endef
+
+define assert-has-no-duplicates
+if [ ! -z "`sort $(1) | uniq -D`" ]; then \
+ echo "$(1) has duplicate entries" 1>&2; \
+ sort $(1) | uniq -D 1>&2; \
+ exit 1; \
+fi
+endef
+
+# The following rules build API lists in the build folder.
+# By not using files from the source tree, ART buildbots can mock these lists
+# or have alternative rules for building them. Other rules in the build system
+# should depend on the files in the build folder.
+
+# Merge light greylist from multiple files:
+# (1) manual greylist LOCAL_SRC_GREYLIST
+# (2) list of usages from vendor apps LOCAL_SRC_VENDOR_LIST
+# (3) list of removed APIs in LOCAL_SRC_REMOVED_API
+# @removed does not imply private in Doclava. We must take the subset also
+# in LOCAL_SRC_PRIVATE_API.
+# (4) list of serialization APIs
+# Automatically adds all methods which match the signatures in
+# REGEX_SERIALIZATION. These are greylisted in order to allow applications
+# to write their own serializers.
+$(LOCAL_LIGHT_GREYLIST): REGEX_SERIALIZATION := \
+ "readObject\(Ljava/io/ObjectInputStream;\)V" \
+ "readObjectNoData\(\)V" \
+ "readResolve\(\)Ljava/lang/Object;" \
+ "serialVersionUID:J" \
+ "serialPersistentFields:\[Ljava/io/ObjectStreamField;" \
+ "writeObject\(Ljava/io/ObjectOutputStream;\)V" \
+ "writeReplace\(\)Ljava/lang/Object;"
+$(LOCAL_LIGHT_GREYLIST): $(LOCAL_SRC_ALL)
+ sort $(LOCAL_SRC_GREYLIST) $(LOCAL_SRC_VENDOR_LIST) \
+ <(grep -E "\->("$(subst $(space),"|",$(REGEX_SERIALIZATION))")$$" \
+ $(LOCAL_SRC_PRIVATE_API)) \
+ <(comm -12 <(sort $(LOCAL_SRC_REMOVED_API)) <(sort $(LOCAL_SRC_PRIVATE_API))) \
+ > $@
+ $(call assert-has-no-duplicates,$@)
+ $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API))
+ $(call assert-has-no-overlap,$@,$(LOCAL_SRC_FORCE_BLACKLIST))
+
+# Generate dark greylist as remaining classes and class members in the same
+# package as classes listed in the light greylist.
+# The algorithm is as follows:
+# (1) extract the class descriptor from each entry in LOCAL_LIGHT_GREYLIST
+# (2) strip everything after the last forward-slash,
+# e.g. 'Lpackage/subpackage/class$inner;' turns into 'Lpackage/subpackage/'
+# (3) insert all entries from LOCAL_SRC_PRIVATE_API which begin with the package
+# name but do not contain another forward-slash in the class name, e.g.
+# matching '^Lpackage/subpackage/[^/;]*;'
+# (4) subtract entries shared with LOCAL_LIGHT_GREYLIST
+$(LOCAL_DARK_GREYLIST): $(LOCAL_SRC_ALL) $(LOCAL_LIGHT_GREYLIST)
+ comm -13 <(sort $(LOCAL_LIGHT_GREYLIST) $(LOCAL_SRC_FORCE_BLACKLIST)) \
+ <(cat $(LOCAL_SRC_PUBLIC_API) $(LOCAL_LIGHT_GREYLIST) | \
+ sed 's/\->.*//' | sed 's/\(.*\/\).*/\1/' | sort | uniq | \
+ while read PKG_NAME; do \
+ grep -E "^$${PKG_NAME}[^/;]*;" $(LOCAL_SRC_PRIVATE_API); \
+ done | sort | uniq) \
+ > $@
+ $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API))
+ $(call assert-has-no-duplicates,$@)
+ $(call assert-has-no-overlap,$@,$(LOCAL_LIGHT_GREYLIST))
+ $(call assert-has-no-overlap,$@,$(LOCAL_SRC_FORCE_BLACKLIST))
+
+# Generate blacklist as private API minus (light greylist plus dark greylist).
+$(LOCAL_BLACKLIST): $(LOCAL_SRC_ALL) $(LOCAL_LIGHT_GREYLIST) $(LOCAL_DARK_GREYLIST)
+ comm -13 <(sort $(LOCAL_LIGHT_GREYLIST) $(LOCAL_DARK_GREYLIST)) \
+ <(sort $(LOCAL_SRC_PRIVATE_API)) \
+ > $@
+ $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API))
+ $(call assert-has-no-duplicates,$@)
+ $(call assert-has-no-overlap,$@,$(LOCAL_LIGHT_GREYLIST))
+ $(call assert-has-no-overlap,$@,$(LOCAL_DARK_GREYLIST))
+ $(call assert-is-subset,$(LOCAL_SRC_FORCE_BLACKLIST),$@)
+
+# Build AOSP blacklist
+# ============================================================
+include $(CLEAR_VARS)
+
+LOCAL_LIGHT_GREYLIST_FILE := frameworks/base/config/hiddenapi-p-light-greylist.txt
+LOCAL_BLACKLIST_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-aosp-blacklist.txt
+
+.PHONY: hiddenapi-aosp-blacklist
+hiddenapi-aosp-blacklist: $(LOCAL_BLACKLIST_FILE)
+
+$(LOCAL_BLACKLIST_FILE): $(LOCAL_LIGHT_GREYLIST_FILE) $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
+ LC_COLLATE=C comm -13 <(sort $(LOCAL_LIGHT_GREYLIST_FILE)) \
+ <(sort $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)) > $@
+
# Include subdirectory makefiles
# ============================================================
@@ -707,4 +721,3 @@
endif
endif # ANDROID_BUILD_EMBEDDED
-
diff --git a/CleanSpec.mk b/CleanSpec.mk
index e728897..1f6860b 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -243,6 +243,8 @@
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/hardware)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/core/java/android/os/storage/*)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/common/obj/JAVA_LIBRARIES/platformprotos_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.mediadrm.signer.jar)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.location.provider.jar)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
# ******************************************************************
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 50a5974..a632771 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -6,4 +6,6 @@
packages/PrintSpooler/
services/print/
services/usb/
+ telephony/
+hidden_api_txt_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/checksorted_sha.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
diff --git a/apct-tests/perftests/core/Android.mk b/apct-tests/perftests/core/Android.mk
index 200f92f..d386f57 100644
--- a/apct-tests/perftests/core/Android.mk
+++ b/apct-tests/perftests/core/Android.mk
@@ -12,6 +12,7 @@
legacy-android-test
LOCAL_PACKAGE_NAME := CorePerfTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_JNI_SHARED_LIBRARIES := libperftestscore_jni
@@ -19,5 +20,3 @@
LOCAL_ASSET_DIR := $(TOP)/external/google-fonts/dancing-script
include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/apct-tests/perftests/core/jni/Android.bp b/apct-tests/perftests/core/jni/Android.bp
new file mode 100644
index 0000000..4c0f2aa
--- /dev/null
+++ b/apct-tests/perftests/core/jni/Android.bp
@@ -0,0 +1,13 @@
+cc_library_shared {
+ name: "libperftestscore_jni",
+ sdk_version: "21",
+
+ srcs: ["SystemPerfTest.cpp"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+}
diff --git a/apct-tests/perftests/core/jni/Android.mk b/apct-tests/perftests/core/jni/Android.mk
deleted file mode 100644
index d4c3f1e..0000000
--- a/apct-tests/perftests/core/jni/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_SDK_VERSION := 21
-
-LOCAL_SRC_FILES:= \
- SystemPerfTest.cpp \
-
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE)
-
-LOCAL_MODULE := libperftestscore_jni
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/apct-tests/perftests/multiuser/Android.mk b/apct-tests/perftests/multiuser/Android.mk
index e3f7775..4617af8 100644
--- a/apct-tests/perftests/multiuser/Android.mk
+++ b/apct-tests/perftests/multiuser/Android.mk
@@ -23,6 +23,7 @@
android-support-test
LOCAL_PACKAGE_NAME := MultiUserPerfTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
diff --git a/api/current.txt b/api/current.txt
index fba245d..241117b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6,6 +6,7 @@
public static final class Manifest.permission {
ctor public Manifest.permission();
+ field public static final java.lang.String ACCEPT_HANDOVER = "android.permission.ACCEPT_HANDOVER";
field public static final java.lang.String ACCESS_CHECKIN_PROPERTIES = "android.permission.ACCESS_CHECKIN_PROPERTIES";
field public static final java.lang.String ACCESS_COARSE_LOCATION = "android.permission.ACCESS_COARSE_LOCATION";
field public static final java.lang.String ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION";
@@ -92,6 +93,7 @@
field public static final java.lang.String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS";
field public static final java.lang.String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS";
field public static final java.lang.String NFC = "android.permission.NFC";
+ field public static final java.lang.String NFC_TRANSACTION_EVENT = "android.permission.NFC_TRANSACTION_EVENT";
field public static final java.lang.String PACKAGE_USAGE_STATS = "android.permission.PACKAGE_USAGE_STATS";
field public static final deprecated java.lang.String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY";
field public static final java.lang.String PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS";
@@ -5985,16 +5987,16 @@
method public android.os.ParcelFileDescriptor executeShellCommand(java.lang.String);
method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
- method public final android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();
+ method public android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();
method public android.view.WindowAnimationFrameStats getWindowAnimationFrameStats();
method public android.view.WindowContentFrameStats getWindowContentFrameStats(int);
method public java.util.List<android.view.accessibility.AccessibilityWindowInfo> getWindows();
method public boolean injectInputEvent(android.view.InputEvent, boolean);
- method public final boolean performGlobalAction(int);
+ method public boolean performGlobalAction(int);
method public void setOnAccessibilityEventListener(android.app.UiAutomation.OnAccessibilityEventListener);
method public boolean setRotation(int);
method public void setRunAsMonkey(boolean);
- method public final void setServiceInfo(android.accessibilityservice.AccessibilityServiceInfo);
+ method public void setServiceInfo(android.accessibilityservice.AccessibilityServiceInfo);
method public android.graphics.Bitmap takeScreenshot();
method public void waitForIdle(long, long) throws java.util.concurrent.TimeoutException;
field public static final int FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES = 1; // 0x1
@@ -6532,6 +6534,7 @@
field public static final int RESET_PASSWORD_DO_NOT_ASK_CREDENTIALS_ON_BOOT = 2; // 0x2
field public static final int RESET_PASSWORD_REQUIRE_ENTRY = 1; // 0x1
field public static final int SKIP_SETUP_WIZARD = 1; // 0x1
+ field public static final int WIPE_EUICC = 4; // 0x4
field public static final int WIPE_EXTERNAL_STORAGE = 1; // 0x1
field public static final int WIPE_RESET_PROTECTION_DATA = 2; // 0x2
}
@@ -7919,7 +7922,7 @@
method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
method public int getConnectionState(android.bluetooth.BluetoothDevice);
method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
- method public boolean registerApp(android.bluetooth.BluetoothHidDeviceAppSdpSettings, android.bluetooth.BluetoothHidDeviceAppQosSettings, android.bluetooth.BluetoothHidDeviceAppQosSettings, android.bluetooth.BluetoothHidDeviceCallback);
+ method public boolean registerApp(android.bluetooth.BluetoothHidDeviceAppSdpSettings, android.bluetooth.BluetoothHidDeviceAppQosSettings, android.bluetooth.BluetoothHidDeviceAppQosSettings, java.util.concurrent.Executor, android.bluetooth.BluetoothHidDevice.Callback);
method public boolean replyReport(android.bluetooth.BluetoothDevice, byte, byte, byte[]);
method public boolean reportError(android.bluetooth.BluetoothDevice, byte);
method public boolean sendReport(android.bluetooth.BluetoothDevice, int, byte[]);
@@ -7949,49 +7952,8 @@
field public static final byte SUBCLASS2_UNCATEGORIZED = 0; // 0x0
}
- public final class BluetoothHidDeviceAppQosSettings implements android.os.Parcelable {
- ctor public BluetoothHidDeviceAppQosSettings(int, int, int, int, int, int);
- method public int describeContents();
- method public int[] toArray();
- method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHidDeviceAppQosSettings> CREATOR;
- field public static final int MAX = -1; // 0xffffffff
- field public static final int SERVICE_BEST_EFFORT = 1; // 0x1
- field public static final int SERVICE_GUARANTEED = 2; // 0x2
- field public static final int SERVICE_NO_TRAFFIC = 0; // 0x0
- field public final int delayVariation;
- field public final int latency;
- field public final int peakBandwidth;
- field public final int serviceType;
- field public final int tokenBucketSize;
- field public final int tokenRate;
- }
-
- public static class BluetoothHidDeviceAppQosSettings.Builder {
- ctor public BluetoothHidDeviceAppQosSettings.Builder();
- method public android.bluetooth.BluetoothHidDeviceAppQosSettings build();
- method public android.bluetooth.BluetoothHidDeviceAppQosSettings.Builder delayVariation(int);
- method public android.bluetooth.BluetoothHidDeviceAppQosSettings.Builder latency(int);
- method public android.bluetooth.BluetoothHidDeviceAppQosSettings.Builder peakBandwidth(int);
- method public android.bluetooth.BluetoothHidDeviceAppQosSettings.Builder serviceType(int);
- method public android.bluetooth.BluetoothHidDeviceAppQosSettings.Builder tokenBucketSize(int);
- method public android.bluetooth.BluetoothHidDeviceAppQosSettings.Builder tokenRate(int);
- }
-
- public final class BluetoothHidDeviceAppSdpSettings implements android.os.Parcelable {
- ctor public BluetoothHidDeviceAppSdpSettings(java.lang.String, java.lang.String, java.lang.String, byte, byte[]);
- method public int describeContents();
- method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHidDeviceAppSdpSettings> CREATOR;
- field public final java.lang.String description;
- field public final byte[] descriptors;
- field public final java.lang.String name;
- field public final java.lang.String provider;
- field public final byte subclass;
- }
-
- public abstract class BluetoothHidDeviceCallback {
- ctor public BluetoothHidDeviceCallback();
+ public static abstract class BluetoothHidDevice.Callback {
+ ctor public BluetoothHidDevice.Callback();
method public void onAppStatusChanged(android.bluetooth.BluetoothDevice, boolean);
method public void onConnectionStateChanged(android.bluetooth.BluetoothDevice, int);
method public void onGetReport(android.bluetooth.BluetoothDevice, byte, byte, int);
@@ -8001,6 +7963,35 @@
method public void onVirtualCableUnplug(android.bluetooth.BluetoothDevice);
}
+ public final class BluetoothHidDeviceAppQosSettings implements android.os.Parcelable {
+ ctor public BluetoothHidDeviceAppQosSettings(int, int, int, int, int, int);
+ method public int describeContents();
+ method public int getDelayVariation();
+ method public int getLatency();
+ method public int getPeakBandwidth();
+ method public int getServiceType();
+ method public int getTokenBucketSize();
+ method public int getTokenRate();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHidDeviceAppQosSettings> CREATOR;
+ field public static final int MAX = -1; // 0xffffffff
+ field public static final int SERVICE_BEST_EFFORT = 1; // 0x1
+ field public static final int SERVICE_GUARANTEED = 2; // 0x2
+ field public static final int SERVICE_NO_TRAFFIC = 0; // 0x0
+ }
+
+ public final class BluetoothHidDeviceAppSdpSettings implements android.os.Parcelable {
+ ctor public BluetoothHidDeviceAppSdpSettings(java.lang.String, java.lang.String, java.lang.String, byte, byte[]);
+ method public int describeContents();
+ method public java.lang.String getDescription();
+ method public byte[] getDescriptors();
+ method public java.lang.String getName();
+ method public java.lang.String getProvider();
+ method public byte getSubclass();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothHidDeviceAppSdpSettings> CREATOR;
+ }
+
public final class BluetoothManager {
method public android.bluetooth.BluetoothAdapter getAdapter();
method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(int);
@@ -9046,6 +9037,7 @@
field public static final java.lang.String DISPLAY_SERVICE = "display";
field public static final java.lang.String DOWNLOAD_SERVICE = "download";
field public static final java.lang.String DROPBOX_SERVICE = "dropbox";
+ field public static final java.lang.String EUICC_SERVICE = "euicc";
field public static final java.lang.String FINGERPRINT_SERVICE = "fingerprint";
field public static final java.lang.String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
@@ -10849,6 +10841,7 @@
field public static final java.lang.String FEATURE_SIP_VOIP = "android.software.sip.voip";
field public static final java.lang.String FEATURE_TELEPHONY = "android.hardware.telephony";
field public static final java.lang.String FEATURE_TELEPHONY_CDMA = "android.hardware.telephony.cdma";
+ field public static final java.lang.String FEATURE_TELEPHONY_EUICC = "android.hardware.telephony.euicc";
field public static final java.lang.String FEATURE_TELEPHONY_GSM = "android.hardware.telephony.gsm";
field public static final java.lang.String FEATURE_TELEPHONY_MBMS = "android.hardware.telephony.mbms";
field public static final deprecated java.lang.String FEATURE_TELEVISION = "android.hardware.type.television";
@@ -11187,15 +11180,15 @@
public final class AssetManager implements java.lang.AutoCloseable {
method public void close();
- method public final java.lang.String[] getLocales();
- method public final java.lang.String[] list(java.lang.String) throws java.io.IOException;
- method public final java.io.InputStream open(java.lang.String) throws java.io.IOException;
- method public final java.io.InputStream open(java.lang.String, int) throws java.io.IOException;
- method public final android.content.res.AssetFileDescriptor openFd(java.lang.String) throws java.io.IOException;
- method public final android.content.res.AssetFileDescriptor openNonAssetFd(java.lang.String) throws java.io.IOException;
- method public final android.content.res.AssetFileDescriptor openNonAssetFd(int, java.lang.String) throws java.io.IOException;
- method public final android.content.res.XmlResourceParser openXmlResourceParser(java.lang.String) throws java.io.IOException;
- method public final android.content.res.XmlResourceParser openXmlResourceParser(int, java.lang.String) throws java.io.IOException;
+ method public java.lang.String[] getLocales();
+ method public java.lang.String[] list(java.lang.String) throws java.io.IOException;
+ method public java.io.InputStream open(java.lang.String) throws java.io.IOException;
+ method public java.io.InputStream open(java.lang.String, int) throws java.io.IOException;
+ method public android.content.res.AssetFileDescriptor openFd(java.lang.String) throws java.io.IOException;
+ method public android.content.res.AssetFileDescriptor openNonAssetFd(java.lang.String) throws java.io.IOException;
+ method public android.content.res.AssetFileDescriptor openNonAssetFd(int, java.lang.String) throws java.io.IOException;
+ method public android.content.res.XmlResourceParser openXmlResourceParser(java.lang.String) throws java.io.IOException;
+ method public android.content.res.XmlResourceParser openXmlResourceParser(int, java.lang.String) throws java.io.IOException;
field public static final int ACCESS_BUFFER = 3; // 0x3
field public static final int ACCESS_RANDOM = 1; // 0x1
field public static final int ACCESS_STREAMING = 2; // 0x2
@@ -11203,15 +11196,9 @@
}
public final class AssetManager.AssetInputStream extends java.io.InputStream {
- method public final int available() throws java.io.IOException;
- method public final void close() throws java.io.IOException;
- method public final void mark(int);
- method public final boolean markSupported();
- method public final int read() throws java.io.IOException;
- method public final int read(byte[]) throws java.io.IOException;
- method public final int read(byte[], int, int) throws java.io.IOException;
- method public final void reset() throws java.io.IOException;
- method public final long skip(long) throws java.io.IOException;
+ method public void mark(int);
+ method public int read() throws java.io.IOException;
+ method public void reset() throws java.io.IOException;
}
public class ColorStateList implements android.os.Parcelable {
@@ -11971,7 +11958,7 @@
method public java.util.List<android.util.Pair<java.lang.String, java.lang.String>> getAttachedDbs();
method public long getMaximumSize();
method public long getPageSize();
- method public final java.lang.String getPath();
+ method public java.lang.String getPath();
method public deprecated java.util.Map<java.lang.String, java.lang.String> getSyncedTables();
method public int getVersion();
method public boolean inTransaction();
@@ -12623,29 +12610,29 @@
method public void eraseColor(int);
method public android.graphics.Bitmap extractAlpha();
method public android.graphics.Bitmap extractAlpha(android.graphics.Paint, int[]);
- method public final int getAllocationByteCount();
- method public final int getByteCount();
- method public final android.graphics.ColorSpace getColorSpace();
- method public final android.graphics.Bitmap.Config getConfig();
+ method public int getAllocationByteCount();
+ method public int getByteCount();
+ method public android.graphics.ColorSpace getColorSpace();
+ method public android.graphics.Bitmap.Config getConfig();
method public int getDensity();
method public int getGenerationId();
- method public final int getHeight();
+ method public int getHeight();
method public byte[] getNinePatchChunk();
method public int getPixel(int, int);
method public void getPixels(int[], int, int, int, int, int, int);
- method public final int getRowBytes();
+ method public int getRowBytes();
method public int getScaledHeight(android.graphics.Canvas);
method public int getScaledHeight(android.util.DisplayMetrics);
method public int getScaledHeight(int);
method public int getScaledWidth(android.graphics.Canvas);
method public int getScaledWidth(android.util.DisplayMetrics);
method public int getScaledWidth(int);
- method public final int getWidth();
- method public final boolean hasAlpha();
- method public final boolean hasMipMap();
- method public final boolean isMutable();
- method public final boolean isPremultiplied();
- method public final boolean isRecycled();
+ method public int getWidth();
+ method public boolean hasAlpha();
+ method public boolean hasMipMap();
+ method public boolean isMutable();
+ method public boolean isPremultiplied();
+ method public boolean isRecycled();
method public void prepareToDraw();
method public void reconfigure(int, int, android.graphics.Bitmap.Config);
method public void recycle();
@@ -12653,11 +12640,11 @@
method public void setConfig(android.graphics.Bitmap.Config);
method public void setDensity(int);
method public void setHasAlpha(boolean);
- method public final void setHasMipMap(boolean);
+ method public void setHasMipMap(boolean);
method public void setHeight(int);
method public void setPixel(int, int, int);
method public void setPixels(int[], int, int, int, int, int, int);
- method public final void setPremultiplied(boolean);
+ method public void setPremultiplied(boolean);
method public void setWidth(int);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.graphics.Bitmap> CREATOR;
@@ -12729,7 +12716,7 @@
method public android.graphics.Bitmap decodeRegion(android.graphics.Rect, android.graphics.BitmapFactory.Options);
method public int getHeight();
method public int getWidth();
- method public final boolean isRecycled();
+ method public boolean isRecycled();
method public static android.graphics.BitmapRegionDecoder newInstance(byte[], int, int, boolean) throws java.io.IOException;
method public static android.graphics.BitmapRegionDecoder newInstance(java.io.FileDescriptor, boolean) throws java.io.IOException;
method public static android.graphics.BitmapRegionDecoder newInstance(java.io.InputStream, boolean) throws java.io.IOException;
@@ -13732,22 +13719,22 @@
ctor public Rect();
ctor public Rect(int, int, int, int);
ctor public Rect(android.graphics.Rect);
- method public final int centerX();
- method public final int centerY();
+ method public int centerX();
+ method public int centerY();
method public boolean contains(int, int);
method public boolean contains(int, int, int, int);
method public boolean contains(android.graphics.Rect);
method public int describeContents();
- method public final float exactCenterX();
- method public final float exactCenterY();
+ method public float exactCenterX();
+ method public float exactCenterY();
method public java.lang.String flattenToString();
- method public final int height();
+ method public int height();
method public void inset(int, int);
method public boolean intersect(int, int, int, int);
method public boolean intersect(android.graphics.Rect);
method public boolean intersects(int, int, int, int);
method public static boolean intersects(android.graphics.Rect, android.graphics.Rect);
- method public final boolean isEmpty();
+ method public boolean isEmpty();
method public void offset(int, int);
method public void offsetTo(int, int);
method public void readFromParcel(android.os.Parcel);
@@ -13761,7 +13748,7 @@
method public void union(int, int, int, int);
method public void union(android.graphics.Rect);
method public void union(int, int);
- method public final int width();
+ method public int width();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.graphics.Rect> CREATOR;
field public int bottom;
@@ -15297,9 +15284,7 @@
}
public static final class CameraCharacteristics.Key<T> {
- method public final boolean equals(java.lang.Object);
method public java.lang.String getName();
- method public final int hashCode();
}
public abstract class CameraConstrainedHighSpeedCaptureSession extends android.hardware.camera2.CameraCaptureSession {
@@ -15641,9 +15626,7 @@
}
public static final class CaptureRequest.Key<T> {
- method public final boolean equals(java.lang.Object);
method public java.lang.String getName();
- method public final int hashCode();
}
public class CaptureResult extends android.hardware.camera2.CameraMetadata {
@@ -15731,9 +15714,7 @@
}
public static final class CaptureResult.Key<T> {
- method public final boolean equals(java.lang.Object);
method public java.lang.String getName();
- method public final int hashCode();
}
public final class DngCreator implements java.lang.AutoCloseable {
@@ -15841,7 +15822,7 @@
method public float getComponent(int);
method public float getGreenEven();
method public float getGreenOdd();
- method public final float getRed();
+ method public float getRed();
field public static final int BLUE = 3; // 0x3
field public static final int COUNT = 4; // 0x4
field public static final int GREEN_EVEN = 1; // 0x1
@@ -15855,16 +15836,16 @@
method public android.util.Range<java.lang.Integer>[] getHighSpeedVideoFpsRangesFor(android.util.Size);
method public android.util.Size[] getHighSpeedVideoSizes();
method public android.util.Size[] getHighSpeedVideoSizesFor(android.util.Range<java.lang.Integer>);
- method public final int[] getInputFormats();
+ method public int[] getInputFormats();
method public android.util.Size[] getInputSizes(int);
- method public final int[] getOutputFormats();
+ method public int[] getOutputFormats();
method public long getOutputMinFrameDuration(int, android.util.Size);
method public <T> long getOutputMinFrameDuration(java.lang.Class<T>, android.util.Size);
method public <T> android.util.Size[] getOutputSizes(java.lang.Class<T>);
method public android.util.Size[] getOutputSizes(int);
method public long getOutputStallDuration(int, android.util.Size);
method public <T> long getOutputStallDuration(java.lang.Class<T>, android.util.Size);
- method public final int[] getValidOutputFormatsForInput(int);
+ method public int[] getValidOutputFormatsForInput(int);
method public boolean isOutputSupportedFor(int);
method public static <T> boolean isOutputSupportedFor(java.lang.Class<T>);
method public boolean isOutputSupportedFor(android.view.Surface);
@@ -16158,12 +16139,12 @@
public final class UCharacter implements android.icu.lang.UCharacterEnums.ECharacterCategory android.icu.lang.UCharacterEnums.ECharacterDirection {
method public static int charCount(int);
- method public static final int codePointAt(java.lang.CharSequence, int);
- method public static final int codePointAt(char[], int);
- method public static final int codePointAt(char[], int, int);
- method public static final int codePointBefore(java.lang.CharSequence, int);
- method public static final int codePointBefore(char[], int);
- method public static final int codePointBefore(char[], int, int);
+ method public static int codePointAt(java.lang.CharSequence, int);
+ method public static int codePointAt(char[], int);
+ method public static int codePointAt(char[], int, int);
+ method public static int codePointBefore(java.lang.CharSequence, int);
+ method public static int codePointBefore(char[], int);
+ method public static int codePointBefore(char[], int, int);
method public static int codePointCount(java.lang.CharSequence, int, int);
method public static int codePointCount(char[], int, int);
method public static int digit(int, int);
@@ -16171,7 +16152,7 @@
method public static int foldCase(int, boolean);
method public static java.lang.String foldCase(java.lang.String, boolean);
method public static int foldCase(int, int);
- method public static final java.lang.String foldCase(java.lang.String, int);
+ method public static java.lang.String foldCase(java.lang.String, int);
method public static char forDigit(int, int);
method public static android.icu.util.VersionInfo getAge(int);
method public static int getBidiPairedBracket(int);
@@ -16223,8 +16204,8 @@
method public static boolean isPrintable(int);
method public static boolean isSpaceChar(int);
method public static boolean isSupplementary(int);
- method public static final boolean isSupplementaryCodePoint(int);
- method public static final boolean isSurrogatePair(char, char);
+ method public static boolean isSupplementaryCodePoint(int);
+ method public static boolean isSurrogatePair(char, char);
method public static boolean isTitleCase(int);
method public static boolean isUAlphabetic(int);
method public static boolean isULowercase(int);
@@ -16233,13 +16214,13 @@
method public static boolean isUnicodeIdentifierPart(int);
method public static boolean isUnicodeIdentifierStart(int);
method public static boolean isUpperCase(int);
- method public static final boolean isValidCodePoint(int);
+ method public static boolean isValidCodePoint(int);
method public static boolean isWhitespace(int);
method public static int offsetByCodePoints(java.lang.CharSequence, int, int);
method public static int offsetByCodePoints(char[], int, int, int, int);
- method public static final int toChars(int, char[], int);
- method public static final char[] toChars(int);
- method public static final int toCodePoint(char, char);
+ method public static int toChars(int, char[], int);
+ method public static char[] toChars(int);
+ method public static int toCodePoint(char, char);
method public static int toLowerCase(int);
method public static java.lang.String toLowerCase(java.lang.String);
method public static java.lang.String toLowerCase(java.util.Locale, java.lang.String);
@@ -16529,7 +16510,7 @@
}
public static final class UCharacter.UnicodeBlock extends java.lang.Character.Subset {
- method public static final android.icu.lang.UCharacter.UnicodeBlock forName(java.lang.String);
+ method public static android.icu.lang.UCharacter.UnicodeBlock forName(java.lang.String);
method public int getID();
method public static android.icu.lang.UCharacter.UnicodeBlock getInstance(int);
method public static android.icu.lang.UCharacter.UnicodeBlock of(int);
@@ -17336,20 +17317,20 @@
}
public final class UScript {
- method public static final boolean breaksBetweenLetters(int);
- method public static final int[] getCode(java.util.Locale);
- method public static final int[] getCode(android.icu.util.ULocale);
- method public static final int[] getCode(java.lang.String);
- method public static final int getCodeFromName(java.lang.String);
- method public static final java.lang.String getName(int);
- method public static final java.lang.String getSampleString(int);
- method public static final int getScript(int);
- method public static final int getScriptExtensions(int, java.util.BitSet);
- method public static final java.lang.String getShortName(int);
- method public static final android.icu.lang.UScript.ScriptUsage getUsage(int);
- method public static final boolean hasScript(int, int);
- method public static final boolean isCased(int);
- method public static final boolean isRightToLeft(int);
+ method public static boolean breaksBetweenLetters(int);
+ method public static int[] getCode(java.util.Locale);
+ method public static int[] getCode(android.icu.util.ULocale);
+ method public static int[] getCode(java.lang.String);
+ method public static int getCodeFromName(java.lang.String);
+ method public static java.lang.String getName(int);
+ method public static java.lang.String getSampleString(int);
+ method public static int getScript(int);
+ method public static int getScriptExtensions(int, java.util.BitSet);
+ method public static java.lang.String getShortName(int);
+ method public static android.icu.lang.UScript.ScriptUsage getUsage(int);
+ method public static boolean hasScript(int, int);
+ method public static boolean isCased(int);
+ method public static boolean isRightToLeft(int);
field public static final int ADLAM = 167; // 0xa7
field public static final int AFAKA = 147; // 0x93
field public static final int AHOM = 161; // 0xa1
@@ -17764,14 +17745,14 @@
method public deprecated int hashCode();
method public int next();
method public int previous();
- method public static final int primaryOrder(int);
+ method public static int primaryOrder(int);
method public void reset();
- method public static final int secondaryOrder(int);
+ method public static int secondaryOrder(int);
method public void setOffset(int);
method public void setText(java.lang.String);
method public void setText(android.icu.text.UCharacterIterator);
method public void setText(java.text.CharacterIterator);
- method public static final int tertiaryOrder(int);
+ method public static int tertiaryOrder(int);
field public static final int IGNORABLE = 0; // 0x0
field public static final int NULLORDER = -1; // 0xffffffff
}
@@ -18998,7 +18979,7 @@
method public boolean isUpperCaseFirst();
method public void setAlternateHandlingDefault();
method public void setAlternateHandlingShifted(boolean);
- method public final void setCaseFirstDefault();
+ method public void setCaseFirstDefault();
method public void setCaseLevel(boolean);
method public void setCaseLevelDefault();
method public void setDecompositionDefault();
@@ -19971,11 +19952,11 @@
public final class LocaleData {
method public static android.icu.util.VersionInfo getCLDRVersion();
method public java.lang.String getDelimiter(int);
- method public static final android.icu.util.LocaleData getInstance(android.icu.util.ULocale);
- method public static final android.icu.util.LocaleData getInstance();
- method public static final android.icu.util.LocaleData.MeasurementSystem getMeasurementSystem(android.icu.util.ULocale);
+ method public static android.icu.util.LocaleData getInstance(android.icu.util.ULocale);
+ method public static android.icu.util.LocaleData getInstance();
+ method public static android.icu.util.LocaleData.MeasurementSystem getMeasurementSystem(android.icu.util.ULocale);
method public boolean getNoSubstitute();
- method public static final android.icu.util.LocaleData.PaperSize getPaperSize(android.icu.util.ULocale);
+ method public static android.icu.util.LocaleData.PaperSize getPaperSize(android.icu.util.ULocale);
method public void setNoSubstitute(boolean);
field public static final int ALT_QUOTATION_END = 3; // 0x3
field public static final int ALT_QUOTATION_START = 2; // 0x2
@@ -20116,6 +20097,7 @@
field public static final android.icu.util.MeasureUnit PICOMETER;
field public static final android.icu.util.MeasureUnit PINT;
field public static final android.icu.util.MeasureUnit PINT_METRIC;
+ field public static final android.icu.util.MeasureUnit POINT;
field public static final android.icu.util.MeasureUnit POUND;
field public static final android.icu.util.MeasureUnit POUND_PER_SQUARE_INCH;
field public static final android.icu.util.MeasureUnit QUART;
@@ -21442,6 +21424,7 @@
field public static final java.lang.String ACTION_AUDIO_BECOMING_NOISY = "android.media.AUDIO_BECOMING_NOISY";
field public static final java.lang.String ACTION_HDMI_AUDIO_PLUG = "android.media.action.HDMI_AUDIO_PLUG";
field public static final java.lang.String ACTION_HEADSET_PLUG = "android.intent.action.HEADSET_PLUG";
+ field public static final java.lang.String ACTION_MICROPHONE_MUTE_CHANGED = "android.media.action.MICROPHONE_MUTE_CHANGED";
field public static final deprecated java.lang.String ACTION_SCO_AUDIO_STATE_CHANGED = "android.media.SCO_AUDIO_STATE_CHANGED";
field public static final java.lang.String ACTION_SCO_AUDIO_STATE_UPDATED = "android.media.ACTION_SCO_AUDIO_STATE_UPDATED";
field public static final int ADJUST_LOWER = -1; // 0xffffffff
@@ -22156,40 +22139,40 @@
method public static android.media.MediaCodec createByCodecName(java.lang.String) throws java.io.IOException;
method public static android.media.MediaCodec createDecoderByType(java.lang.String) throws java.io.IOException;
method public static android.media.MediaCodec createEncoderByType(java.lang.String) throws java.io.IOException;
- method public final android.view.Surface createInputSurface();
+ method public android.view.Surface createInputSurface();
method public static android.view.Surface createPersistentInputSurface();
- method public final int dequeueInputBuffer(long);
- method public final int dequeueOutputBuffer(android.media.MediaCodec.BufferInfo, long);
+ method public int dequeueInputBuffer(long);
+ method public int dequeueOutputBuffer(android.media.MediaCodec.BufferInfo, long);
method protected void finalize();
- method public final void flush();
+ method public void flush();
method public android.media.MediaCodecInfo getCodecInfo();
method public java.nio.ByteBuffer getInputBuffer(int);
method public deprecated java.nio.ByteBuffer[] getInputBuffers();
- method public final android.media.MediaFormat getInputFormat();
+ method public android.media.MediaFormat getInputFormat();
method public android.media.Image getInputImage(int);
method public android.os.PersistableBundle getMetrics();
- method public final java.lang.String getName();
+ method public java.lang.String getName();
method public java.nio.ByteBuffer getOutputBuffer(int);
method public deprecated java.nio.ByteBuffer[] getOutputBuffers();
- method public final android.media.MediaFormat getOutputFormat();
- method public final android.media.MediaFormat getOutputFormat(int);
+ method public android.media.MediaFormat getOutputFormat();
+ method public android.media.MediaFormat getOutputFormat(int);
method public android.media.Image getOutputImage(int);
- method public final void queueInputBuffer(int, int, int, long, int) throws android.media.MediaCodec.CryptoException;
- method public final void queueSecureInputBuffer(int, int, android.media.MediaCodec.CryptoInfo, long, int) throws android.media.MediaCodec.CryptoException;
- method public final void release();
- method public final void releaseOutputBuffer(int, boolean);
- method public final void releaseOutputBuffer(int, long);
- method public final void reset();
+ method public void queueInputBuffer(int, int, int, long, int) throws android.media.MediaCodec.CryptoException;
+ method public void queueSecureInputBuffer(int, int, android.media.MediaCodec.CryptoInfo, long, int) throws android.media.MediaCodec.CryptoException;
+ method public void release();
+ method public void releaseOutputBuffer(int, boolean);
+ method public void releaseOutputBuffer(int, long);
+ method public void reset();
method public void setCallback(android.media.MediaCodec.Callback, android.os.Handler);
method public void setCallback(android.media.MediaCodec.Callback);
method public void setInputSurface(android.view.Surface);
method public void setOnFrameRenderedListener(android.media.MediaCodec.OnFrameRenderedListener, android.os.Handler);
method public void setOutputSurface(android.view.Surface);
- method public final void setParameters(android.os.Bundle);
- method public final void setVideoScalingMode(int);
- method public final void signalEndOfInputStream();
- method public final void start();
- method public final void stop();
+ method public void setParameters(android.os.Bundle);
+ method public void setVideoScalingMode(int);
+ method public void signalEndOfInputStream();
+ method public void start();
+ method public void stop();
field public static final int BUFFER_FLAG_CODEC_CONFIG = 2; // 0x2
field public static final int BUFFER_FLAG_END_OF_STREAM = 4; // 0x4
field public static final int BUFFER_FLAG_KEY_FRAME = 1; // 0x1
@@ -22283,10 +22266,10 @@
}
public final class MediaCodecInfo {
- method public final android.media.MediaCodecInfo.CodecCapabilities getCapabilitiesForType(java.lang.String);
- method public final java.lang.String getName();
- method public final java.lang.String[] getSupportedTypes();
- method public final boolean isEncoder();
+ method public android.media.MediaCodecInfo.CodecCapabilities getCapabilitiesForType(java.lang.String);
+ method public java.lang.String getName();
+ method public java.lang.String[] getSupportedTypes();
+ method public boolean isEncoder();
}
public static final class MediaCodecInfo.AudioCapabilities {
@@ -22306,9 +22289,9 @@
method public int getMaxSupportedInstances();
method public java.lang.String getMimeType();
method public android.media.MediaCodecInfo.VideoCapabilities getVideoCapabilities();
- method public final boolean isFeatureRequired(java.lang.String);
- method public final boolean isFeatureSupported(java.lang.String);
- method public final boolean isFormatSupported(android.media.MediaFormat);
+ method public boolean isFeatureRequired(java.lang.String);
+ method public boolean isFeatureSupported(java.lang.String);
+ method public boolean isFormatSupported(android.media.MediaFormat);
field public static final deprecated int COLOR_Format12bitRGB444 = 3; // 0x3
field public static final deprecated int COLOR_Format16bitARGB1555 = 5; // 0x5
field public static final deprecated int COLOR_Format16bitARGB4444 = 4; // 0x4
@@ -22565,11 +22548,11 @@
public final class MediaCodecList {
ctor public MediaCodecList(int);
- method public final java.lang.String findDecoderForFormat(android.media.MediaFormat);
- method public final java.lang.String findEncoderForFormat(android.media.MediaFormat);
- method public static final deprecated int getCodecCount();
- method public static final deprecated android.media.MediaCodecInfo getCodecInfoAt(int);
- method public final android.media.MediaCodecInfo[] getCodecInfos();
+ method public java.lang.String findDecoderForFormat(android.media.MediaFormat);
+ method public java.lang.String findEncoderForFormat(android.media.MediaFormat);
+ method public static deprecated int getCodecCount();
+ method public static deprecated android.media.MediaCodecInfo getCodecInfoAt(int);
+ method public android.media.MediaCodecInfo[] getCodecInfos();
field public static final int ALL_CODECS = 1; // 0x1
field public static final int REGULAR_CODECS = 0; // 0x0
}
@@ -22577,10 +22560,10 @@
public final class MediaCrypto {
ctor public MediaCrypto(java.util.UUID, byte[]) throws android.media.MediaCryptoException;
method protected void finalize();
- method public static final boolean isCryptoSchemeSupported(java.util.UUID);
- method public final void release();
- method public final boolean requiresSecureDecoderComponent(java.lang.String);
- method public final void setMediaDrmSession(byte[]) throws android.media.MediaCryptoException;
+ method public static boolean isCryptoSchemeSupported(java.util.UUID);
+ method public void release();
+ method public boolean requiresSecureDecoderComponent(java.lang.String);
+ method public void setMediaDrmSession(byte[]) throws android.media.MediaCryptoException;
}
public final class MediaCryptoException extends java.lang.Exception {
@@ -22596,10 +22579,10 @@
public final class MediaDescrambler implements java.lang.AutoCloseable {
ctor public MediaDescrambler(int) throws android.media.MediaCasException.UnsupportedCasException;
method public void close();
- method public final int descramble(java.nio.ByteBuffer, java.nio.ByteBuffer, android.media.MediaCodec.CryptoInfo);
+ method public int descramble(java.nio.ByteBuffer, java.nio.ByteBuffer, android.media.MediaCodec.CryptoInfo);
method protected void finalize();
- method public final boolean requiresSecureDecoderComponent(java.lang.String);
- method public final void setMediaCasSession(android.media.MediaCas.Session);
+ method public boolean requiresSecureDecoderComponent(java.lang.String);
+ method public void setMediaCasSession(android.media.MediaCas.Session);
}
public class MediaDescription implements android.os.Parcelable {
@@ -22648,13 +22631,13 @@
method public android.media.MediaDrm.ProvisionRequest getProvisionRequest();
method public byte[] getSecureStop(byte[]);
method public java.util.List<byte[]> getSecureStops();
- method public static final boolean isCryptoSchemeSupported(java.util.UUID);
- method public static final boolean isCryptoSchemeSupported(java.util.UUID, java.lang.String);
+ method public static boolean isCryptoSchemeSupported(java.util.UUID);
+ method public static boolean isCryptoSchemeSupported(java.util.UUID, java.lang.String);
method public byte[] openSession() throws android.media.NotProvisionedException, android.media.ResourceBusyException;
method public byte[] provideKeyResponse(byte[], byte[]) throws android.media.DeniedByServerException, android.media.NotProvisionedException;
method public void provideProvisionResponse(byte[]) throws android.media.DeniedByServerException;
method public java.util.HashMap<java.lang.String, java.lang.String> queryKeyStatus(byte[]);
- method public final void release();
+ method public void release();
method public void releaseAllSecureStops();
method public void releaseSecureStops(byte[]);
method public void removeKeys(byte[]);
@@ -22747,21 +22730,21 @@
method public int getSampleFlags();
method public long getSampleTime();
method public int getSampleTrackIndex();
- method public final int getTrackCount();
+ method public int getTrackCount();
method public android.media.MediaFormat getTrackFormat(int);
method public boolean hasCacheReachedEndOfStream();
method public int readSampleData(java.nio.ByteBuffer, int);
- method public final void release();
+ method public void release();
method public void seekTo(long, int);
method public void selectTrack(int);
- method public final void setDataSource(android.media.MediaDataSource) throws java.io.IOException;
- method public final void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException;
- method public final void setDataSource(java.lang.String, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException;
- method public final void setDataSource(java.lang.String) throws java.io.IOException;
- method public final void setDataSource(android.content.res.AssetFileDescriptor) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
- method public final void setDataSource(java.io.FileDescriptor) throws java.io.IOException;
- method public final void setDataSource(java.io.FileDescriptor, long, long) throws java.io.IOException;
- method public final void setMediaCas(android.media.MediaCas);
+ method public void setDataSource(android.media.MediaDataSource) throws java.io.IOException;
+ method public void setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException;
+ method public void setDataSource(java.lang.String, java.util.Map<java.lang.String, java.lang.String>) throws java.io.IOException;
+ method public void setDataSource(java.lang.String) throws java.io.IOException;
+ method public void setDataSource(android.content.res.AssetFileDescriptor) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
+ method public void setDataSource(java.io.FileDescriptor) throws java.io.IOException;
+ method public void setDataSource(java.io.FileDescriptor, long, long) throws java.io.IOException;
+ method public void setMediaCas(android.media.MediaCas);
method public void unselectTrack(int);
field public static final int SAMPLE_FLAG_ENCRYPTED = 2; // 0x2
field public static final int SAMPLE_FLAG_PARTIAL_FRAME = 4; // 0x4
@@ -22784,22 +22767,22 @@
public final class MediaFormat {
ctor public MediaFormat();
- method public final boolean containsKey(java.lang.String);
- method public static final android.media.MediaFormat createAudioFormat(java.lang.String, int, int);
- method public static final android.media.MediaFormat createSubtitleFormat(java.lang.String, java.lang.String);
- method public static final android.media.MediaFormat createVideoFormat(java.lang.String, int, int);
- method public final java.nio.ByteBuffer getByteBuffer(java.lang.String);
+ method public boolean containsKey(java.lang.String);
+ method public static android.media.MediaFormat createAudioFormat(java.lang.String, int, int);
+ method public static android.media.MediaFormat createSubtitleFormat(java.lang.String, java.lang.String);
+ method public static android.media.MediaFormat createVideoFormat(java.lang.String, int, int);
+ method public java.nio.ByteBuffer getByteBuffer(java.lang.String);
method public boolean getFeatureEnabled(java.lang.String);
- method public final float getFloat(java.lang.String);
- method public final int getInteger(java.lang.String);
- method public final long getLong(java.lang.String);
- method public final java.lang.String getString(java.lang.String);
- method public final void setByteBuffer(java.lang.String, java.nio.ByteBuffer);
+ method public float getFloat(java.lang.String);
+ method public int getInteger(java.lang.String);
+ method public long getLong(java.lang.String);
+ method public java.lang.String getString(java.lang.String);
+ method public void setByteBuffer(java.lang.String, java.nio.ByteBuffer);
method public void setFeatureEnabled(java.lang.String, boolean);
- method public final void setFloat(java.lang.String, float);
- method public final void setInteger(java.lang.String, int);
- method public final void setLong(java.lang.String, long);
- method public final void setString(java.lang.String, java.lang.String);
+ method public void setFloat(java.lang.String, float);
+ method public void setInteger(java.lang.String, int);
+ method public void setLong(java.lang.String, long);
+ method public void setString(java.lang.String, java.lang.String);
field public static final int COLOR_RANGE_FULL = 1; // 0x1
field public static final int COLOR_RANGE_LIMITED = 2; // 0x2
field public static final int COLOR_STANDARD_BT2020 = 6; // 0x6
@@ -23506,14 +23489,14 @@
public final class MediaSync {
ctor public MediaSync();
- method public final android.view.Surface createInputSurface();
+ method public android.view.Surface createInputSurface();
method protected void finalize();
method public void flush();
method public android.media.PlaybackParams getPlaybackParams();
method public android.media.SyncParams getSyncParams();
method public android.media.MediaTimestamp getTimestamp();
method public void queueAudio(java.nio.ByteBuffer, int, long);
- method public final void release();
+ method public void release();
method public void setAudioTrack(android.media.AudioTrack);
method public void setCallback(android.media.MediaSync.Callback, android.os.Handler);
method public void setOnErrorListener(android.media.MediaSync.OnErrorListener, android.os.Handler);
@@ -24468,7 +24451,7 @@
public final class MidiInputPort extends android.media.midi.MidiReceiver implements java.io.Closeable {
method public void close() throws java.io.IOException;
- method public final int getPortNumber();
+ method public int getPortNumber();
method public void onSend(byte[], int, int, long) throws java.io.IOException;
}
@@ -24493,7 +24476,7 @@
public final class MidiOutputPort extends android.media.midi.MidiSender implements java.io.Closeable {
method public void close() throws java.io.IOException;
- method public final int getPortNumber();
+ method public int getPortNumber();
method public void onConnect(android.media.midi.MidiReceiver);
method public void onDisconnect(android.media.midi.MidiReceiver);
}
@@ -24768,7 +24751,7 @@
package android.media.tv {
public final class TvContentRating {
- method public final boolean contains(android.media.tv.TvContentRating);
+ method public boolean contains(android.media.tv.TvContentRating);
method public static android.media.tv.TvContentRating createRating(java.lang.String, java.lang.String, java.lang.String, java.lang.String...);
method public java.lang.String flattenToString();
method public java.lang.String getDomain();
@@ -24818,7 +24801,7 @@
}
public static final class TvContract.Channels implements android.media.tv.TvContract.BaseTvColumns {
- method public static final java.lang.String getVideoResolution(java.lang.String);
+ method public static java.lang.String getVideoResolution(java.lang.String);
field public static final java.lang.String COLUMN_APP_LINK_COLOR = "app_link_color";
field public static final java.lang.String COLUMN_APP_LINK_ICON_URI = "app_link_icon_uri";
field public static final java.lang.String COLUMN_APP_LINK_INTENT_URI = "app_link_intent_uri";
@@ -25342,18 +25325,18 @@
public final class TvTrackInfo implements android.os.Parcelable {
method public int describeContents();
- method public final int getAudioChannelCount();
- method public final int getAudioSampleRate();
- method public final java.lang.CharSequence getDescription();
- method public final android.os.Bundle getExtra();
- method public final java.lang.String getId();
- method public final java.lang.String getLanguage();
- method public final int getType();
- method public final byte getVideoActiveFormatDescription();
- method public final float getVideoFrameRate();
- method public final int getVideoHeight();
- method public final float getVideoPixelAspectRatio();
- method public final int getVideoWidth();
+ method public int getAudioChannelCount();
+ method public int getAudioSampleRate();
+ method public java.lang.CharSequence getDescription();
+ method public android.os.Bundle getExtra();
+ method public java.lang.String getId();
+ method public java.lang.String getLanguage();
+ method public int getType();
+ method public byte getVideoActiveFormatDescription();
+ method public float getVideoFrameRate();
+ method public int getVideoHeight();
+ method public float getVideoPixelAspectRatio();
+ method public int getVideoWidth();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.media.tv.TvTrackInfo> CREATOR;
field public static final int TYPE_AUDIO = 0; // 0x0
@@ -25364,16 +25347,16 @@
public static final class TvTrackInfo.Builder {
ctor public TvTrackInfo.Builder(int, java.lang.String);
method public android.media.tv.TvTrackInfo build();
- method public final android.media.tv.TvTrackInfo.Builder setAudioChannelCount(int);
- method public final android.media.tv.TvTrackInfo.Builder setAudioSampleRate(int);
- method public final android.media.tv.TvTrackInfo.Builder setDescription(java.lang.CharSequence);
- method public final android.media.tv.TvTrackInfo.Builder setExtra(android.os.Bundle);
- method public final android.media.tv.TvTrackInfo.Builder setLanguage(java.lang.String);
- method public final android.media.tv.TvTrackInfo.Builder setVideoActiveFormatDescription(byte);
- method public final android.media.tv.TvTrackInfo.Builder setVideoFrameRate(float);
- method public final android.media.tv.TvTrackInfo.Builder setVideoHeight(int);
- method public final android.media.tv.TvTrackInfo.Builder setVideoPixelAspectRatio(float);
- method public final android.media.tv.TvTrackInfo.Builder setVideoWidth(int);
+ method public android.media.tv.TvTrackInfo.Builder setAudioChannelCount(int);
+ method public android.media.tv.TvTrackInfo.Builder setAudioSampleRate(int);
+ method public android.media.tv.TvTrackInfo.Builder setDescription(java.lang.CharSequence);
+ method public android.media.tv.TvTrackInfo.Builder setExtra(android.os.Bundle);
+ method public android.media.tv.TvTrackInfo.Builder setLanguage(java.lang.String);
+ method public android.media.tv.TvTrackInfo.Builder setVideoActiveFormatDescription(byte);
+ method public android.media.tv.TvTrackInfo.Builder setVideoFrameRate(float);
+ method public android.media.tv.TvTrackInfo.Builder setVideoHeight(int);
+ method public android.media.tv.TvTrackInfo.Builder setVideoPixelAspectRatio(float);
+ method public android.media.tv.TvTrackInfo.Builder setVideoWidth(int);
}
public class TvView extends android.view.ViewGroup {
@@ -25604,34 +25587,34 @@
}
public final class MtpObjectInfo {
- method public final int getAssociationDesc();
- method public final int getAssociationType();
- method public final int getCompressedSize();
- method public final long getCompressedSizeLong();
- method public final long getDateCreated();
- method public final long getDateModified();
- method public final int getFormat();
- method public final int getImagePixDepth();
- method public final long getImagePixDepthLong();
- method public final int getImagePixHeight();
- method public final long getImagePixHeightLong();
- method public final int getImagePixWidth();
- method public final long getImagePixWidthLong();
- method public final java.lang.String getKeywords();
- method public final java.lang.String getName();
- method public final int getObjectHandle();
- method public final int getParent();
- method public final int getProtectionStatus();
- method public final int getSequenceNumber();
- method public final long getSequenceNumberLong();
- method public final int getStorageId();
- method public final int getThumbCompressedSize();
- method public final long getThumbCompressedSizeLong();
- method public final int getThumbFormat();
- method public final int getThumbPixHeight();
- method public final long getThumbPixHeightLong();
- method public final int getThumbPixWidth();
- method public final long getThumbPixWidthLong();
+ method public int getAssociationDesc();
+ method public int getAssociationType();
+ method public int getCompressedSize();
+ method public long getCompressedSizeLong();
+ method public long getDateCreated();
+ method public long getDateModified();
+ method public int getFormat();
+ method public int getImagePixDepth();
+ method public long getImagePixDepthLong();
+ method public int getImagePixHeight();
+ method public long getImagePixHeightLong();
+ method public int getImagePixWidth();
+ method public long getImagePixWidthLong();
+ method public java.lang.String getKeywords();
+ method public java.lang.String getName();
+ method public int getObjectHandle();
+ method public int getParent();
+ method public int getProtectionStatus();
+ method public int getSequenceNumber();
+ method public long getSequenceNumberLong();
+ method public int getStorageId();
+ method public int getThumbCompressedSize();
+ method public long getThumbCompressedSizeLong();
+ method public int getThumbFormat();
+ method public int getThumbPixHeight();
+ method public long getThumbPixHeightLong();
+ method public int getThumbPixWidth();
+ method public long getThumbPixWidthLong();
}
public static class MtpObjectInfo.Builder {
@@ -25661,11 +25644,11 @@
}
public final class MtpStorageInfo {
- method public final java.lang.String getDescription();
- method public final long getFreeSpace();
- method public final long getMaxCapacity();
- method public final int getStorageId();
- method public final java.lang.String getVolumeIdentifier();
+ method public java.lang.String getDescription();
+ method public long getFreeSpace();
+ method public long getMaxCapacity();
+ method public int getStorageId();
+ method public java.lang.String getVolumeIdentifier();
}
}
@@ -25723,7 +25706,7 @@
field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
field public static final java.lang.String ACTION_CAPTIVE_PORTAL_SIGN_IN = "android.net.conn.CAPTIVE_PORTAL";
field public static final java.lang.String ACTION_RESTRICT_BACKGROUND_CHANGED = "android.net.conn.RESTRICT_BACKGROUND_CHANGED";
- field public static final java.lang.String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
+ field public static final deprecated java.lang.String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
field public static final deprecated int DEFAULT_NETWORK_PREFERENCE = 1; // 0x1
field public static final java.lang.String EXTRA_CAPTIVE_PORTAL = "android.net.extra.CAPTIVE_PORTAL";
field public static final java.lang.String EXTRA_CAPTIVE_PORTAL_URL = "android.net.extra.CAPTIVE_PORTAL_URL";
@@ -25742,17 +25725,17 @@
field public static final int RESTRICT_BACKGROUND_STATUS_DISABLED = 1; // 0x1
field public static final int RESTRICT_BACKGROUND_STATUS_ENABLED = 3; // 0x3
field public static final int RESTRICT_BACKGROUND_STATUS_WHITELISTED = 2; // 0x2
- field public static final int TYPE_BLUETOOTH = 7; // 0x7
- field public static final int TYPE_DUMMY = 8; // 0x8
- field public static final int TYPE_ETHERNET = 9; // 0x9
- field public static final int TYPE_MOBILE = 0; // 0x0
- field public static final int TYPE_MOBILE_DUN = 4; // 0x4
+ field public static final deprecated int TYPE_BLUETOOTH = 7; // 0x7
+ field public static final deprecated int TYPE_DUMMY = 8; // 0x8
+ field public static final deprecated int TYPE_ETHERNET = 9; // 0x9
+ field public static final deprecated int TYPE_MOBILE = 0; // 0x0
+ field public static final deprecated int TYPE_MOBILE_DUN = 4; // 0x4
field public static final deprecated int TYPE_MOBILE_HIPRI = 5; // 0x5
field public static final deprecated int TYPE_MOBILE_MMS = 2; // 0x2
field public static final deprecated int TYPE_MOBILE_SUPL = 3; // 0x3
- field public static final int TYPE_VPN = 17; // 0x11
- field public static final int TYPE_WIFI = 1; // 0x1
- field public static final int TYPE_WIMAX = 6; // 0x6
+ field public static final deprecated int TYPE_VPN = 17; // 0x11
+ field public static final deprecated int TYPE_WIFI = 1; // 0x1
+ field public static final deprecated int TYPE_WIMAX = 6; // 0x6
}
public static class ConnectivityManager.NetworkCallback {
@@ -25846,8 +25829,8 @@
public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable {
method public void close() throws java.io.IOException;
+ method public java.io.FileDescriptor getFileDescriptor();
method public int getPort();
- method public java.io.FileDescriptor getSocket();
}
public final class IpSecTransform implements java.lang.AutoCloseable {
@@ -25999,6 +25982,7 @@
field public static final int NET_CAPABILITY_CBS = 5; // 0x5
field public static final int NET_CAPABILITY_DUN = 2; // 0x2
field public static final int NET_CAPABILITY_EIMS = 10; // 0xa
+ field public static final int NET_CAPABILITY_FOREGROUND = 19; // 0x13
field public static final int NET_CAPABILITY_FOTA = 3; // 0x3
field public static final int NET_CAPABILITY_IA = 7; // 0x7
field public static final int NET_CAPABILITY_IMS = 4; // 0x4
@@ -26007,6 +25991,7 @@
field public static final int NET_CAPABILITY_NOT_METERED = 11; // 0xb
field public static final int NET_CAPABILITY_NOT_RESTRICTED = 13; // 0xd
field public static final int NET_CAPABILITY_NOT_ROAMING = 18; // 0x12
+ field public static final int NET_CAPABILITY_NOT_SUSPENDED = 21; // 0x15
field public static final int NET_CAPABILITY_NOT_VPN = 15; // 0xf
field public static final int NET_CAPABILITY_RCS = 8; // 0x8
field public static final int NET_CAPABILITY_SUPL = 1; // 0x1
@@ -26027,16 +26012,16 @@
method public int describeContents();
method public android.net.NetworkInfo.DetailedState getDetailedState();
method public java.lang.String getExtraInfo();
- method public java.lang.String getReason();
- method public android.net.NetworkInfo.State getState();
+ method public deprecated java.lang.String getReason();
+ method public deprecated android.net.NetworkInfo.State getState();
method public int getSubtype();
method public java.lang.String getSubtypeName();
- method public int getType();
- method public java.lang.String getTypeName();
- method public boolean isAvailable();
+ method public deprecated int getType();
+ method public deprecated java.lang.String getTypeName();
+ method public deprecated boolean isAvailable();
method public boolean isConnected();
- method public boolean isConnectedOrConnecting();
- method public boolean isFailover();
+ method public deprecated boolean isConnectedOrConnecting();
+ method public deprecated boolean isFailover();
method public deprecated boolean isRoaming();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.net.NetworkInfo> CREATOR;
@@ -26073,6 +26058,8 @@
public class NetworkRequest implements android.os.Parcelable {
method public int describeContents();
+ method public boolean hasCapability(int);
+ method public boolean hasTransport(int);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.net.NetworkRequest> CREATOR;
}
@@ -26097,10 +26084,10 @@
public final class Proxy {
ctor public Proxy();
- method public static final deprecated java.lang.String getDefaultHost();
- method public static final deprecated int getDefaultPort();
- method public static final deprecated java.lang.String getHost(android.content.Context);
- method public static final deprecated int getPort(android.content.Context);
+ method public static deprecated java.lang.String getDefaultHost();
+ method public static deprecated int getDefaultPort();
+ method public static deprecated java.lang.String getHost(android.content.Context);
+ method public static deprecated int getPort(android.content.Context);
field public static final deprecated java.lang.String EXTRA_PROXY_INFO = "android.intent.extra.PROXY_INFO";
field public static final java.lang.String PROXY_CHANGE_ACTION = "android.intent.action.PROXY_CHANGE";
}
@@ -27543,10 +27530,14 @@
field public static final java.lang.String ACTION_NDEF_DISCOVERED = "android.nfc.action.NDEF_DISCOVERED";
field public static final java.lang.String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED";
field public static final java.lang.String ACTION_TECH_DISCOVERED = "android.nfc.action.TECH_DISCOVERED";
+ field public static final java.lang.String ACTION_TRANSACTION_DETECTED = "android.nfc.action.TRANSACTION_DETECTED";
field public static final java.lang.String EXTRA_ADAPTER_STATE = "android.nfc.extra.ADAPTER_STATE";
+ field public static final java.lang.String EXTRA_AID = "android.nfc.extra.AID";
+ field public static final java.lang.String EXTRA_DATA = "android.nfc.extra.DATA";
field public static final java.lang.String EXTRA_ID = "android.nfc.extra.ID";
field public static final java.lang.String EXTRA_NDEF_MESSAGES = "android.nfc.extra.NDEF_MESSAGES";
field public static final java.lang.String EXTRA_READER_PRESENCE_CHECK_DELAY = "presence";
+ field public static final java.lang.String EXTRA_SECURE_ELEMENT_NAME = "android.nfc.extra.SECURE_ELEMENT_NAME";
field public static final java.lang.String EXTRA_TAG = "android.nfc.extra.TAG";
field public static final int FLAG_READER_NFC_A = 1; // 0x1
field public static final int FLAG_READER_NFC_B = 2; // 0x2
@@ -31045,9 +31036,9 @@
method public static void dumpHprofData(java.lang.String) throws java.io.IOException;
method public static boolean dumpService(java.lang.String, java.io.FileDescriptor, java.lang.String[]);
method public static void enableEmulatorTraceOutput();
- method public static final int getBinderDeathObjectCount();
- method public static final int getBinderLocalObjectCount();
- method public static final int getBinderProxyObjectCount();
+ method public static int getBinderDeathObjectCount();
+ method public static int getBinderLocalObjectCount();
+ method public static int getBinderProxyObjectCount();
method public static int getBinderReceivedTransactions();
method public static int getBinderSentTransactions();
method public static deprecated int getGlobalAllocCount();
@@ -31455,114 +31446,114 @@
}
public final class Parcel {
- method public final void appendFrom(android.os.Parcel, int, int);
- method public final android.os.IBinder[] createBinderArray();
- method public final java.util.ArrayList<android.os.IBinder> createBinderArrayList();
- method public final boolean[] createBooleanArray();
- method public final byte[] createByteArray();
- method public final char[] createCharArray();
- method public final double[] createDoubleArray();
- method public final float[] createFloatArray();
- method public final int[] createIntArray();
- method public final long[] createLongArray();
- method public final java.lang.String[] createStringArray();
- method public final java.util.ArrayList<java.lang.String> createStringArrayList();
- method public final <T> T[] createTypedArray(android.os.Parcelable.Creator<T>);
- method public final <T> java.util.ArrayList<T> createTypedArrayList(android.os.Parcelable.Creator<T>);
- method public final int dataAvail();
- method public final int dataCapacity();
- method public final int dataPosition();
- method public final int dataSize();
- method public final void enforceInterface(java.lang.String);
- method public final boolean hasFileDescriptors();
- method public final byte[] marshall();
+ method public void appendFrom(android.os.Parcel, int, int);
+ method public android.os.IBinder[] createBinderArray();
+ method public java.util.ArrayList<android.os.IBinder> createBinderArrayList();
+ method public boolean[] createBooleanArray();
+ method public byte[] createByteArray();
+ method public char[] createCharArray();
+ method public double[] createDoubleArray();
+ method public float[] createFloatArray();
+ method public int[] createIntArray();
+ method public long[] createLongArray();
+ method public java.lang.String[] createStringArray();
+ method public java.util.ArrayList<java.lang.String> createStringArrayList();
+ method public <T> T[] createTypedArray(android.os.Parcelable.Creator<T>);
+ method public <T> java.util.ArrayList<T> createTypedArrayList(android.os.Parcelable.Creator<T>);
+ method public int dataAvail();
+ method public int dataCapacity();
+ method public int dataPosition();
+ method public int dataSize();
+ method public void enforceInterface(java.lang.String);
+ method public boolean hasFileDescriptors();
+ method public byte[] marshall();
method public static android.os.Parcel obtain();
- method public final java.lang.Object[] readArray(java.lang.ClassLoader);
- method public final java.util.ArrayList readArrayList(java.lang.ClassLoader);
- method public final void readBinderArray(android.os.IBinder[]);
- method public final void readBinderList(java.util.List<android.os.IBinder>);
- method public final void readBooleanArray(boolean[]);
- method public final android.os.Bundle readBundle();
- method public final android.os.Bundle readBundle(java.lang.ClassLoader);
- method public final byte readByte();
- method public final void readByteArray(byte[]);
- method public final void readCharArray(char[]);
- method public final double readDouble();
- method public final void readDoubleArray(double[]);
- method public final void readException();
- method public final void readException(int, java.lang.String);
- method public final android.os.ParcelFileDescriptor readFileDescriptor();
- method public final float readFloat();
- method public final void readFloatArray(float[]);
- method public final java.util.HashMap readHashMap(java.lang.ClassLoader);
- method public final int readInt();
- method public final void readIntArray(int[]);
- method public final void readList(java.util.List, java.lang.ClassLoader);
- method public final long readLong();
- method public final void readLongArray(long[]);
- method public final void readMap(java.util.Map, java.lang.ClassLoader);
- method public final <T extends android.os.Parcelable> T readParcelable(java.lang.ClassLoader);
- method public final android.os.Parcelable[] readParcelableArray(java.lang.ClassLoader);
- method public final android.os.PersistableBundle readPersistableBundle();
- method public final android.os.PersistableBundle readPersistableBundle(java.lang.ClassLoader);
- method public final java.io.Serializable readSerializable();
- method public final android.util.Size readSize();
- method public final android.util.SizeF readSizeF();
- method public final android.util.SparseArray readSparseArray(java.lang.ClassLoader);
- method public final android.util.SparseBooleanArray readSparseBooleanArray();
- method public final java.lang.String readString();
- method public final void readStringArray(java.lang.String[]);
- method public final void readStringList(java.util.List<java.lang.String>);
- method public final android.os.IBinder readStrongBinder();
- method public final <T> void readTypedArray(T[], android.os.Parcelable.Creator<T>);
- method public final <T> void readTypedList(java.util.List<T>, android.os.Parcelable.Creator<T>);
- method public final <T> T readTypedObject(android.os.Parcelable.Creator<T>);
- method public final java.lang.Object readValue(java.lang.ClassLoader);
- method public final void recycle();
- method public final void setDataCapacity(int);
- method public final void setDataPosition(int);
- method public final void setDataSize(int);
- method public final void unmarshall(byte[], int, int);
- method public final void writeArray(java.lang.Object[]);
- method public final void writeBinderArray(android.os.IBinder[]);
- method public final void writeBinderList(java.util.List<android.os.IBinder>);
- method public final void writeBooleanArray(boolean[]);
- method public final void writeBundle(android.os.Bundle);
- method public final void writeByte(byte);
- method public final void writeByteArray(byte[]);
- method public final void writeByteArray(byte[], int, int);
- method public final void writeCharArray(char[]);
- method public final void writeDouble(double);
- method public final void writeDoubleArray(double[]);
- method public final void writeException(java.lang.Exception);
- method public final void writeFileDescriptor(java.io.FileDescriptor);
- method public final void writeFloat(float);
- method public final void writeFloatArray(float[]);
- method public final void writeInt(int);
- method public final void writeIntArray(int[]);
- method public final void writeInterfaceToken(java.lang.String);
- method public final void writeList(java.util.List);
- method public final void writeLong(long);
- method public final void writeLongArray(long[]);
- method public final void writeMap(java.util.Map);
- method public final void writeNoException();
- method public final void writeParcelable(android.os.Parcelable, int);
- method public final <T extends android.os.Parcelable> void writeParcelableArray(T[], int);
- method public final void writePersistableBundle(android.os.PersistableBundle);
- method public final void writeSerializable(java.io.Serializable);
- method public final void writeSize(android.util.Size);
- method public final void writeSizeF(android.util.SizeF);
- method public final void writeSparseArray(android.util.SparseArray<java.lang.Object>);
- method public final void writeSparseBooleanArray(android.util.SparseBooleanArray);
- method public final void writeString(java.lang.String);
- method public final void writeStringArray(java.lang.String[]);
- method public final void writeStringList(java.util.List<java.lang.String>);
- method public final void writeStrongBinder(android.os.IBinder);
- method public final void writeStrongInterface(android.os.IInterface);
- method public final <T extends android.os.Parcelable> void writeTypedArray(T[], int);
- method public final <T extends android.os.Parcelable> void writeTypedList(java.util.List<T>);
- method public final <T extends android.os.Parcelable> void writeTypedObject(T, int);
- method public final void writeValue(java.lang.Object);
+ method public java.lang.Object[] readArray(java.lang.ClassLoader);
+ method public java.util.ArrayList readArrayList(java.lang.ClassLoader);
+ method public void readBinderArray(android.os.IBinder[]);
+ method public void readBinderList(java.util.List<android.os.IBinder>);
+ method public void readBooleanArray(boolean[]);
+ method public android.os.Bundle readBundle();
+ method public android.os.Bundle readBundle(java.lang.ClassLoader);
+ method public byte readByte();
+ method public void readByteArray(byte[]);
+ method public void readCharArray(char[]);
+ method public double readDouble();
+ method public void readDoubleArray(double[]);
+ method public void readException();
+ method public void readException(int, java.lang.String);
+ method public android.os.ParcelFileDescriptor readFileDescriptor();
+ method public float readFloat();
+ method public void readFloatArray(float[]);
+ method public java.util.HashMap readHashMap(java.lang.ClassLoader);
+ method public int readInt();
+ method public void readIntArray(int[]);
+ method public void readList(java.util.List, java.lang.ClassLoader);
+ method public long readLong();
+ method public void readLongArray(long[]);
+ method public void readMap(java.util.Map, java.lang.ClassLoader);
+ method public <T extends android.os.Parcelable> T readParcelable(java.lang.ClassLoader);
+ method public android.os.Parcelable[] readParcelableArray(java.lang.ClassLoader);
+ method public android.os.PersistableBundle readPersistableBundle();
+ method public android.os.PersistableBundle readPersistableBundle(java.lang.ClassLoader);
+ method public java.io.Serializable readSerializable();
+ method public android.util.Size readSize();
+ method public android.util.SizeF readSizeF();
+ method public android.util.SparseArray readSparseArray(java.lang.ClassLoader);
+ method public android.util.SparseBooleanArray readSparseBooleanArray();
+ method public java.lang.String readString();
+ method public void readStringArray(java.lang.String[]);
+ method public void readStringList(java.util.List<java.lang.String>);
+ method public android.os.IBinder readStrongBinder();
+ method public <T> void readTypedArray(T[], android.os.Parcelable.Creator<T>);
+ method public <T> void readTypedList(java.util.List<T>, android.os.Parcelable.Creator<T>);
+ method public <T> T readTypedObject(android.os.Parcelable.Creator<T>);
+ method public java.lang.Object readValue(java.lang.ClassLoader);
+ method public void recycle();
+ method public void setDataCapacity(int);
+ method public void setDataPosition(int);
+ method public void setDataSize(int);
+ method public void unmarshall(byte[], int, int);
+ method public void writeArray(java.lang.Object[]);
+ method public void writeBinderArray(android.os.IBinder[]);
+ method public void writeBinderList(java.util.List<android.os.IBinder>);
+ method public void writeBooleanArray(boolean[]);
+ method public void writeBundle(android.os.Bundle);
+ method public void writeByte(byte);
+ method public void writeByteArray(byte[]);
+ method public void writeByteArray(byte[], int, int);
+ method public void writeCharArray(char[]);
+ method public void writeDouble(double);
+ method public void writeDoubleArray(double[]);
+ method public void writeException(java.lang.Exception);
+ method public void writeFileDescriptor(java.io.FileDescriptor);
+ method public void writeFloat(float);
+ method public void writeFloatArray(float[]);
+ method public void writeInt(int);
+ method public void writeIntArray(int[]);
+ method public void writeInterfaceToken(java.lang.String);
+ method public void writeList(java.util.List);
+ method public void writeLong(long);
+ method public void writeLongArray(long[]);
+ method public void writeMap(java.util.Map);
+ method public void writeNoException();
+ method public void writeParcelable(android.os.Parcelable, int);
+ method public <T extends android.os.Parcelable> void writeParcelableArray(T[], int);
+ method public void writePersistableBundle(android.os.PersistableBundle);
+ method public void writeSerializable(java.io.Serializable);
+ method public void writeSize(android.util.Size);
+ method public void writeSizeF(android.util.SizeF);
+ method public void writeSparseArray(android.util.SparseArray<java.lang.Object>);
+ method public void writeSparseBooleanArray(android.util.SparseBooleanArray);
+ method public void writeString(java.lang.String);
+ method public void writeStringArray(java.lang.String[]);
+ method public void writeStringList(java.util.List<java.lang.String>);
+ method public void writeStrongBinder(android.os.IBinder);
+ method public void writeStrongInterface(android.os.IInterface);
+ method public <T extends android.os.Parcelable> void writeTypedArray(T[], int);
+ method public <T extends android.os.Parcelable> void writeTypedList(java.util.List<T>);
+ method public <T extends android.os.Parcelable> void writeTypedObject(T, int);
+ method public void writeValue(java.lang.Object);
field public static final android.os.Parcelable.Creator<java.lang.String> STRING_CREATOR;
}
@@ -33129,7 +33120,7 @@
}
public static final class CalendarContract.Attendees implements android.provider.BaseColumns android.provider.CalendarContract.AttendeesColumns android.provider.CalendarContract.EventsColumns {
- method public static final android.database.Cursor query(android.content.ContentResolver, long, java.lang.String[]);
+ method public static android.database.Cursor query(android.content.ContentResolver, long, java.lang.String[]);
field public static final android.net.Uri CONTENT_URI;
}
@@ -33258,7 +33249,7 @@
}
public static final class CalendarContract.EventDays implements android.provider.CalendarContract.EventDaysColumns {
- method public static final android.database.Cursor query(android.content.ContentResolver, int, int, java.lang.String[]);
+ method public static android.database.Cursor query(android.content.ContentResolver, int, int, java.lang.String[]);
field public static final android.net.Uri CONTENT_URI;
}
@@ -33351,8 +33342,8 @@
}
public static final class CalendarContract.Instances implements android.provider.BaseColumns android.provider.CalendarContract.CalendarColumns android.provider.CalendarContract.EventsColumns {
- method public static final android.database.Cursor query(android.content.ContentResolver, java.lang.String[], long, long);
- method public static final android.database.Cursor query(android.content.ContentResolver, java.lang.String[], long, long, java.lang.String);
+ method public static android.database.Cursor query(android.content.ContentResolver, java.lang.String[], long, long);
+ method public static android.database.Cursor query(android.content.ContentResolver, java.lang.String[], long, long, java.lang.String);
field public static final java.lang.String BEGIN = "begin";
field public static final android.net.Uri CONTENT_BY_DAY_URI;
field public static final android.net.Uri CONTENT_SEARCH_BY_DAY_URI;
@@ -33367,7 +33358,7 @@
}
public static final class CalendarContract.Reminders implements android.provider.BaseColumns android.provider.CalendarContract.EventsColumns android.provider.CalendarContract.RemindersColumns {
- method public static final android.database.Cursor query(android.content.ContentResolver, long, java.lang.String[]);
+ method public static android.database.Cursor query(android.content.ContentResolver, long, java.lang.String[]);
field public static final android.net.Uri CONTENT_URI;
}
@@ -33431,7 +33422,7 @@
field public static final java.lang.String FEATURES = "features";
field public static final int FEATURES_HD_CALL = 4; // 0x4
field public static final int FEATURES_PULLED_EXTERNALLY = 2; // 0x2
- field public static final int FEATURES_RTT = 16; // 0x10
+ field public static final int FEATURES_RTT = 32; // 0x20
field public static final int FEATURES_VIDEO = 1; // 0x1
field public static final int FEATURES_WIFI = 8; // 0x8
field public static final java.lang.String GEOCODED_LOCATION = "geocoded_location";
@@ -33475,7 +33466,7 @@
method public static deprecated java.lang.Object decodeImProtocol(java.lang.String);
method public static deprecated java.lang.String encodeCustomImProtocol(java.lang.String);
method public static deprecated java.lang.String encodePredefinedImProtocol(int);
- method public static final deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, int, java.lang.CharSequence);
+ method public static deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, int, java.lang.CharSequence);
field public static final deprecated java.lang.String CONTENT_EMAIL_ITEM_TYPE = "vnd.android.cursor.item/email";
field public static final deprecated java.lang.String CONTENT_EMAIL_TYPE = "vnd.android.cursor.dir/email";
field public static final deprecated android.net.Uri CONTENT_EMAIL_URI;
@@ -33625,7 +33616,7 @@
}
public static final deprecated class Contacts.Organizations implements android.provider.BaseColumns android.provider.Contacts.OrganizationColumns {
- method public static final deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, java.lang.CharSequence);
+ method public static deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, java.lang.CharSequence);
field public static final deprecated java.lang.String CONTENT_DIRECTORY = "organizations";
field public static final deprecated android.net.Uri CONTENT_URI;
field public static final deprecated java.lang.String DEFAULT_SORT_ORDER = "company, title, isprimary ASC";
@@ -33682,8 +33673,8 @@
}
public static final deprecated class Contacts.Phones implements android.provider.BaseColumns android.provider.Contacts.PeopleColumns android.provider.Contacts.PhonesColumns {
- method public static final deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, java.lang.CharSequence, java.lang.CharSequence[]);
- method public static final deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, java.lang.CharSequence);
+ method public static deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, java.lang.CharSequence, java.lang.CharSequence[]);
+ method public static deprecated java.lang.CharSequence getDisplayLabel(android.content.Context, int, java.lang.CharSequence);
field public static final deprecated android.net.Uri CONTENT_FILTER_URL;
field public static final deprecated java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone";
field public static final deprecated java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/phone";
@@ -33823,8 +33814,8 @@
}
public static final class ContactsContract.CommonDataKinds.Email implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
- method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
- method public static final int getTypeLabelResource(int);
+ method public static java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
+ method public static int getTypeLabelResource(int);
field public static final java.lang.String ADDRESS = "data1";
field public static final android.net.Uri CONTENT_FILTER_URI;
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/email_v2";
@@ -33844,7 +33835,7 @@
}
public static final class ContactsContract.CommonDataKinds.Event implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
- method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
+ method public static java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
method public static int getTypeResource(java.lang.Integer);
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_event";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
@@ -33875,10 +33866,10 @@
}
public static final class ContactsContract.CommonDataKinds.Im implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
- method public static final java.lang.CharSequence getProtocolLabel(android.content.res.Resources, int, java.lang.CharSequence);
- method public static final int getProtocolLabelResource(int);
- method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
- method public static final int getTypeLabelResource(int);
+ method public static java.lang.CharSequence getProtocolLabel(android.content.res.Resources, int, java.lang.CharSequence);
+ method public static int getProtocolLabelResource(int);
+ method public static java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
+ method public static int getTypeLabelResource(int);
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/im";
field public static final java.lang.String CUSTOM_PROTOCOL = "data6";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
@@ -33923,8 +33914,8 @@
}
public static final class ContactsContract.CommonDataKinds.Organization implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
- method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
- method public static final int getTypeLabelResource(int);
+ method public static java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
+ method public static int getTypeLabelResource(int);
field public static final java.lang.String COMPANY = "data1";
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/organization";
field public static final java.lang.String DEPARTMENT = "data5";
@@ -33942,8 +33933,8 @@
}
public static final class ContactsContract.CommonDataKinds.Phone implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
- method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
- method public static final int getTypeLabelResource(int);
+ method public static java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
+ method public static int getTypeLabelResource(int);
field public static final android.net.Uri CONTENT_FILTER_URI;
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_v2";
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/phone_v2";
@@ -33988,8 +33979,8 @@
}
public static final class ContactsContract.CommonDataKinds.Relation implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
- method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
- method public static final int getTypeLabelResource(int);
+ method public static java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
+ method public static int getTypeLabelResource(int);
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/relation";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
@@ -34012,8 +34003,8 @@
}
public static final class ContactsContract.CommonDataKinds.SipAddress implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
- method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
- method public static final int getTypeLabelResource(int);
+ method public static java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
+ method public static int getTypeLabelResource(int);
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/sip_address";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
@@ -34043,8 +34034,8 @@
}
public static final class ContactsContract.CommonDataKinds.StructuredPostal implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
- method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
- method public static final int getTypeLabelResource(int);
+ method public static java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
+ method public static int getTypeLabelResource(int);
field public static final java.lang.String CITY = "data7";
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/postal-address_v2";
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/postal-address_v2";
@@ -34869,7 +34860,7 @@
public static final class MediaStore.Audio.Artists.Albums implements android.provider.MediaStore.Audio.AlbumColumns {
ctor public MediaStore.Audio.Artists.Albums();
- method public static final android.net.Uri getContentUri(java.lang.String, long);
+ method public static android.net.Uri getContentUri(java.lang.String, long);
}
public static abstract interface MediaStore.Audio.AudioColumns implements android.provider.MediaStore.MediaColumns {
@@ -34905,7 +34896,7 @@
public static final class MediaStore.Audio.Genres.Members implements android.provider.MediaStore.Audio.AudioColumns {
ctor public MediaStore.Audio.Genres.Members();
- method public static final android.net.Uri getContentUri(java.lang.String, long);
+ method public static android.net.Uri getContentUri(java.lang.String, long);
field public static final java.lang.String AUDIO_ID = "audio_id";
field public static final java.lang.String CONTENT_DIRECTORY = "members";
field public static final java.lang.String DEFAULT_SORT_ORDER = "title_key";
@@ -34941,8 +34932,8 @@
public static final class MediaStore.Audio.Playlists.Members implements android.provider.MediaStore.Audio.AudioColumns {
ctor public MediaStore.Audio.Playlists.Members();
- method public static final android.net.Uri getContentUri(java.lang.String, long);
- method public static final boolean moveItem(android.content.ContentResolver, long, int, int);
+ method public static android.net.Uri getContentUri(java.lang.String, long);
+ method public static boolean moveItem(android.content.ContentResolver, long, int, int);
field public static final java.lang.String AUDIO_ID = "audio_id";
field public static final java.lang.String CONTENT_DIRECTORY = "members";
field public static final java.lang.String DEFAULT_SORT_ORDER = "play_order";
@@ -34965,7 +34956,7 @@
public static final class MediaStore.Files {
ctor public MediaStore.Files();
method public static android.net.Uri getContentUri(java.lang.String);
- method public static final android.net.Uri getContentUri(java.lang.String, long);
+ method public static android.net.Uri getContentUri(java.lang.String, long);
}
public static abstract interface MediaStore.Files.FileColumns implements android.provider.MediaStore.MediaColumns {
@@ -34999,13 +34990,13 @@
public static final class MediaStore.Images.Media implements android.provider.MediaStore.Images.ImageColumns {
ctor public MediaStore.Images.Media();
- method public static final android.graphics.Bitmap getBitmap(android.content.ContentResolver, android.net.Uri) throws java.io.FileNotFoundException, java.io.IOException;
+ method public static android.graphics.Bitmap getBitmap(android.content.ContentResolver, android.net.Uri) throws java.io.FileNotFoundException, java.io.IOException;
method public static android.net.Uri getContentUri(java.lang.String);
- method public static final java.lang.String insertImage(android.content.ContentResolver, java.lang.String, java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
- method public static final java.lang.String insertImage(android.content.ContentResolver, android.graphics.Bitmap, java.lang.String, java.lang.String);
- method public static final android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[]);
- method public static final android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String);
- method public static final android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
+ method public static java.lang.String insertImage(android.content.ContentResolver, java.lang.String, java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
+ method public static java.lang.String insertImage(android.content.ContentResolver, android.graphics.Bitmap, java.lang.String, java.lang.String);
+ method public static android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[]);
+ method public static android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String);
+ method public static android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/image";
field public static final java.lang.String DEFAULT_SORT_ORDER = "bucket_display_name";
field public static final android.net.Uri EXTERNAL_CONTENT_URI;
@@ -35050,7 +35041,7 @@
public static final class MediaStore.Video {
ctor public MediaStore.Video();
- method public static final android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[]);
+ method public static android.database.Cursor query(android.content.ContentResolver, android.net.Uri, java.lang.String[]);
field public static final java.lang.String DEFAULT_SORT_ORDER = "_display_name";
}
@@ -35279,12 +35270,12 @@
method public static long getLong(android.content.ContentResolver, java.lang.String) throws android.provider.Settings.SettingNotFoundException;
method public static java.lang.String getString(android.content.ContentResolver, java.lang.String);
method public static android.net.Uri getUriFor(java.lang.String);
- method public static final deprecated boolean isLocationProviderEnabled(android.content.ContentResolver, java.lang.String);
+ method public static deprecated boolean isLocationProviderEnabled(android.content.ContentResolver, java.lang.String);
method public static boolean putFloat(android.content.ContentResolver, java.lang.String, float);
method public static boolean putInt(android.content.ContentResolver, java.lang.String, int);
method public static boolean putLong(android.content.ContentResolver, java.lang.String, long);
method public static boolean putString(android.content.ContentResolver, java.lang.String, java.lang.String);
- method public static final deprecated void setLocationProviderEnabled(android.content.ContentResolver, java.lang.String, boolean);
+ method public static deprecated void setLocationProviderEnabled(android.content.ContentResolver, java.lang.String, boolean);
field public static final java.lang.String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = "accessibility_display_inversion_enabled";
field public static final java.lang.String ACCESSIBILITY_ENABLED = "accessibility_enabled";
field public static final deprecated java.lang.String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
@@ -35318,6 +35309,7 @@
field public static final java.lang.String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
field public static final java.lang.String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update";
field public static final java.lang.String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
+ field public static final java.lang.String RTT_CALLING_MODE = "rtt_calling_mode";
field public static final java.lang.String SELECTED_INPUT_METHOD_SUBTYPE = "selected_input_method_subtype";
field public static final java.lang.String SETTINGS_CLASSNAME = "settings_classname";
field public static final java.lang.String SKIP_FIRST_USE_HINTS = "skip_first_use_hints";
@@ -35554,6 +35546,13 @@
field public static final java.lang.String ADDRESS = "address";
}
+ public static final class Telephony.CarrierId implements android.provider.BaseColumns {
+ method public static android.net.Uri getUriForSubscriptionId(int);
+ field public static final java.lang.String CARRIER_ID = "carrier_id";
+ field public static final java.lang.String CARRIER_NAME = "carrier_name";
+ field public static final android.net.Uri CONTENT_URI;
+ }
+
public static final class Telephony.Carriers implements android.provider.BaseColumns {
field public static final java.lang.String APN = "apn";
field public static final java.lang.String AUTH_TYPE = "authtype";
@@ -35724,6 +35723,7 @@
field public static final int RESULT_SMS_HANDLED = 1; // 0x1
field public static final int RESULT_SMS_OUT_OF_MEMORY = 3; // 0x3
field public static final int RESULT_SMS_UNSUPPORTED = 4; // 0x4
+ field public static final java.lang.String SECRET_CODE_ACTION = "android.provider.Telephony.SECRET_CODE";
field public static final java.lang.String SIM_FULL_ACTION = "android.provider.Telephony.SIM_FULL";
field public static final java.lang.String SMS_CB_RECEIVED_ACTION = "android.provider.Telephony.SMS_CB_RECEIVED";
field public static final java.lang.String SMS_DELIVER_ACTION = "android.provider.Telephony.SMS_DELIVER";
@@ -37012,6 +37012,52 @@
}
+package android.se.omapi {
+
+ public final class Channel implements java.nio.channels.Channel {
+ method public void close();
+ method public byte[] getSelectResponse();
+ method public android.se.omapi.Session getSession();
+ method public boolean isBasicChannel();
+ method public boolean isOpen();
+ method public boolean selectNext() throws java.io.IOException;
+ method public byte[] transmit(byte[]) throws java.io.IOException;
+ }
+
+ public final class Reader {
+ method public void closeSessions();
+ method public java.lang.String getName();
+ method public android.se.omapi.SEService getSEService();
+ method public boolean isSecureElementPresent();
+ method public android.se.omapi.Session openSession() throws java.io.IOException;
+ }
+
+ public final class SEService {
+ ctor public SEService(android.content.Context, java.util.concurrent.Executor, android.se.omapi.SEService.OnConnectedListener);
+ method public android.se.omapi.Reader[] getReaders();
+ method public java.lang.String getVersion();
+ method public boolean isConnected();
+ method public void shutdown();
+ }
+
+ public static abstract interface SEService.OnConnectedListener {
+ method public abstract void onConnected();
+ }
+
+ public final class Session {
+ method public void close();
+ method public void closeChannels();
+ method public byte[] getATR();
+ method public android.se.omapi.Reader getReader();
+ method public boolean isClosed();
+ method public android.se.omapi.Channel openBasicChannel(byte[], byte) throws java.io.IOException;
+ method public android.se.omapi.Channel openBasicChannel(byte[]) throws java.io.IOException;
+ method public android.se.omapi.Channel openLogicalChannel(byte[], byte) throws java.io.IOException;
+ method public android.se.omapi.Channel openLogicalChannel(byte[]) throws java.io.IOException;
+ }
+
+}
+
package android.security {
public final class KeyChain {
@@ -38405,11 +38451,6 @@
field public final int errno;
}
- public class Int32Ref {
- ctor public Int32Ref(int);
- field public int value;
- }
-
public class Int64Ref {
ctor public Int64Ref(long);
field public long value;
@@ -38509,7 +38550,6 @@
method public static int umask(int);
method public static android.system.StructUtsname uname();
method public static void unsetenv(java.lang.String) throws android.system.ErrnoException;
- method public static int waitpid(int, android.system.Int32Ref, int) throws android.system.ErrnoException;
method public static int write(java.io.FileDescriptor, java.nio.ByteBuffer) throws android.system.ErrnoException, java.io.InterruptedIOException;
method public static int write(java.io.FileDescriptor, byte[], int, int) throws android.system.ErrnoException, java.io.InterruptedIOException;
method public static int writev(java.io.FileDescriptor, java.lang.Object[], int[], int[]) throws android.system.ErrnoException, java.io.InterruptedIOException;
@@ -39075,6 +39115,7 @@
public final class Call {
method public void answer(int);
method public void conference(android.telecom.Call);
+ method public void deflect(android.net.Uri);
method public void disconnect();
method public java.util.List<java.lang.String> getCannedTextResponses();
method public java.util.List<android.telecom.Call> getChildren();
@@ -39093,12 +39134,12 @@
method public void playDtmfTone(char);
method public void postDialContinue(boolean);
method public void pullExternalCall();
- method public final void putExtras(android.os.Bundle);
+ method public void putExtras(android.os.Bundle);
method public void registerCallback(android.telecom.Call.Callback);
method public void registerCallback(android.telecom.Call.Callback, android.os.Handler);
method public void reject(boolean, java.lang.String);
- method public final void removeExtras(java.util.List<java.lang.String>);
- method public final void removeExtras(java.lang.String...);
+ method public void removeExtras(java.util.List<java.lang.String>);
+ method public void removeExtras(java.lang.String...);
method public void respondToRttRequest(int, boolean);
method public void sendCallEvent(java.lang.String, android.os.Bundle);
method public void sendRttRequest();
@@ -39141,10 +39182,10 @@
method public void onStateChanged(android.telecom.Call, int);
method public void onVideoCallChanged(android.telecom.Call, android.telecom.InCallService.VideoCall);
field public static final int HANDOVER_FAILURE_DEST_APP_REJECTED = 1; // 0x1
- field public static final int HANDOVER_FAILURE_DEST_INVALID_PERM = 3; // 0x3
- field public static final int HANDOVER_FAILURE_DEST_NOT_SUPPORTED = 2; // 0x2
- field public static final int HANDOVER_FAILURE_DEST_USER_REJECTED = 4; // 0x4
- field public static final int HANDOVER_FAILURE_ONGOING_EMERG_CALL = 5; // 0x5
+ field public static final int HANDOVER_FAILURE_NOT_SUPPORTED = 2; // 0x2
+ field public static final int HANDOVER_FAILURE_ONGOING_EMERGENCY_CALL = 4; // 0x4
+ field public static final int HANDOVER_FAILURE_UNKNOWN = 5; // 0x5
+ field public static final int HANDOVER_FAILURE_USER_REJECTED = 3; // 0x3
}
public static class Call.Details {
@@ -39185,6 +39226,7 @@
field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL = 3072; // 0xc00
field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_RX = 1024; // 0x400
field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
+ field public static final int CAPABILITY_SUPPORT_DEFLECT = 16777216; // 0x1000000
field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
field public static final int PROPERTY_CONFERENCE = 1; // 0x1
@@ -39194,6 +39236,7 @@
field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 128; // 0x80
field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
+ field public static final int PROPERTY_RTT = 1024; // 0x400
field public static final int PROPERTY_SELF_MANAGED = 256; // 0x100
field public static final int PROPERTY_WIFI = 8; // 0x8
}
@@ -39287,8 +39330,8 @@
method public final void setActive();
method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
method public final void setConnectionCapabilities(int);
- method public final void setConnectionElapsedTime(long);
method public final void setConnectionProperties(int);
+ method public final void setConnectionStartElapsedRealTime(long);
method public final void setConnectionTime(long);
method public final void setDialing();
method public final void setDisconnected(android.telecom.DisconnectCause);
@@ -39324,14 +39367,17 @@
method public final int getState();
method public final android.telecom.StatusHints getStatusHints();
method public final android.telecom.Connection.VideoProvider getVideoProvider();
+ method public void handleRttUpgradeResponse(android.telecom.Connection.RttTextStream);
method public final boolean isRingbackRequested();
method public void onAbort();
method public void onAnswer(int);
method public void onAnswer();
method public void onCallAudioStateChanged(android.telecom.CallAudioState);
method public void onCallEvent(java.lang.String, android.os.Bundle);
+ method public void onDeflect(android.net.Uri);
method public void onDisconnect();
method public void onExtrasChanged(android.os.Bundle);
+ method public void onHandoverComplete();
method public void onHold();
method public void onPlayDtmfTone(char);
method public void onPostDialContinue(boolean);
@@ -39340,15 +39386,21 @@
method public void onReject(java.lang.String);
method public void onSeparate();
method public void onShowIncomingCallUi();
+ method public void onStartRtt(android.telecom.Connection.RttTextStream);
method public void onStateChanged(int);
method public void onStopDtmfTone();
+ method public void onStopRtt();
method public void onUnhold();
method public static java.lang.String propertiesToString(int);
method public final void putExtras(android.os.Bundle);
method public final void removeExtras(java.util.List<java.lang.String>);
method public final void removeExtras(java.lang.String...);
- method public void requestBluetoothAudio(java.lang.String);
+ method public void requestBluetoothAudio(android.bluetooth.BluetoothDevice);
method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
+ method public final void sendRemoteRttRequest();
+ method public final void sendRttInitiationFailure(int);
+ method public final void sendRttInitiationSuccess();
+ method public final void sendRttSessionRemotelyTerminated();
method public final void setActive();
method public final void setAddress(android.net.Uri, int);
method public final void setAudioModeIsVoip(boolean);
@@ -39391,6 +39443,7 @@
field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL = 3072; // 0xc00
field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_RX = 1024; // 0x400
field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
+ field public static final int CAPABILITY_SUPPORT_DEFLECT = 33554432; // 0x2000000
field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
field public static final java.lang.String EVENT_CALL_MERGE_FAILED = "android.telecom.event.CALL_MERGE_FAILED";
@@ -39402,6 +39455,7 @@
field public static final java.lang.String EXTRA_LAST_FORWARDED_NUMBER = "android.telecom.extra.LAST_FORWARDED_NUMBER";
field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 32; // 0x20
field public static final int PROPERTY_IS_EXTERNAL_CALL = 16; // 0x10
+ field public static final int PROPERTY_IS_RTT = 256; // 0x100
field public static final int PROPERTY_SELF_MANAGED = 128; // 0x80
field public static final int STATE_ACTIVE = 4; // 0x4
field public static final int STATE_DIALING = 3; // 0x3
@@ -39421,6 +39475,12 @@
field public static final int SESSION_MODIFY_REQUEST_TIMED_OUT = 4; // 0x4
}
+ public static final class Connection.RttTextStream {
+ method public java.lang.String read() throws java.io.IOException;
+ method public java.lang.String readImmediately() throws java.io.IOException;
+ method public void write(java.lang.String) throws java.io.IOException;
+ }
+
public static abstract class Connection.VideoProvider {
ctor public Connection.VideoProvider();
method public void changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities);
@@ -39461,7 +39521,9 @@
method public android.telecom.PhoneAccountHandle getAccountHandle();
method public android.net.Uri getAddress();
method public android.os.Bundle getExtras();
+ method public android.telecom.Connection.RttTextStream getRttTextStream();
method public int getVideoState();
+ method public boolean isRequestingRtt();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telecom.ConnectionRequest> CREATOR;
}
@@ -39544,7 +39606,7 @@
method public void onCanAddCallChanged(boolean);
method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
method public void onSilenceRinger();
- method public final void requestBluetoothAudio(java.lang.String);
+ method public final void requestBluetoothAudio(android.bluetooth.BluetoothDevice);
method public final void setAudioRoute(int);
method public final void setMuted(boolean);
field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.InCallService";
@@ -39648,23 +39710,23 @@
public final class RemoteConference {
method public void disconnect();
method public java.util.List<android.telecom.RemoteConnection> getConferenceableConnections();
- method public final int getConnectionCapabilities();
- method public final int getConnectionProperties();
- method public final java.util.List<android.telecom.RemoteConnection> getConnections();
+ method public int getConnectionCapabilities();
+ method public int getConnectionProperties();
+ method public java.util.List<android.telecom.RemoteConnection> getConnections();
method public android.telecom.DisconnectCause getDisconnectCause();
- method public final android.os.Bundle getExtras();
- method public final int getState();
+ method public android.os.Bundle getExtras();
+ method public int getState();
method public void hold();
method public void merge();
method public void playDtmfTone(char);
- method public final void registerCallback(android.telecom.RemoteConference.Callback);
- method public final void registerCallback(android.telecom.RemoteConference.Callback, android.os.Handler);
+ method public void registerCallback(android.telecom.RemoteConference.Callback);
+ method public void registerCallback(android.telecom.RemoteConference.Callback, android.os.Handler);
method public void separate(android.telecom.RemoteConnection);
method public void setCallAudioState(android.telecom.CallAudioState);
method public void stopDtmfTone();
method public void swap();
method public void unhold();
- method public final void unregisterCallback(android.telecom.RemoteConference.Callback);
+ method public void unregisterCallback(android.telecom.RemoteConference.Callback);
}
public static abstract class RemoteConference.Callback {
@@ -39693,10 +39755,10 @@
method public int getConnectionCapabilities();
method public int getConnectionProperties();
method public android.telecom.DisconnectCause getDisconnectCause();
- method public final android.os.Bundle getExtras();
+ method public android.os.Bundle getExtras();
method public int getState();
method public android.telecom.StatusHints getStatusHints();
- method public final android.telecom.RemoteConnection.VideoProvider getVideoProvider();
+ method public android.telecom.RemoteConnection.VideoProvider getVideoProvider();
method public int getVideoState();
method public void hold();
method public boolean isRingbackRequested();
@@ -39778,6 +39840,7 @@
method public void addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle);
method public void cancelMissedCallsNotification();
method public android.content.Intent createManageBlockedNumbersIntent();
+ method public boolean endCall();
method public android.net.Uri getAdnUriForPhoneAccount(android.telecom.PhoneAccountHandle);
method public java.util.List<android.telecom.PhoneAccountHandle> getCallCapablePhoneAccounts();
method public java.lang.String getDefaultDialerPackage();
@@ -39880,20 +39943,18 @@
package android.telephony {
public final class AccessNetworkConstants {
- ctor public AccessNetworkConstants();
}
public static final class AccessNetworkConstants.AccessNetworkType {
- ctor public AccessNetworkConstants.AccessNetworkType();
field public static final int CDMA2000 = 4; // 0x4
field public static final int EUTRAN = 3; // 0x3
field public static final int GERAN = 1; // 0x1
field public static final int IWLAN = 5; // 0x5
+ field public static final int UNKNOWN = 0; // 0x0
field public static final int UTRAN = 2; // 0x2
}
public static final class AccessNetworkConstants.EutranBand {
- ctor public AccessNetworkConstants.EutranBand();
field public static final int BAND_1 = 1; // 0x1
field public static final int BAND_10 = 10; // 0xa
field public static final int BAND_11 = 11; // 0xb
@@ -39945,7 +40006,6 @@
}
public static final class AccessNetworkConstants.GeranBand {
- ctor public AccessNetworkConstants.GeranBand();
field public static final int BAND_450 = 3; // 0x3
field public static final int BAND_480 = 4; // 0x4
field public static final int BAND_710 = 5; // 0x5
@@ -39963,7 +40023,6 @@
}
public static final class AccessNetworkConstants.UtranBand {
- ctor public AccessNetworkConstants.UtranBand();
field public static final int BAND_1 = 1; // 0x1
field public static final int BAND_10 = 10; // 0xa
field public static final int BAND_11 = 11; // 0xb
@@ -39993,6 +40052,8 @@
method public void notifyConfigChangedForSubId(int);
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
field public static final int DATA_CYCLE_THRESHOLD_DISABLED = -2; // 0xfffffffe
+ field public static final java.lang.String EXTRA_SLOT_INDEX = "android.telephony.extra.SLOT_INDEX";
+ field public static final java.lang.String EXTRA_SUBSCRIPTION_INDEX = "android.telephony.extra.SUBSCRIPTION_INDEX";
field public static final java.lang.String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
field public static final java.lang.String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool";
field public static final java.lang.String KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL = "allow_add_call_during_video_call";
@@ -40014,6 +40075,8 @@
field public static final java.lang.String KEY_CARRIER_INSTANT_LETTERING_ESCAPED_CHARS_STRING = "carrier_instant_lettering_escaped_chars_string";
field public static final java.lang.String KEY_CARRIER_INSTANT_LETTERING_INVALID_CHARS_STRING = "carrier_instant_lettering_invalid_chars_string";
field public static final java.lang.String KEY_CARRIER_INSTANT_LETTERING_LENGTH_LIMIT_INT = "carrier_instant_lettering_length_limit_int";
+ field public static final java.lang.String KEY_CARRIER_NAME_OVERRIDE_BOOL = "carrier_name_override_bool";
+ field public static final java.lang.String KEY_CARRIER_NAME_STRING = "carrier_name_string";
field public static final java.lang.String KEY_CARRIER_SETTINGS_ENABLE_BOOL = "carrier_settings_enable_bool";
field public static final java.lang.String KEY_CARRIER_USE_IMS_FIRST_FOR_EMERGENCY_BOOL = "carrier_use_ims_first_for_emergency_bool";
field public static final java.lang.String KEY_CARRIER_VOLTE_AVAILABLE_BOOL = "carrier_volte_available_bool";
@@ -40136,6 +40199,8 @@
public abstract class CellIdentity implements android.os.Parcelable {
method public int describeContents();
+ method public java.lang.CharSequence getOperatorAlphaLong();
+ method public java.lang.CharSequence getOperatorAlphaShort();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.CellIdentity> CREATOR;
}
@@ -40145,8 +40210,6 @@
method public int getLatitude();
method public int getLongitude();
method public int getNetworkId();
- method public java.lang.CharSequence getOperatorAlphaLong();
- method public java.lang.CharSequence getOperatorAlphaShort();
method public int getSystemId();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityCdma> CREATOR;
@@ -40158,27 +40221,24 @@
method public int getCid();
method public int getLac();
method public deprecated int getMcc();
- method public java.lang.String getMccStr();
+ method public java.lang.String getMccString();
method public deprecated int getMnc();
- method public java.lang.String getMncStr();
+ method public java.lang.String getMncString();
method public java.lang.String getMobileNetworkOperator();
- method public java.lang.CharSequence getOperatorAlphaLong();
- method public java.lang.CharSequence getOperatorAlphaShort();
method public deprecated int getPsc();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityGsm> CREATOR;
}
public final class CellIdentityLte extends android.telephony.CellIdentity {
+ method public int getBandwidth();
method public int getCi();
method public int getEarfcn();
method public deprecated int getMcc();
- method public java.lang.String getMccStr();
+ method public java.lang.String getMccString();
method public deprecated int getMnc();
- method public java.lang.String getMncStr();
+ method public java.lang.String getMncString();
method public java.lang.String getMobileNetworkOperator();
- method public java.lang.CharSequence getOperatorAlphaLong();
- method public java.lang.CharSequence getOperatorAlphaShort();
method public int getPci();
method public int getTac();
method public void writeToParcel(android.os.Parcel, int);
@@ -40189,8 +40249,8 @@
method public int getCid();
method public int getCpid();
method public int getLac();
- method public java.lang.String getMccStr();
- method public java.lang.String getMncStr();
+ method public java.lang.String getMccString();
+ method public java.lang.String getMncString();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.CellIdentityTdscdma> CREATOR;
}
@@ -40199,12 +40259,10 @@
method public int getCid();
method public int getLac();
method public deprecated int getMcc();
- method public java.lang.String getMccStr();
+ method public java.lang.String getMccString();
method public deprecated int getMnc();
- method public java.lang.String getMncStr();
+ method public java.lang.String getMncString();
method public java.lang.String getMobileNetworkOperator();
- method public java.lang.CharSequence getOperatorAlphaLong();
- method public java.lang.CharSequence getOperatorAlphaShort();
method public int getPsc();
method public int getUarfcn();
method public void writeToParcel(android.os.Parcel, int);
@@ -40213,8 +40271,13 @@
public abstract class CellInfo implements android.os.Parcelable {
method public int describeContents();
+ method public int getCellConnectionStatus();
method public long getTimeStamp();
method public boolean isRegistered();
+ field public static final int CONNECTION_NONE = 0; // 0x0
+ field public static final int CONNECTION_PRIMARY_SERVING = 1; // 0x1
+ field public static final int CONNECTION_SECONDARY_SERVING = 2; // 0x2
+ field public static final int CONNECTION_UNKNOWN = 2147483647; // 0x7fffffff
field public static final android.os.Parcelable.Creator<android.telephony.CellInfo> CREATOR;
}
@@ -40329,19 +40392,21 @@
}
public class MbmsDownloadSession implements java.lang.AutoCloseable {
- method public int cancelDownload(android.telephony.mbms.DownloadRequest);
+ method public void addProgressListener(android.telephony.mbms.DownloadRequest, java.util.concurrent.Executor, android.telephony.mbms.DownloadProgressListener);
+ method public void addStatusListener(android.telephony.mbms.DownloadRequest, java.util.concurrent.Executor, android.telephony.mbms.DownloadStatusListener);
+ method public void cancelDownload(android.telephony.mbms.DownloadRequest);
method public void close();
- method public static android.telephony.MbmsDownloadSession create(android.content.Context, android.telephony.mbms.MbmsDownloadSessionCallback, android.os.Handler);
- method public static android.telephony.MbmsDownloadSession create(android.content.Context, android.telephony.mbms.MbmsDownloadSessionCallback, int, android.os.Handler);
- method public int download(android.telephony.mbms.DownloadRequest);
- method public int getDownloadStatus(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo);
+ method public static android.telephony.MbmsDownloadSession create(android.content.Context, java.util.concurrent.Executor, android.telephony.mbms.MbmsDownloadSessionCallback);
+ method public static android.telephony.MbmsDownloadSession create(android.content.Context, java.util.concurrent.Executor, int, android.telephony.mbms.MbmsDownloadSessionCallback);
+ method public void download(android.telephony.mbms.DownloadRequest);
method public java.io.File getTempFileRootDirectory();
method public java.util.List<android.telephony.mbms.DownloadRequest> listPendingDownloads();
- method public int registerStateCallback(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStateCallback, android.os.Handler);
+ method public void removeProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener);
+ method public void removeStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener);
+ method public void requestDownloadState(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo);
method public void requestUpdateFileServices(java.util.List<java.lang.String>);
method public void resetDownloadKnowledge(android.telephony.mbms.DownloadRequest);
method public void setTempFileRootDirectory(java.io.File);
- method public int unregisterStateCallback(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStateCallback);
field public static final java.lang.String DEFAULT_TOP_LEVEL_TEMP_DIRECTORY = "androidMbmsTempFileRoot";
field public static final java.lang.String EXTRA_MBMS_COMPLETED_FILE_URI = "android.telephony.extra.MBMS_COMPLETED_FILE_URI";
field public static final java.lang.String EXTRA_MBMS_DOWNLOAD_REQUEST = "android.telephony.extra.MBMS_DOWNLOAD_REQUEST";
@@ -40364,10 +40429,10 @@
public class MbmsStreamingSession implements java.lang.AutoCloseable {
method public void close();
- method public static android.telephony.MbmsStreamingSession create(android.content.Context, android.telephony.mbms.MbmsStreamingSessionCallback, int, android.os.Handler);
- method public static android.telephony.MbmsStreamingSession create(android.content.Context, android.telephony.mbms.MbmsStreamingSessionCallback, android.os.Handler);
+ method public static android.telephony.MbmsStreamingSession create(android.content.Context, java.util.concurrent.Executor, int, android.telephony.mbms.MbmsStreamingSessionCallback);
+ method public static android.telephony.MbmsStreamingSession create(android.content.Context, java.util.concurrent.Executor, android.telephony.mbms.MbmsStreamingSessionCallback);
method public void requestUpdateStreamingServices(java.util.List<java.lang.String>);
- method public android.telephony.mbms.StreamingService startStreaming(android.telephony.mbms.StreamingServiceInfo, android.telephony.mbms.StreamingServiceCallback, android.os.Handler);
+ method public android.telephony.mbms.StreamingService startStreaming(android.telephony.mbms.StreamingServiceInfo, java.util.concurrent.Executor, android.telephony.mbms.StreamingServiceCallback);
}
public class NeighboringCellInfo implements android.os.Parcelable {
@@ -40390,7 +40455,8 @@
}
public class NetworkScan {
- method public void stop() throws android.os.RemoteException;
+ method public deprecated void stop() throws android.os.RemoteException;
+ method public void stopScan();
field public static final int ERROR_INTERRUPTED = 10002; // 0x2712
field public static final int ERROR_INVALID_SCAN = 2; // 0x2
field public static final int ERROR_INVALID_SCANID = 10001; // 0x2711
@@ -40527,14 +40593,17 @@
ctor public ServiceState(android.os.Parcel);
method protected void copyFrom(android.telephony.ServiceState);
method public int describeContents();
+ method public int getCdmaNetworkId();
+ method public int getCdmaSystemId();
+ method public int[] getCellBandwidths();
+ method public int getChannelNumber();
+ method public int getDuplexMode();
method public boolean getIsManualSelection();
- method public int getNetworkId();
method public java.lang.String getOperatorAlphaLong();
method public java.lang.String getOperatorAlphaShort();
method public java.lang.String getOperatorNumeric();
method public boolean getRoaming();
method public int getState();
- method public int getSystemId();
method public void setIsManualSelection(boolean);
method public void setOperatorName(java.lang.String, java.lang.String, java.lang.String);
method public void setRoaming(boolean);
@@ -40543,6 +40612,9 @@
method public void setStateOutOfService();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.ServiceState> CREATOR;
+ field public static final int DUPLEX_MODE_FDD = 1; // 0x1
+ field public static final int DUPLEX_MODE_TDD = 2; // 0x2
+ field public static final int DUPLEX_MODE_UNKNOWN = 0; // 0x0
field public static final int STATE_EMERGENCY_ONLY = 2; // 0x2
field public static final int STATE_IN_SERVICE = 0; // 0x0
field public static final int STATE_OUT_OF_SERVICE = 1; // 0x1
@@ -40706,13 +40778,16 @@
method public java.lang.String getNumber();
method public int getSimSlotIndex();
method public int getSubscriptionId();
+ method public boolean isEmbedded();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.SubscriptionInfo> CREATOR;
}
public class SubscriptionManager {
method public void addOnSubscriptionsChangedListener(android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
+ method public boolean canManageSubscription(android.telephony.SubscriptionInfo);
method public static android.telephony.SubscriptionManager from(android.content.Context);
+ method public java.util.List<android.telephony.SubscriptionInfo> getAccessibleSubscriptionInfoList();
method public android.telephony.SubscriptionInfo getActiveSubscriptionInfo(int);
method public int getActiveSubscriptionInfoCount();
method public int getActiveSubscriptionInfoCountMax();
@@ -40742,8 +40817,6 @@
method public android.telephony.TelephonyManager createForPhoneAccountHandle(android.telecom.PhoneAccountHandle);
method public android.telephony.TelephonyManager createForSubscriptionId(int);
method public java.util.List<android.telephony.CellInfo> getAllCellInfo();
- method public int getAndroidCarrierIdForSubscription();
- method public java.lang.CharSequence getAndroidCarrierNameForSubscription();
method public int getCallState();
method public android.os.PersistableBundle getCarrierConfig();
method public deprecated android.telephony.CellLocation getCellLocation();
@@ -40763,6 +40836,7 @@
method public java.lang.String getMeid(int);
method public java.lang.String getMmsUAProfUrl();
method public java.lang.String getMmsUserAgent();
+ method public java.lang.String getNai();
method public deprecated java.util.List<android.telephony.NeighboringCellInfo> getNeighboringCellInfo();
method public java.lang.String getNetworkCountryIso();
method public java.lang.String getNetworkOperator();
@@ -40773,6 +40847,8 @@
method public int getPhoneType();
method public android.telephony.ServiceState getServiceState();
method public android.telephony.SignalStrength getSignalStrength();
+ method public int getSimCarrierId();
+ method public java.lang.CharSequence getSimCarrierIdName();
method public java.lang.String getSimCountryIso();
method public java.lang.String getSimOperator();
method public java.lang.String getSimOperatorName();
@@ -40794,28 +40870,27 @@
method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
method public boolean isConcurrentVoiceAndDataSupported();
- method public deprecated boolean isDataEnabled();
+ method public boolean isDataEnabled();
method public boolean isHearingAidCompatibilitySupported();
method public boolean isNetworkRoaming();
method public boolean isSmsCapable();
method public deprecated boolean isTtyModeSupported();
- method public boolean isUserMobileDataEnabled();
method public boolean isVoiceCapable();
method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle);
method public boolean isWorldPhone();
method public void listen(android.telephony.PhoneStateListener, int);
- method public android.telephony.NetworkScan requestNetworkScan(android.telephony.NetworkScanRequest, android.telephony.TelephonyScanManager.NetworkScanCallback);
+ method public android.telephony.NetworkScan requestNetworkScan(android.telephony.NetworkScanRequest, java.util.concurrent.Executor, android.telephony.TelephonyScanManager.NetworkScanCallback);
+ method public deprecated android.telephony.NetworkScan requestNetworkScan(android.telephony.NetworkScanRequest, android.telephony.TelephonyScanManager.NetworkScanCallback);
method public void sendDialerSpecialCode(java.lang.String);
method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
method public void sendUssdRequest(java.lang.String, android.telephony.TelephonyManager.UssdResponseCallback, android.os.Handler);
method public void sendVisualVoicemailSms(java.lang.String, int, java.lang.String, android.app.PendingIntent);
- method public deprecated void setDataEnabled(boolean);
+ method public void setDataEnabled(boolean);
method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
method public void setNetworkSelectionModeAutomatic();
method public boolean setNetworkSelectionModeManual(java.lang.String, boolean);
method public boolean setOperatorBrandOverride(java.lang.String);
method public boolean setPreferredNetworkTypeToGlobal();
- method public void setUserMobileDataEnabled(boolean);
method public void setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings);
method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
method public deprecated void setVoicemailRingtoneUri(android.telecom.PhoneAccountHandle, android.net.Uri);
@@ -40986,21 +41061,23 @@
public class ApnSetting implements android.os.Parcelable {
method public int describeContents();
method public java.lang.String getApnName();
+ method public int getApnTypeBitmask();
method public int getAuthType();
method public java.lang.String getEntryName();
method public int getId();
- method public int getMmsPort();
- method public java.net.InetAddress getMmsProxy();
- method public java.net.URL getMmsc();
- method public java.lang.String getMvnoType();
+ method public deprecated java.net.InetAddress getMmsProxyAddress();
+ method public java.lang.String getMmsProxyAddressAsString();
+ method public int getMmsProxyPort();
+ method public android.net.Uri getMmsc();
+ method public int getMvnoType();
method public int getNetworkTypeBitmask();
method public java.lang.String getOperatorNumeric();
method public java.lang.String getPassword();
- method public int getPort();
- method public java.lang.String getProtocol();
- method public java.net.InetAddress getProxy();
- method public java.lang.String getRoamingProtocol();
- method public java.util.List<java.lang.String> getTypes();
+ method public int getProtocol();
+ method public deprecated java.net.InetAddress getProxyAddress();
+ method public java.lang.String getProxyAddressAsString();
+ method public int getProxyPort();
+ method public int getRoamingProtocol();
method public java.lang.String getUser();
method public boolean isEnabled();
method public void writeToParcel(android.os.Parcel, int);
@@ -41009,51 +41086,91 @@
field public static final int AUTH_TYPE_PAP = 1; // 0x1
field public static final int AUTH_TYPE_PAP_OR_CHAP = 3; // 0x3
field public static final android.os.Parcelable.Creator<android.telephony.data.ApnSetting> CREATOR;
- field public static final java.lang.String MVNO_TYPE_GID = "gid";
- field public static final java.lang.String MVNO_TYPE_ICCID = "iccid";
- field public static final java.lang.String MVNO_TYPE_IMSI = "imsi";
- field public static final java.lang.String MVNO_TYPE_SPN = "spn";
- field public static final java.lang.String PROTOCOL_IP = "IP";
- field public static final java.lang.String PROTOCOL_IPV4V6 = "IPV4V6";
- field public static final java.lang.String PROTOCOL_IPV6 = "IPV6";
- field public static final java.lang.String PROTOCOL_PPP = "PPP";
- field public static final java.lang.String TYPE_ALL = "*";
- field public static final java.lang.String TYPE_CBS = "cbs";
- field public static final java.lang.String TYPE_DEFAULT = "default";
- field public static final java.lang.String TYPE_DUN = "dun";
- field public static final java.lang.String TYPE_EMERGENCY = "emergency";
- field public static final java.lang.String TYPE_FOTA = "fota";
- field public static final java.lang.String TYPE_HIPRI = "hipri";
- field public static final java.lang.String TYPE_IA = "ia";
- field public static final java.lang.String TYPE_IMS = "ims";
- field public static final java.lang.String TYPE_MMS = "mms";
- field public static final java.lang.String TYPE_SUPL = "supl";
+ field public static final int MVNO_TYPE_GID = 2; // 0x2
+ field public static final int MVNO_TYPE_ICCID = 3; // 0x3
+ field public static final int MVNO_TYPE_IMSI = 1; // 0x1
+ field public static final int MVNO_TYPE_SPN = 0; // 0x0
+ field public static final int PROTOCOL_IP = 0; // 0x0
+ field public static final int PROTOCOL_IPV4V6 = 2; // 0x2
+ field public static final int PROTOCOL_IPV6 = 1; // 0x1
+ field public static final int PROTOCOL_PPP = 3; // 0x3
+ field public static final int TYPE_CBS = 128; // 0x80
+ field public static final int TYPE_DEFAULT = 1; // 0x1
+ field public static final int TYPE_DUN = 8; // 0x8
+ field public static final int TYPE_EMERGENCY = 512; // 0x200
+ field public static final int TYPE_FOTA = 32; // 0x20
+ field public static final int TYPE_HIPRI = 16; // 0x10
+ field public static final int TYPE_IA = 256; // 0x100
+ field public static final int TYPE_IMS = 64; // 0x40
+ field public static final int TYPE_MMS = 2; // 0x2
+ field public static final int TYPE_SUPL = 4; // 0x4
}
public static class ApnSetting.Builder {
ctor public ApnSetting.Builder();
method public android.telephony.data.ApnSetting build();
method public android.telephony.data.ApnSetting.Builder setApnName(java.lang.String);
+ method public android.telephony.data.ApnSetting.Builder setApnTypeBitmask(int);
method public android.telephony.data.ApnSetting.Builder setAuthType(int);
method public android.telephony.data.ApnSetting.Builder setCarrierEnabled(boolean);
method public android.telephony.data.ApnSetting.Builder setEntryName(java.lang.String);
- method public android.telephony.data.ApnSetting.Builder setMmsPort(int);
- method public android.telephony.data.ApnSetting.Builder setMmsProxy(java.net.InetAddress);
- method public android.telephony.data.ApnSetting.Builder setMmsc(java.net.URL);
- method public android.telephony.data.ApnSetting.Builder setMvnoType(java.lang.String);
+ method public deprecated android.telephony.data.ApnSetting.Builder setMmsProxyAddress(java.net.InetAddress);
+ method public android.telephony.data.ApnSetting.Builder setMmsProxyAddress(java.lang.String);
+ method public android.telephony.data.ApnSetting.Builder setMmsProxyPort(int);
+ method public android.telephony.data.ApnSetting.Builder setMmsc(android.net.Uri);
+ method public android.telephony.data.ApnSetting.Builder setMvnoType(int);
method public android.telephony.data.ApnSetting.Builder setNetworkTypeBitmask(int);
method public android.telephony.data.ApnSetting.Builder setOperatorNumeric(java.lang.String);
method public android.telephony.data.ApnSetting.Builder setPassword(java.lang.String);
- method public android.telephony.data.ApnSetting.Builder setPort(int);
- method public android.telephony.data.ApnSetting.Builder setProtocol(java.lang.String);
- method public android.telephony.data.ApnSetting.Builder setProxy(java.net.InetAddress);
- method public android.telephony.data.ApnSetting.Builder setRoamingProtocol(java.lang.String);
- method public android.telephony.data.ApnSetting.Builder setTypes(java.util.List<java.lang.String>);
+ method public android.telephony.data.ApnSetting.Builder setProtocol(int);
+ method public deprecated android.telephony.data.ApnSetting.Builder setProxyAddress(java.net.InetAddress);
+ method public android.telephony.data.ApnSetting.Builder setProxyAddress(java.lang.String);
+ method public android.telephony.data.ApnSetting.Builder setProxyPort(int);
+ method public android.telephony.data.ApnSetting.Builder setRoamingProtocol(int);
method public android.telephony.data.ApnSetting.Builder setUser(java.lang.String);
}
}
+package android.telephony.euicc {
+
+ public final class DownloadableSubscription implements android.os.Parcelable {
+ method public int describeContents();
+ method public static android.telephony.euicc.DownloadableSubscription forActivationCode(java.lang.String);
+ method public java.lang.String getConfirmationCode();
+ method public java.lang.String getEncodedActivationCode();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.euicc.DownloadableSubscription> CREATOR;
+ }
+
+ public final class EuiccInfo implements android.os.Parcelable {
+ ctor public EuiccInfo(java.lang.String);
+ method public int describeContents();
+ method public java.lang.String getOsVersion();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.euicc.EuiccInfo> CREATOR;
+ }
+
+ public class EuiccManager {
+ method public void deleteSubscription(int, android.app.PendingIntent);
+ method public void downloadSubscription(android.telephony.euicc.DownloadableSubscription, boolean, android.app.PendingIntent);
+ method public java.lang.String getEid();
+ method public android.telephony.euicc.EuiccInfo getEuiccInfo();
+ method public boolean isEnabled();
+ method public void startResolutionActivity(android.app.Activity, int, android.content.Intent, android.app.PendingIntent) throws android.content.IntentSender.SendIntentException;
+ method public void switchToSubscription(int, android.app.PendingIntent);
+ field public static final java.lang.String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS = "android.telephony.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS";
+ field public static final java.lang.String ACTION_NOTIFY_CARRIER_SETUP_INCOMPLETE = "android.telephony.euicc.action.NOTIFY_CARRIER_SETUP_INCOMPLETE";
+ field public static final int EMBEDDED_SUBSCRIPTION_RESULT_ERROR = 2; // 0x2
+ field public static final int EMBEDDED_SUBSCRIPTION_RESULT_OK = 0; // 0x0
+ field public static final int EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR = 1; // 0x1
+ field public static final java.lang.String EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DETAILED_CODE";
+ field public static final java.lang.String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTION = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTION";
+ field public static final java.lang.String META_DATA_CARRIER_ICON = "android.telephony.euicc.carriericon";
+ }
+
+}
+
package android.telephony.gsm {
public class GsmCellLocation extends android.telephony.CellLocation {
@@ -41068,11 +41185,11 @@
}
public final deprecated class SmsManager {
- method public final deprecated java.util.ArrayList<java.lang.String> divideMessage(java.lang.String);
- method public static final deprecated android.telephony.gsm.SmsManager getDefault();
- method public final deprecated void sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
- method public final deprecated void sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
- method public final deprecated void sendTextMessage(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
+ method public deprecated java.util.ArrayList<java.lang.String> divideMessage(java.lang.String);
+ method public static deprecated android.telephony.gsm.SmsManager getDefault();
+ method public deprecated void sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
+ method public deprecated void sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
+ method public deprecated void sendTextMessage(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
field public static final deprecated int RESULT_ERROR_GENERIC_FAILURE = 1; // 0x1
field public static final deprecated int RESULT_ERROR_NO_SERVICE = 4; // 0x4
field public static final deprecated int RESULT_ERROR_NULL_PDU = 3; // 0x3
@@ -41146,35 +41263,37 @@
package android.telephony.mbms {
+ public class DownloadProgressListener {
+ ctor public DownloadProgressListener();
+ method public void onProgressUpdated(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo, int, int, int, int);
+ }
+
public final class DownloadRequest implements android.os.Parcelable {
- method public static android.telephony.mbms.DownloadRequest copy(android.telephony.mbms.DownloadRequest);
method public int describeContents();
+ method public android.net.Uri getDestinationUri();
method public java.lang.String getFileServiceId();
method public static int getMaxAppIntentSize();
method public static int getMaxDestinationUriSize();
method public android.net.Uri getSourceUri();
method public int getSubscriptionId();
+ method public byte[] toByteArray();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.mbms.DownloadRequest> CREATOR;
}
public static class DownloadRequest.Builder {
- ctor public DownloadRequest.Builder(android.net.Uri);
+ ctor public DownloadRequest.Builder(android.net.Uri, android.net.Uri);
method public android.telephony.mbms.DownloadRequest build();
+ method public static android.telephony.mbms.DownloadRequest.Builder fromDownloadRequest(android.telephony.mbms.DownloadRequest);
+ method public static android.telephony.mbms.DownloadRequest.Builder fromSerializedRequest(byte[]);
method public android.telephony.mbms.DownloadRequest.Builder setAppIntent(android.content.Intent);
method public android.telephony.mbms.DownloadRequest.Builder setServiceInfo(android.telephony.mbms.FileServiceInfo);
method public android.telephony.mbms.DownloadRequest.Builder setSubscriptionId(int);
}
- public class DownloadStateCallback {
- ctor public DownloadStateCallback();
- ctor public DownloadStateCallback(int);
- method public final boolean isFilterFlagSet(int);
- method public void onProgressUpdated(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo, int, int, int, int);
- method public void onStateUpdated(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo, int);
- field public static final int ALL_UPDATES = 0; // 0x0
- field public static final int PROGRESS_UPDATES = 1; // 0x1
- field public static final int STATE_UPDATES = 2; // 0x2
+ public class DownloadStatusListener {
+ ctor public DownloadStatusListener();
+ method public void onStatusUpdated(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo, int);
}
public final class FileInfo implements android.os.Parcelable {
@@ -41209,11 +41328,13 @@
field public static final int ERROR_MIDDLEWARE_NOT_BOUND = 2; // 0x2
field public static final int ERROR_NO_UNIQUE_MIDDLEWARE = 1; // 0x1
field public static final int SUCCESS = 0; // 0x0
+ field public static final int UNKNOWN = -1; // 0xffffffff
}
public static class MbmsErrors.DownloadErrors {
field public static final int ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT = 401; // 0x191
field public static final int ERROR_UNKNOWN_DOWNLOAD_REQUEST = 402; // 0x192
+ field public static final int ERROR_UNKNOWN_FILE_INFO = 403; // 0x193
}
public static class MbmsErrors.GeneralErrors {
@@ -41255,10 +41376,10 @@
method public java.util.Date getSessionStartTime();
}
- public class StreamingService {
+ public class StreamingService implements java.lang.AutoCloseable {
+ method public void close();
method public android.telephony.mbms.StreamingServiceInfo getInfo();
method public android.net.Uri getPlaybackUri();
- method public void stopStreaming();
field public static final int BROADCAST_METHOD = 1; // 0x1
field public static final int REASON_BY_USER_REQUEST = 1; // 0x1
field public static final int REASON_END_OF_SESSION = 2; // 0x2
@@ -41601,6 +41722,10 @@
package android.test.mock {
+ public deprecated class MockAccountManager {
+ method public static android.accounts.AccountManager newMockAccountManager(android.content.Context);
+ }
+
public deprecated class MockApplication extends android.app.Application {
ctor public MockApplication();
}
@@ -41610,6 +41735,7 @@
ctor public MockContentProvider(android.content.Context);
ctor public MockContentProvider(android.content.Context, java.lang.String, java.lang.String, android.content.pm.PathPermission[]);
method public android.content.ContentProviderResult[] applyBatch(java.util.ArrayList<android.content.ContentProviderOperation>);
+ method public static deprecated void attachInfoForTesting(android.content.ContentProvider, android.content.Context, android.content.pm.ProviderInfo);
method public int delete(android.net.Uri, java.lang.String, java.lang.String[]);
method public java.lang.String getType(android.net.Uri);
method public android.net.Uri insert(android.net.Uri, android.content.ContentValues);
@@ -41890,6 +42016,10 @@
method public void updateConfiguration(android.content.res.Configuration, android.util.DisplayMetrics);
}
+ public deprecated class MockService {
+ method public static <T extends android.app.Service> void attachForTesting(android.app.Service, android.content.Context, java.lang.String, android.app.Application);
+ }
+
}
package android.test.suitebuilder {
@@ -44022,6 +44152,7 @@
field public static final int DENSITY_360 = 360; // 0x168
field public static final int DENSITY_400 = 400; // 0x190
field public static final int DENSITY_420 = 420; // 0x1a4
+ field public static final int DENSITY_440 = 440; // 0x1b8
field public static final int DENSITY_560 = 560; // 0x230
field public static final int DENSITY_DEFAULT = 160; // 0xa0
field public static final int DENSITY_DEVICE_STABLE;
@@ -44305,42 +44436,42 @@
method public void previousMonth();
}
- public final class MutableBoolean {
+ public final deprecated class MutableBoolean {
ctor public MutableBoolean(boolean);
field public boolean value;
}
- public final class MutableByte {
+ public final deprecated class MutableByte {
ctor public MutableByte(byte);
field public byte value;
}
- public final class MutableChar {
+ public final deprecated class MutableChar {
ctor public MutableChar(char);
field public char value;
}
- public final class MutableDouble {
+ public final deprecated class MutableDouble {
ctor public MutableDouble(double);
field public double value;
}
- public final class MutableFloat {
+ public final deprecated class MutableFloat {
ctor public MutableFloat(float);
field public float value;
}
- public final class MutableInt {
+ public final deprecated class MutableInt {
ctor public MutableInt(int);
field public int value;
}
- public final class MutableLong {
+ public final deprecated class MutableLong {
ctor public MutableLong(long);
field public long value;
}
- public final class MutableShort {
+ public final deprecated class MutableShort {
ctor public MutableShort(short);
field public short value;
}
@@ -45687,76 +45818,76 @@
public final class MotionEvent extends android.view.InputEvent implements android.os.Parcelable {
method public static java.lang.String actionToString(int);
- method public final void addBatch(long, float, float, float, float, int);
- method public final void addBatch(long, android.view.MotionEvent.PointerCoords[], int);
+ method public void addBatch(long, float, float, float, float, int);
+ method public void addBatch(long, android.view.MotionEvent.PointerCoords[], int);
method public static int axisFromString(java.lang.String);
method public static java.lang.String axisToString(int);
- method public final int findPointerIndex(int);
- method public final int getAction();
- method public final int getActionButton();
- method public final int getActionIndex();
- method public final int getActionMasked();
- method public final float getAxisValue(int);
- method public final float getAxisValue(int, int);
- method public final int getButtonState();
- method public final int getDeviceId();
- method public final long getDownTime();
- method public final int getEdgeFlags();
- method public final long getEventTime();
- method public final int getFlags();
- method public final float getHistoricalAxisValue(int, int);
- method public final float getHistoricalAxisValue(int, int, int);
- method public final long getHistoricalEventTime(int);
- method public final float getHistoricalOrientation(int);
- method public final float getHistoricalOrientation(int, int);
- method public final void getHistoricalPointerCoords(int, int, android.view.MotionEvent.PointerCoords);
- method public final float getHistoricalPressure(int);
- method public final float getHistoricalPressure(int, int);
- method public final float getHistoricalSize(int);
- method public final float getHistoricalSize(int, int);
- method public final float getHistoricalToolMajor(int);
- method public final float getHistoricalToolMajor(int, int);
- method public final float getHistoricalToolMinor(int);
- method public final float getHistoricalToolMinor(int, int);
- method public final float getHistoricalTouchMajor(int);
- method public final float getHistoricalTouchMajor(int, int);
- method public final float getHistoricalTouchMinor(int);
- method public final float getHistoricalTouchMinor(int, int);
- method public final float getHistoricalX(int);
- method public final float getHistoricalX(int, int);
- method public final float getHistoricalY(int);
- method public final float getHistoricalY(int, int);
- method public final int getHistorySize();
- method public final int getMetaState();
- method public final float getOrientation();
- method public final float getOrientation(int);
- method public final void getPointerCoords(int, android.view.MotionEvent.PointerCoords);
- method public final int getPointerCount();
- method public final int getPointerId(int);
- method public final void getPointerProperties(int, android.view.MotionEvent.PointerProperties);
- method public final float getPressure();
- method public final float getPressure(int);
- method public final float getRawX();
- method public final float getRawY();
- method public final float getSize();
- method public final float getSize(int);
- method public final int getSource();
- method public final float getToolMajor();
- method public final float getToolMajor(int);
- method public final float getToolMinor();
- method public final float getToolMinor(int);
- method public final int getToolType(int);
- method public final float getTouchMajor();
- method public final float getTouchMajor(int);
- method public final float getTouchMinor();
- method public final float getTouchMinor(int);
- method public final float getX();
- method public final float getX(int);
- method public final float getXPrecision();
- method public final float getY();
- method public final float getY(int);
- method public final float getYPrecision();
- method public final boolean isButtonPressed(int);
+ method public int findPointerIndex(int);
+ method public int getAction();
+ method public int getActionButton();
+ method public int getActionIndex();
+ method public int getActionMasked();
+ method public float getAxisValue(int);
+ method public float getAxisValue(int, int);
+ method public int getButtonState();
+ method public int getDeviceId();
+ method public long getDownTime();
+ method public int getEdgeFlags();
+ method public long getEventTime();
+ method public int getFlags();
+ method public float getHistoricalAxisValue(int, int);
+ method public float getHistoricalAxisValue(int, int, int);
+ method public long getHistoricalEventTime(int);
+ method public float getHistoricalOrientation(int);
+ method public float getHistoricalOrientation(int, int);
+ method public void getHistoricalPointerCoords(int, int, android.view.MotionEvent.PointerCoords);
+ method public float getHistoricalPressure(int);
+ method public float getHistoricalPressure(int, int);
+ method public float getHistoricalSize(int);
+ method public float getHistoricalSize(int, int);
+ method public float getHistoricalToolMajor(int);
+ method public float getHistoricalToolMajor(int, int);
+ method public float getHistoricalToolMinor(int);
+ method public float getHistoricalToolMinor(int, int);
+ method public float getHistoricalTouchMajor(int);
+ method public float getHistoricalTouchMajor(int, int);
+ method public float getHistoricalTouchMinor(int);
+ method public float getHistoricalTouchMinor(int, int);
+ method public float getHistoricalX(int);
+ method public float getHistoricalX(int, int);
+ method public float getHistoricalY(int);
+ method public float getHistoricalY(int, int);
+ method public int getHistorySize();
+ method public int getMetaState();
+ method public float getOrientation();
+ method public float getOrientation(int);
+ method public void getPointerCoords(int, android.view.MotionEvent.PointerCoords);
+ method public int getPointerCount();
+ method public int getPointerId(int);
+ method public void getPointerProperties(int, android.view.MotionEvent.PointerProperties);
+ method public float getPressure();
+ method public float getPressure(int);
+ method public float getRawX();
+ method public float getRawY();
+ method public float getSize();
+ method public float getSize(int);
+ method public int getSource();
+ method public float getToolMajor();
+ method public float getToolMajor(int);
+ method public float getToolMinor();
+ method public float getToolMinor(int);
+ method public int getToolType(int);
+ method public float getTouchMajor();
+ method public float getTouchMajor(int);
+ method public float getTouchMinor();
+ method public float getTouchMinor(int);
+ method public float getX();
+ method public float getX(int);
+ method public float getXPrecision();
+ method public float getY();
+ method public float getY(int);
+ method public float getYPrecision();
+ method public boolean isButtonPressed(int);
method public static android.view.MotionEvent obtain(long, long, int, int, android.view.MotionEvent.PointerProperties[], android.view.MotionEvent.PointerCoords[], int, int, float, float, int, int, int, int);
method public static deprecated android.view.MotionEvent obtain(long, long, int, int, int[], android.view.MotionEvent.PointerCoords[], int, float, float, int, int, int, int);
method public static android.view.MotionEvent obtain(long, long, int, float, float, float, float, int, float, float, int, int);
@@ -45764,13 +45895,13 @@
method public static android.view.MotionEvent obtain(long, long, int, float, float, int);
method public static android.view.MotionEvent obtain(android.view.MotionEvent);
method public static android.view.MotionEvent obtainNoHistory(android.view.MotionEvent);
- method public final void offsetLocation(float, float);
- method public final void recycle();
- method public final void setAction(int);
- method public final void setEdgeFlags(int);
- method public final void setLocation(float, float);
- method public final void setSource(int);
- method public final void transform(android.graphics.Matrix);
+ method public void offsetLocation(float, float);
+ method public void recycle();
+ method public void setAction(int);
+ method public void setEdgeFlags(int);
+ method public void setLocation(float, float);
+ method public void setSource(int);
+ method public void transform(android.graphics.Matrix);
method public void writeToParcel(android.os.Parcel, int);
field public static final int ACTION_BUTTON_PRESS = 11; // 0xb
field public static final int ACTION_BUTTON_RELEASE = 12; // 0xc
@@ -47468,9 +47599,9 @@
method public void addOnTouchModeChangeListener(android.view.ViewTreeObserver.OnTouchModeChangeListener);
method public void addOnWindowAttachListener(android.view.ViewTreeObserver.OnWindowAttachListener);
method public void addOnWindowFocusChangeListener(android.view.ViewTreeObserver.OnWindowFocusChangeListener);
- method public final void dispatchOnDraw();
- method public final void dispatchOnGlobalLayout();
- method public final boolean dispatchOnPreDraw();
+ method public void dispatchOnDraw();
+ method public void dispatchOnGlobalLayout();
+ method public boolean dispatchOnPreDraw();
method public boolean isAlive();
method public deprecated void removeGlobalOnLayoutListener(android.view.ViewTreeObserver.OnGlobalLayoutListener);
method public void removeOnDrawListener(android.view.ViewTreeObserver.OnDrawListener);
@@ -49462,7 +49593,7 @@
ctor public URLUtil();
method public static java.lang.String composeSearchUrl(java.lang.String, java.lang.String, java.lang.String);
method public static byte[] decode(byte[]) throws java.lang.IllegalArgumentException;
- method public static final java.lang.String guessFileName(java.lang.String, java.lang.String, java.lang.String);
+ method public static java.lang.String guessFileName(java.lang.String, java.lang.String, java.lang.String);
method public static java.lang.String guessUrl(java.lang.String);
method public static boolean isAboutUrl(java.lang.String);
method public static boolean isAssetUrl(java.lang.String);
@@ -54508,7 +54639,7 @@
}
public static final class Character.UnicodeBlock extends java.lang.Character.Subset {
- method public static final java.lang.Character.UnicodeBlock forName(java.lang.String);
+ method public static java.lang.Character.UnicodeBlock forName(java.lang.String);
method public static java.lang.Character.UnicodeBlock of(char);
method public static java.lang.Character.UnicodeBlock of(int);
field public static final java.lang.Character.UnicodeBlock AEGEAN_NUMBERS;
@@ -54735,7 +54866,7 @@
}
public static final class Character.UnicodeScript extends java.lang.Enum {
- method public static final java.lang.Character.UnicodeScript forName(java.lang.String);
+ method public static java.lang.Character.UnicodeScript forName(java.lang.String);
method public static java.lang.Character.UnicodeScript of(int);
method public static java.lang.Character.UnicodeScript valueOf(java.lang.String);
method public static final java.lang.Character.UnicodeScript[] values();
@@ -56398,6 +56529,7 @@
method public boolean enqueue();
method public T get();
method public boolean isEnqueued();
+ method public static void reachabilityFence(java.lang.Object);
}
public class ReferenceQueue<T> {
@@ -57550,8 +57682,8 @@
ctor public URL(java.net.URL, java.lang.String) throws java.net.MalformedURLException;
ctor public URL(java.net.URL, java.lang.String, java.net.URLStreamHandler) throws java.net.MalformedURLException;
method public java.lang.String getAuthority();
- method public final java.lang.Object getContent() throws java.io.IOException;
- method public final java.lang.Object getContent(java.lang.Class[]) throws java.io.IOException;
+ method public java.lang.Object getContent() throws java.io.IOException;
+ method public java.lang.Object getContent(java.lang.Class[]) throws java.io.IOException;
method public int getDefaultPort();
method public java.lang.String getFile();
method public java.lang.String getHost();
@@ -57564,7 +57696,7 @@
method public synchronized int hashCode();
method public java.net.URLConnection openConnection() throws java.io.IOException;
method public java.net.URLConnection openConnection(java.net.Proxy) throws java.io.IOException;
- method public final java.io.InputStream openStream() throws java.io.IOException;
+ method public java.io.InputStream openStream() throws java.io.IOException;
method public boolean sameFile(java.net.URL);
method public static void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory);
method public java.lang.String toExternalForm();
@@ -62220,13 +62352,13 @@
method public int getOffset();
method public int next();
method public int previous();
- method public static final int primaryOrder(int);
+ method public static int primaryOrder(int);
method public void reset();
- method public static final short secondaryOrder(int);
+ method public static short secondaryOrder(int);
method public void setOffset(int);
method public void setText(java.lang.String);
method public void setText(java.text.CharacterIterator);
- method public static final short tertiaryOrder(int);
+ method public static short tertiaryOrder(int);
field public static final int NULLORDER = -1; // 0xffffffff
}
@@ -63507,7 +63639,7 @@
}
public final class HijrahDate implements java.time.chrono.ChronoLocalDate java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
- method public final java.time.chrono.ChronoLocalDateTime<java.time.chrono.HijrahDate> atTime(java.time.LocalTime);
+ method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.HijrahDate> atTime(java.time.LocalTime);
method public static java.time.chrono.HijrahDate from(java.time.temporal.TemporalAccessor);
method public java.time.chrono.HijrahChronology getChronology();
method public java.time.chrono.HijrahEra getEra();
@@ -63594,7 +63726,7 @@
}
public final class JapaneseDate implements java.time.chrono.ChronoLocalDate java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
- method public final java.time.chrono.ChronoLocalDateTime<java.time.chrono.JapaneseDate> atTime(java.time.LocalTime);
+ method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.JapaneseDate> atTime(java.time.LocalTime);
method public static java.time.chrono.JapaneseDate from(java.time.temporal.TemporalAccessor);
method public java.time.chrono.JapaneseChronology getChronology();
method public java.time.chrono.JapaneseEra getEra();
@@ -63650,7 +63782,7 @@
}
public final class MinguoDate implements java.time.chrono.ChronoLocalDate java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
- method public final java.time.chrono.ChronoLocalDateTime<java.time.chrono.MinguoDate> atTime(java.time.LocalTime);
+ method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.MinguoDate> atTime(java.time.LocalTime);
method public static java.time.chrono.MinguoDate from(java.time.temporal.TemporalAccessor);
method public java.time.chrono.MinguoChronology getChronology();
method public java.time.chrono.MinguoEra getEra();
@@ -63703,7 +63835,7 @@
}
public final class ThaiBuddhistDate implements java.time.chrono.ChronoLocalDate java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
- method public final java.time.chrono.ChronoLocalDateTime<java.time.chrono.ThaiBuddhistDate> atTime(java.time.LocalTime);
+ method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.ThaiBuddhistDate> atTime(java.time.LocalTime);
method public static java.time.chrono.ThaiBuddhistDate from(java.time.temporal.TemporalAccessor);
method public java.time.chrono.ThaiBuddhistChronology getChronology();
method public java.time.chrono.ThaiBuddhistEra getEra();
@@ -63755,8 +63887,8 @@
method public <T> T parse(java.lang.CharSequence, java.time.temporal.TemporalQuery<T>);
method public java.time.temporal.TemporalAccessor parseBest(java.lang.CharSequence, java.time.temporal.TemporalQuery<?>...);
method public java.time.temporal.TemporalAccessor parseUnresolved(java.lang.CharSequence, java.text.ParsePosition);
- method public static final java.time.temporal.TemporalQuery<java.time.Period> parsedExcessDays();
- method public static final java.time.temporal.TemporalQuery<java.lang.Boolean> parsedLeapSecond();
+ method public static java.time.temporal.TemporalQuery<java.time.Period> parsedExcessDays();
+ method public static java.time.temporal.TemporalQuery<java.lang.Boolean> parsedLeapSecond();
method public java.text.Format toFormat();
method public java.text.Format toFormat(java.time.temporal.TemporalQuery<?>);
method public java.time.format.DateTimeFormatter withChronology(java.time.chrono.Chronology);
@@ -65205,15 +65337,15 @@
method public java.lang.String getCountry();
method public static java.util.Locale getDefault();
method public static java.util.Locale getDefault(java.util.Locale.Category);
- method public final java.lang.String getDisplayCountry();
+ method public java.lang.String getDisplayCountry();
method public java.lang.String getDisplayCountry(java.util.Locale);
- method public final java.lang.String getDisplayLanguage();
+ method public java.lang.String getDisplayLanguage();
method public java.lang.String getDisplayLanguage(java.util.Locale);
- method public final java.lang.String getDisplayName();
+ method public java.lang.String getDisplayName();
method public java.lang.String getDisplayName(java.util.Locale);
method public java.lang.String getDisplayScript();
method public java.lang.String getDisplayScript(java.util.Locale);
- method public final java.lang.String getDisplayVariant();
+ method public java.lang.String getDisplayVariant();
method public java.lang.String getDisplayVariant(java.util.Locale);
method public java.lang.String getExtension(char);
method public java.util.Set<java.lang.Character> getExtensionKeys();
@@ -65234,7 +65366,6 @@
method public static synchronized void setDefault(java.util.Locale.Category, java.util.Locale);
method public java.util.Locale stripExtensions();
method public java.lang.String toLanguageTag();
- method public final java.lang.String toString();
field public static final java.util.Locale CANADA;
field public static final java.util.Locale CANADA_FRENCH;
field public static final java.util.Locale CHINA;
@@ -68582,7 +68713,7 @@
method public java.util.regex.Matcher reset();
method public java.util.regex.Matcher reset(java.lang.CharSequence);
method public int start();
- method public int start(int) throws java.lang.IllegalStateException;
+ method public int start(int);
method public int start(java.lang.String);
method public java.util.regex.MatchResult toMatchResult();
method public java.util.regex.Matcher useAnchoringBounds(boolean);
@@ -69420,7 +69551,6 @@
public class ExemptionMechanism {
ctor protected ExemptionMechanism(javax.crypto.ExemptionMechanismSpi, java.security.Provider, java.lang.String);
- method protected void finalize();
method public final byte[] genExemptionBlob() throws javax.crypto.ExemptionMechanismException, java.lang.IllegalStateException;
method public final int genExemptionBlob(byte[]) throws javax.crypto.ExemptionMechanismException, java.lang.IllegalStateException, javax.crypto.ShortBufferException;
method public final int genExemptionBlob(byte[], int) throws javax.crypto.ExemptionMechanismException, java.lang.IllegalStateException, javax.crypto.ShortBufferException;
diff --git a/api/system-current.txt b/api/system-current.txt
index e0f8ecf..9a54ac6 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -20,6 +20,7 @@
field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
field public static final deprecated java.lang.String BIND_CONNECTION_SERVICE = "android.permission.BIND_CONNECTION_SERVICE";
field public static final java.lang.String BIND_DIRECTORY_SEARCH = "android.permission.BIND_DIRECTORY_SEARCH";
+ field public static final java.lang.String BIND_EUICC_SERVICE = "android.permission.BIND_EUICC_SERVICE";
field public static final java.lang.String BIND_IMS_SERVICE = "android.permission.BIND_IMS_SERVICE";
field public static final java.lang.String BIND_KEYGUARD_APPWIDGET = "android.permission.BIND_KEYGUARD_APPWIDGET";
field public static final java.lang.String BIND_NETWORK_RECOMMENDATION_SERVICE = "android.permission.BIND_NETWORK_RECOMMENDATION_SERVICE";
@@ -28,6 +29,8 @@
field public static final java.lang.String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
field public static final java.lang.String BIND_RESOLVER_RANKER_SERVICE = "android.permission.BIND_RESOLVER_RANKER_SERVICE";
field public static final java.lang.String BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE = "android.permission.BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE";
+ field public static final java.lang.String BIND_TELEPHONY_DATA_SERVICE = "android.permission.BIND_TELEPHONY_DATA_SERVICE";
+ field public static final java.lang.String BIND_TELEPHONY_NETWORK_SERVICE = "android.permission.BIND_TELEPHONY_NETWORK_SERVICE";
field public static final java.lang.String BIND_TRUST_AGENT = "android.permission.BIND_TRUST_AGENT";
field public static final java.lang.String BIND_TV_REMOTE_SERVICE = "android.permission.BIND_TV_REMOTE_SERVICE";
field public static final java.lang.String BLUETOOTH_PRIVILEGED = "android.permission.BLUETOOTH_PRIVILEGED";
@@ -87,6 +90,7 @@
field public static final java.lang.String MANAGE_CARRIER_OEM_UNLOCK_STATE = "android.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE";
field public static final java.lang.String MANAGE_CA_CERTIFICATES = "android.permission.MANAGE_CA_CERTIFICATES";
field public static final java.lang.String MANAGE_DEVICE_ADMINS = "android.permission.MANAGE_DEVICE_ADMINS";
+ field public static final java.lang.String MANAGE_IPSEC_TUNNELS = "android.permission.MANAGE_IPSEC_TUNNELS";
field public static final java.lang.String MANAGE_SUBSCRIPTION_PLANS = "android.permission.MANAGE_SUBSCRIPTION_PLANS";
field public static final java.lang.String MANAGE_USB = "android.permission.MANAGE_USB";
field public static final java.lang.String MANAGE_USERS = "android.permission.MANAGE_USERS";
@@ -123,6 +127,7 @@
field public static final java.lang.String READ_PRINT_SERVICES = "android.permission.READ_PRINT_SERVICES";
field public static final java.lang.String READ_PRINT_SERVICE_RECOMMENDATIONS = "android.permission.READ_PRINT_SERVICE_RECOMMENDATIONS";
field public static final java.lang.String READ_PRIVILEGED_PHONE_STATE = "android.permission.READ_PRIVILEGED_PHONE_STATE";
+ field public static final java.lang.String READ_RUNTIME_PROFILES = "android.permission.READ_RUNTIME_PROFILES";
field public static final java.lang.String READ_SEARCH_INDEXABLES = "android.permission.READ_SEARCH_INDEXABLES";
field public static final java.lang.String READ_WALLPAPER_INTERNAL = "android.permission.READ_WALLPAPER_INTERNAL";
field public static final java.lang.String READ_WIFI_CREDENTIAL = "android.permission.READ_WIFI_CREDENTIAL";
@@ -170,6 +175,7 @@
field public static final java.lang.String USER_ACTIVITY = "android.permission.USER_ACTIVITY";
field public static final java.lang.String WRITE_APN_SETTINGS = "android.permission.WRITE_APN_SETTINGS";
field public static final java.lang.String WRITE_DREAM_STATE = "android.permission.WRITE_DREAM_STATE";
+ field public static final java.lang.String WRITE_EMBEDDED_SUBSCRIPTIONS = "android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS";
field public static final java.lang.String WRITE_GSERVICES = "android.permission.WRITE_GSERVICES";
field public static final java.lang.String WRITE_MEDIA_STORAGE = "android.permission.WRITE_MEDIA_STORAGE";
field public static final java.lang.String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
@@ -693,10 +699,12 @@
method public abstract void sendOrderedBroadcast(android.content.Intent, java.lang.String, android.os.Bundle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
field public static final java.lang.String BACKUP_SERVICE = "backup";
field public static final java.lang.String CONTEXTHUB_SERVICE = "contexthub";
+ field public static final java.lang.String EUICC_CARD_SERVICE = "euicc_card";
field public static final java.lang.String HDMI_CONTROL_SERVICE = "hdmi_control";
field public static final java.lang.String NETWORK_SCORE_SERVICE = "network_score";
field public static final java.lang.String OEM_LOCK_SERVICE = "oem_lock";
field public static final java.lang.String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block";
+ field public static final java.lang.String SECURE_ELEMENT_SERVICE = "secure_element";
field public static final java.lang.String VR_SERVICE = "vrmanager";
field public static final java.lang.String WIFI_RTT_SERVICE = "rttmanager";
field public static final java.lang.String WIFI_SCANNING_SERVICE = "wifiscanner";
@@ -841,6 +849,7 @@
public abstract class PackageManager {
method public abstract void addOnPermissionsChangeListener(android.content.pm.PackageManager.OnPermissionsChangedListener);
method public abstract java.util.List<android.content.IntentFilter> getAllIntentFilters(java.lang.String);
+ method public android.content.pm.dex.ArtManager getArtManager();
method public abstract java.lang.String getDefaultBrowserPackageNameAsUser(int);
method public abstract java.util.List<android.content.pm.PackageInfo> getInstalledPackagesAsUser(int, int);
method public abstract android.graphics.drawable.Drawable getInstantAppIcon(java.lang.String);
@@ -942,6 +951,26 @@
}
+package android.content.pm.dex {
+
+ public class ArtManager {
+ method public boolean isRuntimeProfilingEnabled(int);
+ method public void snapshotRuntimeProfile(int, java.lang.String, java.lang.String, java.util.concurrent.Executor, android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallback);
+ field public static final int PROFILE_APPS = 0; // 0x0
+ field public static final int PROFILE_BOOT_IMAGE = 1; // 0x1
+ field public static final int SNAPSHOT_FAILED_CODE_PATH_NOT_FOUND = 1; // 0x1
+ field public static final int SNAPSHOT_FAILED_INTERNAL_ERROR = 2; // 0x2
+ field public static final int SNAPSHOT_FAILED_PACKAGE_NOT_FOUND = 0; // 0x0
+ }
+
+ public static abstract class ArtManager.SnapshotRuntimeProfileCallback {
+ ctor public ArtManager.SnapshotRuntimeProfileCallback();
+ method public abstract void onError(int);
+ method public abstract void onSuccess(android.os.ParcelFileDescriptor);
+ }
+
+}
+
package android.content.pm.permission {
public final class RuntimePermissionPresentationInfo implements android.os.Parcelable {
@@ -2322,10 +2351,10 @@
package android.media.tv {
public final class TvContentRatingSystemInfo implements android.os.Parcelable {
- method public static final android.media.tv.TvContentRatingSystemInfo createTvContentRatingSystemInfo(int, android.content.pm.ApplicationInfo);
+ method public static android.media.tv.TvContentRatingSystemInfo createTvContentRatingSystemInfo(int, android.content.pm.ApplicationInfo);
method public int describeContents();
- method public final android.net.Uri getXmlUri();
- method public final boolean isSystemDefined();
+ method public android.net.Uri getXmlUri();
+ method public boolean isSystemDefined();
method public void writeToParcel(android.os.Parcel, int);
}
@@ -2583,13 +2612,33 @@
}
public static final class IpSecManager.IpSecTunnelInterface implements java.lang.AutoCloseable {
+ method public void addAddress(java.net.InetAddress, int) throws java.io.IOException;
method public void close();
method public java.lang.String getInterfaceName();
+ method public void removeAddress(java.net.InetAddress, int) throws java.io.IOException;
+ }
+
+ public final class IpSecTransform implements java.lang.AutoCloseable {
+ method public void startNattKeepalive(android.net.IpSecTransform.NattKeepaliveCallback, int, android.os.Handler) throws java.io.IOException;
+ method public void stopNattKeepalive();
}
public static class IpSecTransform.Builder {
method public android.net.IpSecTransform buildTunnelModeTransform(java.net.InetAddress, android.net.IpSecManager.SecurityParameterIndex) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
- method public android.net.IpSecTransform.Builder setNattKeepalive(int);
+ }
+
+ public static class IpSecTransform.NattKeepaliveCallback {
+ ctor public IpSecTransform.NattKeepaliveCallback();
+ method public void onError(int);
+ method public void onStarted();
+ method public void onStopped();
+ field public static final int ERROR_HARDWARE_ERROR = 3; // 0x3
+ field public static final int ERROR_HARDWARE_UNSUPPORTED = 2; // 0x2
+ field public static final int ERROR_INVALID_NETWORK = 1; // 0x1
+ }
+
+ public final class NetworkCapabilities implements android.os.Parcelable {
+ field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16
}
public class NetworkKey implements android.os.Parcelable {
@@ -3107,6 +3156,7 @@
package android.os {
public final class ConfigUpdate {
+ field public static final java.lang.String ACTION_UPDATE_CARRIER_ID_DB = "android.os.action.UPDATE_CARRIER_ID_DB";
field public static final java.lang.String ACTION_UPDATE_CARRIER_PROVISIONING_URLS = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS";
field public static final java.lang.String ACTION_UPDATE_CT_LOGS = "android.intent.action.UPDATE_CT_LOGS";
field public static final java.lang.String ACTION_UPDATE_INTENT_FIREWALL = "android.intent.action.UPDATE_INTENT_FIREWALL";
@@ -3117,6 +3167,135 @@
field public static final java.lang.String ACTION_UPDATE_TZDATA = "android.intent.action.UPDATE_TZDATA";
}
+ public class HidlSupport {
+ method public static boolean deepEquals(java.lang.Object, java.lang.Object);
+ method public static int deepHashCode(java.lang.Object);
+ method public static int getPidIfSharable();
+ method public static boolean interfacesEqual(android.os.IHwInterface, java.lang.Object);
+ }
+
+ public abstract class HwBinder implements android.os.IHwBinder {
+ ctor public HwBinder();
+ method public static final void configureRpcThreadpool(long, boolean);
+ method public static void enableInstrumentation();
+ method public static final android.os.IHwBinder getService(java.lang.String, java.lang.String) throws java.util.NoSuchElementException, android.os.RemoteException;
+ method public static final android.os.IHwBinder getService(java.lang.String, java.lang.String, boolean) throws java.util.NoSuchElementException, android.os.RemoteException;
+ method public static final void joinRpcThreadpool();
+ method public abstract void onTransact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException;
+ method public final void registerService(java.lang.String) throws android.os.RemoteException;
+ method public final void transact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException;
+ }
+
+ public class HwBlob {
+ ctor public HwBlob(int);
+ method public final void copyToBoolArray(long, boolean[], int);
+ method public final void copyToDoubleArray(long, double[], int);
+ method public final void copyToFloatArray(long, float[], int);
+ method public final void copyToInt16Array(long, short[], int);
+ method public final void copyToInt32Array(long, int[], int);
+ method public final void copyToInt64Array(long, long[], int);
+ method public final void copyToInt8Array(long, byte[], int);
+ method public final boolean getBool(long);
+ method public final double getDouble(long);
+ method public final float getFloat(long);
+ method public final short getInt16(long);
+ method public final int getInt32(long);
+ method public final long getInt64(long);
+ method public final byte getInt8(long);
+ method public final java.lang.String getString(long);
+ method public final long handle();
+ method public final void putBlob(long, android.os.HwBlob);
+ method public final void putBool(long, boolean);
+ method public final void putBoolArray(long, boolean[]);
+ method public final void putDouble(long, double);
+ method public final void putDoubleArray(long, double[]);
+ method public final void putFloat(long, float);
+ method public final void putFloatArray(long, float[]);
+ method public final void putInt16(long, short);
+ method public final void putInt16Array(long, short[]);
+ method public final void putInt32(long, int);
+ method public final void putInt32Array(long, int[]);
+ method public final void putInt64(long, long);
+ method public final void putInt64Array(long, long[]);
+ method public final void putInt8(long, byte);
+ method public final void putInt8Array(long, byte[]);
+ method public final void putString(long, java.lang.String);
+ method public static java.lang.Boolean[] wrapArray(boolean[]);
+ method public static java.lang.Long[] wrapArray(long[]);
+ method public static java.lang.Byte[] wrapArray(byte[]);
+ method public static java.lang.Short[] wrapArray(short[]);
+ method public static java.lang.Integer[] wrapArray(int[]);
+ method public static java.lang.Float[] wrapArray(float[]);
+ method public static java.lang.Double[] wrapArray(double[]);
+ }
+
+ public class HwParcel {
+ ctor public HwParcel();
+ method public final void enforceInterface(java.lang.String);
+ method public final boolean readBool();
+ method public final java.util.ArrayList<java.lang.Boolean> readBoolVector();
+ method public final android.os.HwBlob readBuffer(long);
+ method public final double readDouble();
+ method public final java.util.ArrayList<java.lang.Double> readDoubleVector();
+ method public final android.os.HwBlob readEmbeddedBuffer(long, long, long, boolean);
+ method public final float readFloat();
+ method public final java.util.ArrayList<java.lang.Float> readFloatVector();
+ method public final short readInt16();
+ method public final java.util.ArrayList<java.lang.Short> readInt16Vector();
+ method public final int readInt32();
+ method public final java.util.ArrayList<java.lang.Integer> readInt32Vector();
+ method public final long readInt64();
+ method public final java.util.ArrayList<java.lang.Long> readInt64Vector();
+ method public final byte readInt8();
+ method public final java.util.ArrayList<java.lang.Byte> readInt8Vector();
+ method public final java.lang.String readString();
+ method public final java.util.ArrayList<java.lang.String> readStringVector();
+ method public final android.os.IHwBinder readStrongBinder();
+ method public final void release();
+ method public final void releaseTemporaryStorage();
+ method public final void send();
+ method public final void verifySuccess();
+ method public final void writeBool(boolean);
+ method public final void writeBoolVector(java.util.ArrayList<java.lang.Boolean>);
+ method public final void writeBuffer(android.os.HwBlob);
+ method public final void writeDouble(double);
+ method public final void writeDoubleVector(java.util.ArrayList<java.lang.Double>);
+ method public final void writeFloat(float);
+ method public final void writeFloatVector(java.util.ArrayList<java.lang.Float>);
+ method public final void writeInt16(short);
+ method public final void writeInt16Vector(java.util.ArrayList<java.lang.Short>);
+ method public final void writeInt32(int);
+ method public final void writeInt32Vector(java.util.ArrayList<java.lang.Integer>);
+ method public final void writeInt64(long);
+ method public final void writeInt64Vector(java.util.ArrayList<java.lang.Long>);
+ method public final void writeInt8(byte);
+ method public final void writeInt8Vector(java.util.ArrayList<java.lang.Byte>);
+ method public final void writeInterfaceToken(java.lang.String);
+ method public final void writeStatus(int);
+ method public final void writeString(java.lang.String);
+ method public final void writeStringVector(java.util.ArrayList<java.lang.String>);
+ method public final void writeStrongBinder(android.os.IHwBinder);
+ field public static final int STATUS_SUCCESS = 0; // 0x0
+ }
+
+ public static abstract class HwParcel.Status implements java.lang.annotation.Annotation {
+ }
+
+ public abstract interface IHwBinder {
+ method public abstract boolean linkToDeath(android.os.IHwBinder.DeathRecipient, long);
+ method public abstract android.os.IHwInterface queryLocalInterface(java.lang.String);
+ method public abstract void transact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException;
+ method public abstract boolean unlinkToDeath(android.os.IHwBinder.DeathRecipient);
+ }
+
+ public static abstract interface IHwBinder.DeathRecipient {
+ method public abstract void serviceDied(long);
+ }
+
+ public abstract interface IHwInterface {
+ method public abstract android.os.IHwBinder asBinder();
+ }
+
public class IncidentManager {
method public void reportIncident(android.os.IncidentReportArgs);
method public void reportIncident(java.lang.String, byte[]);
@@ -3489,6 +3668,8 @@
public static final class Settings.Global extends android.provider.Settings.NameValueTable {
method public static boolean putString(android.content.ContentResolver, java.lang.String, java.lang.String, java.lang.String, boolean);
method public static void resetToDefaults(android.content.ContentResolver, java.lang.String);
+ field public static final java.lang.String DEFAULT_SM_DP_PLUS = "default_sm_dp_plus";
+ field public static final java.lang.String EUICC_PROVISIONED = "euicc_provisioned";
field public static final java.lang.String OTA_DISABLE_AUTOMATIC_UPDATE = "ota_disable_automatic_update";
field public static final java.lang.String THEATER_MODE_ON = "theater_mode_on";
field public static final java.lang.String WEBVIEW_MULTIPROCESS = "webview_multiprocess";
@@ -3531,6 +3712,125 @@
}
+package android.service.euicc {
+
+ public final class EuiccProfileInfo implements android.os.Parcelable {
+ method public int describeContents();
+ method public android.service.carrier.CarrierIdentifier getCarrierIdentifier();
+ method public java.lang.String getIccid();
+ method public java.lang.String getNickname();
+ method public int getPolicyRules();
+ method public int getProfileClass();
+ method public java.lang.String getProfileName();
+ method public java.lang.String getServiceProviderName();
+ method public int getState();
+ method public java.util.List<android.telephony.UiccAccessRule> getUiccAccessRules();
+ method public boolean hasPolicyRule(int);
+ method public boolean hasPolicyRules();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.service.euicc.EuiccProfileInfo> CREATOR;
+ field public static final int POLICY_RULE_DELETE_AFTER_DISABLING = 4; // 0x4
+ field public static final int POLICY_RULE_DO_NOT_DELETE = 2; // 0x2
+ field public static final int POLICY_RULE_DO_NOT_DISABLE = 1; // 0x1
+ field public static final int PROFILE_CLASS_OPERATIONAL = 2; // 0x2
+ field public static final int PROFILE_CLASS_PROVISIONING = 1; // 0x1
+ field public static final int PROFILE_CLASS_TESTING = 0; // 0x0
+ field public static final int PROFILE_STATE_DISABLED = 0; // 0x0
+ field public static final int PROFILE_STATE_ENABLED = 1; // 0x1
+ }
+
+ public static final class EuiccProfileInfo.Builder {
+ ctor public EuiccProfileInfo.Builder(java.lang.String);
+ ctor public EuiccProfileInfo.Builder(android.service.euicc.EuiccProfileInfo);
+ method public android.service.euicc.EuiccProfileInfo build();
+ method public android.service.euicc.EuiccProfileInfo.Builder setCarrierIdentifier(android.service.carrier.CarrierIdentifier);
+ method public android.service.euicc.EuiccProfileInfo.Builder setIccid(java.lang.String);
+ method public android.service.euicc.EuiccProfileInfo.Builder setNickname(java.lang.String);
+ method public android.service.euicc.EuiccProfileInfo.Builder setPolicyRules(int);
+ method public android.service.euicc.EuiccProfileInfo.Builder setProfileClass(int);
+ method public android.service.euicc.EuiccProfileInfo.Builder setProfileName(java.lang.String);
+ method public android.service.euicc.EuiccProfileInfo.Builder setServiceProviderName(java.lang.String);
+ method public android.service.euicc.EuiccProfileInfo.Builder setState(int);
+ method public android.service.euicc.EuiccProfileInfo.Builder setUiccAccessRule(java.util.List<android.telephony.UiccAccessRule>);
+ }
+
+ public static abstract class EuiccProfileInfo.PolicyRule implements java.lang.annotation.Annotation {
+ }
+
+ public static abstract class EuiccProfileInfo.ProfileClass implements java.lang.annotation.Annotation {
+ }
+
+ public static abstract class EuiccProfileInfo.ProfileState implements java.lang.annotation.Annotation {
+ }
+
+ public abstract class EuiccService extends android.app.Service {
+ ctor public EuiccService();
+ method public android.os.IBinder onBind(android.content.Intent);
+ method public abstract int onDeleteSubscription(int, java.lang.String);
+ method public abstract int onDownloadSubscription(int, android.telephony.euicc.DownloadableSubscription, boolean, boolean);
+ method public abstract int onEraseSubscriptions(int);
+ method public abstract android.service.euicc.GetDefaultDownloadableSubscriptionListResult onGetDefaultDownloadableSubscriptionList(int, boolean);
+ method public abstract android.service.euicc.GetDownloadableSubscriptionMetadataResult onGetDownloadableSubscriptionMetadata(int, android.telephony.euicc.DownloadableSubscription, boolean);
+ method public abstract java.lang.String onGetEid(int);
+ method public abstract android.telephony.euicc.EuiccInfo onGetEuiccInfo(int);
+ method public abstract android.service.euicc.GetEuiccProfileInfoListResult onGetEuiccProfileInfoList(int);
+ method public abstract int onGetOtaStatus(int);
+ method public abstract int onRetainSubscriptionsForFactoryReset(int);
+ method public abstract void onStartOtaIfNecessary(int, android.service.euicc.EuiccService.OtaStatusChangedCallback);
+ method public abstract int onSwitchToSubscription(int, java.lang.String, boolean);
+ method public abstract int onUpdateSubscriptionNickname(int, java.lang.String, java.lang.String);
+ field public static final java.lang.String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS = "android.service.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS";
+ field public static final java.lang.String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION = "android.service.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION";
+ field public static final java.lang.String ACTION_RESOLVE_CONFIRMATION_CODE = "android.service.euicc.action.RESOLVE_CONFIRMATION_CODE";
+ field public static final java.lang.String ACTION_RESOLVE_DEACTIVATE_SIM = "android.service.euicc.action.RESOLVE_DEACTIVATE_SIM";
+ field public static final java.lang.String ACTION_RESOLVE_NO_PRIVILEGES = "android.service.euicc.action.RESOLVE_NO_PRIVILEGES";
+ field public static final java.lang.String CATEGORY_EUICC_UI = "android.service.euicc.category.EUICC_UI";
+ field public static final java.lang.String EUICC_SERVICE_INTERFACE = "android.service.euicc.EuiccService";
+ field public static final java.lang.String EXTRA_RESOLUTION_CALLING_PACKAGE = "android.service.euicc.extra.RESOLUTION_CALLING_PACKAGE";
+ field public static final java.lang.String EXTRA_RESOLUTION_CONFIRMATION_CODE = "android.service.euicc.extra.RESOLUTION_CONFIRMATION_CODE";
+ field public static final java.lang.String EXTRA_RESOLUTION_CONFIRMATION_CODE_RETRIED = "android.service.euicc.extra.RESOLUTION_CONFIRMATION_CODE_RETRIED";
+ field public static final java.lang.String EXTRA_RESOLUTION_CONSENT = "android.service.euicc.extra.RESOLUTION_CONSENT";
+ field public static final int RESULT_FIRST_USER = 1; // 0x1
+ field public static final int RESULT_MUST_DEACTIVATE_SIM = -1; // 0xffffffff
+ field public static final int RESULT_NEED_CONFIRMATION_CODE = -2; // 0xfffffffe
+ field public static final int RESULT_OK = 0; // 0x0
+ }
+
+ public static abstract class EuiccService.OtaStatusChangedCallback {
+ ctor public EuiccService.OtaStatusChangedCallback();
+ method public abstract void onOtaStatusChanged(int);
+ }
+
+ public final class GetDefaultDownloadableSubscriptionListResult implements android.os.Parcelable {
+ ctor public GetDefaultDownloadableSubscriptionListResult(int, android.telephony.euicc.DownloadableSubscription[]);
+ method public int describeContents();
+ method public java.util.List<android.telephony.euicc.DownloadableSubscription> getDownloadableSubscriptions();
+ method public int getResult();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.service.euicc.GetDefaultDownloadableSubscriptionListResult> CREATOR;
+ }
+
+ public final class GetDownloadableSubscriptionMetadataResult implements android.os.Parcelable {
+ ctor public GetDownloadableSubscriptionMetadataResult(int, android.telephony.euicc.DownloadableSubscription);
+ method public int describeContents();
+ method public android.telephony.euicc.DownloadableSubscription getDownloadableSubscription();
+ method public int getResult();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.service.euicc.GetDownloadableSubscriptionMetadataResult> CREATOR;
+ }
+
+ public final class GetEuiccProfileInfoListResult implements android.os.Parcelable {
+ ctor public GetEuiccProfileInfoListResult(int, android.service.euicc.EuiccProfileInfo[], boolean);
+ method public int describeContents();
+ method public boolean getIsRemovable();
+ method public java.util.List<android.service.euicc.EuiccProfileInfo> getProfiles();
+ method public int getResult();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.service.euicc.GetEuiccProfileInfoListResult> CREATOR;
+ }
+
+}
+
package android.service.notification {
public final class Adjustment implements android.os.Parcelable {
@@ -3845,15 +4145,15 @@
}
public final deprecated class Phone {
- method public final void addListener(android.telecom.Phone.Listener);
- method public final boolean canAddCall();
- method public final deprecated android.telecom.AudioState getAudioState();
- method public final android.telecom.CallAudioState getCallAudioState();
- method public final java.util.List<android.telecom.Call> getCalls();
- method public final void removeListener(android.telecom.Phone.Listener);
+ method public void addListener(android.telecom.Phone.Listener);
+ method public boolean canAddCall();
+ method public deprecated android.telecom.AudioState getAudioState();
+ method public android.telecom.CallAudioState getCallAudioState();
+ method public java.util.List<android.telecom.Call> getCalls();
+ method public void removeListener(android.telecom.Phone.Listener);
method public void requestBluetoothAudio(java.lang.String);
- method public final void setAudioRoute(int);
- method public final void setMuted(boolean);
+ method public void setAudioRoute(int);
+ method public void setMuted(boolean);
}
public static abstract class Phone.Listener {
@@ -3948,7 +4248,6 @@
package android.telephony {
public static final class AccessNetworkConstants.TransportType {
- ctor public AccessNetworkConstants.TransportType();
field public static final int WLAN = 2; // 0x2
field public static final int WWAN = 1; // 0x1
}
@@ -3967,13 +4266,97 @@
field public static final java.lang.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, int[], android.telephony.CellIdentity);
+ ctor protected NetworkRegistrationState(android.os.Parcel);
+ method public int describeContents();
+ method public int getAccessNetworkTechnology();
+ method public int[] getAvailableServices();
+ method public android.telephony.CellIdentity getCellIdentity();
+ method public int getDomain();
+ method public int getReasonForDenial();
+ method public int getRegState();
+ method public int getTransportType();
+ method public boolean isEmergencyEnabled();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.NetworkRegistrationState> 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 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_VIDEO = 4; // 0x4
+ field public static final int SERVICE_TYPE_VOICE = 1; // 0x1
+ }
+
+ public abstract class NetworkService extends android.app.Service {
+ ctor public NetworkService();
+ method protected abstract android.telephony.NetworkService.NetworkServiceProvider createNetworkServiceProvider(int);
+ field public static final java.lang.String NETWORK_SERVICE_EXTRA_SLOT_ID = "android.telephony.extra.SLOT_ID";
+ field public static final java.lang.String NETWORK_SERVICE_INTERFACE = "android.telephony.NetworkService";
+ }
+
+ public class NetworkService.NetworkServiceProvider {
+ ctor public NetworkService.NetworkServiceProvider(int);
+ method public void getNetworkRegistrationState(int, android.telephony.NetworkServiceCallback);
+ method public final int getSlotId();
+ method public final void notifyNetworkRegistrationStateChanged();
+ method protected void onDestroy();
+ }
+
+ public class NetworkServiceCallback {
+ method public void onGetNetworkRegistrationStateComplete(int, android.telephony.NetworkRegistrationState);
+ 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
+ field public static final int RESULT_ERROR_INVALID_ARG = 2; // 0x2
+ field public static final int RESULT_ERROR_UNSUPPORTED = 1; // 0x1
+ field public static final int RESULT_SUCCESS = 0; // 0x0
+ }
+
+ public class ServiceState implements android.os.Parcelable {
+ method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates();
+ method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates(int);
+ method public android.telephony.NetworkRegistrationState getNetworkRegistrationStates(int, int);
+ }
+
public final class SmsManager {
method public void sendMultipartTextMessageWithoutPersisting(java.lang.String, java.lang.String, java.util.List<java.lang.String>, java.util.List<android.app.PendingIntent>, java.util.List<android.app.PendingIntent>);
method public void sendTextMessageWithoutPersisting(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
+ field public static final int RESULT_CANCELLED = 23; // 0x17
+ field public static final int RESULT_ENCODING_ERROR = 18; // 0x12
+ field public static final int RESULT_ERROR_FDN_CHECK_FAILURE = 6; // 0x6
+ field public static final int RESULT_ERROR_NONE = 0; // 0x0
+ field public static final int RESULT_INTERNAL_ERROR = 21; // 0x15
+ field public static final int RESULT_INVALID_ARGUMENTS = 11; // 0xb
+ field public static final int RESULT_INVALID_SMSC_ADDRESS = 19; // 0x13
+ field public static final int RESULT_INVALID_SMS_FORMAT = 14; // 0xe
+ field public static final int RESULT_INVALID_STATE = 12; // 0xc
+ field public static final int RESULT_MODEM_ERROR = 16; // 0x10
+ field public static final int RESULT_NETWORK_ERROR = 17; // 0x11
+ field public static final int RESULT_NETWORK_REJECT = 10; // 0xa
+ field public static final int RESULT_NO_MEMORY = 13; // 0xd
+ field public static final int RESULT_NO_RESOURCES = 22; // 0x16
+ field public static final int RESULT_OPERATION_NOT_ALLOWED = 20; // 0x14
+ field public static final int RESULT_RADIO_NOT_AVAILABLE = 9; // 0x9
+ field public static final int RESULT_REQUEST_NOT_SUPPORTED = 24; // 0x18
+ field public static final int RESULT_SYSTEM_ERROR = 15; // 0xf
+ }
+
+ public class SubscriptionInfo implements android.os.Parcelable {
+ method public java.util.List<android.telephony.UiccAccessRule> getAccessRules();
}
public class SubscriptionManager {
+ method public java.util.List<android.telephony.SubscriptionInfo> getAvailableSubscriptionInfoList();
method public java.util.List<android.telephony.SubscriptionPlan> getSubscriptionPlans(int);
+ method public void requestEmbeddedSubscriptionInfoListRefresh();
method public void setSubscriptionPlans(int, java.util.List<android.telephony.SubscriptionPlan>);
}
@@ -4048,12 +4431,15 @@
method public java.lang.String getCdmaMin(int);
method public int getCurrentPhoneType();
method public int getCurrentPhoneType(int);
+ method public int getDataActivationState();
method public deprecated boolean getDataEnabled();
method public deprecated boolean getDataEnabled(int);
method public int getSimApplicationState();
method public int getSimCardState();
method public java.util.List<android.telephony.TelephonyHistogram> getTelephonyHistograms();
+ method public android.telephony.UiccSlotInfo[] getUiccSlotsInfo();
method public android.os.Bundle getVisualVoicemailSettings();
+ method public int getVoiceActivationState();
method public boolean handlePinMmi(java.lang.String);
method public boolean handlePinMmiForSubscriber(int, java.lang.String);
method public boolean isDataConnectivityPossible();
@@ -4065,15 +4451,18 @@
method public deprecated boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle);
method public boolean needsOtaServiceProvisioning();
method public int setAllowedCarriers(int, java.util.List<android.service.carrier.CarrierIdentifier>);
+ method public void setDataActivationState(int);
method public deprecated void setDataEnabled(int, boolean);
method public boolean setRadio(boolean);
method public boolean setRadioPower(boolean);
method public deprecated void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean);
+ method public void setVoiceActivationState(int);
method public deprecated void silenceRinger();
method public boolean supplyPin(java.lang.String);
method public int[] supplyPinReportResult(java.lang.String);
method public boolean supplyPuk(java.lang.String, java.lang.String);
method public int[] supplyPukReportResult(java.lang.String, java.lang.String);
+ method public boolean switchSlots(int[]);
method public void toggleRadioOnOff();
method public void updateServiceLocation();
field public static final java.lang.String ACTION_SIM_APPLICATION_STATE_CHANGED = "android.telephony.action.SIM_APPLICATION_STATE_CHANGED";
@@ -4086,10 +4475,42 @@
field public static final java.lang.String EXTRA_SIM_STATE = "android.telephony.extra.SIM_STATE";
field public static final java.lang.String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL";
field public static final java.lang.String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING";
+ field public static final int SIM_ACTIVATION_STATE_ACTIVATED = 2; // 0x2
+ field public static final int SIM_ACTIVATION_STATE_ACTIVATING = 1; // 0x1
+ field public static final int SIM_ACTIVATION_STATE_DEACTIVATED = 3; // 0x3
+ field public static final int SIM_ACTIVATION_STATE_RESTRICTED = 4; // 0x4
+ field public static final int SIM_ACTIVATION_STATE_UNKNOWN = 0; // 0x0
field public static final int SIM_STATE_LOADED = 10; // 0xa
field public static final int SIM_STATE_PRESENT = 11; // 0xb
}
+ public final class UiccAccessRule implements android.os.Parcelable {
+ ctor public UiccAccessRule(byte[], java.lang.String, long);
+ method public int describeContents();
+ method public int getCarrierPrivilegeStatus(android.content.pm.PackageInfo);
+ method public int getCarrierPrivilegeStatus(android.content.pm.Signature, java.lang.String);
+ method public java.lang.String getPackageName();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.UiccAccessRule> CREATOR;
+ }
+
+ public class UiccSlotInfo implements android.os.Parcelable {
+ ctor public UiccSlotInfo(boolean, boolean, java.lang.String, int, int, boolean);
+ method public int describeContents();
+ method public java.lang.String getCardId();
+ method public int getCardStateInfo();
+ method public boolean getIsActive();
+ method public boolean getIsEuicc();
+ method public boolean getIsExtendedApduSupported();
+ method public int getLogicalSlotIdx();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int CARD_STATE_INFO_ABSENT = 1; // 0x1
+ field public static final int CARD_STATE_INFO_ERROR = 3; // 0x3
+ field public static final int CARD_STATE_INFO_PRESENT = 2; // 0x2
+ field public static final int CARD_STATE_INFO_RESTRICTED = 4; // 0x4
+ field public static final android.os.Parcelable.Creator<android.telephony.UiccSlotInfo> CREATOR;
+ }
+
public abstract class VisualVoicemailService extends android.app.Service {
method public static final void sendVisualVoicemailSms(android.content.Context, android.telecom.PhoneAccountHandle, java.lang.String, short, java.lang.String, android.app.PendingIntent);
method public static final void setSmsFilterSettings(android.content.Context, android.telecom.PhoneAccountHandle, android.telephony.VisualVoicemailSmsFilterSettings);
@@ -4148,6 +4569,7 @@
}
public abstract class DataService extends android.app.Service {
+ ctor public DataService();
method public abstract android.telephony.data.DataService.DataServiceProvider createDataServiceProvider(int);
field public static final java.lang.String DATA_SERVICE_EXTRA_SLOT_ID = "android.telephony.data.extra.SLOT_ID";
field public static final java.lang.String DATA_SERVICE_INTERFACE = "android.telephony.data.DataService";
@@ -4184,22 +4606,868 @@
}
+package android.telephony.euicc {
+
+ public final class DownloadableSubscription implements android.os.Parcelable {
+ method public java.util.List<android.telephony.UiccAccessRule> getAccessRules();
+ method public java.lang.String getCarrierName();
+ }
+
+ public static final class DownloadableSubscription.Builder {
+ ctor public DownloadableSubscription.Builder();
+ ctor public DownloadableSubscription.Builder(android.telephony.euicc.DownloadableSubscription);
+ method public android.telephony.euicc.DownloadableSubscription build();
+ method public android.telephony.euicc.DownloadableSubscription.Builder setAccessRules(java.util.List<android.telephony.UiccAccessRule>);
+ method public android.telephony.euicc.DownloadableSubscription.Builder setCarrierName(java.lang.String);
+ method public android.telephony.euicc.DownloadableSubscription.Builder setConfirmationCode(java.lang.String);
+ method public android.telephony.euicc.DownloadableSubscription.Builder setEncodedActivationCode(java.lang.String);
+ }
+
+ public class EuiccCardManager {
+ method public void authenticateServer(java.lang.String, java.lang.String, byte[], byte[], byte[], byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
+ method public void cancelSession(java.lang.String, byte[], int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
+ method public void deleteProfile(java.lang.String, java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
+ method public void disableProfile(java.lang.String, java.lang.String, boolean, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
+ method public void listNotifications(java.lang.String, int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification[]>);
+ method public void loadBoundProfilePackage(java.lang.String, byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
+ method public void prepareDownload(java.lang.String, byte[], byte[], byte[], byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
+ method public void removeNotificationFromList(java.lang.String, int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
+ method public void requestAllProfiles(java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.service.euicc.EuiccProfileInfo[]>);
+ method public void requestDefaultSmdpAddress(java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.String>);
+ method public void requestEuiccChallenge(java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
+ method public void requestEuiccInfo1(java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
+ method public void requestEuiccInfo2(java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
+ method public void requestProfile(java.lang.String, java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.service.euicc.EuiccProfileInfo>);
+ method public void requestRulesAuthTable(java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccRulesAuthTable>);
+ method public void requestSmdsAddress(java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.String>);
+ method public void resetMemory(java.lang.String, int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
+ method public void retrieveNotification(java.lang.String, int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification>);
+ method public void retrieveNotificationList(java.lang.String, int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification[]>);
+ method public void setDefaultSmdpAddress(java.lang.String, java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
+ method public void setNickname(java.lang.String, java.lang.String, java.lang.String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
+ method public void switchToProfile(java.lang.String, java.lang.String, boolean, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.service.euicc.EuiccProfileInfo>);
+ field public static final int CANCEL_REASON_END_USER_REJECTED = 0; // 0x0
+ field public static final int CANCEL_REASON_POSTPONED = 1; // 0x1
+ field public static final int CANCEL_REASON_PPR_NOT_ALLOWED = 3; // 0x3
+ field public static final int CANCEL_REASON_TIMEOUT = 2; // 0x2
+ field public static final int RESET_OPTION_DELETE_FIELD_LOADED_TEST_PROFILES = 2; // 0x2
+ field public static final int RESET_OPTION_DELETE_OPERATIONAL_PROFILES = 1; // 0x1
+ field public static final int RESET_OPTION_RESET_DEFAULT_SMDP_ADDRESS = 4; // 0x4
+ field public static final int RESULT_EUICC_NOT_FOUND = -2; // 0xfffffffe
+ field public static final int RESULT_OK = 0; // 0x0
+ field public static final int RESULT_UNKNOWN_ERROR = -1; // 0xffffffff
+ }
+
+ public static abstract class EuiccCardManager.CancelReason implements java.lang.annotation.Annotation {
+ }
+
+ public static abstract class EuiccCardManager.ResetOption implements java.lang.annotation.Annotation {
+ }
+
+ public static abstract interface EuiccCardManager.ResultCallback<T> {
+ method public abstract void onComplete(int, T);
+ }
+
+ public class EuiccManager {
+ method public void continueOperation(android.content.Intent, android.os.Bundle);
+ method public void eraseSubscriptions(android.app.PendingIntent);
+ method public void getDefaultDownloadableSubscriptionList(android.app.PendingIntent);
+ method public void getDownloadableSubscriptionMetadata(android.telephony.euicc.DownloadableSubscription, android.app.PendingIntent);
+ method public int getOtaStatus();
+ field public static final java.lang.String ACTION_OTA_STATUS_CHANGED = "android.telephony.euicc.action.OTA_STATUS_CHANGED";
+ field public static final java.lang.String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION = "android.telephony.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION";
+ field public static final int EUICC_OTA_FAILED = 2; // 0x2
+ field public static final int EUICC_OTA_IN_PROGRESS = 1; // 0x1
+ field public static final int EUICC_OTA_NOT_NEEDED = 4; // 0x4
+ field public static final int EUICC_OTA_STATUS_UNAVAILABLE = 5; // 0x5
+ field public static final int EUICC_OTA_SUCCEEDED = 3; // 0x3
+ field public static final java.lang.String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS";
+ }
+
+ public static abstract class EuiccManager.OtaStatus implements java.lang.annotation.Annotation {
+ }
+
+ public final class EuiccNotification implements android.os.Parcelable {
+ ctor public EuiccNotification(int, java.lang.String, int, byte[]);
+ method public int describeContents();
+ method public byte[] getData();
+ method public int getEvent();
+ method public int getSeq();
+ method public java.lang.String getTargetAddr();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int ALL_EVENTS = 15; // 0xf
+ field public static final android.os.Parcelable.Creator<android.telephony.euicc.EuiccNotification> CREATOR;
+ field public static final int EVENT_DELETE = 8; // 0x8
+ field public static final int EVENT_DISABLE = 4; // 0x4
+ field public static final int EVENT_ENABLE = 2; // 0x2
+ field public static final int EVENT_INSTALL = 1; // 0x1
+ }
+
+ public static abstract class EuiccNotification.Event implements java.lang.annotation.Annotation {
+ }
+
+ public final class EuiccRulesAuthTable implements android.os.Parcelable {
+ method public int describeContents();
+ method public int findIndex(int, android.service.carrier.CarrierIdentifier);
+ method public boolean hasPolicyRuleFlag(int, int);
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.euicc.EuiccRulesAuthTable> CREATOR;
+ field public static final int POLICY_RULE_FLAG_CONSENT_REQUIRED = 1; // 0x1
+ }
+
+ public static final class EuiccRulesAuthTable.Builder {
+ ctor public EuiccRulesAuthTable.Builder(int);
+ method public android.telephony.euicc.EuiccRulesAuthTable.Builder add(int, java.util.List<android.service.carrier.CarrierIdentifier>, int);
+ method public android.telephony.euicc.EuiccRulesAuthTable build();
+ }
+
+ public static abstract class EuiccRulesAuthTable.PolicyRuleFlag implements java.lang.annotation.Annotation {
+ }
+
+}
+
package android.telephony.ims {
+ public final class ImsCallForwardInfo implements android.os.Parcelable {
+ ctor public ImsCallForwardInfo(int, int, int, int, java.lang.String, int);
+ method public int describeContents();
+ method public int getCondition();
+ method public java.lang.String getNumber();
+ method public int getServiceClass();
+ method public int getStatus();
+ method public int getTimeSeconds();
+ method public int getToA();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsCallForwardInfo> CREATOR;
+ }
+
+ public final class ImsCallProfile implements android.os.Parcelable {
+ method public int describeContents();
+ method public java.lang.String getCallExtra(java.lang.String);
+ method public java.lang.String getCallExtra(java.lang.String, java.lang.String);
+ method public boolean getCallExtraBoolean(java.lang.String);
+ method public boolean getCallExtraBoolean(java.lang.String, boolean);
+ method public int getCallExtraInt(java.lang.String);
+ method public int getCallExtraInt(java.lang.String, int);
+ method public android.os.Bundle getCallExtras();
+ method public int getCallType();
+ method public static int getCallTypeFromVideoState(int);
+ method public android.telephony.ims.ImsStreamMediaProfile getMediaProfile();
+ method public int getRestrictCause();
+ method public int getServiceType();
+ method public static int getVideoStateFromCallType(int);
+ method public static int getVideoStateFromImsCallProfile(android.telephony.ims.ImsCallProfile);
+ method public boolean isVideoCall();
+ method public boolean isVideoPaused();
+ method public static int presentationToOir(int);
+ method public void setCallExtra(java.lang.String, java.lang.String);
+ method public void setCallExtraBoolean(java.lang.String, boolean);
+ method public void setCallExtraInt(java.lang.String, int);
+ method public void updateCallExtras(android.telephony.ims.ImsCallProfile);
+ method public void updateCallType(android.telephony.ims.ImsCallProfile);
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int CALL_RESTRICT_CAUSE_DISABLED = 2; // 0x2
+ field public static final int CALL_RESTRICT_CAUSE_HD = 3; // 0x3
+ field public static final int CALL_RESTRICT_CAUSE_NONE = 0; // 0x0
+ field public static final int CALL_RESTRICT_CAUSE_RAT = 1; // 0x1
+ field public static final int CALL_TYPE_VIDEO_N_VOICE = 3; // 0x3
+ field public static final int CALL_TYPE_VOICE = 2; // 0x2
+ field public static final int CALL_TYPE_VOICE_N_VIDEO = 1; // 0x1
+ field public static final int CALL_TYPE_VS = 8; // 0x8
+ field public static final int CALL_TYPE_VS_RX = 10; // 0xa
+ field public static final int CALL_TYPE_VS_TX = 9; // 0x9
+ field public static final int CALL_TYPE_VT = 4; // 0x4
+ field public static final int CALL_TYPE_VT_NODIR = 7; // 0x7
+ field public static final int CALL_TYPE_VT_RX = 6; // 0x6
+ field public static final int CALL_TYPE_VT_TX = 5; // 0x5
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsCallProfile> CREATOR;
+ field public static final int DIALSTRING_NORMAL = 0; // 0x0
+ field public static final int DIALSTRING_SS_CONF = 1; // 0x1
+ field public static final int DIALSTRING_USSD = 2; // 0x2
+ field public static final java.lang.String EXTRA_ADDITIONAL_CALL_INFO = "AdditionalCallInfo";
+ field public static final java.lang.String EXTRA_CALL_RAT_TYPE = "CallRadioTech";
+ field public static final java.lang.String EXTRA_CHILD_NUMBER = "ChildNum";
+ field public static final java.lang.String EXTRA_CNA = "cna";
+ field public static final java.lang.String EXTRA_CNAP = "cnap";
+ field public static final java.lang.String EXTRA_CODEC = "Codec";
+ field public static final java.lang.String EXTRA_DIALSTRING = "dialstring";
+ field public static final java.lang.String EXTRA_DISPLAY_TEXT = "DisplayText";
+ field public static final java.lang.String EXTRA_IS_CALL_PULL = "CallPull";
+ field public static final java.lang.String EXTRA_OI = "oi";
+ field public static final java.lang.String EXTRA_OIR = "oir";
+ field public static final java.lang.String EXTRA_REMOTE_URI = "remote_uri";
+ field public static final java.lang.String EXTRA_USSD = "ussd";
+ field public static final int OIR_DEFAULT = 0; // 0x0
+ field public static final int OIR_PRESENTATION_NOT_RESTRICTED = 2; // 0x2
+ field public static final int OIR_PRESENTATION_PAYPHONE = 4; // 0x4
+ field public static final int OIR_PRESENTATION_RESTRICTED = 1; // 0x1
+ field public static final int OIR_PRESENTATION_UNKNOWN = 3; // 0x3
+ field public static final int SERVICE_TYPE_EMERGENCY = 2; // 0x2
+ field public static final int SERVICE_TYPE_NONE = 0; // 0x0
+ field public static final int SERVICE_TYPE_NORMAL = 1; // 0x1
+ }
+
+ public class ImsCallSessionListener {
+ method public void callSessionConferenceExtendFailed(android.telephony.ims.ImsReasonInfo);
+ method public void callSessionConferenceExtendReceived(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile);
+ method public void callSessionConferenceExtended(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile);
+ method public void callSessionConferenceStateUpdated(android.telephony.ims.ImsConferenceState);
+ method public void callSessionHandover(int, int, android.telephony.ims.ImsReasonInfo);
+ method public void callSessionHandoverFailed(int, int, android.telephony.ims.ImsReasonInfo);
+ method public void callSessionHeld(android.telephony.ims.ImsCallProfile);
+ method public void callSessionHoldFailed(android.telephony.ims.ImsReasonInfo);
+ method public void callSessionHoldReceived(android.telephony.ims.ImsCallProfile);
+ method public void callSessionInitiated(android.telephony.ims.ImsCallProfile);
+ method public void callSessionInitiatedFailed(android.telephony.ims.ImsReasonInfo);
+ method public void callSessionInviteParticipantsRequestDelivered();
+ method public void callSessionInviteParticipantsRequestFailed(android.telephony.ims.ImsReasonInfo);
+ method public void callSessionMayHandover(int, int);
+ method public void callSessionMergeComplete(android.telephony.ims.stub.ImsCallSessionImplBase);
+ method public void callSessionMergeFailed(android.telephony.ims.ImsReasonInfo);
+ method public void callSessionMergeStarted(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile);
+ method public void callSessionMultipartyStateChanged(boolean);
+ method public void callSessionProgressing(android.telephony.ims.ImsStreamMediaProfile);
+ method public void callSessionRemoveParticipantsRequestDelivered();
+ method public void callSessionRemoveParticipantsRequestFailed(android.telephony.ims.ImsReasonInfo);
+ method public void callSessionResumeFailed(android.telephony.ims.ImsReasonInfo);
+ method public void callSessionResumeReceived(android.telephony.ims.ImsCallProfile);
+ method public void callSessionResumed(android.telephony.ims.ImsCallProfile);
+ method public void callSessionRttMessageReceived(java.lang.String);
+ method public void callSessionRttModifyRequestReceived(android.telephony.ims.ImsCallProfile);
+ method public void callSessionRttModifyResponseReceived(int);
+ method public void callSessionSuppServiceReceived(android.telephony.ims.ImsSuppServiceNotification);
+ method public void callSessionTerminated(android.telephony.ims.ImsReasonInfo);
+ method public void callSessionTtyModeReceived(int);
+ method public void callSessionUpdateFailed(android.telephony.ims.ImsReasonInfo);
+ method public void callSessionUpdateReceived(android.telephony.ims.ImsCallProfile);
+ method public void callSessionUpdated(android.telephony.ims.ImsCallProfile);
+ method public void callSessionUssdMessageReceived(int, java.lang.String);
+ }
+
+ public final class ImsConferenceState implements android.os.Parcelable {
+ method public int describeContents();
+ method public static int getConnectionStateForStatus(java.lang.String);
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsConferenceState> CREATOR;
+ field public static final java.lang.String DISPLAY_TEXT = "display-text";
+ field public static final java.lang.String ENDPOINT = "endpoint";
+ field public static final java.lang.String SIP_STATUS_CODE = "sipstatuscode";
+ field public static final java.lang.String STATUS = "status";
+ field public static final java.lang.String STATUS_ALERTING = "alerting";
+ field public static final java.lang.String STATUS_CONNECTED = "connected";
+ field public static final java.lang.String STATUS_CONNECT_FAIL = "connect-fail";
+ field public static final java.lang.String STATUS_DIALING_IN = "dialing-in";
+ field public static final java.lang.String STATUS_DIALING_OUT = "dialing-out";
+ field public static final java.lang.String STATUS_DISCONNECTED = "disconnected";
+ field public static final java.lang.String STATUS_DISCONNECTING = "disconnecting";
+ field public static final java.lang.String STATUS_MUTED_VIA_FOCUS = "muted-via-focus";
+ field public static final java.lang.String STATUS_ON_HOLD = "on-hold";
+ field public static final java.lang.String STATUS_PENDING = "pending";
+ field public static final java.lang.String STATUS_SEND_ONLY = "sendonly";
+ field public static final java.lang.String STATUS_SEND_RECV = "sendrecv";
+ field public static final java.lang.String USER = "user";
+ field public final java.util.HashMap<java.lang.String, android.os.Bundle> mParticipants;
+ }
+
+ public final class ImsExternalCallState implements android.os.Parcelable {
+ method public int describeContents();
+ method public android.net.Uri getAddress();
+ method public int getCallId();
+ method public int getCallState();
+ method public int getCallType();
+ method public boolean isCallHeld();
+ method public boolean isCallPullable();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int CALL_STATE_CONFIRMED = 1; // 0x1
+ field public static final int CALL_STATE_TERMINATED = 2; // 0x2
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsExternalCallState> CREATOR;
+ }
+
+ public final class ImsReasonInfo implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getCode();
+ method public int getExtraCode();
+ method public java.lang.String getExtraMessage();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int CODE_ACCESS_CLASS_BLOCKED = 1512; // 0x5e8
+ field public static final int CODE_ANSWERED_ELSEWHERE = 1014; // 0x3f6
+ field public static final int CODE_BLACKLISTED_CALL_ID = 506; // 0x1fa
+ field public static final int CODE_CALL_BARRED = 240; // 0xf0
+ field public static final int CODE_CALL_DROP_IWLAN_TO_LTE_UNAVAILABLE = 1100; // 0x44c
+ field public static final int CODE_CALL_END_CAUSE_CALL_PULL = 1016; // 0x3f8
+ field public static final int CODE_CALL_PULL_OUT_OF_SYNC = 1015; // 0x3f7
+ field public static final int CODE_DATA_DISABLED = 1406; // 0x57e
+ field public static final int CODE_DATA_LIMIT_REACHED = 1405; // 0x57d
+ field public static final int CODE_DIAL_MODIFIED_TO_DIAL = 246; // 0xf6
+ field public static final int CODE_DIAL_MODIFIED_TO_DIAL_VIDEO = 247; // 0xf7
+ field public static final int CODE_DIAL_MODIFIED_TO_SS = 245; // 0xf5
+ field public static final int CODE_DIAL_MODIFIED_TO_USSD = 244; // 0xf4
+ field public static final int CODE_DIAL_VIDEO_MODIFIED_TO_DIAL = 248; // 0xf8
+ field public static final int CODE_DIAL_VIDEO_MODIFIED_TO_DIAL_VIDEO = 249; // 0xf9
+ field public static final int CODE_DIAL_VIDEO_MODIFIED_TO_SS = 250; // 0xfa
+ field public static final int CODE_DIAL_VIDEO_MODIFIED_TO_USSD = 251; // 0xfb
+ field public static final int CODE_ECBM_NOT_SUPPORTED = 901; // 0x385
+ field public static final int CODE_EMERGENCY_PERM_FAILURE = 364; // 0x16c
+ field public static final int CODE_EMERGENCY_TEMP_FAILURE = 363; // 0x16b
+ field public static final int CODE_EPDG_TUNNEL_ESTABLISH_FAILURE = 1400; // 0x578
+ field public static final int CODE_EPDG_TUNNEL_LOST_CONNECTION = 1402; // 0x57a
+ field public static final int CODE_EPDG_TUNNEL_REKEY_FAILURE = 1401; // 0x579
+ field public static final int CODE_FDN_BLOCKED = 241; // 0xf1
+ field public static final int CODE_IKEV2_AUTH_FAILURE = 1408; // 0x580
+ field public static final int CODE_IMEI_NOT_ACCEPTED = 243; // 0xf3
+ field public static final int CODE_IWLAN_DPD_FAILURE = 1300; // 0x514
+ field public static final int CODE_LOCAL_CALL_BUSY = 142; // 0x8e
+ field public static final int CODE_LOCAL_CALL_CS_RETRY_REQUIRED = 146; // 0x92
+ field public static final int CODE_LOCAL_CALL_DECLINE = 143; // 0x8f
+ field public static final int CODE_LOCAL_CALL_EXCEEDED = 141; // 0x8d
+ field public static final int CODE_LOCAL_CALL_RESOURCE_RESERVATION_FAILED = 145; // 0x91
+ field public static final int CODE_LOCAL_CALL_TERMINATED = 148; // 0x94
+ field public static final int CODE_LOCAL_CALL_VCC_ON_PROGRESSING = 144; // 0x90
+ field public static final int CODE_LOCAL_CALL_VOLTE_RETRY_REQUIRED = 147; // 0x93
+ field public static final int CODE_LOCAL_ENDED_BY_CONFERENCE_MERGE = 108; // 0x6c
+ field public static final int CODE_LOCAL_HO_NOT_FEASIBLE = 149; // 0x95
+ field public static final int CODE_LOCAL_ILLEGAL_ARGUMENT = 101; // 0x65
+ field public static final int CODE_LOCAL_ILLEGAL_STATE = 102; // 0x66
+ field public static final int CODE_LOCAL_IMS_SERVICE_DOWN = 106; // 0x6a
+ field public static final int CODE_LOCAL_INTERNAL_ERROR = 103; // 0x67
+ field public static final int CODE_LOCAL_LOW_BATTERY = 112; // 0x70
+ field public static final int CODE_LOCAL_NETWORK_IP_CHANGED = 124; // 0x7c
+ field public static final int CODE_LOCAL_NETWORK_NO_LTE_COVERAGE = 122; // 0x7a
+ field public static final int CODE_LOCAL_NETWORK_NO_SERVICE = 121; // 0x79
+ field public static final int CODE_LOCAL_NETWORK_ROAMING = 123; // 0x7b
+ field public static final int CODE_LOCAL_NOT_REGISTERED = 132; // 0x84
+ field public static final int CODE_LOCAL_NO_PENDING_CALL = 107; // 0x6b
+ field public static final int CODE_LOCAL_POWER_OFF = 111; // 0x6f
+ field public static final int CODE_LOCAL_SERVICE_UNAVAILABLE = 131; // 0x83
+ field public static final int CODE_LOW_BATTERY = 505; // 0x1f9
+ field public static final int CODE_MAXIMUM_NUMBER_OF_CALLS_REACHED = 1403; // 0x57b
+ field public static final int CODE_MEDIA_INIT_FAILED = 401; // 0x191
+ field public static final int CODE_MEDIA_NOT_ACCEPTABLE = 403; // 0x193
+ field public static final int CODE_MEDIA_NO_DATA = 402; // 0x192
+ field public static final int CODE_MEDIA_UNSPECIFIED = 404; // 0x194
+ field public static final int CODE_MULTIENDPOINT_NOT_SUPPORTED = 902; // 0x386
+ field public static final int CODE_NETWORK_DETACH = 1513; // 0x5e9
+ field public static final int CODE_NETWORK_REJECT = 1504; // 0x5e0
+ field public static final int CODE_NETWORK_RESP_TIMEOUT = 1503; // 0x5df
+ field public static final int CODE_NO_VALID_SIM = 1501; // 0x5dd
+ field public static final int CODE_OEM_CAUSE_1 = 61441; // 0xf001
+ field public static final int CODE_OEM_CAUSE_10 = 61450; // 0xf00a
+ field public static final int CODE_OEM_CAUSE_11 = 61451; // 0xf00b
+ field public static final int CODE_OEM_CAUSE_12 = 61452; // 0xf00c
+ field public static final int CODE_OEM_CAUSE_13 = 61453; // 0xf00d
+ field public static final int CODE_OEM_CAUSE_14 = 61454; // 0xf00e
+ field public static final int CODE_OEM_CAUSE_15 = 61455; // 0xf00f
+ field public static final int CODE_OEM_CAUSE_2 = 61442; // 0xf002
+ field public static final int CODE_OEM_CAUSE_3 = 61443; // 0xf003
+ field public static final int CODE_OEM_CAUSE_4 = 61444; // 0xf004
+ field public static final int CODE_OEM_CAUSE_5 = 61445; // 0xf005
+ field public static final int CODE_OEM_CAUSE_6 = 61446; // 0xf006
+ field public static final int CODE_OEM_CAUSE_7 = 61447; // 0xf007
+ field public static final int CODE_OEM_CAUSE_8 = 61448; // 0xf008
+ field public static final int CODE_OEM_CAUSE_9 = 61449; // 0xf009
+ field public static final int CODE_RADIO_ACCESS_FAILURE = 1505; // 0x5e1
+ field public static final int CODE_RADIO_INTERNAL_ERROR = 1502; // 0x5de
+ field public static final int CODE_RADIO_LINK_FAILURE = 1506; // 0x5e2
+ field public static final int CODE_RADIO_LINK_LOST = 1507; // 0x5e3
+ field public static final int CODE_RADIO_OFF = 1500; // 0x5dc
+ field public static final int CODE_RADIO_RELEASE_ABNORMAL = 1511; // 0x5e7
+ field public static final int CODE_RADIO_RELEASE_NORMAL = 1510; // 0x5e6
+ field public static final int CODE_RADIO_SETUP_FAILURE = 1509; // 0x5e5
+ field public static final int CODE_RADIO_UPLINK_FAILURE = 1508; // 0x5e4
+ field public static final int CODE_REGISTRATION_ERROR = 1000; // 0x3e8
+ field public static final int CODE_REJECT_1X_COLLISION = 1603; // 0x643
+ field public static final int CODE_REJECT_CALL_ON_OTHER_SUB = 1602; // 0x642
+ field public static final int CODE_REJECT_CALL_TYPE_NOT_ALLOWED = 1605; // 0x645
+ field public static final int CODE_REJECT_CONFERENCE_TTY_NOT_ALLOWED = 1617; // 0x651
+ field public static final int CODE_REJECT_INTERNAL_ERROR = 1612; // 0x64c
+ field public static final int CODE_REJECT_MAX_CALL_LIMIT_REACHED = 1608; // 0x648
+ field public static final int CODE_REJECT_ONGOING_CALL_SETUP = 1607; // 0x647
+ field public static final int CODE_REJECT_ONGOING_CALL_TRANSFER = 1611; // 0x64b
+ field public static final int CODE_REJECT_ONGOING_CALL_UPGRADE = 1616; // 0x650
+ field public static final int CODE_REJECT_ONGOING_CALL_WAITING_DISABLED = 1601; // 0x641
+ field public static final int CODE_REJECT_ONGOING_CONFERENCE_CALL = 1618; // 0x652
+ field public static final int CODE_REJECT_ONGOING_CS_CALL = 1621; // 0x655
+ field public static final int CODE_REJECT_ONGOING_E911_CALL = 1606; // 0x646
+ field public static final int CODE_REJECT_ONGOING_ENCRYPTED_CALL = 1620; // 0x654
+ field public static final int CODE_REJECT_ONGOING_HANDOVER = 1614; // 0x64e
+ field public static final int CODE_REJECT_QOS_FAILURE = 1613; // 0x64d
+ field public static final int CODE_REJECT_SERVICE_NOT_REGISTERED = 1604; // 0x644
+ field public static final int CODE_REJECT_UNKNOWN = 1600; // 0x640
+ field public static final int CODE_REJECT_UNSUPPORTED_SDP_HEADERS = 1610; // 0x64a
+ field public static final int CODE_REJECT_UNSUPPORTED_SIP_HEADERS = 1609; // 0x649
+ field public static final int CODE_REJECT_VT_AVPF_NOT_ALLOWED = 1619; // 0x653
+ field public static final int CODE_REJECT_VT_TTY_NOT_ALLOWED = 1615; // 0x64f
+ field public static final int CODE_REMOTE_CALL_DECLINE = 1404; // 0x57c
+ field public static final int CODE_SIP_ALTERNATE_EMERGENCY_CALL = 1514; // 0x5ea
+ field public static final int CODE_SIP_BAD_ADDRESS = 337; // 0x151
+ field public static final int CODE_SIP_BAD_REQUEST = 331; // 0x14b
+ field public static final int CODE_SIP_BUSY = 338; // 0x152
+ field public static final int CODE_SIP_CLIENT_ERROR = 342; // 0x156
+ field public static final int CODE_SIP_FORBIDDEN = 332; // 0x14c
+ field public static final int CODE_SIP_GLOBAL_ERROR = 362; // 0x16a
+ field public static final int CODE_SIP_NOT_ACCEPTABLE = 340; // 0x154
+ field public static final int CODE_SIP_NOT_FOUND = 333; // 0x14d
+ field public static final int CODE_SIP_NOT_REACHABLE = 341; // 0x155
+ field public static final int CODE_SIP_NOT_SUPPORTED = 334; // 0x14e
+ field public static final int CODE_SIP_REDIRECTED = 321; // 0x141
+ field public static final int CODE_SIP_REQUEST_CANCELLED = 339; // 0x153
+ field public static final int CODE_SIP_REQUEST_TIMEOUT = 335; // 0x14f
+ field public static final int CODE_SIP_SERVER_ERROR = 354; // 0x162
+ field public static final int CODE_SIP_SERVER_INTERNAL_ERROR = 351; // 0x15f
+ field public static final int CODE_SIP_SERVER_TIMEOUT = 353; // 0x161
+ field public static final int CODE_SIP_SERVICE_UNAVAILABLE = 352; // 0x160
+ field public static final int CODE_SIP_TEMPRARILY_UNAVAILABLE = 336; // 0x150
+ field public static final int CODE_SIP_USER_REJECTED = 361; // 0x169
+ field public static final int CODE_SUPP_SVC_CANCELLED = 1202; // 0x4b2
+ field public static final int CODE_SUPP_SVC_FAILED = 1201; // 0x4b1
+ field public static final int CODE_SUPP_SVC_REINVITE_COLLISION = 1203; // 0x4b3
+ field public static final int CODE_TIMEOUT_1XX_WAITING = 201; // 0xc9
+ field public static final int CODE_TIMEOUT_NO_ANSWER = 202; // 0xca
+ field public static final int CODE_TIMEOUT_NO_ANSWER_CALL_UPDATE = 203; // 0xcb
+ field public static final int CODE_UNSPECIFIED = 0; // 0x0
+ field public static final int CODE_USER_DECLINE = 504; // 0x1f8
+ field public static final int CODE_USER_IGNORE = 503; // 0x1f7
+ field public static final int CODE_USER_NOANSWER = 502; // 0x1f6
+ field public static final int CODE_USER_TERMINATED = 501; // 0x1f5
+ field public static final int CODE_USER_TERMINATED_BY_REMOTE = 510; // 0x1fe
+ field public static final int CODE_UT_CB_PASSWORD_MISMATCH = 821; // 0x335
+ field public static final int CODE_UT_NETWORK_ERROR = 804; // 0x324
+ field public static final int CODE_UT_NOT_SUPPORTED = 801; // 0x321
+ field public static final int CODE_UT_OPERATION_NOT_ALLOWED = 803; // 0x323
+ field public static final int CODE_UT_SERVICE_UNAVAILABLE = 802; // 0x322
+ field public static final int CODE_UT_SS_MODIFIED_TO_DIAL = 822; // 0x336
+ field public static final int CODE_UT_SS_MODIFIED_TO_DIAL_VIDEO = 825; // 0x339
+ field public static final int CODE_UT_SS_MODIFIED_TO_SS = 824; // 0x338
+ field public static final int CODE_UT_SS_MODIFIED_TO_USSD = 823; // 0x337
+ field public static final int CODE_WIFI_LOST = 1407; // 0x57f
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsReasonInfo> CREATOR;
+ field public static final int EXTRA_CODE_CALL_RETRY_BY_SETTINGS = 3; // 0x3
+ field public static final int EXTRA_CODE_CALL_RETRY_NORMAL = 1; // 0x1
+ field public static final int EXTRA_CODE_CALL_RETRY_SILENT_REDIAL = 2; // 0x2
+ field public static final java.lang.String EXTRA_MSG_SERVICE_NOT_AUTHORIZED = "Forbidden. Not Authorized for Service";
+ }
+
public class ImsService extends android.app.Service {
ctor public ImsService();
+ method public android.telephony.ims.feature.MmTelFeature createMmTelFeature(int);
+ method public android.telephony.ims.feature.RcsFeature createRcsFeature(int);
+ method public void disableIms(int);
+ method public void enableIms(int);
+ method public android.telephony.ims.stub.ImsConfigImplBase getConfig(int);
+ method public android.telephony.ims.stub.ImsRegistrationImplBase getRegistration(int);
+ method public final void onUpdateSupportedImsFeatures(android.telephony.ims.stub.ImsFeatureConfiguration) throws android.os.RemoteException;
+ method public android.telephony.ims.stub.ImsFeatureConfiguration querySupportedImsFeatures();
+ method public void readyForFeatureCreation();
+ }
+
+ public final class ImsSsData implements android.os.Parcelable {
+ ctor public ImsSsData(int, int, int, int, int);
+ method public int describeContents();
+ method public boolean isTypeBarring();
+ method public boolean isTypeCf();
+ method public boolean isTypeClip();
+ method public boolean isTypeClir();
+ method public boolean isTypeColp();
+ method public boolean isTypeColr();
+ method public boolean isTypeCw();
+ method public boolean isTypeIcb();
+ method public boolean isTypeInterrogation();
+ method public boolean isTypeUnConditional();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSsData> CREATOR;
+ field public static final int SS_ACTIVATION = 0; // 0x0
+ field public static final int SS_ALL_BARRING = 18; // 0x12
+ field public static final int SS_ALL_DATA_TELESERVICES = 3; // 0x3
+ field public static final int SS_ALL_TELESERVICES_EXCEPT_SMS = 5; // 0x5
+ field public static final int SS_ALL_TELESEVICES = 1; // 0x1
+ field public static final int SS_ALL_TELE_AND_BEARER_SERVICES = 0; // 0x0
+ field public static final int SS_BAIC = 16; // 0x10
+ field public static final int SS_BAIC_ROAMING = 17; // 0x11
+ field public static final int SS_BAOC = 13; // 0xd
+ field public static final int SS_BAOIC = 14; // 0xe
+ field public static final int SS_BAOIC_EXC_HOME = 15; // 0xf
+ field public static final int SS_CFU = 0; // 0x0
+ field public static final int SS_CFUT = 6; // 0x6
+ field public static final int SS_CF_ALL = 4; // 0x4
+ field public static final int SS_CF_ALL_CONDITIONAL = 5; // 0x5
+ field public static final int SS_CF_BUSY = 1; // 0x1
+ field public static final int SS_CF_NOT_REACHABLE = 3; // 0x3
+ field public static final int SS_CF_NO_REPLY = 2; // 0x2
+ field public static final int SS_CLIP = 7; // 0x7
+ field public static final int SS_CLIR = 8; // 0x8
+ field public static final int SS_CNAP = 11; // 0xb
+ field public static final int SS_COLP = 9; // 0x9
+ field public static final int SS_COLR = 10; // 0xa
+ field public static final int SS_DEACTIVATION = 1; // 0x1
+ field public static final int SS_ERASURE = 4; // 0x4
+ field public static final int SS_INCOMING_BARRING = 20; // 0x14
+ field public static final int SS_INCOMING_BARRING_ANONYMOUS = 22; // 0x16
+ field public static final int SS_INCOMING_BARRING_DN = 21; // 0x15
+ field public static final int SS_INTERROGATION = 2; // 0x2
+ field public static final int SS_OUTGOING_BARRING = 19; // 0x13
+ field public static final int SS_REGISTRATION = 3; // 0x3
+ field public static final int SS_SMS_SERVICES = 4; // 0x4
+ field public static final int SS_TELEPHONY = 2; // 0x2
+ field public static final int SS_WAIT = 12; // 0xc
+ }
+
+ public final class ImsSsInfo implements android.os.Parcelable {
+ ctor public ImsSsInfo(int, java.lang.String);
+ method public int describeContents();
+ method public java.lang.String getIcbNum();
+ method public int getStatus();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSsInfo> CREATOR;
+ field public static final int DISABLED = 0; // 0x0
+ field public static final int ENABLED = 1; // 0x1
+ field public static final int NOT_REGISTERED = -1; // 0xffffffff
+ }
+
+ public final class ImsStreamMediaProfile implements android.os.Parcelable {
+ method public void copyFrom(android.telephony.ims.ImsStreamMediaProfile);
+ method public int describeContents();
+ method public int getAudioDirection();
+ method public int getAudioQuality();
+ method public int getRttMode();
+ method public int getVideoDirection();
+ method public int getVideoQuality();
+ method public boolean isRttCall();
+ method public void setRttMode(int);
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int AUDIO_QUALITY_AMR = 1; // 0x1
+ field public static final int AUDIO_QUALITY_AMR_WB = 2; // 0x2
+ field public static final int AUDIO_QUALITY_EVRC = 4; // 0x4
+ field public static final int AUDIO_QUALITY_EVRC_B = 5; // 0x5
+ field public static final int AUDIO_QUALITY_EVRC_NW = 7; // 0x7
+ field public static final int AUDIO_QUALITY_EVRC_WB = 6; // 0x6
+ field public static final int AUDIO_QUALITY_EVS_FB = 20; // 0x14
+ field public static final int AUDIO_QUALITY_EVS_NB = 17; // 0x11
+ field public static final int AUDIO_QUALITY_EVS_SWB = 19; // 0x13
+ field public static final int AUDIO_QUALITY_EVS_WB = 18; // 0x12
+ field public static final int AUDIO_QUALITY_G711A = 13; // 0xd
+ field public static final int AUDIO_QUALITY_G711AB = 15; // 0xf
+ field public static final int AUDIO_QUALITY_G711U = 11; // 0xb
+ field public static final int AUDIO_QUALITY_G722 = 14; // 0xe
+ field public static final int AUDIO_QUALITY_G723 = 12; // 0xc
+ field public static final int AUDIO_QUALITY_G729 = 16; // 0x10
+ field public static final int AUDIO_QUALITY_GSM_EFR = 8; // 0x8
+ field public static final int AUDIO_QUALITY_GSM_FR = 9; // 0x9
+ field public static final int AUDIO_QUALITY_GSM_HR = 10; // 0xa
+ field public static final int AUDIO_QUALITY_NONE = 0; // 0x0
+ field public static final int AUDIO_QUALITY_QCELP13K = 3; // 0x3
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsStreamMediaProfile> CREATOR;
+ field public static final int DIRECTION_INACTIVE = 0; // 0x0
+ field public static final int DIRECTION_INVALID = -1; // 0xffffffff
+ field public static final int DIRECTION_RECEIVE = 1; // 0x1
+ field public static final int DIRECTION_SEND = 2; // 0x2
+ field public static final int DIRECTION_SEND_RECEIVE = 3; // 0x3
+ field public static final int RTT_MODE_DISABLED = 0; // 0x0
+ field public static final int RTT_MODE_FULL = 1; // 0x1
+ field public static final int VIDEO_QUALITY_NONE = 0; // 0x0
+ field public static final int VIDEO_QUALITY_QCIF = 1; // 0x1
+ field public static final int VIDEO_QUALITY_QVGA_LANDSCAPE = 2; // 0x2
+ field public static final int VIDEO_QUALITY_QVGA_PORTRAIT = 4; // 0x4
+ field public static final int VIDEO_QUALITY_VGA_LANDSCAPE = 8; // 0x8
+ field public static final int VIDEO_QUALITY_VGA_PORTRAIT = 16; // 0x10
+ }
+
+ public final class ImsSuppServiceNotification implements android.os.Parcelable {
+ ctor public ImsSuppServiceNotification(int, int, int, int, java.lang.String, java.lang.String[]);
+ method public int describeContents();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSuppServiceNotification> CREATOR;
+ field public final int code;
+ field public final java.lang.String[] history;
+ field public final int index;
+ field public final int notificationType;
+ field public final java.lang.String number;
+ field public final int type;
+ }
+
+ public class ImsUtListener {
+ method public void onSupplementaryServiceIndication(android.telephony.ims.ImsSsData);
+ method public void onUtConfigurationCallBarringQueried(int, android.telephony.ims.ImsSsInfo[]);
+ method public void onUtConfigurationCallForwardQueried(int, android.telephony.ims.ImsCallForwardInfo[]);
+ method public void onUtConfigurationCallWaitingQueried(int, android.telephony.ims.ImsSsInfo[]);
+ method public void onUtConfigurationQueried(int, android.os.Bundle);
+ method public void onUtConfigurationQueryFailed(int, android.telephony.ims.ImsReasonInfo);
+ method public void onUtConfigurationUpdateFailed(int, android.telephony.ims.ImsReasonInfo);
+ method public void onUtConfigurationUpdated(int);
+ }
+
+ public abstract class ImsVideoCallProvider {
+ ctor public ImsVideoCallProvider();
+ method public void changeCallDataUsage(long);
+ method public void changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities);
+ method public void changePeerDimensions(int, int);
+ method public void changeVideoQuality(int);
+ method public void handleCallSessionEvent(int);
+ method public abstract void onRequestCallDataUsage();
+ method public abstract void onRequestCameraCapabilities();
+ method public abstract void onSendSessionModifyRequest(android.telecom.VideoProfile, android.telecom.VideoProfile);
+ method public abstract void onSendSessionModifyResponse(android.telecom.VideoProfile);
+ method public abstract void onSetCamera(java.lang.String);
+ method public void onSetCamera(java.lang.String, int);
+ method public abstract void onSetDeviceOrientation(int);
+ method public abstract void onSetDisplaySurface(android.view.Surface);
+ method public abstract void onSetPauseImage(android.net.Uri);
+ method public abstract void onSetPreviewSurface(android.view.Surface);
+ method public abstract void onSetZoom(float);
+ method public void receiveSessionModifyRequest(android.telecom.VideoProfile);
+ method public void receiveSessionModifyResponse(int, android.telecom.VideoProfile, android.telecom.VideoProfile);
+ }
+
+}
+
+package android.telephony.ims.feature {
+
+ public final class CapabilityChangeRequest implements android.os.Parcelable {
+ method public void addCapabilitiesToDisableForTech(int, int);
+ method public void addCapabilitiesToEnableForTech(int, int);
+ method public int describeContents();
+ method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToDisable();
+ method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToEnable();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.feature.CapabilityChangeRequest> CREATOR;
+ }
+
+ public static class CapabilityChangeRequest.CapabilityPair {
+ ctor public CapabilityChangeRequest.CapabilityPair(int, int);
+ method public int getCapability();
+ method public int getRadioTech();
+ }
+
+ public abstract class ImsFeature {
+ ctor public ImsFeature();
+ method public abstract void changeEnabledCapabilities(android.telephony.ims.feature.CapabilityChangeRequest, android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy);
+ method public abstract void onFeatureReady();
+ method public abstract void onFeatureRemoved();
+ method public final void setFeatureState(int);
+ field public static final int CAPABILITY_ERROR_GENERIC = -1; // 0xffffffff
+ field public static final int CAPABILITY_SUCCESS = 0; // 0x0
+ field public static final int FEATURE_EMERGENCY_MMTEL = 0; // 0x0
+ field public static final int FEATURE_MMTEL = 1; // 0x1
+ field public static final int FEATURE_RCS = 2; // 0x2
+ field public static final int STATE_INITIALIZING = 1; // 0x1
+ field public static final int STATE_READY = 2; // 0x2
+ field public static final int STATE_UNAVAILABLE = 0; // 0x0
+ }
+
+ protected static class ImsFeature.CapabilityCallbackProxy {
+ method public void onChangeCapabilityConfigurationError(int, int, int);
+ }
+
+ public class MmTelFeature extends android.telephony.ims.feature.ImsFeature {
+ ctor public MmTelFeature();
+ method public void changeEnabledCapabilities(android.telephony.ims.feature.CapabilityChangeRequest, android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy);
+ method public android.telephony.ims.ImsCallProfile createCallProfile(int, int);
+ method public android.telephony.ims.stub.ImsCallSessionImplBase createCallSession(android.telephony.ims.ImsCallProfile);
+ method public android.telephony.ims.stub.ImsEcbmImplBase getEcbm();
+ method public android.telephony.ims.stub.ImsMultiEndpointImplBase getMultiEndpoint();
+ method public android.telephony.ims.stub.ImsSmsImplBase getSmsImplementation();
+ method public android.telephony.ims.stub.ImsUtImplBase getUt();
+ method public final void notifyCapabilitiesStatusChanged(android.telephony.ims.feature.MmTelFeature.MmTelCapabilities);
+ method public final void notifyIncomingCall(android.telephony.ims.stub.ImsCallSessionImplBase, android.os.Bundle);
+ method public final void notifyRejectedCall(android.telephony.ims.ImsCallProfile, android.telephony.ims.ImsReasonInfo);
+ method public final void notifyVoiceMessageCountUpdate(int);
+ method public void onFeatureReady();
+ method public void onFeatureRemoved();
+ method public boolean queryCapabilityConfiguration(int, int);
+ method public final android.telephony.ims.feature.MmTelFeature.MmTelCapabilities queryCapabilityStatus();
+ method public void setUiTtyMode(int, android.os.Message);
+ method public int shouldProcessCall(java.lang.String[]);
+ field public static final int PROCESS_CALL_CSFB = 1; // 0x1
+ field public static final int PROCESS_CALL_IMS = 0; // 0x0
+ }
+
+ public static class MmTelFeature.MmTelCapabilities {
+ ctor public MmTelFeature.MmTelCapabilities(android.telephony.ims.feature.ImsFeature.Capabilities);
+ ctor public MmTelFeature.MmTelCapabilities(int);
+ method public final void addCapabilities(int);
+ method public final boolean isCapable(int);
+ method public final void removeCapabilities(int);
+ field public static final int CAPABILITY_TYPE_SMS = 8; // 0x8
+ field public static final int CAPABILITY_TYPE_UT = 4; // 0x4
+ field public static final int CAPABILITY_TYPE_VIDEO = 2; // 0x2
+ field public static final int CAPABILITY_TYPE_VOICE = 1; // 0x1
+ }
+
+ public static abstract class MmTelFeature.MmTelCapabilities.MmTelCapability implements java.lang.annotation.Annotation {
+ }
+
+ public static abstract class MmTelFeature.ProcessCallResult implements java.lang.annotation.Annotation {
+ }
+
+ public class RcsFeature extends android.telephony.ims.feature.ImsFeature {
+ ctor public RcsFeature();
+ method public void changeEnabledCapabilities(android.telephony.ims.feature.CapabilityChangeRequest, android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy);
+ method public void onFeatureReady();
+ method public void onFeatureRemoved();
+ }
+
+}
+
+package android.telephony.ims.stub {
+
+ public class ImsCallSessionImplBase implements java.lang.AutoCloseable {
+ ctor public ImsCallSessionImplBase();
+ method public void accept(int, android.telephony.ims.ImsStreamMediaProfile);
+ method public void close();
+ method public void deflect(java.lang.String);
+ method public void extendToConference(java.lang.String[]);
+ method public java.lang.String getCallId();
+ method public android.telephony.ims.ImsCallProfile getCallProfile();
+ method public android.telephony.ims.ImsVideoCallProvider getImsVideoCallProvider();
+ method public android.telephony.ims.ImsCallProfile getLocalCallProfile();
+ method public java.lang.String getProperty(java.lang.String);
+ method public android.telephony.ims.ImsCallProfile getRemoteCallProfile();
+ method public int getState();
+ method public void hold(android.telephony.ims.ImsStreamMediaProfile);
+ method public void inviteParticipants(java.lang.String[]);
+ method public boolean isInCall();
+ method public boolean isMultiparty();
+ method public void merge();
+ method public void reject(int);
+ method public void removeParticipants(java.lang.String[]);
+ method public void resume(android.telephony.ims.ImsStreamMediaProfile);
+ method public void sendDtmf(char, android.os.Message);
+ method public void sendRttMessage(java.lang.String);
+ method public void sendRttModifyRequest(android.telephony.ims.ImsCallProfile);
+ method public void sendRttModifyResponse(boolean);
+ method public void sendUssd(java.lang.String);
+ method public void setListener(android.telephony.ims.ImsCallSessionListener);
+ method public void setMute(boolean);
+ method public void start(java.lang.String, android.telephony.ims.ImsCallProfile);
+ method public void startConference(java.lang.String[], android.telephony.ims.ImsCallProfile);
+ method public void startDtmf(char);
+ method public void stopDtmf();
+ method public void terminate(int);
+ method public void update(int, android.telephony.ims.ImsStreamMediaProfile);
+ field public static final int USSD_MODE_NOTIFY = 0; // 0x0
+ field public static final int USSD_MODE_REQUEST = 1; // 0x1
+ }
+
+ public static class ImsCallSessionImplBase.State {
+ method public static java.lang.String toString(int);
+ field public static final int ESTABLISHED = 4; // 0x4
+ field public static final int ESTABLISHING = 3; // 0x3
+ field public static final int IDLE = 0; // 0x0
+ field public static final int INITIATED = 1; // 0x1
+ field public static final int INVALID = -1; // 0xffffffff
+ field public static final int NEGOTIATING = 2; // 0x2
+ field public static final int REESTABLISHING = 6; // 0x6
+ field public static final int RENEGOTIATING = 5; // 0x5
+ field public static final int TERMINATED = 8; // 0x8
+ field public static final int TERMINATING = 7; // 0x7
+ }
+
+ public class ImsConfigImplBase {
+ ctor public ImsConfigImplBase();
+ method public int getConfigInt(int);
+ method public java.lang.String getConfigString(int);
+ method public final void notifyProvisionedValueChanged(int, int);
+ method public final void notifyProvisionedValueChanged(int, java.lang.String);
+ method public int setConfig(int, int);
+ method public int setConfig(int, java.lang.String);
+ field public static final int CONFIG_RESULT_FAILED = 1; // 0x1
+ field public static final int CONFIG_RESULT_SUCCESS = 0; // 0x0
+ field public static final int CONFIG_RESULT_UNKNOWN = -1; // 0xffffffff
+ }
+
+ public class ImsEcbmImplBase {
+ ctor public ImsEcbmImplBase();
+ method public final void enteredEcbm();
+ method public void exitEmergencyCallbackMode();
+ method public final void exitedEcbm();
+ }
+
+ public final class ImsFeatureConfiguration implements android.os.Parcelable {
+ method public int describeContents();
+ method public java.util.Set<android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair> getServiceFeatures();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.ims.stub.ImsFeatureConfiguration> CREATOR;
+ }
+
+ public static class ImsFeatureConfiguration.Builder {
+ ctor public ImsFeatureConfiguration.Builder();
+ method public android.telephony.ims.stub.ImsFeatureConfiguration.Builder addFeature(int, int);
+ method public android.telephony.ims.stub.ImsFeatureConfiguration build();
+ }
+
+ public static final class ImsFeatureConfiguration.FeatureSlotPair {
+ ctor public ImsFeatureConfiguration.FeatureSlotPair(int, int);
+ field public final int featureType;
+ field public final int slotId;
+ }
+
+ public class ImsMultiEndpointImplBase {
+ ctor public ImsMultiEndpointImplBase();
+ method public final void onImsExternalCallStateUpdate(java.util.List<android.telephony.ims.ImsExternalCallState>);
+ method public void requestImsExternalCallStateInfo();
+ }
+
+ public class ImsRegistrationImplBase {
+ ctor public ImsRegistrationImplBase();
+ method public final void onDeregistered(android.telephony.ims.ImsReasonInfo);
+ method public final void onRegistered(int);
+ method public final void onRegistering(int);
+ method public final void onSubscriberAssociatedUriChanged(android.net.Uri[]);
+ method public final void onTechnologyChangeFailed(int, android.telephony.ims.ImsReasonInfo);
+ field public static final int REGISTRATION_TECH_IWLAN = 1; // 0x1
+ field public static final int REGISTRATION_TECH_LTE = 0; // 0x0
+ field public static final int REGISTRATION_TECH_NONE = -1; // 0xffffffff
+ }
+
+ public class ImsSmsImplBase {
+ ctor public ImsSmsImplBase();
+ method public void acknowledgeSms(int, int, int);
+ method public void acknowledgeSmsReport(int, int, int);
+ method public java.lang.String getSmsFormat();
+ method public void onReady();
+ method public final void onSendSmsResult(int, int, int, int) throws java.lang.RuntimeException;
+ method public final void onSmsReceived(int, java.lang.String, byte[]) throws java.lang.RuntimeException;
+ method public final void onSmsStatusReportReceived(int, int, java.lang.String, byte[]) throws java.lang.RuntimeException;
+ method public void sendSms(int, int, java.lang.String, java.lang.String, boolean, byte[]);
+ field public static final int DELIVER_STATUS_ERROR_GENERIC = 2; // 0x2
+ field public static final int DELIVER_STATUS_ERROR_NO_MEMORY = 3; // 0x3
+ field public static final int DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED = 4; // 0x4
+ field public static final int DELIVER_STATUS_OK = 1; // 0x1
+ field public static final int SEND_STATUS_ERROR = 2; // 0x2
+ field public static final int SEND_STATUS_ERROR_FALLBACK = 4; // 0x4
+ field public static final int SEND_STATUS_ERROR_RETRY = 3; // 0x3
+ field public static final int SEND_STATUS_OK = 1; // 0x1
+ field public static final int STATUS_REPORT_STATUS_ERROR = 2; // 0x2
+ field public static final int STATUS_REPORT_STATUS_OK = 1; // 0x1
+ }
+
+ public class ImsUtImplBase {
+ ctor public ImsUtImplBase();
+ method public void close();
+ method public int queryCallBarring(int);
+ method public int queryCallBarringForServiceClass(int, int);
+ method public int queryCallForward(int, java.lang.String);
+ method public int queryCallWaiting();
+ method public int queryClip();
+ method public int queryClir();
+ method public int queryColp();
+ method public int queryColr();
+ method public void setListener(android.telephony.ims.ImsUtListener);
+ method public int transact(android.os.Bundle);
+ method public int updateCallBarring(int, int, java.lang.String[]);
+ method public int updateCallBarringForServiceClass(int, int, java.lang.String[], int);
+ method public int updateCallForward(int, int, java.lang.String, int, int);
+ method public int updateCallWaiting(boolean, int);
+ method public int updateClip(boolean);
+ method public int updateClir(int);
+ method public int updateColp(boolean);
+ method public int updateColr(int);
}
}
package android.telephony.mbms {
- public final class DownloadRequest implements android.os.Parcelable {
- method public byte[] getOpaqueData();
- }
-
public static class DownloadRequest.Builder {
- method public android.telephony.mbms.DownloadRequest.Builder setOpaqueData(byte[]);
method public android.telephony.mbms.DownloadRequest.Builder setServiceId(java.lang.String);
}
@@ -4239,18 +5507,20 @@
public class MbmsDownloadServiceBase extends android.os.Binder {
ctor public MbmsDownloadServiceBase();
+ method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
+ method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
method public void dispose(int) throws android.os.RemoteException;
method public int download(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
- method public int getDownloadStatus(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo) throws android.os.RemoteException;
method public int initialize(int, android.telephony.mbms.MbmsDownloadSessionCallback) throws android.os.RemoteException;
method public java.util.List<android.telephony.mbms.DownloadRequest> listPendingDownloads(int) throws android.os.RemoteException;
method public void onAppCallbackDied(int, int);
- method public int registerStateCallback(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStateCallback) throws android.os.RemoteException;
+ method public int removeProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
+ method public int removeStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
+ method public int requestDownloadState(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo) throws android.os.RemoteException;
method public int requestUpdateFileServices(int, java.util.List<java.lang.String>) throws android.os.RemoteException;
method public int resetDownloadKnowledge(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
method public int setTempFileRootDirectory(int, java.lang.String) throws android.os.RemoteException;
- method public int unregisterStateCallback(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStateCallback) throws android.os.RemoteException;
}
public class MbmsStreamingServiceBase extends android.os.Binder {
diff --git a/api/test-current.txt b/api/test-current.txt
index 75ff437..24c22df 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -253,6 +253,11 @@
field public static final int INVALID_SECURITY_PARAMETER_INDEX = 0; // 0x0
}
+ public final class NetworkCapabilities implements android.os.Parcelable {
+ method public int[] getCapabilities();
+ method public int[] getTransportTypes();
+ }
+
public class TrafficStats {
method public static long getLoopbackRxBytes();
method public static long getLoopbackRxPackets();
@@ -428,26 +433,8 @@
package android.telecom {
- public abstract class Connection extends android.telecom.Conferenceable {
- method public void handleRttUpgradeResponse(android.telecom.Connection.RttTextStream);
- method public void onStartRtt(android.telecom.Connection.RttTextStream);
- method public void onStopRtt();
- method public final void sendRemoteRttRequest();
- method public final void sendRttInitiationFailure(int);
- method public final void sendRttInitiationSuccess();
- method public final void sendRttSessionRemotelyTerminated();
- field public static final int PROPERTY_IS_RTT = 256; // 0x100
- }
-
- public static final class Connection.RttTextStream {
- method public java.lang.String read() throws java.io.IOException;
- method public java.lang.String readImmediately() throws java.io.IOException;
- method public void write(java.lang.String) throws java.io.IOException;
- }
-
- public final class ConnectionRequest implements android.os.Parcelable {
- method public android.telecom.Connection.RttTextStream getRttTextStream();
- method public boolean isRequestingRtt();
+ public final class CallAudioState implements android.os.Parcelable {
+ ctor public CallAudioState(boolean, int, int, android.bluetooth.BluetoothDevice, java.util.Collection<android.bluetooth.BluetoothDevice>);
}
}
@@ -462,10 +449,24 @@
field public static final java.lang.String MBMS_STREAMING_SERVICE_OVERRIDE_METADATA = "mbms-streaming-service-override";
}
+ public class ServiceState implements android.os.Parcelable {
+ method public void setCdmaSystemAndNetworkId(int, int);
+ }
+
+ public class TelephonyManager {
+ method public int getCarrierIdListVersion();
+ method public void setCarrierTestOverride(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
+ field public static final int UNKNOWN_CARRIER_ID_LIST_VERSION = -1; // 0xffffffff
+ }
+
}
package android.telephony.mbms {
+ public static class DownloadRequest.Builder {
+ method public android.telephony.mbms.DownloadRequest.Builder setServiceId(java.lang.String);
+ }
+
public final class FileInfo implements android.os.Parcelable {
ctor public FileInfo(android.net.Uri, java.lang.String);
}
@@ -492,18 +493,20 @@
public class MbmsDownloadServiceBase extends android.os.Binder {
ctor public MbmsDownloadServiceBase();
+ method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
+ method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
method public void dispose(int) throws android.os.RemoteException;
method public int download(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
- method public int getDownloadStatus(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo) throws android.os.RemoteException;
method public int initialize(int, android.telephony.mbms.MbmsDownloadSessionCallback) throws android.os.RemoteException;
method public java.util.List<android.telephony.mbms.DownloadRequest> listPendingDownloads(int) throws android.os.RemoteException;
method public void onAppCallbackDied(int, int);
- method public int registerStateCallback(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStateCallback) throws android.os.RemoteException;
+ method public int removeProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
+ method public int removeStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
+ method public int requestDownloadState(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo) throws android.os.RemoteException;
method public int requestUpdateFileServices(int, java.util.List<java.lang.String>) throws android.os.RemoteException;
method public int resetDownloadKnowledge(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
method public int setTempFileRootDirectory(int, java.lang.String) throws android.os.RemoteException;
- method public int unregisterStateCallback(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStateCallback) throws android.os.RemoteException;
}
public class MbmsStreamingServiceBase extends android.os.Binder {
@@ -745,8 +748,8 @@
}
public final class MotionEvent extends android.view.InputEvent implements android.os.Parcelable {
- method public final void setActionButton(int);
- method public final void setButtonState(int);
+ method public void setActionButton(int);
+ method public void setButtonState(int);
}
public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index ab075ee..238cb65 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -167,6 +167,8 @@
} else if (opt.equals("--no_window_animation")
|| opt.equals("--no-window-animation")) {
instrument.noWindowAnimation = true;
+ } else if (opt.equals("--no-hidden-api-checks")) {
+ instrument.disableHiddenApiChecks = true;
} else if (opt.equals("--user")) {
instrument.userId = parseUserArg(nextArgRequired());
} else if (opt.equals("--abi")) {
diff --git a/cmds/am/src/com/android/commands/am/Instrument.java b/cmds/am/src/com/android/commands/am/Instrument.java
index b69ef1c..432e890 100644
--- a/cmds/am/src/com/android/commands/am/Instrument.java
+++ b/cmds/am/src/com/android/commands/am/Instrument.java
@@ -52,12 +52,17 @@
public boolean rawMode = false;
public boolean proto = false;
public boolean noWindowAnimation = false;
+ public boolean disableHiddenApiChecks = false;
public String abi = null;
public int userId = UserHandle.USER_CURRENT;
public Bundle args = new Bundle();
// Required
public String componentNameArg;
+ // Disable hidden API checks for the newly started instrumentation.
+ // Must be kept in sync with ActivityManagerService.
+ private static final int INSTRUMENTATION_FLAG_DISABLE_HIDDEN_API_CHECKS = 1 << 0;
+
/**
* Construct the instrument command runner.
*/
@@ -416,7 +421,8 @@
}
// Start the instrumentation
- if (!mAm.startInstrumentation(cn, profileFile, 0, args, watcher, connection, userId,
+ int flags = disableHiddenApiChecks ? INSTRUMENTATION_FLAG_DISABLE_HIDDEN_API_CHECKS : 0;
+ if (!mAm.startInstrumentation(cn, profileFile, flags, args, watcher, connection, userId,
abi)) {
throw new AndroidException("INSTRUMENTATION_FAILED: " + cn.flattenToString());
}
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index 1671337..12083b6 100644
--- a/cmds/app_process/app_main.cpp
+++ b/cmds/app_process/app_main.cpp
@@ -13,6 +13,7 @@
#include <sys/stat.h>
#include <unistd.h>
+#include <android-base/macros.h>
#include <binder/IPCThreadState.h>
#include <hwbinder/IPCThreadState.h>
#include <utils/Log.h>
@@ -137,27 +138,12 @@
}
static void maybeCreateDalvikCache() {
-#if defined(__aarch64__)
- static const char kInstructionSet[] = "arm64";
-#elif defined(__x86_64__)
- static const char kInstructionSet[] = "x86_64";
-#elif defined(__arm__)
- static const char kInstructionSet[] = "arm";
-#elif defined(__i386__)
- static const char kInstructionSet[] = "x86";
-#elif defined (__mips__) && !defined(__LP64__)
- static const char kInstructionSet[] = "mips";
-#elif defined (__mips__) && defined(__LP64__)
- static const char kInstructionSet[] = "mips64";
-#else
-#error "Unknown instruction set"
-#endif
const char* androidRoot = getenv("ANDROID_DATA");
LOG_ALWAYS_FATAL_IF(androidRoot == NULL, "ANDROID_DATA environment variable unset");
char dalvikCacheDir[PATH_MAX];
const int numChars = snprintf(dalvikCacheDir, PATH_MAX,
- "%s/dalvik-cache/%s", androidRoot, kInstructionSet);
+ "%s/dalvik-cache/" ABI_STRING, androidRoot);
LOG_ALWAYS_FATAL_IF((numChars >= PATH_MAX || numChars < 0),
"Error constructing dalvik cache : %s", strerror(errno));
diff --git a/cmds/backup/Android.bp b/cmds/backup/Android.bp
new file mode 100644
index 0000000..287c23b
--- /dev/null
+++ b/cmds/backup/Android.bp
@@ -0,0 +1,20 @@
+// Copyright 2009 The Android Open Source Project
+
+cc_binary {
+ name: "btool",
+
+ srcs: ["backup.cpp"],
+
+ shared_libs: [
+ "libcutils",
+ "libutils",
+ "libandroidfw",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+}
diff --git a/cmds/backup/Android.mk b/cmds/backup/Android.mk
deleted file mode 100644
index 8e1508c..0000000
--- a/cmds/backup/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 2009 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= backup.cpp
-
-LOCAL_SHARED_LIBRARIES := libcutils libutils libandroidfw
-
-LOCAL_MODULE:= btool
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-include $(BUILD_EXECUTABLE)
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 6526123..78a2d4a6 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -29,11 +29,11 @@
#include <signal.h>
#include <time.h>
+#include <cutils/atomic.h>
#include <cutils/properties.h>
#include <androidfw/AssetManager.h>
#include <binder/IPCThreadState.h>
-#include <utils/Atomic.h>
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/SystemClock.h>
diff --git a/cmds/idmap/Android.bp b/cmds/idmap/Android.bp
new file mode 100644
index 0000000..ae5d74a
--- /dev/null
+++ b/cmds/idmap/Android.bp
@@ -0,0 +1,38 @@
+// 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.
+
+cc_binary {
+ name: "idmap",
+
+ srcs: [
+ "idmap.cpp",
+ "create.cpp",
+ "scan.cpp",
+ "inspect.cpp",
+ ],
+
+ shared_libs: [
+ "liblog",
+ "libutils",
+ "libandroidfw",
+ "libcutils",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+}
diff --git a/cmds/uiautomator/library/Android.bp b/cmds/uiautomator/library/Android.bp
new file mode 100644
index 0000000..1ae19b8
--- /dev/null
+++ b/cmds/uiautomator/library/Android.bp
@@ -0,0 +1,59 @@
+// 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.
+
+droiddoc {
+ name: "uiautomator-stubs-docs",
+ srcs: [
+ "core-src/**/*.java",
+ "testrunner-src/**/*.java",
+ ],
+ libs: [
+ "android.test.runner",
+ "junit",
+ "legacy-android-test",
+ ],
+ custom_template: "droiddoc-templates-sdk",
+ installable: false,
+ args: "-stubpackages com.android.uiautomator.core:" +
+ "com.android.uiautomator.testrunner",
+ api_tag_name: "UIAUTOMATOR",
+ api_filename: "uiautomator_api.txt",
+ removed_api_filename: "uiautomator_removed_api.txt",
+}
+
+java_library_static {
+ name: "android_uiautomator",
+ srcs: [
+ ":uiautomator-stubs-docs",
+ ],
+ libs: [
+ "android.test.runner",
+ "junit",
+ ],
+}
+
+java_library_static {
+ name: "uiautomator.core",
+ srcs: [
+ "core-src/**/*.java",
+ "testrunner-src/**/*.java",
+ ],
+ libs: [
+ "android.test.runner",
+ ],
+ static_libs: [
+ "junit",
+ "legacy-android-test",
+ ]
+}
diff --git a/cmds/uiautomator/library/Android.mk b/cmds/uiautomator/library/Android.mk
index 4bf856f..5ca201c 100644
--- a/cmds/uiautomator/library/Android.mk
+++ b/cmds/uiautomator/library/Android.mk
@@ -16,58 +16,6 @@
LOCAL_PATH:= $(call my-dir)
-uiautomator.core_src_files := $(call all-java-files-under, core-src) \
- $(call all-java-files-under, testrunner-src)
-uiautomator.core_java_libraries := android.test.runner junit
-
-uiautomator_internal_api_file := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/uiautomator_api.txt
-uiautomator_internal_removed_api_file := \
- $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/uiautomator_removed_api.txt
-
-###############################################
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(uiautomator.core_src_files)
-LOCAL_MODULE := uiautomator.core
-LOCAL_JAVA_LIBRARIES := android.test.runner
-LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-###############################################
-# Generate the stub source files
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(uiautomator.core_src_files)
-LOCAL_JAVA_LIBRARIES := $(uiautomator.core_java_libraries) legacy-android-test
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/core-src \
- $(LOCAL_PATH)/testrunner-src
-LOCAL_DROIDDOC_HTML_DIR :=
-
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_uiautomator_intermediates/src
-
-LOCAL_DROIDDOC_OPTIONS:= \
- -stubpackages com.android.uiautomator.core:com.android.uiautomator.testrunner \
- -api $(uiautomator_internal_api_file) \
- -removedApi $(uiautomator_internal_removed_api_file)
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := external/doclava/res/assets/templates-sdk
-LOCAL_UNINSTALLABLE_MODULE := true
-
-LOCAL_MODULE := uiautomator-stubs
-
-include $(BUILD_DROIDDOC)
-uiautomator_stubs_stamp := $(full_target)
-$(uiautomator_internal_api_file) : $(full_target)
-
-###############################################
-# Build the stub source files into a jar.
-include $(CLEAR_VARS)
-LOCAL_MODULE := android_uiautomator
-LOCAL_JAVA_LIBRARIES := $(uiautomator.core_java_libraries)
-LOCAL_SOURCE_FILES_ALL_GENERATED := true
-# Make sure to run droiddoc first to generate the stub source files.
-LOCAL_ADDITIONAL_DEPENDENCIES := $(uiautomator_stubs_stamp)
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
###############################################
# API check
# Please refer to build/core/tasks/apicheck.mk.
@@ -86,13 +34,13 @@
$(eval $(call check-api, \
uiautomator-checkapi-last, \
$(uiautomator_api_dir)/$(last_released_sdk_version).txt, \
- $(uiautomator_internal_api_file), \
+ $(INTERNAL_PLATFORM_UIAUTOMATOR_API_FILE), \
$(uiautomator_api_dir)/removed.txt, \
- $(uiautomator_internal_removed_api_file), \
+ $(INTERNAL_PLATFORM_UIAUTOMATOR_REMOVED_API_FILE), \
$(checkapi_last_error_level_flags), \
cat $(LOCAL_PATH)/apicheck_msg_last.txt, \
uiautomator.core, \
- $(uiautomator_stubs_stamp)))
+ $(OUT_DOCS)/uiautomator-stubs-docs-stubs.srcjar))
checkapi_current_error_level_flags := \
-error 2 -error 3 -error 4 -error 5 -error 6 \
@@ -105,28 +53,24 @@
$(eval $(call check-api, \
uiautomator-checkapi-current, \
$(uiautomator_api_dir)/current.txt, \
- $(uiautomator_internal_api_file), \
+ $(INTERNAL_PLATFORM_UIAUTOMATOR_API_FILE), \
$(uiautomator_api_dir)/removed.txt, \
- $(uiautomator_internal_removed_api_file), \
+ $(INTERNAL_PLATFORM_UIAUTOMATOR_REMOVED_API_FILE), \
$(checkapi_current_error_level_flags), \
cat $(LOCAL_PATH)/apicheck_msg_current.txt, \
uiautomator.core, \
- $(uiautomator_stubs_stamp)))
+ $(OUT_DOCS)/uiautomator-stubs-docs-stubs.srcjar))
.PHONY: update-uiautomator-api
update-uiautomator-api: PRIVATE_API_DIR := $(uiautomator_api_dir)
-update-uiautomator-api: PRIVATE_REMOVED_API_FILE := $(uiautomator_internal_removed_api_file)
-update-uiautomator-api: $(uiautomator_internal_api_file)
+update-uiautomator-api: PRIVATE_REMOVED_API_FILE := $(INTERNAL_PLATFORM_UIAUTOMATOR_REMOVED_API_FILE)
+update-uiautomator-api: $(INTERNAL_PLATFORM_UIAUTOMATOR_API_FILE)
@echo Copying uiautomator current.txt
$(hide) cp $< $(PRIVATE_API_DIR)/current.txt
@echo Copying uiautomator removed.txt
$(hide) cp $(PRIVATE_REMOVED_API_FILE) $(PRIVATE_API_DIR)/removed.txt
###############################################
# clean up temp vars
-uiautomator.core_src_files :=
-uiautomator.core_java_libraries :=
-uiautomator_stubs_stamp :=
-uiautomator_internal_api_file :=
uiautomator_api_dir :=
checkapi_last_error_level_flags :=
checkapi_current_error_level_flags :=
diff --git a/cmds/webview_zygote/Android.mk b/cmds/webview_zygote/Android.mk
deleted file mode 100644
index 955e58e..0000000
--- a/cmds/webview_zygote/Android.mk
+++ /dev/null
@@ -1,51 +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_MODULE := webview_zygote
-
-LOCAL_SRC_FILES := webview_zygote.cpp
-
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_SHARED_LIBRARIES := \
- libandroid_runtime \
- libbinder \
- liblog \
- libcutils \
- libutils
-
-LOCAL_LDFLAGS_32 := -Wl,--version-script,art/sigchainlib/version-script32.txt -Wl,--export-dynamic
-LOCAL_LDFLAGS_64 := -Wl,--version-script,art/sigchainlib/version-script64.txt -Wl,--export-dynamic
-
-LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
-
-LOCAL_INIT_RC := webview_zygote32.rc
-
-# Always include the 32-bit version of webview_zygote. If the target is 64-bit,
-# also include the 64-bit webview_zygote.
-ifeq ($(TARGET_SUPPORTS_64_BIT_APPS),true)
- LOCAL_INIT_RC += webview_zygote64.rc
-endif
-
-LOCAL_MULTILIB := both
-
-LOCAL_MODULE_STEM_32 := webview_zygote32
-LOCAL_MODULE_STEM_64 := webview_zygote64
-
-include $(BUILD_EXECUTABLE)
diff --git a/cmds/webview_zygote/webview_zygote.cpp b/cmds/webview_zygote/webview_zygote.cpp
deleted file mode 100644
index 88fee64..0000000
--- a/cmds/webview_zygote/webview_zygote.cpp
+++ /dev/null
@@ -1,76 +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.
- */
-
-
-#define LOG_TAG "WebViewZygote"
-
-#include <sys/prctl.h>
-
-#include <android_runtime/AndroidRuntime.h>
-#include <binder/IPCThreadState.h>
-#include <binder/ProcessState.h>
-#include <utils/Log.h>
-#include <utils/String8.h>
-#include <utils/Vector.h>
-
-namespace android {
-
-class WebViewRuntime : public AndroidRuntime {
-public:
- WebViewRuntime(char* argBlockStart, size_t argBlockSize)
- : AndroidRuntime(argBlockStart, argBlockSize) {}
-
- ~WebViewRuntime() override {}
-
- void onStarted() override {
- // Nothing to do since this is a zygote server.
- }
-
- void onVmCreated(JNIEnv*) override {
- // Nothing to do when the VM is created in the zygote.
- }
-
- void onZygoteInit() override {
- // Called after a new process is forked.
- sp<ProcessState> proc = ProcessState::self();
- proc->startThreadPool();
- }
-
- void onExit(int code) override {
- IPCThreadState::self()->stopProcess();
- AndroidRuntime::onExit(code);
- }
-};
-
-} // namespace android
-
-int main(int argc, char* const argv[]) {
- if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) {
- LOG_ALWAYS_FATAL("PR_SET_NO_NEW_PRIVS failed: %s", strerror(errno));
- return 12;
- }
-
- size_t argBlockSize = 0;
- for (int i = 0; i < argc; ++i) {
- argBlockSize += strlen(argv[i]) + 1;
- }
-
- android::WebViewRuntime runtime(argv[0], argBlockSize);
- runtime.addOption("-Xzygote");
-
- android::Vector<android::String8> args;
- runtime.start("com.android.internal.os.WebViewZygoteInit", args, /*zygote=*/ true);
-}
diff --git a/cmds/webview_zygote/webview_zygote32.rc b/cmds/webview_zygote/webview_zygote32.rc
deleted file mode 100644
index b7decc8..0000000
--- a/cmds/webview_zygote/webview_zygote32.rc
+++ /dev/null
@@ -1,22 +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.
-#
-
-service webview_zygote32 /system/bin/webview_zygote32
- user webview_zygote
- socket webview_zygote stream 660 webview_zygote system
-
-on property:init.svc.zygote=stopped
- stop webview_zygote32
diff --git a/cmds/webview_zygote/webview_zygote64.rc b/cmds/webview_zygote/webview_zygote64.rc
deleted file mode 100644
index 2935b28..0000000
--- a/cmds/webview_zygote/webview_zygote64.rc
+++ /dev/null
@@ -1,22 +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.
-#
-
-service webview_zygote64 /system/bin/webview_zygote64
- user webview_zygote
- socket webview_zygote stream 660 webview_zygote system
-
-on property:init.svc.zygote=stopped
- stop webview_zygote64
diff --git a/config/boot-image-profile.txt b/config/boot-image-profile.txt
index 21f6739..59719d7 100644
--- a/config/boot-image-profile.txt
+++ b/config/boot-image-profile.txt
@@ -3375,8 +3375,6 @@
HPLandroid/location/ICountryListener$Stub;->asBinder()Landroid/os/IBinder;
HPLandroid/location/ICountryListener$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ICountryListener;
HPLandroid/location/ICountryListener;->onCountryDetected(Landroid/location/Country;)V
-HPLandroid/location/IFusedProvider$Stub;-><init>()V
-HPLandroid/location/IFusedProvider;->onFusedLocationHardwareChange(Landroid/hardware/location/IFusedLocationHardware;)V
HPLandroid/location/IGeocodeProvider$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
HPLandroid/location/IGeocodeProvider$Stub$Proxy;->getFromLocation(DDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String;
HPLandroid/location/IGeocodeProvider$Stub;-><init>()V
diff --git a/config/generate-preloaded-classes.sh b/config/generate-preloaded-classes.sh
index e36e148..0ad3a02 100755
--- a/config/generate-preloaded-classes.sh
+++ b/config/generate-preloaded-classes.sh
@@ -36,4 +36,4 @@
extra_classes_files=("$@")
# Disable locale to enable lexicographical sorting
-LC_ALL=C sort "$input" "${extra_classes_files[@]}" | uniq | grep -f "$blacklist" -v -F -x
+LC_ALL=C sort "$input" "${extra_classes_files[@]}" | uniq | grep -f "$blacklist" -v -F -x | grep -v "\$NoPreloadHolder"
diff --git a/config/hiddenapi-force-blacklist.txt b/config/hiddenapi-force-blacklist.txt
new file mode 100644
index 0000000..3a9e2d1
--- /dev/null
+++ b/config/hiddenapi-force-blacklist.txt
@@ -0,0 +1,38 @@
+Ldalvik/system/VMRuntime;->setHiddenApiExemptions([Ljava/lang/String;)V
+Ljava/lang/invoke/MethodHandles$Lookup;->IMPL_LOOKUP:Ljava/lang/invoke/MethodHandles$Lookup;
+Ljava/lang/invoke/VarHandle;->acquireFence()V
+Ljava/lang/invoke/VarHandle;->compareAndExchange([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->compareAndExchangeAcquire([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->compareAndExchangeRelease([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->compareAndSet([[Ljava/lang/Object;)Z
+Ljava/lang/invoke/VarHandle;->fullFence()V
+Ljava/lang/invoke/VarHandle;->get([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAcquire([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndAdd([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndAddAcquire([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndAddRelease([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndBitwiseAnd([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndBitwiseAndAcquire([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndBitwiseAndRelease([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndBitwiseOr([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndBitwiseOrAcquire([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndBitwiseOrRelease([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndBitwiseXor([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndBitwiseXorAcquire([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndBitwiseXorRelease([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndSet([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndSetAcquire([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getAndSetRelease([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getOpaque([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->getVolatile([[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/invoke/VarHandle;->loadLoadFence()V
+Ljava/lang/invoke/VarHandle;->releaseFence()V
+Ljava/lang/invoke/VarHandle;->set([[Ljava/lang/Object;)V
+Ljava/lang/invoke/VarHandle;->setOpaque([[Ljava/lang/Object;)V
+Ljava/lang/invoke/VarHandle;->setRelease([[Ljava/lang/Object;)V
+Ljava/lang/invoke/VarHandle;->setVolatile([[Ljava/lang/Object;)V
+Ljava/lang/invoke/VarHandle;->storeStoreFence()V
+Ljava/lang/invoke/VarHandle;->weakCompareAndSet([[Ljava/lang/Object;)Z
+Ljava/lang/invoke/VarHandle;->weakCompareAndSetAcquire([[Ljava/lang/Object;)Z
+Ljava/lang/invoke/VarHandle;->weakCompareAndSetPlain([[Ljava/lang/Object;)Z
+Ljava/lang/invoke/VarHandle;->weakCompareAndSetRelease([[Ljava/lang/Object;)Z
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
new file mode 100644
index 0000000..31914a6
--- /dev/null
+++ b/config/hiddenapi-light-greylist.txt
@@ -0,0 +1,8744 @@
+Landroid/accessibilityservice/AccessibilityService;->mInfo:Landroid/accessibilityservice/AccessibilityServiceInfo;
+Landroid/accessibilityservice/AccessibilityService;->mWindowToken:Landroid/os/IBinder;
+Landroid/accessibilityservice/AccessibilityServiceInfo;->setCapabilities(I)V
+Landroid/accessibilityservice/IAccessibilityServiceConnection$Stub;-><init>()V
+Landroid/accessibilityservice/IAccessibilityServiceConnection$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accessibilityservice/IAccessibilityServiceConnection;
+Landroid/accounts/Account;->accessId:Ljava/lang/String;
+Landroid/accounts/Account;->TAG:Ljava/lang/String;
+Landroid/accounts/AccountAndUser;-><init>(Landroid/accounts/Account;I)V
+Landroid/accounts/AccountAndUser;->account:Landroid/accounts/Account;
+Landroid/accounts/AccountAndUser;->userId:I
+Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V
+Landroid/accounts/AccountManager$AmsTask;->mActivity:Landroid/app/Activity;
+Landroid/accounts/AccountManager$AmsTask;->mHandler:Landroid/os/Handler;
+Landroid/accounts/AccountManager$AmsTask;->mResponse:Landroid/accounts/IAccountManagerResponse;
+Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mAuthTokenType:Ljava/lang/String;
+Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mLoginOptions:Landroid/os/Bundle;
+Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mMyCallback:Landroid/accounts/AccountManagerCallback;
+Landroid/accounts/AccountManager;-><init>(Landroid/content/Context;Landroid/accounts/IAccountManager;)V
+Landroid/accounts/AccountManager;->confirmCredentialsAsUser(Landroid/accounts/Account;Landroid/os/Bundle;Landroid/app/Activity;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;Landroid/os/UserHandle;)Landroid/accounts/AccountManagerFuture;
+Landroid/accounts/AccountManager;->getAccountsByTypeAsUser(Ljava/lang/String;Landroid/os/UserHandle;)[Landroid/accounts/Account;
+Landroid/accounts/AccountManager;->mContext:Landroid/content/Context;
+Landroid/accounts/AuthenticatorDescription;-><init>(Landroid/os/Parcel;)V
+Landroid/accounts/AuthenticatorDescription;-><init>(Ljava/lang/String;)V
+Landroid/accounts/IAccountAuthenticator$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/accounts/IAccountAuthenticator$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/accounts/IAccountAuthenticator$Stub;-><init>()V
+Landroid/accounts/IAccountAuthenticator$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountAuthenticator;
+Landroid/accounts/IAccountAuthenticator;->addAccount(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticator;->addAccountFromCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticator;->confirmCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticator;->editProperties(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;)V
+Landroid/accounts/IAccountAuthenticator;->getAccountCredentialsForCloning(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;)V
+Landroid/accounts/IAccountAuthenticator;->getAccountRemovalAllowed(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;)V
+Landroid/accounts/IAccountAuthenticator;->getAuthToken(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticator;->getAuthTokenLabel(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;)V
+Landroid/accounts/IAccountAuthenticator;->hasFeatures(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;[Ljava/lang/String;)V
+Landroid/accounts/IAccountAuthenticator;->updateCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticatorResponse$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/accounts/IAccountAuthenticatorResponse$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/accounts/IAccountAuthenticatorResponse$Stub;-><init>()V
+Landroid/accounts/IAccountAuthenticatorResponse$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountAuthenticatorResponse;
+Landroid/accounts/IAccountAuthenticatorResponse;->onError(ILjava/lang/String;)V
+Landroid/accounts/IAccountAuthenticatorResponse;->onRequestContinued()V
+Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
+Landroid/accounts/IAccountManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/accounts/IAccountManager$Stub;-><init>()V
+Landroid/accounts/IAccountManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountManager;
+Landroid/accounts/IAccountManagerResponse$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/accounts/IAccountManagerResponse$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/accounts/IAccountManagerResponse$Stub;-><init>()V
+Landroid/accounts/IAccountManagerResponse$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountManagerResponse;
+Landroid/accounts/IAccountManagerResponse;->onError(ILjava/lang/String;)V
+Landroid/accounts/IAccountManagerResponse;->onResult(Landroid/os/Bundle;)V
+Landroid/animation/Animator;->reverse()V
+Landroid/animation/ArgbEvaluator;->getInstance()Landroid/animation/ArgbEvaluator;
+Landroid/animation/LayoutTransition;->cancel()V
+Landroid/animation/LayoutTransition;->cancel(I)V
+Landroid/animation/ValueAnimator;->animateValue(F)V
+Landroid/animation/ValueAnimator;->mDuration:J
+Landroid/animation/ValueAnimator;->sDurationScale:F
+Landroid/app/ActionBar;->collapseActionView()Z
+Landroid/app/ActionBar;->DISPLAY_TITLE_MULTIPLE_LINES:I
+Landroid/app/ActionBar;->setShowHideAnimationEnabled(Z)V
+Landroid/app/Activity;->attach(Landroid/content/Context;Landroid/app/ActivityThread;Landroid/app/Instrumentation;Landroid/os/IBinder;ILandroid/app/Application;Landroid/content/Intent;Landroid/content/pm/ActivityInfo;Ljava/lang/CharSequence;Landroid/app/Activity;Ljava/lang/String;Landroid/app/Activity$NonConfigurationInstances;Landroid/content/res/Configuration;Ljava/lang/String;Lcom/android/internal/app/IVoiceInteractor;Landroid/view/Window;Landroid/view/ViewRootImpl$ActivityConfigCallback;)V
+Landroid/app/Activity;->finish(I)V
+Landroid/app/Activity;->FRAGMENTS_TAG:Ljava/lang/String;
+Landroid/app/Activity;->getActivityOptions()Landroid/app/ActivityOptions;
+Landroid/app/Activity;->getActivityToken()Landroid/os/IBinder;
+Landroid/app/Activity;->isResumed()Z
+Landroid/app/Activity;->mActivityInfo:Landroid/content/pm/ActivityInfo;
+Landroid/app/Activity;->mActivityTransitionState:Landroid/app/ActivityTransitionState;
+Landroid/app/Activity;->mApplication:Landroid/app/Application;
+Landroid/app/Activity;->mCalled:Z
+Landroid/app/Activity;->mComponent:Landroid/content/ComponentName;
+Landroid/app/Activity;->mConfigChangeFlags:I
+Landroid/app/Activity;->mCurrentConfig:Landroid/content/res/Configuration;
+Landroid/app/Activity;->mDestroyed:Z
+Landroid/app/Activity;->mEmbeddedID:Ljava/lang/String;
+Landroid/app/Activity;->mFinished:Z
+Landroid/app/Activity;->mFragments:Landroid/app/FragmentController;
+Landroid/app/Activity;->mHandler:Landroid/os/Handler;
+Landroid/app/Activity;->mIdent:I
+Landroid/app/Activity;->mInstrumentation:Landroid/app/Instrumentation;
+Landroid/app/Activity;->mIntent:Landroid/content/Intent;
+Landroid/app/Activity;->mLastNonConfigurationInstances:Landroid/app/Activity$NonConfigurationInstances;
+Landroid/app/Activity;->mMainThread:Landroid/app/ActivityThread;
+Landroid/app/Activity;->mParent:Landroid/app/Activity;
+Landroid/app/Activity;->mReferrer:Ljava/lang/String;
+Landroid/app/Activity;->mResultCode:I
+Landroid/app/Activity;->mResultData:Landroid/content/Intent;
+Landroid/app/Activity;->mResumed:Z
+Landroid/app/Activity;->mStopped:Z
+Landroid/app/Activity;->mTitle:Ljava/lang/CharSequence;
+Landroid/app/Activity;->mToken:Landroid/os/IBinder;
+Landroid/app/Activity;->mVisibleFromClient:Z
+Landroid/app/Activity;->mVoiceInteractor:Landroid/app/VoiceInteractor;
+Landroid/app/Activity;->mWindow:Landroid/view/Window;
+Landroid/app/Activity;->mWindowAdded:Z
+Landroid/app/Activity;->mWindowManager:Landroid/view/WindowManager;
+Landroid/app/Activity;->performCreate(Landroid/os/Bundle;Landroid/os/PersistableBundle;)V
+Landroid/app/Activity;->saveManagedDialogs(Landroid/os/Bundle;)V
+Landroid/app/Activity;->setParent(Landroid/app/Activity;)V
+Landroid/app/Activity;->setPersistent(Z)V
+Landroid/app/Activity;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
+Landroid/app/Activity;->startActivityForResult(Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)V
+Landroid/app/Activity;->startActivityForResultAsUser(Landroid/content/Intent;ILandroid/os/UserHandle;)V
+Landroid/app/ActivityGroup;->mLocalActivityManager:Landroid/app/LocalActivityManager;
+Landroid/app/ActivityManager$MemoryInfo;->foregroundAppThreshold:J
+Landroid/app/ActivityManager$MemoryInfo;->hiddenAppThreshold:J
+Landroid/app/ActivityManager$MemoryInfo;->secondaryServerThreshold:J
+Landroid/app/ActivityManager$MemoryInfo;->visibleAppThreshold:J
+Landroid/app/ActivityManager$RecentTaskInfo;->affiliatedTaskColor:I
+Landroid/app/ActivityManager$RecentTaskInfo;->firstActiveTime:J
+Landroid/app/ActivityManager$RecentTaskInfo;->lastActiveTime:J
+Landroid/app/ActivityManager$RecentTaskInfo;->resizeMode:I
+Landroid/app/ActivityManager$RecentTaskInfo;->stackId:I
+Landroid/app/ActivityManager$RecentTaskInfo;->supportsSplitScreenMultiWindow:Z
+Landroid/app/ActivityManager$RecentTaskInfo;->userId:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->flags:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->FLAG_HAS_ACTIVITIES:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->FLAG_PERSISTENT:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->processState:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->procStateToImportance(I)I
+Landroid/app/ActivityManager$StackInfo;->bounds:Landroid/graphics/Rect;
+Landroid/app/ActivityManager$StackInfo;->displayId:I
+Landroid/app/ActivityManager$StackInfo;->position:I
+Landroid/app/ActivityManager$StackInfo;->stackId:I
+Landroid/app/ActivityManager$StackInfo;->taskBounds:[Landroid/graphics/Rect;
+Landroid/app/ActivityManager$StackInfo;->taskIds:[I
+Landroid/app/ActivityManager$StackInfo;->taskNames:[Ljava/lang/String;
+Landroid/app/ActivityManager$StackInfo;->taskUserIds:[I
+Landroid/app/ActivityManager$StackInfo;->topActivity:Landroid/content/ComponentName;
+Landroid/app/ActivityManager$StackInfo;->toString(Ljava/lang/String;)Ljava/lang/String;
+Landroid/app/ActivityManager$StackInfo;->userId:I
+Landroid/app/ActivityManager$StackInfo;->visible:Z
+Landroid/app/ActivityManager$TaskDescription;->getBackgroundColor()I
+Landroid/app/ActivityManager$TaskDescription;->getInMemoryIcon()Landroid/graphics/Bitmap;
+Landroid/app/ActivityManager$TaskSnapshot;->getContentInsets()Landroid/graphics/Rect;
+Landroid/app/ActivityManager$TaskSnapshot;->getOrientation()I
+Landroid/app/ActivityManager$TaskSnapshot;->getScale()F
+Landroid/app/ActivityManager$TaskSnapshot;->isReducedResolution()Z
+Landroid/app/ActivityManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
+Landroid/app/ActivityManager;->checkComponentPermission(Ljava/lang/String;IIZ)I
+Landroid/app/ActivityManager;->clearApplicationUserData(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)Z
+Landroid/app/ActivityManager;->forceStopPackageAsUser(Ljava/lang/String;I)V
+Landroid/app/ActivityManager;->getMaxRecentTasksStatic()I
+Landroid/app/ActivityManager;->getService()Landroid/app/IActivityManager;
+Landroid/app/ActivityManager;->IActivityManagerSingleton:Landroid/util/Singleton;
+Landroid/app/ActivityManager;->INTENT_SENDER_ACTIVITY:I
+Landroid/app/ActivityManager;->isHighEndGfx()Z
+Landroid/app/ActivityManager;->isLowRamDeviceStatic()Z
+Landroid/app/ActivityManager;->isUserRunning(I)Z
+Landroid/app/ActivityManager;->mContext:Landroid/content/Context;
+Landroid/app/ActivityManager;->PROCESS_STATE_BOUND_FOREGROUND_SERVICE:I
+Landroid/app/ActivityManager;->PROCESS_STATE_CACHED_ACTIVITY:I
+Landroid/app/ActivityManager;->PROCESS_STATE_FOREGROUND_SERVICE:I
+Landroid/app/ActivityManager;->PROCESS_STATE_HOME:I
+Landroid/app/ActivityManager;->PROCESS_STATE_IMPORTANT_BACKGROUND:I
+Landroid/app/ActivityManager;->PROCESS_STATE_RECEIVER:I
+Landroid/app/ActivityManager;->PROCESS_STATE_SERVICE:I
+Landroid/app/ActivityManager;->PROCESS_STATE_TOP:I
+Landroid/app/ActivityManager;->staticGetMemoryClass()I
+Landroid/app/ActivityManager;->switchUser(I)Z
+Landroid/app/ActivityManagerNative;-><init>()V
+Landroid/app/ActivityManagerNative;->asInterface(Landroid/os/IBinder;)Landroid/app/IActivityManager;
+Landroid/app/ActivityManagerNative;->getDefault()Landroid/app/IActivityManager;
+Landroid/app/ActivityManagerNative;->isSystemReady()Z
+Landroid/app/ActivityOptions;->makeCustomAnimation(Landroid/content/Context;IILandroid/os/Handler;Landroid/app/ActivityOptions$OnAnimationStartedListener;)Landroid/app/ActivityOptions;
+Landroid/app/ActivityOptions;->makeMultiThumbFutureAspectScaleAnimation(Landroid/content/Context;Landroid/os/Handler;Landroid/view/IAppTransitionAnimationSpecsFuture;Landroid/app/ActivityOptions$OnAnimationStartedListener;Z)Landroid/app/ActivityOptions;
+Landroid/app/ActivityThread$ActivityClientRecord;->activity:Landroid/app/Activity;
+Landroid/app/ActivityThread$ActivityClientRecord;->activityInfo:Landroid/content/pm/ActivityInfo;
+Landroid/app/ActivityThread$ActivityClientRecord;->compatInfo:Landroid/content/res/CompatibilityInfo;
+Landroid/app/ActivityThread$ActivityClientRecord;->intent:Landroid/content/Intent;
+Landroid/app/ActivityThread$ActivityClientRecord;->mPreserveWindow:Z
+Landroid/app/ActivityThread$ActivityClientRecord;->paused:Z
+Landroid/app/ActivityThread$ActivityClientRecord;->stopped:Z
+Landroid/app/ActivityThread$ActivityClientRecord;->token:Landroid/os/IBinder;
+Landroid/app/ActivityThread$AppBindData;->appInfo:Landroid/content/pm/ApplicationInfo;
+Landroid/app/ActivityThread$AppBindData;->compatInfo:Landroid/content/res/CompatibilityInfo;
+Landroid/app/ActivityThread$AppBindData;->instrumentationArgs:Landroid/os/Bundle;
+Landroid/app/ActivityThread$AppBindData;->persistent:Z
+Landroid/app/ActivityThread$AppBindData;->processName:Ljava/lang/String;
+Landroid/app/ActivityThread$AppBindData;->providers:Ljava/util/List;
+Landroid/app/ActivityThread$AppBindData;->restrictedBackupMode:Z
+Landroid/app/ActivityThread$BindServiceData;->intent:Landroid/content/Intent;
+Landroid/app/ActivityThread$BindServiceData;->token:Landroid/os/IBinder;
+Landroid/app/ActivityThread$CreateServiceData;-><init>()V
+Landroid/app/ActivityThread$CreateServiceData;->compatInfo:Landroid/content/res/CompatibilityInfo;
+Landroid/app/ActivityThread$CreateServiceData;->info:Landroid/content/pm/ServiceInfo;
+Landroid/app/ActivityThread$CreateServiceData;->intent:Landroid/content/Intent;
+Landroid/app/ActivityThread$CreateServiceData;->token:Landroid/os/IBinder;
+Landroid/app/ActivityThread$H;->BIND_SERVICE:I
+Landroid/app/ActivityThread$H;->CREATE_SERVICE:I
+Landroid/app/ActivityThread$H;->DUMP_PROVIDER:I
+Landroid/app/ActivityThread$H;->ENTER_ANIMATION_COMPLETE:I
+Landroid/app/ActivityThread$H;->EXIT_APPLICATION:I
+Landroid/app/ActivityThread$H;->GC_WHEN_IDLE:I
+Landroid/app/ActivityThread$H;->INSTALL_PROVIDER:I
+Landroid/app/ActivityThread$H;->RECEIVER:I
+Landroid/app/ActivityThread$H;->REMOVE_PROVIDER:I
+Landroid/app/ActivityThread$H;->SCHEDULE_CRASH:I
+Landroid/app/ActivityThread$H;->SERVICE_ARGS:I
+Landroid/app/ActivityThread$H;->STOP_SERVICE:I
+Landroid/app/ActivityThread$H;->UNBIND_SERVICE:I
+Landroid/app/ActivityThread$ProviderClientRecord;->mHolder:Landroid/app/ContentProviderHolder;
+Landroid/app/ActivityThread$ProviderClientRecord;->mLocalProvider:Landroid/content/ContentProvider;
+Landroid/app/ActivityThread$ProviderClientRecord;->mProvider:Landroid/content/IContentProvider;
+Landroid/app/ActivityThread$ReceiverData;->compatInfo:Landroid/content/res/CompatibilityInfo;
+Landroid/app/ActivityThread$ReceiverData;->info:Landroid/content/pm/ActivityInfo;
+Landroid/app/ActivityThread$ReceiverData;->intent:Landroid/content/Intent;
+Landroid/app/ActivityThread$ServiceArgsData;->args:Landroid/content/Intent;
+Landroid/app/ActivityThread$ServiceArgsData;->token:Landroid/os/IBinder;
+Landroid/app/ActivityThread;-><init>()V
+Landroid/app/ActivityThread;->acquireExistingProvider(Landroid/content/Context;Ljava/lang/String;IZ)Landroid/content/IContentProvider;
+Landroid/app/ActivityThread;->acquireProvider(Landroid/content/Context;Ljava/lang/String;IZ)Landroid/content/IContentProvider;
+Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread;
+Landroid/app/ActivityThread;->currentApplication()Landroid/app/Application;
+Landroid/app/ActivityThread;->currentPackageName()Ljava/lang/String;
+Landroid/app/ActivityThread;->currentProcessName()Ljava/lang/String;
+Landroid/app/ActivityThread;->getActivity(Landroid/os/IBinder;)Landroid/app/Activity;
+Landroid/app/ActivityThread;->getApplication()Landroid/app/Application;
+Landroid/app/ActivityThread;->getApplicationThread()Landroid/app/ActivityThread$ApplicationThread;
+Landroid/app/ActivityThread;->getHandler()Landroid/os/Handler;
+Landroid/app/ActivityThread;->getInstrumentation()Landroid/app/Instrumentation;
+Landroid/app/ActivityThread;->getLooper()Landroid/os/Looper;
+Landroid/app/ActivityThread;->getPackageManager()Landroid/content/pm/IPackageManager;
+Landroid/app/ActivityThread;->getProcessName()Ljava/lang/String;
+Landroid/app/ActivityThread;->getSystemContext()Landroid/app/ContextImpl;
+Landroid/app/ActivityThread;->handleBindApplication(Landroid/app/ActivityThread$AppBindData;)V
+Landroid/app/ActivityThread;->handleCreateService(Landroid/app/ActivityThread$CreateServiceData;)V
+Landroid/app/ActivityThread;->handleReceiver(Landroid/app/ActivityThread$ReceiverData;)V
+Landroid/app/ActivityThread;->handleUnstableProviderDied(Landroid/os/IBinder;Z)V
+Landroid/app/ActivityThread;->installContentProviders(Landroid/content/Context;Ljava/util/List;)V
+Landroid/app/ActivityThread;->installProvider(Landroid/content/Context;Landroid/app/ContentProviderHolder;Landroid/content/pm/ProviderInfo;ZZZ)Landroid/app/ContentProviderHolder;
+Landroid/app/ActivityThread;->installSystemProviders(Ljava/util/List;)V
+Landroid/app/ActivityThread;->mActivities:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mAllApplications:Ljava/util/ArrayList;
+Landroid/app/ActivityThread;->mAppThread:Landroid/app/ActivityThread$ApplicationThread;
+Landroid/app/ActivityThread;->mBoundApplication:Landroid/app/ActivityThread$AppBindData;
+Landroid/app/ActivityThread;->mConfiguration:Landroid/content/res/Configuration;
+Landroid/app/ActivityThread;->mCurDefaultDisplayDpi:I
+Landroid/app/ActivityThread;->mDensityCompatMode:Z
+Landroid/app/ActivityThread;->mH:Landroid/app/ActivityThread$H;
+Landroid/app/ActivityThread;->mInitialApplication:Landroid/app/Application;
+Landroid/app/ActivityThread;->mInstrumentation:Landroid/app/Instrumentation;
+Landroid/app/ActivityThread;->mInstrumentationAppDir:Ljava/lang/String;
+Landroid/app/ActivityThread;->mInstrumentedAppDir:Ljava/lang/String;
+Landroid/app/ActivityThread;->mLocalProviders:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mLocalProvidersByName:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mLooper:Landroid/os/Looper;
+Landroid/app/ActivityThread;->mNumVisibleActivities:I
+Landroid/app/ActivityThread;->mPackages:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mPendingConfiguration:Landroid/content/res/Configuration;
+Landroid/app/ActivityThread;->mProviderMap:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mResourcePackages:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mResourcesManager:Landroid/app/ResourcesManager;
+Landroid/app/ActivityThread;->mServices:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mSystemContext:Landroid/app/ContextImpl;
+Landroid/app/ActivityThread;->performNewIntents(Landroid/os/IBinder;Ljava/util/List;Z)V
+Landroid/app/ActivityThread;->performStopActivity(Landroid/os/IBinder;ZLjava/lang/String;)V
+Landroid/app/ActivityThread;->releaseProvider(Landroid/content/IContentProvider;Z)Z
+Landroid/app/ActivityThread;->scheduleGcIdler()V
+Landroid/app/ActivityThread;->sCurrentActivityThread:Landroid/app/ActivityThread;
+Landroid/app/ActivityThread;->sendActivityResult(Landroid/os/IBinder;Ljava/lang/String;IILandroid/content/Intent;)V
+Landroid/app/ActivityThread;->sMainThreadHandler:Landroid/os/Handler;
+Landroid/app/ActivityThread;->sPackageManager:Landroid/content/pm/IPackageManager;
+Landroid/app/ActivityThread;->startActivityNow(Landroid/app/Activity;Ljava/lang/String;Landroid/content/Intent;Landroid/content/pm/ActivityInfo;Landroid/os/IBinder;Landroid/os/Bundle;Landroid/app/Activity$NonConfigurationInstances;)Landroid/app/Activity;
+Landroid/app/ActivityThread;->systemMain()Landroid/app/ActivityThread;
+Landroid/app/admin/DeviceAdminInfo$PolicyInfo;->tag:Ljava/lang/String;
+Landroid/app/admin/DeviceAdminInfo;->getUsedPolicies()Ljava/util/ArrayList;
+Landroid/app/admin/DevicePolicyManager;->ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED:Ljava/lang/String;
+Landroid/app/admin/DevicePolicyManager;->getActiveAdminsAsUser(I)Ljava/util/List;
+Landroid/app/admin/DevicePolicyManager;->getCameraDisabled(Landroid/content/ComponentName;I)Z
+Landroid/app/admin/DevicePolicyManager;->getCurrentFailedPasswordAttempts(I)I
+Landroid/app/admin/DevicePolicyManager;->getKeyguardDisabledFeatures(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getMaximumFailedPasswordsForWipe(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getMaximumTimeToLock(Landroid/content/ComponentName;I)J
+Landroid/app/admin/DevicePolicyManager;->getPasswordHistoryLength(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumLength(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumLetters(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumLowerCase(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumNonLetter(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumNumeric(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumSymbols(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumUpperCase(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordQuality(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getProfileOwnerAsUser(I)Landroid/content/ComponentName;
+Landroid/app/admin/DevicePolicyManager;->getRequiredStrongAuthTimeout(Landroid/content/ComponentName;I)J
+Landroid/app/admin/DevicePolicyManager;->getStorageEncryptionStatus(I)I
+Landroid/app/admin/DevicePolicyManager;->getTrustAgentConfiguration(Landroid/content/ComponentName;Landroid/content/ComponentName;I)Ljava/util/List;
+Landroid/app/admin/DevicePolicyManager;->packageHasActiveAdmins(Ljava/lang/String;I)Z
+Landroid/app/admin/DevicePolicyManager;->reportFailedPasswordAttempt(I)V
+Landroid/app/admin/DevicePolicyManager;->reportSuccessfulPasswordAttempt(I)V
+Landroid/app/admin/DevicePolicyManager;->setActiveAdmin(Landroid/content/ComponentName;Z)V
+Landroid/app/admin/DevicePolicyManager;->setActiveAdmin(Landroid/content/ComponentName;ZI)V
+Landroid/app/admin/DevicePolicyManager;->setActivePasswordState(Landroid/app/admin/PasswordMetrics;I)V
+Landroid/app/admin/DevicePolicyManager;->setGlobalProxy(Landroid/content/ComponentName;Ljava/net/Proxy;Ljava/util/List;)Landroid/content/ComponentName;
+Landroid/app/admin/DevicePolicyManager;->throwIfParentInstance(Ljava/lang/String;)V
+Landroid/app/admin/IDevicePolicyManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/admin/IDevicePolicyManager;
+Landroid/app/admin/IDevicePolicyManager$Stub;->TRANSACTION_packageHasActiveAdmins:I
+Landroid/app/admin/IDevicePolicyManager$Stub;->TRANSACTION_removeActiveAdmin:I
+Landroid/app/admin/IDevicePolicyManager;->packageHasActiveAdmins(Ljava/lang/String;I)Z
+Landroid/app/admin/SecurityLog$SecurityEvent;-><init>([B)V
+Landroid/app/AlarmManager;->FLAG_ALLOW_WHILE_IDLE_UNRESTRICTED:I
+Landroid/app/AlarmManager;->FLAG_IDLE_UNTIL:I
+Landroid/app/AlarmManager;->FLAG_STANDALONE:I
+Landroid/app/AlarmManager;->FLAG_WAKE_FROM_IDLE:I
+Landroid/app/AlarmManager;->mService:Landroid/app/IAlarmManager;
+Landroid/app/AlarmManager;->set(IJJJLjava/lang/String;Landroid/app/AlarmManager$OnAlarmListener;Landroid/os/Handler;Landroid/os/WorkSource;)V
+Landroid/app/AlarmManager;->WINDOW_EXACT:J
+Landroid/app/AlarmManager;->WINDOW_HEURISTIC:J
+Landroid/app/AlertDialog$Builder;->P:Lcom/android/internal/app/AlertController$AlertParams;
+Landroid/app/AlertDialog$Builder;->setRecycleOnMeasureEnabled(Z)Landroid/app/AlertDialog$Builder;
+Landroid/app/AlertDialog$Builder;->setView(Landroid/view/View;IIII)Landroid/app/AlertDialog$Builder;
+Landroid/app/AlertDialog;->mAlert:Lcom/android/internal/app/AlertController;
+Landroid/app/AppGlobals;->getInitialApplication()Landroid/app/Application;
+Landroid/app/AppGlobals;->getInitialPackage()Ljava/lang/String;
+Landroid/app/AppGlobals;->getPackageManager()Landroid/content/pm/IPackageManager;
+Landroid/app/Application;->attach(Landroid/content/Context;)V
+Landroid/app/Application;->collectActivityLifecycleCallbacks()[Ljava/lang/Object;
+Landroid/app/Application;->dispatchActivityCreated(Landroid/app/Activity;Landroid/os/Bundle;)V
+Landroid/app/Application;->dispatchActivityDestroyed(Landroid/app/Activity;)V
+Landroid/app/Application;->dispatchActivityPaused(Landroid/app/Activity;)V
+Landroid/app/Application;->dispatchActivityResumed(Landroid/app/Activity;)V
+Landroid/app/Application;->dispatchActivitySaveInstanceState(Landroid/app/Activity;Landroid/os/Bundle;)V
+Landroid/app/Application;->dispatchActivityStarted(Landroid/app/Activity;)V
+Landroid/app/Application;->dispatchActivityStopped(Landroid/app/Activity;)V
+Landroid/app/Application;->mActivityLifecycleCallbacks:Ljava/util/ArrayList;
+Landroid/app/Application;->mAssistCallbacks:Ljava/util/ArrayList;
+Landroid/app/Application;->mComponentCallbacks:Ljava/util/ArrayList;
+Landroid/app/Application;->mLoadedApk:Landroid/app/LoadedApk;
+Landroid/app/ApplicationLoaders;->getDefault()Landroid/app/ApplicationLoaders;
+Landroid/app/ApplicationLoaders;->mLoaders:Landroid/util/ArrayMap;
+Landroid/app/ApplicationPackageManager;-><init>(Landroid/app/ContextImpl;Landroid/content/pm/IPackageManager;)V
+Landroid/app/ApplicationPackageManager;->configurationChanged()V
+Landroid/app/ApplicationPackageManager;->deletePackage(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;I)V
+Landroid/app/ApplicationPackageManager;->getPackageCurrentVolume(Landroid/content/pm/ApplicationInfo;)Landroid/os/storage/VolumeInfo;
+Landroid/app/ApplicationPackageManager;->getPackageSizeInfoAsUser(Ljava/lang/String;ILandroid/content/pm/IPackageStatsObserver;)V
+Landroid/app/ApplicationPackageManager;->mPM:Landroid/content/pm/IPackageManager;
+Landroid/app/ApplicationPackageManager;->shouldShowRequestPermissionRationale(Ljava/lang/String;)Z
+Landroid/app/AppOpsManager$OpEntry;->getDuration()I
+Landroid/app/AppOpsManager$OpEntry;->getMode()I
+Landroid/app/AppOpsManager$OpEntry;->getRejectTime()J
+Landroid/app/AppOpsManager$PackageOps;-><init>(Ljava/lang/String;ILjava/util/List;)V
+Landroid/app/AppOpsManager$PackageOps;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/app/AppOpsManager;->checkOp(IILjava/lang/String;)I
+Landroid/app/AppOpsManager;->checkOpNoThrow(IILjava/lang/String;)I
+Landroid/app/AppOpsManager;->getOpsForPackage(ILjava/lang/String;[I)Ljava/util/List;
+Landroid/app/AppOpsManager;->mService:Lcom/android/internal/app/IAppOpsService;
+Landroid/app/AppOpsManager;->noteOp(I)I
+Landroid/app/AppOpsManager;->noteOp(IILjava/lang/String;)I
+Landroid/app/AppOpsManager;->noteOpNoThrow(IILjava/lang/String;)I
+Landroid/app/AppOpsManager;->noteProxyOp(ILjava/lang/String;)I
+Landroid/app/AppOpsManager;->opToName(I)Ljava/lang/String;
+Landroid/app/AppOpsManager;->opToSwitch(I)I
+Landroid/app/AppOpsManager;->OP_ACCEPT_HANDOVER:I
+Landroid/app/AppOpsManager;->OP_ACCESS_NOTIFICATIONS:I
+Landroid/app/AppOpsManager;->OP_ACTIVATE_VPN:I
+Landroid/app/AppOpsManager;->OP_ADD_VOICEMAIL:I
+Landroid/app/AppOpsManager;->OP_ANSWER_PHONE_CALLS:I
+Landroid/app/AppOpsManager;->OP_ASSIST_SCREENSHOT:I
+Landroid/app/AppOpsManager;->OP_ASSIST_STRUCTURE:I
+Landroid/app/AppOpsManager;->OP_AUDIO_ACCESSIBILITY_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_ALARM_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_BLUETOOTH_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_MASTER_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_MEDIA_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_NOTIFICATION_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_RING_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_VOICE_VOLUME:I
+Landroid/app/AppOpsManager;->OP_BODY_SENSORS:I
+Landroid/app/AppOpsManager;->OP_CALL_PHONE:I
+Landroid/app/AppOpsManager;->OP_CAMERA:I
+Landroid/app/AppOpsManager;->OP_COARSE_LOCATION:I
+Landroid/app/AppOpsManager;->OP_FINE_LOCATION:I
+Landroid/app/AppOpsManager;->OP_GET_ACCOUNTS:I
+Landroid/app/AppOpsManager;->OP_GET_USAGE_STATS:I
+Landroid/app/AppOpsManager;->OP_GPS:I
+Landroid/app/AppOpsManager;->OP_INSTANT_APP_START_FOREGROUND:I
+Landroid/app/AppOpsManager;->OP_MOCK_LOCATION:I
+Landroid/app/AppOpsManager;->OP_MONITOR_HIGH_POWER_LOCATION:I
+Landroid/app/AppOpsManager;->OP_MONITOR_LOCATION:I
+Landroid/app/AppOpsManager;->OP_MUTE_MICROPHONE:I
+Landroid/app/AppOpsManager;->OP_NEIGHBORING_CELLS:I
+Landroid/app/AppOpsManager;->OP_NONE:I
+Landroid/app/AppOpsManager;->OP_PICTURE_IN_PICTURE:I
+Landroid/app/AppOpsManager;->OP_PLAY_AUDIO:I
+Landroid/app/AppOpsManager;->OP_POST_NOTIFICATION:I
+Landroid/app/AppOpsManager;->OP_PROCESS_OUTGOING_CALLS:I
+Landroid/app/AppOpsManager;->OP_PROJECT_MEDIA:I
+Landroid/app/AppOpsManager;->OP_READ_CALENDAR:I
+Landroid/app/AppOpsManager;->OP_READ_CALL_LOG:I
+Landroid/app/AppOpsManager;->OP_READ_CELL_BROADCASTS:I
+Landroid/app/AppOpsManager;->OP_READ_CLIPBOARD:I
+Landroid/app/AppOpsManager;->OP_READ_CONTACTS:I
+Landroid/app/AppOpsManager;->OP_READ_EXTERNAL_STORAGE:I
+Landroid/app/AppOpsManager;->OP_READ_ICC_SMS:I
+Landroid/app/AppOpsManager;->OP_READ_PHONE_NUMBERS:I
+Landroid/app/AppOpsManager;->OP_READ_PHONE_STATE:I
+Landroid/app/AppOpsManager;->OP_READ_SMS:I
+Landroid/app/AppOpsManager;->OP_RECEIVE_EMERGECY_SMS:I
+Landroid/app/AppOpsManager;->OP_RECEIVE_MMS:I
+Landroid/app/AppOpsManager;->OP_RECEIVE_SMS:I
+Landroid/app/AppOpsManager;->OP_RECEIVE_WAP_PUSH:I
+Landroid/app/AppOpsManager;->OP_REQUEST_INSTALL_PACKAGES:I
+Landroid/app/AppOpsManager;->OP_RUN_IN_BACKGROUND:I
+Landroid/app/AppOpsManager;->OP_SEND_SMS:I
+Landroid/app/AppOpsManager;->OP_TAKE_AUDIO_FOCUS:I
+Landroid/app/AppOpsManager;->OP_TAKE_MEDIA_BUTTONS:I
+Landroid/app/AppOpsManager;->OP_TOAST_WINDOW:I
+Landroid/app/AppOpsManager;->OP_TURN_SCREEN_ON:I
+Landroid/app/AppOpsManager;->OP_USE_FINGERPRINT:I
+Landroid/app/AppOpsManager;->OP_USE_SIP:I
+Landroid/app/AppOpsManager;->OP_VIBRATE:I
+Landroid/app/AppOpsManager;->OP_WAKE_LOCK:I
+Landroid/app/AppOpsManager;->OP_WIFI_SCAN:I
+Landroid/app/AppOpsManager;->OP_WRITE_CALENDAR:I
+Landroid/app/AppOpsManager;->OP_WRITE_CALL_LOG:I
+Landroid/app/AppOpsManager;->OP_WRITE_CLIPBOARD:I
+Landroid/app/AppOpsManager;->OP_WRITE_CONTACTS:I
+Landroid/app/AppOpsManager;->OP_WRITE_EXTERNAL_STORAGE:I
+Landroid/app/AppOpsManager;->OP_WRITE_ICC_SMS:I
+Landroid/app/AppOpsManager;->OP_WRITE_SETTINGS:I
+Landroid/app/AppOpsManager;->OP_WRITE_SMS:I
+Landroid/app/AppOpsManager;->OP_WRITE_WALLPAPER:I
+Landroid/app/AppOpsManager;->resetAllModes()V
+Landroid/app/AppOpsManager;->setRestriction(III[Ljava/lang/String;)V
+Landroid/app/AppOpsManager;->sOpPerms:[Ljava/lang/String;
+Landroid/app/AppOpsManager;->_NUM_OP:I
+Landroid/app/assist/AssistContent;-><init>(Landroid/os/Parcel;)V
+Landroid/app/assist/AssistContent;->mClipData:Landroid/content/ClipData;
+Landroid/app/assist/AssistContent;->mExtras:Landroid/os/Bundle;
+Landroid/app/assist/AssistContent;->mIntent:Landroid/content/Intent;
+Landroid/app/assist/AssistContent;->mIsAppProvidedIntent:Z
+Landroid/app/assist/AssistContent;->mStructuredData:Ljava/lang/String;
+Landroid/app/assist/AssistContent;->mUri:Landroid/net/Uri;
+Landroid/app/assist/AssistContent;->writeToParcelInternal(Landroid/os/Parcel;I)V
+Landroid/app/backup/BackupDataInput$EntityHeader;->dataSize:I
+Landroid/app/backup/BackupDataInput$EntityHeader;->key:Ljava/lang/String;
+Landroid/app/backup/BackupDataInputStream;->dataSize:I
+Landroid/app/backup/BackupDataInputStream;->key:Ljava/lang/String;
+Landroid/app/backup/BackupDataOutput;->mBackupWriter:J
+Landroid/app/backup/BackupHelperDispatcher$Header;->chunkSize:I
+Landroid/app/backup/BackupHelperDispatcher$Header;->keyPrefix:Ljava/lang/String;
+Landroid/app/backup/BackupManager;->checkServiceBinder()V
+Landroid/app/backup/BackupManager;->sService:Landroid/app/backup/IBackupManager;
+Landroid/app/backup/FileBackupHelperBase;->writeNewStateDescription(Landroid/os/ParcelFileDescriptor;)V
+Landroid/app/backup/FullBackup;->backupToTar(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/backup/FullBackupDataOutput;)I
+Landroid/app/backup/FullBackupDataOutput;-><init>(Landroid/os/ParcelFileDescriptor;)V
+Landroid/app/backup/FullBackupDataOutput;->addSize(J)V
+Landroid/app/backup/FullBackupDataOutput;->getData()Landroid/app/backup/BackupDataOutput;
+Landroid/app/backup/FullBackupDataOutput;->mData:Landroid/app/backup/BackupDataOutput;
+Landroid/app/backup/IBackupManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/backup/IBackupManager;
+Landroid/app/backup/IBackupManager;->acknowledgeFullBackupOrRestore(IZLjava/lang/String;Ljava/lang/String;Landroid/app/backup/IFullBackupRestoreObserver;)V
+Landroid/app/backup/IBackupManager;->clearBackupData(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/app/backup/IBackupManager;->dataChanged(Ljava/lang/String;)V
+Landroid/app/backup/IBackupManager;->getCurrentTransport()Ljava/lang/String;
+Landroid/app/backup/IBackupManager;->isBackupEnabled()Z
+Landroid/app/backup/IBackupManager;->isBackupServiceActive(I)Z
+Landroid/app/backup/IBackupManager;->listAllTransports()[Ljava/lang/String;
+Landroid/app/backup/IBackupManager;->selectBackupTransport(Ljava/lang/String;)Ljava/lang/String;
+Landroid/app/backup/IBackupManager;->setAutoRestore(Z)V
+Landroid/app/backup/IBackupManager;->setBackupEnabled(Z)V
+Landroid/app/backup/IFullBackupRestoreObserver$Stub;-><init>()V
+Landroid/app/backup/IRestoreObserver$Stub;-><init>()V
+Landroid/app/ContentProviderHolder;-><init>(Landroid/content/pm/ProviderInfo;)V
+Landroid/app/ContentProviderHolder;-><init>(Landroid/os/Parcel;)V
+Landroid/app/ContentProviderHolder;->info:Landroid/content/pm/ProviderInfo;
+Landroid/app/ContentProviderHolder;->noReleaseNeeded:Z
+Landroid/app/ContentProviderHolder;->provider:Landroid/content/IContentProvider;
+Landroid/app/ContextImpl$ApplicationContentResolver;->mMainThread:Landroid/app/ActivityThread;
+Landroid/app/ContextImpl;->createActivityContext(Landroid/app/ActivityThread;Landroid/app/LoadedApk;Landroid/content/pm/ActivityInfo;Landroid/os/IBinder;ILandroid/content/res/Configuration;)Landroid/app/ContextImpl;
+Landroid/app/ContextImpl;->createAppContext(Landroid/app/ActivityThread;Landroid/app/LoadedApk;)Landroid/app/ContextImpl;
+Landroid/app/ContextImpl;->createSystemContext(Landroid/app/ActivityThread;)Landroid/app/ContextImpl;
+Landroid/app/ContextImpl;->getActivityToken()Landroid/os/IBinder;
+Landroid/app/ContextImpl;->getDisplay()Landroid/view/Display;
+Landroid/app/ContextImpl;->getImpl(Landroid/content/Context;)Landroid/app/ContextImpl;
+Landroid/app/ContextImpl;->getOuterContext()Landroid/content/Context;
+Landroid/app/ContextImpl;->getPreferencesDir()Ljava/io/File;
+Landroid/app/ContextImpl;->getReceiverRestrictedContext()Landroid/content/Context;
+Landroid/app/ContextImpl;->mBasePackageName:Ljava/lang/String;
+Landroid/app/ContextImpl;->mClassLoader:Ljava/lang/ClassLoader;
+Landroid/app/ContextImpl;->mContentResolver:Landroid/app/ContextImpl$ApplicationContentResolver;
+Landroid/app/ContextImpl;->mFlags:I
+Landroid/app/ContextImpl;->mMainThread:Landroid/app/ActivityThread;
+Landroid/app/ContextImpl;->mOpPackageName:Ljava/lang/String;
+Landroid/app/ContextImpl;->mOuterContext:Landroid/content/Context;
+Landroid/app/ContextImpl;->mPackageManager:Landroid/content/pm/PackageManager;
+Landroid/app/ContextImpl;->mPreferencesDir:Ljava/io/File;
+Landroid/app/ContextImpl;->mResources:Landroid/content/res/Resources;
+Landroid/app/ContextImpl;->mServiceCache:[Ljava/lang/Object;
+Landroid/app/ContextImpl;->mSharedPrefsPaths:Landroid/util/ArrayMap;
+Landroid/app/ContextImpl;->mTheme:Landroid/content/res/Resources$Theme;
+Landroid/app/ContextImpl;->mThemeResource:I
+Landroid/app/ContextImpl;->scheduleFinalCleanup(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/app/ContextImpl;->setOuterContext(Landroid/content/Context;)V
+Landroid/app/ContextImpl;->sSharedPrefsCache:Landroid/util/ArrayMap;
+Landroid/app/DatePickerDialog;->mDatePicker:Landroid/widget/DatePicker;
+Landroid/app/Dialog;->CANCEL:I
+Landroid/app/Dialog;->dismissDialog()V
+Landroid/app/Dialog;->mCancelMessage:Landroid/os/Message;
+Landroid/app/Dialog;->mContext:Landroid/content/Context;
+Landroid/app/Dialog;->mDismissMessage:Landroid/os/Message;
+Landroid/app/Dialog;->mHandler:Landroid/os/Handler;
+Landroid/app/Dialog;->mListenersHandler:Landroid/os/Handler;
+Landroid/app/Dialog;->mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;
+Landroid/app/Dialog;->mOwnerActivity:Landroid/app/Activity;
+Landroid/app/Dialog;->mShowing:Z
+Landroid/app/Dialog;->mShowMessage:Landroid/os/Message;
+Landroid/app/Dialog;->mWindow:Landroid/view/Window;
+Landroid/app/DialogFragment;->mBackStackId:I
+Landroid/app/DialogFragment;->mDismissed:Z
+Landroid/app/DialogFragment;->mShownByMe:Z
+Landroid/app/DialogFragment;->mViewDestroyed:Z
+Landroid/app/DialogFragment;->showAllowingStateLoss(Landroid/app/FragmentManager;Ljava/lang/String;)V
+Landroid/app/DownloadManager$Query;->orderBy(Ljava/lang/String;I)Landroid/app/DownloadManager$Query;
+Landroid/app/DownloadManager$Query;->setOnlyIncludeVisibleInDownloadsUi(Z)Landroid/app/DownloadManager$Query;
+Landroid/app/DownloadManager$Request;->mUri:Landroid/net/Uri;
+Landroid/app/DownloadManager;->getWhereArgsForIds([J)[Ljava/lang/String;
+Landroid/app/DownloadManager;->getWhereClauseForIds([J)Ljava/lang/String;
+Landroid/app/DownloadManager;->restartDownload([[J)V
+Landroid/app/DownloadManager;->setAccessAllDownloads(Z)V
+Landroid/app/DownloadManager;->setAccessFilename(Z)V
+Landroid/app/DownloadManager;->UNDERLYING_COLUMNS:[Ljava/lang/String;
+Landroid/app/Fragment;->mAdded:Z
+Landroid/app/Fragment;->mChildFragmentManager:Landroid/app/FragmentManagerImpl;
+Landroid/app/Fragment;->mFragmentId:I
+Landroid/app/Fragment;->mFragmentManager:Landroid/app/FragmentManagerImpl;
+Landroid/app/Fragment;->mHost:Landroid/app/FragmentHostCallback;
+Landroid/app/Fragment;->mIndex:I
+Landroid/app/Fragment;->mLoadersStarted:Z
+Landroid/app/Fragment;->mSavedFragmentState:Landroid/os/Bundle;
+Landroid/app/Fragment;->mView:Landroid/view/View;
+Landroid/app/Fragment;->mWho:Ljava/lang/String;
+Landroid/app/Fragment;->sClassMap:Landroid/util/ArrayMap;
+Landroid/app/FragmentController;->mHost:Landroid/app/FragmentHostCallback;
+Landroid/app/FragmentHostCallback;->mLoadersStarted:Z
+Landroid/app/FragmentManagerImpl;->loadAnimator(Landroid/app/Fragment;IZI)Landroid/animation/Animator;
+Landroid/app/FragmentManagerImpl;->mActive:Landroid/util/SparseArray;
+Landroid/app/FragmentManagerImpl;->mAdded:Ljava/util/ArrayList;
+Landroid/app/FragmentManagerImpl;->mStateSaved:Z
+Landroid/app/FragmentManagerImpl;->noteStateNotSaved()V
+Landroid/app/IActivityController;->activityResuming(Ljava/lang/String;)Z
+Landroid/app/IActivityController;->activityStarting(Landroid/content/Intent;Ljava/lang/String;)Z
+Landroid/app/IActivityController;->appNotResponding(Ljava/lang/String;ILjava/lang/String;)I
+Landroid/app/IActivityManager$Stub$Proxy;->getConfiguration()Landroid/content/res/Configuration;
+Landroid/app/IActivityManager$Stub$Proxy;->getLaunchedFromUid(Landroid/os/IBinder;)I
+Landroid/app/IActivityManager$Stub$Proxy;->getProcessLimit()I
+Landroid/app/IActivityManager$Stub$Proxy;->getProcessPss([I)[J
+Landroid/app/IActivityManager$Stub$Proxy;->isAppForeground(I)Z
+Landroid/app/IActivityManager$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/IActivityManager$Stub$Proxy;->setActivityController(Landroid/app/IActivityController;Z)V
+Landroid/app/IActivityManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IActivityManager;
+Landroid/app/IActivityManager;->bindService(Landroid/app/IApplicationThread;Landroid/os/IBinder;Landroid/content/Intent;Ljava/lang/String;Landroid/app/IServiceConnection;ILjava/lang/String;I)I
+Landroid/app/IActivityManager;->broadcastIntent(Landroid/app/IApplicationThread;Landroid/content/Intent;Ljava/lang/String;Landroid/content/IIntentReceiver;ILjava/lang/String;Landroid/os/Bundle;[Ljava/lang/String;ILandroid/os/Bundle;ZZI)I
+Landroid/app/IActivityManager;->checkPermission(Ljava/lang/String;II)I
+Landroid/app/IActivityManager;->enterSafeMode()V
+Landroid/app/IActivityManager;->finishActivity(Landroid/os/IBinder;ILandroid/content/Intent;I)Z
+Landroid/app/IActivityManager;->finishHeavyWeightApp()V
+Landroid/app/IActivityManager;->finishReceiver(Landroid/os/IBinder;ILjava/lang/String;Landroid/os/Bundle;ZI)V
+Landroid/app/IActivityManager;->forceStopPackage(Ljava/lang/String;I)V
+Landroid/app/IActivityManager;->getAllStackInfos()Ljava/util/List;
+Landroid/app/IActivityManager;->getConfiguration()Landroid/content/res/Configuration;
+Landroid/app/IActivityManager;->getIntentForIntentSender(Landroid/content/IIntentSender;)Landroid/content/Intent;
+Landroid/app/IActivityManager;->getIntentSender(ILjava/lang/String;Landroid/os/IBinder;Ljava/lang/String;I[Landroid/content/Intent;[Ljava/lang/String;ILandroid/os/Bundle;I)Landroid/content/IIntentSender;
+Landroid/app/IActivityManager;->getLaunchedFromPackage(Landroid/os/IBinder;)Ljava/lang/String;
+Landroid/app/IActivityManager;->getLaunchedFromUid(Landroid/os/IBinder;)I
+Landroid/app/IActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V
+Landroid/app/IActivityManager;->getPackageProcessState(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/app/IActivityManager;->getProcessLimit()I
+Landroid/app/IActivityManager;->getProcessPss([I)[J
+Landroid/app/IActivityManager;->getProviderMimeType(Landroid/net/Uri;I)Ljava/lang/String;
+Landroid/app/IActivityManager;->getServices(II)Ljava/util/List;
+Landroid/app/IActivityManager;->getTaskBounds(I)Landroid/graphics/Rect;
+Landroid/app/IActivityManager;->getTaskForActivity(Landroid/os/IBinder;Z)I
+Landroid/app/IActivityManager;->handleApplicationStrictModeViolation(Landroid/os/IBinder;ILandroid/os/StrictMode$ViolationInfo;)V
+Landroid/app/IActivityManager;->hang(Landroid/os/IBinder;Z)V
+Landroid/app/IActivityManager;->isInLockTaskMode()Z
+Landroid/app/IActivityManager;->isIntentSenderAnActivity(Landroid/content/IIntentSender;)Z
+Landroid/app/IActivityManager;->isTopOfTask(Landroid/os/IBinder;)Z
+Landroid/app/IActivityManager;->isUserRunning(II)Z
+Landroid/app/IActivityManager;->killAllBackgroundProcesses()V
+Landroid/app/IActivityManager;->killApplicationProcess(Ljava/lang/String;I)V
+Landroid/app/IActivityManager;->killBackgroundProcesses(Ljava/lang/String;I)V
+Landroid/app/IActivityManager;->moveActivityTaskToBack(Landroid/os/IBinder;Z)Z
+Landroid/app/IActivityManager;->moveTaskToFront(IILandroid/os/Bundle;)V
+Landroid/app/IActivityManager;->moveTaskToStack(IIZ)V
+Landroid/app/IActivityManager;->moveTopActivityToPinnedStack(ILandroid/graphics/Rect;)Z
+Landroid/app/IActivityManager;->positionTaskInStack(III)V
+Landroid/app/IActivityManager;->profileControl(Ljava/lang/String;IZLandroid/app/ProfilerInfo;I)Z
+Landroid/app/IActivityManager;->publishContentProviders(Landroid/app/IApplicationThread;Ljava/util/List;)V
+Landroid/app/IActivityManager;->registerProcessObserver(Landroid/app/IProcessObserver;)V
+Landroid/app/IActivityManager;->registerReceiver(Landroid/app/IApplicationThread;Ljava/lang/String;Landroid/content/IIntentReceiver;Landroid/content/IntentFilter;Ljava/lang/String;II)Landroid/content/Intent;
+Landroid/app/IActivityManager;->registerUserSwitchObserver(Landroid/app/IUserSwitchObserver;Ljava/lang/String;)V
+Landroid/app/IActivityManager;->removeContentProviderExternal(Ljava/lang/String;Landroid/os/IBinder;)V
+Landroid/app/IActivityManager;->removeStack(I)V
+Landroid/app/IActivityManager;->requestBugReport(I)V
+Landroid/app/IActivityManager;->resizeDockedStack(Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
+Landroid/app/IActivityManager;->resizeStack(ILandroid/graphics/Rect;ZZZI)V
+Landroid/app/IActivityManager;->resizeTask(ILandroid/graphics/Rect;I)V
+Landroid/app/IActivityManager;->restart()V
+Landroid/app/IActivityManager;->resumeAppSwitches()V
+Landroid/app/IActivityManager;->sendIdleJobTrigger()V
+Landroid/app/IActivityManager;->serviceDoneExecuting(Landroid/os/IBinder;III)V
+Landroid/app/IActivityManager;->setActivityController(Landroid/app/IActivityController;Z)V
+Landroid/app/IActivityManager;->setAlwaysFinish(Z)V
+Landroid/app/IActivityManager;->setDebugApp(Ljava/lang/String;ZZ)V
+Landroid/app/IActivityManager;->setDumpHeapDebugLimit(Ljava/lang/String;IJLjava/lang/String;)V
+Landroid/app/IActivityManager;->setPackageScreenCompatMode(Ljava/lang/String;I)V
+Landroid/app/IActivityManager;->setProcessImportant(Landroid/os/IBinder;IZLjava/lang/String;)V
+Landroid/app/IActivityManager;->setProcessLimit(I)V
+Landroid/app/IActivityManager;->setProcessMemoryTrimLevel(Ljava/lang/String;II)Z
+Landroid/app/IActivityManager;->setRequestedOrientation(Landroid/os/IBinder;I)V
+Landroid/app/IActivityManager;->setTaskResizeable(II)V
+Landroid/app/IActivityManager;->shutdown(I)Z
+Landroid/app/IActivityManager;->startBinderTracking()Z
+Landroid/app/IActivityManager;->startInstrumentation(Landroid/content/ComponentName;Ljava/lang/String;ILandroid/os/Bundle;Landroid/app/IInstrumentationWatcher;Landroid/app/IUiAutomationConnection;ILjava/lang/String;)Z
+Landroid/app/IActivityManager;->startSystemLockTaskMode(I)V
+Landroid/app/IActivityManager;->startUserInBackground(I)Z
+Landroid/app/IActivityManager;->stopAppSwitches()V
+Landroid/app/IActivityManager;->stopBinderTrackingAndDump(Landroid/os/ParcelFileDescriptor;)Z
+Landroid/app/IActivityManager;->stopService(Landroid/app/IApplicationThread;Landroid/content/Intent;Ljava/lang/String;I)I
+Landroid/app/IActivityManager;->stopUser(IZLandroid/app/IStopUserCallback;)I
+Landroid/app/IActivityManager;->suppressResizeConfigChanges(Z)V
+Landroid/app/IActivityManager;->switchUser(I)Z
+Landroid/app/IActivityManager;->unbindBackupAgent(Landroid/content/pm/ApplicationInfo;)V
+Landroid/app/IActivityManager;->unbindService(Landroid/app/IServiceConnection;)Z
+Landroid/app/IActivityManager;->unhandledBack()V
+Landroid/app/IActivityManager;->unlockUser(I[B[BLandroid/os/IProgressListener;)Z
+Landroid/app/IActivityManager;->unregisterProcessObserver(Landroid/app/IProcessObserver;)V
+Landroid/app/IActivityManager;->unregisterReceiver(Landroid/content/IIntentReceiver;)V
+Landroid/app/IActivityManager;->unstableProviderDied(Landroid/os/IBinder;)V
+Landroid/app/IActivityManager;->updateConfiguration(Landroid/content/res/Configuration;)Z
+Landroid/app/IActivityManager;->updatePersistentConfiguration(Landroid/content/res/Configuration;)V
+Landroid/app/IAlarmManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/IAlarmManager$Stub;-><init>()V
+Landroid/app/IAlarmManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IAlarmManager;
+Landroid/app/IAlarmManager$Stub;->TRANSACTION_remove:I
+Landroid/app/IAlarmManager$Stub;->TRANSACTION_set:I
+Landroid/app/IAlarmManager;->getNextAlarmClock(I)Landroid/app/AlarmManager$AlarmClockInfo;
+Landroid/app/IAlarmManager;->set(Ljava/lang/String;IJJJILandroid/app/PendingIntent;Landroid/app/IAlarmListener;Ljava/lang/String;Landroid/os/WorkSource;Landroid/app/AlarmManager$AlarmClockInfo;)V
+Landroid/app/IApplicationThread;->processInBackground()V
+Landroid/app/IApplicationThread;->scheduleBindService(Landroid/os/IBinder;Landroid/content/Intent;ZI)V
+Landroid/app/IApplicationThread;->scheduleCreateService(Landroid/os/IBinder;Landroid/content/pm/ServiceInfo;Landroid/content/res/CompatibilityInfo;I)V
+Landroid/app/IApplicationThread;->scheduleExit()V
+Landroid/app/IApplicationThread;->scheduleLowMemory()V
+Landroid/app/IApplicationThread;->scheduleStopService(Landroid/os/IBinder;)V
+Landroid/app/IApplicationThread;->scheduleSuicide()V
+Landroid/app/IApplicationThread;->scheduleTrimMemory(I)V
+Landroid/app/IApplicationThread;->scheduleUnbindService(Landroid/os/IBinder;Landroid/content/Intent;)V
+Landroid/app/IApplicationThread;->updateTimeZone()V
+Landroid/app/IAppTask;->getTaskInfo()Landroid/app/ActivityManager$RecentTaskInfo;
+Landroid/app/IBackupAgent$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IBackupAgent;
+Landroid/app/IInputForwarder;->forwardEvent(Landroid/view/InputEvent;)Z
+Landroid/app/IInstrumentationWatcher$Stub;-><init>()V
+Landroid/app/IInstrumentationWatcher$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IInstrumentationWatcher;
+Landroid/app/IInstrumentationWatcher;->instrumentationFinished(Landroid/content/ComponentName;ILandroid/os/Bundle;)V
+Landroid/app/IInstrumentationWatcher;->instrumentationStatus(Landroid/content/ComponentName;ILandroid/os/Bundle;)V
+Landroid/app/INotificationManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/INotificationManager$Stub$Proxy;->areNotificationsEnabledForPackage(Ljava/lang/String;I)Z
+Landroid/app/INotificationManager$Stub;-><init>()V
+Landroid/app/INotificationManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/INotificationManager;
+Landroid/app/INotificationManager;->areNotificationsEnabledForPackage(Ljava/lang/String;I)Z
+Landroid/app/INotificationManager;->cancelAllNotifications(Ljava/lang/String;I)V
+Landroid/app/INotificationManager;->cancelNotificationWithTag(Ljava/lang/String;Ljava/lang/String;II)V
+Landroid/app/INotificationManager;->cancelToast(Ljava/lang/String;Landroid/app/ITransientNotification;)V
+Landroid/app/INotificationManager;->enqueueToast(Ljava/lang/String;Landroid/app/ITransientNotification;I)V
+Landroid/app/INotificationManager;->getActiveNotifications(Ljava/lang/String;)[Landroid/service/notification/StatusBarNotification;
+Landroid/app/INotificationManager;->getHistoricalNotifications(Ljava/lang/String;I)[Landroid/service/notification/StatusBarNotification;
+Landroid/app/INotificationManager;->getZenMode()I
+Landroid/app/INotificationManager;->getZenModeConfig()Landroid/service/notification/ZenModeConfig;
+Landroid/app/Instrumentation;->callActivityOnNewIntent(Landroid/app/Activity;Lcom/android/internal/content/ReferrerIntent;)V
+Landroid/app/Instrumentation;->checkStartActivityResult(ILjava/lang/Object;)V
+Landroid/app/Instrumentation;->execStartActivities(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;[Landroid/content/Intent;Landroid/os/Bundle;)V
+Landroid/app/Instrumentation;->execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult;
+Landroid/app/Instrumentation;->execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult;
+Landroid/app/Instrumentation;->execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;Landroid/os/UserHandle;)Landroid/app/Instrumentation$ActivityResult;
+Landroid/app/Instrumentation;->execStartActivityAsCaller(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;ZI)Landroid/app/Instrumentation$ActivityResult;
+Landroid/app/Instrumentation;->execStartActivityFromAppTask(Landroid/content/Context;Landroid/os/IBinder;Landroid/app/IAppTask;Landroid/content/Intent;Landroid/os/Bundle;)V
+Landroid/app/IntentReceiverLeaked;-><init>(Ljava/lang/String;)V
+Landroid/app/IntentService;->mServiceHandler:Landroid/app/IntentService$ServiceHandler;
+Landroid/app/IProcessObserver$Stub;-><init>()V
+Landroid/app/ISearchManager$Stub$Proxy;->getGlobalSearchActivity()Landroid/content/ComponentName;
+Landroid/app/ISearchManager$Stub$Proxy;->getWebSearchActivity()Landroid/content/ComponentName;
+Landroid/app/ISearchManager$Stub;-><init>()V
+Landroid/app/ISearchManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/ISearchManager;
+Landroid/app/ISearchManager;->getGlobalSearchActivity()Landroid/content/ComponentName;
+Landroid/app/IServiceConnection$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/IServiceConnection$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/IServiceConnection$Stub;-><init>()V
+Landroid/app/IServiceConnection$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IServiceConnection;
+Landroid/app/IServiceConnection;->connected(Landroid/content/ComponentName;Landroid/os/IBinder;Z)V
+Landroid/app/IStopUserCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/IStopUserCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/IStopUserCallback$Stub;-><init>()V
+Landroid/app/IStopUserCallback;->userStopped(I)V
+Landroid/app/ITransientNotification$Stub;-><init>()V
+Landroid/app/ITransientNotification;->hide()V
+Landroid/app/ITransientNotification;->show(Landroid/os/IBinder;)V
+Landroid/app/IUiModeManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/IUiModeManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IUiModeManager;
+Landroid/app/IUiModeManager;->disableCarMode(I)V
+Landroid/app/IUserSwitchObserver$Stub;-><init>()V
+Landroid/app/IWallpaperManager$Stub;-><init>()V
+Landroid/app/IWallpaperManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IWallpaperManager;
+Landroid/app/IWallpaperManager;->getHeightHint()I
+Landroid/app/IWallpaperManager;->getWallpaper(Ljava/lang/String;Landroid/app/IWallpaperManagerCallback;ILandroid/os/Bundle;I)Landroid/os/ParcelFileDescriptor;
+Landroid/app/IWallpaperManager;->getWallpaperInfo(I)Landroid/app/WallpaperInfo;
+Landroid/app/IWallpaperManager;->getWidthHint()I
+Landroid/app/IWallpaperManager;->setWallpaperComponent(Landroid/content/ComponentName;)V
+Landroid/app/IWallpaperManagerCallback$Stub;-><init>()V
+Landroid/app/IWallpaperManagerCallback;->onWallpaperChanged()V
+Landroid/app/job/IJobCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/job/IJobCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/job/IJobCallback$Stub;-><init>()V
+Landroid/app/job/IJobCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobCallback;
+Landroid/app/job/IJobCallback;->acknowledgeStartMessage(IZ)V
+Landroid/app/job/IJobCallback;->acknowledgeStopMessage(IZ)V
+Landroid/app/job/IJobCallback;->completeWork(II)Z
+Landroid/app/job/IJobCallback;->dequeueWork(I)Landroid/app/job/JobWorkItem;
+Landroid/app/job/IJobCallback;->jobFinished(IZ)V
+Landroid/app/job/IJobScheduler$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/job/IJobScheduler$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobScheduler;
+Landroid/app/job/IJobService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/job/IJobService$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/job/IJobService$Stub;-><init>()V
+Landroid/app/job/IJobService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobService;
+Landroid/app/job/IJobService;->startJob(Landroid/app/job/JobParameters;)V
+Landroid/app/job/IJobService;->stopJob(Landroid/app/job/JobParameters;)V
+Landroid/app/job/JobInfo$Builder;->setFlags(I)Landroid/app/job/JobInfo$Builder;
+Landroid/app/job/JobInfo$Builder;->setPriority(I)Landroid/app/job/JobInfo$Builder;
+Landroid/app/job/JobInfo;->flags:I
+Landroid/app/job/JobInfo;->FLAG_WILL_BE_FOREGROUND:I
+Landroid/app/job/JobInfo;->jobId:I
+Landroid/app/job/JobInfo;->PRIORITY_FOREGROUND_APP:I
+Landroid/app/job/JobInfo;->service:Landroid/content/ComponentName;
+Landroid/app/job/JobParameters;->callback:Landroid/os/IBinder;
+Landroid/app/job/JobParameters;->getCallback()Landroid/app/job/IJobCallback;
+Landroid/app/job/JobParameters;->jobId:I
+Landroid/app/job/JobWorkItem;-><init>(Landroid/os/Parcel;)V
+Landroid/app/job/JobWorkItem;->mDeliveryCount:I
+Landroid/app/job/JobWorkItem;->mGrants:Ljava/lang/Object;
+Landroid/app/job/JobWorkItem;->mIntent:Landroid/content/Intent;
+Landroid/app/job/JobWorkItem;->mWorkId:I
+Landroid/app/KeyguardManager;->isDeviceSecure(I)Z
+Landroid/app/LoadedApk$ReceiverDispatcher;->getIIntentReceiver()Landroid/content/IIntentReceiver;
+Landroid/app/LoadedApk$ReceiverDispatcher;->getIntentReceiver()Landroid/content/BroadcastReceiver;
+Landroid/app/LoadedApk$ReceiverDispatcher;->mContext:Landroid/content/Context;
+Landroid/app/LoadedApk$ReceiverDispatcher;->mReceiver:Landroid/content/BroadcastReceiver;
+Landroid/app/LoadedApk$ServiceDispatcher$InnerConnection;->mDispatcher:Ljava/lang/ref/WeakReference;
+Landroid/app/LoadedApk$ServiceDispatcher;-><init>(Landroid/content/ServiceConnection;Landroid/content/Context;Landroid/os/Handler;I)V
+Landroid/app/LoadedApk$ServiceDispatcher;->getIServiceConnection()Landroid/app/IServiceConnection;
+Landroid/app/LoadedApk$ServiceDispatcher;->mConnection:Landroid/content/ServiceConnection;
+Landroid/app/LoadedApk$ServiceDispatcher;->mContext:Landroid/content/Context;
+Landroid/app/LoadedApk;->getAppDir()Ljava/lang/String;
+Landroid/app/LoadedApk;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
+Landroid/app/LoadedApk;->getAssets()Landroid/content/res/AssetManager;
+Landroid/app/LoadedApk;->getClassLoader()Ljava/lang/ClassLoader;
+Landroid/app/LoadedApk;->getCompatibilityInfo()Landroid/content/res/CompatibilityInfo;
+Landroid/app/LoadedApk;->getDataDirFile()Ljava/io/File;
+Landroid/app/LoadedApk;->getOverlayDirs()[Ljava/lang/String;
+Landroid/app/LoadedApk;->getPackageName()Ljava/lang/String;
+Landroid/app/LoadedApk;->getResDir()Ljava/lang/String;
+Landroid/app/LoadedApk;->getResources()Landroid/content/res/Resources;
+Landroid/app/LoadedApk;->getServiceDispatcher(Landroid/content/ServiceConnection;Landroid/content/Context;Landroid/os/Handler;I)Landroid/app/IServiceConnection;
+Landroid/app/LoadedApk;->getSplitResDirs()[Ljava/lang/String;
+Landroid/app/LoadedApk;->mActivityThread:Landroid/app/ActivityThread;
+Landroid/app/LoadedApk;->makeApplication(ZLandroid/app/Instrumentation;)Landroid/app/Application;
+Landroid/app/LoadedApk;->mAppDir:Ljava/lang/String;
+Landroid/app/LoadedApk;->mApplication:Landroid/app/Application;
+Landroid/app/LoadedApk;->mApplicationInfo:Landroid/content/pm/ApplicationInfo;
+Landroid/app/LoadedApk;->mBaseClassLoader:Ljava/lang/ClassLoader;
+Landroid/app/LoadedApk;->mClassLoader:Ljava/lang/ClassLoader;
+Landroid/app/LoadedApk;->mDataDir:Ljava/lang/String;
+Landroid/app/LoadedApk;->mDataDirFile:Ljava/io/File;
+Landroid/app/LoadedApk;->mDisplayAdjustments:Landroid/view/DisplayAdjustments;
+Landroid/app/LoadedApk;->mLibDir:Ljava/lang/String;
+Landroid/app/LoadedApk;->mPackageName:Ljava/lang/String;
+Landroid/app/LoadedApk;->mReceivers:Landroid/util/ArrayMap;
+Landroid/app/LoadedApk;->mResDir:Ljava/lang/String;
+Landroid/app/LoadedApk;->mResources:Landroid/content/res/Resources;
+Landroid/app/LoadedApk;->mServices:Landroid/util/ArrayMap;
+Landroid/app/LoadedApk;->mSplitResDirs:[Ljava/lang/String;
+Landroid/app/LoadedApk;->rewriteRValues(Ljava/lang/ClassLoader;Ljava/lang/String;I)V
+Landroid/app/LocalActivityManager;->mActivities:Ljava/util/Map;
+Landroid/app/LocalActivityManager;->mActivityArray:Ljava/util/ArrayList;
+Landroid/app/LocalActivityManager;->moveToState(Landroid/app/LocalActivityManager$LocalActivityRecord;I)V
+Landroid/app/LocalActivityManager;->mParent:Landroid/app/Activity;
+Landroid/app/LocalActivityManager;->mResumed:Landroid/app/LocalActivityManager$LocalActivityRecord;
+Landroid/app/LocalActivityManager;->mSingleMode:Z
+Landroid/app/NativeActivity;->hideIme(I)V
+Landroid/app/NativeActivity;->loadNativeCode(Ljava/lang/String;Ljava/lang/String;Landroid/os/MessageQueue;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILandroid/content/res/AssetManager;[BLjava/lang/ClassLoader;Ljava/lang/String;)J
+Landroid/app/NativeActivity;->mNativeHandle:J
+Landroid/app/NativeActivity;->setWindowFlags(II)V
+Landroid/app/NativeActivity;->setWindowFormat(I)V
+Landroid/app/NativeActivity;->showIme(I)V
+Landroid/app/Notification$Action;->mIcon:Landroid/graphics/drawable/Icon;
+Landroid/app/Notification$Builder;->getBaseLayoutResource()I
+Landroid/app/Notification$Builder;->loadHeaderAppName()Ljava/lang/String;
+Landroid/app/Notification$Builder;->mActions:Ljava/util/ArrayList;
+Landroid/app/Notification$Builder;->makePublicContentView()Landroid/widget/RemoteViews;
+Landroid/app/Notification$MediaStyle;->buildStyled(Landroid/app/Notification;)Landroid/app/Notification;
+Landroid/app/Notification;-><init>(Landroid/content/Context;ILjava/lang/CharSequence;JLjava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/content/Intent;)V
+Landroid/app/Notification;->allPendingIntents:Landroid/util/ArraySet;
+Landroid/app/Notification;->isGroupChild()Z
+Landroid/app/Notification;->isGroupSummary()Z
+Landroid/app/Notification;->mChannelId:Ljava/lang/String;
+Landroid/app/Notification;->mGroupKey:Ljava/lang/String;
+Landroid/app/Notification;->mLargeIcon:Landroid/graphics/drawable/Icon;
+Landroid/app/Notification;->mSmallIcon:Landroid/graphics/drawable/Icon;
+Landroid/app/Notification;->setSmallIcon(Landroid/graphics/drawable/Icon;)V
+Landroid/app/NotificationChannel;->mId:Ljava/lang/String;
+Landroid/app/NotificationChannel;->setBlockableSystem(Z)V
+Landroid/app/NotificationChannelGroup;->mId:Ljava/lang/String;
+Landroid/app/NotificationManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
+Landroid/app/NotificationManager;->from(Landroid/content/Context;)Landroid/app/NotificationManager;
+Landroid/app/NotificationManager;->getService()Landroid/app/INotificationManager;
+Landroid/app/NotificationManager;->getZenModeConfig()Landroid/service/notification/ZenModeConfig;
+Landroid/app/NotificationManager;->notifyAsUser(Ljava/lang/String;ILandroid/app/Notification;Landroid/os/UserHandle;)V
+Landroid/app/NotificationManager;->setZenMode(ILandroid/net/Uri;Ljava/lang/String;)V
+Landroid/app/NotificationManager;->sService:Landroid/app/INotificationManager;
+Landroid/app/PackageDeleteObserver;-><init>()V
+Landroid/app/PackageInstallObserver;-><init>()V
+Landroid/app/PackageInstallObserver;->onPackageInstalled(Ljava/lang/String;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/app/PendingIntent;->getActivityAsUser(Landroid/content/Context;ILandroid/content/Intent;ILandroid/os/Bundle;Landroid/os/UserHandle;)Landroid/app/PendingIntent;
+Landroid/app/PendingIntent;->getBroadcastAsUser(Landroid/content/Context;ILandroid/content/Intent;ILandroid/os/UserHandle;)Landroid/app/PendingIntent;
+Landroid/app/PendingIntent;->getIntent()Landroid/content/Intent;
+Landroid/app/PendingIntent;->getTag(Ljava/lang/String;)Ljava/lang/String;
+Landroid/app/PendingIntent;->isActivity()Z
+Landroid/app/PendingIntent;->setOnMarshaledListener(Landroid/app/PendingIntent$OnMarshaledListener;)V
+Landroid/app/PictureInPictureArgs;-><init>()V
+Landroid/app/PictureInPictureArgs;->setActions(Ljava/util/List;)V
+Landroid/app/PictureInPictureArgs;->setAspectRatio(F)V
+Landroid/app/PictureInPictureParams;->getActions()Ljava/util/List;
+Landroid/app/PictureInPictureParams;->getAspectRatio()F
+Landroid/app/PictureInPictureParams;->getSourceRectHint()Landroid/graphics/Rect;
+Landroid/app/Presentation;->createPresentationContext(Landroid/content/Context;Landroid/view/Display;I)Landroid/content/Context;
+Landroid/app/ProgressDialog;->mMessageView:Landroid/widget/TextView;
+Landroid/app/ProgressDialog;->mProgress:Landroid/widget/ProgressBar;
+Landroid/app/ProgressDialog;->mProgressNumber:Landroid/widget/TextView;
+Landroid/app/QueuedWork;->addFinisher(Ljava/lang/Runnable;)V
+Landroid/app/QueuedWork;->removeFinisher(Ljava/lang/Runnable;)V
+Landroid/app/QueuedWork;->sFinishers:Ljava/util/LinkedList;
+Landroid/app/ResourcesManager;-><init>()V
+Landroid/app/ResourcesManager;->appendLibAssetForMainAssetPath(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/app/ResourcesManager;->createAssetManager(Landroid/content/res/ResourcesKey;)Landroid/content/res/AssetManager;
+Landroid/app/ResourcesManager;->getInstance()Landroid/app/ResourcesManager;
+Landroid/app/ResourcesManager;->mActivityResourceReferences:Ljava/util/WeakHashMap;
+Landroid/app/ResourcesManager;->mResConfiguration:Landroid/content/res/Configuration;
+Landroid/app/ResourcesManager;->mResourceImpls:Landroid/util/ArrayMap;
+Landroid/app/ResourcesManager;->mResourceReferences:Ljava/util/ArrayList;
+Landroid/app/ResultInfo;-><init>(Ljava/lang/String;IILandroid/content/Intent;)V
+Landroid/app/ResultInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/app/ResultInfo;->mData:Landroid/content/Intent;
+Landroid/app/ResultInfo;->mRequestCode:I
+Landroid/app/ResultInfo;->mResultWho:Ljava/lang/String;
+Landroid/app/SearchableInfo$ActionKeyInfo;->getQueryActionMsg()Ljava/lang/String;
+Landroid/app/SearchableInfo$ActionKeyInfo;->getSuggestActionMsg()Ljava/lang/String;
+Landroid/app/SearchableInfo$ActionKeyInfo;->getSuggestActionMsgColumn()Ljava/lang/String;
+Landroid/app/SearchableInfo;->findActionKey(I)Landroid/app/SearchableInfo$ActionKeyInfo;
+Landroid/app/SearchableInfo;->getActivityContext(Landroid/content/Context;)Landroid/content/Context;
+Landroid/app/SearchableInfo;->getIconId()I
+Landroid/app/SearchableInfo;->getLabelId()I
+Landroid/app/SearchableInfo;->getProviderContext(Landroid/content/Context;Landroid/content/Context;)Landroid/content/Context;
+Landroid/app/SearchDialog;->isLandscapeMode(Landroid/content/Context;)Z
+Landroid/app/SearchDialog;->launchQuerySearch()V
+Landroid/app/SearchDialog;->launchQuerySearch(ILjava/lang/String;)V
+Landroid/app/SearchDialog;->setWorking(Z)V
+Landroid/app/SearchManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
+Landroid/app/SearchManager;->DISABLE_VOICE_SEARCH:Ljava/lang/String;
+Landroid/app/SearchManager;->getSuggestions(Landroid/app/SearchableInfo;Ljava/lang/String;)Landroid/database/Cursor;
+Landroid/app/SearchManager;->getSuggestions(Landroid/app/SearchableInfo;Ljava/lang/String;I)Landroid/database/Cursor;
+Landroid/app/SearchManager;->getWebSearchActivity()Landroid/content/ComponentName;
+Landroid/app/SearchManager;->isVisible()Z
+Landroid/app/SearchManager;->launchAssist(Landroid/os/Bundle;)V
+Landroid/app/SearchManager;->mSearchDialog:Landroid/app/SearchDialog;
+Landroid/app/SearchManager;->startSearch(Ljava/lang/String;ZLandroid/content/ComponentName;Landroid/os/Bundle;ZLandroid/graphics/Rect;)V
+Landroid/app/Service;->attach(Landroid/content/Context;Landroid/app/ActivityThread;Ljava/lang/String;Landroid/os/IBinder;Landroid/app/Application;Ljava/lang/Object;)V
+Landroid/app/Service;->mActivityManager:Landroid/app/IActivityManager;
+Landroid/app/Service;->mApplication:Landroid/app/Application;
+Landroid/app/Service;->mClassName:Ljava/lang/String;
+Landroid/app/Service;->mStartCompatibility:Z
+Landroid/app/Service;->mThread:Landroid/app/ActivityThread;
+Landroid/app/Service;->mToken:Landroid/os/IBinder;
+Landroid/app/Service;->setForeground(Z)V
+Landroid/app/ServiceConnectionLeaked;-><init>(Ljava/lang/String;)V
+Landroid/app/SharedPreferencesImpl;-><init>(Ljava/io/File;I)V
+Landroid/app/SharedPreferencesImpl;->mFile:Ljava/io/File;
+Landroid/app/SharedPreferencesImpl;->startReloadIfChangedUnexpectedly()V
+Landroid/app/StatusBarManager;-><init>(Landroid/content/Context;)V
+Landroid/app/StatusBarManager;->collapsePanels()V
+Landroid/app/StatusBarManager;->disable(I)V
+Landroid/app/StatusBarManager;->DISABLE_EXPAND:I
+Landroid/app/StatusBarManager;->DISABLE_NONE:I
+Landroid/app/StatusBarManager;->DISABLE_NOTIFICATION_TICKER:I
+Landroid/app/StatusBarManager;->expandNotificationsPanel()V
+Landroid/app/StatusBarManager;->expandSettingsPanel()V
+Landroid/app/StatusBarManager;->expandSettingsPanel(Ljava/lang/String;)V
+Landroid/app/StatusBarManager;->getService()Lcom/android/internal/statusbar/IStatusBarService;
+Landroid/app/StatusBarManager;->mContext:Landroid/content/Context;
+Landroid/app/StatusBarManager;->mToken:Landroid/os/IBinder;
+Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
+Landroid/app/TaskStackListener;-><init>()V
+Landroid/app/TimePickerDialog;->mTimePicker:Landroid/widget/TimePicker;
+Landroid/app/trust/ITrustManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/trust/TrustManager;->reportUnlockAttempt(ZI)V
+Landroid/app/UiAutomation;-><init>(Landroid/os/Looper;Landroid/app/IUiAutomationConnection;)V
+Landroid/app/UiAutomation;->connect()V
+Landroid/app/UiAutomation;->disconnect()V
+Landroid/app/UiAutomationConnection;-><init>()V
+Landroid/app/UiModeManager;-><init>()V
+Landroid/app/usage/ConfigurationStats;->mActivationCount:I
+Landroid/app/usage/ConfigurationStats;->mBeginTimeStamp:J
+Landroid/app/usage/ConfigurationStats;->mConfiguration:Landroid/content/res/Configuration;
+Landroid/app/usage/ConfigurationStats;->mEndTimeStamp:J
+Landroid/app/usage/ConfigurationStats;->mLastTimeActive:J
+Landroid/app/usage/ConfigurationStats;->mTotalTimeActive:J
+Landroid/app/usage/IUsageStatsManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/usage/IUsageStatsManager;
+Landroid/app/usage/IUsageStatsManager;->isAppInactive(Ljava/lang/String;I)Z
+Landroid/app/usage/IUsageStatsManager;->queryConfigurationStats(IJJLjava/lang/String;)Landroid/content/pm/ParceledListSlice;
+Landroid/app/usage/IUsageStatsManager;->queryUsageStats(IJJLjava/lang/String;)Landroid/content/pm/ParceledListSlice;
+Landroid/app/usage/IUsageStatsManager;->setAppInactive(Ljava/lang/String;ZI)V
+Landroid/app/usage/NetworkStatsManager;-><init>(Landroid/content/Context;)V
+Landroid/app/usage/UsageEvents$Event;->mClass:Ljava/lang/String;
+Landroid/app/usage/UsageEvents$Event;->mConfiguration:Landroid/content/res/Configuration;
+Landroid/app/usage/UsageEvents$Event;->mEventType:I
+Landroid/app/usage/UsageEvents$Event;->mPackage:Ljava/lang/String;
+Landroid/app/usage/UsageEvents$Event;->mTimeStamp:J
+Landroid/app/usage/UsageEvents;-><init>(Landroid/os/Parcel;)V
+Landroid/app/usage/UsageEvents;->findStringIndex(Ljava/lang/String;)I
+Landroid/app/usage/UsageEvents;->mEventCount:I
+Landroid/app/usage/UsageEvents;->mEventsToWrite:Ljava/util/List;
+Landroid/app/usage/UsageEvents;->mIndex:I
+Landroid/app/usage/UsageEvents;->mParcel:Landroid/os/Parcel;
+Landroid/app/usage/UsageEvents;->mStringPool:[Ljava/lang/String;
+Landroid/app/usage/UsageEvents;->readEventFromParcel(Landroid/os/Parcel;Landroid/app/usage/UsageEvents$Event;)V
+Landroid/app/usage/UsageEvents;->writeEventToParcel(Landroid/app/usage/UsageEvents$Event;Landroid/os/Parcel;I)V
+Landroid/app/usage/UsageStats;->mBeginTimeStamp:J
+Landroid/app/usage/UsageStats;->mEndTimeStamp:J
+Landroid/app/usage/UsageStats;->mLastEvent:I
+Landroid/app/usage/UsageStats;->mLastTimeUsed:J
+Landroid/app/usage/UsageStats;->mLaunchCount:I
+Landroid/app/usage/UsageStats;->mPackageName:Ljava/lang/String;
+Landroid/app/usage/UsageStats;->mTotalTimeInForeground:J
+Landroid/app/usage/UsageStatsManager;->mContext:Landroid/content/Context;
+Landroid/app/usage/UsageStatsManager;->mService:Landroid/app/usage/IUsageStatsManager;
+Landroid/app/usage/UsageStatsManager;->sEmptyResults:Landroid/app/usage/UsageEvents;
+Landroid/app/UserSwitchObserver;-><init>()V
+Landroid/app/VrManager;->mService:Landroid/service/vr/IVrManager;
+Landroid/app/WallpaperColors;->getColorHints()I
+Landroid/app/WallpaperManager;->addOnColorsChangedListener(Landroid/app/WallpaperManager$OnColorsChangedListener;Landroid/os/Handler;I)V
+Landroid/app/WallpaperManager;->getBitmap()Landroid/graphics/Bitmap;
+Landroid/app/WallpaperManager;->getIWallpaperManager()Landroid/app/IWallpaperManager;
+Landroid/app/WallpaperManager;->getWallpaperColors(II)Landroid/app/WallpaperColors;
+Landroid/app/WallpaperManager;->getWallpaperFile(II)Landroid/os/ParcelFileDescriptor;
+Landroid/app/WallpaperManager;->openDefaultWallpaper(Landroid/content/Context;I)Ljava/io/InputStream;
+Landroid/app/WallpaperManager;->setBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;ZII)I
+Landroid/app/WallpaperManager;->setWallpaperComponent(Landroid/content/ComponentName;I)Z
+Landroid/app/WallpaperManager;->sGlobals:Landroid/app/WallpaperManager$Globals;
+Landroid/appwidget/AppWidgetHost;-><init>(Landroid/content/Context;ILandroid/widget/RemoteViews$OnClickHandler;Landroid/os/Looper;)V
+Landroid/appwidget/AppWidgetHost;->HANDLE_VIEW_DATA_CHANGED:I
+Landroid/appwidget/AppWidgetHost;->mHandler:Landroid/os/Handler;
+Landroid/appwidget/AppWidgetHost;->sService:Lcom/android/internal/appwidget/IAppWidgetService;
+Landroid/appwidget/AppWidgetHostView;->mAppWidgetId:I
+Landroid/appwidget/AppWidgetHostView;->mInfo:Landroid/appwidget/AppWidgetProviderInfo;
+Landroid/appwidget/AppWidgetHostView;->updateAppWidgetSize(Landroid/os/Bundle;IIIIZ)V
+Landroid/appwidget/AppWidgetManager;->bindAppWidgetId(ILandroid/content/ComponentName;)V
+Landroid/appwidget/AppWidgetManager;->bindAppWidgetId(ILandroid/content/ComponentName;Landroid/os/Bundle;)V
+Landroid/appwidget/AppWidgetManager;->bindAppWidgetIdIfAllowed(IILandroid/content/ComponentName;Landroid/os/Bundle;)Z
+Landroid/appwidget/AppWidgetManager;->getInstalledProviders(I)Ljava/util/List;
+Landroid/appwidget/AppWidgetManager;->getInstalledProvidersForProfile(ILandroid/os/UserHandle;Ljava/lang/String;)Ljava/util/List;
+Landroid/appwidget/AppWidgetManager;->mService:Lcom/android/internal/appwidget/IAppWidgetService;
+Landroid/appwidget/AppWidgetProviderInfo;->providerInfo:Landroid/content/pm/ActivityInfo;
+Landroid/bluetooth/BluetoothA2dp;->ACTION_ACTIVE_DEVICE_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothA2dp;->ACTION_CODEC_CONFIG_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothA2dp;->close()V
+Landroid/bluetooth/BluetoothA2dp;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothA2dp;->disableOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)V
+Landroid/bluetooth/BluetoothA2dp;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothA2dp;->enableOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)V
+Landroid/bluetooth/BluetoothA2dp;->getActiveDevice()Landroid/bluetooth/BluetoothDevice;
+Landroid/bluetooth/BluetoothA2dp;->getCodecStatus(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothCodecStatus;
+Landroid/bluetooth/BluetoothA2dp;->getOptionalCodecsEnabled(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothA2dp;->getPriority(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_NOT_SUPPORTED:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_PREF_DISABLED:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_PREF_ENABLED:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_PREF_UNKNOWN:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_SUPPORTED:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_SUPPORT_UNKNOWN:I
+Landroid/bluetooth/BluetoothA2dp;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothA2dp;->setCodecConfigPreference(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothCodecConfig;)V
+Landroid/bluetooth/BluetoothA2dp;->setOptionalCodecsEnabled(Landroid/bluetooth/BluetoothDevice;I)V
+Landroid/bluetooth/BluetoothA2dp;->stateToString(I)Ljava/lang/String;
+Landroid/bluetooth/BluetoothA2dp;->supportsOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothA2dpSink;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothAdapter;->disable(Z)Z
+Landroid/bluetooth/BluetoothAdapter;->factoryReset()Z
+Landroid/bluetooth/BluetoothAdapter;->getBluetoothManager()Landroid/bluetooth/IBluetoothManager;
+Landroid/bluetooth/BluetoothAdapter;->getBluetoothService(Landroid/bluetooth/IBluetoothManagerCallback;)Landroid/bluetooth/IBluetooth;
+Landroid/bluetooth/BluetoothAdapter;->getConnectionState()I
+Landroid/bluetooth/BluetoothAdapter;->getDiscoverableTimeout()I
+Landroid/bluetooth/BluetoothAdapter;->getLeState()I
+Landroid/bluetooth/BluetoothAdapter;->getUuids()[Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothAdapter;->listenUsingEncryptedRfcommWithServiceRecord(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;
+Landroid/bluetooth/BluetoothAdapter;->listenUsingRfcommOn(IZZ)Landroid/bluetooth/BluetoothServerSocket;
+Landroid/bluetooth/BluetoothAdapter;->mService:Landroid/bluetooth/IBluetooth;
+Landroid/bluetooth/BluetoothAdapter;->setDiscoverableTimeout(I)V
+Landroid/bluetooth/BluetoothAdapter;->setScanMode(I)Z
+Landroid/bluetooth/BluetoothAdapter;->setScanMode(II)Z
+Landroid/bluetooth/BluetoothClass;-><init>(I)V
+Landroid/bluetooth/BluetoothClass;->doesClassMatch(I)Z
+Landroid/bluetooth/BluetoothClass;->PROFILE_A2DP:I
+Landroid/bluetooth/BluetoothClass;->PROFILE_HEADSET:I
+Landroid/bluetooth/BluetoothCodecConfig;
+Landroid/bluetooth/BluetoothCodecConfig;-><init>(IIIIIJJJJ)V
+Landroid/bluetooth/BluetoothCodecConfig;->BITS_PER_SAMPLE_16:I
+Landroid/bluetooth/BluetoothCodecConfig;->BITS_PER_SAMPLE_24:I
+Landroid/bluetooth/BluetoothCodecConfig;->BITS_PER_SAMPLE_32:I
+Landroid/bluetooth/BluetoothCodecConfig;->BITS_PER_SAMPLE_NONE:I
+Landroid/bluetooth/BluetoothCodecConfig;->CHANNEL_MODE_MONO:I
+Landroid/bluetooth/BluetoothCodecConfig;->CHANNEL_MODE_NONE:I
+Landroid/bluetooth/BluetoothCodecConfig;->CHANNEL_MODE_STEREO:I
+Landroid/bluetooth/BluetoothCodecConfig;->CODEC_PRIORITY_DEFAULT:I
+Landroid/bluetooth/BluetoothCodecConfig;->CODEC_PRIORITY_DISABLED:I
+Landroid/bluetooth/BluetoothCodecConfig;->CODEC_PRIORITY_HIGHEST:I
+Landroid/bluetooth/BluetoothCodecConfig;->getBitsPerSample()I
+Landroid/bluetooth/BluetoothCodecConfig;->getChannelMode()I
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecPriority()I
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecSpecific1()J
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecSpecific2()J
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecSpecific3()J
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecSpecific4()J
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecType()I
+Landroid/bluetooth/BluetoothCodecConfig;->getSampleRate()I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_176400:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_192000:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_44100:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_48000:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_88200:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_96000:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_NONE:I
+Landroid/bluetooth/BluetoothCodecConfig;->setCodecPriority(I)V
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_AAC:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_APTX:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_APTX_HD:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_INVALID:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_LDAC:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_MAX:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_SBC:I
+Landroid/bluetooth/BluetoothCodecStatus;
+Landroid/bluetooth/BluetoothCodecStatus;->EXTRA_CODEC_STATUS:Ljava/lang/String;
+Landroid/bluetooth/BluetoothCodecStatus;->getCodecConfig()Landroid/bluetooth/BluetoothCodecConfig;
+Landroid/bluetooth/BluetoothCodecStatus;->getCodecsLocalCapabilities()[Landroid/bluetooth/BluetoothCodecConfig;
+Landroid/bluetooth/BluetoothCodecStatus;->getCodecsSelectableCapabilities()[Landroid/bluetooth/BluetoothCodecConfig;
+Landroid/bluetooth/BluetoothDevice;-><init>(Ljava/lang/String;)V
+Landroid/bluetooth/BluetoothDevice;->ACTION_ALIAS_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->ACTION_DISAPPEARED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->ACTION_PAIRING_CANCEL:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->ACTION_SDP_RECORD:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->cancelPairingUserInput()Z
+Landroid/bluetooth/BluetoothDevice;->connectGatt(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;IZILandroid/os/Handler;)Landroid/bluetooth/BluetoothGatt;
+Landroid/bluetooth/BluetoothDevice;->convertPinToBytes(Ljava/lang/String;)[B
+Landroid/bluetooth/BluetoothDevice;->createBond(I)Z
+Landroid/bluetooth/BluetoothDevice;->createInsecureRfcommSocket(I)Landroid/bluetooth/BluetoothSocket;
+Landroid/bluetooth/BluetoothDevice;->createRfcommSocket(I)Landroid/bluetooth/BluetoothSocket;
+Landroid/bluetooth/BluetoothDevice;->createScoSocket()Landroid/bluetooth/BluetoothSocket;
+Landroid/bluetooth/BluetoothDevice;->EXTRA_REASON:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->EXTRA_SDP_SEARCH_STATUS:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->getAlias()Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->getAliasName()Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->getBatteryLevel()I
+Landroid/bluetooth/BluetoothDevice;->getMessageAccessPermission()I
+Landroid/bluetooth/BluetoothDevice;->getPhonebookAccessPermission()I
+Landroid/bluetooth/BluetoothDevice;->getService()Landroid/bluetooth/IBluetooth;
+Landroid/bluetooth/BluetoothDevice;->isBluetoothDock()Z
+Landroid/bluetooth/BluetoothDevice;->isBondingInitiatedLocally()Z
+Landroid/bluetooth/BluetoothDevice;->setAlias(Ljava/lang/String;)Z
+Landroid/bluetooth/BluetoothDevice;->setMessageAccessPermission(I)Z
+Landroid/bluetooth/BluetoothDevice;->setPasskey(I)Z
+Landroid/bluetooth/BluetoothDevice;->setSimAccessPermission(I)Z
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_AUTH_FAILED:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_AUTH_REJECTED:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_AUTH_TIMEOUT:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_DISCOVERY_IN_PROGRESS:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_REMOTE_AUTH_CANCELED:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_REMOTE_DEVICE_DOWN:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_REPEATED_ATTEMPTS:I
+Landroid/bluetooth/BluetoothGatt;->connect(Ljava/lang/Boolean;Landroid/bluetooth/BluetoothGattCallback;Landroid/os/Handler;)Z
+Landroid/bluetooth/BluetoothGatt;->mAuthRetryState:I
+Landroid/bluetooth/BluetoothGatt;->mAutoConnect:Z
+Landroid/bluetooth/BluetoothGatt;->mCallback:Landroid/bluetooth/BluetoothGattCallback;
+Landroid/bluetooth/BluetoothGatt;->mClientIf:I
+Landroid/bluetooth/BluetoothGatt;->mDeviceBusy:Ljava/lang/Boolean;
+Landroid/bluetooth/BluetoothGatt;->mService:Landroid/bluetooth/IBluetoothGatt;
+Landroid/bluetooth/BluetoothGatt;->mTransport:I
+Landroid/bluetooth/BluetoothGatt;->refresh()Z
+Landroid/bluetooth/BluetoothGatt;->unregisterApp()V
+Landroid/bluetooth/BluetoothGattCharacteristic;->mInstance:I
+Landroid/bluetooth/BluetoothGattCharacteristic;->mService:Landroid/bluetooth/BluetoothGattService;
+Landroid/bluetooth/BluetoothGattCharacteristic;->setKeySize(I)V
+Landroid/bluetooth/BluetoothGattCharacteristic;->setService(Landroid/bluetooth/BluetoothGattService;)V
+Landroid/bluetooth/BluetoothGattDescriptor;->mCharacteristic:Landroid/bluetooth/BluetoothGattCharacteristic;
+Landroid/bluetooth/BluetoothGattDescriptor;->mInstance:I
+Landroid/bluetooth/BluetoothGattDescriptor;->setCharacteristic(Landroid/bluetooth/BluetoothGattCharacteristic;)V
+Landroid/bluetooth/BluetoothGattService;->mDevice:Landroid/bluetooth/BluetoothDevice;
+Landroid/bluetooth/BluetoothGattService;->setAdvertisePreferred(Z)V
+Landroid/bluetooth/BluetoothGattService;->setInstanceId(I)V
+Landroid/bluetooth/BluetoothHeadset;->ACTION_ACTIVE_DEVICE_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothHeadset;->close()V
+Landroid/bluetooth/BluetoothHeadset;->connectAudio()Z
+Landroid/bluetooth/BluetoothHeadset;->disconnectAudio()Z
+Landroid/bluetooth/BluetoothHeadset;->getActiveDevice()Landroid/bluetooth/BluetoothDevice;
+Landroid/bluetooth/BluetoothHeadset;->getAudioState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothHeadset;->getPriority(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothHeadset;->isEnabled()Z
+Landroid/bluetooth/BluetoothHeadset;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothHeadset;->startScoUsingVirtualVoiceCall()Z
+Landroid/bluetooth/BluetoothHeadset;->stopScoUsingVirtualVoiceCall()Z
+Landroid/bluetooth/BluetoothHeadsetClient;->acceptCall(Landroid/bluetooth/BluetoothDevice;I)Z
+Landroid/bluetooth/BluetoothHeadsetClient;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothHeadsetClient;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothHeadsetClient;->getAudioState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothHeadsetClient;->rejectCall(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothHeadsetClientCall;->getId()I
+Landroid/bluetooth/BluetoothHeadsetClientCall;->getNumber()Ljava/lang/String;
+Landroid/bluetooth/BluetoothHeadsetClientCall;->getState()I
+Landroid/bluetooth/BluetoothHeadsetClientCall;->isMultiParty()Z
+Landroid/bluetooth/BluetoothHeadsetClientCall;->isOutgoing()Z
+Landroid/bluetooth/BluetoothHearingAid;->ACTION_ACTIVE_DEVICE_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothHearingAid;->getActiveDevices()Ljava/util/List;
+Landroid/bluetooth/BluetoothHearingAid;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothMap;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothMapClient;->sendMessage(Landroid/bluetooth/BluetoothDevice;[Landroid/net/Uri;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)Z
+Landroid/bluetooth/BluetoothPan;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V
+Landroid/bluetooth/BluetoothPan;->close()V
+Landroid/bluetooth/BluetoothPan;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothPan;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothPan;->doBind()Z
+Landroid/bluetooth/BluetoothPan;->isEnabled()Z
+Landroid/bluetooth/BluetoothPan;->isTetheringOn()Z
+Landroid/bluetooth/BluetoothPan;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothPan;->log(Ljava/lang/String;)V
+Landroid/bluetooth/BluetoothPan;->setBluetoothTethering(Z)V
+Landroid/bluetooth/BluetoothPbap;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothProfile;->A2DP_SINK:I
+Landroid/bluetooth/BluetoothProfile;->AVRCP_CONTROLLER:I
+Landroid/bluetooth/BluetoothProfile;->PAN:I
+Landroid/bluetooth/BluetoothProfile;->PRIORITY_AUTO_CONNECT:I
+Landroid/bluetooth/BluetoothProfile;->PRIORITY_UNDEFINED:I
+Landroid/bluetooth/BluetoothSap;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothServerSocket;->mSocket:Landroid/bluetooth/BluetoothSocket;
+Landroid/bluetooth/BluetoothSocket;->EADDRINUSE:I
+Landroid/bluetooth/BluetoothSocket;->flush()V
+Landroid/bluetooth/BluetoothSocket;->mPfd:Landroid/os/ParcelFileDescriptor;
+Landroid/bluetooth/BluetoothSocket;->mPort:I
+Landroid/bluetooth/BluetoothSocket;->mSocket:Landroid/net/LocalSocket;
+Landroid/bluetooth/BluetoothUuid;->AdvAudioDist:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->AudioSink:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->containsAnyUuid([Landroid/os/ParcelUuid;[Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->Handsfree:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->Hogp:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->HSP:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->is16BitUuid(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->is32BitUuid(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->isAdvAudioDist(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->isAudioSource(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->isAvrcpTarget(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->isUuidPresent([Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->NAP:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->ObexObjectPush:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->PBAP_PSE:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->RESERVED_UUIDS:[Landroid/os/ParcelUuid;
+Landroid/bluetooth/IBluetooth$Stub$Proxy;->getAddress()Ljava/lang/String;
+Landroid/bluetooth/IBluetooth$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetooth$Stub;-><init>()V
+Landroid/bluetooth/IBluetooth$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetooth;
+Landroid/bluetooth/IBluetooth;->getAddress()Ljava/lang/String;
+Landroid/bluetooth/IBluetooth;->getRemoteAlias(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
+Landroid/bluetooth/IBluetooth;->isEnabled()Z
+Landroid/bluetooth/IBluetoothA2dp$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothA2dp$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothA2dp;
+Landroid/bluetooth/IBluetoothA2dp;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/IBluetoothA2dp;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/IBluetoothA2dp;->getConnectedDevices()Ljava/util/List;
+Landroid/bluetooth/IBluetoothA2dp;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetoothA2dp;->getDevicesMatchingConnectionStates([I)Ljava/util/List;
+Landroid/bluetooth/IBluetoothA2dp;->getPriority(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetoothCallback$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothGatt;->registerClient(Landroid/os/ParcelUuid;Landroid/bluetooth/IBluetoothGattCallback;)V
+Landroid/bluetooth/IBluetoothGatt;->unregisterClient(I)V
+Landroid/bluetooth/IBluetoothGattCallback$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothGattCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothGattCallback;
+Landroid/bluetooth/IBluetoothHeadset$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHeadset;
+Landroid/bluetooth/IBluetoothHeadset;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/IBluetoothHeadset;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/IBluetoothHeadset;->getConnectedDevices()Ljava/util/List;
+Landroid/bluetooth/IBluetoothHeadset;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetoothHeadset;->getPriority(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetoothHeadset;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z
+Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/bluetooth/IBluetoothManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothManager;
+Landroid/bluetooth/IBluetoothManager;->getBluetoothGatt()Landroid/bluetooth/IBluetoothGatt;
+Landroid/bluetooth/IBluetoothManager;->registerStateChangeCallback(Landroid/bluetooth/IBluetoothStateChangeCallback;)V
+Landroid/bluetooth/IBluetoothManager;->unregisterStateChangeCallback(Landroid/bluetooth/IBluetoothStateChangeCallback;)V
+Landroid/bluetooth/IBluetoothManagerCallback$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothPbap$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothPbap;
+Landroid/bluetooth/IBluetoothStateChangeCallback$Stub;-><init>()V
+Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
+Landroid/content/AsyncTaskLoader;->mExecutor:Ljava/util/concurrent/Executor;
+Landroid/content/AsyncTaskLoader;->waitForLoader()V
+Landroid/content/BroadcastReceiver$PendingResult;-><init>(ILjava/lang/String;Landroid/os/Bundle;IZZLandroid/os/IBinder;II)V
+Landroid/content/BroadcastReceiver$PendingResult;->mAbortBroadcast:Z
+Landroid/content/BroadcastReceiver$PendingResult;->mFinished:Z
+Landroid/content/BroadcastReceiver$PendingResult;->mFlags:I
+Landroid/content/BroadcastReceiver$PendingResult;->mInitialStickyHint:Z
+Landroid/content/BroadcastReceiver$PendingResult;->mOrderedHint:Z
+Landroid/content/BroadcastReceiver$PendingResult;->mResultCode:I
+Landroid/content/BroadcastReceiver$PendingResult;->mResultData:Ljava/lang/String;
+Landroid/content/BroadcastReceiver$PendingResult;->mResultExtras:Landroid/os/Bundle;
+Landroid/content/BroadcastReceiver$PendingResult;->mSendingUser:I
+Landroid/content/BroadcastReceiver$PendingResult;->mToken:Landroid/os/IBinder;
+Landroid/content/BroadcastReceiver$PendingResult;->mType:I
+Landroid/content/BroadcastReceiver;->getPendingResult()Landroid/content/BroadcastReceiver$PendingResult;
+Landroid/content/BroadcastReceiver;->mPendingResult:Landroid/content/BroadcastReceiver$PendingResult;
+Landroid/content/BroadcastReceiver;->setPendingResult(Landroid/content/BroadcastReceiver$PendingResult;)V
+Landroid/content/ClipboardManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
+Landroid/content/ClipboardManager;->reportPrimaryClipChanged()V
+Landroid/content/ClipData$Item;->mUri:Landroid/net/Uri;
+Landroid/content/ClipData;->getIcon()Landroid/graphics/Bitmap;
+Landroid/content/ComponentName;->appendShortString(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/content/ComponentName;->printShortString(Ljava/io/PrintWriter;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/content/ContentProvider;->coerceToLocalContentProvider(Landroid/content/IContentProvider;)Landroid/content/ContentProvider;
+Landroid/content/ContentProvider;->mAuthorities:[Ljava/lang/String;
+Landroid/content/ContentProvider;->mAuthority:Ljava/lang/String;
+Landroid/content/ContentProvider;->maybeAddUserId(Landroid/net/Uri;I)Landroid/net/Uri;
+Landroid/content/ContentProvider;->mContext:Landroid/content/Context;
+Landroid/content/ContentProvider;->mPathPermissions:[Landroid/content/pm/PathPermission;
+Landroid/content/ContentProvider;->mReadPermission:Ljava/lang/String;
+Landroid/content/ContentProvider;->mWritePermission:Ljava/lang/String;
+Landroid/content/ContentProvider;->setAppOps(II)V
+Landroid/content/ContentProviderClient;->mContentProvider:Landroid/content/IContentProvider;
+Landroid/content/ContentProviderClient;->mPackageName:Ljava/lang/String;
+Landroid/content/ContentProviderNative;->asInterface(Landroid/os/IBinder;)Landroid/content/IContentProvider;
+Landroid/content/ContentProviderOperation;->getType()I
+Landroid/content/ContentProviderOperation;->mSelection:Ljava/lang/String;
+Landroid/content/ContentProviderOperation;->mType:I
+Landroid/content/ContentProviderOperation;->mUri:Landroid/net/Uri;
+Landroid/content/ContentProviderOperation;->TYPE_DELETE:I
+Landroid/content/ContentProviderOperation;->TYPE_INSERT:I
+Landroid/content/ContentProviderOperation;->TYPE_UPDATE:I
+Landroid/content/ContentResolver$OpenResourceIdResult;->id:I
+Landroid/content/ContentResolver$OpenResourceIdResult;->r:Landroid/content/res/Resources;
+Landroid/content/ContentResolver;->acquireExistingProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireExistingProvider(Landroid/net/Uri;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireProvider(Landroid/net/Uri;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireProvider(Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireUnstableProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireUnstableProvider(Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->getContentService()Landroid/content/IContentService;
+Landroid/content/ContentResolver;->getPackageName()Ljava/lang/String;
+Landroid/content/ContentResolver;->getResourceId(Landroid/net/Uri;)Landroid/content/ContentResolver$OpenResourceIdResult;
+Landroid/content/ContentResolver;->getSyncStatus(Landroid/accounts/Account;Ljava/lang/String;)Landroid/content/SyncStatusInfo;
+Landroid/content/ContentResolver;->getSyncStatusAsUser(Landroid/accounts/Account;Ljava/lang/String;I)Landroid/content/SyncStatusInfo;
+Landroid/content/ContentResolver;->mContext:Landroid/content/Context;
+Landroid/content/ContentResolver;->mPackageName:Ljava/lang/String;
+Landroid/content/ContentResolver;->releaseProvider(Landroid/content/IContentProvider;)Z
+Landroid/content/ContentResolver;->releaseUnstableProvider(Landroid/content/IContentProvider;)Z
+Landroid/content/ContentResolver;->sContentService:Landroid/content/IContentService;
+Landroid/content/ContentResolver;->SYNC_ERROR_SYNC_ALREADY_IN_PROGRESS:I
+Landroid/content/ContentResolver;->SYNC_OBSERVER_TYPE_STATUS:I
+Landroid/content/ContentResolver;->unstableProviderDied(Landroid/content/IContentProvider;)V
+Landroid/content/ContentValues;-><init>(Ljava/util/HashMap;)V
+Landroid/content/ContentValues;->mValues:Ljava/util/HashMap;
+Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z
+Landroid/content/Context;->canStartActivityForResult()Z
+Landroid/content/Context;->checkPermission(Ljava/lang/String;IILandroid/os/IBinder;)I
+Landroid/content/Context;->COUNTRY_DETECTOR:Ljava/lang/String;
+Landroid/content/Context;->createApplicationContext(Landroid/content/pm/ApplicationInfo;I)Landroid/content/Context;
+Landroid/content/Context;->ETHERNET_SERVICE:Ljava/lang/String;
+Landroid/content/Context;->getBasePackageName()Ljava/lang/String;
+Landroid/content/Context;->getDisplay()Landroid/view/Display;
+Landroid/content/Context;->getSharedPrefsFile(Ljava/lang/String;)Ljava/io/File;
+Landroid/content/Context;->getThemeResId()I
+Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;Ljava/lang/String;I)V
+Landroid/content/Context;->sendBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;I)V
+Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;ILandroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/content/Context;->sendOrderedBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;ILandroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/content/Context;->sendOrderedBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;ILandroid/os/Bundle;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/content/Context;->startActivityAsUser(Landroid/content/Intent;Landroid/os/Bundle;Landroid/os/UserHandle;)V
+Landroid/content/Context;->startActivityForResult(Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)V
+Landroid/content/Context;->STATUS_BAR_SERVICE:Ljava/lang/String;
+Landroid/content/ContextWrapper;->getBasePackageName()Ljava/lang/String;
+Landroid/content/ContextWrapper;->getDisplay()Landroid/view/Display;
+Landroid/content/ContextWrapper;->mBase:Landroid/content/Context;
+Landroid/content/ContextWrapper;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
+Landroid/content/ContextWrapper;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
+Landroid/content/ContextWrapper;->startForegroundServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
+Landroid/content/ContextWrapper;->startServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
+Landroid/content/CursorEntityIterator;-><init>(Landroid/database/Cursor;)V
+Landroid/content/CursorLoader;->mCancellationSignal:Landroid/os/CancellationSignal;
+Landroid/content/CursorLoader;->mObserver:Landroid/content/Loader$ForceLoadContentObserver;
+Landroid/content/Entity;->mSubValues:Ljava/util/ArrayList;
+Landroid/content/Entity;->mValues:Landroid/content/ContentValues;
+Landroid/content/IClipboard$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/IClipboard$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IClipboard;
+Landroid/content/IContentProvider;->bulkInsert(Ljava/lang/String;Landroid/net/Uri;[Landroid/content/ContentValues;)I
+Landroid/content/IContentProvider;->call(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;
+Landroid/content/IContentProvider;->delete(Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
+Landroid/content/IContentProvider;->descriptor:Ljava/lang/String;
+Landroid/content/IContentProvider;->insert(Ljava/lang/String;Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
+Landroid/content/IContentProvider;->update(Ljava/lang/String;Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
+Landroid/content/IContentService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/IContentService$Stub;-><init>()V
+Landroid/content/IContentService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IContentService;
+Landroid/content/IContentService;->cancelSync(Landroid/accounts/Account;Ljava/lang/String;Landroid/content/ComponentName;)V
+Landroid/content/IContentService;->getIsSyncable(Landroid/accounts/Account;Ljava/lang/String;)I
+Landroid/content/IContentService;->getMasterSyncAutomatically()Z
+Landroid/content/IContentService;->getSyncAdapterTypes()[Landroid/content/SyncAdapterType;
+Landroid/content/IContentService;->isSyncActive(Landroid/accounts/Account;Ljava/lang/String;Landroid/content/ComponentName;)Z
+Landroid/content/IContentService;->setMasterSyncAutomatically(Z)V
+Landroid/content/IIntentReceiver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/IIntentReceiver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/IIntentReceiver$Stub;-><init>()V
+Landroid/content/IIntentReceiver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IIntentReceiver;
+Landroid/content/IIntentReceiver;->performReceive(Landroid/content/Intent;ILjava/lang/String;Landroid/os/Bundle;ZZI)V
+Landroid/content/IIntentSender$Stub;-><init>()V
+Landroid/content/IIntentSender$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IIntentSender;
+Landroid/content/Intent;->ACTION_ALARM_CHANGED:Ljava/lang/String;
+Landroid/content/Intent;->ACTION_USER_SWITCHED:Ljava/lang/String;
+Landroid/content/Intent;->FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT:I
+Landroid/content/Intent;->getExtra(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
+Landroid/content/Intent;->isExcludingStopped()Z
+Landroid/content/Intent;->mExtras:Landroid/os/Bundle;
+Landroid/content/Intent;->parseCommandArgs(Landroid/os/ShellCommand;Landroid/content/Intent$CommandOptionHandler;)Landroid/content/Intent;
+Landroid/content/Intent;->prepareToLeaveProcess(Landroid/content/Context;)V
+Landroid/content/Intent;->printIntentArgsHelp(Ljava/io/PrintWriter;Ljava/lang/String;)V
+Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/IBinder;)Landroid/content/Intent;
+Landroid/content/Intent;->setAllowFds(Z)V
+Landroid/content/Intent;->toInsecureString()Ljava/lang/String;
+Landroid/content/IntentFilter;->hasDataAuthority(Landroid/content/IntentFilter$AuthorityEntry;)Z
+Landroid/content/IntentFilter;->hasDataPath(Landroid/os/PatternMatcher;)Z
+Landroid/content/IntentFilter;->hasDataSchemeSpecificPart(Landroid/os/PatternMatcher;)Z
+Landroid/content/IntentFilter;->hasExactDataType(Ljava/lang/String;)Z
+Landroid/content/IntentFilter;->isVerified()Z
+Landroid/content/IntentFilter;->mActions:Ljava/util/ArrayList;
+Landroid/content/IntentFilter;->mOrder:I
+Landroid/content/IntentSender;-><init>(Landroid/content/IIntentSender;)V
+Landroid/content/IntentSender;->getTarget()Landroid/content/IIntentSender;
+Landroid/content/IntentSender;->mTarget:Landroid/content/IIntentSender;
+Landroid/content/IOnPrimaryClipChangedListener$Stub;-><init>()V
+Landroid/content/IOnPrimaryClipChangedListener$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IOnPrimaryClipChangedListener;
+Landroid/content/IRestrictionsManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IRestrictionsManager;
+Landroid/content/ISyncAdapter$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/ISyncAdapter$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/ISyncAdapter$Stub;-><init>()V
+Landroid/content/ISyncAdapter$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/ISyncAdapter;
+Landroid/content/ISyncAdapter;->cancelSync(Landroid/content/ISyncContext;)V
+Landroid/content/ISyncAdapter;->startSync(Landroid/content/ISyncContext;Ljava/lang/String;Landroid/accounts/Account;Landroid/os/Bundle;)V
+Landroid/content/ISyncContext$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/ISyncContext$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/ISyncContext$Stub;-><init>()V
+Landroid/content/ISyncContext$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/ISyncContext;
+Landroid/content/ISyncServiceAdapter$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/ISyncServiceAdapter;
+Landroid/content/ISyncServiceAdapter;->cancelSync(Landroid/content/ISyncContext;)V
+Landroid/content/ISyncServiceAdapter;->startSync(Landroid/content/ISyncContext;Landroid/os/Bundle;)V
+Landroid/content/ISyncStatusObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/ISyncStatusObserver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/ISyncStatusObserver$Stub;-><init>()V
+Landroid/content/ISyncStatusObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/ISyncStatusObserver;
+Landroid/content/ISyncStatusObserver;->onStatusChanged(I)V
+Landroid/content/om/IOverlayManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/om/IOverlayManager;
+Landroid/content/om/IOverlayManager;->getAllOverlays(I)Ljava/util/Map;
+Landroid/content/om/IOverlayManager;->getOverlayInfo(Ljava/lang/String;I)Landroid/content/om/OverlayInfo;
+Landroid/content/om/OverlayInfo;->isEnabled()Z
+Landroid/content/om/OverlayInfo;->packageName:Ljava/lang/String;
+Landroid/content/om/OverlayInfo;->state:I
+Landroid/content/om/OverlayInfo;->targetPackageName:Ljava/lang/String;
+Landroid/content/pm/ActivityInfo;->activityInfoConfigJavaToNative(I)I
+Landroid/content/pm/ActivityInfo;->isResizeableMode(I)Z
+Landroid/content/pm/ActivityInfo;->resizeMode:I
+Landroid/content/pm/ActivityInfo;->supportsPictureInPicture()Z
+Landroid/content/pm/ApplicationInfo$DisplayNameComparator;->mPM:Landroid/content/pm/PackageManager;
+Landroid/content/pm/ApplicationInfo$DisplayNameComparator;->sCollator:Ljava/text/Collator;
+Landroid/content/pm/ApplicationInfo;->disableCompatibilityMode()V
+Landroid/content/pm/ApplicationInfo;->enabledSetting:I
+Landroid/content/pm/ApplicationInfo;->fullBackupContent:I
+Landroid/content/pm/ApplicationInfo;->getBaseResourcePath()Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->getCodePath()Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->hasRtlSupport()Z
+Landroid/content/pm/ApplicationInfo;->installLocation:I
+Landroid/content/pm/ApplicationInfo;->isForwardLocked()Z
+Landroid/content/pm/ApplicationInfo;->isPackageUnavailable(Landroid/content/pm/PackageManager;)Z
+Landroid/content/pm/ApplicationInfo;->nativeLibraryRootDir:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->primaryCpuAbi:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->privateFlags:I
+Landroid/content/pm/ApplicationInfo;->PRIVATE_FLAG_PRIVILEGED:I
+Landroid/content/pm/ApplicationInfo;->resourceDirs:[Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->scanPublicSourceDir:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->scanSourceDir:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->secondaryCpuAbi:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->secondaryNativeLibraryDir:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->versionCode:I
+Landroid/content/pm/BaseParceledListSlice;->getList()Ljava/util/List;
+Landroid/content/pm/BaseParceledListSlice;->writeParcelableCreator(Ljava/lang/Object;Landroid/os/Parcel;)V
+Landroid/content/pm/ComponentInfo;->getComponentName()Landroid/content/ComponentName;
+Landroid/content/pm/IPackageDataObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageDataObserver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageDataObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageDataObserver;
+Landroid/content/pm/IPackageDataObserver;->onRemoveCompleted(Ljava/lang/String;Z)V
+Landroid/content/pm/IPackageDeleteObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageDeleteObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageDeleteObserver;
+Landroid/content/pm/IPackageDeleteObserver2$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageDeleteObserver2$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageDeleteObserver2$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageDeleteObserver2;
+Landroid/content/pm/IPackageDeleteObserver2;->onPackageDeleted(Ljava/lang/String;ILjava/lang/String;)V
+Landroid/content/pm/IPackageInstallerCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageInstallerCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageInstallerCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageInstallerCallback;
+Landroid/content/pm/IPackageInstallerCallback;->onSessionActiveChanged(IZ)V
+Landroid/content/pm/IPackageInstallerCallback;->onSessionBadgingChanged(I)V
+Landroid/content/pm/IPackageInstallerCallback;->onSessionCreated(I)V
+Landroid/content/pm/IPackageInstallerCallback;->onSessionFinished(IZ)V
+Landroid/content/pm/IPackageInstallerCallback;->onSessionProgressChanged(IF)V
+Landroid/content/pm/IPackageInstallerSession$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageInstallerSession$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageInstallerSession$Stub;-><init>()V
+Landroid/content/pm/IPackageInstallerSession$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageInstallerSession;
+Landroid/content/pm/IPackageInstallObserver2$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageInstallObserver2$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageInstallObserver2$Stub;-><init>()V
+Landroid/content/pm/IPackageInstallObserver2$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageInstallObserver2;
+Landroid/content/pm/IPackageInstallObserver2;->onPackageInstalled(Ljava/lang/String;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/content/pm/IPackageInstallObserver2;->onUserActionRequired(Landroid/content/Intent;)V
+Landroid/content/pm/IPackageManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getInstalledPackages(II)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getInstallLocation()I
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getPackageInfo(Ljava/lang/String;II)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getPackagesForUid(I)[Ljava/lang/String;
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getSystemSharedLibraryNames()[Ljava/lang/String;
+Landroid/content/pm/IPackageManager$Stub;-><init>()V
+Landroid/content/pm/IPackageManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageManager;
+Landroid/content/pm/IPackageManager;->addPermission(Landroid/content/pm/PermissionInfo;)Z
+Landroid/content/pm/IPackageManager;->addPermissionAsync(Landroid/content/pm/PermissionInfo;)Z
+Landroid/content/pm/IPackageManager;->canonicalToCurrentPackageNames([Ljava/lang/String;)[Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->checkPermission(Ljava/lang/String;Ljava/lang/String;I)I
+Landroid/content/pm/IPackageManager;->checkSignatures(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/content/pm/IPackageManager;->checkUidPermission(Ljava/lang/String;I)I
+Landroid/content/pm/IPackageManager;->checkUidSignatures(II)I
+Landroid/content/pm/IPackageManager;->clearPackagePreferredActivities(Ljava/lang/String;)V
+Landroid/content/pm/IPackageManager;->currentToCanonicalPackageNames([Ljava/lang/String;)[Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->deleteApplicationCacheFiles(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/IPackageManager;->enterSafeMode()V
+Landroid/content/pm/IPackageManager;->getApplicationEnabledSetting(Ljava/lang/String;I)I
+Landroid/content/pm/IPackageManager;->getBlockUninstallForUser(Ljava/lang/String;I)Z
+Landroid/content/pm/IPackageManager;->getComponentEnabledSetting(Landroid/content/ComponentName;I)I
+Landroid/content/pm/IPackageManager;->getFlagsForUid(I)I
+Landroid/content/pm/IPackageManager;->getInstalledApplications(II)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager;->getInstalledPackages(II)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager;->getInstallerPackageName(Ljava/lang/String;)Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getInstallLocation()I
+Landroid/content/pm/IPackageManager;->getInstrumentationInfo(Landroid/content/ComponentName;I)Landroid/content/pm/InstrumentationInfo;
+Landroid/content/pm/IPackageManager;->getLastChosenActivity(Landroid/content/Intent;Ljava/lang/String;I)Landroid/content/pm/ResolveInfo;
+Landroid/content/pm/IPackageManager;->getNameForUid(I)Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getPackagesForUid(I)[Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getPackageUid(Ljava/lang/String;II)I
+Landroid/content/pm/IPackageManager;->getPermissionControllerPackageName()Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getPermissionGroupInfo(Ljava/lang/String;I)Landroid/content/pm/PermissionGroupInfo;
+Landroid/content/pm/IPackageManager;->getPreferredActivities(Ljava/util/List;Ljava/util/List;Ljava/lang/String;)I
+Landroid/content/pm/IPackageManager;->getProviderInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ProviderInfo;
+Landroid/content/pm/IPackageManager;->getReceiverInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/IPackageManager;->getServiceInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ServiceInfo;
+Landroid/content/pm/IPackageManager;->getServicesSystemSharedLibraryPackageName()Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getSharedSystemSharedLibraryPackageName()Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getSystemSharedLibraryNames()[Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getUidForSharedUser(Ljava/lang/String;)I
+Landroid/content/pm/IPackageManager;->grantRuntimePermission(Ljava/lang/String;Ljava/lang/String;I)V
+Landroid/content/pm/IPackageManager;->hasSystemUidErrors()Z
+Landroid/content/pm/IPackageManager;->isPackageAvailable(Ljava/lang/String;I)Z
+Landroid/content/pm/IPackageManager;->isProtectedBroadcast(Ljava/lang/String;)Z
+Landroid/content/pm/IPackageManager;->isSafeMode()Z
+Landroid/content/pm/IPackageManager;->isStorageLow()Z
+Landroid/content/pm/IPackageManager;->isUidPrivileged(I)Z
+Landroid/content/pm/IPackageManager;->queryInstrumentation(Ljava/lang/String;I)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager;->queryIntentActivities(Landroid/content/Intent;Ljava/lang/String;II)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager;->querySyncProviders(Ljava/util/List;Ljava/util/List;)V
+Landroid/content/pm/IPackageManager;->removePermission(Ljava/lang/String;)V
+Landroid/content/pm/IPackageManager;->replacePreferredActivity(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;I)V
+Landroid/content/pm/IPackageManager;->resolveIntent(Landroid/content/Intent;Ljava/lang/String;II)Landroid/content/pm/ResolveInfo;
+Landroid/content/pm/IPackageManager;->setApplicationEnabledSetting(Ljava/lang/String;IIILjava/lang/String;)V
+Landroid/content/pm/IPackageManager;->setApplicationHiddenSettingAsUser(Ljava/lang/String;ZI)Z
+Landroid/content/pm/IPackageManager;->setComponentEnabledSetting(Landroid/content/ComponentName;III)V
+Landroid/content/pm/IPackageManager;->setInstallerPackageName(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/content/pm/IPackageManager;->setLastChosenActivity(Landroid/content/Intent;Ljava/lang/String;ILandroid/content/IntentFilter;ILandroid/content/ComponentName;)V
+Landroid/content/pm/IPackageManager;->setPackageStoppedState(Ljava/lang/String;ZI)V
+Landroid/content/pm/IPackageManager;->systemReady()V
+Landroid/content/pm/IPackageMoveObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageMoveObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageMoveObserver;
+Landroid/content/pm/IPackageStatsObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageStatsObserver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageStatsObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageStatsObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageStatsObserver;
+Landroid/content/pm/IShortcutService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IShortcutService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IShortcutService;
+Landroid/content/pm/LauncherActivityInfo;->mActivityInfo:Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/LauncherApps;->mPm:Landroid/content/pm/PackageManager;
+Landroid/content/pm/LauncherApps;->mService:Landroid/content/pm/ILauncherApps;
+Landroid/content/pm/LauncherApps;->startShortcut(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Rect;Landroid/os/Bundle;I)V
+Landroid/content/pm/PackageInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/content/pm/PackageInfo;->coreApp:Z
+Landroid/content/pm/PackageInfo;->INSTALL_LOCATION_UNSPECIFIED:I
+Landroid/content/pm/PackageInfo;->overlayTarget:Ljava/lang/String;
+Landroid/content/pm/PackageInfoLite;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/pm/PackageInstaller$Session;->addProgress(F)V
+Landroid/content/pm/PackageInstaller$SessionInfo;-><init>()V
+Landroid/content/pm/PackageInstaller$SessionInfo;->active:Z
+Landroid/content/pm/PackageInstaller$SessionInfo;->appIcon:Landroid/graphics/Bitmap;
+Landroid/content/pm/PackageInstaller$SessionInfo;->appLabel:Ljava/lang/CharSequence;
+Landroid/content/pm/PackageInstaller$SessionInfo;->appPackageName:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionInfo;->installerPackageName:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionInfo;->mode:I
+Landroid/content/pm/PackageInstaller$SessionInfo;->progress:F
+Landroid/content/pm/PackageInstaller$SessionInfo;->resolvedBaseCodePath:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionInfo;->sealed:Z
+Landroid/content/pm/PackageInstaller$SessionInfo;->sessionId:I
+Landroid/content/pm/PackageInstaller$SessionInfo;->sizeBytes:J
+Landroid/content/pm/PackageInstaller$SessionParams;->appIcon:Landroid/graphics/Bitmap;
+Landroid/content/pm/PackageInstaller$SessionParams;->appLabel:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionParams;->appPackageName:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionParams;->installFlags:I
+Landroid/content/pm/PackageInstaller$SessionParams;->mode:I
+Landroid/content/pm/PackageInstaller$SessionParams;->originatingUid:I
+Landroid/content/pm/PackageInstaller$SessionParams;->sizeBytes:J
+Landroid/content/pm/PackageManager;->addCrossProfileIntentFilter(Landroid/content/IntentFilter;III)V
+Landroid/content/pm/PackageManager;->addPreferredActivityAsUser(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;I)V
+Landroid/content/pm/PackageManager;->buildRequestPermissionsIntent([Ljava/lang/String;)Landroid/content/Intent;
+Landroid/content/pm/PackageManager;->clearApplicationUserData(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->clearCrossProfileIntentFilters(I)V
+Landroid/content/pm/PackageManager;->deleteApplicationCacheFiles(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->deleteApplicationCacheFilesAsUser(Ljava/lang/String;ILandroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->deletePackage(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;I)V
+Landroid/content/pm/PackageManager;->deletePackageAsUser(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;II)V
+Landroid/content/pm/PackageManager;->deleteStatusToString(I)Ljava/lang/String;
+Landroid/content/pm/PackageManager;->flushPackageRestrictionsAsUser(I)V
+Landroid/content/pm/PackageManager;->freeStorage(JLandroid/content/IntentSender;)V
+Landroid/content/pm/PackageManager;->freeStorage(Ljava/lang/String;JLandroid/content/IntentSender;)V
+Landroid/content/pm/PackageManager;->freeStorageAndNotify(JLandroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->freeStorageAndNotify(Ljava/lang/String;JLandroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->getApplicationHiddenSettingAsUser(Ljava/lang/String;Landroid/os/UserHandle;)Z
+Landroid/content/pm/PackageManager;->getApplicationInfoAsUser(Ljava/lang/String;II)Landroid/content/pm/ApplicationInfo;
+Landroid/content/pm/PackageManager;->getHomeActivities(Ljava/util/List;)Landroid/content/ComponentName;
+Landroid/content/pm/PackageManager;->getKeySetByAlias(Ljava/lang/String;Ljava/lang/String;)Landroid/content/pm/KeySet;
+Landroid/content/pm/PackageManager;->getMoveStatus(I)I
+Landroid/content/pm/PackageManager;->getPackageCandidateVolumes(Landroid/content/pm/ApplicationInfo;)Ljava/util/List;
+Landroid/content/pm/PackageManager;->getPackageCurrentVolume(Landroid/content/pm/ApplicationInfo;)Landroid/os/storage/VolumeInfo;
+Landroid/content/pm/PackageManager;->getPackageInfoAsUser(Ljava/lang/String;II)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/PackageManager;->getPackageSizeInfo(Ljava/lang/String;Landroid/content/pm/IPackageStatsObserver;)V
+Landroid/content/pm/PackageManager;->getPackageSizeInfoAsUser(Ljava/lang/String;ILandroid/content/pm/IPackageStatsObserver;)V
+Landroid/content/pm/PackageManager;->getPackageUidAsUser(Ljava/lang/String;I)I
+Landroid/content/pm/PackageManager;->getPackageUidAsUser(Ljava/lang/String;II)I
+Landroid/content/pm/PackageManager;->getResourcesForApplicationAsUser(Ljava/lang/String;I)Landroid/content/res/Resources;
+Landroid/content/pm/PackageManager;->getSigningKeySet(Ljava/lang/String;)Landroid/content/pm/KeySet;
+Landroid/content/pm/PackageManager;->getUidForSharedUser(Ljava/lang/String;)I
+Landroid/content/pm/PackageManager;->getUserBadgeForDensity(Landroid/os/UserHandle;I)Landroid/graphics/drawable/Drawable;
+Landroid/content/pm/PackageManager;->getUserBadgeForDensityNoBackground(Landroid/os/UserHandle;I)Landroid/graphics/drawable/Drawable;
+Landroid/content/pm/PackageManager;->installExistingPackageAsUser(Ljava/lang/String;I)I
+Landroid/content/pm/PackageManager;->installStatusToString(I)Ljava/lang/String;
+Landroid/content/pm/PackageManager;->installStatusToString(ILjava/lang/String;)Ljava/lang/String;
+Landroid/content/pm/PackageManager;->INSTALL_REPLACE_EXISTING:I
+Landroid/content/pm/PackageManager;->isPackageAvailable(Ljava/lang/String;)Z
+Landroid/content/pm/PackageManager;->isPackageSuspendedForUser(Ljava/lang/String;I)Z
+Landroid/content/pm/PackageManager;->isSignedBy(Ljava/lang/String;Landroid/content/pm/KeySet;)Z
+Landroid/content/pm/PackageManager;->isSignedByExactly(Ljava/lang/String;Landroid/content/pm/KeySet;)Z
+Landroid/content/pm/PackageManager;->isUpgrade()Z
+Landroid/content/pm/PackageManager;->loadItemIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
+Landroid/content/pm/PackageManager;->loadUnbadgedItemIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
+Landroid/content/pm/PackageManager;->movePackage(Ljava/lang/String;Landroid/os/storage/VolumeInfo;)I
+Landroid/content/pm/PackageManager;->MOVE_EXTERNAL_MEDIA:I
+Landroid/content/pm/PackageManager;->MOVE_INTERNAL:I
+Landroid/content/pm/PackageManager;->NO_NATIVE_LIBRARIES:I
+Landroid/content/pm/PackageManager;->queryBroadcastReceivers(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->queryBroadcastReceiversAsUser(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->queryIntentActivitiesAsUser(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->queryIntentContentProvidersAsUser(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->queryIntentServicesAsUser(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->registerMoveCallback(Landroid/content/pm/PackageManager$MoveCallback;Landroid/os/Handler;)V
+Landroid/content/pm/PackageManager;->replacePreferredActivity(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;)V
+Landroid/content/pm/PackageManager;->replacePreferredActivityAsUser(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;I)V
+Landroid/content/pm/PackageManager;->resolveActivityAsUser(Landroid/content/Intent;II)Landroid/content/pm/ResolveInfo;
+Landroid/content/pm/PackageManager;->resolveContentProviderAsUser(Ljava/lang/String;II)Landroid/content/pm/ProviderInfo;
+Landroid/content/pm/PackageManager;->setApplicationHiddenSettingAsUser(Ljava/lang/String;ZLandroid/os/UserHandle;)Z
+Landroid/content/pm/PackageManager;->shouldShowRequestPermissionRationale(Ljava/lang/String;)Z
+Landroid/content/pm/PackageManager;->unregisterMoveCallback(Landroid/content/pm/PackageManager$MoveCallback;)V
+Landroid/content/pm/PackageParser$Activity;->info:Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/PackageParser$ActivityIntentInfo;->activity:Landroid/content/pm/PackageParser$Activity;
+Landroid/content/pm/PackageParser$Component;->className:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Component;->getComponentName()Landroid/content/ComponentName;
+Landroid/content/pm/PackageParser$Component;->intents:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Component;->metaData:Landroid/os/Bundle;
+Landroid/content/pm/PackageParser$Component;->owner:Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser$Instrumentation;->info:Landroid/content/pm/InstrumentationInfo;
+Landroid/content/pm/PackageParser$IntentInfo;-><init>()V
+Landroid/content/pm/PackageParser$IntentInfo;->banner:I
+Landroid/content/pm/PackageParser$IntentInfo;->hasDefault:Z
+Landroid/content/pm/PackageParser$IntentInfo;->icon:I
+Landroid/content/pm/PackageParser$IntentInfo;->labelRes:I
+Landroid/content/pm/PackageParser$IntentInfo;->logo:I
+Landroid/content/pm/PackageParser$IntentInfo;->nonLocalizedLabel:Ljava/lang/CharSequence;
+Landroid/content/pm/PackageParser$NewPermissionInfo;->name:Ljava/lang/String;
+Landroid/content/pm/PackageParser$NewPermissionInfo;->sdkVersion:I
+Landroid/content/pm/PackageParser$Package;-><init>(Ljava/lang/String;)V
+Landroid/content/pm/PackageParser$Package;->activities:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
+Landroid/content/pm/PackageParser$Package;->configPreferences:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->installLocation:I
+Landroid/content/pm/PackageParser$Package;->instrumentation:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->mAppMetaData:Landroid/os/Bundle;
+Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
+Landroid/content/pm/PackageParser$Package;->mKeySetMapping:Landroid/util/ArrayMap;
+Landroid/content/pm/PackageParser$Package;->mPreferredOrder:I
+Landroid/content/pm/PackageParser$Package;->mSharedUserId:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Package;->mSharedUserLabel:I
+Landroid/content/pm/PackageParser$Package;->mUpgradeKeySets:Landroid/util/ArraySet;
+Landroid/content/pm/PackageParser$Package;->mVersionCode:I
+Landroid/content/pm/PackageParser$Package;->mVersionName:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Package;->permissionGroups:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->permissions:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->protectedBroadcasts:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->providers:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->receivers:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->reqFeatures:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->requestedPermissions:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->services:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->setPackageName(Ljava/lang/String;)V
+Landroid/content/pm/PackageParser$Package;->usesLibraries:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->usesLibraryFiles:[Ljava/lang/String;
+Landroid/content/pm/PackageParser$Package;->usesOptionalLibraries:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$PackageLite;->installLocation:I
+Landroid/content/pm/PackageParser$PackageLite;->packageName:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Permission;-><init>(Landroid/content/pm/PackageParser$Package;Landroid/content/pm/PermissionInfo;)V
+Landroid/content/pm/PackageParser$Permission;->group:Landroid/content/pm/PackageParser$PermissionGroup;
+Landroid/content/pm/PackageParser$Permission;->info:Landroid/content/pm/PermissionInfo;
+Landroid/content/pm/PackageParser$Permission;->tree:Z
+Landroid/content/pm/PackageParser$PermissionGroup;->info:Landroid/content/pm/PermissionGroupInfo;
+Landroid/content/pm/PackageParser$Provider;-><init>(Landroid/content/pm/PackageParser$Provider;)V
+Landroid/content/pm/PackageParser$Provider;->info:Landroid/content/pm/ProviderInfo;
+Landroid/content/pm/PackageParser$Provider;->syncable:Z
+Landroid/content/pm/PackageParser$ProviderIntentInfo;->provider:Landroid/content/pm/PackageParser$Provider;
+Landroid/content/pm/PackageParser$Service;->info:Landroid/content/pm/ServiceInfo;
+Landroid/content/pm/PackageParser$ServiceIntentInfo;->service:Landroid/content/pm/PackageParser$Service;
+Landroid/content/pm/PackageParser;-><init>()V
+Landroid/content/pm/PackageParser;->generateActivityInfo(Landroid/content/pm/PackageParser$Activity;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/PackageParser;->generateApplicationInfo(Landroid/content/pm/PackageParser$Package;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ApplicationInfo;
+Landroid/content/pm/PackageParser;->generateInstrumentationInfo(Landroid/content/pm/PackageParser$Instrumentation;I)Landroid/content/pm/InstrumentationInfo;
+Landroid/content/pm/PackageParser;->generatePackageInfo(Landroid/content/pm/PackageParser$Package;[IIJJLjava/util/Set;Landroid/content/pm/PackageUserState;)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/PackageParser;->generatePackageInfo(Landroid/content/pm/PackageParser$Package;[IIJJLjava/util/Set;Landroid/content/pm/PackageUserState;I)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/PackageParser;->generatePermissionGroupInfo(Landroid/content/pm/PackageParser$PermissionGroup;I)Landroid/content/pm/PermissionGroupInfo;
+Landroid/content/pm/PackageParser;->generatePermissionInfo(Landroid/content/pm/PackageParser$Permission;I)Landroid/content/pm/PermissionInfo;
+Landroid/content/pm/PackageParser;->generateProviderInfo(Landroid/content/pm/PackageParser$Provider;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ProviderInfo;
+Landroid/content/pm/PackageParser;->generateServiceInfo(Landroid/content/pm/PackageParser$Service;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ServiceInfo;
+Landroid/content/pm/PackageParser;->mCallback:Landroid/content/pm/PackageParser$Callback;
+Landroid/content/pm/PackageParser;->NEW_PERMISSIONS:[Landroid/content/pm/PackageParser$NewPermissionInfo;
+Landroid/content/pm/PackageParser;->parseBaseApk(Ljava/lang/String;Landroid/content/res/Resources;Landroid/content/res/XmlResourceParser;I[Ljava/lang/String;)Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser;->parseMonolithicPackage(Ljava/io/File;I)Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser;->parsePackage(Ljava/io/File;I)Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser;->parsePackage(Ljava/io/File;IZ)Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser;->parsePackageLite(Ljava/io/File;I)Landroid/content/pm/PackageParser$PackageLite;
+Landroid/content/pm/PackageParser;->setCompatibilityModeEnabled(Z)V
+Landroid/content/pm/PackageParser;->setSeparateProcesses([Ljava/lang/String;)V
+Landroid/content/pm/PackageStats;->userHandle:I
+Landroid/content/pm/PackageUserState;-><init>()V
+Landroid/content/pm/ParceledListSlice;-><init>(Ljava/util/List;)V
+Landroid/content/pm/ParceledListSlice;->CREATOR:Landroid/os/Parcelable$ClassLoaderCreator;
+Landroid/content/pm/ParceledListSlice;->writeParcelableCreator(Landroid/os/Parcelable;Landroid/os/Parcel;)V
+Landroid/content/pm/PermissionInfo;->protectionToString(I)Ljava/lang/String;
+Landroid/content/pm/RegisteredServicesCache$ServiceInfo;->componentName:Landroid/content/ComponentName;
+Landroid/content/pm/RegisteredServicesCache$ServiceInfo;->type:Ljava/lang/Object;
+Landroid/content/pm/RegisteredServicesCache$ServiceInfo;->uid:I
+Landroid/content/pm/RegisteredServicesCache;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/pm/XmlSerializerAndParser;)V
+Landroid/content/pm/ResolveInfo;->getComponentInfo()Landroid/content/pm/ComponentInfo;
+Landroid/content/pm/ResolveInfo;->handleAllWebDataURI:Z
+Landroid/content/pm/ResolveInfo;->system:Z
+Landroid/content/pm/ResolveInfo;->targetUserId:I
+Landroid/content/pm/ShortcutInfo;->getIcon()Landroid/graphics/drawable/Icon;
+Landroid/content/pm/ShortcutManager;->mService:Landroid/content/pm/IShortcutService;
+Landroid/content/pm/Signature;->getPublicKey()Ljava/security/PublicKey;
+Landroid/content/pm/UserInfo;-><init>(ILjava/lang/String;I)V
+Landroid/content/pm/UserInfo;-><init>(ILjava/lang/String;Ljava/lang/String;I)V
+Landroid/content/pm/UserInfo;->creationTime:J
+Landroid/content/pm/UserInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/pm/UserInfo;->flags:I
+Landroid/content/pm/UserInfo;->FLAG_PRIMARY:I
+Landroid/content/pm/UserInfo;->getUserHandle()Landroid/os/UserHandle;
+Landroid/content/pm/UserInfo;->guestToRemove:Z
+Landroid/content/pm/UserInfo;->iconPath:Ljava/lang/String;
+Landroid/content/pm/UserInfo;->id:I
+Landroid/content/pm/UserInfo;->isAdmin()Z
+Landroid/content/pm/UserInfo;->isEnabled()Z
+Landroid/content/pm/UserInfo;->isGuest()Z
+Landroid/content/pm/UserInfo;->isManagedProfile()Z
+Landroid/content/pm/UserInfo;->isPrimary()Z
+Landroid/content/pm/UserInfo;->isRestricted()Z
+Landroid/content/pm/UserInfo;->lastLoggedInTime:J
+Landroid/content/pm/UserInfo;->name:Ljava/lang/String;
+Landroid/content/pm/UserInfo;->partial:Z
+Landroid/content/pm/UserInfo;->profileGroupId:I
+Landroid/content/pm/UserInfo;->serialNumber:I
+Landroid/content/pm/VerifierInfo;-><init>(Ljava/lang/String;Ljava/security/PublicKey;)V
+Landroid/content/pm/XmlSerializerAndParser;->createFromXml(Lorg/xmlpull/v1/XmlPullParser;)Ljava/lang/Object;
+Landroid/content/pm/XmlSerializerAndParser;->writeAsXml(Ljava/lang/Object;Lorg/xmlpull/v1/XmlSerializer;)V
+Landroid/content/res/AssetFileDescriptor;->mFd:Landroid/os/ParcelFileDescriptor;
+Landroid/content/res/AssetFileDescriptor;->mLength:J
+Landroid/content/res/AssetFileDescriptor;->mStartOffset:J
+Landroid/content/res/AssetManager$AssetInputStream;->getAssetInt()I
+Landroid/content/res/AssetManager$AssetInputStream;->getNativeAsset()J
+Landroid/content/res/AssetManager;-><init>()V
+Landroid/content/res/AssetManager;->addAssetPath(Ljava/lang/String;)I
+Landroid/content/res/AssetManager;->addAssetPathAsSharedLibrary(Ljava/lang/String;)I
+Landroid/content/res/AssetManager;->addOverlayPath(Ljava/lang/String;)I
+Landroid/content/res/AssetManager;->createTheme()J
+Landroid/content/res/AssetManager;->getAssignedPackageIdentifiers()Landroid/util/SparseArray;
+Landroid/content/res/AssetManager;->getGlobalAssetCount()I
+Landroid/content/res/AssetManager;->getGlobalAssetManagerCount()I
+Landroid/content/res/AssetManager;->getResourceBagText(II)Ljava/lang/CharSequence;
+Landroid/content/res/AssetManager;->getResourceEntryName(I)Ljava/lang/String;
+Landroid/content/res/AssetManager;->getResourceIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
+Landroid/content/res/AssetManager;->getResourceName(I)Ljava/lang/String;
+Landroid/content/res/AssetManager;->getResourcePackageName(I)Ljava/lang/String;
+Landroid/content/res/AssetManager;->getResourceText(I)Ljava/lang/CharSequence;
+Landroid/content/res/AssetManager;->getResourceTypeName(I)Ljava/lang/String;
+Landroid/content/res/AssetManager;->getResourceValue(IILandroid/util/TypedValue;Z)Z
+Landroid/content/res/AssetManager;->getSystem()Landroid/content/res/AssetManager;
+Landroid/content/res/AssetManager;->isUpToDate()Z
+Landroid/content/res/AssetManager;->mObject:J
+Landroid/content/res/AssetManager;->openNonAsset(ILjava/lang/String;)Ljava/io/InputStream;
+Landroid/content/res/AssetManager;->openNonAsset(ILjava/lang/String;I)Ljava/io/InputStream;
+Landroid/content/res/AssetManager;->openNonAsset(Ljava/lang/String;)Ljava/io/InputStream;
+Landroid/content/res/AssetManager;->openNonAsset(Ljava/lang/String;I)Ljava/io/InputStream;
+Landroid/content/res/AssetManager;->resolveAttrs(JII[I[I[I[I)Z
+Landroid/content/res/AssetManager;->setConfiguration(IILjava/lang/String;IIIIIIIIIIIIIII)V
+Landroid/content/res/AssetManager;->sSystem:Landroid/content/res/AssetManager;
+Landroid/content/res/ColorStateList$ColorStateListFactory;-><init>(Landroid/content/res/ColorStateList;)V
+Landroid/content/res/ColorStateList;->canApplyTheme()Z
+Landroid/content/res/ColorStateList;->getColors()[I
+Landroid/content/res/ColorStateList;->getStates()[[I
+Landroid/content/res/ColorStateList;->mColors:[I
+Landroid/content/res/ColorStateList;->mDefaultColor:I
+Landroid/content/res/ColorStateList;->mFactory:Landroid/content/res/ColorStateList$ColorStateListFactory;
+Landroid/content/res/ColorStateList;->mStateSpecs:[[I
+Landroid/content/res/ColorStateList;->obtainForTheme(Landroid/content/res/Resources$Theme;)Landroid/content/res/ColorStateList;
+Landroid/content/res/ColorStateList;->onColorsChanged()V
+Landroid/content/res/CompatibilityInfo$Translator;->applicationInvertedScale:F
+Landroid/content/res/CompatibilityInfo$Translator;->applicationScale:F
+Landroid/content/res/CompatibilityInfo$Translator;->getTranslatedContentInsets(Landroid/graphics/Rect;)Landroid/graphics/Rect;
+Landroid/content/res/CompatibilityInfo$Translator;->translateCanvas(Landroid/graphics/Canvas;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateEventInScreenToAppWindow(Landroid/view/MotionEvent;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateRectInAppWindowToScreen(Landroid/graphics/Rect;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateRectInScreenToAppWindow(Landroid/graphics/Rect;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateRectInScreenToAppWinFrame(Landroid/graphics/Rect;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateRegionInWindowToScreen(Landroid/graphics/Region;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateWindowLayout(Landroid/view/WindowManager$LayoutParams;)V
+Landroid/content/res/CompatibilityInfo;-><init>(Landroid/content/pm/ApplicationInfo;IIZ)V
+Landroid/content/res/CompatibilityInfo;->applicationScale:F
+Landroid/content/res/CompatibilityInfo;->computeCompatibleScaling(Landroid/util/DisplayMetrics;Landroid/util/DisplayMetrics;)F
+Landroid/content/res/CompatibilityInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/res/CompatibilityInfo;->DEFAULT_COMPATIBILITY_INFO:Landroid/content/res/CompatibilityInfo;
+Landroid/content/res/CompatibilityInfo;->getTranslator()Landroid/content/res/CompatibilityInfo$Translator;
+Landroid/content/res/CompatibilityInfo;->isScalingRequired()Z
+Landroid/content/res/CompatibilityInfo;->supportsScreen()Z
+Landroid/content/res/Configuration;->generateDelta(Landroid/content/res/Configuration;Landroid/content/res/Configuration;)Landroid/content/res/Configuration;
+Landroid/content/res/Configuration;->makeDefault()V
+Landroid/content/res/Configuration;->resourceQualifierString(Landroid/content/res/Configuration;)Ljava/lang/String;
+Landroid/content/res/Configuration;->seq:I
+Landroid/content/res/Configuration;->userSetLocale:Z
+Landroid/content/res/DrawableCache;-><init>()V
+Landroid/content/res/DrawableCache;->getInstance(JLandroid/content/res/Resources;Landroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
+Landroid/content/res/ObbInfo;->salt:[B
+Landroid/content/res/Resources$Theme;->mThemeImpl:Landroid/content/res/ResourcesImpl$ThemeImpl;
+Landroid/content/res/Resources$Theme;->resolveAttributes([I[I)Landroid/content/res/TypedArray;
+Landroid/content/res/Resources;-><init>(Ljava/lang/ClassLoader;)V
+Landroid/content/res/Resources;->getCompatibilityInfo()Landroid/content/res/CompatibilityInfo;
+Landroid/content/res/Resources;->getDisplayAdjustments()Landroid/view/DisplayAdjustments;
+Landroid/content/res/Resources;->getDrawableInflater()Landroid/graphics/drawable/DrawableInflater;
+Landroid/content/res/Resources;->getFloat(I)F
+Landroid/content/res/Resources;->getImpl()Landroid/content/res/ResourcesImpl;
+Landroid/content/res/Resources;->getPreloadedDrawables()Landroid/util/LongSparseArray;
+Landroid/content/res/Resources;->loadDrawable(Landroid/util/TypedValue;IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
+Landroid/content/res/Resources;->loadXmlResourceParser(ILjava/lang/String;)Landroid/content/res/XmlResourceParser;
+Landroid/content/res/Resources;->loadXmlResourceParser(Ljava/lang/String;IILjava/lang/String;)Landroid/content/res/XmlResourceParser;
+Landroid/content/res/Resources;->mClassLoader:Ljava/lang/ClassLoader;
+Landroid/content/res/Resources;->mDrawableInflater:Landroid/graphics/drawable/DrawableInflater;
+Landroid/content/res/Resources;->mResourcesImpl:Landroid/content/res/ResourcesImpl;
+Landroid/content/res/Resources;->mSystem:Landroid/content/res/Resources;
+Landroid/content/res/Resources;->mTmpValue:Landroid/util/TypedValue;
+Landroid/content/res/Resources;->mTypedArrayPool:Landroid/util/Pools$SynchronizedPool;
+Landroid/content/res/Resources;->selectDefaultTheme(II)I
+Landroid/content/res/Resources;->setCompatibilityInfo(Landroid/content/res/CompatibilityInfo;)V
+Landroid/content/res/Resources;->setImpl(Landroid/content/res/ResourcesImpl;)V
+Landroid/content/res/Resources;->updateSystemConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;Landroid/content/res/CompatibilityInfo;)V
+Landroid/content/res/ResourcesImpl;-><init>(Landroid/content/res/AssetManager;Landroid/util/DisplayMetrics;Landroid/content/res/Configuration;Landroid/view/DisplayAdjustments;)V
+Landroid/content/res/ResourcesImpl;->getAssets()Landroid/content/res/AssetManager;
+Landroid/content/res/ResourcesImpl;->getValue(ILandroid/util/TypedValue;Z)V
+Landroid/content/res/ResourcesImpl;->mAccessLock:Ljava/lang/Object;
+Landroid/content/res/ResourcesImpl;->mAnimatorCache:Landroid/content/res/ConfigurationBoundResourceCache;
+Landroid/content/res/ResourcesImpl;->mAssets:Landroid/content/res/AssetManager;
+Landroid/content/res/ResourcesImpl;->mColorDrawableCache:Landroid/content/res/DrawableCache;
+Landroid/content/res/ResourcesImpl;->mConfiguration:Landroid/content/res/Configuration;
+Landroid/content/res/ResourcesImpl;->mDrawableCache:Landroid/content/res/DrawableCache;
+Landroid/content/res/ResourcesImpl;->mPreloading:Z
+Landroid/content/res/ResourcesImpl;->mStateListAnimatorCache:Landroid/content/res/ConfigurationBoundResourceCache;
+Landroid/content/res/ResourcesImpl;->sPreloadedColorDrawables:Landroid/util/LongSparseArray;
+Landroid/content/res/ResourcesImpl;->sPreloadedComplexColors:Landroid/util/LongSparseArray;
+Landroid/content/res/ResourcesImpl;->sPreloadedDrawables:[Landroid/util/LongSparseArray;
+Landroid/content/res/ResourcesImpl;->TRACE_FOR_MISS_PRELOAD:Z
+Landroid/content/res/ResourcesImpl;->TRACE_FOR_PRELOAD:Z
+Landroid/content/res/ResourcesKey;-><init>(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ILandroid/content/res/Configuration;Landroid/content/res/CompatibilityInfo;)V
+Landroid/content/res/ResourcesKey;->mResDir:Ljava/lang/String;
+Landroid/content/res/ResourcesKey;->mSplitResDirs:[Ljava/lang/String;
+Landroid/content/res/StringBlock;-><init>(JZ)V
+Landroid/content/res/StringBlock;->get(I)Ljava/lang/CharSequence;
+Landroid/content/res/ThemedResourceCache;->onConfigurationChange(I)V
+Landroid/content/res/TypedArray;->extractThemeAttrs()[I
+Landroid/content/res/TypedArray;->extractThemeAttrs([I)[I
+Landroid/content/res/TypedArray;->getNonConfigurationString(II)Ljava/lang/String;
+Landroid/content/res/TypedArray;->getValueAt(ILandroid/util/TypedValue;)Z
+Landroid/content/res/TypedArray;->mAssets:Landroid/content/res/AssetManager;
+Landroid/content/res/TypedArray;->mData:[I
+Landroid/content/res/TypedArray;->mIndices:[I
+Landroid/content/res/TypedArray;->mLength:I
+Landroid/content/res/TypedArray;->mMetrics:Landroid/util/DisplayMetrics;
+Landroid/content/res/TypedArray;->mRecycled:Z
+Landroid/content/res/TypedArray;->mResources:Landroid/content/res/Resources;
+Landroid/content/res/TypedArray;->mTheme:Landroid/content/res/Resources$Theme;
+Landroid/content/res/TypedArray;->mValue:Landroid/util/TypedValue;
+Landroid/content/res/TypedArray;->mXml:Landroid/content/res/XmlBlock$Parser;
+Landroid/content/res/XmlBlock$Parser;->mBlock:Landroid/content/res/XmlBlock;
+Landroid/content/res/XmlBlock$Parser;->mParseState:J
+Landroid/content/res/XmlBlock;-><init>([B)V
+Landroid/content/res/XmlBlock;->newParser()Landroid/content/res/XmlResourceParser;
+Landroid/content/RestrictionsManager;->mService:Landroid/content/IRestrictionsManager;
+Landroid/content/SearchRecentSuggestionsProvider;->mSuggestionProjection:[Ljava/lang/String;
+Landroid/content/SyncAdaptersCache;-><init>(Landroid/content/Context;)V
+Landroid/content/SyncAdapterType;-><init>(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/content/SyncAdapterType;->allowParallelSyncs:Z
+Landroid/content/SyncAdapterType;->isAlwaysSyncable:Z
+Landroid/content/SyncAdapterType;->settingsActivity:Ljava/lang/String;
+Landroid/content/SyncAdapterType;->supportsUploading:Z
+Landroid/content/SyncAdapterType;->userVisible:Z
+Landroid/content/SyncContext;-><init>(Landroid/content/ISyncContext;)V
+Landroid/content/SyncContext;->setStatusText(Ljava/lang/String;)V
+Landroid/content/SyncInfo;-><init>(ILandroid/accounts/Account;Ljava/lang/String;J)V
+Landroid/content/SyncInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/content/SyncInfo;->authorityId:I
+Landroid/content/SyncInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/SyncRequest;->mAccountToSync:Landroid/accounts/Account;
+Landroid/content/SyncRequest;->mAuthority:Ljava/lang/String;
+Landroid/content/SyncRequest;->mExtras:Landroid/os/Bundle;
+Landroid/content/SyncRequest;->mIsPeriodic:Z
+Landroid/content/SyncRequest;->mSyncRunTimeSecs:J
+Landroid/content/SyncStatusInfo;-><init>(I)V
+Landroid/content/SyncStatusInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/content/SyncStatusInfo;->authorityId:I
+Landroid/content/SyncStatusInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/SyncStatusInfo;->ensurePeriodicSyncTimeSize(I)V
+Landroid/content/SyncStatusInfo;->getLastFailureMesgAsInt(I)I
+Landroid/content/SyncStatusInfo;->getPeriodicSyncTime(I)J
+Landroid/content/SyncStatusInfo;->initialFailureTime:J
+Landroid/content/SyncStatusInfo;->initialize:Z
+Landroid/content/SyncStatusInfo;->lastFailureMesg:Ljava/lang/String;
+Landroid/content/SyncStatusInfo;->lastFailureSource:I
+Landroid/content/SyncStatusInfo;->lastFailureTime:J
+Landroid/content/SyncStatusInfo;->lastSuccessSource:I
+Landroid/content/SyncStatusInfo;->lastSuccessTime:J
+Landroid/content/SyncStatusInfo;->pending:Z
+Landroid/content/SyncStatusInfo;->periodicSyncTimes:Ljava/util/ArrayList;
+Landroid/content/SyncStatusInfo;->removePeriodicSyncTime(I)V
+Landroid/content/SyncStatusInfo;->setPeriodicSyncTime(IJ)V
+Landroid/content/UndoManager;-><init>()V
+Landroid/content/UndoManager;->addOperation(Landroid/content/UndoOperation;I)V
+Landroid/content/UndoManager;->beginUpdate(Ljava/lang/CharSequence;)V
+Landroid/content/UndoManager;->commitState(Landroid/content/UndoOwner;)I
+Landroid/content/UndoManager;->countRedos([Landroid/content/UndoOwner;)I
+Landroid/content/UndoManager;->countUndos([Landroid/content/UndoOwner;)I
+Landroid/content/UndoManager;->endUpdate()V
+Landroid/content/UndoManager;->forgetRedos([Landroid/content/UndoOwner;I)I
+Landroid/content/UndoManager;->forgetUndos([Landroid/content/UndoOwner;I)I
+Landroid/content/UndoManager;->getLastOperation(Ljava/lang/Class;Landroid/content/UndoOwner;I)Landroid/content/UndoOperation;
+Landroid/content/UndoManager;->getOwner(Ljava/lang/String;Ljava/lang/Object;)Landroid/content/UndoOwner;
+Landroid/content/UndoManager;->isInUndo()Z
+Landroid/content/UndoManager;->redo([Landroid/content/UndoOwner;I)I
+Landroid/content/UndoManager;->restoreInstanceState(Landroid/os/Parcel;Ljava/lang/ClassLoader;)V
+Landroid/content/UndoManager;->saveInstanceState(Landroid/os/Parcel;)V
+Landroid/content/UndoManager;->setUndoLabel(Ljava/lang/CharSequence;)V
+Landroid/content/UndoManager;->undo([Landroid/content/UndoOwner;I)I
+Landroid/content/UndoOperation;-><init>(Landroid/content/UndoOwner;)V
+Landroid/content/UndoOperation;-><init>(Landroid/os/Parcel;Ljava/lang/ClassLoader;)V
+Landroid/content/UriMatcher;->mChildren:Ljava/util/ArrayList;
+Landroid/content/UriMatcher;->mText:Ljava/lang/String;
+Landroid/database/AbstractCursor;->mExtras:Landroid/os/Bundle;
+Landroid/database/AbstractCursor;->mNotifyUri:Landroid/net/Uri;
+Landroid/database/AbstractWindowedCursor;->clearOrCreateWindow(Ljava/lang/String;)V
+Landroid/database/AbstractWindowedCursor;->closeWindow()V
+Landroid/database/AbstractWindowedCursor;->onDeactivateOrClose()V
+Landroid/database/ContentObserver;->releaseContentObserver()Landroid/database/IContentObserver;
+Landroid/database/CursorWindow;->mWindowPtr:J
+Landroid/database/CursorWindow;->printStats()Ljava/lang/String;
+Landroid/database/CursorWindow;->sCursorWindowSize:I
+Landroid/database/CursorWindow;->sWindowToPidMap:Landroid/util/LongSparseArray;
+Landroid/database/CursorWrapper;->mCursor:Landroid/database/Cursor;
+Landroid/database/DatabaseUtils;->cursorPickFillWindowStartPosition(II)I
+Landroid/database/DatabaseUtils;->getTypeOfObject(Ljava/lang/Object;)I
+Landroid/database/IContentObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/database/IContentObserver;
+Landroid/database/IContentObserver;->onChange(ZLandroid/net/Uri;I)V
+Landroid/database/MatrixCursor;->data:[Ljava/lang/Object;
+Landroid/database/MatrixCursor;->get(I)Ljava/lang/Object;
+Landroid/database/MatrixCursor;->rowCount:I
+Landroid/database/sqlite/DatabaseObjectNotClosedException;-><init>()V
+Landroid/database/sqlite/SQLiteClosable;->mReferenceCount:I
+Landroid/database/sqlite/SQLiteCursor;->fillWindow(I)V
+Landroid/database/sqlite/SQLiteCursor;->mEditTable:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteCursor;->mQuery:Landroid/database/sqlite/SQLiteQuery;
+Landroid/database/sqlite/SQLiteCustomFunction;->dispatchCallback([Ljava/lang/String;)V
+Landroid/database/sqlite/SQLiteCustomFunction;->name:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteCustomFunction;->numArgs:I
+Landroid/database/sqlite/SQLiteDatabase;->beginTransaction(Landroid/database/sqlite/SQLiteTransactionListener;Z)V
+Landroid/database/sqlite/SQLiteDatabase;->collectDbStats(Ljava/util/ArrayList;)V
+Landroid/database/sqlite/SQLiteDatabase;->CONFLICT_VALUES:[Ljava/lang/String;
+Landroid/database/sqlite/SQLiteDatabase;->getActiveDatabases()Ljava/util/ArrayList;
+Landroid/database/sqlite/SQLiteDatabase;->getThreadSession()Landroid/database/sqlite/SQLiteSession;
+Landroid/database/sqlite/SQLiteDatabase;->mConfigurationLocked:Landroid/database/sqlite/SQLiteDatabaseConfiguration;
+Landroid/database/sqlite/SQLiteDatabase;->mConnectionPoolLocked:Landroid/database/sqlite/SQLiteConnectionPool;
+Landroid/database/sqlite/SQLiteDatabase;->mThreadSession:Ljava/lang/ThreadLocal;
+Landroid/database/sqlite/SQLiteDatabase;->openDatabase(Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$OpenParams;)Landroid/database/sqlite/SQLiteDatabase;
+Landroid/database/sqlite/SQLiteDatabase;->reopenReadWrite()V
+Landroid/database/sqlite/SQLiteDatabaseConfiguration;->maxSqlCacheSize:I
+Landroid/database/sqlite/SQLiteOpenHelper;->mName:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteProgram;->mBindArgs:[Ljava/lang/Object;
+Landroid/database/sqlite/SQLiteProgram;->mSql:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteQueryBuilder;->computeProjection([Ljava/lang/String;)[Ljava/lang/String;
+Landroid/database/sqlite/SQLiteQueryBuilder;->mDistinct:Z
+Landroid/database/sqlite/SQLiteQueryBuilder;->mTables:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteQueryBuilder;->mWhereClause:Ljava/lang/StringBuilder;
+Landroid/database/sqlite/SQLiteSession;->beginTransaction(ILandroid/database/sqlite/SQLiteTransactionListener;ILandroid/os/CancellationSignal;)V
+Landroid/database/sqlite/SQLiteStatement;-><init>(Landroid/database/sqlite/SQLiteDatabase;Ljava/lang/String;[Ljava/lang/Object;)V
+Landroid/database/sqlite/SqliteWrapper;->checkSQLiteException(Landroid/content/Context;Landroid/database/sqlite/SQLiteException;)V
+Landroid/database/sqlite/SqliteWrapper;->delete(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
+Landroid/database/sqlite/SqliteWrapper;->update(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
+Landroid/ddm/DdmHandleAppName;->getAppName()Ljava/lang/String;
+Landroid/ddm/DdmHandleAppName;->setAppName(Ljava/lang/String;I)V
+Landroid/filterfw/core/Filter;-><init>(Ljava/lang/String;)V
+Landroid/filterfw/core/Filter;->isAvailable(Ljava/lang/String;)Z
+Landroid/filterfw/core/Filter;->setInputValue(Ljava/lang/String;Ljava/lang/Object;)V
+Landroid/filterfw/core/FilterContext;->getFrameManager()Landroid/filterfw/core/FrameManager;
+Landroid/filterfw/core/FilterContext;->getGLEnvironment()Landroid/filterfw/core/GLEnvironment;
+Landroid/filterfw/core/FilterGraph;->getFilter(Ljava/lang/String;)Landroid/filterfw/core/Filter;
+Landroid/filterfw/core/FilterGraph;->tearDown(Landroid/filterfw/core/FilterContext;)V
+Landroid/filterfw/core/Frame;->getBitmap()Landroid/graphics/Bitmap;
+Landroid/filterfw/core/Frame;->getFormat()Landroid/filterfw/core/FrameFormat;
+Landroid/filterfw/core/Frame;->getTimestamp()J
+Landroid/filterfw/core/Frame;->release()Landroid/filterfw/core/Frame;
+Landroid/filterfw/core/Frame;->setInts([I)V
+Landroid/filterfw/core/Frame;->setTimestamp(J)V
+Landroid/filterfw/core/FrameFormat;->getHeight()I
+Landroid/filterfw/core/FrameFormat;->getTarget()I
+Landroid/filterfw/core/FrameFormat;->getWidth()I
+Landroid/filterfw/core/FrameFormat;->mutableCopy()Landroid/filterfw/core/MutableFrameFormat;
+Landroid/filterfw/core/FrameManager;->duplicateFrame(Landroid/filterfw/core/Frame;)Landroid/filterfw/core/Frame;
+Landroid/filterfw/core/FrameManager;->newBoundFrame(Landroid/filterfw/core/FrameFormat;IJ)Landroid/filterfw/core/Frame;
+Landroid/filterfw/core/FrameManager;->newFrame(Landroid/filterfw/core/FrameFormat;)Landroid/filterfw/core/Frame;
+Landroid/filterfw/core/GLEnvironment;->activate()V
+Landroid/filterfw/core/GLEnvironment;->activateSurfaceWithId(I)V
+Landroid/filterfw/core/GLEnvironment;->deactivate()V
+Landroid/filterfw/core/GLEnvironment;->isActive()Z
+Landroid/filterfw/core/GLEnvironment;->registerSurfaceFromMediaRecorder(Landroid/media/MediaRecorder;)I
+Landroid/filterfw/core/GLEnvironment;->setSurfaceTimestamp(J)V
+Landroid/filterfw/core/GLEnvironment;->swapBuffers()V
+Landroid/filterfw/core/GLEnvironment;->unregisterSurfaceId(I)V
+Landroid/filterfw/core/GLFrame;->generateMipMap()V
+Landroid/filterfw/core/GLFrame;->getTextureId()I
+Landroid/filterfw/core/GLFrame;->setBitmap(Landroid/graphics/Bitmap;)V
+Landroid/filterfw/core/GLFrame;->setTextureParameter(II)V
+Landroid/filterfw/core/GraphRunner;->getError()Ljava/lang/Exception;
+Landroid/filterfw/core/GraphRunner;->getGraph()Landroid/filterfw/core/FilterGraph;
+Landroid/filterfw/core/GraphRunner;->run()V
+Landroid/filterfw/core/GraphRunner;->setDoneCallback(Landroid/filterfw/core/GraphRunner$OnRunnerDoneListener;)V
+Landroid/filterfw/core/GraphRunner;->stop()V
+Landroid/filterfw/core/MutableFrameFormat;-><init>(II)V
+Landroid/filterfw/core/MutableFrameFormat;->setBytesPerSample(I)V
+Landroid/filterfw/core/MutableFrameFormat;->setDimensions(II)V
+Landroid/filterfw/core/Program;->process(Landroid/filterfw/core/Frame;Landroid/filterfw/core/Frame;)V
+Landroid/filterfw/core/Program;->process([Landroid/filterfw/core/Frame;Landroid/filterfw/core/Frame;)V
+Landroid/filterfw/core/Program;->setHostValue(Ljava/lang/String;Ljava/lang/Object;)V
+Landroid/filterfw/core/ShaderProgram;-><init>(Landroid/filterfw/core/FilterContext;Ljava/lang/String;)V
+Landroid/filterfw/core/ShaderProgram;->createIdentity(Landroid/filterfw/core/FilterContext;)Landroid/filterfw/core/ShaderProgram;
+Landroid/filterfw/core/ShaderProgram;->process([Landroid/filterfw/core/Frame;Landroid/filterfw/core/Frame;)V
+Landroid/filterfw/core/ShaderProgram;->setHostValue(Ljava/lang/String;Ljava/lang/Object;)V
+Landroid/filterfw/core/ShaderProgram;->setMaximumTileSize(I)V
+Landroid/filterfw/core/ShaderProgram;->setSourceRect(FFFF)V
+Landroid/filterfw/core/ShaderProgram;->setSourceRegion(Landroid/filterfw/geometry/Quad;)V
+Landroid/filterfw/format/ImageFormat;->create(I)Landroid/filterfw/core/MutableFrameFormat;
+Landroid/filterfw/format/ImageFormat;->create(II)Landroid/filterfw/core/MutableFrameFormat;
+Landroid/filterfw/format/ImageFormat;->create(IIII)Landroid/filterfw/core/MutableFrameFormat;
+Landroid/filterfw/geometry/Point;-><init>()V
+Landroid/filterfw/geometry/Point;-><init>(FF)V
+Landroid/filterfw/geometry/Point;->x:F
+Landroid/filterfw/geometry/Point;->y:F
+Landroid/filterfw/geometry/Quad;-><init>()V
+Landroid/filterfw/geometry/Quad;-><init>(Landroid/filterfw/geometry/Point;Landroid/filterfw/geometry/Point;Landroid/filterfw/geometry/Point;Landroid/filterfw/geometry/Point;)V
+Landroid/filterfw/geometry/Quad;->p0:Landroid/filterfw/geometry/Point;
+Landroid/filterfw/geometry/Quad;->p1:Landroid/filterfw/geometry/Point;
+Landroid/filterfw/geometry/Quad;->p2:Landroid/filterfw/geometry/Point;
+Landroid/filterfw/geometry/Quad;->p3:Landroid/filterfw/geometry/Point;
+Landroid/filterfw/GraphEnvironment;-><init>()V
+Landroid/filterfw/GraphEnvironment;->getRunner(II)Landroid/filterfw/core/GraphRunner;
+Landroid/filterfw/GraphEnvironment;->loadGraph(Landroid/content/Context;I)I
+Landroid/graphics/BaseCanvas;->mNativeCanvasWrapper:J
+Landroid/graphics/Bitmap$Config;->nativeInt:I
+Landroid/graphics/Bitmap$Config;->nativeToConfig(I)Landroid/graphics/Bitmap$Config;
+Landroid/graphics/Bitmap;->createAshmemBitmap()Landroid/graphics/Bitmap;
+Landroid/graphics/Bitmap;->createAshmemBitmap(Landroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
+Landroid/graphics/Bitmap;->getDefaultDensity()I
+Landroid/graphics/Bitmap;->mHeight:I
+Landroid/graphics/Bitmap;->mNativePtr:J
+Landroid/graphics/Bitmap;->mNinePatchChunk:[B
+Landroid/graphics/Bitmap;->mNinePatchInsets:Landroid/graphics/NinePatch$InsetStruct;
+Landroid/graphics/Bitmap;->mWidth:I
+Landroid/graphics/Bitmap;->nativeReconfigure(JIIIZ)V
+Landroid/graphics/Bitmap;->reinit(IIZ)V
+Landroid/graphics/Bitmap;->scaleFromDensity(III)I
+Landroid/graphics/Bitmap;->setDefaultDensity(I)V
+Landroid/graphics/Bitmap;->setNinePatchChunk([B)V
+Landroid/graphics/BitmapFactory;->nativeDecodeAsset(JLandroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapFactory;->nativeDecodeByteArray([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapFactory;->nativeDecodeFileDescriptor(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapFactory;->nativeDecodeStream(Ljava/io/InputStream;[BLandroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapRegionDecoder;-><init>(J)V
+Landroid/graphics/BitmapRegionDecoder;->nativeNewInstance([BIIZ)Landroid/graphics/BitmapRegionDecoder;
+Landroid/graphics/BitmapShader;->mBitmap:Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapShader;->mTileX:I
+Landroid/graphics/BitmapShader;->mTileY:I
+Landroid/graphics/Camera;->native_instance:J
+Landroid/graphics/Canvas;-><init>(J)V
+Landroid/graphics/Canvas;->freeCaches()V
+Landroid/graphics/Canvas;->freeTextLayoutCaches()V
+Landroid/graphics/Canvas;->getGL()Ljavax/microedition/khronos/opengles/GL;
+Landroid/graphics/Canvas;->getNativeCanvasWrapper()J
+Landroid/graphics/Canvas;->mBitmap:Landroid/graphics/Bitmap;
+Landroid/graphics/Canvas;->release()V
+Landroid/graphics/Canvas;->setScreenDensity(I)V
+Landroid/graphics/CanvasProperty;->createFloat(F)Landroid/graphics/CanvasProperty;
+Landroid/graphics/CanvasProperty;->createPaint(Landroid/graphics/Paint;)Landroid/graphics/CanvasProperty;
+Landroid/graphics/ColorMatrixColorFilter;->mMatrix:Landroid/graphics/ColorMatrix;
+Landroid/graphics/ColorMatrixColorFilter;->setColorMatrix(Landroid/graphics/ColorMatrix;)V
+Landroid/graphics/drawable/AnimatedRotateDrawable;->setFramesCount(I)V
+Landroid/graphics/drawable/AnimatedRotateDrawable;->setFramesDuration(I)V
+Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;->mStateIds:Landroid/util/SparseIntArray;
+Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;->mTransitions:Landroid/util/LongSparseLongArray;
+Landroid/graphics/drawable/AnimatedStateListDrawable;->mState:Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;
+Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;->callOnFinished(Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;I)V
+Landroid/graphics/drawable/AnimatedVectorDrawable;->forceAnimationOnUI()V
+Landroid/graphics/drawable/AnimatedVectorDrawable;->mAnimatedVectorState:Landroid/graphics/drawable/AnimatedVectorDrawable$AnimatedVectorDrawableState;
+Landroid/graphics/drawable/AnimatedVectorDrawable;->mAnimatorSet:Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimator;
+Landroid/graphics/drawable/AnimationDrawable;->mCurFrame:I
+Landroid/graphics/drawable/BitmapDrawable;->getTint()Landroid/content/res/ColorStateList;
+Landroid/graphics/drawable/BitmapDrawable;->getTintMode()Landroid/graphics/PorterDuff$Mode;
+Landroid/graphics/drawable/BitmapDrawable;->mBitmapState:Landroid/graphics/drawable/BitmapDrawable$BitmapState;
+Landroid/graphics/drawable/BitmapDrawable;->mTargetDensity:I
+Landroid/graphics/drawable/BitmapDrawable;->setBitmap(Landroid/graphics/Bitmap;)V
+Landroid/graphics/drawable/ClipDrawable;->mState:Landroid/graphics/drawable/ClipDrawable$ClipState;
+Landroid/graphics/drawable/ColorDrawable$ColorState;->mUseColor:I
+Landroid/graphics/drawable/ColorDrawable;->mPaint:Landroid/graphics/Paint;
+Landroid/graphics/drawable/Drawable;->inflateWithAttributes(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/content/res/TypedArray;I)V
+Landroid/graphics/drawable/Drawable;->mCallback:Ljava/lang/ref/WeakReference;
+Landroid/graphics/drawable/Drawable;->mSrcDensityOverride:I
+Landroid/graphics/drawable/Drawable;->parseTintMode(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuff$Mode;
+Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;-><init>(Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;Landroid/graphics/drawable/DrawableContainer;Landroid/content/res/Resources;)V
+Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;->mConstantPadding:Landroid/graphics/Rect;
+Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;->mDrawables:[Landroid/graphics/drawable/Drawable;
+Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;->mHasColorFilter:Z
+Landroid/graphics/drawable/DrawableContainer;->mDrawableContainerState:Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;
+Landroid/graphics/drawable/DrawableContainer;->mLastDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/graphics/drawable/DrawableInflater;->mClassLoader:Ljava/lang/ClassLoader;
+Landroid/graphics/drawable/DrawableWrapper;->mState:Landroid/graphics/drawable/DrawableWrapper$DrawableWrapperState;
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mAngle:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mGradient:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mGradientColors:[I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mHeight:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mInnerRadius:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mInnerRadiusRatio:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mOrientation:Landroid/graphics/drawable/GradientDrawable$Orientation;
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mPadding:Landroid/graphics/Rect;
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mPositions:[F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mRadius:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mRadiusArray:[F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mShape:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mSolidColors:Landroid/content/res/ColorStateList;
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeDashGap:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeDashWidth:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeWidth:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mThickness:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mThicknessRatio:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mWidth:I
+Landroid/graphics/drawable/GradientDrawable;->mFillPaint:Landroid/graphics/Paint;
+Landroid/graphics/drawable/GradientDrawable;->mGradientState:Landroid/graphics/drawable/GradientDrawable$GradientState;
+Landroid/graphics/drawable/GradientDrawable;->mPadding:Landroid/graphics/Rect;
+Landroid/graphics/drawable/GradientDrawable;->mStrokePaint:Landroid/graphics/Paint;
+Landroid/graphics/drawable/Icon;->createWithResource(Landroid/content/res/Resources;I)Landroid/graphics/drawable/Icon;
+Landroid/graphics/drawable/Icon;->getBitmap()Landroid/graphics/Bitmap;
+Landroid/graphics/drawable/Icon;->getDataBytes()[B
+Landroid/graphics/drawable/Icon;->getDataLength()I
+Landroid/graphics/drawable/Icon;->getDataOffset()I
+Landroid/graphics/drawable/Icon;->getResources()Landroid/content/res/Resources;
+Landroid/graphics/drawable/Icon;->hasTint()Z
+Landroid/graphics/drawable/Icon;->mString1:Ljava/lang/String;
+Landroid/graphics/drawable/Icon;->mType:I
+Landroid/graphics/drawable/InsetDrawable;->mState:Landroid/graphics/drawable/InsetDrawable$InsetState;
+Landroid/graphics/drawable/LayerDrawable$ChildDrawable;->mDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/graphics/drawable/LayerDrawable$LayerState;->mChildren:[Landroid/graphics/drawable/LayerDrawable$ChildDrawable;
+Landroid/graphics/drawable/LayerDrawable;->addLayer(Landroid/graphics/drawable/LayerDrawable$ChildDrawable;)I
+Landroid/graphics/drawable/LayerDrawable;->ensurePadding()V
+Landroid/graphics/drawable/LayerDrawable;->mLayerState:Landroid/graphics/drawable/LayerDrawable$LayerState;
+Landroid/graphics/drawable/NinePatchDrawable$NinePatchState;->mNinePatch:Landroid/graphics/NinePatch;
+Landroid/graphics/drawable/NinePatchDrawable;->mNinePatchState:Landroid/graphics/drawable/NinePatchDrawable$NinePatchState;
+Landroid/graphics/drawable/RippleDrawable$RippleState;->mColor:Landroid/content/res/ColorStateList;
+Landroid/graphics/drawable/RippleDrawable;->getRipplePaint()Landroid/graphics/Paint;
+Landroid/graphics/drawable/RippleDrawable;->mDensity:I
+Landroid/graphics/drawable/RippleDrawable;->mState:Landroid/graphics/drawable/RippleDrawable$RippleState;
+Landroid/graphics/drawable/RippleDrawable;->setForceSoftware(Z)V
+Landroid/graphics/drawable/RotateDrawable;->mState:Landroid/graphics/drawable/RotateDrawable$RotateState;
+Landroid/graphics/drawable/ScaleDrawable;->mState:Landroid/graphics/drawable/ScaleDrawable$ScaleState;
+Landroid/graphics/drawable/StateListDrawable$StateListState;->addStateSet([ILandroid/graphics/drawable/Drawable;)I
+Landroid/graphics/drawable/StateListDrawable;->extractStateSet(Landroid/util/AttributeSet;)[I
+Landroid/graphics/drawable/StateListDrawable;->mStateListState:Landroid/graphics/drawable/StateListDrawable$StateListState;
+Landroid/graphics/drawable/StateListDrawable;->updateStateFromTypedArray(Landroid/content/res/TypedArray;)V
+Landroid/graphics/drawable/TransitionDrawable;->mAlpha:I
+Landroid/graphics/drawable/TransitionDrawable;->mCrossFade:Z
+Landroid/graphics/drawable/TransitionDrawable;->mTo:I
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setPivotX(F)V
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setPivotY(F)V
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setRotation(F)V
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setTranslateX(F)V
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setTranslateY(F)V
+Landroid/graphics/drawable/VectorDrawable;->getTargetByName(Ljava/lang/String;)Ljava/lang/Object;
+Landroid/graphics/drawable/VectorDrawable;->mTintFilter:Landroid/graphics/PorterDuffColorFilter;
+Landroid/graphics/drawable/VectorDrawable;->setAllowCaching(Z)V
+Landroid/graphics/FontFamily;-><init>()V
+Landroid/graphics/FontFamily;->abortCreation()V
+Landroid/graphics/FontFamily;->addFontFromAssetManager(Landroid/content/res/AssetManager;Ljava/lang/String;IZIII[Landroid/graphics/fonts/FontVariationAxis;)Z
+Landroid/graphics/FontFamily;->addFontFromBuffer(Ljava/nio/ByteBuffer;I[Landroid/graphics/fonts/FontVariationAxis;II)Z
+Landroid/graphics/FontFamily;->freeze()Z
+Landroid/graphics/fonts/FontVariationAxis;->mStyleValue:F
+Landroid/graphics/fonts/FontVariationAxis;->mTag:I
+Landroid/graphics/GraphicBuffer;-><init>(IIIIJ)V
+Landroid/graphics/GraphicBuffer;->createFromExisting(IIIIJ)Landroid/graphics/GraphicBuffer;
+Landroid/graphics/GraphicBuffer;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/graphics/GraphicBuffer;->mNativeObject:J
+Landroid/graphics/ImageFormat;->Y8:I
+Landroid/graphics/LightingColorFilter;->setColorAdd(I)V
+Landroid/graphics/LightingColorFilter;->setColorMultiply(I)V
+Landroid/graphics/LinearGradient;->mColor0:I
+Landroid/graphics/LinearGradient;->mColor1:I
+Landroid/graphics/LinearGradient;->mColors:[I
+Landroid/graphics/LinearGradient;->mPositions:[F
+Landroid/graphics/LinearGradient;->mTileMode:Landroid/graphics/Shader$TileMode;
+Landroid/graphics/LinearGradient;->mX0:F
+Landroid/graphics/LinearGradient;->mX1:F
+Landroid/graphics/LinearGradient;->mY0:F
+Landroid/graphics/LinearGradient;->mY1:F
+Landroid/graphics/Matrix;->IDENTITY_MATRIX:Landroid/graphics/Matrix;
+Landroid/graphics/Matrix;->native_instance:J
+Landroid/graphics/Movie;-><init>(J)V
+Landroid/graphics/Movie;->mNativeMovie:J
+Landroid/graphics/NinePatch$InsetStruct;-><init>(IIIIIIIIFIF)V
+Landroid/graphics/NinePatch;->mBitmap:Landroid/graphics/Bitmap;
+Landroid/graphics/NinePatch;->mNativeChunk:J
+Landroid/graphics/Outline;->mRect:Landroid/graphics/Rect;
+Landroid/graphics/Paint;->getNativeInstance()J
+Landroid/graphics/Paint;->getTextRunAdvances([CIIIIZ[FI)F
+Landroid/graphics/Paint;->getTextRunCursor([CIIIII)I
+Landroid/graphics/Paint;->mNativePaint:J
+Landroid/graphics/Paint;->mTypeface:Landroid/graphics/Typeface;
+Landroid/graphics/Paint;->setCompatibilityScaling(F)V
+Landroid/graphics/Paint;->setHyphenEdit(I)V
+Landroid/graphics/Path;->isSimplePath:Z
+Landroid/graphics/Path;->rects:Landroid/graphics/Region;
+Landroid/graphics/pdf/PdfRenderer;->doClose()V
+Landroid/graphics/pdf/PdfRenderer;->mCurrentPage:Landroid/graphics/pdf/PdfRenderer$Page;
+Landroid/graphics/Picture;->mNativePicture:J
+Landroid/graphics/PorterDuff$Mode;->nativeInt:I
+Landroid/graphics/PorterDuffColorFilter;->getColor()I
+Landroid/graphics/PorterDuffColorFilter;->getMode()Landroid/graphics/PorterDuff$Mode;
+Landroid/graphics/RadialGradient;->mCenterColor:I
+Landroid/graphics/RadialGradient;->mColors:[I
+Landroid/graphics/RadialGradient;->mEdgeColor:I
+Landroid/graphics/RadialGradient;->mPositions:[F
+Landroid/graphics/RadialGradient;->mRadius:F
+Landroid/graphics/RadialGradient;->mTileMode:Landroid/graphics/Shader$TileMode;
+Landroid/graphics/RadialGradient;->mX:F
+Landroid/graphics/RadialGradient;->mY:F
+Landroid/graphics/Rect;->printShortString(Ljava/io/PrintWriter;)V
+Landroid/graphics/Rect;->scale(F)V
+Landroid/graphics/Region$Op;->nativeInt:I
+Landroid/graphics/Region;-><init>(JI)V
+Landroid/graphics/Region;->mNativeRegion:J
+Landroid/graphics/Region;->recycle()V
+Landroid/graphics/Region;->scale(F)V
+Landroid/graphics/Shader$TileMode;->nativeInt:I
+Landroid/graphics/SurfaceTexture;->mFrameAvailableListener:J
+Landroid/graphics/SurfaceTexture;->mOnFrameAvailableHandler:Landroid/os/Handler;
+Landroid/graphics/SurfaceTexture;->mProducer:J
+Landroid/graphics/SurfaceTexture;->mSurfaceTexture:J
+Landroid/graphics/SurfaceTexture;->nativeDetachFromGLContext()I
+Landroid/graphics/SurfaceTexture;->postEventFromNative(Ljava/lang/ref/WeakReference;)V
+Landroid/graphics/SweepGradient;->mColor0:I
+Landroid/graphics/SweepGradient;->mColor1:I
+Landroid/graphics/SweepGradient;->mColors:[I
+Landroid/graphics/SweepGradient;->mCx:F
+Landroid/graphics/SweepGradient;->mCy:F
+Landroid/graphics/SweepGradient;->mPositions:[F
+Landroid/graphics/TableMaskFilter;->CreateClipTable(II)Landroid/graphics/TableMaskFilter;
+Landroid/graphics/TemporaryBuffer;->obtain(I)[C
+Landroid/graphics/TemporaryBuffer;->recycle([C)V
+Landroid/graphics/Typeface;-><init>(J)V
+Landroid/graphics/Typeface;->createFromFamilies([Landroid/graphics/FontFamily;)Landroid/graphics/Typeface;
+Landroid/graphics/Typeface;->createFromFamiliesWithDefault([Landroid/graphics/FontFamily;II)Landroid/graphics/Typeface;
+Landroid/graphics/Typeface;->mStyle:I
+Landroid/graphics/Typeface;->nativeCreateFromArray([JII)J
+Landroid/graphics/Typeface;->nativeCreateWeightAlias(JI)J
+Landroid/graphics/Typeface;->native_instance:J
+Landroid/graphics/Typeface;->sDefaults:[Landroid/graphics/Typeface;
+Landroid/graphics/Typeface;->setDefault(Landroid/graphics/Typeface;)V
+Landroid/graphics/Typeface;->sSystemFontMap:Ljava/util/Map;
+Landroid/graphics/Xfermode;->porterDuffMode:I
+Landroid/hardware/Camera$Parameters;->copyFrom(Landroid/hardware/Camera$Parameters;)V
+Landroid/hardware/Camera$Parameters;->dump()V
+Landroid/hardware/Camera$Parameters;->splitArea(Ljava/lang/String;)Ljava/util/ArrayList;
+Landroid/hardware/camera2/CameraCharacteristics$Key;-><init>(Ljava/lang/String;Landroid/hardware/camera2/utils/TypeReference;)V
+Landroid/hardware/camera2/CameraCharacteristics$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
+Landroid/hardware/camera2/CameraCharacteristics$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;J)V
+Landroid/hardware/camera2/CameraCharacteristics$Key;->getNativeKey()Landroid/hardware/camera2/impl/CameraMetadataNative$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->CONTROL_MAX_REGIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->LED_AVAILABLE_LEDS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->LENS_INFO_SHADING_MAP_SIZE:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->QUIRKS_USE_PARTIAL_RESULT:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_CHARACTERISTICS_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_REQUEST_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_RESULT_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_MAX_NUM_OUTPUT_STREAMS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_FORMATS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_JPEG_MIN_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_JPEG_SIZES:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_MIN_FRAME_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_PROCESSED_SIZES:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_STALL_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_STREAM_CONFIGURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CaptureRequest$Builder;->setPartOfCHSRequestList(Z)V
+Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Landroid/hardware/camera2/utils/TypeReference;)V
+Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;J)V
+Landroid/hardware/camera2/CaptureRequest$Key;->getNativeKey()Landroid/hardware/camera2/impl/CameraMetadataNative$Key;
+Landroid/hardware/camera2/CaptureRequest;->getTargets()Ljava/util/Collection;
+Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_COORDINATES:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->REQUEST_ID:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_BLUE:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_GREEN:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_RED:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureResult$Key;-><init>(Ljava/lang/String;Landroid/hardware/camera2/utils/TypeReference;)V
+Landroid/hardware/camera2/CaptureResult$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
+Landroid/hardware/camera2/CaptureResult$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;J)V
+Landroid/hardware/camera2/CaptureResult$Key;->getNativeKey()Landroid/hardware/camera2/impl/CameraMetadataNative$Key;
+Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_COORDINATES:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->QUIRKS_PARTIAL_RESULT:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->REQUEST_FRAME_COUNT:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->REQUEST_ID:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_IDS:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_LANDMARKS:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_RECTANGLES:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_SCORES:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_LENS_SHADING_MAP:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_PREDICTED_COLOR_GAINS:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_PREDICTED_COLOR_TRANSFORM:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->SYNC_FRAME_NUMBER:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->TONEMAP_CURVE_BLUE:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->TONEMAP_CURVE_GREEN:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->TONEMAP_CURVE_RED:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/impl/CameraMetadataNative$Key;->getTag()I
+Landroid/hardware/camera2/impl/CameraMetadataNative;->mMetadataPtr:J
+Landroid/hardware/camera2/utils/SurfaceUtils;->getSurfaceSize(Landroid/view/Surface;)Landroid/util/Size;
+Landroid/hardware/camera2/utils/TypeReference;-><init>()V
+Landroid/hardware/camera2/utils/TypeReference;->createSpecializedTypeReference(Ljava/lang/reflect/Type;)Landroid/hardware/camera2/utils/TypeReference;
+Landroid/hardware/Camera;->addCallbackBuffer([BI)V
+Landroid/hardware/Camera;->addRawImageCallbackBuffer([B)V
+Landroid/hardware/Camera;->CAMERA_HAL_API_VERSION_1_0:I
+Landroid/hardware/Camera;->getEmptyParameters()Landroid/hardware/Camera$Parameters;
+Landroid/hardware/Camera;->mNativeContext:J
+Landroid/hardware/Camera;->native_getParameters()Ljava/lang/String;
+Landroid/hardware/Camera;->native_setParameters(Ljava/lang/String;)V
+Landroid/hardware/Camera;->native_setup(Ljava/lang/Object;IILjava/lang/String;)I
+Landroid/hardware/Camera;->openLegacy(II)Landroid/hardware/Camera;
+Landroid/hardware/Camera;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/hardware/Camera;->previewEnabled()Z
+Landroid/hardware/Camera;->setPreviewSurface(Landroid/view/Surface;)V
+Landroid/hardware/display/DisplayManager;->ACTION_WIFI_DISPLAY_STATUS_CHANGED:Ljava/lang/String;
+Landroid/hardware/display/DisplayManager;->connectWifiDisplay(Ljava/lang/String;)V
+Landroid/hardware/display/DisplayManager;->disconnectWifiDisplay()V
+Landroid/hardware/display/DisplayManager;->EXTRA_WIFI_DISPLAY_STATUS:Ljava/lang/String;
+Landroid/hardware/display/DisplayManager;->forgetWifiDisplay(Ljava/lang/String;)V
+Landroid/hardware/display/DisplayManager;->getWifiDisplayStatus()Landroid/hardware/display/WifiDisplayStatus;
+Landroid/hardware/display/DisplayManager;->pauseWifiDisplay()V
+Landroid/hardware/display/DisplayManager;->renameWifiDisplay(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/hardware/display/DisplayManager;->resumeWifiDisplay()V
+Landroid/hardware/display/DisplayManager;->startWifiDisplayScan()V
+Landroid/hardware/display/DisplayManager;->stopWifiDisplayScan()V
+Landroid/hardware/display/DisplayManagerGlobal;->disconnectWifiDisplay()V
+Landroid/hardware/display/DisplayManagerGlobal;->getDisplayIds()[I
+Landroid/hardware/display/DisplayManagerGlobal;->getDisplayInfo(I)Landroid/view/DisplayInfo;
+Landroid/hardware/display/DisplayManagerGlobal;->getWifiDisplayStatus()Landroid/hardware/display/WifiDisplayStatus;
+Landroid/hardware/display/DisplayManagerGlobal;->mDm:Landroid/hardware/display/IDisplayManager;
+Landroid/hardware/display/DisplayManagerGlobal;->sInstance:Landroid/hardware/display/DisplayManagerGlobal;
+Landroid/hardware/display/IDisplayManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/display/IDisplayManager;
+Landroid/hardware/display/IDisplayManager;->getDisplayInfo(I)Landroid/view/DisplayInfo;
+Landroid/hardware/display/WifiDisplay;->canConnect()Z
+Landroid/hardware/display/WifiDisplay;->equals(Landroid/hardware/display/WifiDisplay;)Z
+Landroid/hardware/display/WifiDisplay;->getDeviceAddress()Ljava/lang/String;
+Landroid/hardware/display/WifiDisplay;->getDeviceAlias()Ljava/lang/String;
+Landroid/hardware/display/WifiDisplay;->getDeviceName()Ljava/lang/String;
+Landroid/hardware/display/WifiDisplay;->isAvailable()Z
+Landroid/hardware/display/WifiDisplay;->isRemembered()Z
+Landroid/hardware/display/WifiDisplayStatus;->DISPLAY_STATE_CONNECTED:I
+Landroid/hardware/display/WifiDisplayStatus;->DISPLAY_STATE_CONNECTING:I
+Landroid/hardware/display/WifiDisplayStatus;->DISPLAY_STATE_NOT_CONNECTED:I
+Landroid/hardware/display/WifiDisplayStatus;->FEATURE_STATE_ON:I
+Landroid/hardware/display/WifiDisplayStatus;->getActiveDisplay()Landroid/hardware/display/WifiDisplay;
+Landroid/hardware/display/WifiDisplayStatus;->getActiveDisplayState()I
+Landroid/hardware/display/WifiDisplayStatus;->getDisplays()[Landroid/hardware/display/WifiDisplay;
+Landroid/hardware/display/WifiDisplayStatus;->getFeatureState()I
+Landroid/hardware/display/WifiDisplayStatus;->getScanState()I
+Landroid/hardware/display/WifiDisplayStatus;->mActiveDisplay:Landroid/hardware/display/WifiDisplay;
+Landroid/hardware/display/WifiDisplayStatus;->mDisplays:[Landroid/hardware/display/WifiDisplay;
+Landroid/hardware/display/WifiDisplayStatus;->SCAN_STATE_NOT_SCANNING:I
+Landroid/hardware/fingerprint/Fingerprint;->getFingerId()I
+Landroid/hardware/fingerprint/Fingerprint;->getName()Ljava/lang/CharSequence;
+Landroid/hardware/fingerprint/FingerprintManager$AuthenticationResult;->getFingerprint()Landroid/hardware/fingerprint/Fingerprint;
+Landroid/hardware/fingerprint/FingerprintManager;->getAuthenticatorId()J
+Landroid/hardware/fingerprint/FingerprintManager;->getEnrolledFingerprints()Ljava/util/List;
+Landroid/hardware/fingerprint/FingerprintManager;->getEnrolledFingerprints(I)Ljava/util/List;
+Landroid/hardware/fingerprint/IFingerprintService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/hardware/fingerprint/IFingerprintService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/fingerprint/IFingerprintService;
+Landroid/hardware/HardwareBuffer;-><init>(J)V
+Landroid/hardware/HardwareBuffer;->mNativeObject:J
+Landroid/hardware/ICameraService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/ICameraService;
+Landroid/hardware/input/IInputManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/hardware/input/IInputManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/input/IInputManager;
+Landroid/hardware/input/IInputManager$Stub;->TRANSACTION_injectInputEvent:I
+Landroid/hardware/input/IInputManager;->injectInputEvent(Landroid/view/InputEvent;I)Z
+Landroid/hardware/input/InputManager;->createInputForwarder(I)Landroid/app/IInputForwarder;
+Landroid/hardware/input/InputManager;->getInstance()Landroid/hardware/input/InputManager;
+Landroid/hardware/input/InputManager;->injectInputEvent(Landroid/view/InputEvent;I)Z
+Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
+Landroid/hardware/input/InputManager;->mIm:Landroid/hardware/input/IInputManager;
+Landroid/hardware/input/InputManager;->setPointerIconType(I)V
+Landroid/hardware/location/IActivityRecognitionHardwareClient$Stub;-><init>()V
+Landroid/hardware/location/IContextHubService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/location/IContextHubService;
+Landroid/hardware/Sensor;->getHandle()I
+Landroid/hardware/Sensor;->mFlags:I
+Landroid/hardware/Sensor;->TYPE_DEVICE_ORIENTATION:I
+Landroid/hardware/Sensor;->TYPE_PICK_UP_GESTURE:I
+Landroid/hardware/SensorEvent;-><init>(I)V
+Landroid/hardware/SensorManager;-><init>()V
+Landroid/hardware/SerialManager;->getSerialPorts()[Ljava/lang/String;
+Landroid/hardware/SerialManager;->openSerialPort(Ljava/lang/String;I)Landroid/hardware/SerialPort;
+Landroid/hardware/SerialPort;->close()V
+Landroid/hardware/SerialPort;->mNativeContext:I
+Landroid/hardware/SerialPort;->write(Ljava/nio/ByteBuffer;I)V
+Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;-><init>(II)V
+Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;->confidenceLevel:I
+Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;->userId:I
+Landroid/hardware/soundtrigger/SoundTrigger$GenericRecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B)V
+Landroid/hardware/soundtrigger/SoundTrigger$GenericSoundModel;-><init>(Ljava/util/UUID;Ljava/util/UUID;[B)V
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;-><init>(IILjava/lang/String;Ljava/lang/String;[I)V
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->id:I
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->locale:Ljava/lang/String;
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->recognitionModes:I
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->text:Ljava/lang/String;
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->users:[I
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;)V
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionEvent;->keyphraseExtras:[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;-><init>(III[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;)V
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->coarseConfidenceLevel:I
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->confidenceLevels:[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->id:I
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->recognitionModes:I
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseSoundModel;-><init>(Ljava/util/UUID;Ljava/util/UUID;[B[Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;)V
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseSoundModel;->keyphrases:[Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;
+Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;-><init>(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIIIZIZIZ)V
+Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;->id:I
+Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;->maxSoundModels:I
+Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;->uuid:Ljava/util/UUID;
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;-><init>(ZZ[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;[B)V
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->captureRequested:Z
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->data:[B
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->keyphrases:[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B)V
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->captureAvailable:Z
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->captureSession:I
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->data:[B
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->soundModelHandle:I
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->status:I
+Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->data:[B
+Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->uuid:Ljava/util/UUID;
+Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->vendorUuid:Ljava/util/UUID;
+Landroid/hardware/soundtrigger/SoundTrigger$SoundModelEvent;-><init>(II[B)V
+Landroid/hardware/soundtrigger/SoundTrigger;->attachModule(ILandroid/hardware/soundtrigger/SoundTrigger$StatusListener;Landroid/os/Handler;)Landroid/hardware/soundtrigger/SoundTriggerModule;
+Landroid/hardware/soundtrigger/SoundTrigger;->listModules(Ljava/util/ArrayList;)I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->detach()V
+Landroid/hardware/soundtrigger/SoundTriggerModule;->loadSoundModel(Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;[I)I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->mId:I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->mNativeContext:J
+Landroid/hardware/soundtrigger/SoundTriggerModule;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/hardware/soundtrigger/SoundTriggerModule;->startRecognition(ILandroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;)I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->stopRecognition(I)I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->unloadSoundModel(I)I
+Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchAdditionalInfoEvent(III[F[I)V
+Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchFlushCompleteEvent(I)V
+Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchSensorEvent(I[FIJ)V
+Landroid/hardware/usb/IUsbManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/hardware/usb/IUsbManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/usb/IUsbManager;
+Landroid/hardware/usb/UsbDevice;->mInterfaces:[Landroid/hardware/usb/UsbInterface;
+Landroid/hardware/usb/UsbDeviceConnection;->mNativeContext:J
+Landroid/hardware/usb/UsbManager;-><init>(Landroid/content/Context;Landroid/hardware/usb/IUsbManager;)V
+Landroid/hardware/usb/UsbManager;->ACTION_USB_STATE:Ljava/lang/String;
+Landroid/hardware/usb/UsbManager;->getPorts()[Landroid/hardware/usb/UsbPort;
+Landroid/hardware/usb/UsbManager;->getPortStatus(Landroid/hardware/usb/UsbPort;)Landroid/hardware/usb/UsbPortStatus;
+Landroid/hardware/usb/UsbManager;->isFunctionEnabled(Ljava/lang/String;)Z
+Landroid/hardware/usb/UsbManager;->setCurrentFunction(Ljava/lang/String;Z)V
+Landroid/hardware/usb/UsbManager;->setPortRoles(Landroid/hardware/usb/UsbPort;II)V
+Landroid/hardware/usb/UsbManager;->USB_CONNECTED:Ljava/lang/String;
+Landroid/hardware/usb/UsbManager;->USB_DATA_UNLOCKED:Ljava/lang/String;
+Landroid/hardware/usb/UsbManager;->USB_FUNCTION_NONE:Ljava/lang/String;
+Landroid/hardware/usb/UsbPortStatus;->getCurrentDataRole()I
+Landroid/hardware/usb/UsbPortStatus;->getCurrentMode()I
+Landroid/hardware/usb/UsbPortStatus;->getCurrentPowerRole()I
+Landroid/hardware/usb/UsbPortStatus;->getSupportedRoleCombinations()I
+Landroid/hardware/usb/UsbPortStatus;->isConnected()Z
+Landroid/hardware/usb/UsbPortStatus;->isRoleCombinationSupported(II)Z
+Landroid/hardware/usb/UsbRequest;->mBuffer:Ljava/nio/ByteBuffer;
+Landroid/hardware/usb/UsbRequest;->mLength:I
+Landroid/hardware/usb/UsbRequest;->mNativeContext:J
+Landroid/icu/impl/CurrencyData;-><init>()V
+Landroid/icu/text/ArabicShaping;-><init>(I)V
+Landroid/icu/text/ArabicShaping;->isAlefMaksouraChar(C)Z
+Landroid/icu/text/ArabicShaping;->isSeenTailFamilyChar(C)I
+Landroid/icu/text/ArabicShaping;->isTailChar(C)Z
+Landroid/icu/text/ArabicShaping;->isYehHamzaChar(C)Z
+Landroid/icu/text/ArabicShaping;->shape(Ljava/lang/String;)Ljava/lang/String;
+Landroid/icu/text/DateFormatSymbols;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/text/DateIntervalFormat;-><init>()V
+Landroid/icu/text/DateTimePatternGenerator$DistanceInfo;-><init>()V
+Landroid/icu/text/DecimalFormatSymbols;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/text/RuleBasedCollator;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/text/SpoofChecker$ScriptSet;-><init>()V
+Landroid/icu/text/SpoofChecker$ScriptSet;->and(I)V
+Landroid/icu/text/SpoofChecker$ScriptSet;->isFull()Z
+Landroid/icu/text/SpoofChecker$ScriptSet;->setAll()V
+Landroid/icu/text/TimeZoneNames$DefaultTimeZoneNames$FactoryImpl;-><init>()V
+Landroid/icu/text/Transliterator;->createFromRules(Ljava/lang/String;Ljava/lang/String;I)Landroid/icu/text/Transliterator;
+Landroid/icu/text/Transliterator;->getInstance(Ljava/lang/String;)Landroid/icu/text/Transliterator;
+Landroid/icu/text/Transliterator;->getInstance(Ljava/lang/String;I)Landroid/icu/text/Transliterator;
+Landroid/icu/text/Transliterator;->transliterate(Landroid/icu/text/Replaceable;Landroid/icu/text/Transliterator$Position;Ljava/lang/String;)V
+Landroid/icu/text/Transliterator;->transliterate(Ljava/lang/String;)Ljava/lang/String;
+Landroid/icu/text/UFormat;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/text/UForwardCharacterIterator;->DONE:I
+Landroid/icu/util/Calendar;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/util/PersianCalendar;-><init>(Ljava/util/Locale;)V
+Landroid/icu/util/UResourceBundle;->getBundleInstance(Ljava/lang/String;Landroid/icu/util/ULocale;)Landroid/icu/util/UResourceBundle;
+Landroid/icu/util/UResourceBundle;->getKey()Ljava/lang/String;
+Landroid/icu/util/UResourceBundle;->getString()Ljava/lang/String;
+Landroid/icu/util/UResourceBundle;->getType()I
+Landroid/icu/util/UResourceBundleIterator;->hasNext()Z
+Landroid/icu/util/UResourceBundleIterator;->next()Landroid/icu/util/UResourceBundle;
+Landroid/inputmethodservice/InputMethodService$SettingsObserver;->shouldShowImeWithHardKeyboard()Z
+Landroid/inputmethodservice/InputMethodService;->mExtractEditText:Landroid/inputmethodservice/ExtractEditText;
+Landroid/inputmethodservice/InputMethodService;->mExtractView:Landroid/view/View;
+Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
+Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
+Landroid/inputmethodservice/InputMethodService;->mTheme:I
+Landroid/inputmethodservice/InputMethodService;->mTmpInsets:Landroid/inputmethodservice/InputMethodService$Insets;
+Landroid/inputmethodservice/InputMethodService;->onExtractedDeleteText(II)V
+Landroid/inputmethodservice/InputMethodService;->onExtractedReplaceText(IILjava/lang/CharSequence;)V
+Landroid/inputmethodservice/InputMethodService;->onExtractedSetSpan(Ljava/lang/Object;III)V
+Landroid/inputmethodservice/Keyboard;->mModifierKeys:Ljava/util/List;
+Landroid/inputmethodservice/Keyboard;->mTotalHeight:I
+Landroid/inputmethodservice/Keyboard;->mTotalWidth:I
+Landroid/inputmethodservice/KeyboardView;->mKeyBackground:Landroid/graphics/drawable/Drawable;
+Landroid/inputmethodservice/KeyboardView;->mLabelTextSize:I
+Landroid/inputmethodservice/KeyboardView;->mPreviewText:Landroid/widget/TextView;
+Landroid/inputmethodservice/KeyboardView;->openPopupIfRequired(Landroid/view/MotionEvent;)Z
+Landroid/inputmethodservice/KeyboardView;->repeatKey()Z
+Landroid/inputmethodservice/KeyboardView;->showKey(I)V
+Landroid/location/Country;-><init>(Ljava/lang/String;I)V
+Landroid/location/Country;->getCountryIso()Ljava/lang/String;
+Landroid/location/Country;->getSource()I
+Landroid/location/CountryDetector;-><init>(Landroid/location/ICountryDetector;)V
+Landroid/location/CountryDetector;->addCountryListener(Landroid/location/CountryListener;Landroid/os/Looper;)V
+Landroid/location/CountryDetector;->detectCountry()Landroid/location/Country;
+Landroid/location/CountryDetector;->removeCountryListener(Landroid/location/CountryListener;)V
+Landroid/location/CountryListener;->onCountryDetected(Landroid/location/Country;)V
+Landroid/location/GeocoderParams;->getClientPackage()Ljava/lang/String;
+Landroid/location/GeocoderParams;->getLocale()Ljava/util/Locale;
+Landroid/location/Geofence;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/location/GpsStatus;->setTimeToFirstFix(I)V
+Landroid/location/ICountryDetector$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ICountryDetector;
+Landroid/location/ICountryListener$Stub;-><init>()V
+Landroid/location/IGeocodeProvider$Stub;-><init>()V
+Landroid/location/IGeocodeProvider$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/IGeocodeProvider;
+Landroid/location/IGeofenceProvider$Stub;-><init>()V
+Landroid/location/ILocationListener$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/location/ILocationListener$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/location/ILocationListener$Stub;-><init>()V
+Landroid/location/ILocationListener$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ILocationListener;
+Landroid/location/ILocationListener;->onLocationChanged(Landroid/location/Location;)V
+Landroid/location/ILocationListener;->onProviderDisabled(Ljava/lang/String;)V
+Landroid/location/ILocationListener;->onProviderEnabled(Ljava/lang/String;)V
+Landroid/location/ILocationListener;->onStatusChanged(Ljava/lang/String;ILandroid/os/Bundle;)V
+Landroid/location/ILocationManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/location/ILocationManager$Stub;-><init>()V
+Landroid/location/ILocationManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ILocationManager;
+Landroid/location/ILocationManager;->getAllProviders()Ljava/util/List;
+Landroid/location/Location;->mElapsedRealtimeNanos:J
+Landroid/location/Location;->mProvider:Ljava/lang/String;
+Landroid/location/LocationManager;->mService:Landroid/location/ILocationManager;
+Landroid/location/LocationManager;->requestLocationUpdates(Landroid/location/LocationRequest;Landroid/location/LocationListener;Landroid/os/Looper;Landroid/app/PendingIntent;)V
+Landroid/location/LocationManager;->sendNiResponse(II)Z
+Landroid/location/LocationRequest;->checkDisplacement(F)V
+Landroid/location/LocationRequest;->checkInterval(J)V
+Landroid/location/LocationRequest;->checkProvider(Ljava/lang/String;)V
+Landroid/location/LocationRequest;->checkQuality(I)V
+Landroid/location/LocationRequest;->mExpireAt:J
+Landroid/location/LocationRequest;->mExplicitFastestInterval:Z
+Landroid/location/LocationRequest;->mFastestInterval:J
+Landroid/location/LocationRequest;->mHideFromAppOps:Z
+Landroid/location/LocationRequest;->mInterval:J
+Landroid/location/LocationRequest;->mNumUpdates:I
+Landroid/location/LocationRequest;->mProvider:Ljava/lang/String;
+Landroid/location/LocationRequest;->mQuality:I
+Landroid/location/LocationRequest;->mSmallestDisplacement:F
+Landroid/location/LocationRequest;->mWorkSource:Landroid/os/WorkSource;
+Landroid/media/AmrInputStream;-><init>(Ljava/io/InputStream;)V
+Landroid/media/AsyncPlayer;->setUsesWakeLock(Landroid/content/Context;)V
+Landroid/media/AudioAttributes$Builder;->addTag(Ljava/lang/String;)Landroid/media/AudioAttributes$Builder;
+Landroid/media/AudioAttributes$Builder;->setInternalLegacyStreamType(I)Landroid/media/AudioAttributes$Builder;
+Landroid/media/AudioAttributes;->mContentType:I
+Landroid/media/AudioAttributes;->mFlags:I
+Landroid/media/AudioAttributes;->mFormattedTags:Ljava/lang/String;
+Landroid/media/AudioAttributes;->mSource:I
+Landroid/media/AudioAttributes;->mUsage:I
+Landroid/media/AudioAttributes;->toLegacyStreamType(Landroid/media/AudioAttributes;)I
+Landroid/media/AudioDevicePort;-><init>(Landroid/media/AudioHandle;Ljava/lang/String;[I[I[I[I[Landroid/media/AudioGain;ILjava/lang/String;)V
+Landroid/media/AudioDevicePort;->type()I
+Landroid/media/AudioDevicePortConfig;-><init>(Landroid/media/AudioDevicePort;IIILandroid/media/AudioGainConfig;)V
+Landroid/media/AudioFormat;-><init>(IIII)V
+Landroid/media/AudioFormat;->mChannelMask:I
+Landroid/media/AudioFormat;->mEncoding:I
+Landroid/media/AudioFormat;->mSampleRate:I
+Landroid/media/audiofx/AudioEffect;-><init>(Ljava/util/UUID;Ljava/util/UUID;II)V
+Landroid/media/audiofx/AudioEffect;->checkState(Ljava/lang/String;)V
+Landroid/media/audiofx/AudioEffect;->command(I[B[B)I
+Landroid/media/audiofx/AudioEffect;->getParameter([I[B)I
+Landroid/media/audiofx/AudioEffect;->getParameter([I[I)I
+Landroid/media/audiofx/AudioEffect;->setParameter([I[S)I
+Landroid/media/audiofx/Visualizer;->mId:I
+Landroid/media/AudioGain;-><init>(IIIIIIIII)V
+Landroid/media/AudioGainConfig;-><init>(ILandroid/media/AudioGain;II[II)V
+Landroid/media/AudioGainConfig;->mChannelMask:I
+Landroid/media/AudioGainConfig;->mIndex:I
+Landroid/media/AudioGainConfig;->mMode:I
+Landroid/media/AudioGainConfig;->mRampDurationMs:I
+Landroid/media/AudioGainConfig;->mValues:[I
+Landroid/media/AudioHandle;-><init>(I)V
+Landroid/media/AudioHandle;->mId:I
+Landroid/media/AudioManager;-><init>(Landroid/content/Context;)V
+Landroid/media/AudioManager;->abandonAudioFocusForCall()V
+Landroid/media/AudioManager;->createAudioPatch([Landroid/media/AudioPatch;[Landroid/media/AudioPortConfig;[Landroid/media/AudioPortConfig;)I
+Landroid/media/AudioManager;->DEVICE_OUT_ANLG_DOCK_HEADSET:I
+Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_A2DP:I
+Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES:I
+Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER:I
+Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_SCO_HEADSET:I
+Landroid/media/AudioManager;->DEVICE_OUT_DGTL_DOCK_HEADSET:I
+Landroid/media/AudioManager;->DEVICE_OUT_EARPIECE:I
+Landroid/media/AudioManager;->DEVICE_OUT_HDMI:I
+Landroid/media/AudioManager;->DEVICE_OUT_SPEAKER:I
+Landroid/media/AudioManager;->DEVICE_OUT_WIRED_HEADPHONE:I
+Landroid/media/AudioManager;->DEVICE_OUT_WIRED_HEADSET:I
+Landroid/media/AudioManager;->EXTRA_VOLUME_STREAM_TYPE:Ljava/lang/String;
+Landroid/media/AudioManager;->EXTRA_VOLUME_STREAM_VALUE:Ljava/lang/String;
+Landroid/media/AudioManager;->forceVolumeControlStream(I)V
+Landroid/media/AudioManager;->getDevicesForStream(I)I
+Landroid/media/AudioManager;->getLastAudibleStreamVolume(I)I
+Landroid/media/AudioManager;->getOutputLatency(I)I
+Landroid/media/AudioManager;->getRingerModeInternal()I
+Landroid/media/AudioManager;->getService()Landroid/media/IAudioService;
+Landroid/media/AudioManager;->isMasterMute()Z
+Landroid/media/AudioManager;->isMusicActiveRemotely()Z
+Landroid/media/AudioManager;->isSilentMode()Z
+Landroid/media/AudioManager;->isValidRingerMode(I)Z
+Landroid/media/AudioManager;->listAudioPatches(Ljava/util/ArrayList;)I
+Landroid/media/AudioManager;->listAudioPorts(Ljava/util/ArrayList;)I
+Landroid/media/AudioManager;->mAudioFocusIdListenerMap:Ljava/util/concurrent/ConcurrentHashMap;
+Landroid/media/AudioManager;->NUM_SOUND_EFFECTS:I
+Landroid/media/AudioManager;->releaseAudioPatch(Landroid/media/AudioPatch;)I
+Landroid/media/AudioManager;->reloadAudioSettings()V
+Landroid/media/AudioManager;->requestAudioFocusForCall(II)V
+Landroid/media/AudioManager;->setMasterMute(ZI)V
+Landroid/media/AudioManager;->setRingerModeInternal(I)V
+Landroid/media/AudioManager;->setWiredDeviceConnectionState(IILjava/lang/String;Ljava/lang/String;)V
+Landroid/media/AudioManager;->startBluetoothScoVirtualCall()V
+Landroid/media/AudioManager;->STREAM_BLUETOOTH_SCO:I
+Landroid/media/AudioManager;->STREAM_SYSTEM_ENFORCED:I
+Landroid/media/AudioManager;->STREAM_TTS:I
+Landroid/media/AudioManager;->VOLUME_CHANGED_ACTION:Ljava/lang/String;
+Landroid/media/AudioMixPort;-><init>(Landroid/media/AudioHandle;IILjava/lang/String;[I[I[I[I[Landroid/media/AudioGain;)V
+Landroid/media/AudioMixPort;->ioHandle()I
+Landroid/media/AudioMixPortConfig;-><init>(Landroid/media/AudioMixPort;IIILandroid/media/AudioGainConfig;)V
+Landroid/media/AudioPatch;-><init>(Landroid/media/AudioHandle;[Landroid/media/AudioPortConfig;[Landroid/media/AudioPortConfig;)V
+Landroid/media/AudioPatch;->mHandle:Landroid/media/AudioHandle;
+Landroid/media/AudioPatch;->sinks()[Landroid/media/AudioPortConfig;
+Landroid/media/AudioPatch;->sources()[Landroid/media/AudioPortConfig;
+Landroid/media/audiopolicy/AudioMix;->mCallbackFlags:I
+Landroid/media/audiopolicy/AudioMix;->mDeviceAddress:Ljava/lang/String;
+Landroid/media/audiopolicy/AudioMix;->mDeviceSystemType:I
+Landroid/media/audiopolicy/AudioMix;->mFormat:Landroid/media/AudioFormat;
+Landroid/media/audiopolicy/AudioMix;->mMixType:I
+Landroid/media/audiopolicy/AudioMix;->mRouteFlags:I
+Landroid/media/audiopolicy/AudioMix;->mRule:Landroid/media/audiopolicy/AudioMixingRule;
+Landroid/media/audiopolicy/AudioMixingRule$AudioMixMatchCriterion;->mAttr:Landroid/media/AudioAttributes;
+Landroid/media/audiopolicy/AudioMixingRule$AudioMixMatchCriterion;->mIntProp:I
+Landroid/media/audiopolicy/AudioMixingRule$AudioMixMatchCriterion;->mRule:I
+Landroid/media/audiopolicy/AudioMixingRule;->mCriteria:Ljava/util/ArrayList;
+Landroid/media/AudioPort;-><init>(Landroid/media/AudioHandle;ILjava/lang/String;[I[I[I[I[Landroid/media/AudioGain;)V
+Landroid/media/AudioPort;->id()I
+Landroid/media/AudioPort;->mActiveConfig:Landroid/media/AudioPortConfig;
+Landroid/media/AudioPort;->mGains:[Landroid/media/AudioGain;
+Landroid/media/AudioPort;->mHandle:Landroid/media/AudioHandle;
+Landroid/media/AudioPort;->mRole:I
+Landroid/media/AudioPort;->role()I
+Landroid/media/AudioPortConfig;-><init>(Landroid/media/AudioPort;IIILandroid/media/AudioGainConfig;)V
+Landroid/media/AudioPortConfig;->mChannelMask:I
+Landroid/media/AudioPortConfig;->mConfigMask:I
+Landroid/media/AudioPortConfig;->mFormat:I
+Landroid/media/AudioPortConfig;->mGain:Landroid/media/AudioGainConfig;
+Landroid/media/AudioPortConfig;->mPort:Landroid/media/AudioPort;
+Landroid/media/AudioPortConfig;->mSamplingRate:I
+Landroid/media/AudioPortConfig;->port()Landroid/media/AudioPort;
+Landroid/media/AudioPortEventHandler;->mJniCallback:J
+Landroid/media/AudioPortEventHandler;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/media/AudioRecord;->mAudioAttributes:Landroid/media/AudioAttributes;
+Landroid/media/AudioRecord;->mInitializationLooper:Landroid/os/Looper;
+Landroid/media/AudioRecord;->mNativeCallbackCookie:J
+Landroid/media/AudioRecord;->mNativeDeviceCallback:J
+Landroid/media/AudioRecord;->mNativeRecorderInJavaObj:J
+Landroid/media/AudioRecord;->native_release()V
+Landroid/media/AudioRecord;->native_setup(Ljava/lang/Object;Ljava/lang/Object;[IIIII[ILjava/lang/String;J)I
+Landroid/media/AudioRecord;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/media/AudioRecordingConfiguration;->getClientPackageName()Ljava/lang/String;
+Landroid/media/AudioRecordingConfiguration;->getClientUid()I
+Landroid/media/AudioSystem;->DEVICE_IN_AMBIENT:I
+Landroid/media/AudioSystem;->DEVICE_IN_ANLG_DOCK_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_IN_AUX_DIGITAL:I
+Landroid/media/AudioSystem;->DEVICE_IN_BACK_MIC:I
+Landroid/media/AudioSystem;->DEVICE_IN_BLUETOOTH_A2DP:I
+Landroid/media/AudioSystem;->DEVICE_IN_BLUETOOTH_SCO_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_IN_BUILTIN_MIC:I
+Landroid/media/AudioSystem;->DEVICE_IN_COMMUNICATION:I
+Landroid/media/AudioSystem;->DEVICE_IN_DEFAULT:I
+Landroid/media/AudioSystem;->DEVICE_IN_DGTL_DOCK_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_IN_REMOTE_SUBMIX:I
+Landroid/media/AudioSystem;->DEVICE_IN_USB_ACCESSORY:I
+Landroid/media/AudioSystem;->DEVICE_IN_USB_DEVICE:I
+Landroid/media/AudioSystem;->DEVICE_IN_VOICE_CALL:I
+Landroid/media/AudioSystem;->DEVICE_IN_WIRED_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_OUT_ALL_USB:I
+Landroid/media/AudioSystem;->DEVICE_OUT_ANLG_DOCK_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_OUT_AUX_DIGITAL:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_A2DP:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_SCO:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_SCO_CARKIT:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_SCO_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_OUT_DGTL_DOCK_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_OUT_EARPIECE:I
+Landroid/media/AudioSystem;->DEVICE_OUT_FM:I
+Landroid/media/AudioSystem;->DEVICE_OUT_REMOTE_SUBMIX:I
+Landroid/media/AudioSystem;->DEVICE_OUT_SPEAKER:I
+Landroid/media/AudioSystem;->DEVICE_OUT_TELEPHONY_TX:I
+Landroid/media/AudioSystem;->DEVICE_OUT_USB_ACCESSORY:I
+Landroid/media/AudioSystem;->DEVICE_OUT_USB_DEVICE:I
+Landroid/media/AudioSystem;->DEVICE_OUT_WIRED_HEADPHONE:I
+Landroid/media/AudioSystem;->DEVICE_OUT_WIRED_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_STATE_AVAILABLE:I
+Landroid/media/AudioSystem;->DEVICE_STATE_UNAVAILABLE:I
+Landroid/media/AudioSystem;->dynamicPolicyCallbackFromNative(ILjava/lang/String;I)V
+Landroid/media/AudioSystem;->errorCallbackFromNative(I)V
+Landroid/media/AudioSystem;->FORCE_ANALOG_DOCK:I
+Landroid/media/AudioSystem;->FORCE_BT_CAR_DOCK:I
+Landroid/media/AudioSystem;->FORCE_BT_DESK_DOCK:I
+Landroid/media/AudioSystem;->FORCE_DIGITAL_DOCK:I
+Landroid/media/AudioSystem;->FORCE_NONE:I
+Landroid/media/AudioSystem;->getDeviceConnectionState(ILjava/lang/String;)I
+Landroid/media/AudioSystem;->getDevicesForStream(I)I
+Landroid/media/AudioSystem;->getMasterMute()Z
+Landroid/media/AudioSystem;->getNumStreamTypes()I
+Landroid/media/AudioSystem;->getOutputDeviceName(I)Ljava/lang/String;
+Landroid/media/AudioSystem;->getOutputLatency(I)I
+Landroid/media/AudioSystem;->getPrimaryOutputFrameCount()I
+Landroid/media/AudioSystem;->getPrimaryOutputSamplingRate()I
+Landroid/media/AudioSystem;->initStreamVolume(III)I
+Landroid/media/AudioSystem;->isMicrophoneMuted()Z
+Landroid/media/AudioSystem;->isSourceActive(I)Z
+Landroid/media/AudioSystem;->isStreamActive(II)Z
+Landroid/media/AudioSystem;->muteMicrophone(Z)I
+Landroid/media/AudioSystem;->recordingCallbackFromNative(IIII[I)V
+Landroid/media/AudioSystem;->setDeviceConnectionState(IILjava/lang/String;Ljava/lang/String;)I
+Landroid/media/AudioSystem;->setErrorCallback(Landroid/media/AudioSystem$ErrorCallback;)V
+Landroid/media/AudioSystem;->setMasterMute(Z)I
+Landroid/media/AudioSystem;->setPhoneState(I)I
+Landroid/media/AudioSystem;->setStreamVolumeIndex(III)I
+Landroid/media/AudioSystem;->STREAM_SYSTEM_ENFORCED:I
+Landroid/media/AudioTrack;->deferred_connect(J)V
+Landroid/media/AudioTrack;->getLatency()I
+Landroid/media/AudioTrack;->mJniData:J
+Landroid/media/AudioTrack;->mNativeTrackInJavaObj:J
+Landroid/media/AudioTrack;->mStreamType:I
+Landroid/media/AudioTrack;->native_release()V
+Landroid/media/AudioTrack;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/media/CamcorderProfile;->native_get_camcorder_profile(II)Landroid/media/CamcorderProfile;
+Landroid/media/CamcorderProfile;->native_init()V
+Landroid/media/DecoderCapabilities$AudioDecoder;->AUDIO_DECODER_WMA:Landroid/media/DecoderCapabilities$AudioDecoder;
+Landroid/media/DecoderCapabilities$VideoDecoder;->VIDEO_DECODER_WMV:Landroid/media/DecoderCapabilities$VideoDecoder;
+Landroid/media/DecoderCapabilities;->getAudioDecoders()Ljava/util/List;
+Landroid/media/DecoderCapabilities;->getVideoDecoders()Ljava/util/List;
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mCodec:I
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMaxFrameHeight:I
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMaxFrameWidth:I
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMinFrameHeight:I
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMinFrameWidth:I
+Landroid/media/EncoderCapabilities;->getVideoEncoders()Ljava/util/List;
+Landroid/media/ExifInterface;->convertRationalLatLonToFloat(Ljava/lang/String;Ljava/lang/String;)F
+Landroid/media/ExifInterface;->getDateTime()J
+Landroid/media/ExifInterface;->getGpsDateTime()J
+Landroid/media/ExifInterface;->mAttributes:[Ljava/util/HashMap;
+Landroid/media/ExifInterface;->mFilename:Ljava/lang/String;
+Landroid/media/ExifInterface;->mHasThumbnail:Z
+Landroid/media/ExifInterface;->sFormatter:Ljava/text/SimpleDateFormat;
+Landroid/media/IAudioFocusDispatcher;->dispatchAudioFocusChange(ILjava/lang/String;)V
+Landroid/media/IAudioRoutesObserver$Stub;-><init>()V
+Landroid/media/IAudioService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/media/IAudioService$Stub;-><init>()V
+Landroid/media/IAudioService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IAudioService;
+Landroid/media/IAudioService;->getStreamMaxVolume(I)I
+Landroid/media/IAudioService;->getStreamVolume(I)I
+Landroid/media/IAudioService;->setStreamVolume(IIILjava/lang/String;)V
+Landroid/media/IAudioService;->startWatchingRoutes(Landroid/media/IAudioRoutesObserver;)Landroid/media/AudioRoutesInfo;
+Landroid/media/Image$Plane;-><init>()V
+Landroid/media/Image;-><init>()V
+Landroid/media/IMediaRouterService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IMediaRouterService;
+Landroid/media/IMediaScannerListener$Stub;-><init>()V
+Landroid/media/IMediaScannerService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IMediaScannerService;
+Landroid/media/IMediaScannerService;->requestScanFile(Ljava/lang/String;Ljava/lang/String;Landroid/media/IMediaScannerListener;)V
+Landroid/media/IMediaScannerService;->scanFile(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/media/IRemoteDisplayCallback;->onStateChanged(Landroid/media/RemoteDisplayState;)V
+Landroid/media/IRingtonePlayer;->play(Landroid/os/IBinder;Landroid/net/Uri;Landroid/media/AudioAttributes;FZ)V
+Landroid/media/IVolumeController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IVolumeController;
+Landroid/media/JetPlayer;->mNativePlayerInJavaObj:J
+Landroid/media/JetPlayer;->postEventFromNative(Ljava/lang/Object;III)V
+Landroid/media/MediaCodec$CodecException;-><init>(IILjava/lang/String;)V
+Landroid/media/MediaCodec;->getBuffers(Z)[Ljava/nio/ByteBuffer;
+Landroid/media/MediaCodec;->mNativeContext:J
+Landroid/media/MediaCodec;->releaseOutputBuffer(IZZJ)V
+Landroid/media/MediaCodec;->setParameters([Ljava/lang/String;[Ljava/lang/Object;)V
+Landroid/media/MediaCodecInfo$VideoCapabilities;->create(Landroid/media/MediaFormat;Landroid/media/MediaCodecInfo$CodecCapabilities;)Landroid/media/MediaCodecInfo$VideoCapabilities;
+Landroid/media/MediaFile$MediaFileType;->fileType:I
+Landroid/media/MediaFile$MediaFileType;->mimeType:Ljava/lang/String;
+Landroid/media/MediaFile;-><init>()V
+Landroid/media/MediaFile;->addFileType(Ljava/lang/String;ILjava/lang/String;)V
+Landroid/media/MediaFile;->FIRST_AUDIO_FILE_TYPE:I
+Landroid/media/MediaFile;->getFileTitle(Ljava/lang/String;)Ljava/lang/String;
+Landroid/media/MediaFile;->getFileType(Ljava/lang/String;)Landroid/media/MediaFile$MediaFileType;
+Landroid/media/MediaFile;->getFileTypeForMimeType(Ljava/lang/String;)I
+Landroid/media/MediaFile;->getMimeTypeForFile(Ljava/lang/String;)Ljava/lang/String;
+Landroid/media/MediaFile;->isAudioFileType(I)Z
+Landroid/media/MediaFile;->isDrmFileType(I)Z
+Landroid/media/MediaFile;->isImageFileType(I)Z
+Landroid/media/MediaFile;->isPlayListFileType(I)Z
+Landroid/media/MediaFile;->isVideoFileType(I)Z
+Landroid/media/MediaFile;->LAST_AUDIO_FILE_TYPE:I
+Landroid/media/MediaFile;->sFileTypeMap:Ljava/util/HashMap;
+Landroid/media/MediaFile;->sFileTypeToFormatMap:Ljava/util/HashMap;
+Landroid/media/MediaFile;->sFormatToMimeTypeMap:Ljava/util/HashMap;
+Landroid/media/MediaFile;->sMimeTypeToFormatMap:Ljava/util/HashMap;
+Landroid/media/MediaFormat;->getMap()Ljava/util/Map;
+Landroid/media/MediaFormat;->mMap:Ljava/util/Map;
+Landroid/media/MediaHTTPConnection;-><init>()V
+Landroid/media/MediaHTTPConnection;->connect(Ljava/lang/String;Ljava/lang/String;)Landroid/os/IBinder;
+Landroid/media/MediaHTTPConnection;->disconnect()V
+Landroid/media/MediaHTTPConnection;->getMIMEType()Ljava/lang/String;
+Landroid/media/MediaHTTPConnection;->getUri()Ljava/lang/String;
+Landroid/media/MediaHTTPConnection;->mAllowCrossDomainRedirect:Z
+Landroid/media/MediaHTTPConnection;->mAllowCrossProtocolRedirect:Z
+Landroid/media/MediaHTTPConnection;->mConnection:Ljava/net/HttpURLConnection;
+Landroid/media/MediaHTTPConnection;->mCurrentOffset:J
+Landroid/media/MediaHTTPConnection;->mHeaders:Ljava/util/Map;
+Landroid/media/MediaHTTPConnection;->mTotalSize:J
+Landroid/media/MediaHTTPConnection;->mURL:Ljava/net/URL;
+Landroid/media/MediaHTTPConnection;->readAt(JI)I
+Landroid/media/MediaHTTPService;->createHttpServiceBinderIfNecessary(Ljava/lang/String;)Landroid/os/IBinder;
+Landroid/media/MediaInserter;->flushAll()V
+Landroid/media/MediaMetadata;->getKeyFromMetadataEditorKey(I)Ljava/lang/String;
+Landroid/media/MediaMetadataRetriever;->getEmbeddedPicture(I)[B
+Landroid/media/MediaMetadataRetriever;->native_finalize()V
+Landroid/media/MediaMetadataRetriever;->native_init()V
+Landroid/media/MediaMetadataRetriever;->native_setup()V
+Landroid/media/MediaMuxer;->mCloseGuard:Ldalvik/system/CloseGuard;
+Landroid/media/MediaMuxer;->mNativeObject:J
+Landroid/media/MediaMuxer;->mState:I
+Landroid/media/MediaMuxer;->nativeRelease(J)V
+Landroid/media/MediaMuxer;->nativeSetup(Ljava/io/FileDescriptor;I)J
+Landroid/media/MediaPlayer$TrackInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/media/MediaPlayer;->addSubtitleSource(Ljava/io/InputStream;Landroid/media/MediaFormat;)V
+Landroid/media/MediaPlayer;->BYPASS_METADATA_FILTER:Z
+Landroid/media/MediaPlayer;->getMediaTimeProvider()Landroid/media/MediaTimeProvider;
+Landroid/media/MediaPlayer;->getMetadata(ZZ)Landroid/media/Metadata;
+Landroid/media/MediaPlayer;->invoke(Landroid/os/Parcel;Landroid/os/Parcel;)V
+Landroid/media/MediaPlayer;->METADATA_ALL:Z
+Landroid/media/MediaPlayer;->mEventHandler:Landroid/media/MediaPlayer$EventHandler;
+Landroid/media/MediaPlayer;->mOnCompletionListener:Landroid/media/MediaPlayer$OnCompletionListener;
+Landroid/media/MediaPlayer;->mOnErrorListener:Landroid/media/MediaPlayer$OnErrorListener;
+Landroid/media/MediaPlayer;->mOnInfoListener:Landroid/media/MediaPlayer$OnInfoListener;
+Landroid/media/MediaPlayer;->mOnPreparedListener:Landroid/media/MediaPlayer$OnPreparedListener;
+Landroid/media/MediaPlayer;->mOnSeekCompleteListener:Landroid/media/MediaPlayer$OnSeekCompleteListener;
+Landroid/media/MediaPlayer;->mOnTimedTextListener:Landroid/media/MediaPlayer$OnTimedTextListener;
+Landroid/media/MediaPlayer;->newRequest()Landroid/os/Parcel;
+Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;Ljava/util/Map;)V
+Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;)V
+Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;Ljava/util/List;)V
+Landroid/media/MediaPlayer;->setParameter(ILandroid/os/Parcel;)Z
+Landroid/media/MediaPlayer;->setRetransmitEndpoint(Ljava/net/InetSocketAddress;)V
+Landroid/media/MediaPlayer;->setSubtitleAnchor(Landroid/media/SubtitleController;Landroid/media/SubtitleController$Anchor;)V
+Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;
+Landroid/media/MediaRecorder;->mFd:Ljava/io/FileDescriptor;
+Landroid/media/MediaRecorder;->mOnErrorListener:Landroid/media/MediaRecorder$OnErrorListener;
+Landroid/media/MediaRecorder;->mOnInfoListener:Landroid/media/MediaRecorder$OnInfoListener;
+Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;
+Landroid/media/MediaRecorder;->mSurface:Landroid/view/Surface;
+Landroid/media/MediaRecorder;->native_finalize()V
+Landroid/media/MediaRecorder;->native_init()V
+Landroid/media/MediaRecorder;->native_reset()V
+Landroid/media/MediaRecorder;->native_setup(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V
+Landroid/media/MediaRecorder;->_prepare()V
+Landroid/media/MediaRouter$RouteInfo;->getDeviceAddress()Ljava/lang/String;
+Landroid/media/MediaRouter$RouteInfo;->getName(Landroid/content/res/Resources;)Ljava/lang/CharSequence;
+Landroid/media/MediaRouter$RouteInfo;->getStatusCode()I
+Landroid/media/MediaRouter$RouteInfo;->isDefault()Z
+Landroid/media/MediaRouter$RouteInfo;->isSelected()Z
+Landroid/media/MediaRouter$RouteInfo;->matchesTypes(I)Z
+Landroid/media/MediaRouter$RouteInfo;->mNameResId:I
+Landroid/media/MediaRouter$RouteInfo;->select()V
+Landroid/media/MediaRouter$RouteInfo;->STATUS_CONNECTING:I
+Landroid/media/MediaRouter;->getSelectedRoute()Landroid/media/MediaRouter$RouteInfo;
+Landroid/media/MediaRouter;->selectRouteInt(ILandroid/media/MediaRouter$RouteInfo;Z)V
+Landroid/media/MediaScanner$FileEntry;-><init>(JLjava/lang/String;JI)V
+Landroid/media/MediaScanner$FileEntry;->mLastModifiedChanged:Z
+Landroid/media/MediaScanner$FileEntry;->mRowId:J
+Landroid/media/MediaScanner$MyMediaScannerClient;->beginFile(Ljava/lang/String;Ljava/lang/String;JJZZ)Landroid/media/MediaScanner$FileEntry;
+Landroid/media/MediaScanner$MyMediaScannerClient;->doScanFile(Ljava/lang/String;Ljava/lang/String;JJZZZ)Landroid/net/Uri;
+Landroid/media/MediaScanner$MyMediaScannerClient;->endFile(Landroid/media/MediaScanner$FileEntry;ZZZZZ)Landroid/net/Uri;
+Landroid/media/MediaScanner$MyMediaScannerClient;->getFileTypeFromDrm(Ljava/lang/String;)I
+Landroid/media/MediaScanner$MyMediaScannerClient;->handleStringTag(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/media/MediaScanner$MyMediaScannerClient;->mFileType:I
+Landroid/media/MediaScanner$MyMediaScannerClient;->mIsDrm:Z
+Landroid/media/MediaScanner$MyMediaScannerClient;->mMimeType:Ljava/lang/String;
+Landroid/media/MediaScanner$MyMediaScannerClient;->mNoMedia:Z
+Landroid/media/MediaScanner$MyMediaScannerClient;->mPath:Ljava/lang/String;
+Landroid/media/MediaScanner$MyMediaScannerClient;->scanFile(Ljava/lang/String;JJZZ)V
+Landroid/media/MediaScanner$MyMediaScannerClient;->setMimeType(Ljava/lang/String;)V
+Landroid/media/MediaScanner$MyMediaScannerClient;->toValues()Landroid/content/ContentValues;
+Landroid/media/MediaScanner;-><init>(Landroid/content/Context;Ljava/lang/String;)V
+Landroid/media/MediaScanner;->FILES_PRESCAN_PROJECTION:[Ljava/lang/String;
+Landroid/media/MediaScanner;->isDrmEnabled()Z
+Landroid/media/MediaScanner;->isNoMediaPath(Ljava/lang/String;)Z
+Landroid/media/MediaScanner;->makeEntryFor(Ljava/lang/String;)Landroid/media/MediaScanner$FileEntry;
+Landroid/media/MediaScanner;->mAudioUri:Landroid/net/Uri;
+Landroid/media/MediaScanner;->mClient:Landroid/media/MediaScanner$MyMediaScannerClient;
+Landroid/media/MediaScanner;->mContext:Landroid/content/Context;
+Landroid/media/MediaScanner;->mDefaultAlarmAlertFilename:Ljava/lang/String;
+Landroid/media/MediaScanner;->mDefaultNotificationFilename:Ljava/lang/String;
+Landroid/media/MediaScanner;->mDefaultRingtoneFilename:Ljava/lang/String;
+Landroid/media/MediaScanner;->mFilesUri:Landroid/net/Uri;
+Landroid/media/MediaScanner;->mMediaInserter:Landroid/media/MediaInserter;
+Landroid/media/MediaScanner;->mPackageName:Ljava/lang/String;
+Landroid/media/MediaScanner;->postscan([Ljava/lang/String;)V
+Landroid/media/MediaScanner;->prescan(Ljava/lang/String;Z)V
+Landroid/media/MediaScanner;->scanSingleFile(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;
+Landroid/media/MediaScanner;->setLocale(Ljava/lang/String;)V
+Landroid/media/Metadata;-><init>()V
+Landroid/media/Metadata;->getBoolean(I)Z
+Landroid/media/Metadata;->getByteArray(I)[B
+Landroid/media/Metadata;->getDate(I)Ljava/util/Date;
+Landroid/media/Metadata;->getDouble(I)D
+Landroid/media/Metadata;->getInt(I)I
+Landroid/media/Metadata;->getLong(I)J
+Landroid/media/Metadata;->getString(I)Ljava/lang/String;
+Landroid/media/Metadata;->has(I)Z
+Landroid/media/Metadata;->keySet()Ljava/util/Set;
+Landroid/media/Metadata;->parse(Landroid/os/Parcel;)Z
+Landroid/media/Metadata;->PAUSE_AVAILABLE:I
+Landroid/media/Metadata;->SEEK_AVAILABLE:I
+Landroid/media/Metadata;->SEEK_BACKWARD_AVAILABLE:I
+Landroid/media/Metadata;->SEEK_FORWARD_AVAILABLE:I
+Landroid/media/MiniThumbFile;->reset()V
+Landroid/media/PlaybackParams;->mAudioFallbackMode:I
+Landroid/media/PlaybackParams;->mAudioStretchMode:I
+Landroid/media/PlaybackParams;->mPitch:F
+Landroid/media/PlaybackParams;->mSet:I
+Landroid/media/PlaybackParams;->mSpeed:F
+Landroid/media/PlaybackParams;->SET_AUDIO_FALLBACK_MODE:I
+Landroid/media/PlaybackParams;->SET_AUDIO_STRETCH_MODE:I
+Landroid/media/PlaybackParams;->SET_PITCH:I
+Landroid/media/PlaybackParams;->SET_SPEED:I
+Landroid/media/projection/IMediaProjectionManager;->hasProjectionPermission(ILjava/lang/String;)Z
+Landroid/media/RemoteControlClient;->MEDIA_POSITION_READABLE:I
+Landroid/media/RemoteControlClient;->MEDIA_POSITION_WRITABLE:I
+Landroid/media/RemoteController;->getUpdateListener()Landroid/media/RemoteController$OnClientUpdateListener;
+Landroid/media/RemoteController;->mCurrentSession:Landroid/media/session/MediaController;
+Landroid/media/RemoteController;->setArtworkConfiguration(ZII)Z
+Landroid/media/RemoteDisplay;->dispose()V
+Landroid/media/RemoteDisplay;->notifyDisplayConnected(Landroid/view/Surface;IIII)V
+Landroid/media/RemoteDisplay;->notifyDisplayDisconnected()V
+Landroid/media/RemoteDisplay;->notifyDisplayError(I)V
+Landroid/media/RemoteDisplayState;-><init>()V
+Landroid/media/RemoteDisplayState;->displays:Ljava/util/ArrayList;
+Landroid/media/Ringtone;-><init>(Landroid/content/Context;Z)V
+Landroid/media/Ringtone;->getUri()Landroid/net/Uri;
+Landroid/media/Ringtone;->mLocalPlayer:Landroid/media/MediaPlayer;
+Landroid/media/Ringtone;->mUri:Landroid/net/Uri;
+Landroid/media/Ringtone;->setUri(Landroid/net/Uri;)V
+Landroid/media/RingtoneManager;->getInternalRingtones()Landroid/database/Cursor;
+Landroid/media/RingtoneManager;->getMediaRingtones(Landroid/content/Context;)Landroid/database/Cursor;
+Landroid/media/RingtoneManager;->getRingtone(Landroid/content/Context;Landroid/net/Uri;I)Landroid/media/Ringtone;
+Landroid/media/RingtoneManager;->mCursor:Landroid/database/Cursor;
+Landroid/media/session/ISessionManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/session/ISessionManager;
+Landroid/media/session/MediaController;->controlsSameSession(Landroid/media/session/MediaController;)Z
+Landroid/media/session/MediaSession$QueueItem;->mId:J
+Landroid/media/session/MediaSession;->getCallingPackage()Ljava/lang/String;
+Landroid/media/session/MediaSession;->mCallback:Landroid/media/session/MediaSession$CallbackMessageHandler;
+Landroid/media/session/MediaSessionLegacyHelper;->getHelper(Landroid/content/Context;)Landroid/media/session/MediaSessionLegacyHelper;
+Landroid/media/session/MediaSessionManager;->getActiveSessionsForUser(Landroid/content/ComponentName;I)Ljava/util/List;
+Landroid/media/soundtrigger/SoundTriggerDetector$EventPayload;->getCaptureSession()Ljava/lang/Integer;
+Landroid/media/soundtrigger/SoundTriggerDetector$EventPayload;->getData()[B
+Landroid/media/soundtrigger/SoundTriggerManager;->isRecognitionActive(Ljava/util/UUID;)Z
+Landroid/media/soundtrigger/SoundTriggerManager;->loadSoundModel(Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;)I
+Landroid/media/soundtrigger/SoundTriggerManager;->stopRecognition(Ljava/util/UUID;)I
+Landroid/media/soundtrigger/SoundTriggerManager;->unloadSoundModel(Ljava/util/UUID;)I
+Landroid/media/SubtitleController;-><init>(Landroid/content/Context;Landroid/media/MediaTimeProvider;Landroid/media/SubtitleController$Listener;)V
+Landroid/media/SubtitleController;->hide()V
+Landroid/media/SubtitleController;->mHandler:Landroid/os/Handler;
+Landroid/media/SubtitleController;->registerRenderer(Landroid/media/SubtitleController$Renderer;)V
+Landroid/media/SubtitleController;->reset()V
+Landroid/media/SubtitleController;->show()V
+Landroid/media/SubtitleTrack$RenderingWidget;->draw(Landroid/graphics/Canvas;)V
+Landroid/media/SubtitleTrack$RenderingWidget;->onAttachedToWindow()V
+Landroid/media/SubtitleTrack$RenderingWidget;->onDetachedFromWindow()V
+Landroid/media/SubtitleTrack$RenderingWidget;->setOnChangedListener(Landroid/media/SubtitleTrack$RenderingWidget$OnChangedListener;)V
+Landroid/media/SubtitleTrack$RenderingWidget;->setSize(II)V
+Landroid/media/ThumbnailUtils;->closeSilently(Landroid/os/ParcelFileDescriptor;)V
+Landroid/media/ThumbnailUtils;->computeInitialSampleSize(Landroid/graphics/BitmapFactory$Options;II)I
+Landroid/media/ThumbnailUtils;->computeSampleSize(Landroid/graphics/BitmapFactory$Options;II)I
+Landroid/media/ThumbnailUtils;->createImageThumbnail(Ljava/lang/String;I)Landroid/graphics/Bitmap;
+Landroid/media/ThumbnailUtils;->createThumbnailFromEXIF(Ljava/lang/String;IILandroid/media/ThumbnailUtils$SizedThumbnailBitmap;)V
+Landroid/media/ThumbnailUtils;->makeInputStream(Landroid/net/Uri;Landroid/content/ContentResolver;)Landroid/os/ParcelFileDescriptor;
+Landroid/media/ThumbnailUtils;->TARGET_SIZE_MICRO_THUMBNAIL:I
+Landroid/media/ThumbnailUtils;->transform(Landroid/graphics/Matrix;Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;
+Landroid/media/TimedText;->getObject(I)Ljava/lang/Object;
+Landroid/media/ToneGenerator;->mNativeContext:J
+Landroid/media/TtmlRenderer;-><init>(Landroid/content/Context;)V
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_16_9:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_1_1:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_2_3:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_3_2:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_4_3:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->AVAILABILITY_AVAILABLE:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->AVAILABILITY_FREE_WITH_SUBSCRIPTION:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->AVAILABILITY_PAID_CONTENT:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_AUTHOR:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_AVAILABILITY:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_BROWSABLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_CONTENT_ID:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_DURATION_MILLIS:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_INTENT_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_INTERACTION_COUNT:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_INTERACTION_TYPE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_INTERNAL_PROVIDER_ID:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_ITEM_COUNT:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_LAST_PLAYBACK_POSITION_MILLIS:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_LIVE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_LOGO_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_OFFER_PRICE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_POSTER_ART_ASPECT_RATIO:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_PREVIEW_VIDEO_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_RELEASE_DATE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_STARTING_PRICE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_THUMBNAIL_ASPECT_RATIO:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_TRANSIENT:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_TYPE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_FANS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_FOLLOWERS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_LIKES:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_LISTENS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_THUMBS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_VIEWERS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_VIEWS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_ALBUM:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_ARTIST:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_CHANNEL:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_CLIP:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_EVENT:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_MOVIE:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_PLAYLIST:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_STATION:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_TRACK:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_TV_EPISODE:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_TV_SEASON:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_TV_SERIES:I
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_AUDIO_LANGUAGE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_CANONICAL_GENRE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_CONTENT_RATING:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_EPISODE_DISPLAY_NUMBER:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_EPISODE_TITLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_DATA:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_FLAG1:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_FLAG2:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_FLAG3:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_FLAG4:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_LONG_DESCRIPTION:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_POSTER_ART_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_REVIEW_RATING:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_REVIEW_RATING_STYLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_SEARCHABLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_SEASON_DISPLAY_NUMBER:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_SEASON_TITLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_SHORT_DESCRIPTION:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_THUMBNAIL_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_TITLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_VERSION_NUMBER:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_VIDEO_HEIGHT:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_VIDEO_WIDTH:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->REVIEW_RATING_STYLE_PERCENTAGE:I
+Landroid/media/tv/TvContract$ProgramColumns;->REVIEW_RATING_STYLE_STARS:I
+Landroid/media/tv/TvContract$ProgramColumns;->REVIEW_RATING_STYLE_THUMBS_UP_DOWN:I
+Landroid/media/tv/TvInputInfo;->getComponent()Landroid/content/ComponentName;
+Landroid/media/tv/TvInputService$Session;->mOverlayFrame:Landroid/graphics/Rect;
+Landroid/media/VolumeShaper$Configuration;-><init>(IIIDI[F[F)V
+Landroid/media/VolumeShaper$Configuration;->mDurationMs:D
+Landroid/media/VolumeShaper$Configuration;->mId:I
+Landroid/media/VolumeShaper$Configuration;->mInterpolatorType:I
+Landroid/media/VolumeShaper$Configuration;->mOptionFlags:I
+Landroid/media/VolumeShaper$Configuration;->mTimes:[F
+Landroid/media/VolumeShaper$Configuration;->mType:I
+Landroid/media/VolumeShaper$Configuration;->mVolumes:[F
+Landroid/media/VolumeShaper$Operation;-><init>(IIF)V
+Landroid/media/VolumeShaper$Operation;->mFlags:I
+Landroid/media/VolumeShaper$Operation;->mReplaceId:I
+Landroid/media/VolumeShaper$Operation;->mXOffset:F
+Landroid/media/VolumeShaper$State;-><init>(FF)V
+Landroid/media/VolumeShaper$State;->mVolume:F
+Landroid/media/VolumeShaper$State;->mXOffset:F
+Landroid/media/WebVttRenderer;-><init>(Landroid/content/Context;)V
+Landroid/mtp/MtpPropertyList;->append(IIIJ)V
+Landroid/mtp/MtpPropertyList;->append(IILjava/lang/String;)V
+Landroid/mtp/MtpStorage;->getPath()Ljava/lang/String;
+Landroid/mtp/MtpStorage;->getStorageId()I
+Landroid/net/ConnectivityManager;->ACTION_TETHER_STATE_CHANGED:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->EXTRA_ACTIVE_TETHER:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->EXTRA_AVAILABLE_TETHER:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->EXTRA_ERRORED_TETHER:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->from(Landroid/content/Context;)Landroid/net/ConnectivityManager;
+Landroid/net/ConnectivityManager;->getActiveLinkProperties()Landroid/net/LinkProperties;
+Landroid/net/ConnectivityManager;->getActiveNetworkInfoForUid(I)Landroid/net/NetworkInfo;
+Landroid/net/ConnectivityManager;->getDefaultNetworkCapabilitiesForUser(I)[Landroid/net/NetworkCapabilities;
+Landroid/net/ConnectivityManager;->getInstance()Landroid/net/ConnectivityManager;
+Landroid/net/ConnectivityManager;->getLastTetherError(Ljava/lang/String;)I
+Landroid/net/ConnectivityManager;->getLinkProperties(I)Landroid/net/LinkProperties;
+Landroid/net/ConnectivityManager;->getMobileDataEnabled()Z
+Landroid/net/ConnectivityManager;->getNetworkForType(I)Landroid/net/Network;
+Landroid/net/ConnectivityManager;->getNetworkTypeName(I)Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetherableBluetoothRegexs()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetherableIfaces()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetherableUsbRegexs()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetherableWifiRegexs()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetheredIfaces()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetheringErroredIfaces()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->INET_CONDITION_ACTION:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->isNetworkSupported(I)Z
+Landroid/net/ConnectivityManager;->isNetworkTypeMobile(I)Z
+Landroid/net/ConnectivityManager;->mService:Landroid/net/IConnectivityManager;
+Landroid/net/ConnectivityManager;->networkCapabilitiesForFeature(ILjava/lang/String;)Landroid/net/NetworkCapabilities;
+Landroid/net/ConnectivityManager;->registerNetworkFactory(Landroid/os/Messenger;Ljava/lang/String;)V
+Landroid/net/ConnectivityManager;->removeRequestForFeature(Landroid/net/NetworkCapabilities;)Z
+Landroid/net/ConnectivityManager;->requestNetworkForFeatureLocked(Landroid/net/NetworkCapabilities;)Landroid/net/NetworkRequest;
+Landroid/net/ConnectivityManager;->requestRouteToHostAddress(ILjava/net/InetAddress;)Z
+Landroid/net/ConnectivityManager;->setBackgroundDataSetting(Z)V
+Landroid/net/ConnectivityManager;->setProcessDefaultNetworkForHostResolution(Landroid/net/Network;)Z
+Landroid/net/ConnectivityManager;->setUsbTethering(Z)I
+Landroid/net/ConnectivityManager;->sLegacyRequests:Ljava/util/HashMap;
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_CBS:I
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_EMERGENCY:I
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_FOTA:I
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_IA:I
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_IMS:I
+Landroid/net/ConnectivityManager;->TYPE_NONE:I
+Landroid/net/ConnectivityManager;->TYPE_PROXY:I
+Landroid/net/ConnectivityManager;->TYPE_WIFI_P2P:I
+Landroid/net/ConnectivityManager;->unregisterNetworkFactory(Landroid/os/Messenger;)V
+Landroid/net/EthernetManager$Listener;->onAvailabilityChanged(Ljava/lang/String;Z)V
+Landroid/net/EthernetManager;->addListener(Landroid/net/EthernetManager$Listener;)V
+Landroid/net/EthernetManager;->getAvailableInterfaces()[Ljava/lang/String;
+Landroid/net/EthernetManager;->getConfiguration(Ljava/lang/String;)Landroid/net/IpConfiguration;
+Landroid/net/EthernetManager;->isAvailable()Z
+Landroid/net/EthernetManager;->isAvailable(Ljava/lang/String;)Z
+Landroid/net/EthernetManager;->removeListener(Landroid/net/EthernetManager$Listener;)V
+Landroid/net/EthernetManager;->setConfiguration(Ljava/lang/String;Landroid/net/IpConfiguration;)V
+Landroid/net/http/SslCertificate;->getDigest(Ljava/security/cert/X509Certificate;Ljava/lang/String;)Ljava/lang/String;
+Landroid/net/http/SslCertificate;->getSerialNumber(Ljava/security/cert/X509Certificate;)Ljava/lang/String;
+Landroid/net/http/SslCertificate;->inflateCertificateView(Landroid/content/Context;)Landroid/view/View;
+Landroid/net/http/SslCertificate;->mX509Certificate:Ljava/security/cert/X509Certificate;
+Landroid/net/http/SslError;->mCertificate:Landroid/net/http/SslCertificate;
+Landroid/net/http/SslError;->mErrors:I
+Landroid/net/http/SslError;->mUrl:Ljava/lang/String;
+Landroid/net/IConnectivityManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/net/IConnectivityManager$Stub$Proxy;->getActiveLinkProperties()Landroid/net/LinkProperties;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getActiveNetworkInfo()Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getAllNetworkInfo()[Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getAllNetworks()[Landroid/net/Network;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getTetherableIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getTetherableUsbRegexs()[Ljava/lang/String;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getTetheredIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/net/IConnectivityManager$Stub;-><init>()V
+Landroid/net/IConnectivityManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/IConnectivityManager;
+Landroid/net/IConnectivityManager;->getActiveLinkProperties()Landroid/net/LinkProperties;
+Landroid/net/IConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager;->getAllNetworkInfo()[Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager;->getLastTetherError(Ljava/lang/String;)I
+Landroid/net/IConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager;->getTetherableIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getTetherableUsbRegexs()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getTetherableWifiRegexs()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getTetheredIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getTetheringErroredIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->reportInetCondition(II)V
+Landroid/net/IConnectivityManager;->setAirplaneMode(Z)V
+Landroid/net/IConnectivityManager;->startLegacyVpn(Lcom/android/internal/net/VpnProfile;)V
+Landroid/net/INetworkManagementEventObserver$Stub;-><init>()V
+Landroid/net/INetworkPolicyListener$Stub;-><init>()V
+Landroid/net/INetworkPolicyManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetworkPolicyManager;
+Landroid/net/INetworkPolicyManager;->getRestrictBackground()Z
+Landroid/net/INetworkPolicyManager;->getUidPolicy(I)I
+Landroid/net/INetworkPolicyManager;->setNetworkPolicies([Landroid/net/NetworkPolicy;)V
+Landroid/net/INetworkPolicyManager;->setRestrictBackground(Z)V
+Landroid/net/INetworkPolicyManager;->setUidPolicy(II)V
+Landroid/net/INetworkPolicyManager;->snoozeLimit(Landroid/net/NetworkTemplate;)V
+Landroid/net/INetworkScoreService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetworkScoreService;
+Landroid/net/INetworkStatsService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/net/INetworkStatsService$Stub$Proxy;->getMobileIfaces()[Ljava/lang/String;
+Landroid/net/INetworkStatsService;->forceUpdate()V
+Landroid/net/INetworkStatsService;->getMobileIfaces()[Ljava/lang/String;
+Landroid/net/INetworkStatsService;->openSession()Landroid/net/INetworkStatsSession;
+Landroid/net/INetworkStatsService;->openSessionForUsageStats(ILjava/lang/String;)Landroid/net/INetworkStatsSession;
+Landroid/net/INetworkStatsSession;->close()V
+Landroid/net/INetworkStatsSession;->getSummaryForAllUid(Landroid/net/NetworkTemplate;JJZ)Landroid/net/NetworkStats;
+Landroid/net/INetworkStatsSession;->getSummaryForNetwork(Landroid/net/NetworkTemplate;JJ)Landroid/net/NetworkStats;
+Landroid/net/InterfaceConfiguration;->clearFlag(Ljava/lang/String;)V
+Landroid/net/InterfaceConfiguration;->getFlags()Ljava/lang/Iterable;
+Landroid/net/InterfaceConfiguration;->setFlag(Ljava/lang/String;)V
+Landroid/net/InterfaceConfiguration;->setInterfaceDown()V
+Landroid/net/InterfaceConfiguration;->setInterfaceUp()V
+Landroid/net/IpConfiguration$IpAssignment;->STATIC:Landroid/net/IpConfiguration$IpAssignment;
+Landroid/net/IpConfiguration$ProxySettings;->NONE:Landroid/net/IpConfiguration$ProxySettings;
+Landroid/net/IpConfiguration;-><init>(Landroid/net/IpConfiguration$IpAssignment;Landroid/net/IpConfiguration$ProxySettings;Landroid/net/StaticIpConfiguration;Landroid/net/ProxyInfo;)V
+Landroid/net/IpConfiguration;->httpProxy:Landroid/net/ProxyInfo;
+Landroid/net/LinkAddress;->address:Ljava/net/InetAddress;
+Landroid/net/LinkAddress;->getNetworkPrefixLength()I
+Landroid/net/LinkAddress;->prefixLength:I
+Landroid/net/LinkProperties;->addLinkAddress(Landroid/net/LinkAddress;)Z
+Landroid/net/LinkProperties;->getAddresses()Ljava/util/List;
+Landroid/net/LinkProperties;->getAllAddresses()Ljava/util/List;
+Landroid/net/LinkProperties;->getAllLinkAddresses()Ljava/util/List;
+Landroid/net/LinkProperties;->isIdenticalHttpProxy(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalInterfaceName(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->mIfaceName:Ljava/lang/String;
+Landroid/net/LinkProperties;->setHttpProxy(Landroid/net/ProxyInfo;)V
+Landroid/net/LinkQualityInfo;->setDataSampleDuration(I)V
+Landroid/net/LinkQualityInfo;->setLastDataSampleTime(J)V
+Landroid/net/LinkQualityInfo;->setPacketCount(J)V
+Landroid/net/LinkQualityInfo;->setPacketErrorCount(J)V
+Landroid/net/LocalSocket;->impl:Landroid/net/LocalSocketImpl;
+Landroid/net/LocalSocketImpl;-><init>()V
+Landroid/net/LocalSocketImpl;->inboundFileDescriptors:[Ljava/io/FileDescriptor;
+Landroid/net/LocalSocketImpl;->outboundFileDescriptors:[Ljava/io/FileDescriptor;
+Landroid/net/MobileLinkQualityInfo;-><init>()V
+Landroid/net/MobileLinkQualityInfo;->getMobileNetworkType()I
+Landroid/net/MobileLinkQualityInfo;->setCdmaDbm(I)V
+Landroid/net/MobileLinkQualityInfo;->setCdmaEcio(I)V
+Landroid/net/MobileLinkQualityInfo;->setEvdoDbm(I)V
+Landroid/net/MobileLinkQualityInfo;->setEvdoEcio(I)V
+Landroid/net/MobileLinkQualityInfo;->setEvdoSnr(I)V
+Landroid/net/MobileLinkQualityInfo;->setGsmErrorRate(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteCqi(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteRsrp(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteRsrq(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteRssnr(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteSignalStrength(I)V
+Landroid/net/MobileLinkQualityInfo;->setMobileNetworkType(I)V
+Landroid/net/MobileLinkQualityInfo;->setRssi(I)V
+Landroid/net/NetworkAgent;->sendNetworkInfo(Landroid/net/NetworkInfo;)V
+Landroid/net/NetworkCapabilities;-><init>()V
+Landroid/net/NetworkCapabilities;->addCapability(I)Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkCapabilities;->addTransportType(I)Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkCapabilities;->mNetworkCapabilities:J
+Landroid/net/NetworkCapabilities;->mSignalStrength:I
+Landroid/net/NetworkCapabilities;->removeCapability(I)Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkCapabilities;->setSignalStrength(I)Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkFactory;-><init>(Landroid/os/Looper;Landroid/content/Context;Ljava/lang/String;Landroid/net/NetworkCapabilities;)V
+Landroid/net/NetworkFactory;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
+Landroid/net/NetworkFactory;->setScoreFilter(I)V
+Landroid/net/NetworkInfo;-><init>(IILjava/lang/String;Ljava/lang/String;)V
+Landroid/net/NetworkInfo;-><init>(Landroid/net/NetworkInfo;)V
+Landroid/net/NetworkInfo;->setDetailedState(Landroid/net/NetworkInfo$DetailedState;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/net/NetworkInfo;->setFailover(Z)V
+Landroid/net/NetworkInfo;->setIsAvailable(Z)V
+Landroid/net/NetworkInfo;->setRoaming(Z)V
+Landroid/net/NetworkInfo;->setSubtype(ILjava/lang/String;)V
+Landroid/net/NetworkPolicy;-><init>(Landroid/net/NetworkTemplate;ILjava/lang/String;JJJJZZ)V
+Landroid/net/NetworkPolicy;->clearSnooze()V
+Landroid/net/NetworkPolicy;->compareTo(Landroid/net/NetworkPolicy;)I
+Landroid/net/NetworkPolicy;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkPolicy;->inferred:Z
+Landroid/net/NetworkPolicy;->isOverLimit(J)Z
+Landroid/net/NetworkPolicy;->isOverWarning(J)Z
+Landroid/net/NetworkPolicy;->limitBytes:J
+Landroid/net/NetworkPolicy;->metered:Z
+Landroid/net/NetworkPolicy;->template:Landroid/net/NetworkTemplate;
+Landroid/net/NetworkPolicy;->warningBytes:J
+Landroid/net/NetworkPolicyManager;->from(Landroid/content/Context;)Landroid/net/NetworkPolicyManager;
+Landroid/net/NetworkPolicyManager;->getNetworkPolicies()[Landroid/net/NetworkPolicy;
+Landroid/net/NetworkPolicyManager;->getRestrictBackground()Z
+Landroid/net/NetworkPolicyManager;->getUidPolicy(I)I
+Landroid/net/NetworkPolicyManager;->getUidsWithPolicy(I)[I
+Landroid/net/NetworkPolicyManager;->mService:Landroid/net/INetworkPolicyManager;
+Landroid/net/NetworkPolicyManager;->registerListener(Landroid/net/INetworkPolicyListener;)V
+Landroid/net/NetworkPolicyManager;->setRestrictBackground(Z)V
+Landroid/net/NetworkPolicyManager;->setUidPolicy(II)V
+Landroid/net/NetworkPolicyManager;->unregisterListener(Landroid/net/INetworkPolicyListener;)V
+Landroid/net/NetworkQuotaInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkRequest$Builder;->clearCapabilities()Landroid/net/NetworkRequest$Builder;
+Landroid/net/NetworkRequest;->legacyType:I
+Landroid/net/NetworkRequest;->requestId:I
+Landroid/net/NetworkState;-><init>(Landroid/os/Parcel;)V
+Landroid/net/NetworkState;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkStats;-><init>(Landroid/os/Parcel;)V
+Landroid/net/NetworkStats;->capacity:I
+Landroid/net/NetworkStats;->combineAllValues(Landroid/net/NetworkStats;)V
+Landroid/net/NetworkStats;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkStats;->defaultNetwork:[I
+Landroid/net/NetworkStats;->getTotal(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats$Entry;
+Landroid/net/NetworkStats;->getTotal(Landroid/net/NetworkStats$Entry;I)Landroid/net/NetworkStats$Entry;
+Landroid/net/NetworkStats;->getTotalBytes()J
+Landroid/net/NetworkStats;->getTotalIncludingTags(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats$Entry;
+Landroid/net/NetworkStats;->getUniqueUids()[I
+Landroid/net/NetworkStats;->getValues(ILandroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats$Entry;
+Landroid/net/NetworkStats;->iface:[Ljava/lang/String;
+Landroid/net/NetworkStats;->metered:[I
+Landroid/net/NetworkStats;->operations:[J
+Landroid/net/NetworkStats;->roaming:[I
+Landroid/net/NetworkStats;->rxBytes:[J
+Landroid/net/NetworkStats;->rxPackets:[J
+Landroid/net/NetworkStats;->set:[I
+Landroid/net/NetworkStats;->size()I
+Landroid/net/NetworkStats;->size:I
+Landroid/net/NetworkStats;->tag:[I
+Landroid/net/NetworkStats;->txBytes:[J
+Landroid/net/NetworkStats;->txPackets:[J
+Landroid/net/NetworkStats;->uid:[I
+Landroid/net/NetworkStatsHistory$Entry;->bucketDuration:J
+Landroid/net/NetworkStatsHistory$Entry;->bucketStart:J
+Landroid/net/NetworkStatsHistory$Entry;->rxBytes:J
+Landroid/net/NetworkStatsHistory$Entry;->rxPackets:J
+Landroid/net/NetworkStatsHistory$Entry;->txPackets:J
+Landroid/net/NetworkStatsHistory;-><init>(J)V
+Landroid/net/NetworkStatsHistory;-><init>(Landroid/os/Parcel;)V
+Landroid/net/NetworkStatsHistory;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkStatsHistory;->getEnd()J
+Landroid/net/NetworkStatsHistory;->getIndexBefore(J)I
+Landroid/net/NetworkStatsHistory;->getValues(ILandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
+Landroid/net/NetworkStatsHistory;->getValues(JJJLandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
+Landroid/net/NetworkStatsHistory;->recordEntireHistory(Landroid/net/NetworkStatsHistory;)V
+Landroid/net/NetworkStatsHistory;->size()I
+Landroid/net/NetworkTemplate;-><init>(ILjava/lang/String;Ljava/lang/String;)V
+Landroid/net/NetworkTemplate;->buildTemplateEthernet()Landroid/net/NetworkTemplate;
+Landroid/net/NetworkTemplate;->buildTemplateMobileWildcard()Landroid/net/NetworkTemplate;
+Landroid/net/NetworkTemplate;->buildTemplateWifi()Landroid/net/NetworkTemplate;
+Landroid/net/NetworkTemplate;->buildTemplateWifiWildcard()Landroid/net/NetworkTemplate;
+Landroid/net/NetworkTemplate;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkTemplate;->getMatchRule()I
+Landroid/net/NetworkTemplate;->getSubscriberId()Ljava/lang/String;
+Landroid/net/NetworkTemplate;->normalize(Landroid/net/NetworkTemplate;[Ljava/lang/String;)Landroid/net/NetworkTemplate;
+Landroid/net/NetworkUtils;->intToInetAddress(I)Ljava/net/InetAddress;
+Landroid/net/NetworkUtils;->numericToInetAddress(Ljava/lang/String;)Ljava/net/InetAddress;
+Landroid/net/NetworkUtils;->prefixLengthToNetmaskInt(I)I
+Landroid/net/NetworkUtils;->trimV4AddrZeros(Ljava/lang/String;)Ljava/lang/String;
+Landroid/net/nsd/INsdManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/nsd/INsdManager;
+Landroid/net/nsd/INsdManager;->getMessenger()Landroid/os/Messenger;
+Landroid/net/nsd/NsdServiceInfo;->setAttribute(Ljava/lang/String;[B)V
+Landroid/net/Proxy;->getProxy(Landroid/content/Context;Ljava/lang/String;)Ljava/net/Proxy;
+Landroid/net/Proxy;->setHttpProxySystemProperty(Landroid/net/ProxyInfo;)V
+Landroid/net/ProxyInfo;-><init>(Ljava/lang/String;ILjava/lang/String;)V
+Landroid/net/RouteInfo;-><init>(Landroid/net/LinkAddress;Ljava/net/InetAddress;)V
+Landroid/net/RouteInfo;-><init>(Landroid/net/LinkAddress;Ljava/net/InetAddress;Ljava/lang/String;)V
+Landroid/net/RouteInfo;-><init>(Ljava/net/InetAddress;)V
+Landroid/net/RouteInfo;->isHost()Z
+Landroid/net/RouteInfo;->mGateway:Ljava/net/InetAddress;
+Landroid/net/RouteInfo;->mIsHost:Z
+Landroid/net/SntpClient;-><init>()V
+Landroid/net/SSLCertificateSocketFactory;-><init>(ILandroid/net/SSLSessionCache;Z)V
+Landroid/net/SSLCertificateSocketFactory;->castToOpenSSLSocket(Ljava/net/Socket;)Lcom/android/org/conscrypt/OpenSSLSocketImpl;
+Landroid/net/SSLCertificateSocketFactory;->getAlpnSelectedProtocol(Ljava/net/Socket;)[B
+Landroid/net/SSLCertificateSocketFactory;->getDelegate()Ljavax/net/ssl/SSLSocketFactory;
+Landroid/net/SSLCertificateSocketFactory;->INSECURE_TRUST_MANAGER:[Ljavax/net/ssl/TrustManager;
+Landroid/net/SSLCertificateSocketFactory;->isSslCheckRelaxed()Z
+Landroid/net/SSLCertificateSocketFactory;->makeSocketFactory([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;)Ljavax/net/ssl/SSLSocketFactory;
+Landroid/net/SSLCertificateSocketFactory;->mAlpnProtocols:[B
+Landroid/net/SSLCertificateSocketFactory;->mChannelIdPrivateKey:Ljava/security/PrivateKey;
+Landroid/net/SSLCertificateSocketFactory;->mHandshakeTimeoutMillis:I
+Landroid/net/SSLCertificateSocketFactory;->mInsecureFactory:Ljavax/net/ssl/SSLSocketFactory;
+Landroid/net/SSLCertificateSocketFactory;->mKeyManagers:[Ljavax/net/ssl/KeyManager;
+Landroid/net/SSLCertificateSocketFactory;->mNpnProtocols:[B
+Landroid/net/SSLCertificateSocketFactory;->mSecure:Z
+Landroid/net/SSLCertificateSocketFactory;->mSecureFactory:Ljavax/net/ssl/SSLSocketFactory;
+Landroid/net/SSLCertificateSocketFactory;->mSessionCache:Lcom/android/org/conscrypt/SSLClientSessionCache;
+Landroid/net/SSLCertificateSocketFactory;->mTrustManagers:[Ljavax/net/ssl/TrustManager;
+Landroid/net/SSLCertificateSocketFactory;->setAlpnProtocols([[B)V
+Landroid/net/SSLCertificateSocketFactory;->setChannelIdPrivateKey(Ljava/security/PrivateKey;)V
+Landroid/net/SSLCertificateSocketFactory;->setSoWriteTimeout(Ljava/net/Socket;I)V
+Landroid/net/SSLCertificateSocketFactory;->TAG:Ljava/lang/String;
+Landroid/net/SSLCertificateSocketFactory;->verifyHostname(Ljava/net/Socket;Ljava/lang/String;)V
+Landroid/net/SSLSessionCache;->mSessionCache:Lcom/android/org/conscrypt/SSLClientSessionCache;
+Landroid/net/StaticIpConfiguration;-><init>()V
+Landroid/net/StaticIpConfiguration;->gateway:Ljava/net/InetAddress;
+Landroid/net/StaticIpConfiguration;->ipAddress:Landroid/net/LinkAddress;
+Landroid/net/TrafficStats;->getMobileIfaces()[Ljava/lang/String;
+Landroid/net/TrafficStats;->getRxBytes(Ljava/lang/String;)J
+Landroid/net/TrafficStats;->getStatsService()Landroid/net/INetworkStatsService;
+Landroid/net/TrafficStats;->getTxBytes(Ljava/lang/String;)J
+Landroid/net/Uri;-><init>()V
+Landroid/net/Uri;->getCanonicalUri()Landroid/net/Uri;
+Landroid/net/Uri;->toSafeString()Ljava/lang/String;
+Landroid/net/VpnService$Builder;->mAddresses:Ljava/util/List;
+Landroid/net/VpnService$Builder;->mRoutes:Ljava/util/List;
+Landroid/net/WebAddress;->getAuthInfo()Ljava/lang/String;
+Landroid/net/WebAddress;->getHost()Ljava/lang/String;
+Landroid/net/WebAddress;->getPath()Ljava/lang/String;
+Landroid/net/WebAddress;->getPort()I
+Landroid/net/WebAddress;->getScheme()Ljava/lang/String;
+Landroid/net/WebAddress;->mHost:Ljava/lang/String;
+Landroid/net/WebAddress;->mPath:Ljava/lang/String;
+Landroid/net/WebAddress;->mPort:I
+Landroid/net/WebAddress;->mScheme:Ljava/lang/String;
+Landroid/net/WebAddress;->setHost(Ljava/lang/String;)V
+Landroid/net/WebAddress;->setPath(Ljava/lang/String;)V
+Landroid/net/wifi/IWifiManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/net/wifi/IWifiManager$Stub;-><init>()V
+Landroid/net/wifi/IWifiManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/wifi/IWifiManager;
+Landroid/net/wifi/IWifiManager;->getCurrentNetwork()Landroid/net/Network;
+Landroid/net/wifi/IWifiManager;->getWifiApConfiguration()Landroid/net/wifi/WifiConfiguration;
+Landroid/net/wifi/IWifiManager;->getWifiApEnabledState()I
+Landroid/net/wifi/IWifiScanner$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/net/wifi/IWifiScanner$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/net/wifi/IWifiScanner$Stub;-><init>()V
+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/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo;->createRequest(Ljava/lang/String;II)Ljava/lang/String;
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;-><init>(Ljava/util/List;)V
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;->mQueryList:Ljava/util/List;
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceRequest;-><init>(ILjava/lang/String;)V
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceRequest;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/p2p/WifiP2pConfig;-><init>(Ljava/lang/String;)V
+Landroid/net/wifi/p2p/WifiP2pConfig;->MIN_GROUP_OWNER_INTENT:I
+Landroid/net/wifi/p2p/WifiP2pConfig;->netId:I
+Landroid/net/wifi/p2p/WifiP2pDevice;-><init>(Ljava/lang/String;)V
+Landroid/net/wifi/p2p/WifiP2pDevice;->deviceCapability:I
+Landroid/net/wifi/p2p/WifiP2pDevice;->groupCapability:I
+Landroid/net/wifi/p2p/WifiP2pDevice;->update(Landroid/net/wifi/p2p/WifiP2pDevice;)V
+Landroid/net/wifi/p2p/WifiP2pDevice;->wfdInfo:Landroid/net/wifi/p2p/WifiP2pWfdInfo;
+Landroid/net/wifi/p2p/WifiP2pDevice;->wpsConfigMethodsSupported:I
+Landroid/net/wifi/p2p/WifiP2pDeviceList;->remove(Ljava/lang/String;)Landroid/net/wifi/p2p/WifiP2pDevice;
+Landroid/net/wifi/p2p/WifiP2pDeviceList;->update(Landroid/net/wifi/p2p/WifiP2pDevice;)V
+Landroid/net/wifi/p2p/WifiP2pGroup;-><init>(Ljava/lang/String;)V
+Landroid/net/wifi/p2p/WifiP2pGroup;->getNetworkId()I
+Landroid/net/wifi/p2p/WifiP2pGroup;->isClientListEmpty()Z
+Landroid/net/wifi/p2p/WifiP2pGroup;->setInterface(Ljava/lang/String;)V
+Landroid/net/wifi/p2p/WifiP2pGroup;->setIsGroupOwner(Z)V
+Landroid/net/wifi/p2p/WifiP2pGroup;->setNetworkId(I)V
+Landroid/net/wifi/p2p/WifiP2pGroup;->TEMPORARY_NET_ID:I
+Landroid/net/wifi/p2p/WifiP2pGroupList;-><init>(Landroid/net/wifi/p2p/WifiP2pGroupList;Landroid/net/wifi/p2p/WifiP2pGroupList$GroupDeleteListener;)V
+Landroid/net/wifi/p2p/WifiP2pGroupList;->getGroupList()Ljava/util/Collection;
+Landroid/net/wifi/p2p/WifiP2pGroupList;->mGroups:Landroid/util/LruCache;
+Landroid/net/wifi/p2p/WifiP2pManager$Channel;->mAsyncChannel:Lcom/android/internal/util/AsyncChannel;
+Landroid/net/wifi/p2p/WifiP2pManager$Channel;->putListener(Ljava/lang/Object;)I
+Landroid/net/wifi/p2p/WifiP2pManager;-><init>(Landroid/net/wifi/p2p/IWifiP2pManager;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->CREATE_GROUP:I
+Landroid/net/wifi/p2p/WifiP2pManager;->deletePersistentGroup(Landroid/net/wifi/p2p/WifiP2pManager$Channel;ILandroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->requestPersistentGroupInfo(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/WifiP2pManager$PersistentGroupInfoListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->setDeviceName(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Ljava/lang/String;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->setMiracastMode(I)V
+Landroid/net/wifi/p2p/WifiP2pManager;->setWFDInfo(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/WifiP2pWfdInfo;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->setWifiP2pChannels(Landroid/net/wifi/p2p/WifiP2pManager$Channel;IILandroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->startWps(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/WpsInfo;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;-><init>()V
+Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;->device:Landroid/net/wifi/p2p/WifiP2pDevice;
+Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;->event:I
+Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;->pin:Ljava/lang/String;
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;-><init>()V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;-><init>(III)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;-><init>(Landroid/net/wifi/p2p/WifiP2pWfdInfo;)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->getDeviceType()I
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->isWfdEnabled()Z
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setControlPort(I)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setDeviceType(I)Z
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setMaxThroughput(I)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setSessionAvailable(Z)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setWfdEnabled(Z)V
+Landroid/net/wifi/ScanResult$InformationElement;->bytes:[B
+Landroid/net/wifi/ScanResult$InformationElement;->EID_BSS_LOAD:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_ERP:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_EXTENDED_CAPS:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_EXTENDED_SUPPORTED_RATES:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_HT_OPERATION:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_INTERWORKING:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_ROAMING_CONSORTIUM:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_RSN:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_SSID:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_SUPPORTED_RATES:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_TIM:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_VHT_OPERATION:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_VSA:I
+Landroid/net/wifi/ScanResult$InformationElement;->id:I
+Landroid/net/wifi/ScanResult;->anqpDomainId:I
+Landroid/net/wifi/ScanResult;->anqpLines:Ljava/util/List;
+Landroid/net/wifi/ScanResult;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/ScanResult;->distanceCm:I
+Landroid/net/wifi/ScanResult;->distanceSdCm:I
+Landroid/net/wifi/ScanResult;->flags:J
+Landroid/net/wifi/ScanResult;->hessid:J
+Landroid/net/wifi/ScanResult;->informationElements:[Landroid/net/wifi/ScanResult$InformationElement;
+Landroid/net/wifi/ScanResult;->is80211McRTTResponder:Z
+Landroid/net/wifi/ScanResult;->numUsage:I
+Landroid/net/wifi/ScanResult;->seen:J
+Landroid/net/wifi/ScanResult;->wifiSsid:Landroid/net/wifi/WifiSsid;
+Landroid/net/wifi/WifiConfiguration;-><init>(Landroid/net/wifi/WifiConfiguration;)V
+Landroid/net/wifi/WifiConfiguration;->apBand:I
+Landroid/net/wifi/WifiConfiguration;->apChannel:I
+Landroid/net/wifi/WifiConfiguration;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/WifiConfiguration;->defaultGwMacAddress:Ljava/lang/String;
+Landroid/net/wifi/WifiConfiguration;->getAuthType()I
+Landroid/net/wifi/WifiConfiguration;->getIpAssignment()Landroid/net/IpConfiguration$IpAssignment;
+Landroid/net/wifi/WifiConfiguration;->getIpConfiguration()Landroid/net/IpConfiguration;
+Landroid/net/wifi/WifiConfiguration;->getPrintableSsid()Ljava/lang/String;
+Landroid/net/wifi/WifiConfiguration;->getProxySettings()Landroid/net/IpConfiguration$ProxySettings;
+Landroid/net/wifi/WifiConfiguration;->getStaticIpConfiguration()Landroid/net/StaticIpConfiguration;
+Landroid/net/wifi/WifiConfiguration;->INVALID_RSSI:I
+Landroid/net/wifi/WifiConfiguration;->isEnterprise()Z
+Landroid/net/wifi/WifiConfiguration;->lastConnectUid:I
+Landroid/net/wifi/WifiConfiguration;->mIpConfiguration:Landroid/net/IpConfiguration;
+Landroid/net/wifi/WifiConfiguration;->noInternetAccessExpected:Z
+Landroid/net/wifi/WifiConfiguration;->numNoInternetAccessReports:I
+Landroid/net/wifi/WifiConfiguration;->selfAdded:Z
+Landroid/net/wifi/WifiConfiguration;->setIpAssignment(Landroid/net/IpConfiguration$IpAssignment;)V
+Landroid/net/wifi/WifiConfiguration;->setIpConfiguration(Landroid/net/IpConfiguration;)V
+Landroid/net/wifi/WifiConfiguration;->setProxy(Landroid/net/IpConfiguration$ProxySettings;Landroid/net/ProxyInfo;)V
+Landroid/net/wifi/WifiConfiguration;->setProxySettings(Landroid/net/IpConfiguration$ProxySettings;)V
+Landroid/net/wifi/WifiConfiguration;->setStaticIpConfiguration(Landroid/net/StaticIpConfiguration;)V
+Landroid/net/wifi/WifiConfiguration;->shared:Z
+Landroid/net/wifi/WifiConfiguration;->validatedInternetAccess:Z
+Landroid/net/wifi/WifiConfiguration;->wepKeyVarNames:[Ljava/lang/String;
+Landroid/net/wifi/WifiEnterpriseConfig;->getCaCertificateAlias()Ljava/lang/String;
+Landroid/net/wifi/WifiEnterpriseConfig;->getClientCertificateAlias()Ljava/lang/String;
+Landroid/net/wifi/WifiEnterpriseConfig;->mFields:Ljava/util/HashMap;
+Landroid/net/wifi/WifiEnterpriseConfig;->setCaCertificateAlias(Ljava/lang/String;)V
+Landroid/net/wifi/WifiEnterpriseConfig;->setClientCertificateAlias(Ljava/lang/String;)V
+Landroid/net/wifi/WifiInfo;-><init>()V
+Landroid/net/wifi/WifiInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/WifiInfo;->DEFAULT_MAC_ADDRESS:Ljava/lang/String;
+Landroid/net/wifi/WifiInfo;->getMeteredHint()Z
+Landroid/net/wifi/WifiInfo;->getWifiSsid()Landroid/net/wifi/WifiSsid;
+Landroid/net/wifi/WifiInfo;->INVALID_RSSI:I
+Landroid/net/wifi/WifiInfo;->isEphemeral()Z
+Landroid/net/wifi/WifiInfo;->mBSSID:Ljava/lang/String;
+Landroid/net/wifi/WifiInfo;->mIpAddress:Ljava/net/InetAddress;
+Landroid/net/wifi/WifiInfo;->mMacAddress:Ljava/lang/String;
+Landroid/net/wifi/WifiInfo;->mWifiSsid:Landroid/net/wifi/WifiSsid;
+Landroid/net/wifi/WifiInfo;->removeDoubleQuotes(Ljava/lang/String;)Ljava/lang/String;
+Landroid/net/wifi/WifiInfo;->setBSSID(Ljava/lang/String;)V
+Landroid/net/wifi/WifiInfo;->setLinkSpeed(I)V
+Landroid/net/wifi/WifiInfo;->setMacAddress(Ljava/lang/String;)V
+Landroid/net/wifi/WifiInfo;->setNetworkId(I)V
+Landroid/net/wifi/WifiInfo;->setRssi(I)V
+Landroid/net/wifi/WifiInfo;->setSupplicantState(Landroid/net/wifi/SupplicantState;)V
+Landroid/net/wifi/WifiInfo;->setSupplicantState(Ljava/lang/String;)V
+Landroid/net/wifi/WifiManager;->cancelLocalOnlyHotspotRequest()V
+Landroid/net/wifi/WifiManager;->connect(ILandroid/net/wifi/WifiManager$ActionListener;)V
+Landroid/net/wifi/WifiManager;->disable(ILandroid/net/wifi/WifiManager$ActionListener;)V
+Landroid/net/wifi/WifiManager;->enableVerboseLogging(I)V
+Landroid/net/wifi/WifiManager;->forget(ILandroid/net/wifi/WifiManager$ActionListener;)V
+Landroid/net/wifi/WifiManager;->getCountryCode()Ljava/lang/String;
+Landroid/net/wifi/WifiManager;->getCurrentNetwork()Landroid/net/Network;
+Landroid/net/wifi/WifiManager;->getMatchingWifiConfig(Landroid/net/wifi/ScanResult;)Landroid/net/wifi/WifiConfiguration;
+Landroid/net/wifi/WifiManager;->getVerboseLoggingLevel()I
+Landroid/net/wifi/WifiManager;->getWifiServiceMessenger()Landroid/os/Messenger;
+Landroid/net/wifi/WifiManager;->initializeMulticastFiltering()Z
+Landroid/net/wifi/WifiManager;->isDualBandSupported()Z
+Landroid/net/wifi/WifiManager;->LINK_CONFIGURATION_CHANGED_ACTION:Ljava/lang/String;
+Landroid/net/wifi/WifiManager;->mActiveLockCount:I
+Landroid/net/wifi/WifiManager;->MAX_RSSI:I
+Landroid/net/wifi/WifiManager;->MIN_RSSI:I
+Landroid/net/wifi/WifiManager;->mService:Landroid/net/wifi/IWifiManager;
+Landroid/net/wifi/WifiManager;->RSSI_LEVELS:I
+Landroid/net/wifi/WifiManager;->save(Landroid/net/wifi/WifiConfiguration;Landroid/net/wifi/WifiManager$ActionListener;)V
+Landroid/net/wifi/WifiManager;->WIFI_FREQUENCY_BAND_2GHZ:I
+Landroid/net/wifi/WifiManager;->WIFI_FREQUENCY_BAND_5GHZ:I
+Landroid/net/wifi/WifiManager;->WIFI_FREQUENCY_BAND_AUTO:I
+Landroid/net/wifi/WifiSsid;->createFromAsciiEncoded(Ljava/lang/String;)Landroid/net/wifi/WifiSsid;
+Landroid/net/wifi/WifiSsid;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/WifiSsid;->getOctets()[B
+Landroid/net/wifi/WifiSsid;->NONE:Ljava/lang/String;
+Landroid/net/wifi/WifiSsid;->octets:Ljava/io/ByteArrayOutputStream;
+Landroid/nfc/cardemulation/AidGroup;-><init>(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/nfc/cardemulation/AidGroup;->aids:Ljava/util/List;
+Landroid/nfc/cardemulation/AidGroup;->category:Ljava/lang/String;
+Landroid/nfc/cardemulation/AidGroup;->createFromXml(Lorg/xmlpull/v1/XmlPullParser;)Landroid/nfc/cardemulation/AidGroup;
+Landroid/nfc/cardemulation/AidGroup;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/nfc/cardemulation/AidGroup;->description:Ljava/lang/String;
+Landroid/nfc/cardemulation/AidGroup;->getAids()Ljava/util/List;
+Landroid/nfc/cardemulation/AidGroup;->getCategory()Ljava/lang/String;
+Landroid/nfc/cardemulation/AidGroup;->writeAsXml(Lorg/xmlpull/v1/XmlSerializer;)V
+Landroid/nfc/cardemulation/ApduServiceInfo;-><init>(Landroid/content/pm/PackageManager;Landroid/content/pm/ResolveInfo;Z)V
+Landroid/nfc/cardemulation/ApduServiceInfo;-><init>(Landroid/content/pm/ResolveInfo;ZLjava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;ZIILjava/lang/String;)V
+Landroid/nfc/cardemulation/ApduServiceInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/nfc/cardemulation/ApduServiceInfo;->getDescription()Ljava/lang/String;
+Landroid/nfc/cardemulation/ApduServiceInfo;->getSettingsActivityName()Ljava/lang/String;
+Landroid/nfc/cardemulation/ApduServiceInfo;->getUid()I
+Landroid/nfc/cardemulation/ApduServiceInfo;->isOnHost()Z
+Landroid/nfc/cardemulation/ApduServiceInfo;->loadBanner(Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;
+Landroid/nfc/cardemulation/ApduServiceInfo;->mDynamicAidGroups:Ljava/util/HashMap;
+Landroid/nfc/cardemulation/ApduServiceInfo;->mService:Landroid/content/pm/ResolveInfo;
+Landroid/nfc/cardemulation/ApduServiceInfo;->mStaticAidGroups:Ljava/util/HashMap;
+Landroid/nfc/cardemulation/ApduServiceInfo;->requiresUnlock()Z
+Landroid/nfc/ErrorCodes;->isError(I)Z
+Landroid/nfc/INfcAdapterExtras;->authenticate(Ljava/lang/String;[B)V
+Landroid/nfc/INfcAdapterExtras;->close(Ljava/lang/String;Landroid/os/IBinder;)Landroid/os/Bundle;
+Landroid/nfc/INfcAdapterExtras;->getCardEmulationRoute(Ljava/lang/String;)I
+Landroid/nfc/INfcAdapterExtras;->open(Ljava/lang/String;Landroid/os/IBinder;)Landroid/os/Bundle;
+Landroid/nfc/INfcAdapterExtras;->setCardEmulationRoute(Ljava/lang/String;I)V
+Landroid/nfc/INfcAdapterExtras;->transceive(Ljava/lang/String;[B)Landroid/os/Bundle;
+Landroid/nfc/NdefRecord;->mId:[B
+Landroid/nfc/NfcActivityManager;->mAdapter:Landroid/nfc/NfcAdapter;
+Landroid/nfc/NfcAdapter;->attemptDeadServiceRecovery(Ljava/lang/Exception;)V
+Landroid/nfc/NfcAdapter;->getAdapterState()I
+Landroid/nfc/NfcAdapter;->getContext()Landroid/content/Context;
+Landroid/nfc/NfcAdapter;->getDefaultAdapter()Landroid/nfc/NfcAdapter;
+Landroid/nfc/NfcAdapter;->getNfcAdapter(Landroid/content/Context;)Landroid/nfc/NfcAdapter;
+Landroid/nfc/NfcAdapter;->getNfcAdapterExtrasInterface()Landroid/nfc/INfcAdapterExtras;
+Landroid/nfc/NfcAdapter;->getService()Landroid/nfc/INfcAdapter;
+Landroid/nfc/NfcAdapter;->setNdefPushMessageCallback(Landroid/nfc/NfcAdapter$CreateNdefMessageCallback;Landroid/app/Activity;I)V
+Landroid/nfc/NfcAdapter;->sService:Landroid/nfc/INfcAdapter;
+Landroid/nfc/NfcManager;-><init>(Landroid/content/Context;)V
+Landroid/nfc/Tag;->getServiceHandle()I
+Landroid/nfc/Tag;->getTagService()Landroid/nfc/INfcTag;
+Landroid/nfc/Tag;->mId:[B
+Landroid/opengl/EGL14;->eglGetDisplay(J)Landroid/opengl/EGLDisplay;
+Landroid/opengl/GLES20;->glGetActiveAttrib(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V
+Landroid/opengl/GLES20;->glGetActiveUniform(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V
+Landroid/opengl/GLSurfaceView$EglHelper;->mEglContext:Ljavax/microedition/khronos/egl/EGLContext;
+Landroid/opengl/GLSurfaceView$GLThread;->mEglHelper:Landroid/opengl/GLSurfaceView$EglHelper;
+Landroid/opengl/GLSurfaceView;->mGLThread:Landroid/opengl/GLSurfaceView$GLThread;
+Landroid/opengl/GLSurfaceView;->mRenderer:Landroid/opengl/GLSurfaceView$Renderer;
+Landroid/os/AsyncResult;->forMessage(Landroid/os/Message;)Landroid/os/AsyncResult;
+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;->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;-><init>()V
+Landroid/os/BatteryStats$Counter;->getCountLocked(I)I
+Landroid/os/BatteryStats$HistoryItem;->batteryHealth:B
+Landroid/os/BatteryStats$HistoryItem;->batteryPlugType:B
+Landroid/os/BatteryStats$HistoryItem;->batteryStatus:B
+Landroid/os/BatteryStats$HistoryItem;->batteryVoltage:C
+Landroid/os/BatteryStats$HistoryItem;->clear()V
+Landroid/os/BatteryStats$HistoryItem;->CMD_UPDATE:B
+Landroid/os/BatteryStats$HistoryItem;->next:Landroid/os/BatteryStats$HistoryItem;
+Landroid/os/BatteryStats$HistoryItem;->same(Landroid/os/BatteryStats$HistoryItem;)Z
+Landroid/os/BatteryStats$HistoryItem;->setTo(JBLandroid/os/BatteryStats$HistoryItem;)V
+Landroid/os/BatteryStats$HistoryItem;->setTo(Landroid/os/BatteryStats$HistoryItem;)V
+Landroid/os/BatteryStats$HistoryItem;->states2:I
+Landroid/os/BatteryStats$Timer;-><init>()V
+Landroid/os/BatteryStats$Timer;->getTotalTimeLocked(JI)J
+Landroid/os/BatteryStats$Uid$Pkg$Serv;->getLaunches(I)I
+Landroid/os/BatteryStats$Uid$Pkg$Serv;->getStartTime(JI)J
+Landroid/os/BatteryStats$Uid$Pkg;-><init>()V
+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;-><init>()V
+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;-><init>()V
+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;-><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;->getWifiScanTime(JI)J
+Landroid/os/BatteryStats;-><init>()V
+Landroid/os/BatteryStats;->computeBatteryTimeRemaining(J)J
+Landroid/os/BatteryStats;->computeBatteryUptime(JI)J
+Landroid/os/BatteryStats;->computeChargeTimeRemaining(J)J
+Landroid/os/BatteryStats;->getMobileRadioActiveTime(JI)J
+Landroid/os/BatteryStats;->getNetworkActivityBytes(II)J
+Landroid/os/BatteryStats;->getUidStats()Landroid/util/SparseArray;
+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/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/CancellationSignal;->mCancelInProgress:Z
+Landroid/os/CancellationSignal;->mIsCanceled:Z
+Landroid/os/CancellationSignal;->mOnCancelListener:Landroid/os/CancellationSignal$OnCancelListener;
+Landroid/os/CancellationSignal;->mRemote:Landroid/os/ICancellationSignal;
+Landroid/os/CancellationSignal;->waitForCancelFinishedLocked()V
+Landroid/os/Debug$MemoryInfo;->dalvikPrivateClean: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;->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;->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;->getDataSystemDirectory()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>(Z)V
+Landroid/os/Handler;->getIMessenger()Landroid/os/IMessenger;
+Landroid/os/Handler;->getPostMessage(Ljava/lang/Runnable;Ljava/lang/Object;)Landroid/os/Message;
+Landroid/os/Handler;->mCallback:Landroid/os/Handler$Callback;
+Landroid/os/Handler;->mLooper:Landroid/os/Looper;
+Landroid/os/Handler;->mMessenger:Landroid/os/IMessenger;
+Landroid/os/health/HealthKeys$Constants;-><init>(Ljava/lang/Class;)V
+Landroid/os/health/HealthStats;-><init>(Landroid/os/Parcel;)V
+Landroid/os/health/HealthStatsParceler;-><init>(Landroid/os/health/HealthStatsWriter;)V
+Landroid/os/health/HealthStatsParceler;-><init>(Landroid/os/Parcel;)V
+Landroid/os/health/HealthStatsParceler;->getHealthStats()Landroid/os/health/HealthStats;
+Landroid/os/health/HealthStatsWriter;-><init>(Landroid/os/health/HealthKeys$Constants;)V
+Landroid/os/health/HealthStatsWriter;->addMeasurement(IJ)V
+Landroid/os/health/HealthStatsWriter;->addMeasurements(ILjava/lang/String;J)V
+Landroid/os/health/HealthStatsWriter;->addStats(ILjava/lang/String;Landroid/os/health/HealthStatsWriter;)V
+Landroid/os/health/HealthStatsWriter;->addTimer(IIJ)V
+Landroid/os/health/HealthStatsWriter;->addTimers(ILjava/lang/String;Landroid/os/health/TimerStat;)V
+Landroid/os/health/HealthStatsWriter;->flattenToParcel(Landroid/os/Parcel;)V
+Landroid/os/health/SystemHealthManager;-><init>()V
+Landroid/os/health/SystemHealthManager;->from(Landroid/content/Context;)Landroid/os/health/SystemHealthManager;
+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;->disableNat(Ljava/lang/String;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;->isTetheringStarted()Z
+Landroid/os/INetworkManagementService;->listTetheredInterfaces()[Ljava/lang/String;
+Landroid/os/INetworkManagementService;->setIpForwardingEnabled(Z)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;->untetherInterface(Ljava/lang/String;)V
+Landroid/os/IPermissionController$Stub$Proxy;->checkPermission(Ljava/lang/String;II)Z
+Landroid/os/IPermissionController$Stub;-><init>()V
+Landroid/os/IPermissionController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IPermissionController;
+Landroid/os/IPowerManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/os/IPowerManager$Stub$Proxy;->isLightDeviceIdleMode()Z
+Landroid/os/IPowerManager$Stub;-><init>()V
+Landroid/os/IPowerManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IPowerManager;
+Landroid/os/IPowerManager$Stub;->TRANSACTION_goToSleep:I
+Landroid/os/IPowerManager;->isInteractive()Z
+Landroid/os/IPowerManager;->nap(J)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;->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;->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;->mCreators:Ljava/util/HashMap;
+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;->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;->writeArrayMap(Landroid/util/ArrayMap;)V
+Landroid/os/Parcel;->writeArraySet(Landroid/util/ArraySet;)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;->mHandler:Landroid/os/Handler;
+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;->BLUETOOTH_UID:I
+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;->ROOT_UID:I
+Landroid/os/Process;->sendSignalQuiet(II)V
+Landroid/os/Process;->setArgV0(Ljava/lang/String;)V
+Landroid/os/Process;->setProcessGroup(II)V
+Landroid/os/Process;->SHELL_UID:I
+Landroid/os/Process;->VPN_UID:I
+Landroid/os/Process;->WIFI_UID:I
+Landroid/os/RecoverySystem;->verifyPackageCompatibility(Ljava/io/InputStream;)Z
+Landroid/os/Registrant;->getHandler()Landroid/os/Handler;
+Landroid/os/Registrant;->messageForRegistrant()Landroid/os/Message;
+Landroid/os/Registrant;->notifyResult(Ljava/lang/Object;)V
+Landroid/os/RegistrantList;->add(Landroid/os/Handler;ILjava/lang/Object;)V
+Landroid/os/RegistrantList;->get(I)Ljava/lang/Object;
+Landroid/os/RegistrantList;->notifyResult(Ljava/lang/Object;)V
+Landroid/os/RegistrantList;->size()I
+Landroid/os/RemoteCallback;->mHandler:Landroid/os/Handler;
+Landroid/os/RemoteCallbackList;->mCallbacks:Landroid/util/ArrayMap;
+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;->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;->sServiceManager:Landroid/os/IServiceManager;
+Landroid/os/ServiceManagerNative;->asInterface(Landroid/os/IBinder;)Landroid/os/IServiceManager;
+Landroid/os/ServiceSpecificException;-><init>(ILjava/lang/String;)V
+Landroid/os/SharedMemory;->getFd()I
+Landroid/os/ShellCommand;->peekNextArg()Ljava/lang/String;
+Landroid/os/StatFs;->mStat:Landroid/system/StructStatVfs;
+Landroid/os/storage/DiskInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/os/storage/DiskInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/os/storage/DiskInfo;->flags:I
+Landroid/os/storage/DiskInfo;->getDescription()Ljava/lang/String;
+Landroid/os/storage/DiskInfo;->isAdoptable()Z
+Landroid/os/storage/DiskInfo;->isDefaultPrimary()Z
+Landroid/os/storage/DiskInfo;->isSd()Z
+Landroid/os/storage/DiskInfo;->isUsb()Z
+Landroid/os/storage/DiskInfo;->label:Ljava/lang/String;
+Landroid/os/storage/DiskInfo;->size:J
+Landroid/os/storage/IObbActionListener$Stub;-><init>()V
+Landroid/os/storage/IObbActionListener$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/storage/IObbActionListener;
+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;->onDiskDestroyed(Landroid/os/storage/DiskInfo;)V
+Landroid/os/storage/StorageEventListener;->onDiskScanned(Landroid/os/storage/DiskInfo;I)V
+Landroid/os/storage/StorageEventListener;->onStorageStateChanged(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/os/storage/StorageEventListener;->onUsbMassStorageConnectionChanged(Z)V
+Landroid/os/storage/StorageEventListener;->onVolumeForgotten(Ljava/lang/String;)V
+Landroid/os/storage/StorageEventListener;->onVolumeRecordChanged(Landroid/os/storage/VolumeRecord;)V
+Landroid/os/storage/StorageEventListener;->onVolumeStateChanged(Landroid/os/storage/VolumeInfo;II)V
+Landroid/os/storage/StorageManager;-><init>(Landroid/content/Context;Landroid/os/Looper;)V
+Landroid/os/storage/StorageManager;->CRYPT_TYPE_DEFAULT:I
+Landroid/os/storage/StorageManager;->CRYPT_TYPE_PASSWORD:I
+Landroid/os/storage/StorageManager;->disableUsbMassStorage()V
+Landroid/os/storage/StorageManager;->enableUsbMassStorage()V
+Landroid/os/storage/StorageManager;->ENCRYPTION_STATE_NONE:I
+Landroid/os/storage/StorageManager;->findDiskById(Ljava/lang/String;)Landroid/os/storage/DiskInfo;
+Landroid/os/storage/StorageManager;->findEmulatedForPrivate(Landroid/os/storage/VolumeInfo;)Landroid/os/storage/VolumeInfo;
+Landroid/os/storage/StorageManager;->findVolumeByUuid(Ljava/lang/String;)Landroid/os/storage/VolumeInfo;
+Landroid/os/storage/StorageManager;->format(Ljava/lang/String;)V
+Landroid/os/storage/StorageManager;->getBestVolumeDescription(Landroid/os/storage/VolumeInfo;)Ljava/lang/String;
+Landroid/os/storage/StorageManager;->getDisks()Ljava/util/List;
+Landroid/os/storage/StorageManager;->getPrimaryPhysicalVolume()Landroid/os/storage/VolumeInfo;
+Landroid/os/storage/StorageManager;->getStorageBytesUntilLow(Ljava/io/File;)J
+Landroid/os/storage/StorageManager;->getStorageFullBytes(Ljava/io/File;)J
+Landroid/os/storage/StorageManager;->getStorageLowBytes(Ljava/io/File;)J
+Landroid/os/storage/StorageManager;->getStorageVolume([Landroid/os/storage/StorageVolume;Ljava/io/File;)Landroid/os/storage/StorageVolume;
+Landroid/os/storage/StorageManager;->getVolumeList(II)[Landroid/os/storage/StorageVolume;
+Landroid/os/storage/StorageManager;->getVolumePaths()[Ljava/lang/String;
+Landroid/os/storage/StorageManager;->getVolumes()Ljava/util/List;
+Landroid/os/storage/StorageManager;->getVolumeState(Ljava/lang/String;)Ljava/lang/String;
+Landroid/os/storage/StorageManager;->isFileEncryptedNativeOnly()Z
+Landroid/os/storage/StorageManager;->isUsbMassStorageConnected()Z
+Landroid/os/storage/StorageManager;->isUsbMassStorageEnabled()Z
+Landroid/os/storage/StorageManager;->partitionPublic(Ljava/lang/String;)V
+Landroid/os/storage/StorageManager;->unmount(Ljava/lang/String;)V
+Landroid/os/storage/StorageVolume;->allowMassStorage()Z
+Landroid/os/storage/StorageVolume;->getFatVolumeId()I
+Landroid/os/storage/StorageVolume;->getMaxFileSize()J
+Landroid/os/storage/StorageVolume;->getOwner()Landroid/os/UserHandle;
+Landroid/os/storage/StorageVolume;->getPath()Ljava/lang/String;
+Landroid/os/storage/StorageVolume;->getPathFile()Ljava/io/File;
+Landroid/os/storage/StorageVolume;->getUserLabel()Ljava/lang/String;
+Landroid/os/storage/StorageVolume;->mDescription:Ljava/lang/String;
+Landroid/os/storage/StorageVolume;->mId:Ljava/lang/String;
+Landroid/os/storage/StorageVolume;->mPath:Ljava/io/File;
+Landroid/os/storage/StorageVolume;->mPrimary:Z
+Landroid/os/storage/StorageVolume;->mRemovable:Z
+Landroid/os/storage/VolumeInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/os/storage/VolumeInfo;->buildBrowseIntent()Landroid/content/Intent;
+Landroid/os/storage/VolumeInfo;->buildStableMtpStorageId(Ljava/lang/String;)I
+Landroid/os/storage/VolumeInfo;->buildStorageVolume(Landroid/content/Context;IZ)Landroid/os/storage/StorageVolume;
+Landroid/os/storage/VolumeInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/os/storage/VolumeInfo;->disk:Landroid/os/storage/DiskInfo;
+Landroid/os/storage/VolumeInfo;->fsLabel:Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->fsUuid:Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getDescription()Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getDisk()Landroid/os/storage/DiskInfo;
+Landroid/os/storage/VolumeInfo;->getDiskId()Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getEnvironmentForState(I)Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getFsUuid()Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getInternalPathForUser(I)Ljava/io/File;
+Landroid/os/storage/VolumeInfo;->getMountUserId()I
+Landroid/os/storage/VolumeInfo;->getPath()Ljava/io/File;
+Landroid/os/storage/VolumeInfo;->getPathForUser(I)Ljava/io/File;
+Landroid/os/storage/VolumeInfo;->getState()I
+Landroid/os/storage/VolumeInfo;->getType()I
+Landroid/os/storage/VolumeInfo;->internalPath:Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->isMountedReadable()Z
+Landroid/os/storage/VolumeInfo;->isMountedWritable()Z
+Landroid/os/storage/VolumeInfo;->isPrimary()Z
+Landroid/os/storage/VolumeInfo;->isPrimaryPhysical()Z
+Landroid/os/storage/VolumeInfo;->isVisible()Z
+Landroid/os/storage/VolumeInfo;->isVisibleForWrite(I)Z
+Landroid/os/storage/VolumeInfo;->path:Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->state:I
+Landroid/os/storage/VolumeInfo;->type:I
+Landroid/os/storage/VolumeInfo;->TYPE_EMULATED:I
+Landroid/os/storage/VolumeInfo;->TYPE_PUBLIC:I
+Landroid/os/storage/VolumeRecord;-><init>(Landroid/os/Parcel;)V
+Landroid/os/storage/VolumeRecord;->CREATOR:Landroid/os/Parcelable$Creator;
+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;->currentThreadTimeMicro()J
+Landroid/os/SystemClock;->currentTimeMicro()J
+Landroid/os/SystemProperties;-><init>()V
+Landroid/os/SystemProperties;->addChangeCallback(Ljava/lang/Runnable;)V
+Landroid/os/SystemProperties;->native_add_change_callback()V
+Landroid/os/SystemProperties;->native_get(Ljava/lang/String;)Ljava/lang/String;
+Landroid/os/SystemProperties;->native_get(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+Landroid/os/SystemProperties;->native_get_boolean(Ljava/lang/String;Z)Z
+Landroid/os/SystemProperties;->native_get_int(Ljava/lang/String;I)I
+Landroid/os/SystemProperties;->native_get_long(Ljava/lang/String;J)J
+Landroid/os/SystemProperties;->native_set(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/os/SystemProperties;->PROP_NAME_MAX:I
+Landroid/os/SystemProperties;->sChangeCallbacks:Ljava/util/ArrayList;
+Landroid/os/SystemProperties;->set(Ljava/lang/String;Ljava/lang/String;)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;->ALL:Landroid/os/UserHandle;
+Landroid/os/UserHandle;->CURRENT:Landroid/os/UserHandle;
+Landroid/os/UserHandle;->CURRENT_OR_SELF:Landroid/os/UserHandle;
+Landroid/os/UserHandle;->ERR_GID:I
+Landroid/os/UserHandle;->formatUid(Ljava/io/PrintWriter;I)V
+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;->isIsolated(I)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;->hasBaseUserRestriction(Ljava/lang/String;Landroid/os/UserHandle;)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;->sGoneWork:Landroid/os/WorkSource;
+Landroid/os/WorkSource;->size()I
+Landroid/os/WorkSource;->sNewbWork:Landroid/os/WorkSource;
+Landroid/os/WorkSource;->sTmpWorkSource:Landroid/os/WorkSource;
+Landroid/os/WorkSource;->updateLocked(Landroid/os/WorkSource;ZZ)Z
+Landroid/os/ZygoteStartFailedEx;-><init>(Ljava/lang/String;)V
+Landroid/os/ZygoteStartFailedEx;-><init>(Ljava/lang/Throwable;)V
+Landroid/permissionpresenterservice/RuntimePermissionPresenterService;->onRevokeRuntimePermission(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/preference/DialogPreference;->mBuilder:Landroid/app/AlertDialog$Builder;
+Landroid/preference/DialogPreference;->mDialog:Landroid/app/Dialog;
+Landroid/preference/DialogPreference;->mDialogIcon:Landroid/graphics/drawable/Drawable;
+Landroid/preference/DialogPreference;->mDialogMessage:Ljava/lang/CharSequence;
+Landroid/preference/DialogPreference;->mDialogTitle:Ljava/lang/CharSequence;
+Landroid/preference/DialogPreference;->mNegativeButtonText:Ljava/lang/CharSequence;
+Landroid/preference/DialogPreference;->mPositiveButtonText:Ljava/lang/CharSequence;
+Landroid/preference/DialogPreference;->mWhichButtonClicked:I
+Landroid/preference/EditTextPreference;->mEditText:Landroid/widget/EditText;
+Landroid/preference/ListPreference;->mClickedDialogEntryIndex:I
+Landroid/preference/Preference;->getId()J
+Landroid/preference/Preference;->mLayoutResId:I
+Landroid/preference/Preference;->mSummary:Ljava/lang/CharSequence;
+Landroid/preference/Preference;->mWidgetLayoutResId:I
+Landroid/preference/Preference;->onKey(Landroid/view/View;ILandroid/view/KeyEvent;)Z
+Landroid/preference/Preference;->performClick(Landroid/preference/PreferenceScreen;)V
+Landroid/preference/Preference;->registerDependent(Landroid/preference/Preference;)V
+Landroid/preference/Preference;->setOnPreferenceChangeInternalListener(Landroid/preference/Preference$OnPreferenceChangeInternalListener;)V
+Landroid/preference/PreferenceActivity;->getHeaders()Ljava/util/List;
+Landroid/preference/PreferenceActivity;->mPreferenceManager:Landroid/preference/PreferenceManager;
+Landroid/preference/PreferenceActivity;->mPrefsContainer:Landroid/view/ViewGroup;
+Landroid/preference/PreferenceActivity;->postBindPreferences()V
+Landroid/preference/PreferenceActivity;->requirePreferenceManager()V
+Landroid/preference/PreferenceFragment;->getListView()Landroid/widget/ListView;
+Landroid/preference/PreferenceFragment;->mPreferenceManager:Landroid/preference/PreferenceManager;
+Landroid/preference/PreferenceManager;-><init>(Landroid/app/Activity;I)V
+Landroid/preference/PreferenceManager;-><init>(Landroid/content/Context;)V
+Landroid/preference/PreferenceManager;->dispatchActivityDestroy()V
+Landroid/preference/PreferenceManager;->dispatchActivityResult(IILandroid/content/Intent;)V
+Landroid/preference/PreferenceManager;->dispatchActivityStop()V
+Landroid/preference/PreferenceManager;->getActivity()Landroid/app/Activity;
+Landroid/preference/PreferenceManager;->getEditor()Landroid/content/SharedPreferences$Editor;
+Landroid/preference/PreferenceManager;->getFragment()Landroid/preference/PreferenceFragment;
+Landroid/preference/PreferenceManager;->getNextRequestCode()I
+Landroid/preference/PreferenceManager;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
+Landroid/preference/PreferenceManager;->inflateFromIntent(Landroid/content/Intent;Landroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;
+Landroid/preference/PreferenceManager;->inflateFromResource(Landroid/content/Context;ILandroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;
+Landroid/preference/PreferenceManager;->mActivityDestroyListeners:Ljava/util/List;
+Landroid/preference/PreferenceManager;->mFragment:Landroid/preference/PreferenceFragment;
+Landroid/preference/PreferenceManager;->mOnPreferenceTreeClickListener:Landroid/preference/PreferenceManager$OnPreferenceTreeClickListener;
+Landroid/preference/PreferenceManager;->mSharedPreferences:Landroid/content/SharedPreferences;
+Landroid/preference/PreferenceManager;->registerOnActivityDestroyListener(Landroid/preference/PreferenceManager$OnActivityDestroyListener;)V
+Landroid/preference/PreferenceManager;->registerOnActivityResultListener(Landroid/preference/PreferenceManager$OnActivityResultListener;)V
+Landroid/preference/PreferenceManager;->registerOnActivityStopListener(Landroid/preference/PreferenceManager$OnActivityStopListener;)V
+Landroid/preference/PreferenceManager;->setFragment(Landroid/preference/PreferenceFragment;)V
+Landroid/preference/PreferenceManager;->setNoCommit(Z)V
+Landroid/preference/PreferenceManager;->setPreferences(Landroid/preference/PreferenceScreen;)Z
+Landroid/preference/PreferenceManager;->shouldCommit()Z
+Landroid/preference/PreferenceManager;->unregisterOnActivityDestroyListener(Landroid/preference/PreferenceManager$OnActivityDestroyListener;)V
+Landroid/preference/PreferenceManager;->unregisterOnActivityResultListener(Landroid/preference/PreferenceManager$OnActivityResultListener;)V
+Landroid/preference/PreferenceManager;->unregisterOnActivityStopListener(Landroid/preference/PreferenceManager$OnActivityStopListener;)V
+Landroid/preference/PreferenceScreen;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/preference/PreferenceScreen;->mListView:Landroid/widget/ListView;
+Landroid/preference/PreferenceScreen;->mRootAdapter:Landroid/widget/ListAdapter;
+Landroid/preference/RingtonePreference;->mRequestCode:I
+Landroid/preference/SeekBarDialogPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/preference/SeekBarPreference;-><init>(Landroid/content/Context;)V
+Landroid/preference/SeekBarPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/preference/SeekBarPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
+Landroid/preference/SeekBarVolumizer;-><init>(Landroid/content/Context;ILandroid/net/Uri;Landroid/preference/SeekBarVolumizer$Callback;)V
+Landroid/preference/SeekBarVolumizer;->mAudioManager:Landroid/media/AudioManager;
+Landroid/preference/SeekBarVolumizer;->mContext:Landroid/content/Context;
+Landroid/preference/SeekBarVolumizer;->mLastProgress:I
+Landroid/preference/SeekBarVolumizer;->mOriginalStreamVolume:I
+Landroid/preference/SeekBarVolumizer;->mRingtone:Landroid/media/Ringtone;
+Landroid/preference/SeekBarVolumizer;->mSeekBar:Landroid/widget/SeekBar;
+Landroid/preference/SeekBarVolumizer;->mStreamType:I
+Landroid/preference/SeekBarVolumizer;->stop()V
+Landroid/preference/SwitchPreference;->mListener:Landroid/preference/SwitchPreference$Listener;
+Landroid/preference/TwoStatePreference;->syncSummaryView(Landroid/view/View;)V
+Landroid/preference/VolumePreference$VolumeStore;->originalVolume:I
+Landroid/preference/VolumePreference$VolumeStore;->volume:I
+Landroid/preference/VolumePreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/preference/VolumePreference;->mStreamType:I
+Landroid/print/PrinterId;->getServiceName()Landroid/content/ComponentName;
+Landroid/print/PrintJobInfo;->getAdvancedOptions()Landroid/os/Bundle;
+Landroid/print/PrintJobInfo;->getDocumentInfo()Landroid/print/PrintDocumentInfo;
+Landroid/print/PrintManager;->addPrintJobStateChangeListener(Landroid/print/PrintManager$PrintJobStateChangeListener;)V
+Landroid/provider/Browser;->getVisitedHistory(Landroid/content/ContentResolver;)[Ljava/lang/String;
+Landroid/provider/Browser;->sendString(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/provider/BrowserContract$Accounts;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract$Bookmarks;->buildFolderUri(J)Landroid/net/Uri;
+Landroid/provider/BrowserContract$Bookmarks;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract$Bookmarks;->CONTENT_URI_DEFAULT_FOLDER:Landroid/net/Uri;
+Landroid/provider/BrowserContract$Combined;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract$History;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract$Images;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract;->AUTHORITY_URI:Landroid/net/Uri;
+Landroid/provider/CalendarContract$CalendarAlerts;->findNextAlarmTime(Landroid/content/ContentResolver;J)J
+Landroid/provider/CalendarContract$CalendarAlerts;->rescheduleMissedAlarms(Landroid/content/ContentResolver;Landroid/content/Context;Landroid/app/AlarmManager;)V
+Landroid/provider/CalendarContract$CalendarAlerts;->scheduleAlarm(Landroid/content/Context;Landroid/app/AlarmManager;J)V
+Landroid/provider/CallLog$Calls;->addCall(Lcom/android/internal/telephony/CallerInfo;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIILandroid/telecom/PhoneAccountHandle;JILjava/lang/Long;ZLandroid/os/UserHandle;Z)Landroid/net/Uri;
+Landroid/provider/ContactsContract$ContactCounts;->EXTRA_ADDRESS_BOOK_INDEX:Ljava/lang/String;
+Landroid/provider/ContactsContract$ContactCounts;->EXTRA_ADDRESS_BOOK_INDEX_COUNTS:Ljava/lang/String;
+Landroid/provider/ContactsContract$ContactCounts;->EXTRA_ADDRESS_BOOK_INDEX_TITLES:Ljava/lang/String;
+Landroid/provider/ContactsContract$Contacts$AggregationSuggestions;->builder()Landroid/provider/ContactsContract$Contacts$AggregationSuggestions$Builder;
+Landroid/provider/ContactsContract$Contacts;->CORP_CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/ContactsContract$QuickContact;->composeQuickContactsIntent(Landroid/content/Context;Landroid/graphics/Rect;Landroid/net/Uri;I[Ljava/lang/String;)Landroid/content/Intent;
+Landroid/provider/ContactsInternal;->startQuickContactWithErrorToast(Landroid/content/Context;Landroid/content/Intent;)V
+Landroid/provider/DocumentsContract$Root;->FLAG_ADVANCED:I
+Landroid/provider/DocumentsContract;->getDocumentThumbnail(Landroid/content/ContentProviderClient;Landroid/net/Uri;Landroid/graphics/Point;Landroid/os/CancellationSignal;)Landroid/graphics/Bitmap;
+Landroid/provider/DocumentsContract;->METHOD_CREATE_DOCUMENT:Ljava/lang/String;
+Landroid/provider/DocumentsContract;->moveDocument(Landroid/content/ContentProviderClient;Landroid/net/Uri;Landroid/net/Uri;Landroid/net/Uri;)Landroid/net/Uri;
+Landroid/provider/DocumentsContract;->PATH_DOCUMENT:Ljava/lang/String;
+Landroid/provider/DocumentsContract;->PATH_TREE:Ljava/lang/String;
+Landroid/provider/DocumentsContract;->setManageMode(Landroid/net/Uri;)Landroid/net/Uri;
+Landroid/provider/Downloads$Impl$RequestHeaders;->INSERT_KEY_PREFIX:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->ALL_DOWNLOADS_CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/Downloads$Impl;->COLUMN_ALLOWED_NETWORK_TYPES:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_ALLOW_ROAMING:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_COOKIE_DATA:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_DELETED:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_DESCRIPTION:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_DESTINATION:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_FILE_NAME_HINT:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_IS_PUBLIC_API:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_MEDIA_SCANNED:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_MIME_TYPE:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_NOTIFICATION_CLASS:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_NOTIFICATION_EXTRAS:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_NOTIFICATION_PACKAGE:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_REFERER:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_TITLE:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_URI:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_VISIBILITY:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/Downloads$Impl;->DESTINATION_CACHE_PARTITION_PURGEABLE:I
+Landroid/provider/Downloads$Impl;->DESTINATION_FILE_URI:I
+Landroid/provider/Downloads$Impl;->isNotificationToBeDisplayed(I)Z
+Landroid/provider/Downloads$Impl;->isStatusCompleted(I)Z
+Landroid/provider/Downloads$Impl;->isStatusError(I)Z
+Landroid/provider/Downloads$Impl;->isStatusSuccess(I)Z
+Landroid/provider/Downloads$Impl;->PUBLICLY_ACCESSIBLE_DOWNLOADS_URI:Landroid/net/Uri;
+Landroid/provider/MediaStore$Files$FileColumns;->FORMAT:Ljava/lang/String;
+Landroid/provider/MediaStore$Files$FileColumns;->STORAGE_ID:Ljava/lang/String;
+Landroid/provider/MediaStore$Files;->getMtpObjectsUri(Ljava/lang/String;)Landroid/net/Uri;
+Landroid/provider/MediaStore$Files;->getMtpObjectsUri(Ljava/lang/String;J)Landroid/net/Uri;
+Landroid/provider/MediaStore$Files;->getMtpReferencesUri(Ljava/lang/String;J)Landroid/net/Uri;
+Landroid/provider/MediaStore$MediaColumns;->IS_DRM:Ljava/lang/String;
+Landroid/provider/Settings$Bookmarks;->add(Landroid/content/ContentResolver;Landroid/content/Intent;Ljava/lang/String;Ljava/lang/String;CI)Landroid/net/Uri;
+Landroid/provider/Settings$Bookmarks;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/Settings$ContentProviderHolder;->mContentProvider:Landroid/content/IContentProvider;
+Landroid/provider/Settings$Global;->ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Global;->HEADS_UP_NOTIFICATIONS_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Global;->HEADS_UP_OFF:I
+Landroid/provider/Settings$Global;->HEADS_UP_ON:I
+Landroid/provider/Settings$Global;->MOBILE_DATA:Ljava/lang/String;
+Landroid/provider/Settings$Global;->MULTI_SIM_USER_PREFERRED_SUBS:[Ljava/lang/String;
+Landroid/provider/Settings$Global;->MULTI_SIM_VOICE_PROMPT:Ljava/lang/String;
+Landroid/provider/Settings$Global;->NETWORK_SCORER_APP:Ljava/lang/String;
+Landroid/provider/Settings$Global;->PACKAGE_VERIFIER_ENABLE:Ljava/lang/String;
+Landroid/provider/Settings$Global;->PREFERRED_NETWORK_MODE:Ljava/lang/String;
+Landroid/provider/Settings$Global;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
+Landroid/provider/Settings$Global;->REQUIRE_PASSWORD_TO_DECRYPT:Ljava/lang/String;
+Landroid/provider/Settings$Global;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
+Landroid/provider/Settings$Global;->sProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
+Landroid/provider/Settings$Global;->WEBVIEW_PROVIDER:Ljava/lang/String;
+Landroid/provider/Settings$Global;->WIFI_SAVED_STATE:Ljava/lang/String;
+Landroid/provider/Settings$Global;->WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Global;->ZEN_MODE:Ljava/lang/String;
+Landroid/provider/Settings$Global;->ZEN_MODE_ALARMS:I
+Landroid/provider/Settings$Global;->ZEN_MODE_CONFIG_ETAG:Ljava/lang/String;
+Landroid/provider/Settings$Global;->ZEN_MODE_IMPORTANT_INTERRUPTIONS:I
+Landroid/provider/Settings$Global;->ZEN_MODE_NO_INTERRUPTIONS:I
+Landroid/provider/Settings$Global;->ZEN_MODE_OFF:I
+Landroid/provider/Settings$NameValueCache;->mProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_AUTOCLICK_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_CAPTIONING_TYPEFACE:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_DISPLAY_DALTONIZER:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_LARGE_POINTER_ICON:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ANR_SHOW_BACKGROUND:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ASSISTANT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->BACKUP_AUTO_RESTORE:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->BACKUP_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->BACKUP_PROVISIONED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->BACKUP_TRANSPORT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->DIALER_DEFAULT_APPLICATION:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->DOZE_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ENABLED_NOTIFICATION_LISTENERS:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ENABLED_PRINT_SERVICES:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
+Landroid/provider/Settings$Secure;->getLongForUser(Landroid/content/ContentResolver;Ljava/lang/String;JI)J
+Landroid/provider/Settings$Secure;->IMMERSIVE_MODE_CONFIRMATIONS:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->INCALL_POWER_BUTTON_BEHAVIOR:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LOCK_SCREEN_LOCK_AFTER_TIMEOUT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LOCK_SCREEN_OWNER_INFO_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LOCK_SCREEN_SHOW_NOTIFICATIONS:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LONG_PRESS_TIMEOUT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->NFC_PAYMENT_DEFAULT_COMPONENT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->PACKAGE_VERIFIER_USER_CONSENT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->putIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
+Landroid/provider/Settings$Secure;->putLongForUser(Landroid/content/ContentResolver;Ljava/lang/String;JI)Z
+Landroid/provider/Settings$Secure;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
+Landroid/provider/Settings$Secure;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)Z
+Landroid/provider/Settings$Secure;->SELECTED_SPELL_CHECKER:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->SELECTED_SPELL_CHECKER_SUBTYPE:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->SETTINGS_TO_BACKUP:[Ljava/lang/String;
+Landroid/provider/Settings$Secure;->SMS_DEFAULT_APPLICATION:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
+Landroid/provider/Settings$Secure;->VOICE_RECOGNITION_SERVICE:Ljava/lang/String;
+Landroid/provider/Settings$System;->AIRPLANE_MODE_TOGGLEABLE_RADIOS:Ljava/lang/String;
+Landroid/provider/Settings$System;->CAR_DOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->CAR_UNDOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->DESK_DOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->DESK_UNDOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->DOCK_SOUNDS_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)I
+Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
+Landroid/provider/Settings$System;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
+Landroid/provider/Settings$System;->HEARING_AID:Ljava/lang/String;
+Landroid/provider/Settings$System;->HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY:Ljava/lang/String;
+Landroid/provider/Settings$System;->LOCKSCREEN_SOUNDS_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$System;->LOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->MASTER_MONO:Ljava/lang/String;
+Landroid/provider/Settings$System;->NOTIFICATION_LIGHT_PULSE:Ljava/lang/String;
+Landroid/provider/Settings$System;->POINTER_LOCATION:Ljava/lang/String;
+Landroid/provider/Settings$System;->POINTER_SPEED:Ljava/lang/String;
+Landroid/provider/Settings$System;->PRIVATE_SETTINGS:Ljava/util/Set;
+Landroid/provider/Settings$System;->PUBLIC_SETTINGS:Ljava/util/Set;
+Landroid/provider/Settings$System;->putIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
+Landroid/provider/Settings$System;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
+Landroid/provider/Settings$System;->SCREEN_AUTO_BRIGHTNESS_ADJ:Ljava/lang/String;
+Landroid/provider/Settings$System;->SETTINGS_TO_BACKUP:[Ljava/lang/String;
+Landroid/provider/Settings$System;->SHOW_TOUCHES:Ljava/lang/String;
+Landroid/provider/Settings$System;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
+Landroid/provider/Settings$System;->sProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
+Landroid/provider/Settings$System;->TTY_MODE:Ljava/lang/String;
+Landroid/provider/Settings$System;->UNLOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->VIBRATE_IN_SILENT:Ljava/lang/String;
+Landroid/provider/Settings;->ACTION_TRUSTED_CREDENTIALS_USER:Ljava/lang/String;
+Landroid/provider/Settings;->ACTION_USER_DICTIONARY_INSERT:Ljava/lang/String;
+Landroid/provider/Settings;->EXTRA_APP_UID:Ljava/lang/String;
+Landroid/provider/Settings;->isCallingPackageAllowedToDrawOverlays(Landroid/content/Context;ILjava/lang/String;Z)Z
+Landroid/provider/Settings;->isCallingPackageAllowedToPerformAppOpsProtectedOperation(Landroid/content/Context;ILjava/lang/String;ZI[Ljava/lang/String;Z)Z
+Landroid/provider/Settings;->isCallingPackageAllowedToWriteSettings(Landroid/content/Context;ILjava/lang/String;Z)Z
+Landroid/provider/Telephony$Mms;->extractAddrSpec(Ljava/lang/String;)Ljava/lang/String;
+Landroid/provider/Telephony$Mms;->isPhoneNumber(Ljava/lang/String;)Z
+Landroid/provider/Telephony$Mms;->NAME_ADDR_EMAIL_PATTERN:Ljava/util/regex/Pattern;
+Landroid/provider/Telephony$Sms$Draft;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Inbox;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Z)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Inbox;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Z)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Sent;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Sent;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->addMessageToUri(ILandroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZ)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->addMessageToUri(ILandroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZJ)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->addMessageToUri(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZ)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->addMessageToUri(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZJ)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->isOutgoingFolder(I)Z
+Landroid/provider/Telephony$Sms;->moveMessageToFolder(Landroid/content/Context;Landroid/net/Uri;II)Z
+Landroid/provider/Telephony$Sms;->query(Landroid/content/ContentResolver;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
+Landroid/provider/Telephony$Threads;->ID_PROJECTION:[Ljava/lang/String;
+Landroid/provider/Telephony$Threads;->THREAD_ID_CONTENT_URI:Landroid/net/Uri;
+Landroid/R$styleable;->ActionBar:[I
+Landroid/R$styleable;->ActionBar_background:I
+Landroid/R$styleable;->ActionBar_backgroundSplit:I
+Landroid/R$styleable;->ActionBar_backgroundStacked:I
+Landroid/R$styleable;->ActionBar_divider:I
+Landroid/R$styleable;->ActionBar_itemPadding:I
+Landroid/R$styleable;->CalendarView:[I
+Landroid/R$styleable;->CalendarView_dateTextAppearance:I
+Landroid/R$styleable;->CalendarView_firstDayOfWeek:I
+Landroid/R$styleable;->CalendarView_focusedMonthDateColor:I
+Landroid/R$styleable;->CalendarView_selectedDateVerticalBar:I
+Landroid/R$styleable;->CalendarView_selectedWeekBackgroundColor:I
+Landroid/R$styleable;->CalendarView_shownWeekCount:I
+Landroid/R$styleable;->CalendarView_showWeekNumber:I
+Landroid/R$styleable;->CalendarView_unfocusedMonthDateColor:I
+Landroid/R$styleable;->CalendarView_weekDayTextAppearance:I
+Landroid/R$styleable;->CalendarView_weekNumberColor:I
+Landroid/R$styleable;->CalendarView_weekSeparatorLineColor:I
+Landroid/R$styleable;->CheckedTextView:[I
+Landroid/R$styleable;->CheckedTextView_checkMark:I
+Landroid/R$styleable;->CompoundButton:[I
+Landroid/R$styleable;->CompoundButton_button:I
+Landroid/R$styleable;->ContactsDataKind:[I
+Landroid/R$styleable;->DatePicker:[I
+Landroid/R$styleable;->DialogPreference:[I
+Landroid/R$styleable;->DrawableStates:[I
+Landroid/R$styleable;->ExpandableListView:[I
+Landroid/R$styleable;->FrameLayout_Layout:[I
+Landroid/R$styleable;->HorizontalScrollView:[I
+Landroid/R$styleable;->ImageView:[I
+Landroid/R$styleable;->ImageView_adjustViewBounds:I
+Landroid/R$styleable;->ImageView_baselineAlignBottom:I
+Landroid/R$styleable;->ImageView_cropToPadding:I
+Landroid/R$styleable;->ImageView_maxHeight:I
+Landroid/R$styleable;->ImageView_maxWidth:I
+Landroid/R$styleable;->ImageView_scaleType:I
+Landroid/R$styleable;->ImageView_src:I
+Landroid/R$styleable;->ImageView_tint:I
+Landroid/R$styleable;->Keyboard:[I
+Landroid/R$styleable;->Keyboard_horizontalGap:I
+Landroid/R$styleable;->Keyboard_Key:[I
+Landroid/R$styleable;->Keyboard_keyHeight:I
+Landroid/R$styleable;->Keyboard_keyWidth:I
+Landroid/R$styleable;->Keyboard_Key_codes:I
+Landroid/R$styleable;->Keyboard_Key_iconPreview:I
+Landroid/R$styleable;->Keyboard_Key_isModifier:I
+Landroid/R$styleable;->Keyboard_Key_isRepeatable:I
+Landroid/R$styleable;->Keyboard_Key_isSticky:I
+Landroid/R$styleable;->Keyboard_Key_keyEdgeFlags:I
+Landroid/R$styleable;->Keyboard_Key_keyIcon:I
+Landroid/R$styleable;->Keyboard_Key_keyLabel:I
+Landroid/R$styleable;->Keyboard_Key_keyOutputText:I
+Landroid/R$styleable;->Keyboard_Key_popupCharacters:I
+Landroid/R$styleable;->Keyboard_Key_popupKeyboard:I
+Landroid/R$styleable;->Keyboard_Row:[I
+Landroid/R$styleable;->Keyboard_Row_keyboardMode:I
+Landroid/R$styleable;->Keyboard_Row_rowEdgeFlags:I
+Landroid/R$styleable;->Keyboard_verticalGap:I
+Landroid/R$styleable;->LinearLayout:[I
+Landroid/R$styleable;->LinearLayout_baselineAligned:I
+Landroid/R$styleable;->LinearLayout_baselineAlignedChildIndex:I
+Landroid/R$styleable;->LinearLayout_divider:I
+Landroid/R$styleable;->LinearLayout_dividerPadding:I
+Landroid/R$styleable;->LinearLayout_gravity:I
+Landroid/R$styleable;->LinearLayout_Layout:[I
+Landroid/R$styleable;->LinearLayout_Layout_layout_gravity:I
+Landroid/R$styleable;->LinearLayout_Layout_layout_height:I
+Landroid/R$styleable;->LinearLayout_Layout_layout_weight:I
+Landroid/R$styleable;->LinearLayout_Layout_layout_width:I
+Landroid/R$styleable;->LinearLayout_measureWithLargestChild:I
+Landroid/R$styleable;->LinearLayout_orientation:I
+Landroid/R$styleable;->LinearLayout_showDividers:I
+Landroid/R$styleable;->ListView:[I
+Landroid/R$styleable;->ListView_divider:I
+Landroid/R$styleable;->ListView_dividerHeight:I
+Landroid/R$styleable;->LockPatternView:[I
+Landroid/R$styleable;->NumberPicker:[I
+Landroid/R$styleable;->NumberPicker_solidColor:I
+Landroid/R$styleable;->PopupWindow:[I
+Landroid/R$styleable;->ProgressBar:[I
+Landroid/R$styleable;->ProgressBar_indeterminateDrawable:I
+Landroid/R$styleable;->ProgressBar_indeterminateDuration:I
+Landroid/R$styleable;->ProgressBar_maxHeight:I
+Landroid/R$styleable;->ProgressBar_maxWidth:I
+Landroid/R$styleable;->ProgressBar_minHeight:I
+Landroid/R$styleable;->ProgressBar_minWidth:I
+Landroid/R$styleable;->ProgressBar_progressDrawable:I
+Landroid/R$styleable;->RingtonePreference:[I
+Landroid/R$styleable;->ScrollView:[I
+Landroid/R$styleable;->SearchView:[I
+Landroid/R$styleable;->SeekBar:[I
+Landroid/R$styleable;->SeekBar_thumb:I
+Landroid/R$styleable;->SeekBar_thumbOffset:I
+Landroid/R$styleable;->SlidingDrawer:[I
+Landroid/R$styleable;->SlidingDrawer_allowSingleTap:I
+Landroid/R$styleable;->SlidingDrawer_animateOnClick:I
+Landroid/R$styleable;->SlidingDrawer_bottomOffset:I
+Landroid/R$styleable;->SlidingDrawer_content:I
+Landroid/R$styleable;->SlidingDrawer_handle:I
+Landroid/R$styleable;->SlidingDrawer_orientation:I
+Landroid/R$styleable;->SlidingDrawer_topOffset:I
+Landroid/R$styleable;->Switch:[I
+Landroid/R$styleable;->Switch_showText:I
+Landroid/R$styleable;->Switch_splitTrack:I
+Landroid/R$styleable;->Switch_switchMinWidth:I
+Landroid/R$styleable;->Switch_switchPadding:I
+Landroid/R$styleable;->Switch_switchTextAppearance:I
+Landroid/R$styleable;->Switch_textOff:I
+Landroid/R$styleable;->Switch_textOn:I
+Landroid/R$styleable;->Switch_thumb:I
+Landroid/R$styleable;->Switch_thumbTextPadding:I
+Landroid/R$styleable;->Switch_track:I
+Landroid/R$styleable;->TextAppearance:[I
+Landroid/R$styleable;->TextAppearance_textAllCaps:I
+Landroid/R$styleable;->TextAppearance_textColor:I
+Landroid/R$styleable;->TextAppearance_textColorHighlight:I
+Landroid/R$styleable;->TextAppearance_textColorHint:I
+Landroid/R$styleable;->TextAppearance_textColorLink:I
+Landroid/R$styleable;->TextAppearance_textSize:I
+Landroid/R$styleable;->TextAppearance_textStyle:I
+Landroid/R$styleable;->TextAppearance_typeface:I
+Landroid/R$styleable;->TextView:[I
+Landroid/R$styleable;->TextView_autoLink:I
+Landroid/R$styleable;->TextView_autoText:I
+Landroid/R$styleable;->TextView_bufferType:I
+Landroid/R$styleable;->TextView_capitalize:I
+Landroid/R$styleable;->TextView_cursorVisible:I
+Landroid/R$styleable;->TextView_digits:I
+Landroid/R$styleable;->TextView_drawableBottom:I
+Landroid/R$styleable;->TextView_drawableEnd:I
+Landroid/R$styleable;->TextView_drawableLeft:I
+Landroid/R$styleable;->TextView_drawablePadding:I
+Landroid/R$styleable;->TextView_drawableRight:I
+Landroid/R$styleable;->TextView_drawableStart:I
+Landroid/R$styleable;->TextView_drawableTop:I
+Landroid/R$styleable;->TextView_editable:I
+Landroid/R$styleable;->TextView_ellipsize:I
+Landroid/R$styleable;->TextView_ems:I
+Landroid/R$styleable;->TextView_enabled:I
+Landroid/R$styleable;->TextView_freezesText:I
+Landroid/R$styleable;->TextView_gravity:I
+Landroid/R$styleable;->TextView_height:I
+Landroid/R$styleable;->TextView_hint:I
+Landroid/R$styleable;->TextView_imeActionId:I
+Landroid/R$styleable;->TextView_imeActionLabel:I
+Landroid/R$styleable;->TextView_imeOptions:I
+Landroid/R$styleable;->TextView_includeFontPadding:I
+Landroid/R$styleable;->TextView_inputMethod:I
+Landroid/R$styleable;->TextView_inputType:I
+Landroid/R$styleable;->TextView_lines:I
+Landroid/R$styleable;->TextView_lineSpacingExtra:I
+Landroid/R$styleable;->TextView_lineSpacingMultiplier:I
+Landroid/R$styleable;->TextView_linksClickable:I
+Landroid/R$styleable;->TextView_marqueeRepeatLimit:I
+Landroid/R$styleable;->TextView_maxEms:I
+Landroid/R$styleable;->TextView_maxHeight:I
+Landroid/R$styleable;->TextView_maxLength:I
+Landroid/R$styleable;->TextView_maxLines:I
+Landroid/R$styleable;->TextView_maxWidth:I
+Landroid/R$styleable;->TextView_minEms:I
+Landroid/R$styleable;->TextView_minHeight:I
+Landroid/R$styleable;->TextView_minLines:I
+Landroid/R$styleable;->TextView_minWidth:I
+Landroid/R$styleable;->TextView_numeric:I
+Landroid/R$styleable;->TextView_password:I
+Landroid/R$styleable;->TextView_phoneNumber:I
+Landroid/R$styleable;->TextView_privateImeOptions:I
+Landroid/R$styleable;->TextView_scrollHorizontally:I
+Landroid/R$styleable;->TextView_selectAllOnFocus:I
+Landroid/R$styleable;->TextView_shadowColor:I
+Landroid/R$styleable;->TextView_shadowDx:I
+Landroid/R$styleable;->TextView_shadowDy:I
+Landroid/R$styleable;->TextView_shadowRadius:I
+Landroid/R$styleable;->TextView_singleLine:I
+Landroid/R$styleable;->TextView_text:I
+Landroid/R$styleable;->TextView_textAllCaps:I
+Landroid/R$styleable;->TextView_textAppearance:I
+Landroid/R$styleable;->TextView_textColor:I
+Landroid/R$styleable;->TextView_textColorHighlight:I
+Landroid/R$styleable;->TextView_textColorHint:I
+Landroid/R$styleable;->TextView_textColorLink:I
+Landroid/R$styleable;->TextView_textCursorDrawable:I
+Landroid/R$styleable;->TextView_textIsSelectable:I
+Landroid/R$styleable;->TextView_textScaleX:I
+Landroid/R$styleable;->TextView_textSelectHandle:I
+Landroid/R$styleable;->TextView_textSelectHandleLeft:I
+Landroid/R$styleable;->TextView_textSelectHandleRight:I
+Landroid/R$styleable;->TextView_textSize:I
+Landroid/R$styleable;->TextView_textStyle:I
+Landroid/R$styleable;->TextView_typeface:I
+Landroid/R$styleable;->TextView_width:I
+Landroid/R$styleable;->Theme:[I
+Landroid/R$styleable;->View:[I
+Landroid/R$styleable;->ViewDrawableStates:[I
+Landroid/R$styleable;->ViewGroup_Layout:[I
+Landroid/R$styleable;->ViewGroup_Layout_layout_height:I
+Landroid/R$styleable;->ViewGroup_Layout_layout_width:I
+Landroid/R$styleable;->ViewGroup_MarginLayout:[I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_height:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_margin:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_marginBottom:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_marginLeft:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_marginRight:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_marginTop:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_width:I
+Landroid/R$styleable;->View_alpha:I
+Landroid/R$styleable;->View_background:I
+Landroid/R$styleable;->View_clickable:I
+Landroid/R$styleable;->View_contentDescription:I
+Landroid/R$styleable;->View_drawingCacheQuality:I
+Landroid/R$styleable;->View_duplicateParentState:I
+Landroid/R$styleable;->View_fadingEdge:I
+Landroid/R$styleable;->View_filterTouchesWhenObscured:I
+Landroid/R$styleable;->View_fitsSystemWindows:I
+Landroid/R$styleable;->View_focusable:I
+Landroid/R$styleable;->View_focusableInTouchMode:I
+Landroid/R$styleable;->View_hapticFeedbackEnabled:I
+Landroid/R$styleable;->View_id:I
+Landroid/R$styleable;->View_isScrollContainer:I
+Landroid/R$styleable;->View_keepScreenOn:I
+Landroid/R$styleable;->View_longClickable:I
+Landroid/R$styleable;->View_minHeight:I
+Landroid/R$styleable;->View_minWidth:I
+Landroid/R$styleable;->View_nextFocusDown:I
+Landroid/R$styleable;->View_nextFocusLeft:I
+Landroid/R$styleable;->View_nextFocusRight:I
+Landroid/R$styleable;->View_nextFocusUp:I
+Landroid/R$styleable;->View_onClick:I
+Landroid/R$styleable;->View_overScrollMode:I
+Landroid/R$styleable;->View_padding:I
+Landroid/R$styleable;->View_paddingBottom:I
+Landroid/R$styleable;->View_paddingEnd:I
+Landroid/R$styleable;->View_paddingLeft:I
+Landroid/R$styleable;->View_paddingRight:I
+Landroid/R$styleable;->View_paddingStart:I
+Landroid/R$styleable;->View_paddingTop:I
+Landroid/R$styleable;->View_rotation:I
+Landroid/R$styleable;->View_rotationX:I
+Landroid/R$styleable;->View_rotationY:I
+Landroid/R$styleable;->View_saveEnabled:I
+Landroid/R$styleable;->View_scaleX:I
+Landroid/R$styleable;->View_scaleY:I
+Landroid/R$styleable;->View_scrollbarDefaultDelayBeforeFade:I
+Landroid/R$styleable;->View_scrollbarFadeDuration:I
+Landroid/R$styleable;->View_scrollbars:I
+Landroid/R$styleable;->View_scrollbarSize:I
+Landroid/R$styleable;->View_scrollbarStyle:I
+Landroid/R$styleable;->View_scrollbarThumbHorizontal:I
+Landroid/R$styleable;->View_scrollbarThumbVertical:I
+Landroid/R$styleable;->View_scrollbarTrackHorizontal:I
+Landroid/R$styleable;->View_scrollbarTrackVertical:I
+Landroid/R$styleable;->View_scrollX:I
+Landroid/R$styleable;->View_scrollY:I
+Landroid/R$styleable;->View_soundEffectsEnabled:I
+Landroid/R$styleable;->View_tag:I
+Landroid/R$styleable;->View_transformPivotX:I
+Landroid/R$styleable;->View_transformPivotY:I
+Landroid/R$styleable;->View_translationX:I
+Landroid/R$styleable;->View_translationY:I
+Landroid/R$styleable;->View_visibility:I
+Landroid/R$styleable;->Window:[I
+Landroid/R$styleable;->Window_windowBackground:I
+Landroid/R$styleable;->Window_windowFrame:I
+Landroid/renderscript/BaseObj;->mRS:Landroid/renderscript/RenderScript;
+Landroid/renderscript/Element;->createUser(Landroid/renderscript/RenderScript;Landroid/renderscript/Element$DataType;)Landroid/renderscript/Element;
+Landroid/renderscript/FileA3D$EntryType;->MESH:Landroid/renderscript/FileA3D$EntryType;
+Landroid/renderscript/FileA3D$IndexEntry;->getEntryType()Landroid/renderscript/FileA3D$EntryType;
+Landroid/renderscript/FileA3D$IndexEntry;->getObject()Landroid/renderscript/BaseObj;
+Landroid/renderscript/FileA3D;->createFromResource(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;I)Landroid/renderscript/FileA3D;
+Landroid/renderscript/FileA3D;->getIndexEntry(I)Landroid/renderscript/FileA3D$IndexEntry;
+Landroid/renderscript/Font$Style;->ITALIC:Landroid/renderscript/Font$Style;
+Landroid/renderscript/Font;->create(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;Ljava/lang/String;Landroid/renderscript/Font$Style;F)Landroid/renderscript/Font;
+Landroid/renderscript/Matrix4f;->mMat:[F
+Landroid/renderscript/Mesh$AllocationBuilder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/Mesh$AllocationBuilder;->addIndexSetAllocation(Landroid/renderscript/Allocation;Landroid/renderscript/Mesh$Primitive;)Landroid/renderscript/Mesh$AllocationBuilder;
+Landroid/renderscript/Mesh$AllocationBuilder;->addIndexSetType(Landroid/renderscript/Mesh$Primitive;)Landroid/renderscript/Mesh$AllocationBuilder;
+Landroid/renderscript/Mesh$AllocationBuilder;->addVertexAllocation(Landroid/renderscript/Allocation;)Landroid/renderscript/Mesh$AllocationBuilder;
+Landroid/renderscript/Mesh$AllocationBuilder;->create()Landroid/renderscript/Mesh;
+Landroid/renderscript/Mesh$Primitive;->POINT:Landroid/renderscript/Mesh$Primitive;
+Landroid/renderscript/Mesh$Primitive;->TRIANGLE:Landroid/renderscript/Mesh$Primitive;
+Landroid/renderscript/Mesh$TriangleMeshBuilder;-><init>(Landroid/renderscript/RenderScript;II)V
+Landroid/renderscript/Mesh$TriangleMeshBuilder;->addTriangle(III)Landroid/renderscript/Mesh$TriangleMeshBuilder;
+Landroid/renderscript/Mesh$TriangleMeshBuilder;->addVertex(FF)Landroid/renderscript/Mesh$TriangleMeshBuilder;
+Landroid/renderscript/Mesh$TriangleMeshBuilder;->create(Z)Landroid/renderscript/Mesh;
+Landroid/renderscript/Mesh;->getVertexAllocation(I)Landroid/renderscript/Allocation;
+Landroid/renderscript/Program$BaseProgramBuilder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/Program$BaseProgramBuilder;->mConstantCount:I
+Landroid/renderscript/Program$BaseProgramBuilder;->mConstants:[Landroid/renderscript/Type;
+Landroid/renderscript/Program$BaseProgramBuilder;->mInputCount:I
+Landroid/renderscript/Program$BaseProgramBuilder;->mInputs:[Landroid/renderscript/Element;
+Landroid/renderscript/Program$BaseProgramBuilder;->mOutputCount:I
+Landroid/renderscript/Program$BaseProgramBuilder;->mOutputs:[Landroid/renderscript/Element;
+Landroid/renderscript/Program$BaseProgramBuilder;->mRS:Landroid/renderscript/RenderScript;
+Landroid/renderscript/Program$BaseProgramBuilder;->mShader:Ljava/lang/String;
+Landroid/renderscript/Program$BaseProgramBuilder;->mTextureCount:I
+Landroid/renderscript/Program$TextureType;->TEXTURE_2D:Landroid/renderscript/Program$TextureType;
+Landroid/renderscript/ProgramFragment$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramFragment$Builder;->create()Landroid/renderscript/ProgramFragment;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;->MODULATE:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;->REPLACE:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->ALPHA:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->RGB:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->RGBA:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->create()Landroid/renderscript/ProgramFragmentFixedFunction;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->setTexture(Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;I)Landroid/renderscript/ProgramFragmentFixedFunction$Builder;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->setVaryingColor(Z)Landroid/renderscript/ProgramFragmentFixedFunction$Builder;
+Landroid/renderscript/ProgramRaster$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramRaster$Builder;->create()Landroid/renderscript/ProgramRaster;
+Landroid/renderscript/ProgramRaster$Builder;->setPointSpriteEnabled(Z)Landroid/renderscript/ProgramRaster$Builder;
+Landroid/renderscript/ProgramStore$BlendDstFunc;->ONE:Landroid/renderscript/ProgramStore$BlendDstFunc;
+Landroid/renderscript/ProgramStore$BlendDstFunc;->ONE_MINUS_SRC_ALPHA:Landroid/renderscript/ProgramStore$BlendDstFunc;
+Landroid/renderscript/ProgramStore$BlendDstFunc;->ZERO:Landroid/renderscript/ProgramStore$BlendDstFunc;
+Landroid/renderscript/ProgramStore$BlendSrcFunc;->ONE:Landroid/renderscript/ProgramStore$BlendSrcFunc;
+Landroid/renderscript/ProgramStore$BlendSrcFunc;->SRC_ALPHA:Landroid/renderscript/ProgramStore$BlendSrcFunc;
+Landroid/renderscript/ProgramStore$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramStore$Builder;->create()Landroid/renderscript/ProgramStore;
+Landroid/renderscript/ProgramStore$Builder;->setBlendFunc(Landroid/renderscript/ProgramStore$BlendSrcFunc;Landroid/renderscript/ProgramStore$BlendDstFunc;)Landroid/renderscript/ProgramStore$Builder;
+Landroid/renderscript/ProgramStore$Builder;->setDepthFunc(Landroid/renderscript/ProgramStore$DepthFunc;)Landroid/renderscript/ProgramStore$Builder;
+Landroid/renderscript/ProgramStore$Builder;->setDepthMaskEnabled(Z)Landroid/renderscript/ProgramStore$Builder;
+Landroid/renderscript/ProgramStore$Builder;->setDitherEnabled(Z)Landroid/renderscript/ProgramStore$Builder;
+Landroid/renderscript/ProgramStore$DepthFunc;->ALWAYS:Landroid/renderscript/ProgramStore$DepthFunc;
+Landroid/renderscript/ProgramStore$DepthFunc;->LESS:Landroid/renderscript/ProgramStore$DepthFunc;
+Landroid/renderscript/ProgramStore;->BLEND_ALPHA_DEPTH_NONE(Landroid/renderscript/RenderScript;)Landroid/renderscript/ProgramStore;
+Landroid/renderscript/ProgramVertex$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramVertex$Builder;->addInput(Landroid/renderscript/Element;)Landroid/renderscript/ProgramVertex$Builder;
+Landroid/renderscript/ProgramVertex$Builder;->create()Landroid/renderscript/ProgramVertex;
+Landroid/renderscript/ProgramVertexFixedFunction$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramVertexFixedFunction$Builder;->create()Landroid/renderscript/ProgramVertexFixedFunction;
+Landroid/renderscript/ProgramVertexFixedFunction$Constants;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramVertexFixedFunction$Constants;->setProjection(Landroid/renderscript/Matrix4f;)V
+Landroid/renderscript/ProgramVertexFixedFunction;->bindConstants(Landroid/renderscript/ProgramVertexFixedFunction$Constants;)V
+Landroid/renderscript/RenderScript;->create(Landroid/content/Context;I)Landroid/renderscript/RenderScript;
+Landroid/renderscript/RenderScript;->create(Landroid/content/Context;ILandroid/renderscript/RenderScript$ContextType;I)Landroid/renderscript/RenderScript;
+Landroid/renderscript/RenderScript;->getMinorID()J
+Landroid/renderscript/RenderScript;->mMessageCallback:Landroid/renderscript/RenderScript$RSMessageHandler;
+Landroid/renderscript/RenderScript;->nScriptCCreate(Ljava/lang/String;Ljava/lang/String;[BI)J
+Landroid/renderscript/RenderScript;->sPointerSize:I
+Landroid/renderscript/RenderScript;->validate()V
+Landroid/renderscript/RenderScriptCacheDir;->mCacheDir:Ljava/io/File;
+Landroid/renderscript/RenderScriptCacheDir;->setupDiskCache(Ljava/io/File;)V
+Landroid/renderscript/RenderScriptGL$SurfaceConfig;-><init>()V
+Landroid/renderscript/RenderScriptGL$SurfaceConfig;->setDepth(II)V
+Landroid/renderscript/RenderScriptGL;-><init>(Landroid/content/Context;Landroid/renderscript/RenderScriptGL$SurfaceConfig;)V
+Landroid/renderscript/RenderScriptGL;->bindProgramRaster(Landroid/renderscript/ProgramRaster;)V
+Landroid/renderscript/RenderScriptGL;->bindProgramStore(Landroid/renderscript/ProgramStore;)V
+Landroid/renderscript/RenderScriptGL;->bindProgramVertex(Landroid/renderscript/ProgramVertex;)V
+Landroid/renderscript/RenderScriptGL;->bindRootScript(Landroid/renderscript/Script;)V
+Landroid/renderscript/RenderScriptGL;->setSurface(Landroid/view/SurfaceHolder;II)V
+Landroid/renderscript/RSSurfaceView;-><init>(Landroid/content/Context;)V
+Landroid/renderscript/RSSurfaceView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/renderscript/Script$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/Script$Builder;->mRS:Landroid/renderscript/RenderScript;
+Landroid/security/Credentials;->convertToPem([[Ljava/security/cert/Certificate;)[B
+Landroid/security/Credentials;->getInstance()Landroid/security/Credentials;
+Landroid/security/Credentials;->install(Landroid/content/Context;Ljava/lang/String;[B)V
+Landroid/security/Credentials;->install(Landroid/content/Context;Ljava/security/KeyPair;)V
+Landroid/security/Credentials;->unlock(Landroid/content/Context;)V
+Landroid/security/GateKeeper;->getSecureUserId()J
+Landroid/security/IKeyChainService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/security/IKeyChainService;
+Landroid/security/IKeyChainService;->requestPrivateKey(Ljava/lang/String;)Ljava/lang/String;
+Landroid/security/IKeystoreService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/security/IKeystoreService;
+Landroid/security/IKeystoreService;->clear_uid(J)I
+Landroid/security/IKeystoreService;->del(Ljava/lang/String;I)I
+Landroid/security/IKeystoreService;->exist(Ljava/lang/String;I)I
+Landroid/security/IKeystoreService;->generateKey(Ljava/lang/String;Landroid/security/keymaster/KeymasterArguments;[BIILandroid/security/keymaster/KeyCharacteristics;)I
+Landroid/security/IKeystoreService;->get(Ljava/lang/String;I)[B
+Landroid/security/IKeystoreService;->getState(I)I
+Landroid/security/IKeystoreService;->get_pubkey(Ljava/lang/String;)[B
+Landroid/security/IKeystoreService;->import_key(Ljava/lang/String;[BII)I
+Landroid/security/IKeystoreService;->insert(Ljava/lang/String;[BII)I
+Landroid/security/IKeystoreService;->is_hardware_backed(Ljava/lang/String;)I
+Landroid/security/IKeystoreService;->list(Ljava/lang/String;I)[Ljava/lang/String;
+Landroid/security/IKeystoreService;->reset()I
+Landroid/security/IKeystoreService;->sign(Ljava/lang/String;[B)[B
+Landroid/security/IKeystoreService;->ungrant(Ljava/lang/String;I)I
+Landroid/security/IKeystoreService;->verify(Ljava/lang/String;[B[B)I
+Landroid/security/keymaster/ExportResult;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/keymaster/KeyCharacteristics;-><init>()V
+Landroid/security/keymaster/KeyCharacteristics;->readFromParcel(Landroid/os/Parcel;)V
+Landroid/security/keymaster/KeymasterArguments;-><init>()V
+Landroid/security/keymaster/KeymasterArguments;->addEnum(II)V
+Landroid/security/keymaster/KeymasterArguments;->addUnsignedInt(IJ)V
+Landroid/security/keymaster/KeymasterArguments;->addUnsignedLong(ILjava/math/BigInteger;)V
+Landroid/security/keymaster/KeymasterArguments;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/keymaster/KeymasterArguments;->readFromParcel(Landroid/os/Parcel;)V
+Landroid/security/keymaster/KeymasterBlob;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/keymaster/OperationResult;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/KeyStore$State;->LOCKED:Landroid/security/KeyStore$State;
+Landroid/security/KeyStore$State;->UNLOCKED:Landroid/security/KeyStore$State;
+Landroid/security/keystore/AndroidKeyStoreProvider;->getKeyStoreOperationHandle(Ljava/lang/Object;)J
+Landroid/security/keystore/KeyGenParameterSpec;->getUid()I
+Landroid/security/keystore/KeyGenParameterSpec;->isUniqueIdIncluded()Z
+Landroid/security/KeyStore;->delete(Ljava/lang/String;)Z
+Landroid/security/KeyStore;->get(Ljava/lang/String;)[B
+Landroid/security/KeyStore;->getApplicationContext()Landroid/content/Context;
+Landroid/security/KeyStore;->getInstance()Landroid/security/KeyStore;
+Landroid/security/KeyStore;->getKeyStoreException(I)Landroid/security/KeyStoreException;
+Landroid/security/KeyStore;->isEmpty()Z
+Landroid/security/KeyStore;->NO_ERROR:I
+Landroid/security/KeyStore;->reset()Z
+Landroid/security/KeyStore;->state()Landroid/security/KeyStore$State;
+Landroid/security/KeyStore;->state(I)Landroid/security/KeyStore$State;
+Landroid/security/KeyStore;->unlock(Ljava/lang/String;)Z
+Landroid/security/KeystoreArguments;-><init>([[B)V
+Landroid/security/KeystoreArguments;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/net/config/RootTrustManager;->checkServerTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
+Landroid/service/carrier/ICarrierMessagingCallback$Stub;-><init>()V
+Landroid/service/carrier/ICarrierMessagingService;->filterSms(Landroid/service/carrier/MessagePdu;Ljava/lang/String;IILandroid/service/carrier/ICarrierMessagingCallback;)V
+Landroid/service/dreams/DreamService;->getDozeScreenBrightness()I
+Landroid/service/dreams/DreamService;->setDozeScreenBrightness(I)V
+Landroid/service/dreams/DreamService;->setDozeScreenState(I)V
+Landroid/service/dreams/DreamService;->setWindowless(Z)V
+Landroid/service/dreams/IDreamManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/dreams/IDreamManager;
+Landroid/service/dreams/IDreamManager;->awaken()V
+Landroid/service/dreams/IDreamManager;->dream()V
+Landroid/service/dreams/IDreamManager;->getDreamComponents()[Landroid/content/ComponentName;
+Landroid/service/dreams/IDreamManager;->isDreaming()Z
+Landroid/service/dreams/IDreamManager;->setDreamComponents([Landroid/content/ComponentName;)V
+Landroid/service/euicc/IDeleteSubscriptionCallback;->onComplete(I)V
+Landroid/service/euicc/IDownloadSubscriptionCallback;->onComplete(I)V
+Landroid/service/euicc/IEraseSubscriptionsCallback;->onComplete(I)V
+Landroid/service/euicc/IEuiccService$Stub;-><init>()V
+Landroid/service/euicc/IGetDefaultDownloadableSubscriptionListCallback;->onComplete(Landroid/service/euicc/GetDefaultDownloadableSubscriptionListResult;)V
+Landroid/service/euicc/IGetDownloadableSubscriptionMetadataCallback;->onComplete(Landroid/service/euicc/GetDownloadableSubscriptionMetadataResult;)V
+Landroid/service/euicc/IGetEidCallback;->onSuccess(Ljava/lang/String;)V
+Landroid/service/euicc/IGetEuiccInfoCallback;->onSuccess(Landroid/telephony/euicc/EuiccInfo;)V
+Landroid/service/euicc/IGetEuiccProfileInfoListCallback;->onComplete(Landroid/service/euicc/GetEuiccProfileInfoListResult;)V
+Landroid/service/euicc/IRetainSubscriptionsForFactoryResetCallback;->onComplete(I)V
+Landroid/service/euicc/ISwitchToSubscriptionCallback;->onComplete(I)V
+Landroid/service/euicc/IUpdateSubscriptionNicknameCallback;->onComplete(I)V
+Landroid/service/media/IMediaBrowserServiceCallbacks$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/media/IMediaBrowserServiceCallbacks;
+Landroid/service/media/IMediaBrowserServiceCallbacks;->onConnect(Ljava/lang/String;Landroid/media/session/MediaSession$Token;Landroid/os/Bundle;)V
+Landroid/service/media/IMediaBrowserServiceCallbacks;->onConnectFailed()V
+Landroid/service/media/IMediaBrowserServiceCallbacks;->onLoadChildren(Ljava/lang/String;Landroid/content/pm/ParceledListSlice;)V
+Landroid/service/media/IMediaBrowserServiceCallbacks;->onLoadChildrenWithOptions(Ljava/lang/String;Landroid/content/pm/ParceledListSlice;Landroid/os/Bundle;)V
+Landroid/service/media/MediaBrowserService$Result;->mFlags:I
+Landroid/service/media/MediaBrowserService;->KEY_MEDIA_ITEM:Ljava/lang/String;
+Landroid/service/notification/INotificationListener$Stub;-><init>()V
+Landroid/service/notification/NotificationListenerService$Ranking;->getVisibilityOverride()I
+Landroid/service/notification/NotificationListenerService;->getNotificationInterface()Landroid/app/INotificationManager;
+Landroid/service/notification/NotificationListenerService;->isBound()Z
+Landroid/service/notification/NotificationListenerService;->mHandler:Landroid/os/Handler;
+Landroid/service/notification/NotificationListenerService;->mNoMan:Landroid/app/INotificationManager;
+Landroid/service/notification/NotificationListenerService;->mWrapper:Landroid/service/notification/NotificationListenerService$NotificationListenerWrapper;
+Landroid/service/notification/NotificationListenerService;->TAG:Ljava/lang/String;
+Landroid/service/notification/StatusBarNotification;->getInitialPid()I
+Landroid/service/notification/StatusBarNotification;->getOpPkg()Ljava/lang/String;
+Landroid/service/notification/StatusBarNotification;->getPackageContext(Landroid/content/Context;)Landroid/content/Context;
+Landroid/service/notification/StatusBarNotification;->getUid()I
+Landroid/service/notification/StatusBarNotification;->id:I
+Landroid/service/notification/StatusBarNotification;->initialPid:I
+Landroid/service/notification/StatusBarNotification;->notification:Landroid/app/Notification;
+Landroid/service/notification/StatusBarNotification;->pkg:Ljava/lang/String;
+Landroid/service/notification/StatusBarNotification;->postTime:J
+Landroid/service/notification/StatusBarNotification;->tag:Ljava/lang/String;
+Landroid/service/notification/StatusBarNotification;->uid:I
+Landroid/service/notification/StatusBarNotification;->user:Landroid/os/UserHandle;
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->days:[I
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->endHour:I
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->endMinute:I
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->startHour:I
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->startMinute:I
+Landroid/service/notification/ZenModeConfig$ZenRule;->conditionId:Landroid/net/Uri;
+Landroid/service/notification/ZenModeConfig$ZenRule;->creationTime:J
+Landroid/service/notification/ZenModeConfig$ZenRule;->enabled:Z
+Landroid/service/notification/ZenModeConfig$ZenRule;->name:Ljava/lang/String;
+Landroid/service/notification/ZenModeConfig$ZenRule;->snoozing:Z
+Landroid/service/notification/ZenModeConfig$ZenRule;->zenMode:I
+Landroid/service/notification/ZenModeConfig;-><init>()V
+Landroid/service/notification/ZenModeConfig;->automaticRules:Landroid/util/ArrayMap;
+Landroid/service/notification/ZenModeConfig;->tryParseScheduleConditionId(Landroid/net/Uri;)Landroid/service/notification/ZenModeConfig$ScheduleInfo;
+Landroid/service/persistentdata/IPersistentDataBlockService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/persistentdata/IPersistentDataBlockService;
+Landroid/service/voice/AlwaysOnHotwordDetector$EventPayload;->getCaptureSession()Ljava/lang/Integer;
+Landroid/service/voice/VoiceInteractionService;->isKeyphraseAndLocaleSupportedForHotword(Ljava/lang/String;Ljava/util/Locale;)Z
+Landroid/service/vr/IVrManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/vr/IVrManager;
+Landroid/service/vr/IVrManager;->getVr2dDisplayId()I
+Landroid/service/vr/IVrManager;->getVrModeState()Z
+Landroid/service/wallpaper/IWallpaperConnection$Stub;-><init>()V
+Landroid/service/wallpaper/IWallpaperEngine;->destroy()V
+Landroid/service/wallpaper/IWallpaperEngine;->dispatchPointer(Landroid/view/MotionEvent;)V
+Landroid/service/wallpaper/IWallpaperEngine;->dispatchWallpaperCommand(Ljava/lang/String;IIILandroid/os/Bundle;)V
+Landroid/service/wallpaper/IWallpaperEngine;->setDesiredSize(II)V
+Landroid/service/wallpaper/IWallpaperEngine;->setVisibility(Z)V
+Landroid/service/wallpaper/IWallpaperService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/wallpaper/IWallpaperService;
+Landroid/service/wallpaper/WallpaperService$Engine;->mPendingXOffset:F
+Landroid/service/wallpaper/WallpaperService$Engine;->setFixedSizeAllowed(Z)V
+Landroid/service/wallpaper/WallpaperService;->MSG_WINDOW_RESIZED:I
+Landroid/speech/tts/TextToSpeech;->getCurrentEngine()Ljava/lang/String;
+Landroid/speech/tts/TextToSpeech;->mConnectingServiceConnection:Landroid/speech/tts/TextToSpeech$Connection;
+Landroid/speech/tts/TextToSpeech;->mCurrentEngine:Ljava/lang/String;
+Landroid/speech/tts/TextToSpeech;->mInitListener:Landroid/speech/tts/TextToSpeech$OnInitListener;
+Landroid/speech/tts/TtsEngines;-><init>(Landroid/content/Context;)V
+Landroid/speech/tts/TtsEngines;->getEngines()Ljava/util/List;
+Landroid/speech/tts/TtsEngines;->getLocalePrefForEngine(Ljava/lang/String;)Ljava/util/Locale;
+Landroid/speech/tts/TtsEngines;->getSettingsIntent(Ljava/lang/String;)Landroid/content/Intent;
+Landroid/speech/tts/TtsEngines;->normalizeTTSLocale(Ljava/util/Locale;)Ljava/util/Locale;
+Landroid/speech/tts/TtsEngines;->parseLocaleString(Ljava/lang/String;)Ljava/util/Locale;
+Landroid/speech/tts/TtsEngines;->updateLocalePrefForEngine(Ljava/lang/String;Ljava/util/Locale;)V
+Landroid/system/Int32Ref;->value:I
+Landroid/system/OsConstants;-><init>()V
+Landroid/system/OsConstants;->AF_NETLINK:I
+Landroid/system/OsConstants;->AF_PACKET:I
+Landroid/system/OsConstants;->ARPHRD_ETHER:I
+Landroid/system/OsConstants;->ARPHRD_LOOPBACK:I
+Landroid/system/OsConstants;->CAP_TO_INDEX(I)I
+Landroid/system/OsConstants;->CAP_TO_MASK(I)I
+Landroid/system/OsConstants;->ENONET:I
+Landroid/system/OsConstants;->ETH_P_ALL:I
+Landroid/system/OsConstants;->ETH_P_ARP:I
+Landroid/system/OsConstants;->ETH_P_IP:I
+Landroid/system/OsConstants;->ETH_P_IPV6:I
+Landroid/system/OsConstants;->EUSERS:I
+Landroid/system/OsConstants;->ICMP6_ECHO_REPLY:I
+Landroid/system/OsConstants;->ICMP6_ECHO_REQUEST:I
+Landroid/system/OsConstants;->ICMP_ECHO:I
+Landroid/system/OsConstants;->ICMP_ECHOREPLY:I
+Landroid/system/OsConstants;->initConstants()V
+Landroid/system/OsConstants;->IP_MULTICAST_ALL:I
+Landroid/system/OsConstants;->IP_RECVTOS:I
+Landroid/system/OsConstants;->MAP_POPULATE:I
+Landroid/system/OsConstants;->NETLINK_NETFILTER:I
+Landroid/system/OsConstants;->NETLINK_ROUTE:I
+Landroid/system/OsConstants;->O_DIRECT:I
+Landroid/system/OsConstants;->placeholder()I
+Landroid/system/OsConstants;->PR_CAP_AMBIENT:I
+Landroid/system/OsConstants;->PR_CAP_AMBIENT_RAISE:I
+Landroid/system/OsConstants;->RLIMIT_NOFILE:I
+Landroid/system/OsConstants;->RTMGRP_IPV4_IFADDR:I
+Landroid/system/OsConstants;->RTMGRP_IPV4_MROUTE:I
+Landroid/system/OsConstants;->RTMGRP_IPV4_ROUTE:I
+Landroid/system/OsConstants;->RTMGRP_IPV4_RULE:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_IFADDR:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_IFINFO:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_MROUTE:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_PREFIX:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_ROUTE:I
+Landroid/system/OsConstants;->RTMGRP_LINK:I
+Landroid/system/OsConstants;->RTMGRP_NEIGH:I
+Landroid/system/OsConstants;->RTMGRP_NOTIFY:I
+Landroid/system/OsConstants;->RTMGRP_TC:I
+Landroid/system/OsConstants;->SO_DOMAIN:I
+Landroid/system/OsConstants;->SO_PROTOCOL:I
+Landroid/system/OsConstants;->SPLICE_F_MORE:I
+Landroid/system/OsConstants;->SPLICE_F_MOVE:I
+Landroid/system/OsConstants;->SPLICE_F_NONBLOCK:I
+Landroid/system/OsConstants;->TIOCOUTQ:I
+Landroid/system/OsConstants;->UDP_ENCAP:I
+Landroid/system/OsConstants;->UDP_ENCAP_ESPINUDP:I
+Landroid/system/OsConstants;->UDP_ENCAP_ESPINUDP_NON_IKE:I
+Landroid/system/OsConstants;->UNIX_PATH_MAX:I
+Landroid/system/OsConstants;->XATTR_CREATE:I
+Landroid/system/OsConstants;->XATTR_REPLACE:I
+Landroid/system/OsConstants;->_LINUX_CAPABILITY_VERSION_3:I
+Landroid/system/StructTimeval;->fromMillis(J)Landroid/system/StructTimeval;
+Landroid/telecom/AudioState;->isMuted:Z
+Landroid/telecom/AudioState;->route:I
+Landroid/telecom/AudioState;->supportedRouteMask:I
+Landroid/telecom/Call$Details;->CAPABILITY_CAN_UPGRADE_TO_VIDEO:I
+Landroid/telecom/Connection$VideoProvider;-><init>(Landroid/os/Looper;)V
+Landroid/telecom/Phone;->setProximitySensorOff(Z)V
+Landroid/telecom/Phone;->setProximitySensorOn()V
+Landroid/telecom/PhoneAccountHandle;-><init>(Landroid/os/Parcel;)V
+Landroid/telecom/PhoneAccountHandle;->mComponentName:Landroid/content/ComponentName;
+Landroid/telecom/PhoneAccountHandle;->mId:Ljava/lang/String;
+Landroid/telecom/TelecomManager;->EXTRA_IS_HANDOVER:Ljava/lang/String;
+Landroid/telecom/TelecomManager;->getCallCapablePhoneAccounts(Z)Ljava/util/List;
+Landroid/telecom/TelecomManager;->getCurrentTtyMode()I
+Landroid/telecom/TelecomManager;->getSimCallManager(I)Landroid/telecom/PhoneAccountHandle;
+Landroid/telecom/TelecomManager;->getSystemDialerPackage()Ljava/lang/String;
+Landroid/telecom/TelecomManager;->getUserSelectedOutgoingPhoneAccount()Landroid/telecom/PhoneAccountHandle;
+Landroid/telecom/TelecomManager;->setDefaultDialer(Ljava/lang/String;)Z
+Landroid/telecom/TelecomManager;->setUserSelectedOutgoingPhoneAccount(Landroid/telecom/PhoneAccountHandle;)V
+Landroid/telecom/TelecomManager;->TTY_MODE_OFF:I
+Landroid/telecom/VideoCallImpl;->destroy()V
+Landroid/telephony/CarrierConfigManager;->KEY_CARRIER_DEFAULT_ACTIONS_ON_REDIRECTION_STRING_ARRAY:Ljava/lang/String;
+Landroid/telephony/CarrierConfigManager;->KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL:Ljava/lang/String;
+Landroid/telephony/CarrierMessagingServiceManager;-><init>()V
+Landroid/telephony/cdma/CdmaCellLocation;->equalsHandlesNulls(Ljava/lang/Object;Ljava/lang/Object;)Z
+Landroid/telephony/cdma/CdmaCellLocation;->mBaseStationId:I
+Landroid/telephony/cdma/CdmaCellLocation;->mBaseStationLatitude:I
+Landroid/telephony/cdma/CdmaCellLocation;->mBaseStationLongitude:I
+Landroid/telephony/cdma/CdmaCellLocation;->mNetworkId:I
+Landroid/telephony/cdma/CdmaCellLocation;->mSystemId:I
+Landroid/telephony/CellBroadcastMessage;-><init>(Landroid/telephony/SmsCbMessage;)V
+Landroid/telephony/CellBroadcastMessage;->createFromCursor(Landroid/database/Cursor;)Landroid/telephony/CellBroadcastMessage;
+Landroid/telephony/CellBroadcastMessage;->getContentValues()Landroid/content/ContentValues;
+Landroid/telephony/CellBroadcastMessage;->getDeliveryTime()J
+Landroid/telephony/CellBroadcastMessage;->getEtwsWarningInfo()Landroid/telephony/SmsCbEtwsInfo;
+Landroid/telephony/CellBroadcastMessage;->getLanguageCode()Ljava/lang/String;
+Landroid/telephony/CellBroadcastMessage;->getMessageBody()Ljava/lang/String;
+Landroid/telephony/CellBroadcastMessage;->getSerialNumber()I
+Landroid/telephony/CellBroadcastMessage;->getServiceCategory()I
+Landroid/telephony/CellBroadcastMessage;->getSpokenDateString(Landroid/content/Context;)Ljava/lang/String;
+Landroid/telephony/CellBroadcastMessage;->isCmasMessage()Z
+Landroid/telephony/CellBroadcastMessage;->isEmergencyAlertMessage()Z
+Landroid/telephony/CellBroadcastMessage;->isEtwsMessage()Z
+Landroid/telephony/CellBroadcastMessage;->isRead()Z
+Landroid/telephony/CellIdentityCdma;-><init>(IIIII)V
+Landroid/telephony/CellIdentityGsm;-><init>()V
+Landroid/telephony/CellIdentityGsm;->mArfcn:I
+Landroid/telephony/CellIdentityGsm;->mBsic:I
+Landroid/telephony/CellIdentityLte;-><init>()V
+Landroid/telephony/CellIdentityLte;-><init>(IIIII)V
+Landroid/telephony/CellIdentityLte;->mEarfcn:I
+Landroid/telephony/CellIdentityWcdma;->mUarfcn:I
+Landroid/telephony/CellInfo;->getTimeStampType()I
+Landroid/telephony/CellInfo;->timeStampTypeToString(I)Ljava/lang/String;
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_ANTENNA:I
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_JAVA_RIL:I
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_MODEM:I
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_OEM_RIL:I
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_UNKNOWN:I
+Landroid/telephony/CellInfoCdma;-><init>()V
+Landroid/telephony/CellInfoCdma;-><init>(Landroid/telephony/CellInfoCdma;)V
+Landroid/telephony/CellInfoCdma;->setCellIdentity(Landroid/telephony/CellIdentityCdma;)V
+Landroid/telephony/CellInfoGsm;-><init>()V
+Landroid/telephony/CellInfoLte;-><init>()V
+Landroid/telephony/CellInfoLte;->setCellIdentity(Landroid/telephony/CellIdentityLte;)V
+Landroid/telephony/CellInfoLte;->setCellSignalStrength(Landroid/telephony/CellSignalStrengthLte;)V
+Landroid/telephony/CellLocation;->fillInNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/CellLocation;->isEmpty()Z
+Landroid/telephony/CellLocation;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/CellLocation;
+Landroid/telephony/CellSignalStrengthGsm;-><init>()V
+Landroid/telephony/CellSignalStrengthGsm;->mBitErrorRate:I
+Landroid/telephony/CellSignalStrengthGsm;->mSignalStrength:I
+Landroid/telephony/CellSignalStrengthGsm;->mTimingAdvance:I
+Landroid/telephony/CellSignalStrengthLte;-><init>()V
+Landroid/telephony/CellSignalStrengthLte;->mCqi:I
+Landroid/telephony/CellSignalStrengthLte;->mRsrp:I
+Landroid/telephony/CellSignalStrengthLte;->mRsrq:I
+Landroid/telephony/CellSignalStrengthLte;->mRssnr:I
+Landroid/telephony/CellSignalStrengthLte;->mSignalStrength:I
+Landroid/telephony/CellSignalStrengthLte;->mTimingAdvance:I
+Landroid/telephony/CellSignalStrengthWcdma;->mBitErrorRate:I
+Landroid/telephony/CellSignalStrengthWcdma;->mSignalStrength:I
+Landroid/telephony/DisconnectCause;->toString(I)Ljava/lang/String;
+Landroid/telephony/euicc/EuiccInfo;->osVersion:Ljava/lang/String;
+Landroid/telephony/gsm/GsmCellLocation;->setPsc(I)V
+Landroid/telephony/NeighboringCellInfo;->mCid:I
+Landroid/telephony/NeighboringCellInfo;->mLac:I
+Landroid/telephony/NeighboringCellInfo;->mNetworkType:I
+Landroid/telephony/NeighboringCellInfo;->mPsc:I
+Landroid/telephony/NeighboringCellInfo;->mRssi:I
+Landroid/telephony/PhoneNumberFormattingTextWatcher;->mFormatter:Lcom/android/i18n/phonenumbers/AsYouTypeFormatter;
+Landroid/telephony/PhoneNumberUtils;->cdmaCheckAndProcessPlusCode(Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->compare(Ljava/lang/String;Ljava/lang/String;Z)Z
+Landroid/telephony/PhoneNumberUtils;->compareLoosely(Ljava/lang/String;Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->compareStrictly(Ljava/lang/String;Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->compareStrictly(Ljava/lang/String;Ljava/lang/String;Z)Z
+Landroid/telephony/PhoneNumberUtils;->convertPreDial(Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->extractNetworkPortionAlt(Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->getUsernameFromUriNumber(Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->isEmergencyNumber(Ljava/lang/String;Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isLocalEmergencyNumber(Landroid/content/Context;ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isNanp(Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isPotentialLocalEmergencyNumber(Landroid/content/Context;Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isUriNumber(Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isVoiceMailNumber(Landroid/content/Context;ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->MIN_MATCH:I
+Landroid/telephony/PhoneNumberUtils;->ttsSpanAsPhoneNumber(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
+Landroid/telephony/PhoneStateListener;-><init>(Landroid/os/Looper;)V
+Landroid/telephony/PhoneStateListener;->LISTEN_PRECISE_CALL_STATE:I
+Landroid/telephony/PhoneStateListener;->mSubId:Ljava/lang/Integer;
+Landroid/telephony/PhoneStateListener;->onDataConnectionRealTimeInfoChanged(Landroid/telephony/DataConnectionRealTimeInfo;)V
+Landroid/telephony/PhoneStateListener;->onOemHookRawEvent([B)V
+Landroid/telephony/PhoneStateListener;->onOtaspChanged(I)V
+Landroid/telephony/PhoneStateListener;->onPreciseCallStateChanged(Landroid/telephony/PreciseCallState;)V
+Landroid/telephony/PhoneStateListener;->onPreciseDataConnectionStateChanged(Landroid/telephony/PreciseDataConnectionState;)V
+Landroid/telephony/PhoneStateListener;->onVoLteServiceStateChanged(Landroid/telephony/VoLteServiceState;)V
+Landroid/telephony/PreciseCallState;-><init>(IIIII)V
+Landroid/telephony/PreciseCallState;->getDisconnectCause()I
+Landroid/telephony/PreciseCallState;->getPreciseDisconnectCause()I
+Landroid/telephony/PreciseCallState;->getRingingCallState()I
+Landroid/telephony/PreciseDataConnectionState;-><init>(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/net/LinkProperties;Ljava/lang/String;)V
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionAPN()Ljava/lang/String;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionAPNType()Ljava/lang/String;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionChangeReason()Ljava/lang/String;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionFailCause()Ljava/lang/String;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionLinkProperties()Landroid/net/LinkProperties;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionNetworkType()I
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionState()I
+Landroid/telephony/RadioAccessFamily;->getNetworkTypeFromRaf(I)I
+Landroid/telephony/RadioAccessFamily;->getPhoneId()I
+Landroid/telephony/RadioAccessFamily;->getRadioAccessFamily()I
+Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/telephony/Rlog;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/telephony/Rlog;->v(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->w(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/telephony/ServiceState;->bearerBitmapHasCdma(I)Z
+Landroid/telephony/ServiceState;->equalsHandlesNulls(Ljava/lang/Object;Ljava/lang/Object;)Z
+Landroid/telephony/ServiceState;->fillInNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/ServiceState;->getCdmaDefaultRoamingIndicator()I
+Landroid/telephony/ServiceState;->getCdmaEriIconIndex()I
+Landroid/telephony/ServiceState;->getCdmaEriIconMode()I
+Landroid/telephony/ServiceState;->getCdmaRoamingIndicator()I
+Landroid/telephony/ServiceState;->getCssIndicator()I
+Landroid/telephony/ServiceState;->getDataNetworkType()I
+Landroid/telephony/ServiceState;->getDataOperatorAlphaShort()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getDataOperatorNumeric()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getDataRoamingType()I
+Landroid/telephony/ServiceState;->getRadioTechnology()I
+Landroid/telephony/ServiceState;->getRilVoiceRadioTechnology()I
+Landroid/telephony/ServiceState;->getVoiceOperatorAlphaLong()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getVoiceOperatorAlphaShort()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getVoiceOperatorNumeric()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getVoiceRoaming()Z
+Landroid/telephony/ServiceState;->getVoiceRoamingType()I
+Landroid/telephony/ServiceState;->mCdmaDefaultRoamingIndicator:I
+Landroid/telephony/ServiceState;->mCdmaEriIconIndex:I
+Landroid/telephony/ServiceState;->mCdmaEriIconMode:I
+Landroid/telephony/ServiceState;->mCdmaRoamingIndicator:I
+Landroid/telephony/ServiceState;->mCssIndicator:Z
+Landroid/telephony/ServiceState;->mIsManualNetworkSelection:Z
+Landroid/telephony/ServiceState;->mNetworkId:I
+Landroid/telephony/ServiceState;->mSystemId:I
+Landroid/telephony/ServiceState;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/ServiceState;
+Landroid/telephony/ServiceState;->RIL_RADIO_TECHNOLOGY_IWLAN:I
+Landroid/telephony/ServiceState;->setCdmaDefaultRoamingIndicator(I)V
+Landroid/telephony/ServiceState;->setCdmaEriIconIndex(I)V
+Landroid/telephony/ServiceState;->setCdmaEriIconMode(I)V
+Landroid/telephony/ServiceState;->setCdmaRoamingIndicator(I)V
+Landroid/telephony/ServiceState;->setCssIndicator(I)V
+Landroid/telephony/ServiceState;->setDataRegState(I)V
+Landroid/telephony/ServiceState;->setDataRoaming(Z)V
+Landroid/telephony/ServiceState;->setDataRoamingFromRegistration(Z)V
+Landroid/telephony/ServiceState;->setDataRoamingType(I)V
+Landroid/telephony/ServiceState;->setEmergencyOnly(Z)V
+Landroid/telephony/ServiceState;->setFromNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/ServiceState;->setOperatorAlphaLong(Ljava/lang/String;)V
+Landroid/telephony/ServiceState;->setVoiceRegState(I)V
+Landroid/telephony/ServiceState;->setVoiceRoaming(Z)V
+Landroid/telephony/ServiceState;->setVoiceRoamingType(I)V
+Landroid/telephony/SignalStrength;-><init>()V
+Landroid/telephony/SignalStrength;-><init>(Landroid/os/Parcel;)V
+Landroid/telephony/SignalStrength;-><init>(Landroid/telephony/SignalStrength;)V
+Landroid/telephony/SignalStrength;-><init>(Z)V
+Landroid/telephony/SignalStrength;->copyFrom(Landroid/telephony/SignalStrength;)V
+Landroid/telephony/SignalStrength;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/telephony/SignalStrength;->fillInNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/SignalStrength;->getAsuLevel()I
+Landroid/telephony/SignalStrength;->getCdmaAsuLevel()I
+Landroid/telephony/SignalStrength;->getCdmaLevel()I
+Landroid/telephony/SignalStrength;->getDbm()I
+Landroid/telephony/SignalStrength;->getEvdoAsuLevel()I
+Landroid/telephony/SignalStrength;->getEvdoLevel()I
+Landroid/telephony/SignalStrength;->getGsmAsuLevel()I
+Landroid/telephony/SignalStrength;->getGsmDbm()I
+Landroid/telephony/SignalStrength;->getGsmLevel()I
+Landroid/telephony/SignalStrength;->getLteAsuLevel()I
+Landroid/telephony/SignalStrength;->getLteCqi()I
+Landroid/telephony/SignalStrength;->getLteDbm()I
+Landroid/telephony/SignalStrength;->getLteLevel()I
+Landroid/telephony/SignalStrength;->getLteRsrp()I
+Landroid/telephony/SignalStrength;->getLteRsrq()I
+Landroid/telephony/SignalStrength;->getLteRssnr()I
+Landroid/telephony/SignalStrength;->getLteSignalStrength()I
+Landroid/telephony/SignalStrength;->getTdScdmaAsuLevel()I
+Landroid/telephony/SignalStrength;->getTdScdmaDbm()I
+Landroid/telephony/SignalStrength;->getTdScdmaLevel()I
+Landroid/telephony/SignalStrength;->mCdmaDbm:I
+Landroid/telephony/SignalStrength;->mCdmaEcio:I
+Landroid/telephony/SignalStrength;->mEvdoDbm:I
+Landroid/telephony/SignalStrength;->mEvdoEcio:I
+Landroid/telephony/SignalStrength;->mEvdoSnr:I
+Landroid/telephony/SignalStrength;->mGsmBitErrorRate:I
+Landroid/telephony/SignalStrength;->mGsmSignalStrength:I
+Landroid/telephony/SignalStrength;->mLteCqi:I
+Landroid/telephony/SignalStrength;->mLteRsrp:I
+Landroid/telephony/SignalStrength;->mLteRsrpBoost:I
+Landroid/telephony/SignalStrength;->mLteRsrq:I
+Landroid/telephony/SignalStrength;->mLteRssnr:I
+Landroid/telephony/SignalStrength;->mLteSignalStrength:I
+Landroid/telephony/SignalStrength;->mTdScdmaRscp:I
+Landroid/telephony/SignalStrength;->mWcdmaRscp:I
+Landroid/telephony/SignalStrength;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/SignalStrength;
+Landroid/telephony/SignalStrength;->NUM_SIGNAL_STRENGTH_BINS:I
+Landroid/telephony/SignalStrength;->setFromNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_GOOD:I
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_GREAT:I
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_MODERATE:I
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_NONE_OR_UNKNOWN:I
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_POOR:I
+Landroid/telephony/SignalStrength;->validateInput()V
+Landroid/telephony/SmsManager;->copyMessageToIcc([B[BI)Z
+Landroid/telephony/SmsManager;->deleteMessageFromIcc(I)Z
+Landroid/telephony/SmsManager;->disableCellBroadcastRange(III)Z
+Landroid/telephony/SmsManager;->enableCellBroadcastRange(III)Z
+Landroid/telephony/SmsManager;->getAllMessagesFromIcc()Ljava/util/ArrayList;
+Landroid/telephony/SmsManager;->isSMSPromptEnabled()Z
+Landroid/telephony/SmsManager;->mSubId:I
+Landroid/telephony/SmsManager;->sendMultipartTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;IZI)V
+Landroid/telephony/SmsManager;->sendTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;IZI)V
+Landroid/telephony/SmsManager;->sendTextMessageWithoutPersisting(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;IZI)V
+Landroid/telephony/SmsManager;->updateMessageOnIcc(II[B)Z
+Landroid/telephony/SmsMessage;->fragmentText(Ljava/lang/String;)Ljava/util/ArrayList;
+Landroid/telephony/SmsMessage;->getSubId()I
+Landroid/telephony/SmsMessage;->mSubId:I
+Landroid/telephony/SmsMessage;->mWrappedSmsMessage:Lcom/android/internal/telephony/SmsMessageBase;
+Landroid/telephony/SmsMessage;->setSubId(I)V
+Landroid/telephony/SmsMessage;->useCdmaFormatForMoSms()Z
+Landroid/telephony/SmsMessage;->useCdmaFormatForMoSms(I)Z
+Landroid/telephony/SubscriptionManager;-><init>(Landroid/content/Context;)V
+Landroid/telephony/SubscriptionManager;->CONTENT_URI:Landroid/net/Uri;
+Landroid/telephony/SubscriptionManager;->DEFAULT_SUBSCRIPTION_ID:I
+Landroid/telephony/SubscriptionManager;->getActiveSubscriptionIdList()[I
+Landroid/telephony/SubscriptionManager;->getAllSubscriptionInfoCount()I
+Landroid/telephony/SubscriptionManager;->getAllSubscriptionInfoList()Ljava/util/List;
+Landroid/telephony/SubscriptionManager;->getDefaultDataPhoneId()I
+Landroid/telephony/SubscriptionManager;->getDefaultDataSubscriptionInfo()Landroid/telephony/SubscriptionInfo;
+Landroid/telephony/SubscriptionManager;->getDefaultSmsPhoneId()I
+Landroid/telephony/SubscriptionManager;->getDefaultVoiceSubscriptionInfo()Landroid/telephony/SubscriptionInfo;
+Landroid/telephony/SubscriptionManager;->getPhoneId(I)I
+Landroid/telephony/SubscriptionManager;->getSlotIndex(I)I
+Landroid/telephony/SubscriptionManager;->getSubId(I)[I
+Landroid/telephony/SubscriptionManager;->NAME_SOURCE_USER_INPUT:I
+Landroid/telephony/SubscriptionManager;->setDataRoaming(II)I
+Landroid/telephony/SubscriptionManager;->setDefaultDataSubId(I)V
+Landroid/telephony/SubscriptionManager;->setDefaultSmsSubId(I)V
+Landroid/telephony/SubscriptionManager;->setDisplayNumber(Ljava/lang/String;I)I
+Landroid/telephony/TelephonyManager$MultiSimVariants;->TSTS:Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager$MultiSimVariants;->UNKNOWN:Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager$MultiSimVariants;->values()[Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager;-><init>()V
+Landroid/telephony/TelephonyManager;-><init>(Landroid/content/Context;)V
+Landroid/telephony/TelephonyManager;->ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED:Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->from(Landroid/content/Context;)Landroid/telephony/TelephonyManager;
+Landroid/telephony/TelephonyManager;->getCallState(I)I
+Landroid/telephony/TelephonyManager;->getCdmaEriIconIndex(I)I
+Landroid/telephony/TelephonyManager;->getCdmaEriIconMode(I)I
+Landroid/telephony/TelephonyManager;->getCdmaEriText(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getDataNetworkType(I)I
+Landroid/telephony/TelephonyManager;->getDefault()Landroid/telephony/TelephonyManager;
+Landroid/telephony/TelephonyManager;->getDeviceSoftwareVersion(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getGroupIdLevel1(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getIccAuthentication(IIILjava/lang/String;)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getIsimImpi()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getIsimImpu()[Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getIsimPcscf()[Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getITelephony()Lcom/android/internal/telephony/ITelephony;
+Landroid/telephony/TelephonyManager;->getLine1AlphaTag(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getLine1Number(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getLteOnCdmaMode()I
+Landroid/telephony/TelephonyManager;->getLteOnCdmaMode(I)I
+Landroid/telephony/TelephonyManager;->getLteOnCdmaModeStatic()I
+Landroid/telephony/TelephonyManager;->getMergedSubscriberIds()[Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getMsisdn()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getMsisdn(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getMultiSimConfiguration()Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager;->getNai(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkClass(I)I
+Landroid/telephony/TelephonyManager;->getNetworkCountryIso(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkCountryIsoForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkOperator(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkOperatorForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkOperatorName(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkType(I)I
+Landroid/telephony/TelephonyManager;->getNetworkTypeName(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getOtaSpNumberSchemaForPhone(ILjava/lang/String;)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getPhoneId(I)I
+Landroid/telephony/TelephonyManager;->getPhoneType(I)I
+Landroid/telephony/TelephonyManager;->getPhoneTypeFromProperty(I)I
+Landroid/telephony/TelephonyManager;->getProcCmdLine()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimCount()I
+Landroid/telephony/TelephonyManager;->getSimCountryIso(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimCountryIsoForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperator(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorName(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorNameForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorNumeric()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorNumeric(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorNumericForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimSerialNumber(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSlotIndex()I
+Landroid/telephony/TelephonyManager;->getSubId(I)I
+Landroid/telephony/TelephonyManager;->getSubIdForPhoneAccount(Landroid/telecom/PhoneAccount;)I
+Landroid/telephony/TelephonyManager;->getSubscriberId(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSubscriberInfo()Lcom/android/internal/telephony/IPhoneSubInfo;
+Landroid/telephony/TelephonyManager;->getTelephonyProperty(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getTelephonyProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getVoiceMailAlphaTag(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getVoiceMailNumber(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getVoiceMessageCount(I)I
+Landroid/telephony/TelephonyManager;->hasIccCard(I)Z
+Landroid/telephony/TelephonyManager;->isMultiSimEnabled()Z
+Landroid/telephony/TelephonyManager;->isNetworkRoaming(I)Z
+Landroid/telephony/TelephonyManager;->isVideoTelephonyAvailable()Z
+Landroid/telephony/TelephonyManager;->isVolteAvailable()Z
+Landroid/telephony/TelephonyManager;->isWifiCallingAvailable()Z
+Landroid/telephony/TelephonyManager;->mSubscriptionManager:Landroid/telephony/SubscriptionManager;
+Landroid/telephony/TelephonyManager;->NETWORK_CLASS_2_G:I
+Landroid/telephony/TelephonyManager;->NETWORK_CLASS_3_G:I
+Landroid/telephony/TelephonyManager;->NETWORK_CLASS_4_G:I
+Landroid/telephony/TelephonyManager;->NETWORK_TYPE_LTE_CA:I
+Landroid/telephony/TelephonyManager;->nvReadItem(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->setBasebandVersionForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setDataNetworkTypeForPhone(II)V
+Landroid/telephony/TelephonyManager;->setImsRegistrationState(Z)V
+Landroid/telephony/TelephonyManager;->setNetworkOperatorNameForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setNetworkOperatorNumericForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setNetworkRoamingForPhone(IZ)V
+Landroid/telephony/TelephonyManager;->setPhoneType(II)V
+Landroid/telephony/TelephonyManager;->setRoamingOverride(Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)Z
+Landroid/telephony/TelephonyManager;->setSimCountryIsoForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setSimOperatorNameForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setSimOperatorNumericForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setSimStateForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setTelephonyProperty(ILjava/lang/String;Ljava/lang/String;)V
+Landroid/telephony/VoLteServiceState;-><init>(I)V
+Landroid/text/BoringLayout;->isBoring(Ljava/lang/CharSequence;Landroid/text/TextPaint;Landroid/text/TextDirectionHeuristic;Landroid/text/BoringLayout$Metrics;)Landroid/text/BoringLayout$Metrics;
+Landroid/text/DynamicLayout;-><init>(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;Landroid/text/TextDirectionHeuristic;FFZIIILandroid/text/TextUtils$TruncateAt;I)V
+Landroid/text/DynamicLayout;->getBlockEndLines()[I
+Landroid/text/DynamicLayout;->getBlockIndices()[I
+Landroid/text/DynamicLayout;->getIndexFirstChangedBlock()I
+Landroid/text/DynamicLayout;->getNumberOfBlocks()I
+Landroid/text/DynamicLayout;->setIndexFirstChangedBlock(I)V
+Landroid/text/DynamicLayout;->sStaticLayout:Landroid/text/StaticLayout;
+Landroid/text/format/DateFormat;->getTimeFormatString(Landroid/content/Context;)Ljava/lang/String;
+Landroid/text/format/DateFormat;->getTimeFormatString(Landroid/content/Context;I)Ljava/lang/String;
+Landroid/text/format/DateFormat;->hasDesignator(Ljava/lang/CharSequence;C)Z
+Landroid/text/format/DateFormat;->hasSeconds(Ljava/lang/CharSequence;)Z
+Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/Context;I)Z
+Landroid/text/format/DateUtils;->formatDuration(J)Ljava/lang/CharSequence;
+Landroid/text/format/DateUtils;->formatDuration(JI)Ljava/lang/CharSequence;
+Landroid/text/format/Formatter;->formatBytes(Landroid/content/res/Resources;JI)Landroid/text/format/Formatter$BytesResult;
+Landroid/text/format/Formatter;->formatShortElapsedTime(Landroid/content/Context;J)Ljava/lang/String;
+Landroid/text/format/Formatter;->formatShortElapsedTimeRoundingUpToMinutes(Landroid/content/Context;J)Ljava/lang/String;
+Landroid/text/Html;->withinStyle(Ljava/lang/StringBuilder;Ljava/lang/CharSequence;II)V
+Landroid/text/InputFilter$LengthFilter;->mMax:I
+Landroid/text/Layout$Alignment;->ALIGN_LEFT:Landroid/text/Layout$Alignment;
+Landroid/text/Layout$Alignment;->ALIGN_RIGHT:Landroid/text/Layout$Alignment;
+Landroid/text/Layout;->DIRS_ALL_LEFT_TO_RIGHT:Landroid/text/Layout$Directions;
+Landroid/text/Layout;->DIRS_ALL_RIGHT_TO_LEFT:Landroid/text/Layout$Directions;
+Landroid/text/Layout;->DIR_REQUEST_DEFAULT_LTR:I
+Landroid/text/Layout;->drawBackground(Landroid/graphics/Canvas;Landroid/graphics/Path;Landroid/graphics/Paint;III)V
+Landroid/text/Layout;->drawText(Landroid/graphics/Canvas;II)V
+Landroid/text/Layout;->getLineRangeForDraw(Landroid/graphics/Canvas;)J
+Landroid/text/Layout;->getPrimaryHorizontal(IZ)F
+Landroid/text/Layout;->getSecondaryHorizontal(IZ)F
+Landroid/text/Layout;->isLevelBoundary(I)Z
+Landroid/text/Layout;->mPaint:Landroid/text/TextPaint;
+Landroid/text/Layout;->shouldClampCursor(I)Z
+Landroid/text/method/AllCapsTransformationMethod;-><init>(Landroid/content/Context;)V
+Landroid/text/method/HideReturnsTransformationMethod;->sInstance:Landroid/text/method/HideReturnsTransformationMethod;
+Landroid/text/method/LinkMovementMethod;->sInstance:Landroid/text/method/LinkMovementMethod;
+Landroid/text/method/MetaKeyKeyListener;->startSelecting(Landroid/view/View;Landroid/text/Spannable;)V
+Landroid/text/method/MetaKeyKeyListener;->stopSelecting(Landroid/view/View;Landroid/text/Spannable;)V
+Landroid/text/method/PasswordTransformationMethod;->DOT:C
+Landroid/text/method/PasswordTransformationMethod;->sInstance:Landroid/text/method/PasswordTransformationMethod;
+Landroid/text/method/TransformationMethod2;->setLengthChangesAllowed(Z)V
+Landroid/text/method/WordIterator;-><init>(Ljava/util/Locale;)V
+Landroid/text/method/WordIterator;->following(I)I
+Landroid/text/method/WordIterator;->getBeginning(I)I
+Landroid/text/method/WordIterator;->getEnd(I)I
+Landroid/text/method/WordIterator;->getNextWordEndOnTwoWordBoundary(I)I
+Landroid/text/method/WordIterator;->getPrevWordBeginningOnTwoWordsBoundary(I)I
+Landroid/text/method/WordIterator;->getPunctuationBeginning(I)I
+Landroid/text/method/WordIterator;->getPunctuationEnd(I)I
+Landroid/text/method/WordIterator;->isAfterPunctuation(I)Z
+Landroid/text/method/WordIterator;->isBoundary(I)Z
+Landroid/text/method/WordIterator;->isOnPunctuation(I)Z
+Landroid/text/method/WordIterator;->nextBoundary(I)I
+Landroid/text/method/WordIterator;->preceding(I)I
+Landroid/text/method/WordIterator;->prevBoundary(I)I
+Landroid/text/method/WordIterator;->setCharSequence(Ljava/lang/CharSequence;II)V
+Landroid/text/Selection;->moveToFollowing(Landroid/text/Spannable;Landroid/text/Selection$PositionIterator;Z)Z
+Landroid/text/Selection;->moveToPreceding(Landroid/text/Spannable;Landroid/text/Selection$PositionIterator;Z)Z
+Landroid/text/SpannableStringBuilder;->getSpans(IILjava/lang/Class;Z)[Ljava/lang/Object;
+Landroid/text/SpannableStringBuilder;->mGapLength:I
+Landroid/text/SpannableStringBuilder;->mGapStart:I
+Landroid/text/SpannableStringBuilder;->mSpanCount:I
+Landroid/text/SpannableStringBuilder;->mSpanEnds:[I
+Landroid/text/SpannableStringBuilder;->mSpanFlags:[I
+Landroid/text/SpannableStringBuilder;->mSpans:[Ljava/lang/Object;
+Landroid/text/SpannableStringBuilder;->mSpanStarts:[I
+Landroid/text/SpannableStringBuilder;->mText:[C
+Landroid/text/SpannableStringBuilder;->sendToSpanWatchers(III)V
+Landroid/text/SpannableStringBuilder;->substring(II)Ljava/lang/String;
+Landroid/text/SpannableStringInternal;-><init>(Ljava/lang/CharSequence;II)V
+Landroid/text/SpannableStringInternal;->charAt(I)C
+Landroid/text/SpannableStringInternal;->checkRange(Ljava/lang/String;II)V
+Landroid/text/SpannableStringInternal;->COLUMNS:I
+Landroid/text/SpannableStringInternal;->copySpans(Landroid/text/SpannableStringInternal;II)V
+Landroid/text/SpannableStringInternal;->copySpans(Landroid/text/Spanned;II)V
+Landroid/text/SpannableStringInternal;->EMPTY:[Ljava/lang/Object;
+Landroid/text/SpannableStringInternal;->END:I
+Landroid/text/SpannableStringInternal;->FLAGS:I
+Landroid/text/SpannableStringInternal;->getChars(II[CI)V
+Landroid/text/SpannableStringInternal;->getSpanEnd(Ljava/lang/Object;)I
+Landroid/text/SpannableStringInternal;->getSpanFlags(Ljava/lang/Object;)I
+Landroid/text/SpannableStringInternal;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;
+Landroid/text/SpannableStringInternal;->getSpanStart(Ljava/lang/Object;)I
+Landroid/text/SpannableStringInternal;->isIndexFollowsNextLine(I)Z
+Landroid/text/SpannableStringInternal;->isOutOfCopyRange(IIII)Z
+Landroid/text/SpannableStringInternal;->length()I
+Landroid/text/SpannableStringInternal;->mSpanCount:I
+Landroid/text/SpannableStringInternal;->mSpanData:[I
+Landroid/text/SpannableStringInternal;->mSpans:[Ljava/lang/Object;
+Landroid/text/SpannableStringInternal;->mText:Ljava/lang/String;
+Landroid/text/SpannableStringInternal;->nextSpanTransition(IILjava/lang/Class;)I
+Landroid/text/SpannableStringInternal;->region(II)Ljava/lang/String;
+Landroid/text/SpannableStringInternal;->removeSpan(Ljava/lang/Object;)V
+Landroid/text/SpannableStringInternal;->sendSpanAdded(Ljava/lang/Object;II)V
+Landroid/text/SpannableStringInternal;->sendSpanChanged(Ljava/lang/Object;IIII)V
+Landroid/text/SpannableStringInternal;->sendSpanRemoved(Ljava/lang/Object;II)V
+Landroid/text/SpannableStringInternal;->setSpan(Ljava/lang/Object;III)V
+Landroid/text/SpannableStringInternal;->setSpan(Ljava/lang/Object;IIIZ)V
+Landroid/text/SpannableStringInternal;->START:I
+Landroid/text/SpanSet;->spans:[Ljava/lang/Object;
+Landroid/text/StaticLayout$LineBreaks;->breaks:[I
+Landroid/text/StaticLayout$LineBreaks;->flags:[I
+Landroid/text/StaticLayout$LineBreaks;->widths:[F
+Landroid/text/StaticLayout;-><init>(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;Landroid/text/TextDirectionHeuristic;FFZLandroid/text/TextUtils$TruncateAt;II)V
+Landroid/text/StaticLayout;->ELLIPSIS_START:I
+Landroid/text/StaticLayout;->getHeight(Z)I
+Landroid/text/StaticLayout;->mColumns:I
+Landroid/text/StaticLayout;->mLineCount:I
+Landroid/text/StaticLayout;->mLineDirections:[Landroid/text/Layout$Directions;
+Landroid/text/StaticLayout;->mLines:[I
+Landroid/text/StaticLayout;->mMaximumVisibleLineCount:I
+Landroid/text/style/BulletSpan;->mColor:I
+Landroid/text/style/BulletSpan;->mGapWidth:I
+Landroid/text/style/BulletSpan;->mWantColor:Z
+Landroid/text/style/DynamicDrawableSpan;->mDrawableRef:Ljava/lang/ref/WeakReference;
+Landroid/text/style/EasyEditSpan;->getPendingIntent()Landroid/app/PendingIntent;
+Landroid/text/style/EasyEditSpan;->isDeleteEnabled()Z
+Landroid/text/style/EasyEditSpan;->setDeleteEnabled(Z)V
+Landroid/text/style/ImageSpan;->mDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/text/style/SpellCheckSpan;-><init>()V
+Landroid/text/style/SpellCheckSpan;-><init>(Landroid/os/Parcel;)V
+Landroid/text/style/SpellCheckSpan;->isSpellCheckInProgress()Z
+Landroid/text/style/SpellCheckSpan;->setSpellCheckInProgress(Z)V
+Landroid/text/style/SuggestionRangeSpan;-><init>()V
+Landroid/text/style/SuggestionRangeSpan;-><init>(Landroid/os/Parcel;)V
+Landroid/text/style/SuggestionRangeSpan;->setBackgroundColor(I)V
+Landroid/text/style/SuggestionSpan;->getNotificationTargetClassName()Ljava/lang/String;
+Landroid/text/style/SuggestionSpan;->getUnderlineColor()I
+Landroid/text/style/SuggestionSpan;->mEasyCorrectUnderlineColor:I
+Landroid/text/style/SuggestionSpan;->mEasyCorrectUnderlineThickness:F
+Landroid/text/style/SuggestionSpan;->notifySelection(Landroid/content/Context;Ljava/lang/String;I)V
+Landroid/text/TextPaint;->setUnderlineText(IF)V
+Landroid/text/TextPaint;->underlineColor:I
+Landroid/text/TextPaint;->underlineThickness:F
+Landroid/text/TextUtils$TruncateAt;->END_SMALL:Landroid/text/TextUtils$TruncateAt;
+Landroid/text/TextUtils;->packRangeInLong(II)J
+Landroid/text/TextUtils;->unpackRangeEndFromLong(J)I
+Landroid/text/TextUtils;->unpackRangeStartFromLong(J)I
+Landroid/text/util/Linkify;->gatherTelLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Landroid/content/Context;)V
+Landroid/transition/ChangeBounds;->BOTTOM_RIGHT_ONLY_PROPERTY:Landroid/util/Property;
+Landroid/transition/ChangeBounds;->POSITION_PROPERTY:Landroid/util/Property;
+Landroid/transition/Scene;->mEnterAction:Ljava/lang/Runnable;
+Landroid/transition/Scene;->mExitAction:Ljava/lang/Runnable;
+Landroid/transition/Scene;->setCurrentScene(Landroid/view/View;Landroid/transition/Scene;)V
+Landroid/transition/Transition;->cancel()V
+Landroid/transition/Transition;->end()V
+Landroid/transition/TransitionManager;->getRunningTransitions()Landroid/util/ArrayMap;
+Landroid/transition/TransitionManager;->sPendingTransitions:Ljava/util/ArrayList;
+Landroid/transition/TransitionManager;->sRunningTransitions:Ljava/lang/ThreadLocal;
+Landroid/util/ArrayMap;->allocArrays(I)V
+Landroid/util/ArrayMap;->append(Ljava/lang/Object;Ljava/lang/Object;)V
+Landroid/util/ArrayMap;->CACHE_SIZE:I
+Landroid/util/ArrayMap;->EMPTY:Landroid/util/ArrayMap;
+Landroid/util/ArrayMap;->EMPTY_IMMUTABLE_INTS:[I
+Landroid/util/ArrayMap;->freeArrays([I[Ljava/lang/Object;I)V
+Landroid/util/ArrayMap;->indexOf(Ljava/lang/Object;I)I
+Landroid/util/ArrayMap;->indexOfNull()I
+Landroid/util/ArrayMap;->indexOfValue(Ljava/lang/Object;)I
+Landroid/util/ArrayMap;->mArray:[Ljava/lang/Object;
+Landroid/util/ArrayMap;->mBaseCache:[Ljava/lang/Object;
+Landroid/util/ArrayMap;->mBaseCacheSize:I
+Landroid/util/ArrayMap;->mHashes:[I
+Landroid/util/ArrayMap;->mSize:I
+Landroid/util/ArrayMap;->mTwiceBaseCache:[Ljava/lang/Object;
+Landroid/util/ArrayMap;->mTwiceBaseCacheSize:I
+Landroid/util/ArraySet;-><init>(Ljava/util/Collection;)V
+Landroid/util/ArraySet;->allocArrays(I)V
+Landroid/util/ArraySet;->freeArrays([I[Ljava/lang/Object;I)V
+Landroid/util/ArraySet;->indexOf(Ljava/lang/Object;I)I
+Landroid/util/ArraySet;->indexOfNull()I
+Landroid/util/ArraySet;->mArray:[Ljava/lang/Object;
+Landroid/util/ArraySet;->mHashes:[I
+Landroid/util/ArraySet;->mSize:I
+Landroid/util/Base64;-><init>()V
+Landroid/util/Base64OutputStream;-><init>(Ljava/io/OutputStream;IZ)V
+Landroid/util/DebugUtils;->buildShortClassTag(Ljava/lang/Object;Ljava/lang/StringBuilder;)V
+Landroid/util/DisplayMetrics;->DENSITY_DEVICE:I
+Landroid/util/DisplayMetrics;->noncompatDensityDpi:I
+Landroid/util/DisplayMetrics;->noncompatHeightPixels:I
+Landroid/util/DisplayMetrics;->noncompatWidthPixels:I
+Landroid/util/EventLog$Event;-><init>([B)V
+Landroid/util/IconDrawableFactory;->getBadgedIcon(Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
+Landroid/util/LocalLog;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
+Landroid/util/Log;->println_native(IILjava/lang/String;Ljava/lang/String;)I
+Landroid/util/Log;->wtf(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ZZ)I
+Landroid/util/LogWriter;-><init>(ILjava/lang/String;)V
+Landroid/util/LongSparseLongArray;->mKeys:[J
+Landroid/util/LongSparseLongArray;->mSize:I
+Landroid/util/LongSparseLongArray;->mValues:[J
+Landroid/util/LruCache;->map:Ljava/util/LinkedHashMap;
+Landroid/util/MathUtils;->abs(F)F
+Landroid/util/MathUtils;->constrain(FFF)F
+Landroid/util/MathUtils;->constrain(III)I
+Landroid/util/MathUtils;->lerp(FFF)F
+Landroid/util/MathUtils;->max(II)F
+Landroid/util/NtpTrustedTime;->forceRefresh()Z
+Landroid/util/NtpTrustedTime;->getCachedNtpTime()J
+Landroid/util/NtpTrustedTime;->getCachedNtpTimeReference()J
+Landroid/util/NtpTrustedTime;->getInstance(Landroid/content/Context;)Landroid/util/NtpTrustedTime;
+Landroid/util/NtpTrustedTime;->hasCache()Z
+Landroid/util/PathParser;->createPathFromPathData(Ljava/lang/String;)Landroid/graphics/Path;
+Landroid/util/Pools$Pool;->acquire()Ljava/lang/Object;
+Landroid/util/Pools$Pool;->release(Ljava/lang/Object;)Z
+Landroid/util/Pools$SimplePool;-><init>(I)V
+Landroid/util/Pools$SimplePool;->acquire()Ljava/lang/Object;
+Landroid/util/Pools$SimplePool;->mPool:[Ljava/lang/Object;
+Landroid/util/Pools$SimplePool;->release(Ljava/lang/Object;)Z
+Landroid/util/Pools$SynchronizedPool;-><init>(I)V
+Landroid/util/Pools$SynchronizedPool;->acquire()Ljava/lang/Object;
+Landroid/util/Pools$SynchronizedPool;->release(Ljava/lang/Object;)Z
+Landroid/util/Rational;->mDenominator:I
+Landroid/util/Rational;->mNumerator:I
+Landroid/util/Singleton;-><init>()V
+Landroid/util/Singleton;->get()Ljava/lang/Object;
+Landroid/util/Singleton;->mInstance:Ljava/lang/Object;
+Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->v(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/util/Slog;->wtf(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/util/Slog;->wtfStack(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/SparseArray;->mKeys:[I
+Landroid/util/SparseArray;->mSize:I
+Landroid/util/SparseArray;->mValues:[Ljava/lang/Object;
+Landroid/util/SparseBooleanArray;->mKeys:[I
+Landroid/util/SparseBooleanArray;->mSize:I
+Landroid/util/SparseBooleanArray;->mValues:[Z
+Landroid/util/SparseIntArray;->mKeys:[I
+Landroid/util/SparseIntArray;->mSize:I
+Landroid/util/SparseIntArray;->mValues:[I
+Landroid/util/TimeUtils;->formatDuration(JLjava/io/PrintWriter;)V
+Landroid/util/TimeUtils;->formatDuration(JLjava/io/PrintWriter;I)V
+Landroid/util/TimeUtils;->logTimeOfDay(J)Ljava/lang/String;
+Landroid/util/TrustedTime;->currentTimeMillis()J
+Landroid/util/TrustedTime;->forceRefresh()Z
+Landroid/util/TrustedTime;->getCacheAge()J
+Landroid/util/TrustedTime;->hasCache()Z
+Landroid/view/accessibility/AccessibilityEvent;->mAction:I
+Landroid/view/accessibility/AccessibilityEvent;->mEventType:I
+Landroid/view/accessibility/AccessibilityInteractionClient;->clearCache()V
+Landroid/view/accessibility/AccessibilityInteractionClient;->getInstance()Landroid/view/accessibility/AccessibilityInteractionClient;
+Landroid/view/accessibility/AccessibilityInteractionClient;->setSameThreadMessage(Landroid/os/Message;)V
+Landroid/view/accessibility/AccessibilityManager;->DALTONIZER_SIMULATE_MONOCHROMACY:I
+Landroid/view/accessibility/AccessibilityManager;->getInstance(Landroid/content/Context;)Landroid/view/accessibility/AccessibilityManager;
+Landroid/view/accessibility/AccessibilityManager;->isHighTextContrastEnabled()Z
+Landroid/view/accessibility/AccessibilityManager;->mAccessibilityStateChangeListeners:Landroid/util/ArrayMap;
+Landroid/view/accessibility/AccessibilityManager;->mHandler:Landroid/os/Handler;
+Landroid/view/accessibility/AccessibilityManager;->mIsEnabled:Z
+Landroid/view/accessibility/AccessibilityManager;->mIsHighTextContrastEnabled:Z
+Landroid/view/accessibility/AccessibilityManager;->mLock:Ljava/lang/Object;
+Landroid/view/accessibility/AccessibilityManager;->mService:Landroid/view/accessibility/IAccessibilityManager;
+Landroid/view/accessibility/AccessibilityManager;->mUserId:I
+Landroid/view/accessibility/AccessibilityManager;->setStateLocked(I)V
+Landroid/view/accessibility/AccessibilityManager;->sInstance:Landroid/view/accessibility/AccessibilityManager;
+Landroid/view/accessibility/AccessibilityManager;->sInstanceSync:Ljava/lang/Object;
+Landroid/view/accessibility/AccessibilityNodeInfo;->getAccessibilityViewId(J)I
+Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J
+Landroid/view/accessibility/AccessibilityNodeInfo;->getVirtualDescendantId(J)I
+Landroid/view/accessibility/AccessibilityNodeInfo;->isSealed()Z
+Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray;
+Landroid/view/accessibility/AccessibilityNodeInfo;->mSealed:Z
+Landroid/view/accessibility/AccessibilityNodeInfo;->mSourceNodeId:J
+Landroid/view/accessibility/AccessibilityNodeInfo;->refresh(Landroid/os/Bundle;Z)Z
+Landroid/view/accessibility/AccessibilityNodeInfo;->setSealed(Z)V
+Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J
+Landroid/view/accessibility/AccessibilityRecord;->mSealed:Z
+Landroid/view/accessibility/AccessibilityRecord;->mSourceNodeId:J
+Landroid/view/accessibility/CaptioningManager$CaptionStyle;->PRESETS:[Landroid/view/accessibility/CaptioningManager$CaptionStyle;
+Landroid/view/accessibility/IAccessibilityInteractionConnectionCallback;->setFindAccessibilityNodeInfoResult(Landroid/view/accessibility/AccessibilityNodeInfo;I)V
+Landroid/view/accessibility/IAccessibilityInteractionConnectionCallback;->setFindAccessibilityNodeInfosResult(Ljava/util/List;I)V
+Landroid/view/accessibility/IAccessibilityInteractionConnectionCallback;->setPerformAccessibilityActionResult(ZI)V
+Landroid/view/accessibility/IAccessibilityManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/view/accessibility/IAccessibilityManager$Stub;-><init>()V
+Landroid/view/accessibility/IAccessibilityManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/accessibility/IAccessibilityManager;
+Landroid/view/accessibility/IAccessibilityManager;->getEnabledAccessibilityServiceList(II)Ljava/util/List;
+Landroid/view/AccessibilityIterators$AbstractTextSegmentIterator;-><init>()V
+Landroid/view/AccessibilityIterators$AbstractTextSegmentIterator;->mText:Ljava/lang/String;
+Landroid/view/ActionProvider;->reset()V
+Landroid/view/ActionProvider;->setSubUiVisibilityListener(Landroid/view/ActionProvider$SubUiVisibilityListener;)V
+Landroid/view/animation/Animation;->detach()V
+Landroid/view/animation/Animation;->getInvalidateRegion(IIIILandroid/graphics/RectF;Landroid/view/animation/Transformation;)V
+Landroid/view/animation/Animation;->initializeInvalidateRegion(IIII)V
+Landroid/view/animation/Animation;->mListener:Landroid/view/animation/Animation$AnimationListener;
+Landroid/view/animation/Animation;->mPreviousRegion:Landroid/graphics/RectF;
+Landroid/view/animation/Animation;->mPreviousTransformation:Landroid/view/animation/Transformation;
+Landroid/view/animation/Animation;->mRegion:Landroid/graphics/RectF;
+Landroid/view/animation/Animation;->mTransformation:Landroid/view/animation/Transformation;
+Landroid/view/animation/AnimationUtils;->createAnimationFromXml(Landroid/content/Context;Lorg/xmlpull/v1/XmlPullParser;Landroid/view/animation/AnimationSet;Landroid/util/AttributeSet;)Landroid/view/animation/Animation;
+Landroid/view/animation/Transformation;->printShortString(Ljava/io/PrintWriter;)V
+Landroid/view/animation/TranslateAnimation;->mFromXValue:F
+Landroid/view/animation/TranslateAnimation;->mFromYValue:F
+Landroid/view/animation/TranslateAnimation;->mToXValue:F
+Landroid/view/animation/TranslateAnimation;->mToYValue:F
+Landroid/view/animation/TranslateYAnimation;-><init>(IFIF)V
+Landroid/view/autofill/IAutoFillManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/view/Choreographer$CallbackQueue;->addCallbackLocked(JLjava/lang/Object;Ljava/lang/Object;)V
+Landroid/view/Choreographer$CallbackRecord;->run(J)V
+Landroid/view/Choreographer;->doFrame(JI)V
+Landroid/view/Choreographer;->getFrameTime()J
+Landroid/view/Choreographer;->getFrameTimeNanos()J
+Landroid/view/Choreographer;->mCallbackQueues:[Landroid/view/Choreographer$CallbackQueue;
+Landroid/view/Choreographer;->mDisplayEventReceiver:Landroid/view/Choreographer$FrameDisplayEventReceiver;
+Landroid/view/Choreographer;->mFrameIntervalNanos:J
+Landroid/view/Choreographer;->mLastFrameTimeNanos:J
+Landroid/view/Choreographer;->mLock:Ljava/lang/Object;
+Landroid/view/Choreographer;->scheduleVsyncLocked()V
+Landroid/view/Choreographer;->USE_VSYNC:Z
+Landroid/view/ContextThemeWrapper;->getThemeResId()I
+Landroid/view/ContextThemeWrapper;->initializeTheme()V
+Landroid/view/ContextThemeWrapper;->mInflater:Landroid/view/LayoutInflater;
+Landroid/view/ContextThemeWrapper;->mResources:Landroid/content/res/Resources;
+Landroid/view/ContextThemeWrapper;->mTheme:Landroid/content/res/Resources$Theme;
+Landroid/view/ContextThemeWrapper;->mThemeResource:I
+Landroid/view/Display$HdrCapabilities;-><init>([IFFF)V
+Landroid/view/Display$Mode;-><init>(IIIF)V
+Landroid/view/Display;->getAddress()Ljava/lang/String;
+Landroid/view/Display;->getDisplayAdjustments()Landroid/view/DisplayAdjustments;
+Landroid/view/Display;->getDisplayInfo(Landroid/view/DisplayInfo;)Z
+Landroid/view/Display;->getMaximumSizeDimension()I
+Landroid/view/Display;->getOwnerPackageName()Ljava/lang/String;
+Landroid/view/Display;->getType()I
+Landroid/view/Display;->mDisplayInfo:Landroid/view/DisplayInfo;
+Landroid/view/Display;->TYPE_HDMI:I
+Landroid/view/Display;->TYPE_UNKNOWN:I
+Landroid/view/Display;->TYPE_VIRTUAL:I
+Landroid/view/Display;->TYPE_WIFI:I
+Landroid/view/DisplayAdjustments;-><init>()V
+Landroid/view/DisplayAdjustments;->getConfiguration()Landroid/content/res/Configuration;
+Landroid/view/DisplayAdjustments;->setCompatibilityInfo(Landroid/content/res/CompatibilityInfo;)V
+Landroid/view/DisplayEventReceiver;-><init>(Landroid/os/Looper;)V
+Landroid/view/DisplayEventReceiver;->dispatchHotplug(JIZ)V
+Landroid/view/DisplayEventReceiver;->dispatchVsync(JII)V
+Landroid/view/DisplayEventReceiver;->mReceiverPtr:J
+Landroid/view/DisplayEventReceiver;->onHotplug(JIZ)V
+Landroid/view/DisplayEventReceiver;->onVsync(JII)V
+Landroid/view/DisplayEventReceiver;->scheduleVsync()V
+Landroid/view/DisplayInfo;-><init>()V
+Landroid/view/DisplayInfo;->logicalHeight:I
+Landroid/view/DisplayInfo;->logicalWidth:I
+Landroid/view/DisplayInfo;->rotation:I
+Landroid/view/DisplayListCanvas;->callDrawGLFunction2(J)V
+Landroid/view/DisplayListCanvas;->drawCircle(Landroid/graphics/CanvasProperty;Landroid/graphics/CanvasProperty;Landroid/graphics/CanvasProperty;Landroid/graphics/CanvasProperty;)V
+Landroid/view/DisplayListCanvas;->drawGLFunctor2(JLjava/lang/Runnable;)V
+Landroid/view/DragEvent;->mClipData:Landroid/content/ClipData;
+Landroid/view/DragEvent;->mClipDescription:Landroid/content/ClipDescription;
+Landroid/view/DragEvent;->obtain(Landroid/view/DragEvent;)Landroid/view/DragEvent;
+Landroid/view/FrameMetrics;->mTimingData:[J
+Landroid/view/FrameMetricsObserver;->mFrameMetrics:Landroid/view/FrameMetrics;
+Landroid/view/FrameMetricsObserver;->mMessageQueue:Landroid/os/MessageQueue;
+Landroid/view/FrameMetricsObserver;->notifyDataAvailable(I)V
+Landroid/view/GestureDetector;->LONGPRESS_TIMEOUT:I
+Landroid/view/GestureDetector;->mAlwaysInTapRegion:Z
+Landroid/view/GestureDetector;->mListener:Landroid/view/GestureDetector$OnGestureListener;
+Landroid/view/GestureDetector;->mMinimumFlingVelocity:I
+Landroid/view/GestureDetector;->mTouchSlopSquare:I
+Landroid/view/GhostView;->addGhost(Landroid/view/View;Landroid/view/ViewGroup;)Landroid/view/GhostView;
+Landroid/view/GhostView;->addGhost(Landroid/view/View;Landroid/view/ViewGroup;Landroid/graphics/Matrix;)Landroid/view/GhostView;
+Landroid/view/GhostView;->removeGhost(Landroid/view/View;)V
+Landroid/view/IApplicationToken$Stub;-><init>()V
+Landroid/view/IDockedStackListener$Stub;-><init>()V
+Landroid/view/IGraphicsStats$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/view/IGraphicsStats$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IGraphicsStats;
+Landroid/view/InputChannel;-><init>()V
+Landroid/view/InputChannel;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/view/InputChannel;->mPtr:J
+Landroid/view/InputDevice;-><init>(IIILjava/lang/String;IILjava/lang/String;ZIILandroid/view/KeyCharacterMap;ZZZ)V
+Landroid/view/InputDevice;->addMotionRange(IIFFFFF)V
+Landroid/view/InputDevice;->isExternal()Z
+Landroid/view/InputDevice;->mIsExternal:Z
+Landroid/view/InputEvent;->getSequenceNumber()I
+Landroid/view/InputEventConsistencyVerifier;-><init>(Ljava/lang/Object;I)V
+Landroid/view/InputEventConsistencyVerifier;->isInstrumentationEnabled()Z
+Landroid/view/InputEventConsistencyVerifier;->onTouchEvent(Landroid/view/MotionEvent;I)V
+Landroid/view/InputEventConsistencyVerifier;->onUnhandledEvent(Landroid/view/InputEvent;I)V
+Landroid/view/InputEventReceiver;->dispatchBatchedInputEventPending()V
+Landroid/view/InputEventSender;->dispatchInputEventFinished(IZ)V
+Landroid/view/InputFilter;-><init>(Landroid/os/Looper;)V
+Landroid/view/InputFilter;->onInputEvent(Landroid/view/InputEvent;I)V
+Landroid/view/inputmethod/InputMethodInfo;->isDefault(Landroid/content/Context;)Z
+Landroid/view/inputmethod/InputMethodInfo;->mSubtypes:Landroid/view/inputmethod/InputMethodSubtypeArray;
+Landroid/view/inputmethod/InputMethodManager;->checkFocus()V
+Landroid/view/inputmethod/InputMethodManager;->closeCurrentInput()V
+Landroid/view/inputmethod/InputMethodManager;->finishInputLocked()V
+Landroid/view/inputmethod/InputMethodManager;->focusIn(Landroid/view/View;)V
+Landroid/view/inputmethod/InputMethodManager;->focusOut(Landroid/view/View;)V
+Landroid/view/inputmethod/InputMethodManager;->getClient()Lcom/android/internal/view/IInputMethodClient;
+Landroid/view/inputmethod/InputMethodManager;->getInputContext()Lcom/android/internal/view/IInputContext;
+Landroid/view/inputmethod/InputMethodManager;->getInputMethodWindowVisibleHeight()I
+Landroid/view/inputmethod/InputMethodManager;->getInstance()Landroid/view/inputmethod/InputMethodManager;
+Landroid/view/inputmethod/InputMethodManager;->isCursorAnchorInfoEnabled()Z
+Landroid/view/inputmethod/InputMethodManager;->mCurId:Ljava/lang/String;
+Landroid/view/inputmethod/InputMethodManager;->mCurRootView:Landroid/view/View;
+Landroid/view/inputmethod/InputMethodManager;->mCursorRect:Landroid/graphics/Rect;
+Landroid/view/inputmethod/InputMethodManager;->mH:Landroid/view/inputmethod/InputMethodManager$H;
+Landroid/view/inputmethod/InputMethodManager;->mNextServedView:Landroid/view/View;
+Landroid/view/inputmethod/InputMethodManager;->mServedInputConnectionWrapper:Landroid/view/inputmethod/InputMethodManager$ControlledInputConnectionWrapper;
+Landroid/view/inputmethod/InputMethodManager;->mServedView:Landroid/view/View;
+Landroid/view/inputmethod/InputMethodManager;->mService:Lcom/android/internal/view/IInputMethodManager;
+Landroid/view/inputmethod/InputMethodManager;->mTmpCursorRect:Landroid/graphics/Rect;
+Landroid/view/inputmethod/InputMethodManager;->notifySuggestionPicked(Landroid/text/style/SuggestionSpan;Ljava/lang/String;I)V
+Landroid/view/inputmethod/InputMethodManager;->notifyUserAction()V
+Landroid/view/inputmethod/InputMethodManager;->onPreWindowFocus(Landroid/view/View;Z)V
+Landroid/view/inputmethod/InputMethodManager;->peekInstance()Landroid/view/inputmethod/InputMethodManager;
+Landroid/view/inputmethod/InputMethodManager;->registerSuggestionSpansForNotification([Landroid/text/style/SuggestionSpan;)V
+Landroid/view/inputmethod/InputMethodManager;->setUpdateCursorAnchorInfoMode(I)V
+Landroid/view/inputmethod/InputMethodManager;->showSoftInputUnchecked(ILandroid/os/ResultReceiver;)V
+Landroid/view/inputmethod/InputMethodManager;->sInstance:Landroid/view/inputmethod/InputMethodManager;
+Landroid/view/inputmethod/InputMethodManager;->windowDismissed(Landroid/os/IBinder;)V
+Landroid/view/inputmethod/InputMethodSubtypeArray;-><init>(Ljava/util/List;)V
+Landroid/view/InputQueue;->finishInputEvent(JZ)V
+Landroid/view/IOnKeyguardExitResult;->onKeyguardExitResult(Z)V
+Landroid/view/IRotationWatcher$Stub;-><init>()V
+Landroid/view/IRotationWatcher;->onRotationChanged(I)V
+Landroid/view/IWindow$Stub;-><init>()V
+Landroid/view/IWindow$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindow;
+Landroid/view/IWindow;->closeSystemDialogs(Ljava/lang/String;)V
+Landroid/view/IWindow;->dispatchAppVisibility(Z)V
+Landroid/view/IWindow;->dispatchGetNewSurface()V
+Landroid/view/IWindow;->dispatchWallpaperCommand(Ljava/lang/String;IIILandroid/os/Bundle;Z)V
+Landroid/view/IWindow;->dispatchWallpaperOffsets(FFFFZ)V
+Landroid/view/IWindow;->windowFocusChanged(ZZ)V
+Landroid/view/IWindowManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/view/IWindowManager$Stub$Proxy;->getBaseDisplayDensity(I)I
+Landroid/view/IWindowManager$Stub$Proxy;->getDockedStackSide()I
+Landroid/view/IWindowManager$Stub$Proxy;->getInitialDisplayDensity(I)I
+Landroid/view/IWindowManager$Stub$Proxy;->hasNavigationBar()Z
+Landroid/view/IWindowManager$Stub$Proxy;->watchRotation(Landroid/view/IRotationWatcher;I)I
+Landroid/view/IWindowManager$Stub;-><init>()V
+Landroid/view/IWindowManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindowManager;
+Landroid/view/IWindowManager;->executeAppTransition()V
+Landroid/view/IWindowManager;->freezeRotation(I)V
+Landroid/view/IWindowManager;->getAnimationScale(I)F
+Landroid/view/IWindowManager;->getAnimationScales()[F
+Landroid/view/IWindowManager;->getBaseDisplaySize(ILandroid/graphics/Point;)V
+Landroid/view/IWindowManager;->getDockedStackSide()I
+Landroid/view/IWindowManager;->getInitialDisplayDensity(I)I
+Landroid/view/IWindowManager;->getInitialDisplaySize(ILandroid/graphics/Point;)V
+Landroid/view/IWindowManager;->getPendingAppTransition()I
+Landroid/view/IWindowManager;->hasNavigationBar()Z
+Landroid/view/IWindowManager;->inputMethodClientHasFocus(Lcom/android/internal/view/IInputMethodClient;)Z
+Landroid/view/IWindowManager;->isKeyguardLocked()Z
+Landroid/view/IWindowManager;->isKeyguardSecure()Z
+Landroid/view/IWindowManager;->isSafeModeEnabled()Z
+Landroid/view/IWindowManager;->lockNow(Landroid/os/Bundle;)V
+Landroid/view/IWindowManager;->registerDockedStackListener(Landroid/view/IDockedStackListener;)V
+Landroid/view/IWindowManager;->removeRotationWatcher(Landroid/view/IRotationWatcher;)V
+Landroid/view/IWindowManager;->setAnimationScale(IF)V
+Landroid/view/IWindowManager;->setAnimationScales([F)V
+Landroid/view/IWindowManager;->setInTouchMode(Z)V
+Landroid/view/IWindowManager;->setStrictModeVisualIndicatorPreference(Ljava/lang/String;)V
+Landroid/view/IWindowManager;->showStrictModeViolation(Z)V
+Landroid/view/IWindowManager;->thawRotation()V
+Landroid/view/IWindowSession$Stub;-><init>()V
+Landroid/view/IWindowSession$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindowSession;
+Landroid/view/IWindowSession;->finishDrawing(Landroid/view/IWindow;)V
+Landroid/view/IWindowSession;->getInTouchMode()Z
+Landroid/view/IWindowSession;->performHapticFeedback(Landroid/view/IWindow;IZ)Z
+Landroid/view/IWindowSession;->remove(Landroid/view/IWindow;)V
+Landroid/view/IWindowSession;->setInTouchMode(Z)V
+Landroid/view/IWindowSession;->setTransparentRegion(Landroid/view/IWindow;Landroid/graphics/Region;)V
+Landroid/view/IWindowSession;->wallpaperCommandComplete(Landroid/os/IBinder;Landroid/os/Bundle;)V
+Landroid/view/IWindowSession;->wallpaperOffsetsComplete(Landroid/os/IBinder;)V
+Landroid/view/KeyCharacterMap$FallbackAction;->keyCode:I
+Landroid/view/KeyCharacterMap$FallbackAction;->metaState:I
+Landroid/view/KeyCharacterMap;-><init>(J)V
+Landroid/view/KeyEvent;->isConfirmKey(I)Z
+Landroid/view/KeyEvent;->isDown()Z
+Landroid/view/KeyEvent;->mAction:I
+Landroid/view/KeyEvent;->mCharacters:Ljava/lang/String;
+Landroid/view/KeyEvent;->mDeviceId:I
+Landroid/view/KeyEvent;->mDownTime:J
+Landroid/view/KeyEvent;->META_ALL_MASK:I
+Landroid/view/KeyEvent;->META_ALT_LOCKED:I
+Landroid/view/KeyEvent;->META_CAP_LOCKED:I
+Landroid/view/KeyEvent;->META_INVALID_MODIFIER_MASK:I
+Landroid/view/KeyEvent;->META_LOCK_MASK:I
+Landroid/view/KeyEvent;->META_MODIFIER_MASK:I
+Landroid/view/KeyEvent;->META_SELECTING:I
+Landroid/view/KeyEvent;->META_SYMBOLIC_NAMES:[Ljava/lang/String;
+Landroid/view/KeyEvent;->META_SYM_LOCKED:I
+Landroid/view/KeyEvent;->META_SYNTHETIC_MASK:I
+Landroid/view/KeyEvent;->mEventTime:J
+Landroid/view/KeyEvent;->mFlags:I
+Landroid/view/KeyEvent;->mKeyCode:I
+Landroid/view/KeyEvent;->mMetaState:I
+Landroid/view/KeyEvent;->mRepeatCount:I
+Landroid/view/KeyEvent;->mScanCode:I
+Landroid/view/KeyEvent;->mSource:I
+Landroid/view/KeyEvent;->obtain(JJIIIIIIIILjava/lang/String;)Landroid/view/KeyEvent;
+Landroid/view/KeyEvent;->recycle()V
+Landroid/view/LayoutInflater;->ATTRS_THEME:[I
+Landroid/view/LayoutInflater;->createViewFromTag(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
+Landroid/view/LayoutInflater;->createViewFromTag(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;Z)Landroid/view/View;
+Landroid/view/LayoutInflater;->mConstructorArgs:[Ljava/lang/Object;
+Landroid/view/LayoutInflater;->mConstructorSignature:[Ljava/lang/Class;
+Landroid/view/LayoutInflater;->mContext:Landroid/content/Context;
+Landroid/view/LayoutInflater;->mFactory2:Landroid/view/LayoutInflater$Factory2;
+Landroid/view/LayoutInflater;->mFactory:Landroid/view/LayoutInflater$Factory;
+Landroid/view/LayoutInflater;->mFactorySet:Z
+Landroid/view/LayoutInflater;->mPrivateFactory:Landroid/view/LayoutInflater$Factory2;
+Landroid/view/LayoutInflater;->parseInclude(Lorg/xmlpull/v1/XmlPullParser;Landroid/content/Context;Landroid/view/View;Landroid/util/AttributeSet;)V
+Landroid/view/LayoutInflater;->sConstructorMap:Ljava/util/HashMap;
+Landroid/view/LayoutInflater;->setPrivateFactory(Landroid/view/LayoutInflater$Factory2;)V
+Landroid/view/MotionEvent$PointerCoords;->createArray(I)[Landroid/view/MotionEvent$PointerCoords;
+Landroid/view/MotionEvent$PointerCoords;->mPackedAxisBits:J
+Landroid/view/MotionEvent$PointerCoords;->mPackedAxisValues:[F
+Landroid/view/MotionEvent$PointerProperties;->createArray(I)[Landroid/view/MotionEvent$PointerProperties;
+Landroid/view/MotionEvent;->addBatch(Landroid/view/MotionEvent;)Z
+Landroid/view/MotionEvent;->copy()Landroid/view/MotionEvent;
+Landroid/view/MotionEvent;->getEventTimeNano()J
+Landroid/view/MotionEvent;->getPointerIdBits()I
+Landroid/view/MotionEvent;->HISTORY_CURRENT:I
+Landroid/view/MotionEvent;->mNativePtr:J
+Landroid/view/MotionEvent;->nativeGetRawAxisValue(JIII)F
+Landroid/view/MotionEvent;->obtain()Landroid/view/MotionEvent;
+Landroid/view/MotionEvent;->scale(F)V
+Landroid/view/MotionEvent;->setDownTime(J)V
+Landroid/view/MotionEvent;->split(I)Landroid/view/MotionEvent;
+Landroid/view/NotificationHeaderView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/view/PointerIcon;->load(Landroid/content/Context;)Landroid/view/PointerIcon;
+Landroid/view/PointerIcon;->mBitmap:Landroid/graphics/Bitmap;
+Landroid/view/PointerIcon;->mBitmapFrames:[Landroid/graphics/Bitmap;
+Landroid/view/PointerIcon;->mDurationPerFrame:I
+Landroid/view/PointerIcon;->mHotSpotX:F
+Landroid/view/PointerIcon;->mHotSpotY:F
+Landroid/view/PointerIcon;->mType:I
+Landroid/view/RenderNode;->discardDisplayList()V
+Landroid/view/RenderNode;->offsetLeftAndRight(I)Z
+Landroid/view/RenderNode;->output()V
+Landroid/view/RenderNode;->setHasOverlappingRendering(Z)Z
+Landroid/view/RenderNode;->setProjectBackwards(Z)Z
+Landroid/view/RenderNodeAnimator;-><init>(IF)V
+Landroid/view/RenderNodeAnimator;-><init>(Landroid/graphics/CanvasProperty;F)V
+Landroid/view/RenderNodeAnimator;-><init>(Landroid/graphics/CanvasProperty;IF)V
+Landroid/view/RenderNodeAnimator;->callOnFinished(Landroid/view/RenderNodeAnimator;)V
+Landroid/view/RenderNodeAnimator;->mapViewPropertyToRenderProperty(I)I
+Landroid/view/RenderNodeAnimator;->setStartValue(F)V
+Landroid/view/RenderNodeAnimator;->setTarget(Landroid/view/View;)V
+Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
+Landroid/view/ScaleGestureDetector;->mMinSpan:I
+Landroid/view/ScaleGestureDetector;->mSpanSlop:I
+Landroid/view/Surface;-><init>()V
+Landroid/view/Surface;-><init>(J)V
+Landroid/view/Surface;->copyFrom(Landroid/view/SurfaceControl;)V
+Landroid/view/Surface;->destroy()V
+Landroid/view/Surface;->mLock:Ljava/lang/Object;
+Landroid/view/Surface;->mLockedObject:J
+Landroid/view/Surface;->mName:Ljava/lang/String;
+Landroid/view/Surface;->mNativeObject:J
+Landroid/view/Surface;->nativeRelease(J)V
+Landroid/view/Surface;->transferFrom(Landroid/view/Surface;)V
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;-><init>()V
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->appVsyncOffsetNanos:J
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->density:F
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->height:I
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->presentationDeadlineNanos:J
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->refreshRate:F
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->secure:Z
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->width:I
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->xDpi:F
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->yDpi:F
+Landroid/view/SurfaceControl;->closeTransaction()V
+Landroid/view/SurfaceControl;->createDisplay(Ljava/lang/String;Z)Landroid/os/IBinder;
+Landroid/view/SurfaceControl;->destroyDisplay(Landroid/os/IBinder;)V
+Landroid/view/SurfaceControl;->getBuiltInDisplay(I)Landroid/os/IBinder;
+Landroid/view/SurfaceControl;->getDisplayConfigs(Landroid/os/IBinder;)[Landroid/view/SurfaceControl$PhysicalDisplayInfo;
+Landroid/view/SurfaceControl;->HIDDEN:I
+Landroid/view/SurfaceControl;->hide()V
+Landroid/view/SurfaceControl;->openTransaction()V
+Landroid/view/SurfaceControl;->screenshot(Landroid/graphics/Rect;IIIIZI)Landroid/graphics/Bitmap;
+Landroid/view/SurfaceControl;->screenshot(Landroid/os/IBinder;Landroid/view/Surface;Landroid/graphics/Rect;IIIIZZ)V
+Landroid/view/SurfaceControl;->setDisplayLayerStack(Landroid/os/IBinder;I)V
+Landroid/view/SurfaceControl;->setDisplayProjection(Landroid/os/IBinder;ILandroid/graphics/Rect;Landroid/graphics/Rect;)V
+Landroid/view/SurfaceControl;->setDisplaySurface(Landroid/os/IBinder;Landroid/view/Surface;)V
+Landroid/view/SurfaceControl;->setLayer(I)V
+Landroid/view/SurfaceControl;->setPosition(FF)V
+Landroid/view/SurfaceControl;->show()V
+Landroid/view/SurfaceSession;-><init>()V
+Landroid/view/SurfaceSession;->kill()V
+Landroid/view/SurfaceSession;->mNativeClient:J
+Landroid/view/SurfaceView;->isFixedSize()Z
+Landroid/view/SurfaceView;->mCallbacks:Ljava/util/ArrayList;
+Landroid/view/SurfaceView;->mDrawingStopped:Z
+Landroid/view/SurfaceView;->mDrawListener:Landroid/view/ViewTreeObserver$OnPreDrawListener;
+Landroid/view/SurfaceView;->mFormat:I
+Landroid/view/SurfaceView;->mHaveFrame:Z
+Landroid/view/SurfaceView;->mIsCreating:Z
+Landroid/view/SurfaceView;->mLastLockTime:J
+Landroid/view/SurfaceView;->mRequestedFormat:I
+Landroid/view/SurfaceView;->mRequestedHeight:I
+Landroid/view/SurfaceView;->mRequestedWidth:I
+Landroid/view/SurfaceView;->mSurface:Landroid/view/Surface;
+Landroid/view/SurfaceView;->mSurfaceFrame:Landroid/graphics/Rect;
+Landroid/view/SurfaceView;->mSurfaceHolder:Landroid/view/SurfaceHolder;
+Landroid/view/SurfaceView;->mSurfaceLock:Ljava/util/concurrent/locks/ReentrantLock;
+Landroid/view/SurfaceView;->setFrame(IIII)Z
+Landroid/view/SurfaceView;->surfacePositionLost_uiRtSync(J)V
+Landroid/view/SurfaceView;->updateSurfacePosition_renderWorker(JIIII)V
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V
+Landroid/view/textservice/SpellCheckerSession;->mSpellCheckerSessionListener:Landroid/view/textservice/SpellCheckerSession$SpellCheckerSessionListener;
+Landroid/view/textservice/TextServicesManager;->getCurrentSpellChecker()Landroid/view/textservice/SpellCheckerInfo;
+Landroid/view/textservice/TextServicesManager;->getCurrentSpellCheckerSubtype(Z)Landroid/view/textservice/SpellCheckerSubtype;
+Landroid/view/textservice/TextServicesManager;->getEnabledSpellCheckers()[Landroid/view/textservice/SpellCheckerInfo;
+Landroid/view/textservice/TextServicesManager;->getInstance()Landroid/view/textservice/TextServicesManager;
+Landroid/view/textservice/TextServicesManager;->isSpellCheckerEnabled()Z
+Landroid/view/TextureView;->destroyHardwareLayer()V
+Landroid/view/TextureView;->destroyHardwareResources()V
+Landroid/view/TextureView;->mNativeWindow:J
+Landroid/view/TextureView;->mOpaque:Z
+Landroid/view/TextureView;->mSurface:Landroid/graphics/SurfaceTexture;
+Landroid/view/TextureView;->mUpdateListener:Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;
+Landroid/view/TextureView;->mUpdateSurface:Z
+Landroid/view/TextureView;->nCreateNativeWindow(Landroid/graphics/SurfaceTexture;)V
+Landroid/view/TextureView;->nDestroyNativeWindow()V
+Landroid/view/TextureView;->onDetachedFromWindowInternal()V
+Landroid/view/ThreadedRenderer;->addRenderNode(Landroid/view/RenderNode;Z)V
+Landroid/view/ThreadedRenderer;->drawRenderNode(Landroid/view/RenderNode;)V
+Landroid/view/ThreadedRenderer;->removeRenderNode(Landroid/view/RenderNode;)V
+Landroid/view/ThreadedRenderer;->setContentDrawBounds(IIII)V
+Landroid/view/ThreadedRenderer;->setupDiskCache(Ljava/io/File;)V
+Landroid/view/TouchDelegate;->mDelegateTargeted:Z
+Landroid/view/VelocityTracker$Estimator;->confidence:F
+Landroid/view/VelocityTracker$Estimator;->degree:I
+Landroid/view/VelocityTracker$Estimator;->xCoeff:[F
+Landroid/view/VelocityTracker$Estimator;->yCoeff:[F
+Landroid/view/VelocityTracker;->obtain(Ljava/lang/String;)Landroid/view/VelocityTracker;
+Landroid/view/View$AccessibilityDelegate;->createAccessibilityNodeInfo(Landroid/view/View;)Landroid/view/accessibility/AccessibilityNodeInfo;
+Landroid/view/View$AttachInfo$InvalidateInfo;-><init>()V
+Landroid/view/View$AttachInfo$InvalidateInfo;->bottom:I
+Landroid/view/View$AttachInfo$InvalidateInfo;->left:I
+Landroid/view/View$AttachInfo$InvalidateInfo;->right:I
+Landroid/view/View$AttachInfo$InvalidateInfo;->target:Landroid/view/View;
+Landroid/view/View$AttachInfo$InvalidateInfo;->top:I
+Landroid/view/View$AttachInfo;->mApplicationScale:F
+Landroid/view/View$AttachInfo;->mContentInsets:Landroid/graphics/Rect;
+Landroid/view/View$AttachInfo;->mDisplayState:I
+Landroid/view/View$AttachInfo;->mDrawingTime:J
+Landroid/view/View$AttachInfo;->mGivenInternalInsets:Landroid/view/ViewTreeObserver$InternalInsetsInfo;
+Landroid/view/View$AttachInfo;->mHandler:Landroid/os/Handler;
+Landroid/view/View$AttachInfo;->mHasWindowFocus:Z
+Landroid/view/View$AttachInfo;->mInTouchMode:Z
+Landroid/view/View$AttachInfo;->mKeepScreenOn:Z
+Landroid/view/View$AttachInfo;->mKeyDispatchState:Landroid/view/KeyEvent$DispatcherState;
+Landroid/view/View$AttachInfo;->mRecomputeGlobalAttributes:Z
+Landroid/view/View$AttachInfo;->mScalingRequired:Z
+Landroid/view/View$AttachInfo;->mScrollContainers:Ljava/util/ArrayList;
+Landroid/view/View$AttachInfo;->mSession:Landroid/view/IWindowSession;
+Landroid/view/View$AttachInfo;->mStableInsets:Landroid/graphics/Rect;
+Landroid/view/View$AttachInfo;->mTreeObserver:Landroid/view/ViewTreeObserver;
+Landroid/view/View$AttachInfo;->mViewScrollChanged:Z
+Landroid/view/View$AttachInfo;->mViewVisibilityChanged:Z
+Landroid/view/View$AttachInfo;->mVisibleInsets:Landroid/graphics/Rect;
+Landroid/view/View$AttachInfo;->mWindow:Landroid/view/IWindow;
+Landroid/view/View$DragShadowBuilder;->mView:Ljava/lang/ref/WeakReference;
+Landroid/view/View$ListenerInfo;-><init>()V
+Landroid/view/View$ListenerInfo;->mOnClickListener:Landroid/view/View$OnClickListener;
+Landroid/view/View$ListenerInfo;->mOnCreateContextMenuListener:Landroid/view/View$OnCreateContextMenuListener;
+Landroid/view/View$ListenerInfo;->mOnDragListener:Landroid/view/View$OnDragListener;
+Landroid/view/View$ListenerInfo;->mOnFocusChangeListener:Landroid/view/View$OnFocusChangeListener;
+Landroid/view/View$ListenerInfo;->mOnGenericMotionListener:Landroid/view/View$OnGenericMotionListener;
+Landroid/view/View$ListenerInfo;->mOnHoverListener:Landroid/view/View$OnHoverListener;
+Landroid/view/View$ListenerInfo;->mOnKeyListener:Landroid/view/View$OnKeyListener;
+Landroid/view/View$ListenerInfo;->mOnLongClickListener:Landroid/view/View$OnLongClickListener;
+Landroid/view/View$ListenerInfo;->mOnTouchListener:Landroid/view/View$OnTouchListener;
+Landroid/view/View$MeasureSpec;->makeSafeMeasureSpec(II)I
+Landroid/view/View$ScrollabilityCache;->host:Landroid/view/View;
+Landroid/view/View$ScrollabilityCache;->scrollBar:Landroid/widget/ScrollBarDrawable;
+Landroid/view/View$ScrollabilityCache;->state:I
+Landroid/view/View;-><init>()V
+Landroid/view/View;->applyDrawableToTransparentRegion(Landroid/graphics/drawable/Drawable;Landroid/graphics/Region;)V
+Landroid/view/View;->assignParent(Landroid/view/ViewParent;)V
+Landroid/view/View;->clearAccessibilityFocus()V
+Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z
+Landroid/view/View;->computeOpaqueFlags()V
+Landroid/view/View;->DBG:Z
+Landroid/view/View;->debug()V
+Landroid/view/View;->debug(I)V
+Landroid/view/View;->DEBUG_LAYOUT_PROPERTY:Ljava/lang/String;
+Landroid/view/View;->destroyHardwareResources()V
+Landroid/view/View;->dispatchAttachedToWindow(Landroid/view/View$AttachInfo;I)V
+Landroid/view/View;->dispatchDetachedFromWindow()V
+Landroid/view/View;->dispatchPointerEvent(Landroid/view/MotionEvent;)Z
+Landroid/view/View;->drawBackground(Landroid/graphics/Canvas;)V
+Landroid/view/View;->ensureTransformationInfo()V
+Landroid/view/View;->findViewByAccessibilityId(I)Landroid/view/View;
+Landroid/view/View;->fitsSystemWindows()Z
+Landroid/view/View;->gatherTransparentRegion(Landroid/graphics/Region;)Z
+Landroid/view/View;->getAccessibilityDelegate()Landroid/view/View$AccessibilityDelegate;
+Landroid/view/View;->getAccessibilityViewId()I
+Landroid/view/View;->getBoundsOnScreen(Landroid/graphics/Rect;)V
+Landroid/view/View;->getBoundsOnScreen(Landroid/graphics/Rect;Z)V
+Landroid/view/View;->getHorizontalScrollFactor()F
+Landroid/view/View;->getInverseMatrix()Landroid/graphics/Matrix;
+Landroid/view/View;->getIterableTextForAccessibility()Ljava/lang/CharSequence;
+Landroid/view/View;->getIteratorForGranularity(I)Landroid/view/AccessibilityIterators$TextSegmentIterator;
+Landroid/view/View;->getListenerInfo()Landroid/view/View$ListenerInfo;
+Landroid/view/View;->getLocationInSurface([I)V
+Landroid/view/View;->getLocationOnScreen()[I
+Landroid/view/View;->getRawTextAlignment()I
+Landroid/view/View;->getRawTextDirection()I
+Landroid/view/View;->getScrollCache()Landroid/view/View$ScrollabilityCache;
+Landroid/view/View;->getThreadedRenderer()Landroid/view/ThreadedRenderer;
+Landroid/view/View;->getTransitionAlpha()F
+Landroid/view/View;->getVerticalScrollFactor()F
+Landroid/view/View;->getViewRootImpl()Landroid/view/ViewRootImpl;
+Landroid/view/View;->getWindowDisplayFrame(Landroid/graphics/Rect;)V
+Landroid/view/View;->getWindowSession()Landroid/view/IWindowSession;
+Landroid/view/View;->hasIdentityMatrix()Z
+Landroid/view/View;->hasRtlSupport()Z
+Landroid/view/View;->includeForAccessibility()Z
+Landroid/view/View;->initializeScrollbarsInternal(Landroid/content/res/TypedArray;)V
+Landroid/view/View;->internalSetPadding(IIII)V
+Landroid/view/View;->invalidate(Z)V
+Landroid/view/View;->invalidateParentCaches()V
+Landroid/view/View;->invalidateParentIfNeeded()V
+Landroid/view/View;->invalidateViewProperty(ZZ)V
+Landroid/view/View;->isDraggingScrollBar()Z
+Landroid/view/View;->isInScrollingContainer()Z
+Landroid/view/View;->isLayoutRtl()Z
+Landroid/view/View;->isOnScrollbarThumb(FF)Z
+Landroid/view/View;->isPaddingResolved()Z
+Landroid/view/View;->isRootNamespace()Z
+Landroid/view/View;->isVisibleToUser()Z
+Landroid/view/View;->isVisibleToUser(Landroid/graphics/Rect;)Z
+Landroid/view/View;->mAccessibilityDelegate:Landroid/view/View$AccessibilityDelegate;
+Landroid/view/View;->mAccessibilityViewId:I
+Landroid/view/View;->makeOptionalFitsSystemWindows()V
+Landroid/view/View;->mAnimator:Landroid/view/ViewPropertyAnimator;
+Landroid/view/View;->mAttachInfo:Landroid/view/View$AttachInfo;
+Landroid/view/View;->mBackground:Landroid/graphics/drawable/Drawable;
+Landroid/view/View;->mBackgroundResource:I
+Landroid/view/View;->mBottom:I
+Landroid/view/View;->mCachingFailed:Z
+Landroid/view/View;->mContext:Landroid/content/Context;
+Landroid/view/View;->mDrawingCache:Landroid/graphics/Bitmap;
+Landroid/view/View;->mHasPerformedLongPress:Z
+Landroid/view/View;->mKeyedTags:Landroid/util/SparseArray;
+Landroid/view/View;->mLayoutParams:Landroid/view/ViewGroup$LayoutParams;
+Landroid/view/View;->mLeft:I
+Landroid/view/View;->mListenerInfo:Landroid/view/View$ListenerInfo;
+Landroid/view/View;->mMeasuredHeight:I
+Landroid/view/View;->mMeasuredWidth:I
+Landroid/view/View;->mMinHeight:I
+Landroid/view/View;->mMinWidth:I
+Landroid/view/View;->mPaddingBottom:I
+Landroid/view/View;->mPaddingLeft:I
+Landroid/view/View;->mPaddingRight:I
+Landroid/view/View;->mPaddingTop:I
+Landroid/view/View;->mParent:Landroid/view/ViewParent;
+Landroid/view/View;->mPendingCheckForTap:Landroid/view/View$CheckForTap;
+Landroid/view/View;->mPrivateFlags2:I
+Landroid/view/View;->mPrivateFlags3:I
+Landroid/view/View;->mPrivateFlags:I
+Landroid/view/View;->mRecreateDisplayList:Z
+Landroid/view/View;->mRenderNode:Landroid/view/RenderNode;
+Landroid/view/View;->mResources:Landroid/content/res/Resources;
+Landroid/view/View;->mRight:I
+Landroid/view/View;->mScrollCache:Landroid/view/View$ScrollabilityCache;
+Landroid/view/View;->mScrollX:I
+Landroid/view/View;->mScrollY:I
+Landroid/view/View;->mStartActivityRequestWho:Ljava/lang/String;
+Landroid/view/View;->mTag:Ljava/lang/Object;
+Landroid/view/View;->mTop:I
+Landroid/view/View;->mTransformationInfo:Landroid/view/View$TransformationInfo;
+Landroid/view/View;->mUnscaledDrawingCache:Landroid/graphics/Bitmap;
+Landroid/view/View;->mVerticalScrollbarPosition:I
+Landroid/view/View;->mViewFlags:I
+Landroid/view/View;->NAVIGATION_BAR_TRANSIENT:I
+Landroid/view/View;->notifySubtreeAccessibilityStateChangedIfNeeded()V
+Landroid/view/View;->notifyViewAccessibilityStateChangedIfNeeded(I)V
+Landroid/view/View;->onCloseSystemDialogs(Ljava/lang/String;)V
+Landroid/view/View;->onDetachedFromWindowInternal()V
+Landroid/view/View;->onDrawHorizontalScrollBar(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIII)V
+Landroid/view/View;->onDrawVerticalScrollBar(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIII)V
+Landroid/view/View;->onFocusLost()V
+Landroid/view/View;->onInitializeAccessibilityEventInternal(Landroid/view/accessibility/AccessibilityEvent;)V
+Landroid/view/View;->performAccessibilityActionInternal(ILandroid/os/Bundle;)Z
+Landroid/view/View;->pointInView(FFF)Z
+Landroid/view/View;->recomputePadding()V
+Landroid/view/View;->removePerformClickCallback()V
+Landroid/view/View;->requestAccessibilityFocus()Z
+Landroid/view/View;->resetDisplayList()V
+Landroid/view/View;->resetPaddingToInitialValues()V
+Landroid/view/View;->resetResolvedDrawables()V
+Landroid/view/View;->resetResolvedLayoutDirection()V
+Landroid/view/View;->resetResolvedPadding()V
+Landroid/view/View;->resetResolvedTextAlignment()V
+Landroid/view/View;->resetResolvedTextDirection()V
+Landroid/view/View;->resetRtlProperties()V
+Landroid/view/View;->resolvePadding()V
+Landroid/view/View;->setAlphaNoInvalidation(F)Z
+Landroid/view/View;->setAnimationMatrix(Landroid/graphics/Matrix;)V
+Landroid/view/View;->setAssistBlocked(Z)V
+Landroid/view/View;->setDisabledSystemUiVisibility(I)V
+Landroid/view/View;->setFlags(II)V
+Landroid/view/View;->setFrame(IIII)Z
+Landroid/view/View;->setIsRootNamespace(Z)V
+Landroid/view/View;->setLeftTopRightBottom(IIII)V
+Landroid/view/View;->setTagInternal(ILjava/lang/Object;)V
+Landroid/view/View;->setTransitionAlpha(F)V
+Landroid/view/View;->startActivityForResult(Landroid/content/Intent;I)V
+Landroid/view/View;->STATUS_BAR_DISABLE_BACK:I
+Landroid/view/View;->STATUS_BAR_DISABLE_EXPAND:I
+Landroid/view/View;->STATUS_BAR_DISABLE_HOME:I
+Landroid/view/View;->STATUS_BAR_DISABLE_RECENT:I
+Landroid/view/View;->toGlobalMotionEvent(Landroid/view/MotionEvent;)Z
+Landroid/view/View;->toLocalMotionEvent(Landroid/view/MotionEvent;)Z
+Landroid/view/View;->transformMatrixToGlobal(Landroid/graphics/Matrix;)V
+Landroid/view/View;->transformMatrixToLocal(Landroid/graphics/Matrix;)V
+Landroid/view/View;->updateDisplayListIfDirty()Landroid/view/RenderNode;
+Landroid/view/ViewConfiguration;->getDeviceGlobalActionKeyTimeout()J
+Landroid/view/ViewConfiguration;->getDoubleTapMinTime()I
+Landroid/view/ViewConfiguration;->getDoubleTapSlop()I
+Landroid/view/ViewConfiguration;->getHoverTapSlop()I
+Landroid/view/ViewConfiguration;->getScaledDoubleTapTouchSlop()I
+Landroid/view/ViewConfiguration;->isFadingMarqueeEnabled()Z
+Landroid/view/ViewConfiguration;->mFadingMarqueeEnabled:Z
+Landroid/view/ViewConfiguration;->sConfigurations:Landroid/util/SparseArray;
+Landroid/view/ViewConfiguration;->SCROLL_FRICTION:F
+Landroid/view/ViewConfiguration;->sHasPermanentMenuKey:Z
+Landroid/view/ViewConfiguration;->sHasPermanentMenuKeySet:Z
+Landroid/view/ViewDebug;->dispatchCommand(Landroid/view/View;Ljava/lang/String;Ljava/lang/String;Ljava/io/OutputStream;)V
+Landroid/view/ViewDebug;->dump(Landroid/view/View;ZZLjava/io/OutputStream;)V
+Landroid/view/ViewDebug;->getViewInstanceCount()J
+Landroid/view/ViewDebug;->getViewRootImplCount()J
+Landroid/view/ViewGroup$LayoutParams;-><init>()V
+Landroid/view/ViewGroup$MarginLayoutParams;->endMargin:I
+Landroid/view/ViewGroup$MarginLayoutParams;->setMarginsRelative(IIII)V
+Landroid/view/ViewGroup$MarginLayoutParams;->startMargin:I
+Landroid/view/ViewGroup$TouchTarget;->child:Landroid/view/View;
+Landroid/view/ViewGroup;->addTransientView(Landroid/view/View;I)V
+Landroid/view/ViewGroup;->cancelTouchTarget(Landroid/view/View;)V
+Landroid/view/ViewGroup;->DBG:Z
+Landroid/view/ViewGroup;->dispatchAttachedToWindow(Landroid/view/View$AttachInfo;I)V
+Landroid/view/ViewGroup;->dispatchDetachedFromWindow()V
+Landroid/view/ViewGroup;->dispatchGetDisplayList()V
+Landroid/view/ViewGroup;->dispatchViewAdded(Landroid/view/View;)V
+Landroid/view/ViewGroup;->dispatchViewRemoved(Landroid/view/View;)V
+Landroid/view/ViewGroup;->encodeProperties(Landroid/view/ViewHierarchyEncoder;)V
+Landroid/view/ViewGroup;->FLAG_DISALLOW_INTERCEPT:I
+Landroid/view/ViewGroup;->FLAG_SUPPORT_STATIC_TRANSFORMATIONS:I
+Landroid/view/ViewGroup;->FLAG_USE_CHILD_DRAWING_ORDER:I
+Landroid/view/ViewGroup;->getTransientView(I)Landroid/view/View;
+Landroid/view/ViewGroup;->getTransientViewCount()I
+Landroid/view/ViewGroup;->isTransformedTouchPointInView(FFLandroid/view/View;Landroid/graphics/PointF;)Z
+Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V
+Landroid/view/ViewGroup;->mChildren:[Landroid/view/View;
+Landroid/view/ViewGroup;->mChildrenCount:I
+Landroid/view/ViewGroup;->mDisappearingChildren:Ljava/util/ArrayList;
+Landroid/view/ViewGroup;->mFirstTouchTarget:Landroid/view/ViewGroup$TouchTarget;
+Landroid/view/ViewGroup;->mFocused:Landroid/view/View;
+Landroid/view/ViewGroup;->mGroupFlags:I
+Landroid/view/ViewGroup;->mOnHierarchyChangeListener:Landroid/view/ViewGroup$OnHierarchyChangeListener;
+Landroid/view/ViewGroup;->mPersistentDrawingCache:I
+Landroid/view/ViewGroup;->offsetChildrenTopAndBottom(I)V
+Landroid/view/ViewGroup;->onChildVisibilityChanged(Landroid/view/View;II)V
+Landroid/view/ViewGroup;->onInitializeAccessibilityNodeInfoInternal(Landroid/view/accessibility/AccessibilityNodeInfo;)V
+Landroid/view/ViewGroup;->removeTransientView(Landroid/view/View;)V
+Landroid/view/ViewGroup;->resetResolvedDrawables()V
+Landroid/view/ViewGroup;->resetResolvedLayoutDirection()V
+Landroid/view/ViewGroup;->resetResolvedPadding()V
+Landroid/view/ViewGroup;->resetResolvedTextAlignment()V
+Landroid/view/ViewGroup;->resetResolvedTextDirection()V
+Landroid/view/ViewGroup;->resolvePadding()V
+Landroid/view/ViewGroup;->suppressLayout(Z)V
+Landroid/view/ViewGroup;->transformPointToViewLocal([FLandroid/view/View;)V
+Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;F)V
+Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;I)V
+Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;Z)V
+Landroid/view/ViewOverlay;->getOverlayView()Landroid/view/ViewGroup;
+Landroid/view/ViewOverlay;->isEmpty()Z
+Landroid/view/ViewPropertyAnimator;->mRTBackend:Landroid/view/ViewPropertyAnimatorRT;
+Landroid/view/ViewRootImpl$CalledFromWrongThreadException;-><init>(Ljava/lang/String;)V
+Landroid/view/ViewRootImpl;->addConfigCallback(Landroid/view/ViewRootImpl$ConfigChangedCallback;)V
+Landroid/view/ViewRootImpl;->cancelInvalidate(Landroid/view/View;)V
+Landroid/view/ViewRootImpl;->detachFunctor(J)V
+Landroid/view/ViewRootImpl;->dispatchInputEvent(Landroid/view/InputEvent;)V
+Landroid/view/ViewRootImpl;->dispatchInputEvent(Landroid/view/InputEvent;Landroid/view/InputEventReceiver;)V
+Landroid/view/ViewRootImpl;->dispatchKeyFromIme(Landroid/view/KeyEvent;)V
+Landroid/view/ViewRootImpl;->dispatchUnhandledInputEvent(Landroid/view/InputEvent;)V
+Landroid/view/ViewRootImpl;->enableHardwareAcceleration(Landroid/view/WindowManager$LayoutParams;)V
+Landroid/view/ViewRootImpl;->enqueueInputEvent(Landroid/view/InputEvent;)V
+Landroid/view/ViewRootImpl;->enqueueInputEvent(Landroid/view/InputEvent;Landroid/view/InputEventReceiver;IZ)V
+Landroid/view/ViewRootImpl;->ensureTouchMode(Z)Z
+Landroid/view/ViewRootImpl;->getAccessibilityFocusedHost()Landroid/view/View;
+Landroid/view/ViewRootImpl;->getAccessibilityFocusedVirtualView()Landroid/view/accessibility/AccessibilityNodeInfo;
+Landroid/view/ViewRootImpl;->getLastTouchPoint(Landroid/graphics/Point;)V
+Landroid/view/ViewRootImpl;->getView()Landroid/view/View;
+Landroid/view/ViewRootImpl;->getWindowFlags()I
+Landroid/view/ViewRootImpl;->invalidate()V
+Landroid/view/ViewRootImpl;->invokeFunctor(JZ)V
+Landroid/view/ViewRootImpl;->mAdded:Z
+Landroid/view/ViewRootImpl;->mAttachInfo:Landroid/view/View$AttachInfo;
+Landroid/view/ViewRootImpl;->mContext:Landroid/content/Context;
+Landroid/view/ViewRootImpl;->mDirty:Landroid/graphics/Rect;
+Landroid/view/ViewRootImpl;->mFallbackEventHandler:Landroid/view/FallbackEventHandler;
+Landroid/view/ViewRootImpl;->mHeight:I
+Landroid/view/ViewRootImpl;->mLastScrolledFocus:Ljava/lang/ref/WeakReference;
+Landroid/view/ViewRootImpl;->mStopped:Z
+Landroid/view/ViewRootImpl;->mSurface:Landroid/view/Surface;
+Landroid/view/ViewRootImpl;->mView:Landroid/view/View;
+Landroid/view/ViewRootImpl;->mWidth:I
+Landroid/view/ViewRootImpl;->mWindowSession:Landroid/view/IWindowSession;
+Landroid/view/ViewRootImpl;->scheduleTraversals()V
+Landroid/view/ViewRootImpl;->setLocalDragState(Ljava/lang/Object;)V
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;-><init>()V
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->contentInsets:Landroid/graphics/Rect;
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->mTouchableInsets:I
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->set(Landroid/view/ViewTreeObserver$InternalInsetsInfo;)V
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->setTouchableInsets(I)V
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->touchableRegion:Landroid/graphics/Region;
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->TOUCHABLE_INSETS_REGION:I
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->visibleInsets:Landroid/graphics/Rect;
+Landroid/view/ViewTreeObserver;->addOnComputeInternalInsetsListener(Landroid/view/ViewTreeObserver$OnComputeInternalInsetsListener;)V
+Landroid/view/ViewTreeObserver;->dispatchOnComputeInternalInsets(Landroid/view/ViewTreeObserver$InternalInsetsInfo;)V
+Landroid/view/ViewTreeObserver;->dispatchOnGlobalFocusChange(Landroid/view/View;Landroid/view/View;)V
+Landroid/view/ViewTreeObserver;->dispatchOnScrollChanged()V
+Landroid/view/ViewTreeObserver;->dispatchOnTouchModeChanged(Z)V
+Landroid/view/ViewTreeObserver;->hasComputeInternalInsetsListeners()Z
+Landroid/view/ViewTreeObserver;->mOnComputeInternalInsetsListeners:Landroid/view/ViewTreeObserver$CopyOnWriteArray;
+Landroid/view/ViewTreeObserver;->mOnGlobalLayoutListeners:Landroid/view/ViewTreeObserver$CopyOnWriteArray;
+Landroid/view/ViewTreeObserver;->mOnScrollChangedListeners:Landroid/view/ViewTreeObserver$CopyOnWriteArray;
+Landroid/view/ViewTreeObserver;->mOnTouchModeChangeListeners:Ljava/util/concurrent/CopyOnWriteArrayList;
+Landroid/view/ViewTreeObserver;->removeOnComputeInternalInsetsListener(Landroid/view/ViewTreeObserver$OnComputeInternalInsetsListener;)V
+Landroid/view/Window;->addPrivateFlags(I)V
+Landroid/view/Window;->alwaysReadCloseOnTouchAttr()V
+Landroid/view/Window;->isDestroyed()Z
+Landroid/view/Window;->mAppName:Ljava/lang/String;
+Landroid/view/Window;->mAppToken:Landroid/os/IBinder;
+Landroid/view/Window;->mCallback:Landroid/view/Window$Callback;
+Landroid/view/Window;->mContext:Landroid/content/Context;
+Landroid/view/Window;->mDestroyed:Z
+Landroid/view/Window;->mFeatures:I
+Landroid/view/Window;->mHardwareAccelerated:Z
+Landroid/view/Window;->mLocalFeatures:I
+Landroid/view/Window;->mWindowAttributes:Landroid/view/WindowManager$LayoutParams;
+Landroid/view/Window;->mWindowManager:Landroid/view/WindowManager;
+Landroid/view/Window;->mWindowStyle:Landroid/content/res/TypedArray;
+Landroid/view/Window;->setCloseOnTouchOutside(Z)V
+Landroid/view/Window;->setCloseOnTouchOutsideIfNotSet(Z)V
+Landroid/view/Window;->setNeedsMenuKey(I)V
+Landroid/view/Window;->shouldCloseOnTouch(Landroid/content/Context;Landroid/view/MotionEvent;)Z
+Landroid/view/WindowAnimationFrameStats;->init(J[J)V
+Landroid/view/WindowContentFrameStats;->init(J[J[J[J)V
+Landroid/view/WindowInsets;-><init>(Landroid/graphics/Rect;)V
+Landroid/view/WindowInsets;->CONSUMED:Landroid/view/WindowInsets;
+Landroid/view/WindowInsets;->getSystemWindowInsets()Landroid/graphics/Rect;
+Landroid/view/WindowLeaked;-><init>(Ljava/lang/String;)V
+Landroid/view/WindowManager$LayoutParams;->backup()V
+Landroid/view/WindowManager$LayoutParams;->FLAG_SLIPPERY:I
+Landroid/view/WindowManager$LayoutParams;->hasSystemUiListeners:Z
+Landroid/view/WindowManager$LayoutParams;->hideTimeoutMilliseconds:J
+Landroid/view/WindowManager$LayoutParams;->inputFeatures:I
+Landroid/view/WindowManager$LayoutParams;->INPUT_FEATURE_DISABLE_USER_ACTIVITY:I
+Landroid/view/WindowManager$LayoutParams;->needsMenuKey:I
+Landroid/view/WindowManager$LayoutParams;->NEEDS_MENU_SET_FALSE:I
+Landroid/view/WindowManager$LayoutParams;->NEEDS_MENU_SET_TRUE:I
+Landroid/view/WindowManager$LayoutParams;->PRIVATE_FLAG_SHOW_FOR_ALL_USERS:I
+Landroid/view/WindowManager$LayoutParams;->restore()V
+Landroid/view/WindowManager$LayoutParams;->subtreeSystemUiVisibility:I
+Landroid/view/WindowManager$LayoutParams;->TYPE_APPLICATION_MEDIA_OVERLAY:I
+Landroid/view/WindowManager$LayoutParams;->TYPE_DISPLAY_OVERLAY:I
+Landroid/view/WindowManager$LayoutParams;->TYPE_SECURE_SYSTEM_OVERLAY:I
+Landroid/view/WindowManager$LayoutParams;->userActivityTimeout:J
+Landroid/view/WindowManagerGlobal;->getInstance()Landroid/view/WindowManagerGlobal;
+Landroid/view/WindowManagerGlobal;->getRootView(Ljava/lang/String;)Landroid/view/View;
+Landroid/view/WindowManagerGlobal;->getRootViews(Landroid/os/IBinder;)Ljava/util/ArrayList;
+Landroid/view/WindowManagerGlobal;->getViewRootNames()[Ljava/lang/String;
+Landroid/view/WindowManagerGlobal;->getWindowManagerService()Landroid/view/IWindowManager;
+Landroid/view/WindowManagerGlobal;->getWindowSession()Landroid/view/IWindowSession;
+Landroid/view/WindowManagerGlobal;->initialize()V
+Landroid/view/WindowManagerGlobal;->mLock:Ljava/lang/Object;
+Landroid/view/WindowManagerGlobal;->mParams:Ljava/util/ArrayList;
+Landroid/view/WindowManagerGlobal;->mRoots:Ljava/util/ArrayList;
+Landroid/view/WindowManagerGlobal;->mViews:Ljava/util/ArrayList;
+Landroid/view/WindowManagerGlobal;->peekWindowSession()Landroid/view/IWindowSession;
+Landroid/view/WindowManagerGlobal;->removeView(Landroid/view/View;Z)V
+Landroid/view/WindowManagerGlobal;->sDefaultWindowManager:Landroid/view/WindowManagerGlobal;
+Landroid/view/WindowManagerGlobal;->sWindowManagerService:Landroid/view/IWindowManager;
+Landroid/view/WindowManagerGlobal;->sWindowSession:Landroid/view/IWindowSession;
+Landroid/view/WindowManagerGlobal;->trimMemory(I)V
+Landroid/view/WindowManagerImpl;->mGlobal:Landroid/view/WindowManagerGlobal;
+Landroid/webkit/CacheManager$CacheResult;-><init>()V
+Landroid/webkit/CacheManager$CacheResult;->contentdisposition:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->contentLength:J
+Landroid/webkit/CacheManager$CacheResult;->crossDomain:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->encoding:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->etag:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->expires:J
+Landroid/webkit/CacheManager$CacheResult;->expiresString:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getContentDisposition()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getContentLength()J
+Landroid/webkit/CacheManager$CacheResult;->getEncoding()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getETag()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getExpires()J
+Landroid/webkit/CacheManager$CacheResult;->getExpiresString()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getHttpStatusCode()I
+Landroid/webkit/CacheManager$CacheResult;->getInputStream()Ljava/io/InputStream;
+Landroid/webkit/CacheManager$CacheResult;->getLastModified()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getLocalPath()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getLocation()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getMimeType()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getOutputStream()Ljava/io/OutputStream;
+Landroid/webkit/CacheManager$CacheResult;->httpStatusCode:I
+Landroid/webkit/CacheManager$CacheResult;->inStream:Ljava/io/InputStream;
+Landroid/webkit/CacheManager$CacheResult;->lastModified:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->localPath:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->location:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->mimeType:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->outFile:Ljava/io/File;
+Landroid/webkit/CacheManager$CacheResult;->outStream:Ljava/io/OutputStream;
+Landroid/webkit/CacheManager$CacheResult;->setEncoding(Ljava/lang/String;)V
+Landroid/webkit/CacheManager$CacheResult;->setInputStream(Ljava/io/InputStream;)V
+Landroid/webkit/CacheManager;->cacheDisabled()Z
+Landroid/webkit/CacheManager;->endCacheTransaction()Z
+Landroid/webkit/CacheManager;->getCacheFile(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/CacheManager$CacheResult;
+Landroid/webkit/CacheManager;->getCacheFileBaseDir()Ljava/io/File;
+Landroid/webkit/CacheManager;->saveCacheFile(Ljava/lang/String;JLandroid/webkit/CacheManager$CacheResult;)V
+Landroid/webkit/CacheManager;->saveCacheFile(Ljava/lang/String;Landroid/webkit/CacheManager$CacheResult;)V
+Landroid/webkit/CacheManager;->startCacheTransaction()Z
+Landroid/webkit/ConsoleMessage;->mLevel:Landroid/webkit/ConsoleMessage$MessageLevel;
+Landroid/webkit/ConsoleMessage;->mLineNumber:I
+Landroid/webkit/ConsoleMessage;->mMessage:Ljava/lang/String;
+Landroid/webkit/ConsoleMessage;->mSourceId:Ljava/lang/String;
+Landroid/webkit/IWebViewUpdateService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/webkit/IWebViewUpdateService$Stub$Proxy;->waitForAndGetProvider()Landroid/webkit/WebViewProviderResponse;
+Landroid/webkit/IWebViewUpdateService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/webkit/IWebViewUpdateService;
+Landroid/webkit/IWebViewUpdateService;->getCurrentWebViewPackageName()Ljava/lang/String;
+Landroid/webkit/IWebViewUpdateService;->getValidWebViewPackages()[Landroid/webkit/WebViewProviderInfo;
+Landroid/webkit/IWebViewUpdateService;->isFallbackPackage(Ljava/lang/String;)Z
+Landroid/webkit/JsResult;->mReceiver:Landroid/webkit/JsResult$ResultReceiver;
+Landroid/webkit/PluginData;-><init>(Ljava/io/InputStream;JLjava/util/Map;I)V
+Landroid/webkit/PluginData;->getContentLength()J
+Landroid/webkit/PluginData;->getHeaders()Ljava/util/Map;
+Landroid/webkit/PluginData;->getInputStream()Ljava/io/InputStream;
+Landroid/webkit/PluginData;->getStatusCode()I
+Landroid/webkit/UrlInterceptHandler;->getPluginData(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/PluginData;
+Landroid/webkit/UrlInterceptHandler;->service(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/CacheManager$CacheResult;
+Landroid/webkit/UrlInterceptRegistry;->getPluginData(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/PluginData;
+Landroid/webkit/UrlInterceptRegistry;->registerHandler(Landroid/webkit/UrlInterceptHandler;)Z
+Landroid/webkit/UrlInterceptRegistry;->setUrlInterceptDisabled(Z)V
+Landroid/webkit/UrlInterceptRegistry;->unregisterHandler(Landroid/webkit/UrlInterceptHandler;)Z
+Landroid/webkit/URLUtil;->isResourceUrl(Ljava/lang/String;)Z
+Landroid/webkit/URLUtil;->parseContentDisposition(Ljava/lang/String;)Ljava/lang/String;
+Landroid/webkit/URLUtil;->verifyURLEncoding(Ljava/lang/String;)Z
+Landroid/webkit/WebResourceResponse;->mImmutable:Z
+Landroid/webkit/WebResourceResponse;->mStatusCode:I
+Landroid/webkit/WebSettings$TextSize;->value:I
+Landroid/webkit/WebSyncManager;->mHandler:Landroid/os/Handler;
+Landroid/webkit/WebSyncManager;->syncFromRamToFlash()V
+Landroid/webkit/WebView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILjava/util/Map;Z)V
+Landroid/webkit/WebView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;ILjava/util/Map;Z)V
+Landroid/webkit/WebView;->checkThread()V
+Landroid/webkit/WebView;->debugDump()V
+Landroid/webkit/WebView;->disablePlatformNotifications()V
+Landroid/webkit/WebView;->emulateShiftHeld()V
+Landroid/webkit/WebView;->enablePlatformNotifications()V
+Landroid/webkit/WebView;->freeMemoryForTests()V
+Landroid/webkit/WebView;->getContentWidth()I
+Landroid/webkit/WebView;->getFactory()Landroid/webkit/WebViewFactoryProvider;
+Landroid/webkit/WebView;->getTouchIconUrl()Ljava/lang/String;
+Landroid/webkit/WebView;->getVisibleTitleHeight()I
+Landroid/webkit/WebView;->isPaused()Z
+Landroid/webkit/WebView;->mProvider:Landroid/webkit/WebViewProvider;
+Landroid/webkit/WebView;->mWebViewThread:Landroid/os/Looper;
+Landroid/webkit/WebView;->notifyFindDialogDismissed()V
+Landroid/webkit/WebView;->onDrawVerticalScrollBar(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIII)V
+Landroid/webkit/WebView;->restorePicture(Landroid/os/Bundle;Ljava/io/File;)Z
+Landroid/webkit/WebView;->savePicture(Landroid/os/Bundle;Ljava/io/File;)Z
+Landroid/webkit/WebView;->sEnforceThreadChecking:Z
+Landroid/webkit/WebView;->setFrame(IIII)Z
+Landroid/webkit/WebViewDelegate;-><init>()V
+Landroid/webkit/WebViewFactory;->getProvider()Landroid/webkit/WebViewFactoryProvider;
+Landroid/webkit/WebViewFactory;->getProviderClass()Ljava/lang/Class;
+Landroid/webkit/WebViewFactory;->getUpdateService()Landroid/webkit/IWebViewUpdateService;
+Landroid/webkit/WebViewFactory;->getWebViewContextAndSetProvider()Landroid/content/Context;
+Landroid/webkit/WebViewFactory;->sPackageInfo:Landroid/content/pm/PackageInfo;
+Landroid/webkit/WebViewFactory;->sProviderInstance:Landroid/webkit/WebViewFactoryProvider;
+Landroid/webkit/WebViewProviderInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/webkit/WebViewProviderResponse;->packageInfo:Landroid/content/pm/PackageInfo;
+Landroid/webkit/WebViewUpdateService;-><init>()V
+Landroid/widget/AbsListView$FlingRunnable;->endFling()V
+Landroid/widget/AbsListView$FlingRunnable;->mScroller:Landroid/widget/OverScroller;
+Landroid/widget/AbsListView$FlingRunnable;->start(I)V
+Landroid/widget/AbsListView$LayoutParams;->scrappedFromPosition:I
+Landroid/widget/AbsListView$LayoutParams;->viewType:I
+Landroid/widget/AbsListView$RecycleBin;->clear()V
+Landroid/widget/AbsListView$RecycleBin;->mRecyclerListener:Landroid/widget/AbsListView$RecyclerListener;
+Landroid/widget/AbsListView$SavedState;->firstId:J
+Landroid/widget/AbsListView$SavedState;->viewTop:I
+Landroid/widget/AbsListView;->canScrollDown()Z
+Landroid/widget/AbsListView;->canScrollUp()Z
+Landroid/widget/AbsListView;->findMotionRow(I)I
+Landroid/widget/AbsListView;->invokeOnItemScrollListener()V
+Landroid/widget/AbsListView;->isVerticalScrollBarHidden()Z
+Landroid/widget/AbsListView;->mActivePointerId:I
+Landroid/widget/AbsListView;->mAdapter:Landroid/widget/ListAdapter;
+Landroid/widget/AbsListView;->mChoiceActionMode:Landroid/view/ActionMode;
+Landroid/widget/AbsListView;->mContextMenuInfo:Landroid/view/ContextMenu$ContextMenuInfo;
+Landroid/widget/AbsListView;->mDataSetObserver:Landroid/widget/AbsListView$AdapterDataSetObserver;
+Landroid/widget/AbsListView;->mEdgeGlowBottom:Landroid/widget/EdgeEffect;
+Landroid/widget/AbsListView;->mEdgeGlowTop:Landroid/widget/EdgeEffect;
+Landroid/widget/AbsListView;->mFastScroll:Landroid/widget/FastScroller;
+Landroid/widget/AbsListView;->mFlingRunnable:Landroid/widget/AbsListView$FlingRunnable;
+Landroid/widget/AbsListView;->mIsChildViewEnabled:Z
+Landroid/widget/AbsListView;->mLayoutMode:I
+Landroid/widget/AbsListView;->mMaximumVelocity:I
+Landroid/widget/AbsListView;->mMotionPosition:I
+Landroid/widget/AbsListView;->mMotionY:I
+Landroid/widget/AbsListView;->mOnScrollListener:Landroid/widget/AbsListView$OnScrollListener;
+Landroid/widget/AbsListView;->mOverflingDistance:I
+Landroid/widget/AbsListView;->mOverscrollDistance:I
+Landroid/widget/AbsListView;->mPendingCheckForLongPress:Landroid/widget/AbsListView$CheckForLongPress;
+Landroid/widget/AbsListView;->mPendingCheckForTap:Landroid/widget/AbsListView$CheckForTap;
+Landroid/widget/AbsListView;->mPopup:Landroid/widget/PopupWindow;
+Landroid/widget/AbsListView;->mPositionScroller:Landroid/widget/AbsListView$AbsPositionScroller;
+Landroid/widget/AbsListView;->mRecycler:Landroid/widget/AbsListView$RecycleBin;
+Landroid/widget/AbsListView;->mSelectionBottomPadding:I
+Landroid/widget/AbsListView;->mSelectionTopPadding:I
+Landroid/widget/AbsListView;->mSelector:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AbsListView;->mSelectorPosition:I
+Landroid/widget/AbsListView;->mSelectorRect:Landroid/graphics/Rect;
+Landroid/widget/AbsListView;->mTouchMode:I
+Landroid/widget/AbsListView;->mTouchSlop:I
+Landroid/widget/AbsListView;->mVelocityTracker:Landroid/view/VelocityTracker;
+Landroid/widget/AbsListView;->performLongPress(Landroid/view/View;IJ)Z
+Landroid/widget/AbsListView;->performLongPress(Landroid/view/View;IJFF)Z
+Landroid/widget/AbsListView;->positionSelector(ILandroid/view/View;ZFF)V
+Landroid/widget/AbsListView;->reportScrollStateChange(I)V
+Landroid/widget/AbsListView;->resurrectSelectionIfNeeded()Z
+Landroid/widget/AbsListView;->smoothScrollBy(IIZZ)V
+Landroid/widget/AbsListView;->trackMotionScroll(II)Z
+Landroid/widget/AbsListView;->updateSelectorState()V
+Landroid/widget/AbsSeekBar;->mDisabledAlpha:F
+Landroid/widget/AbsSeekBar;->mIsDragging:Z
+Landroid/widget/AbsSeekBar;->mIsUserSeekable:Z
+Landroid/widget/AbsSeekBar;->mSplitTrack:Z
+Landroid/widget/AbsSeekBar;->mThumb:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AbsSeekBar;->mTouchProgressOffset:F
+Landroid/widget/AbsSeekBar;->trackTouchEvent(Landroid/view/MotionEvent;)V
+Landroid/widget/ActionMenuPresenter;->dismissPopupMenus()Z
+Landroid/widget/ActionMenuPresenter;->isOverflowMenuShowing()Z
+Landroid/widget/ActionMenuPresenter;->onRestoreInstanceState(Landroid/os/Parcelable;)V
+Landroid/widget/ActionMenuPresenter;->onSaveInstanceState()Landroid/os/Parcelable;
+Landroid/widget/ActionMenuView$ActionMenuChildView;->needsDividerBefore()Z
+Landroid/widget/ActionMenuView$LayoutParams;->cellsUsed:I
+Landroid/widget/ActionMenuView$LayoutParams;->expandable:Z
+Landroid/widget/ActionMenuView$LayoutParams;->expanded:Z
+Landroid/widget/ActionMenuView$LayoutParams;->extraPixels:I
+Landroid/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
+Landroid/widget/ActionMenuView$LayoutParams;->preventEdgeOffset:Z
+Landroid/widget/ActionMenuView;->hasDividerBeforeChildAt(I)Z
+Landroid/widget/ActionMenuView;->isOverflowMenuShowPending()Z
+Landroid/widget/ActionMenuView;->isOverflowReserved()Z
+Landroid/widget/ActionMenuView;->peekMenu()Lcom/android/internal/view/menu/MenuBuilder;
+Landroid/widget/ActionMenuView;->setExpandedActionViewsExclusive(Z)V
+Landroid/widget/ActionMenuView;->setMenuCallbacks(Lcom/android/internal/view/menu/MenuPresenter$Callback;Lcom/android/internal/view/menu/MenuBuilder$Callback;)V
+Landroid/widget/ActivityChooserModel;->chooseActivity(I)Landroid/content/Intent;
+Landroid/widget/ActivityChooserModel;->get(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/ActivityChooserModel;
+Landroid/widget/ActivityChooserModel;->getActivity(I)Landroid/content/pm/ResolveInfo;
+Landroid/widget/ActivityChooserModel;->getActivityCount()I
+Landroid/widget/ActivityChooserModel;->setIntent(Landroid/content/Intent;)V
+Landroid/widget/ActivityChooserModel;->setOnChooseActivityListener(Landroid/widget/ActivityChooserModel$OnChooseActivityListener;)V
+Landroid/widget/ActivityChooserView;->setExpandActivityOverflowButtonDrawable(Landroid/graphics/drawable/Drawable;)V
+Landroid/widget/AdapterView;->mDataChanged:Z
+Landroid/widget/AdapterView;->mFirstPosition:I
+Landroid/widget/AdapterView;->mNeedSync:Z
+Landroid/widget/AdapterView;->mNextSelectedPosition:I
+Landroid/widget/AdapterView;->mNextSelectedRowId:J
+Landroid/widget/AdapterView;->mOldSelectedPosition:I
+Landroid/widget/AdapterView;->mOnItemClickListener:Landroid/widget/AdapterView$OnItemClickListener;
+Landroid/widget/AdapterView;->mOnItemSelectedListener:Landroid/widget/AdapterView$OnItemSelectedListener;
+Landroid/widget/AdapterView;->mSelectedPosition:I
+Landroid/widget/AdapterView;->mSyncPosition:I
+Landroid/widget/AdapterView;->selectionChanged()V
+Landroid/widget/AdapterView;->setNextSelectedPositionInt(I)V
+Landroid/widget/AdapterView;->setSelectedPositionInt(I)V
+Landroid/widget/AnalogClock;->mDial:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AnalogClock;->mHourHand:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AnalogClock;->mMinuteHand:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AppSecurityPermissions;-><init>(Landroid/content/Context;Ljava/lang/String;)V
+Landroid/widget/AppSecurityPermissions;->getPermissionCount()I
+Landroid/widget/AppSecurityPermissions;->getPermissionsView()Landroid/view/View;
+Landroid/widget/ArrayAdapter;->mLock:Ljava/lang/Object;
+Landroid/widget/ArrayAdapter;->mObjects:Ljava/util/List;
+Landroid/widget/ArrayAdapter;->mOriginalValues:Ljava/util/ArrayList;
+Landroid/widget/AutoCompleteTextView;->doAfterTextChanged()V
+Landroid/widget/AutoCompleteTextView;->doBeforeTextChanged()V
+Landroid/widget/AutoCompleteTextView;->ensureImeVisible(Z)V
+Landroid/widget/AutoCompleteTextView;->isInputMethodNotNeeded()Z
+Landroid/widget/AutoCompleteTextView;->mHintView:Landroid/widget/TextView;
+Landroid/widget/AutoCompleteTextView;->mObserver:Landroid/widget/AutoCompleteTextView$PopupDataSetObserver;
+Landroid/widget/AutoCompleteTextView;->mPassThroughClickListener:Landroid/widget/AutoCompleteTextView$PassThroughClickListener;
+Landroid/widget/AutoCompleteTextView;->mPopup:Landroid/widget/ListPopupWindow;
+Landroid/widget/AutoCompleteTextView;->setDropDownAlwaysVisible(Z)V
+Landroid/widget/AutoCompleteTextView;->setDropDownAnimationStyle(I)V
+Landroid/widget/AutoCompleteTextView;->setDropDownDismissedOnCompletion(Z)V
+Landroid/widget/AutoCompleteTextView;->setForceIgnoreOutsideTouch(Z)V
+Landroid/widget/AutoCompleteTextView;->showDropDownAfterLayout()V
+Landroid/widget/BaseAdapter;->mDataSetObservable:Landroid/database/DataSetObservable;
+Landroid/widget/CalendarView;->mDelegate:Landroid/widget/CalendarView$CalendarViewDelegate;
+Landroid/widget/CheckedTextView;->mCheckMarkDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/CheckedTextView;->mCheckMarkGravity:I
+Landroid/widget/CompoundButton;->mBroadcasting:Z
+Landroid/widget/CompoundButton;->mButtonDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/CompoundButton;->mOnCheckedChangeListener:Landroid/widget/CompoundButton$OnCheckedChangeListener;
+Landroid/widget/CursorAdapter;->mChangeObserver:Landroid/widget/CursorAdapter$ChangeObserver;
+Landroid/widget/CursorAdapter;->mContext:Landroid/content/Context;
+Landroid/widget/CursorAdapter;->mCursor:Landroid/database/Cursor;
+Landroid/widget/CursorAdapter;->mDataSetObserver:Landroid/database/DataSetObserver;
+Landroid/widget/CursorAdapter;->mDataValid:Z
+Landroid/widget/CursorAdapter;->mRowIDColumn:I
+Landroid/widget/DatePicker;->mDelegate:Landroid/widget/DatePicker$DatePickerDelegate;
+Landroid/widget/DatePicker;->setValidationCallback(Landroid/widget/DatePicker$ValidationCallback;)V
+Landroid/widget/DateTimeView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/widget/DateTimeView;->setTime(J)V
+Landroid/widget/DateTimeView;->update()V
+Landroid/widget/EdgeEffect;->mGlowScaleY:F
+Landroid/widget/EdgeEffect;->mPaint:Landroid/graphics/Paint;
+Landroid/widget/Editor$InputContentType;->privateImeOptions:Ljava/lang/String;
+Landroid/widget/Editor;->invalidateTextDisplayList()V
+Landroid/widget/Editor;->mCreatedWithASelection:Z
+Landroid/widget/Editor;->mInsertionControllerEnabled:Z
+Landroid/widget/Editor;->mSelectHandleCenter:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Editor;->mSelectHandleLeft:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Editor;->mSelectHandleRight:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Editor;->mSelectionControllerEnabled:Z
+Landroid/widget/Editor;->mShowCursor:J
+Landroid/widget/Editor;->mShowSoftInputOnFocus:Z
+Landroid/widget/ExpandableListView;->GROUP_STATE_SETS:[[I
+Landroid/widget/ExpandableListView;->mChildDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ExpandableListView;->mConnector:Landroid/widget/ExpandableListConnector;
+Landroid/widget/ExpandableListView;->mGroupIndicator:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ExpandableListView;->mIndicatorLeft:I
+Landroid/widget/ExpandableListView;->mIndicatorRight:I
+Landroid/widget/ExpandableListView;->mOnChildClickListener:Landroid/widget/ExpandableListView$OnChildClickListener;
+Landroid/widget/ExpandableListView;->mOnGroupClickListener:Landroid/widget/ExpandableListView$OnGroupClickListener;
+Landroid/widget/ExpandableListView;->mOnGroupCollapseListener:Landroid/widget/ExpandableListView$OnGroupCollapseListener;
+Landroid/widget/ExpandableListView;->mOnGroupExpandListener:Landroid/widget/ExpandableListView$OnGroupExpandListener;
+Landroid/widget/FastScroller;-><init>(Landroid/widget/AbsListView;I)V
+Landroid/widget/FastScroller;->mContainerRect:Landroid/graphics/Rect;
+Landroid/widget/FastScroller;->mHeaderCount:I
+Landroid/widget/FastScroller;->mLongList:Z
+Landroid/widget/FastScroller;->mMinimumTouchTarget:I
+Landroid/widget/FastScroller;->mThumbDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/FastScroller;->mThumbImage:Landroid/widget/ImageView;
+Landroid/widget/FastScroller;->mTrackDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/FastScroller;->mTrackImage:Landroid/widget/ImageView;
+Landroid/widget/FastScroller;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
+Landroid/widget/FastScroller;->onSizeChanged(IIII)V
+Landroid/widget/FastScroller;->onTouchEvent(Landroid/view/MotionEvent;)Z
+Landroid/widget/FastScroller;->remove()V
+Landroid/widget/FastScroller;->setState(I)V
+Landroid/widget/Filter;->setDelayer(Landroid/widget/Filter$Delayer;)V
+Landroid/widget/FrameLayout;->mForegroundPaddingBottom:I
+Landroid/widget/FrameLayout;->mForegroundPaddingLeft:I
+Landroid/widget/FrameLayout;->mForegroundPaddingRight:I
+Landroid/widget/FrameLayout;->mForegroundPaddingTop:I
+Landroid/widget/FrameLayout;->mMeasureAllChildren:Z
+Landroid/widget/Gallery$FlingRunnable;->startUsingVelocity(I)V
+Landroid/widget/Gallery;->fillToGalleryLeft()V
+Landroid/widget/Gallery;->fillToGalleryRight()V
+Landroid/widget/Gallery;->getCenterOfGallery()I
+Landroid/widget/Gallery;->getCenterOfView(Landroid/view/View;)I
+Landroid/widget/Gallery;->makeAndAddView(IIIZ)Landroid/view/View;
+Landroid/widget/Gallery;->mDownTouchPosition:I
+Landroid/widget/Gallery;->mDownTouchView:Landroid/view/View;
+Landroid/widget/Gallery;->mFlingRunnable:Landroid/widget/Gallery$FlingRunnable;
+Landroid/widget/Gallery;->mGestureDetector:Landroid/view/GestureDetector;
+Landroid/widget/Gallery;->moveDirection(I)Z
+Landroid/widget/Gallery;->mSelectedChild:Landroid/view/View;
+Landroid/widget/Gallery;->mSpacing:I
+Landroid/widget/Gallery;->trackMotionScroll(I)V
+Landroid/widget/GridLayout;->UNDEFINED_ALIGNMENT:Landroid/widget/GridLayout$Alignment;
+Landroid/widget/GridView;->fillDown(II)Landroid/view/View;
+Landroid/widget/GridView;->fillUp(II)Landroid/view/View;
+Landroid/widget/GridView;->mColumnWidth:I
+Landroid/widget/GridView;->mHorizontalSpacing:I
+Landroid/widget/GridView;->mNumColumns:I
+Landroid/widget/GridView;->mRequestedColumnWidth:I
+Landroid/widget/GridView;->mRequestedHorizontalSpacing:I
+Landroid/widget/GridView;->mRequestedNumColumns:I
+Landroid/widget/GridView;->mVerticalSpacing:I
+Landroid/widget/GridView;->sequenceScroll(I)Z
+Landroid/widget/HeaderViewListAdapter;->mAdapter:Landroid/widget/ListAdapter;
+Landroid/widget/HeaderViewListAdapter;->mFooterViewInfos:Ljava/util/ArrayList;
+Landroid/widget/HeaderViewListAdapter;->mHeaderViewInfos:Ljava/util/ArrayList;
+Landroid/widget/HorizontalScrollView;->mChildToScrollTo:Landroid/view/View;
+Landroid/widget/HorizontalScrollView;->mEdgeGlowLeft:Landroid/widget/EdgeEffect;
+Landroid/widget/HorizontalScrollView;->mEdgeGlowRight:Landroid/widget/EdgeEffect;
+Landroid/widget/HorizontalScrollView;->mIsBeingDragged:Z
+Landroid/widget/HorizontalScrollView;->mLastMotionX:I
+Landroid/widget/HorizontalScrollView;->mOverflingDistance:I
+Landroid/widget/HorizontalScrollView;->mOverscrollDistance:I
+Landroid/widget/HorizontalScrollView;->mScroller:Landroid/widget/OverScroller;
+Landroid/widget/HorizontalScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;
+Landroid/widget/HorizontalScrollView;->recycleVelocityTracker()V
+Landroid/widget/ImageView;->animateTransform(Landroid/graphics/Matrix;)V
+Landroid/widget/ImageView;->mAdjustViewBounds:Z
+Landroid/widget/ImageView;->mAlpha:I
+Landroid/widget/ImageView;->mCropToPadding:Z
+Landroid/widget/ImageView;->mDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ImageView;->mDrawableHeight:I
+Landroid/widget/ImageView;->mDrawableWidth:I
+Landroid/widget/ImageView;->mDrawMatrix:Landroid/graphics/Matrix;
+Landroid/widget/ImageView;->mMaxHeight:I
+Landroid/widget/ImageView;->mMaxWidth:I
+Landroid/widget/ImageView;->mRecycleableBitmapDrawable:Landroid/graphics/drawable/BitmapDrawable;
+Landroid/widget/ImageView;->mResource:I
+Landroid/widget/ImageView;->mUri:Landroid/net/Uri;
+Landroid/widget/ImageView;->resizeFromDrawable()V
+Landroid/widget/ImageView;->resolveUri()V
+Landroid/widget/ImageView;->scaleTypeToScaleToFit(Landroid/widget/ImageView$ScaleType;)Landroid/graphics/Matrix$ScaleToFit;
+Landroid/widget/ImageView;->setImageResourceAsync(I)Ljava/lang/Runnable;
+Landroid/widget/ImageView;->setImageURIAsync(Landroid/net/Uri;)Ljava/lang/Runnable;
+Landroid/widget/ImageView;->updateDrawable(Landroid/graphics/drawable/Drawable;)V
+Landroid/widget/LinearLayout$LayoutParams;->encodeProperties(Landroid/view/ViewHierarchyEncoder;)V
+Landroid/widget/LinearLayout;->INDEX_BOTTOM:I
+Landroid/widget/LinearLayout;->INDEX_TOP:I
+Landroid/widget/LinearLayout;->mDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/LinearLayout;->mGravity:I
+Landroid/widget/LinearLayout;->mMaxAscent:[I
+Landroid/widget/LinearLayout;->mMaxDescent:[I
+Landroid/widget/LinearLayout;->mTotalLength:I
+Landroid/widget/LinearLayout;->mUseLargestChild:Z
+Landroid/widget/ListPopupWindow;->buildDropDown()I
+Landroid/widget/ListPopupWindow;->isDropDownAlwaysVisible()Z
+Landroid/widget/ListPopupWindow;->mDropDownList:Landroid/widget/DropDownListView;
+Landroid/widget/ListPopupWindow;->mPopup:Landroid/widget/PopupWindow;
+Landroid/widget/ListPopupWindow;->setDropDownAlwaysVisible(Z)V
+Landroid/widget/ListPopupWindow;->setForceIgnoreOutsideTouch(Z)V
+Landroid/widget/ListPopupWindow;->setListItemExpandMax(I)V
+Landroid/widget/ListView;->arrowScroll(I)Z
+Landroid/widget/ListView;->correctTooHigh(I)V
+Landroid/widget/ListView;->correctTooLow(I)V
+Landroid/widget/ListView;->fillDown(II)Landroid/view/View;
+Landroid/widget/ListView;->fillSpecific(II)Landroid/view/View;
+Landroid/widget/ListView;->fillUp(II)Landroid/view/View;
+Landroid/widget/ListView;->getHeightForPosition(I)I
+Landroid/widget/ListView;->makeAndAddView(IIZIZ)Landroid/view/View;
+Landroid/widget/ListView;->mAreAllItemsSelectable:Z
+Landroid/widget/ListView;->mDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ListView;->mDividerHeight:I
+Landroid/widget/ListView;->measureHeightOfChildren(IIIII)I
+Landroid/widget/ListView;->mFooterViewInfos:Ljava/util/ArrayList;
+Landroid/widget/ListView;->mHeaderViewInfos:Ljava/util/ArrayList;
+Landroid/widget/ListView;->scrollListItemsBy(I)V
+Landroid/widget/ListView;->setSelectionInt(I)V
+Landroid/widget/ListView;->trackMotionScroll(II)Z
+Landroid/widget/MediaController;->mAnchor:Landroid/view/View;
+Landroid/widget/MediaController;->mContext:Landroid/content/Context;
+Landroid/widget/MediaController;->mCurrentTime:Landroid/widget/TextView;
+Landroid/widget/MediaController;->mDecor:Landroid/view/View;
+Landroid/widget/MediaController;->mDecorLayoutParams:Landroid/view/WindowManager$LayoutParams;
+Landroid/widget/MediaController;->mEndTime:Landroid/widget/TextView;
+Landroid/widget/MediaController;->mFfwdButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mFfwdListener:Landroid/view/View$OnClickListener;
+Landroid/widget/MediaController;->mNextButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mPauseButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mPlayer:Landroid/widget/MediaController$MediaPlayerControl;
+Landroid/widget/MediaController;->mPrevButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mProgress:Landroid/widget/ProgressBar;
+Landroid/widget/MediaController;->mRewButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mRewListener:Landroid/view/View$OnClickListener;
+Landroid/widget/MediaController;->mRoot:Landroid/view/View;
+Landroid/widget/MediaController;->mSeekListener:Landroid/widget/SeekBar$OnSeekBarChangeListener;
+Landroid/widget/MediaController;->mShowing:Z
+Landroid/widget/MediaController;->mWindow:Landroid/view/Window;
+Landroid/widget/MediaController;->mWindowManager:Landroid/view/WindowManager;
+Landroid/widget/MediaController;->updatePausePlay()V
+Landroid/widget/NumberPicker;->changeValueByOne(Z)V
+Landroid/widget/NumberPicker;->getTwoDigitFormatter()Landroid/widget/NumberPicker$Formatter;
+Landroid/widget/NumberPicker;->initializeSelectorWheelIndices()V
+Landroid/widget/NumberPicker;->mFlingScroller:Landroid/widget/Scroller;
+Landroid/widget/NumberPicker;->mInputText:Landroid/widget/EditText;
+Landroid/widget/NumberPicker;->mMaximumFlingVelocity:I
+Landroid/widget/NumberPicker;->mMaxValue:I
+Landroid/widget/NumberPicker;->mMinHeight:I
+Landroid/widget/NumberPicker;->mMinWidth:I
+Landroid/widget/NumberPicker;->mOnValueChangeListener:Landroid/widget/NumberPicker$OnValueChangeListener;
+Landroid/widget/NumberPicker;->mSelectionDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/NumberPicker;->mSelectionDividerHeight:I
+Landroid/widget/NumberPicker;->mSelectorIndices:[I
+Landroid/widget/NumberPicker;->mSelectorWheelPaint:Landroid/graphics/Paint;
+Landroid/widget/NumberPicker;->mTextSize:I
+Landroid/widget/NumberPicker;->SELECTOR_MIDDLE_ITEM_INDEX:I
+Landroid/widget/NumberPicker;->SELECTOR_WHEEL_ITEM_COUNT:I
+Landroid/widget/OverScroller$SplineOverScroller;->mCurrVelocity:F
+Landroid/widget/OverScroller;-><init>(Landroid/content/Context;Landroid/view/animation/Interpolator;Z)V
+Landroid/widget/OverScroller;->extendDuration(I)V
+Landroid/widget/OverScroller;->isScrollingInDirection(FF)Z
+Landroid/widget/OverScroller;->mInterpolator:Landroid/view/animation/Interpolator;
+Landroid/widget/OverScroller;->mScrollerY:Landroid/widget/OverScroller$SplineOverScroller;
+Landroid/widget/OverScroller;->setInterpolator(Landroid/view/animation/Interpolator;)V
+Landroid/widget/PopupMenu;->mContext:Landroid/content/Context;
+Landroid/widget/PopupMenu;->mPopup:Lcom/android/internal/view/menu/MenuPopupHelper;
+Landroid/widget/PopupWindow;->computeAnimationResource()I
+Landroid/widget/PopupWindow;->createPopupLayoutParams(Landroid/os/IBinder;)Landroid/view/WindowManager$LayoutParams;
+Landroid/widget/PopupWindow;->invokePopup(Landroid/view/WindowManager$LayoutParams;)V
+Landroid/widget/PopupWindow;->mAboveAnchor:Z
+Landroid/widget/PopupWindow;->mAboveAnchorBackgroundDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/PopupWindow;->mAnchor:Ljava/lang/ref/WeakReference;
+Landroid/widget/PopupWindow;->mAnimationStyle:I
+Landroid/widget/PopupWindow;->mBackgroundView:Landroid/view/View;
+Landroid/widget/PopupWindow;->mBelowAnchorBackgroundDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/PopupWindow;->mContentView:Landroid/view/View;
+Landroid/widget/PopupWindow;->mContext:Landroid/content/Context;
+Landroid/widget/PopupWindow;->mDecorView:Landroid/widget/PopupWindow$PopupDecorView;
+Landroid/widget/PopupWindow;->mHeightMode:I
+Landroid/widget/PopupWindow;->mIsDropdown:Z
+Landroid/widget/PopupWindow;->mIsShowing:Z
+Landroid/widget/PopupWindow;->mLastHeight:I
+Landroid/widget/PopupWindow;->mLastWidth:I
+Landroid/widget/PopupWindow;->mLayoutInScreen:Z
+Landroid/widget/PopupWindow;->mNotTouchModal:Z
+Landroid/widget/PopupWindow;->mOnDismissListener:Landroid/widget/PopupWindow$OnDismissListener;
+Landroid/widget/PopupWindow;->mOnScrollChangedListener:Landroid/view/ViewTreeObserver$OnScrollChangedListener;
+Landroid/widget/PopupWindow;->mOverlapAnchor:Z
+Landroid/widget/PopupWindow;->mTouchInterceptor:Landroid/view/View$OnTouchListener;
+Landroid/widget/PopupWindow;->mWidthMode:I
+Landroid/widget/PopupWindow;->mWindowLayoutType:I
+Landroid/widget/PopupWindow;->mWindowManager:Landroid/view/WindowManager;
+Landroid/widget/PopupWindow;->preparePopup(Landroid/view/WindowManager$LayoutParams;)V
+Landroid/widget/PopupWindow;->setAllowScrollingAnchorParent(Z)V
+Landroid/widget/PopupWindow;->setClipToScreenEnabled(Z)V
+Landroid/widget/PopupWindow;->setEpicenterBounds(Landroid/graphics/Rect;)V
+Landroid/widget/PopupWindow;->setLayoutInScreenEnabled(Z)V
+Landroid/widget/PopupWindow;->setLayoutInsetDecor(Z)V
+Landroid/widget/PopupWindow;->setTouchModal(Z)V
+Landroid/widget/PopupWindow;->showAtLocation(Landroid/os/IBinder;III)V
+Landroid/widget/PopupWindow;->updateAboveAnchor(Z)V
+Landroid/widget/ProgressBar;->mCurrentDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ProgressBar;->mDuration:I
+Landroid/widget/ProgressBar;->mIndeterminate:Z
+Landroid/widget/ProgressBar;->mMaxHeight:I
+Landroid/widget/ProgressBar;->mMinHeight:I
+Landroid/widget/ProgressBar;->mMinWidth:I
+Landroid/widget/ProgressBar;->mMirrorForRtl:Z
+Landroid/widget/ProgressBar;->mOnlyIndeterminate:Z
+Landroid/widget/ProgressBar;->refreshProgress(IIZZ)V
+Landroid/widget/ProgressBar;->setProgressInternal(IZZ)Z
+Landroid/widget/ProgressBar;->startAnimation()V
+Landroid/widget/ProgressBar;->stopAnimation()V
+Landroid/widget/ProgressBar;->tileify(Landroid/graphics/drawable/Drawable;Z)Landroid/graphics/drawable/Drawable;
+Landroid/widget/QuickContactBadge;->mOverlay:Landroid/graphics/drawable/Drawable;
+Landroid/widget/RadioGroup;->mChildOnCheckedChangeListener:Landroid/widget/CompoundButton$OnCheckedChangeListener;
+Landroid/widget/RadioGroup;->mOnCheckedChangeListener:Landroid/widget/RadioGroup$OnCheckedChangeListener;
+Landroid/widget/RatingBar;->mOnRatingBarChangeListener:Landroid/widget/RatingBar$OnRatingBarChangeListener;
+Landroid/widget/RelativeLayout$DependencyGraph$Node;-><init>()V
+Landroid/widget/RelativeLayout$LayoutParams;->mBottom:I
+Landroid/widget/RelativeLayout$LayoutParams;->mLeft:I
+Landroid/widget/RelativeLayout$LayoutParams;->mRight:I
+Landroid/widget/RelativeLayout$LayoutParams;->mTop:I
+Landroid/widget/RelativeLayout;->mGravity:I
+Landroid/widget/RemoteViews$Action;->mergeBehavior()I
+Landroid/widget/RemoteViews$Action;->viewId:I
+Landroid/widget/RemoteViews$BitmapCache;->mBitmaps:Ljava/util/ArrayList;
+Landroid/widget/RemoteViews$BitmapReflectionAction;->bitmap:Landroid/graphics/Bitmap;
+Landroid/widget/RemoteViews$BitmapReflectionAction;->methodName:Ljava/lang/String;
+Landroid/widget/RemoteViews$OnClickHandler;-><init>()V
+Landroid/widget/RemoteViews$OnClickHandler;->onClickHandler(Landroid/view/View;Landroid/app/PendingIntent;Landroid/content/Intent;)Z
+Landroid/widget/RemoteViews$ReflectionAction;->methodName:Ljava/lang/String;
+Landroid/widget/RemoteViews$ReflectionAction;->value:Ljava/lang/Object;
+Landroid/widget/RemoteViews$SetOnClickPendingIntent;->pendingIntent:Landroid/app/PendingIntent;
+Landroid/widget/RemoteViews$SetPendingIntentTemplate;->pendingIntentTemplate:Landroid/app/PendingIntent;
+Landroid/widget/RemoteViews$ViewGroupActionAdd;->mNestedViews:Landroid/widget/RemoteViews;
+Landroid/widget/RemoteViews;->addView(ILandroid/widget/RemoteViews;I)V
+Landroid/widget/RemoteViews;->estimateMemoryUsage()I
+Landroid/widget/RemoteViews;->mActions:Ljava/util/ArrayList;
+Landroid/widget/RemoteViews;->mApplication:Landroid/content/pm/ApplicationInfo;
+Landroid/widget/RemoteViews;->mBitmapCache:Landroid/widget/RemoteViews$BitmapCache;
+Landroid/widget/RemoteViews;->mergeRemoteViews(Landroid/widget/RemoteViews;)V
+Landroid/widget/RemoteViews;->mLayoutId:I
+Landroid/widget/RemoteViews;->mPortrait:Landroid/widget/RemoteViews;
+Landroid/widget/RemoteViews;->setIsWidgetCollectionChild(Z)V
+Landroid/widget/RemoteViews;->setRemoteAdapter(ILjava/util/ArrayList;I)V
+Landroid/widget/RemoteViewsAdapter;->getRemoteViewsServiceIntent()Landroid/content/Intent;
+Landroid/widget/RemoteViewsAdapter;->isDataReady()Z
+Landroid/widget/RemoteViewsAdapter;->mCache:Landroid/widget/RemoteViewsAdapter$FixedSizeRemoteViewsCache;
+Landroid/widget/RemoteViewsAdapter;->mWorkerThread:Landroid/os/HandlerThread;
+Landroid/widget/RemoteViewsAdapter;->saveRemoteViewsCache()V
+Landroid/widget/RemoteViewsAdapter;->setRemoteViewsOnClickHandler(Landroid/widget/RemoteViews$OnClickHandler;)V
+Landroid/widget/RemoteViewsAdapter;->setVisibleRangeHint(II)V
+Landroid/widget/ScrollBarDrawable;->mVerticalThumb:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ScrollBarDrawable;->setHorizontalThumbDrawable(Landroid/graphics/drawable/Drawable;)V
+Landroid/widget/ScrollBarDrawable;->setVerticalThumbDrawable(Landroid/graphics/drawable/Drawable;)V
+Landroid/widget/Scroller;->DECELERATION_RATE:F
+Landroid/widget/Scroller;->INFLEXION:F
+Landroid/widget/Scroller;->mDeceleration:F
+Landroid/widget/Scroller;->mDuration:I
+Landroid/widget/Scroller;->mInterpolator:Landroid/view/animation/Interpolator;
+Landroid/widget/Scroller;->mPhysicalCoeff:F
+Landroid/widget/ScrollView;->canScroll()Z
+Landroid/widget/ScrollView;->endDrag()V
+Landroid/widget/ScrollView;->mChildToScrollTo:Landroid/view/View;
+Landroid/widget/ScrollView;->mEdgeGlowBottom:Landroid/widget/EdgeEffect;
+Landroid/widget/ScrollView;->mEdgeGlowTop:Landroid/widget/EdgeEffect;
+Landroid/widget/ScrollView;->mFlingStrictSpan:Landroid/os/StrictMode$Span;
+Landroid/widget/ScrollView;->mIsBeingDragged:Z
+Landroid/widget/ScrollView;->mLastMotionY:I
+Landroid/widget/ScrollView;->mLastScroll:J
+Landroid/widget/ScrollView;->mMinimumVelocity:I
+Landroid/widget/ScrollView;->mOverflingDistance:I
+Landroid/widget/ScrollView;->mOverscrollDistance:I
+Landroid/widget/ScrollView;->mScroller:Landroid/widget/OverScroller;
+Landroid/widget/ScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;
+Landroid/widget/SearchView$SearchAutoComplete;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/widget/SearchView;->mClearingFocus:Z
+Landroid/widget/SearchView;->mCloseButton:Landroid/widget/ImageView;
+Landroid/widget/SearchView;->mCollapsedImeOptions:I
+Landroid/widget/SearchView;->mExpandedInActionView:Z
+Landroid/widget/SearchView;->mIconified:Z
+Landroid/widget/SearchView;->mIconifiedByDefault:Z
+Landroid/widget/SearchView;->mOnClickListener:Landroid/view/View$OnClickListener;
+Landroid/widget/SearchView;->mOnItemClickListener:Landroid/widget/AdapterView$OnItemClickListener;
+Landroid/widget/SearchView;->mOnQueryChangeListener:Landroid/widget/SearchView$OnQueryTextListener;
+Landroid/widget/SearchView;->mSearchButton:Landroid/widget/ImageView;
+Landroid/widget/SearchView;->mSearchEditFrame:Landroid/view/View;
+Landroid/widget/SearchView;->mSearchHintIcon:Landroid/graphics/drawable/Drawable;
+Landroid/widget/SearchView;->mSearchPlate:Landroid/view/View;
+Landroid/widget/SearchView;->mSearchSrcTextView:Landroid/widget/SearchView$SearchAutoComplete;
+Landroid/widget/SearchView;->mSubmitArea:Landroid/view/View;
+Landroid/widget/SearchView;->mSuggestionsAdapter:Landroid/widget/CursorAdapter;
+Landroid/widget/SearchView;->mUserQuery:Ljava/lang/CharSequence;
+Landroid/widget/SearchView;->mVoiceButton:Landroid/widget/ImageView;
+Landroid/widget/SearchView;->mVoiceButtonEnabled:Z
+Landroid/widget/SearchView;->onCloseClicked()V
+Landroid/widget/SearchView;->setQuery(Ljava/lang/CharSequence;)V
+Landroid/widget/SearchView;->updateSubmitArea()V
+Landroid/widget/SearchView;->updateSubmitButton(Z)V
+Landroid/widget/SearchView;->updateViewsVisibility(Z)V
+Landroid/widget/SeekBar;->mOnSeekBarChangeListener:Landroid/widget/SeekBar$OnSeekBarChangeListener;
+Landroid/widget/SeekBar;->onProgressRefresh(FZI)V
+Landroid/widget/SimpleAdapter;->mData:Ljava/util/List;
+Landroid/widget/SimpleCursorAdapter;->mFrom:[I
+Landroid/widget/SimpleCursorAdapter;->mTo:[I
+Landroid/widget/SlidingDrawer;->mTopOffset:I
+Landroid/widget/SlidingDrawer;->mTouchDelta:I
+Landroid/widget/SlidingDrawer;->mTracking:Z
+Landroid/widget/SlidingDrawer;->mVelocityTracker:Landroid/view/VelocityTracker;
+Landroid/widget/SlidingDrawer;->prepareContent()V
+Landroid/widget/SlidingDrawer;->prepareTracking(I)V
+Landroid/widget/Spinner$DialogPopup;->isShowing()Z
+Landroid/widget/Spinner$SpinnerPopup;->isShowing()Z
+Landroid/widget/Spinner;->mForwardingListener:Landroid/widget/ForwardingListener;
+Landroid/widget/Spinner;->mPopup:Landroid/widget/Spinner$SpinnerPopup;
+Landroid/widget/Spinner;->setOnItemClickListenerInt(Landroid/widget/AdapterView$OnItemClickListener;)V
+Landroid/widget/Switch;->cancelPositionAnimator()V
+Landroid/widget/Switch;->mOffLayout:Landroid/text/Layout;
+Landroid/widget/Switch;->mOnLayout:Landroid/text/Layout;
+Landroid/widget/Switch;->mSwitchHeight:I
+Landroid/widget/Switch;->mSwitchMinWidth:I
+Landroid/widget/Switch;->mSwitchWidth:I
+Landroid/widget/Switch;->mThumbDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Switch;->mThumbWidth:I
+Landroid/widget/Switch;->mTrackDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Switch;->setThumbPosition(F)V
+Landroid/widget/TabHost$IntentContentStrategy;->getContentView()Landroid/view/View;
+Landroid/widget/TabHost$IntentContentStrategy;->tabClosed()V
+Landroid/widget/TabHost$TabSpec;->mContentStrategy:Landroid/widget/TabHost$ContentStrategy;
+Landroid/widget/TabHost$TabSpec;->mIndicatorStrategy:Landroid/widget/TabHost$IndicatorStrategy;
+Landroid/widget/TabHost;->mCurrentTab:I
+Landroid/widget/TabHost;->mOnTabChangeListener:Landroid/widget/TabHost$OnTabChangeListener;
+Landroid/widget/TabHost;->mTabSpecs:Ljava/util/List;
+Landroid/widget/TabWidget;->mDrawBottomStrips:Z
+Landroid/widget/TabWidget;->mSelectedTab:I
+Landroid/widget/TabWidget;->setTabSelectionListener(Landroid/widget/TabWidget$OnTabSelectionChanged;)V
+Landroid/widget/TextClock;->getFormat()Ljava/lang/CharSequence;
+Landroid/widget/TextClock;->onTimeChanged()V
+Landroid/widget/TextView$SavedState;->text:Ljava/lang/CharSequence;
+Landroid/widget/TextView;->assumeLayout()V
+Landroid/widget/TextView;->bringTextIntoView()Z
+Landroid/widget/TextView;->checkForRelayout()V
+Landroid/widget/TextView;->compressText(F)Z
+Landroid/widget/TextView;->createEditorIfNeeded()V
+Landroid/widget/TextView;->deleteText_internal(II)V
+Landroid/widget/TextView;->getHintLayout()Landroid/text/Layout;
+Landroid/widget/TextView;->getHorizontallyScrolling()Z
+Landroid/widget/TextView;->getIterableTextForAccessibility()Ljava/lang/CharSequence;
+Landroid/widget/TextView;->getLayoutAlignment()Landroid/text/Layout$Alignment;
+Landroid/widget/TextView;->getLineAtCoordinate(F)I
+Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic;
+Landroid/widget/TextView;->getTextForAccessibility()Ljava/lang/CharSequence;
+Landroid/widget/TextView;->getTextServicesLocale(Z)Ljava/util/Locale;
+Landroid/widget/TextView;->getUpdatedHighlightPath()Landroid/graphics/Path;
+Landroid/widget/TextView;->getVerticalOffset(Z)I
+Landroid/widget/TextView;->isSingleLine()Z
+Landroid/widget/TextView;->isTextEditable()Z
+Landroid/widget/TextView;->LINES:I
+Landroid/widget/TextView;->makeNewLayout(IILandroid/text/BoringLayout$Metrics;Landroid/text/BoringLayout$Metrics;IZ)V
+Landroid/widget/TextView;->mAllowTransformationLengthChange:Z
+Landroid/widget/TextView;->mBoring:Landroid/text/BoringLayout$Metrics;
+Landroid/widget/TextView;->mBufferType:Landroid/widget/TextView$BufferType;
+Landroid/widget/TextView;->mChangeWatcher:Landroid/widget/TextView$ChangeWatcher;
+Landroid/widget/TextView;->mCharWrapper:Landroid/widget/TextView$CharWrapper;
+Landroid/widget/TextView;->mCurHintTextColor:I
+Landroid/widget/TextView;->mCursorDrawableRes:I
+Landroid/widget/TextView;->mCurTextColor:I
+Landroid/widget/TextView;->mDesiredHeightAtMeasure:I
+Landroid/widget/TextView;->mDrawables:Landroid/widget/TextView$Drawables;
+Landroid/widget/TextView;->mEditableFactory:Landroid/text/Editable$Factory;
+Landroid/widget/TextView;->mEditor:Landroid/widget/Editor;
+Landroid/widget/TextView;->mGravity:I
+Landroid/widget/TextView;->mHighlightColor:I
+Landroid/widget/TextView;->mHighlightPaint:Landroid/graphics/Paint;
+Landroid/widget/TextView;->mHighlightPathBogus:Z
+Landroid/widget/TextView;->mHintBoring:Landroid/text/BoringLayout$Metrics;
+Landroid/widget/TextView;->mHintLayout:Landroid/text/Layout;
+Landroid/widget/TextView;->mHorizontallyScrolling:Z
+Landroid/widget/TextView;->mIncludePad:Z
+Landroid/widget/TextView;->mLayout:Landroid/text/Layout;
+Landroid/widget/TextView;->mListeners:Ljava/util/ArrayList;
+Landroid/widget/TextView;->mMarquee:Landroid/widget/TextView$Marquee;
+Landroid/widget/TextView;->mMarqueeFadeMode:I
+Landroid/widget/TextView;->mMaximum:I
+Landroid/widget/TextView;->mMaxMode:I
+Landroid/widget/TextView;->mMaxWidth:I
+Landroid/widget/TextView;->mMaxWidthMode:I
+Landroid/widget/TextView;->mMinimum:I
+Landroid/widget/TextView;->mMinWidth:I
+Landroid/widget/TextView;->mMinWidthMode:I
+Landroid/widget/TextView;->mOldMaximum:I
+Landroid/widget/TextView;->mOldMaxMode:I
+Landroid/widget/TextView;->mRestartMarquee:Z
+Landroid/widget/TextView;->mSavedHintLayout:Landroid/text/BoringLayout;
+Landroid/widget/TextView;->mSavedLayout:Landroid/text/BoringLayout;
+Landroid/widget/TextView;->mSavedMarqueeModeLayout:Landroid/text/Layout;
+Landroid/widget/TextView;->mShadowDx:F
+Landroid/widget/TextView;->mShadowDy:F
+Landroid/widget/TextView;->mShadowRadius:F
+Landroid/widget/TextView;->mSingleLine:Z
+Landroid/widget/TextView;->mSpacingAdd:F
+Landroid/widget/TextView;->mSpacingMult:F
+Landroid/widget/TextView;->mSpannableFactory:Landroid/text/Spannable$Factory;
+Landroid/widget/TextView;->mText:Ljava/lang/CharSequence;
+Landroid/widget/TextView;->mTextDir:Landroid/text/TextDirectionHeuristic;
+Landroid/widget/TextView;->mTextPaint:Landroid/text/TextPaint;
+Landroid/widget/TextView;->mTextSelectHandleLeftRes:I
+Landroid/widget/TextView;->mTextSelectHandleRes:I
+Landroid/widget/TextView;->mTextSelectHandleRightRes:I
+Landroid/widget/TextView;->mTransformed:Ljava/lang/CharSequence;
+Landroid/widget/TextView;->mUserSetTextScaleX:Z
+Landroid/widget/TextView;->nullLayouts()V
+Landroid/widget/TextView;->setInputType(IZ)V
+Landroid/widget/TextView;->setRawTextSize(FZ)V
+Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;ZI)V
+Landroid/widget/TextView;->startMarquee()V
+Landroid/widget/TextView;->startStopMarquee(Z)V
+Landroid/widget/TextView;->stopTextActionMode()V
+Landroid/widget/TextView;->viewportToContentVerticalOffset()I
+Landroid/widget/TimePicker;->mDelegate:Landroid/widget/TimePicker$TimePickerDelegate;
+Landroid/widget/Toast$TN;->handleHide()V
+Landroid/widget/Toast$TN;->mGravity:I
+Landroid/widget/Toast$TN;->mNextView:Landroid/view/View;
+Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
+Landroid/widget/Toast$TN;->mView:Landroid/view/View;
+Landroid/widget/Toast$TN;->mY:I
+Landroid/widget/Toast$TN;->show(Landroid/os/IBinder;)V
+Landroid/widget/Toast;->getService()Landroid/app/INotificationManager;
+Landroid/widget/Toast;->getWindowParams()Landroid/view/WindowManager$LayoutParams;
+Landroid/widget/Toast;->mDuration:I
+Landroid/widget/Toast;->mTN:Landroid/widget/Toast$TN;
+Landroid/widget/Toast;->sService:Landroid/app/INotificationManager;
+Landroid/widget/Toolbar;->mNavButtonView:Landroid/widget/ImageButton;
+Landroid/widget/Toolbar;->mTitleMarginBottom:I
+Landroid/widget/Toolbar;->mTitleMarginEnd:I
+Landroid/widget/Toolbar;->mTitleMarginStart:I
+Landroid/widget/Toolbar;->mTitleMarginTop:I
+Landroid/widget/Toolbar;->mTitleTextView:Landroid/widget/TextView;
+Landroid/widget/VideoView;->mCurrentBufferPercentage:I
+Landroid/widget/VideoView;->mCurrentState:I
+Landroid/widget/VideoView;->mErrorListener:Landroid/media/MediaPlayer$OnErrorListener;
+Landroid/widget/VideoView;->mHeaders:Ljava/util/Map;
+Landroid/widget/VideoView;->mMediaController:Landroid/widget/MediaController;
+Landroid/widget/VideoView;->mMediaPlayer:Landroid/media/MediaPlayer;
+Landroid/widget/VideoView;->mPreparedListener:Landroid/media/MediaPlayer$OnPreparedListener;
+Landroid/widget/VideoView;->mSHCallback:Landroid/view/SurfaceHolder$Callback;
+Landroid/widget/VideoView;->mSurfaceHolder:Landroid/view/SurfaceHolder;
+Landroid/widget/VideoView;->mTargetState:I
+Landroid/widget/VideoView;->mUri:Landroid/net/Uri;
+Landroid/widget/VideoView;->mVideoHeight:I
+Landroid/widget/VideoView;->mVideoWidth:I
+Landroid/widget/VideoView;->release(Z)V
+Landroid/widget/VideoView;->STATE_IDLE:I
+Landroid/widget/ViewAnimator;->mFirstTime:Z
+Landroid/widget/ViewAnimator;->mWhichChild:I
+Landroid/widget/ViewAnimator;->showOnly(IZ)V
+Landroid/widget/ViewFlipper;->mUserPresent:Z
+Landroid/widget/ViewFlipper;->updateRunning(Z)V
+Landroid/widget/ZoomControls;->mZoomIn:Landroid/widget/ZoomButton;
+Landroid/widget/ZoomControls;->mZoomOut:Landroid/widget/ZoomButton;
+Lcom/android/ims/ImsConfigListener$Stub;-><init>()V
+Lcom/android/ims/internal/IImsCallSession$Stub;-><init>()V
+Lcom/android/ims/internal/IImsCallSession$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/ims/internal/IImsCallSession;
+Lcom/android/ims/internal/IImsConfig$Stub;-><init>()V
+Lcom/android/ims/internal/IImsEcbm$Stub;-><init>()V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationConnected()V
+Lcom/android/ims/internal/IImsService$Stub;-><init>()V
+Lcom/android/ims/internal/IImsService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/ims/internal/IImsService;
+Lcom/android/ims/internal/IImsUt$Stub;-><init>()V
+Lcom/android/ims/internal/IImsVideoCallCallback;->changeCallDataUsage(J)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->changeCameraCapabilities(Landroid/telecom/VideoProfile$CameraCapabilities;)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->changePeerDimensions(II)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->changeVideoQuality(I)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->handleCallSessionEvent(I)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->receiveSessionModifyRequest(Landroid/telecom/VideoProfile;)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->receiveSessionModifyResponse(ILandroid/telecom/VideoProfile;Landroid/telecom/VideoProfile;)V
+Lcom/android/ims/internal/IImsVideoCallProvider$Stub;-><init>()V
+Lcom/android/ims/internal/IImsVideoCallProvider;->setCallback(Lcom/android/ims/internal/IImsVideoCallCallback;)V
+Lcom/android/ims/internal/uce/common/CapInfo;-><init>()V
+Lcom/android/ims/internal/uce/common/CapInfo;->setCapTimestamp(J)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setCdViaPresenceSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setExts([Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFtHttpSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFtSnFSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFtSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFtThumbSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFullSnFGroupChatSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setGeoPullFtSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setGeoPullSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setGeoPushSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setImSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setIpVideoSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setIpVoiceSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setIsSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setRcsIpVideoCallSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setRcsIpVideoOnlyCallSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setRcsIpVoiceCallSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setSmSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setSpSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setVsDuringCSSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setVsSupported(Z)V
+Lcom/android/ims/internal/uce/common/StatusCode;-><init>()V
+Lcom/android/ims/internal/uce/common/StatusCode;->setStatusCode(I)V
+Lcom/android/ims/internal/uce/common/UceLong;->getUceLong()J
+Lcom/android/ims/internal/uce/common/UceLong;->setUceLong(J)V
+Lcom/android/ims/internal/uce/presence/PresCmdId;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresCmdId;->setCmdId(I)V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;->setCmdId(Lcom/android/ims/internal/uce/presence/PresCmdId;)V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;->setRequestId(I)V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;->setStatus(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;->setUserData(I)V
+Lcom/android/ims/internal/uce/presence/PresPublishTriggerType;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresPublishTriggerType;->setPublishTrigeerType(I)V
+Lcom/android/ims/internal/uce/presence/PresResInfo;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresResInfo;->setDisplayName(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInfo;->setInstanceInfo(Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;)V
+Lcom/android/ims/internal/uce/presence/PresResInfo;->setResUri(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setPresentityUri(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setReason(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setResId(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setResInstanceState(I)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setTupleInfo([Lcom/android/ims/internal/uce/presence/PresTupleInfo;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setFullState(Z)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setListName(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setPresSubscriptionState(Lcom/android/ims/internal/uce/presence/PresSubscriptionState;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setRequestId(I)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setSubscriptionExpireTime(I)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setSubscriptionTerminatedReason(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setUri(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setVersion(I)V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setCmdId(Lcom/android/ims/internal/uce/presence/PresCmdId;)V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setReasonPhrase(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setRequestId(I)V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setRetryAfter(I)V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setSipResponseCode(I)V
+Lcom/android/ims/internal/uce/presence/PresSubscriptionState;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresSubscriptionState;->setPresSubscriptionState(I)V
+Lcom/android/ims/internal/uce/presence/PresTupleInfo;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresTupleInfo;->setContactUri(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresTupleInfo;->setFeatureTag(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresTupleInfo;->setTimestamp(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/uceservice/IUceListener$Stub;-><init>()V
+Lcom/android/internal/app/AlertController$AlertParams;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/app/AlertController$AlertParams;->apply(Lcom/android/internal/app/AlertController;)V
+Lcom/android/internal/app/AlertController$AlertParams;->mAdapter:Landroid/widget/ListAdapter;
+Lcom/android/internal/app/AlertController$AlertParams;->mCancelable:Z
+Lcom/android/internal/app/AlertController$AlertParams;->mCheckedItem:I
+Lcom/android/internal/app/AlertController$AlertParams;->mCheckedItems:[Z
+Lcom/android/internal/app/AlertController$AlertParams;->mContext:Landroid/content/Context;
+Lcom/android/internal/app/AlertController$AlertParams;->mCursor:Landroid/database/Cursor;
+Lcom/android/internal/app/AlertController$AlertParams;->mCustomTitleView:Landroid/view/View;
+Lcom/android/internal/app/AlertController$AlertParams;->mIcon:Landroid/graphics/drawable/Drawable;
+Lcom/android/internal/app/AlertController$AlertParams;->mInflater:Landroid/view/LayoutInflater;
+Lcom/android/internal/app/AlertController$AlertParams;->mIsCheckedColumn:Ljava/lang/String;
+Lcom/android/internal/app/AlertController$AlertParams;->mIsMultiChoice:Z
+Lcom/android/internal/app/AlertController$AlertParams;->mIsSingleChoice:Z
+Lcom/android/internal/app/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mLabelColumn:Ljava/lang/String;
+Lcom/android/internal/app/AlertController$AlertParams;->mNeutralButtonListener:Landroid/content/DialogInterface$OnClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mNeutralButtonText:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnCancelListener:Landroid/content/DialogInterface$OnCancelListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnCheckboxClickListener:Landroid/content/DialogInterface$OnMultiChoiceClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnItemSelectedListener:Landroid/widget/AdapterView$OnItemSelectedListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;
+Lcom/android/internal/app/AlertController$RecycleListView;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/app/AlertController$RecycleListView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Lcom/android/internal/app/AlertController;-><init>(Landroid/content/Context;Landroid/content/DialogInterface;Landroid/view/Window;)V
+Lcom/android/internal/app/AlertController;->getListView()Landroid/widget/ListView;
+Lcom/android/internal/app/AlertController;->installContent()V
+Lcom/android/internal/app/AlertController;->mCustomTitleView:Landroid/view/View;
+Lcom/android/internal/app/AlertController;->mForceInverseBackground:Z
+Lcom/android/internal/app/AlertController;->mTitle:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController;->mView:Landroid/view/View;
+Lcom/android/internal/app/AlertController;->onKeyDown(ILandroid/view/KeyEvent;)Z
+Lcom/android/internal/app/AlertController;->onKeyUp(ILandroid/view/KeyEvent;)Z
+Lcom/android/internal/app/AlertController;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;Landroid/os/Message;)V
+Lcom/android/internal/app/AlertController;->setCustomTitle(Landroid/view/View;)V
+Lcom/android/internal/app/AlertController;->setIcon(I)V
+Lcom/android/internal/app/AlertController;->setIcon(Landroid/graphics/drawable/Drawable;)V
+Lcom/android/internal/app/AlertController;->setMessage(Ljava/lang/CharSequence;)V
+Lcom/android/internal/app/AlertController;->setTitle(Ljava/lang/CharSequence;)V
+Lcom/android/internal/app/AlertController;->setView(Landroid/view/View;)V
+Lcom/android/internal/app/IAppOpsService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/app/IAppOpsService$Stub$Proxy;->checkOperation(IILjava/lang/String;)I
+Lcom/android/internal/app/IAppOpsService$Stub$Proxy;->setMode(IILjava/lang/String;I)V
+Lcom/android/internal/app/IAppOpsService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IAppOpsService;
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_checkAudioOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_checkOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_checkPackage:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_finishOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_getOpsForPackage:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_getPackagesForOps:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_noteOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_noteProxyOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_removeUser:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_resetAllModes:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setAudioRestriction:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setMode:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setUidMode:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setUserRestriction:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setUserRestrictions:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_startOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_startWatchingMode:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_stopWatchingMode:I
+Lcom/android/internal/app/IAppOpsService;->getOpsForPackage(ILjava/lang/String;[I)Ljava/util/List;
+Lcom/android/internal/app/IAppOpsService;->getPackagesForOps([I)Ljava/util/List;
+Lcom/android/internal/app/IAppOpsService;->resetAllModes(ILjava/lang/String;)V
+Lcom/android/internal/app/IAppOpsService;->setMode(IILjava/lang/String;I)V
+Lcom/android/internal/app/IBatteryStats$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/app/IBatteryStats$Stub;-><init>()V
+Lcom/android/internal/app/IBatteryStats$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IBatteryStats;
+Lcom/android/internal/app/IBatteryStats;->computeChargeTimeRemaining()J
+Lcom/android/internal/app/IBatteryStats;->getAwakeTimeBattery()J
+Lcom/android/internal/app/IBatteryStats;->getStatistics()[B
+Lcom/android/internal/app/IBatteryStats;->isCharging()Z
+Lcom/android/internal/app/IBatteryStats;->noteFullWifiLockAcquired(I)V
+Lcom/android/internal/app/IBatteryStats;->noteFullWifiLockReleased(I)V
+Lcom/android/internal/app/IBatteryStats;->notePhoneDataConnectionState(IZ)V
+Lcom/android/internal/app/IBatteryStats;->notePhoneOff()V
+Lcom/android/internal/app/IBatteryStats;->notePhoneOn()V
+Lcom/android/internal/app/IBatteryStats;->notePhoneSignalStrength(Landroid/telephony/SignalStrength;)V
+Lcom/android/internal/app/IBatteryStats;->notePhoneState(I)V
+Lcom/android/internal/app/IBatteryStats;->noteScreenBrightness(I)V
+Lcom/android/internal/app/IBatteryStats;->noteStartSensor(II)V
+Lcom/android/internal/app/IBatteryStats;->noteStopSensor(II)V
+Lcom/android/internal/app/IBatteryStats;->noteUserActivity(II)V
+Lcom/android/internal/app/IBatteryStats;->noteWifiMulticastDisabled(I)V
+Lcom/android/internal/app/IBatteryStats;->noteWifiMulticastEnabled(I)V
+Lcom/android/internal/app/IMediaContainerService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IMediaContainerService;
+Lcom/android/internal/app/IVoiceInteractionManagerService$Stub$Proxy;->showSessionFromSession(Landroid/os/IBinder;Landroid/os/Bundle;I)Z
+Lcom/android/internal/app/IVoiceInteractionManagerService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IVoiceInteractionManagerService;
+Lcom/android/internal/app/IVoiceInteractionManagerService;->getKeyphraseSoundModel(ILjava/lang/String;)Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseSoundModel;
+Lcom/android/internal/appwidget/IAppWidgetHost;->providerChanged(ILandroid/appwidget/AppWidgetProviderInfo;)V
+Lcom/android/internal/appwidget/IAppWidgetHost;->updateAppWidget(ILandroid/widget/RemoteViews;)V
+Lcom/android/internal/appwidget/IAppWidgetService$Stub;-><init>()V
+Lcom/android/internal/appwidget/IAppWidgetService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/appwidget/IAppWidgetService;
+Lcom/android/internal/appwidget/IAppWidgetService$Stub;->TRANSACTION_bindAppWidgetId:I
+Lcom/android/internal/appwidget/IAppWidgetService;->bindAppWidgetId(Ljava/lang/String;IILandroid/content/ComponentName;Landroid/os/Bundle;)Z
+Lcom/android/internal/appwidget/IAppWidgetService;->getAppWidgetIds(Landroid/content/ComponentName;)[I
+Lcom/android/internal/backup/IBackupTransport$Stub;-><init>()V
+Lcom/android/internal/backup/IBackupTransport$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/backup/IBackupTransport;
+Lcom/android/internal/backup/IBackupTransport;->clearBackupData(Landroid/content/pm/PackageInfo;)I
+Lcom/android/internal/backup/IBackupTransport;->finishBackup()I
+Lcom/android/internal/backup/IBackupTransport;->finishRestore()V
+Lcom/android/internal/backup/IBackupTransport;->getRestoreData(Landroid/os/ParcelFileDescriptor;)I
+Lcom/android/internal/backup/IBackupTransport;->initializeDevice()I
+Lcom/android/internal/backup/IBackupTransport;->requestBackupTime()J
+Lcom/android/internal/backup/IBackupTransport;->startRestore(J[Landroid/content/pm/PackageInfo;)I
+Lcom/android/internal/backup/IBackupTransport;->transportDirName()Ljava/lang/String;
+Lcom/android/internal/content/PackageMonitor;->isPackageDisappearing(Ljava/lang/String;)I
+Lcom/android/internal/content/PackageMonitor;->isPackageModified(Ljava/lang/String;)Z
+Lcom/android/internal/content/PackageMonitor;->onPackageChanged(Ljava/lang/String;I[Ljava/lang/String;)Z
+Lcom/android/internal/content/PackageMonitor;->onPackageRemoved(Ljava/lang/String;I)V
+Lcom/android/internal/content/PackageMonitor;->register(Landroid/content/Context;Landroid/os/Looper;Z)V
+Lcom/android/internal/content/ReferrerIntent;-><init>(Landroid/content/Intent;Ljava/lang/String;)V
+Lcom/android/internal/content/ReferrerIntent;->mReferrer:Ljava/lang/String;
+Lcom/android/internal/location/ILocationProvider$Stub;-><init>()V
+Lcom/android/internal/logging/MetricsLogger;-><init>()V
+Lcom/android/internal/logging/MetricsLogger;->write(Landroid/metrics/LogMaker;)V
+Lcom/android/internal/net/LegacyVpnInfo;-><init>()V
+Lcom/android/internal/net/LegacyVpnInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Lcom/android/internal/net/LegacyVpnInfo;->key:Ljava/lang/String;
+Lcom/android/internal/net/LegacyVpnInfo;->state:I
+Lcom/android/internal/net/VpnConfig;-><init>()V
+Lcom/android/internal/net/VpnProfile;-><init>(Landroid/os/Parcel;)V
+Lcom/android/internal/net/VpnProfile;->decode(Ljava/lang/String;[B)Lcom/android/internal/net/VpnProfile;
+Lcom/android/internal/net/VpnProfile;->key:Ljava/lang/String;
+Lcom/android/internal/net/VpnProfile;->name:Ljava/lang/String;
+Lcom/android/internal/net/VpnProfile;->saveLogin:Z
+Lcom/android/internal/net/VpnProfile;->server:Ljava/lang/String;
+Lcom/android/internal/net/VpnProfile;->type:I
+Lcom/android/internal/net/VpnProfile;->username:Ljava/lang/String;
+Lcom/android/internal/os/FuseAppLoop;->onCommand(IJJJI[B)V
+Lcom/android/internal/os/FuseAppLoop;->onOpen(JJ)[B
+Lcom/android/internal/os/HandlerCaller;->obtainMessage(I)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageIO(IILjava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageIOO(IILjava/lang/Object;Ljava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageO(ILjava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageOO(ILjava/lang/Object;Ljava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageOOO(ILjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->sendMessage(Landroid/os/Message;)V
+Lcom/android/internal/os/IDropBoxManagerService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/os/IDropBoxManagerService;
+Lcom/android/internal/os/IDropBoxManagerService;->getNextEntry(Ljava/lang/String;J)Landroid/os/DropBoxManager$Entry;
+Lcom/android/internal/os/SomeArgs;->arg1:Ljava/lang/Object;
+Lcom/android/internal/os/SomeArgs;->argi2:I
+Lcom/android/internal/os/SomeArgs;->argi3:I
+Lcom/android/internal/policy/IKeyguardService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/policy/IKeyguardService;
+Lcom/android/internal/policy/IKeyguardService;->doKeyguardTimeout(Landroid/os/Bundle;)V
+Lcom/android/internal/policy/IKeyguardService;->setKeyguardEnabled(Z)V
+Lcom/android/internal/policy/IKeyguardStateCallback$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/policy/IKeyguardStateCallback;
+Lcom/android/internal/R$anim;->fade_in:I
+Lcom/android/internal/R$array;->config_autoBrightnessLcdBacklightValues:I
+Lcom/android/internal/R$array;->config_autoBrightnessLevels:I
+Lcom/android/internal/R$array;->config_mobile_hotspot_provision_app:I
+Lcom/android/internal/R$array;->config_sms_enabled_locking_shift_tables:I
+Lcom/android/internal/R$array;->config_sms_enabled_single_shift_tables:I
+Lcom/android/internal/R$array;->config_tether_bluetooth_regexs:I
+Lcom/android/internal/R$array;->config_tether_upstream_types:I
+Lcom/android/internal/R$array;->config_tether_usb_regexs:I
+Lcom/android/internal/R$array;->config_tether_wifi_regexs:I
+Lcom/android/internal/R$array;->maps_starting_lat_lng:I
+Lcom/android/internal/R$array;->maps_starting_zoom:I
+Lcom/android/internal/R$attr;->actionBarStyle:I
+Lcom/android/internal/R$attr;->buttonStyle:I
+Lcom/android/internal/R$attr;->description:I
+Lcom/android/internal/R$attr;->editTextStyle:I
+Lcom/android/internal/R$attr;->mapViewStyle:I
+Lcom/android/internal/R$attr;->popupWindowStyle:I
+Lcom/android/internal/R$attr;->state_above_anchor:I
+Lcom/android/internal/R$attr;->state_focused:I
+Lcom/android/internal/R$attr;->state_pressed:I
+Lcom/android/internal/R$attr;->state_selected:I
+Lcom/android/internal/R$attr;->switchStyle:I
+Lcom/android/internal/R$attr;->text:I
+Lcom/android/internal/R$attr;->title:I
+Lcom/android/internal/R$attr;->webViewStyle:I
+Lcom/android/internal/R$bool;->config_mms_content_disposition_support:I
+Lcom/android/internal/R$bool;->config_showNavigationBar:I
+Lcom/android/internal/R$dimen;-><init>()V
+Lcom/android/internal/R$dimen;->item_touch_helper_max_drag_scroll_per_frame:I
+Lcom/android/internal/R$dimen;->navigation_bar_height:I
+Lcom/android/internal/R$dimen;->navigation_bar_height_landscape:I
+Lcom/android/internal/R$dimen;->navigation_bar_width:I
+Lcom/android/internal/R$dimen;->status_bar_height:I
+Lcom/android/internal/R$dimen;->toast_y_offset:I
+Lcom/android/internal/R$drawable;->btn_check_off:I
+Lcom/android/internal/R$drawable;->compass_arrow:I
+Lcom/android/internal/R$drawable;->compass_base:I
+Lcom/android/internal/R$drawable;->ic_maps_indicator_current_position_anim:I
+Lcom/android/internal/R$drawable;->ic_menu_close_clear_cancel:I
+Lcom/android/internal/R$drawable;->loading_tile_android:I
+Lcom/android/internal/R$drawable;->maps_google_logo:I
+Lcom/android/internal/R$drawable;->no_tile_256:I
+Lcom/android/internal/R$drawable;->reticle:I
+Lcom/android/internal/R$drawable;->stat_sys_download:I
+Lcom/android/internal/R$fraction;->config_autoBrightnessAdjustmentMaxGamma:I
+Lcom/android/internal/R$id;->account_name:I
+Lcom/android/internal/R$id;->account_type:I
+Lcom/android/internal/R$id;->alertTitle:I
+Lcom/android/internal/R$id;->allow_button:I
+Lcom/android/internal/R$id;->amPm:I
+Lcom/android/internal/R$id;->authtoken_type:I
+Lcom/android/internal/R$id;->background:I
+Lcom/android/internal/R$id;->back_button:I
+Lcom/android/internal/R$id;->body:I
+Lcom/android/internal/R$id;->buttonPanel:I
+Lcom/android/internal/R$id;->cancel:I
+Lcom/android/internal/R$id;->closeButton:I
+Lcom/android/internal/R$id;->content:I
+Lcom/android/internal/R$id;->contentPanel:I
+Lcom/android/internal/R$id;->custom:I
+Lcom/android/internal/R$id;->customPanel:I
+Lcom/android/internal/R$id;->datePicker:I
+Lcom/android/internal/R$id;->day:I
+Lcom/android/internal/R$id;->deny_button:I
+Lcom/android/internal/R$id;->description:I
+Lcom/android/internal/R$id;->edit:I
+Lcom/android/internal/R$id;->edittext_container:I
+Lcom/android/internal/R$id;->find_next:I
+Lcom/android/internal/R$id;->find_prev:I
+Lcom/android/internal/R$id;->icon:I
+Lcom/android/internal/R$id;->keyboard:I
+Lcom/android/internal/R$id;->keyboardView:I
+Lcom/android/internal/R$id;->line1:I
+Lcom/android/internal/R$id;->list_item:I
+Lcom/android/internal/R$id;->matches:I
+Lcom/android/internal/R$id;->mediacontroller_progress:I
+Lcom/android/internal/R$id;->media_actions:I
+Lcom/android/internal/R$id;->message:I
+Lcom/android/internal/R$id;->minute:I
+Lcom/android/internal/R$id;->month:I
+Lcom/android/internal/R$id;->name:I
+Lcom/android/internal/R$id;->notification_header:I
+Lcom/android/internal/R$id;->ok:I
+Lcom/android/internal/R$id;->packages_list:I
+Lcom/android/internal/R$id;->package_label:I
+Lcom/android/internal/R$id;->parentPanel:I
+Lcom/android/internal/R$id;->pause:I
+Lcom/android/internal/R$id;->progress:I
+Lcom/android/internal/R$id;->redo:I
+Lcom/android/internal/R$id;->remote_input_tag:I
+Lcom/android/internal/R$id;->right_icon:I
+Lcom/android/internal/R$id;->search_src_text:I
+Lcom/android/internal/R$id;->share:I
+Lcom/android/internal/R$id;->shortcut:I
+Lcom/android/internal/R$id;->status_bar_latest_event_content:I
+Lcom/android/internal/R$id;->tabcontent:I
+Lcom/android/internal/R$id;->tabs:I
+Lcom/android/internal/R$id;->text1:I
+Lcom/android/internal/R$id;->text2:I
+Lcom/android/internal/R$id;->text:I
+Lcom/android/internal/R$id;->time:I
+Lcom/android/internal/R$id;->timePicker:I
+Lcom/android/internal/R$id;->time_current:I
+Lcom/android/internal/R$id;->title:I
+Lcom/android/internal/R$id;->titleDivider:I
+Lcom/android/internal/R$id;->titleDividerTop:I
+Lcom/android/internal/R$id;->title_container:I
+Lcom/android/internal/R$id;->title_icon:I
+Lcom/android/internal/R$id;->title_template:I
+Lcom/android/internal/R$id;->topPanel:I
+Lcom/android/internal/R$id;->up:I
+Lcom/android/internal/R$id;->year:I
+Lcom/android/internal/R$id;->zoomControls:I
+Lcom/android/internal/R$id;->zoomMagnify:I
+Lcom/android/internal/R$integer;->config_screenBrightnessDim:I
+Lcom/android/internal/R$integer;->config_screenBrightnessSettingMaximum:I
+Lcom/android/internal/R$integer;->config_screenBrightnessSettingMinimum:I
+Lcom/android/internal/R$integer;->config_toastDefaultGravity:I
+Lcom/android/internal/R$interpolator;->accelerate_cubic:I
+Lcom/android/internal/R$interpolator;->decelerate_cubic:I
+Lcom/android/internal/R$layout;->notification_template_material_base:I
+Lcom/android/internal/R$layout;->preference_header_item:I
+Lcom/android/internal/R$layout;->screen_title:I
+Lcom/android/internal/R$layout;->select_dialog:I
+Lcom/android/internal/R$layout;->select_dialog_multichoice:I
+Lcom/android/internal/R$layout;->select_dialog_singlechoice:I
+Lcom/android/internal/R$layout;->webview_find:I
+Lcom/android/internal/R$layout;->zoom_magnify:I
+Lcom/android/internal/R$plurals;->matches_found:I
+Lcom/android/internal/R$raw;->loaderror:I
+Lcom/android/internal/R$raw;->nodomain:I
+Lcom/android/internal/R$string;->byteShort:I
+Lcom/android/internal/R$string;->cancel:I
+Lcom/android/internal/R$string;->enable_explore_by_touch_warning_title:I
+Lcom/android/internal/R$string;->map:I
+Lcom/android/internal/R$string;->notification_title:I
+Lcom/android/internal/R$string;->no_matches:I
+Lcom/android/internal/R$string;->ok:I
+Lcom/android/internal/R$string;->petabyteShort:I
+Lcom/android/internal/R$string;->redo:I
+Lcom/android/internal/R$string;->share:I
+Lcom/android/internal/R$string;->whichApplication:I
+Lcom/android/internal/R$style;->Animation_DropDownDown:I
+Lcom/android/internal/R$style;->Animation_DropDownUp:I
+Lcom/android/internal/R$style;->Animation_PopupWindow:I
+Lcom/android/internal/R$style;->Theme:I
+Lcom/android/internal/R$style;->Theme_Dialog_Alert:I
+Lcom/android/internal/R$style;->Theme_Holo_Light:I
+Lcom/android/internal/R$style;->Theme_Light:I
+Lcom/android/internal/R$styleable;-><init>()V
+Lcom/android/internal/R$styleable;->AbsListView:[I
+Lcom/android/internal/R$styleable;->AbsListView_cacheColorHint:I
+Lcom/android/internal/R$styleable;->AbsListView_choiceMode:I
+Lcom/android/internal/R$styleable;->AbsListView_drawSelectorOnTop:I
+Lcom/android/internal/R$styleable;->AbsListView_fastScrollAlwaysVisible:I
+Lcom/android/internal/R$styleable;->AbsListView_fastScrollEnabled:I
+Lcom/android/internal/R$styleable;->AbsListView_listSelector:I
+Lcom/android/internal/R$styleable;->AbsListView_scrollingCache:I
+Lcom/android/internal/R$styleable;->AbsListView_smoothScrollbar:I
+Lcom/android/internal/R$styleable;->AbsListView_stackFromBottom:I
+Lcom/android/internal/R$styleable;->AbsListView_textFilterEnabled:I
+Lcom/android/internal/R$styleable;->AbsListView_transcriptMode:I
+Lcom/android/internal/R$styleable;->AbsSpinner:[I
+Lcom/android/internal/R$styleable;->AccountAuthenticator:[I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_accountPreferences:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_accountType:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_customTokens:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_icon:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_label:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_smallIcon:I
+Lcom/android/internal/R$styleable;->ActionMode:[I
+Lcom/android/internal/R$styleable;->AdapterViewAnimator:[I
+Lcom/android/internal/R$styleable;->AdapterViewFlipper:[I
+Lcom/android/internal/R$styleable;->AlertDialog:[I
+Lcom/android/internal/R$styleable;->AnalogClock:[I
+Lcom/android/internal/R$styleable;->AndroidManifest:[I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity:[I
+Lcom/android/internal/R$styleable;->AndroidManifestActivityAlias:[I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_allowTaskReparenting:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_configChanges:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_description:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_enabled:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_excludeFromRecents:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_exported:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_hardwareAccelerated:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_icon:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_immersive:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_label:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_launchMode:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_logo:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_noHistory:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_permission:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_process:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_screenOrientation:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_taskAffinity:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_theme:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_uiOptions:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_windowSoftInputMode:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication:[I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_enabled:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_hardwareAccelerated:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_label:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_largeHeap:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_permission:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_process:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_supportsRtl:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_theme:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_uiOptions:I
+Lcom/android/internal/R$styleable;->AndroidManifestData:[I
+Lcom/android/internal/R$styleable;->AndroidManifestGrantUriPermission:[I
+Lcom/android/internal/R$styleable;->AndroidManifestInstrumentation:[I
+Lcom/android/internal/R$styleable;->AndroidManifestIntentFilter:[I
+Lcom/android/internal/R$styleable;->AndroidManifestIntentFilter_priority:I
+Lcom/android/internal/R$styleable;->AndroidManifestMetaData:[I
+Lcom/android/internal/R$styleable;->AndroidManifestMetaData_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestMetaData_resource:I
+Lcom/android/internal/R$styleable;->AndroidManifestMetaData_value:I
+Lcom/android/internal/R$styleable;->AndroidManifestOriginalPackage:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPackageVerifier:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPathPermission:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPermission:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPermissionGroup:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPermissionTree:[I
+Lcom/android/internal/R$styleable;->AndroidManifestProtectedBroadcast:[I
+Lcom/android/internal/R$styleable;->AndroidManifestProvider:[I
+Lcom/android/internal/R$styleable;->AndroidManifestService:[I
+Lcom/android/internal/R$styleable;->AndroidManifestService_enabled:I
+Lcom/android/internal/R$styleable;->AndroidManifestService_exported:I
+Lcom/android/internal/R$styleable;->AndroidManifestService_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestService_permission:I
+Lcom/android/internal/R$styleable;->AndroidManifestService_process:I
+Lcom/android/internal/R$styleable;->AndroidManifestSupportsScreens:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesConfiguration:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesFeature:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesLibrary:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesPermission:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesPermission_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesSdk:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesSdk_minSdkVersion:I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesSdk_targetSdkVersion:I
+Lcom/android/internal/R$styleable;->AndroidManifest_installLocation:I
+Lcom/android/internal/R$styleable;->AndroidManifest_sharedUserId:I
+Lcom/android/internal/R$styleable;->AndroidManifest_versionCode:I
+Lcom/android/internal/R$styleable;->AndroidManifest_versionName:I
+Lcom/android/internal/R$styleable;->AppWidgetProviderInfo:[I
+Lcom/android/internal/R$styleable;->AutoCompleteTextView:[I
+Lcom/android/internal/R$styleable;->CheckBoxPreference:[I
+Lcom/android/internal/R$styleable;->CheckBoxPreference_disableDependentsState:I
+Lcom/android/internal/R$styleable;->CheckBoxPreference_summaryOff:I
+Lcom/android/internal/R$styleable;->CheckBoxPreference_summaryOn:I
+Lcom/android/internal/R$styleable;->CheckedTextView:[I
+Lcom/android/internal/R$styleable;->CheckedTextView_checked:I
+Lcom/android/internal/R$styleable;->CheckedTextView_checkMark:I
+Lcom/android/internal/R$styleable;->CompoundButton:[I
+Lcom/android/internal/R$styleable;->CompoundButton_button:I
+Lcom/android/internal/R$styleable;->CompoundButton_checked:I
+Lcom/android/internal/R$styleable;->ContactsDataKind:[I
+Lcom/android/internal/R$styleable;->CycleInterpolator:[I
+Lcom/android/internal/R$styleable;->DatePicker:[I
+Lcom/android/internal/R$styleable;->DialogPreference:[I
+Lcom/android/internal/R$styleable;->DialogPreference_dialogTitle:I
+Lcom/android/internal/R$styleable;->Dream:[I
+Lcom/android/internal/R$styleable;->EdgeEffect:[I
+Lcom/android/internal/R$styleable;->EdgeEffect_colorEdgeEffect:I
+Lcom/android/internal/R$styleable;->FastScroll:[I
+Lcom/android/internal/R$styleable;->FrameLayout:[I
+Lcom/android/internal/R$styleable;->FrameLayout_Layout:[I
+Lcom/android/internal/R$styleable;->Gallery:[I
+Lcom/android/internal/R$styleable;->GridView:[I
+Lcom/android/internal/R$styleable;->IconMenuView:[I
+Lcom/android/internal/R$styleable;->ImageView:[I
+Lcom/android/internal/R$styleable;->ImageView_scaleType:I
+Lcom/android/internal/R$styleable;->ImageView_src:I
+Lcom/android/internal/R$styleable;->Keyboard:[I
+Lcom/android/internal/R$styleable;->KeyboardView:[I
+Lcom/android/internal/R$styleable;->Keyboard_Key:[I
+Lcom/android/internal/R$styleable;->Keyboard_Row:[I
+Lcom/android/internal/R$styleable;->LinearLayout:[I
+Lcom/android/internal/R$styleable;->ListPreference:[I
+Lcom/android/internal/R$styleable;->ListPreference_entries:I
+Lcom/android/internal/R$styleable;->ListView:[I
+Lcom/android/internal/R$styleable;->ListView_divider:I
+Lcom/android/internal/R$styleable;->ListView_dividerHeight:I
+Lcom/android/internal/R$styleable;->ListView_entries:I
+Lcom/android/internal/R$styleable;->ListView_footerDividersEnabled:I
+Lcom/android/internal/R$styleable;->ListView_headerDividersEnabled:I
+Lcom/android/internal/R$styleable;->ListView_overScrollFooter:I
+Lcom/android/internal/R$styleable;->ListView_overScrollHeader:I
+Lcom/android/internal/R$styleable;->MapView:[I
+Lcom/android/internal/R$styleable;->MapView_apiKey:I
+Lcom/android/internal/R$styleable;->MenuGroup:[I
+Lcom/android/internal/R$styleable;->MenuItem:[I
+Lcom/android/internal/R$styleable;->MenuView:[I
+Lcom/android/internal/R$styleable;->PopupWindow:[I
+Lcom/android/internal/R$styleable;->PopupWindow_popupAnimationStyle:I
+Lcom/android/internal/R$styleable;->PopupWindow_popupBackground:I
+Lcom/android/internal/R$styleable;->Preference:[I
+Lcom/android/internal/R$styleable;->PreferenceGroup:[I
+Lcom/android/internal/R$styleable;->PreferenceGroup_orderingFromXml:I
+Lcom/android/internal/R$styleable;->Preference_defaultValue:I
+Lcom/android/internal/R$styleable;->Preference_dependency:I
+Lcom/android/internal/R$styleable;->Preference_enabled:I
+Lcom/android/internal/R$styleable;->Preference_fragment:I
+Lcom/android/internal/R$styleable;->Preference_icon:I
+Lcom/android/internal/R$styleable;->Preference_key:I
+Lcom/android/internal/R$styleable;->Preference_layout:I
+Lcom/android/internal/R$styleable;->Preference_order:I
+Lcom/android/internal/R$styleable;->Preference_persistent:I
+Lcom/android/internal/R$styleable;->Preference_selectable:I
+Lcom/android/internal/R$styleable;->Preference_shouldDisableView:I
+Lcom/android/internal/R$styleable;->Preference_summary:I
+Lcom/android/internal/R$styleable;->Preference_title:I
+Lcom/android/internal/R$styleable;->Preference_widgetLayout:I
+Lcom/android/internal/R$styleable;->ProgressBar:[I
+Lcom/android/internal/R$styleable;->QuickContactBadge:[I
+Lcom/android/internal/R$styleable;->RingtonePreference:[I
+Lcom/android/internal/R$styleable;->ScrollView:[I
+Lcom/android/internal/R$styleable;->ScrollView_fillViewport:I
+Lcom/android/internal/R$styleable;->Searchable:[I
+Lcom/android/internal/R$styleable;->SearchableActionKey:[I
+Lcom/android/internal/R$styleable;->SelectionModeDrawables:[I
+Lcom/android/internal/R$styleable;->Switch:[I
+Lcom/android/internal/R$styleable;->SwitchPreference:[I
+Lcom/android/internal/R$styleable;->SyncAdapter:[I
+Lcom/android/internal/R$styleable;->SyncAdapter_accountType:I
+Lcom/android/internal/R$styleable;->SyncAdapter_allowParallelSyncs:I
+Lcom/android/internal/R$styleable;->SyncAdapter_contentAuthority:I
+Lcom/android/internal/R$styleable;->SyncAdapter_isAlwaysSyncable:I
+Lcom/android/internal/R$styleable;->SyncAdapter_settingsActivity:I
+Lcom/android/internal/R$styleable;->SyncAdapter_supportsUploading:I
+Lcom/android/internal/R$styleable;->SyncAdapter_userVisible:I
+Lcom/android/internal/R$styleable;->TabWidget:[I
+Lcom/android/internal/R$styleable;->TextAppearance:[I
+Lcom/android/internal/R$styleable;->TextAppearance_fontFamily:I
+Lcom/android/internal/R$styleable;->TextAppearance_textAllCaps:I
+Lcom/android/internal/R$styleable;->TextAppearance_textColor:I
+Lcom/android/internal/R$styleable;->TextAppearance_textColorHighlight:I
+Lcom/android/internal/R$styleable;->TextAppearance_textColorHint:I
+Lcom/android/internal/R$styleable;->TextAppearance_textColorLink:I
+Lcom/android/internal/R$styleable;->TextAppearance_textSize:I
+Lcom/android/internal/R$styleable;->TextAppearance_textStyle:I
+Lcom/android/internal/R$styleable;->TextAppearance_typeface:I
+Lcom/android/internal/R$styleable;->TextClock:[I
+Lcom/android/internal/R$styleable;->TextView:[I
+Lcom/android/internal/R$styleable;->TextViewAppearance:[I
+Lcom/android/internal/R$styleable;->TextViewAppearance_textAppearance:I
+Lcom/android/internal/R$styleable;->TextView_autoLink:I
+Lcom/android/internal/R$styleable;->TextView_autoText:I
+Lcom/android/internal/R$styleable;->TextView_bufferType:I
+Lcom/android/internal/R$styleable;->TextView_capitalize:I
+Lcom/android/internal/R$styleable;->TextView_cursorVisible:I
+Lcom/android/internal/R$styleable;->TextView_digits:I
+Lcom/android/internal/R$styleable;->TextView_drawableBottom:I
+Lcom/android/internal/R$styleable;->TextView_drawableEnd:I
+Lcom/android/internal/R$styleable;->TextView_drawableLeft:I
+Lcom/android/internal/R$styleable;->TextView_drawablePadding:I
+Lcom/android/internal/R$styleable;->TextView_drawableRight:I
+Lcom/android/internal/R$styleable;->TextView_drawableStart:I
+Lcom/android/internal/R$styleable;->TextView_drawableTop:I
+Lcom/android/internal/R$styleable;->TextView_editable:I
+Lcom/android/internal/R$styleable;->TextView_editorExtras:I
+Lcom/android/internal/R$styleable;->TextView_ellipsize:I
+Lcom/android/internal/R$styleable;->TextView_ems:I
+Lcom/android/internal/R$styleable;->TextView_enabled:I
+Lcom/android/internal/R$styleable;->TextView_freezesText:I
+Lcom/android/internal/R$styleable;->TextView_gravity:I
+Lcom/android/internal/R$styleable;->TextView_height:I
+Lcom/android/internal/R$styleable;->TextView_hint:I
+Lcom/android/internal/R$styleable;->TextView_imeActionId:I
+Lcom/android/internal/R$styleable;->TextView_imeActionLabel:I
+Lcom/android/internal/R$styleable;->TextView_imeOptions:I
+Lcom/android/internal/R$styleable;->TextView_includeFontPadding:I
+Lcom/android/internal/R$styleable;->TextView_inputMethod:I
+Lcom/android/internal/R$styleable;->TextView_inputType:I
+Lcom/android/internal/R$styleable;->TextView_lines:I
+Lcom/android/internal/R$styleable;->TextView_lineSpacingExtra:I
+Lcom/android/internal/R$styleable;->TextView_lineSpacingMultiplier:I
+Lcom/android/internal/R$styleable;->TextView_linksClickable:I
+Lcom/android/internal/R$styleable;->TextView_marqueeRepeatLimit:I
+Lcom/android/internal/R$styleable;->TextView_maxEms:I
+Lcom/android/internal/R$styleable;->TextView_maxHeight:I
+Lcom/android/internal/R$styleable;->TextView_maxLength:I
+Lcom/android/internal/R$styleable;->TextView_maxLines:I
+Lcom/android/internal/R$styleable;->TextView_maxWidth:I
+Lcom/android/internal/R$styleable;->TextView_minEms:I
+Lcom/android/internal/R$styleable;->TextView_minHeight:I
+Lcom/android/internal/R$styleable;->TextView_minLines:I
+Lcom/android/internal/R$styleable;->TextView_minWidth:I
+Lcom/android/internal/R$styleable;->TextView_numeric:I
+Lcom/android/internal/R$styleable;->TextView_password:I
+Lcom/android/internal/R$styleable;->TextView_phoneNumber:I
+Lcom/android/internal/R$styleable;->TextView_privateImeOptions:I
+Lcom/android/internal/R$styleable;->TextView_scrollHorizontally:I
+Lcom/android/internal/R$styleable;->TextView_selectAllOnFocus:I
+Lcom/android/internal/R$styleable;->TextView_shadowColor:I
+Lcom/android/internal/R$styleable;->TextView_shadowDx:I
+Lcom/android/internal/R$styleable;->TextView_shadowDy:I
+Lcom/android/internal/R$styleable;->TextView_shadowRadius:I
+Lcom/android/internal/R$styleable;->TextView_singleLine:I
+Lcom/android/internal/R$styleable;->TextView_text:I
+Lcom/android/internal/R$styleable;->TextView_textAllCaps:I
+Lcom/android/internal/R$styleable;->TextView_textAppearance:I
+Lcom/android/internal/R$styleable;->TextView_textColor:I
+Lcom/android/internal/R$styleable;->TextView_textColorHighlight:I
+Lcom/android/internal/R$styleable;->TextView_textColorHint:I
+Lcom/android/internal/R$styleable;->TextView_textColorLink:I
+Lcom/android/internal/R$styleable;->TextView_textCursorDrawable:I
+Lcom/android/internal/R$styleable;->TextView_textEditSuggestionItemLayout:I
+Lcom/android/internal/R$styleable;->TextView_textIsSelectable:I
+Lcom/android/internal/R$styleable;->TextView_textScaleX:I
+Lcom/android/internal/R$styleable;->TextView_textSelectHandle:I
+Lcom/android/internal/R$styleable;->TextView_textSelectHandleLeft:I
+Lcom/android/internal/R$styleable;->TextView_textSelectHandleRight:I
+Lcom/android/internal/R$styleable;->TextView_textSize:I
+Lcom/android/internal/R$styleable;->TextView_textStyle:I
+Lcom/android/internal/R$styleable;->TextView_typeface:I
+Lcom/android/internal/R$styleable;->TextView_width:I
+Lcom/android/internal/R$styleable;->Theme:[I
+Lcom/android/internal/R$styleable;->View:[I
+Lcom/android/internal/R$styleable;->ViewAnimator:[I
+Lcom/android/internal/R$styleable;->ViewFlipper:[I
+Lcom/android/internal/R$styleable;->ViewGroup_Layout:[I
+Lcom/android/internal/R$styleable;->ViewGroup_Layout_layout_height:I
+Lcom/android/internal/R$styleable;->ViewGroup_Layout_layout_width:I
+Lcom/android/internal/R$styleable;->ViewStub:[I
+Lcom/android/internal/R$styleable;->ViewStub_inflatedId:I
+Lcom/android/internal/R$styleable;->ViewStub_layout:I
+Lcom/android/internal/R$styleable;->View_background:I
+Lcom/android/internal/R$styleable;->View_clickable:I
+Lcom/android/internal/R$styleable;->View_focusable:I
+Lcom/android/internal/R$styleable;->View_id:I
+Lcom/android/internal/R$styleable;->View_longClickable:I
+Lcom/android/internal/R$styleable;->WallpaperPreviewInfo:[I
+Lcom/android/internal/R$styleable;->Window:[I
+Lcom/android/internal/R$styleable;->WindowAnimation:[I
+Lcom/android/internal/R$styleable;->Window_windowActionBarFullscreenDecorLayout:I
+Lcom/android/internal/R$styleable;->Window_windowIsFloating:I
+Lcom/android/internal/R$styleable;->Window_windowIsTranslucent:I
+Lcom/android/internal/R$styleable;->Window_windowShowWallpaper:I
+Lcom/android/internal/R$xml;->power_profile:I
+Lcom/android/internal/statusbar/IStatusBar$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/statusbar/IStatusBar;
+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/statusbar/IStatusBarService;->collapsePanels()V
+Lcom/android/internal/statusbar/IStatusBarService;->disable(ILandroid/os/IBinder;Ljava/lang/String;)V
+Lcom/android/internal/statusbar/IStatusBarService;->expandNotificationsPanel()V
+Lcom/android/internal/statusbar/IStatusBarService;->handleSystemKey(I)V
+Lcom/android/internal/statusbar/IStatusBarService;->removeIcon(Ljava/lang/String;)V
+Lcom/android/internal/statusbar/IStatusBarService;->setIconVisibility(Ljava/lang/String;Z)V
+Lcom/android/internal/telecom/ITelecomService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telecom/ITelecomService;
+Lcom/android/internal/telecom/ITelecomService;->getCallState()I
+Lcom/android/internal/telephony/CallerInfo;-><init>()V
+Lcom/android/internal/telephony/CallerInfo;->contactIdOrZero:J
+Lcom/android/internal/telephony/CallerInfo;->getCallerInfo(Landroid/content/Context;Landroid/net/Uri;)Lcom/android/internal/telephony/CallerInfo;
+Lcom/android/internal/telephony/CallerInfo;->getCallerInfo(Landroid/content/Context;Ljava/lang/String;)Lcom/android/internal/telephony/CallerInfo;
+Lcom/android/internal/telephony/CallerInfo;->getCallerInfo(Landroid/content/Context;Ljava/lang/String;I)Lcom/android/internal/telephony/CallerInfo;
+Lcom/android/internal/telephony/CallerInfo;->name:Ljava/lang/String;
+Lcom/android/internal/telephony/CallerInfo;->numberLabel:Ljava/lang/String;
+Lcom/android/internal/telephony/CallerInfo;->numberType:I
+Lcom/android/internal/telephony/CallerInfo;->phoneNumber:Ljava/lang/String;
+Lcom/android/internal/telephony/EncodeException;-><init>(C)V
+Lcom/android/internal/telephony/EncodeException;-><init>(Ljava/lang/String;)V
+Lcom/android/internal/telephony/GsmAlphabet$LanguagePairCount;-><init>(I)V
+Lcom/android/internal/telephony/GsmAlphabet$LanguagePairCount;->languageCode:I
+Lcom/android/internal/telephony/GsmAlphabet$LanguagePairCount;->septetCounts:[I
+Lcom/android/internal/telephony/GsmAlphabet$LanguagePairCount;->unencodableCounts:[I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;-><init>()V
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->codeUnitCount:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->codeUnitSize:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->codeUnitsRemaining:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->languageShiftTable:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->languageTable:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->msgCount:I
+Lcom/android/internal/telephony/GsmAlphabet;->charToGsm(C)I
+Lcom/android/internal/telephony/GsmAlphabet;->charToGsm(CZ)I
+Lcom/android/internal/telephony/GsmAlphabet;->countGsmSeptets(CZ)I
+Lcom/android/internal/telephony/GsmAlphabet;->findGsmSeptetLimitIndex(Ljava/lang/String;IIII)I
+Lcom/android/internal/telephony/GsmAlphabet;->gsm7BitPackedToString([BIIIII)Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->gsm8BitUnpackedToString([BII)Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->gsm8BitUnpackedToString([BIILjava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->gsmToChar(I)C
+Lcom/android/internal/telephony/GsmAlphabet;->packSmsChar([BII)V
+Lcom/android/internal/telephony/GsmAlphabet;->sCharsToGsmTables:[Landroid/util/SparseIntArray;
+Lcom/android/internal/telephony/GsmAlphabet;->sCharsToShiftTables:[Landroid/util/SparseIntArray;
+Lcom/android/internal/telephony/GsmAlphabet;->sEnabledLockingShiftTables:[I
+Lcom/android/internal/telephony/GsmAlphabet;->sEnabledSingleShiftTables:[I
+Lcom/android/internal/telephony/GsmAlphabet;->sHighestEnabledSingleShiftCode:I
+Lcom/android/internal/telephony/GsmAlphabet;->sLanguageShiftTables:[Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->sLanguageTables:[Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPacked(Ljava/lang/String;IZII)[B
+Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPackedWithHeader(Ljava/lang/String;[BII)[B
+Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm8BitPacked(Ljava/lang/String;)[B
+Lcom/android/internal/telephony/ICarrierConfigLoader;->getConfigForSubId(I)Landroid/os/PersistableBundle;
+Lcom/android/internal/telephony/IMms$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IMms;
+Lcom/android/internal/telephony/IPhoneStateListener$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IPhoneStateListener;
+Lcom/android/internal/telephony/IPhoneStateListener;->onCallForwardingIndicatorChanged(Z)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onCallStateChanged(ILjava/lang/String;)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onCellLocationChanged(Landroid/os/Bundle;)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onDataActivity(I)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onDataConnectionStateChanged(II)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onMessageWaitingIndicatorChanged(Z)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onServiceStateChanged(Landroid/telephony/ServiceState;)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onSignalStrengthChanged(I)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onSignalStrengthsChanged(Landroid/telephony/SignalStrength;)V
+Lcom/android/internal/telephony/IPhoneSubInfo$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/telephony/IPhoneSubInfo$Stub;-><init>()V
+Lcom/android/internal/telephony/IPhoneSubInfo$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IPhoneSubInfo;
+Lcom/android/internal/telephony/IPhoneSubInfo;->getIccSerialNumber(Ljava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/IPhoneSubInfo;->getSubscriberId(Ljava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/ISms$Stub;-><init>()V
+Lcom/android/internal/telephony/ISms$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ISms;
+Lcom/android/internal/telephony/ISub$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/telephony/ISub$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ISub;
+Lcom/android/internal/telephony/ISub;->getDefaultDataSubId()I
+Lcom/android/internal/telephony/ISub;->getDefaultSubId()I
+Lcom/android/internal/telephony/ISub;->setDefaultDataSubId(I)V
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->endCall()Z
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->endCallForSubscriber(I)Z
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->getDeviceId(Ljava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Lcom/android/internal/telephony/ITelephony$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ITelephony;
+Lcom/android/internal/telephony/ITelephony$Stub;->DESCRIPTOR:Ljava/lang/String;
+Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_answerRingingCall:I
+Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_call:I
+Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_endCall:I
+Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_getDeviceId:I
+Lcom/android/internal/telephony/ITelephony;->answerRingingCall()V
+Lcom/android/internal/telephony/ITelephony;->call(Ljava/lang/String;Ljava/lang/String;)V
+Lcom/android/internal/telephony/ITelephony;->dial(Ljava/lang/String;)V
+Lcom/android/internal/telephony/ITelephony;->disableDataConnectivity()Z
+Lcom/android/internal/telephony/ITelephony;->disableLocationUpdates()V
+Lcom/android/internal/telephony/ITelephony;->enableDataConnectivity()Z
+Lcom/android/internal/telephony/ITelephony;->enableLocationUpdates()V
+Lcom/android/internal/telephony/ITelephony;->endCall()Z
+Lcom/android/internal/telephony/ITelephony;->endCallForSubscriber(I)Z
+Lcom/android/internal/telephony/ITelephony;->getActivePhoneType()I
+Lcom/android/internal/telephony/ITelephony;->getCallState()I
+Lcom/android/internal/telephony/ITelephony;->getDataActivity()I
+Lcom/android/internal/telephony/ITelephony;->getDataState()I
+Lcom/android/internal/telephony/ITelephony;->getNetworkType()I
+Lcom/android/internal/telephony/ITelephony;->getVoiceMessageCount()I
+Lcom/android/internal/telephony/ITelephony;->handlePinMmi(Ljava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->handlePinMmiForSubscriber(ILjava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->hasIccCard()Z
+Lcom/android/internal/telephony/ITelephony;->iccCloseLogicalChannel(II)Z
+Lcom/android/internal/telephony/ITelephony;->iccTransmitApduLogicalChannel(IIIIIIILjava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/ITelephony;->isIdle(Ljava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->isIdleForSubscriber(ILjava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->isRadioOnForSubscriber(ILjava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->isRinging(Ljava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->setRadio(Z)Z
+Lcom/android/internal/telephony/ITelephony;->silenceRinger()V
+Lcom/android/internal/telephony/ITelephony;->supplyPin(Ljava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->toggleRadioOnOff()V
+Lcom/android/internal/telephony/ITelephony;->updateServiceLocation()V
+Lcom/android/internal/telephony/ITelephonyRegistry$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/telephony/ITelephonyRegistry$Stub;-><init>()V
+Lcom/android/internal/telephony/ITelephonyRegistry$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ITelephonyRegistry;
+Lcom/android/internal/telephony/ITelephonyRegistry;->listen(Ljava/lang/String;Lcom/android/internal/telephony/IPhoneStateListener;IZ)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCallForwardingChanged(Z)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCallState(ILjava/lang/String;)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCellInfo(Ljava/util/List;)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCellLocation(Landroid/os/Bundle;)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyDataActivity(I)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyDataConnectionFailed(Ljava/lang/String;Ljava/lang/String;)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyOtaspChanged(I)V
+Lcom/android/internal/telephony/IWapPushManager$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IWapPushManager;
+Lcom/android/internal/telephony/IWapPushManager;->addPackage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)Z
+Lcom/android/internal/telephony/IWapPushManager;->deletePackage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
+Lcom/android/internal/telephony/IWapPushManager;->updatePackage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)Z
+Lcom/android/internal/telephony/OperatorInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+Lcom/android/internal/telephony/OperatorInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/android/internal/telephony/OperatorInfo$State;)V
+Lcom/android/internal/telephony/OperatorInfo;->mOperatorAlphaLong:Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->mOperatorAlphaShort:Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->mOperatorNumeric:Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->mState:Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/telephony/OperatorInfo;->rilStateToState(Ljava/lang/String;)Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/telephony/SmsAddress;->origBytes:[B
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->CLASS_0:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->CLASS_1:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->CLASS_2:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->CLASS_3:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->UNKNOWN:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsHeader$ConcatRef;-><init>()V
+Lcom/android/internal/telephony/SmsHeader$ConcatRef;->msgCount:I
+Lcom/android/internal/telephony/SmsHeader$ConcatRef;->refNumber:I
+Lcom/android/internal/telephony/SmsHeader$ConcatRef;->seqNumber:I
+Lcom/android/internal/telephony/SmsHeader$PortAddrs;-><init>()V
+Lcom/android/internal/telephony/SmsHeader$PortAddrs;->destPort:I
+Lcom/android/internal/telephony/SmsHeader$PortAddrs;->origPort:I
+Lcom/android/internal/telephony/SmsHeader;-><init>()V
+Lcom/android/internal/telephony/SmsHeader;->concatRef:Lcom/android/internal/telephony/SmsHeader$ConcatRef;
+Lcom/android/internal/telephony/SmsHeader;->fromByteArray([B)Lcom/android/internal/telephony/SmsHeader;
+Lcom/android/internal/telephony/SmsHeader;->languageShiftTable:I
+Lcom/android/internal/telephony/SmsHeader;->languageTable:I
+Lcom/android/internal/telephony/SmsHeader;->portAddrs:Lcom/android/internal/telephony/SmsHeader$PortAddrs;
+Lcom/android/internal/telephony/SmsHeader;->toByteArray(Lcom/android/internal/telephony/SmsHeader;)[B
+Lcom/android/internal/telephony/SmsMessageBase$SubmitPduBase;->encodedMessage:[B
+Lcom/android/internal/telephony/SmsMessageBase$SubmitPduBase;->encodedScAddress:[B
+Lcom/android/internal/telephony/SmsMessageBase;-><init>()V
+Lcom/android/internal/telephony/SmsMessageBase;->getDisplayMessageBody()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getDisplayOriginatingAddress()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getMessageBody()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getOriginatingAddress()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getProtocolIdentifier()I
+Lcom/android/internal/telephony/SmsMessageBase;->getPseudoSubject()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getServiceCenterAddress()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getStatus()I
+Lcom/android/internal/telephony/SmsMessageBase;->getTimestampMillis()J
+Lcom/android/internal/telephony/SmsMessageBase;->getUserData()[B
+Lcom/android/internal/telephony/SmsMessageBase;->getUserDataHeader()Lcom/android/internal/telephony/SmsHeader;
+Lcom/android/internal/telephony/SmsMessageBase;->isReplace()Z
+Lcom/android/internal/telephony/SmsMessageBase;->isReplyPathPresent()Z
+Lcom/android/internal/telephony/SmsMessageBase;->isStatusReportMessage()Z
+Lcom/android/internal/telephony/SmsMessageBase;->mIsMwi:Z
+Lcom/android/internal/telephony/SmsMessageBase;->mMessageBody:Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->mMessageRef:I
+Lcom/android/internal/telephony/SmsMessageBase;->mMwiDontStore:Z
+Lcom/android/internal/telephony/SmsMessageBase;->mMwiSense:Z
+Lcom/android/internal/telephony/SmsMessageBase;->mOriginatingAddress:Lcom/android/internal/telephony/SmsAddress;
+Lcom/android/internal/telephony/SmsMessageBase;->mPdu:[B
+Lcom/android/internal/telephony/SmsMessageBase;->mScAddress:Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->mUserDataHeader:Lcom/android/internal/telephony/SmsHeader;
+Lcom/android/internal/telephony/SmsRawData;-><init>([B)V
+Lcom/android/internal/telephony/SmsRawData;->CREATOR:Landroid/os/Parcelable$Creator;
+Lcom/android/internal/telephony/SmsRawData;->getBytes()[B
+Lcom/android/internal/textservice/ITextServicesManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/util/AsyncChannel;->cmdToString(I)Ljava/lang/String;
+Lcom/android/internal/util/AsyncChannel;->CMD_CHANNEL_FULL_CONNECTION:I
+Lcom/android/internal/util/AsyncChannel;->CMD_CHANNEL_HALF_CONNECTED:I
+Lcom/android/internal/util/AsyncChannel;->connected(Landroid/content/Context;Landroid/os/Handler;Landroid/os/Messenger;)V
+Lcom/android/internal/util/AsyncChannel;->connectSync(Landroid/content/Context;Landroid/os/Handler;Landroid/os/Messenger;)I
+Lcom/android/internal/util/AsyncChannel;->disconnect()V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;I)V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;II)V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;IIILjava/lang/Object;)V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;ILjava/lang/Object;)V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;Landroid/os/Message;)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(I)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(II)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(III)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(IIILjava/lang/Object;)V
+Lcom/android/internal/util/AsyncChannel;->sendMessageSynchronously(III)Landroid/os/Message;
+Lcom/android/internal/util/AsyncChannel;->sendMessageSynchronously(Landroid/os/Message;)Landroid/os/Message;
+Lcom/android/internal/util/AsyncChannel;->STATUS_SUCCESSFUL:I
+Lcom/android/internal/util/FastPrintWriter;-><init>(Ljava/io/OutputStream;)V
+Lcom/android/internal/util/XmlUtils;->convertValueToBoolean(Ljava/lang/CharSequence;Z)Z
+Lcom/android/internal/util/XmlUtils;->convertValueToInt(Ljava/lang/CharSequence;I)I
+Lcom/android/internal/util/XmlUtils;->readMapXml(Ljava/io/InputStream;)Ljava/util/HashMap;
+Lcom/android/internal/util/XmlUtils;->skipCurrentTag(Lorg/xmlpull/v1/XmlPullParser;)V
+Lcom/android/internal/util/XmlUtils;->writeMapXml(Ljava/util/Map;Ljava/io/OutputStream;)V
+Lcom/android/internal/view/BaseIWindow;-><init>()V
+Lcom/android/internal/view/IInputConnectionWrapper;->mInputConnection:Landroid/view/inputmethod/InputConnection;
+Lcom/android/internal/view/IInputConnectionWrapper;->mLock:Ljava/lang/Object;
+Lcom/android/internal/view/IInputMethod$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/view/IInputMethod;
+Lcom/android/internal/view/IInputMethod;->attachToken(Landroid/os/IBinder;)V
+Lcom/android/internal/view/IInputMethod;->bindInput(Landroid/view/inputmethod/InputBinding;)V
+Lcom/android/internal/view/IInputMethod;->hideSoftInput(ILandroid/os/ResultReceiver;)V
+Lcom/android/internal/view/IInputMethod;->setSessionEnabled(Lcom/android/internal/view/IInputMethodSession;Z)V
+Lcom/android/internal/view/IInputMethod;->showSoftInput(ILandroid/os/ResultReceiver;)V
+Lcom/android/internal/view/IInputMethod;->unbindInput()V
+Lcom/android/internal/view/IInputMethodClient;->onBindMethod(Lcom/android/internal/view/InputBindResult;)V
+Lcom/android/internal/view/IInputMethodClient;->setUsingInputMethod(Z)V
+Lcom/android/internal/view/IInputMethodManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/view/IInputMethodManager$Stub$Proxy;->getEnabledInputMethodList()Ljava/util/List;
+Lcom/android/internal/view/IInputMethodManager$Stub;-><init>()V
+Lcom/android/internal/view/IInputMethodManager$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/view/IInputMethodManager;
+Lcom/android/internal/view/IInputMethodManager;->addClient(Lcom/android/internal/view/IInputMethodClient;Lcom/android/internal/view/IInputContext;II)V
+Lcom/android/internal/view/IInputMethodManager;->removeClient(Lcom/android/internal/view/IInputMethodClient;)V
+Lcom/android/internal/view/IInputMethodSession$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/view/IInputMethodSession;
+Lcom/android/internal/view/InputBindResult;->CREATOR:Landroid/os/Parcelable$Creator;
+Lcom/android/internal/view/InputBindResult;->method:Lcom/android/internal/view/IInputMethodSession;
+Lcom/android/internal/view/menu/ActionMenuItemView;->hasText()Z
+Lcom/android/internal/view/menu/MenuBuilder$Callback;->onMenuItemSelected(Lcom/android/internal/view/menu/MenuBuilder;Landroid/view/MenuItem;)Z
+Lcom/android/internal/view/menu/MenuBuilder$Callback;->onMenuModeChange(Lcom/android/internal/view/menu/MenuBuilder;)V
+Lcom/android/internal/view/menu/MenuBuilder;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/view/menu/MenuBuilder;->addMenuPresenter(Lcom/android/internal/view/menu/MenuPresenter;)V
+Lcom/android/internal/view/menu/MenuBuilder;->addMenuPresenter(Lcom/android/internal/view/menu/MenuPresenter;Landroid/content/Context;)V
+Lcom/android/internal/view/menu/MenuBuilder;->collapseItemActionView(Lcom/android/internal/view/menu/MenuItemImpl;)Z
+Lcom/android/internal/view/menu/MenuBuilder;->getContext()Landroid/content/Context;
+Lcom/android/internal/view/menu/MenuBuilder;->getNonActionItems()Ljava/util/ArrayList;
+Lcom/android/internal/view/menu/MenuBuilder;->getRootMenu()Lcom/android/internal/view/menu/MenuBuilder;
+Lcom/android/internal/view/menu/MenuBuilder;->getVisibleItems()Ljava/util/ArrayList;
+Lcom/android/internal/view/menu/MenuBuilder;->mContext:Landroid/content/Context;
+Lcom/android/internal/view/menu/MenuBuilder;->removeMenuPresenter(Lcom/android/internal/view/menu/MenuPresenter;)V
+Lcom/android/internal/view/menu/MenuBuilder;->setCallback(Lcom/android/internal/view/menu/MenuBuilder$Callback;)V
+Lcom/android/internal/view/menu/MenuBuilder;->setCurrentMenuInfo(Landroid/view/ContextMenu$ContextMenuInfo;)V
+Lcom/android/internal/view/menu/MenuBuilder;->setDefaultShowAsAction(I)Lcom/android/internal/view/menu/MenuBuilder;
+Lcom/android/internal/view/menu/MenuBuilder;->setOptionalIconsVisible(Z)V
+Lcom/android/internal/view/menu/MenuBuilder;->startDispatchingItemsChanged()V
+Lcom/android/internal/view/menu/MenuBuilder;->stopDispatchingItemsChanged()V
+Lcom/android/internal/view/menu/MenuItemImpl;->invoke()Z
+Lcom/android/internal/view/menu/MenuItemImpl;->isActionButton()Z
+Lcom/android/internal/view/menu/MenuItemImpl;->mIconResId:I
+Lcom/android/internal/view/menu/MenuItemImpl;->requestsActionButton()Z
+Lcom/android/internal/view/menu/MenuItemImpl;->requiresActionButton()Z
+Lcom/android/internal/view/menu/MenuItemImpl;->setActionViewExpanded(Z)V
+Lcom/android/internal/view/menu/MenuItemImpl;->setMenuInfo(Landroid/view/ContextMenu$ContextMenuInfo;)V
+Lcom/android/internal/view/menu/MenuPopupHelper;-><init>(Landroid/content/Context;Lcom/android/internal/view/menu/MenuBuilder;)V
+Lcom/android/internal/view/menu/MenuPopupHelper;-><init>(Landroid/content/Context;Lcom/android/internal/view/menu/MenuBuilder;Landroid/view/View;)V
+Lcom/android/internal/view/menu/MenuPopupHelper;->dismiss()V
+Lcom/android/internal/view/menu/MenuPopupHelper;->mForceShowIcon:Z
+Lcom/android/internal/view/menu/MenuPopupHelper;->setForceShowIcon(Z)V
+Lcom/android/internal/view/menu/MenuPopupHelper;->setGravity(I)V
+Lcom/android/internal/view/menu/MenuPopupHelper;->show()V
+Lcom/android/internal/view/menu/MenuPopupHelper;->tryShow()Z
+Lcom/android/internal/view/menu/MenuPresenter$Callback;->onOpenSubMenu(Lcom/android/internal/view/menu/MenuBuilder;)Z
+Lcom/android/internal/view/menu/MenuView$ItemView;->getItemData()Lcom/android/internal/view/menu/MenuItemImpl;
+Lcom/android/internal/view/menu/MenuView;->getWindowAnimations()I
+Lcom/android/internal/view/menu/SubMenuBuilder;->getRootMenu()Lcom/android/internal/view/menu/MenuBuilder;
+Lcom/android/internal/view/menu/SubMenuBuilder;->setCallback(Lcom/android/internal/view/menu/MenuBuilder$Callback;)V
+Lcom/android/internal/widget/CachingIconView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Lcom/android/internal/widget/ILockSettings$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/widget/ILockSettings;
+Lcom/android/internal/widget/ILockSettings;->getBoolean(Ljava/lang/String;ZI)Z
+Lcom/android/internal/widget/ILockSettings;->getLong(Ljava/lang/String;JI)J
+Lcom/android/internal/widget/ILockSettings;->getString(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
+Lcom/android/internal/widget/ILockSettings;->havePassword(I)Z
+Lcom/android/internal/widget/ILockSettings;->havePattern(I)Z
+Lcom/android/internal/widget/ILockSettings;->setBoolean(Ljava/lang/String;ZI)V
+Lcom/android/internal/widget/ILockSettings;->setLong(Ljava/lang/String;JI)V
+Lcom/android/internal/widget/ILockSettings;->setString(Ljava/lang/String;Ljava/lang/String;I)V
+Lcom/android/internal/widget/IRemoteViewsFactory$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/widget/IRemoteViewsFactory;
+Lcom/android/internal/widget/IRemoteViewsFactory;->getCount()I
+Lcom/android/internal/widget/IRemoteViewsFactory;->getItemId(I)J
+Lcom/android/internal/widget/IRemoteViewsFactory;->getLoadingView()Landroid/widget/RemoteViews;
+Lcom/android/internal/widget/IRemoteViewsFactory;->getViewAt(I)Landroid/widget/RemoteViews;
+Lcom/android/internal/widget/IRemoteViewsFactory;->getViewTypeCount()I
+Lcom/android/internal/widget/IRemoteViewsFactory;->hasStableIds()Z
+Lcom/android/internal/widget/IRemoteViewsFactory;->isCreated()Z
+Lcom/android/internal/widget/IRemoteViewsFactory;->onDataSetChanged()V
+Lcom/android/internal/widget/ScrollingTabContainerView;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->addTab(Landroid/app/ActionBar$Tab;IZ)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->addTab(Landroid/app/ActionBar$Tab;Z)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->animateToTab(I)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->animateToVisibility(I)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->removeAllTabs()V
+Lcom/android/internal/widget/ScrollingTabContainerView;->removeTabAt(I)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->setAllowCollapse(Z)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->setTabSelected(I)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->updateTab(I)V
+Lcom/android/okhttp/Connection;->getSocket()Ljava/net/Socket;
+Lcom/android/okhttp/ConnectionPool;->connections:Ljava/util/Deque;
+Lcom/android/okhttp/ConnectionPool;->keepAliveDurationNs:J
+Lcom/android/okhttp/ConnectionPool;->maxIdleConnections:I
+Lcom/android/okhttp/ConnectionPool;->systemDefault:Lcom/android/okhttp/ConnectionPool;
+Lcom/android/okhttp/HttpUrl$Builder;->build()Lcom/android/okhttp/HttpUrl;
+Lcom/android/okhttp/HttpUrl;->encodedPath()Ljava/lang/String;
+Lcom/android/okhttp/HttpUrl;->newBuilder()Lcom/android/okhttp/HttpUrl$Builder;
+Lcom/android/okhttp/HttpUrl;->parse(Ljava/lang/String;)Lcom/android/okhttp/HttpUrl;
+Lcom/android/okhttp/HttpUrl;->query()Ljava/lang/String;
+Lcom/android/okhttp/internal/http/HttpEngine;->getConnection()Lcom/android/okhttp/Connection;
+Lcom/android/okhttp/internal/http/HttpEngine;->hasResponse()Z
+Lcom/android/okhttp/internal/http/HttpEngine;->httpStream:Lcom/android/okhttp/internal/http/HttpStream;
+Lcom/android/okhttp/internal/http/HttpEngine;->networkRequest(Lcom/android/okhttp/Request;)Lcom/android/okhttp/Request;
+Lcom/android/okhttp/internal/http/HttpEngine;->networkRequest:Lcom/android/okhttp/Request;
+Lcom/android/okhttp/internal/http/HttpEngine;->priorResponse:Lcom/android/okhttp/Response;
+Lcom/android/okhttp/internal/http/HttpEngine;->readResponse()V
+Lcom/android/okhttp/internal/http/HttpEngine;->sendRequest()V
+Lcom/android/okhttp/internal/http/HttpEngine;->sentRequestMillis:J
+Lcom/android/okhttp/internal/http/HttpEngine;->userResponse:Lcom/android/okhttp/Response;
+Lcom/android/okhttp/internal/http/HttpEngine;->writingRequestHeaders()V
+Lcom/android/okhttp/internal/http/RouteSelector;->hasNext()Z
+Lcom/android/okhttp/OkHttpClient;-><init>()V
+Lcom/android/okhttp/OkHttpClient;->connectionPool:Lcom/android/okhttp/ConnectionPool;
+Lcom/android/okhttp/OkHttpClient;->DEFAULT_PROTOCOLS:Ljava/util/List;
+Lcom/android/okhttp/OkHttpClient;->dns:Lcom/android/okhttp/Dns;
+Lcom/android/okhttp/OkHttpClient;->getConnectionPool()Lcom/android/okhttp/ConnectionPool;
+Lcom/android/okhttp/OkHttpClient;->getCookieHandler()Ljava/net/CookieHandler;
+Lcom/android/okhttp/OkHttpClient;->getHostnameVerifier()Ljavax/net/ssl/HostnameVerifier;
+Lcom/android/okhttp/OkHttpClient;->getProxy()Ljava/net/Proxy;
+Lcom/android/okhttp/OkHttpClient;->getProxySelector()Ljava/net/ProxySelector;
+Lcom/android/okhttp/OkHttpClient;->getSslSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
+Lcom/android/okhttp/OkHttpClient;->setProtocols(Ljava/util/List;)Lcom/android/okhttp/OkHttpClient;
+Lcom/android/okhttp/OkHttpClient;->setRetryOnConnectionFailure(Z)V
+Lcom/android/okhttp/Request;->headers:Lcom/android/okhttp/Headers;
+Lcom/android/okhttp/Request;->method:Ljava/lang/String;
+Lcom/android/okhttp/Request;->url:Lcom/android/okhttp/HttpUrl;
+Lcom/android/okhttp/Response;->code:I
+Lcom/android/okhttp/Response;->headers:Lcom/android/okhttp/Headers;
+Lcom/android/okhttp/Response;->message:Ljava/lang/String;
+Lcom/android/okhttp/Response;->networkResponse:Lcom/android/okhttp/Response;
+Lcom/android/okhttp/Response;->protocol:Lcom/android/okhttp/Protocol;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getAlpnSelectedProtocol()[B
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getApplicationProtocol()Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getApplicationProtocols()[Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getChannelId()[B
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getHandshakeApplicationProtocol()Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getHostname()Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getHostnameOrIP()Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getNpnSelectedProtocol()[B
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getSoWriteTimeout()I
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setAlpnProtocols([B)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setAlpnProtocols([Ljava/lang/String;)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setApplicationProtocols([Ljava/lang/String;)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setChannelIdEnabled(Z)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setChannelIdPrivateKey(Ljava/security/PrivateKey;)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setHandshakeTimeout(I)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setHostname(Ljava/lang/String;)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setNpnProtocols([B)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setSoWriteTimeout(I)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setUseSessionTickets(Z)V
+Lcom/android/org/conscrypt/ConscryptSocketBase;->getHostname()Ljava/lang/String;
+Lcom/android/org/conscrypt/ConscryptSocketBase;->getHostnameOrIP()Ljava/lang/String;
+Lcom/android/org/conscrypt/ConscryptSocketBase;->getSoWriteTimeout()I
+Lcom/android/org/conscrypt/ConscryptSocketBase;->setHandshakeTimeout(I)V
+Lcom/android/org/conscrypt/ConscryptSocketBase;->setHostname(Ljava/lang/String;)V
+Lcom/android/org/conscrypt/ConscryptSocketBase;->setSoWriteTimeout(I)V
+Lcom/android/org/conscrypt/ConscryptSocketBase;->socket:Ljava/net/Socket;
+Lcom/android/org/conscrypt/OpenSSLKey;-><init>(J)V
+Lcom/android/org/conscrypt/OpenSSLKey;->fromPrivateKey(Ljava/security/PrivateKey;)Lcom/android/org/conscrypt/OpenSSLKey;
+Lcom/android/org/conscrypt/OpenSSLKey;->getNativeRef()Lcom/android/org/conscrypt/NativeRef$EVP_PKEY;
+Lcom/android/org/conscrypt/OpenSSLKey;->getPublicKey()Ljava/security/PublicKey;
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getChannelId()[B
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getHostname()Ljava/lang/String;
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getHostnameOrIP()Ljava/lang/String;
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getNpnSelectedProtocol()[B
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getSoWriteTimeout()I
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([Ljava/lang/String;)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setChannelIdEnabled(Z)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setChannelIdPrivateKey(Ljava/security/PrivateKey;)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setHandshakeTimeout(I)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setHostname(Ljava/lang/String;)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setNpnProtocols([B)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setSoWriteTimeout(I)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V
+Lcom/android/org/conscrypt/OpenSSLX509Certificate;->fromX509PemInputStream(Ljava/io/InputStream;)Lcom/android/org/conscrypt/OpenSSLX509Certificate;
+Lcom/android/org/conscrypt/OpenSSLX509Certificate;->mContext:J
+Lcom/android/org/conscrypt/TrustedCertificateStore;-><init>()V
+Lcom/android/org/conscrypt/TrustedCertificateStore;->getCertificateChain(Ljava/security/cert/X509Certificate;)Ljava/util/List;
+Lcom/android/org/conscrypt/TrustManagerImpl;-><init>(Ljava/security/KeyStore;)V
+Lcom/android/org/conscrypt/TrustManagerImpl;->checkServerTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
+Ldalvik/system/BaseDexClassLoader;-><init>(Ljava/lang/String;Ljava/io/File;Ljava/lang/String;Ljava/lang/ClassLoader;Z)V
+Ldalvik/system/BaseDexClassLoader;->addDexPath(Ljava/lang/String;)V
+Ldalvik/system/BaseDexClassLoader;->addDexPath(Ljava/lang/String;Z)V
+Ldalvik/system/BaseDexClassLoader;->getLdLibraryPath()Ljava/lang/String;
+Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList;
+Ldalvik/system/BlockGuard$BlockGuardPolicyException;-><init>(IILjava/lang/String;)V
+Ldalvik/system/BlockGuard$Policy;->onNetwork()V
+Ldalvik/system/BlockGuard$Policy;->onReadFromDisk()V
+Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy;
+Ldalvik/system/BlockGuard;->LAX_POLICY:Ldalvik/system/BlockGuard$Policy;
+Ldalvik/system/BlockGuard;->setThreadPolicy(Ldalvik/system/BlockGuard$Policy;)V
+Ldalvik/system/CloseGuard;->close()V
+Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard;
+Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V
+Ldalvik/system/CloseGuard;->setEnabled(Z)V
+Ldalvik/system/CloseGuard;->setReporter(Ldalvik/system/CloseGuard$Reporter;)V
+Ldalvik/system/CloseGuard;->warnIfOpen()V
+Ldalvik/system/DexFile$DFEnum;->mNameList:[Ljava/lang/String;
+Ldalvik/system/DexFile;->getClassNameList(Ljava/lang/Object;)[Ljava/lang/String;
+Ldalvik/system/DexFile;->isBackedByOatFile()Z
+Ldalvik/system/DexFile;->loadClassBinaryName(Ljava/lang/String;Ljava/lang/ClassLoader;Ljava/util/List;)Ljava/lang/Class;
+Ldalvik/system/DexFile;->loadDex(Ljava/lang/String;Ljava/lang/String;ILjava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ldalvik/system/DexFile;
+Ldalvik/system/DexFile;->mCookie:Ljava/lang/Object;
+Ldalvik/system/DexFile;->mFileName:Ljava/lang/String;
+Ldalvik/system/DexFile;->mInternalCookie:Ljava/lang/Object;
+Ldalvik/system/DexFile;->openDexFile(Ljava/lang/String;Ljava/lang/String;ILjava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ljava/lang/Object;
+Ldalvik/system/DexFile;->openDexFileNative(Ljava/lang/String;Ljava/lang/String;ILjava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ljava/lang/Object;
+Ldalvik/system/DexPathList$Element;-><init>(Ldalvik/system/DexFile;Ljava/io/File;)V
+Ldalvik/system/DexPathList$Element;-><init>(Ljava/io/File;ZLjava/io/File;Ldalvik/system/DexFile;)V
+Ldalvik/system/DexPathList$Element;->dexFile:Ldalvik/system/DexFile;
+Ldalvik/system/DexPathList$Element;->path:Ljava/io/File;
+Ldalvik/system/DexPathList$NativeLibraryElement;-><init>(Ljava/io/File;)V
+Ldalvik/system/DexPathList$NativeLibraryElement;->path:Ljava/io/File;
+Ldalvik/system/DexPathList;-><init>(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)V
+Ldalvik/system/DexPathList;->addDexPath(Ljava/lang/String;Ljava/io/File;)V
+Ldalvik/system/DexPathList;->addNativePath(Ljava/util/Collection;)V
+Ldalvik/system/DexPathList;->definingContext:Ljava/lang/ClassLoader;
+Ldalvik/system/DexPathList;->dexElements:[Ldalvik/system/DexPathList$Element;
+Ldalvik/system/DexPathList;->dexElementsSuppressedExceptions:[Ljava/io/IOException;
+Ldalvik/system/DexPathList;->loadDexFile(Ljava/io/File;Ljava/io/File;Ljava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ldalvik/system/DexFile;
+Ldalvik/system/DexPathList;->makeDexElements(Ljava/util/List;Ljava/io/File;Ljava/util/List;Ljava/lang/ClassLoader;)[Ldalvik/system/DexPathList$Element;
+Ldalvik/system/DexPathList;->makeInMemoryDexElements([Ljava/nio/ByteBuffer;Ljava/util/List;)[Ldalvik/system/DexPathList$Element;
+Ldalvik/system/DexPathList;->makePathElements(Ljava/util/List;)[Ldalvik/system/DexPathList$NativeLibraryElement;
+Ldalvik/system/DexPathList;->makePathElements(Ljava/util/List;Ljava/io/File;Ljava/util/List;)[Ldalvik/system/DexPathList$Element;
+Ldalvik/system/DexPathList;->nativeLibraryDirectories:Ljava/util/List;
+Ldalvik/system/DexPathList;->nativeLibraryPathElements:[Ldalvik/system/DexPathList$NativeLibraryElement;
+Ldalvik/system/DexPathList;->splitPaths(Ljava/lang/String;Z)Ljava/util/List;
+Ldalvik/system/DexPathList;->systemNativeLibraryDirectories:Ljava/util/List;
+Ldalvik/system/SocketTagger;->get()Ldalvik/system/SocketTagger;
+Ldalvik/system/SocketTagger;->tag(Ljava/net/Socket;)V
+Ldalvik/system/SocketTagger;->untag(Ljava/net/Socket;)V
+Ldalvik/system/VMDebug;->allowHiddenApiReflectionFrom(Ljava/lang/Class;)V
+Ldalvik/system/VMDebug;->dumpReferenceTables()V
+Ldalvik/system/VMDebug;->isDebuggerConnected()Z
+Ldalvik/system/VMRuntime;->addressOf(Ljava/lang/Object;)J
+Ldalvik/system/VMRuntime;->clearGrowthLimit()V
+Ldalvik/system/VMRuntime;->gcSoftReferences()V
+Ldalvik/system/VMRuntime;->getCurrentInstructionSet()Ljava/lang/String;
+Ldalvik/system/VMRuntime;->getExternalBytesAllocated()J
+Ldalvik/system/VMRuntime;->getInstructionSet(Ljava/lang/String;)Ljava/lang/String;
+Ldalvik/system/VMRuntime;->getMinimumHeapSize()J
+Ldalvik/system/VMRuntime;->getRuntime()Ldalvik/system/VMRuntime;
+Ldalvik/system/VMRuntime;->is64Bit()Z
+Ldalvik/system/VMRuntime;->is64BitAbi(Ljava/lang/String;)Z
+Ldalvik/system/VMRuntime;->newNonMovableArray(Ljava/lang/Class;I)Ljava/lang/Object;
+Ldalvik/system/VMRuntime;->registerNativeAllocation(I)V
+Ldalvik/system/VMRuntime;->registerNativeFree(I)V
+Ldalvik/system/VMRuntime;->runFinalization(J)V
+Ldalvik/system/VMRuntime;->runFinalizationSync()V
+Ldalvik/system/VMRuntime;->setMinimumHeapSize(J)J
+Ldalvik/system/VMRuntime;->setTargetHeapUtilization(F)F
+Ldalvik/system/VMRuntime;->setTargetSdkVersion(I)V
+Ldalvik/system/VMRuntime;->trackExternalAllocation(J)Z
+Ldalvik/system/VMRuntime;->trackExternalFree(J)V
+Ldalvik/system/VMRuntime;->vmInstructionSet()Ljava/lang/String;
+Ldalvik/system/VMRuntime;->vmLibrary()Ljava/lang/String;
+Ldalvik/system/VMStack;->fillStackTraceElements(Ljava/lang/Thread;[Ljava/lang/StackTraceElement;)I
+Ldalvik/system/VMStack;->getCallingClassLoader()Ljava/lang/ClassLoader;
+Ldalvik/system/VMStack;->getStackClass2()Ljava/lang/Class;
+Ldalvik/system/VMStack;->getThreadStackTrace(Ljava/lang/Thread;)[Ljava/lang/StackTraceElement;
+Ljava/io/Console;->encoding()Ljava/lang/String;
+Ljava/io/File;->filePath:Ljava/nio/file/Path;
+Ljava/io/File;->fs:Ljava/io/FileSystem;
+Ljava/io/File;->path:Ljava/lang/String;
+Ljava/io/File;->prefixLength:I
+Ljava/io/File;->status:Ljava/io/File$PathStatus;
+Ljava/io/FileDescriptor;->descriptor:I
+Ljava/io/FileDescriptor;->getInt$()I
+Ljava/io/FileDescriptor;->isSocket$()Z
+Ljava/io/FileDescriptor;->setInt$(I)V
+Ljava/io/FileInputStream;->fd:Ljava/io/FileDescriptor;
+Ljava/io/FileOutputStream;->channel:Ljava/nio/channels/FileChannel;
+Ljava/io/FileOutputStream;->fd:Ljava/io/FileDescriptor;
+Ljava/io/FileSystem;->canonicalize(Ljava/lang/String;)Ljava/lang/String;
+Ljava/io/FileSystem;->checkAccess(Ljava/io/File;I)Z
+Ljava/io/FileSystem;->compare(Ljava/io/File;Ljava/io/File;)I
+Ljava/io/FileSystem;->createDirectory(Ljava/io/File;)Z
+Ljava/io/FileSystem;->createFileExclusively(Ljava/lang/String;)Z
+Ljava/io/FileSystem;->delete(Ljava/io/File;)Z
+Ljava/io/FileSystem;->fromURIPath(Ljava/lang/String;)Ljava/lang/String;
+Ljava/io/FileSystem;->getBooleanAttributes(Ljava/io/File;)I
+Ljava/io/FileSystem;->getDefaultParent()Ljava/lang/String;
+Ljava/io/FileSystem;->getLastModifiedTime(Ljava/io/File;)J
+Ljava/io/FileSystem;->getLength(Ljava/io/File;)J
+Ljava/io/FileSystem;->getPathSeparator()C
+Ljava/io/FileSystem;->getSeparator()C
+Ljava/io/FileSystem;->getSpace(Ljava/io/File;I)J
+Ljava/io/FileSystem;->hashCode(Ljava/io/File;)I
+Ljava/io/FileSystem;->isAbsolute(Ljava/io/File;)Z
+Ljava/io/FileSystem;->list(Ljava/io/File;)[Ljava/lang/String;
+Ljava/io/FileSystem;->listRoots()[Ljava/io/File;
+Ljava/io/FileSystem;->normalize(Ljava/lang/String;)Ljava/lang/String;
+Ljava/io/FileSystem;->prefixLength(Ljava/lang/String;)I
+Ljava/io/FileSystem;->rename(Ljava/io/File;Ljava/io/File;)Z
+Ljava/io/FileSystem;->resolve(Ljava/io/File;)Ljava/lang/String;
+Ljava/io/FileSystem;->resolve(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+Ljava/io/FileSystem;->setLastModifiedTime(Ljava/io/File;J)Z
+Ljava/io/FileSystem;->setPermission(Ljava/io/File;IZZ)Z
+Ljava/io/FileSystem;->setReadOnly(Ljava/io/File;)Z
+Ljava/io/ObjectInputStream;->bin:Ljava/io/ObjectInputStream$BlockDataInputStream;
+Ljava/io/ObjectInputStream;->bytesToDoubles([BI[DII)V
+Ljava/io/ObjectInputStream;->bytesToFloats([BI[FII)V
+Ljava/io/ObjectOutputStream;->protocol:I
+Ljava/io/ObjectStreamClass;->computeDefaultSUID(Ljava/lang/Class;)J
+Ljava/io/ObjectStreamClass;->computeFieldOffsets()V
+Ljava/io/ObjectStreamClass;->fields:[Ljava/io/ObjectStreamField;
+Ljava/io/ObjectStreamClass;->getConstructorId(Ljava/lang/Class;)J
+Ljava/io/ObjectStreamClass;->getLocalDesc()Ljava/io/ObjectStreamClass;
+Ljava/io/ObjectStreamClass;->getNumObjFields()I
+Ljava/io/ObjectStreamClass;->getPrimDataSize()I
+Ljava/io/ObjectStreamClass;->hasReadObjectMethod()Z
+Ljava/io/ObjectStreamClass;->hasReadObjectNoDataMethod()Z
+Ljava/io/ObjectStreamClass;->hasWriteObjectData()Z
+Ljava/io/ObjectStreamClass;->newInstance()Ljava/lang/Object;
+Ljava/io/ObjectStreamClass;->newInstance(Ljava/lang/Class;J)Ljava/lang/Object;
+Ljava/io/ObjectStreamField;->getField()Ljava/lang/reflect/Field;
+Ljava/io/RandomAccessFile;->fd:Ljava/io/FileDescriptor;
+Ljava/lang/AbstractStringBuilder;->value:[C
+Ljava/lang/Boolean;->value:Z
+Ljava/lang/Byte;->toHexString(BZ)Ljava/lang/String;
+Ljava/lang/Byte;->value:B
+Ljava/lang/Character;->value:C
+Ljava/lang/Class;-><init>()V
+Ljava/lang/Class;->accessFlags:I
+Ljava/lang/Class;->classLoader:Ljava/lang/ClassLoader;
+Ljava/lang/Class;->clinitThreadId:I
+Ljava/lang/Class;->dexCache:Ljava/lang/Object;
+Ljava/lang/Class;->dexClassDefIndex:I
+Ljava/lang/Class;->getDeclaredMethodsUnchecked(Z)[Ljava/lang/reflect/Method;
+Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;Z)Ljava/lang/reflect/Method;
+Ljava/lang/Class;->ifTable:[Ljava/lang/Object;
+Ljava/lang/Class;->name:Ljava/lang/String;
+Ljava/lang/Class;->objectSize:I
+Ljava/lang/Class;->status:I
+Ljava/lang/ClassLoader;->parent:Ljava/lang/ClassLoader;
+Ljava/lang/Daemons$Daemon;->isRunning()Z
+Ljava/lang/Daemons$Daemon;->start()V
+Ljava/lang/Daemons$Daemon;->stop()V
+Ljava/lang/Daemons$Daemon;->thread:Ljava/lang/Thread;
+Ljava/lang/Daemons$FinalizerDaemon;->finalizingObject:Ljava/lang/Object;
+Ljava/lang/Daemons$FinalizerDaemon;->INSTANCE:Ljava/lang/Daemons$FinalizerDaemon;
+Ljava/lang/Daemons$FinalizerWatchdogDaemon;->INSTANCE:Ljava/lang/Daemons$FinalizerWatchdogDaemon;
+Ljava/lang/Daemons$ReferenceQueueDaemon;->INSTANCE:Ljava/lang/Daemons$ReferenceQueueDaemon;
+Ljava/lang/Daemons;->MAX_FINALIZE_NANOS:J
+Ljava/lang/Daemons;->requestHeapTrim()V
+Ljava/lang/Daemons;->start()V
+Ljava/lang/Daemons;->stop()V
+Ljava/lang/Double;->value:D
+Ljava/lang/Enum;->getSharedConstants(Ljava/lang/Class;)[Ljava/lang/Enum;
+Ljava/lang/Enum;->name:Ljava/lang/String;
+Ljava/lang/Enum;->ordinal:I
+Ljava/lang/Float;->value:F
+Ljava/lang/Integer;->value:I
+Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V
+Ljava/lang/Long;->value:J
+Ljava/lang/Object;->identityHashCode(Ljava/lang/Object;)I
+Ljava/lang/ref/FinalizerReference;->add(Ljava/lang/Object;)V
+Ljava/lang/ref/FinalizerReference;->head:Ljava/lang/ref/FinalizerReference;
+Ljava/lang/ref/FinalizerReference;->next:Ljava/lang/ref/FinalizerReference;
+Ljava/lang/ref/FinalizerReference;->queue:Ljava/lang/ref/ReferenceQueue;
+Ljava/lang/ref/FinalizerReference;->remove(Ljava/lang/ref/FinalizerReference;)V
+Ljava/lang/ref/Reference;->getReferent()Ljava/lang/Object;
+Ljava/lang/ref/Reference;->referent:Ljava/lang/Object;
+Ljava/lang/ref/ReferenceQueue;->add(Ljava/lang/ref/Reference;)V
+Ljava/lang/reflect/AccessibleObject;->override:Z
+Ljava/lang/reflect/Constructor;->serializationCopy(Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
+Ljava/lang/reflect/Executable;->artMethod:J
+Ljava/lang/reflect/Field;->accessFlags:I
+Ljava/lang/reflect/Field;->getOffset()I
+Ljava/lang/reflect/Parameter;-><init>(Ljava/lang/String;ILjava/lang/reflect/Executable;I)V
+Ljava/lang/reflect/Proxy;->invoke(Ljava/lang/reflect/Proxy;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/Runtime;->load(Ljava/lang/String;Ljava/lang/ClassLoader;)V
+Ljava/lang/Runtime;->loadLibrary(Ljava/lang/String;Ljava/lang/ClassLoader;)V
+Ljava/lang/Runtime;->loadLibrary0(Ljava/lang/ClassLoader;Ljava/lang/String;)V
+Ljava/lang/Runtime;->mLibPaths:[Ljava/lang/String;
+Ljava/lang/Runtime;->nativeLoad(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/String;
+Ljava/lang/Short;->value:S
+Ljava/lang/StackTraceElement;->declaringClass:Ljava/lang/String;
+Ljava/lang/StackTraceElement;->fileName:Ljava/lang/String;
+Ljava/lang/StackTraceElement;->lineNumber:I
+Ljava/lang/StackTraceElement;->methodName:Ljava/lang/String;
+Ljava/lang/String;-><init>(II[C)V
+Ljava/lang/String;->count:I
+Ljava/lang/String;->getCharsNoCheck(II[CI)V
+Ljava/lang/String;->hash:I
+Ljava/lang/String;->indexOf([CII[CIII)I
+Ljava/lang/String;->lastIndexOf([CII[CIII)I
+Ljava/lang/System;-><init>()V
+Ljava/lang/System;->arraycopy([CI[CII)V
+Ljava/lang/System;->arraycopy([FI[FII)V
+Ljava/lang/System;->arraycopy([II[III)V
+Ljava/lang/System;->arraycopy([JI[JII)V
+Ljava/lang/System;->arraycopy([SI[SII)V
+Ljava/lang/System;->arraycopy([ZI[ZII)V
+Ljava/lang/System;->log(CLjava/lang/String;Ljava/lang/Throwable;)V
+Ljava/lang/System;->logE(Ljava/lang/String;)V
+Ljava/lang/System;->logE(Ljava/lang/String;Ljava/lang/Throwable;)V
+Ljava/lang/System;->logW(Ljava/lang/String;Ljava/lang/Throwable;)V
+Ljava/lang/Thread;-><init>(Ljava/lang/ThreadGroup;Ljava/lang/String;IZ)V
+Ljava/lang/Thread;->contextClassLoader:Ljava/lang/ClassLoader;
+Ljava/lang/Thread;->daemon:Z
+Ljava/lang/Thread;->dispatchUncaughtException(Ljava/lang/Throwable;)V
+Ljava/lang/Thread;->getUncaughtExceptionPreHandler()Ljava/lang/Thread$UncaughtExceptionHandler;
+Ljava/lang/Thread;->group:Ljava/lang/ThreadGroup;
+Ljava/lang/Thread;->inheritableThreadLocals:Ljava/lang/ThreadLocal$ThreadLocalMap;
+Ljava/lang/Thread;->inheritedAccessControlContext:Ljava/security/AccessControlContext;
+Ljava/lang/Thread;->lock:Ljava/lang/Object;
+Ljava/lang/Thread;->name:Ljava/lang/String;
+Ljava/lang/Thread;->nativePeer:J
+Ljava/lang/Thread;->parkBlocker:Ljava/lang/Object;
+Ljava/lang/Thread;->priority:I
+Ljava/lang/Thread;->target:Ljava/lang/Runnable;
+Ljava/lang/Thread;->threadLocals:Ljava/lang/ThreadLocal$ThreadLocalMap;
+Ljava/lang/Thread;->threadSeqNumber:J
+Ljava/lang/ThreadGroup;->add(Ljava/lang/Thread;)V
+Ljava/lang/ThreadGroup;->groups:[Ljava/lang/ThreadGroup;
+Ljava/lang/ThreadGroup;->mainThreadGroup:Ljava/lang/ThreadGroup;
+Ljava/lang/ThreadGroup;->name:Ljava/lang/String;
+Ljava/lang/ThreadGroup;->ngroups:I
+Ljava/lang/ThreadGroup;->parent:Ljava/lang/ThreadGroup;
+Ljava/lang/ThreadGroup;->systemThreadGroup:Ljava/lang/ThreadGroup;
+Ljava/lang/ThreadGroup;->threadTerminated(Ljava/lang/Thread;)V
+Ljava/lang/ThreadLocal;->getMap(Ljava/lang/Thread;)Ljava/lang/ThreadLocal$ThreadLocalMap;
+Ljava/lang/Throwable;->backtrace:Ljava/lang/Object;
+Ljava/lang/Throwable;->cause:Ljava/lang/Throwable;
+Ljava/lang/Throwable;->detailMessage:Ljava/lang/String;
+Ljava/lang/Throwable;->getOurStackTrace()[Ljava/lang/StackTraceElement;
+Ljava/lang/Throwable;->nativeFillInStackTrace()Ljava/lang/Object;
+Ljava/lang/Throwable;->printStackTrace(Ljava/lang/Throwable$PrintStreamOrWriter;)V
+Ljava/lang/Throwable;->stackTrace:[Ljava/lang/StackTraceElement;
+Ljava/lang/Throwable;->suppressedExceptions:Ljava/util/List;
+Ljava/lang/Void;-><init>()V
+Ljava/net/Authenticator;->theAuthenticator:Ljava/net/Authenticator;
+Ljava/net/DatagramSocket;->getFileDescriptor$()Ljava/io/FileDescriptor;
+Ljava/net/DatagramSocket;->impl:Ljava/net/DatagramSocketImpl;
+Ljava/net/HttpCookie;->assignors:Ljava/util/Map;
+Ljava/net/HttpCookie;->comment:Ljava/lang/String;
+Ljava/net/HttpCookie;->commentURL:Ljava/lang/String;
+Ljava/net/HttpCookie;->domain:Ljava/lang/String;
+Ljava/net/HttpCookie;->header:Ljava/lang/String;
+Ljava/net/HttpCookie;->httpOnly:Z
+Ljava/net/HttpCookie;->maxAge:J
+Ljava/net/HttpCookie;->name:Ljava/lang/String;
+Ljava/net/HttpCookie;->path:Ljava/lang/String;
+Ljava/net/HttpCookie;->portlist:Ljava/lang/String;
+Ljava/net/HttpCookie;->secure:Z
+Ljava/net/HttpCookie;->toDiscard:Z
+Ljava/net/HttpCookie;->tspecials:Ljava/lang/String;
+Ljava/net/HttpCookie;->value:Ljava/lang/String;
+Ljava/net/HttpCookie;->version:I
+Ljava/net/HttpCookie;->whenCreated:J
+Ljava/net/Inet4Address;-><init>()V
+Ljava/net/Inet6Address$Inet6AddressHolder;->ipaddress:[B
+Ljava/net/Inet6Address$Inet6AddressHolder;->scope_id:I
+Ljava/net/Inet6Address$Inet6AddressHolder;->scope_id_set:Z
+Ljava/net/Inet6Address$Inet6AddressHolder;->scope_ifname:Ljava/net/NetworkInterface;
+Ljava/net/Inet6Address;-><init>()V
+Ljava/net/Inet6Address;->holder6:Ljava/net/Inet6Address$Inet6AddressHolder;
+Ljava/net/InetAddress$InetAddressHolder;->address:I
+Ljava/net/InetAddress$InetAddressHolder;->family:I
+Ljava/net/InetAddress$InetAddressHolder;->hostName:Ljava/lang/String;
+Ljava/net/InetAddress$InetAddressHolder;->originalHostName:Ljava/lang/String;
+Ljava/net/InetAddress;->clearDnsCache()V
+Ljava/net/InetAddress;->getAllByNameOnNet(Ljava/lang/String;I)[Ljava/net/InetAddress;
+Ljava/net/InetAddress;->holder()Ljava/net/InetAddress$InetAddressHolder;
+Ljava/net/InetAddress;->holder:Ljava/net/InetAddress$InetAddressHolder;
+Ljava/net/InetAddress;->isNumeric(Ljava/lang/String;)Z
+Ljava/net/InetAddress;->parseNumericAddress(Ljava/lang/String;)Ljava/net/InetAddress;
+Ljava/net/InetSocketAddress;->holder:Ljava/net/InetSocketAddress$InetSocketAddressHolder;
+Ljava/net/InterfaceAddress;-><init>()V
+Ljava/net/Proxy;-><init>()V
+Ljava/net/ServerSocket;->factory:Ljava/net/SocketImplFactory;
+Ljava/net/Socket;->factory:Ljava/net/SocketImplFactory;
+Ljava/net/Socket;->getFileDescriptor$()Ljava/io/FileDescriptor;
+Ljava/net/Socket;->impl:Ljava/net/SocketImpl;
+Ljava/net/SocketException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
+Ljava/net/SocketImpl;->serverSocket:Ljava/net/ServerSocket;
+Ljava/net/SocketImpl;->socket:Ljava/net/Socket;
+Ljava/net/URI;->fragment:Ljava/lang/String;
+Ljava/net/URI;->host:Ljava/lang/String;
+Ljava/net/URI;->port:I
+Ljava/net/URI;->query:Ljava/lang/String;
+Ljava/net/URI;->string:Ljava/lang/String;
+Ljava/net/URL;->factory:Ljava/net/URLStreamHandlerFactory;
+Ljava/net/URL;->handler:Ljava/net/URLStreamHandler;
+Ljava/net/URL;->handlers:Ljava/util/Hashtable;
+Ljava/net/URL;->protocol:Ljava/lang/String;
+Ljava/net/URLClassLoader;->acc:Ljava/security/AccessControlContext;
+Ljava/net/URLClassLoader;->ucp:Lsun/misc/URLClassPath;
+Ljava/nio/Buffer;->address:J
+Ljava/nio/Buffer;->capacity:I
+Ljava/nio/Buffer;->limit:I
+Ljava/nio/Buffer;->position:I
+Ljava/nio/Buffer;->_elementSizeShift:I
+Ljava/nio/ByteBuffer;->hb:[B
+Ljava/nio/ByteBuffer;->isReadOnly:Z
+Ljava/nio/ByteBuffer;->offset:I
+Ljava/nio/CharBuffer;->toString(II)Ljava/lang/String;
+Ljava/nio/charset/Charset;->defaultCharset:Ljava/nio/charset/Charset;
+Ljava/nio/charset/CharsetEncoder;->canEncode(Ljava/nio/CharBuffer;)Z
+Ljava/nio/DirectByteBuffer;-><init>(JI)V
+Ljava/nio/NIOAccess;->getBaseArray(Ljava/nio/Buffer;)Ljava/lang/Object;
+Ljava/nio/NIOAccess;->getBaseArrayOffset(Ljava/nio/Buffer;)I
+Ljava/nio/NIOAccess;->getBasePointer(Ljava/nio/Buffer;)J
+Ljava/nio/NioUtils;->freeDirectBuffer(Ljava/nio/ByteBuffer;)V
+Ljava/nio/NioUtils;->unsafeArray(Ljava/nio/ByteBuffer;)[B
+Ljava/nio/NioUtils;->unsafeArrayOffset(Ljava/nio/ByteBuffer;)I
+Ljava/security/KeyPairGenerator;->getInstance(Lsun/security/jca/GetInstance$Instance;Ljava/lang/String;)Ljava/security/KeyPairGenerator;
+Ljava/security/KeyStore;->keyStoreSpi:Ljava/security/KeyStoreSpi;
+Ljava/security/Signature;->getInstance(Lsun/security/jca/GetInstance$Instance;Ljava/lang/String;)Ljava/security/Signature;
+Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String;
+Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V
+Ljava/text/Collator;->icuColl:Landroid/icu/text/Collator;
+Ljava/text/DateFormat;->is24Hour:Ljava/lang/Boolean;
+Ljava/text/DecimalFormatSymbols;->getPercentString()Ljava/lang/String;
+Ljava/text/NumberFormat;->getInstance(Ljava/util/Locale;I)Ljava/text/NumberFormat;
+Ljava/time/Duration;->toSeconds()Ljava/math/BigDecimal;
+Ljava/time/OffsetDateTime;-><init>(Ljava/time/LocalDateTime;Ljava/time/ZoneOffset;)V
+Ljava/time/ZoneId;->of(Ljava/lang/String;Z)Ljava/time/ZoneId;
+Ljava/util/ArrayDeque;->elements:[Ljava/lang/Object;
+Ljava/util/ArrayDeque;->head:I
+Ljava/util/ArrayDeque;->tail:I
+Ljava/util/ArrayList$SubList;->offset:I
+Ljava/util/ArrayList$SubList;->parent:Ljava/util/AbstractList;
+Ljava/util/ArrayList$SubList;->parentOffset:I
+Ljava/util/ArrayList$SubList;->size:I
+Ljava/util/ArrayList;->elementData:[Ljava/lang/Object;
+Ljava/util/ArrayList;->size:I
+Ljava/util/Arrays$ArrayList;->a:[Ljava/lang/Object;
+Ljava/util/Arrays;->deepToString([Ljava/lang/Object;Ljava/lang/StringBuilder;Ljava/util/Set;)V
+Ljava/util/Calendar;->zone:Ljava/util/TimeZone;
+Ljava/util/Collections$EmptyList;-><init>()V
+Ljava/util/Collections$EmptyMap;-><init>()V
+Ljava/util/Collections$SynchronizedCollection;->c:Ljava/util/Collection;
+Ljava/util/Collections$SynchronizedList;->list:Ljava/util/List;
+Ljava/util/Collections$SynchronizedMap;->m:Ljava/util/Map;
+Ljava/util/Collections$UnmodifiableCollection;->c:Ljava/util/Collection;
+Ljava/util/Collections$UnmodifiableMap;->m:Ljava/util/Map;
+Ljava/util/concurrent/atomic/AtomicInteger;->value:I
+Ljava/util/concurrent/ConcurrentHashMap$BaseIterator;->hasMoreElements()Z
+Ljava/util/concurrent/CopyOnWriteArrayList;->elements:[Ljava/lang/Object;
+Ljava/util/concurrent/CopyOnWriteArraySet;->al:Ljava/util/concurrent/CopyOnWriteArrayList;
+Ljava/util/concurrent/Executors$RunnableAdapter;->task:Ljava/lang/Runnable;
+Ljava/util/concurrent/FutureTask;->callable:Ljava/util/concurrent/Callable;
+Ljava/util/concurrent/FutureTask;->EXCEPTIONAL:I
+Ljava/util/concurrent/FutureTask;->outcome:Ljava/lang/Object;
+Ljava/util/concurrent/FutureTask;->state:I
+Ljava/util/concurrent/LinkedBlockingDeque;->first:Ljava/util/concurrent/LinkedBlockingDeque$Node;
+Ljava/util/concurrent/LinkedBlockingDeque;->lock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/concurrent/LinkedBlockingQueue;->capacity:I
+Ljava/util/concurrent/LinkedBlockingQueue;->head:Ljava/util/concurrent/LinkedBlockingQueue$Node;
+Ljava/util/concurrent/LinkedBlockingQueue;->putLock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/concurrent/LinkedBlockingQueue;->takeLock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/concurrent/locks/ReentrantLock;->sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
+Ljava/util/concurrent/PriorityBlockingQueue;->dequeue()Ljava/lang/Object;
+Ljava/util/concurrent/PriorityBlockingQueue;->lock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/concurrent/PriorityBlockingQueue;->notEmpty:Ljava/util/concurrent/locks/Condition;
+Ljava/util/concurrent/ThreadPoolExecutor;->allowCoreThreadTimeOut:Z
+Ljava/util/concurrent/ThreadPoolExecutor;->ctl:Ljava/util/concurrent/atomic/AtomicInteger;
+Ljava/util/concurrent/ThreadPoolExecutor;->defaultHandler:Ljava/util/concurrent/RejectedExecutionHandler;
+Ljava/util/concurrent/ThreadPoolExecutor;->mainLock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/EnumMap;->keyType:Ljava/lang/Class;
+Ljava/util/EnumSet;->elementType:Ljava/lang/Class;
+Ljava/util/HashMap$HashIterator;->hasNext()Z
+Ljava/util/HashMap$HashIterator;->remove()V
+Ljava/util/HashMap$Node;->key:Ljava/lang/Object;
+Ljava/util/HashMap$Node;->next:Ljava/util/HashMap$Node;
+Ljava/util/HashMap$Node;->value:Ljava/lang/Object;
+Ljava/util/HashMap;->modCount:I
+Ljava/util/HashMap;->table:[Ljava/util/HashMap$Node;
+Ljava/util/HashSet;->map:Ljava/util/HashMap;
+Ljava/util/jar/JarFile;->manifest:Ljava/util/jar/Manifest;
+Ljava/util/LinkedHashMap$LinkedHashIterator;->hasNext()Z
+Ljava/util/LinkedHashMap;->accessOrder:Z
+Ljava/util/LinkedHashMap;->eldest()Ljava/util/Map$Entry;
+Ljava/util/LinkedList$Node;->item:Ljava/lang/Object;
+Ljava/util/LinkedList$Node;->next:Ljava/util/LinkedList$Node;
+Ljava/util/LinkedList;->first:Ljava/util/LinkedList$Node;
+Ljava/util/LinkedList;->size:I
+Ljava/util/Locale;->createConstant(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;
+Ljava/util/Locale;->getInstance(Lsun/util/locale/BaseLocale;Lsun/util/locale/LocaleExtensions;)Ljava/util/Locale;
+Ljava/util/logging/Handler;->sealed:Z
+Ljava/util/logging/Logger;->treeLock:Ljava/lang/Object;
+Ljava/util/logging/LogManager;->getFormatterProperty(Ljava/lang/String;Ljava/util/logging/Formatter;)Ljava/util/logging/Formatter;
+Ljava/util/PriorityQueue;->modCount:I
+Ljava/util/PriorityQueue;->queue:[Ljava/lang/Object;
+Ljava/util/PriorityQueue;->size:I
+Ljava/util/Properties;->saveConvert(Ljava/lang/String;ZZ)Ljava/lang/String;
+Ljava/util/Random;->seedUniquifier()J
+Ljava/util/regex/Matcher;->appendPos:I
+Ljava/util/TimerTask;->period:J
+Ljava/util/UUID;->leastSigBits:J
+Ljava/util/UUID;->mostSigBits:J
+Ljava/util/Vector;->elementData(I)Ljava/lang/Object;
+Ljava/util/zip/Adler32;->update(II)I
+Ljava/util/zip/CRC32;->update(II)I
+Ljava/util/zip/Deflater;->buf:[B
+Ljava/util/zip/Deflater;->finish:Z
+Ljava/util/zip/Deflater;->finished:Z
+Ljava/util/zip/Deflater;->len:I
+Ljava/util/zip/Deflater;->level:I
+Ljava/util/zip/Deflater;->off:I
+Ljava/util/zip/Deflater;->setParams:Z
+Ljava/util/zip/Deflater;->strategy:I
+Ljava/util/zip/Inflater;->buf:[B
+Ljava/util/zip/Inflater;->finished:Z
+Ljava/util/zip/Inflater;->len:I
+Ljava/util/zip/Inflater;->needDict:Z
+Ljava/util/zip/Inflater;->off:I
+Ljava/util/zip/ZipConstants;->CENATT:I
+Ljava/util/zip/ZipConstants;->CENATX:I
+Ljava/util/zip/ZipConstants;->CENCOM:I
+Ljava/util/zip/ZipConstants;->CENCRC:I
+Ljava/util/zip/ZipConstants;->CENDSK:I
+Ljava/util/zip/ZipConstants;->CENEXT:I
+Ljava/util/zip/ZipConstants;->CENFLG:I
+Ljava/util/zip/ZipConstants;->CENHDR:I
+Ljava/util/zip/ZipConstants;->CENHOW:I
+Ljava/util/zip/ZipConstants;->CENLEN:I
+Ljava/util/zip/ZipConstants;->CENNAM:I
+Ljava/util/zip/ZipConstants;->CENOFF:I
+Ljava/util/zip/ZipConstants;->CENSIG:J
+Ljava/util/zip/ZipConstants;->CENSIZ:I
+Ljava/util/zip/ZipConstants;->CENTIM:I
+Ljava/util/zip/ZipConstants;->CENVEM:I
+Ljava/util/zip/ZipConstants;->CENVER:I
+Ljava/util/zip/ZipConstants;->ENDCOM:I
+Ljava/util/zip/ZipConstants;->ENDHDR:I
+Ljava/util/zip/ZipConstants;->ENDOFF:I
+Ljava/util/zip/ZipConstants;->ENDSIG:J
+Ljava/util/zip/ZipConstants;->ENDSIZ:I
+Ljava/util/zip/ZipConstants;->ENDSUB:I
+Ljava/util/zip/ZipConstants;->ENDTOT:I
+Ljava/util/zip/ZipConstants;->EXTCRC:I
+Ljava/util/zip/ZipConstants;->EXTHDR:I
+Ljava/util/zip/ZipConstants;->EXTLEN:I
+Ljava/util/zip/ZipConstants;->EXTSIG:J
+Ljava/util/zip/ZipConstants;->EXTSIZ:I
+Ljava/util/zip/ZipConstants;->LOCCRC:I
+Ljava/util/zip/ZipConstants;->LOCEXT:I
+Ljava/util/zip/ZipConstants;->LOCFLG:I
+Ljava/util/zip/ZipConstants;->LOCHDR:I
+Ljava/util/zip/ZipConstants;->LOCHOW:I
+Ljava/util/zip/ZipConstants;->LOCLEN:I
+Ljava/util/zip/ZipConstants;->LOCNAM:I
+Ljava/util/zip/ZipConstants;->LOCSIG:J
+Ljava/util/zip/ZipConstants;->LOCSIZ:I
+Ljava/util/zip/ZipConstants;->LOCTIM:I
+Ljava/util/zip/ZipConstants;->LOCVER:I
+Ljava/util/zip/ZipEntry;-><init>(Ljava/lang/String;Ljava/lang/String;JJJII[BJ)V
+Ljava/util/zip/ZipEntry;->method:I
+Ljava/util/zip/ZipFile;->close(J)V
+Ljava/util/zip/ZipFile;->getEntry(J[BZ)J
+Ljava/util/zip/ZipFile;->jzfile:J
+Ljava/util/zip/ZipInputStream;->flag:I
+Ljava/util/zip/ZipInputStream;->tmpbuf:[B
+Ljava/util/zip/ZipOutputStream;->method:I
+Ljava/util/zip/ZipOutputStream;->names:Ljava/util/HashSet;
+Ljava/util/zip/ZipOutputStream;->written:J
+Ljavax/microedition/khronos/egl/EGL10;->eglReleaseThread()Z
+Ljavax/net/ssl/SSLServerSocketFactory;->defaultServerSocketFactory:Ljavax/net/ssl/SSLServerSocketFactory;
+Ljavax/net/ssl/SSLSocketFactory;->createSocket(Ljava/net/Socket;Ljava/io/InputStream;Z)Ljava/net/Socket;
+Ljavax/net/ssl/SSLSocketFactory;->defaultSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
+Llibcore/util/BasicLruCache;->map:Ljava/util/LinkedHashMap;
+Llibcore/util/ZoneInfo;->mTransitions:[J
+Lorg/apache/http/conn/ssl/AbstractVerifier;->BAD_COUNTRY_2LDS:[Ljava/lang/String;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;-><init>()V
+Lorg/apache/http/conn/ssl/SSLSocketFactory;-><init>(Ljavax/net/ssl/SSLSocketFactory;)V
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->createKeyManagers(Ljava/security/KeyStore;Ljava/lang/String;)[Ljavax/net/ssl/KeyManager;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->createTrustManagers(Ljava/security/KeyStore;)[Ljavax/net/ssl/TrustManager;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->hostnameVerifier:Lorg/apache/http/conn/ssl/X509HostnameVerifier;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->nameResolver:Lorg/apache/http/conn/scheme/HostNameResolver;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->socketfactory:Ljavax/net/ssl/SSLSocketFactory;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->sslcontext:Ljavax/net/ssl/SSLContext;
+Lorg/ccil/cowan/tagsoup/AttributesImpl;->data:[Ljava/lang/String;
+Lorg/ccil/cowan/tagsoup/AttributesImpl;->length:I
+Lorg/json/JSONArray;->values:Ljava/util/List;
+Lorg/json/JSONArray;->writeTo(Lorg/json/JSONStringer;)V
+Lorg/json/JSONObject;->append(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
+Lorg/json/JSONObject;->checkName(Ljava/lang/String;)Ljava/lang/String;
+Lorg/json/JSONObject;->keySet()Ljava/util/Set;
+Lorg/json/JSONObject;->nameValuePairs:Ljava/util/LinkedHashMap;
+Lorg/json/JSONObject;->NEGATIVE_ZERO:Ljava/lang/Double;
+Lorg/json/JSONObject;->writeTo(Lorg/json/JSONStringer;)V
+Lorg/json/JSONStringer;-><init>(I)V
+Lorg/json/JSONStringer;->beforeKey()V
+Lorg/json/JSONStringer;->beforeValue()V
+Lorg/json/JSONStringer;->close(Lorg/json/JSONStringer$Scope;Lorg/json/JSONStringer$Scope;Ljava/lang/String;)Lorg/json/JSONStringer;
+Lorg/json/JSONStringer;->indent:Ljava/lang/String;
+Lorg/json/JSONStringer;->newline()V
+Lorg/json/JSONStringer;->open(Lorg/json/JSONStringer$Scope;Ljava/lang/String;)Lorg/json/JSONStringer;
+Lorg/json/JSONStringer;->out:Ljava/lang/StringBuilder;
+Lorg/json/JSONStringer;->peek()Lorg/json/JSONStringer$Scope;
+Lorg/json/JSONStringer;->replaceTop(Lorg/json/JSONStringer$Scope;)V
+Lorg/json/JSONStringer;->stack:Ljava/util/List;
+Lorg/json/JSONStringer;->string(Ljava/lang/String;)V
+Lorg/json/JSONTokener;->in:Ljava/lang/String;
+Lorg/json/JSONTokener;->nextCleanInternal()I
+Lorg/json/JSONTokener;->nextToInternal(Ljava/lang/String;)Ljava/lang/String;
+Lorg/json/JSONTokener;->pos:I
+Lorg/json/JSONTokener;->readArray()Lorg/json/JSONArray;
+Lorg/json/JSONTokener;->readEscapeCharacter()C
+Lorg/json/JSONTokener;->readLiteral()Ljava/lang/Object;
+Lorg/json/JSONTokener;->readObject()Lorg/json/JSONObject;
+Lorg/json/JSONTokener;->skipToEndOfLine()V
+Lorg/w3c/dom/ls/LSSerializerFilter;->getWhatToShow()I
+Lorg/w3c/dom/traversal/NodeFilter;->acceptNode(Lorg/w3c/dom/Node;)S
+Lorg/w3c/dom/traversal/NodeIterator;->detach()V
+Lorg/w3c/dom/traversal/NodeIterator;->nextNode()Lorg/w3c/dom/Node;
+Lorg/xml/sax/helpers/AttributesImpl;->badIndex(I)V
+Lorg/xml/sax/helpers/AttributesImpl;->data:[Ljava/lang/String;
+Lorg/xml/sax/helpers/AttributesImpl;->ensureCapacity(I)V
+Lorg/xml/sax/helpers/AttributesImpl;->length:I
+Lorg/xml/sax/helpers/LocatorImpl;->columnNumber:I
+Lorg/xml/sax/helpers/LocatorImpl;->lineNumber:I
+Lorg/xml/sax/helpers/LocatorImpl;->publicId:Ljava/lang/String;
+Lorg/xml/sax/helpers/LocatorImpl;->systemId:Ljava/lang/String;
+Lorg/xml/sax/helpers/NamespaceSupport;->contextPos:I
+Lorg/xml/sax/helpers/NamespaceSupport;->contexts:[Lorg/xml/sax/helpers/NamespaceSupport$Context;
+Lorg/xml/sax/helpers/NamespaceSupport;->currentContext:Lorg/xml/sax/helpers/NamespaceSupport$Context;
+Lorg/xml/sax/helpers/NamespaceSupport;->EMPTY_ENUMERATION:Ljava/util/Enumeration;
+Lorg/xml/sax/helpers/ParserAdapter;->attAdapter:Lorg/xml/sax/helpers/ParserAdapter$AttributeListAdapter;
+Lorg/xml/sax/helpers/ParserAdapter;->atts:Lorg/xml/sax/helpers/AttributesImpl;
+Lorg/xml/sax/helpers/ParserAdapter;->checkNotParsing(Ljava/lang/String;Ljava/lang/String;)V
+Lorg/xml/sax/helpers/ParserAdapter;->contentHandler:Lorg/xml/sax/ContentHandler;
+Lorg/xml/sax/helpers/ParserAdapter;->dtdHandler:Lorg/xml/sax/DTDHandler;
+Lorg/xml/sax/helpers/ParserAdapter;->entityResolver:Lorg/xml/sax/EntityResolver;
+Lorg/xml/sax/helpers/ParserAdapter;->errorHandler:Lorg/xml/sax/ErrorHandler;
+Lorg/xml/sax/helpers/ParserAdapter;->locator:Lorg/xml/sax/Locator;
+Lorg/xml/sax/helpers/ParserAdapter;->makeException(Ljava/lang/String;)Lorg/xml/sax/SAXParseException;
+Lorg/xml/sax/helpers/ParserAdapter;->nameParts:[Ljava/lang/String;
+Lorg/xml/sax/helpers/ParserAdapter;->namespaces:Z
+Lorg/xml/sax/helpers/ParserAdapter;->nsSupport:Lorg/xml/sax/helpers/NamespaceSupport;
+Lorg/xml/sax/helpers/ParserAdapter;->parser:Lorg/xml/sax/Parser;
+Lorg/xml/sax/helpers/ParserAdapter;->parsing:Z
+Lorg/xml/sax/helpers/ParserAdapter;->prefixes:Z
+Lorg/xml/sax/helpers/ParserAdapter;->processName(Ljava/lang/String;ZZ)[Ljava/lang/String;
+Lorg/xml/sax/helpers/ParserAdapter;->reportError(Ljava/lang/String;)V
+Lorg/xml/sax/helpers/ParserAdapter;->setup(Lorg/xml/sax/Parser;)V
+Lorg/xml/sax/helpers/ParserAdapter;->setupParser()V
+Lorg/xml/sax/helpers/XMLFilterImpl;->contentHandler:Lorg/xml/sax/ContentHandler;
+Lorg/xml/sax/helpers/XMLFilterImpl;->dtdHandler:Lorg/xml/sax/DTDHandler;
+Lorg/xml/sax/helpers/XMLFilterImpl;->entityResolver:Lorg/xml/sax/EntityResolver;
+Lorg/xml/sax/helpers/XMLFilterImpl;->errorHandler:Lorg/xml/sax/ErrorHandler;
+Lorg/xml/sax/helpers/XMLFilterImpl;->locator:Lorg/xml/sax/Locator;
+Lorg/xml/sax/helpers/XMLFilterImpl;->parent:Lorg/xml/sax/XMLReader;
+Lorg/xml/sax/helpers/XMLFilterImpl;->setupParse()V
+Lorg/xml/sax/helpers/XMLReaderAdapter;->documentHandler:Lorg/xml/sax/DocumentHandler;
+Lorg/xml/sax/helpers/XMLReaderAdapter;->qAtts:Lorg/xml/sax/helpers/XMLReaderAdapter$AttributesAdapter;
+Lorg/xml/sax/helpers/XMLReaderAdapter;->setup(Lorg/xml/sax/XMLReader;)V
+Lorg/xml/sax/helpers/XMLReaderAdapter;->setupXMLReader()V
+Lorg/xml/sax/helpers/XMLReaderAdapter;->xmlReader:Lorg/xml/sax/XMLReader;
+Lorg/xml/sax/helpers/XMLReaderFactory;->loadClass(Ljava/lang/ClassLoader;Ljava/lang/String;)Lorg/xml/sax/XMLReader;
+Lorg/xml/sax/InputSource;->byteStream:Ljava/io/InputStream;
+Lorg/xml/sax/InputSource;->characterStream:Ljava/io/Reader;
+Lorg/xml/sax/InputSource;->encoding:Ljava/lang/String;
+Lorg/xml/sax/InputSource;->publicId:Ljava/lang/String;
+Lorg/xml/sax/InputSource;->systemId:Ljava/lang/String;
+Lorg/xml/sax/SAXException;->exception:Ljava/lang/Exception;
+Lorg/xml/sax/SAXParseException;->columnNumber:I
+Lorg/xml/sax/SAXParseException;->init(Ljava/lang/String;Ljava/lang/String;II)V
+Lorg/xml/sax/SAXParseException;->lineNumber:I
+Lorg/xml/sax/SAXParseException;->publicId:Ljava/lang/String;
+Lorg/xml/sax/SAXParseException;->systemId:Ljava/lang/String;
+Lsun/misc/Unsafe;->theUnsafe:Lsun/misc/Unsafe;
+Lsun/misc/Unsafe;->THE_ONE:Lsun/misc/Unsafe;
+Lsun/misc/URLClassPath$JarLoader;->getJarFile()Ljava/util/jar/JarFile;
+Lsun/misc/URLClassPath;->lmap:Ljava/util/HashMap;
+Lsun/misc/URLClassPath;->loaders:Ljava/util/ArrayList;
+Lsun/misc/URLClassPath;->urls:Ljava/util/Stack;
+Lsun/security/x509/AVA;->hasRFC2253Keyword()Z
diff --git a/config/hiddenapi-p-light-greylist.txt b/config/hiddenapi-p-light-greylist.txt
new file mode 100644
index 0000000..789d512
--- /dev/null
+++ b/config/hiddenapi-p-light-greylist.txt
@@ -0,0 +1,11151 @@
+Landroid/accessibilityservice/AccessibilityService;->mInfo:Landroid/accessibilityservice/AccessibilityServiceInfo;
+Landroid/accessibilityservice/AccessibilityService;->mWindowToken:Landroid/os/IBinder;
+Landroid/accessibilityservice/AccessibilityServiceInfo;->setCapabilities(I)V
+Landroid/accessibilityservice/IAccessibilityServiceConnection$Stub;-><init>()V
+Landroid/accessibilityservice/IAccessibilityServiceConnection$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accessibilityservice/IAccessibilityServiceConnection;
+Landroid/accounts/Account;->accessId:Ljava/lang/String;
+Landroid/accounts/Account;->TAG:Ljava/lang/String;
+Landroid/accounts/AccountAndUser;-><init>(Landroid/accounts/Account;I)V
+Landroid/accounts/AccountAndUser;->account:Landroid/accounts/Account;
+Landroid/accounts/AccountAndUser;->userId:I
+Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V
+Landroid/accounts/AccountManager$AmsTask;->mActivity:Landroid/app/Activity;
+Landroid/accounts/AccountManager$AmsTask;->mHandler:Landroid/os/Handler;
+Landroid/accounts/AccountManager$AmsTask;->mResponse:Landroid/accounts/IAccountManagerResponse;
+Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mAuthTokenType:Ljava/lang/String;
+Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mLoginOptions:Landroid/os/Bundle;
+Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mMyCallback:Landroid/accounts/AccountManagerCallback;
+Landroid/accounts/AccountManager;-><init>(Landroid/content/Context;Landroid/accounts/IAccountManager;)V
+Landroid/accounts/AccountManager;-><init>(Landroid/content/Context;Landroid/accounts/IAccountManager;Landroid/os/Handler;)V
+Landroid/accounts/AccountManager;->confirmCredentialsAsUser(Landroid/accounts/Account;Landroid/os/Bundle;Landroid/app/Activity;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;Landroid/os/UserHandle;)Landroid/accounts/AccountManagerFuture;
+Landroid/accounts/AccountManager;->getAccountsByTypeAsUser(Ljava/lang/String;Landroid/os/UserHandle;)[Landroid/accounts/Account;
+Landroid/accounts/AccountManager;->mContext:Landroid/content/Context;
+Landroid/accounts/AuthenticatorDescription;-><init>(Landroid/os/Parcel;)V
+Landroid/accounts/AuthenticatorDescription;-><init>(Ljava/lang/String;)V
+Landroid/accounts/IAccountAuthenticator$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/accounts/IAccountAuthenticator$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/accounts/IAccountAuthenticator$Stub;-><init>()V
+Landroid/accounts/IAccountAuthenticator$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountAuthenticator;
+Landroid/accounts/IAccountAuthenticator;->addAccount(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticator;->addAccountFromCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticator;->confirmCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticator;->editProperties(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;)V
+Landroid/accounts/IAccountAuthenticator;->getAccountCredentialsForCloning(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;)V
+Landroid/accounts/IAccountAuthenticator;->getAccountRemovalAllowed(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;)V
+Landroid/accounts/IAccountAuthenticator;->getAuthToken(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticator;->getAuthTokenLabel(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;)V
+Landroid/accounts/IAccountAuthenticator;->hasFeatures(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;[Ljava/lang/String;)V
+Landroid/accounts/IAccountAuthenticator;->updateCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)V
+Landroid/accounts/IAccountAuthenticatorResponse$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/accounts/IAccountAuthenticatorResponse$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/accounts/IAccountAuthenticatorResponse$Stub;-><init>()V
+Landroid/accounts/IAccountAuthenticatorResponse$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountAuthenticatorResponse;
+Landroid/accounts/IAccountAuthenticatorResponse;->onError(ILjava/lang/String;)V
+Landroid/accounts/IAccountAuthenticatorResponse;->onRequestContinued()V
+Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
+Landroid/accounts/IAccountManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/accounts/IAccountManager$Stub;-><init>()V
+Landroid/accounts/IAccountManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountManager;
+Landroid/accounts/IAccountManagerResponse$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/accounts/IAccountManagerResponse$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/accounts/IAccountManagerResponse$Stub;-><init>()V
+Landroid/accounts/IAccountManagerResponse$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountManagerResponse;
+Landroid/accounts/IAccountManagerResponse;->onError(ILjava/lang/String;)V
+Landroid/accounts/IAccountManagerResponse;->onResult(Landroid/os/Bundle;)V
+Landroid/animation/Animator;->reverse()V
+Landroid/animation/ArgbEvaluator;->getInstance()Landroid/animation/ArgbEvaluator;
+Landroid/animation/LayoutTransition;->cancel()V
+Landroid/animation/LayoutTransition;->cancel(I)V
+Landroid/animation/ValueAnimator;->animateValue(F)V
+Landroid/animation/ValueAnimator;->mDuration:J
+Landroid/animation/ValueAnimator;->sDurationScale:F
+Landroid/app/ActionBar;->collapseActionView()Z
+Landroid/app/ActionBar;->DISPLAY_TITLE_MULTIPLE_LINES:I
+Landroid/app/ActionBar;->setShowHideAnimationEnabled(Z)V
+Landroid/app/Activity;->attach(Landroid/content/Context;Landroid/app/ActivityThread;Landroid/app/Instrumentation;Landroid/os/IBinder;ILandroid/app/Application;Landroid/content/Intent;Landroid/content/pm/ActivityInfo;Ljava/lang/CharSequence;Landroid/app/Activity;Ljava/lang/String;Landroid/app/Activity$NonConfigurationInstances;Landroid/content/res/Configuration;Ljava/lang/String;Lcom/android/internal/app/IVoiceInteractor;Landroid/view/Window;Landroid/view/ViewRootImpl$ActivityConfigCallback;)V
+Landroid/app/Activity;->dispatchActivityResult(Ljava/lang/String;IILandroid/content/Intent;Ljava/lang/String;)V
+Landroid/app/Activity;->enterPictureInPictureMode(Landroid/app/PictureInPictureArgs;)Z
+Landroid/app/Activity;->finish(I)V
+Landroid/app/Activity;->FRAGMENTS_TAG:Ljava/lang/String;
+Landroid/app/Activity;->getActivityOptions()Landroid/app/ActivityOptions;
+Landroid/app/Activity;->getActivityToken()Landroid/os/IBinder;
+Landroid/app/Activity;->isResumed()Z
+Landroid/app/Activity;->mActivityInfo:Landroid/content/pm/ActivityInfo;
+Landroid/app/Activity;->mActivityTransitionState:Landroid/app/ActivityTransitionState;
+Landroid/app/Activity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
+Landroid/app/Activity;->mApplication:Landroid/app/Application;
+Landroid/app/Activity;->mCalled:Z
+Landroid/app/Activity;->mComponent:Landroid/content/ComponentName;
+Landroid/app/Activity;->mConfigChangeFlags:I
+Landroid/app/Activity;->mCurrentConfig:Landroid/content/res/Configuration;
+Landroid/app/Activity;->mDestroyed:Z
+Landroid/app/Activity;->mEmbeddedID:Ljava/lang/String;
+Landroid/app/Activity;->mFinished:Z
+Landroid/app/Activity;->mFragments:Landroid/app/FragmentController;
+Landroid/app/Activity;->mHandler:Landroid/os/Handler;
+Landroid/app/Activity;->mIdent:I
+Landroid/app/Activity;->mInstrumentation:Landroid/app/Instrumentation;
+Landroid/app/Activity;->mIntent:Landroid/content/Intent;
+Landroid/app/Activity;->mLastNonConfigurationInstances:Landroid/app/Activity$NonConfigurationInstances;
+Landroid/app/Activity;->mMainThread:Landroid/app/ActivityThread;
+Landroid/app/Activity;->mParent:Landroid/app/Activity;
+Landroid/app/Activity;->mReferrer:Ljava/lang/String;
+Landroid/app/Activity;->mResultCode:I
+Landroid/app/Activity;->mResultData:Landroid/content/Intent;
+Landroid/app/Activity;->mResumed:Z
+Landroid/app/Activity;->mStopped:Z
+Landroid/app/Activity;->mTitle:Ljava/lang/CharSequence;
+Landroid/app/Activity;->mToken:Landroid/os/IBinder;
+Landroid/app/Activity;->mVisibleFromClient:Z
+Landroid/app/Activity;->mVoiceInteractor:Landroid/app/VoiceInteractor;
+Landroid/app/Activity;->mWindow:Landroid/view/Window;
+Landroid/app/Activity;->mWindowAdded:Z
+Landroid/app/Activity;->mWindowManager:Landroid/view/WindowManager;
+Landroid/app/Activity;->performCreate(Landroid/os/Bundle;Landroid/os/PersistableBundle;)V
+Landroid/app/Activity;->registerRemoteAnimations(Landroid/view/RemoteAnimationDefinition;)V
+Landroid/app/Activity;->saveManagedDialogs(Landroid/os/Bundle;)V
+Landroid/app/Activity;->setDisablePreviewScreenshots(Z)V
+Landroid/app/Activity;->setParent(Landroid/app/Activity;)V
+Landroid/app/Activity;->setPersistent(Z)V
+Landroid/app/Activity;->setPictureInPictureArgs(Landroid/app/PictureInPictureArgs;)V
+Landroid/app/Activity;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
+Landroid/app/Activity;->startActivityForResult(Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)V
+Landroid/app/Activity;->startActivityForResultAsUser(Landroid/content/Intent;ILandroid/os/UserHandle;)V
+Landroid/app/ActivityGroup;->mLocalActivityManager:Landroid/app/LocalActivityManager;
+Landroid/app/ActivityManager$MemoryInfo;->foregroundAppThreshold:J
+Landroid/app/ActivityManager$MemoryInfo;->hiddenAppThreshold:J
+Landroid/app/ActivityManager$MemoryInfo;->secondaryServerThreshold:J
+Landroid/app/ActivityManager$MemoryInfo;->visibleAppThreshold:J
+Landroid/app/ActivityManager$RecentTaskInfo;->affiliatedTaskColor:I
+Landroid/app/ActivityManager$RecentTaskInfo;->configuration:Landroid/content/res/Configuration;
+Landroid/app/ActivityManager$RecentTaskInfo;->firstActiveTime:J
+Landroid/app/ActivityManager$RecentTaskInfo;->lastActiveTime:J
+Landroid/app/ActivityManager$RecentTaskInfo;->resizeMode:I
+Landroid/app/ActivityManager$RecentTaskInfo;->stackId:I
+Landroid/app/ActivityManager$RecentTaskInfo;->supportsSplitScreenMultiWindow:Z
+Landroid/app/ActivityManager$RecentTaskInfo;->userId:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->flags:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->FLAG_HAS_ACTIVITIES:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->FLAG_PERSISTENT:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->processState:I
+Landroid/app/ActivityManager$RunningAppProcessInfo;->procStateToImportance(I)I
+Landroid/app/ActivityManager$StackInfo;->bounds:Landroid/graphics/Rect;
+Landroid/app/ActivityManager$StackInfo;->displayId:I
+Landroid/app/ActivityManager$StackInfo;->position:I
+Landroid/app/ActivityManager$StackInfo;->stackId:I
+Landroid/app/ActivityManager$StackInfo;->taskBounds:[Landroid/graphics/Rect;
+Landroid/app/ActivityManager$StackInfo;->taskIds:[I
+Landroid/app/ActivityManager$StackInfo;->taskNames:[Ljava/lang/String;
+Landroid/app/ActivityManager$StackInfo;->taskUserIds:[I
+Landroid/app/ActivityManager$StackInfo;->topActivity:Landroid/content/ComponentName;
+Landroid/app/ActivityManager$StackInfo;->toString(Ljava/lang/String;)Ljava/lang/String;
+Landroid/app/ActivityManager$StackInfo;->userId:I
+Landroid/app/ActivityManager$StackInfo;->visible:Z
+Landroid/app/ActivityManager$TaskDescription;->getBackgroundColor()I
+Landroid/app/ActivityManager$TaskDescription;->getInMemoryIcon()Landroid/graphics/Bitmap;
+Landroid/app/ActivityManager$TaskDescription;->loadTaskDescriptionIcon(Ljava/lang/String;I)Landroid/graphics/Bitmap;
+Landroid/app/ActivityManager$TaskSnapshot;->getContentInsets()Landroid/graphics/Rect;
+Landroid/app/ActivityManager$TaskSnapshot;->getOrientation()I
+Landroid/app/ActivityManager$TaskSnapshot;->getScale()F
+Landroid/app/ActivityManager$TaskSnapshot;->getSnapshot()Landroid/graphics/GraphicBuffer;
+Landroid/app/ActivityManager$TaskSnapshot;->isRealSnapshot()Z
+Landroid/app/ActivityManager$TaskSnapshot;->isReducedResolution()Z
+Landroid/app/ActivityManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
+Landroid/app/ActivityManager;->checkComponentPermission(Ljava/lang/String;IIZ)I
+Landroid/app/ActivityManager;->clearApplicationUserData(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)Z
+Landroid/app/ActivityManager;->forceStopPackageAsUser(Ljava/lang/String;I)V
+Landroid/app/ActivityManager;->getMaxNumPictureInPictureActions()I
+Landroid/app/ActivityManager;->getMaxRecentTasksStatic()I
+Landroid/app/ActivityManager;->getService()Landroid/app/IActivityManager;
+Landroid/app/ActivityManager;->IActivityManagerSingleton:Landroid/util/Singleton;
+Landroid/app/ActivityManager;->INTENT_SENDER_ACTIVITY:I
+Landroid/app/ActivityManager;->isHighEndGfx()Z
+Landroid/app/ActivityManager;->isLowRamDeviceStatic()Z
+Landroid/app/ActivityManager;->isUserRunning(I)Z
+Landroid/app/ActivityManager;->mContext:Landroid/content/Context;
+Landroid/app/ActivityManager;->PROCESS_STATE_BOUND_FOREGROUND_SERVICE:I
+Landroid/app/ActivityManager;->PROCESS_STATE_CACHED_ACTIVITY:I
+Landroid/app/ActivityManager;->PROCESS_STATE_FOREGROUND_SERVICE:I
+Landroid/app/ActivityManager;->PROCESS_STATE_HOME:I
+Landroid/app/ActivityManager;->PROCESS_STATE_IMPORTANT_BACKGROUND:I
+Landroid/app/ActivityManager;->PROCESS_STATE_RECEIVER:I
+Landroid/app/ActivityManager;->PROCESS_STATE_SERVICE:I
+Landroid/app/ActivityManager;->PROCESS_STATE_TOP:I
+Landroid/app/ActivityManager;->setPersistentVrThread(I)V
+Landroid/app/ActivityManager;->staticGetMemoryClass()I
+Landroid/app/ActivityManager;->switchUser(I)Z
+Landroid/app/ActivityManagerNative;-><init>()V
+Landroid/app/ActivityManagerNative;->asInterface(Landroid/os/IBinder;)Landroid/app/IActivityManager;
+Landroid/app/ActivityManagerNative;->broadcastStickyIntent(Landroid/content/Intent;Ljava/lang/String;I)V
+Landroid/app/ActivityManagerNative;->getDefault()Landroid/app/IActivityManager;
+Landroid/app/ActivityManagerNative;->isSystemReady()Z
+Landroid/app/ActivityOptions;->makeCustomAnimation(Landroid/content/Context;IILandroid/os/Handler;Landroid/app/ActivityOptions$OnAnimationStartedListener;)Landroid/app/ActivityOptions;
+Landroid/app/ActivityOptions;->makeMultiThumbFutureAspectScaleAnimation(Landroid/content/Context;Landroid/os/Handler;Landroid/view/IAppTransitionAnimationSpecsFuture;Landroid/app/ActivityOptions$OnAnimationStartedListener;Z)Landroid/app/ActivityOptions;
+Landroid/app/ActivityOptions;->makeRemoteAnimation(Landroid/view/RemoteAnimationAdapter;)Landroid/app/ActivityOptions;
+Landroid/app/ActivityOptions;->setSplitScreenCreateMode(I)V
+Landroid/app/ActivityThread$ActivityClientRecord;->activity:Landroid/app/Activity;
+Landroid/app/ActivityThread$ActivityClientRecord;->activityInfo:Landroid/content/pm/ActivityInfo;
+Landroid/app/ActivityThread$ActivityClientRecord;->compatInfo:Landroid/content/res/CompatibilityInfo;
+Landroid/app/ActivityThread$ActivityClientRecord;->intent:Landroid/content/Intent;
+Landroid/app/ActivityThread$ActivityClientRecord;->mPreserveWindow:Z
+Landroid/app/ActivityThread$ActivityClientRecord;->packageInfo:Landroid/app/LoadedApk;
+Landroid/app/ActivityThread$ActivityClientRecord;->paused:Z
+Landroid/app/ActivityThread$ActivityClientRecord;->stopped:Z
+Landroid/app/ActivityThread$ActivityClientRecord;->token:Landroid/os/IBinder;
+Landroid/app/ActivityThread$AppBindData;->appInfo:Landroid/content/pm/ApplicationInfo;
+Landroid/app/ActivityThread$AppBindData;->compatInfo:Landroid/content/res/CompatibilityInfo;
+Landroid/app/ActivityThread$AppBindData;->info:Landroid/app/LoadedApk;
+Landroid/app/ActivityThread$AppBindData;->instrumentationArgs:Landroid/os/Bundle;
+Landroid/app/ActivityThread$AppBindData;->persistent:Z
+Landroid/app/ActivityThread$AppBindData;->processName:Ljava/lang/String;
+Landroid/app/ActivityThread$AppBindData;->providers:Ljava/util/List;
+Landroid/app/ActivityThread$AppBindData;->restrictedBackupMode:Z
+Landroid/app/ActivityThread$BindServiceData;->intent:Landroid/content/Intent;
+Landroid/app/ActivityThread$BindServiceData;->token:Landroid/os/IBinder;
+Landroid/app/ActivityThread$CreateServiceData;-><init>()V
+Landroid/app/ActivityThread$CreateServiceData;->compatInfo:Landroid/content/res/CompatibilityInfo;
+Landroid/app/ActivityThread$CreateServiceData;->info:Landroid/content/pm/ServiceInfo;
+Landroid/app/ActivityThread$CreateServiceData;->intent:Landroid/content/Intent;
+Landroid/app/ActivityThread$CreateServiceData;->token:Landroid/os/IBinder;
+Landroid/app/ActivityThread$H;->BIND_SERVICE:I
+Landroid/app/ActivityThread$H;->CREATE_SERVICE:I
+Landroid/app/ActivityThread$H;->DUMP_PROVIDER:I
+Landroid/app/ActivityThread$H;->ENTER_ANIMATION_COMPLETE:I
+Landroid/app/ActivityThread$H;->EXIT_APPLICATION:I
+Landroid/app/ActivityThread$H;->GC_WHEN_IDLE:I
+Landroid/app/ActivityThread$H;->INSTALL_PROVIDER:I
+Landroid/app/ActivityThread$H;->RECEIVER:I
+Landroid/app/ActivityThread$H;->REMOVE_PROVIDER:I
+Landroid/app/ActivityThread$H;->SCHEDULE_CRASH:I
+Landroid/app/ActivityThread$H;->SERVICE_ARGS:I
+Landroid/app/ActivityThread$H;->STOP_SERVICE:I
+Landroid/app/ActivityThread$H;->UNBIND_SERVICE:I
+Landroid/app/ActivityThread$ProviderClientRecord;->mHolder:Landroid/app/ContentProviderHolder;
+Landroid/app/ActivityThread$ProviderClientRecord;->mLocalProvider:Landroid/content/ContentProvider;
+Landroid/app/ActivityThread$ProviderClientRecord;->mProvider:Landroid/content/IContentProvider;
+Landroid/app/ActivityThread$ReceiverData;->compatInfo:Landroid/content/res/CompatibilityInfo;
+Landroid/app/ActivityThread$ReceiverData;->info:Landroid/content/pm/ActivityInfo;
+Landroid/app/ActivityThread$ReceiverData;->intent:Landroid/content/Intent;
+Landroid/app/ActivityThread$ServiceArgsData;->args:Landroid/content/Intent;
+Landroid/app/ActivityThread$ServiceArgsData;->token:Landroid/os/IBinder;
+Landroid/app/ActivityThread;-><init>()V
+Landroid/app/ActivityThread;->acquireExistingProvider(Landroid/content/Context;Ljava/lang/String;IZ)Landroid/content/IContentProvider;
+Landroid/app/ActivityThread;->acquireProvider(Landroid/content/Context;Ljava/lang/String;IZ)Landroid/content/IContentProvider;
+Landroid/app/ActivityThread;->attach(ZJ)V
+Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread;
+Landroid/app/ActivityThread;->currentApplication()Landroid/app/Application;
+Landroid/app/ActivityThread;->currentPackageName()Ljava/lang/String;
+Landroid/app/ActivityThread;->currentProcessName()Ljava/lang/String;
+Landroid/app/ActivityThread;->getActivity(Landroid/os/IBinder;)Landroid/app/Activity;
+Landroid/app/ActivityThread;->getApplication()Landroid/app/Application;
+Landroid/app/ActivityThread;->getApplicationThread()Landroid/app/ActivityThread$ApplicationThread;
+Landroid/app/ActivityThread;->getHandler()Landroid/os/Handler;
+Landroid/app/ActivityThread;->getInstrumentation()Landroid/app/Instrumentation;
+Landroid/app/ActivityThread;->getLooper()Landroid/os/Looper;
+Landroid/app/ActivityThread;->getPackageInfo(Landroid/content/pm/ApplicationInfo;Landroid/content/res/CompatibilityInfo;I)Landroid/app/LoadedApk;
+Landroid/app/ActivityThread;->getPackageInfo(Ljava/lang/String;Landroid/content/res/CompatibilityInfo;I)Landroid/app/LoadedApk;
+Landroid/app/ActivityThread;->getPackageInfoNoCheck(Landroid/content/pm/ApplicationInfo;Landroid/content/res/CompatibilityInfo;)Landroid/app/LoadedApk;
+Landroid/app/ActivityThread;->getPackageManager()Landroid/content/pm/IPackageManager;
+Landroid/app/ActivityThread;->getProcessName()Ljava/lang/String;
+Landroid/app/ActivityThread;->getSystemContext()Landroid/app/ContextImpl;
+Landroid/app/ActivityThread;->handleBindApplication(Landroid/app/ActivityThread$AppBindData;)V
+Landroid/app/ActivityThread;->handleCreateService(Landroid/app/ActivityThread$CreateServiceData;)V
+Landroid/app/ActivityThread;->handleReceiver(Landroid/app/ActivityThread$ReceiverData;)V
+Landroid/app/ActivityThread;->handleUnstableProviderDied(Landroid/os/IBinder;Z)V
+Landroid/app/ActivityThread;->installContentProviders(Landroid/content/Context;Ljava/util/List;)V
+Landroid/app/ActivityThread;->installProvider(Landroid/content/Context;Landroid/app/ContentProviderHolder;Landroid/content/pm/ProviderInfo;ZZZ)Landroid/app/ContentProviderHolder;
+Landroid/app/ActivityThread;->installSystemProviders(Ljava/util/List;)V
+Landroid/app/ActivityThread;->mActivities:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mAllApplications:Ljava/util/ArrayList;
+Landroid/app/ActivityThread;->mAppThread:Landroid/app/ActivityThread$ApplicationThread;
+Landroid/app/ActivityThread;->mBoundApplication:Landroid/app/ActivityThread$AppBindData;
+Landroid/app/ActivityThread;->mConfiguration:Landroid/content/res/Configuration;
+Landroid/app/ActivityThread;->mCurDefaultDisplayDpi:I
+Landroid/app/ActivityThread;->mDensityCompatMode:Z
+Landroid/app/ActivityThread;->mH:Landroid/app/ActivityThread$H;
+Landroid/app/ActivityThread;->mInitialApplication:Landroid/app/Application;
+Landroid/app/ActivityThread;->mInstrumentation:Landroid/app/Instrumentation;
+Landroid/app/ActivityThread;->mInstrumentationAppDir:Ljava/lang/String;
+Landroid/app/ActivityThread;->mInstrumentedAppDir:Ljava/lang/String;
+Landroid/app/ActivityThread;->mLocalProviders:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mLocalProvidersByName:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mLooper:Landroid/os/Looper;
+Landroid/app/ActivityThread;->mNumVisibleActivities:I
+Landroid/app/ActivityThread;->mPackages:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mPendingConfiguration:Landroid/content/res/Configuration;
+Landroid/app/ActivityThread;->mProviderMap:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mResourcePackages:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mResourcesManager:Landroid/app/ResourcesManager;
+Landroid/app/ActivityThread;->mServices:Landroid/util/ArrayMap;
+Landroid/app/ActivityThread;->mSystemContext:Landroid/app/ContextImpl;
+Landroid/app/ActivityThread;->peekPackageInfo(Ljava/lang/String;Z)Landroid/app/LoadedApk;
+Landroid/app/ActivityThread;->performNewIntents(Landroid/os/IBinder;Ljava/util/List;Z)V
+Landroid/app/ActivityThread;->performStopActivity(Landroid/os/IBinder;ZLjava/lang/String;)V
+Landroid/app/ActivityThread;->releaseProvider(Landroid/content/IContentProvider;Z)Z
+Landroid/app/ActivityThread;->scheduleGcIdler()V
+Landroid/app/ActivityThread;->sCurrentActivityThread:Landroid/app/ActivityThread;
+Landroid/app/ActivityThread;->sendActivityResult(Landroid/os/IBinder;Ljava/lang/String;IILandroid/content/Intent;)V
+Landroid/app/ActivityThread;->sMainThreadHandler:Landroid/os/Handler;
+Landroid/app/ActivityThread;->sPackageManager:Landroid/content/pm/IPackageManager;
+Landroid/app/ActivityThread;->startActivityNow(Landroid/app/Activity;Ljava/lang/String;Landroid/content/Intent;Landroid/content/pm/ActivityInfo;Landroid/os/IBinder;Landroid/os/Bundle;Landroid/app/Activity$NonConfigurationInstances;)Landroid/app/Activity;
+Landroid/app/ActivityThread;->systemMain()Landroid/app/ActivityThread;
+Landroid/app/ActivityView;-><init>(Landroid/content/Context;)V
+Landroid/app/ActivityView;->release()V
+Landroid/app/ActivityView;->startActivity(Landroid/app/PendingIntent;)V
+Landroid/app/ActivityView;->startActivity(Landroid/content/Intent;)V
+Landroid/app/admin/DeviceAdminInfo$PolicyInfo;->tag:Ljava/lang/String;
+Landroid/app/admin/DeviceAdminInfo;->getUsedPolicies()Ljava/util/ArrayList;
+Landroid/app/admin/DevicePolicyManager;->ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED:Ljava/lang/String;
+Landroid/app/admin/DevicePolicyManager;->createAndInitializeUser(Landroid/content/ComponentName;Ljava/lang/String;Ljava/lang/String;Landroid/content/ComponentName;Landroid/os/Bundle;)Landroid/os/UserHandle;
+Landroid/app/admin/DevicePolicyManager;->createUser(Landroid/content/ComponentName;Ljava/lang/String;)Landroid/os/UserHandle;
+Landroid/app/admin/DevicePolicyManager;->getActiveAdminsAsUser(I)Ljava/util/List;
+Landroid/app/admin/DevicePolicyManager;->getCameraDisabled(Landroid/content/ComponentName;I)Z
+Landroid/app/admin/DevicePolicyManager;->getCurrentFailedPasswordAttempts(I)I
+Landroid/app/admin/DevicePolicyManager;->getDeviceInitializerApp()Ljava/lang/String;
+Landroid/app/admin/DevicePolicyManager;->getDeviceInitializerComponent()Landroid/content/ComponentName;
+Landroid/app/admin/DevicePolicyManager;->getKeyguardDisabledFeatures(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getMandatoryBackupTransport()Landroid/content/ComponentName;
+Landroid/app/admin/DevicePolicyManager;->getMaximumFailedPasswordsForWipe(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getMaximumTimeToLock(Landroid/content/ComponentName;I)J
+Landroid/app/admin/DevicePolicyManager;->getPasswordHistoryLength(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumLength(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumLetters(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumLowerCase(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumNonLetter(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumNumeric(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumSymbols(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumUpperCase(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getPasswordQuality(Landroid/content/ComponentName;I)I
+Landroid/app/admin/DevicePolicyManager;->getProfileOwnerAsUser(I)Landroid/content/ComponentName;
+Landroid/app/admin/DevicePolicyManager;->getRequiredStrongAuthTimeout(Landroid/content/ComponentName;I)J
+Landroid/app/admin/DevicePolicyManager;->getStorageEncryptionStatus(I)I
+Landroid/app/admin/DevicePolicyManager;->getTrustAgentConfiguration(Landroid/content/ComponentName;Landroid/content/ComponentName;I)Ljava/util/List;
+Landroid/app/admin/DevicePolicyManager;->packageHasActiveAdmins(Ljava/lang/String;I)Z
+Landroid/app/admin/DevicePolicyManager;->reportFailedPasswordAttempt(I)V
+Landroid/app/admin/DevicePolicyManager;->reportSuccessfulPasswordAttempt(I)V
+Landroid/app/admin/DevicePolicyManager;->setActiveAdmin(Landroid/content/ComponentName;Z)V
+Landroid/app/admin/DevicePolicyManager;->setActiveAdmin(Landroid/content/ComponentName;ZI)V
+Landroid/app/admin/DevicePolicyManager;->setActivePasswordState(Landroid/app/admin/PasswordMetrics;I)V
+Landroid/app/admin/DevicePolicyManager;->setDefaultSmsApplication(Landroid/content/ComponentName;Ljava/lang/String;)V
+Landroid/app/admin/DevicePolicyManager;->setGlobalProxy(Landroid/content/ComponentName;Ljava/net/Proxy;Ljava/util/List;)Landroid/content/ComponentName;
+Landroid/app/admin/DevicePolicyManager;->throwIfParentInstance(Ljava/lang/String;)V
+Landroid/app/admin/IDevicePolicyManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/admin/IDevicePolicyManager;
+Landroid/app/admin/IDevicePolicyManager$Stub;->TRANSACTION_packageHasActiveAdmins:I
+Landroid/app/admin/IDevicePolicyManager$Stub;->TRANSACTION_removeActiveAdmin:I
+Landroid/app/admin/IDevicePolicyManager;->packageHasActiveAdmins(Ljava/lang/String;I)Z
+Landroid/app/admin/SecurityLog$SecurityEvent;-><init>([B)V
+Landroid/app/AlarmManager;->FLAG_ALLOW_WHILE_IDLE_UNRESTRICTED:I
+Landroid/app/AlarmManager;->FLAG_IDLE_UNTIL:I
+Landroid/app/AlarmManager;->FLAG_STANDALONE:I
+Landroid/app/AlarmManager;->FLAG_WAKE_FROM_IDLE:I
+Landroid/app/AlarmManager;->mService:Landroid/app/IAlarmManager;
+Landroid/app/AlarmManager;->set(IJJJLjava/lang/String;Landroid/app/AlarmManager$OnAlarmListener;Landroid/os/Handler;Landroid/os/WorkSource;)V
+Landroid/app/AlarmManager;->WINDOW_EXACT:J
+Landroid/app/AlarmManager;->WINDOW_HEURISTIC:J
+Landroid/app/AlertDialog$Builder;->P:Lcom/android/internal/app/AlertController$AlertParams;
+Landroid/app/AlertDialog$Builder;->setRecycleOnMeasureEnabled(Z)Landroid/app/AlertDialog$Builder;
+Landroid/app/AlertDialog$Builder;->setView(Landroid/view/View;IIII)Landroid/app/AlertDialog$Builder;
+Landroid/app/AlertDialog;->mAlert:Lcom/android/internal/app/AlertController;
+Landroid/app/AppGlobals;->getInitialApplication()Landroid/app/Application;
+Landroid/app/AppGlobals;->getInitialPackage()Ljava/lang/String;
+Landroid/app/AppGlobals;->getPackageManager()Landroid/content/pm/IPackageManager;
+Landroid/app/Application;->attach(Landroid/content/Context;)V
+Landroid/app/Application;->collectActivityLifecycleCallbacks()[Ljava/lang/Object;
+Landroid/app/Application;->dispatchActivityCreated(Landroid/app/Activity;Landroid/os/Bundle;)V
+Landroid/app/Application;->dispatchActivityDestroyed(Landroid/app/Activity;)V
+Landroid/app/Application;->dispatchActivityPaused(Landroid/app/Activity;)V
+Landroid/app/Application;->dispatchActivityResumed(Landroid/app/Activity;)V
+Landroid/app/Application;->dispatchActivitySaveInstanceState(Landroid/app/Activity;Landroid/os/Bundle;)V
+Landroid/app/Application;->dispatchActivityStarted(Landroid/app/Activity;)V
+Landroid/app/Application;->dispatchActivityStopped(Landroid/app/Activity;)V
+Landroid/app/Application;->mActivityLifecycleCallbacks:Ljava/util/ArrayList;
+Landroid/app/Application;->mAssistCallbacks:Ljava/util/ArrayList;
+Landroid/app/Application;->mComponentCallbacks:Ljava/util/ArrayList;
+Landroid/app/Application;->mLoadedApk:Landroid/app/LoadedApk;
+Landroid/app/ApplicationLoaders;->getDefault()Landroid/app/ApplicationLoaders;
+Landroid/app/ApplicationLoaders;->mLoaders:Landroid/util/ArrayMap;
+Landroid/app/ApplicationPackageManager;-><init>(Landroid/app/ContextImpl;Landroid/content/pm/IPackageManager;)V
+Landroid/app/ApplicationPackageManager;->configurationChanged()V
+Landroid/app/ApplicationPackageManager;->deletePackage(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;I)V
+Landroid/app/ApplicationPackageManager;->getPackageCurrentVolume(Landroid/content/pm/ApplicationInfo;)Landroid/os/storage/VolumeInfo;
+Landroid/app/ApplicationPackageManager;->getPackageSizeInfoAsUser(Ljava/lang/String;ILandroid/content/pm/IPackageStatsObserver;)V
+Landroid/app/ApplicationPackageManager;->mPM:Landroid/content/pm/IPackageManager;
+Landroid/app/ApplicationPackageManager;->setInstantAppCookie([B)Z
+Landroid/app/ApplicationPackageManager;->shouldShowRequestPermissionRationale(Ljava/lang/String;)Z
+Landroid/app/AppOpsManager$OpEntry;->getDuration()I
+Landroid/app/AppOpsManager$OpEntry;->getLastAccessBackgroundTime()J
+Landroid/app/AppOpsManager$OpEntry;->getLastAccessForegroundTime()J
+Landroid/app/AppOpsManager$OpEntry;->getLastAccessTime()J
+Landroid/app/AppOpsManager$OpEntry;->getLastRejectBackgroundTime()J
+Landroid/app/AppOpsManager$OpEntry;->getLastRejectForegroundTime()J
+Landroid/app/AppOpsManager$OpEntry;->getLastRejectTime()J
+Landroid/app/AppOpsManager$OpEntry;->getMode()I
+Landroid/app/AppOpsManager$OpEntry;->getOp()I
+Landroid/app/AppOpsManager$OpEntry;->getRejectTime()J
+Landroid/app/AppOpsManager$OpEntry;->getTime()J
+Landroid/app/AppOpsManager$OpEntry;->isRunning()Z
+Landroid/app/AppOpsManager$PackageOps;-><init>(Ljava/lang/String;ILjava/util/List;)V
+Landroid/app/AppOpsManager$PackageOps;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/app/AppOpsManager$PackageOps;->getOps()Ljava/util/List;
+Landroid/app/AppOpsManager$PackageOps;->getPackageName()Ljava/lang/String;
+Landroid/app/AppOpsManager$PackageOps;->getUid()I
+Landroid/app/AppOpsManager;->checkOp(IILjava/lang/String;)I
+Landroid/app/AppOpsManager;->checkOpNoThrow(IILjava/lang/String;)I
+Landroid/app/AppOpsManager;->getOpsForPackage(ILjava/lang/String;[I)Ljava/util/List;
+Landroid/app/AppOpsManager;->getPackagesForOps([I)Ljava/util/List;
+Landroid/app/AppOpsManager;->getToken(Lcom/android/internal/app/IAppOpsService;)Landroid/os/IBinder;
+Landroid/app/AppOpsManager;->MODE_FOREGROUND:I
+Landroid/app/AppOpsManager;->mService:Lcom/android/internal/app/IAppOpsService;
+Landroid/app/AppOpsManager;->noteOp(I)I
+Landroid/app/AppOpsManager;->noteOp(IILjava/lang/String;)I
+Landroid/app/AppOpsManager;->noteOpNoThrow(IILjava/lang/String;)I
+Landroid/app/AppOpsManager;->noteProxyOp(ILjava/lang/String;)I
+Landroid/app/AppOpsManager;->opToName(I)Ljava/lang/String;
+Landroid/app/AppOpsManager;->opToPermission(I)Ljava/lang/String;
+Landroid/app/AppOpsManager;->opToSwitch(I)I
+Landroid/app/AppOpsManager;->OP_ACCEPT_HANDOVER:I
+Landroid/app/AppOpsManager;->OP_ACCESS_NOTIFICATIONS:I
+Landroid/app/AppOpsManager;->OP_ACTIVATE_VPN:I
+Landroid/app/AppOpsManager;->OP_ADD_VOICEMAIL:I
+Landroid/app/AppOpsManager;->OP_ANSWER_PHONE_CALLS:I
+Landroid/app/AppOpsManager;->OP_ASSIST_SCREENSHOT:I
+Landroid/app/AppOpsManager;->OP_ASSIST_STRUCTURE:I
+Landroid/app/AppOpsManager;->OP_AUDIO_ACCESSIBILITY_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_ALARM_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_BLUETOOTH_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_MASTER_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_MEDIA_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_NOTIFICATION_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_RING_VOLUME:I
+Landroid/app/AppOpsManager;->OP_AUDIO_VOICE_VOLUME:I
+Landroid/app/AppOpsManager;->OP_BIND_ACCESSIBILITY_SERVICE:I
+Landroid/app/AppOpsManager;->OP_BLUETOOTH_SCAN:I
+Landroid/app/AppOpsManager;->OP_BODY_SENSORS:I
+Landroid/app/AppOpsManager;->OP_CALL_PHONE:I
+Landroid/app/AppOpsManager;->OP_CAMERA:I
+Landroid/app/AppOpsManager;->OP_CHANGE_WIFI_STATE:I
+Landroid/app/AppOpsManager;->OP_COARSE_LOCATION:I
+Landroid/app/AppOpsManager;->OP_FINE_LOCATION:I
+Landroid/app/AppOpsManager;->OP_GET_ACCOUNTS:I
+Landroid/app/AppOpsManager;->OP_GET_USAGE_STATS:I
+Landroid/app/AppOpsManager;->OP_GPS:I
+Landroid/app/AppOpsManager;->OP_INSTANT_APP_START_FOREGROUND:I
+Landroid/app/AppOpsManager;->OP_MANAGE_IPSEC_TUNNELS:I
+Landroid/app/AppOpsManager;->OP_MOCK_LOCATION:I
+Landroid/app/AppOpsManager;->OP_MONITOR_HIGH_POWER_LOCATION:I
+Landroid/app/AppOpsManager;->OP_MONITOR_LOCATION:I
+Landroid/app/AppOpsManager;->OP_MUTE_MICROPHONE:I
+Landroid/app/AppOpsManager;->OP_NEIGHBORING_CELLS:I
+Landroid/app/AppOpsManager;->OP_NONE:I
+Landroid/app/AppOpsManager;->OP_PICTURE_IN_PICTURE:I
+Landroid/app/AppOpsManager;->OP_PLAY_AUDIO:I
+Landroid/app/AppOpsManager;->OP_POST_NOTIFICATION:I
+Landroid/app/AppOpsManager;->OP_PROCESS_OUTGOING_CALLS:I
+Landroid/app/AppOpsManager;->OP_PROJECT_MEDIA:I
+Landroid/app/AppOpsManager;->OP_READ_CALENDAR:I
+Landroid/app/AppOpsManager;->OP_READ_CALL_LOG:I
+Landroid/app/AppOpsManager;->OP_READ_CELL_BROADCASTS:I
+Landroid/app/AppOpsManager;->OP_READ_CLIPBOARD:I
+Landroid/app/AppOpsManager;->OP_READ_CONTACTS:I
+Landroid/app/AppOpsManager;->OP_READ_EXTERNAL_STORAGE:I
+Landroid/app/AppOpsManager;->OP_READ_ICC_SMS:I
+Landroid/app/AppOpsManager;->OP_READ_PHONE_NUMBERS:I
+Landroid/app/AppOpsManager;->OP_READ_PHONE_STATE:I
+Landroid/app/AppOpsManager;->OP_READ_SMS:I
+Landroid/app/AppOpsManager;->OP_RECEIVE_EMERGECY_SMS:I
+Landroid/app/AppOpsManager;->OP_RECEIVE_MMS:I
+Landroid/app/AppOpsManager;->OP_RECEIVE_SMS:I
+Landroid/app/AppOpsManager;->OP_RECEIVE_WAP_PUSH:I
+Landroid/app/AppOpsManager;->OP_REQUEST_DELETE_PACKAGES:I
+Landroid/app/AppOpsManager;->OP_REQUEST_INSTALL_PACKAGES:I
+Landroid/app/AppOpsManager;->OP_RUN_ANY_IN_BACKGROUND:I
+Landroid/app/AppOpsManager;->OP_RUN_IN_BACKGROUND:I
+Landroid/app/AppOpsManager;->OP_SEND_SMS:I
+Landroid/app/AppOpsManager;->OP_START_FOREGROUND:I
+Landroid/app/AppOpsManager;->OP_TAKE_AUDIO_FOCUS:I
+Landroid/app/AppOpsManager;->OP_TAKE_MEDIA_BUTTONS:I
+Landroid/app/AppOpsManager;->OP_TOAST_WINDOW:I
+Landroid/app/AppOpsManager;->OP_TURN_SCREEN_ON:I
+Landroid/app/AppOpsManager;->OP_USE_FINGERPRINT:I
+Landroid/app/AppOpsManager;->OP_USE_SIP:I
+Landroid/app/AppOpsManager;->OP_VIBRATE:I
+Landroid/app/AppOpsManager;->OP_WAKE_LOCK:I
+Landroid/app/AppOpsManager;->OP_WIFI_SCAN:I
+Landroid/app/AppOpsManager;->OP_WRITE_CALENDAR:I
+Landroid/app/AppOpsManager;->OP_WRITE_CALL_LOG:I
+Landroid/app/AppOpsManager;->OP_WRITE_CLIPBOARD:I
+Landroid/app/AppOpsManager;->OP_WRITE_CONTACTS:I
+Landroid/app/AppOpsManager;->OP_WRITE_EXTERNAL_STORAGE:I
+Landroid/app/AppOpsManager;->OP_WRITE_ICC_SMS:I
+Landroid/app/AppOpsManager;->OP_WRITE_SETTINGS:I
+Landroid/app/AppOpsManager;->OP_WRITE_SMS:I
+Landroid/app/AppOpsManager;->OP_WRITE_WALLPAPER:I
+Landroid/app/AppOpsManager;->permissionToOpCode(Ljava/lang/String;)I
+Landroid/app/AppOpsManager;->resetAllModes()V
+Landroid/app/AppOpsManager;->setRestriction(III[Ljava/lang/String;)V
+Landroid/app/AppOpsManager;->sOpPerms:[Ljava/lang/String;
+Landroid/app/AppOpsManager;->startWatchingMode(Ljava/lang/String;Ljava/lang/String;ILandroid/app/AppOpsManager$OnOpChangedListener;)V
+Landroid/app/AppOpsManager;->strOpToOp(Ljava/lang/String;)I
+Landroid/app/AppOpsManager;->unsafeCheckOpRaw(Ljava/lang/String;ILjava/lang/String;)I
+Landroid/app/AppOpsManager;->WATCH_FOREGROUND_CHANGES:I
+Landroid/app/AppOpsManager;->_NUM_OP:I
+Landroid/app/assist/AssistContent;-><init>(Landroid/os/Parcel;)V
+Landroid/app/assist/AssistContent;->mClipData:Landroid/content/ClipData;
+Landroid/app/assist/AssistContent;->mExtras:Landroid/os/Bundle;
+Landroid/app/assist/AssistContent;->mIntent:Landroid/content/Intent;
+Landroid/app/assist/AssistContent;->mIsAppProvidedIntent:Z
+Landroid/app/assist/AssistContent;->mStructuredData:Ljava/lang/String;
+Landroid/app/assist/AssistContent;->mUri:Landroid/net/Uri;
+Landroid/app/assist/AssistContent;->writeToParcelInternal(Landroid/os/Parcel;I)V
+Landroid/app/backup/BackupDataInput$EntityHeader;->dataSize:I
+Landroid/app/backup/BackupDataInput$EntityHeader;->key:Ljava/lang/String;
+Landroid/app/backup/BackupDataInputStream;->dataSize:I
+Landroid/app/backup/BackupDataInputStream;->key:Ljava/lang/String;
+Landroid/app/backup/BackupDataOutput;->mBackupWriter:J
+Landroid/app/backup/BackupHelperDispatcher$Header;->chunkSize:I
+Landroid/app/backup/BackupHelperDispatcher$Header;->keyPrefix:Ljava/lang/String;
+Landroid/app/backup/BackupManager;->checkServiceBinder()V
+Landroid/app/backup/BackupManager;->sService:Landroid/app/backup/IBackupManager;
+Landroid/app/backup/FileBackupHelperBase;->writeNewStateDescription(Landroid/os/ParcelFileDescriptor;)V
+Landroid/app/backup/FullBackup;->backupToTar(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/backup/FullBackupDataOutput;)I
+Landroid/app/backup/FullBackupDataOutput;-><init>(Landroid/os/ParcelFileDescriptor;)V
+Landroid/app/backup/FullBackupDataOutput;->addSize(J)V
+Landroid/app/backup/FullBackupDataOutput;->getData()Landroid/app/backup/BackupDataOutput;
+Landroid/app/backup/FullBackupDataOutput;->mData:Landroid/app/backup/BackupDataOutput;
+Landroid/app/backup/IBackupManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/backup/IBackupManager;
+Landroid/app/backup/IBackupManager;->acknowledgeFullBackupOrRestore(IZLjava/lang/String;Ljava/lang/String;Landroid/app/backup/IFullBackupRestoreObserver;)V
+Landroid/app/backup/IBackupManager;->clearBackupData(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/app/backup/IBackupManager;->dataChanged(Ljava/lang/String;)V
+Landroid/app/backup/IBackupManager;->getCurrentTransport()Ljava/lang/String;
+Landroid/app/backup/IBackupManager;->isBackupEnabled()Z
+Landroid/app/backup/IBackupManager;->isBackupServiceActive(I)Z
+Landroid/app/backup/IBackupManager;->listAllTransports()[Ljava/lang/String;
+Landroid/app/backup/IBackupManager;->selectBackupTransport(Ljava/lang/String;)Ljava/lang/String;
+Landroid/app/backup/IBackupManager;->setAutoRestore(Z)V
+Landroid/app/backup/IBackupManager;->setBackupEnabled(Z)V
+Landroid/app/backup/IFullBackupRestoreObserver$Stub;-><init>()V
+Landroid/app/backup/IRestoreObserver$Stub;-><init>()V
+Landroid/app/ContentProviderHolder;-><init>(Landroid/content/pm/ProviderInfo;)V
+Landroid/app/ContentProviderHolder;-><init>(Landroid/os/Parcel;)V
+Landroid/app/ContentProviderHolder;->info:Landroid/content/pm/ProviderInfo;
+Landroid/app/ContentProviderHolder;->noReleaseNeeded:Z
+Landroid/app/ContentProviderHolder;->provider:Landroid/content/IContentProvider;
+Landroid/app/ContextImpl$ApplicationContentResolver;->mMainThread:Landroid/app/ActivityThread;
+Landroid/app/ContextImpl;->createActivityContext(Landroid/app/ActivityThread;Landroid/app/LoadedApk;Landroid/content/pm/ActivityInfo;Landroid/os/IBinder;ILandroid/content/res/Configuration;)Landroid/app/ContextImpl;
+Landroid/app/ContextImpl;->createAppContext(Landroid/app/ActivityThread;Landroid/app/LoadedApk;)Landroid/app/ContextImpl;
+Landroid/app/ContextImpl;->createSystemContext(Landroid/app/ActivityThread;)Landroid/app/ContextImpl;
+Landroid/app/ContextImpl;->getActivityToken()Landroid/os/IBinder;
+Landroid/app/ContextImpl;->getDisplay()Landroid/view/Display;
+Landroid/app/ContextImpl;->getImpl(Landroid/content/Context;)Landroid/app/ContextImpl;
+Landroid/app/ContextImpl;->getOuterContext()Landroid/content/Context;
+Landroid/app/ContextImpl;->getPreferencesDir()Ljava/io/File;
+Landroid/app/ContextImpl;->getReceiverRestrictedContext()Landroid/content/Context;
+Landroid/app/ContextImpl;->getSharedPreferences(Ljava/io/File;I)Landroid/content/SharedPreferences;
+Landroid/app/ContextImpl;->getSharedPreferencesPath(Ljava/lang/String;)Ljava/io/File;
+Landroid/app/ContextImpl;->mBasePackageName:Ljava/lang/String;
+Landroid/app/ContextImpl;->mClassLoader:Ljava/lang/ClassLoader;
+Landroid/app/ContextImpl;->mContentResolver:Landroid/app/ContextImpl$ApplicationContentResolver;
+Landroid/app/ContextImpl;->mFlags:I
+Landroid/app/ContextImpl;->mMainThread:Landroid/app/ActivityThread;
+Landroid/app/ContextImpl;->mOpPackageName:Ljava/lang/String;
+Landroid/app/ContextImpl;->mOuterContext:Landroid/content/Context;
+Landroid/app/ContextImpl;->mPackageInfo:Landroid/app/LoadedApk;
+Landroid/app/ContextImpl;->mPackageManager:Landroid/content/pm/PackageManager;
+Landroid/app/ContextImpl;->mPreferencesDir:Ljava/io/File;
+Landroid/app/ContextImpl;->mResources:Landroid/content/res/Resources;
+Landroid/app/ContextImpl;->mServiceCache:[Ljava/lang/Object;
+Landroid/app/ContextImpl;->mSharedPrefsPaths:Landroid/util/ArrayMap;
+Landroid/app/ContextImpl;->mTheme:Landroid/content/res/Resources$Theme;
+Landroid/app/ContextImpl;->mThemeResource:I
+Landroid/app/ContextImpl;->scheduleFinalCleanup(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/app/ContextImpl;->setOuterContext(Landroid/content/Context;)V
+Landroid/app/ContextImpl;->sSharedPrefsCache:Landroid/util/ArrayMap;
+Landroid/app/DatePickerDialog;->mDatePicker:Landroid/widget/DatePicker;
+Landroid/app/Dialog;->CANCEL:I
+Landroid/app/Dialog;->dismissDialog()V
+Landroid/app/Dialog;->mCancelMessage:Landroid/os/Message;
+Landroid/app/Dialog;->mContext:Landroid/content/Context;
+Landroid/app/Dialog;->mDismissMessage:Landroid/os/Message;
+Landroid/app/Dialog;->mHandler:Landroid/os/Handler;
+Landroid/app/Dialog;->mListenersHandler:Landroid/os/Handler;
+Landroid/app/Dialog;->mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;
+Landroid/app/Dialog;->mOwnerActivity:Landroid/app/Activity;
+Landroid/app/Dialog;->mShowing:Z
+Landroid/app/Dialog;->mShowMessage:Landroid/os/Message;
+Landroid/app/Dialog;->mWindow:Landroid/view/Window;
+Landroid/app/DialogFragment;->mBackStackId:I
+Landroid/app/DialogFragment;->mDismissed:Z
+Landroid/app/DialogFragment;->mShownByMe:Z
+Landroid/app/DialogFragment;->mViewDestroyed:Z
+Landroid/app/DialogFragment;->showAllowingStateLoss(Landroid/app/FragmentManager;Ljava/lang/String;)V
+Landroid/app/DownloadManager$Query;->orderBy(Ljava/lang/String;I)Landroid/app/DownloadManager$Query;
+Landroid/app/DownloadManager$Query;->setOnlyIncludeVisibleInDownloadsUi(Z)Landroid/app/DownloadManager$Query;
+Landroid/app/DownloadManager$Request;->mUri:Landroid/net/Uri;
+Landroid/app/DownloadManager;->getWhereArgsForIds([J)[Ljava/lang/String;
+Landroid/app/DownloadManager;->getWhereClauseForIds([J)Ljava/lang/String;
+Landroid/app/DownloadManager;->restartDownload([[J)V
+Landroid/app/DownloadManager;->setAccessAllDownloads(Z)V
+Landroid/app/DownloadManager;->setAccessFilename(Z)V
+Landroid/app/DownloadManager;->UNDERLYING_COLUMNS:[Ljava/lang/String;
+Landroid/app/Fragment;->mAdded:Z
+Landroid/app/Fragment;->mChildFragmentManager:Landroid/app/FragmentManagerImpl;
+Landroid/app/Fragment;->mFragmentId:I
+Landroid/app/Fragment;->mFragmentManager:Landroid/app/FragmentManagerImpl;
+Landroid/app/Fragment;->mHost:Landroid/app/FragmentHostCallback;
+Landroid/app/Fragment;->mIndex:I
+Landroid/app/Fragment;->mLoadersStarted:Z
+Landroid/app/Fragment;->mSavedFragmentState:Landroid/os/Bundle;
+Landroid/app/Fragment;->mView:Landroid/view/View;
+Landroid/app/Fragment;->mWho:Ljava/lang/String;
+Landroid/app/Fragment;->sClassMap:Landroid/util/ArrayMap;
+Landroid/app/FragmentController;->mHost:Landroid/app/FragmentHostCallback;
+Landroid/app/FragmentHostCallback;->mLoadersStarted:Z
+Landroid/app/FragmentManagerImpl;->loadAnimator(Landroid/app/Fragment;IZI)Landroid/animation/Animator;
+Landroid/app/FragmentManagerImpl;->mActive:Landroid/util/SparseArray;
+Landroid/app/FragmentManagerImpl;->mAdded:Ljava/util/ArrayList;
+Landroid/app/FragmentManagerImpl;->mStateSaved:Z
+Landroid/app/FragmentManagerImpl;->noteStateNotSaved()V
+Landroid/app/IActivityController$Stub;-><init>()V
+Landroid/app/IActivityController;->activityResuming(Ljava/lang/String;)Z
+Landroid/app/IActivityController;->activityStarting(Landroid/content/Intent;Ljava/lang/String;)Z
+Landroid/app/IActivityController;->appNotResponding(Ljava/lang/String;ILjava/lang/String;)I
+Landroid/app/IActivityManager$Stub$Proxy;->getConfiguration()Landroid/content/res/Configuration;
+Landroid/app/IActivityManager$Stub$Proxy;->getLaunchedFromUid(Landroid/os/IBinder;)I
+Landroid/app/IActivityManager$Stub$Proxy;->getProcessLimit()I
+Landroid/app/IActivityManager$Stub$Proxy;->getProcessPss([I)[J
+Landroid/app/IActivityManager$Stub$Proxy;->isAppForeground(I)Z
+Landroid/app/IActivityManager$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/IActivityManager$Stub$Proxy;->setActivityController(Landroid/app/IActivityController;Z)V
+Landroid/app/IActivityManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IActivityManager;
+Landroid/app/IActivityManager;->bindService(Landroid/app/IApplicationThread;Landroid/os/IBinder;Landroid/content/Intent;Ljava/lang/String;Landroid/app/IServiceConnection;ILjava/lang/String;I)I
+Landroid/app/IActivityManager;->broadcastIntent(Landroid/app/IApplicationThread;Landroid/content/Intent;Ljava/lang/String;Landroid/content/IIntentReceiver;ILjava/lang/String;Landroid/os/Bundle;[Ljava/lang/String;ILandroid/os/Bundle;ZZI)I
+Landroid/app/IActivityManager;->cancelRecentsAnimation(Z)V
+Landroid/app/IActivityManager;->cancelTaskWindowTransition(I)V
+Landroid/app/IActivityManager;->checkPermission(Ljava/lang/String;II)I
+Landroid/app/IActivityManager;->closeSystemDialogs(Ljava/lang/String;)V
+Landroid/app/IActivityManager;->enterSafeMode()V
+Landroid/app/IActivityManager;->finishActivity(Landroid/os/IBinder;ILandroid/content/Intent;I)Z
+Landroid/app/IActivityManager;->finishHeavyWeightApp()V
+Landroid/app/IActivityManager;->finishReceiver(Landroid/os/IBinder;ILjava/lang/String;Landroid/os/Bundle;ZI)V
+Landroid/app/IActivityManager;->forceStopPackage(Ljava/lang/String;I)V
+Landroid/app/IActivityManager;->getAllStackInfos()Ljava/util/List;
+Landroid/app/IActivityManager;->getConfiguration()Landroid/content/res/Configuration;
+Landroid/app/IActivityManager;->getCurrentUser()Landroid/content/pm/UserInfo;
+Landroid/app/IActivityManager;->getFilteredTasks(III)Ljava/util/List;
+Landroid/app/IActivityManager;->getIntentForIntentSender(Landroid/content/IIntentSender;)Landroid/content/Intent;
+Landroid/app/IActivityManager;->getIntentSender(ILjava/lang/String;Landroid/os/IBinder;Ljava/lang/String;I[Landroid/content/Intent;[Ljava/lang/String;ILandroid/os/Bundle;I)Landroid/content/IIntentSender;
+Landroid/app/IActivityManager;->getLaunchedFromPackage(Landroid/os/IBinder;)Ljava/lang/String;
+Landroid/app/IActivityManager;->getLaunchedFromUid(Landroid/os/IBinder;)I
+Landroid/app/IActivityManager;->getLockTaskModeState()I
+Landroid/app/IActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V
+Landroid/app/IActivityManager;->getPackageProcessState(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/app/IActivityManager;->getProcessLimit()I
+Landroid/app/IActivityManager;->getProcessMemoryInfo([I)[Landroid/os/Debug$MemoryInfo;
+Landroid/app/IActivityManager;->getProcessPss([I)[J
+Landroid/app/IActivityManager;->getProviderMimeType(Landroid/net/Uri;I)Ljava/lang/String;
+Landroid/app/IActivityManager;->getRecentTasks(III)Landroid/content/pm/ParceledListSlice;
+Landroid/app/IActivityManager;->getRunningAppProcesses()Ljava/util/List;
+Landroid/app/IActivityManager;->getServices(II)Ljava/util/List;
+Landroid/app/IActivityManager;->getTaskBounds(I)Landroid/graphics/Rect;
+Landroid/app/IActivityManager;->getTaskForActivity(Landroid/os/IBinder;Z)I
+Landroid/app/IActivityManager;->getTaskSnapshot(IZ)Landroid/app/ActivityManager$TaskSnapshot;
+Landroid/app/IActivityManager;->handleApplicationStrictModeViolation(Landroid/os/IBinder;ILandroid/os/StrictMode$ViolationInfo;)V
+Landroid/app/IActivityManager;->hang(Landroid/os/IBinder;Z)V
+Landroid/app/IActivityManager;->isInLockTaskMode()Z
+Landroid/app/IActivityManager;->isIntentSenderAnActivity(Landroid/content/IIntentSender;)Z
+Landroid/app/IActivityManager;->isTopOfTask(Landroid/os/IBinder;)Z
+Landroid/app/IActivityManager;->isUserRunning(II)Z
+Landroid/app/IActivityManager;->killAllBackgroundProcesses()V
+Landroid/app/IActivityManager;->killApplicationProcess(Ljava/lang/String;I)V
+Landroid/app/IActivityManager;->killBackgroundProcesses(Ljava/lang/String;I)V
+Landroid/app/IActivityManager;->moveActivityTaskToBack(Landroid/os/IBinder;Z)Z
+Landroid/app/IActivityManager;->moveTaskToFront(IILandroid/os/Bundle;)V
+Landroid/app/IActivityManager;->moveTaskToStack(IIZ)V
+Landroid/app/IActivityManager;->moveTopActivityToPinnedStack(ILandroid/graphics/Rect;)Z
+Landroid/app/IActivityManager;->positionTaskInStack(III)V
+Landroid/app/IActivityManager;->profileControl(Ljava/lang/String;IZLandroid/app/ProfilerInfo;I)Z
+Landroid/app/IActivityManager;->publishContentProviders(Landroid/app/IApplicationThread;Ljava/util/List;)V
+Landroid/app/IActivityManager;->registerProcessObserver(Landroid/app/IProcessObserver;)V
+Landroid/app/IActivityManager;->registerReceiver(Landroid/app/IApplicationThread;Ljava/lang/String;Landroid/content/IIntentReceiver;Landroid/content/IntentFilter;Ljava/lang/String;II)Landroid/content/Intent;
+Landroid/app/IActivityManager;->registerTaskStackListener(Landroid/app/ITaskStackListener;)V
+Landroid/app/IActivityManager;->registerUserSwitchObserver(Landroid/app/IUserSwitchObserver;Ljava/lang/String;)V
+Landroid/app/IActivityManager;->removeContentProviderExternal(Ljava/lang/String;Landroid/os/IBinder;)V
+Landroid/app/IActivityManager;->removeStack(I)V
+Landroid/app/IActivityManager;->removeTask(I)Z
+Landroid/app/IActivityManager;->requestBugReport(I)V
+Landroid/app/IActivityManager;->resizeDockedStack(Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
+Landroid/app/IActivityManager;->resizeStack(ILandroid/graphics/Rect;ZZZI)V
+Landroid/app/IActivityManager;->resizeTask(ILandroid/graphics/Rect;I)V
+Landroid/app/IActivityManager;->restart()V
+Landroid/app/IActivityManager;->resumeAppSwitches()V
+Landroid/app/IActivityManager;->sendIdleJobTrigger()V
+Landroid/app/IActivityManager;->serviceDoneExecuting(Landroid/os/IBinder;III)V
+Landroid/app/IActivityManager;->setActivityController(Landroid/app/IActivityController;Z)V
+Landroid/app/IActivityManager;->setAlwaysFinish(Z)V
+Landroid/app/IActivityManager;->setDebugApp(Ljava/lang/String;ZZ)V
+Landroid/app/IActivityManager;->setDumpHeapDebugLimit(Ljava/lang/String;IJLjava/lang/String;)V
+Landroid/app/IActivityManager;->setPackageScreenCompatMode(Ljava/lang/String;I)V
+Landroid/app/IActivityManager;->setProcessImportant(Landroid/os/IBinder;IZLjava/lang/String;)V
+Landroid/app/IActivityManager;->setProcessLimit(I)V
+Landroid/app/IActivityManager;->setProcessMemoryTrimLevel(Ljava/lang/String;II)Z
+Landroid/app/IActivityManager;->setRequestedOrientation(Landroid/os/IBinder;I)V
+Landroid/app/IActivityManager;->setTaskResizeable(II)V
+Landroid/app/IActivityManager;->shutdown(I)Z
+Landroid/app/IActivityManager;->startActivity(Landroid/app/IApplicationThread;Ljava/lang/String;Landroid/content/Intent;Ljava/lang/String;Landroid/os/IBinder;Ljava/lang/String;IILandroid/app/ProfilerInfo;Landroid/os/Bundle;)I
+Landroid/app/IActivityManager;->startActivityAsUser(Landroid/app/IApplicationThread;Ljava/lang/String;Landroid/content/Intent;Ljava/lang/String;Landroid/os/IBinder;Ljava/lang/String;IILandroid/app/ProfilerInfo;Landroid/os/Bundle;I)I
+Landroid/app/IActivityManager;->startActivityFromRecents(ILandroid/os/Bundle;)I
+Landroid/app/IActivityManager;->startBinderTracking()Z
+Landroid/app/IActivityManager;->startInstrumentation(Landroid/content/ComponentName;Ljava/lang/String;ILandroid/os/Bundle;Landroid/app/IInstrumentationWatcher;Landroid/app/IUiAutomationConnection;ILjava/lang/String;)Z
+Landroid/app/IActivityManager;->startRecentsActivity(Landroid/content/Intent;Landroid/app/IAssistDataReceiver;Landroid/view/IRecentsAnimationRunner;)V
+Landroid/app/IActivityManager;->startSystemLockTaskMode(I)V
+Landroid/app/IActivityManager;->startUserInBackground(I)Z
+Landroid/app/IActivityManager;->stopAppSwitches()V
+Landroid/app/IActivityManager;->stopBinderTrackingAndDump(Landroid/os/ParcelFileDescriptor;)Z
+Landroid/app/IActivityManager;->stopService(Landroid/app/IApplicationThread;Landroid/content/Intent;Ljava/lang/String;I)I
+Landroid/app/IActivityManager;->stopUser(IZLandroid/app/IStopUserCallback;)I
+Landroid/app/IActivityManager;->suppressResizeConfigChanges(Z)V
+Landroid/app/IActivityManager;->switchUser(I)Z
+Landroid/app/IActivityManager;->unbindBackupAgent(Landroid/content/pm/ApplicationInfo;)V
+Landroid/app/IActivityManager;->unbindService(Landroid/app/IServiceConnection;)Z
+Landroid/app/IActivityManager;->unhandledBack()V
+Landroid/app/IActivityManager;->unlockUser(I[B[BLandroid/os/IProgressListener;)Z
+Landroid/app/IActivityManager;->unregisterProcessObserver(Landroid/app/IProcessObserver;)V
+Landroid/app/IActivityManager;->unregisterReceiver(Landroid/content/IIntentReceiver;)V
+Landroid/app/IActivityManager;->unstableProviderDied(Landroid/os/IBinder;)V
+Landroid/app/IActivityManager;->updateConfiguration(Landroid/content/res/Configuration;)Z
+Landroid/app/IActivityManager;->updatePersistentConfiguration(Landroid/content/res/Configuration;)V
+Landroid/app/IAlarmManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/IAlarmManager$Stub;-><init>()V
+Landroid/app/IAlarmManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IAlarmManager;
+Landroid/app/IAlarmManager$Stub;->TRANSACTION_remove:I
+Landroid/app/IAlarmManager$Stub;->TRANSACTION_set:I
+Landroid/app/IAlarmManager;->getNextAlarmClock(I)Landroid/app/AlarmManager$AlarmClockInfo;
+Landroid/app/IAlarmManager;->set(Ljava/lang/String;IJJJILandroid/app/PendingIntent;Landroid/app/IAlarmListener;Ljava/lang/String;Landroid/os/WorkSource;Landroid/app/AlarmManager$AlarmClockInfo;)V
+Landroid/app/IAlarmManager;->setTime(J)Z
+Landroid/app/IApplicationThread;->processInBackground()V
+Landroid/app/IApplicationThread;->scheduleBindService(Landroid/os/IBinder;Landroid/content/Intent;ZI)V
+Landroid/app/IApplicationThread;->scheduleCreateService(Landroid/os/IBinder;Landroid/content/pm/ServiceInfo;Landroid/content/res/CompatibilityInfo;I)V
+Landroid/app/IApplicationThread;->scheduleExit()V
+Landroid/app/IApplicationThread;->scheduleLowMemory()V
+Landroid/app/IApplicationThread;->scheduleStopService(Landroid/os/IBinder;)V
+Landroid/app/IApplicationThread;->scheduleSuicide()V
+Landroid/app/IApplicationThread;->scheduleTrimMemory(I)V
+Landroid/app/IApplicationThread;->scheduleUnbindService(Landroid/os/IBinder;Landroid/content/Intent;)V
+Landroid/app/IApplicationThread;->updateTimeZone()V
+Landroid/app/IAppTask;->getTaskInfo()Landroid/app/ActivityManager$RecentTaskInfo;
+Landroid/app/IAssistDataReceiver$Stub;-><init>()V
+Landroid/app/IAssistDataReceiver;->onHandleAssistData(Landroid/os/Bundle;)V
+Landroid/app/IAssistDataReceiver;->onHandleAssistScreenshot(Landroid/graphics/Bitmap;)V
+Landroid/app/IBackupAgent$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IBackupAgent;
+Landroid/app/IInputForwarder;->forwardEvent(Landroid/view/InputEvent;)Z
+Landroid/app/IInstrumentationWatcher$Stub;-><init>()V
+Landroid/app/IInstrumentationWatcher$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IInstrumentationWatcher;
+Landroid/app/IInstrumentationWatcher;->instrumentationFinished(Landroid/content/ComponentName;ILandroid/os/Bundle;)V
+Landroid/app/IInstrumentationWatcher;->instrumentationStatus(Landroid/content/ComponentName;ILandroid/os/Bundle;)V
+Landroid/app/INotificationManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/INotificationManager$Stub$Proxy;->areNotificationsEnabledForPackage(Ljava/lang/String;I)Z
+Landroid/app/INotificationManager$Stub;-><init>()V
+Landroid/app/INotificationManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/INotificationManager;
+Landroid/app/INotificationManager;->areNotificationsEnabledForPackage(Ljava/lang/String;I)Z
+Landroid/app/INotificationManager;->cancelAllNotifications(Ljava/lang/String;I)V
+Landroid/app/INotificationManager;->cancelNotificationWithTag(Ljava/lang/String;Ljava/lang/String;II)V
+Landroid/app/INotificationManager;->cancelToast(Ljava/lang/String;Landroid/app/ITransientNotification;)V
+Landroid/app/INotificationManager;->enqueueToast(Ljava/lang/String;Landroid/app/ITransientNotification;I)V
+Landroid/app/INotificationManager;->getActiveNotifications(Ljava/lang/String;)[Landroid/service/notification/StatusBarNotification;
+Landroid/app/INotificationManager;->getHistoricalNotifications(Ljava/lang/String;I)[Landroid/service/notification/StatusBarNotification;
+Landroid/app/INotificationManager;->getZenMode()I
+Landroid/app/INotificationManager;->getZenModeConfig()Landroid/service/notification/ZenModeConfig;
+Landroid/app/Instrumentation;->callActivityOnNewIntent(Landroid/app/Activity;Lcom/android/internal/content/ReferrerIntent;)V
+Landroid/app/Instrumentation;->checkStartActivityResult(ILjava/lang/Object;)V
+Landroid/app/Instrumentation;->execStartActivities(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;[Landroid/content/Intent;Landroid/os/Bundle;)V
+Landroid/app/Instrumentation;->execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult;
+Landroid/app/Instrumentation;->execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult;
+Landroid/app/Instrumentation;->execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;Landroid/os/UserHandle;)Landroid/app/Instrumentation$ActivityResult;
+Landroid/app/Instrumentation;->execStartActivityAsCaller(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;ZI)Landroid/app/Instrumentation$ActivityResult;
+Landroid/app/Instrumentation;->execStartActivityFromAppTask(Landroid/content/Context;Landroid/os/IBinder;Landroid/app/IAppTask;Landroid/content/Intent;Landroid/os/Bundle;)V
+Landroid/app/IntentReceiverLeaked;-><init>(Ljava/lang/String;)V
+Landroid/app/IntentService;->mServiceHandler:Landroid/app/IntentService$ServiceHandler;
+Landroid/app/IProcessObserver$Stub;-><init>()V
+Landroid/app/ISearchManager$Stub$Proxy;->getGlobalSearchActivity()Landroid/content/ComponentName;
+Landroid/app/ISearchManager$Stub$Proxy;->getWebSearchActivity()Landroid/content/ComponentName;
+Landroid/app/ISearchManager$Stub;-><init>()V
+Landroid/app/ISearchManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/ISearchManager;
+Landroid/app/ISearchManager;->getGlobalSearchActivity()Landroid/content/ComponentName;
+Landroid/app/IServiceConnection$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/IServiceConnection$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/IServiceConnection$Stub;-><init>()V
+Landroid/app/IServiceConnection$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IServiceConnection;
+Landroid/app/IServiceConnection;->connected(Landroid/content/ComponentName;Landroid/os/IBinder;Z)V
+Landroid/app/IStopUserCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/IStopUserCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/IStopUserCallback$Stub;-><init>()V
+Landroid/app/IStopUserCallback;->userStopped(I)V
+Landroid/app/ITransientNotification$Stub;-><init>()V
+Landroid/app/ITransientNotification;->hide()V
+Landroid/app/ITransientNotification;->show(Landroid/os/IBinder;)V
+Landroid/app/IUiModeManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/IUiModeManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IUiModeManager;
+Landroid/app/IUiModeManager;->disableCarMode(I)V
+Landroid/app/IUserSwitchObserver$Stub;-><init>()V
+Landroid/app/IWallpaperManager$Stub;-><init>()V
+Landroid/app/IWallpaperManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IWallpaperManager;
+Landroid/app/IWallpaperManager;->getHeightHint()I
+Landroid/app/IWallpaperManager;->getWallpaper(Ljava/lang/String;Landroid/app/IWallpaperManagerCallback;ILandroid/os/Bundle;I)Landroid/os/ParcelFileDescriptor;
+Landroid/app/IWallpaperManager;->getWallpaperInfo(I)Landroid/app/WallpaperInfo;
+Landroid/app/IWallpaperManager;->getWidthHint()I
+Landroid/app/IWallpaperManager;->setWallpaperComponent(Landroid/content/ComponentName;)V
+Landroid/app/IWallpaperManagerCallback$Stub;-><init>()V
+Landroid/app/IWallpaperManagerCallback;->onWallpaperChanged()V
+Landroid/app/job/IJobCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/job/IJobCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/job/IJobCallback$Stub;-><init>()V
+Landroid/app/job/IJobCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobCallback;
+Landroid/app/job/IJobCallback;->acknowledgeStartMessage(IZ)V
+Landroid/app/job/IJobCallback;->acknowledgeStopMessage(IZ)V
+Landroid/app/job/IJobCallback;->completeWork(II)Z
+Landroid/app/job/IJobCallback;->dequeueWork(I)Landroid/app/job/JobWorkItem;
+Landroid/app/job/IJobCallback;->jobFinished(IZ)V
+Landroid/app/job/IJobScheduler$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/job/IJobScheduler$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobScheduler;
+Landroid/app/job/IJobService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/job/IJobService$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/app/job/IJobService$Stub;-><init>()V
+Landroid/app/job/IJobService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobService;
+Landroid/app/job/IJobService;->startJob(Landroid/app/job/JobParameters;)V
+Landroid/app/job/IJobService;->stopJob(Landroid/app/job/JobParameters;)V
+Landroid/app/job/JobInfo$Builder;->setEstimatedNetworkBytes(J)Landroid/app/job/JobInfo$Builder;
+Landroid/app/job/JobInfo$Builder;->setFlags(I)Landroid/app/job/JobInfo$Builder;
+Landroid/app/job/JobInfo$Builder;->setIsPrefetch(Z)Landroid/app/job/JobInfo$Builder;
+Landroid/app/job/JobInfo$Builder;->setPriority(I)Landroid/app/job/JobInfo$Builder;
+Landroid/app/job/JobInfo;->flags:I
+Landroid/app/job/JobInfo;->FLAG_WILL_BE_FOREGROUND:I
+Landroid/app/job/JobInfo;->getEstimatedNetworkBytes()J
+Landroid/app/job/JobInfo;->jobId:I
+Landroid/app/job/JobInfo;->PRIORITY_FOREGROUND_APP:I
+Landroid/app/job/JobInfo;->service:Landroid/content/ComponentName;
+Landroid/app/job/JobParameters;->callback:Landroid/os/IBinder;
+Landroid/app/job/JobParameters;->getCallback()Landroid/app/job/IJobCallback;
+Landroid/app/job/JobParameters;->jobId:I
+Landroid/app/job/JobWorkItem;-><init>(Landroid/content/Intent;J)V
+Landroid/app/job/JobWorkItem;-><init>(Landroid/os/Parcel;)V
+Landroid/app/job/JobWorkItem;->getEstimatedNetworkBytes()J
+Landroid/app/job/JobWorkItem;->mDeliveryCount:I
+Landroid/app/job/JobWorkItem;->mGrants:Ljava/lang/Object;
+Landroid/app/job/JobWorkItem;->mIntent:Landroid/content/Intent;
+Landroid/app/job/JobWorkItem;->mWorkId:I
+Landroid/app/KeyguardManager;->dismissKeyguard(Landroid/app/Activity;Landroid/app/KeyguardManager$KeyguardDismissCallback;Landroid/os/Handler;)V
+Landroid/app/KeyguardManager;->isDeviceLocked(I)Z
+Landroid/app/KeyguardManager;->isDeviceSecure(I)Z
+Landroid/app/LoadedApk$ReceiverDispatcher;->getIIntentReceiver()Landroid/content/IIntentReceiver;
+Landroid/app/LoadedApk$ReceiverDispatcher;->getIntentReceiver()Landroid/content/BroadcastReceiver;
+Landroid/app/LoadedApk$ReceiverDispatcher;->mContext:Landroid/content/Context;
+Landroid/app/LoadedApk$ReceiverDispatcher;->mReceiver:Landroid/content/BroadcastReceiver;
+Landroid/app/LoadedApk$ServiceDispatcher$InnerConnection;->mDispatcher:Ljava/lang/ref/WeakReference;
+Landroid/app/LoadedApk$ServiceDispatcher;-><init>(Landroid/content/ServiceConnection;Landroid/content/Context;Landroid/os/Handler;I)V
+Landroid/app/LoadedApk$ServiceDispatcher;->getIServiceConnection()Landroid/app/IServiceConnection;
+Landroid/app/LoadedApk$ServiceDispatcher;->mConnection:Landroid/content/ServiceConnection;
+Landroid/app/LoadedApk$ServiceDispatcher;->mContext:Landroid/content/Context;
+Landroid/app/LoadedApk;->getAppDir()Ljava/lang/String;
+Landroid/app/LoadedApk;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
+Landroid/app/LoadedApk;->getAssets()Landroid/content/res/AssetManager;
+Landroid/app/LoadedApk;->getClassLoader()Ljava/lang/ClassLoader;
+Landroid/app/LoadedApk;->getCompatibilityInfo()Landroid/content/res/CompatibilityInfo;
+Landroid/app/LoadedApk;->getDataDirFile()Ljava/io/File;
+Landroid/app/LoadedApk;->getOverlayDirs()[Ljava/lang/String;
+Landroid/app/LoadedApk;->getPackageName()Ljava/lang/String;
+Landroid/app/LoadedApk;->getResDir()Ljava/lang/String;
+Landroid/app/LoadedApk;->getResources()Landroid/content/res/Resources;
+Landroid/app/LoadedApk;->getServiceDispatcher(Landroid/content/ServiceConnection;Landroid/content/Context;Landroid/os/Handler;I)Landroid/app/IServiceConnection;
+Landroid/app/LoadedApk;->getSplitResDirs()[Ljava/lang/String;
+Landroid/app/LoadedApk;->mActivityThread:Landroid/app/ActivityThread;
+Landroid/app/LoadedApk;->makeApplication(ZLandroid/app/Instrumentation;)Landroid/app/Application;
+Landroid/app/LoadedApk;->mAppDir:Ljava/lang/String;
+Landroid/app/LoadedApk;->mApplication:Landroid/app/Application;
+Landroid/app/LoadedApk;->mApplicationInfo:Landroid/content/pm/ApplicationInfo;
+Landroid/app/LoadedApk;->mBaseClassLoader:Ljava/lang/ClassLoader;
+Landroid/app/LoadedApk;->mClassLoader:Ljava/lang/ClassLoader;
+Landroid/app/LoadedApk;->mDataDir:Ljava/lang/String;
+Landroid/app/LoadedApk;->mDataDirFile:Ljava/io/File;
+Landroid/app/LoadedApk;->mDisplayAdjustments:Landroid/view/DisplayAdjustments;
+Landroid/app/LoadedApk;->mLibDir:Ljava/lang/String;
+Landroid/app/LoadedApk;->mPackageName:Ljava/lang/String;
+Landroid/app/LoadedApk;->mReceivers:Landroid/util/ArrayMap;
+Landroid/app/LoadedApk;->mResDir:Ljava/lang/String;
+Landroid/app/LoadedApk;->mResources:Landroid/content/res/Resources;
+Landroid/app/LoadedApk;->mServices:Landroid/util/ArrayMap;
+Landroid/app/LoadedApk;->mSplitResDirs:[Ljava/lang/String;
+Landroid/app/LoadedApk;->rewriteRValues(Ljava/lang/ClassLoader;Ljava/lang/String;I)V
+Landroid/app/LocalActivityManager;->mActivities:Ljava/util/Map;
+Landroid/app/LocalActivityManager;->mActivityArray:Ljava/util/ArrayList;
+Landroid/app/LocalActivityManager;->moveToState(Landroid/app/LocalActivityManager$LocalActivityRecord;I)V
+Landroid/app/LocalActivityManager;->mParent:Landroid/app/Activity;
+Landroid/app/LocalActivityManager;->mResumed:Landroid/app/LocalActivityManager$LocalActivityRecord;
+Landroid/app/LocalActivityManager;->mSingleMode:Z
+Landroid/app/NativeActivity;->hideIme(I)V
+Landroid/app/NativeActivity;->loadNativeCode(Ljava/lang/String;Ljava/lang/String;Landroid/os/MessageQueue;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILandroid/content/res/AssetManager;[BLjava/lang/ClassLoader;Ljava/lang/String;)J
+Landroid/app/NativeActivity;->mNativeHandle:J
+Landroid/app/NativeActivity;->setWindowFlags(II)V
+Landroid/app/NativeActivity;->setWindowFormat(I)V
+Landroid/app/NativeActivity;->showIme(I)V
+Landroid/app/Notification$Action;->mIcon:Landroid/graphics/drawable/Icon;
+Landroid/app/Notification$Builder;->getBaseLayoutResource()I
+Landroid/app/Notification$Builder;->loadHeaderAppName()Ljava/lang/String;
+Landroid/app/Notification$Builder;->mActions:Ljava/util/ArrayList;
+Landroid/app/Notification$Builder;->makePublicContentView()Landroid/widget/RemoteViews;
+Landroid/app/Notification$Builder;->setChannel(Ljava/lang/String;)Landroid/app/Notification$Builder;
+Landroid/app/Notification$Builder;->setTimeout(J)Landroid/app/Notification$Builder;
+Landroid/app/Notification$MediaStyle;->buildStyled(Landroid/app/Notification;)Landroid/app/Notification;
+Landroid/app/Notification$TvExtender;->getChannel()Ljava/lang/String;
+Landroid/app/Notification;-><init>(Landroid/content/Context;ILjava/lang/CharSequence;JLjava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/content/Intent;)V
+Landroid/app/Notification;->allPendingIntents:Landroid/util/ArraySet;
+Landroid/app/Notification;->getChannel()Ljava/lang/String;
+Landroid/app/Notification;->getNotificationStyleClass(Ljava/lang/String;)Ljava/lang/Class;
+Landroid/app/Notification;->getTimeout()J
+Landroid/app/Notification;->isGroupChild()Z
+Landroid/app/Notification;->isGroupSummary()Z
+Landroid/app/Notification;->mChannelId:Ljava/lang/String;
+Landroid/app/Notification;->mGroupKey:Ljava/lang/String;
+Landroid/app/Notification;->mLargeIcon:Landroid/graphics/drawable/Icon;
+Landroid/app/Notification;->mSmallIcon:Landroid/graphics/drawable/Icon;
+Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V
+Landroid/app/Notification;->setSmallIcon(Landroid/graphics/drawable/Icon;)V
+Landroid/app/NotificationChannel;->mId:Ljava/lang/String;
+Landroid/app/NotificationChannel;->setBlockableSystem(Z)V
+Landroid/app/NotificationChannelGroup;->mId:Ljava/lang/String;
+Landroid/app/NotificationManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
+Landroid/app/NotificationManager;->cancelAsUser(Ljava/lang/String;ILandroid/os/UserHandle;)V
+Landroid/app/NotificationManager;->from(Landroid/content/Context;)Landroid/app/NotificationManager;
+Landroid/app/NotificationManager;->getService()Landroid/app/INotificationManager;
+Landroid/app/NotificationManager;->getZenModeConfig()Landroid/service/notification/ZenModeConfig;
+Landroid/app/NotificationManager;->notifyAsUser(Ljava/lang/String;ILandroid/app/Notification;Landroid/os/UserHandle;)V
+Landroid/app/NotificationManager;->setZenMode(ILandroid/net/Uri;Ljava/lang/String;)V
+Landroid/app/NotificationManager;->sService:Landroid/app/INotificationManager;
+Landroid/app/PackageDeleteObserver;-><init>()V
+Landroid/app/PackageInstallObserver;-><init>()V
+Landroid/app/PackageInstallObserver;->onPackageInstalled(Ljava/lang/String;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/app/PendingIntent;->getActivityAsUser(Landroid/content/Context;ILandroid/content/Intent;ILandroid/os/Bundle;Landroid/os/UserHandle;)Landroid/app/PendingIntent;
+Landroid/app/PendingIntent;->getBroadcastAsUser(Landroid/content/Context;ILandroid/content/Intent;ILandroid/os/UserHandle;)Landroid/app/PendingIntent;
+Landroid/app/PendingIntent;->getIntent()Landroid/content/Intent;
+Landroid/app/PendingIntent;->getTag(Ljava/lang/String;)Ljava/lang/String;
+Landroid/app/PendingIntent;->isActivity()Z
+Landroid/app/PendingIntent;->setOnMarshaledListener(Landroid/app/PendingIntent$OnMarshaledListener;)V
+Landroid/app/PictureInPictureArgs$Builder;
+Landroid/app/PictureInPictureArgs$Builder;-><init>()V
+Landroid/app/PictureInPictureArgs$Builder;->build()Landroid/app/PictureInPictureArgs;
+Landroid/app/PictureInPictureArgs$Builder;->setActions(Ljava/util/List;)Landroid/app/PictureInPictureArgs$Builder;
+Landroid/app/PictureInPictureArgs$Builder;->setAspectRatio(Landroid/util/Rational;)Landroid/app/PictureInPictureArgs$Builder;
+Landroid/app/PictureInPictureArgs$Builder;->setSourceRectHint(Landroid/graphics/Rect;)Landroid/app/PictureInPictureArgs$Builder;
+Landroid/app/PictureInPictureArgs;
+Landroid/app/PictureInPictureArgs;-><init>()V
+Landroid/app/PictureInPictureArgs;->convert(Landroid/app/PictureInPictureArgs;)Landroid/app/PictureInPictureParams;
+Landroid/app/PictureInPictureArgs;->convert(Landroid/app/PictureInPictureParams;)Landroid/app/PictureInPictureArgs;
+Landroid/app/PictureInPictureArgs;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/app/PictureInPictureArgs;->setActions(Ljava/util/List;)V
+Landroid/app/PictureInPictureArgs;->setAspectRatio(F)V
+Landroid/app/PictureInPictureParams;->getActions()Ljava/util/List;
+Landroid/app/PictureInPictureParams;->getAspectRatio()F
+Landroid/app/PictureInPictureParams;->getSourceRectHint()Landroid/graphics/Rect;
+Landroid/app/Presentation;->createPresentationContext(Landroid/content/Context;Landroid/view/Display;I)Landroid/content/Context;
+Landroid/app/ProgressDialog;->mMessageView:Landroid/widget/TextView;
+Landroid/app/ProgressDialog;->mProgress:Landroid/widget/ProgressBar;
+Landroid/app/ProgressDialog;->mProgressNumber:Landroid/widget/TextView;
+Landroid/app/QueuedWork;->addFinisher(Ljava/lang/Runnable;)V
+Landroid/app/QueuedWork;->removeFinisher(Ljava/lang/Runnable;)V
+Landroid/app/QueuedWork;->sFinishers:Ljava/util/LinkedList;
+Landroid/app/ResourcesManager;-><init>()V
+Landroid/app/ResourcesManager;->appendLibAssetForMainAssetPath(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/app/ResourcesManager;->createAssetManager(Landroid/content/res/ResourcesKey;)Landroid/content/res/AssetManager;
+Landroid/app/ResourcesManager;->getInstance()Landroid/app/ResourcesManager;
+Landroid/app/ResourcesManager;->mActivityResourceReferences:Ljava/util/WeakHashMap;
+Landroid/app/ResourcesManager;->mResConfiguration:Landroid/content/res/Configuration;
+Landroid/app/ResourcesManager;->mResourceImpls:Landroid/util/ArrayMap;
+Landroid/app/ResourcesManager;->mResourceReferences:Ljava/util/ArrayList;
+Landroid/app/ResultInfo;-><init>(Ljava/lang/String;IILandroid/content/Intent;)V
+Landroid/app/ResultInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/app/ResultInfo;->mData:Landroid/content/Intent;
+Landroid/app/ResultInfo;->mRequestCode:I
+Landroid/app/ResultInfo;->mResultWho:Ljava/lang/String;
+Landroid/app/SearchableInfo$ActionKeyInfo;->getQueryActionMsg()Ljava/lang/String;
+Landroid/app/SearchableInfo$ActionKeyInfo;->getSuggestActionMsg()Ljava/lang/String;
+Landroid/app/SearchableInfo$ActionKeyInfo;->getSuggestActionMsgColumn()Ljava/lang/String;
+Landroid/app/SearchableInfo;->findActionKey(I)Landroid/app/SearchableInfo$ActionKeyInfo;
+Landroid/app/SearchableInfo;->getActivityContext(Landroid/content/Context;)Landroid/content/Context;
+Landroid/app/SearchableInfo;->getIconId()I
+Landroid/app/SearchableInfo;->getLabelId()I
+Landroid/app/SearchableInfo;->getProviderContext(Landroid/content/Context;Landroid/content/Context;)Landroid/content/Context;
+Landroid/app/SearchDialog;->isLandscapeMode(Landroid/content/Context;)Z
+Landroid/app/SearchDialog;->launchQuerySearch()V
+Landroid/app/SearchDialog;->launchQuerySearch(ILjava/lang/String;)V
+Landroid/app/SearchDialog;->setWorking(Z)V
+Landroid/app/SearchManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
+Landroid/app/SearchManager;->DISABLE_VOICE_SEARCH:Ljava/lang/String;
+Landroid/app/SearchManager;->getSuggestions(Landroid/app/SearchableInfo;Ljava/lang/String;)Landroid/database/Cursor;
+Landroid/app/SearchManager;->getSuggestions(Landroid/app/SearchableInfo;Ljava/lang/String;I)Landroid/database/Cursor;
+Landroid/app/SearchManager;->getWebSearchActivity()Landroid/content/ComponentName;
+Landroid/app/SearchManager;->isVisible()Z
+Landroid/app/SearchManager;->launchAssist(Landroid/os/Bundle;)V
+Landroid/app/SearchManager;->mSearchDialog:Landroid/app/SearchDialog;
+Landroid/app/SearchManager;->startSearch(Ljava/lang/String;ZLandroid/content/ComponentName;Landroid/os/Bundle;ZLandroid/graphics/Rect;)V
+Landroid/app/servertransaction/ClientTransaction;->mActivityCallbacks:Ljava/util/List;
+Landroid/app/servertransaction/LaunchActivityItem;->mInfo:Landroid/content/pm/ActivityInfo;
+Landroid/app/servertransaction/LaunchActivityItem;->mIntent:Landroid/content/Intent;
+Landroid/app/Service;->attach(Landroid/content/Context;Landroid/app/ActivityThread;Ljava/lang/String;Landroid/os/IBinder;Landroid/app/Application;Ljava/lang/Object;)V
+Landroid/app/Service;->mActivityManager:Landroid/app/IActivityManager;
+Landroid/app/Service;->mApplication:Landroid/app/Application;
+Landroid/app/Service;->mClassName:Ljava/lang/String;
+Landroid/app/Service;->mStartCompatibility:Z
+Landroid/app/Service;->mThread:Landroid/app/ActivityThread;
+Landroid/app/Service;->mToken:Landroid/os/IBinder;
+Landroid/app/Service;->setForeground(Z)V
+Landroid/app/ServiceConnectionLeaked;-><init>(Ljava/lang/String;)V
+Landroid/app/SharedPreferencesImpl;-><init>(Ljava/io/File;I)V
+Landroid/app/SharedPreferencesImpl;->mFile:Ljava/io/File;
+Landroid/app/SharedPreferencesImpl;->startReloadIfChangedUnexpectedly()V
+Landroid/app/slice/Slice$Builder;-><init>(Landroid/net/Uri;)V
+Landroid/app/slice/Slice$Builder;->addTimestamp(JLjava/lang/String;Ljava/util/List;)Landroid/app/slice/Slice$Builder;
+Landroid/app/slice/Slice$Builder;->setSpec(Landroid/app/slice/SliceSpec;)Landroid/app/slice/Slice$Builder;
+Landroid/app/slice/Slice;->EXTRA_SLIDER_VALUE:Ljava/lang/String;
+Landroid/app/slice/Slice;->SUBTYPE_SLIDER:Ljava/lang/String;
+Landroid/app/slice/SliceItem;->FORMAT_TIMESTAMP:Ljava/lang/String;
+Landroid/app/slice/SliceItem;->getTimestamp()J
+Landroid/app/slice/SliceManager;->bindSlice(Landroid/content/Intent;Ljava/util/List;)Landroid/app/slice/Slice;
+Landroid/app/slice/SliceManager;->bindSlice(Landroid/net/Uri;Ljava/util/List;)Landroid/app/slice/Slice;
+Landroid/app/slice/SliceManager;->pinSlice(Landroid/net/Uri;Ljava/util/List;)V
+Landroid/app/slice/SliceProvider;->onBindSlice(Landroid/net/Uri;Ljava/util/List;)Landroid/app/slice/Slice;
+Landroid/app/StatusBarManager;-><init>(Landroid/content/Context;)V
+Landroid/app/StatusBarManager;->collapsePanels()V
+Landroid/app/StatusBarManager;->disable(I)V
+Landroid/app/StatusBarManager;->DISABLE_EXPAND:I
+Landroid/app/StatusBarManager;->DISABLE_NONE:I
+Landroid/app/StatusBarManager;->DISABLE_NOTIFICATION_TICKER:I
+Landroid/app/StatusBarManager;->expandNotificationsPanel()V
+Landroid/app/StatusBarManager;->expandSettingsPanel()V
+Landroid/app/StatusBarManager;->expandSettingsPanel(Ljava/lang/String;)V
+Landroid/app/StatusBarManager;->getService()Lcom/android/internal/statusbar/IStatusBarService;
+Landroid/app/StatusBarManager;->mContext:Landroid/content/Context;
+Landroid/app/StatusBarManager;->mToken:Landroid/os/IBinder;
+Landroid/app/StatusBarManager;->removeIcon(Ljava/lang/String;)V
+Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
+Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
+Landroid/app/TaskStackListener;-><init>()V
+Landroid/app/TaskStackListener;->onActivityDismissingDockedStack()V
+Landroid/app/TaskStackListener;->onActivityForcedResizable(Ljava/lang/String;II)V
+Landroid/app/TaskStackListener;->onActivityLaunchOnSecondaryDisplayFailed()V
+Landroid/app/TaskStackListener;->onActivityPinned(Ljava/lang/String;III)V
+Landroid/app/TaskStackListener;->onActivityRequestedOrientationChanged(II)V
+Landroid/app/TaskStackListener;->onActivityUnpinned()V
+Landroid/app/TaskStackListener;->onPinnedActivityRestartAttempt(Z)V
+Landroid/app/TaskStackListener;->onPinnedStackAnimationEnded()V
+Landroid/app/TaskStackListener;->onPinnedStackAnimationStarted()V
+Landroid/app/TaskStackListener;->onTaskMovedToFront(I)V
+Landroid/app/TaskStackListener;->onTaskProfileLocked(II)V
+Landroid/app/TaskStackListener;->onTaskRemoved(I)V
+Landroid/app/TaskStackListener;->onTaskSnapshotChanged(ILandroid/app/ActivityManager$TaskSnapshot;)V
+Landroid/app/TaskStackListener;->onTaskStackChanged()V
+Landroid/app/TimePickerDialog;->mTimePicker:Landroid/widget/TimePicker;
+Landroid/app/trust/ITrustManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/app/trust/TrustManager;->reportUnlockAttempt(ZI)V
+Landroid/app/UiAutomation;-><init>(Landroid/os/Looper;Landroid/app/IUiAutomationConnection;)V
+Landroid/app/UiAutomation;->connect()V
+Landroid/app/UiAutomation;->disconnect()V
+Landroid/app/UiAutomationConnection;-><init>()V
+Landroid/app/UiModeManager;-><init>()V
+Landroid/app/usage/ConfigurationStats;->mActivationCount:I
+Landroid/app/usage/ConfigurationStats;->mBeginTimeStamp:J
+Landroid/app/usage/ConfigurationStats;->mConfiguration:Landroid/content/res/Configuration;
+Landroid/app/usage/ConfigurationStats;->mEndTimeStamp:J
+Landroid/app/usage/ConfigurationStats;->mLastTimeActive:J
+Landroid/app/usage/ConfigurationStats;->mTotalTimeActive:J
+Landroid/app/usage/IUsageStatsManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/usage/IUsageStatsManager;
+Landroid/app/usage/IUsageStatsManager;->isAppInactive(Ljava/lang/String;I)Z
+Landroid/app/usage/IUsageStatsManager;->queryConfigurationStats(IJJLjava/lang/String;)Landroid/content/pm/ParceledListSlice;
+Landroid/app/usage/IUsageStatsManager;->queryUsageStats(IJJLjava/lang/String;)Landroid/content/pm/ParceledListSlice;
+Landroid/app/usage/IUsageStatsManager;->setAppInactive(Ljava/lang/String;ZI)V
+Landroid/app/usage/NetworkStatsManager;-><init>(Landroid/content/Context;)V
+Landroid/app/usage/StorageStats;->getCodeBytes()J
+Landroid/app/usage/StorageStatsManager;->getFreeBytes(Ljava/lang/String;)J
+Landroid/app/usage/StorageStatsManager;->getTotalBytes(Ljava/lang/String;)J
+Landroid/app/usage/StorageStatsManager;->isQuotaSupported(Ljava/lang/String;)Z
+Landroid/app/usage/StorageStatsManager;->queryExternalStatsForUser(Ljava/lang/String;Landroid/os/UserHandle;)Landroid/app/usage/ExternalStorageStats;
+Landroid/app/usage/StorageStatsManager;->queryStatsForPackage(Ljava/lang/String;Ljava/lang/String;Landroid/os/UserHandle;)Landroid/app/usage/StorageStats;
+Landroid/app/usage/StorageStatsManager;->queryStatsForUid(Ljava/lang/String;I)Landroid/app/usage/StorageStats;
+Landroid/app/usage/StorageStatsManager;->queryStatsForUser(Ljava/lang/String;Landroid/os/UserHandle;)Landroid/app/usage/StorageStats;
+Landroid/app/usage/UsageEvents$Event;->mClass:Ljava/lang/String;
+Landroid/app/usage/UsageEvents$Event;->mConfiguration:Landroid/content/res/Configuration;
+Landroid/app/usage/UsageEvents$Event;->mEventType:I
+Landroid/app/usage/UsageEvents$Event;->mPackage:Ljava/lang/String;
+Landroid/app/usage/UsageEvents$Event;->mTimeStamp:J
+Landroid/app/usage/UsageEvents;-><init>(Landroid/os/Parcel;)V
+Landroid/app/usage/UsageEvents;->findStringIndex(Ljava/lang/String;)I
+Landroid/app/usage/UsageEvents;->mEventCount:I
+Landroid/app/usage/UsageEvents;->mEventsToWrite:Ljava/util/List;
+Landroid/app/usage/UsageEvents;->mIndex:I
+Landroid/app/usage/UsageEvents;->mParcel:Landroid/os/Parcel;
+Landroid/app/usage/UsageEvents;->mStringPool:[Ljava/lang/String;
+Landroid/app/usage/UsageEvents;->readEventFromParcel(Landroid/os/Parcel;Landroid/app/usage/UsageEvents$Event;)V
+Landroid/app/usage/UsageEvents;->writeEventToParcel(Landroid/app/usage/UsageEvents$Event;Landroid/os/Parcel;I)V
+Landroid/app/usage/UsageStats;->mBeginTimeStamp:J
+Landroid/app/usage/UsageStats;->mEndTimeStamp:J
+Landroid/app/usage/UsageStats;->mLastEvent:I
+Landroid/app/usage/UsageStats;->mLastTimeUsed:J
+Landroid/app/usage/UsageStats;->mLaunchCount:I
+Landroid/app/usage/UsageStats;->mPackageName:Ljava/lang/String;
+Landroid/app/usage/UsageStats;->mTotalTimeInForeground:J
+Landroid/app/usage/UsageStatsManager;->mContext:Landroid/content/Context;
+Landroid/app/usage/UsageStatsManager;->mService:Landroid/app/usage/IUsageStatsManager;
+Landroid/app/usage/UsageStatsManager;->sEmptyResults:Landroid/app/usage/UsageEvents;
+Landroid/app/UserSwitchObserver;-><init>()V
+Landroid/app/Vr2dDisplayProperties$Builder;-><init>()V
+Landroid/app/Vr2dDisplayProperties$Builder;->build()Landroid/app/Vr2dDisplayProperties;
+Landroid/app/Vr2dDisplayProperties$Builder;->setEnabled(Z)Landroid/app/Vr2dDisplayProperties$Builder;
+Landroid/app/Vr2dDisplayProperties;-><init>(III)V
+Landroid/app/VrManager;->getPersistentVrModeEnabled()Z
+Landroid/app/VrManager;->mService:Landroid/service/vr/IVrManager;
+Landroid/app/VrManager;->registerVrStateCallback(Landroid/app/VrStateCallback;Landroid/os/Handler;)V
+Landroid/app/VrManager;->setVr2dDisplayProperties(Landroid/app/Vr2dDisplayProperties;)V
+Landroid/app/VrManager;->unregisterVrStateCallback(Landroid/app/VrStateCallback;)V
+Landroid/app/VrStateCallback;-><init>()V
+Landroid/app/VrStateCallback;->onPersistentVrStateChanged(Z)V
+Landroid/app/WallpaperColors;-><init>(Landroid/graphics/Color;Landroid/graphics/Color;Landroid/graphics/Color;I)V
+Landroid/app/WallpaperColors;->getColorHints()I
+Landroid/app/WallpaperManager;->addOnColorsChangedListener(Landroid/app/WallpaperManager$OnColorsChangedListener;Landroid/os/Handler;I)V
+Landroid/app/WallpaperManager;->getBitmap()Landroid/graphics/Bitmap;
+Landroid/app/WallpaperManager;->getBitmap(Z)Landroid/graphics/Bitmap;
+Landroid/app/WallpaperManager;->getIWallpaperManager()Landroid/app/IWallpaperManager;
+Landroid/app/WallpaperManager;->getWallpaperColors(II)Landroid/app/WallpaperColors;
+Landroid/app/WallpaperManager;->getWallpaperFile(II)Landroid/os/ParcelFileDescriptor;
+Landroid/app/WallpaperManager;->openDefaultWallpaper(Landroid/content/Context;I)Ljava/io/InputStream;
+Landroid/app/WallpaperManager;->setBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;ZII)I
+Landroid/app/WallpaperManager;->setWallpaperComponent(Landroid/content/ComponentName;I)Z
+Landroid/app/WallpaperManager;->sGlobals:Landroid/app/WallpaperManager$Globals;
+Landroid/appwidget/AppWidgetHost;-><init>(Landroid/content/Context;ILandroid/widget/RemoteViews$OnClickHandler;Landroid/os/Looper;)V
+Landroid/appwidget/AppWidgetHost;->HANDLE_VIEW_DATA_CHANGED:I
+Landroid/appwidget/AppWidgetHost;->mHandler:Landroid/os/Handler;
+Landroid/appwidget/AppWidgetHost;->sService:Lcom/android/internal/appwidget/IAppWidgetService;
+Landroid/appwidget/AppWidgetHostView;->getDefaultPaddingForWidget(Landroid/content/Context;Landroid/content/pm/ApplicationInfo;Landroid/graphics/Rect;)Landroid/graphics/Rect;
+Landroid/appwidget/AppWidgetHostView;->mAppWidgetId:I
+Landroid/appwidget/AppWidgetHostView;->mInfo:Landroid/appwidget/AppWidgetProviderInfo;
+Landroid/appwidget/AppWidgetHostView;->updateAppWidgetSize(Landroid/os/Bundle;IIIIZ)V
+Landroid/appwidget/AppWidgetManager;->bindAppWidgetId(ILandroid/content/ComponentName;)V
+Landroid/appwidget/AppWidgetManager;->bindAppWidgetId(ILandroid/content/ComponentName;Landroid/os/Bundle;)V
+Landroid/appwidget/AppWidgetManager;->bindAppWidgetIdIfAllowed(IILandroid/content/ComponentName;Landroid/os/Bundle;)Z
+Landroid/appwidget/AppWidgetManager;->bindRemoteViewsService(Landroid/content/Context;ILandroid/content/Intent;Landroid/app/IServiceConnection;I)Z
+Landroid/appwidget/AppWidgetManager;->getInstalledProviders(I)Ljava/util/List;
+Landroid/appwidget/AppWidgetManager;->getInstalledProvidersForProfile(ILandroid/os/UserHandle;Ljava/lang/String;)Ljava/util/List;
+Landroid/appwidget/AppWidgetManager;->mService:Lcom/android/internal/appwidget/IAppWidgetService;
+Landroid/appwidget/AppWidgetProviderInfo;->providerInfo:Landroid/content/pm/ActivityInfo;
+Landroid/bluetooth/BluetoothA2dp;->ACTION_ACTIVE_DEVICE_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothA2dp;->ACTION_CODEC_CONFIG_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothA2dp;->close()V
+Landroid/bluetooth/BluetoothA2dp;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothA2dp;->disableOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)V
+Landroid/bluetooth/BluetoothA2dp;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothA2dp;->enableOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)V
+Landroid/bluetooth/BluetoothA2dp;->getActiveDevice()Landroid/bluetooth/BluetoothDevice;
+Landroid/bluetooth/BluetoothA2dp;->getCodecStatus(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothCodecStatus;
+Landroid/bluetooth/BluetoothA2dp;->getOptionalCodecsEnabled(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothA2dp;->getPriority(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_NOT_SUPPORTED:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_PREF_DISABLED:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_PREF_ENABLED:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_PREF_UNKNOWN:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_SUPPORTED:I
+Landroid/bluetooth/BluetoothA2dp;->OPTIONAL_CODECS_SUPPORT_UNKNOWN:I
+Landroid/bluetooth/BluetoothA2dp;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothA2dp;->setCodecConfigPreference(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothCodecConfig;)V
+Landroid/bluetooth/BluetoothA2dp;->setOptionalCodecsEnabled(Landroid/bluetooth/BluetoothDevice;I)V
+Landroid/bluetooth/BluetoothA2dp;->stateToString(I)Ljava/lang/String;
+Landroid/bluetooth/BluetoothA2dp;->supportsOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothA2dpSink;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothAdapter;->disable(Z)Z
+Landroid/bluetooth/BluetoothAdapter;->factoryReset()Z
+Landroid/bluetooth/BluetoothAdapter;->getBluetoothManager()Landroid/bluetooth/IBluetoothManager;
+Landroid/bluetooth/BluetoothAdapter;->getBluetoothService(Landroid/bluetooth/IBluetoothManagerCallback;)Landroid/bluetooth/IBluetooth;
+Landroid/bluetooth/BluetoothAdapter;->getConnectionState()I
+Landroid/bluetooth/BluetoothAdapter;->getDiscoverableTimeout()I
+Landroid/bluetooth/BluetoothAdapter;->getLeState()I
+Landroid/bluetooth/BluetoothAdapter;->getUuids()[Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothAdapter;->listenUsingEncryptedRfcommWithServiceRecord(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;
+Landroid/bluetooth/BluetoothAdapter;->listenUsingRfcommOn(IZZ)Landroid/bluetooth/BluetoothServerSocket;
+Landroid/bluetooth/BluetoothAdapter;->mService:Landroid/bluetooth/IBluetooth;
+Landroid/bluetooth/BluetoothAdapter;->setDiscoverableTimeout(I)V
+Landroid/bluetooth/BluetoothAdapter;->setScanMode(I)Z
+Landroid/bluetooth/BluetoothAdapter;->setScanMode(II)Z
+Landroid/bluetooth/BluetoothClass;-><init>(I)V
+Landroid/bluetooth/BluetoothClass;->doesClassMatch(I)Z
+Landroid/bluetooth/BluetoothClass;->PROFILE_A2DP:I
+Landroid/bluetooth/BluetoothClass;->PROFILE_HEADSET:I
+Landroid/bluetooth/BluetoothCodecConfig;
+Landroid/bluetooth/BluetoothCodecConfig;-><init>(IIIIIJJJJ)V
+Landroid/bluetooth/BluetoothCodecConfig;->BITS_PER_SAMPLE_16:I
+Landroid/bluetooth/BluetoothCodecConfig;->BITS_PER_SAMPLE_24:I
+Landroid/bluetooth/BluetoothCodecConfig;->BITS_PER_SAMPLE_32:I
+Landroid/bluetooth/BluetoothCodecConfig;->BITS_PER_SAMPLE_NONE:I
+Landroid/bluetooth/BluetoothCodecConfig;->CHANNEL_MODE_MONO:I
+Landroid/bluetooth/BluetoothCodecConfig;->CHANNEL_MODE_NONE:I
+Landroid/bluetooth/BluetoothCodecConfig;->CHANNEL_MODE_STEREO:I
+Landroid/bluetooth/BluetoothCodecConfig;->CODEC_PRIORITY_DEFAULT:I
+Landroid/bluetooth/BluetoothCodecConfig;->CODEC_PRIORITY_DISABLED:I
+Landroid/bluetooth/BluetoothCodecConfig;->CODEC_PRIORITY_HIGHEST:I
+Landroid/bluetooth/BluetoothCodecConfig;->getBitsPerSample()I
+Landroid/bluetooth/BluetoothCodecConfig;->getChannelMode()I
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecPriority()I
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecSpecific1()J
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecSpecific2()J
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecSpecific3()J
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecSpecific4()J
+Landroid/bluetooth/BluetoothCodecConfig;->getCodecType()I
+Landroid/bluetooth/BluetoothCodecConfig;->getSampleRate()I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_176400:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_192000:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_44100:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_48000:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_88200:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_96000:I
+Landroid/bluetooth/BluetoothCodecConfig;->SAMPLE_RATE_NONE:I
+Landroid/bluetooth/BluetoothCodecConfig;->setCodecPriority(I)V
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_AAC:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_APTX:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_APTX_HD:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_INVALID:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_LDAC:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_MAX:I
+Landroid/bluetooth/BluetoothCodecConfig;->SOURCE_CODEC_TYPE_SBC:I
+Landroid/bluetooth/BluetoothCodecStatus;
+Landroid/bluetooth/BluetoothCodecStatus;->EXTRA_CODEC_STATUS:Ljava/lang/String;
+Landroid/bluetooth/BluetoothCodecStatus;->getCodecConfig()Landroid/bluetooth/BluetoothCodecConfig;
+Landroid/bluetooth/BluetoothCodecStatus;->getCodecsLocalCapabilities()[Landroid/bluetooth/BluetoothCodecConfig;
+Landroid/bluetooth/BluetoothCodecStatus;->getCodecsSelectableCapabilities()[Landroid/bluetooth/BluetoothCodecConfig;
+Landroid/bluetooth/BluetoothDevice;-><init>(Ljava/lang/String;)V
+Landroid/bluetooth/BluetoothDevice;->ACTION_ALIAS_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->ACTION_DISAPPEARED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->ACTION_PAIRING_CANCEL:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->ACTION_SDP_RECORD:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->cancelPairingUserInput()Z
+Landroid/bluetooth/BluetoothDevice;->connectGatt(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;IZILandroid/os/Handler;)Landroid/bluetooth/BluetoothGatt;
+Landroid/bluetooth/BluetoothDevice;->convertPinToBytes(Ljava/lang/String;)[B
+Landroid/bluetooth/BluetoothDevice;->createBond(I)Z
+Landroid/bluetooth/BluetoothDevice;->createInsecureRfcommSocket(I)Landroid/bluetooth/BluetoothSocket;
+Landroid/bluetooth/BluetoothDevice;->createRfcommSocket(I)Landroid/bluetooth/BluetoothSocket;
+Landroid/bluetooth/BluetoothDevice;->createScoSocket()Landroid/bluetooth/BluetoothSocket;
+Landroid/bluetooth/BluetoothDevice;->EXTRA_REASON:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->EXTRA_SDP_SEARCH_STATUS:Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->getAlias()Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->getAliasName()Ljava/lang/String;
+Landroid/bluetooth/BluetoothDevice;->getBatteryLevel()I
+Landroid/bluetooth/BluetoothDevice;->getMessageAccessPermission()I
+Landroid/bluetooth/BluetoothDevice;->getPhonebookAccessPermission()I
+Landroid/bluetooth/BluetoothDevice;->getService()Landroid/bluetooth/IBluetooth;
+Landroid/bluetooth/BluetoothDevice;->isBluetoothDock()Z
+Landroid/bluetooth/BluetoothDevice;->isBondingInitiatedLocally()Z
+Landroid/bluetooth/BluetoothDevice;->setAlias(Ljava/lang/String;)Z
+Landroid/bluetooth/BluetoothDevice;->setMessageAccessPermission(I)Z
+Landroid/bluetooth/BluetoothDevice;->setPasskey(I)Z
+Landroid/bluetooth/BluetoothDevice;->setSimAccessPermission(I)Z
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_AUTH_FAILED:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_AUTH_REJECTED:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_AUTH_TIMEOUT:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_DISCOVERY_IN_PROGRESS:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_REMOTE_AUTH_CANCELED:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_REMOTE_DEVICE_DOWN:I
+Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_REPEATED_ATTEMPTS:I
+Landroid/bluetooth/BluetoothGatt;->connect(Ljava/lang/Boolean;Landroid/bluetooth/BluetoothGattCallback;Landroid/os/Handler;)Z
+Landroid/bluetooth/BluetoothGatt;->mAuthRetryState:I
+Landroid/bluetooth/BluetoothGatt;->mAutoConnect:Z
+Landroid/bluetooth/BluetoothGatt;->mCallback:Landroid/bluetooth/BluetoothGattCallback;
+Landroid/bluetooth/BluetoothGatt;->mClientIf:I
+Landroid/bluetooth/BluetoothGatt;->mDeviceBusy:Ljava/lang/Boolean;
+Landroid/bluetooth/BluetoothGatt;->mService:Landroid/bluetooth/IBluetoothGatt;
+Landroid/bluetooth/BluetoothGatt;->mTransport:I
+Landroid/bluetooth/BluetoothGatt;->refresh()Z
+Landroid/bluetooth/BluetoothGatt;->unregisterApp()V
+Landroid/bluetooth/BluetoothGattCharacteristic;->mInstance:I
+Landroid/bluetooth/BluetoothGattCharacteristic;->mService:Landroid/bluetooth/BluetoothGattService;
+Landroid/bluetooth/BluetoothGattCharacteristic;->setKeySize(I)V
+Landroid/bluetooth/BluetoothGattCharacteristic;->setService(Landroid/bluetooth/BluetoothGattService;)V
+Landroid/bluetooth/BluetoothGattDescriptor;->mCharacteristic:Landroid/bluetooth/BluetoothGattCharacteristic;
+Landroid/bluetooth/BluetoothGattDescriptor;->mInstance:I
+Landroid/bluetooth/BluetoothGattDescriptor;->setCharacteristic(Landroid/bluetooth/BluetoothGattCharacteristic;)V
+Landroid/bluetooth/BluetoothGattService;->mDevice:Landroid/bluetooth/BluetoothDevice;
+Landroid/bluetooth/BluetoothGattService;->setAdvertisePreferred(Z)V
+Landroid/bluetooth/BluetoothGattService;->setInstanceId(I)V
+Landroid/bluetooth/BluetoothHeadset;->ACTION_ACTIVE_DEVICE_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothHeadset;->close()V
+Landroid/bluetooth/BluetoothHeadset;->connectAudio()Z
+Landroid/bluetooth/BluetoothHeadset;->disconnectAudio()Z
+Landroid/bluetooth/BluetoothHeadset;->getActiveDevice()Landroid/bluetooth/BluetoothDevice;
+Landroid/bluetooth/BluetoothHeadset;->getAudioState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothHeadset;->getPriority(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothHeadset;->isEnabled()Z
+Landroid/bluetooth/BluetoothHeadset;->phoneStateChanged(IIILjava/lang/String;I)V
+Landroid/bluetooth/BluetoothHeadset;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothHeadset;->startScoUsingVirtualVoiceCall()Z
+Landroid/bluetooth/BluetoothHeadset;->stopScoUsingVirtualVoiceCall()Z
+Landroid/bluetooth/BluetoothHeadsetClient;->acceptCall(Landroid/bluetooth/BluetoothDevice;I)Z
+Landroid/bluetooth/BluetoothHeadsetClient;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothHeadsetClient;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothHeadsetClient;->getAudioState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/BluetoothHeadsetClient;->rejectCall(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothHeadsetClientCall;->getId()I
+Landroid/bluetooth/BluetoothHeadsetClientCall;->getNumber()Ljava/lang/String;
+Landroid/bluetooth/BluetoothHeadsetClientCall;->getState()I
+Landroid/bluetooth/BluetoothHeadsetClientCall;->isMultiParty()Z
+Landroid/bluetooth/BluetoothHeadsetClientCall;->isOutgoing()Z
+Landroid/bluetooth/BluetoothHearingAid;->ACTION_ACTIVE_DEVICE_CHANGED:Ljava/lang/String;
+Landroid/bluetooth/BluetoothHearingAid;->getActiveDevices()Ljava/util/List;
+Landroid/bluetooth/BluetoothHearingAid;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothMap;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothMapClient;->sendMessage(Landroid/bluetooth/BluetoothDevice;[Landroid/net/Uri;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)Z
+Landroid/bluetooth/BluetoothPan;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V
+Landroid/bluetooth/BluetoothPan;->close()V
+Landroid/bluetooth/BluetoothPan;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothPan;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothPan;->doBind()Z
+Landroid/bluetooth/BluetoothPan;->isEnabled()Z
+Landroid/bluetooth/BluetoothPan;->isTetheringOn()Z
+Landroid/bluetooth/BluetoothPan;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothPan;->log(Ljava/lang/String;)V
+Landroid/bluetooth/BluetoothPan;->setBluetoothTethering(Z)V
+Landroid/bluetooth/BluetoothPbap;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothProfile;->A2DP_SINK:I
+Landroid/bluetooth/BluetoothProfile;->AVRCP_CONTROLLER:I
+Landroid/bluetooth/BluetoothProfile;->PAN:I
+Landroid/bluetooth/BluetoothProfile;->PRIORITY_AUTO_CONNECT:I
+Landroid/bluetooth/BluetoothProfile;->PRIORITY_UNDEFINED:I
+Landroid/bluetooth/BluetoothSap;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothServerSocket;->mSocket:Landroid/bluetooth/BluetoothSocket;
+Landroid/bluetooth/BluetoothSocket;->EADDRINUSE:I
+Landroid/bluetooth/BluetoothSocket;->flush()V
+Landroid/bluetooth/BluetoothSocket;->mPfd:Landroid/os/ParcelFileDescriptor;
+Landroid/bluetooth/BluetoothSocket;->mPort:I
+Landroid/bluetooth/BluetoothSocket;->mSocket:Landroid/net/LocalSocket;
+Landroid/bluetooth/BluetoothUuid;->AdvAudioDist:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->AudioSink:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->containsAnyUuid([Landroid/os/ParcelUuid;[Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->Handsfree:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->Hogp:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->HSP:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->is16BitUuid(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->is32BitUuid(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->isAdvAudioDist(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->isAudioSource(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->isAvrcpTarget(Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->isUuidPresent([Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Z
+Landroid/bluetooth/BluetoothUuid;->NAP:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->ObexObjectPush:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->PBAP_PSE:Landroid/os/ParcelUuid;
+Landroid/bluetooth/BluetoothUuid;->RESERVED_UUIDS:[Landroid/os/ParcelUuid;
+Landroid/bluetooth/IBluetooth$Stub$Proxy;->getAddress()Ljava/lang/String;
+Landroid/bluetooth/IBluetooth$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetooth$Stub;-><init>()V
+Landroid/bluetooth/IBluetooth$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetooth;
+Landroid/bluetooth/IBluetooth;->getAddress()Ljava/lang/String;
+Landroid/bluetooth/IBluetooth;->getRemoteAlias(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
+Landroid/bluetooth/IBluetooth;->isEnabled()Z
+Landroid/bluetooth/IBluetooth;->sendConnectionStateChange(Landroid/bluetooth/BluetoothDevice;III)V
+Landroid/bluetooth/IBluetoothA2dp$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothA2dp$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothA2dp;
+Landroid/bluetooth/IBluetoothA2dp;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/IBluetoothA2dp;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/IBluetoothA2dp;->getConnectedDevices()Ljava/util/List;
+Landroid/bluetooth/IBluetoothA2dp;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetoothA2dp;->getDevicesMatchingConnectionStates([I)Ljava/util/List;
+Landroid/bluetooth/IBluetoothA2dp;->getPriority(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetoothCallback$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothGatt;->registerClient(Landroid/os/ParcelUuid;Landroid/bluetooth/IBluetoothGattCallback;)V
+Landroid/bluetooth/IBluetoothGatt;->unregisterClient(I)V
+Landroid/bluetooth/IBluetoothGattCallback$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothGattCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothGattCallback;
+Landroid/bluetooth/IBluetoothHeadset$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHeadset;
+Landroid/bluetooth/IBluetoothHeadset;->connect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/IBluetoothHeadset;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/IBluetoothHeadset;->getConnectedDevices()Ljava/util/List;
+Landroid/bluetooth/IBluetoothHeadset;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetoothHeadset;->getPriority(Landroid/bluetooth/BluetoothDevice;)I
+Landroid/bluetooth/IBluetoothHeadset;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z
+Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/bluetooth/IBluetoothManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothManager;
+Landroid/bluetooth/IBluetoothManager;->getBluetoothGatt()Landroid/bluetooth/IBluetoothGatt;
+Landroid/bluetooth/IBluetoothManager;->registerStateChangeCallback(Landroid/bluetooth/IBluetoothStateChangeCallback;)V
+Landroid/bluetooth/IBluetoothManager;->unregisterStateChangeCallback(Landroid/bluetooth/IBluetoothStateChangeCallback;)V
+Landroid/bluetooth/IBluetoothManagerCallback$Stub;-><init>()V
+Landroid/bluetooth/IBluetoothPbap$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothPbap;
+Landroid/bluetooth/IBluetoothStateChangeCallback$Stub;-><init>()V
+Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
+Landroid/companion/AssociationRequest;->getDeviceFilters()Ljava/util/List;
+Landroid/companion/AssociationRequest;->isSingleDevice()Z
+Landroid/companion/BluetoothDeviceFilter;->getAddress()Ljava/lang/String;
+Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceDisplayNameInternal(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
+Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceDisplayNameInternal(Landroid/net/wifi/ScanResult;)Ljava/lang/String;
+Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceMacAddress(Landroid/os/Parcelable;)Ljava/lang/String;
+Landroid/companion/BluetoothLeDeviceFilter;->getScanFilter()Landroid/bluetooth/le/ScanFilter;
+Landroid/companion/DeviceFilter;->getDeviceDisplayName(Landroid/os/Parcelable;)Ljava/lang/String;
+Landroid/companion/DeviceFilter;->matches(Landroid/os/Parcelable;)Z
+Landroid/companion/ICompanionDeviceDiscoveryService$Stub;-><init>()V
+Landroid/companion/ICompanionDeviceDiscoveryServiceCallback;->onDeviceSelected(Ljava/lang/String;ILjava/lang/String;)V
+Landroid/companion/ICompanionDeviceDiscoveryServiceCallback;->onDeviceSelectionCancel()V
+Landroid/companion/IFindDeviceCallback;->onSuccess(Landroid/app/PendingIntent;)V
+Landroid/content/AsyncTaskLoader;->mExecutor:Ljava/util/concurrent/Executor;
+Landroid/content/AsyncTaskLoader;->waitForLoader()V
+Landroid/content/BroadcastReceiver$PendingResult;-><init>(ILjava/lang/String;Landroid/os/Bundle;IZZLandroid/os/IBinder;II)V
+Landroid/content/BroadcastReceiver$PendingResult;->mAbortBroadcast:Z
+Landroid/content/BroadcastReceiver$PendingResult;->mFinished:Z
+Landroid/content/BroadcastReceiver$PendingResult;->mFlags:I
+Landroid/content/BroadcastReceiver$PendingResult;->mInitialStickyHint:Z
+Landroid/content/BroadcastReceiver$PendingResult;->mOrderedHint:Z
+Landroid/content/BroadcastReceiver$PendingResult;->mResultCode:I
+Landroid/content/BroadcastReceiver$PendingResult;->mResultData:Ljava/lang/String;
+Landroid/content/BroadcastReceiver$PendingResult;->mResultExtras:Landroid/os/Bundle;
+Landroid/content/BroadcastReceiver$PendingResult;->mSendingUser:I
+Landroid/content/BroadcastReceiver$PendingResult;->mToken:Landroid/os/IBinder;
+Landroid/content/BroadcastReceiver$PendingResult;->mType:I
+Landroid/content/BroadcastReceiver;->getPendingResult()Landroid/content/BroadcastReceiver$PendingResult;
+Landroid/content/BroadcastReceiver;->mPendingResult:Landroid/content/BroadcastReceiver$PendingResult;
+Landroid/content/BroadcastReceiver;->setPendingResult(Landroid/content/BroadcastReceiver$PendingResult;)V
+Landroid/content/ClipboardManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
+Landroid/content/ClipboardManager;->reportPrimaryClipChanged()V
+Landroid/content/ClipData$Item;->mUri:Landroid/net/Uri;
+Landroid/content/ClipData;->addItem(Landroid/content/ClipData$Item;Landroid/content/ContentResolver;)V
+Landroid/content/ClipData;->getIcon()Landroid/graphics/Bitmap;
+Landroid/content/ComponentName;->appendShortString(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/content/ComponentName;->printShortString(Ljava/io/PrintWriter;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/content/ContentProvider;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Landroid/content/pm/PathPermission;)V
+Landroid/content/ContentProvider;->attachInfoForTesting(Landroid/content/Context;Landroid/content/pm/ProviderInfo;)V
+Landroid/content/ContentProvider;->coerceToLocalContentProvider(Landroid/content/IContentProvider;)Landroid/content/ContentProvider;
+Landroid/content/ContentProvider;->getIContentProvider()Landroid/content/IContentProvider;
+Landroid/content/ContentProvider;->mAuthorities:[Ljava/lang/String;
+Landroid/content/ContentProvider;->mAuthority:Ljava/lang/String;
+Landroid/content/ContentProvider;->maybeAddUserId(Landroid/net/Uri;I)Landroid/net/Uri;
+Landroid/content/ContentProvider;->mContext:Landroid/content/Context;
+Landroid/content/ContentProvider;->mPathPermissions:[Landroid/content/pm/PathPermission;
+Landroid/content/ContentProvider;->mReadPermission:Ljava/lang/String;
+Landroid/content/ContentProvider;->mWritePermission:Ljava/lang/String;
+Landroid/content/ContentProvider;->setAppOps(II)V
+Landroid/content/ContentProviderClient;->mContentProvider:Landroid/content/IContentProvider;
+Landroid/content/ContentProviderClient;->mPackageName:Ljava/lang/String;
+Landroid/content/ContentProviderNative;->asInterface(Landroid/os/IBinder;)Landroid/content/IContentProvider;
+Landroid/content/ContentProviderOperation;->getType()I
+Landroid/content/ContentProviderOperation;->mSelection:Ljava/lang/String;
+Landroid/content/ContentProviderOperation;->mType:I
+Landroid/content/ContentProviderOperation;->mUri:Landroid/net/Uri;
+Landroid/content/ContentProviderOperation;->TYPE_DELETE:I
+Landroid/content/ContentProviderOperation;->TYPE_INSERT:I
+Landroid/content/ContentProviderOperation;->TYPE_UPDATE:I
+Landroid/content/ContentResolver$OpenResourceIdResult;->id:I
+Landroid/content/ContentResolver$OpenResourceIdResult;->r:Landroid/content/res/Resources;
+Landroid/content/ContentResolver;->acquireExistingProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireExistingProvider(Landroid/net/Uri;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireProvider(Landroid/net/Uri;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireProvider(Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireUnstableProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->acquireUnstableProvider(Ljava/lang/String;)Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->getContentService()Landroid/content/IContentService;
+Landroid/content/ContentResolver;->getPackageName()Ljava/lang/String;
+Landroid/content/ContentResolver;->getResourceId(Landroid/net/Uri;)Landroid/content/ContentResolver$OpenResourceIdResult;
+Landroid/content/ContentResolver;->getSyncStatus(Landroid/accounts/Account;Ljava/lang/String;)Landroid/content/SyncStatusInfo;
+Landroid/content/ContentResolver;->getSyncStatusAsUser(Landroid/accounts/Account;Ljava/lang/String;I)Landroid/content/SyncStatusInfo;
+Landroid/content/ContentResolver;->mContext:Landroid/content/Context;
+Landroid/content/ContentResolver;->mPackageName:Ljava/lang/String;
+Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
+Landroid/content/ContentResolver;->releaseProvider(Landroid/content/IContentProvider;)Z
+Landroid/content/ContentResolver;->releaseUnstableProvider(Landroid/content/IContentProvider;)Z
+Landroid/content/ContentResolver;->sContentService:Landroid/content/IContentService;
+Landroid/content/ContentResolver;->SYNC_ERROR_SYNC_ALREADY_IN_PROGRESS:I
+Landroid/content/ContentResolver;->SYNC_OBSERVER_TYPE_STATUS:I
+Landroid/content/ContentResolver;->takePersistableUriPermission(Ljava/lang/String;Landroid/net/Uri;I)V
+Landroid/content/ContentResolver;->unstableProviderDied(Landroid/content/IContentProvider;)V
+Landroid/content/ContentValues;-><init>(Ljava/util/HashMap;)V
+Landroid/content/ContentValues;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;
+Landroid/content/ContentValues;->mValues:Ljava/util/HashMap;
+Landroid/content/ContentValues;->putStringArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V
+Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z
+Landroid/content/Context;->canStartActivityForResult()Z
+Landroid/content/Context;->checkPermission(Ljava/lang/String;IILandroid/os/IBinder;)I
+Landroid/content/Context;->COUNTRY_DETECTOR:Ljava/lang/String;
+Landroid/content/Context;->createApplicationContext(Landroid/content/pm/ApplicationInfo;I)Landroid/content/Context;
+Landroid/content/Context;->ETHERNET_SERVICE:Ljava/lang/String;
+Landroid/content/Context;->getBasePackageName()Ljava/lang/String;
+Landroid/content/Context;->getDisplay()Landroid/view/Display;
+Landroid/content/Context;->getOpPackageName()Ljava/lang/String;
+Landroid/content/Context;->getSharedPreferences(Ljava/io/File;I)Landroid/content/SharedPreferences;
+Landroid/content/Context;->getSharedPreferencesPath(Ljava/lang/String;)Ljava/io/File;
+Landroid/content/Context;->getSharedPrefsFile(Ljava/lang/String;)Ljava/io/File;
+Landroid/content/Context;->getThemeResId()I
+Landroid/content/Context;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
+Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;Ljava/lang/String;I)V
+Landroid/content/Context;->sendBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;I)V
+Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;ILandroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/content/Context;->sendOrderedBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;ILandroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/content/Context;->sendOrderedBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;ILandroid/os/Bundle;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/content/Context;->startActivityAsUser(Landroid/content/Intent;Landroid/os/Bundle;Landroid/os/UserHandle;)V
+Landroid/content/Context;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
+Landroid/content/Context;->startActivityForResult(Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)V
+Landroid/content/Context;->startServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
+Landroid/content/Context;->STATUS_BAR_SERVICE:Ljava/lang/String;
+Landroid/content/ContextWrapper;->getBasePackageName()Ljava/lang/String;
+Landroid/content/ContextWrapper;->getDisplay()Landroid/view/Display;
+Landroid/content/ContextWrapper;->getSharedPreferences(Ljava/io/File;I)Landroid/content/SharedPreferences;
+Landroid/content/ContextWrapper;->getSharedPreferencesPath(Ljava/lang/String;)Ljava/io/File;
+Landroid/content/ContextWrapper;->getThemeResId()I
+Landroid/content/ContextWrapper;->mBase:Landroid/content/Context;
+Landroid/content/ContextWrapper;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
+Landroid/content/ContextWrapper;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
+Landroid/content/ContextWrapper;->startForegroundServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
+Landroid/content/ContextWrapper;->startServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
+Landroid/content/CursorEntityIterator;-><init>(Landroid/database/Cursor;)V
+Landroid/content/CursorLoader;->mCancellationSignal:Landroid/os/CancellationSignal;
+Landroid/content/CursorLoader;->mObserver:Landroid/content/Loader$ForceLoadContentObserver;
+Landroid/content/Entity;->mSubValues:Ljava/util/ArrayList;
+Landroid/content/Entity;->mValues:Landroid/content/ContentValues;
+Landroid/content/IClipboard$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/IClipboard$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IClipboard;
+Landroid/content/IContentProvider;->bulkInsert(Ljava/lang/String;Landroid/net/Uri;[Landroid/content/ContentValues;)I
+Landroid/content/IContentProvider;->call(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;
+Landroid/content/IContentProvider;->delete(Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
+Landroid/content/IContentProvider;->descriptor:Ljava/lang/String;
+Landroid/content/IContentProvider;->insert(Ljava/lang/String;Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
+Landroid/content/IContentProvider;->update(Ljava/lang/String;Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
+Landroid/content/IContentService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/IContentService$Stub;-><init>()V
+Landroid/content/IContentService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IContentService;
+Landroid/content/IContentService;->cancelSync(Landroid/accounts/Account;Ljava/lang/String;Landroid/content/ComponentName;)V
+Landroid/content/IContentService;->getIsSyncable(Landroid/accounts/Account;Ljava/lang/String;)I
+Landroid/content/IContentService;->getMasterSyncAutomatically()Z
+Landroid/content/IContentService;->getSyncAdapterTypes()[Landroid/content/SyncAdapterType;
+Landroid/content/IContentService;->isSyncActive(Landroid/accounts/Account;Ljava/lang/String;Landroid/content/ComponentName;)Z
+Landroid/content/IContentService;->setMasterSyncAutomatically(Z)V
+Landroid/content/IIntentReceiver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/IIntentReceiver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/IIntentReceiver$Stub;-><init>()V
+Landroid/content/IIntentReceiver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IIntentReceiver;
+Landroid/content/IIntentReceiver;->performReceive(Landroid/content/Intent;ILjava/lang/String;Landroid/os/Bundle;ZZI)V
+Landroid/content/IIntentSender$Stub;-><init>()V
+Landroid/content/IIntentSender$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IIntentSender;
+Landroid/content/Intent;->ACTION_ALARM_CHANGED:Ljava/lang/String;
+Landroid/content/Intent;->ACTION_DEVICE_INITIALIZATION_WIZARD:Ljava/lang/String;
+Landroid/content/Intent;->ACTION_MASTER_CLEAR:Ljava/lang/String;
+Landroid/content/Intent;->ACTION_SERVICE_STATE:Ljava/lang/String;
+Landroid/content/Intent;->ACTION_USER_SWITCHED:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_CDMA_DEFAULT_ROAMING_INDICATOR:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_CDMA_ROAMING_INDICATOR:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_CSS_INDICATOR:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_DATA_OPERATOR_ALPHA_LONG:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_DATA_OPERATOR_ALPHA_SHORT:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_DATA_OPERATOR_NUMERIC:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_DATA_RADIO_TECH:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_DATA_REG_STATE:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_DATA_ROAMING_TYPE:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_EMERGENCY_ONLY:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_IS_DATA_ROAMING_FROM_REGISTRATION:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_IS_USING_CARRIER_AGGREGATION:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_LTE_EARFCN_RSRP_BOOST:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_MANUAL:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_NETWORK_ID:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_OPERATOR_ALPHA_LONG:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_OPERATOR_ALPHA_SHORT:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_OPERATOR_NUMERIC:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_QUICK_VIEW_ADVANCED:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_SYSTEM_ID:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_VOICE_RADIO_TECH:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_VOICE_REG_STATE:Ljava/lang/String;
+Landroid/content/Intent;->EXTRA_VOICE_ROAMING_TYPE:Ljava/lang/String;
+Landroid/content/Intent;->FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT:I
+Landroid/content/Intent;->getExtra(Ljava/lang/String;)Ljava/lang/Object;
+Landroid/content/Intent;->getExtra(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
+Landroid/content/Intent;->getIBinderExtra(Ljava/lang/String;)Landroid/os/IBinder;
+Landroid/content/Intent;->isExcludingStopped()Z
+Landroid/content/Intent;->mExtras:Landroid/os/Bundle;
+Landroid/content/Intent;->parseCommandArgs(Landroid/os/ShellCommand;Landroid/content/Intent$CommandOptionHandler;)Landroid/content/Intent;
+Landroid/content/Intent;->prepareToLeaveProcess(Landroid/content/Context;)V
+Landroid/content/Intent;->printIntentArgsHelp(Ljava/io/PrintWriter;Ljava/lang/String;)V
+Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/IBinder;)Landroid/content/Intent;
+Landroid/content/Intent;->resolveSystemService(Landroid/content/pm/PackageManager;I)Landroid/content/ComponentName;
+Landroid/content/Intent;->setAllowFds(Z)V
+Landroid/content/Intent;->toInsecureString()Ljava/lang/String;
+Landroid/content/IntentFilter;->hasDataAuthority(Landroid/content/IntentFilter$AuthorityEntry;)Z
+Landroid/content/IntentFilter;->hasDataPath(Landroid/os/PatternMatcher;)Z
+Landroid/content/IntentFilter;->hasDataSchemeSpecificPart(Landroid/os/PatternMatcher;)Z
+Landroid/content/IntentFilter;->hasExactDataType(Ljava/lang/String;)Z
+Landroid/content/IntentFilter;->isVerified()Z
+Landroid/content/IntentFilter;->mActions:Ljava/util/ArrayList;
+Landroid/content/IntentFilter;->mOrder:I
+Landroid/content/IntentSender;-><init>(Landroid/content/IIntentSender;)V
+Landroid/content/IntentSender;->getTarget()Landroid/content/IIntentSender;
+Landroid/content/IntentSender;->mTarget:Landroid/content/IIntentSender;
+Landroid/content/IOnPrimaryClipChangedListener$Stub;-><init>()V
+Landroid/content/IOnPrimaryClipChangedListener$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IOnPrimaryClipChangedListener;
+Landroid/content/IRestrictionsManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IRestrictionsManager;
+Landroid/content/ISyncAdapter$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/ISyncAdapter$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/ISyncAdapter$Stub;-><init>()V
+Landroid/content/ISyncAdapter$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/ISyncAdapter;
+Landroid/content/ISyncAdapter;->cancelSync(Landroid/content/ISyncContext;)V
+Landroid/content/ISyncAdapter;->onUnsyncableAccount(Landroid/content/ISyncAdapterUnsyncableAccountCallback;)V
+Landroid/content/ISyncAdapter;->startSync(Landroid/content/ISyncContext;Ljava/lang/String;Landroid/accounts/Account;Landroid/os/Bundle;)V
+Landroid/content/ISyncContext$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/ISyncContext$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/ISyncContext$Stub;-><init>()V
+Landroid/content/ISyncContext$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/ISyncContext;
+Landroid/content/ISyncServiceAdapter$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/ISyncServiceAdapter;
+Landroid/content/ISyncServiceAdapter;->cancelSync(Landroid/content/ISyncContext;)V
+Landroid/content/ISyncServiceAdapter;->startSync(Landroid/content/ISyncContext;Landroid/os/Bundle;)V
+Landroid/content/ISyncStatusObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/ISyncStatusObserver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/ISyncStatusObserver$Stub;-><init>()V
+Landroid/content/ISyncStatusObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/ISyncStatusObserver;
+Landroid/content/ISyncStatusObserver;->onStatusChanged(I)V
+Landroid/content/om/IOverlayManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/om/IOverlayManager;
+Landroid/content/om/IOverlayManager;->getAllOverlays(I)Ljava/util/Map;
+Landroid/content/om/IOverlayManager;->getOverlayInfo(Ljava/lang/String;I)Landroid/content/om/OverlayInfo;
+Landroid/content/om/OverlayInfo;->isEnabled()Z
+Landroid/content/om/OverlayInfo;->packageName:Ljava/lang/String;
+Landroid/content/om/OverlayInfo;->state:I
+Landroid/content/om/OverlayInfo;->targetPackageName:Ljava/lang/String;
+Landroid/content/pm/ActivityInfo;->activityInfoConfigJavaToNative(I)I
+Landroid/content/pm/ActivityInfo;->isResizeableMode(I)Z
+Landroid/content/pm/ActivityInfo;->resizeMode:I
+Landroid/content/pm/ActivityInfo;->supportsPictureInPicture()Z
+Landroid/content/pm/ApplicationInfo$DisplayNameComparator;->mPM:Landroid/content/pm/PackageManager;
+Landroid/content/pm/ApplicationInfo$DisplayNameComparator;->sCollator:Ljava/text/Collator;
+Landroid/content/pm/ApplicationInfo;->disableCompatibilityMode()V
+Landroid/content/pm/ApplicationInfo;->enabledSetting:I
+Landroid/content/pm/ApplicationInfo;->fullBackupContent:I
+Landroid/content/pm/ApplicationInfo;->getBaseResourcePath()Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->getCodePath()Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->hasRtlSupport()Z
+Landroid/content/pm/ApplicationInfo;->installLocation:I
+Landroid/content/pm/ApplicationInfo;->isForwardLocked()Z
+Landroid/content/pm/ApplicationInfo;->isPackageUnavailable(Landroid/content/pm/PackageManager;)Z
+Landroid/content/pm/ApplicationInfo;->nativeLibraryRootDir:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->primaryCpuAbi:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->privateFlags:I
+Landroid/content/pm/ApplicationInfo;->PRIVATE_FLAG_PRIVILEGED:I
+Landroid/content/pm/ApplicationInfo;->resourceDirs:[Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->scanPublicSourceDir:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->scanSourceDir:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->secondaryCpuAbi:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->secondaryNativeLibraryDir:Ljava/lang/String;
+Landroid/content/pm/ApplicationInfo;->versionCode:I
+Landroid/content/pm/ApplicationInfo;->volumeUuid:Ljava/lang/String;
+Landroid/content/pm/BaseParceledListSlice;->getList()Ljava/util/List;
+Landroid/content/pm/BaseParceledListSlice;->writeParcelableCreator(Ljava/lang/Object;Landroid/os/Parcel;)V
+Landroid/content/pm/ComponentInfo;->encryptionAware:Z
+Landroid/content/pm/ComponentInfo;->getComponentName()Landroid/content/ComponentName;
+Landroid/content/pm/IPackageDataObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageDataObserver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageDataObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageDataObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageDataObserver;
+Landroid/content/pm/IPackageDataObserver;->onRemoveCompleted(Ljava/lang/String;Z)V
+Landroid/content/pm/IPackageDeleteObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageDeleteObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageDeleteObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageDeleteObserver;
+Landroid/content/pm/IPackageDeleteObserver2$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageDeleteObserver2$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageDeleteObserver2$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageDeleteObserver2;
+Landroid/content/pm/IPackageDeleteObserver2;->onPackageDeleted(Ljava/lang/String;ILjava/lang/String;)V
+Landroid/content/pm/IPackageDeleteObserver;->packageDeleted(Ljava/lang/String;I)V
+Landroid/content/pm/IPackageInstallerCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageInstallerCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageInstallerCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageInstallerCallback;
+Landroid/content/pm/IPackageInstallerCallback;->onSessionActiveChanged(IZ)V
+Landroid/content/pm/IPackageInstallerCallback;->onSessionBadgingChanged(I)V
+Landroid/content/pm/IPackageInstallerCallback;->onSessionCreated(I)V
+Landroid/content/pm/IPackageInstallerCallback;->onSessionFinished(IZ)V
+Landroid/content/pm/IPackageInstallerCallback;->onSessionProgressChanged(IF)V
+Landroid/content/pm/IPackageInstallerSession$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageInstallerSession$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageInstallerSession$Stub;-><init>()V
+Landroid/content/pm/IPackageInstallerSession$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageInstallerSession;
+Landroid/content/pm/IPackageInstallObserver2$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageInstallObserver2$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageInstallObserver2$Stub;-><init>()V
+Landroid/content/pm/IPackageInstallObserver2$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageInstallObserver2;
+Landroid/content/pm/IPackageInstallObserver2;->onPackageInstalled(Ljava/lang/String;ILjava/lang/String;Landroid/os/Bundle;)V
+Landroid/content/pm/IPackageInstallObserver2;->onUserActionRequired(Landroid/content/Intent;)V
+Landroid/content/pm/IPackageManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getInstalledPackages(II)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getInstallLocation()I
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getPackageInfo(Ljava/lang/String;II)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getPackagesForUid(I)[Ljava/lang/String;
+Landroid/content/pm/IPackageManager$Stub$Proxy;->getSystemSharedLibraryNames()[Ljava/lang/String;
+Landroid/content/pm/IPackageManager$Stub;-><init>()V
+Landroid/content/pm/IPackageManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageManager;
+Landroid/content/pm/IPackageManager;->addPermission(Landroid/content/pm/PermissionInfo;)Z
+Landroid/content/pm/IPackageManager;->addPermissionAsync(Landroid/content/pm/PermissionInfo;)Z
+Landroid/content/pm/IPackageManager;->canonicalToCurrentPackageNames([Ljava/lang/String;)[Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->checkPermission(Ljava/lang/String;Ljava/lang/String;I)I
+Landroid/content/pm/IPackageManager;->checkSignatures(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/content/pm/IPackageManager;->checkUidPermission(Ljava/lang/String;I)I
+Landroid/content/pm/IPackageManager;->checkUidSignatures(II)I
+Landroid/content/pm/IPackageManager;->clearPackagePreferredActivities(Ljava/lang/String;)V
+Landroid/content/pm/IPackageManager;->currentToCanonicalPackageNames([Ljava/lang/String;)[Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->deleteApplicationCacheFiles(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/IPackageManager;->enterSafeMode()V
+Landroid/content/pm/IPackageManager;->getActivityInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/IPackageManager;->getApplicationEnabledSetting(Ljava/lang/String;I)I
+Landroid/content/pm/IPackageManager;->getApplicationInfo(Ljava/lang/String;II)Landroid/content/pm/ApplicationInfo;
+Landroid/content/pm/IPackageManager;->getBlockUninstallForUser(Ljava/lang/String;I)Z
+Landroid/content/pm/IPackageManager;->getComponentEnabledSetting(Landroid/content/ComponentName;I)I
+Landroid/content/pm/IPackageManager;->getFlagsForUid(I)I
+Landroid/content/pm/IPackageManager;->getHomeActivities(Ljava/util/List;)Landroid/content/ComponentName;
+Landroid/content/pm/IPackageManager;->getInstalledApplications(II)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager;->getInstalledPackages(II)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager;->getInstallerPackageName(Ljava/lang/String;)Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getInstallLocation()I
+Landroid/content/pm/IPackageManager;->getInstrumentationInfo(Landroid/content/ComponentName;I)Landroid/content/pm/InstrumentationInfo;
+Landroid/content/pm/IPackageManager;->getLastChosenActivity(Landroid/content/Intent;Ljava/lang/String;I)Landroid/content/pm/ResolveInfo;
+Landroid/content/pm/IPackageManager;->getNameForUid(I)Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getPackageInfo(Ljava/lang/String;II)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/IPackageManager;->getPackagesForUid(I)[Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getPackageUid(Ljava/lang/String;II)I
+Landroid/content/pm/IPackageManager;->getPermissionControllerPackageName()Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getPermissionGroupInfo(Ljava/lang/String;I)Landroid/content/pm/PermissionGroupInfo;
+Landroid/content/pm/IPackageManager;->getPreferredActivities(Ljava/util/List;Ljava/util/List;Ljava/lang/String;)I
+Landroid/content/pm/IPackageManager;->getProviderInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ProviderInfo;
+Landroid/content/pm/IPackageManager;->getReceiverInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/IPackageManager;->getServiceInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ServiceInfo;
+Landroid/content/pm/IPackageManager;->getServicesSystemSharedLibraryPackageName()Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getSharedSystemSharedLibraryPackageName()Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getSystemSharedLibraryNames()[Ljava/lang/String;
+Landroid/content/pm/IPackageManager;->getUidForSharedUser(Ljava/lang/String;)I
+Landroid/content/pm/IPackageManager;->grantRuntimePermission(Ljava/lang/String;Ljava/lang/String;I)V
+Landroid/content/pm/IPackageManager;->hasSystemUidErrors()Z
+Landroid/content/pm/IPackageManager;->isPackageAvailable(Ljava/lang/String;I)Z
+Landroid/content/pm/IPackageManager;->isProtectedBroadcast(Ljava/lang/String;)Z
+Landroid/content/pm/IPackageManager;->isSafeMode()Z
+Landroid/content/pm/IPackageManager;->isStorageLow()Z
+Landroid/content/pm/IPackageManager;->isUidPrivileged(I)Z
+Landroid/content/pm/IPackageManager;->queryInstrumentation(Ljava/lang/String;I)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager;->queryIntentActivities(Landroid/content/Intent;Ljava/lang/String;II)Landroid/content/pm/ParceledListSlice;
+Landroid/content/pm/IPackageManager;->querySyncProviders(Ljava/util/List;Ljava/util/List;)V
+Landroid/content/pm/IPackageManager;->removePermission(Ljava/lang/String;)V
+Landroid/content/pm/IPackageManager;->replacePreferredActivity(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;I)V
+Landroid/content/pm/IPackageManager;->resolveIntent(Landroid/content/Intent;Ljava/lang/String;II)Landroid/content/pm/ResolveInfo;
+Landroid/content/pm/IPackageManager;->setApplicationEnabledSetting(Ljava/lang/String;IIILjava/lang/String;)V
+Landroid/content/pm/IPackageManager;->setApplicationHiddenSettingAsUser(Ljava/lang/String;ZI)Z
+Landroid/content/pm/IPackageManager;->setComponentEnabledSetting(Landroid/content/ComponentName;III)V
+Landroid/content/pm/IPackageManager;->setInstallerPackageName(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/content/pm/IPackageManager;->setLastChosenActivity(Landroid/content/Intent;Ljava/lang/String;ILandroid/content/IntentFilter;ILandroid/content/ComponentName;)V
+Landroid/content/pm/IPackageManager;->setPackageStoppedState(Ljava/lang/String;ZI)V
+Landroid/content/pm/IPackageManager;->systemReady()V
+Landroid/content/pm/IPackageMoveObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageMoveObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageMoveObserver;
+Landroid/content/pm/IPackageStatsObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IPackageStatsObserver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageStatsObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageStatsObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageStatsObserver;
+Landroid/content/pm/IPackageStatsObserver;->onGetStatsCompleted(Landroid/content/pm/PackageStats;Z)V
+Landroid/content/pm/IShortcutService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/content/pm/IShortcutService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IShortcutService;
+Landroid/content/pm/LauncherActivityInfo;->mActivityInfo:Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/LauncherApps;->mPm:Landroid/content/pm/PackageManager;
+Landroid/content/pm/LauncherApps;->mService:Landroid/content/pm/ILauncherApps;
+Landroid/content/pm/LauncherApps;->startShortcut(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Rect;Landroid/os/Bundle;I)V
+Landroid/content/pm/PackageInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/content/pm/PackageInfo;->coreApp:Z
+Landroid/content/pm/PackageInfo;->INSTALL_LOCATION_UNSPECIFIED:I
+Landroid/content/pm/PackageInfo;->overlayTarget:Ljava/lang/String;
+Landroid/content/pm/PackageInfo;->REQUESTED_PERMISSION_REQUIRED:I
+Landroid/content/pm/PackageInfoLite;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/pm/PackageInstaller$Session;->addProgress(F)V
+Landroid/content/pm/PackageInstaller$SessionInfo;-><init>()V
+Landroid/content/pm/PackageInstaller$SessionInfo;->active:Z
+Landroid/content/pm/PackageInstaller$SessionInfo;->appIcon:Landroid/graphics/Bitmap;
+Landroid/content/pm/PackageInstaller$SessionInfo;->appLabel:Ljava/lang/CharSequence;
+Landroid/content/pm/PackageInstaller$SessionInfo;->appPackageName:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionInfo;->installerPackageName:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionInfo;->mode:I
+Landroid/content/pm/PackageInstaller$SessionInfo;->progress:F
+Landroid/content/pm/PackageInstaller$SessionInfo;->resolvedBaseCodePath:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionInfo;->sealed:Z
+Landroid/content/pm/PackageInstaller$SessionInfo;->sessionId:I
+Landroid/content/pm/PackageInstaller$SessionInfo;->sizeBytes:J
+Landroid/content/pm/PackageInstaller$SessionParams;->appIcon:Landroid/graphics/Bitmap;
+Landroid/content/pm/PackageInstaller$SessionParams;->appLabel:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionParams;->appPackageName:Ljava/lang/String;
+Landroid/content/pm/PackageInstaller$SessionParams;->installFlags:I
+Landroid/content/pm/PackageInstaller$SessionParams;->mode:I
+Landroid/content/pm/PackageInstaller$SessionParams;->originatingUid:I
+Landroid/content/pm/PackageInstaller$SessionParams;->sizeBytes:J
+Landroid/content/pm/PackageItemInfo;->setForceSafeLabels(Z)V
+Landroid/content/pm/PackageManager;->addCrossProfileIntentFilter(Landroid/content/IntentFilter;III)V
+Landroid/content/pm/PackageManager;->addPreferredActivityAsUser(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;I)V
+Landroid/content/pm/PackageManager;->buildRequestPermissionsIntent([Ljava/lang/String;)Landroid/content/Intent;
+Landroid/content/pm/PackageManager;->clearApplicationUserData(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->clearCrossProfileIntentFilters(I)V
+Landroid/content/pm/PackageManager;->deleteApplicationCacheFiles(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->deleteApplicationCacheFilesAsUser(Ljava/lang/String;ILandroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->deletePackage(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;I)V
+Landroid/content/pm/PackageManager;->deletePackageAsUser(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;II)V
+Landroid/content/pm/PackageManager;->deleteStatusToString(I)Ljava/lang/String;
+Landroid/content/pm/PackageManager;->flushPackageRestrictionsAsUser(I)V
+Landroid/content/pm/PackageManager;->freeStorage(JLandroid/content/IntentSender;)V
+Landroid/content/pm/PackageManager;->freeStorage(Ljava/lang/String;JLandroid/content/IntentSender;)V
+Landroid/content/pm/PackageManager;->freeStorageAndNotify(JLandroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->freeStorageAndNotify(Ljava/lang/String;JLandroid/content/pm/IPackageDataObserver;)V
+Landroid/content/pm/PackageManager;->getApplicationHiddenSettingAsUser(Ljava/lang/String;Landroid/os/UserHandle;)Z
+Landroid/content/pm/PackageManager;->getApplicationInfoAsUser(Ljava/lang/String;II)Landroid/content/pm/ApplicationInfo;
+Landroid/content/pm/PackageManager;->getHomeActivities(Ljava/util/List;)Landroid/content/ComponentName;
+Landroid/content/pm/PackageManager;->getKeySetByAlias(Ljava/lang/String;Ljava/lang/String;)Landroid/content/pm/KeySet;
+Landroid/content/pm/PackageManager;->getMoveStatus(I)I
+Landroid/content/pm/PackageManager;->getPackageCandidateVolumes(Landroid/content/pm/ApplicationInfo;)Ljava/util/List;
+Landroid/content/pm/PackageManager;->getPackageCurrentVolume(Landroid/content/pm/ApplicationInfo;)Landroid/os/storage/VolumeInfo;
+Landroid/content/pm/PackageManager;->getPackageInfoAsUser(Ljava/lang/String;II)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/PackageManager;->getPackageSizeInfo(Ljava/lang/String;Landroid/content/pm/IPackageStatsObserver;)V
+Landroid/content/pm/PackageManager;->getPackageSizeInfoAsUser(Ljava/lang/String;ILandroid/content/pm/IPackageStatsObserver;)V
+Landroid/content/pm/PackageManager;->getPackageUidAsUser(Ljava/lang/String;I)I
+Landroid/content/pm/PackageManager;->getPackageUidAsUser(Ljava/lang/String;II)I
+Landroid/content/pm/PackageManager;->getResourcesForApplicationAsUser(Ljava/lang/String;I)Landroid/content/res/Resources;
+Landroid/content/pm/PackageManager;->getSigningKeySet(Ljava/lang/String;)Landroid/content/pm/KeySet;
+Landroid/content/pm/PackageManager;->getUidForSharedUser(Ljava/lang/String;)I
+Landroid/content/pm/PackageManager;->getUserBadgeForDensity(Landroid/os/UserHandle;I)Landroid/graphics/drawable/Drawable;
+Landroid/content/pm/PackageManager;->getUserBadgeForDensityNoBackground(Landroid/os/UserHandle;I)Landroid/graphics/drawable/Drawable;
+Landroid/content/pm/PackageManager;->installExistingPackageAsUser(Ljava/lang/String;I)I
+Landroid/content/pm/PackageManager;->installStatusToString(I)Ljava/lang/String;
+Landroid/content/pm/PackageManager;->installStatusToString(ILjava/lang/String;)Ljava/lang/String;
+Landroid/content/pm/PackageManager;->INSTALL_REPLACE_EXISTING:I
+Landroid/content/pm/PackageManager;->isPackageAvailable(Ljava/lang/String;)Z
+Landroid/content/pm/PackageManager;->isPackageSuspendedForUser(Ljava/lang/String;I)Z
+Landroid/content/pm/PackageManager;->isSignedBy(Ljava/lang/String;Landroid/content/pm/KeySet;)Z
+Landroid/content/pm/PackageManager;->isSignedByExactly(Ljava/lang/String;Landroid/content/pm/KeySet;)Z
+Landroid/content/pm/PackageManager;->isUpgrade()Z
+Landroid/content/pm/PackageManager;->loadItemIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
+Landroid/content/pm/PackageManager;->loadUnbadgedItemIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
+Landroid/content/pm/PackageManager;->movePackage(Ljava/lang/String;Landroid/os/storage/VolumeInfo;)I
+Landroid/content/pm/PackageManager;->MOVE_EXTERNAL_MEDIA:I
+Landroid/content/pm/PackageManager;->MOVE_INTERNAL:I
+Landroid/content/pm/PackageManager;->NO_NATIVE_LIBRARIES:I
+Landroid/content/pm/PackageManager;->queryBroadcastReceivers(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->queryBroadcastReceiversAsUser(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->queryIntentActivitiesAsUser(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->queryIntentContentProvidersAsUser(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->queryIntentServicesAsUser(Landroid/content/Intent;II)Ljava/util/List;
+Landroid/content/pm/PackageManager;->registerMoveCallback(Landroid/content/pm/PackageManager$MoveCallback;Landroid/os/Handler;)V
+Landroid/content/pm/PackageManager;->replacePreferredActivity(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;)V
+Landroid/content/pm/PackageManager;->replacePreferredActivityAsUser(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;I)V
+Landroid/content/pm/PackageManager;->resolveActivityAsUser(Landroid/content/Intent;II)Landroid/content/pm/ResolveInfo;
+Landroid/content/pm/PackageManager;->resolveContentProviderAsUser(Ljava/lang/String;II)Landroid/content/pm/ProviderInfo;
+Landroid/content/pm/PackageManager;->setApplicationHiddenSettingAsUser(Ljava/lang/String;ZLandroid/os/UserHandle;)Z
+Landroid/content/pm/PackageManager;->setInstantAppCookie([B)Z
+Landroid/content/pm/PackageManager;->shouldShowRequestPermissionRationale(Ljava/lang/String;)Z
+Landroid/content/pm/PackageManager;->unregisterMoveCallback(Landroid/content/pm/PackageManager$MoveCallback;)V
+Landroid/content/pm/PackageParser$Activity;->info:Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/PackageParser$ActivityIntentInfo;->activity:Landroid/content/pm/PackageParser$Activity;
+Landroid/content/pm/PackageParser$Component;->className:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Component;->getComponentName()Landroid/content/ComponentName;
+Landroid/content/pm/PackageParser$Component;->intents:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Component;->metaData:Landroid/os/Bundle;
+Landroid/content/pm/PackageParser$Component;->owner:Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser$Instrumentation;->info:Landroid/content/pm/InstrumentationInfo;
+Landroid/content/pm/PackageParser$IntentInfo;-><init>()V
+Landroid/content/pm/PackageParser$IntentInfo;->banner:I
+Landroid/content/pm/PackageParser$IntentInfo;->hasDefault:Z
+Landroid/content/pm/PackageParser$IntentInfo;->icon:I
+Landroid/content/pm/PackageParser$IntentInfo;->labelRes:I
+Landroid/content/pm/PackageParser$IntentInfo;->logo:I
+Landroid/content/pm/PackageParser$IntentInfo;->nonLocalizedLabel:Ljava/lang/CharSequence;
+Landroid/content/pm/PackageParser$NewPermissionInfo;->name:Ljava/lang/String;
+Landroid/content/pm/PackageParser$NewPermissionInfo;->sdkVersion:I
+Landroid/content/pm/PackageParser$Package;-><init>(Ljava/lang/String;)V
+Landroid/content/pm/PackageParser$Package;->activities:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
+Landroid/content/pm/PackageParser$Package;->configPreferences:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->installLocation:I
+Landroid/content/pm/PackageParser$Package;->instrumentation:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->mAppMetaData:Landroid/os/Bundle;
+Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
+Landroid/content/pm/PackageParser$Package;->mKeySetMapping:Landroid/util/ArrayMap;
+Landroid/content/pm/PackageParser$Package;->mPreferredOrder:I
+Landroid/content/pm/PackageParser$Package;->mSharedUserId:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Package;->mSharedUserLabel:I
+Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
+Landroid/content/pm/PackageParser$Package;->mUpgradeKeySets:Landroid/util/ArraySet;
+Landroid/content/pm/PackageParser$Package;->mVersionCode:I
+Landroid/content/pm/PackageParser$Package;->mVersionName:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Package;->permissionGroups:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->permissions:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->protectedBroadcasts:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->providers:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->receivers:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->reqFeatures:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->requestedPermissions:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->services:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->setPackageName(Ljava/lang/String;)V
+Landroid/content/pm/PackageParser$Package;->usesLibraries:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$Package;->usesLibraryFiles:[Ljava/lang/String;
+Landroid/content/pm/PackageParser$Package;->usesOptionalLibraries:Ljava/util/ArrayList;
+Landroid/content/pm/PackageParser$PackageLite;->installLocation:I
+Landroid/content/pm/PackageParser$PackageLite;->packageName:Ljava/lang/String;
+Landroid/content/pm/PackageParser$Permission;-><init>(Landroid/content/pm/PackageParser$Package;Landroid/content/pm/PermissionInfo;)V
+Landroid/content/pm/PackageParser$Permission;->group:Landroid/content/pm/PackageParser$PermissionGroup;
+Landroid/content/pm/PackageParser$Permission;->info:Landroid/content/pm/PermissionInfo;
+Landroid/content/pm/PackageParser$Permission;->tree:Z
+Landroid/content/pm/PackageParser$PermissionGroup;->info:Landroid/content/pm/PermissionGroupInfo;
+Landroid/content/pm/PackageParser$Provider;-><init>(Landroid/content/pm/PackageParser$Provider;)V
+Landroid/content/pm/PackageParser$Provider;->info:Landroid/content/pm/ProviderInfo;
+Landroid/content/pm/PackageParser$Provider;->syncable:Z
+Landroid/content/pm/PackageParser$ProviderIntentInfo;->provider:Landroid/content/pm/PackageParser$Provider;
+Landroid/content/pm/PackageParser$Service;->info:Landroid/content/pm/ServiceInfo;
+Landroid/content/pm/PackageParser$ServiceIntentInfo;->service:Landroid/content/pm/PackageParser$Service;
+Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
+Landroid/content/pm/PackageParser;-><init>()V
+Landroid/content/pm/PackageParser;->collectCertificates(Landroid/content/pm/PackageParser$Package;Ljava/io/File;Z)V
+Landroid/content/pm/PackageParser;->collectCertificates(Landroid/content/pm/PackageParser$Package;Z)V
+Landroid/content/pm/PackageParser;->generateActivityInfo(Landroid/content/pm/PackageParser$Activity;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/PackageParser;->generateApplicationInfo(Landroid/content/pm/PackageParser$Package;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ApplicationInfo;
+Landroid/content/pm/PackageParser;->generateInstrumentationInfo(Landroid/content/pm/PackageParser$Instrumentation;I)Landroid/content/pm/InstrumentationInfo;
+Landroid/content/pm/PackageParser;->generatePackageInfo(Landroid/content/pm/PackageParser$Package;[IIJJLjava/util/Set;Landroid/content/pm/PackageUserState;)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/PackageParser;->generatePackageInfo(Landroid/content/pm/PackageParser$Package;[IIJJLjava/util/Set;Landroid/content/pm/PackageUserState;I)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/PackageParser;->generatePermissionGroupInfo(Landroid/content/pm/PackageParser$PermissionGroup;I)Landroid/content/pm/PermissionGroupInfo;
+Landroid/content/pm/PackageParser;->generatePermissionInfo(Landroid/content/pm/PackageParser$Permission;I)Landroid/content/pm/PermissionInfo;
+Landroid/content/pm/PackageParser;->generateProviderInfo(Landroid/content/pm/PackageParser$Provider;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ProviderInfo;
+Landroid/content/pm/PackageParser;->generateServiceInfo(Landroid/content/pm/PackageParser$Service;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ServiceInfo;
+Landroid/content/pm/PackageParser;->mCallback:Landroid/content/pm/PackageParser$Callback;
+Landroid/content/pm/PackageParser;->NEW_PERMISSIONS:[Landroid/content/pm/PackageParser$NewPermissionInfo;
+Landroid/content/pm/PackageParser;->parseBaseApk(Ljava/lang/String;Landroid/content/res/Resources;Landroid/content/res/XmlResourceParser;I[Ljava/lang/String;)Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser;->parseMonolithicPackage(Ljava/io/File;I)Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser;->parsePackage(Ljava/io/File;I)Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser;->parsePackage(Ljava/io/File;IZ)Landroid/content/pm/PackageParser$Package;
+Landroid/content/pm/PackageParser;->parsePackageLite(Ljava/io/File;I)Landroid/content/pm/PackageParser$PackageLite;
+Landroid/content/pm/PackageParser;->setCompatibilityModeEnabled(Z)V
+Landroid/content/pm/PackageParser;->setSeparateProcesses([Ljava/lang/String;)V
+Landroid/content/pm/PackageStats;->userHandle:I
+Landroid/content/pm/PackageUserState;-><init>()V
+Landroid/content/pm/ParceledListSlice;-><init>(Ljava/util/List;)V
+Landroid/content/pm/ParceledListSlice;->CREATOR:Landroid/os/Parcelable$ClassLoaderCreator;
+Landroid/content/pm/ParceledListSlice;->writeParcelableCreator(Landroid/os/Parcelable;Landroid/os/Parcel;)V
+Landroid/content/pm/PermissionInfo;->protectionToString(I)Ljava/lang/String;
+Landroid/content/pm/RegisteredServicesCache$ServiceInfo;->componentName:Landroid/content/ComponentName;
+Landroid/content/pm/RegisteredServicesCache$ServiceInfo;->type:Ljava/lang/Object;
+Landroid/content/pm/RegisteredServicesCache$ServiceInfo;->uid:I
+Landroid/content/pm/RegisteredServicesCache;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/pm/XmlSerializerAndParser;)V
+Landroid/content/pm/ResolveInfo;->getComponentInfo()Landroid/content/pm/ComponentInfo;
+Landroid/content/pm/ResolveInfo;->handleAllWebDataURI:Z
+Landroid/content/pm/ResolveInfo;->instantAppAvailable:Z
+Landroid/content/pm/ResolveInfo;->system:Z
+Landroid/content/pm/ResolveInfo;->targetUserId:I
+Landroid/content/pm/SharedLibraryInfo;->isBuiltin()Z
+Landroid/content/pm/SharedLibraryInfo;->isDynamic()Z
+Landroid/content/pm/SharedLibraryInfo;->isStatic()Z
+Landroid/content/pm/ShortcutInfo;->getIcon()Landroid/graphics/drawable/Icon;
+Landroid/content/pm/ShortcutManager;->mService:Landroid/content/pm/IShortcutService;
+Landroid/content/pm/Signature;->getPublicKey()Ljava/security/PublicKey;
+Landroid/content/pm/UserInfo;-><init>(ILjava/lang/String;I)V
+Landroid/content/pm/UserInfo;-><init>(ILjava/lang/String;Ljava/lang/String;I)V
+Landroid/content/pm/UserInfo;->creationTime:J
+Landroid/content/pm/UserInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/pm/UserInfo;->flags:I
+Landroid/content/pm/UserInfo;->FLAG_PRIMARY:I
+Landroid/content/pm/UserInfo;->getUserHandle()Landroid/os/UserHandle;
+Landroid/content/pm/UserInfo;->guestToRemove:Z
+Landroid/content/pm/UserInfo;->iconPath:Ljava/lang/String;
+Landroid/content/pm/UserInfo;->id:I
+Landroid/content/pm/UserInfo;->isAdmin()Z
+Landroid/content/pm/UserInfo;->isEnabled()Z
+Landroid/content/pm/UserInfo;->isGuest()Z
+Landroid/content/pm/UserInfo;->isManagedProfile()Z
+Landroid/content/pm/UserInfo;->isPrimary()Z
+Landroid/content/pm/UserInfo;->isRestricted()Z
+Landroid/content/pm/UserInfo;->lastLoggedInTime:J
+Landroid/content/pm/UserInfo;->name:Ljava/lang/String;
+Landroid/content/pm/UserInfo;->partial:Z
+Landroid/content/pm/UserInfo;->profileGroupId:I
+Landroid/content/pm/UserInfo;->serialNumber:I
+Landroid/content/pm/VerifierInfo;-><init>(Ljava/lang/String;Ljava/security/PublicKey;)V
+Landroid/content/pm/XmlSerializerAndParser;->createFromXml(Lorg/xmlpull/v1/XmlPullParser;)Ljava/lang/Object;
+Landroid/content/pm/XmlSerializerAndParser;->writeAsXml(Ljava/lang/Object;Lorg/xmlpull/v1/XmlSerializer;)V
+Landroid/content/res/AssetFileDescriptor;->mFd:Landroid/os/ParcelFileDescriptor;
+Landroid/content/res/AssetFileDescriptor;->mLength:J
+Landroid/content/res/AssetFileDescriptor;->mStartOffset:J
+Landroid/content/res/AssetManager$AssetInputStream;->getAssetInt()I
+Landroid/content/res/AssetManager$AssetInputStream;->getNativeAsset()J
+Landroid/content/res/AssetManager;-><init>()V
+Landroid/content/res/AssetManager;->addAssetPath(Ljava/lang/String;)I
+Landroid/content/res/AssetManager;->addAssetPathAsSharedLibrary(Ljava/lang/String;)I
+Landroid/content/res/AssetManager;->addOverlayPath(Ljava/lang/String;)I
+Landroid/content/res/AssetManager;->applyStyle(JIILandroid/content/res/XmlBlock$Parser;[IJJ)V
+Landroid/content/res/AssetManager;->createTheme()J
+Landroid/content/res/AssetManager;->getAssignedPackageIdentifiers()Landroid/util/SparseArray;
+Landroid/content/res/AssetManager;->getGlobalAssetCount()I
+Landroid/content/res/AssetManager;->getGlobalAssetManagerCount()I
+Landroid/content/res/AssetManager;->getResourceBagText(II)Ljava/lang/CharSequence;
+Landroid/content/res/AssetManager;->getResourceEntryName(I)Ljava/lang/String;
+Landroid/content/res/AssetManager;->getResourceIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
+Landroid/content/res/AssetManager;->getResourceName(I)Ljava/lang/String;
+Landroid/content/res/AssetManager;->getResourcePackageName(I)Ljava/lang/String;
+Landroid/content/res/AssetManager;->getResourceText(I)Ljava/lang/CharSequence;
+Landroid/content/res/AssetManager;->getResourceTypeName(I)Ljava/lang/String;
+Landroid/content/res/AssetManager;->getResourceValue(IILandroid/util/TypedValue;Z)Z
+Landroid/content/res/AssetManager;->getSystem()Landroid/content/res/AssetManager;
+Landroid/content/res/AssetManager;->isUpToDate()Z
+Landroid/content/res/AssetManager;->mObject:J
+Landroid/content/res/AssetManager;->openNonAsset(ILjava/lang/String;)Ljava/io/InputStream;
+Landroid/content/res/AssetManager;->openNonAsset(ILjava/lang/String;I)Ljava/io/InputStream;
+Landroid/content/res/AssetManager;->openNonAsset(Ljava/lang/String;)Ljava/io/InputStream;
+Landroid/content/res/AssetManager;->openNonAsset(Ljava/lang/String;I)Ljava/io/InputStream;
+Landroid/content/res/AssetManager;->resolveAttrs(JII[I[I[I[I)Z
+Landroid/content/res/AssetManager;->retrieveAttributes(Landroid/content/res/XmlBlock$Parser;[I[I[I)Z
+Landroid/content/res/AssetManager;->setConfiguration(IILjava/lang/String;IIIIIIIIIIIIIII)V
+Landroid/content/res/AssetManager;->sSystem:Landroid/content/res/AssetManager;
+Landroid/content/res/ColorStateList$ColorStateListFactory;-><init>(Landroid/content/res/ColorStateList;)V
+Landroid/content/res/ColorStateList;->canApplyTheme()Z
+Landroid/content/res/ColorStateList;->getColors()[I
+Landroid/content/res/ColorStateList;->getStates()[[I
+Landroid/content/res/ColorStateList;->mColors:[I
+Landroid/content/res/ColorStateList;->mDefaultColor:I
+Landroid/content/res/ColorStateList;->mFactory:Landroid/content/res/ColorStateList$ColorStateListFactory;
+Landroid/content/res/ColorStateList;->mStateSpecs:[[I
+Landroid/content/res/ColorStateList;->obtainForTheme(Landroid/content/res/Resources$Theme;)Landroid/content/res/ColorStateList;
+Landroid/content/res/ColorStateList;->onColorsChanged()V
+Landroid/content/res/CompatibilityInfo$Translator;->applicationInvertedScale:F
+Landroid/content/res/CompatibilityInfo$Translator;->applicationScale:F
+Landroid/content/res/CompatibilityInfo$Translator;->getTranslatedContentInsets(Landroid/graphics/Rect;)Landroid/graphics/Rect;
+Landroid/content/res/CompatibilityInfo$Translator;->translateCanvas(Landroid/graphics/Canvas;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateEventInScreenToAppWindow(Landroid/view/MotionEvent;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateRectInAppWindowToScreen(Landroid/graphics/Rect;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateRectInScreenToAppWindow(Landroid/graphics/Rect;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateRectInScreenToAppWinFrame(Landroid/graphics/Rect;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateRegionInWindowToScreen(Landroid/graphics/Region;)V
+Landroid/content/res/CompatibilityInfo$Translator;->translateWindowLayout(Landroid/view/WindowManager$LayoutParams;)V
+Landroid/content/res/CompatibilityInfo;-><init>(Landroid/content/pm/ApplicationInfo;IIZ)V
+Landroid/content/res/CompatibilityInfo;->applicationScale:F
+Landroid/content/res/CompatibilityInfo;->computeCompatibleScaling(Landroid/util/DisplayMetrics;Landroid/util/DisplayMetrics;)F
+Landroid/content/res/CompatibilityInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/res/CompatibilityInfo;->DEFAULT_COMPATIBILITY_INFO:Landroid/content/res/CompatibilityInfo;
+Landroid/content/res/CompatibilityInfo;->getTranslator()Landroid/content/res/CompatibilityInfo$Translator;
+Landroid/content/res/CompatibilityInfo;->isScalingRequired()Z
+Landroid/content/res/CompatibilityInfo;->supportsScreen()Z
+Landroid/content/res/Configuration;->generateDelta(Landroid/content/res/Configuration;Landroid/content/res/Configuration;)Landroid/content/res/Configuration;
+Landroid/content/res/Configuration;->makeDefault()V
+Landroid/content/res/Configuration;->resourceQualifierString(Landroid/content/res/Configuration;)Ljava/lang/String;
+Landroid/content/res/Configuration;->seq:I
+Landroid/content/res/Configuration;->userSetLocale:Z
+Landroid/content/res/DrawableCache;-><init>()V
+Landroid/content/res/DrawableCache;->getInstance(JLandroid/content/res/Resources;Landroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
+Landroid/content/res/ObbInfo;->salt:[B
+Landroid/content/res/Resources$Theme;->mThemeImpl:Landroid/content/res/ResourcesImpl$ThemeImpl;
+Landroid/content/res/Resources$Theme;->resolveAttributes([I[I)Landroid/content/res/TypedArray;
+Landroid/content/res/Resources;-><init>(Ljava/lang/ClassLoader;)V
+Landroid/content/res/Resources;->getCompatibilityInfo()Landroid/content/res/CompatibilityInfo;
+Landroid/content/res/Resources;->getDisplayAdjustments()Landroid/view/DisplayAdjustments;
+Landroid/content/res/Resources;->getDrawableInflater()Landroid/graphics/drawable/DrawableInflater;
+Landroid/content/res/Resources;->getFloat(I)F
+Landroid/content/res/Resources;->getImpl()Landroid/content/res/ResourcesImpl;
+Landroid/content/res/Resources;->getPreloadedDrawables()Landroid/util/LongSparseArray;
+Landroid/content/res/Resources;->loadDrawable(Landroid/util/TypedValue;IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
+Landroid/content/res/Resources;->loadXmlResourceParser(ILjava/lang/String;)Landroid/content/res/XmlResourceParser;
+Landroid/content/res/Resources;->loadXmlResourceParser(Ljava/lang/String;IILjava/lang/String;)Landroid/content/res/XmlResourceParser;
+Landroid/content/res/Resources;->mClassLoader:Ljava/lang/ClassLoader;
+Landroid/content/res/Resources;->mDrawableInflater:Landroid/graphics/drawable/DrawableInflater;
+Landroid/content/res/Resources;->mResourcesImpl:Landroid/content/res/ResourcesImpl;
+Landroid/content/res/Resources;->mSystem:Landroid/content/res/Resources;
+Landroid/content/res/Resources;->mTmpValue:Landroid/util/TypedValue;
+Landroid/content/res/Resources;->mTypedArrayPool:Landroid/util/Pools$SynchronizedPool;
+Landroid/content/res/Resources;->selectDefaultTheme(II)I
+Landroid/content/res/Resources;->setCompatibilityInfo(Landroid/content/res/CompatibilityInfo;)V
+Landroid/content/res/Resources;->setImpl(Landroid/content/res/ResourcesImpl;)V
+Landroid/content/res/Resources;->updateSystemConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;Landroid/content/res/CompatibilityInfo;)V
+Landroid/content/res/ResourcesImpl;-><init>(Landroid/content/res/AssetManager;Landroid/util/DisplayMetrics;Landroid/content/res/Configuration;Landroid/view/DisplayAdjustments;)V
+Landroid/content/res/ResourcesImpl;->getAssets()Landroid/content/res/AssetManager;
+Landroid/content/res/ResourcesImpl;->getValue(ILandroid/util/TypedValue;Z)V
+Landroid/content/res/ResourcesImpl;->mAccessLock:Ljava/lang/Object;
+Landroid/content/res/ResourcesImpl;->mAnimatorCache:Landroid/content/res/ConfigurationBoundResourceCache;
+Landroid/content/res/ResourcesImpl;->mAssets:Landroid/content/res/AssetManager;
+Landroid/content/res/ResourcesImpl;->mColorDrawableCache:Landroid/content/res/DrawableCache;
+Landroid/content/res/ResourcesImpl;->mConfiguration:Landroid/content/res/Configuration;
+Landroid/content/res/ResourcesImpl;->mDrawableCache:Landroid/content/res/DrawableCache;
+Landroid/content/res/ResourcesImpl;->mPreloading:Z
+Landroid/content/res/ResourcesImpl;->mStateListAnimatorCache:Landroid/content/res/ConfigurationBoundResourceCache;
+Landroid/content/res/ResourcesImpl;->sPreloadedColorDrawables:Landroid/util/LongSparseArray;
+Landroid/content/res/ResourcesImpl;->sPreloadedComplexColors:Landroid/util/LongSparseArray;
+Landroid/content/res/ResourcesImpl;->sPreloadedDrawables:[Landroid/util/LongSparseArray;
+Landroid/content/res/ResourcesImpl;->TRACE_FOR_MISS_PRELOAD:Z
+Landroid/content/res/ResourcesImpl;->TRACE_FOR_PRELOAD:Z
+Landroid/content/res/ResourcesKey;-><init>(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ILandroid/content/res/Configuration;Landroid/content/res/CompatibilityInfo;)V
+Landroid/content/res/ResourcesKey;->mResDir:Ljava/lang/String;
+Landroid/content/res/ResourcesKey;->mSplitResDirs:[Ljava/lang/String;
+Landroid/content/res/StringBlock;-><init>(JZ)V
+Landroid/content/res/StringBlock;->get(I)Ljava/lang/CharSequence;
+Landroid/content/res/ThemedResourceCache;->onConfigurationChange(I)V
+Landroid/content/res/TypedArray;->extractThemeAttrs()[I
+Landroid/content/res/TypedArray;->extractThemeAttrs([I)[I
+Landroid/content/res/TypedArray;->getNonConfigurationString(II)Ljava/lang/String;
+Landroid/content/res/TypedArray;->getValueAt(ILandroid/util/TypedValue;)Z
+Landroid/content/res/TypedArray;->mAssets:Landroid/content/res/AssetManager;
+Landroid/content/res/TypedArray;->mData:[I
+Landroid/content/res/TypedArray;->mIndices:[I
+Landroid/content/res/TypedArray;->mLength:I
+Landroid/content/res/TypedArray;->mMetrics:Landroid/util/DisplayMetrics;
+Landroid/content/res/TypedArray;->mRecycled:Z
+Landroid/content/res/TypedArray;->mResources:Landroid/content/res/Resources;
+Landroid/content/res/TypedArray;->mTheme:Landroid/content/res/Resources$Theme;
+Landroid/content/res/TypedArray;->mValue:Landroid/util/TypedValue;
+Landroid/content/res/TypedArray;->mXml:Landroid/content/res/XmlBlock$Parser;
+Landroid/content/res/XmlBlock$Parser;->mBlock:Landroid/content/res/XmlBlock;
+Landroid/content/res/XmlBlock$Parser;->mParseState:J
+Landroid/content/res/XmlBlock;-><init>([B)V
+Landroid/content/res/XmlBlock;->newParser()Landroid/content/res/XmlResourceParser;
+Landroid/content/RestrictionsManager;->mService:Landroid/content/IRestrictionsManager;
+Landroid/content/SearchRecentSuggestionsProvider;->mSuggestionProjection:[Ljava/lang/String;
+Landroid/content/SyncAdaptersCache;-><init>(Landroid/content/Context;)V
+Landroid/content/SyncAdapterType;-><init>(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/content/SyncAdapterType;->allowParallelSyncs:Z
+Landroid/content/SyncAdapterType;->isAlwaysSyncable:Z
+Landroid/content/SyncAdapterType;->settingsActivity:Ljava/lang/String;
+Landroid/content/SyncAdapterType;->supportsUploading:Z
+Landroid/content/SyncAdapterType;->userVisible:Z
+Landroid/content/SyncContext;-><init>(Landroid/content/ISyncContext;)V
+Landroid/content/SyncContext;->setStatusText(Ljava/lang/String;)V
+Landroid/content/SyncInfo;-><init>(ILandroid/accounts/Account;Ljava/lang/String;J)V
+Landroid/content/SyncInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/content/SyncInfo;->authorityId:I
+Landroid/content/SyncInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/SyncRequest;->mAccountToSync:Landroid/accounts/Account;
+Landroid/content/SyncRequest;->mAuthority:Ljava/lang/String;
+Landroid/content/SyncRequest;->mExtras:Landroid/os/Bundle;
+Landroid/content/SyncRequest;->mIsPeriodic:Z
+Landroid/content/SyncRequest;->mSyncRunTimeSecs:J
+Landroid/content/SyncStatusInfo;-><init>(I)V
+Landroid/content/SyncStatusInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/content/SyncStatusInfo;->authorityId:I
+Landroid/content/SyncStatusInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/content/SyncStatusInfo;->ensurePeriodicSyncTimeSize(I)V
+Landroid/content/SyncStatusInfo;->getLastFailureMesgAsInt(I)I
+Landroid/content/SyncStatusInfo;->getPeriodicSyncTime(I)J
+Landroid/content/SyncStatusInfo;->initialFailureTime:J
+Landroid/content/SyncStatusInfo;->initialize:Z
+Landroid/content/SyncStatusInfo;->lastFailureMesg:Ljava/lang/String;
+Landroid/content/SyncStatusInfo;->lastFailureSource:I
+Landroid/content/SyncStatusInfo;->lastFailureTime:J
+Landroid/content/SyncStatusInfo;->lastSuccessSource:I
+Landroid/content/SyncStatusInfo;->lastSuccessTime:J
+Landroid/content/SyncStatusInfo;->pending:Z
+Landroid/content/SyncStatusInfo;->periodicSyncTimes:Ljava/util/ArrayList;
+Landroid/content/SyncStatusInfo;->removePeriodicSyncTime(I)V
+Landroid/content/SyncStatusInfo;->setPeriodicSyncTime(IJ)V
+Landroid/content/UndoManager;-><init>()V
+Landroid/content/UndoManager;->addOperation(Landroid/content/UndoOperation;I)V
+Landroid/content/UndoManager;->beginUpdate(Ljava/lang/CharSequence;)V
+Landroid/content/UndoManager;->commitState(Landroid/content/UndoOwner;)I
+Landroid/content/UndoManager;->countRedos([Landroid/content/UndoOwner;)I
+Landroid/content/UndoManager;->countUndos([Landroid/content/UndoOwner;)I
+Landroid/content/UndoManager;->endUpdate()V
+Landroid/content/UndoManager;->forgetRedos([Landroid/content/UndoOwner;I)I
+Landroid/content/UndoManager;->forgetUndos([Landroid/content/UndoOwner;I)I
+Landroid/content/UndoManager;->getLastOperation(Ljava/lang/Class;Landroid/content/UndoOwner;I)Landroid/content/UndoOperation;
+Landroid/content/UndoManager;->getOwner(Ljava/lang/String;Ljava/lang/Object;)Landroid/content/UndoOwner;
+Landroid/content/UndoManager;->isInUndo()Z
+Landroid/content/UndoManager;->redo([Landroid/content/UndoOwner;I)I
+Landroid/content/UndoManager;->restoreInstanceState(Landroid/os/Parcel;Ljava/lang/ClassLoader;)V
+Landroid/content/UndoManager;->saveInstanceState(Landroid/os/Parcel;)V
+Landroid/content/UndoManager;->setUndoLabel(Ljava/lang/CharSequence;)V
+Landroid/content/UndoManager;->undo([Landroid/content/UndoOwner;I)I
+Landroid/content/UndoOperation;-><init>(Landroid/content/UndoOwner;)V
+Landroid/content/UndoOperation;-><init>(Landroid/os/Parcel;Ljava/lang/ClassLoader;)V
+Landroid/content/UriMatcher;->mChildren:Ljava/util/ArrayList;
+Landroid/content/UriMatcher;->mText:Ljava/lang/String;
+Landroid/database/AbstractCursor;->mCurrentRowID:Ljava/lang/Long;
+Landroid/database/AbstractCursor;->mExtras:Landroid/os/Bundle;
+Landroid/database/AbstractCursor;->mNotifyUri:Landroid/net/Uri;
+Landroid/database/AbstractCursor;->mRowIdColumnIndex:I
+Landroid/database/AbstractCursor;->mUpdatedRows:Ljava/util/HashMap;
+Landroid/database/AbstractWindowedCursor;->clearOrCreateWindow(Ljava/lang/String;)V
+Landroid/database/AbstractWindowedCursor;->closeWindow()V
+Landroid/database/AbstractWindowedCursor;->onDeactivateOrClose()V
+Landroid/database/ContentObserver;->releaseContentObserver()Landroid/database/IContentObserver;
+Landroid/database/CursorWindow;->mWindowPtr:J
+Landroid/database/CursorWindow;->printStats()Ljava/lang/String;
+Landroid/database/CursorWindow;->sCursorWindowSize:I
+Landroid/database/CursorWindow;->sWindowToPidMap:Landroid/util/LongSparseArray;
+Landroid/database/CursorWrapper;->mCursor:Landroid/database/Cursor;
+Landroid/database/DatabaseUtils;->cursorPickFillWindowStartPosition(II)I
+Landroid/database/DatabaseUtils;->getTypeOfObject(Ljava/lang/Object;)I
+Landroid/database/IContentObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/database/IContentObserver;
+Landroid/database/IContentObserver;->onChange(ZLandroid/net/Uri;I)V
+Landroid/database/MatrixCursor;->data:[Ljava/lang/Object;
+Landroid/database/MatrixCursor;->get(I)Ljava/lang/Object;
+Landroid/database/MatrixCursor;->rowCount:I
+Landroid/database/sqlite/DatabaseObjectNotClosedException;-><init>()V
+Landroid/database/sqlite/SQLiteClosable;->mReferenceCount:I
+Landroid/database/sqlite/SQLiteCursor;->fillWindow(I)V
+Landroid/database/sqlite/SQLiteCursor;->mEditTable:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteCursor;->mQuery:Landroid/database/sqlite/SQLiteQuery;
+Landroid/database/sqlite/SQLiteCustomFunction;->dispatchCallback([Ljava/lang/String;)V
+Landroid/database/sqlite/SQLiteCustomFunction;->name:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteCustomFunction;->numArgs:I
+Landroid/database/sqlite/SQLiteDatabase;->beginTransaction(Landroid/database/sqlite/SQLiteTransactionListener;Z)V
+Landroid/database/sqlite/SQLiteDatabase;->collectDbStats(Ljava/util/ArrayList;)V
+Landroid/database/sqlite/SQLiteDatabase;->CONFLICT_VALUES:[Ljava/lang/String;
+Landroid/database/sqlite/SQLiteDatabase;->getActiveDatabases()Ljava/util/ArrayList;
+Landroid/database/sqlite/SQLiteDatabase;->getThreadSession()Landroid/database/sqlite/SQLiteSession;
+Landroid/database/sqlite/SQLiteDatabase;->mConfigurationLocked:Landroid/database/sqlite/SQLiteDatabaseConfiguration;
+Landroid/database/sqlite/SQLiteDatabase;->mConnectionPoolLocked:Landroid/database/sqlite/SQLiteConnectionPool;
+Landroid/database/sqlite/SQLiteDatabase;->mThreadSession:Ljava/lang/ThreadLocal;
+Landroid/database/sqlite/SQLiteDatabase;->openDatabase(Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$OpenParams;)Landroid/database/sqlite/SQLiteDatabase;
+Landroid/database/sqlite/SQLiteDatabase;->reopenReadWrite()V
+Landroid/database/sqlite/SQLiteDatabaseConfiguration;->maxSqlCacheSize:I
+Landroid/database/sqlite/SQLiteDebug$PagerStats;->largestMemAlloc:I
+Landroid/database/sqlite/SQLiteDebug$PagerStats;->memoryUsed:I
+Landroid/database/sqlite/SQLiteDebug$PagerStats;->pageCacheOverflow:I
+Landroid/database/sqlite/SQLiteOpenHelper;->mName:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteProgram;->mBindArgs:[Ljava/lang/Object;
+Landroid/database/sqlite/SQLiteProgram;->mSql:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteQueryBuilder;->computeProjection([Ljava/lang/String;)[Ljava/lang/String;
+Landroid/database/sqlite/SQLiteQueryBuilder;->mDistinct:Z
+Landroid/database/sqlite/SQLiteQueryBuilder;->mTables:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteQueryBuilder;->mWhereClause:Ljava/lang/StringBuilder;
+Landroid/database/sqlite/SQLiteSession;->beginTransaction(ILandroid/database/sqlite/SQLiteTransactionListener;ILandroid/os/CancellationSignal;)V
+Landroid/database/sqlite/SQLiteStatement;-><init>(Landroid/database/sqlite/SQLiteDatabase;Ljava/lang/String;[Ljava/lang/Object;)V
+Landroid/database/sqlite/SqliteWrapper;->checkSQLiteException(Landroid/content/Context;Landroid/database/sqlite/SQLiteException;)V
+Landroid/database/sqlite/SqliteWrapper;->delete(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
+Landroid/database/sqlite/SqliteWrapper;->insert(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
+Landroid/database/sqlite/SqliteWrapper;->query(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
+Landroid/database/sqlite/SqliteWrapper;->update(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
+Landroid/ddm/DdmHandleAppName;->getAppName()Ljava/lang/String;
+Landroid/ddm/DdmHandleAppName;->setAppName(Ljava/lang/String;I)V
+Landroid/filterfw/core/Filter;-><init>(Ljava/lang/String;)V
+Landroid/filterfw/core/Filter;->isAvailable(Ljava/lang/String;)Z
+Landroid/filterfw/core/Filter;->setInputValue(Ljava/lang/String;Ljava/lang/Object;)V
+Landroid/filterfw/core/FilterContext;->getFrameManager()Landroid/filterfw/core/FrameManager;
+Landroid/filterfw/core/FilterContext;->getGLEnvironment()Landroid/filterfw/core/GLEnvironment;
+Landroid/filterfw/core/FilterGraph;->getFilter(Ljava/lang/String;)Landroid/filterfw/core/Filter;
+Landroid/filterfw/core/FilterGraph;->tearDown(Landroid/filterfw/core/FilterContext;)V
+Landroid/filterfw/core/Frame;->getBitmap()Landroid/graphics/Bitmap;
+Landroid/filterfw/core/Frame;->getFormat()Landroid/filterfw/core/FrameFormat;
+Landroid/filterfw/core/Frame;->getTimestamp()J
+Landroid/filterfw/core/Frame;->release()Landroid/filterfw/core/Frame;
+Landroid/filterfw/core/Frame;->setInts([I)V
+Landroid/filterfw/core/Frame;->setTimestamp(J)V
+Landroid/filterfw/core/FrameFormat;->getHeight()I
+Landroid/filterfw/core/FrameFormat;->getTarget()I
+Landroid/filterfw/core/FrameFormat;->getWidth()I
+Landroid/filterfw/core/FrameFormat;->mutableCopy()Landroid/filterfw/core/MutableFrameFormat;
+Landroid/filterfw/core/FrameManager;->duplicateFrame(Landroid/filterfw/core/Frame;)Landroid/filterfw/core/Frame;
+Landroid/filterfw/core/FrameManager;->newBoundFrame(Landroid/filterfw/core/FrameFormat;IJ)Landroid/filterfw/core/Frame;
+Landroid/filterfw/core/FrameManager;->newFrame(Landroid/filterfw/core/FrameFormat;)Landroid/filterfw/core/Frame;
+Landroid/filterfw/core/GLEnvironment;->activate()V
+Landroid/filterfw/core/GLEnvironment;->activateSurfaceWithId(I)V
+Landroid/filterfw/core/GLEnvironment;->deactivate()V
+Landroid/filterfw/core/GLEnvironment;->isActive()Z
+Landroid/filterfw/core/GLEnvironment;->registerSurfaceFromMediaRecorder(Landroid/media/MediaRecorder;)I
+Landroid/filterfw/core/GLEnvironment;->setSurfaceTimestamp(J)V
+Landroid/filterfw/core/GLEnvironment;->swapBuffers()V
+Landroid/filterfw/core/GLEnvironment;->unregisterSurfaceId(I)V
+Landroid/filterfw/core/GLFrame;->generateMipMap()V
+Landroid/filterfw/core/GLFrame;->getTextureId()I
+Landroid/filterfw/core/GLFrame;->setBitmap(Landroid/graphics/Bitmap;)V
+Landroid/filterfw/core/GLFrame;->setTextureParameter(II)V
+Landroid/filterfw/core/GraphRunner;->getError()Ljava/lang/Exception;
+Landroid/filterfw/core/GraphRunner;->getGraph()Landroid/filterfw/core/FilterGraph;
+Landroid/filterfw/core/GraphRunner;->run()V
+Landroid/filterfw/core/GraphRunner;->setDoneCallback(Landroid/filterfw/core/GraphRunner$OnRunnerDoneListener;)V
+Landroid/filterfw/core/GraphRunner;->stop()V
+Landroid/filterfw/core/MutableFrameFormat;-><init>(II)V
+Landroid/filterfw/core/MutableFrameFormat;->setBytesPerSample(I)V
+Landroid/filterfw/core/MutableFrameFormat;->setDimensions(II)V
+Landroid/filterfw/core/Program;->process(Landroid/filterfw/core/Frame;Landroid/filterfw/core/Frame;)V
+Landroid/filterfw/core/Program;->process([Landroid/filterfw/core/Frame;Landroid/filterfw/core/Frame;)V
+Landroid/filterfw/core/Program;->setHostValue(Ljava/lang/String;Ljava/lang/Object;)V
+Landroid/filterfw/core/ShaderProgram;-><init>(Landroid/filterfw/core/FilterContext;Ljava/lang/String;)V
+Landroid/filterfw/core/ShaderProgram;->createIdentity(Landroid/filterfw/core/FilterContext;)Landroid/filterfw/core/ShaderProgram;
+Landroid/filterfw/core/ShaderProgram;->process([Landroid/filterfw/core/Frame;Landroid/filterfw/core/Frame;)V
+Landroid/filterfw/core/ShaderProgram;->setHostValue(Ljava/lang/String;Ljava/lang/Object;)V
+Landroid/filterfw/core/ShaderProgram;->setMaximumTileSize(I)V
+Landroid/filterfw/core/ShaderProgram;->setSourceRect(FFFF)V
+Landroid/filterfw/core/ShaderProgram;->setSourceRegion(Landroid/filterfw/geometry/Quad;)V
+Landroid/filterfw/format/ImageFormat;->create(I)Landroid/filterfw/core/MutableFrameFormat;
+Landroid/filterfw/format/ImageFormat;->create(II)Landroid/filterfw/core/MutableFrameFormat;
+Landroid/filterfw/format/ImageFormat;->create(IIII)Landroid/filterfw/core/MutableFrameFormat;
+Landroid/filterfw/geometry/Point;-><init>()V
+Landroid/filterfw/geometry/Point;-><init>(FF)V
+Landroid/filterfw/geometry/Point;->x:F
+Landroid/filterfw/geometry/Point;->y:F
+Landroid/filterfw/geometry/Quad;-><init>()V
+Landroid/filterfw/geometry/Quad;-><init>(Landroid/filterfw/geometry/Point;Landroid/filterfw/geometry/Point;Landroid/filterfw/geometry/Point;Landroid/filterfw/geometry/Point;)V
+Landroid/filterfw/geometry/Quad;->p0:Landroid/filterfw/geometry/Point;
+Landroid/filterfw/geometry/Quad;->p1:Landroid/filterfw/geometry/Point;
+Landroid/filterfw/geometry/Quad;->p2:Landroid/filterfw/geometry/Point;
+Landroid/filterfw/geometry/Quad;->p3:Landroid/filterfw/geometry/Point;
+Landroid/filterfw/GraphEnvironment;-><init>()V
+Landroid/filterfw/GraphEnvironment;->getRunner(II)Landroid/filterfw/core/GraphRunner;
+Landroid/filterfw/GraphEnvironment;->loadGraph(Landroid/content/Context;I)I
+Landroid/graphics/AvoidXfermode$Mode;
+Landroid/graphics/AvoidXfermode$Mode;->AVOID:Landroid/graphics/AvoidXfermode$Mode;
+Landroid/graphics/AvoidXfermode$Mode;->TARGET:Landroid/graphics/AvoidXfermode$Mode;
+Landroid/graphics/AvoidXfermode$Mode;->valueOf(Ljava/lang/String;)Landroid/graphics/AvoidXfermode$Mode;
+Landroid/graphics/AvoidXfermode$Mode;->values()[Landroid/graphics/AvoidXfermode$Mode;
+Landroid/graphics/AvoidXfermode;
+Landroid/graphics/AvoidXfermode;-><init>(IILandroid/graphics/AvoidXfermode$Mode;)V
+Landroid/graphics/BaseCanvas;->mNativeCanvasWrapper:J
+Landroid/graphics/Bitmap$Config;->nativeInt:I
+Landroid/graphics/Bitmap$Config;->nativeToConfig(I)Landroid/graphics/Bitmap$Config;
+Landroid/graphics/Bitmap;-><init>(JIIIZZ[BLandroid/graphics/NinePatch$InsetStruct;)V
+Landroid/graphics/Bitmap;->createAshmemBitmap()Landroid/graphics/Bitmap;
+Landroid/graphics/Bitmap;->createAshmemBitmap(Landroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
+Landroid/graphics/Bitmap;->createGraphicBufferHandle()Landroid/graphics/GraphicBuffer;
+Landroid/graphics/Bitmap;->createHardwareBitmap(Landroid/graphics/GraphicBuffer;)Landroid/graphics/Bitmap;
+Landroid/graphics/Bitmap;->getDefaultDensity()I
+Landroid/graphics/Bitmap;->mHeight:I
+Landroid/graphics/Bitmap;->mIsMutable:Z
+Landroid/graphics/Bitmap;->mNativePtr:J
+Landroid/graphics/Bitmap;->mNinePatchChunk:[B
+Landroid/graphics/Bitmap;->mNinePatchInsets:Landroid/graphics/NinePatch$InsetStruct;
+Landroid/graphics/Bitmap;->mWidth:I
+Landroid/graphics/Bitmap;->nativeReconfigure(JIIIZ)V
+Landroid/graphics/Bitmap;->reinit(IIZ)V
+Landroid/graphics/Bitmap;->scaleFromDensity(III)I
+Landroid/graphics/Bitmap;->setDefaultDensity(I)V
+Landroid/graphics/Bitmap;->setNinePatchChunk([B)V
+Landroid/graphics/BitmapFactory;->nativeDecodeAsset(JLandroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapFactory;->nativeDecodeByteArray([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapFactory;->nativeDecodeFileDescriptor(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapFactory;->nativeDecodeStream(Ljava/io/InputStream;[BLandroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapRegionDecoder;-><init>(J)V
+Landroid/graphics/BitmapRegionDecoder;->nativeNewInstance([BIIZ)Landroid/graphics/BitmapRegionDecoder;
+Landroid/graphics/BitmapShader;->mBitmap:Landroid/graphics/Bitmap;
+Landroid/graphics/BitmapShader;->mTileX:I
+Landroid/graphics/BitmapShader;->mTileY:I
+Landroid/graphics/Camera;->native_instance:J
+Landroid/graphics/Canvas;-><init>(J)V
+Landroid/graphics/Canvas;->clipRegion(Landroid/graphics/Region;)Z
+Landroid/graphics/Canvas;->clipRegion(Landroid/graphics/Region;Landroid/graphics/Region$Op;)Z
+Landroid/graphics/Canvas;->CLIP_SAVE_FLAG:I
+Landroid/graphics/Canvas;->CLIP_TO_LAYER_SAVE_FLAG:I
+Landroid/graphics/Canvas;->freeCaches()V
+Landroid/graphics/Canvas;->freeTextLayoutCaches()V
+Landroid/graphics/Canvas;->FULL_COLOR_LAYER_SAVE_FLAG:I
+Landroid/graphics/Canvas;->getGL()Ljavax/microedition/khronos/opengles/GL;
+Landroid/graphics/Canvas;->getNativeCanvasWrapper()J
+Landroid/graphics/Canvas;->HAS_ALPHA_LAYER_SAVE_FLAG:I
+Landroid/graphics/Canvas;->MATRIX_SAVE_FLAG:I
+Landroid/graphics/Canvas;->mBitmap:Landroid/graphics/Bitmap;
+Landroid/graphics/Canvas;->release()V
+Landroid/graphics/Canvas;->save(I)I
+Landroid/graphics/Canvas;->setScreenDensity(I)V
+Landroid/graphics/CanvasProperty;->createFloat(F)Landroid/graphics/CanvasProperty;
+Landroid/graphics/CanvasProperty;->createPaint(Landroid/graphics/Paint;)Landroid/graphics/CanvasProperty;
+Landroid/graphics/ColorMatrixColorFilter;->mMatrix:Landroid/graphics/ColorMatrix;
+Landroid/graphics/ColorMatrixColorFilter;->setColorMatrix(Landroid/graphics/ColorMatrix;)V
+Landroid/graphics/drawable/AnimatedImageDrawable;->getLoopCount(I)I
+Landroid/graphics/drawable/AnimatedImageDrawable;->LOOP_INFINITE:I
+Landroid/graphics/drawable/AnimatedImageDrawable;->onAnimationEnd()V
+Landroid/graphics/drawable/AnimatedImageDrawable;->setLoopCount(I)V
+Landroid/graphics/drawable/AnimatedRotateDrawable;->setFramesCount(I)V
+Landroid/graphics/drawable/AnimatedRotateDrawable;->setFramesDuration(I)V
+Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;->mStateIds:Landroid/util/SparseIntArray;
+Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;->mTransitions:Landroid/util/LongSparseLongArray;
+Landroid/graphics/drawable/AnimatedStateListDrawable;->mState:Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;
+Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;->callOnFinished(Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;I)V
+Landroid/graphics/drawable/AnimatedVectorDrawable;->forceAnimationOnUI()V
+Landroid/graphics/drawable/AnimatedVectorDrawable;->getOpticalInsets()Landroid/graphics/Insets;
+Landroid/graphics/drawable/AnimatedVectorDrawable;->mAnimatedVectorState:Landroid/graphics/drawable/AnimatedVectorDrawable$AnimatedVectorDrawableState;
+Landroid/graphics/drawable/AnimatedVectorDrawable;->mAnimatorSet:Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimator;
+Landroid/graphics/drawable/AnimationDrawable;->mCurFrame:I
+Landroid/graphics/drawable/BitmapDrawable;->getOpticalInsets()Landroid/graphics/Insets;
+Landroid/graphics/drawable/BitmapDrawable;->getTint()Landroid/content/res/ColorStateList;
+Landroid/graphics/drawable/BitmapDrawable;->getTintMode()Landroid/graphics/PorterDuff$Mode;
+Landroid/graphics/drawable/BitmapDrawable;->mBitmapState:Landroid/graphics/drawable/BitmapDrawable$BitmapState;
+Landroid/graphics/drawable/BitmapDrawable;->mTargetDensity:I
+Landroid/graphics/drawable/BitmapDrawable;->setBitmap(Landroid/graphics/Bitmap;)V
+Landroid/graphics/drawable/ClipDrawable;->mState:Landroid/graphics/drawable/ClipDrawable$ClipState;
+Landroid/graphics/drawable/ColorDrawable$ColorState;->mUseColor:I
+Landroid/graphics/drawable/ColorDrawable;->mPaint:Landroid/graphics/Paint;
+Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets;
+Landroid/graphics/drawable/Drawable;->inflateWithAttributes(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/content/res/TypedArray;I)V
+Landroid/graphics/drawable/Drawable;->isProjected()Z
+Landroid/graphics/drawable/Drawable;->mCallback:Ljava/lang/ref/WeakReference;
+Landroid/graphics/drawable/Drawable;->mSrcDensityOverride:I
+Landroid/graphics/drawable/Drawable;->parseTintMode(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuff$Mode;
+Landroid/graphics/drawable/Drawable;->updateTintFilter(Landroid/graphics/PorterDuffColorFilter;Landroid/content/res/ColorStateList;Landroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter;
+Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;-><init>(Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;Landroid/graphics/drawable/DrawableContainer;Landroid/content/res/Resources;)V
+Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;->mConstantPadding:Landroid/graphics/Rect;
+Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;->mDrawables:[Landroid/graphics/drawable/Drawable;
+Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;->mHasColorFilter:Z
+Landroid/graphics/drawable/DrawableContainer;->getOpticalInsets()Landroid/graphics/Insets;
+Landroid/graphics/drawable/DrawableContainer;->mDrawableContainerState:Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;
+Landroid/graphics/drawable/DrawableContainer;->mLastDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/graphics/drawable/DrawableInflater;->mClassLoader:Ljava/lang/ClassLoader;
+Landroid/graphics/drawable/DrawableWrapper;->getOpticalInsets()Landroid/graphics/Insets;
+Landroid/graphics/drawable/DrawableWrapper;->mState:Landroid/graphics/drawable/DrawableWrapper$DrawableWrapperState;
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mAngle:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mGradient:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mGradientColors:[I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mHeight:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mInnerRadius:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mInnerRadiusRatio:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mOrientation:Landroid/graphics/drawable/GradientDrawable$Orientation;
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mPadding:Landroid/graphics/Rect;
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mPositions:[F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mRadius:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mRadiusArray:[F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mShape:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mSolidColors:Landroid/content/res/ColorStateList;
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeDashGap:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeDashWidth:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeWidth:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mThickness:I
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mThicknessRatio:F
+Landroid/graphics/drawable/GradientDrawable$GradientState;->mWidth:I
+Landroid/graphics/drawable/GradientDrawable;->getOpticalInsets()Landroid/graphics/Insets;
+Landroid/graphics/drawable/GradientDrawable;->mFillPaint:Landroid/graphics/Paint;
+Landroid/graphics/drawable/GradientDrawable;->mGradientState:Landroid/graphics/drawable/GradientDrawable$GradientState;
+Landroid/graphics/drawable/GradientDrawable;->mPadding:Landroid/graphics/Rect;
+Landroid/graphics/drawable/GradientDrawable;->mStrokePaint:Landroid/graphics/Paint;
+Landroid/graphics/drawable/Icon;->createWithResource(Landroid/content/res/Resources;I)Landroid/graphics/drawable/Icon;
+Landroid/graphics/drawable/Icon;->getBitmap()Landroid/graphics/Bitmap;
+Landroid/graphics/drawable/Icon;->getDataBytes()[B
+Landroid/graphics/drawable/Icon;->getDataLength()I
+Landroid/graphics/drawable/Icon;->getDataOffset()I
+Landroid/graphics/drawable/Icon;->getResources()Landroid/content/res/Resources;
+Landroid/graphics/drawable/Icon;->hasTint()Z
+Landroid/graphics/drawable/Icon;->mString1:Ljava/lang/String;
+Landroid/graphics/drawable/Icon;->mType:I
+Landroid/graphics/drawable/InsetDrawable;->getOpticalInsets()Landroid/graphics/Insets;
+Landroid/graphics/drawable/InsetDrawable;->mState:Landroid/graphics/drawable/InsetDrawable$InsetState;
+Landroid/graphics/drawable/LayerDrawable$ChildDrawable;->mDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/graphics/drawable/LayerDrawable$LayerState;->mChildren:[Landroid/graphics/drawable/LayerDrawable$ChildDrawable;
+Landroid/graphics/drawable/LayerDrawable;->addLayer(Landroid/graphics/drawable/LayerDrawable$ChildDrawable;)I
+Landroid/graphics/drawable/LayerDrawable;->ensurePadding()V
+Landroid/graphics/drawable/LayerDrawable;->mLayerState:Landroid/graphics/drawable/LayerDrawable$LayerState;
+Landroid/graphics/drawable/NinePatchDrawable$NinePatchState;->mNinePatch:Landroid/graphics/NinePatch;
+Landroid/graphics/drawable/NinePatchDrawable;->getOpticalInsets()Landroid/graphics/Insets;
+Landroid/graphics/drawable/NinePatchDrawable;->mNinePatchState:Landroid/graphics/drawable/NinePatchDrawable$NinePatchState;
+Landroid/graphics/drawable/RippleDrawable$RippleState;->mColor:Landroid/content/res/ColorStateList;
+Landroid/graphics/drawable/RippleDrawable;->getRipplePaint()Landroid/graphics/Paint;
+Landroid/graphics/drawable/RippleDrawable;->mDensity:I
+Landroid/graphics/drawable/RippleDrawable;->mState:Landroid/graphics/drawable/RippleDrawable$RippleState;
+Landroid/graphics/drawable/RippleDrawable;->setForceSoftware(Z)V
+Landroid/graphics/drawable/RotateDrawable;->mState:Landroid/graphics/drawable/RotateDrawable$RotateState;
+Landroid/graphics/drawable/ScaleDrawable;->mState:Landroid/graphics/drawable/ScaleDrawable$ScaleState;
+Landroid/graphics/drawable/StateListDrawable$StateListState;->addStateSet([ILandroid/graphics/drawable/Drawable;)I
+Landroid/graphics/drawable/StateListDrawable;->extractStateSet(Landroid/util/AttributeSet;)[I
+Landroid/graphics/drawable/StateListDrawable;->getStateCount()I
+Landroid/graphics/drawable/StateListDrawable;->getStateDrawable(I)Landroid/graphics/drawable/Drawable;
+Landroid/graphics/drawable/StateListDrawable;->getStateDrawableIndex([I)I
+Landroid/graphics/drawable/StateListDrawable;->getStateSet(I)[I
+Landroid/graphics/drawable/StateListDrawable;->mStateListState:Landroid/graphics/drawable/StateListDrawable$StateListState;
+Landroid/graphics/drawable/StateListDrawable;->updateStateFromTypedArray(Landroid/content/res/TypedArray;)V
+Landroid/graphics/drawable/TransitionDrawable;->mAlpha:I
+Landroid/graphics/drawable/TransitionDrawable;->mCrossFade:Z
+Landroid/graphics/drawable/TransitionDrawable;->mTo:I
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setPivotX(F)V
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setPivotY(F)V
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setRotation(F)V
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setTranslateX(F)V
+Landroid/graphics/drawable/VectorDrawable$VGroup;->setTranslateY(F)V
+Landroid/graphics/drawable/VectorDrawable;->getOpticalInsets()Landroid/graphics/Insets;
+Landroid/graphics/drawable/VectorDrawable;->getTargetByName(Ljava/lang/String;)Ljava/lang/Object;
+Landroid/graphics/drawable/VectorDrawable;->mTintFilter:Landroid/graphics/PorterDuffColorFilter;
+Landroid/graphics/drawable/VectorDrawable;->setAllowCaching(Z)V
+Landroid/graphics/FontFamily;-><init>()V
+Landroid/graphics/FontFamily;-><init>([Ljava/lang/String;I)V
+Landroid/graphics/FontFamily;->abortCreation()V
+Landroid/graphics/FontFamily;->addFontFromAssetManager(Landroid/content/res/AssetManager;Ljava/lang/String;IZIII[Landroid/graphics/fonts/FontVariationAxis;)Z
+Landroid/graphics/FontFamily;->addFontFromBuffer(Ljava/nio/ByteBuffer;I[Landroid/graphics/fonts/FontVariationAxis;II)Z
+Landroid/graphics/FontFamily;->freeze()Z
+Landroid/graphics/fonts/FontVariationAxis;->mStyleValue:F
+Landroid/graphics/fonts/FontVariationAxis;->mTag:I
+Landroid/graphics/GraphicBuffer;-><init>(IIIIJ)V
+Landroid/graphics/GraphicBuffer;->createFromExisting(IIIIJ)Landroid/graphics/GraphicBuffer;
+Landroid/graphics/GraphicBuffer;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/graphics/GraphicBuffer;->mNativeObject:J
+Landroid/graphics/ImageDecoder$IncompleteException;
+Landroid/graphics/ImageDecoder$IncompleteException;-><init>()V
+Landroid/graphics/ImageDecoder;->ERROR_SOURCE_ERROR:I
+Landroid/graphics/ImageDecoder;->ERROR_SOURCE_EXCEPTION:I
+Landroid/graphics/ImageDecoder;->ERROR_SOURCE_INCOMPLETE:I
+Landroid/graphics/ImageDecoder;->getAsAlphaMask()Z
+Landroid/graphics/ImageDecoder;->getConserveMemory()Z
+Landroid/graphics/ImageDecoder;->getDecodeAsAlphaMask()Z
+Landroid/graphics/ImageDecoder;->getMutable()Z
+Landroid/graphics/ImageDecoder;->getRequireUnpremultiplied()Z
+Landroid/graphics/ImageDecoder;->postProcessAndRelease(Landroid/graphics/Canvas;)I
+Landroid/graphics/ImageDecoder;->setAsAlphaMask(Z)Landroid/graphics/ImageDecoder;
+Landroid/graphics/ImageDecoder;->setConserveMemory(Z)V
+Landroid/graphics/ImageDecoder;->setDecodeAsAlphaMask(Z)Landroid/graphics/ImageDecoder;
+Landroid/graphics/ImageDecoder;->setMutable(Z)Landroid/graphics/ImageDecoder;
+Landroid/graphics/ImageDecoder;->setRequireUnpremultiplied(Z)Landroid/graphics/ImageDecoder;
+Landroid/graphics/ImageDecoder;->setResize(I)Landroid/graphics/ImageDecoder;
+Landroid/graphics/ImageDecoder;->setResize(II)Landroid/graphics/ImageDecoder;
+Landroid/graphics/ImageFormat;->Y8:I
+Landroid/graphics/Insets;->bottom:I
+Landroid/graphics/Insets;->left:I
+Landroid/graphics/Insets;->NONE:Landroid/graphics/Insets;
+Landroid/graphics/Insets;->of(IIII)Landroid/graphics/Insets;
+Landroid/graphics/Insets;->of(Landroid/graphics/Rect;)Landroid/graphics/Insets;
+Landroid/graphics/Insets;->right:I
+Landroid/graphics/Insets;->top:I
+Landroid/graphics/LayerRasterizer;
+Landroid/graphics/LayerRasterizer;-><init>()V
+Landroid/graphics/LayerRasterizer;->addLayer(Landroid/graphics/Paint;)V
+Landroid/graphics/LayerRasterizer;->addLayer(Landroid/graphics/Paint;FF)V
+Landroid/graphics/LightingColorFilter;->setColorAdd(I)V
+Landroid/graphics/LightingColorFilter;->setColorMultiply(I)V
+Landroid/graphics/LinearGradient;->mColor0:I
+Landroid/graphics/LinearGradient;->mColor1:I
+Landroid/graphics/LinearGradient;->mColors:[I
+Landroid/graphics/LinearGradient;->mPositions:[F
+Landroid/graphics/LinearGradient;->mTileMode:Landroid/graphics/Shader$TileMode;
+Landroid/graphics/LinearGradient;->mX0:F
+Landroid/graphics/LinearGradient;->mX1:F
+Landroid/graphics/LinearGradient;->mY0:F
+Landroid/graphics/LinearGradient;->mY1:F
+Landroid/graphics/Matrix;->IDENTITY_MATRIX:Landroid/graphics/Matrix;
+Landroid/graphics/Matrix;->native_instance:J
+Landroid/graphics/Movie;-><init>(J)V
+Landroid/graphics/Movie;->mNativeMovie:J
+Landroid/graphics/NinePatch$InsetStruct;-><init>(IIIIIIIIFIF)V
+Landroid/graphics/NinePatch;->mBitmap:Landroid/graphics/Bitmap;
+Landroid/graphics/NinePatch;->mNativeChunk:J
+Landroid/graphics/Outline;->mRect:Landroid/graphics/Rect;
+Landroid/graphics/Paint;->getNativeInstance()J
+Landroid/graphics/Paint;->getRasterizer()Landroid/graphics/Rasterizer;
+Landroid/graphics/Paint;->getTextRunAdvances([CIIIIZ[FI)F
+Landroid/graphics/Paint;->getTextRunCursor([CIIIII)I
+Landroid/graphics/Paint;->mNativePaint:J
+Landroid/graphics/Paint;->mTypeface:Landroid/graphics/Typeface;
+Landroid/graphics/Paint;->setCompatibilityScaling(F)V
+Landroid/graphics/Paint;->setHyphenEdit(I)V
+Landroid/graphics/Paint;->setRasterizer(Landroid/graphics/Rasterizer;)Landroid/graphics/Rasterizer;
+Landroid/graphics/Path;->isSimplePath:Z
+Landroid/graphics/Path;->rects:Landroid/graphics/Region;
+Landroid/graphics/pdf/PdfRenderer;->doClose()V
+Landroid/graphics/pdf/PdfRenderer;->mCurrentPage:Landroid/graphics/pdf/PdfRenderer$Page;
+Landroid/graphics/Picture;->mNativePicture:J
+Landroid/graphics/PixelXorXfermode;
+Landroid/graphics/PixelXorXfermode;-><init>(I)V
+Landroid/graphics/PorterDuff$Mode;->nativeInt:I
+Landroid/graphics/PorterDuffColorFilter;->getColor()I
+Landroid/graphics/PorterDuffColorFilter;->getMode()Landroid/graphics/PorterDuff$Mode;
+Landroid/graphics/PorterDuffColorFilter;->setColor(I)V
+Landroid/graphics/PorterDuffColorFilter;->setMode(Landroid/graphics/PorterDuff$Mode;)V
+Landroid/graphics/RadialGradient;->mCenterColor:I
+Landroid/graphics/RadialGradient;->mColors:[I
+Landroid/graphics/RadialGradient;->mEdgeColor:I
+Landroid/graphics/RadialGradient;->mPositions:[F
+Landroid/graphics/RadialGradient;->mRadius:F
+Landroid/graphics/RadialGradient;->mTileMode:Landroid/graphics/Shader$TileMode;
+Landroid/graphics/RadialGradient;->mX:F
+Landroid/graphics/RadialGradient;->mY:F
+Landroid/graphics/Rasterizer;
+Landroid/graphics/Rasterizer;-><init>()V
+Landroid/graphics/Rect;->printShortString(Ljava/io/PrintWriter;)V
+Landroid/graphics/Rect;->scale(F)V
+Landroid/graphics/Region$Op;->nativeInt:I
+Landroid/graphics/Region;-><init>(JI)V
+Landroid/graphics/Region;->mNativeRegion:J
+Landroid/graphics/Region;->recycle()V
+Landroid/graphics/Region;->scale(F)V
+Landroid/graphics/Shader$TileMode;->nativeInt:I
+Landroid/graphics/SurfaceTexture;->mFrameAvailableListener:J
+Landroid/graphics/SurfaceTexture;->mOnFrameAvailableHandler:Landroid/os/Handler;
+Landroid/graphics/SurfaceTexture;->mProducer:J
+Landroid/graphics/SurfaceTexture;->mSurfaceTexture:J
+Landroid/graphics/SurfaceTexture;->nativeDetachFromGLContext()I
+Landroid/graphics/SurfaceTexture;->postEventFromNative(Ljava/lang/ref/WeakReference;)V
+Landroid/graphics/SweepGradient;->mColor0:I
+Landroid/graphics/SweepGradient;->mColor1:I
+Landroid/graphics/SweepGradient;->mColors:[I
+Landroid/graphics/SweepGradient;->mCx:F
+Landroid/graphics/SweepGradient;->mCy:F
+Landroid/graphics/SweepGradient;->mPositions:[F
+Landroid/graphics/TableMaskFilter;->CreateClipTable(II)Landroid/graphics/TableMaskFilter;
+Landroid/graphics/TemporaryBuffer;->obtain(I)[C
+Landroid/graphics/TemporaryBuffer;->recycle([C)V
+Landroid/graphics/Typeface;-><init>(J)V
+Landroid/graphics/Typeface;->createFromFamilies([Landroid/graphics/FontFamily;)Landroid/graphics/Typeface;
+Landroid/graphics/Typeface;->createFromFamiliesWithDefault([Landroid/graphics/FontFamily;II)Landroid/graphics/Typeface;
+Landroid/graphics/Typeface;->createFromFamiliesWithDefault([Landroid/graphics/FontFamily;Ljava/lang/String;II)Landroid/graphics/Typeface;
+Landroid/graphics/Typeface;->mStyle:I
+Landroid/graphics/Typeface;->nativeCreateFromArray([JII)J
+Landroid/graphics/Typeface;->nativeCreateWeightAlias(JI)J
+Landroid/graphics/Typeface;->native_instance:J
+Landroid/graphics/Typeface;->sDefaults:[Landroid/graphics/Typeface;
+Landroid/graphics/Typeface;->setDefault(Landroid/graphics/Typeface;)V
+Landroid/graphics/Typeface;->sSystemFallbackMap:Ljava/util/Map;
+Landroid/graphics/Typeface;->sSystemFontMap:Ljava/util/Map;
+Landroid/graphics/Xfermode;->porterDuffMode:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ACQUIRED_GOOD:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ACQUIRED_IMAGER_DIRTY:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ACQUIRED_INSUFFICIENT:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ACQUIRED_PARTIAL:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ACQUIRED_TOO_FAST:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ACQUIRED_TOO_SLOW:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_CANCELED:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_HW_NOT_PRESENT:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_HW_UNAVAILABLE:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_LOCKOUT:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_LOCKOUT_PERMANENT:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_NO_BIOMETRICS:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_NO_SPACE:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_TIMEOUT:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_UNABLE_TO_PROCESS:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_USER_CANCELED:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_VENDOR:I
+Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_VENDOR_BASE:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ACQUIRED_GOOD:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ACQUIRED_IMAGER_DIRTY:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ACQUIRED_INSUFFICIENT:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ACQUIRED_PARTIAL:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ACQUIRED_TOO_FAST:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ACQUIRED_TOO_SLOW:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_CANCELED:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_HW_NOT_PRESENT:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_HW_UNAVAILABLE:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_LOCKOUT:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_LOCKOUT_PERMANENT:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_NO_FINGERPRINTS:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_NO_SPACE:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_TIMEOUT:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_UNABLE_TO_PROCESS:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_USER_CANCELED:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_VENDOR:I
+Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_VENDOR_BASE:I
+Landroid/hardware/Camera$Parameters;->copyFrom(Landroid/hardware/Camera$Parameters;)V
+Landroid/hardware/Camera$Parameters;->dump()V
+Landroid/hardware/Camera$Parameters;->splitArea(Ljava/lang/String;)Ljava/util/ArrayList;
+Landroid/hardware/camera2/CameraAccessException;->serialVersionUID:J
+Landroid/hardware/camera2/CameraCharacteristics$Key;-><init>(Ljava/lang/String;Landroid/hardware/camera2/utils/TypeReference;)V
+Landroid/hardware/camera2/CameraCharacteristics$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
+Landroid/hardware/camera2/CameraCharacteristics$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;J)V
+Landroid/hardware/camera2/CameraCharacteristics$Key;->getNativeKey()Landroid/hardware/camera2/impl/CameraMetadataNative$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->CONTROL_MAX_REGIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->LED_AVAILABLE_LEDS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->LENS_INFO_SHADING_MAP_SIZE:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->LOGICAL_MULTI_CAMERA_PHYSICAL_IDS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->QUIRKS_USE_PARTIAL_RESULT:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_CHARACTERISTICS_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_REQUEST_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_RESULT_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_SESSION_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_MAX_NUM_OUTPUT_STREAMS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_FORMATS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_JPEG_MIN_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_JPEG_SIZES:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_MIN_FRAME_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_PROCESSED_SIZES:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_STALL_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_STREAM_CONFIGURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
+Landroid/hardware/camera2/CaptureRequest$Builder;->setPartOfCHSRequestList(Z)V
+Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Landroid/hardware/camera2/utils/TypeReference;)V
+Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
+Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;J)V
+Landroid/hardware/camera2/CaptureRequest$Key;->getNativeKey()Landroid/hardware/camera2/impl/CameraMetadataNative$Key;
+Landroid/hardware/camera2/CaptureRequest;->getTargets()Ljava/util/Collection;
+Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_COORDINATES:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->REQUEST_ID:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_BLUE:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_GREEN:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_RED:Landroid/hardware/camera2/CaptureRequest$Key;
+Landroid/hardware/camera2/CaptureResult$Key;-><init>(Ljava/lang/String;Landroid/hardware/camera2/utils/TypeReference;)V
+Landroid/hardware/camera2/CaptureResult$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
+Landroid/hardware/camera2/CaptureResult$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;J)V
+Landroid/hardware/camera2/CaptureResult$Key;->getNativeKey()Landroid/hardware/camera2/impl/CameraMetadataNative$Key;
+Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_COORDINATES:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->QUIRKS_PARTIAL_RESULT:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->REQUEST_FRAME_COUNT:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->REQUEST_ID:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_IDS:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_LANDMARKS:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_RECTANGLES:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_SCORES:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_LENS_SHADING_MAP:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_OIS_TIMESTAMPS:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_OIS_X_SHIFTS:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_OIS_Y_SHIFTS:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_PREDICTED_COLOR_GAINS:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->STATISTICS_PREDICTED_COLOR_TRANSFORM:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->SYNC_FRAME_NUMBER:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->TONEMAP_CURVE_BLUE:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->TONEMAP_CURVE_GREEN:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/CaptureResult;->TONEMAP_CURVE_RED:Landroid/hardware/camera2/CaptureResult$Key;
+Landroid/hardware/camera2/impl/CameraMetadataNative$Key;->getTag()I
+Landroid/hardware/camera2/impl/CameraMetadataNative;->mMetadataPtr:J
+Landroid/hardware/camera2/utils/SurfaceUtils;->getSurfaceSize(Landroid/view/Surface;)Landroid/util/Size;
+Landroid/hardware/camera2/utils/TypeReference;-><init>()V
+Landroid/hardware/camera2/utils/TypeReference;->createSpecializedTypeReference(Ljava/lang/reflect/Type;)Landroid/hardware/camera2/utils/TypeReference;
+Landroid/hardware/Camera;->addCallbackBuffer([BI)V
+Landroid/hardware/Camera;->addRawImageCallbackBuffer([B)V
+Landroid/hardware/Camera;->CAMERA_HAL_API_VERSION_1_0:I
+Landroid/hardware/Camera;->getEmptyParameters()Landroid/hardware/Camera$Parameters;
+Landroid/hardware/Camera;->mNativeContext:J
+Landroid/hardware/Camera;->native_getParameters()Ljava/lang/String;
+Landroid/hardware/Camera;->native_setParameters(Ljava/lang/String;)V
+Landroid/hardware/Camera;->native_setup(Ljava/lang/Object;IILjava/lang/String;)I
+Landroid/hardware/Camera;->openLegacy(II)Landroid/hardware/Camera;
+Landroid/hardware/Camera;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/hardware/Camera;->previewEnabled()Z
+Landroid/hardware/Camera;->setPreviewSurface(Landroid/view/Surface;)V
+Landroid/hardware/display/DisplayManager;->ACTION_WIFI_DISPLAY_STATUS_CHANGED:Ljava/lang/String;
+Landroid/hardware/display/DisplayManager;->connectWifiDisplay(Ljava/lang/String;)V
+Landroid/hardware/display/DisplayManager;->disconnectWifiDisplay()V
+Landroid/hardware/display/DisplayManager;->EXTRA_WIFI_DISPLAY_STATUS:Ljava/lang/String;
+Landroid/hardware/display/DisplayManager;->forgetWifiDisplay(Ljava/lang/String;)V
+Landroid/hardware/display/DisplayManager;->getWifiDisplayStatus()Landroid/hardware/display/WifiDisplayStatus;
+Landroid/hardware/display/DisplayManager;->pauseWifiDisplay()V
+Landroid/hardware/display/DisplayManager;->renameWifiDisplay(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/hardware/display/DisplayManager;->resumeWifiDisplay()V
+Landroid/hardware/display/DisplayManager;->startWifiDisplayScan()V
+Landroid/hardware/display/DisplayManager;->stopWifiDisplayScan()V
+Landroid/hardware/display/DisplayManagerGlobal;->disconnectWifiDisplay()V
+Landroid/hardware/display/DisplayManagerGlobal;->getDisplayIds()[I
+Landroid/hardware/display/DisplayManagerGlobal;->getDisplayInfo(I)Landroid/view/DisplayInfo;
+Landroid/hardware/display/DisplayManagerGlobal;->getInstance()Landroid/hardware/display/DisplayManagerGlobal;
+Landroid/hardware/display/DisplayManagerGlobal;->getRealDisplay(I)Landroid/view/Display;
+Landroid/hardware/display/DisplayManagerGlobal;->getWifiDisplayStatus()Landroid/hardware/display/WifiDisplayStatus;
+Landroid/hardware/display/DisplayManagerGlobal;->mDm:Landroid/hardware/display/IDisplayManager;
+Landroid/hardware/display/DisplayManagerGlobal;->sInstance:Landroid/hardware/display/DisplayManagerGlobal;
+Landroid/hardware/display/IDisplayManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/display/IDisplayManager;
+Landroid/hardware/display/IDisplayManager;->getDisplayInfo(I)Landroid/view/DisplayInfo;
+Landroid/hardware/display/WifiDisplay;->canConnect()Z
+Landroid/hardware/display/WifiDisplay;->equals(Landroid/hardware/display/WifiDisplay;)Z
+Landroid/hardware/display/WifiDisplay;->getDeviceAddress()Ljava/lang/String;
+Landroid/hardware/display/WifiDisplay;->getDeviceAlias()Ljava/lang/String;
+Landroid/hardware/display/WifiDisplay;->getDeviceName()Ljava/lang/String;
+Landroid/hardware/display/WifiDisplay;->isAvailable()Z
+Landroid/hardware/display/WifiDisplay;->isRemembered()Z
+Landroid/hardware/display/WifiDisplayStatus;->DISPLAY_STATE_CONNECTED:I
+Landroid/hardware/display/WifiDisplayStatus;->DISPLAY_STATE_CONNECTING:I
+Landroid/hardware/display/WifiDisplayStatus;->DISPLAY_STATE_NOT_CONNECTED:I
+Landroid/hardware/display/WifiDisplayStatus;->FEATURE_STATE_ON:I
+Landroid/hardware/display/WifiDisplayStatus;->getActiveDisplay()Landroid/hardware/display/WifiDisplay;
+Landroid/hardware/display/WifiDisplayStatus;->getActiveDisplayState()I
+Landroid/hardware/display/WifiDisplayStatus;->getDisplays()[Landroid/hardware/display/WifiDisplay;
+Landroid/hardware/display/WifiDisplayStatus;->getFeatureState()I
+Landroid/hardware/display/WifiDisplayStatus;->getScanState()I
+Landroid/hardware/display/WifiDisplayStatus;->mActiveDisplay:Landroid/hardware/display/WifiDisplay;
+Landroid/hardware/display/WifiDisplayStatus;->mDisplays:[Landroid/hardware/display/WifiDisplay;
+Landroid/hardware/display/WifiDisplayStatus;->SCAN_STATE_NOT_SCANNING:I
+Landroid/hardware/fingerprint/Fingerprint;->getFingerId()I
+Landroid/hardware/fingerprint/Fingerprint;->getName()Ljava/lang/CharSequence;
+Landroid/hardware/fingerprint/FingerprintManager$AuthenticationResult;->getFingerprint()Landroid/hardware/fingerprint/Fingerprint;
+Landroid/hardware/fingerprint/FingerprintManager;->getAuthenticatorId()J
+Landroid/hardware/fingerprint/FingerprintManager;->getEnrolledFingerprints()Ljava/util/List;
+Landroid/hardware/fingerprint/FingerprintManager;->getEnrolledFingerprints(I)Ljava/util/List;
+Landroid/hardware/fingerprint/IFingerprintService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/hardware/fingerprint/IFingerprintService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/fingerprint/IFingerprintService;
+Landroid/hardware/HardwareBuffer;-><init>(J)V
+Landroid/hardware/HardwareBuffer;->destroy()V
+Landroid/hardware/HardwareBuffer;->isDestroyed()Z
+Landroid/hardware/HardwareBuffer;->mNativeObject:J
+Landroid/hardware/ICameraService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/ICameraService;
+Landroid/hardware/input/IInputManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/hardware/input/IInputManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/input/IInputManager;
+Landroid/hardware/input/IInputManager$Stub;->TRANSACTION_injectInputEvent:I
+Landroid/hardware/input/IInputManager;->injectInputEvent(Landroid/view/InputEvent;I)Z
+Landroid/hardware/input/InputManager;->createInputForwarder(I)Landroid/app/IInputForwarder;
+Landroid/hardware/input/InputManager;->getInstance()Landroid/hardware/input/InputManager;
+Landroid/hardware/input/InputManager;->injectInputEvent(Landroid/view/InputEvent;I)Z
+Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
+Landroid/hardware/input/InputManager;->mIm:Landroid/hardware/input/IInputManager;
+Landroid/hardware/input/InputManager;->setPointerIconType(I)V
+Landroid/hardware/location/GeofenceHardware;-><init>(Landroid/hardware/location/IGeofenceHardware;)V
+Landroid/hardware/location/IActivityRecognitionHardwareClient$Stub;-><init>()V
+Landroid/hardware/location/IActivityRecognitionHardwareClient;->onAvailabilityChanged(ZLandroid/hardware/location/IActivityRecognitionHardware;)V
+Landroid/hardware/location/IContextHubService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/location/IContextHubService;
+Landroid/hardware/Sensor;->getHandle()I
+Landroid/hardware/Sensor;->mFlags:I
+Landroid/hardware/Sensor;->TYPE_DEVICE_ORIENTATION:I
+Landroid/hardware/Sensor;->TYPE_PICK_UP_GESTURE:I
+Landroid/hardware/SensorDirectChannel;->isValid()Z
+Landroid/hardware/SensorEvent;-><init>(I)V
+Landroid/hardware/SensorManager;-><init>()V
+Landroid/hardware/SensorManager;->configureDirectChannel(Landroid/hardware/SensorDirectChannel;Landroid/hardware/Sensor;I)I
+Landroid/hardware/SerialManager;->getSerialPorts()[Ljava/lang/String;
+Landroid/hardware/SerialManager;->openSerialPort(Ljava/lang/String;I)Landroid/hardware/SerialPort;
+Landroid/hardware/SerialPort;->close()V
+Landroid/hardware/SerialPort;->mNativeContext:I
+Landroid/hardware/SerialPort;->write(Ljava/nio/ByteBuffer;I)V
+Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;-><init>(II)V
+Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;->confidenceLevel:I
+Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;->userId:I
+Landroid/hardware/soundtrigger/SoundTrigger$GenericRecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B)V
+Landroid/hardware/soundtrigger/SoundTrigger$GenericSoundModel;-><init>(Ljava/util/UUID;Ljava/util/UUID;[B)V
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;-><init>(IILjava/lang/String;Ljava/lang/String;[I)V
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->id:I
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->locale:Ljava/lang/String;
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->recognitionModes:I
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->text:Ljava/lang/String;
+Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->users:[I
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;)V
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionEvent;->keyphraseExtras:[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;-><init>(III[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;)V
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->coarseConfidenceLevel:I
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->confidenceLevels:[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->id:I
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->recognitionModes:I
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseSoundModel;-><init>(Ljava/util/UUID;Ljava/util/UUID;[B[Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;)V
+Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseSoundModel;->keyphrases:[Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;
+Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;-><init>(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIIIZIZIZ)V
+Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;->id:I
+Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;->maxSoundModels:I
+Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;->uuid:Ljava/util/UUID;
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;-><init>(ZZ[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;[B)V
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->captureRequested:Z
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->data:[B
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->keyphrases:[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B)V
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->captureAvailable:Z
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->captureSession:I
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->data:[B
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->soundModelHandle:I
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->status:I
+Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->data:[B
+Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->uuid:Ljava/util/UUID;
+Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->vendorUuid:Ljava/util/UUID;
+Landroid/hardware/soundtrigger/SoundTrigger$SoundModelEvent;-><init>(II[B)V
+Landroid/hardware/soundtrigger/SoundTrigger;->attachModule(ILandroid/hardware/soundtrigger/SoundTrigger$StatusListener;Landroid/os/Handler;)Landroid/hardware/soundtrigger/SoundTriggerModule;
+Landroid/hardware/soundtrigger/SoundTrigger;->listModules(Ljava/util/ArrayList;)I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->detach()V
+Landroid/hardware/soundtrigger/SoundTriggerModule;->loadSoundModel(Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;[I)I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->mId:I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->mNativeContext:J
+Landroid/hardware/soundtrigger/SoundTriggerModule;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/hardware/soundtrigger/SoundTriggerModule;->startRecognition(ILandroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;)I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->stopRecognition(I)I
+Landroid/hardware/soundtrigger/SoundTriggerModule;->unloadSoundModel(I)I
+Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchAdditionalInfoEvent(III[F[I)V
+Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchFlushCompleteEvent(I)V
+Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchSensorEvent(I[FIJ)V
+Landroid/hardware/usb/IUsbManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/hardware/usb/IUsbManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/usb/IUsbManager;
+Landroid/hardware/usb/UsbDevice;->mInterfaces:[Landroid/hardware/usb/UsbInterface;
+Landroid/hardware/usb/UsbDeviceConnection;->mNativeContext:J
+Landroid/hardware/usb/UsbManager;-><init>(Landroid/content/Context;Landroid/hardware/usb/IUsbManager;)V
+Landroid/hardware/usb/UsbManager;->ACTION_USB_STATE:Ljava/lang/String;
+Landroid/hardware/usb/UsbManager;->getPorts()[Landroid/hardware/usb/UsbPort;
+Landroid/hardware/usb/UsbManager;->getPortStatus(Landroid/hardware/usb/UsbPort;)Landroid/hardware/usb/UsbPortStatus;
+Landroid/hardware/usb/UsbManager;->isFunctionEnabled(Ljava/lang/String;)Z
+Landroid/hardware/usb/UsbManager;->setCurrentFunction(Ljava/lang/String;Z)V
+Landroid/hardware/usb/UsbManager;->setPortRoles(Landroid/hardware/usb/UsbPort;II)V
+Landroid/hardware/usb/UsbManager;->USB_CONNECTED:Ljava/lang/String;
+Landroid/hardware/usb/UsbManager;->USB_DATA_UNLOCKED:Ljava/lang/String;
+Landroid/hardware/usb/UsbManager;->USB_FUNCTION_NONE:Ljava/lang/String;
+Landroid/hardware/usb/UsbPortStatus;->getCurrentDataRole()I
+Landroid/hardware/usb/UsbPortStatus;->getCurrentMode()I
+Landroid/hardware/usb/UsbPortStatus;->getCurrentPowerRole()I
+Landroid/hardware/usb/UsbPortStatus;->getSupportedRoleCombinations()I
+Landroid/hardware/usb/UsbPortStatus;->isConnected()Z
+Landroid/hardware/usb/UsbPortStatus;->isRoleCombinationSupported(II)Z
+Landroid/hardware/usb/UsbRequest;->mBuffer:Ljava/nio/ByteBuffer;
+Landroid/hardware/usb/UsbRequest;->mLength:I
+Landroid/hardware/usb/UsbRequest;->mNativeContext:J
+Landroid/icu/impl/CurrencyData;-><init>()V
+Landroid/icu/impl/locale/LocaleSyntaxException;->serialVersionUID:J
+Landroid/icu/impl/number/DecimalFormatProperties;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/impl/number/DecimalFormatProperties;->serialVersionUID:J
+Landroid/icu/impl/number/DecimalFormatProperties;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/impl/TimeZoneGenericNames;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/impl/TimeZoneGenericNames;->serialVersionUID:J
+Landroid/icu/math/BigDecimal;->serialVersionUID:J
+Landroid/icu/math/MathContext;->serialVersionUID:J
+Landroid/icu/text/ArabicShaping;-><init>(I)V
+Landroid/icu/text/ArabicShaping;->isAlefMaksouraChar(C)Z
+Landroid/icu/text/ArabicShaping;->isSeenTailFamilyChar(C)I
+Landroid/icu/text/ArabicShaping;->isTailChar(C)Z
+Landroid/icu/text/ArabicShaping;->isYehHamzaChar(C)Z
+Landroid/icu/text/ArabicShaping;->shape(Ljava/lang/String;)Ljava/lang/String;
+Landroid/icu/text/ArabicShapingException;->serialVersionUID:J
+Landroid/icu/text/ChineseDateFormat$Field;->serialVersionUID:J
+Landroid/icu/text/ChineseDateFormat;->serialVersionUID:J
+Landroid/icu/text/ChineseDateFormatSymbols;->serialVersionUID:J
+Landroid/icu/text/CompactDecimalFormat;->serialVersionUID:J
+Landroid/icu/text/CurrencyPluralInfo;->serialVersionUID:J
+Landroid/icu/text/DateFormat$Field;->serialVersionUID:J
+Landroid/icu/text/DateFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/DateFormat;->serialVersionUID:J
+Landroid/icu/text/DateFormatSymbols;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/text/DateFormatSymbols;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/DateFormatSymbols;->serialVersionUID:J
+Landroid/icu/text/DateIntervalFormat;-><init>()V
+Landroid/icu/text/DateIntervalFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/DateIntervalFormat;->serialVersionUID:J
+Landroid/icu/text/DateIntervalInfo$PatternInfo;->serialVersionUID:J
+Landroid/icu/text/DateIntervalInfo;->serialVersionUID:J
+Landroid/icu/text/DateTimePatternGenerator$DistanceInfo;-><init>()V
+Landroid/icu/text/DecimalFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/DecimalFormat;->serialVersionUID:J
+Landroid/icu/text/DecimalFormat;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/text/DecimalFormatSymbols;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/text/DecimalFormatSymbols;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/DecimalFormatSymbols;->serialVersionUID:J
+Landroid/icu/text/DecimalFormat_ICU58_Android;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/DecimalFormat_ICU58_Android;->serialVersionUID:J
+Landroid/icu/text/DecimalFormat_ICU58_Android;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/text/DurationFormat;->serialVersionUID:J
+Landroid/icu/text/MeasureFormat$MeasureProxy;->readResolve()Ljava/lang/Object;
+Landroid/icu/text/MeasureFormat$MeasureProxy;->serialVersionUID:J
+Landroid/icu/text/MeasureFormat;->serialVersionUID:J
+Landroid/icu/text/MeasureFormat;->writeReplace()Ljava/lang/Object;
+Landroid/icu/text/MessageFormat$Field;->serialVersionUID:J
+Landroid/icu/text/MessageFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/MessageFormat;->serialVersionUID:J
+Landroid/icu/text/MessageFormat;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/text/NumberFormat$Field;->serialVersionUID:J
+Landroid/icu/text/NumberFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/NumberFormat;->serialVersionUID:J
+Landroid/icu/text/NumberFormat;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/text/PluralFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/PluralFormat;->serialVersionUID:J
+Landroid/icu/text/PluralRules$AndConstraint;->serialVersionUID:J
+Landroid/icu/text/PluralRules$BinaryConstraint;->serialVersionUID:J
+Landroid/icu/text/PluralRules$FixedDecimal;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/PluralRules$FixedDecimal;->serialVersionUID:J
+Landroid/icu/text/PluralRules$FixedDecimal;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/text/PluralRules$OrConstraint;->serialVersionUID:J
+Landroid/icu/text/PluralRules$RangeConstraint;->serialVersionUID:J
+Landroid/icu/text/PluralRules$Rule;->serialVersionUID:J
+Landroid/icu/text/PluralRules$RuleList;->serialVersionUID:J
+Landroid/icu/text/PluralRules;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/PluralRules;->serialVersionUID:J
+Landroid/icu/text/PluralRules;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/text/PluralRules;->writeReplace()Ljava/lang/Object;
+Landroid/icu/text/RuleBasedCollator;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/text/RuleBasedNumberFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/RuleBasedNumberFormat;->serialVersionUID:J
+Landroid/icu/text/RuleBasedNumberFormat;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/text/SelectFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/SelectFormat;->serialVersionUID:J
+Landroid/icu/text/SimpleDateFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/SimpleDateFormat;->serialVersionUID:J
+Landroid/icu/text/SimpleDateFormat;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/text/SpoofChecker$ScriptSet;-><init>()V
+Landroid/icu/text/SpoofChecker$ScriptSet;->and(I)V
+Landroid/icu/text/SpoofChecker$ScriptSet;->isFull()Z
+Landroid/icu/text/SpoofChecker$ScriptSet;->serialVersionUID:J
+Landroid/icu/text/SpoofChecker$ScriptSet;->setAll()V
+Landroid/icu/text/StringPrepParseException;->serialVersionUID:J
+Landroid/icu/text/TimeUnitFormat;->readResolve()Ljava/lang/Object;
+Landroid/icu/text/TimeUnitFormat;->serialVersionUID:J
+Landroid/icu/text/TimeUnitFormat;->writeReplace()Ljava/lang/Object;
+Landroid/icu/text/TimeZoneFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/text/TimeZoneFormat;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Landroid/icu/text/TimeZoneFormat;->serialVersionUID:J
+Landroid/icu/text/TimeZoneFormat;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/text/TimeZoneNames$DefaultTimeZoneNames$FactoryImpl;-><init>()V
+Landroid/icu/text/TimeZoneNames$DefaultTimeZoneNames;->serialVersionUID:J
+Landroid/icu/text/TimeZoneNames;->serialVersionUID:J
+Landroid/icu/text/Transliterator;->createFromRules(Ljava/lang/String;Ljava/lang/String;I)Landroid/icu/text/Transliterator;
+Landroid/icu/text/Transliterator;->getInstance(Ljava/lang/String;)Landroid/icu/text/Transliterator;
+Landroid/icu/text/Transliterator;->getInstance(Ljava/lang/String;I)Landroid/icu/text/Transliterator;
+Landroid/icu/text/Transliterator;->transliterate(Landroid/icu/text/Replaceable;Landroid/icu/text/Transliterator$Position;Ljava/lang/String;)V
+Landroid/icu/text/Transliterator;->transliterate(Ljava/lang/String;)Ljava/lang/String;
+Landroid/icu/text/UFormat;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/text/UFormat;->serialVersionUID:J
+Landroid/icu/text/UForwardCharacterIterator;->DONE:I
+Landroid/icu/util/AnnualTimeZoneRule;->serialVersionUID:J
+Landroid/icu/util/BasicTimeZone;->serialVersionUID:J
+Landroid/icu/util/BuddhistCalendar;->serialVersionUID:J
+Landroid/icu/util/Calendar;->getLocale(Landroid/icu/util/ULocale$Type;)Landroid/icu/util/ULocale;
+Landroid/icu/util/Calendar;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/util/Calendar;->serialVersionUID:J
+Landroid/icu/util/Calendar;->writeObject(Ljava/io/ObjectOutputStream;)V
+Landroid/icu/util/CECalendar;->serialVersionUID:J
+Landroid/icu/util/ChineseCalendar;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/util/ChineseCalendar;->serialVersionUID:J
+Landroid/icu/util/CopticCalendar;->serialVersionUID:J
+Landroid/icu/util/Currency;->readResolve()Ljava/lang/Object;
+Landroid/icu/util/Currency;->serialVersionUID:J
+Landroid/icu/util/Currency;->writeReplace()Ljava/lang/Object;
+Landroid/icu/util/DangiCalendar;->serialVersionUID:J
+Landroid/icu/util/DateInterval;->serialVersionUID:J
+Landroid/icu/util/DateTimeRule;->serialVersionUID:J
+Landroid/icu/util/EthiopicCalendar;->serialVersionUID:J
+Landroid/icu/util/GregorianCalendar;->serialVersionUID:J
+Landroid/icu/util/HebrewCalendar;->serialVersionUID:J
+Landroid/icu/util/ICUCloneNotSupportedException;->serialVersionUID:J
+Landroid/icu/util/ICUException;->serialVersionUID:J
+Landroid/icu/util/ICUUncheckedIOException;->serialVersionUID:J
+Landroid/icu/util/IllformedLocaleException;->serialVersionUID:J
+Landroid/icu/util/IndianCalendar;->serialVersionUID:J
+Landroid/icu/util/InitialTimeZoneRule;->serialVersionUID:J
+Landroid/icu/util/IslamicCalendar;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/util/IslamicCalendar;->serialVersionUID:J
+Landroid/icu/util/JapaneseCalendar;->serialVersionUID:J
+Landroid/icu/util/MeasureUnit$MeasureUnitProxy;->readResolve()Ljava/lang/Object;
+Landroid/icu/util/MeasureUnit$MeasureUnitProxy;->serialVersionUID:J
+Landroid/icu/util/MeasureUnit;->serialVersionUID:J
+Landroid/icu/util/MeasureUnit;->writeReplace()Ljava/lang/Object;
+Landroid/icu/util/NoUnit;->serialVersionUID:J
+Landroid/icu/util/PersianCalendar;-><init>(Ljava/util/Locale;)V
+Landroid/icu/util/PersianCalendar;->serialVersionUID:J
+Landroid/icu/util/RuleBasedTimeZone;->serialVersionUID:J
+Landroid/icu/util/SimpleTimeZone;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/icu/util/SimpleTimeZone;->serialVersionUID:J
+Landroid/icu/util/STZInfo;->serialVersionUID:J
+Landroid/icu/util/TaiwanCalendar;->serialVersionUID:J
+Landroid/icu/util/TimeArrayTimeZoneRule;->serialVersionUID:J
+Landroid/icu/util/TimeUnit;->readResolve()Ljava/lang/Object;
+Landroid/icu/util/TimeUnit;->serialVersionUID:J
+Landroid/icu/util/TimeUnit;->writeReplace()Ljava/lang/Object;
+Landroid/icu/util/TimeZone$ConstantZone;->serialVersionUID:J
+Landroid/icu/util/TimeZone;->serialVersionUID:J
+Landroid/icu/util/TimeZoneRule;->serialVersionUID:J
+Landroid/icu/util/ULocale;->serialVersionUID:J
+Landroid/icu/util/UResourceBundle;->getBundleInstance(Ljava/lang/String;Landroid/icu/util/ULocale;)Landroid/icu/util/UResourceBundle;
+Landroid/icu/util/UResourceBundle;->getKey()Ljava/lang/String;
+Landroid/icu/util/UResourceBundle;->getString()Ljava/lang/String;
+Landroid/icu/util/UResourceBundle;->getType()I
+Landroid/icu/util/UResourceBundleIterator;->hasNext()Z
+Landroid/icu/util/UResourceBundleIterator;->next()Landroid/icu/util/UResourceBundle;
+Landroid/icu/util/UResourceTypeMismatchException;->serialVersionUID:J
+Landroid/icu/util/VTimeZone;->serialVersionUID:J
+Landroid/inputmethodservice/InputMethodService$SettingsObserver;->shouldShowImeWithHardKeyboard()Z
+Landroid/inputmethodservice/InputMethodService;->mExtractEditText:Landroid/inputmethodservice/ExtractEditText;
+Landroid/inputmethodservice/InputMethodService;->mExtractView:Landroid/view/View;
+Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
+Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
+Landroid/inputmethodservice/InputMethodService;->mTheme:I
+Landroid/inputmethodservice/InputMethodService;->mTmpInsets:Landroid/inputmethodservice/InputMethodService$Insets;
+Landroid/inputmethodservice/InputMethodService;->onExtractedDeleteText(II)V
+Landroid/inputmethodservice/InputMethodService;->onExtractedReplaceText(IILjava/lang/CharSequence;)V
+Landroid/inputmethodservice/InputMethodService;->onExtractedSetSpan(Ljava/lang/Object;III)V
+Landroid/inputmethodservice/Keyboard;->mModifierKeys:Ljava/util/List;
+Landroid/inputmethodservice/Keyboard;->mTotalHeight:I
+Landroid/inputmethodservice/Keyboard;->mTotalWidth:I
+Landroid/inputmethodservice/KeyboardView;->mKeyBackground:Landroid/graphics/drawable/Drawable;
+Landroid/inputmethodservice/KeyboardView;->mLabelTextSize:I
+Landroid/inputmethodservice/KeyboardView;->mPreviewText:Landroid/widget/TextView;
+Landroid/inputmethodservice/KeyboardView;->openPopupIfRequired(Landroid/view/MotionEvent;)Z
+Landroid/inputmethodservice/KeyboardView;->repeatKey()Z
+Landroid/inputmethodservice/KeyboardView;->showKey(I)V
+Landroid/location/Country;-><init>(Ljava/lang/String;I)V
+Landroid/location/Country;->getCountryIso()Ljava/lang/String;
+Landroid/location/Country;->getSource()I
+Landroid/location/CountryDetector;-><init>(Landroid/location/ICountryDetector;)V
+Landroid/location/CountryDetector;->addCountryListener(Landroid/location/CountryListener;Landroid/os/Looper;)V
+Landroid/location/CountryDetector;->detectCountry()Landroid/location/Country;
+Landroid/location/CountryDetector;->removeCountryListener(Landroid/location/CountryListener;)V
+Landroid/location/CountryListener;->onCountryDetected(Landroid/location/Country;)V
+Landroid/location/GeocoderParams;->getClientPackage()Ljava/lang/String;
+Landroid/location/GeocoderParams;->getLocale()Ljava/util/Locale;
+Landroid/location/Geofence;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/location/GpsStatus;->setTimeToFirstFix(I)V
+Landroid/location/ICountryDetector$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ICountryDetector;
+Landroid/location/ICountryListener$Stub;-><init>()V
+Landroid/location/IGeocodeProvider$Stub;-><init>()V
+Landroid/location/IGeocodeProvider$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/IGeocodeProvider;
+Landroid/location/IGeocodeProvider;->getFromLocation(DDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String;
+Landroid/location/IGeocodeProvider;->getFromLocationName(Ljava/lang/String;DDDDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String;
+Landroid/location/IGeofenceProvider$Stub;-><init>()V
+Landroid/location/IGeofenceProvider;->setGeofenceHardware(Landroid/hardware/location/IGeofenceHardware;)V
+Landroid/location/ILocationListener$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/location/ILocationListener$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/location/ILocationListener$Stub;-><init>()V
+Landroid/location/ILocationListener$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ILocationListener;
+Landroid/location/ILocationListener;->onLocationChanged(Landroid/location/Location;)V
+Landroid/location/ILocationListener;->onProviderDisabled(Ljava/lang/String;)V
+Landroid/location/ILocationListener;->onProviderEnabled(Ljava/lang/String;)V
+Landroid/location/ILocationListener;->onStatusChanged(Ljava/lang/String;ILandroid/os/Bundle;)V
+Landroid/location/ILocationManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/location/ILocationManager$Stub;-><init>()V
+Landroid/location/ILocationManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ILocationManager;
+Landroid/location/ILocationManager;->getAllProviders()Ljava/util/List;
+Landroid/location/ILocationManager;->getNetworkProviderPackage()Ljava/lang/String;
+Landroid/location/ILocationManager;->reportLocation(Landroid/location/Location;Z)V
+Landroid/location/INetInitiatedListener$Stub;-><init>()V
+Landroid/location/INetInitiatedListener;->sendNiResponse(II)Z
+Landroid/location/Location;->mElapsedRealtimeNanos:J
+Landroid/location/Location;->mProvider:Ljava/lang/String;
+Landroid/location/Location;->removeBearingAccuracy()V
+Landroid/location/Location;->removeSpeedAccuracy()V
+Landroid/location/Location;->removeVerticalAccuracy()V
+Landroid/location/Location;->setExtraLocation(Ljava/lang/String;Landroid/location/Location;)V
+Landroid/location/LocationManager;->mService:Landroid/location/ILocationManager;
+Landroid/location/LocationManager;->requestLocationUpdates(Landroid/location/LocationRequest;Landroid/location/LocationListener;Landroid/os/Looper;Landroid/app/PendingIntent;)V
+Landroid/location/LocationManager;->sendNiResponse(II)Z
+Landroid/location/LocationRequest;->checkDisplacement(F)V
+Landroid/location/LocationRequest;->checkInterval(J)V
+Landroid/location/LocationRequest;->checkProvider(Ljava/lang/String;)V
+Landroid/location/LocationRequest;->checkQuality(I)V
+Landroid/location/LocationRequest;->mExpireAt:J
+Landroid/location/LocationRequest;->mExplicitFastestInterval:Z
+Landroid/location/LocationRequest;->mFastestInterval:J
+Landroid/location/LocationRequest;->mHideFromAppOps:Z
+Landroid/location/LocationRequest;->mInterval:J
+Landroid/location/LocationRequest;->mNumUpdates:I
+Landroid/location/LocationRequest;->mProvider:Ljava/lang/String;
+Landroid/location/LocationRequest;->mQuality:I
+Landroid/location/LocationRequest;->mSmallestDisplacement:F
+Landroid/location/LocationRequest;->mWorkSource:Landroid/os/WorkSource;
+Landroid/media/AmrInputStream;-><init>(Ljava/io/InputStream;)V
+Landroid/media/AsyncPlayer;->setUsesWakeLock(Landroid/content/Context;)V
+Landroid/media/AudioAttributes$Builder;->addTag(Ljava/lang/String;)Landroid/media/AudioAttributes$Builder;
+Landroid/media/AudioAttributes$Builder;->setInternalLegacyStreamType(I)Landroid/media/AudioAttributes$Builder;
+Landroid/media/AudioAttributes;->mContentType:I
+Landroid/media/AudioAttributes;->mFlags:I
+Landroid/media/AudioAttributes;->mFormattedTags:Ljava/lang/String;
+Landroid/media/AudioAttributes;->mSource:I
+Landroid/media/AudioAttributes;->mUsage:I
+Landroid/media/AudioAttributes;->toLegacyStreamType(Landroid/media/AudioAttributes;)I
+Landroid/media/AudioDevicePort;-><init>(Landroid/media/AudioHandle;Ljava/lang/String;[I[I[I[I[Landroid/media/AudioGain;ILjava/lang/String;)V
+Landroid/media/AudioDevicePort;->type()I
+Landroid/media/AudioDevicePortConfig;-><init>(Landroid/media/AudioDevicePort;IIILandroid/media/AudioGainConfig;)V
+Landroid/media/AudioFormat;-><init>()V
+Landroid/media/AudioFormat;-><init>(IIII)V
+Landroid/media/AudioFormat;->mChannelMask:I
+Landroid/media/AudioFormat;->mEncoding:I
+Landroid/media/AudioFormat;->mSampleRate:I
+Landroid/media/audiofx/AudioEffect;-><init>(Ljava/util/UUID;Ljava/util/UUID;II)V
+Landroid/media/audiofx/AudioEffect;->checkState(Ljava/lang/String;)V
+Landroid/media/audiofx/AudioEffect;->command(I[B[B)I
+Landroid/media/audiofx/AudioEffect;->getParameter([I[B)I
+Landroid/media/audiofx/AudioEffect;->getParameter([I[I)I
+Landroid/media/audiofx/AudioEffect;->setParameter([I[S)I
+Landroid/media/audiofx/Visualizer;->mId:I
+Landroid/media/AudioGain;-><init>(IIIIIIIII)V
+Landroid/media/AudioGainConfig;-><init>(ILandroid/media/AudioGain;II[II)V
+Landroid/media/AudioGainConfig;->mChannelMask:I
+Landroid/media/AudioGainConfig;->mIndex:I
+Landroid/media/AudioGainConfig;->mMode:I
+Landroid/media/AudioGainConfig;->mRampDurationMs:I
+Landroid/media/AudioGainConfig;->mValues:[I
+Landroid/media/AudioHandle;-><init>(I)V
+Landroid/media/AudioHandle;->mId:I
+Landroid/media/AudioManager;-><init>(Landroid/content/Context;)V
+Landroid/media/AudioManager;->abandonAudioFocusForCall()V
+Landroid/media/AudioManager;->createAudioPatch([Landroid/media/AudioPatch;[Landroid/media/AudioPortConfig;[Landroid/media/AudioPortConfig;)I
+Landroid/media/AudioManager;->DEVICE_OUT_ANLG_DOCK_HEADSET:I
+Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_A2DP:I
+Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES:I
+Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER:I
+Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_SCO_HEADSET:I
+Landroid/media/AudioManager;->DEVICE_OUT_DGTL_DOCK_HEADSET:I
+Landroid/media/AudioManager;->DEVICE_OUT_EARPIECE:I
+Landroid/media/AudioManager;->DEVICE_OUT_HDMI:I
+Landroid/media/AudioManager;->DEVICE_OUT_SPEAKER:I
+Landroid/media/AudioManager;->DEVICE_OUT_WIRED_HEADPHONE:I
+Landroid/media/AudioManager;->DEVICE_OUT_WIRED_HEADSET:I
+Landroid/media/AudioManager;->EXTRA_VOLUME_STREAM_TYPE:Ljava/lang/String;
+Landroid/media/AudioManager;->EXTRA_VOLUME_STREAM_VALUE:Ljava/lang/String;
+Landroid/media/AudioManager;->forceVolumeControlStream(I)V
+Landroid/media/AudioManager;->getDevicesForStream(I)I
+Landroid/media/AudioManager;->getLastAudibleStreamVolume(I)I
+Landroid/media/AudioManager;->getOutputLatency(I)I
+Landroid/media/AudioManager;->getRingerModeInternal()I
+Landroid/media/AudioManager;->getService()Landroid/media/IAudioService;
+Landroid/media/AudioManager;->isMasterMute()Z
+Landroid/media/AudioManager;->isMusicActiveRemotely()Z
+Landroid/media/AudioManager;->isSilentMode()Z
+Landroid/media/AudioManager;->isValidRingerMode(I)Z
+Landroid/media/AudioManager;->listAudioPatches(Ljava/util/ArrayList;)I
+Landroid/media/AudioManager;->listAudioPorts(Ljava/util/ArrayList;)I
+Landroid/media/AudioManager;->mAudioFocusIdListenerMap:Ljava/util/concurrent/ConcurrentHashMap;
+Landroid/media/AudioManager;->NUM_SOUND_EFFECTS:I
+Landroid/media/AudioManager;->registerAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V
+Landroid/media/AudioManager;->releaseAudioPatch(Landroid/media/AudioPatch;)I
+Landroid/media/AudioManager;->reloadAudioSettings()V
+Landroid/media/AudioManager;->requestAudioFocusForCall(II)V
+Landroid/media/AudioManager;->setMasterMute(ZI)V
+Landroid/media/AudioManager;->setRingerModeInternal(I)V
+Landroid/media/AudioManager;->setWiredDeviceConnectionState(IILjava/lang/String;Ljava/lang/String;)V
+Landroid/media/AudioManager;->startBluetoothScoVirtualCall()V
+Landroid/media/AudioManager;->STREAM_BLUETOOTH_SCO:I
+Landroid/media/AudioManager;->STREAM_SYSTEM_ENFORCED:I
+Landroid/media/AudioManager;->STREAM_TTS:I
+Landroid/media/AudioManager;->unregisterAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V
+Landroid/media/AudioManager;->VOLUME_CHANGED_ACTION:Ljava/lang/String;
+Landroid/media/AudioMixPort;-><init>(Landroid/media/AudioHandle;IILjava/lang/String;[I[I[I[I[Landroid/media/AudioGain;)V
+Landroid/media/AudioMixPort;->ioHandle()I
+Landroid/media/AudioMixPortConfig;-><init>(Landroid/media/AudioMixPort;IIILandroid/media/AudioGainConfig;)V
+Landroid/media/AudioPatch;-><init>(Landroid/media/AudioHandle;[Landroid/media/AudioPortConfig;[Landroid/media/AudioPortConfig;)V
+Landroid/media/AudioPatch;->mHandle:Landroid/media/AudioHandle;
+Landroid/media/AudioPatch;->sinks()[Landroid/media/AudioPortConfig;
+Landroid/media/AudioPatch;->sources()[Landroid/media/AudioPortConfig;
+Landroid/media/audiopolicy/AudioMix;->mCallbackFlags:I
+Landroid/media/audiopolicy/AudioMix;->mDeviceAddress:Ljava/lang/String;
+Landroid/media/audiopolicy/AudioMix;->mDeviceSystemType:I
+Landroid/media/audiopolicy/AudioMix;->mFormat:Landroid/media/AudioFormat;
+Landroid/media/audiopolicy/AudioMix;->mMixType:I
+Landroid/media/audiopolicy/AudioMix;->mRouteFlags:I
+Landroid/media/audiopolicy/AudioMix;->mRule:Landroid/media/audiopolicy/AudioMixingRule;
+Landroid/media/audiopolicy/AudioMixingRule$AudioMixMatchCriterion;->mAttr:Landroid/media/AudioAttributes;
+Landroid/media/audiopolicy/AudioMixingRule$AudioMixMatchCriterion;->mIntProp:I
+Landroid/media/audiopolicy/AudioMixingRule$AudioMixMatchCriterion;->mRule:I
+Landroid/media/audiopolicy/AudioMixingRule;->mCriteria:Ljava/util/ArrayList;
+Landroid/media/AudioPort;-><init>(Landroid/media/AudioHandle;ILjava/lang/String;[I[I[I[I[Landroid/media/AudioGain;)V
+Landroid/media/AudioPort;->id()I
+Landroid/media/AudioPort;->mActiveConfig:Landroid/media/AudioPortConfig;
+Landroid/media/AudioPort;->mGains:[Landroid/media/AudioGain;
+Landroid/media/AudioPort;->mHandle:Landroid/media/AudioHandle;
+Landroid/media/AudioPort;->mRole:I
+Landroid/media/AudioPort;->role()I
+Landroid/media/AudioPortConfig;-><init>(Landroid/media/AudioPort;IIILandroid/media/AudioGainConfig;)V
+Landroid/media/AudioPortConfig;->mChannelMask:I
+Landroid/media/AudioPortConfig;->mConfigMask:I
+Landroid/media/AudioPortConfig;->mFormat:I
+Landroid/media/AudioPortConfig;->mGain:Landroid/media/AudioGainConfig;
+Landroid/media/AudioPortConfig;->mPort:Landroid/media/AudioPort;
+Landroid/media/AudioPortConfig;->mSamplingRate:I
+Landroid/media/AudioPortConfig;->port()Landroid/media/AudioPort;
+Landroid/media/AudioPortEventHandler;->mJniCallback:J
+Landroid/media/AudioPortEventHandler;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/media/AudioRecord;->mAudioAttributes:Landroid/media/AudioAttributes;
+Landroid/media/AudioRecord;->mInitializationLooper:Landroid/os/Looper;
+Landroid/media/AudioRecord;->mNativeCallbackCookie:J
+Landroid/media/AudioRecord;->mNativeDeviceCallback:J
+Landroid/media/AudioRecord;->mNativeRecorderInJavaObj:J
+Landroid/media/AudioRecord;->native_release()V
+Landroid/media/AudioRecord;->native_setup(Ljava/lang/Object;Ljava/lang/Object;[IIIII[ILjava/lang/String;J)I
+Landroid/media/AudioRecord;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/media/AudioRecordingConfiguration;->getClientPackageName()Ljava/lang/String;
+Landroid/media/AudioRecordingConfiguration;->getClientUid()I
+Landroid/media/AudioSystem;->checkAudioFlinger()I
+Landroid/media/AudioSystem;->DEVICE_IN_AMBIENT:I
+Landroid/media/AudioSystem;->DEVICE_IN_ANLG_DOCK_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_IN_AUX_DIGITAL:I
+Landroid/media/AudioSystem;->DEVICE_IN_BACK_MIC:I
+Landroid/media/AudioSystem;->DEVICE_IN_BLUETOOTH_A2DP:I
+Landroid/media/AudioSystem;->DEVICE_IN_BLUETOOTH_SCO_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_IN_BUILTIN_MIC:I
+Landroid/media/AudioSystem;->DEVICE_IN_COMMUNICATION:I
+Landroid/media/AudioSystem;->DEVICE_IN_DEFAULT:I
+Landroid/media/AudioSystem;->DEVICE_IN_DGTL_DOCK_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_IN_REMOTE_SUBMIX:I
+Landroid/media/AudioSystem;->DEVICE_IN_USB_ACCESSORY:I
+Landroid/media/AudioSystem;->DEVICE_IN_USB_DEVICE:I
+Landroid/media/AudioSystem;->DEVICE_IN_VOICE_CALL:I
+Landroid/media/AudioSystem;->DEVICE_IN_WIRED_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_OUT_ALL_USB:I
+Landroid/media/AudioSystem;->DEVICE_OUT_ANLG_DOCK_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_OUT_AUX_DIGITAL:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_A2DP:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_SCO:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_SCO_CARKIT:I
+Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_SCO_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_OUT_DGTL_DOCK_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_OUT_EARPIECE:I
+Landroid/media/AudioSystem;->DEVICE_OUT_FM:I
+Landroid/media/AudioSystem;->DEVICE_OUT_REMOTE_SUBMIX:I
+Landroid/media/AudioSystem;->DEVICE_OUT_SPEAKER:I
+Landroid/media/AudioSystem;->DEVICE_OUT_TELEPHONY_TX:I
+Landroid/media/AudioSystem;->DEVICE_OUT_USB_ACCESSORY:I
+Landroid/media/AudioSystem;->DEVICE_OUT_USB_DEVICE:I
+Landroid/media/AudioSystem;->DEVICE_OUT_WIRED_HEADPHONE:I
+Landroid/media/AudioSystem;->DEVICE_OUT_WIRED_HEADSET:I
+Landroid/media/AudioSystem;->DEVICE_STATE_AVAILABLE:I
+Landroid/media/AudioSystem;->DEVICE_STATE_UNAVAILABLE:I
+Landroid/media/AudioSystem;->dynamicPolicyCallbackFromNative(ILjava/lang/String;I)V
+Landroid/media/AudioSystem;->errorCallbackFromNative(I)V
+Landroid/media/AudioSystem;->FORCE_ANALOG_DOCK:I
+Landroid/media/AudioSystem;->FORCE_BT_CAR_DOCK:I
+Landroid/media/AudioSystem;->FORCE_BT_DESK_DOCK:I
+Landroid/media/AudioSystem;->FORCE_DIGITAL_DOCK:I
+Landroid/media/AudioSystem;->FORCE_NONE:I
+Landroid/media/AudioSystem;->getDeviceConnectionState(ILjava/lang/String;)I
+Landroid/media/AudioSystem;->getDevicesForStream(I)I
+Landroid/media/AudioSystem;->getForceUse(I)I
+Landroid/media/AudioSystem;->getMasterMute()Z
+Landroid/media/AudioSystem;->getNumStreamTypes()I
+Landroid/media/AudioSystem;->getOutputDeviceName(I)Ljava/lang/String;
+Landroid/media/AudioSystem;->getOutputLatency(I)I
+Landroid/media/AudioSystem;->getParameters(Ljava/lang/String;)Ljava/lang/String;
+Landroid/media/AudioSystem;->getPrimaryOutputFrameCount()I
+Landroid/media/AudioSystem;->getPrimaryOutputSamplingRate()I
+Landroid/media/AudioSystem;->initStreamVolume(III)I
+Landroid/media/AudioSystem;->isMicrophoneMuted()Z
+Landroid/media/AudioSystem;->isSourceActive(I)Z
+Landroid/media/AudioSystem;->isStreamActive(II)Z
+Landroid/media/AudioSystem;->muteMicrophone(Z)I
+Landroid/media/AudioSystem;->recordingCallbackFromNative(IIII[I)V
+Landroid/media/AudioSystem;->setDeviceConnectionState(IILjava/lang/String;Ljava/lang/String;)I
+Landroid/media/AudioSystem;->setErrorCallback(Landroid/media/AudioSystem$ErrorCallback;)V
+Landroid/media/AudioSystem;->setForceUse(II)I
+Landroid/media/AudioSystem;->setMasterMute(Z)I
+Landroid/media/AudioSystem;->setParameters(Ljava/lang/String;)I
+Landroid/media/AudioSystem;->setPhoneState(I)I
+Landroid/media/AudioSystem;->setStreamVolumeIndex(III)I
+Landroid/media/AudioSystem;->STREAM_SYSTEM_ENFORCED:I
+Landroid/media/AudioTrack;->deferred_connect(J)V
+Landroid/media/AudioTrack;->getLatency()I
+Landroid/media/AudioTrack;->mJniData:J
+Landroid/media/AudioTrack;->mNativeTrackInJavaObj:J
+Landroid/media/AudioTrack;->mStreamType:I
+Landroid/media/AudioTrack;->native_release()V
+Landroid/media/AudioTrack;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
+Landroid/media/CamcorderProfile;->native_get_camcorder_profile(II)Landroid/media/CamcorderProfile;
+Landroid/media/CamcorderProfile;->native_init()V
+Landroid/media/DecoderCapabilities$AudioDecoder;->AUDIO_DECODER_WMA:Landroid/media/DecoderCapabilities$AudioDecoder;
+Landroid/media/DecoderCapabilities$VideoDecoder;->VIDEO_DECODER_WMV:Landroid/media/DecoderCapabilities$VideoDecoder;
+Landroid/media/DecoderCapabilities;->getAudioDecoders()Ljava/util/List;
+Landroid/media/DecoderCapabilities;->getVideoDecoders()Ljava/util/List;
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mCodec:I
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMaxFrameHeight:I
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMaxFrameWidth:I
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMinFrameHeight:I
+Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMinFrameWidth:I
+Landroid/media/EncoderCapabilities;->getVideoEncoders()Ljava/util/List;
+Landroid/media/ExifInterface;->convertRationalLatLonToFloat(Ljava/lang/String;Ljava/lang/String;)F
+Landroid/media/ExifInterface;->getDateTime()J
+Landroid/media/ExifInterface;->getGpsDateTime()J
+Landroid/media/ExifInterface;->mAttributes:[Ljava/util/HashMap;
+Landroid/media/ExifInterface;->mFilename:Ljava/lang/String;
+Landroid/media/ExifInterface;->mHasThumbnail:Z
+Landroid/media/ExifInterface;->sFormatter:Ljava/text/SimpleDateFormat;
+Landroid/media/IAudioFocusDispatcher;->dispatchAudioFocusChange(ILjava/lang/String;)V
+Landroid/media/IAudioRoutesObserver$Stub;-><init>()V
+Landroid/media/IAudioService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/media/IAudioService$Stub;-><init>()V
+Landroid/media/IAudioService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IAudioService;
+Landroid/media/IAudioService;->getStreamMaxVolume(I)I
+Landroid/media/IAudioService;->getStreamVolume(I)I
+Landroid/media/IAudioService;->setStreamVolume(IIILjava/lang/String;)V
+Landroid/media/IAudioService;->startWatchingRoutes(Landroid/media/IAudioRoutesObserver;)Landroid/media/AudioRoutesInfo;
+Landroid/media/Image$Plane;-><init>()V
+Landroid/media/Image;-><init>()V
+Landroid/media/IMediaRouterService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IMediaRouterService;
+Landroid/media/IMediaScannerListener$Stub;-><init>()V
+Landroid/media/IMediaScannerService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IMediaScannerService;
+Landroid/media/IMediaScannerService;->requestScanFile(Ljava/lang/String;Ljava/lang/String;Landroid/media/IMediaScannerListener;)V
+Landroid/media/IMediaScannerService;->scanFile(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/media/IRemoteDisplayCallback;->onStateChanged(Landroid/media/RemoteDisplayState;)V
+Landroid/media/IRingtonePlayer;->play(Landroid/os/IBinder;Landroid/net/Uri;Landroid/media/AudioAttributes;FZ)V
+Landroid/media/IVolumeController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IVolumeController;
+Landroid/media/JetPlayer;->mNativePlayerInJavaObj:J
+Landroid/media/JetPlayer;->postEventFromNative(Ljava/lang/Object;III)V
+Landroid/media/MediaCodec$CodecException;-><init>(IILjava/lang/String;)V
+Landroid/media/MediaCodec;->getBuffers(Z)[Ljava/nio/ByteBuffer;
+Landroid/media/MediaCodec;->mNativeContext:J
+Landroid/media/MediaCodec;->releaseOutputBuffer(IZZJ)V
+Landroid/media/MediaCodec;->setParameters([Ljava/lang/String;[Ljava/lang/Object;)V
+Landroid/media/MediaCodecInfo$VideoCapabilities;->create(Landroid/media/MediaFormat;Landroid/media/MediaCodecInfo$CodecCapabilities;)Landroid/media/MediaCodecInfo$VideoCapabilities;
+Landroid/media/MediaDrm$Certificate;->getContent()[B
+Landroid/media/MediaDrm$Certificate;->getWrappedPrivateKey()[B
+Landroid/media/MediaDrm$CertificateRequest;->getData()[B
+Landroid/media/MediaDrm$CertificateRequest;->getDefaultUrl()Ljava/lang/String;
+Landroid/media/MediaDrm;->getCertificateRequest(ILjava/lang/String;)Landroid/media/MediaDrm$CertificateRequest;
+Landroid/media/MediaDrm;->provideCertificateResponse([B)Landroid/media/MediaDrm$Certificate;
+Landroid/media/MediaDrm;->signRSA([BLjava/lang/String;[B[B)[B
+Landroid/media/MediaFile$MediaFileType;->fileType:I
+Landroid/media/MediaFile$MediaFileType;->mimeType:Ljava/lang/String;
+Landroid/media/MediaFile;-><init>()V
+Landroid/media/MediaFile;->addFileType(Ljava/lang/String;ILjava/lang/String;)V
+Landroid/media/MediaFile;->FIRST_AUDIO_FILE_TYPE:I
+Landroid/media/MediaFile;->getFileTitle(Ljava/lang/String;)Ljava/lang/String;
+Landroid/media/MediaFile;->getFileType(Ljava/lang/String;)Landroid/media/MediaFile$MediaFileType;
+Landroid/media/MediaFile;->getFileTypeForMimeType(Ljava/lang/String;)I
+Landroid/media/MediaFile;->getMimeTypeForFile(Ljava/lang/String;)Ljava/lang/String;
+Landroid/media/MediaFile;->isAudioFileType(I)Z
+Landroid/media/MediaFile;->isDrmFileType(I)Z
+Landroid/media/MediaFile;->isImageFileType(I)Z
+Landroid/media/MediaFile;->isPlayListFileType(I)Z
+Landroid/media/MediaFile;->isVideoFileType(I)Z
+Landroid/media/MediaFile;->LAST_AUDIO_FILE_TYPE:I
+Landroid/media/MediaFile;->sFileTypeMap:Ljava/util/HashMap;
+Landroid/media/MediaFile;->sFileTypeToFormatMap:Ljava/util/HashMap;
+Landroid/media/MediaFile;->sFormatToMimeTypeMap:Ljava/util/HashMap;
+Landroid/media/MediaFile;->sMimeTypeToFormatMap:Ljava/util/HashMap;
+Landroid/media/MediaFormat;->getMap()Ljava/util/Map;
+Landroid/media/MediaFormat;->mMap:Ljava/util/Map;
+Landroid/media/MediaHTTPConnection;-><init>()V
+Landroid/media/MediaHTTPConnection;->connect(Ljava/lang/String;Ljava/lang/String;)Landroid/os/IBinder;
+Landroid/media/MediaHTTPConnection;->disconnect()V
+Landroid/media/MediaHTTPConnection;->getMIMEType()Ljava/lang/String;
+Landroid/media/MediaHTTPConnection;->getUri()Ljava/lang/String;
+Landroid/media/MediaHTTPConnection;->mAllowCrossDomainRedirect:Z
+Landroid/media/MediaHTTPConnection;->mAllowCrossProtocolRedirect:Z
+Landroid/media/MediaHTTPConnection;->mConnection:Ljava/net/HttpURLConnection;
+Landroid/media/MediaHTTPConnection;->mCurrentOffset:J
+Landroid/media/MediaHTTPConnection;->mHeaders:Ljava/util/Map;
+Landroid/media/MediaHTTPConnection;->mTotalSize:J
+Landroid/media/MediaHTTPConnection;->mURL:Ljava/net/URL;
+Landroid/media/MediaHTTPConnection;->readAt(JI)I
+Landroid/media/MediaHTTPService;->createHttpServiceBinderIfNecessary(Ljava/lang/String;)Landroid/os/IBinder;
+Landroid/media/MediaInserter;->flushAll()V
+Landroid/media/MediaMetadata;->getKeyFromMetadataEditorKey(I)Ljava/lang/String;
+Landroid/media/MediaMetadataRetriever;->getEmbeddedPicture(I)[B
+Landroid/media/MediaMetadataRetriever;->native_finalize()V
+Landroid/media/MediaMetadataRetriever;->native_init()V
+Landroid/media/MediaMetadataRetriever;->native_setup()V
+Landroid/media/MediaMuxer;->mCloseGuard:Ldalvik/system/CloseGuard;
+Landroid/media/MediaMuxer;->mNativeObject:J
+Landroid/media/MediaMuxer;->mState:I
+Landroid/media/MediaMuxer;->nativeRelease(J)V
+Landroid/media/MediaMuxer;->nativeSetup(Ljava/io/FileDescriptor;I)J
+Landroid/media/MediaPlayer$TrackInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/media/MediaPlayer2$TrackInfo;->getLanguage()Ljava/lang/String;
+Landroid/media/MediaPlayer2$TrackInfo;->getTrackType()I
+Landroid/media/MediaPlayer;->addSubtitleSource(Ljava/io/InputStream;Landroid/media/MediaFormat;)V
+Landroid/media/MediaPlayer;->BYPASS_METADATA_FILTER:Z
+Landroid/media/MediaPlayer;->getMediaTimeProvider()Landroid/media/MediaTimeProvider;
+Landroid/media/MediaPlayer;->getMetadata(ZZ)Landroid/media/Metadata;
+Landroid/media/MediaPlayer;->invoke(Landroid/os/Parcel;Landroid/os/Parcel;)V
+Landroid/media/MediaPlayer;->METADATA_ALL:Z
+Landroid/media/MediaPlayer;->mEventHandler:Landroid/media/MediaPlayer$EventHandler;
+Landroid/media/MediaPlayer;->mOnCompletionListener:Landroid/media/MediaPlayer$OnCompletionListener;
+Landroid/media/MediaPlayer;->mOnErrorListener:Landroid/media/MediaPlayer$OnErrorListener;
+Landroid/media/MediaPlayer;->mOnInfoListener:Landroid/media/MediaPlayer$OnInfoListener;
+Landroid/media/MediaPlayer;->mOnPreparedListener:Landroid/media/MediaPlayer$OnPreparedListener;
+Landroid/media/MediaPlayer;->mOnSeekCompleteListener:Landroid/media/MediaPlayer$OnSeekCompleteListener;
+Landroid/media/MediaPlayer;->mOnTimedTextListener:Landroid/media/MediaPlayer$OnTimedTextListener;
+Landroid/media/MediaPlayer;->newRequest()Landroid/os/Parcel;
+Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;Ljava/util/Map;)V
+Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;)V
+Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;Ljava/util/List;)V
+Landroid/media/MediaPlayer;->setParameter(ILandroid/os/Parcel;)Z
+Landroid/media/MediaPlayer;->setRetransmitEndpoint(Ljava/net/InetSocketAddress;)V
+Landroid/media/MediaPlayer;->setSubtitleAnchor(Landroid/media/SubtitleController;Landroid/media/SubtitleController$Anchor;)V
+Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;
+Landroid/media/MediaRecorder;->mFd:Ljava/io/FileDescriptor;
+Landroid/media/MediaRecorder;->mOnErrorListener:Landroid/media/MediaRecorder$OnErrorListener;
+Landroid/media/MediaRecorder;->mOnInfoListener:Landroid/media/MediaRecorder$OnInfoListener;
+Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;
+Landroid/media/MediaRecorder;->mSurface:Landroid/view/Surface;
+Landroid/media/MediaRecorder;->native_finalize()V
+Landroid/media/MediaRecorder;->native_init()V
+Landroid/media/MediaRecorder;->native_reset()V
+Landroid/media/MediaRecorder;->native_setup(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V
+Landroid/media/MediaRecorder;->_prepare()V
+Landroid/media/MediaRouter$RouteInfo;->getDeviceAddress()Ljava/lang/String;
+Landroid/media/MediaRouter$RouteInfo;->getName(Landroid/content/res/Resources;)Ljava/lang/CharSequence;
+Landroid/media/MediaRouter$RouteInfo;->getStatusCode()I
+Landroid/media/MediaRouter$RouteInfo;->isDefault()Z
+Landroid/media/MediaRouter$RouteInfo;->isSelected()Z
+Landroid/media/MediaRouter$RouteInfo;->matchesTypes(I)Z
+Landroid/media/MediaRouter$RouteInfo;->mNameResId:I
+Landroid/media/MediaRouter$RouteInfo;->select()V
+Landroid/media/MediaRouter$RouteInfo;->STATUS_CONNECTING:I
+Landroid/media/MediaRouter;->getSelectedRoute()Landroid/media/MediaRouter$RouteInfo;
+Landroid/media/MediaRouter;->selectRouteInt(ILandroid/media/MediaRouter$RouteInfo;Z)V
+Landroid/media/MediaScanner$FileEntry;-><init>(JLjava/lang/String;JI)V
+Landroid/media/MediaScanner$FileEntry;->mLastModifiedChanged:Z
+Landroid/media/MediaScanner$FileEntry;->mRowId:J
+Landroid/media/MediaScanner$MyMediaScannerClient;->beginFile(Ljava/lang/String;Ljava/lang/String;JJZZ)Landroid/media/MediaScanner$FileEntry;
+Landroid/media/MediaScanner$MyMediaScannerClient;->doScanFile(Ljava/lang/String;Ljava/lang/String;JJZZZ)Landroid/net/Uri;
+Landroid/media/MediaScanner$MyMediaScannerClient;->endFile(Landroid/media/MediaScanner$FileEntry;ZZZZZ)Landroid/net/Uri;
+Landroid/media/MediaScanner$MyMediaScannerClient;->getFileTypeFromDrm(Ljava/lang/String;)I
+Landroid/media/MediaScanner$MyMediaScannerClient;->handleStringTag(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/media/MediaScanner$MyMediaScannerClient;->mFileType:I
+Landroid/media/MediaScanner$MyMediaScannerClient;->mIsDrm:Z
+Landroid/media/MediaScanner$MyMediaScannerClient;->mMimeType:Ljava/lang/String;
+Landroid/media/MediaScanner$MyMediaScannerClient;->mNoMedia:Z
+Landroid/media/MediaScanner$MyMediaScannerClient;->mPath:Ljava/lang/String;
+Landroid/media/MediaScanner$MyMediaScannerClient;->scanFile(Ljava/lang/String;JJZZ)V
+Landroid/media/MediaScanner$MyMediaScannerClient;->setMimeType(Ljava/lang/String;)V
+Landroid/media/MediaScanner$MyMediaScannerClient;->toValues()Landroid/content/ContentValues;
+Landroid/media/MediaScanner;-><init>(Landroid/content/Context;Ljava/lang/String;)V
+Landroid/media/MediaScanner;->FILES_PRESCAN_PROJECTION:[Ljava/lang/String;
+Landroid/media/MediaScanner;->isDrmEnabled()Z
+Landroid/media/MediaScanner;->isNoMediaPath(Ljava/lang/String;)Z
+Landroid/media/MediaScanner;->makeEntryFor(Ljava/lang/String;)Landroid/media/MediaScanner$FileEntry;
+Landroid/media/MediaScanner;->mAudioUri:Landroid/net/Uri;
+Landroid/media/MediaScanner;->mClient:Landroid/media/MediaScanner$MyMediaScannerClient;
+Landroid/media/MediaScanner;->mContext:Landroid/content/Context;
+Landroid/media/MediaScanner;->mDefaultAlarmAlertFilename:Ljava/lang/String;
+Landroid/media/MediaScanner;->mDefaultNotificationFilename:Ljava/lang/String;
+Landroid/media/MediaScanner;->mDefaultRingtoneFilename:Ljava/lang/String;
+Landroid/media/MediaScanner;->mFilesUri:Landroid/net/Uri;
+Landroid/media/MediaScanner;->mMediaInserter:Landroid/media/MediaInserter;
+Landroid/media/MediaScanner;->mPackageName:Ljava/lang/String;
+Landroid/media/MediaScanner;->postscan([Ljava/lang/String;)V
+Landroid/media/MediaScanner;->prescan(Ljava/lang/String;Z)V
+Landroid/media/MediaScanner;->scanSingleFile(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;
+Landroid/media/MediaScanner;->setLocale(Ljava/lang/String;)V
+Landroid/media/Metadata;-><init>()V
+Landroid/media/Metadata;->getBoolean(I)Z
+Landroid/media/Metadata;->getByteArray(I)[B
+Landroid/media/Metadata;->getDate(I)Ljava/util/Date;
+Landroid/media/Metadata;->getDouble(I)D
+Landroid/media/Metadata;->getInt(I)I
+Landroid/media/Metadata;->getLong(I)J
+Landroid/media/Metadata;->getString(I)Ljava/lang/String;
+Landroid/media/Metadata;->has(I)Z
+Landroid/media/Metadata;->keySet()Ljava/util/Set;
+Landroid/media/Metadata;->parse(Landroid/os/Parcel;)Z
+Landroid/media/Metadata;->PAUSE_AVAILABLE:I
+Landroid/media/Metadata;->SEEK_AVAILABLE:I
+Landroid/media/Metadata;->SEEK_BACKWARD_AVAILABLE:I
+Landroid/media/Metadata;->SEEK_FORWARD_AVAILABLE:I
+Landroid/media/MicrophoneInfo;-><init>(Ljava/lang/String;ILjava/lang/String;IIILandroid/media/MicrophoneInfo$Coordinate3F;Landroid/media/MicrophoneInfo$Coordinate3F;Ljava/util/List;Ljava/util/List;FFFI)V
+Landroid/media/MiniThumbFile;->reset()V
+Landroid/media/PlaybackParams;->mAudioFallbackMode:I
+Landroid/media/PlaybackParams;->mAudioStretchMode:I
+Landroid/media/PlaybackParams;->mPitch:F
+Landroid/media/PlaybackParams;->mSet:I
+Landroid/media/PlaybackParams;->mSpeed:F
+Landroid/media/PlaybackParams;->SET_AUDIO_FALLBACK_MODE:I
+Landroid/media/PlaybackParams;->SET_AUDIO_STRETCH_MODE:I
+Landroid/media/PlaybackParams;->SET_PITCH:I
+Landroid/media/PlaybackParams;->SET_SPEED:I
+Landroid/media/projection/IMediaProjectionManager;->hasProjectionPermission(ILjava/lang/String;)Z
+Landroid/media/RemoteControlClient;->MEDIA_POSITION_READABLE:I
+Landroid/media/RemoteControlClient;->MEDIA_POSITION_WRITABLE:I
+Landroid/media/RemoteController;->getUpdateListener()Landroid/media/RemoteController$OnClientUpdateListener;
+Landroid/media/RemoteController;->mCurrentSession:Landroid/media/session/MediaController;
+Landroid/media/RemoteController;->setArtworkConfiguration(ZII)Z
+Landroid/media/RemoteDisplay;->dispose()V
+Landroid/media/RemoteDisplay;->notifyDisplayConnected(Landroid/view/Surface;IIII)V
+Landroid/media/RemoteDisplay;->notifyDisplayDisconnected()V
+Landroid/media/RemoteDisplay;->notifyDisplayError(I)V
+Landroid/media/RemoteDisplayState;-><init>()V
+Landroid/media/RemoteDisplayState;->displays:Ljava/util/ArrayList;
+Landroid/media/Ringtone;-><init>(Landroid/content/Context;Z)V
+Landroid/media/Ringtone;->getUri()Landroid/net/Uri;
+Landroid/media/Ringtone;->mLocalPlayer:Landroid/media/MediaPlayer;
+Landroid/media/Ringtone;->mUri:Landroid/net/Uri;
+Landroid/media/Ringtone;->setUri(Landroid/net/Uri;)V
+Landroid/media/RingtoneManager;->getInternalRingtones()Landroid/database/Cursor;
+Landroid/media/RingtoneManager;->getMediaRingtones(Landroid/content/Context;)Landroid/database/Cursor;
+Landroid/media/RingtoneManager;->getRingtone(Landroid/content/Context;Landroid/net/Uri;I)Landroid/media/Ringtone;
+Landroid/media/RingtoneManager;->mCursor:Landroid/database/Cursor;
+Landroid/media/session/ISessionManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/session/ISessionManager;
+Landroid/media/session/MediaController;->controlsSameSession(Landroid/media/session/MediaController;)Z
+Landroid/media/session/MediaSession$QueueItem;->mId:J
+Landroid/media/session/MediaSession;->getCallingPackage()Ljava/lang/String;
+Landroid/media/session/MediaSession;->mCallback:Landroid/media/session/MediaSession$CallbackMessageHandler;
+Landroid/media/session/MediaSessionLegacyHelper;->getHelper(Landroid/content/Context;)Landroid/media/session/MediaSessionLegacyHelper;
+Landroid/media/session/MediaSessionManager;->getActiveSessionsForUser(Landroid/content/ComponentName;I)Ljava/util/List;
+Landroid/media/soundtrigger/SoundTriggerDetector$EventPayload;->getCaptureSession()Ljava/lang/Integer;
+Landroid/media/soundtrigger/SoundTriggerDetector$EventPayload;->getData()[B
+Landroid/media/soundtrigger/SoundTriggerManager;->isRecognitionActive(Ljava/util/UUID;)Z
+Landroid/media/soundtrigger/SoundTriggerManager;->loadSoundModel(Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;)I
+Landroid/media/soundtrigger/SoundTriggerManager;->startRecognition(Ljava/util/UUID;Landroid/app/PendingIntent;Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;)I
+Landroid/media/soundtrigger/SoundTriggerManager;->startRecognition(Ljava/util/UUID;Landroid/os/Bundle;Landroid/content/ComponentName;Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;)I
+Landroid/media/soundtrigger/SoundTriggerManager;->stopRecognition(Ljava/util/UUID;)I
+Landroid/media/soundtrigger/SoundTriggerManager;->unloadSoundModel(Ljava/util/UUID;)I
+Landroid/media/SubtitleController;-><init>(Landroid/content/Context;Landroid/media/MediaTimeProvider;Landroid/media/SubtitleController$Listener;)V
+Landroid/media/SubtitleController;->hide()V
+Landroid/media/SubtitleController;->mHandler:Landroid/os/Handler;
+Landroid/media/SubtitleController;->registerRenderer(Landroid/media/SubtitleController$Renderer;)V
+Landroid/media/SubtitleController;->reset()V
+Landroid/media/SubtitleController;->show()V
+Landroid/media/SubtitleTrack$RenderingWidget;->draw(Landroid/graphics/Canvas;)V
+Landroid/media/SubtitleTrack$RenderingWidget;->onAttachedToWindow()V
+Landroid/media/SubtitleTrack$RenderingWidget;->onDetachedFromWindow()V
+Landroid/media/SubtitleTrack$RenderingWidget;->setOnChangedListener(Landroid/media/SubtitleTrack$RenderingWidget$OnChangedListener;)V
+Landroid/media/SubtitleTrack$RenderingWidget;->setSize(II)V
+Landroid/media/ThumbnailUtils;->closeSilently(Landroid/os/ParcelFileDescriptor;)V
+Landroid/media/ThumbnailUtils;->computeInitialSampleSize(Landroid/graphics/BitmapFactory$Options;II)I
+Landroid/media/ThumbnailUtils;->computeSampleSize(Landroid/graphics/BitmapFactory$Options;II)I
+Landroid/media/ThumbnailUtils;->createImageThumbnail(Ljava/lang/String;I)Landroid/graphics/Bitmap;
+Landroid/media/ThumbnailUtils;->createThumbnailFromEXIF(Ljava/lang/String;IILandroid/media/ThumbnailUtils$SizedThumbnailBitmap;)V
+Landroid/media/ThumbnailUtils;->makeInputStream(Landroid/net/Uri;Landroid/content/ContentResolver;)Landroid/os/ParcelFileDescriptor;
+Landroid/media/ThumbnailUtils;->TARGET_SIZE_MICRO_THUMBNAIL:I
+Landroid/media/ThumbnailUtils;->transform(Landroid/graphics/Matrix;Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;
+Landroid/media/TimedText;->getObject(I)Ljava/lang/Object;
+Landroid/media/ToneGenerator;->mNativeContext:J
+Landroid/media/TtmlRenderer;-><init>(Landroid/content/Context;)V
+Landroid/media/tv/ITvRemoteProvider$Stub;-><init>()V
+Landroid/media/tv/ITvRemoteServiceInput;->clearInputBridge(Landroid/os/IBinder;)V
+Landroid/media/tv/ITvRemoteServiceInput;->closeInputBridge(Landroid/os/IBinder;)V
+Landroid/media/tv/ITvRemoteServiceInput;->openInputBridge(Landroid/os/IBinder;Ljava/lang/String;III)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendKeyDown(Landroid/os/IBinder;I)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendKeyUp(Landroid/os/IBinder;I)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendPointerDown(Landroid/os/IBinder;III)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendPointerSync(Landroid/os/IBinder;)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendPointerUp(Landroid/os/IBinder;I)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendTimestamp(Landroid/os/IBinder;J)V
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_16_9:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_1_1:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_2_3:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_3_2:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->ASPECT_RATIO_4_3:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->AVAILABILITY_AVAILABLE:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->AVAILABILITY_FREE_WITH_SUBSCRIPTION:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->AVAILABILITY_PAID_CONTENT:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_AUTHOR:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_AVAILABILITY:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_BROWSABLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_CONTENT_ID:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_DURATION_MILLIS:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_INTENT_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_INTERACTION_COUNT:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_INTERACTION_TYPE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_INTERNAL_PROVIDER_ID:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_ITEM_COUNT:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_LAST_PLAYBACK_POSITION_MILLIS:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_LIVE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_LOGO_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_OFFER_PRICE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_POSTER_ART_ASPECT_RATIO:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_PREVIEW_VIDEO_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_RELEASE_DATE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_STARTING_PRICE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_THUMBNAIL_ASPECT_RATIO:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_TRANSIENT:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->COLUMN_TYPE:Ljava/lang/String;
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_FANS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_FOLLOWERS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_LIKES:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_LISTENS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_THUMBS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_VIEWERS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->INTERACTION_TYPE_VIEWS:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_ALBUM:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_ARTIST:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_CHANNEL:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_CLIP:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_EVENT:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_MOVIE:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_PLAYLIST:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_STATION:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_TRACK:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_TV_EPISODE:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_TV_SEASON:I
+Landroid/media/tv/TvContract$PreviewProgramColumns;->TYPE_TV_SERIES:I
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_AUDIO_LANGUAGE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_CANONICAL_GENRE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_CONTENT_RATING:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_EPISODE_DISPLAY_NUMBER:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_EPISODE_TITLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_DATA:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_FLAG1:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_FLAG2:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_FLAG3:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_INTERNAL_PROVIDER_FLAG4:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_LONG_DESCRIPTION:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_POSTER_ART_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_REVIEW_RATING:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_REVIEW_RATING_STYLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_SEARCHABLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_SEASON_DISPLAY_NUMBER:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_SEASON_TITLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_SHORT_DESCRIPTION:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_THUMBNAIL_URI:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_TITLE:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_VERSION_NUMBER:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_VIDEO_HEIGHT:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->COLUMN_VIDEO_WIDTH:Ljava/lang/String;
+Landroid/media/tv/TvContract$ProgramColumns;->REVIEW_RATING_STYLE_PERCENTAGE:I
+Landroid/media/tv/TvContract$ProgramColumns;->REVIEW_RATING_STYLE_STARS:I
+Landroid/media/tv/TvContract$ProgramColumns;->REVIEW_RATING_STYLE_THUMBS_UP_DOWN:I
+Landroid/media/tv/TvInputInfo;->getComponent()Landroid/content/ComponentName;
+Landroid/media/tv/TvInputManager$Hardware;->dispatchKeyEventToHdmi(Landroid/view/KeyEvent;)Z
+Landroid/media/tv/TvInputManager;->acquireTvInputHardware(ILandroid/media/tv/TvInputManager$HardwareCallback;Landroid/media/tv/TvInputInfo;)Landroid/media/tv/TvInputManager$Hardware;
+Landroid/media/tv/TvInputService$Session;->mOverlayFrame:Landroid/graphics/Rect;
+Landroid/media/tv/TvView;->requestUnblockContent(Landroid/media/tv/TvContentRating;)V
+Landroid/media/VolumeShaper$Configuration;-><init>(IIIDI[F[F)V
+Landroid/media/VolumeShaper$Configuration;->mDurationMs:D
+Landroid/media/VolumeShaper$Configuration;->mId:I
+Landroid/media/VolumeShaper$Configuration;->mInterpolatorType:I
+Landroid/media/VolumeShaper$Configuration;->mOptionFlags:I
+Landroid/media/VolumeShaper$Configuration;->mTimes:[F
+Landroid/media/VolumeShaper$Configuration;->mType:I
+Landroid/media/VolumeShaper$Configuration;->mVolumes:[F
+Landroid/media/VolumeShaper$Operation;-><init>(IIF)V
+Landroid/media/VolumeShaper$Operation;->mFlags:I
+Landroid/media/VolumeShaper$Operation;->mReplaceId:I
+Landroid/media/VolumeShaper$Operation;->mXOffset:F
+Landroid/media/VolumeShaper$State;-><init>(FF)V
+Landroid/media/VolumeShaper$State;->mVolume:F
+Landroid/media/VolumeShaper$State;->mXOffset:F
+Landroid/media/WebVttRenderer;-><init>(Landroid/content/Context;)V
+Landroid/mtp/MtpPropertyList;->append(IIIJ)V
+Landroid/mtp/MtpPropertyList;->append(IILjava/lang/String;)V
+Landroid/mtp/MtpStorage;->getPath()Ljava/lang/String;
+Landroid/mtp/MtpStorage;->getStorageId()I
+Landroid/net/ConnectivityManager$PacketKeepalive;->stop()V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;-><init>()V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onError(I)V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStarted()V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStopped()V
+Landroid/net/ConnectivityManager;->ACTION_TETHER_STATE_CHANGED:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->EXTRA_ACTIVE_TETHER:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->EXTRA_AVAILABLE_TETHER:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->EXTRA_ERRORED_TETHER:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->from(Landroid/content/Context;)Landroid/net/ConnectivityManager;
+Landroid/net/ConnectivityManager;->getActiveLinkProperties()Landroid/net/LinkProperties;
+Landroid/net/ConnectivityManager;->getActiveNetworkInfoForUid(I)Landroid/net/NetworkInfo;
+Landroid/net/ConnectivityManager;->getActiveNetworkQuotaInfo()Landroid/net/NetworkQuotaInfo;
+Landroid/net/ConnectivityManager;->getDefaultNetworkCapabilitiesForUser(I)[Landroid/net/NetworkCapabilities;
+Landroid/net/ConnectivityManager;->getInstance()Landroid/net/ConnectivityManager;
+Landroid/net/ConnectivityManager;->getLastTetherError(Ljava/lang/String;)I
+Landroid/net/ConnectivityManager;->getLinkProperties(I)Landroid/net/LinkProperties;
+Landroid/net/ConnectivityManager;->getMobileDataEnabled()Z
+Landroid/net/ConnectivityManager;->getNetworkForType(I)Landroid/net/Network;
+Landroid/net/ConnectivityManager;->getNetworkTypeName(I)Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetherableBluetoothRegexs()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetherableIfaces()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetherableUsbRegexs()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetherableWifiRegexs()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetheredIfaces()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->getTetheringErroredIfaces()[Ljava/lang/String;
+Landroid/net/ConnectivityManager;->INET_CONDITION_ACTION:Ljava/lang/String;
+Landroid/net/ConnectivityManager;->isNetworkSupported(I)Z
+Landroid/net/ConnectivityManager;->isNetworkTypeMobile(I)Z
+Landroid/net/ConnectivityManager;->mService:Landroid/net/IConnectivityManager;
+Landroid/net/ConnectivityManager;->networkCapabilitiesForFeature(ILjava/lang/String;)Landroid/net/NetworkCapabilities;
+Landroid/net/ConnectivityManager;->registerNetworkFactory(Landroid/os/Messenger;Ljava/lang/String;)V
+Landroid/net/ConnectivityManager;->removeRequestForFeature(Landroid/net/NetworkCapabilities;)Z
+Landroid/net/ConnectivityManager;->requestNetworkForFeatureLocked(Landroid/net/NetworkCapabilities;)Landroid/net/NetworkRequest;
+Landroid/net/ConnectivityManager;->requestRouteToHost(II)Z
+Landroid/net/ConnectivityManager;->requestRouteToHostAddress(ILjava/net/InetAddress;)Z
+Landroid/net/ConnectivityManager;->setAirplaneMode(Z)V
+Landroid/net/ConnectivityManager;->setBackgroundDataSetting(Z)V
+Landroid/net/ConnectivityManager;->setProcessDefaultNetworkForHostResolution(Landroid/net/Network;)Z
+Landroid/net/ConnectivityManager;->setUsbTethering(Z)I
+Landroid/net/ConnectivityManager;->sLegacyRequests:Ljava/util/HashMap;
+Landroid/net/ConnectivityManager;->startNattKeepalive(Landroid/net/Network;ILandroid/net/ConnectivityManager$PacketKeepaliveCallback;Ljava/net/InetAddress;ILjava/net/InetAddress;)Landroid/net/ConnectivityManager$PacketKeepalive;
+Landroid/net/ConnectivityManager;->startUsingNetworkFeature(ILjava/lang/String;)I
+Landroid/net/ConnectivityManager;->stopUsingNetworkFeature(ILjava/lang/String;)I
+Landroid/net/ConnectivityManager;->tether(Ljava/lang/String;)I
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_CBS:I
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_EMERGENCY:I
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_FOTA:I
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_IA:I
+Landroid/net/ConnectivityManager;->TYPE_MOBILE_IMS:I
+Landroid/net/ConnectivityManager;->TYPE_NONE:I
+Landroid/net/ConnectivityManager;->TYPE_PROXY:I
+Landroid/net/ConnectivityManager;->TYPE_WIFI_P2P:I
+Landroid/net/ConnectivityManager;->unregisterNetworkFactory(Landroid/os/Messenger;)V
+Landroid/net/ConnectivityManager;->untether(Ljava/lang/String;)I
+Landroid/net/DhcpResults;-><init>()V
+Landroid/net/DhcpResults;-><init>(Landroid/net/DhcpResults;)V
+Landroid/net/DhcpResults;-><init>(Landroid/net/StaticIpConfiguration;)V
+Landroid/net/DhcpResults;->leaseDuration:I
+Landroid/net/DhcpResults;->mtu:I
+Landroid/net/DhcpResults;->serverAddress:Ljava/net/Inet4Address;
+Landroid/net/DhcpResults;->vendorInfo:Ljava/lang/String;
+Landroid/net/EthernetManager$Listener;->onAvailabilityChanged(Ljava/lang/String;Z)V
+Landroid/net/EthernetManager;->addListener(Landroid/net/EthernetManager$Listener;)V
+Landroid/net/EthernetManager;->getAvailableInterfaces()[Ljava/lang/String;
+Landroid/net/EthernetManager;->getConfiguration(Ljava/lang/String;)Landroid/net/IpConfiguration;
+Landroid/net/EthernetManager;->isAvailable()Z
+Landroid/net/EthernetManager;->isAvailable(Ljava/lang/String;)Z
+Landroid/net/EthernetManager;->removeListener(Landroid/net/EthernetManager$Listener;)V
+Landroid/net/EthernetManager;->setConfiguration(Ljava/lang/String;Landroid/net/IpConfiguration;)V
+Landroid/net/http/SslCertificate;->getDigest(Ljava/security/cert/X509Certificate;Ljava/lang/String;)Ljava/lang/String;
+Landroid/net/http/SslCertificate;->getSerialNumber(Ljava/security/cert/X509Certificate;)Ljava/lang/String;
+Landroid/net/http/SslCertificate;->inflateCertificateView(Landroid/content/Context;)Landroid/view/View;
+Landroid/net/http/SslCertificate;->mX509Certificate:Ljava/security/cert/X509Certificate;
+Landroid/net/http/SslError;->mCertificate:Landroid/net/http/SslCertificate;
+Landroid/net/http/SslError;->mErrors:I
+Landroid/net/http/SslError;->mUrl:Ljava/lang/String;
+Landroid/net/IConnectivityManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/net/IConnectivityManager$Stub$Proxy;->getActiveLinkProperties()Landroid/net/LinkProperties;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getActiveNetworkInfo()Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getAllNetworkInfo()[Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getAllNetworks()[Landroid/net/Network;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getTetherableIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getTetherableUsbRegexs()[Ljava/lang/String;
+Landroid/net/IConnectivityManager$Stub$Proxy;->getTetheredIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/net/IConnectivityManager$Stub;-><init>()V
+Landroid/net/IConnectivityManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/IConnectivityManager;
+Landroid/net/IConnectivityManager;->getActiveLinkProperties()Landroid/net/LinkProperties;
+Landroid/net/IConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager;->getAllNetworkInfo()[Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager;->getAllNetworkState()[Landroid/net/NetworkState;
+Landroid/net/IConnectivityManager;->getLastTetherError(Ljava/lang/String;)I
+Landroid/net/IConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
+Landroid/net/IConnectivityManager;->getTetherableIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getTetherableUsbRegexs()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getTetherableWifiRegexs()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getTetheredIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getTetheringErroredIfaces()[Ljava/lang/String;
+Landroid/net/IConnectivityManager;->reportInetCondition(II)V
+Landroid/net/IConnectivityManager;->setAirplaneMode(Z)V
+Landroid/net/IConnectivityManager;->startLegacyVpn(Lcom/android/internal/net/VpnProfile;)V
+Landroid/net/INetd$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetd;
+Landroid/net/INetd;->interfaceAddAddress(Ljava/lang/String;Ljava/lang/String;I)V
+Landroid/net/INetworkManagementEventObserver$Stub;-><init>()V
+Landroid/net/INetworkPolicyListener$Stub;-><init>()V
+Landroid/net/INetworkPolicyManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetworkPolicyManager;
+Landroid/net/INetworkPolicyManager;->getNetworkQuotaInfo(Landroid/net/NetworkState;)Landroid/net/NetworkQuotaInfo;
+Landroid/net/INetworkPolicyManager;->getRestrictBackground()Z
+Landroid/net/INetworkPolicyManager;->getUidPolicy(I)I
+Landroid/net/INetworkPolicyManager;->setNetworkPolicies([Landroid/net/NetworkPolicy;)V
+Landroid/net/INetworkPolicyManager;->setRestrictBackground(Z)V
+Landroid/net/INetworkPolicyManager;->setUidPolicy(II)V
+Landroid/net/INetworkPolicyManager;->snoozeLimit(Landroid/net/NetworkTemplate;)V
+Landroid/net/INetworkScoreService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetworkScoreService;
+Landroid/net/INetworkStatsService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/net/INetworkStatsService$Stub$Proxy;->getMobileIfaces()[Ljava/lang/String;
+Landroid/net/INetworkStatsService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetworkStatsService;
+Landroid/net/INetworkStatsService;->forceUpdate()V
+Landroid/net/INetworkStatsService;->getMobileIfaces()[Ljava/lang/String;
+Landroid/net/INetworkStatsService;->openSession()Landroid/net/INetworkStatsSession;
+Landroid/net/INetworkStatsService;->openSessionForUsageStats(ILjava/lang/String;)Landroid/net/INetworkStatsSession;
+Landroid/net/INetworkStatsSession;->close()V
+Landroid/net/INetworkStatsSession;->getHistoryForNetwork(Landroid/net/NetworkTemplate;I)Landroid/net/NetworkStatsHistory;
+Landroid/net/INetworkStatsSession;->getHistoryForUid(Landroid/net/NetworkTemplate;IIII)Landroid/net/NetworkStatsHistory;
+Landroid/net/INetworkStatsSession;->getSummaryForAllUid(Landroid/net/NetworkTemplate;JJZ)Landroid/net/NetworkStats;
+Landroid/net/INetworkStatsSession;->getSummaryForNetwork(Landroid/net/NetworkTemplate;JJ)Landroid/net/NetworkStats;
+Landroid/net/InterfaceConfiguration;-><init>()V
+Landroid/net/InterfaceConfiguration;->clearFlag(Ljava/lang/String;)V
+Landroid/net/InterfaceConfiguration;->getFlags()Ljava/lang/Iterable;
+Landroid/net/InterfaceConfiguration;->setFlag(Ljava/lang/String;)V
+Landroid/net/InterfaceConfiguration;->setInterfaceDown()V
+Landroid/net/InterfaceConfiguration;->setInterfaceUp()V
+Landroid/net/InterfaceConfiguration;->setLinkAddress(Landroid/net/LinkAddress;)V
+Landroid/net/IpConfiguration$IpAssignment;->STATIC:Landroid/net/IpConfiguration$IpAssignment;
+Landroid/net/IpConfiguration$ProxySettings;->NONE:Landroid/net/IpConfiguration$ProxySettings;
+Landroid/net/IpConfiguration;-><init>(Landroid/net/IpConfiguration$IpAssignment;Landroid/net/IpConfiguration$ProxySettings;Landroid/net/StaticIpConfiguration;Landroid/net/ProxyInfo;)V
+Landroid/net/IpConfiguration;->httpProxy:Landroid/net/ProxyInfo;
+Landroid/net/LinkAddress;-><init>(Ljava/lang/String;)V
+Landroid/net/LinkAddress;-><init>(Ljava/net/InetAddress;I)V
+Landroid/net/LinkAddress;->address:Ljava/net/InetAddress;
+Landroid/net/LinkAddress;->getNetworkPrefixLength()I
+Landroid/net/LinkAddress;->isIPv6()Z
+Landroid/net/LinkAddress;->isSameAddressAs(Landroid/net/LinkAddress;)Z
+Landroid/net/LinkAddress;->prefixLength:I
+Landroid/net/LinkProperties$ProvisioningChange;->GAINED_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->LOST_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->STILL_NOT_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->STILL_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->values()[Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties;-><init>()V
+Landroid/net/LinkProperties;-><init>(Landroid/net/LinkProperties;)V
+Landroid/net/LinkProperties;->addDnsServer(Ljava/net/InetAddress;)Z
+Landroid/net/LinkProperties;->addLinkAddress(Landroid/net/LinkAddress;)Z
+Landroid/net/LinkProperties;->addRoute(Landroid/net/RouteInfo;)Z
+Landroid/net/LinkProperties;->addStackedLink(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->clear()V
+Landroid/net/LinkProperties;->compareProvisioning(Landroid/net/LinkProperties;Landroid/net/LinkProperties;)Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties;->getAddresses()Ljava/util/List;
+Landroid/net/LinkProperties;->getAllAddresses()Ljava/util/List;
+Landroid/net/LinkProperties;->getAllInterfaceNames()Ljava/util/List;
+Landroid/net/LinkProperties;->getAllLinkAddresses()Ljava/util/List;
+Landroid/net/LinkProperties;->getAllRoutes()Ljava/util/List;
+Landroid/net/LinkProperties;->getMtu()I
+Landroid/net/LinkProperties;->getStackedLinks()Ljava/util/List;
+Landroid/net/LinkProperties;->hasGlobalIPv6Address()Z
+Landroid/net/LinkProperties;->hasIPv4Address()Z
+Landroid/net/LinkProperties;->hasIPv4DefaultRoute()Z
+Landroid/net/LinkProperties;->hasIPv4DnsServer()Z
+Landroid/net/LinkProperties;->hasIPv6DefaultRoute()Z
+Landroid/net/LinkProperties;->hasIPv6DnsServer()Z
+Landroid/net/LinkProperties;->isIdenticalAddresses(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalDnses(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalHttpProxy(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalInterfaceName(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalRoutes(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalStackedLinks(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIPv6Provisioned()Z
+Landroid/net/LinkProperties;->isProvisioned()Z
+Landroid/net/LinkProperties;->isReachable(Ljava/net/InetAddress;)Z
+Landroid/net/LinkProperties;->mIfaceName:Ljava/lang/String;
+Landroid/net/LinkProperties;->removeDnsServer(Ljava/net/InetAddress;)Z
+Landroid/net/LinkProperties;->removeRoute(Landroid/net/RouteInfo;)Z
+Landroid/net/LinkProperties;->setDnsServers(Ljava/util/Collection;)V
+Landroid/net/LinkProperties;->setDomains(Ljava/lang/String;)V
+Landroid/net/LinkProperties;->setHttpProxy(Landroid/net/ProxyInfo;)V
+Landroid/net/LinkProperties;->setInterfaceName(Ljava/lang/String;)V
+Landroid/net/LinkProperties;->setLinkAddresses(Ljava/util/Collection;)V
+Landroid/net/LinkProperties;->setMtu(I)V
+Landroid/net/LinkProperties;->setTcpBufferSizes(Ljava/lang/String;)V
+Landroid/net/LinkQualityInfo;->setDataSampleDuration(I)V
+Landroid/net/LinkQualityInfo;->setLastDataSampleTime(J)V
+Landroid/net/LinkQualityInfo;->setPacketCount(J)V
+Landroid/net/LinkQualityInfo;->setPacketErrorCount(J)V
+Landroid/net/LocalSocket;->impl:Landroid/net/LocalSocketImpl;
+Landroid/net/LocalSocketImpl;-><init>()V
+Landroid/net/LocalSocketImpl;->inboundFileDescriptors:[Ljava/io/FileDescriptor;
+Landroid/net/LocalSocketImpl;->outboundFileDescriptors:[Ljava/io/FileDescriptor;
+Landroid/net/MacAddress;->ALL_ZEROS_ADDRESS:Landroid/net/MacAddress;
+Landroid/net/metrics/ApfProgramEvent;-><init>()V
+Landroid/net/metrics/ApfProgramEvent;->actualLifetime:J
+Landroid/net/metrics/ApfProgramEvent;->currentRas:I
+Landroid/net/metrics/ApfProgramEvent;->filteredRas:I
+Landroid/net/metrics/ApfProgramEvent;->flags:I
+Landroid/net/metrics/ApfProgramEvent;->flagsFor(ZZ)I
+Landroid/net/metrics/ApfProgramEvent;->lifetime:J
+Landroid/net/metrics/ApfProgramEvent;->programLength:I
+Landroid/net/metrics/ApfStats;-><init>()V
+Landroid/net/metrics/ApfStats;->droppedRas:I
+Landroid/net/metrics/ApfStats;->durationMs:J
+Landroid/net/metrics/ApfStats;->matchingRas:I
+Landroid/net/metrics/ApfStats;->maxProgramSize:I
+Landroid/net/metrics/ApfStats;->parseErrors:I
+Landroid/net/metrics/ApfStats;->programUpdates:I
+Landroid/net/metrics/ApfStats;->programUpdatesAll:I
+Landroid/net/metrics/ApfStats;->programUpdatesAllowingMulticast:I
+Landroid/net/metrics/ApfStats;->receivedRas:I
+Landroid/net/metrics/ApfStats;->zeroLifetimeRas:I
+Landroid/net/metrics/DhcpClientEvent;-><init>(Ljava/lang/String;I)V
+Landroid/net/metrics/DhcpErrorEvent;-><init>(I)V
+Landroid/net/metrics/DhcpErrorEvent;->BOOTP_TOO_SHORT:I
+Landroid/net/metrics/DhcpErrorEvent;->BUFFER_UNDERFLOW:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_BAD_MAGIC_COOKIE:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_INVALID_OPTION_LENGTH:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_COOKIE:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_MSG_TYPE:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_UNKNOWN_MSG_TYPE:I
+Landroid/net/metrics/DhcpErrorEvent;->errorCodeWithOption(II)I
+Landroid/net/metrics/DhcpErrorEvent;->L2_TOO_SHORT:I
+Landroid/net/metrics/DhcpErrorEvent;->L2_WRONG_ETH_TYPE:I
+Landroid/net/metrics/DhcpErrorEvent;->L3_INVALID_IP:I
+Landroid/net/metrics/DhcpErrorEvent;->L3_NOT_IPV4:I
+Landroid/net/metrics/DhcpErrorEvent;->L3_TOO_SHORT:I
+Landroid/net/metrics/DhcpErrorEvent;->L4_NOT_UDP:I
+Landroid/net/metrics/DhcpErrorEvent;->L4_WRONG_PORT:I
+Landroid/net/metrics/DhcpErrorEvent;->PARSING_ERROR:I
+Landroid/net/metrics/DhcpErrorEvent;->RECEIVE_ERROR:I
+Landroid/net/metrics/IpConnectivityLog;-><init>()V
+Landroid/net/metrics/IpConnectivityLog;->log(Landroid/os/Parcelable;)Z
+Landroid/net/metrics/IpConnectivityLog;->log(Ljava/lang/String;Landroid/os/Parcelable;)Z
+Landroid/net/metrics/IpManagerEvent;-><init>(IJ)V
+Landroid/net/metrics/IpReachabilityEvent;-><init>(I)V
+Landroid/net/metrics/IpReachabilityEvent;->nudFailureEventType(ZZ)I
+Landroid/net/metrics/RaEvent$Builder;-><init>()V
+Landroid/net/metrics/RaEvent$Builder;->build()Landroid/net/metrics/RaEvent;
+Landroid/net/metrics/RaEvent$Builder;->updateDnsslLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updatePrefixPreferredLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updatePrefixValidLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updateRdnssLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updateRouteInfoLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updateRouterLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/MobileLinkQualityInfo;-><init>()V
+Landroid/net/MobileLinkQualityInfo;->getMobileNetworkType()I
+Landroid/net/MobileLinkQualityInfo;->setCdmaDbm(I)V
+Landroid/net/MobileLinkQualityInfo;->setCdmaEcio(I)V
+Landroid/net/MobileLinkQualityInfo;->setEvdoDbm(I)V
+Landroid/net/MobileLinkQualityInfo;->setEvdoEcio(I)V
+Landroid/net/MobileLinkQualityInfo;->setEvdoSnr(I)V
+Landroid/net/MobileLinkQualityInfo;->setGsmErrorRate(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteCqi(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteRsrp(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteRsrq(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteRssnr(I)V
+Landroid/net/MobileLinkQualityInfo;->setLteSignalStrength(I)V
+Landroid/net/MobileLinkQualityInfo;->setMobileNetworkType(I)V
+Landroid/net/MobileLinkQualityInfo;->setRssi(I)V
+Landroid/net/Network;-><init>(I)V
+Landroid/net/Network;->netId:I
+Landroid/net/NetworkAgent;->sendNetworkInfo(Landroid/net/NetworkInfo;)V
+Landroid/net/NetworkBadging$Badging;
+Landroid/net/NetworkBadging;
+Landroid/net/NetworkBadging;->BADGING_4K:I
+Landroid/net/NetworkBadging;->BADGING_HD:I
+Landroid/net/NetworkBadging;->BADGING_NONE:I
+Landroid/net/NetworkBadging;->BADGING_SD:I
+Landroid/net/NetworkBadging;->getWifiIcon(IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
+Landroid/net/NetworkCapabilities;-><init>()V
+Landroid/net/NetworkCapabilities;->addCapability(I)Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkCapabilities;->addTransportType(I)Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkCapabilities;->getNetworkSpecifier()Landroid/net/NetworkSpecifier;
+Landroid/net/NetworkCapabilities;->getSignalStrength()I
+Landroid/net/NetworkCapabilities;->hasSignalStrength()Z
+Landroid/net/NetworkCapabilities;->mNetworkCapabilities:J
+Landroid/net/NetworkCapabilities;->mSignalStrength:I
+Landroid/net/NetworkCapabilities;->removeCapability(I)Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkCapabilities;->setSignalStrength(I)Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkCapabilities;->transportNamesOf([I)Ljava/lang/String;
+Landroid/net/NetworkFactory;-><init>(Landroid/os/Looper;Landroid/content/Context;Ljava/lang/String;Landroid/net/NetworkCapabilities;)V
+Landroid/net/NetworkFactory;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
+Landroid/net/NetworkFactory;->setScoreFilter(I)V
+Landroid/net/NetworkInfo;-><init>(IILjava/lang/String;Ljava/lang/String;)V
+Landroid/net/NetworkInfo;-><init>(Landroid/net/NetworkInfo;)V
+Landroid/net/NetworkInfo;->setDetailedState(Landroid/net/NetworkInfo$DetailedState;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/net/NetworkInfo;->setFailover(Z)V
+Landroid/net/NetworkInfo;->setIsAvailable(Z)V
+Landroid/net/NetworkInfo;->setRoaming(Z)V
+Landroid/net/NetworkInfo;->setSubtype(ILjava/lang/String;)V
+Landroid/net/NetworkPolicy;-><init>(Landroid/net/NetworkTemplate;ILjava/lang/String;JJJJZZ)V
+Landroid/net/NetworkPolicy;->clearSnooze()V
+Landroid/net/NetworkPolicy;->compareTo(Landroid/net/NetworkPolicy;)I
+Landroid/net/NetworkPolicy;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkPolicy;->inferred:Z
+Landroid/net/NetworkPolicy;->isOverLimit(J)Z
+Landroid/net/NetworkPolicy;->isOverWarning(J)Z
+Landroid/net/NetworkPolicy;->limitBytes:J
+Landroid/net/NetworkPolicy;->metered:Z
+Landroid/net/NetworkPolicy;->template:Landroid/net/NetworkTemplate;
+Landroid/net/NetworkPolicy;->warningBytes:J
+Landroid/net/NetworkPolicyManager;->from(Landroid/content/Context;)Landroid/net/NetworkPolicyManager;
+Landroid/net/NetworkPolicyManager;->getNetworkPolicies()[Landroid/net/NetworkPolicy;
+Landroid/net/NetworkPolicyManager;->getRestrictBackground()Z
+Landroid/net/NetworkPolicyManager;->getUidPolicy(I)I
+Landroid/net/NetworkPolicyManager;->getUidsWithPolicy(I)[I
+Landroid/net/NetworkPolicyManager;->mService:Landroid/net/INetworkPolicyManager;
+Landroid/net/NetworkPolicyManager;->registerListener(Landroid/net/INetworkPolicyListener;)V
+Landroid/net/NetworkPolicyManager;->setRestrictBackground(Z)V
+Landroid/net/NetworkPolicyManager;->setUidPolicy(II)V
+Landroid/net/NetworkPolicyManager;->unregisterListener(Landroid/net/INetworkPolicyListener;)V
+Landroid/net/NetworkQuotaInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkQuotaInfo;->getEstimatedBytes()J
+Landroid/net/NetworkQuotaInfo;->getHardLimitBytes()J
+Landroid/net/NetworkQuotaInfo;->getSoftLimitBytes()J
+Landroid/net/NetworkRequest$Builder;->clearCapabilities()Landroid/net/NetworkRequest$Builder;
+Landroid/net/NetworkRequest$Builder;->setSignalStrength(I)Landroid/net/NetworkRequest$Builder;
+Landroid/net/NetworkRequest;->legacyType:I
+Landroid/net/NetworkRequest;->networkCapabilities:Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkRequest;->requestId:I
+Landroid/net/NetworkState;-><init>(Landroid/os/Parcel;)V
+Landroid/net/NetworkState;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkState;->network:Landroid/net/Network;
+Landroid/net/NetworkStats$Entry;-><init>()V
+Landroid/net/NetworkStats$Entry;->iface:Ljava/lang/String;
+Landroid/net/NetworkStats$Entry;->rxBytes:J
+Landroid/net/NetworkStats$Entry;->rxPackets:J
+Landroid/net/NetworkStats$Entry;->set:I
+Landroid/net/NetworkStats$Entry;->tag:I
+Landroid/net/NetworkStats$Entry;->txBytes:J
+Landroid/net/NetworkStats$Entry;->txPackets:J
+Landroid/net/NetworkStats$Entry;->uid:I
+Landroid/net/NetworkStats;-><init>(JI)V
+Landroid/net/NetworkStats;-><init>(Landroid/os/Parcel;)V
+Landroid/net/NetworkStats;->capacity:I
+Landroid/net/NetworkStats;->combineAllValues(Landroid/net/NetworkStats;)V
+Landroid/net/NetworkStats;->combineValues(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats;
+Landroid/net/NetworkStats;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkStats;->defaultNetwork:[I
+Landroid/net/NetworkStats;->getTotal(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats$Entry;
+Landroid/net/NetworkStats;->getTotal(Landroid/net/NetworkStats$Entry;I)Landroid/net/NetworkStats$Entry;
+Landroid/net/NetworkStats;->getTotalBytes()J
+Landroid/net/NetworkStats;->getTotalIncludingTags(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats$Entry;
+Landroid/net/NetworkStats;->getUniqueUids()[I
+Landroid/net/NetworkStats;->getValues(ILandroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats$Entry;
+Landroid/net/NetworkStats;->iface:[Ljava/lang/String;
+Landroid/net/NetworkStats;->metered:[I
+Landroid/net/NetworkStats;->operations:[J
+Landroid/net/NetworkStats;->roaming:[I
+Landroid/net/NetworkStats;->rxBytes:[J
+Landroid/net/NetworkStats;->rxPackets:[J
+Landroid/net/NetworkStats;->set:[I
+Landroid/net/NetworkStats;->size()I
+Landroid/net/NetworkStats;->size:I
+Landroid/net/NetworkStats;->tag:[I
+Landroid/net/NetworkStats;->txBytes:[J
+Landroid/net/NetworkStats;->txPackets:[J
+Landroid/net/NetworkStats;->uid:[I
+Landroid/net/NetworkStatsHistory$Entry;->bucketDuration:J
+Landroid/net/NetworkStatsHistory$Entry;->bucketStart:J
+Landroid/net/NetworkStatsHistory$Entry;->rxBytes:J
+Landroid/net/NetworkStatsHistory$Entry;->rxPackets:J
+Landroid/net/NetworkStatsHistory$Entry;->txBytes:J
+Landroid/net/NetworkStatsHistory$Entry;->txPackets:J
+Landroid/net/NetworkStatsHistory;-><init>(J)V
+Landroid/net/NetworkStatsHistory;-><init>(Landroid/os/Parcel;)V
+Landroid/net/NetworkStatsHistory;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkStatsHistory;->getEnd()J
+Landroid/net/NetworkStatsHistory;->getIndexBefore(J)I
+Landroid/net/NetworkStatsHistory;->getStart()J
+Landroid/net/NetworkStatsHistory;->getValues(ILandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
+Landroid/net/NetworkStatsHistory;->getValues(JJJLandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
+Landroid/net/NetworkStatsHistory;->getValues(JJLandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
+Landroid/net/NetworkStatsHistory;->recordEntireHistory(Landroid/net/NetworkStatsHistory;)V
+Landroid/net/NetworkStatsHistory;->size()I
+Landroid/net/NetworkTemplate;-><init>(ILjava/lang/String;Ljava/lang/String;)V
+Landroid/net/NetworkTemplate;->buildTemplateEthernet()Landroid/net/NetworkTemplate;
+Landroid/net/NetworkTemplate;->buildTemplateMobileAll(Ljava/lang/String;)Landroid/net/NetworkTemplate;
+Landroid/net/NetworkTemplate;->buildTemplateMobileWildcard()Landroid/net/NetworkTemplate;
+Landroid/net/NetworkTemplate;->buildTemplateWifi()Landroid/net/NetworkTemplate;
+Landroid/net/NetworkTemplate;->buildTemplateWifiWildcard()Landroid/net/NetworkTemplate;
+Landroid/net/NetworkTemplate;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/NetworkTemplate;->getMatchRule()I
+Landroid/net/NetworkTemplate;->getSubscriberId()Ljava/lang/String;
+Landroid/net/NetworkTemplate;->normalize(Landroid/net/NetworkTemplate;[Ljava/lang/String;)Landroid/net/NetworkTemplate;
+Landroid/net/NetworkUtils;->attachControlPacketFilter(Ljava/io/FileDescriptor;I)V
+Landroid/net/NetworkUtils;->attachDhcpFilter(Ljava/io/FileDescriptor;)V
+Landroid/net/NetworkUtils;->attachRaFilter(Ljava/io/FileDescriptor;I)V
+Landroid/net/NetworkUtils;->getImplicitNetmask(Ljava/net/Inet4Address;)I
+Landroid/net/NetworkUtils;->intToInetAddress(I)Ljava/net/InetAddress;
+Landroid/net/NetworkUtils;->netmaskToPrefixLength(Ljava/net/Inet4Address;)I
+Landroid/net/NetworkUtils;->numericToInetAddress(Ljava/lang/String;)Ljava/net/InetAddress;
+Landroid/net/NetworkUtils;->prefixLengthToNetmaskInt(I)I
+Landroid/net/NetworkUtils;->protectFromVpn(Ljava/io/FileDescriptor;)Z
+Landroid/net/NetworkUtils;->trimV4AddrZeros(Ljava/lang/String;)Ljava/lang/String;
+Landroid/net/nsd/INsdManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/nsd/INsdManager;
+Landroid/net/nsd/INsdManager;->getMessenger()Landroid/os/Messenger;
+Landroid/net/nsd/NsdServiceInfo;->setAttribute(Ljava/lang/String;[B)V
+Landroid/net/Proxy;->getProxy(Landroid/content/Context;Ljava/lang/String;)Ljava/net/Proxy;
+Landroid/net/Proxy;->setHttpProxySystemProperty(Landroid/net/ProxyInfo;)V
+Landroid/net/ProxyInfo;-><init>(Ljava/lang/String;ILjava/lang/String;)V
+Landroid/net/RouteInfo;-><init>(Landroid/net/IpPrefix;Ljava/net/InetAddress;Ljava/lang/String;)V
+Landroid/net/RouteInfo;-><init>(Landroid/net/LinkAddress;Ljava/net/InetAddress;)V
+Landroid/net/RouteInfo;-><init>(Landroid/net/LinkAddress;Ljava/net/InetAddress;Ljava/lang/String;)V
+Landroid/net/RouteInfo;-><init>(Ljava/net/InetAddress;)V
+Landroid/net/RouteInfo;->hasGateway()Z
+Landroid/net/RouteInfo;->isHost()Z
+Landroid/net/RouteInfo;->mGateway:Ljava/net/InetAddress;
+Landroid/net/RouteInfo;->mIsHost:Z
+Landroid/net/RouteInfo;->selectBestRoute(Ljava/util/Collection;Ljava/net/InetAddress;)Landroid/net/RouteInfo;
+Landroid/net/sip/SipProfile;->readResolve()Ljava/lang/Object;
+Landroid/net/sip/SipProfile;->serialVersionUID:J
+Landroid/net/SntpClient;-><init>()V
+Landroid/net/SntpClient;->getNtpTime()J
+Landroid/net/SntpClient;->getNtpTimeReference()J
+Landroid/net/SntpClient;->getRoundTripTime()J
+Landroid/net/SntpClient;->requestTime(Ljava/lang/String;I)Z
+Landroid/net/SSLCertificateSocketFactory;-><init>(ILandroid/net/SSLSessionCache;Z)V
+Landroid/net/SSLCertificateSocketFactory;->castToOpenSSLSocket(Ljava/net/Socket;)Lcom/android/org/conscrypt/OpenSSLSocketImpl;
+Landroid/net/SSLCertificateSocketFactory;->getAlpnSelectedProtocol(Ljava/net/Socket;)[B
+Landroid/net/SSLCertificateSocketFactory;->getDelegate()Ljavax/net/ssl/SSLSocketFactory;
+Landroid/net/SSLCertificateSocketFactory;->getHttpSocketFactory(ILandroid/net/SSLSessionCache;)Lorg/apache/http/conn/ssl/SSLSocketFactory;
+Landroid/net/SSLCertificateSocketFactory;->INSECURE_TRUST_MANAGER:[Ljavax/net/ssl/TrustManager;
+Landroid/net/SSLCertificateSocketFactory;->isSslCheckRelaxed()Z
+Landroid/net/SSLCertificateSocketFactory;->makeSocketFactory([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;)Ljavax/net/ssl/SSLSocketFactory;
+Landroid/net/SSLCertificateSocketFactory;->mAlpnProtocols:[B
+Landroid/net/SSLCertificateSocketFactory;->mChannelIdPrivateKey:Ljava/security/PrivateKey;
+Landroid/net/SSLCertificateSocketFactory;->mHandshakeTimeoutMillis:I
+Landroid/net/SSLCertificateSocketFactory;->mInsecureFactory:Ljavax/net/ssl/SSLSocketFactory;
+Landroid/net/SSLCertificateSocketFactory;->mKeyManagers:[Ljavax/net/ssl/KeyManager;
+Landroid/net/SSLCertificateSocketFactory;->mNpnProtocols:[B
+Landroid/net/SSLCertificateSocketFactory;->mSecure:Z
+Landroid/net/SSLCertificateSocketFactory;->mSecureFactory:Ljavax/net/ssl/SSLSocketFactory;
+Landroid/net/SSLCertificateSocketFactory;->mSessionCache:Lcom/android/org/conscrypt/SSLClientSessionCache;
+Landroid/net/SSLCertificateSocketFactory;->mTrustManagers:[Ljavax/net/ssl/TrustManager;
+Landroid/net/SSLCertificateSocketFactory;->setAlpnProtocols([[B)V
+Landroid/net/SSLCertificateSocketFactory;->setChannelIdPrivateKey(Ljava/security/PrivateKey;)V
+Landroid/net/SSLCertificateSocketFactory;->setSoWriteTimeout(Ljava/net/Socket;I)V
+Landroid/net/SSLCertificateSocketFactory;->TAG:Ljava/lang/String;
+Landroid/net/SSLCertificateSocketFactory;->verifyHostname(Ljava/net/Socket;Ljava/lang/String;)V
+Landroid/net/SSLSessionCache;->mSessionCache:Lcom/android/org/conscrypt/SSLClientSessionCache;
+Landroid/net/StaticIpConfiguration;-><init>()V
+Landroid/net/StaticIpConfiguration;->dnsServers:Ljava/util/ArrayList;
+Landroid/net/StaticIpConfiguration;->domains:Ljava/lang/String;
+Landroid/net/StaticIpConfiguration;->gateway:Ljava/net/InetAddress;
+Landroid/net/StaticIpConfiguration;->getRoutes(Ljava/lang/String;)Ljava/util/List;
+Landroid/net/StaticIpConfiguration;->ipAddress:Landroid/net/LinkAddress;
+Landroid/net/StringNetworkSpecifier;->specifier:Ljava/lang/String;
+Landroid/net/TrafficStats;->getMobileIfaces()[Ljava/lang/String;
+Landroid/net/TrafficStats;->getMobileTcpRxPackets()J
+Landroid/net/TrafficStats;->getMobileTcpTxPackets()J
+Landroid/net/TrafficStats;->getRxBytes(Ljava/lang/String;)J
+Landroid/net/TrafficStats;->getStatsService()Landroid/net/INetworkStatsService;
+Landroid/net/TrafficStats;->getTxBytes(Ljava/lang/String;)J
+Landroid/net/TrafficStats;->setThreadStatsUidSelf()V
+Landroid/net/Uri;-><init>()V
+Landroid/net/Uri;->getCanonicalUri()Landroid/net/Uri;
+Landroid/net/Uri;->toSafeString()Ljava/lang/String;
+Landroid/net/VpnService$Builder;->mAddresses:Ljava/util/List;
+Landroid/net/VpnService$Builder;->mRoutes:Ljava/util/List;
+Landroid/net/WebAddress;->getAuthInfo()Ljava/lang/String;
+Landroid/net/WebAddress;->getHost()Ljava/lang/String;
+Landroid/net/WebAddress;->getPath()Ljava/lang/String;
+Landroid/net/WebAddress;->getPort()I
+Landroid/net/WebAddress;->getScheme()Ljava/lang/String;
+Landroid/net/WebAddress;->mHost:Ljava/lang/String;
+Landroid/net/WebAddress;->mPath:Ljava/lang/String;
+Landroid/net/WebAddress;->mPort:I
+Landroid/net/WebAddress;->mScheme:Ljava/lang/String;
+Landroid/net/WebAddress;->setHost(Ljava/lang/String;)V
+Landroid/net/WebAddress;->setPath(Ljava/lang/String;)V
+Landroid/net/wifi/BatchedScanResult;
+Landroid/net/wifi/BatchedScanResult;-><init>()V
+Landroid/net/wifi/BatchedScanResult;-><init>(Landroid/net/wifi/BatchedScanResult;)V
+Landroid/net/wifi/BatchedScanResult;->scanResults:Ljava/util/List;
+Landroid/net/wifi/BatchedScanResult;->truncated:Z
+Landroid/net/wifi/IWifiManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/net/wifi/IWifiManager$Stub;-><init>()V
+Landroid/net/wifi/IWifiManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/wifi/IWifiManager;
+Landroid/net/wifi/IWifiManager;->getCurrentNetwork()Landroid/net/Network;
+Landroid/net/wifi/IWifiManager;->getWifiApConfiguration()Landroid/net/wifi/WifiConfiguration;
+Landroid/net/wifi/IWifiManager;->getWifiApEnabledState()I
+Landroid/net/wifi/IWifiScanner$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/net/wifi/IWifiScanner$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/net/wifi/IWifiScanner$Stub;-><init>()V
+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/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo;->createRequest(Ljava/lang/String;II)Ljava/lang/String;
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;-><init>(Ljava/util/List;)V
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;->mQueryList:Ljava/util/List;
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceRequest;-><init>(ILjava/lang/String;)V
+Landroid/net/wifi/p2p/nsd/WifiP2pServiceRequest;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/p2p/WifiP2pConfig;-><init>(Ljava/lang/String;)V
+Landroid/net/wifi/p2p/WifiP2pConfig;->MIN_GROUP_OWNER_INTENT:I
+Landroid/net/wifi/p2p/WifiP2pConfig;->netId:I
+Landroid/net/wifi/p2p/WifiP2pDevice;-><init>(Ljava/lang/String;)V
+Landroid/net/wifi/p2p/WifiP2pDevice;->deviceCapability:I
+Landroid/net/wifi/p2p/WifiP2pDevice;->groupCapability:I
+Landroid/net/wifi/p2p/WifiP2pDevice;->update(Landroid/net/wifi/p2p/WifiP2pDevice;)V
+Landroid/net/wifi/p2p/WifiP2pDevice;->wfdInfo:Landroid/net/wifi/p2p/WifiP2pWfdInfo;
+Landroid/net/wifi/p2p/WifiP2pDevice;->wpsConfigMethodsSupported:I
+Landroid/net/wifi/p2p/WifiP2pDeviceList;->remove(Ljava/lang/String;)Landroid/net/wifi/p2p/WifiP2pDevice;
+Landroid/net/wifi/p2p/WifiP2pDeviceList;->update(Landroid/net/wifi/p2p/WifiP2pDevice;)V
+Landroid/net/wifi/p2p/WifiP2pGroup;-><init>(Ljava/lang/String;)V
+Landroid/net/wifi/p2p/WifiP2pGroup;->getNetworkId()I
+Landroid/net/wifi/p2p/WifiP2pGroup;->isClientListEmpty()Z
+Landroid/net/wifi/p2p/WifiP2pGroup;->setInterface(Ljava/lang/String;)V
+Landroid/net/wifi/p2p/WifiP2pGroup;->setIsGroupOwner(Z)V
+Landroid/net/wifi/p2p/WifiP2pGroup;->setNetworkId(I)V
+Landroid/net/wifi/p2p/WifiP2pGroup;->TEMPORARY_NET_ID:I
+Landroid/net/wifi/p2p/WifiP2pGroupList;-><init>(Landroid/net/wifi/p2p/WifiP2pGroupList;Landroid/net/wifi/p2p/WifiP2pGroupList$GroupDeleteListener;)V
+Landroid/net/wifi/p2p/WifiP2pGroupList;->getGroupList()Ljava/util/Collection;
+Landroid/net/wifi/p2p/WifiP2pGroupList;->mGroups:Landroid/util/LruCache;
+Landroid/net/wifi/p2p/WifiP2pManager$Channel;->mAsyncChannel:Lcom/android/internal/util/AsyncChannel;
+Landroid/net/wifi/p2p/WifiP2pManager$Channel;->putListener(Ljava/lang/Object;)I
+Landroid/net/wifi/p2p/WifiP2pManager;-><init>(Landroid/net/wifi/p2p/IWifiP2pManager;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->CREATE_GROUP:I
+Landroid/net/wifi/p2p/WifiP2pManager;->deletePersistentGroup(Landroid/net/wifi/p2p/WifiP2pManager$Channel;ILandroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->requestPersistentGroupInfo(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/WifiP2pManager$PersistentGroupInfoListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->setDeviceName(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Ljava/lang/String;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->setMiracastMode(I)V
+Landroid/net/wifi/p2p/WifiP2pManager;->setWFDInfo(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/WifiP2pWfdInfo;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->setWifiP2pChannels(Landroid/net/wifi/p2p/WifiP2pManager$Channel;IILandroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pManager;->startWps(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/WpsInfo;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
+Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;-><init>()V
+Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;->device:Landroid/net/wifi/p2p/WifiP2pDevice;
+Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;->event:I
+Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;->pin:Ljava/lang/String;
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;-><init>()V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;-><init>(III)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;-><init>(Landroid/net/wifi/p2p/WifiP2pWfdInfo;)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->getDeviceType()I
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->isWfdEnabled()Z
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setControlPort(I)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setDeviceType(I)Z
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setMaxThroughput(I)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setSessionAvailable(Z)V
+Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setWfdEnabled(Z)V
+Landroid/net/wifi/ScanResult$InformationElement;->bytes:[B
+Landroid/net/wifi/ScanResult$InformationElement;->EID_BSS_LOAD:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_ERP:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_EXTENDED_CAPS:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_EXTENDED_SUPPORTED_RATES:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_HT_OPERATION:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_INTERWORKING:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_ROAMING_CONSORTIUM:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_RSN:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_SSID:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_SUPPORTED_RATES:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_TIM:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_VHT_OPERATION:I
+Landroid/net/wifi/ScanResult$InformationElement;->EID_VSA:I
+Landroid/net/wifi/ScanResult$InformationElement;->id:I
+Landroid/net/wifi/ScanResult;->anqpDomainId:I
+Landroid/net/wifi/ScanResult;->anqpLines:Ljava/util/List;
+Landroid/net/wifi/ScanResult;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/ScanResult;->distanceCm:I
+Landroid/net/wifi/ScanResult;->distanceSdCm:I
+Landroid/net/wifi/ScanResult;->flags:J
+Landroid/net/wifi/ScanResult;->hessid:J
+Landroid/net/wifi/ScanResult;->informationElements:[Landroid/net/wifi/ScanResult$InformationElement;
+Landroid/net/wifi/ScanResult;->is80211McRTTResponder:Z
+Landroid/net/wifi/ScanResult;->numUsage:I
+Landroid/net/wifi/ScanResult;->seen:J
+Landroid/net/wifi/ScanResult;->untrusted:Z
+Landroid/net/wifi/ScanResult;->wifiSsid:Landroid/net/wifi/WifiSsid;
+Landroid/net/wifi/WifiConfiguration;-><init>(Landroid/net/wifi/WifiConfiguration;)V
+Landroid/net/wifi/WifiConfiguration;->apBand:I
+Landroid/net/wifi/WifiConfiguration;->apChannel:I
+Landroid/net/wifi/WifiConfiguration;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/WifiConfiguration;->defaultGwMacAddress:Ljava/lang/String;
+Landroid/net/wifi/WifiConfiguration;->getAuthType()I
+Landroid/net/wifi/WifiConfiguration;->getIpAssignment()Landroid/net/IpConfiguration$IpAssignment;
+Landroid/net/wifi/WifiConfiguration;->getIpConfiguration()Landroid/net/IpConfiguration;
+Landroid/net/wifi/WifiConfiguration;->getPrintableSsid()Ljava/lang/String;
+Landroid/net/wifi/WifiConfiguration;->getProxySettings()Landroid/net/IpConfiguration$ProxySettings;
+Landroid/net/wifi/WifiConfiguration;->getStaticIpConfiguration()Landroid/net/StaticIpConfiguration;
+Landroid/net/wifi/WifiConfiguration;->INVALID_RSSI:I
+Landroid/net/wifi/WifiConfiguration;->isEnterprise()Z
+Landroid/net/wifi/WifiConfiguration;->lastConnectUid:I
+Landroid/net/wifi/WifiConfiguration;->mIpConfiguration:Landroid/net/IpConfiguration;
+Landroid/net/wifi/WifiConfiguration;->noInternetAccessExpected:Z
+Landroid/net/wifi/WifiConfiguration;->numNoInternetAccessReports:I
+Landroid/net/wifi/WifiConfiguration;->selfAdded:Z
+Landroid/net/wifi/WifiConfiguration;->setIpAssignment(Landroid/net/IpConfiguration$IpAssignment;)V
+Landroid/net/wifi/WifiConfiguration;->setIpConfiguration(Landroid/net/IpConfiguration;)V
+Landroid/net/wifi/WifiConfiguration;->setProxy(Landroid/net/IpConfiguration$ProxySettings;Landroid/net/ProxyInfo;)V
+Landroid/net/wifi/WifiConfiguration;->setProxySettings(Landroid/net/IpConfiguration$ProxySettings;)V
+Landroid/net/wifi/WifiConfiguration;->setStaticIpConfiguration(Landroid/net/StaticIpConfiguration;)V
+Landroid/net/wifi/WifiConfiguration;->shared:Z
+Landroid/net/wifi/WifiConfiguration;->validatedInternetAccess:Z
+Landroid/net/wifi/WifiConfiguration;->wepKeyVarNames:[Ljava/lang/String;
+Landroid/net/wifi/WifiEnterpriseConfig;->getCaCertificateAlias()Ljava/lang/String;
+Landroid/net/wifi/WifiEnterpriseConfig;->getClientCertificateAlias()Ljava/lang/String;
+Landroid/net/wifi/WifiEnterpriseConfig;->mFields:Ljava/util/HashMap;
+Landroid/net/wifi/WifiEnterpriseConfig;->setCaCertificateAlias(Ljava/lang/String;)V
+Landroid/net/wifi/WifiEnterpriseConfig;->setClientCertificateAlias(Ljava/lang/String;)V
+Landroid/net/wifi/WifiInfo;-><init>()V
+Landroid/net/wifi/WifiInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/WifiInfo;->DEFAULT_MAC_ADDRESS:Ljava/lang/String;
+Landroid/net/wifi/WifiInfo;->getMeteredHint()Z
+Landroid/net/wifi/WifiInfo;->getWifiSsid()Landroid/net/wifi/WifiSsid;
+Landroid/net/wifi/WifiInfo;->INVALID_RSSI:I
+Landroid/net/wifi/WifiInfo;->is5GHz()Z
+Landroid/net/wifi/WifiInfo;->isEphemeral()Z
+Landroid/net/wifi/WifiInfo;->mBSSID:Ljava/lang/String;
+Landroid/net/wifi/WifiInfo;->mIpAddress:Ljava/net/InetAddress;
+Landroid/net/wifi/WifiInfo;->mMacAddress:Ljava/lang/String;
+Landroid/net/wifi/WifiInfo;->mWifiSsid:Landroid/net/wifi/WifiSsid;
+Landroid/net/wifi/WifiInfo;->removeDoubleQuotes(Ljava/lang/String;)Ljava/lang/String;
+Landroid/net/wifi/WifiInfo;->score:I
+Landroid/net/wifi/WifiInfo;->setBSSID(Ljava/lang/String;)V
+Landroid/net/wifi/WifiInfo;->setLinkSpeed(I)V
+Landroid/net/wifi/WifiInfo;->setMacAddress(Ljava/lang/String;)V
+Landroid/net/wifi/WifiInfo;->setNetworkId(I)V
+Landroid/net/wifi/WifiInfo;->setRssi(I)V
+Landroid/net/wifi/WifiInfo;->setSupplicantState(Landroid/net/wifi/SupplicantState;)V
+Landroid/net/wifi/WifiInfo;->setSupplicantState(Ljava/lang/String;)V
+Landroid/net/wifi/WifiManager;->cancelLocalOnlyHotspotRequest()V
+Landroid/net/wifi/WifiManager;->connect(ILandroid/net/wifi/WifiManager$ActionListener;)V
+Landroid/net/wifi/WifiManager;->disable(ILandroid/net/wifi/WifiManager$ActionListener;)V
+Landroid/net/wifi/WifiManager;->enableVerboseLogging(I)V
+Landroid/net/wifi/WifiManager;->forget(ILandroid/net/wifi/WifiManager$ActionListener;)V
+Landroid/net/wifi/WifiManager;->getCountryCode()Ljava/lang/String;
+Landroid/net/wifi/WifiManager;->getCurrentNetwork()Landroid/net/Network;
+Landroid/net/wifi/WifiManager;->getMatchingWifiConfig(Landroid/net/wifi/ScanResult;)Landroid/net/wifi/WifiConfiguration;
+Landroid/net/wifi/WifiManager;->getVerboseLoggingLevel()I
+Landroid/net/wifi/WifiManager;->getWifiServiceMessenger()Landroid/os/Messenger;
+Landroid/net/wifi/WifiManager;->initializeMulticastFiltering()Z
+Landroid/net/wifi/WifiManager;->isDualBandSupported()Z
+Landroid/net/wifi/WifiManager;->LINK_CONFIGURATION_CHANGED_ACTION:Ljava/lang/String;
+Landroid/net/wifi/WifiManager;->mActiveLockCount:I
+Landroid/net/wifi/WifiManager;->MAX_RSSI:I
+Landroid/net/wifi/WifiManager;->MIN_RSSI:I
+Landroid/net/wifi/WifiManager;->mService:Landroid/net/wifi/IWifiManager;
+Landroid/net/wifi/WifiManager;->RSSI_LEVELS:I
+Landroid/net/wifi/WifiManager;->save(Landroid/net/wifi/WifiConfiguration;Landroid/net/wifi/WifiManager$ActionListener;)V
+Landroid/net/wifi/WifiManager;->WIFI_FREQUENCY_BAND_2GHZ:I
+Landroid/net/wifi/WifiManager;->WIFI_FREQUENCY_BAND_5GHZ:I
+Landroid/net/wifi/WifiManager;->WIFI_FREQUENCY_BAND_AUTO:I
+Landroid/net/wifi/WifiSsid;->createFromAsciiEncoded(Ljava/lang/String;)Landroid/net/wifi/WifiSsid;
+Landroid/net/wifi/WifiSsid;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/net/wifi/WifiSsid;->getOctets()[B
+Landroid/net/wifi/WifiSsid;->NONE:Ljava/lang/String;
+Landroid/net/wifi/WifiSsid;->octets:Ljava/io/ByteArrayOutputStream;
+Landroid/nfc/cardemulation/AidGroup;-><init>(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/nfc/cardemulation/AidGroup;->aids:Ljava/util/List;
+Landroid/nfc/cardemulation/AidGroup;->category:Ljava/lang/String;
+Landroid/nfc/cardemulation/AidGroup;->createFromXml(Lorg/xmlpull/v1/XmlPullParser;)Landroid/nfc/cardemulation/AidGroup;
+Landroid/nfc/cardemulation/AidGroup;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/nfc/cardemulation/AidGroup;->description:Ljava/lang/String;
+Landroid/nfc/cardemulation/AidGroup;->getAids()Ljava/util/List;
+Landroid/nfc/cardemulation/AidGroup;->getCategory()Ljava/lang/String;
+Landroid/nfc/cardemulation/AidGroup;->writeAsXml(Lorg/xmlpull/v1/XmlSerializer;)V
+Landroid/nfc/cardemulation/ApduServiceInfo;-><init>(Landroid/content/pm/PackageManager;Landroid/content/pm/ResolveInfo;Z)V
+Landroid/nfc/cardemulation/ApduServiceInfo;-><init>(Landroid/content/pm/ResolveInfo;ZLjava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;ZIILjava/lang/String;)V
+Landroid/nfc/cardemulation/ApduServiceInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/nfc/cardemulation/ApduServiceInfo;->getDescription()Ljava/lang/String;
+Landroid/nfc/cardemulation/ApduServiceInfo;->getSettingsActivityName()Ljava/lang/String;
+Landroid/nfc/cardemulation/ApduServiceInfo;->getUid()I
+Landroid/nfc/cardemulation/ApduServiceInfo;->isOnHost()Z
+Landroid/nfc/cardemulation/ApduServiceInfo;->loadBanner(Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;
+Landroid/nfc/cardemulation/ApduServiceInfo;->mDynamicAidGroups:Ljava/util/HashMap;
+Landroid/nfc/cardemulation/ApduServiceInfo;->mService:Landroid/content/pm/ResolveInfo;
+Landroid/nfc/cardemulation/ApduServiceInfo;->mStaticAidGroups:Ljava/util/HashMap;
+Landroid/nfc/cardemulation/ApduServiceInfo;->requiresUnlock()Z
+Landroid/nfc/ErrorCodes;->isError(I)Z
+Landroid/nfc/INfcAdapterExtras;->authenticate(Ljava/lang/String;[B)V
+Landroid/nfc/INfcAdapterExtras;->close(Ljava/lang/String;Landroid/os/IBinder;)Landroid/os/Bundle;
+Landroid/nfc/INfcAdapterExtras;->getCardEmulationRoute(Ljava/lang/String;)I
+Landroid/nfc/INfcAdapterExtras;->open(Ljava/lang/String;Landroid/os/IBinder;)Landroid/os/Bundle;
+Landroid/nfc/INfcAdapterExtras;->setCardEmulationRoute(Ljava/lang/String;I)V
+Landroid/nfc/INfcAdapterExtras;->transceive(Ljava/lang/String;[B)Landroid/os/Bundle;
+Landroid/nfc/NdefRecord;->mId:[B
+Landroid/nfc/NfcActivityManager;->mAdapter:Landroid/nfc/NfcAdapter;
+Landroid/nfc/NfcAdapter;->attemptDeadServiceRecovery(Ljava/lang/Exception;)V
+Landroid/nfc/NfcAdapter;->getAdapterState()I
+Landroid/nfc/NfcAdapter;->getContext()Landroid/content/Context;
+Landroid/nfc/NfcAdapter;->getDefaultAdapter()Landroid/nfc/NfcAdapter;
+Landroid/nfc/NfcAdapter;->getNfcAdapter(Landroid/content/Context;)Landroid/nfc/NfcAdapter;
+Landroid/nfc/NfcAdapter;->getNfcAdapterExtrasInterface()Landroid/nfc/INfcAdapterExtras;
+Landroid/nfc/NfcAdapter;->getService()Landroid/nfc/INfcAdapter;
+Landroid/nfc/NfcAdapter;->setNdefPushMessageCallback(Landroid/nfc/NfcAdapter$CreateNdefMessageCallback;Landroid/app/Activity;I)V
+Landroid/nfc/NfcAdapter;->sService:Landroid/nfc/INfcAdapter;
+Landroid/nfc/NfcManager;-><init>(Landroid/content/Context;)V
+Landroid/nfc/Tag;->getServiceHandle()I
+Landroid/nfc/Tag;->getTagService()Landroid/nfc/INfcTag;
+Landroid/nfc/Tag;->mId:[B
+Landroid/opengl/EGL14;->eglGetDisplay(J)Landroid/opengl/EGLDisplay;
+Landroid/opengl/GLES20;->glGetActiveAttrib(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V
+Landroid/opengl/GLES20;->glGetActiveUniform(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V
+Landroid/opengl/GLSurfaceView$EglHelper;->mEglContext:Ljavax/microedition/khronos/egl/EGLContext;
+Landroid/opengl/GLSurfaceView$GLThread;->mEglHelper:Landroid/opengl/GLSurfaceView$EglHelper;
+Landroid/opengl/GLSurfaceView;->mGLThread:Landroid/opengl/GLSurfaceView$GLThread;
+Landroid/opengl/GLSurfaceView;->mRenderer:Landroid/opengl/GLSurfaceView$Renderer;
+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;->mMap:Landroid/util/ArrayMap;
+Landroid/os/BaseBundle;->mParcelledData:Landroid/os/Parcel;
+Landroid/os/BaseBundle;->unparcel()V
+Landroid/os/BatteryManager;-><init>()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;-><init>()V
+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;->clear()V
+Landroid/os/BatteryStats$HistoryItem;->cmd:B
+Landroid/os/BatteryStats$HistoryItem;->CMD_UPDATE:B
+Landroid/os/BatteryStats$HistoryItem;->next:Landroid/os/BatteryStats$HistoryItem;
+Landroid/os/BatteryStats$HistoryItem;->same(Landroid/os/BatteryStats$HistoryItem;)Z
+Landroid/os/BatteryStats$HistoryItem;->setTo(JBLandroid/os/BatteryStats$HistoryItem;)V
+Landroid/os/BatteryStats$HistoryItem;->setTo(Landroid/os/BatteryStats$HistoryItem;)V
+Landroid/os/BatteryStats$HistoryItem;->states2:I
+Landroid/os/BatteryStats$HistoryItem;->states:I
+Landroid/os/BatteryStats$HistoryItem;->time:J
+Landroid/os/BatteryStats$Timer;-><init>()V
+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;->getStartTime(JI)J
+Landroid/os/BatteryStats$Uid$Pkg;-><init>()V
+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;-><init>()V
+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;-><init>()V
+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;-><init>()V
+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;-><init>()V
+Landroid/os/BatteryStats;->computeBatteryTimeRemaining(J)J
+Landroid/os/BatteryStats;->computeBatteryUptime(JI)J
+Landroid/os/BatteryStats;->computeChargeTimeRemaining(J)J
+Landroid/os/BatteryStats;->getMobileRadioActiveTime(JI)J
+Landroid/os/BatteryStats;->getNetworkActivityBytes(II)J
+Landroid/os/BatteryStats;->getNextHistoryLocked(Landroid/os/BatteryStats$HistoryItem;)Z
+Landroid/os/BatteryStats;->getUidStats()Landroid/util/SparseArray;
+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/Build;->PERMISSIONS_REVIEW_REQUIRED: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/CancellationSignal;->mCancelInProgress:Z
+Landroid/os/CancellationSignal;->mIsCanceled:Z
+Landroid/os/CancellationSignal;->mOnCancelListener:Landroid/os/CancellationSignal$OnCancelListener;
+Landroid/os/CancellationSignal;->mRemote:Landroid/os/ICancellationSignal;
+Landroid/os/CancellationSignal;->waitForCancelFinishedLocked()V
+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;->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/health/HealthKeys$Constants;-><init>(Ljava/lang/Class;)V
+Landroid/os/health/HealthStats;-><init>(Landroid/os/Parcel;)V
+Landroid/os/health/HealthStatsParceler;-><init>(Landroid/os/health/HealthStatsWriter;)V
+Landroid/os/health/HealthStatsParceler;-><init>(Landroid/os/Parcel;)V
+Landroid/os/health/HealthStatsParceler;->getHealthStats()Landroid/os/health/HealthStats;
+Landroid/os/health/HealthStatsWriter;-><init>(Landroid/os/health/HealthKeys$Constants;)V
+Landroid/os/health/HealthStatsWriter;->addMeasurement(IJ)V
+Landroid/os/health/HealthStatsWriter;->addMeasurements(ILjava/lang/String;J)V
+Landroid/os/health/HealthStatsWriter;->addStats(ILjava/lang/String;Landroid/os/health/HealthStatsWriter;)V
+Landroid/os/health/HealthStatsWriter;->addTimer(IIJ)V
+Landroid/os/health/HealthStatsWriter;->addTimers(ILjava/lang/String;Landroid/os/health/TimerStat;)V
+Landroid/os/health/HealthStatsWriter;->flattenToParcel(Landroid/os/Parcel;)V
+Landroid/os/health/SystemHealthManager;-><init>()V
+Landroid/os/health/SystemHealthManager;->from(Landroid/content/Context;)Landroid/os/health/SystemHealthManager;
+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;-><init>()V
+Landroid/os/IPermissionController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IPermissionController;
+Landroid/os/IPowerManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/os/IPowerManager$Stub$Proxy;->isLightDeviceIdleMode()Z
+Landroid/os/IPowerManager$Stub;-><init>()V
+Landroid/os/IPowerManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IPowerManager;
+Landroid/os/IPowerManager$Stub;->TRANSACTION_goToSleep:I
+Landroid/os/IPowerManager;->goToSleep(JII)V
+Landroid/os/IPowerManager;->isInteractive()Z
+Landroid/os/IPowerManager;->nap(J)V
+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;->mCreators:Ljava/util/HashMap;
+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$FileDescriptorDetachedException;->serialVersionUID:J
+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;->ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED: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(J)V
+Landroid/os/PowerManager;->goToSleep(JII)V
+Landroid/os/PowerManager;->GO_TO_SLEEP_REASON_TIMEOUT:I
+Landroid/os/PowerManager;->isLightDeviceIdleMode()Z
+Landroid/os/PowerManager;->isScreenBrightnessBoosted()Z
+Landroid/os/PowerManager;->mHandler:Landroid/os/Handler;
+Landroid/os/PowerManager;->mService:Landroid/os/IPowerManager;
+Landroid/os/PowerManager;->setPowerSaveMode(Z)Z
+Landroid/os/PowerManager;->userActivity(JZ)V
+Landroid/os/PowerManager;->validateWakeLockParameters(ILjava/lang/String;)V
+Landroid/os/PowerManager;->wakeUp(J)V
+Landroid/os/PowerManager;->wakeUp(JLjava/lang/String;)V
+Landroid/os/Process;->BLUETOOTH_UID:I
+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;->ROOT_UID:I
+Landroid/os/Process;->sendSignalQuiet(II)V
+Landroid/os/Process;->setArgV0(Ljava/lang/String;)V
+Landroid/os/Process;->setProcessGroup(II)V
+Landroid/os/Process;->SHELL_UID:I
+Landroid/os/Process;->VPN_UID:I
+Landroid/os/Process;->WIFI_UID:I
+Landroid/os/RecoverySystem;-><init>()V
+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;->getHandler()Landroid/os/Handler;
+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;->get(I)Ljava/lang/Object;
+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/RemoteCallback;->mHandler:Landroid/os/Handler;
+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;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/ServiceSpecificException;-><init>(ILjava/lang/String;)V
+Landroid/os/ServiceSpecificException;->errorCode:I
+Landroid/os/SharedMemory;->getFd()I
+Landroid/os/ShellCommand;->peekNextArg()Ljava/lang/String;
+Landroid/os/StatFs;->mStat:Landroid/system/StructStatVfs;
+Landroid/os/storage/DiskInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/os/storage/DiskInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/os/storage/DiskInfo;->flags:I
+Landroid/os/storage/DiskInfo;->getDescription()Ljava/lang/String;
+Landroid/os/storage/DiskInfo;->getId()Ljava/lang/String;
+Landroid/os/storage/DiskInfo;->isAdoptable()Z
+Landroid/os/storage/DiskInfo;->isDefaultPrimary()Z
+Landroid/os/storage/DiskInfo;->isSd()Z
+Landroid/os/storage/DiskInfo;->isUsb()Z
+Landroid/os/storage/DiskInfo;->label:Ljava/lang/String;
+Landroid/os/storage/DiskInfo;->size:J
+Landroid/os/storage/IObbActionListener$Stub;-><init>()V
+Landroid/os/storage/IObbActionListener$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/storage/IObbActionListener;
+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/storage/StorageEventListener;->onDiskDestroyed(Landroid/os/storage/DiskInfo;)V
+Landroid/os/storage/StorageEventListener;->onDiskScanned(Landroid/os/storage/DiskInfo;I)V
+Landroid/os/storage/StorageEventListener;->onStorageStateChanged(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/os/storage/StorageEventListener;->onUsbMassStorageConnectionChanged(Z)V
+Landroid/os/storage/StorageEventListener;->onVolumeForgotten(Ljava/lang/String;)V
+Landroid/os/storage/StorageEventListener;->onVolumeRecordChanged(Landroid/os/storage/VolumeRecord;)V
+Landroid/os/storage/StorageEventListener;->onVolumeStateChanged(Landroid/os/storage/VolumeInfo;II)V
+Landroid/os/storage/StorageManager;-><init>(Landroid/content/Context;Landroid/os/Looper;)V
+Landroid/os/storage/StorageManager;->CRYPT_TYPE_DEFAULT:I
+Landroid/os/storage/StorageManager;->CRYPT_TYPE_PASSWORD:I
+Landroid/os/storage/StorageManager;->disableUsbMassStorage()V
+Landroid/os/storage/StorageManager;->enableUsbMassStorage()V
+Landroid/os/storage/StorageManager;->ENCRYPTION_STATE_NONE:I
+Landroid/os/storage/StorageManager;->findDiskById(Ljava/lang/String;)Landroid/os/storage/DiskInfo;
+Landroid/os/storage/StorageManager;->findEmulatedForPrivate(Landroid/os/storage/VolumeInfo;)Landroid/os/storage/VolumeInfo;
+Landroid/os/storage/StorageManager;->findVolumeById(Ljava/lang/String;)Landroid/os/storage/VolumeInfo;
+Landroid/os/storage/StorageManager;->findVolumeByUuid(Ljava/lang/String;)Landroid/os/storage/VolumeInfo;
+Landroid/os/storage/StorageManager;->format(Ljava/lang/String;)V
+Landroid/os/storage/StorageManager;->from(Landroid/content/Context;)Landroid/os/storage/StorageManager;
+Landroid/os/storage/StorageManager;->getBestVolumeDescription(Landroid/os/storage/VolumeInfo;)Ljava/lang/String;
+Landroid/os/storage/StorageManager;->getDisks()Ljava/util/List;
+Landroid/os/storage/StorageManager;->getPrimaryPhysicalVolume()Landroid/os/storage/VolumeInfo;
+Landroid/os/storage/StorageManager;->getPrimaryVolume()Landroid/os/storage/StorageVolume;
+Landroid/os/storage/StorageManager;->getStorageBytesUntilLow(Ljava/io/File;)J
+Landroid/os/storage/StorageManager;->getStorageFullBytes(Ljava/io/File;)J
+Landroid/os/storage/StorageManager;->getStorageLowBytes(Ljava/io/File;)J
+Landroid/os/storage/StorageManager;->getStorageVolume([Landroid/os/storage/StorageVolume;Ljava/io/File;)Landroid/os/storage/StorageVolume;
+Landroid/os/storage/StorageManager;->getVolumeList()[Landroid/os/storage/StorageVolume;
+Landroid/os/storage/StorageManager;->getVolumeList(II)[Landroid/os/storage/StorageVolume;
+Landroid/os/storage/StorageManager;->getVolumePaths()[Ljava/lang/String;
+Landroid/os/storage/StorageManager;->getVolumes()Ljava/util/List;
+Landroid/os/storage/StorageManager;->getVolumeState(Ljava/lang/String;)Ljava/lang/String;
+Landroid/os/storage/StorageManager;->isFileEncryptedNativeOnly()Z
+Landroid/os/storage/StorageManager;->isUsbMassStorageConnected()Z
+Landroid/os/storage/StorageManager;->isUsbMassStorageEnabled()Z
+Landroid/os/storage/StorageManager;->partitionPublic(Ljava/lang/String;)V
+Landroid/os/storage/StorageManager;->registerListener(Landroid/os/storage/StorageEventListener;)V
+Landroid/os/storage/StorageManager;->unmount(Ljava/lang/String;)V
+Landroid/os/storage/StorageManager;->unregisterListener(Landroid/os/storage/StorageEventListener;)V
+Landroid/os/storage/StorageVolume;->allowMassStorage()Z
+Landroid/os/storage/StorageVolume;->getFatVolumeId()I
+Landroid/os/storage/StorageVolume;->getId()Ljava/lang/String;
+Landroid/os/storage/StorageVolume;->getMaxFileSize()J
+Landroid/os/storage/StorageVolume;->getOwner()Landroid/os/UserHandle;
+Landroid/os/storage/StorageVolume;->getPath()Ljava/lang/String;
+Landroid/os/storage/StorageVolume;->getPathFile()Ljava/io/File;
+Landroid/os/storage/StorageVolume;->getUserLabel()Ljava/lang/String;
+Landroid/os/storage/StorageVolume;->mDescription:Ljava/lang/String;
+Landroid/os/storage/StorageVolume;->mId:Ljava/lang/String;
+Landroid/os/storage/StorageVolume;->mPath:Ljava/io/File;
+Landroid/os/storage/StorageVolume;->mPrimary:Z
+Landroid/os/storage/StorageVolume;->mRemovable:Z
+Landroid/os/storage/VolumeInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/os/storage/VolumeInfo;->buildBrowseIntent()Landroid/content/Intent;
+Landroid/os/storage/VolumeInfo;->buildStableMtpStorageId(Ljava/lang/String;)I
+Landroid/os/storage/VolumeInfo;->buildStorageVolume(Landroid/content/Context;IZ)Landroid/os/storage/StorageVolume;
+Landroid/os/storage/VolumeInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/os/storage/VolumeInfo;->disk:Landroid/os/storage/DiskInfo;
+Landroid/os/storage/VolumeInfo;->fsLabel:Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->fsUuid:Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getDescription()Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getDisk()Landroid/os/storage/DiskInfo;
+Landroid/os/storage/VolumeInfo;->getDiskId()Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getEnvironmentForState(I)Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getFsUuid()Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getId()Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getInternalPathForUser(I)Ljava/io/File;
+Landroid/os/storage/VolumeInfo;->getMountUserId()I
+Landroid/os/storage/VolumeInfo;->getPath()Ljava/io/File;
+Landroid/os/storage/VolumeInfo;->getPathForUser(I)Ljava/io/File;
+Landroid/os/storage/VolumeInfo;->getState()I
+Landroid/os/storage/VolumeInfo;->getType()I
+Landroid/os/storage/VolumeInfo;->internalPath:Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->isMountedReadable()Z
+Landroid/os/storage/VolumeInfo;->isMountedWritable()Z
+Landroid/os/storage/VolumeInfo;->isPrimary()Z
+Landroid/os/storage/VolumeInfo;->isPrimaryPhysical()Z
+Landroid/os/storage/VolumeInfo;->isVisible()Z
+Landroid/os/storage/VolumeInfo;->isVisibleForWrite(I)Z
+Landroid/os/storage/VolumeInfo;->path:Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->state:I
+Landroid/os/storage/VolumeInfo;->type:I
+Landroid/os/storage/VolumeInfo;->TYPE_EMULATED:I
+Landroid/os/storage/VolumeInfo;->TYPE_PUBLIC:I
+Landroid/os/storage/VolumeRecord;-><init>(Landroid/os/Parcel;)V
+Landroid/os/storage/VolumeRecord;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/os/StrictMode$Span;->finish()V
+Landroid/os/StrictMode$ThreadPolicy$Builder;->penaltyListener(Landroid/os/StrictMode$OnThreadViolationListener;Ljava/util/concurrent/Executor;)Landroid/os/StrictMode$ThreadPolicy$Builder;
+Landroid/os/StrictMode$ThreadPolicy;->mask:I
+Landroid/os/StrictMode$VmPolicy$Builder;->mMask:I
+Landroid/os/StrictMode$VmPolicy$Builder;->penaltyListener(Landroid/os/StrictMode$OnVmViolationListener;Ljava/util/concurrent/Executor;)Landroid/os/StrictMode$VmPolicy$Builder;
+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;->currentThreadTimeMicro()J
+Landroid/os/SystemClock;->currentTimeMicro()J
+Landroid/os/SystemClock;->elapsedRealtimeClock()Ljava/time/Clock;
+Landroid/os/SystemClock;->uptimeClock()Ljava/time/Clock;
+Landroid/os/SystemClock;->uptimeMillisClock()Ljava/time/Clock;
+Landroid/os/SystemProperties;-><init>()V
+Landroid/os/SystemProperties;->addChangeCallback(Ljava/lang/Runnable;)V
+Landroid/os/SystemProperties;->native_add_change_callback()V
+Landroid/os/SystemProperties;->native_get(Ljava/lang/String;)Ljava/lang/String;
+Landroid/os/SystemProperties;->native_get(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+Landroid/os/SystemProperties;->native_get_boolean(Ljava/lang/String;Z)Z
+Landroid/os/SystemProperties;->native_get_int(Ljava/lang/String;I)I
+Landroid/os/SystemProperties;->native_get_long(Ljava/lang/String;J)J
+Landroid/os/SystemProperties;->native_set(Ljava/lang/String;Ljava/lang/String;)V
+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/TestLooperManager;->getQueue()Landroid/os/MessageQueue;
+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;->ALL:Landroid/os/UserHandle;
+Landroid/os/UserHandle;->CURRENT:Landroid/os/UserHandle;
+Landroid/os/UserHandle;->CURRENT_OR_SELF:Landroid/os/UserHandle;
+Landroid/os/UserHandle;->ERR_GID:I
+Landroid/os/UserHandle;->formatUid(Ljava/io/PrintWriter;I)V
+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;->getBadgedDrawableForUser(Landroid/graphics/drawable/Drawable;Landroid/os/UserHandle;Landroid/graphics/Rect;I)Landroid/graphics/drawable/Drawable;
+Landroid/os/UserManager;->getBadgedIconForUser(Landroid/graphics/drawable/Drawable;Landroid/os/UserHandle;)Landroid/graphics/drawable/Drawable;
+Landroid/os/UserManager;->getBadgedLabelForUser(Ljava/lang/CharSequence;Landroid/os/UserHandle;)Ljava/lang/CharSequence;
+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;->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;->sGoneWork:Landroid/os/WorkSource;
+Landroid/os/WorkSource;->size()I
+Landroid/os/WorkSource;->sNewbWork:Landroid/os/WorkSource;
+Landroid/os/WorkSource;->sTmpWorkSource:Landroid/os/WorkSource;
+Landroid/os/WorkSource;->updateLocked(Landroid/os/WorkSource;ZZ)Z
+Landroid/os/ZygoteStartFailedEx;-><init>(Ljava/lang/String;)V
+Landroid/os/ZygoteStartFailedEx;-><init>(Ljava/lang/Throwable;)V
+Landroid/permissionpresenterservice/RuntimePermissionPresenterService;->onRevokeRuntimePermission(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/preference/DialogPreference;->mBuilder:Landroid/app/AlertDialog$Builder;
+Landroid/preference/DialogPreference;->mDialog:Landroid/app/Dialog;
+Landroid/preference/DialogPreference;->mDialogIcon:Landroid/graphics/drawable/Drawable;
+Landroid/preference/DialogPreference;->mDialogMessage:Ljava/lang/CharSequence;
+Landroid/preference/DialogPreference;->mDialogTitle:Ljava/lang/CharSequence;
+Landroid/preference/DialogPreference;->mNegativeButtonText:Ljava/lang/CharSequence;
+Landroid/preference/DialogPreference;->mPositiveButtonText:Ljava/lang/CharSequence;
+Landroid/preference/DialogPreference;->mWhichButtonClicked:I
+Landroid/preference/EditTextPreference;->mEditText:Landroid/widget/EditText;
+Landroid/preference/ListPreference;->mClickedDialogEntryIndex:I
+Landroid/preference/Preference;->getId()J
+Landroid/preference/Preference;->mLayoutResId:I
+Landroid/preference/Preference;->mSummary:Ljava/lang/CharSequence;
+Landroid/preference/Preference;->mWidgetLayoutResId:I
+Landroid/preference/Preference;->onKey(Landroid/view/View;ILandroid/view/KeyEvent;)Z
+Landroid/preference/Preference;->performClick(Landroid/preference/PreferenceScreen;)V
+Landroid/preference/Preference;->registerDependent(Landroid/preference/Preference;)V
+Landroid/preference/Preference;->setOnPreferenceChangeInternalListener(Landroid/preference/Preference$OnPreferenceChangeInternalListener;)V
+Landroid/preference/PreferenceActivity;->getHeaders()Ljava/util/List;
+Landroid/preference/PreferenceActivity;->mPreferenceManager:Landroid/preference/PreferenceManager;
+Landroid/preference/PreferenceActivity;->mPrefsContainer:Landroid/view/ViewGroup;
+Landroid/preference/PreferenceActivity;->postBindPreferences()V
+Landroid/preference/PreferenceActivity;->requirePreferenceManager()V
+Landroid/preference/PreferenceFragment;->getListView()Landroid/widget/ListView;
+Landroid/preference/PreferenceFragment;->mPreferenceManager:Landroid/preference/PreferenceManager;
+Landroid/preference/PreferenceManager;-><init>(Landroid/app/Activity;I)V
+Landroid/preference/PreferenceManager;-><init>(Landroid/content/Context;)V
+Landroid/preference/PreferenceManager;->dispatchActivityDestroy()V
+Landroid/preference/PreferenceManager;->dispatchActivityResult(IILandroid/content/Intent;)V
+Landroid/preference/PreferenceManager;->dispatchActivityStop()V
+Landroid/preference/PreferenceManager;->getActivity()Landroid/app/Activity;
+Landroid/preference/PreferenceManager;->getEditor()Landroid/content/SharedPreferences$Editor;
+Landroid/preference/PreferenceManager;->getFragment()Landroid/preference/PreferenceFragment;
+Landroid/preference/PreferenceManager;->getNextRequestCode()I
+Landroid/preference/PreferenceManager;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
+Landroid/preference/PreferenceManager;->inflateFromIntent(Landroid/content/Intent;Landroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;
+Landroid/preference/PreferenceManager;->inflateFromResource(Landroid/content/Context;ILandroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;
+Landroid/preference/PreferenceManager;->mActivityDestroyListeners:Ljava/util/List;
+Landroid/preference/PreferenceManager;->mFragment:Landroid/preference/PreferenceFragment;
+Landroid/preference/PreferenceManager;->mOnPreferenceTreeClickListener:Landroid/preference/PreferenceManager$OnPreferenceTreeClickListener;
+Landroid/preference/PreferenceManager;->mSharedPreferences:Landroid/content/SharedPreferences;
+Landroid/preference/PreferenceManager;->registerOnActivityDestroyListener(Landroid/preference/PreferenceManager$OnActivityDestroyListener;)V
+Landroid/preference/PreferenceManager;->registerOnActivityResultListener(Landroid/preference/PreferenceManager$OnActivityResultListener;)V
+Landroid/preference/PreferenceManager;->registerOnActivityStopListener(Landroid/preference/PreferenceManager$OnActivityStopListener;)V
+Landroid/preference/PreferenceManager;->setFragment(Landroid/preference/PreferenceFragment;)V
+Landroid/preference/PreferenceManager;->setNoCommit(Z)V
+Landroid/preference/PreferenceManager;->setPreferences(Landroid/preference/PreferenceScreen;)Z
+Landroid/preference/PreferenceManager;->shouldCommit()Z
+Landroid/preference/PreferenceManager;->unregisterOnActivityDestroyListener(Landroid/preference/PreferenceManager$OnActivityDestroyListener;)V
+Landroid/preference/PreferenceManager;->unregisterOnActivityResultListener(Landroid/preference/PreferenceManager$OnActivityResultListener;)V
+Landroid/preference/PreferenceManager;->unregisterOnActivityStopListener(Landroid/preference/PreferenceManager$OnActivityStopListener;)V
+Landroid/preference/PreferenceScreen;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/preference/PreferenceScreen;->mListView:Landroid/widget/ListView;
+Landroid/preference/PreferenceScreen;->mRootAdapter:Landroid/widget/ListAdapter;
+Landroid/preference/RingtonePreference;->mRequestCode:I
+Landroid/preference/SeekBarDialogPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/preference/SeekBarPreference;-><init>(Landroid/content/Context;)V
+Landroid/preference/SeekBarPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/preference/SeekBarPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
+Landroid/preference/SeekBarVolumizer;-><init>(Landroid/content/Context;ILandroid/net/Uri;Landroid/preference/SeekBarVolumizer$Callback;)V
+Landroid/preference/SeekBarVolumizer;->mAudioManager:Landroid/media/AudioManager;
+Landroid/preference/SeekBarVolumizer;->mContext:Landroid/content/Context;
+Landroid/preference/SeekBarVolumizer;->mLastProgress:I
+Landroid/preference/SeekBarVolumizer;->mOriginalStreamVolume:I
+Landroid/preference/SeekBarVolumizer;->mRingtone:Landroid/media/Ringtone;
+Landroid/preference/SeekBarVolumizer;->mSeekBar:Landroid/widget/SeekBar;
+Landroid/preference/SeekBarVolumizer;->mStreamType:I
+Landroid/preference/SeekBarVolumizer;->stop()V
+Landroid/preference/SwitchPreference;->mListener:Landroid/preference/SwitchPreference$Listener;
+Landroid/preference/TwoStatePreference;->syncSummaryView(Landroid/view/View;)V
+Landroid/preference/VolumePreference$VolumeStore;->originalVolume:I
+Landroid/preference/VolumePreference$VolumeStore;->volume:I
+Landroid/preference/VolumePreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/preference/VolumePreference;->mStreamType:I
+Landroid/print/PrintDocumentAdapter$LayoutResultCallback;-><init>()V
+Landroid/print/PrintDocumentAdapter$WriteResultCallback;-><init>()V
+Landroid/print/PrinterId;->getServiceName()Landroid/content/ComponentName;
+Landroid/print/PrintJobInfo;->getAdvancedOptions()Landroid/os/Bundle;
+Landroid/print/PrintJobInfo;->getDocumentInfo()Landroid/print/PrintDocumentInfo;
+Landroid/print/PrintManager;->addPrintJobStateChangeListener(Landroid/print/PrintManager$PrintJobStateChangeListener;)V
+Landroid/provider/Browser$BookmarkColumns;
+Landroid/provider/Browser$BookmarkColumns;-><init>()V
+Landroid/provider/Browser$BookmarkColumns;->BOOKMARK:Ljava/lang/String;
+Landroid/provider/Browser$BookmarkColumns;->CREATED:Ljava/lang/String;
+Landroid/provider/Browser$BookmarkColumns;->DATE:Ljava/lang/String;
+Landroid/provider/Browser$BookmarkColumns;->FAVICON:Ljava/lang/String;
+Landroid/provider/Browser$BookmarkColumns;->TITLE:Ljava/lang/String;
+Landroid/provider/Browser$BookmarkColumns;->URL:Ljava/lang/String;
+Landroid/provider/Browser$BookmarkColumns;->VISITS:Ljava/lang/String;
+Landroid/provider/Browser$SearchColumns;
+Landroid/provider/Browser$SearchColumns;-><init>()V
+Landroid/provider/Browser$SearchColumns;->DATE:Ljava/lang/String;
+Landroid/provider/Browser$SearchColumns;->SEARCH:Ljava/lang/String;
+Landroid/provider/Browser$SearchColumns;->URL:Ljava/lang/String;
+Landroid/provider/Browser;->addSearchUrl(Landroid/content/ContentResolver;Ljava/lang/String;)V
+Landroid/provider/Browser;->BOOKMARKS_URI:Landroid/net/Uri;
+Landroid/provider/Browser;->canClearHistory(Landroid/content/ContentResolver;)Z
+Landroid/provider/Browser;->clearHistory(Landroid/content/ContentResolver;)V
+Landroid/provider/Browser;->clearSearches(Landroid/content/ContentResolver;)V
+Landroid/provider/Browser;->deleteFromHistory(Landroid/content/ContentResolver;Ljava/lang/String;)V
+Landroid/provider/Browser;->deleteHistoryTimeFrame(Landroid/content/ContentResolver;JJ)V
+Landroid/provider/Browser;->getAllBookmarks(Landroid/content/ContentResolver;)Landroid/database/Cursor;
+Landroid/provider/Browser;->getAllVisitedUrls(Landroid/content/ContentResolver;)Landroid/database/Cursor;
+Landroid/provider/Browser;->getVisitedHistory(Landroid/content/ContentResolver;)[Ljava/lang/String;
+Landroid/provider/Browser;->HISTORY_PROJECTION:[Ljava/lang/String;
+Landroid/provider/Browser;->HISTORY_PROJECTION_BOOKMARK_INDEX:I
+Landroid/provider/Browser;->HISTORY_PROJECTION_DATE_INDEX:I
+Landroid/provider/Browser;->HISTORY_PROJECTION_FAVICON_INDEX:I
+Landroid/provider/Browser;->HISTORY_PROJECTION_ID_INDEX:I
+Landroid/provider/Browser;->HISTORY_PROJECTION_TITLE_INDEX:I
+Landroid/provider/Browser;->HISTORY_PROJECTION_URL_INDEX:I
+Landroid/provider/Browser;->HISTORY_PROJECTION_VISITS_INDEX:I
+Landroid/provider/Browser;->requestAllIcons(Landroid/content/ContentResolver;Ljava/lang/String;Landroid/webkit/WebIconDatabase$IconListener;)V
+Landroid/provider/Browser;->saveBookmark(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/provider/Browser;->SEARCHES_PROJECTION:[Ljava/lang/String;
+Landroid/provider/Browser;->SEARCHES_PROJECTION_DATE_INDEX:I
+Landroid/provider/Browser;->SEARCHES_PROJECTION_SEARCH_INDEX:I
+Landroid/provider/Browser;->SEARCHES_URI:Landroid/net/Uri;
+Landroid/provider/Browser;->sendString(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
+Landroid/provider/Browser;->truncateHistory(Landroid/content/ContentResolver;)V
+Landroid/provider/Browser;->TRUNCATE_HISTORY_PROJECTION:[Ljava/lang/String;
+Landroid/provider/Browser;->TRUNCATE_HISTORY_PROJECTION_ID_INDEX:I
+Landroid/provider/Browser;->TRUNCATE_N_OLDEST:I
+Landroid/provider/Browser;->updateVisitedHistory(Landroid/content/ContentResolver;Ljava/lang/String;Z)V
+Landroid/provider/BrowserContract$Accounts;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract$Bookmarks;->buildFolderUri(J)Landroid/net/Uri;
+Landroid/provider/BrowserContract$Bookmarks;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract$Bookmarks;->CONTENT_URI_DEFAULT_FOLDER:Landroid/net/Uri;
+Landroid/provider/BrowserContract$Combined;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract$History;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract$Images;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/BrowserContract;->AUTHORITY_URI:Landroid/net/Uri;
+Landroid/provider/CalendarContract$CalendarAlerts;->findNextAlarmTime(Landroid/content/ContentResolver;J)J
+Landroid/provider/CalendarContract$CalendarAlerts;->rescheduleMissedAlarms(Landroid/content/ContentResolver;Landroid/content/Context;Landroid/app/AlarmManager;)V
+Landroid/provider/CalendarContract$CalendarAlerts;->scheduleAlarm(Landroid/content/Context;Landroid/app/AlarmManager;J)V
+Landroid/provider/CalendarContract$Events;->PROVIDER_WRITABLE_COLUMNS:[Ljava/lang/String;
+Landroid/provider/CallLog$Calls;->addCall(Lcom/android/internal/telephony/CallerInfo;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIILandroid/telecom/PhoneAccountHandle;JILjava/lang/Long;ZLandroid/os/UserHandle;Z)Landroid/net/Uri;
+Landroid/provider/ContactsContract$CommonDataKinds$Phone;->getDisplayLabel(Landroid/content/Context;ILjava/lang/CharSequence;)Ljava/lang/CharSequence;
+Landroid/provider/ContactsContract$ContactCounts;->EXTRA_ADDRESS_BOOK_INDEX:Ljava/lang/String;
+Landroid/provider/ContactsContract$ContactCounts;->EXTRA_ADDRESS_BOOK_INDEX_COUNTS:Ljava/lang/String;
+Landroid/provider/ContactsContract$ContactCounts;->EXTRA_ADDRESS_BOOK_INDEX_TITLES:Ljava/lang/String;
+Landroid/provider/ContactsContract$Contacts$AggregationSuggestions;->builder()Landroid/provider/ContactsContract$Contacts$AggregationSuggestions$Builder;
+Landroid/provider/ContactsContract$Contacts$StreamItems;
+Landroid/provider/ContactsContract$Contacts$StreamItems;->CONTENT_DIRECTORY:Ljava/lang/String;
+Landroid/provider/ContactsContract$Contacts;->CORP_CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/ContactsContract$QuickContact;->composeQuickContactsIntent(Landroid/content/Context;Landroid/graphics/Rect;Landroid/net/Uri;I[Ljava/lang/String;)Landroid/content/Intent;
+Landroid/provider/ContactsContract$RawContacts$StreamItems;
+Landroid/provider/ContactsContract$RawContacts$StreamItems;->CONTENT_DIRECTORY:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemPhotos;
+Landroid/provider/ContactsContract$StreamItemPhotos;->PHOTO:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemPhotosColumns;
+Landroid/provider/ContactsContract$StreamItemPhotosColumns;->PHOTO_FILE_ID:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemPhotosColumns;->PHOTO_URI:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemPhotosColumns;->SORT_INDEX:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemPhotosColumns;->STREAM_ITEM_ID:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemPhotosColumns;->SYNC1:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemPhotosColumns;->SYNC2:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemPhotosColumns;->SYNC3:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemPhotosColumns;->SYNC4:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItems$StreamItemPhotos;
+Landroid/provider/ContactsContract$StreamItems$StreamItemPhotos;->CONTENT_DIRECTORY:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItems$StreamItemPhotos;->CONTENT_ITEM_TYPE:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItems$StreamItemPhotos;->CONTENT_TYPE:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItems;
+Landroid/provider/ContactsContract$StreamItems;->CONTENT_ITEM_TYPE:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItems;->CONTENT_LIMIT_URI:Landroid/net/Uri;
+Landroid/provider/ContactsContract$StreamItems;->CONTENT_PHOTO_URI:Landroid/net/Uri;
+Landroid/provider/ContactsContract$StreamItems;->CONTENT_TYPE:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItems;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/ContactsContract$StreamItems;->MAX_ITEMS:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;
+Landroid/provider/ContactsContract$StreamItemsColumns;->ACCOUNT_NAME:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->ACCOUNT_TYPE:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->COMMENTS:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->CONTACT_ID:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->CONTACT_LOOKUP_KEY:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->DATA_SET:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->RAW_CONTACT_ID:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->RAW_CONTACT_SOURCE_ID:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->RES_ICON:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->RES_LABEL:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->RES_PACKAGE:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->SYNC1:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->SYNC2:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->SYNC3:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->SYNC4:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->TEXT:Ljava/lang/String;
+Landroid/provider/ContactsContract$StreamItemsColumns;->TIMESTAMP:Ljava/lang/String;
+Landroid/provider/ContactsInternal;->startQuickContactWithErrorToast(Landroid/content/Context;Landroid/content/Intent;)V
+Landroid/provider/DocumentsContract$Root;->FLAG_ADVANCED:I
+Landroid/provider/DocumentsContract;->getDocumentThumbnail(Landroid/content/ContentProviderClient;Landroid/net/Uri;Landroid/graphics/Point;Landroid/os/CancellationSignal;)Landroid/graphics/Bitmap;
+Landroid/provider/DocumentsContract;->METHOD_CREATE_DOCUMENT:Ljava/lang/String;
+Landroid/provider/DocumentsContract;->moveDocument(Landroid/content/ContentProviderClient;Landroid/net/Uri;Landroid/net/Uri;Landroid/net/Uri;)Landroid/net/Uri;
+Landroid/provider/DocumentsContract;->PATH_DOCUMENT:Ljava/lang/String;
+Landroid/provider/DocumentsContract;->PATH_TREE:Ljava/lang/String;
+Landroid/provider/DocumentsContract;->setManageMode(Landroid/net/Uri;)Landroid/net/Uri;
+Landroid/provider/Downloads$Impl$RequestHeaders;->INSERT_KEY_PREFIX:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->ALL_DOWNLOADS_CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/Downloads$Impl;->COLUMN_ALLOWED_NETWORK_TYPES:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_ALLOW_ROAMING:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_COOKIE_DATA:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_DELETED:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_DESCRIPTION:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_DESTINATION:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_FILE_NAME_HINT:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_IS_PUBLIC_API:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_MEDIA_SCANNED:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_MIME_TYPE:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_NOTIFICATION_CLASS:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_NOTIFICATION_EXTRAS:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_NOTIFICATION_PACKAGE:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_REFERER:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_TITLE:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_URI:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->COLUMN_VISIBILITY:Ljava/lang/String;
+Landroid/provider/Downloads$Impl;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/Downloads$Impl;->DESTINATION_CACHE_PARTITION_PURGEABLE:I
+Landroid/provider/Downloads$Impl;->DESTINATION_FILE_URI:I
+Landroid/provider/Downloads$Impl;->isNotificationToBeDisplayed(I)Z
+Landroid/provider/Downloads$Impl;->isStatusCompleted(I)Z
+Landroid/provider/Downloads$Impl;->isStatusError(I)Z
+Landroid/provider/Downloads$Impl;->isStatusSuccess(I)Z
+Landroid/provider/Downloads$Impl;->PUBLICLY_ACCESSIBLE_DOWNLOADS_URI:Landroid/net/Uri;
+Landroid/provider/MediaStore$Files$FileColumns;->FORMAT:Ljava/lang/String;
+Landroid/provider/MediaStore$Files$FileColumns;->STORAGE_ID:Ljava/lang/String;
+Landroid/provider/MediaStore$Files;->getMtpObjectsUri(Ljava/lang/String;)Landroid/net/Uri;
+Landroid/provider/MediaStore$Files;->getMtpObjectsUri(Ljava/lang/String;J)Landroid/net/Uri;
+Landroid/provider/MediaStore$Files;->getMtpReferencesUri(Ljava/lang/String;J)Landroid/net/Uri;
+Landroid/provider/MediaStore$MediaColumns;->IS_DRM:Ljava/lang/String;
+Landroid/provider/Settings$Bookmarks;->add(Landroid/content/ContentResolver;Landroid/content/Intent;Ljava/lang/String;Ljava/lang/String;CI)Landroid/net/Uri;
+Landroid/provider/Settings$Bookmarks;->CONTENT_URI:Landroid/net/Uri;
+Landroid/provider/Settings$ContentProviderHolder;->mContentProvider:Landroid/content/IContentProvider;
+Landroid/provider/Settings$Global;->CONTACT_METADATA_SYNC:Ljava/lang/String;
+Landroid/provider/Settings$Global;->ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Global;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
+Landroid/provider/Settings$Global;->HEADS_UP_NOTIFICATIONS_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Global;->HEADS_UP_OFF:I
+Landroid/provider/Settings$Global;->HEADS_UP_ON:I
+Landroid/provider/Settings$Global;->MOBILE_DATA:Ljava/lang/String;
+Landroid/provider/Settings$Global;->MULTI_SIM_USER_PREFERRED_SUBS:[Ljava/lang/String;
+Landroid/provider/Settings$Global;->MULTI_SIM_VOICE_PROMPT:Ljava/lang/String;
+Landroid/provider/Settings$Global;->NETWORK_SCORER_APP:Ljava/lang/String;
+Landroid/provider/Settings$Global;->PACKAGE_VERIFIER_ENABLE:Ljava/lang/String;
+Landroid/provider/Settings$Global;->PREFERRED_NETWORK_MODE:Ljava/lang/String;
+Landroid/provider/Settings$Global;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
+Landroid/provider/Settings$Global;->REQUIRE_PASSWORD_TO_DECRYPT:Ljava/lang/String;
+Landroid/provider/Settings$Global;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
+Landroid/provider/Settings$Global;->sProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
+Landroid/provider/Settings$Global;->WEBVIEW_PROVIDER:Ljava/lang/String;
+Landroid/provider/Settings$Global;->WIFI_SAVED_STATE:Ljava/lang/String;
+Landroid/provider/Settings$Global;->WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Global;->ZEN_MODE:Ljava/lang/String;
+Landroid/provider/Settings$Global;->ZEN_MODE_ALARMS:I
+Landroid/provider/Settings$Global;->ZEN_MODE_CONFIG_ETAG:Ljava/lang/String;
+Landroid/provider/Settings$Global;->ZEN_MODE_IMPORTANT_INTERRUPTIONS:I
+Landroid/provider/Settings$Global;->ZEN_MODE_NO_INTERRUPTIONS:I
+Landroid/provider/Settings$Global;->ZEN_MODE_OFF:I
+Landroid/provider/Settings$NameValueCache;->mProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_AUTOCLICK_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_CAPTIONING_TYPEFACE:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_DISPLAY_DALTONIZER:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ACCESSIBILITY_LARGE_POINTER_ICON:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ANR_SHOW_BACKGROUND:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ASSISTANT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->BACKUP_AUTO_RESTORE:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->BACKUP_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->BACKUP_PROVISIONED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->BACKUP_TRANSPORT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->DIALER_DEFAULT_APPLICATION:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->DOZE_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ENABLED_NOTIFICATION_LISTENERS:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->ENABLED_PRINT_SERVICES:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
+Landroid/provider/Settings$Secure;->getLongForUser(Landroid/content/ContentResolver;Ljava/lang/String;JI)J
+Landroid/provider/Settings$Secure;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
+Landroid/provider/Settings$Secure;->IMMERSIVE_MODE_CONFIRMATIONS:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->INCALL_POWER_BUTTON_BEHAVIOR:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LOCK_SCREEN_LOCK_AFTER_TIMEOUT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LOCK_SCREEN_OWNER_INFO_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LOCK_SCREEN_SHOW_NOTIFICATIONS:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->LONG_PRESS_TIMEOUT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->NFC_PAYMENT_DEFAULT_COMPONENT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->PACKAGE_VERIFIER_USER_CONSENT:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->putIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
+Landroid/provider/Settings$Secure;->putLongForUser(Landroid/content/ContentResolver;Ljava/lang/String;JI)Z
+Landroid/provider/Settings$Secure;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
+Landroid/provider/Settings$Secure;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)Z
+Landroid/provider/Settings$Secure;->SELECTED_SPELL_CHECKER:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->SELECTED_SPELL_CHECKER_SUBTYPE:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->SETTINGS_TO_BACKUP:[Ljava/lang/String;
+Landroid/provider/Settings$Secure;->SMS_DEFAULT_APPLICATION:Ljava/lang/String;
+Landroid/provider/Settings$Secure;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
+Landroid/provider/Settings$Secure;->VOICE_RECOGNITION_SERVICE:Ljava/lang/String;
+Landroid/provider/Settings$System;->AIRPLANE_MODE_TOGGLEABLE_RADIOS:Ljava/lang/String;
+Landroid/provider/Settings$System;->APPEND_FOR_LAST_AUDIBLE:Ljava/lang/String;
+Landroid/provider/Settings$System;->CAR_DOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->CAR_UNDOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->DESK_DOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->DESK_UNDOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->DOCK_SOUNDS_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)I
+Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
+Landroid/provider/Settings$System;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
+Landroid/provider/Settings$System;->HEARING_AID:Ljava/lang/String;
+Landroid/provider/Settings$System;->HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY:Ljava/lang/String;
+Landroid/provider/Settings$System;->LOCKSCREEN_SOUNDS_ENABLED:Ljava/lang/String;
+Landroid/provider/Settings$System;->LOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->MASTER_MONO:Ljava/lang/String;
+Landroid/provider/Settings$System;->NOTIFICATION_LIGHT_PULSE:Ljava/lang/String;
+Landroid/provider/Settings$System;->POINTER_LOCATION:Ljava/lang/String;
+Landroid/provider/Settings$System;->POINTER_SPEED:Ljava/lang/String;
+Landroid/provider/Settings$System;->PRIVATE_SETTINGS:Ljava/util/Set;
+Landroid/provider/Settings$System;->PUBLIC_SETTINGS:Ljava/util/Set;
+Landroid/provider/Settings$System;->putIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
+Landroid/provider/Settings$System;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
+Landroid/provider/Settings$System;->SCREEN_AUTO_BRIGHTNESS_ADJ:Ljava/lang/String;
+Landroid/provider/Settings$System;->SETTINGS_TO_BACKUP:[Ljava/lang/String;
+Landroid/provider/Settings$System;->SHOW_TOUCHES:Ljava/lang/String;
+Landroid/provider/Settings$System;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
+Landroid/provider/Settings$System;->sProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
+Landroid/provider/Settings$System;->TTY_MODE:Ljava/lang/String;
+Landroid/provider/Settings$System;->UNLOCK_SOUND:Ljava/lang/String;
+Landroid/provider/Settings$System;->VIBRATE_IN_SILENT:Ljava/lang/String;
+Landroid/provider/Settings$System;->VOLUME_ALARM:Ljava/lang/String;
+Landroid/provider/Settings$System;->VOLUME_BLUETOOTH_SCO:Ljava/lang/String;
+Landroid/provider/Settings$System;->VOLUME_MUSIC:Ljava/lang/String;
+Landroid/provider/Settings$System;->VOLUME_NOTIFICATION:Ljava/lang/String;
+Landroid/provider/Settings$System;->VOLUME_RING:Ljava/lang/String;
+Landroid/provider/Settings$System;->VOLUME_SETTINGS:[Ljava/lang/String;
+Landroid/provider/Settings$System;->VOLUME_SYSTEM:Ljava/lang/String;
+Landroid/provider/Settings$System;->VOLUME_VOICE:Ljava/lang/String;
+Landroid/provider/Settings;->ACTION_TRUSTED_CREDENTIALS_USER:Ljava/lang/String;
+Landroid/provider/Settings;->ACTION_USER_DICTIONARY_INSERT:Ljava/lang/String;
+Landroid/provider/Settings;->EXTRA_APP_UID:Ljava/lang/String;
+Landroid/provider/Settings;->isCallingPackageAllowedToDrawOverlays(Landroid/content/Context;ILjava/lang/String;Z)Z
+Landroid/provider/Settings;->isCallingPackageAllowedToPerformAppOpsProtectedOperation(Landroid/content/Context;ILjava/lang/String;ZI[Ljava/lang/String;Z)Z
+Landroid/provider/Settings;->isCallingPackageAllowedToWriteSettings(Landroid/content/Context;ILjava/lang/String;Z)Z
+Landroid/provider/Telephony$Mms;->extractAddrSpec(Ljava/lang/String;)Ljava/lang/String;
+Landroid/provider/Telephony$Mms;->isEmailAddress(Ljava/lang/String;)Z
+Landroid/provider/Telephony$Mms;->isPhoneNumber(Ljava/lang/String;)Z
+Landroid/provider/Telephony$Mms;->NAME_ADDR_EMAIL_PATTERN:Ljava/util/regex/Pattern;
+Landroid/provider/Telephony$Sms$Draft;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Draft;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Inbox;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Z)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Inbox;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Z)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Intents;->SMS_EMERGENCY_CB_RECEIVED_ACTION:Ljava/lang/String;
+Landroid/provider/Telephony$Sms$Outbox;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZJ)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Sent;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Sent;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->addMessageToUri(ILandroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZ)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->addMessageToUri(ILandroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZJ)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->addMessageToUri(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZ)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->addMessageToUri(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZJ)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms;->isOutgoingFolder(I)Z
+Landroid/provider/Telephony$Sms;->moveMessageToFolder(Landroid/content/Context;Landroid/net/Uri;II)Z
+Landroid/provider/Telephony$Sms;->query(Landroid/content/ContentResolver;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
+Landroid/provider/Telephony$Threads;->ID_PROJECTION:[Ljava/lang/String;
+Landroid/provider/Telephony$Threads;->THREAD_ID_CONTENT_URI:Landroid/net/Uri;
+Landroid/R$styleable;->ActionBar:[I
+Landroid/R$styleable;->ActionBar_background:I
+Landroid/R$styleable;->ActionBar_backgroundSplit:I
+Landroid/R$styleable;->ActionBar_backgroundStacked:I
+Landroid/R$styleable;->ActionBar_divider:I
+Landroid/R$styleable;->ActionBar_itemPadding:I
+Landroid/R$styleable;->CalendarView:[I
+Landroid/R$styleable;->CalendarView_dateTextAppearance:I
+Landroid/R$styleable;->CalendarView_firstDayOfWeek:I
+Landroid/R$styleable;->CalendarView_focusedMonthDateColor:I
+Landroid/R$styleable;->CalendarView_selectedDateVerticalBar:I
+Landroid/R$styleable;->CalendarView_selectedWeekBackgroundColor:I
+Landroid/R$styleable;->CalendarView_shownWeekCount:I
+Landroid/R$styleable;->CalendarView_showWeekNumber:I
+Landroid/R$styleable;->CalendarView_unfocusedMonthDateColor:I
+Landroid/R$styleable;->CalendarView_weekDayTextAppearance:I
+Landroid/R$styleable;->CalendarView_weekNumberColor:I
+Landroid/R$styleable;->CalendarView_weekSeparatorLineColor:I
+Landroid/R$styleable;->CheckBoxPreference:[I
+Landroid/R$styleable;->CheckedTextView:[I
+Landroid/R$styleable;->CheckedTextView_checkMark:I
+Landroid/R$styleable;->CompoundButton:[I
+Landroid/R$styleable;->CompoundButton_button:I
+Landroid/R$styleable;->ContactsDataKind:[I
+Landroid/R$styleable;->DatePicker:[I
+Landroid/R$styleable;->DialogPreference:[I
+Landroid/R$styleable;->DrawableStates:[I
+Landroid/R$styleable;->ExpandableListView:[I
+Landroid/R$styleable;->FrameLayout_Layout:[I
+Landroid/R$styleable;->HorizontalScrollView:[I
+Landroid/R$styleable;->ImageView:[I
+Landroid/R$styleable;->ImageView_adjustViewBounds:I
+Landroid/R$styleable;->ImageView_baselineAlignBottom:I
+Landroid/R$styleable;->ImageView_cropToPadding:I
+Landroid/R$styleable;->ImageView_maxHeight:I
+Landroid/R$styleable;->ImageView_maxWidth:I
+Landroid/R$styleable;->ImageView_scaleType:I
+Landroid/R$styleable;->ImageView_src:I
+Landroid/R$styleable;->ImageView_tint:I
+Landroid/R$styleable;->Keyboard:[I
+Landroid/R$styleable;->Keyboard_horizontalGap:I
+Landroid/R$styleable;->Keyboard_Key:[I
+Landroid/R$styleable;->Keyboard_keyHeight:I
+Landroid/R$styleable;->Keyboard_keyWidth:I
+Landroid/R$styleable;->Keyboard_Key_codes:I
+Landroid/R$styleable;->Keyboard_Key_iconPreview:I
+Landroid/R$styleable;->Keyboard_Key_isModifier:I
+Landroid/R$styleable;->Keyboard_Key_isRepeatable:I
+Landroid/R$styleable;->Keyboard_Key_isSticky:I
+Landroid/R$styleable;->Keyboard_Key_keyEdgeFlags:I
+Landroid/R$styleable;->Keyboard_Key_keyIcon:I
+Landroid/R$styleable;->Keyboard_Key_keyLabel:I
+Landroid/R$styleable;->Keyboard_Key_keyOutputText:I
+Landroid/R$styleable;->Keyboard_Key_popupCharacters:I
+Landroid/R$styleable;->Keyboard_Key_popupKeyboard:I
+Landroid/R$styleable;->Keyboard_Row:[I
+Landroid/R$styleable;->Keyboard_Row_keyboardMode:I
+Landroid/R$styleable;->Keyboard_Row_rowEdgeFlags:I
+Landroid/R$styleable;->Keyboard_verticalGap:I
+Landroid/R$styleable;->LinearLayout:[I
+Landroid/R$styleable;->LinearLayout_baselineAligned:I
+Landroid/R$styleable;->LinearLayout_baselineAlignedChildIndex:I
+Landroid/R$styleable;->LinearLayout_divider:I
+Landroid/R$styleable;->LinearLayout_dividerPadding:I
+Landroid/R$styleable;->LinearLayout_gravity:I
+Landroid/R$styleable;->LinearLayout_Layout:[I
+Landroid/R$styleable;->LinearLayout_Layout_layout_gravity:I
+Landroid/R$styleable;->LinearLayout_Layout_layout_height:I
+Landroid/R$styleable;->LinearLayout_Layout_layout_weight:I
+Landroid/R$styleable;->LinearLayout_Layout_layout_width:I
+Landroid/R$styleable;->LinearLayout_measureWithLargestChild:I
+Landroid/R$styleable;->LinearLayout_orientation:I
+Landroid/R$styleable;->LinearLayout_showDividers:I
+Landroid/R$styleable;->ListView:[I
+Landroid/R$styleable;->ListView_divider:I
+Landroid/R$styleable;->ListView_dividerHeight:I
+Landroid/R$styleable;->LockPatternView:[I
+Landroid/R$styleable;->NumberPicker:[I
+Landroid/R$styleable;->NumberPicker_solidColor:I
+Landroid/R$styleable;->PopupWindow:[I
+Landroid/R$styleable;->ProgressBar:[I
+Landroid/R$styleable;->ProgressBar_indeterminateDrawable:I
+Landroid/R$styleable;->ProgressBar_indeterminateDuration:I
+Landroid/R$styleable;->ProgressBar_maxHeight:I
+Landroid/R$styleable;->ProgressBar_maxWidth:I
+Landroid/R$styleable;->ProgressBar_minHeight:I
+Landroid/R$styleable;->ProgressBar_minWidth:I
+Landroid/R$styleable;->ProgressBar_progressDrawable:I
+Landroid/R$styleable;->RingtonePreference:[I
+Landroid/R$styleable;->ScrollView:[I
+Landroid/R$styleable;->SearchView:[I
+Landroid/R$styleable;->SeekBar:[I
+Landroid/R$styleable;->SeekBar_thumb:I
+Landroid/R$styleable;->SeekBar_thumbOffset:I
+Landroid/R$styleable;->SlidingDrawer:[I
+Landroid/R$styleable;->SlidingDrawer_allowSingleTap:I
+Landroid/R$styleable;->SlidingDrawer_animateOnClick:I
+Landroid/R$styleable;->SlidingDrawer_bottomOffset:I
+Landroid/R$styleable;->SlidingDrawer_content:I
+Landroid/R$styleable;->SlidingDrawer_handle:I
+Landroid/R$styleable;->SlidingDrawer_orientation:I
+Landroid/R$styleable;->SlidingDrawer_topOffset:I
+Landroid/R$styleable;->Switch:[I
+Landroid/R$styleable;->Switch_showText:I
+Landroid/R$styleable;->Switch_splitTrack:I
+Landroid/R$styleable;->Switch_switchMinWidth:I
+Landroid/R$styleable;->Switch_switchPadding:I
+Landroid/R$styleable;->Switch_switchTextAppearance:I
+Landroid/R$styleable;->Switch_textOff:I
+Landroid/R$styleable;->Switch_textOn:I
+Landroid/R$styleable;->Switch_thumb:I
+Landroid/R$styleable;->Switch_thumbTextPadding:I
+Landroid/R$styleable;->Switch_track:I
+Landroid/R$styleable;->TextAppearance:[I
+Landroid/R$styleable;->TextAppearance_textAllCaps:I
+Landroid/R$styleable;->TextAppearance_textColor:I
+Landroid/R$styleable;->TextAppearance_textColorHighlight:I
+Landroid/R$styleable;->TextAppearance_textColorHint:I
+Landroid/R$styleable;->TextAppearance_textColorLink:I
+Landroid/R$styleable;->TextAppearance_textSize:I
+Landroid/R$styleable;->TextAppearance_textStyle:I
+Landroid/R$styleable;->TextAppearance_typeface:I
+Landroid/R$styleable;->TextView:[I
+Landroid/R$styleable;->TextView_autoLink:I
+Landroid/R$styleable;->TextView_autoText:I
+Landroid/R$styleable;->TextView_bufferType:I
+Landroid/R$styleable;->TextView_capitalize:I
+Landroid/R$styleable;->TextView_cursorVisible:I
+Landroid/R$styleable;->TextView_digits:I
+Landroid/R$styleable;->TextView_drawableBottom:I
+Landroid/R$styleable;->TextView_drawableEnd:I
+Landroid/R$styleable;->TextView_drawableLeft:I
+Landroid/R$styleable;->TextView_drawablePadding:I
+Landroid/R$styleable;->TextView_drawableRight:I
+Landroid/R$styleable;->TextView_drawableStart:I
+Landroid/R$styleable;->TextView_drawableTop:I
+Landroid/R$styleable;->TextView_editable:I
+Landroid/R$styleable;->TextView_ellipsize:I
+Landroid/R$styleable;->TextView_ems:I
+Landroid/R$styleable;->TextView_enabled:I
+Landroid/R$styleable;->TextView_freezesText:I
+Landroid/R$styleable;->TextView_gravity:I
+Landroid/R$styleable;->TextView_height:I
+Landroid/R$styleable;->TextView_hint:I
+Landroid/R$styleable;->TextView_imeActionId:I
+Landroid/R$styleable;->TextView_imeActionLabel:I
+Landroid/R$styleable;->TextView_imeOptions:I
+Landroid/R$styleable;->TextView_includeFontPadding:I
+Landroid/R$styleable;->TextView_inputMethod:I
+Landroid/R$styleable;->TextView_inputType:I
+Landroid/R$styleable;->TextView_lines:I
+Landroid/R$styleable;->TextView_lineSpacingExtra:I
+Landroid/R$styleable;->TextView_lineSpacingMultiplier:I
+Landroid/R$styleable;->TextView_linksClickable:I
+Landroid/R$styleable;->TextView_marqueeRepeatLimit:I
+Landroid/R$styleable;->TextView_maxEms:I
+Landroid/R$styleable;->TextView_maxHeight:I
+Landroid/R$styleable;->TextView_maxLength:I
+Landroid/R$styleable;->TextView_maxLines:I
+Landroid/R$styleable;->TextView_maxWidth:I
+Landroid/R$styleable;->TextView_minEms:I
+Landroid/R$styleable;->TextView_minHeight:I
+Landroid/R$styleable;->TextView_minLines:I
+Landroid/R$styleable;->TextView_minWidth:I
+Landroid/R$styleable;->TextView_numeric:I
+Landroid/R$styleable;->TextView_password:I
+Landroid/R$styleable;->TextView_phoneNumber:I
+Landroid/R$styleable;->TextView_privateImeOptions:I
+Landroid/R$styleable;->TextView_scrollHorizontally:I
+Landroid/R$styleable;->TextView_selectAllOnFocus:I
+Landroid/R$styleable;->TextView_shadowColor:I
+Landroid/R$styleable;->TextView_shadowDx:I
+Landroid/R$styleable;->TextView_shadowDy:I
+Landroid/R$styleable;->TextView_shadowRadius:I
+Landroid/R$styleable;->TextView_singleLine:I
+Landroid/R$styleable;->TextView_text:I
+Landroid/R$styleable;->TextView_textAllCaps:I
+Landroid/R$styleable;->TextView_textAppearance:I
+Landroid/R$styleable;->TextView_textColor:I
+Landroid/R$styleable;->TextView_textColorHighlight:I
+Landroid/R$styleable;->TextView_textColorHint:I
+Landroid/R$styleable;->TextView_textColorLink:I
+Landroid/R$styleable;->TextView_textCursorDrawable:I
+Landroid/R$styleable;->TextView_textIsSelectable:I
+Landroid/R$styleable;->TextView_textScaleX:I
+Landroid/R$styleable;->TextView_textSelectHandle:I
+Landroid/R$styleable;->TextView_textSelectHandleLeft:I
+Landroid/R$styleable;->TextView_textSelectHandleRight:I
+Landroid/R$styleable;->TextView_textSize:I
+Landroid/R$styleable;->TextView_textStyle:I
+Landroid/R$styleable;->TextView_typeface:I
+Landroid/R$styleable;->TextView_width:I
+Landroid/R$styleable;->Theme:[I
+Landroid/R$styleable;->View:[I
+Landroid/R$styleable;->ViewDrawableStates:[I
+Landroid/R$styleable;->ViewGroup_Layout:[I
+Landroid/R$styleable;->ViewGroup_Layout_layout_height:I
+Landroid/R$styleable;->ViewGroup_Layout_layout_width:I
+Landroid/R$styleable;->ViewGroup_MarginLayout:[I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_height:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_margin:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_marginBottom:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_marginLeft:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_marginRight:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_marginTop:I
+Landroid/R$styleable;->ViewGroup_MarginLayout_layout_width:I
+Landroid/R$styleable;->View_alpha:I
+Landroid/R$styleable;->View_background:I
+Landroid/R$styleable;->View_clickable:I
+Landroid/R$styleable;->View_contentDescription:I
+Landroid/R$styleable;->View_drawingCacheQuality:I
+Landroid/R$styleable;->View_duplicateParentState:I
+Landroid/R$styleable;->View_fadingEdge:I
+Landroid/R$styleable;->View_filterTouchesWhenObscured:I
+Landroid/R$styleable;->View_fitsSystemWindows:I
+Landroid/R$styleable;->View_focusable:I
+Landroid/R$styleable;->View_focusableInTouchMode:I
+Landroid/R$styleable;->View_hapticFeedbackEnabled:I
+Landroid/R$styleable;->View_id:I
+Landroid/R$styleable;->View_isScrollContainer:I
+Landroid/R$styleable;->View_keepScreenOn:I
+Landroid/R$styleable;->View_longClickable:I
+Landroid/R$styleable;->View_minHeight:I
+Landroid/R$styleable;->View_minWidth:I
+Landroid/R$styleable;->View_nextFocusDown:I
+Landroid/R$styleable;->View_nextFocusLeft:I
+Landroid/R$styleable;->View_nextFocusRight:I
+Landroid/R$styleable;->View_nextFocusUp:I
+Landroid/R$styleable;->View_onClick:I
+Landroid/R$styleable;->View_overScrollMode:I
+Landroid/R$styleable;->View_padding:I
+Landroid/R$styleable;->View_paddingBottom:I
+Landroid/R$styleable;->View_paddingEnd:I
+Landroid/R$styleable;->View_paddingLeft:I
+Landroid/R$styleable;->View_paddingRight:I
+Landroid/R$styleable;->View_paddingStart:I
+Landroid/R$styleable;->View_paddingTop:I
+Landroid/R$styleable;->View_rotation:I
+Landroid/R$styleable;->View_rotationX:I
+Landroid/R$styleable;->View_rotationY:I
+Landroid/R$styleable;->View_saveEnabled:I
+Landroid/R$styleable;->View_scaleX:I
+Landroid/R$styleable;->View_scaleY:I
+Landroid/R$styleable;->View_scrollbarDefaultDelayBeforeFade:I
+Landroid/R$styleable;->View_scrollbarFadeDuration:I
+Landroid/R$styleable;->View_scrollbars:I
+Landroid/R$styleable;->View_scrollbarSize:I
+Landroid/R$styleable;->View_scrollbarStyle:I
+Landroid/R$styleable;->View_scrollbarThumbHorizontal:I
+Landroid/R$styleable;->View_scrollbarThumbVertical:I
+Landroid/R$styleable;->View_scrollbarTrackHorizontal:I
+Landroid/R$styleable;->View_scrollbarTrackVertical:I
+Landroid/R$styleable;->View_scrollX:I
+Landroid/R$styleable;->View_scrollY:I
+Landroid/R$styleable;->View_soundEffectsEnabled:I
+Landroid/R$styleable;->View_tag:I
+Landroid/R$styleable;->View_transformPivotX:I
+Landroid/R$styleable;->View_transformPivotY:I
+Landroid/R$styleable;->View_translationX:I
+Landroid/R$styleable;->View_translationY:I
+Landroid/R$styleable;->View_visibility:I
+Landroid/R$styleable;->Window:[I
+Landroid/R$styleable;->Window_windowBackground:I
+Landroid/R$styleable;->Window_windowFrame:I
+Landroid/renderscript/BaseObj;->mRS:Landroid/renderscript/RenderScript;
+Landroid/renderscript/Element;->createUser(Landroid/renderscript/RenderScript;Landroid/renderscript/Element$DataType;)Landroid/renderscript/Element;
+Landroid/renderscript/FileA3D$EntryType;->MESH:Landroid/renderscript/FileA3D$EntryType;
+Landroid/renderscript/FileA3D$IndexEntry;->getEntryType()Landroid/renderscript/FileA3D$EntryType;
+Landroid/renderscript/FileA3D$IndexEntry;->getObject()Landroid/renderscript/BaseObj;
+Landroid/renderscript/FileA3D;->createFromResource(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;I)Landroid/renderscript/FileA3D;
+Landroid/renderscript/FileA3D;->getIndexEntry(I)Landroid/renderscript/FileA3D$IndexEntry;
+Landroid/renderscript/Font$Style;->ITALIC:Landroid/renderscript/Font$Style;
+Landroid/renderscript/Font;->create(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;Ljava/lang/String;Landroid/renderscript/Font$Style;F)Landroid/renderscript/Font;
+Landroid/renderscript/Matrix4f;->mMat:[F
+Landroid/renderscript/Mesh$AllocationBuilder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/Mesh$AllocationBuilder;->addIndexSetAllocation(Landroid/renderscript/Allocation;Landroid/renderscript/Mesh$Primitive;)Landroid/renderscript/Mesh$AllocationBuilder;
+Landroid/renderscript/Mesh$AllocationBuilder;->addIndexSetType(Landroid/renderscript/Mesh$Primitive;)Landroid/renderscript/Mesh$AllocationBuilder;
+Landroid/renderscript/Mesh$AllocationBuilder;->addVertexAllocation(Landroid/renderscript/Allocation;)Landroid/renderscript/Mesh$AllocationBuilder;
+Landroid/renderscript/Mesh$AllocationBuilder;->create()Landroid/renderscript/Mesh;
+Landroid/renderscript/Mesh$Primitive;->POINT:Landroid/renderscript/Mesh$Primitive;
+Landroid/renderscript/Mesh$Primitive;->TRIANGLE:Landroid/renderscript/Mesh$Primitive;
+Landroid/renderscript/Mesh$TriangleMeshBuilder;-><init>(Landroid/renderscript/RenderScript;II)V
+Landroid/renderscript/Mesh$TriangleMeshBuilder;->addTriangle(III)Landroid/renderscript/Mesh$TriangleMeshBuilder;
+Landroid/renderscript/Mesh$TriangleMeshBuilder;->addVertex(FF)Landroid/renderscript/Mesh$TriangleMeshBuilder;
+Landroid/renderscript/Mesh$TriangleMeshBuilder;->create(Z)Landroid/renderscript/Mesh;
+Landroid/renderscript/Mesh;->getVertexAllocation(I)Landroid/renderscript/Allocation;
+Landroid/renderscript/Program$BaseProgramBuilder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/Program$BaseProgramBuilder;->mConstantCount:I
+Landroid/renderscript/Program$BaseProgramBuilder;->mConstants:[Landroid/renderscript/Type;
+Landroid/renderscript/Program$BaseProgramBuilder;->mInputCount:I
+Landroid/renderscript/Program$BaseProgramBuilder;->mInputs:[Landroid/renderscript/Element;
+Landroid/renderscript/Program$BaseProgramBuilder;->mOutputCount:I
+Landroid/renderscript/Program$BaseProgramBuilder;->mOutputs:[Landroid/renderscript/Element;
+Landroid/renderscript/Program$BaseProgramBuilder;->mRS:Landroid/renderscript/RenderScript;
+Landroid/renderscript/Program$BaseProgramBuilder;->mShader:Ljava/lang/String;
+Landroid/renderscript/Program$BaseProgramBuilder;->mTextureCount:I
+Landroid/renderscript/Program$TextureType;->TEXTURE_2D:Landroid/renderscript/Program$TextureType;
+Landroid/renderscript/ProgramFragment$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramFragment$Builder;->create()Landroid/renderscript/ProgramFragment;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;->MODULATE:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;->REPLACE:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->ALPHA:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->RGB:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->RGBA:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->create()Landroid/renderscript/ProgramFragmentFixedFunction;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->setTexture(Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;I)Landroid/renderscript/ProgramFragmentFixedFunction$Builder;
+Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->setVaryingColor(Z)Landroid/renderscript/ProgramFragmentFixedFunction$Builder;
+Landroid/renderscript/ProgramRaster$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramRaster$Builder;->create()Landroid/renderscript/ProgramRaster;
+Landroid/renderscript/ProgramRaster$Builder;->setPointSpriteEnabled(Z)Landroid/renderscript/ProgramRaster$Builder;
+Landroid/renderscript/ProgramStore$BlendDstFunc;->ONE:Landroid/renderscript/ProgramStore$BlendDstFunc;
+Landroid/renderscript/ProgramStore$BlendDstFunc;->ONE_MINUS_SRC_ALPHA:Landroid/renderscript/ProgramStore$BlendDstFunc;
+Landroid/renderscript/ProgramStore$BlendDstFunc;->ZERO:Landroid/renderscript/ProgramStore$BlendDstFunc;
+Landroid/renderscript/ProgramStore$BlendSrcFunc;->ONE:Landroid/renderscript/ProgramStore$BlendSrcFunc;
+Landroid/renderscript/ProgramStore$BlendSrcFunc;->SRC_ALPHA:Landroid/renderscript/ProgramStore$BlendSrcFunc;
+Landroid/renderscript/ProgramStore$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramStore$Builder;->create()Landroid/renderscript/ProgramStore;
+Landroid/renderscript/ProgramStore$Builder;->setBlendFunc(Landroid/renderscript/ProgramStore$BlendSrcFunc;Landroid/renderscript/ProgramStore$BlendDstFunc;)Landroid/renderscript/ProgramStore$Builder;
+Landroid/renderscript/ProgramStore$Builder;->setDepthFunc(Landroid/renderscript/ProgramStore$DepthFunc;)Landroid/renderscript/ProgramStore$Builder;
+Landroid/renderscript/ProgramStore$Builder;->setDepthMaskEnabled(Z)Landroid/renderscript/ProgramStore$Builder;
+Landroid/renderscript/ProgramStore$Builder;->setDitherEnabled(Z)Landroid/renderscript/ProgramStore$Builder;
+Landroid/renderscript/ProgramStore$DepthFunc;->ALWAYS:Landroid/renderscript/ProgramStore$DepthFunc;
+Landroid/renderscript/ProgramStore$DepthFunc;->LESS:Landroid/renderscript/ProgramStore$DepthFunc;
+Landroid/renderscript/ProgramStore;->BLEND_ALPHA_DEPTH_NONE(Landroid/renderscript/RenderScript;)Landroid/renderscript/ProgramStore;
+Landroid/renderscript/ProgramVertex$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramVertex$Builder;->addInput(Landroid/renderscript/Element;)Landroid/renderscript/ProgramVertex$Builder;
+Landroid/renderscript/ProgramVertex$Builder;->create()Landroid/renderscript/ProgramVertex;
+Landroid/renderscript/ProgramVertexFixedFunction$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramVertexFixedFunction$Builder;->create()Landroid/renderscript/ProgramVertexFixedFunction;
+Landroid/renderscript/ProgramVertexFixedFunction$Constants;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/ProgramVertexFixedFunction$Constants;->setProjection(Landroid/renderscript/Matrix4f;)V
+Landroid/renderscript/ProgramVertexFixedFunction;->bindConstants(Landroid/renderscript/ProgramVertexFixedFunction$Constants;)V
+Landroid/renderscript/RenderScript;->create(Landroid/content/Context;I)Landroid/renderscript/RenderScript;
+Landroid/renderscript/RenderScript;->create(Landroid/content/Context;ILandroid/renderscript/RenderScript$ContextType;I)Landroid/renderscript/RenderScript;
+Landroid/renderscript/RenderScript;->getMinorID()J
+Landroid/renderscript/RenderScript;->mMessageCallback:Landroid/renderscript/RenderScript$RSMessageHandler;
+Landroid/renderscript/RenderScript;->nScriptCCreate(Ljava/lang/String;Ljava/lang/String;[BI)J
+Landroid/renderscript/RenderScript;->sPointerSize:I
+Landroid/renderscript/RenderScript;->validate()V
+Landroid/renderscript/RenderScriptCacheDir;->mCacheDir:Ljava/io/File;
+Landroid/renderscript/RenderScriptCacheDir;->setupDiskCache(Ljava/io/File;)V
+Landroid/renderscript/RenderScriptGL$SurfaceConfig;-><init>()V
+Landroid/renderscript/RenderScriptGL$SurfaceConfig;->setDepth(II)V
+Landroid/renderscript/RenderScriptGL;-><init>(Landroid/content/Context;Landroid/renderscript/RenderScriptGL$SurfaceConfig;)V
+Landroid/renderscript/RenderScriptGL;->bindProgramRaster(Landroid/renderscript/ProgramRaster;)V
+Landroid/renderscript/RenderScriptGL;->bindProgramStore(Landroid/renderscript/ProgramStore;)V
+Landroid/renderscript/RenderScriptGL;->bindProgramVertex(Landroid/renderscript/ProgramVertex;)V
+Landroid/renderscript/RenderScriptGL;->bindRootScript(Landroid/renderscript/Script;)V
+Landroid/renderscript/RenderScriptGL;->setSurface(Landroid/view/SurfaceHolder;II)V
+Landroid/renderscript/RSSurfaceView;-><init>(Landroid/content/Context;)V
+Landroid/renderscript/RSSurfaceView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/renderscript/Script$Builder;-><init>(Landroid/renderscript/RenderScript;)V
+Landroid/renderscript/Script$Builder;->mRS:Landroid/renderscript/RenderScript;
+Landroid/security/Credentials;->convertToPem([[Ljava/security/cert/Certificate;)[B
+Landroid/security/Credentials;->getInstance()Landroid/security/Credentials;
+Landroid/security/Credentials;->install(Landroid/content/Context;Ljava/lang/String;[B)V
+Landroid/security/Credentials;->install(Landroid/content/Context;Ljava/security/KeyPair;)V
+Landroid/security/Credentials;->unlock(Landroid/content/Context;)V
+Landroid/security/GateKeeper;->getSecureUserId()J
+Landroid/security/IKeyChainService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/security/IKeyChainService;
+Landroid/security/IKeyChainService;->requestPrivateKey(Ljava/lang/String;)Ljava/lang/String;
+Landroid/security/IKeystoreService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/security/IKeystoreService;
+Landroid/security/IKeystoreService;->clear_uid(J)I
+Landroid/security/IKeystoreService;->del(Ljava/lang/String;I)I
+Landroid/security/IKeystoreService;->exist(Ljava/lang/String;I)I
+Landroid/security/IKeystoreService;->generateKey(Ljava/lang/String;Landroid/security/keymaster/KeymasterArguments;[BIILandroid/security/keymaster/KeyCharacteristics;)I
+Landroid/security/IKeystoreService;->get(Ljava/lang/String;I)[B
+Landroid/security/IKeystoreService;->getState(I)I
+Landroid/security/IKeystoreService;->get_pubkey(Ljava/lang/String;)[B
+Landroid/security/IKeystoreService;->import_key(Ljava/lang/String;[BII)I
+Landroid/security/IKeystoreService;->insert(Ljava/lang/String;[BII)I
+Landroid/security/IKeystoreService;->is_hardware_backed(Ljava/lang/String;)I
+Landroid/security/IKeystoreService;->list(Ljava/lang/String;I)[Ljava/lang/String;
+Landroid/security/IKeystoreService;->reset()I
+Landroid/security/IKeystoreService;->sign(Ljava/lang/String;[B)[B
+Landroid/security/IKeystoreService;->ungrant(Ljava/lang/String;I)I
+Landroid/security/IKeystoreService;->verify(Ljava/lang/String;[B[B)I
+Landroid/security/keymaster/ExportResult;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/keymaster/KeyCharacteristics;-><init>()V
+Landroid/security/keymaster/KeyCharacteristics;->readFromParcel(Landroid/os/Parcel;)V
+Landroid/security/keymaster/KeymasterArguments;-><init>()V
+Landroid/security/keymaster/KeymasterArguments;->addEnum(II)V
+Landroid/security/keymaster/KeymasterArguments;->addUnsignedInt(IJ)V
+Landroid/security/keymaster/KeymasterArguments;->addUnsignedLong(ILjava/math/BigInteger;)V
+Landroid/security/keymaster/KeymasterArguments;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/keymaster/KeymasterArguments;->readFromParcel(Landroid/os/Parcel;)V
+Landroid/security/keymaster/KeymasterBlob;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/keymaster/OperationResult;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/KeyStore$State;->LOCKED:Landroid/security/KeyStore$State;
+Landroid/security/KeyStore$State;->UNLOCKED:Landroid/security/KeyStore$State;
+Landroid/security/keystore/AndroidKeyStoreProvider;->getKeyStoreOperationHandle(Ljava/lang/Object;)J
+Landroid/security/keystore/KeyGenParameterSpec;->getUid()I
+Landroid/security/keystore/KeyGenParameterSpec;->isUniqueIdIncluded()Z
+Landroid/security/keystore/recovery/KeyChainSnapshot;->getTrustedHardwarePublicKey()[B
+Landroid/security/keystore/recovery/RecoveryController;->generateAndStoreKey(Ljava/lang/String;[B)[B
+Landroid/security/keystore/recovery/RecoveryController;->generateKey(Ljava/lang/String;[B)Ljava/security/Key;
+Landroid/security/keystore/recovery/RecoveryController;->getAliases(Ljava/lang/String;)Ljava/util/List;
+Landroid/security/keystore/recovery/RecoveryController;->getRecoveryData()Landroid/security/keystore/recovery/KeyChainSnapshot;
+Landroid/security/keystore/recovery/RecoveryController;->getRecoveryStatus(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/security/keystore/recovery/RecoveryController;->initRecoveryService(Ljava/lang/String;[B)V
+Landroid/security/keystore/recovery/RecoveryController;->setRecoveryStatus(Ljava/lang/String;Ljava/lang/String;I)V
+Landroid/security/keystore/recovery/RecoverySession;->recoverKeys([BLjava/util/List;)Ljava/util/Map;
+Landroid/security/keystore/recovery/RecoverySession;->start(Ljava/security/cert/CertPath;[B[BLjava/util/List;)[B
+Landroid/security/keystore/recovery/RecoverySession;->start([B[B[BLjava/util/List;)[B
+Landroid/security/keystore/recovery/WrappedApplicationKey$Builder;->setAccount([B)Landroid/security/keystore/recovery/WrappedApplicationKey$Builder;
+Landroid/security/keystore/recovery/WrappedApplicationKey;->getAccount()[B
+Landroid/security/KeyStore;->delete(Ljava/lang/String;)Z
+Landroid/security/KeyStore;->get(Ljava/lang/String;)[B
+Landroid/security/KeyStore;->getApplicationContext()Landroid/content/Context;
+Landroid/security/KeyStore;->getInstance()Landroid/security/KeyStore;
+Landroid/security/KeyStore;->getKeyStoreException(I)Landroid/security/KeyStoreException;
+Landroid/security/KeyStore;->isEmpty()Z
+Landroid/security/KeyStore;->NO_ERROR:I
+Landroid/security/KeyStore;->reset()Z
+Landroid/security/KeyStore;->state()Landroid/security/KeyStore$State;
+Landroid/security/KeyStore;->state(I)Landroid/security/KeyStore$State;
+Landroid/security/KeyStore;->unlock(Ljava/lang/String;)Z
+Landroid/security/KeystoreArguments;-><init>([[B)V
+Landroid/security/KeystoreArguments;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/security/net/config/RootTrustManager;->checkServerTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
+Landroid/service/carrier/ICarrierMessagingCallback$Stub;-><init>()V
+Landroid/service/carrier/ICarrierMessagingService;->filterSms(Landroid/service/carrier/MessagePdu;Ljava/lang/String;IILandroid/service/carrier/ICarrierMessagingCallback;)V
+Landroid/service/dreams/DreamService;->canDoze()Z
+Landroid/service/dreams/DreamService;->getDozeScreenBrightness()I
+Landroid/service/dreams/DreamService;->isDozing()Z
+Landroid/service/dreams/DreamService;->setDozeScreenBrightness(I)V
+Landroid/service/dreams/DreamService;->setDozeScreenState(I)V
+Landroid/service/dreams/DreamService;->setWindowless(Z)V
+Landroid/service/dreams/DreamService;->startDozing()V
+Landroid/service/dreams/DreamService;->stopDozing()V
+Landroid/service/dreams/IDreamManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/dreams/IDreamManager;
+Landroid/service/dreams/IDreamManager;->awaken()V
+Landroid/service/dreams/IDreamManager;->dream()V
+Landroid/service/dreams/IDreamManager;->getDreamComponents()[Landroid/content/ComponentName;
+Landroid/service/dreams/IDreamManager;->isDreaming()Z
+Landroid/service/dreams/IDreamManager;->setDreamComponents([Landroid/content/ComponentName;)V
+Landroid/service/euicc/EuiccProfileInfo;-><init>(Ljava/lang/String;[Landroid/telephony/UiccAccessRule;Ljava/lang/String;)V
+Landroid/service/euicc/GetDefaultDownloadableSubscriptionListResult;->result:I
+Landroid/service/euicc/GetDownloadableSubscriptionMetadataResult;->result:I
+Landroid/service/euicc/IDeleteSubscriptionCallback;->onComplete(I)V
+Landroid/service/euicc/IDownloadSubscriptionCallback;->onComplete(I)V
+Landroid/service/euicc/IEraseSubscriptionsCallback;->onComplete(I)V
+Landroid/service/euicc/IEuiccService$Stub;-><init>()V
+Landroid/service/euicc/IGetDefaultDownloadableSubscriptionListCallback;->onComplete(Landroid/service/euicc/GetDefaultDownloadableSubscriptionListResult;)V
+Landroid/service/euicc/IGetDownloadableSubscriptionMetadataCallback;->onComplete(Landroid/service/euicc/GetDownloadableSubscriptionMetadataResult;)V
+Landroid/service/euicc/IGetEidCallback;->onSuccess(Ljava/lang/String;)V
+Landroid/service/euicc/IGetEuiccInfoCallback;->onSuccess(Landroid/telephony/euicc/EuiccInfo;)V
+Landroid/service/euicc/IGetEuiccProfileInfoListCallback;->onComplete(Landroid/service/euicc/GetEuiccProfileInfoListResult;)V
+Landroid/service/euicc/IRetainSubscriptionsForFactoryResetCallback;->onComplete(I)V
+Landroid/service/euicc/ISwitchToSubscriptionCallback;->onComplete(I)V
+Landroid/service/euicc/IUpdateSubscriptionNicknameCallback;->onComplete(I)V
+Landroid/service/media/IMediaBrowserServiceCallbacks$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/media/IMediaBrowserServiceCallbacks;
+Landroid/service/media/IMediaBrowserServiceCallbacks;->onConnect(Ljava/lang/String;Landroid/media/session/MediaSession$Token;Landroid/os/Bundle;)V
+Landroid/service/media/IMediaBrowserServiceCallbacks;->onConnectFailed()V
+Landroid/service/media/IMediaBrowserServiceCallbacks;->onLoadChildren(Ljava/lang/String;Landroid/content/pm/ParceledListSlice;)V
+Landroid/service/media/IMediaBrowserServiceCallbacks;->onLoadChildrenWithOptions(Ljava/lang/String;Landroid/content/pm/ParceledListSlice;Landroid/os/Bundle;)V
+Landroid/service/media/MediaBrowserService$Result;->mFlags:I
+Landroid/service/media/MediaBrowserService;->KEY_MEDIA_ITEM:Ljava/lang/String;
+Landroid/service/notification/INotificationListener$Stub;-><init>()V
+Landroid/service/notification/NotificationListenerService$Ranking;->getAdditionalPeople()Ljava/util/List;
+Landroid/service/notification/NotificationListenerService$Ranking;->getSnoozeCriteria()Ljava/util/List;
+Landroid/service/notification/NotificationListenerService$Ranking;->getVisibilityOverride()I
+Landroid/service/notification/NotificationListenerService;->getActiveNotifications(I)[Landroid/service/notification/StatusBarNotification;
+Landroid/service/notification/NotificationListenerService;->getActiveNotifications([Ljava/lang/String;I)[Landroid/service/notification/StatusBarNotification;
+Landroid/service/notification/NotificationListenerService;->getNotificationInterface()Landroid/app/INotificationManager;
+Landroid/service/notification/NotificationListenerService;->isBound()Z
+Landroid/service/notification/NotificationListenerService;->mHandler:Landroid/os/Handler;
+Landroid/service/notification/NotificationListenerService;->mNoMan:Landroid/app/INotificationManager;
+Landroid/service/notification/NotificationListenerService;->mWrapper:Landroid/service/notification/NotificationListenerService$NotificationListenerWrapper;
+Landroid/service/notification/NotificationListenerService;->registerAsSystemService(Landroid/content/Context;Landroid/content/ComponentName;I)V
+Landroid/service/notification/NotificationListenerService;->setOnNotificationPostedTrim(I)V
+Landroid/service/notification/NotificationListenerService;->snoozeNotification(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/service/notification/NotificationListenerService;->TAG:Ljava/lang/String;
+Landroid/service/notification/NotificationListenerService;->TRIM_FULL:I
+Landroid/service/notification/NotificationListenerService;->TRIM_LIGHT:I
+Landroid/service/notification/NotificationListenerService;->unregisterAsSystemService()V
+Landroid/service/notification/StatusBarNotification;->getInitialPid()I
+Landroid/service/notification/StatusBarNotification;->getOpPkg()Ljava/lang/String;
+Landroid/service/notification/StatusBarNotification;->getPackageContext(Landroid/content/Context;)Landroid/content/Context;
+Landroid/service/notification/StatusBarNotification;->getUid()I
+Landroid/service/notification/StatusBarNotification;->id:I
+Landroid/service/notification/StatusBarNotification;->initialPid:I
+Landroid/service/notification/StatusBarNotification;->notification:Landroid/app/Notification;
+Landroid/service/notification/StatusBarNotification;->pkg:Ljava/lang/String;
+Landroid/service/notification/StatusBarNotification;->postTime:J
+Landroid/service/notification/StatusBarNotification;->tag:Ljava/lang/String;
+Landroid/service/notification/StatusBarNotification;->uid:I
+Landroid/service/notification/StatusBarNotification;->user:Landroid/os/UserHandle;
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->days:[I
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->endHour:I
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->endMinute:I
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->startHour:I
+Landroid/service/notification/ZenModeConfig$ScheduleInfo;->startMinute:I
+Landroid/service/notification/ZenModeConfig$ZenRule;->conditionId:Landroid/net/Uri;
+Landroid/service/notification/ZenModeConfig$ZenRule;->creationTime:J
+Landroid/service/notification/ZenModeConfig$ZenRule;->enabled:Z
+Landroid/service/notification/ZenModeConfig$ZenRule;->name:Ljava/lang/String;
+Landroid/service/notification/ZenModeConfig$ZenRule;->snoozing:Z
+Landroid/service/notification/ZenModeConfig$ZenRule;->zenMode:I
+Landroid/service/notification/ZenModeConfig;-><init>()V
+Landroid/service/notification/ZenModeConfig;->allowAlarms:Z
+Landroid/service/notification/ZenModeConfig;->automaticRules:Landroid/util/ArrayMap;
+Landroid/service/notification/ZenModeConfig;->tryParseScheduleConditionId(Landroid/net/Uri;)Landroid/service/notification/ZenModeConfig$ScheduleInfo;
+Landroid/service/persistentdata/IPersistentDataBlockService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/persistentdata/IPersistentDataBlockService;
+Landroid/service/voice/AlwaysOnHotwordDetector$EventPayload;->getCaptureSession()Ljava/lang/Integer;
+Landroid/service/voice/VoiceInteractionService;->isKeyphraseAndLocaleSupportedForHotword(Ljava/lang/String;Ljava/util/Locale;)Z
+Landroid/service/vr/IVrManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/vr/IVrManager;
+Landroid/service/vr/IVrManager;->getVr2dDisplayId()I
+Landroid/service/vr/IVrManager;->getVrModeState()Z
+Landroid/service/vr/VrListenerService;->onCurrentVrActivityChanged(Landroid/content/ComponentName;ZI)V
+Landroid/service/wallpaper/IWallpaperConnection$Stub;-><init>()V
+Landroid/service/wallpaper/IWallpaperEngine;->destroy()V
+Landroid/service/wallpaper/IWallpaperEngine;->dispatchPointer(Landroid/view/MotionEvent;)V
+Landroid/service/wallpaper/IWallpaperEngine;->dispatchWallpaperCommand(Ljava/lang/String;IIILandroid/os/Bundle;)V
+Landroid/service/wallpaper/IWallpaperEngine;->setDesiredSize(II)V
+Landroid/service/wallpaper/IWallpaperEngine;->setVisibility(Z)V
+Landroid/service/wallpaper/IWallpaperService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/wallpaper/IWallpaperService;
+Landroid/service/wallpaper/WallpaperService$Engine;->mPendingXOffset:F
+Landroid/service/wallpaper/WallpaperService$Engine;->setFixedSizeAllowed(Z)V
+Landroid/service/wallpaper/WallpaperService;->MSG_WINDOW_RESIZED:I
+Landroid/speech/tts/TextToSpeech;->getCurrentEngine()Ljava/lang/String;
+Landroid/speech/tts/TextToSpeech;->mConnectingServiceConnection:Landroid/speech/tts/TextToSpeech$Connection;
+Landroid/speech/tts/TextToSpeech;->mCurrentEngine:Ljava/lang/String;
+Landroid/speech/tts/TextToSpeech;->mInitListener:Landroid/speech/tts/TextToSpeech$OnInitListener;
+Landroid/speech/tts/TtsEngines;-><init>(Landroid/content/Context;)V
+Landroid/speech/tts/TtsEngines;->getEngines()Ljava/util/List;
+Landroid/speech/tts/TtsEngines;->getLocalePrefForEngine(Ljava/lang/String;)Ljava/util/Locale;
+Landroid/speech/tts/TtsEngines;->getSettingsIntent(Ljava/lang/String;)Landroid/content/Intent;
+Landroid/speech/tts/TtsEngines;->normalizeTTSLocale(Ljava/util/Locale;)Ljava/util/Locale;
+Landroid/speech/tts/TtsEngines;->parseLocaleString(Ljava/lang/String;)Ljava/util/Locale;
+Landroid/speech/tts/TtsEngines;->updateLocalePrefForEngine(Ljava/lang/String;Ljava/util/Locale;)V
+Landroid/speech/tts/UtteranceProgressListener;->onUtteranceRangeStart(Ljava/lang/String;II)V
+Landroid/system/Int32Ref;->value:I
+Landroid/system/NetlinkSocketAddress;-><init>(II)V
+Landroid/system/Os;->bind(Ljava/io/FileDescriptor;Ljava/net/SocketAddress;)V
+Landroid/system/Os;->connect(Ljava/io/FileDescriptor;Ljava/net/SocketAddress;)V
+Landroid/system/Os;->sendto(Ljava/io/FileDescriptor;[BIIILjava/net/SocketAddress;)I
+Landroid/system/Os;->setsockoptIfreq(Ljava/io/FileDescriptor;IILjava/lang/String;)V
+Landroid/system/Os;->setsockoptTimeval(Ljava/io/FileDescriptor;IILandroid/system/StructTimeval;)V
+Landroid/system/OsConstants;-><init>()V
+Landroid/system/OsConstants;->AF_NETLINK:I
+Landroid/system/OsConstants;->AF_PACKET:I
+Landroid/system/OsConstants;->ARPHRD_ETHER:I
+Landroid/system/OsConstants;->ARPHRD_LOOPBACK:I
+Landroid/system/OsConstants;->CAP_TO_INDEX(I)I
+Landroid/system/OsConstants;->CAP_TO_MASK(I)I
+Landroid/system/OsConstants;->ENONET:I
+Landroid/system/OsConstants;->ETH_P_ALL:I
+Landroid/system/OsConstants;->ETH_P_ARP:I
+Landroid/system/OsConstants;->ETH_P_IP:I
+Landroid/system/OsConstants;->ETH_P_IPV6:I
+Landroid/system/OsConstants;->EUSERS:I
+Landroid/system/OsConstants;->ICMP6_ECHO_REPLY:I
+Landroid/system/OsConstants;->ICMP6_ECHO_REQUEST:I
+Landroid/system/OsConstants;->ICMP_ECHO:I
+Landroid/system/OsConstants;->ICMP_ECHOREPLY:I
+Landroid/system/OsConstants;->initConstants()V
+Landroid/system/OsConstants;->IP_MULTICAST_ALL:I
+Landroid/system/OsConstants;->IP_RECVTOS:I
+Landroid/system/OsConstants;->MAP_POPULATE:I
+Landroid/system/OsConstants;->NETLINK_NETFILTER:I
+Landroid/system/OsConstants;->NETLINK_ROUTE:I
+Landroid/system/OsConstants;->O_DIRECT:I
+Landroid/system/OsConstants;->placeholder()I
+Landroid/system/OsConstants;->PR_CAP_AMBIENT:I
+Landroid/system/OsConstants;->PR_CAP_AMBIENT_RAISE:I
+Landroid/system/OsConstants;->RLIMIT_NOFILE:I
+Landroid/system/OsConstants;->RTMGRP_IPV4_IFADDR:I
+Landroid/system/OsConstants;->RTMGRP_IPV4_MROUTE:I
+Landroid/system/OsConstants;->RTMGRP_IPV4_ROUTE:I
+Landroid/system/OsConstants;->RTMGRP_IPV4_RULE:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_IFADDR:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_IFINFO:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_MROUTE:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_PREFIX:I
+Landroid/system/OsConstants;->RTMGRP_IPV6_ROUTE:I
+Landroid/system/OsConstants;->RTMGRP_LINK:I
+Landroid/system/OsConstants;->RTMGRP_NEIGH:I
+Landroid/system/OsConstants;->RTMGRP_NOTIFY:I
+Landroid/system/OsConstants;->RTMGRP_TC:I
+Landroid/system/OsConstants;->SO_DOMAIN:I
+Landroid/system/OsConstants;->SO_PROTOCOL:I
+Landroid/system/OsConstants;->SPLICE_F_MORE:I
+Landroid/system/OsConstants;->SPLICE_F_MOVE:I
+Landroid/system/OsConstants;->SPLICE_F_NONBLOCK:I
+Landroid/system/OsConstants;->TIOCOUTQ:I
+Landroid/system/OsConstants;->UDP_ENCAP:I
+Landroid/system/OsConstants;->UDP_ENCAP_ESPINUDP:I
+Landroid/system/OsConstants;->UDP_ENCAP_ESPINUDP_NON_IKE:I
+Landroid/system/OsConstants;->UNIX_PATH_MAX:I
+Landroid/system/OsConstants;->XATTR_CREATE:I
+Landroid/system/OsConstants;->XATTR_REPLACE:I
+Landroid/system/OsConstants;->_LINUX_CAPABILITY_VERSION_3:I
+Landroid/system/PacketSocketAddress;-><init>(I[B)V
+Landroid/system/PacketSocketAddress;-><init>(SI)V
+Landroid/system/StructTimeval;->fromMillis(J)Landroid/system/StructTimeval;
+Landroid/telecom/AudioState;->isMuted:Z
+Landroid/telecom/AudioState;->route:I
+Landroid/telecom/AudioState;->supportedRouteMask:I
+Landroid/telecom/Call$Details;->CAPABILITY_CAN_UPGRADE_TO_VIDEO:I
+Landroid/telecom/Connection$VideoProvider;-><init>(Landroid/os/Looper;)V
+Landroid/telecom/ParcelableCall;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/telecom/ParcelableCall;->getConnectTimeMillis()J
+Landroid/telecom/ParcelableCall;->getDisconnectCause()Landroid/telecom/DisconnectCause;
+Landroid/telecom/ParcelableCall;->getHandle()Landroid/net/Uri;
+Landroid/telecom/ParcelableCall;->getId()Ljava/lang/String;
+Landroid/telecom/Phone;->setProximitySensorOff(Z)V
+Landroid/telecom/Phone;->setProximitySensorOn()V
+Landroid/telecom/PhoneAccountHandle;-><init>(Landroid/os/Parcel;)V
+Landroid/telecom/PhoneAccountHandle;->mComponentName:Landroid/content/ComponentName;
+Landroid/telecom/PhoneAccountHandle;->mId:Ljava/lang/String;
+Landroid/telecom/TelecomManager;->EXTRA_IS_HANDOVER:Ljava/lang/String;
+Landroid/telecom/TelecomManager;->from(Landroid/content/Context;)Landroid/telecom/TelecomManager;
+Landroid/telecom/TelecomManager;->getCallCapablePhoneAccounts(Z)Ljava/util/List;
+Landroid/telecom/TelecomManager;->getCurrentTtyMode()I
+Landroid/telecom/TelecomManager;->getSimCallManager(I)Landroid/telecom/PhoneAccountHandle;
+Landroid/telecom/TelecomManager;->getSystemDialerPackage()Ljava/lang/String;
+Landroid/telecom/TelecomManager;->getUserSelectedOutgoingPhoneAccount()Landroid/telecom/PhoneAccountHandle;
+Landroid/telecom/TelecomManager;->setDefaultDialer(Ljava/lang/String;)Z
+Landroid/telecom/TelecomManager;->setUserSelectedOutgoingPhoneAccount(Landroid/telecom/PhoneAccountHandle;)V
+Landroid/telecom/TelecomManager;->TTY_MODE_OFF:I
+Landroid/telecom/VideoCallImpl;->destroy()V
+Landroid/telecom/VideoProfile$CameraCapabilities;-><init>(IIZF)V
+Landroid/telephony/CarrierConfigManager;->KEY_CARRIER_DEFAULT_ACTIONS_ON_REDIRECTION_STRING_ARRAY:Ljava/lang/String;
+Landroid/telephony/CarrierConfigManager;->KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL:Ljava/lang/String;
+Landroid/telephony/CarrierMessagingServiceManager;-><init>()V
+Landroid/telephony/cdma/CdmaCellLocation;->equalsHandlesNulls(Ljava/lang/Object;Ljava/lang/Object;)Z
+Landroid/telephony/cdma/CdmaCellLocation;->mBaseStationId:I
+Landroid/telephony/cdma/CdmaCellLocation;->mBaseStationLatitude:I
+Landroid/telephony/cdma/CdmaCellLocation;->mBaseStationLongitude:I
+Landroid/telephony/cdma/CdmaCellLocation;->mNetworkId:I
+Landroid/telephony/cdma/CdmaCellLocation;->mSystemId:I
+Landroid/telephony/CellBroadcastMessage;-><init>(Landroid/telephony/SmsCbMessage;)V
+Landroid/telephony/CellBroadcastMessage;->createFromCursor(Landroid/database/Cursor;)Landroid/telephony/CellBroadcastMessage;
+Landroid/telephony/CellBroadcastMessage;->getContentValues()Landroid/content/ContentValues;
+Landroid/telephony/CellBroadcastMessage;->getDeliveryTime()J
+Landroid/telephony/CellBroadcastMessage;->getEtwsWarningInfo()Landroid/telephony/SmsCbEtwsInfo;
+Landroid/telephony/CellBroadcastMessage;->getLanguageCode()Ljava/lang/String;
+Landroid/telephony/CellBroadcastMessage;->getMessageBody()Ljava/lang/String;
+Landroid/telephony/CellBroadcastMessage;->getSerialNumber()I
+Landroid/telephony/CellBroadcastMessage;->getServiceCategory()I
+Landroid/telephony/CellBroadcastMessage;->getSpokenDateString(Landroid/content/Context;)Ljava/lang/String;
+Landroid/telephony/CellBroadcastMessage;->isCmasMessage()Z
+Landroid/telephony/CellBroadcastMessage;->isEmergencyAlertMessage()Z
+Landroid/telephony/CellBroadcastMessage;->isEtwsMessage()Z
+Landroid/telephony/CellBroadcastMessage;->isRead()Z
+Landroid/telephony/CellIdentityCdma;-><init>(IIIII)V
+Landroid/telephony/CellIdentityGsm;-><init>()V
+Landroid/telephony/CellIdentityGsm;->mArfcn:I
+Landroid/telephony/CellIdentityGsm;->mBsic:I
+Landroid/telephony/CellIdentityLte;-><init>()V
+Landroid/telephony/CellIdentityLte;-><init>(IIIII)V
+Landroid/telephony/CellIdentityLte;->mEarfcn:I
+Landroid/telephony/CellIdentityWcdma;->mUarfcn:I
+Landroid/telephony/CellInfo;->getTimeStampType()I
+Landroid/telephony/CellInfo;->timeStampTypeToString(I)Ljava/lang/String;
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_ANTENNA:I
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_JAVA_RIL:I
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_MODEM:I
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_OEM_RIL:I
+Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_UNKNOWN:I
+Landroid/telephony/CellInfoCdma;-><init>()V
+Landroid/telephony/CellInfoCdma;-><init>(Landroid/telephony/CellInfoCdma;)V
+Landroid/telephony/CellInfoCdma;->setCellIdentity(Landroid/telephony/CellIdentityCdma;)V
+Landroid/telephony/CellInfoGsm;-><init>()V
+Landroid/telephony/CellInfoLte;-><init>()V
+Landroid/telephony/CellInfoLte;->setCellIdentity(Landroid/telephony/CellIdentityLte;)V
+Landroid/telephony/CellInfoLte;->setCellSignalStrength(Landroid/telephony/CellSignalStrengthLte;)V
+Landroid/telephony/CellLocation;->fillInNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/CellLocation;->isEmpty()Z
+Landroid/telephony/CellLocation;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/CellLocation;
+Landroid/telephony/CellSignalStrengthGsm;-><init>()V
+Landroid/telephony/CellSignalStrengthGsm;->mBitErrorRate:I
+Landroid/telephony/CellSignalStrengthGsm;->mSignalStrength:I
+Landroid/telephony/CellSignalStrengthGsm;->mTimingAdvance:I
+Landroid/telephony/CellSignalStrengthLte;-><init>()V
+Landroid/telephony/CellSignalStrengthLte;->mCqi:I
+Landroid/telephony/CellSignalStrengthLte;->mRsrp:I
+Landroid/telephony/CellSignalStrengthLte;->mRsrq:I
+Landroid/telephony/CellSignalStrengthLte;->mRssnr:I
+Landroid/telephony/CellSignalStrengthLte;->mSignalStrength:I
+Landroid/telephony/CellSignalStrengthLte;->mTimingAdvance:I
+Landroid/telephony/CellSignalStrengthWcdma;->mBitErrorRate:I
+Landroid/telephony/CellSignalStrengthWcdma;->mSignalStrength:I
+Landroid/telephony/DisconnectCause;->toString(I)Ljava/lang/String;
+Landroid/telephony/euicc/DownloadableSubscription;->encodedActivationCode:Ljava/lang/String;
+Landroid/telephony/euicc/DownloadableSubscription;->setAccessRules([Landroid/telephony/UiccAccessRule;)V
+Landroid/telephony/euicc/DownloadableSubscription;->setCarrierName(Ljava/lang/String;)V
+Landroid/telephony/euicc/EuiccInfo;->osVersion:Ljava/lang/String;
+Landroid/telephony/gsm/GsmCellLocation;->setPsc(I)V
+Landroid/telephony/ims/compat/feature/ImsFeature;->getFeatureState()I
+Landroid/telephony/ims/compat/feature/ImsFeature;->setFeatureState(I)V
+Landroid/telephony/ims/compat/feature/MMTelFeature;-><init>()V
+Landroid/telephony/ims/compat/ImsService;-><init>()V
+Landroid/telephony/ims/compat/ImsService;->mImsServiceController:Landroid/os/IBinder;
+Landroid/telephony/ims/compat/stub/ImsCallSessionImplBase;-><init>()V
+Landroid/telephony/ims/compat/stub/ImsConfigImplBase;-><init>(Landroid/content/Context;)V
+Landroid/telephony/ims/compat/stub/ImsConfigImplBase;->getIImsConfig()Lcom/android/ims/internal/IImsConfig;
+Landroid/telephony/ims/compat/stub/ImsUtListenerImplBase;-><init>()V
+Landroid/telephony/ims/ImsCallForwardInfo;-><init>()V
+Landroid/telephony/ims/ImsCallForwardInfo;->mCondition:I
+Landroid/telephony/ims/ImsCallForwardInfo;->mNumber:Ljava/lang/String;
+Landroid/telephony/ims/ImsCallForwardInfo;->mServiceClass:I
+Landroid/telephony/ims/ImsCallForwardInfo;->mStatus:I
+Landroid/telephony/ims/ImsCallForwardInfo;->mTimeSeconds:I
+Landroid/telephony/ims/ImsCallForwardInfo;->mToA:I
+Landroid/telephony/ims/ImsCallProfile;->mCallExtras:Landroid/os/Bundle;
+Landroid/telephony/ims/ImsCallProfile;->mCallType:I
+Landroid/telephony/ims/ImsCallProfile;->mMediaProfile:Landroid/telephony/ims/ImsStreamMediaProfile;
+Landroid/telephony/ims/ImsCallProfile;->mRestrictCause:I
+Landroid/telephony/ims/ImsCallProfile;->presentationToOIR(I)I
+Landroid/telephony/ims/ImsExternalCallState;-><init>(ILandroid/net/Uri;ZIIZ)V
+Landroid/telephony/ims/ImsReasonInfo;-><init>(II)V
+Landroid/telephony/ims/ImsReasonInfo;->mCode:I
+Landroid/telephony/ims/ImsReasonInfo;->mExtraCode:I
+Landroid/telephony/ims/ImsReasonInfo;->mExtraMessage:Ljava/lang/String;
+Landroid/telephony/ims/ImsSsInfo;-><init>()V
+Landroid/telephony/ims/ImsSsInfo;->mIcbNum:Ljava/lang/String;
+Landroid/telephony/ims/ImsSsInfo;->mStatus:I
+Landroid/telephony/ims/ImsStreamMediaProfile;-><init>()V
+Landroid/telephony/ims/ImsStreamMediaProfile;->mAudioDirection:I
+Landroid/telephony/ims/ImsStreamMediaProfile;->mAudioQuality:I
+Landroid/telephony/ims/ImsStreamMediaProfile;->mVideoDirection:I
+Landroid/telephony/ims/ImsVideoCallProvider;->getInterface()Lcom/android/ims/internal/IImsVideoCallProvider;
+Landroid/telephony/mbms/IMbmsStreamingSessionCallback$Stub;-><init>()V
+Landroid/telephony/mbms/IStreamingServiceCallback$Stub;-><init>()V
+Landroid/telephony/mbms/vendor/IMbmsStreamingService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/telephony/mbms/vendor/IMbmsStreamingService;
+Landroid/telephony/mbms/vendor/IMbmsStreamingService;->getPlaybackUri(ILjava/lang/String;)Landroid/net/Uri;
+Landroid/telephony/mbms/vendor/IMbmsStreamingService;->initialize(Landroid/telephony/mbms/IMbmsStreamingSessionCallback;I)I
+Landroid/telephony/mbms/vendor/IMbmsStreamingService;->requestUpdateStreamingServices(ILjava/util/List;)I
+Landroid/telephony/mbms/vendor/IMbmsStreamingService;->startStreaming(ILjava/lang/String;Landroid/telephony/mbms/IStreamingServiceCallback;)I
+Landroid/telephony/NeighboringCellInfo;->mCid:I
+Landroid/telephony/NeighboringCellInfo;->mLac:I
+Landroid/telephony/NeighboringCellInfo;->mNetworkType:I
+Landroid/telephony/NeighboringCellInfo;->mPsc:I
+Landroid/telephony/NeighboringCellInfo;->mRssi:I
+Landroid/telephony/NetworkScan;->stop()V
+Landroid/telephony/PhoneNumberFormattingTextWatcher;->mFormatter:Lcom/android/i18n/phonenumbers/AsYouTypeFormatter;
+Landroid/telephony/PhoneNumberUtils;->cdmaCheckAndProcessPlusCode(Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->compare(Ljava/lang/String;Ljava/lang/String;Z)Z
+Landroid/telephony/PhoneNumberUtils;->compareLoosely(Ljava/lang/String;Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->compareStrictly(Ljava/lang/String;Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->compareStrictly(Ljava/lang/String;Ljava/lang/String;Z)Z
+Landroid/telephony/PhoneNumberUtils;->convertPreDial(Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->extractNetworkPortionAlt(Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->formatNumber(Ljava/lang/String;I)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->getUsernameFromUriNumber(Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->isEmergencyNumber(ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isEmergencyNumber(Ljava/lang/String;Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isLocalEmergencyNumber(Landroid/content/Context;ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isNanp(Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isPotentialEmergencyNumber(ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isPotentialLocalEmergencyNumber(Landroid/content/Context;ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isPotentialLocalEmergencyNumber(Landroid/content/Context;Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isUriNumber(Ljava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isVoiceMailNumber(Landroid/content/Context;ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->MIN_MATCH:I
+Landroid/telephony/PhoneNumberUtils;->ttsSpanAsPhoneNumber(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
+Landroid/telephony/PhoneStateListener;-><init>(Landroid/os/Looper;)V
+Landroid/telephony/PhoneStateListener;-><init>(Ljava/lang/Integer;)V
+Landroid/telephony/PhoneStateListener;-><init>(Ljava/lang/Integer;Landroid/os/Looper;)V
+Landroid/telephony/PhoneStateListener;->LISTEN_PRECISE_CALL_STATE:I
+Landroid/telephony/PhoneStateListener;->mSubId:Ljava/lang/Integer;
+Landroid/telephony/PhoneStateListener;->onDataConnectionRealTimeInfoChanged(Landroid/telephony/DataConnectionRealTimeInfo;)V
+Landroid/telephony/PhoneStateListener;->onOemHookRawEvent([B)V
+Landroid/telephony/PhoneStateListener;->onOtaspChanged(I)V
+Landroid/telephony/PhoneStateListener;->onPreciseCallStateChanged(Landroid/telephony/PreciseCallState;)V
+Landroid/telephony/PhoneStateListener;->onPreciseDataConnectionStateChanged(Landroid/telephony/PreciseDataConnectionState;)V
+Landroid/telephony/PhoneStateListener;->onVoLteServiceStateChanged(Landroid/telephony/VoLteServiceState;)V
+Landroid/telephony/PreciseCallState;-><init>(IIIII)V
+Landroid/telephony/PreciseCallState;->getBackgroundCallState()I
+Landroid/telephony/PreciseCallState;->getDisconnectCause()I
+Landroid/telephony/PreciseCallState;->getForegroundCallState()I
+Landroid/telephony/PreciseCallState;->getPreciseDisconnectCause()I
+Landroid/telephony/PreciseCallState;->getRingingCallState()I
+Landroid/telephony/PreciseDataConnectionState;-><init>(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/net/LinkProperties;Ljava/lang/String;)V
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionAPN()Ljava/lang/String;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionAPNType()Ljava/lang/String;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionChangeReason()Ljava/lang/String;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionFailCause()Ljava/lang/String;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionLinkProperties()Landroid/net/LinkProperties;
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionNetworkType()I
+Landroid/telephony/PreciseDataConnectionState;->getDataConnectionState()I
+Landroid/telephony/RadioAccessFamily;-><init>(II)V
+Landroid/telephony/RadioAccessFamily;->getNetworkTypeFromRaf(I)I
+Landroid/telephony/RadioAccessFamily;->getPhoneId()I
+Landroid/telephony/RadioAccessFamily;->getRadioAccessFamily()I
+Landroid/telephony/RadioAccessFamily;->getRafFromNetworkType(I)I
+Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/telephony/Rlog;->i(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/telephony/Rlog;->v(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->w(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/telephony/ServiceState;->bearerBitmapHasCdma(I)Z
+Landroid/telephony/ServiceState;->bitmaskHasTech(II)Z
+Landroid/telephony/ServiceState;->equalsHandlesNulls(Ljava/lang/Object;Ljava/lang/Object;)Z
+Landroid/telephony/ServiceState;->fillInNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/ServiceState;->getCdmaDefaultRoamingIndicator()I
+Landroid/telephony/ServiceState;->getCdmaEriIconIndex()I
+Landroid/telephony/ServiceState;->getCdmaEriIconMode()I
+Landroid/telephony/ServiceState;->getCdmaRoamingIndicator()I
+Landroid/telephony/ServiceState;->getCssIndicator()I
+Landroid/telephony/ServiceState;->getDataNetworkType()I
+Landroid/telephony/ServiceState;->getDataOperatorAlphaShort()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getDataOperatorNumeric()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getDataRegState()I
+Landroid/telephony/ServiceState;->getDataRoaming()Z
+Landroid/telephony/ServiceState;->getDataRoamingType()I
+Landroid/telephony/ServiceState;->getRadioTechnology()I
+Landroid/telephony/ServiceState;->getRilDataRadioTechnology()I
+Landroid/telephony/ServiceState;->getRilVoiceRadioTechnology()I
+Landroid/telephony/ServiceState;->getVoiceNetworkType()I
+Landroid/telephony/ServiceState;->getVoiceOperatorAlphaLong()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getVoiceOperatorAlphaShort()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getVoiceOperatorNumeric()Ljava/lang/String;
+Landroid/telephony/ServiceState;->getVoiceRegState()I
+Landroid/telephony/ServiceState;->getVoiceRoaming()Z
+Landroid/telephony/ServiceState;->getVoiceRoamingType()I
+Landroid/telephony/ServiceState;->isCdma(I)Z
+Landroid/telephony/ServiceState;->isEmergencyOnly()Z
+Landroid/telephony/ServiceState;->isGsm(I)Z
+Landroid/telephony/ServiceState;->mCdmaDefaultRoamingIndicator:I
+Landroid/telephony/ServiceState;->mCdmaEriIconIndex:I
+Landroid/telephony/ServiceState;->mCdmaEriIconMode:I
+Landroid/telephony/ServiceState;->mCdmaRoamingIndicator:I
+Landroid/telephony/ServiceState;->mCssIndicator:Z
+Landroid/telephony/ServiceState;->mergeServiceStates(Landroid/telephony/ServiceState;Landroid/telephony/ServiceState;)Landroid/telephony/ServiceState;
+Landroid/telephony/ServiceState;->mIsManualNetworkSelection:Z
+Landroid/telephony/ServiceState;->mNetworkId:I
+Landroid/telephony/ServiceState;->mSystemId:I
+Landroid/telephony/ServiceState;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/ServiceState;
+Landroid/telephony/ServiceState;->rilRadioTechnologyToString(I)Ljava/lang/String;
+Landroid/telephony/ServiceState;->RIL_RADIO_TECHNOLOGY_IWLAN:I
+Landroid/telephony/ServiceState;->setCdmaDefaultRoamingIndicator(I)V
+Landroid/telephony/ServiceState;->setCdmaEriIconIndex(I)V
+Landroid/telephony/ServiceState;->setCdmaEriIconMode(I)V
+Landroid/telephony/ServiceState;->setCdmaRoamingIndicator(I)V
+Landroid/telephony/ServiceState;->setCssIndicator(I)V
+Landroid/telephony/ServiceState;->setDataRegState(I)V
+Landroid/telephony/ServiceState;->setDataRoaming(Z)V
+Landroid/telephony/ServiceState;->setDataRoamingFromRegistration(Z)V
+Landroid/telephony/ServiceState;->setDataRoamingType(I)V
+Landroid/telephony/ServiceState;->setEmergencyOnly(Z)V
+Landroid/telephony/ServiceState;->setFromNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/ServiceState;->setOperatorAlphaLong(Ljava/lang/String;)V
+Landroid/telephony/ServiceState;->setVoiceRegState(I)V
+Landroid/telephony/ServiceState;->setVoiceRoaming(Z)V
+Landroid/telephony/ServiceState;->setVoiceRoamingType(I)V
+Landroid/telephony/SignalStrength;-><init>()V
+Landroid/telephony/SignalStrength;-><init>(Landroid/os/Parcel;)V
+Landroid/telephony/SignalStrength;-><init>(Landroid/telephony/SignalStrength;)V
+Landroid/telephony/SignalStrength;-><init>(Z)V
+Landroid/telephony/SignalStrength;->copyFrom(Landroid/telephony/SignalStrength;)V
+Landroid/telephony/SignalStrength;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/telephony/SignalStrength;->fillInNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/SignalStrength;->getAsuLevel()I
+Landroid/telephony/SignalStrength;->getCdmaAsuLevel()I
+Landroid/telephony/SignalStrength;->getCdmaLevel()I
+Landroid/telephony/SignalStrength;->getDbm()I
+Landroid/telephony/SignalStrength;->getEvdoAsuLevel()I
+Landroid/telephony/SignalStrength;->getEvdoLevel()I
+Landroid/telephony/SignalStrength;->getGsmAsuLevel()I
+Landroid/telephony/SignalStrength;->getGsmDbm()I
+Landroid/telephony/SignalStrength;->getGsmLevel()I
+Landroid/telephony/SignalStrength;->getLteAsuLevel()I
+Landroid/telephony/SignalStrength;->getLteCqi()I
+Landroid/telephony/SignalStrength;->getLteDbm()I
+Landroid/telephony/SignalStrength;->getLteLevel()I
+Landroid/telephony/SignalStrength;->getLteRsrp()I
+Landroid/telephony/SignalStrength;->getLteRsrq()I
+Landroid/telephony/SignalStrength;->getLteRssnr()I
+Landroid/telephony/SignalStrength;->getLteSignalStrength()I
+Landroid/telephony/SignalStrength;->getTdScdmaAsuLevel()I
+Landroid/telephony/SignalStrength;->getTdScdmaDbm()I
+Landroid/telephony/SignalStrength;->getTdScdmaLevel()I
+Landroid/telephony/SignalStrength;->mCdmaDbm:I
+Landroid/telephony/SignalStrength;->mCdmaEcio:I
+Landroid/telephony/SignalStrength;->mEvdoDbm:I
+Landroid/telephony/SignalStrength;->mEvdoEcio:I
+Landroid/telephony/SignalStrength;->mEvdoSnr:I
+Landroid/telephony/SignalStrength;->mGsmBitErrorRate:I
+Landroid/telephony/SignalStrength;->mGsmSignalStrength:I
+Landroid/telephony/SignalStrength;->mLteCqi:I
+Landroid/telephony/SignalStrength;->mLteRsrp:I
+Landroid/telephony/SignalStrength;->mLteRsrpBoost:I
+Landroid/telephony/SignalStrength;->mLteRsrq:I
+Landroid/telephony/SignalStrength;->mLteRssnr:I
+Landroid/telephony/SignalStrength;->mLteSignalStrength:I
+Landroid/telephony/SignalStrength;->mTdScdmaRscp:I
+Landroid/telephony/SignalStrength;->mWcdmaRscp:I
+Landroid/telephony/SignalStrength;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/SignalStrength;
+Landroid/telephony/SignalStrength;->NUM_SIGNAL_STRENGTH_BINS:I
+Landroid/telephony/SignalStrength;->setFromNotifierBundle(Landroid/os/Bundle;)V
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_GOOD:I
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_GREAT:I
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_MODERATE:I
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_NONE_OR_UNKNOWN:I
+Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_POOR:I
+Landroid/telephony/SignalStrength;->validateInput()V
+Landroid/telephony/SmsManager;->copyMessageToIcc([B[BI)Z
+Landroid/telephony/SmsManager;->deleteMessageFromIcc(I)Z
+Landroid/telephony/SmsManager;->disableCellBroadcastRange(III)Z
+Landroid/telephony/SmsManager;->enableCellBroadcastRange(III)Z
+Landroid/telephony/SmsManager;->getAllMessagesFromIcc()Ljava/util/ArrayList;
+Landroid/telephony/SmsManager;->isSMSPromptEnabled()Z
+Landroid/telephony/SmsManager;->mSubId:I
+Landroid/telephony/SmsManager;->sendMultipartTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;IZI)V
+Landroid/telephony/SmsManager;->sendTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;IZI)V
+Landroid/telephony/SmsManager;->sendTextMessageWithoutPersisting(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;IZI)V
+Landroid/telephony/SmsManager;->updateMessageOnIcc(II[B)Z
+Landroid/telephony/SmsMessage;->fragmentText(Ljava/lang/String;)Ljava/util/ArrayList;
+Landroid/telephony/SmsMessage;->getSubId()I
+Landroid/telephony/SmsMessage;->mSubId:I
+Landroid/telephony/SmsMessage;->mWrappedSmsMessage:Lcom/android/internal/telephony/SmsMessageBase;
+Landroid/telephony/SmsMessage;->setSubId(I)V
+Landroid/telephony/SmsMessage;->useCdmaFormatForMoSms()Z
+Landroid/telephony/SmsMessage;->useCdmaFormatForMoSms(I)Z
+Landroid/telephony/SubscriptionInfo;->setDisplayName(Ljava/lang/CharSequence;)V
+Landroid/telephony/SubscriptionInfo;->setIconTint(I)V
+Landroid/telephony/SubscriptionManager;-><init>(Landroid/content/Context;)V
+Landroid/telephony/SubscriptionManager;->clearDefaultsForInactiveSubIds()V
+Landroid/telephony/SubscriptionManager;->CONTENT_URI:Landroid/net/Uri;
+Landroid/telephony/SubscriptionManager;->DEFAULT_SUBSCRIPTION_ID:I
+Landroid/telephony/SubscriptionManager;->getActiveSubscriptionIdList()[I
+Landroid/telephony/SubscriptionManager;->getAllSubscriptionInfoCount()I
+Landroid/telephony/SubscriptionManager;->getAllSubscriptionInfoList()Ljava/util/List;
+Landroid/telephony/SubscriptionManager;->getDefaultDataPhoneId()I
+Landroid/telephony/SubscriptionManager;->getDefaultDataSubscriptionInfo()Landroid/telephony/SubscriptionInfo;
+Landroid/telephony/SubscriptionManager;->getDefaultSmsPhoneId()I
+Landroid/telephony/SubscriptionManager;->getDefaultVoicePhoneId()I
+Landroid/telephony/SubscriptionManager;->getDefaultVoiceSubscriptionInfo()Landroid/telephony/SubscriptionInfo;
+Landroid/telephony/SubscriptionManager;->getPhoneId(I)I
+Landroid/telephony/SubscriptionManager;->getResourcesForSubId(Landroid/content/Context;I)Landroid/content/res/Resources;
+Landroid/telephony/SubscriptionManager;->getSlotIndex(I)I
+Landroid/telephony/SubscriptionManager;->getSubId(I)[I
+Landroid/telephony/SubscriptionManager;->isActiveSubId(I)Z
+Landroid/telephony/SubscriptionManager;->isUsableSubIdValue(I)Z
+Landroid/telephony/SubscriptionManager;->isValidPhoneId(I)Z
+Landroid/telephony/SubscriptionManager;->isValidSlotIndex(I)Z
+Landroid/telephony/SubscriptionManager;->isValidSubscriptionId(I)Z
+Landroid/telephony/SubscriptionManager;->NAME_SOURCE_USER_INPUT:I
+Landroid/telephony/SubscriptionManager;->putPhoneIdAndSubIdExtra(Landroid/content/Intent;I)V
+Landroid/telephony/SubscriptionManager;->putPhoneIdAndSubIdExtra(Landroid/content/Intent;II)V
+Landroid/telephony/SubscriptionManager;->setDataRoaming(II)I
+Landroid/telephony/SubscriptionManager;->setDefaultDataSubId(I)V
+Landroid/telephony/SubscriptionManager;->setDefaultSmsSubId(I)V
+Landroid/telephony/SubscriptionManager;->setDisplayName(Ljava/lang/String;IJ)I
+Landroid/telephony/SubscriptionManager;->setDisplayNumber(Ljava/lang/String;I)I
+Landroid/telephony/SubscriptionManager;->setIconTint(II)I
+Landroid/telephony/TelephonyManager$MultiSimVariants;->DSDA:Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager$MultiSimVariants;->DSDS:Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager$MultiSimVariants;->TSTS:Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager$MultiSimVariants;->UNKNOWN:Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager$MultiSimVariants;->values()[Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager;-><init>()V
+Landroid/telephony/TelephonyManager;-><init>(Landroid/content/Context;)V
+Landroid/telephony/TelephonyManager;->ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED:Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->from(Landroid/content/Context;)Landroid/telephony/TelephonyManager;
+Landroid/telephony/TelephonyManager;->getCallState(I)I
+Landroid/telephony/TelephonyManager;->getCdmaEriIconIndex(I)I
+Landroid/telephony/TelephonyManager;->getCdmaEriIconMode(I)I
+Landroid/telephony/TelephonyManager;->getCdmaEriText(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getCompleteVoiceMailNumber()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getCompleteVoiceMailNumber(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getDataNetworkType(I)I
+Landroid/telephony/TelephonyManager;->getDefault()Landroid/telephony/TelephonyManager;
+Landroid/telephony/TelephonyManager;->getDeviceSoftwareVersion(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getGroupIdLevel1(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getIccAuthentication(IIILjava/lang/String;)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getIntAtIndex(Landroid/content/ContentResolver;Ljava/lang/String;I)I
+Landroid/telephony/TelephonyManager;->getIsimDomain()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getIsimImpi()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getIsimImpu()[Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getIsimPcscf()[Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getITelephony()Lcom/android/internal/telephony/ITelephony;
+Landroid/telephony/TelephonyManager;->getLine1AlphaTag(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getLine1Number(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getLteOnCdmaMode()I
+Landroid/telephony/TelephonyManager;->getLteOnCdmaMode(I)I
+Landroid/telephony/TelephonyManager;->getLteOnCdmaModeStatic()I
+Landroid/telephony/TelephonyManager;->getMergedSubscriberIds()[Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getMsisdn()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getMsisdn(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getMultiSimConfiguration()Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager;->getNai(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkClass(I)I
+Landroid/telephony/TelephonyManager;->getNetworkCountryIso(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkCountryIsoForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkOperator(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkOperatorForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkOperatorName(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkType(I)I
+Landroid/telephony/TelephonyManager;->getNetworkTypeName()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkTypeName(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getOtaSpNumberSchemaForPhone(ILjava/lang/String;)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getPhoneId(I)I
+Landroid/telephony/TelephonyManager;->getPhoneType(I)I
+Landroid/telephony/TelephonyManager;->getPhoneTypeFromProperty(I)I
+Landroid/telephony/TelephonyManager;->getPreferredNetworkType(I)I
+Landroid/telephony/TelephonyManager;->getProcCmdLine()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getServiceStateForSubscriber(I)Landroid/telephony/ServiceState;
+Landroid/telephony/TelephonyManager;->getSimCount()I
+Landroid/telephony/TelephonyManager;->getSimCountryIso(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimCountryIsoForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperator(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorName(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorNameForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorNumeric()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorNumeric(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimOperatorNumericForPhone(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSimSerialNumber(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSlotIndex()I
+Landroid/telephony/TelephonyManager;->getSubId(I)I
+Landroid/telephony/TelephonyManager;->getSubIdForPhoneAccount(Landroid/telecom/PhoneAccount;)I
+Landroid/telephony/TelephonyManager;->getSubscriberId(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getSubscriberInfo()Lcom/android/internal/telephony/IPhoneSubInfo;
+Landroid/telephony/TelephonyManager;->getTelephonyProperty(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getTelephonyProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getVoiceMailAlphaTag(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getVoiceMailNumber(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getVoiceMessageCount()I
+Landroid/telephony/TelephonyManager;->getVoiceMessageCount(I)I
+Landroid/telephony/TelephonyManager;->getVoiceNetworkType(I)I
+Landroid/telephony/TelephonyManager;->hasIccCard(I)Z
+Landroid/telephony/TelephonyManager;->isImsRegistered()Z
+Landroid/telephony/TelephonyManager;->isMultiSimEnabled()Z
+Landroid/telephony/TelephonyManager;->isNetworkRoaming(I)Z
+Landroid/telephony/TelephonyManager;->isVideoTelephonyAvailable()Z
+Landroid/telephony/TelephonyManager;->isVolteAvailable()Z
+Landroid/telephony/TelephonyManager;->isWifiCallingAvailable()Z
+Landroid/telephony/TelephonyManager;->mSubscriptionManager:Landroid/telephony/SubscriptionManager;
+Landroid/telephony/TelephonyManager;->NETWORK_CLASS_2_G:I
+Landroid/telephony/TelephonyManager;->NETWORK_CLASS_3_G:I
+Landroid/telephony/TelephonyManager;->NETWORK_CLASS_4_G:I
+Landroid/telephony/TelephonyManager;->NETWORK_TYPE_LTE_CA:I
+Landroid/telephony/TelephonyManager;->nvReadItem(I)Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->nvResetConfig(I)Z
+Landroid/telephony/TelephonyManager;->putIntAtIndex(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
+Landroid/telephony/TelephonyManager;->requestNetworkScan(Landroid/telephony/NetworkScanRequest;Landroid/telephony/TelephonyScanManager$NetworkScanCallback;)Landroid/telephony/NetworkScan;
+Landroid/telephony/TelephonyManager;->setBasebandVersionForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setDataNetworkTypeForPhone(II)V
+Landroid/telephony/TelephonyManager;->setImsRegistrationState(Z)V
+Landroid/telephony/TelephonyManager;->setNetworkCountryIso(Ljava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setNetworkCountryIsoForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setNetworkOperatorNameForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setNetworkOperatorNumericForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setNetworkRoamingForPhone(IZ)V
+Landroid/telephony/TelephonyManager;->setPhoneType(II)V
+Landroid/telephony/TelephonyManager;->setPreferredNetworkType(II)Z
+Landroid/telephony/TelephonyManager;->setRoamingOverride(Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)Z
+Landroid/telephony/TelephonyManager;->setSimCountryIsoForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setSimOperatorNameForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setSimOperatorNumericForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setSimStateForPhone(ILjava/lang/String;)V
+Landroid/telephony/TelephonyManager;->setTelephonyProperty(ILjava/lang/String;Ljava/lang/String;)V
+Landroid/telephony/VoLteServiceState;-><init>(I)V
+Landroid/text/AndroidBidi;->bidi(I[C[B)I
+Landroid/text/BoringLayout;->isBoring(Ljava/lang/CharSequence;Landroid/text/TextPaint;Landroid/text/TextDirectionHeuristic;Landroid/text/BoringLayout$Metrics;)Landroid/text/BoringLayout$Metrics;
+Landroid/text/DynamicLayout;-><init>(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;Landroid/text/TextDirectionHeuristic;FFZIIILandroid/text/TextUtils$TruncateAt;I)V
+Landroid/text/DynamicLayout;->getBlockEndLines()[I
+Landroid/text/DynamicLayout;->getBlockIndices()[I
+Landroid/text/DynamicLayout;->getIndexFirstChangedBlock()I
+Landroid/text/DynamicLayout;->getNumberOfBlocks()I
+Landroid/text/DynamicLayout;->setIndexFirstChangedBlock(I)V
+Landroid/text/DynamicLayout;->sStaticLayout:Landroid/text/StaticLayout;
+Landroid/text/format/DateFormat;->AM_PM:C
+Landroid/text/format/DateFormat;->CAPITAL_AM_PM:C
+Landroid/text/format/DateFormat;->DATE:C
+Landroid/text/format/DateFormat;->DAY:C
+Landroid/text/format/DateFormat;->getTimeFormatString(Landroid/content/Context;)Ljava/lang/String;
+Landroid/text/format/DateFormat;->getTimeFormatString(Landroid/content/Context;I)Ljava/lang/String;
+Landroid/text/format/DateFormat;->hasDesignator(Ljava/lang/CharSequence;C)Z
+Landroid/text/format/DateFormat;->hasSeconds(Ljava/lang/CharSequence;)Z
+Landroid/text/format/DateFormat;->HOUR:C
+Landroid/text/format/DateFormat;->HOUR_OF_DAY:C
+Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/Context;I)Z
+Landroid/text/format/DateFormat;->MINUTE:C
+Landroid/text/format/DateFormat;->MONTH:C
+Landroid/text/format/DateFormat;->QUOTE:C
+Landroid/text/format/DateFormat;->SECONDS:C
+Landroid/text/format/DateFormat;->STANDALONE_MONTH:C
+Landroid/text/format/DateFormat;->TIME_ZONE:C
+Landroid/text/format/DateFormat;->YEAR:C
+Landroid/text/format/DateUtils;->formatDuration(J)Ljava/lang/CharSequence;
+Landroid/text/format/DateUtils;->formatDuration(JI)Ljava/lang/CharSequence;
+Landroid/text/format/Formatter;->formatBytes(Landroid/content/res/Resources;JI)Landroid/text/format/Formatter$BytesResult;
+Landroid/text/format/Formatter;->formatShortElapsedTime(Landroid/content/Context;J)Ljava/lang/String;
+Landroid/text/format/Formatter;->formatShortElapsedTimeRoundingUpToMinutes(Landroid/content/Context;J)Ljava/lang/String;
+Landroid/text/Html;->withinStyle(Ljava/lang/StringBuilder;Ljava/lang/CharSequence;II)V
+Landroid/text/InputFilter$LengthFilter;->mMax:I
+Landroid/text/Layout$Alignment;->ALIGN_LEFT:Landroid/text/Layout$Alignment;
+Landroid/text/Layout$Alignment;->ALIGN_RIGHT:Landroid/text/Layout$Alignment;
+Landroid/text/Layout;->DIRS_ALL_LEFT_TO_RIGHT:Landroid/text/Layout$Directions;
+Landroid/text/Layout;->DIRS_ALL_RIGHT_TO_LEFT:Landroid/text/Layout$Directions;
+Landroid/text/Layout;->DIR_REQUEST_DEFAULT_LTR:I
+Landroid/text/Layout;->drawBackground(Landroid/graphics/Canvas;Landroid/graphics/Path;Landroid/graphics/Paint;III)V
+Landroid/text/Layout;->drawText(Landroid/graphics/Canvas;II)V
+Landroid/text/Layout;->getLineRangeForDraw(Landroid/graphics/Canvas;)J
+Landroid/text/Layout;->getPrimaryHorizontal(IZ)F
+Landroid/text/Layout;->getSecondaryHorizontal(IZ)F
+Landroid/text/Layout;->isLevelBoundary(I)Z
+Landroid/text/Layout;->mPaint:Landroid/text/TextPaint;
+Landroid/text/Layout;->shouldClampCursor(I)Z
+Landroid/text/method/AllCapsTransformationMethod;-><init>(Landroid/content/Context;)V
+Landroid/text/method/HideReturnsTransformationMethod;->sInstance:Landroid/text/method/HideReturnsTransformationMethod;
+Landroid/text/method/LinkMovementMethod;->sInstance:Landroid/text/method/LinkMovementMethod;
+Landroid/text/method/MetaKeyKeyListener;->startSelecting(Landroid/view/View;Landroid/text/Spannable;)V
+Landroid/text/method/MetaKeyKeyListener;->stopSelecting(Landroid/view/View;Landroid/text/Spannable;)V
+Landroid/text/method/PasswordTransformationMethod;->DOT:C
+Landroid/text/method/PasswordTransformationMethod;->sInstance:Landroid/text/method/PasswordTransformationMethod;
+Landroid/text/method/TransformationMethod2;->setLengthChangesAllowed(Z)V
+Landroid/text/method/WordIterator;-><init>(Ljava/util/Locale;)V
+Landroid/text/method/WordIterator;->following(I)I
+Landroid/text/method/WordIterator;->getBeginning(I)I
+Landroid/text/method/WordIterator;->getEnd(I)I
+Landroid/text/method/WordIterator;->getNextWordEndOnTwoWordBoundary(I)I
+Landroid/text/method/WordIterator;->getPrevWordBeginningOnTwoWordsBoundary(I)I
+Landroid/text/method/WordIterator;->getPunctuationBeginning(I)I
+Landroid/text/method/WordIterator;->getPunctuationEnd(I)I
+Landroid/text/method/WordIterator;->isAfterPunctuation(I)Z
+Landroid/text/method/WordIterator;->isBoundary(I)Z
+Landroid/text/method/WordIterator;->isOnPunctuation(I)Z
+Landroid/text/method/WordIterator;->nextBoundary(I)I
+Landroid/text/method/WordIterator;->preceding(I)I
+Landroid/text/method/WordIterator;->prevBoundary(I)I
+Landroid/text/method/WordIterator;->setCharSequence(Ljava/lang/CharSequence;II)V
+Landroid/text/Selection;->moveToFollowing(Landroid/text/Spannable;Landroid/text/Selection$PositionIterator;Z)Z
+Landroid/text/Selection;->moveToPreceding(Landroid/text/Spannable;Landroid/text/Selection$PositionIterator;Z)Z
+Landroid/text/SpannableStringBuilder;->getSpans(IILjava/lang/Class;Z)[Ljava/lang/Object;
+Landroid/text/SpannableStringBuilder;->mGapLength:I
+Landroid/text/SpannableStringBuilder;->mGapStart:I
+Landroid/text/SpannableStringBuilder;->mSpanCount:I
+Landroid/text/SpannableStringBuilder;->mSpanEnds:[I
+Landroid/text/SpannableStringBuilder;->mSpanFlags:[I
+Landroid/text/SpannableStringBuilder;->mSpans:[Ljava/lang/Object;
+Landroid/text/SpannableStringBuilder;->mSpanStarts:[I
+Landroid/text/SpannableStringBuilder;->mText:[C
+Landroid/text/SpannableStringBuilder;->sendToSpanWatchers(III)V
+Landroid/text/SpannableStringBuilder;->substring(II)Ljava/lang/String;
+Landroid/text/SpannableStringInternal;-><init>(Ljava/lang/CharSequence;II)V
+Landroid/text/SpannableStringInternal;->charAt(I)C
+Landroid/text/SpannableStringInternal;->checkRange(Ljava/lang/String;II)V
+Landroid/text/SpannableStringInternal;->COLUMNS:I
+Landroid/text/SpannableStringInternal;->copySpans(Landroid/text/SpannableStringInternal;II)V
+Landroid/text/SpannableStringInternal;->copySpans(Landroid/text/Spanned;II)V
+Landroid/text/SpannableStringInternal;->EMPTY:[Ljava/lang/Object;
+Landroid/text/SpannableStringInternal;->END:I
+Landroid/text/SpannableStringInternal;->FLAGS:I
+Landroid/text/SpannableStringInternal;->getChars(II[CI)V
+Landroid/text/SpannableStringInternal;->getSpanEnd(Ljava/lang/Object;)I
+Landroid/text/SpannableStringInternal;->getSpanFlags(Ljava/lang/Object;)I
+Landroid/text/SpannableStringInternal;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;
+Landroid/text/SpannableStringInternal;->getSpanStart(Ljava/lang/Object;)I
+Landroid/text/SpannableStringInternal;->isIndexFollowsNextLine(I)Z
+Landroid/text/SpannableStringInternal;->isOutOfCopyRange(IIII)Z
+Landroid/text/SpannableStringInternal;->length()I
+Landroid/text/SpannableStringInternal;->mSpanCount:I
+Landroid/text/SpannableStringInternal;->mSpanData:[I
+Landroid/text/SpannableStringInternal;->mSpans:[Ljava/lang/Object;
+Landroid/text/SpannableStringInternal;->mText:Ljava/lang/String;
+Landroid/text/SpannableStringInternal;->nextSpanTransition(IILjava/lang/Class;)I
+Landroid/text/SpannableStringInternal;->region(II)Ljava/lang/String;
+Landroid/text/SpannableStringInternal;->removeSpan(Ljava/lang/Object;)V
+Landroid/text/SpannableStringInternal;->sendSpanAdded(Ljava/lang/Object;II)V
+Landroid/text/SpannableStringInternal;->sendSpanChanged(Ljava/lang/Object;IIII)V
+Landroid/text/SpannableStringInternal;->sendSpanRemoved(Ljava/lang/Object;II)V
+Landroid/text/SpannableStringInternal;->setSpan(Ljava/lang/Object;III)V
+Landroid/text/SpannableStringInternal;->setSpan(Ljava/lang/Object;IIIZ)V
+Landroid/text/SpannableStringInternal;->START:I
+Landroid/text/SpanSet;->spans:[Ljava/lang/Object;
+Landroid/text/StaticLayout$LineBreaks;->ascents:[F
+Landroid/text/StaticLayout$LineBreaks;->breaks:[I
+Landroid/text/StaticLayout$LineBreaks;->descents:[F
+Landroid/text/StaticLayout$LineBreaks;->flags:[I
+Landroid/text/StaticLayout$LineBreaks;->widths:[F
+Landroid/text/StaticLayout;-><init>(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;Landroid/text/TextDirectionHeuristic;FFZLandroid/text/TextUtils$TruncateAt;II)V
+Landroid/text/StaticLayout;->ELLIPSIS_START:I
+Landroid/text/StaticLayout;->getHeight(Z)I
+Landroid/text/StaticLayout;->mColumns:I
+Landroid/text/StaticLayout;->mLineCount:I
+Landroid/text/StaticLayout;->mLineDirections:[Landroid/text/Layout$Directions;
+Landroid/text/StaticLayout;->mLines:[I
+Landroid/text/StaticLayout;->mMaximumVisibleLineCount:I
+Landroid/text/style/BulletSpan;->mColor:I
+Landroid/text/style/BulletSpan;->mGapWidth:I
+Landroid/text/style/BulletSpan;->mWantColor:Z
+Landroid/text/style/DynamicDrawableSpan;->mDrawableRef:Ljava/lang/ref/WeakReference;
+Landroid/text/style/EasyEditSpan;->getPendingIntent()Landroid/app/PendingIntent;
+Landroid/text/style/EasyEditSpan;->isDeleteEnabled()Z
+Landroid/text/style/EasyEditSpan;->setDeleteEnabled(Z)V
+Landroid/text/style/ImageSpan;->mDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/text/style/RasterizerSpan;
+Landroid/text/style/RasterizerSpan;-><init>(Landroid/graphics/Rasterizer;)V
+Landroid/text/style/RasterizerSpan;->getRasterizer()Landroid/graphics/Rasterizer;
+Landroid/text/style/SpellCheckSpan;-><init>()V
+Landroid/text/style/SpellCheckSpan;-><init>(Landroid/os/Parcel;)V
+Landroid/text/style/SpellCheckSpan;->isSpellCheckInProgress()Z
+Landroid/text/style/SpellCheckSpan;->setSpellCheckInProgress(Z)V
+Landroid/text/style/SuggestionRangeSpan;-><init>()V
+Landroid/text/style/SuggestionRangeSpan;-><init>(Landroid/os/Parcel;)V
+Landroid/text/style/SuggestionRangeSpan;->setBackgroundColor(I)V
+Landroid/text/style/SuggestionSpan;->getNotificationTargetClassName()Ljava/lang/String;
+Landroid/text/style/SuggestionSpan;->getUnderlineColor()I
+Landroid/text/style/SuggestionSpan;->mEasyCorrectUnderlineColor:I
+Landroid/text/style/SuggestionSpan;->mEasyCorrectUnderlineThickness:F
+Landroid/text/style/SuggestionSpan;->notifySelection(Landroid/content/Context;Ljava/lang/String;I)V
+Landroid/text/TextLine;->mCharacterStyleSpanSet:Landroid/text/SpanSet;
+Landroid/text/TextLine;->mMetricAffectingSpanSpanSet:Landroid/text/SpanSet;
+Landroid/text/TextLine;->mReplacementSpanSpanSet:Landroid/text/SpanSet;
+Landroid/text/TextLine;->mSpanned:Landroid/text/Spanned;
+Landroid/text/TextLine;->mText:Ljava/lang/CharSequence;
+Landroid/text/TextLine;->obtain()Landroid/text/TextLine;
+Landroid/text/TextLine;->sCached:[Landroid/text/TextLine;
+Landroid/text/TextPaint;->setUnderlineText(IF)V
+Landroid/text/TextPaint;->underlineColor:I
+Landroid/text/TextPaint;->underlineThickness:F
+Landroid/text/TextUtils$TruncateAt;->END_SMALL:Landroid/text/TextUtils$TruncateAt;
+Landroid/text/TextUtils;->isPrintableAsciiOnly(Ljava/lang/CharSequence;)Z
+Landroid/text/TextUtils;->packRangeInLong(II)J
+Landroid/text/TextUtils;->unpackRangeEndFromLong(J)I
+Landroid/text/TextUtils;->unpackRangeStartFromLong(J)I
+Landroid/text/util/Linkify;->gatherTelLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Landroid/content/Context;)V
+Landroid/transition/ChangeBounds;->BOTTOM_RIGHT_ONLY_PROPERTY:Landroid/util/Property;
+Landroid/transition/ChangeBounds;->POSITION_PROPERTY:Landroid/util/Property;
+Landroid/transition/Scene;->mEnterAction:Ljava/lang/Runnable;
+Landroid/transition/Scene;->mExitAction:Ljava/lang/Runnable;
+Landroid/transition/Scene;->setCurrentScene(Landroid/view/View;Landroid/transition/Scene;)V
+Landroid/transition/Transition;->cancel()V
+Landroid/transition/Transition;->end()V
+Landroid/transition/TransitionManager;->getRunningTransitions()Landroid/util/ArrayMap;
+Landroid/transition/TransitionManager;->sPendingTransitions:Ljava/util/ArrayList;
+Landroid/transition/TransitionManager;->sRunningTransitions:Ljava/lang/ThreadLocal;
+Landroid/util/apk/SignatureNotFoundException;->serialVersionUID:J
+Landroid/util/ArrayMap;->allocArrays(I)V
+Landroid/util/ArrayMap;->append(Ljava/lang/Object;Ljava/lang/Object;)V
+Landroid/util/ArrayMap;->CACHE_SIZE:I
+Landroid/util/ArrayMap;->EMPTY:Landroid/util/ArrayMap;
+Landroid/util/ArrayMap;->EMPTY_IMMUTABLE_INTS:[I
+Landroid/util/ArrayMap;->freeArrays([I[Ljava/lang/Object;I)V
+Landroid/util/ArrayMap;->indexOf(Ljava/lang/Object;I)I
+Landroid/util/ArrayMap;->indexOfNull()I
+Landroid/util/ArrayMap;->indexOfValue(Ljava/lang/Object;)I
+Landroid/util/ArrayMap;->mArray:[Ljava/lang/Object;
+Landroid/util/ArrayMap;->mBaseCache:[Ljava/lang/Object;
+Landroid/util/ArrayMap;->mBaseCacheSize:I
+Landroid/util/ArrayMap;->mHashes:[I
+Landroid/util/ArrayMap;->mSize:I
+Landroid/util/ArrayMap;->mTwiceBaseCache:[Ljava/lang/Object;
+Landroid/util/ArrayMap;->mTwiceBaseCacheSize:I
+Landroid/util/ArraySet;-><init>(Ljava/util/Collection;)V
+Landroid/util/ArraySet;->allocArrays(I)V
+Landroid/util/ArraySet;->freeArrays([I[Ljava/lang/Object;I)V
+Landroid/util/ArraySet;->indexOf(Ljava/lang/Object;I)I
+Landroid/util/ArraySet;->indexOfNull()I
+Landroid/util/ArraySet;->mArray:[Ljava/lang/Object;
+Landroid/util/ArraySet;->mHashes:[I
+Landroid/util/ArraySet;->mSize:I
+Landroid/util/Base64;-><init>()V
+Landroid/util/Base64OutputStream;-><init>(Ljava/io/OutputStream;IZ)V
+Landroid/util/DebugUtils;->buildShortClassTag(Ljava/lang/Object;Ljava/lang/StringBuilder;)V
+Landroid/util/DisplayMetrics;->DENSITY_DEVICE:I
+Landroid/util/DisplayMetrics;->noncompatDensityDpi:I
+Landroid/util/DisplayMetrics;->noncompatHeightPixels:I
+Landroid/util/DisplayMetrics;->noncompatWidthPixels:I
+Landroid/util/EventLog$Event;-><init>([B)V
+Landroid/util/FloatMath;->ceil(F)F
+Landroid/util/FloatMath;->cos(F)F
+Landroid/util/FloatMath;->exp(F)F
+Landroid/util/FloatMath;->floor(F)F
+Landroid/util/FloatMath;->hypot(FF)F
+Landroid/util/FloatMath;->pow(FF)F
+Landroid/util/FloatMath;->sin(F)F
+Landroid/util/FloatMath;->sqrt(F)F
+Landroid/util/IconDrawableFactory;->getBadgedIcon(Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
+Landroid/util/IconDrawableFactory;->getBadgedIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;I)Landroid/graphics/drawable/Drawable;
+Landroid/util/IconDrawableFactory;->newInstance(Landroid/content/Context;)Landroid/util/IconDrawableFactory;
+Landroid/util/LocalLog$ReadOnlyLocalLog;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
+Landroid/util/LocalLog;-><init>(I)V
+Landroid/util/LocalLog;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
+Landroid/util/LocalLog;->log(Ljava/lang/String;)V
+Landroid/util/LocalLog;->readOnlyLocalLog()Landroid/util/LocalLog$ReadOnlyLocalLog;
+Landroid/util/Log;->println_native(IILjava/lang/String;Ljava/lang/String;)I
+Landroid/util/Log;->wtf(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ZZ)I
+Landroid/util/LogWriter;-><init>(ILjava/lang/String;)V
+Landroid/util/LongArray;-><init>()V
+Landroid/util/LongArray;->add(IJ)V
+Landroid/util/LongArray;->get(I)J
+Landroid/util/LongArray;->size()I
+Landroid/util/LongSparseLongArray;->mKeys:[J
+Landroid/util/LongSparseLongArray;->mSize:I
+Landroid/util/LongSparseLongArray;->mValues:[J
+Landroid/util/LruCache;->map:Ljava/util/LinkedHashMap;
+Landroid/util/MalformedJsonException;->serialVersionUID:J
+Landroid/util/MathUtils;->abs(F)F
+Landroid/util/MathUtils;->constrain(FFF)F
+Landroid/util/MathUtils;->constrain(III)I
+Landroid/util/MathUtils;->lerp(FFF)F
+Landroid/util/MathUtils;->max(II)F
+Landroid/util/NtpTrustedTime;->forceRefresh()Z
+Landroid/util/NtpTrustedTime;->getCachedNtpTime()J
+Landroid/util/NtpTrustedTime;->getCachedNtpTimeReference()J
+Landroid/util/NtpTrustedTime;->getInstance(Landroid/content/Context;)Landroid/util/NtpTrustedTime;
+Landroid/util/NtpTrustedTime;->hasCache()Z
+Landroid/util/PathParser;->createPathFromPathData(Ljava/lang/String;)Landroid/graphics/Path;
+Landroid/util/Pools$Pool;->acquire()Ljava/lang/Object;
+Landroid/util/Pools$Pool;->release(Ljava/lang/Object;)Z
+Landroid/util/Pools$SimplePool;-><init>(I)V
+Landroid/util/Pools$SimplePool;->acquire()Ljava/lang/Object;
+Landroid/util/Pools$SimplePool;->mPool:[Ljava/lang/Object;
+Landroid/util/Pools$SimplePool;->release(Ljava/lang/Object;)Z
+Landroid/util/Pools$SynchronizedPool;-><init>(I)V
+Landroid/util/Pools$SynchronizedPool;->acquire()Ljava/lang/Object;
+Landroid/util/Pools$SynchronizedPool;->release(Ljava/lang/Object;)Z
+Landroid/util/Rational;->mDenominator:I
+Landroid/util/Rational;->mNumerator:I
+Landroid/util/Rational;->readObject(Ljava/io/ObjectInputStream;)V
+Landroid/util/Rational;->serialVersionUID:J
+Landroid/util/RecurrenceRule;->buildRecurringMonthly(ILjava/time/ZoneId;)Landroid/util/RecurrenceRule;
+Landroid/util/RecurrenceRule;->start:Ljava/time/ZonedDateTime;
+Landroid/util/Singleton;-><init>()V
+Landroid/util/Singleton;->get()Ljava/lang/Object;
+Landroid/util/Singleton;->mInstance:Ljava/lang/Object;
+Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->println(ILjava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->v(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/util/Slog;->wtf(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->wtf(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/util/Slog;->wtfStack(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/SparseArray;->mKeys:[I
+Landroid/util/SparseArray;->mSize:I
+Landroid/util/SparseArray;->mValues:[Ljava/lang/Object;
+Landroid/util/SparseBooleanArray;->mKeys:[I
+Landroid/util/SparseBooleanArray;->mSize:I
+Landroid/util/SparseBooleanArray;->mValues:[Z
+Landroid/util/SparseIntArray;->mKeys:[I
+Landroid/util/SparseIntArray;->mSize:I
+Landroid/util/SparseIntArray;->mValues:[I
+Landroid/util/TimeUtils;->formatDuration(JLjava/io/PrintWriter;)V
+Landroid/util/TimeUtils;->formatDuration(JLjava/io/PrintWriter;I)V
+Landroid/util/TimeUtils;->logTimeOfDay(J)Ljava/lang/String;
+Landroid/util/TrustedTime;->currentTimeMillis()J
+Landroid/util/TrustedTime;->forceRefresh()Z
+Landroid/util/TrustedTime;->getCacheAge()J
+Landroid/util/TrustedTime;->hasCache()Z
+Landroid/view/accessibility/AccessibilityEvent;->mAction:I
+Landroid/view/accessibility/AccessibilityEvent;->mEventType:I
+Landroid/view/accessibility/AccessibilityInteractionClient;->clearCache()V
+Landroid/view/accessibility/AccessibilityInteractionClient;->getInstance()Landroid/view/accessibility/AccessibilityInteractionClient;
+Landroid/view/accessibility/AccessibilityInteractionClient;->setSameThreadMessage(Landroid/os/Message;)V
+Landroid/view/accessibility/AccessibilityManager;->DALTONIZER_SIMULATE_MONOCHROMACY:I
+Landroid/view/accessibility/AccessibilityManager;->getInstance(Landroid/content/Context;)Landroid/view/accessibility/AccessibilityManager;
+Landroid/view/accessibility/AccessibilityManager;->isHighTextContrastEnabled()Z
+Landroid/view/accessibility/AccessibilityManager;->mAccessibilityStateChangeListeners:Landroid/util/ArrayMap;
+Landroid/view/accessibility/AccessibilityManager;->mHandler:Landroid/os/Handler;
+Landroid/view/accessibility/AccessibilityManager;->mIsEnabled:Z
+Landroid/view/accessibility/AccessibilityManager;->mIsHighTextContrastEnabled:Z
+Landroid/view/accessibility/AccessibilityManager;->mLock:Ljava/lang/Object;
+Landroid/view/accessibility/AccessibilityManager;->mService:Landroid/view/accessibility/IAccessibilityManager;
+Landroid/view/accessibility/AccessibilityManager;->mUserId:I
+Landroid/view/accessibility/AccessibilityManager;->setStateLocked(I)V
+Landroid/view/accessibility/AccessibilityManager;->sInstance:Landroid/view/accessibility/AccessibilityManager;
+Landroid/view/accessibility/AccessibilityManager;->sInstanceSync:Ljava/lang/Object;
+Landroid/view/accessibility/AccessibilityNodeInfo;->getAccessibilityViewId(J)I
+Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J
+Landroid/view/accessibility/AccessibilityNodeInfo;->getVirtualDescendantId(J)I
+Landroid/view/accessibility/AccessibilityNodeInfo;->isSealed()Z
+Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray;
+Landroid/view/accessibility/AccessibilityNodeInfo;->mSealed:Z
+Landroid/view/accessibility/AccessibilityNodeInfo;->mSourceNodeId:J
+Landroid/view/accessibility/AccessibilityNodeInfo;->refresh(Landroid/os/Bundle;Z)Z
+Landroid/view/accessibility/AccessibilityNodeInfo;->setSealed(Z)V
+Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J
+Landroid/view/accessibility/AccessibilityRecord;->mSealed:Z
+Landroid/view/accessibility/AccessibilityRecord;->mSourceNodeId:J
+Landroid/view/accessibility/CaptioningManager$CaptionStyle;->PRESETS:[Landroid/view/accessibility/CaptioningManager$CaptionStyle;
+Landroid/view/accessibility/IAccessibilityInteractionConnectionCallback;->setFindAccessibilityNodeInfoResult(Landroid/view/accessibility/AccessibilityNodeInfo;I)V
+Landroid/view/accessibility/IAccessibilityInteractionConnectionCallback;->setFindAccessibilityNodeInfosResult(Ljava/util/List;I)V
+Landroid/view/accessibility/IAccessibilityInteractionConnectionCallback;->setPerformAccessibilityActionResult(ZI)V
+Landroid/view/accessibility/IAccessibilityManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/view/accessibility/IAccessibilityManager$Stub;-><init>()V
+Landroid/view/accessibility/IAccessibilityManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/accessibility/IAccessibilityManager;
+Landroid/view/accessibility/IAccessibilityManager;->getEnabledAccessibilityServiceList(II)Ljava/util/List;
+Landroid/view/AccessibilityIterators$AbstractTextSegmentIterator;-><init>()V
+Landroid/view/AccessibilityIterators$AbstractTextSegmentIterator;->mText:Ljava/lang/String;
+Landroid/view/ActionProvider;->reset()V
+Landroid/view/ActionProvider;->setSubUiVisibilityListener(Landroid/view/ActionProvider$SubUiVisibilityListener;)V
+Landroid/view/animation/Animation;->detach()V
+Landroid/view/animation/Animation;->getInvalidateRegion(IIIILandroid/graphics/RectF;Landroid/view/animation/Transformation;)V
+Landroid/view/animation/Animation;->initializeInvalidateRegion(IIII)V
+Landroid/view/animation/Animation;->mListener:Landroid/view/animation/Animation$AnimationListener;
+Landroid/view/animation/Animation;->mPreviousRegion:Landroid/graphics/RectF;
+Landroid/view/animation/Animation;->mPreviousTransformation:Landroid/view/animation/Transformation;
+Landroid/view/animation/Animation;->mRegion:Landroid/graphics/RectF;
+Landroid/view/animation/Animation;->mTransformation:Landroid/view/animation/Transformation;
+Landroid/view/animation/AnimationUtils;->createAnimationFromXml(Landroid/content/Context;Lorg/xmlpull/v1/XmlPullParser;Landroid/view/animation/AnimationSet;Landroid/util/AttributeSet;)Landroid/view/animation/Animation;
+Landroid/view/animation/Transformation;->printShortString(Ljava/io/PrintWriter;)V
+Landroid/view/animation/TranslateAnimation;->mFromXValue:F
+Landroid/view/animation/TranslateAnimation;->mFromYValue:F
+Landroid/view/animation/TranslateAnimation;->mToXValue:F
+Landroid/view/animation/TranslateAnimation;->mToYValue:F
+Landroid/view/animation/TranslateYAnimation;-><init>(IFIF)V
+Landroid/view/AppTransitionAnimationSpec;-><init>(ILandroid/graphics/GraphicBuffer;Landroid/graphics/Rect;)V
+Landroid/view/autofill/IAutoFillManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/view/BatchedInputEventReceiver;-><init>(Landroid/view/InputChannel;Landroid/os/Looper;Landroid/view/Choreographer;)V
+Landroid/view/Choreographer$CallbackQueue;->addCallbackLocked(JLjava/lang/Object;Ljava/lang/Object;)V
+Landroid/view/Choreographer$CallbackRecord;->run(J)V
+Landroid/view/Choreographer;->doFrame(JI)V
+Landroid/view/Choreographer;->getFrameTime()J
+Landroid/view/Choreographer;->getFrameTimeNanos()J
+Landroid/view/Choreographer;->getSfInstance()Landroid/view/Choreographer;
+Landroid/view/Choreographer;->mCallbackQueues:[Landroid/view/Choreographer$CallbackQueue;
+Landroid/view/Choreographer;->mDisplayEventReceiver:Landroid/view/Choreographer$FrameDisplayEventReceiver;
+Landroid/view/Choreographer;->mFrameIntervalNanos:J
+Landroid/view/Choreographer;->mLastFrameTimeNanos:J
+Landroid/view/Choreographer;->mLock:Ljava/lang/Object;
+Landroid/view/Choreographer;->scheduleVsyncLocked()V
+Landroid/view/Choreographer;->USE_VSYNC:Z
+Landroid/view/ContextThemeWrapper;->getThemeResId()I
+Landroid/view/ContextThemeWrapper;->initializeTheme()V
+Landroid/view/ContextThemeWrapper;->mInflater:Landroid/view/LayoutInflater;
+Landroid/view/ContextThemeWrapper;->mResources:Landroid/content/res/Resources;
+Landroid/view/ContextThemeWrapper;->mTheme:Landroid/content/res/Resources$Theme;
+Landroid/view/ContextThemeWrapper;->mThemeResource:I
+Landroid/view/Display$HdrCapabilities;-><init>([IFFF)V
+Landroid/view/Display$Mode;-><init>(IIIF)V
+Landroid/view/Display;->getAddress()Ljava/lang/String;
+Landroid/view/Display;->getDisplayAdjustments()Landroid/view/DisplayAdjustments;
+Landroid/view/Display;->getDisplayInfo(Landroid/view/DisplayInfo;)Z
+Landroid/view/Display;->getMaximumSizeDimension()I
+Landroid/view/Display;->getOwnerPackageName()Ljava/lang/String;
+Landroid/view/Display;->getType()I
+Landroid/view/Display;->mDisplayInfo:Landroid/view/DisplayInfo;
+Landroid/view/Display;->TYPE_HDMI:I
+Landroid/view/Display;->TYPE_UNKNOWN:I
+Landroid/view/Display;->TYPE_VIRTUAL:I
+Landroid/view/Display;->TYPE_WIFI:I
+Landroid/view/DisplayAdjustments;-><init>()V
+Landroid/view/DisplayAdjustments;->getConfiguration()Landroid/content/res/Configuration;
+Landroid/view/DisplayAdjustments;->setCompatibilityInfo(Landroid/content/res/CompatibilityInfo;)V
+Landroid/view/DisplayEventReceiver;-><init>(Landroid/os/Looper;)V
+Landroid/view/DisplayEventReceiver;->dispatchHotplug(JIZ)V
+Landroid/view/DisplayEventReceiver;->dispatchVsync(JII)V
+Landroid/view/DisplayEventReceiver;->mReceiverPtr:J
+Landroid/view/DisplayEventReceiver;->onHotplug(JIZ)V
+Landroid/view/DisplayEventReceiver;->onVsync(JII)V
+Landroid/view/DisplayEventReceiver;->scheduleVsync()V
+Landroid/view/DisplayInfo;-><init>()V
+Landroid/view/DisplayInfo;->displayCutout:Landroid/view/DisplayCutout;
+Landroid/view/DisplayInfo;->logicalHeight:I
+Landroid/view/DisplayInfo;->logicalWidth:I
+Landroid/view/DisplayInfo;->rotation:I
+Landroid/view/DisplayListCanvas;->callDrawGLFunction2(J)V
+Landroid/view/DisplayListCanvas;->drawCircle(Landroid/graphics/CanvasProperty;Landroid/graphics/CanvasProperty;Landroid/graphics/CanvasProperty;Landroid/graphics/CanvasProperty;)V
+Landroid/view/DisplayListCanvas;->drawGLFunctor2(JLjava/lang/Runnable;)V
+Landroid/view/DisplayListCanvas;->drawRenderNode(Landroid/view/RenderNode;)V
+Landroid/view/DragEvent;->mClipData:Landroid/content/ClipData;
+Landroid/view/DragEvent;->mClipDescription:Landroid/content/ClipDescription;
+Landroid/view/DragEvent;->obtain(Landroid/view/DragEvent;)Landroid/view/DragEvent;
+Landroid/view/FrameMetrics;->mTimingData:[J
+Landroid/view/FrameMetricsObserver;->mFrameMetrics:Landroid/view/FrameMetrics;
+Landroid/view/FrameMetricsObserver;->mMessageQueue:Landroid/os/MessageQueue;
+Landroid/view/FrameMetricsObserver;->notifyDataAvailable(I)V
+Landroid/view/GestureDetector;->LONGPRESS_TIMEOUT:I
+Landroid/view/GestureDetector;->mAlwaysInTapRegion:Z
+Landroid/view/GestureDetector;->mListener:Landroid/view/GestureDetector$OnGestureListener;
+Landroid/view/GestureDetector;->mMinimumFlingVelocity:I
+Landroid/view/GestureDetector;->mTouchSlopSquare:I
+Landroid/view/GhostView;->addGhost(Landroid/view/View;Landroid/view/ViewGroup;)Landroid/view/GhostView;
+Landroid/view/GhostView;->addGhost(Landroid/view/View;Landroid/view/ViewGroup;Landroid/graphics/Matrix;)Landroid/view/GhostView;
+Landroid/view/GhostView;->removeGhost(Landroid/view/View;)V
+Landroid/view/IApplicationToken$Stub;-><init>()V
+Landroid/view/IAppTransitionAnimationSpecsFuture$Stub;-><init>()V
+Landroid/view/IDockedStackListener$Stub;-><init>()V
+Landroid/view/IGraphicsStats$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/view/IGraphicsStats$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IGraphicsStats;
+Landroid/view/InputChannel;-><init>()V
+Landroid/view/InputChannel;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/view/InputChannel;->mPtr:J
+Landroid/view/InputDevice;-><init>(IIILjava/lang/String;IILjava/lang/String;ZIILandroid/view/KeyCharacterMap;ZZZ)V
+Landroid/view/InputDevice;->addMotionRange(IIFFFFF)V
+Landroid/view/InputDevice;->isExternal()Z
+Landroid/view/InputDevice;->mIsExternal:Z
+Landroid/view/InputEvent;->getSequenceNumber()I
+Landroid/view/InputEventConsistencyVerifier;-><init>(Ljava/lang/Object;I)V
+Landroid/view/InputEventConsistencyVerifier;->isInstrumentationEnabled()Z
+Landroid/view/InputEventConsistencyVerifier;->onTouchEvent(Landroid/view/MotionEvent;I)V
+Landroid/view/InputEventConsistencyVerifier;->onUnhandledEvent(Landroid/view/InputEvent;I)V
+Landroid/view/InputEventReceiver;->dispatchBatchedInputEventPending()V
+Landroid/view/InputEventReceiver;->dispatchInputEvent(ILandroid/view/InputEvent;I)V
+Landroid/view/InputEventReceiver;->onInputEvent(Landroid/view/InputEvent;I)V
+Landroid/view/InputEventSender;->dispatchInputEventFinished(IZ)V
+Landroid/view/InputFilter;-><init>(Landroid/os/Looper;)V
+Landroid/view/InputFilter;->onInputEvent(Landroid/view/InputEvent;I)V
+Landroid/view/inputmethod/InputMethodInfo;->isDefault(Landroid/content/Context;)Z
+Landroid/view/inputmethod/InputMethodInfo;->mSubtypes:Landroid/view/inputmethod/InputMethodSubtypeArray;
+Landroid/view/inputmethod/InputMethodManager;->checkFocus()V
+Landroid/view/inputmethod/InputMethodManager;->closeCurrentInput()V
+Landroid/view/inputmethod/InputMethodManager;->finishInputLocked()V
+Landroid/view/inputmethod/InputMethodManager;->focusIn(Landroid/view/View;)V
+Landroid/view/inputmethod/InputMethodManager;->focusOut(Landroid/view/View;)V
+Landroid/view/inputmethod/InputMethodManager;->getClient()Lcom/android/internal/view/IInputMethodClient;
+Landroid/view/inputmethod/InputMethodManager;->getInputContext()Lcom/android/internal/view/IInputContext;
+Landroid/view/inputmethod/InputMethodManager;->getInputMethodWindowVisibleHeight()I
+Landroid/view/inputmethod/InputMethodManager;->getInstance()Landroid/view/inputmethod/InputMethodManager;
+Landroid/view/inputmethod/InputMethodManager;->isCursorAnchorInfoEnabled()Z
+Landroid/view/inputmethod/InputMethodManager;->mCurId:Ljava/lang/String;
+Landroid/view/inputmethod/InputMethodManager;->mCurRootView:Landroid/view/View;
+Landroid/view/inputmethod/InputMethodManager;->mCursorRect:Landroid/graphics/Rect;
+Landroid/view/inputmethod/InputMethodManager;->mH:Landroid/view/inputmethod/InputMethodManager$H;
+Landroid/view/inputmethod/InputMethodManager;->mNextServedView:Landroid/view/View;
+Landroid/view/inputmethod/InputMethodManager;->mServedInputConnectionWrapper:Landroid/view/inputmethod/InputMethodManager$ControlledInputConnectionWrapper;
+Landroid/view/inputmethod/InputMethodManager;->mServedView:Landroid/view/View;
+Landroid/view/inputmethod/InputMethodManager;->mService:Lcom/android/internal/view/IInputMethodManager;
+Landroid/view/inputmethod/InputMethodManager;->mTmpCursorRect:Landroid/graphics/Rect;
+Landroid/view/inputmethod/InputMethodManager;->notifySuggestionPicked(Landroid/text/style/SuggestionSpan;Ljava/lang/String;I)V
+Landroid/view/inputmethod/InputMethodManager;->notifyUserAction()V
+Landroid/view/inputmethod/InputMethodManager;->onPreWindowFocus(Landroid/view/View;Z)V
+Landroid/view/inputmethod/InputMethodManager;->peekInstance()Landroid/view/inputmethod/InputMethodManager;
+Landroid/view/inputmethod/InputMethodManager;->registerSuggestionSpansForNotification([Landroid/text/style/SuggestionSpan;)V
+Landroid/view/inputmethod/InputMethodManager;->setUpdateCursorAnchorInfoMode(I)V
+Landroid/view/inputmethod/InputMethodManager;->showSoftInputUnchecked(ILandroid/os/ResultReceiver;)V
+Landroid/view/inputmethod/InputMethodManager;->sInstance:Landroid/view/inputmethod/InputMethodManager;
+Landroid/view/inputmethod/InputMethodManager;->windowDismissed(Landroid/os/IBinder;)V
+Landroid/view/inputmethod/InputMethodSubtypeArray;-><init>(Ljava/util/List;)V
+Landroid/view/InputQueue;->finishInputEvent(JZ)V
+Landroid/view/IOnKeyguardExitResult;->onKeyguardExitResult(Z)V
+Landroid/view/IRecentsAnimationController;->finish(Z)V
+Landroid/view/IRecentsAnimationController;->screenshotTask(I)Landroid/app/ActivityManager$TaskSnapshot;
+Landroid/view/IRecentsAnimationController;->setAnimationTargetsBehindSystemBars(Z)V
+Landroid/view/IRecentsAnimationController;->setInputConsumerEnabled(Z)V
+Landroid/view/IRecentsAnimationRunner$Stub;-><init>()V
+Landroid/view/IRecentsAnimationRunner;->onAnimationCanceled()V
+Landroid/view/IRecentsAnimationRunner;->onAnimationStart(Landroid/view/IRecentsAnimationController;[Landroid/view/RemoteAnimationTarget;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
+Landroid/view/IRemoteAnimationFinishedCallback;->onAnimationFinished()V
+Landroid/view/IRemoteAnimationRunner$Stub;-><init>()V
+Landroid/view/IRemoteAnimationRunner;->onAnimationCancelled()V
+Landroid/view/IRemoteAnimationRunner;->onAnimationStart([Landroid/view/RemoteAnimationTarget;Landroid/view/IRemoteAnimationFinishedCallback;)V
+Landroid/view/IRotationWatcher$Stub;-><init>()V
+Landroid/view/IRotationWatcher;->onRotationChanged(I)V
+Landroid/view/IWindow$Stub;-><init>()V
+Landroid/view/IWindow$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindow;
+Landroid/view/IWindow;->closeSystemDialogs(Ljava/lang/String;)V
+Landroid/view/IWindow;->dispatchAppVisibility(Z)V
+Landroid/view/IWindow;->dispatchGetNewSurface()V
+Landroid/view/IWindow;->dispatchWallpaperCommand(Ljava/lang/String;IIILandroid/os/Bundle;Z)V
+Landroid/view/IWindow;->dispatchWallpaperOffsets(FFFFZ)V
+Landroid/view/IWindow;->windowFocusChanged(ZZ)V
+Landroid/view/IWindowManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/view/IWindowManager$Stub$Proxy;->getBaseDisplayDensity(I)I
+Landroid/view/IWindowManager$Stub$Proxy;->getDockedStackSide()I
+Landroid/view/IWindowManager$Stub$Proxy;->getInitialDisplayDensity(I)I
+Landroid/view/IWindowManager$Stub$Proxy;->hasNavigationBar()Z
+Landroid/view/IWindowManager$Stub$Proxy;->watchRotation(Landroid/view/IRotationWatcher;I)I
+Landroid/view/IWindowManager$Stub;-><init>()V
+Landroid/view/IWindowManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindowManager;
+Landroid/view/IWindowManager;->createInputConsumer(Landroid/os/IBinder;Ljava/lang/String;Landroid/view/InputChannel;)V
+Landroid/view/IWindowManager;->destroyInputConsumer(Ljava/lang/String;)Z
+Landroid/view/IWindowManager;->endProlongedAnimations()V
+Landroid/view/IWindowManager;->executeAppTransition()V
+Landroid/view/IWindowManager;->freezeRotation(I)V
+Landroid/view/IWindowManager;->getAnimationScale(I)F
+Landroid/view/IWindowManager;->getAnimationScales()[F
+Landroid/view/IWindowManager;->getBaseDisplaySize(ILandroid/graphics/Point;)V
+Landroid/view/IWindowManager;->getDockedStackSide()I
+Landroid/view/IWindowManager;->getInitialDisplayDensity(I)I
+Landroid/view/IWindowManager;->getInitialDisplaySize(ILandroid/graphics/Point;)V
+Landroid/view/IWindowManager;->getPendingAppTransition()I
+Landroid/view/IWindowManager;->getStableInsets(ILandroid/graphics/Rect;)V
+Landroid/view/IWindowManager;->hasNavigationBar()Z
+Landroid/view/IWindowManager;->inputMethodClientHasFocus(Lcom/android/internal/view/IInputMethodClient;)Z
+Landroid/view/IWindowManager;->isKeyguardLocked()Z
+Landroid/view/IWindowManager;->isKeyguardSecure()Z
+Landroid/view/IWindowManager;->isSafeModeEnabled()Z
+Landroid/view/IWindowManager;->lockNow(Landroid/os/Bundle;)V
+Landroid/view/IWindowManager;->overridePendingAppTransitionMultiThumbFuture(Landroid/view/IAppTransitionAnimationSpecsFuture;Landroid/os/IRemoteCallback;Z)V
+Landroid/view/IWindowManager;->overridePendingAppTransitionRemote(Landroid/view/RemoteAnimationAdapter;)V
+Landroid/view/IWindowManager;->registerDockedStackListener(Landroid/view/IDockedStackListener;)V
+Landroid/view/IWindowManager;->removeRotationWatcher(Landroid/view/IRotationWatcher;)V
+Landroid/view/IWindowManager;->setAnimationScale(IF)V
+Landroid/view/IWindowManager;->setAnimationScales([F)V
+Landroid/view/IWindowManager;->setInTouchMode(Z)V
+Landroid/view/IWindowManager;->setNavBarVirtualKeyHapticFeedbackEnabled(Z)V
+Landroid/view/IWindowManager;->setShelfHeight(ZI)V
+Landroid/view/IWindowManager;->setStrictModeVisualIndicatorPreference(Ljava/lang/String;)V
+Landroid/view/IWindowManager;->showStrictModeViolation(Z)V
+Landroid/view/IWindowManager;->thawRotation()V
+Landroid/view/IWindowSession$Stub$Proxy;->relayout(Landroid/view/IWindow;ILandroid/view/WindowManager$LayoutParams;IIIIJLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/view/DisplayCutout$ParcelableWrapper;Landroid/util/MergedConfiguration;Landroid/view/Surface;)I
+Landroid/view/IWindowSession$Stub;-><init>()V
+Landroid/view/IWindowSession$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindowSession;
+Landroid/view/IWindowSession;->finishDrawing(Landroid/view/IWindow;)V
+Landroid/view/IWindowSession;->getInTouchMode()Z
+Landroid/view/IWindowSession;->performDrag(Landroid/view/IWindow;ILandroid/view/SurfaceControl;IFFFFLandroid/content/ClipData;)Landroid/os/IBinder;
+Landroid/view/IWindowSession;->performHapticFeedback(Landroid/view/IWindow;IZ)Z
+Landroid/view/IWindowSession;->remove(Landroid/view/IWindow;)V
+Landroid/view/IWindowSession;->setInTouchMode(Z)V
+Landroid/view/IWindowSession;->setTransparentRegion(Landroid/view/IWindow;Landroid/graphics/Region;)V
+Landroid/view/IWindowSession;->wallpaperCommandComplete(Landroid/os/IBinder;Landroid/os/Bundle;)V
+Landroid/view/IWindowSession;->wallpaperOffsetsComplete(Landroid/os/IBinder;)V
+Landroid/view/KeyCharacterMap$FallbackAction;->keyCode:I
+Landroid/view/KeyCharacterMap$FallbackAction;->metaState:I
+Landroid/view/KeyCharacterMap;-><init>(J)V
+Landroid/view/KeyEvent;->actionToString(I)Ljava/lang/String;
+Landroid/view/KeyEvent;->isConfirmKey(I)Z
+Landroid/view/KeyEvent;->isDown()Z
+Landroid/view/KeyEvent;->mAction:I
+Landroid/view/KeyEvent;->mCharacters:Ljava/lang/String;
+Landroid/view/KeyEvent;->mDeviceId:I
+Landroid/view/KeyEvent;->mDownTime:J
+Landroid/view/KeyEvent;->META_ALL_MASK:I
+Landroid/view/KeyEvent;->META_ALT_LOCKED:I
+Landroid/view/KeyEvent;->META_CAP_LOCKED:I
+Landroid/view/KeyEvent;->META_INVALID_MODIFIER_MASK:I
+Landroid/view/KeyEvent;->META_LOCK_MASK:I
+Landroid/view/KeyEvent;->META_MODIFIER_MASK:I
+Landroid/view/KeyEvent;->META_SELECTING:I
+Landroid/view/KeyEvent;->META_SYMBOLIC_NAMES:[Ljava/lang/String;
+Landroid/view/KeyEvent;->META_SYM_LOCKED:I
+Landroid/view/KeyEvent;->META_SYNTHETIC_MASK:I
+Landroid/view/KeyEvent;->mEventTime:J
+Landroid/view/KeyEvent;->mFlags:I
+Landroid/view/KeyEvent;->mKeyCode:I
+Landroid/view/KeyEvent;->mMetaState:I
+Landroid/view/KeyEvent;->mRepeatCount:I
+Landroid/view/KeyEvent;->mScanCode:I
+Landroid/view/KeyEvent;->mSource:I
+Landroid/view/KeyEvent;->obtain(JJIIIIIIIILjava/lang/String;)Landroid/view/KeyEvent;
+Landroid/view/KeyEvent;->recycle()V
+Landroid/view/LayoutInflater;->ATTRS_THEME:[I
+Landroid/view/LayoutInflater;->createViewFromTag(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
+Landroid/view/LayoutInflater;->createViewFromTag(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;Z)Landroid/view/View;
+Landroid/view/LayoutInflater;->mConstructorArgs:[Ljava/lang/Object;
+Landroid/view/LayoutInflater;->mConstructorSignature:[Ljava/lang/Class;
+Landroid/view/LayoutInflater;->mContext:Landroid/content/Context;
+Landroid/view/LayoutInflater;->mFactory2:Landroid/view/LayoutInflater$Factory2;
+Landroid/view/LayoutInflater;->mFactory:Landroid/view/LayoutInflater$Factory;
+Landroid/view/LayoutInflater;->mFactorySet:Z
+Landroid/view/LayoutInflater;->mPrivateFactory:Landroid/view/LayoutInflater$Factory2;
+Landroid/view/LayoutInflater;->parseInclude(Lorg/xmlpull/v1/XmlPullParser;Landroid/content/Context;Landroid/view/View;Landroid/util/AttributeSet;)V
+Landroid/view/LayoutInflater;->sConstructorMap:Ljava/util/HashMap;
+Landroid/view/LayoutInflater;->setPrivateFactory(Landroid/view/LayoutInflater$Factory2;)V
+Landroid/view/MotionEvent$PointerCoords;->createArray(I)[Landroid/view/MotionEvent$PointerCoords;
+Landroid/view/MotionEvent$PointerCoords;->mPackedAxisBits:J
+Landroid/view/MotionEvent$PointerCoords;->mPackedAxisValues:[F
+Landroid/view/MotionEvent$PointerProperties;->createArray(I)[Landroid/view/MotionEvent$PointerProperties;
+Landroid/view/MotionEvent;->addBatch(Landroid/view/MotionEvent;)Z
+Landroid/view/MotionEvent;->copy()Landroid/view/MotionEvent;
+Landroid/view/MotionEvent;->getEventTimeNano()J
+Landroid/view/MotionEvent;->getPointerIdBits()I
+Landroid/view/MotionEvent;->HISTORY_CURRENT:I
+Landroid/view/MotionEvent;->mNativePtr:J
+Landroid/view/MotionEvent;->nativeGetRawAxisValue(JIII)F
+Landroid/view/MotionEvent;->obtain()Landroid/view/MotionEvent;
+Landroid/view/MotionEvent;->scale(F)V
+Landroid/view/MotionEvent;->setDownTime(J)V
+Landroid/view/MotionEvent;->split(I)Landroid/view/MotionEvent;
+Landroid/view/NotificationHeaderView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/view/PointerIcon;->load(Landroid/content/Context;)Landroid/view/PointerIcon;
+Landroid/view/PointerIcon;->mBitmap:Landroid/graphics/Bitmap;
+Landroid/view/PointerIcon;->mBitmapFrames:[Landroid/graphics/Bitmap;
+Landroid/view/PointerIcon;->mDurationPerFrame:I
+Landroid/view/PointerIcon;->mHotSpotX:F
+Landroid/view/PointerIcon;->mHotSpotY:F
+Landroid/view/PointerIcon;->mType:I
+Landroid/view/RemoteAnimationAdapter;-><init>(Landroid/view/IRemoteAnimationRunner;JJ)V
+Landroid/view/RemoteAnimationDefinition;-><init>()V
+Landroid/view/RemoteAnimationDefinition;->addRemoteAnimation(IILandroid/view/RemoteAnimationAdapter;)V
+Landroid/view/RemoteAnimationDefinition;->addRemoteAnimation(ILandroid/view/RemoteAnimationAdapter;)V
+Landroid/view/RemoteAnimationTarget;->clipRect:Landroid/graphics/Rect;
+Landroid/view/RemoteAnimationTarget;->contentInsets:Landroid/graphics/Rect;
+Landroid/view/RemoteAnimationTarget;->isNotInRecents:Z
+Landroid/view/RemoteAnimationTarget;->isTranslucent:Z
+Landroid/view/RemoteAnimationTarget;->leash:Landroid/view/SurfaceControl;
+Landroid/view/RemoteAnimationTarget;->mode:I
+Landroid/view/RemoteAnimationTarget;->position:Landroid/graphics/Point;
+Landroid/view/RemoteAnimationTarget;->prefixOrderIndex:I
+Landroid/view/RemoteAnimationTarget;->sourceContainerBounds:Landroid/graphics/Rect;
+Landroid/view/RemoteAnimationTarget;->taskId:I
+Landroid/view/RemoteAnimationTarget;->windowConfiguration:Landroid/app/WindowConfiguration;
+Landroid/view/RenderNode;->create(Ljava/lang/String;Landroid/view/View;)Landroid/view/RenderNode;
+Landroid/view/RenderNode;->discardDisplayList()V
+Landroid/view/RenderNode;->end(Landroid/view/DisplayListCanvas;)V
+Landroid/view/RenderNode;->isValid()Z
+Landroid/view/RenderNode;->offsetLeftAndRight(I)Z
+Landroid/view/RenderNode;->output()V
+Landroid/view/RenderNode;->setClipToBounds(Z)Z
+Landroid/view/RenderNode;->setHasOverlappingRendering(Z)Z
+Landroid/view/RenderNode;->setLeftTopRightBottom(IIII)Z
+Landroid/view/RenderNode;->setProjectBackwards(Z)Z
+Landroid/view/RenderNode;->start(II)Landroid/view/DisplayListCanvas;
+Landroid/view/RenderNodeAnimator;-><init>(IF)V
+Landroid/view/RenderNodeAnimator;-><init>(Landroid/graphics/CanvasProperty;F)V
+Landroid/view/RenderNodeAnimator;-><init>(Landroid/graphics/CanvasProperty;IF)V
+Landroid/view/RenderNodeAnimator;->callOnFinished(Landroid/view/RenderNodeAnimator;)V
+Landroid/view/RenderNodeAnimator;->mapViewPropertyToRenderProperty(I)I
+Landroid/view/RenderNodeAnimator;->setStartValue(F)V
+Landroid/view/RenderNodeAnimator;->setTarget(Landroid/view/View;)V
+Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
+Landroid/view/ScaleGestureDetector;->mMinSpan:I
+Landroid/view/ScaleGestureDetector;->mSpanSlop:I
+Landroid/view/Surface;-><init>()V
+Landroid/view/Surface;-><init>(J)V
+Landroid/view/Surface;->copyFrom(Landroid/view/SurfaceControl;)V
+Landroid/view/Surface;->destroy()V
+Landroid/view/Surface;->getNextFrameNumber()J
+Landroid/view/Surface;->mLock:Ljava/lang/Object;
+Landroid/view/Surface;->mLockedObject:J
+Landroid/view/Surface;->mName:Ljava/lang/String;
+Landroid/view/Surface;->mNativeObject:J
+Landroid/view/Surface;->nativeRelease(J)V
+Landroid/view/Surface;->transferFrom(Landroid/view/Surface;)V
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;-><init>()V
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->appVsyncOffsetNanos:J
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->density:F
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->height:I
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->presentationDeadlineNanos:J
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->refreshRate:F
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->secure:Z
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->width:I
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->xDpi:F
+Landroid/view/SurfaceControl$PhysicalDisplayInfo;->yDpi:F
+Landroid/view/SurfaceControl$Transaction;-><init>()V
+Landroid/view/SurfaceControl$Transaction;->apply()V
+Landroid/view/SurfaceControl$Transaction;->deferTransactionUntil(Landroid/view/SurfaceControl;Landroid/os/IBinder;J)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->deferTransactionUntilSurface(Landroid/view/SurfaceControl;Landroid/view/Surface;J)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->hide(Landroid/view/SurfaceControl;)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setAlpha(Landroid/view/SurfaceControl;F)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setColor(Landroid/view/SurfaceControl;[F)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setFinalCrop(Landroid/view/SurfaceControl;Landroid/graphics/Rect;)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setLayer(Landroid/view/SurfaceControl;I)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setMatrix(Landroid/view/SurfaceControl;FFFF)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setMatrix(Landroid/view/SurfaceControl;Landroid/graphics/Matrix;[F)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setPosition(Landroid/view/SurfaceControl;FF)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setSize(Landroid/view/SurfaceControl;II)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->setWindowCrop(Landroid/view/SurfaceControl;Landroid/graphics/Rect;)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl$Transaction;->show(Landroid/view/SurfaceControl;)Landroid/view/SurfaceControl$Transaction;
+Landroid/view/SurfaceControl;->closeTransaction()V
+Landroid/view/SurfaceControl;->createDisplay(Ljava/lang/String;Z)Landroid/os/IBinder;
+Landroid/view/SurfaceControl;->destroyDisplay(Landroid/os/IBinder;)V
+Landroid/view/SurfaceControl;->getBuiltInDisplay(I)Landroid/os/IBinder;
+Landroid/view/SurfaceControl;->getDisplayConfigs(Landroid/os/IBinder;)[Landroid/view/SurfaceControl$PhysicalDisplayInfo;
+Landroid/view/SurfaceControl;->HIDDEN:I
+Landroid/view/SurfaceControl;->hide()V
+Landroid/view/SurfaceControl;->openTransaction()V
+Landroid/view/SurfaceControl;->screenshot(Landroid/graphics/Rect;IIIIZI)Landroid/graphics/Bitmap;
+Landroid/view/SurfaceControl;->screenshot(Landroid/os/IBinder;Landroid/view/Surface;Landroid/graphics/Rect;IIIIZZ)V
+Landroid/view/SurfaceControl;->setDisplayLayerStack(Landroid/os/IBinder;I)V
+Landroid/view/SurfaceControl;->setDisplayProjection(Landroid/os/IBinder;ILandroid/graphics/Rect;Landroid/graphics/Rect;)V
+Landroid/view/SurfaceControl;->setDisplaySurface(Landroid/os/IBinder;Landroid/view/Surface;)V
+Landroid/view/SurfaceControl;->setLayer(I)V
+Landroid/view/SurfaceControl;->setPosition(FF)V
+Landroid/view/SurfaceControl;->show()V
+Landroid/view/SurfaceSession;-><init>()V
+Landroid/view/SurfaceSession;->kill()V
+Landroid/view/SurfaceSession;->mNativeClient:J
+Landroid/view/SurfaceView;->isFixedSize()Z
+Landroid/view/SurfaceView;->mCallbacks:Ljava/util/ArrayList;
+Landroid/view/SurfaceView;->mDrawingStopped:Z
+Landroid/view/SurfaceView;->mDrawListener:Landroid/view/ViewTreeObserver$OnPreDrawListener;
+Landroid/view/SurfaceView;->mFormat:I
+Landroid/view/SurfaceView;->mHaveFrame:Z
+Landroid/view/SurfaceView;->mIsCreating:Z
+Landroid/view/SurfaceView;->mLastLockTime:J
+Landroid/view/SurfaceView;->mRequestedFormat:I
+Landroid/view/SurfaceView;->mRequestedHeight:I
+Landroid/view/SurfaceView;->mRequestedWidth:I
+Landroid/view/SurfaceView;->mSurface:Landroid/view/Surface;
+Landroid/view/SurfaceView;->mSurfaceFrame:Landroid/graphics/Rect;
+Landroid/view/SurfaceView;->mSurfaceHolder:Landroid/view/SurfaceHolder;
+Landroid/view/SurfaceView;->mSurfaceLock:Ljava/util/concurrent/locks/ReentrantLock;
+Landroid/view/SurfaceView;->setFrame(IIII)Z
+Landroid/view/SurfaceView;->surfacePositionLost_uiRtSync(J)V
+Landroid/view/SurfaceView;->updateSurfacePosition_renderWorker(JIIII)V
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V
+Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V
+Landroid/view/textclassifier/TextClassificationManager;->getTextClassifier(I)Landroid/view/textclassifier/TextClassifier;
+Landroid/view/textclassifier/TextClassifier;->classifyText(Ljava/lang/CharSequence;IILandroid/view/textclassifier/TextClassification$Options;)Landroid/view/textclassifier/TextClassification;
+Landroid/view/textclassifier/TextClassifier;->generateLinks(Ljava/lang/CharSequence;Landroid/view/textclassifier/TextLinks$Options;)Landroid/view/textclassifier/TextLinks;
+Landroid/view/textclassifier/TextClassifier;->suggestSelection(Ljava/lang/CharSequence;IILandroid/view/textclassifier/TextSelection$Options;)Landroid/view/textclassifier/TextSelection;
+Landroid/view/textclassifier/TextLinks$Options;-><init>()V
+Landroid/view/textservice/SpellCheckerSession;->mSpellCheckerSessionListener:Landroid/view/textservice/SpellCheckerSession$SpellCheckerSessionListener;
+Landroid/view/textservice/TextServicesManager;->getCurrentSpellChecker()Landroid/view/textservice/SpellCheckerInfo;
+Landroid/view/textservice/TextServicesManager;->getCurrentSpellCheckerSubtype(Z)Landroid/view/textservice/SpellCheckerSubtype;
+Landroid/view/textservice/TextServicesManager;->getEnabledSpellCheckers()[Landroid/view/textservice/SpellCheckerInfo;
+Landroid/view/textservice/TextServicesManager;->getInstance()Landroid/view/textservice/TextServicesManager;
+Landroid/view/textservice/TextServicesManager;->isSpellCheckerEnabled()Z
+Landroid/view/TextureView;->destroyHardwareLayer()V
+Landroid/view/TextureView;->destroyHardwareResources()V
+Landroid/view/TextureView;->mLayer:Landroid/view/TextureLayer;
+Landroid/view/TextureView;->mNativeWindow:J
+Landroid/view/TextureView;->mOpaque:Z
+Landroid/view/TextureView;->mSurface:Landroid/graphics/SurfaceTexture;
+Landroid/view/TextureView;->mUpdateListener:Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;
+Landroid/view/TextureView;->mUpdateSurface:Z
+Landroid/view/TextureView;->nCreateNativeWindow(Landroid/graphics/SurfaceTexture;)V
+Landroid/view/TextureView;->nDestroyNativeWindow()V
+Landroid/view/TextureView;->onDetachedFromWindowInternal()V
+Landroid/view/ThreadedRenderer;->addRenderNode(Landroid/view/RenderNode;Z)V
+Landroid/view/ThreadedRenderer;->createHardwareBitmap(Landroid/view/RenderNode;II)Landroid/graphics/Bitmap;
+Landroid/view/ThreadedRenderer;->drawRenderNode(Landroid/view/RenderNode;)V
+Landroid/view/ThreadedRenderer;->removeRenderNode(Landroid/view/RenderNode;)V
+Landroid/view/ThreadedRenderer;->setContentDrawBounds(IIII)V
+Landroid/view/ThreadedRenderer;->setupDiskCache(Ljava/io/File;)V
+Landroid/view/TouchDelegate;->mDelegateTargeted:Z
+Landroid/view/VelocityTracker$Estimator;->confidence:F
+Landroid/view/VelocityTracker$Estimator;->degree:I
+Landroid/view/VelocityTracker$Estimator;->xCoeff:[F
+Landroid/view/VelocityTracker$Estimator;->yCoeff:[F
+Landroid/view/VelocityTracker;->obtain(Ljava/lang/String;)Landroid/view/VelocityTracker;
+Landroid/view/View$AccessibilityDelegate;->createAccessibilityNodeInfo(Landroid/view/View;)Landroid/view/accessibility/AccessibilityNodeInfo;
+Landroid/view/View$AttachInfo$InvalidateInfo;-><init>()V
+Landroid/view/View$AttachInfo$InvalidateInfo;->bottom:I
+Landroid/view/View$AttachInfo$InvalidateInfo;->left:I
+Landroid/view/View$AttachInfo$InvalidateInfo;->right:I
+Landroid/view/View$AttachInfo$InvalidateInfo;->target:Landroid/view/View;
+Landroid/view/View$AttachInfo$InvalidateInfo;->top:I
+Landroid/view/View$AttachInfo;->mApplicationScale:F
+Landroid/view/View$AttachInfo;->mContentInsets:Landroid/graphics/Rect;
+Landroid/view/View$AttachInfo;->mDisplayState:I
+Landroid/view/View$AttachInfo;->mDrawingTime:J
+Landroid/view/View$AttachInfo;->mGivenInternalInsets:Landroid/view/ViewTreeObserver$InternalInsetsInfo;
+Landroid/view/View$AttachInfo;->mHandler:Landroid/os/Handler;
+Landroid/view/View$AttachInfo;->mHasWindowFocus:Z
+Landroid/view/View$AttachInfo;->mInTouchMode:Z
+Landroid/view/View$AttachInfo;->mKeepScreenOn:Z
+Landroid/view/View$AttachInfo;->mKeyDispatchState:Landroid/view/KeyEvent$DispatcherState;
+Landroid/view/View$AttachInfo;->mRecomputeGlobalAttributes:Z
+Landroid/view/View$AttachInfo;->mScalingRequired:Z
+Landroid/view/View$AttachInfo;->mScrollContainers:Ljava/util/ArrayList;
+Landroid/view/View$AttachInfo;->mSession:Landroid/view/IWindowSession;
+Landroid/view/View$AttachInfo;->mStableInsets:Landroid/graphics/Rect;
+Landroid/view/View$AttachInfo;->mTreeObserver:Landroid/view/ViewTreeObserver;
+Landroid/view/View$AttachInfo;->mViewScrollChanged:Z
+Landroid/view/View$AttachInfo;->mViewVisibilityChanged:Z
+Landroid/view/View$AttachInfo;->mVisibleInsets:Landroid/graphics/Rect;
+Landroid/view/View$AttachInfo;->mWindow:Landroid/view/IWindow;
+Landroid/view/View$DragShadowBuilder;->mView:Ljava/lang/ref/WeakReference;
+Landroid/view/View$ListenerInfo;-><init>()V
+Landroid/view/View$ListenerInfo;->mOnClickListener:Landroid/view/View$OnClickListener;
+Landroid/view/View$ListenerInfo;->mOnCreateContextMenuListener:Landroid/view/View$OnCreateContextMenuListener;
+Landroid/view/View$ListenerInfo;->mOnDragListener:Landroid/view/View$OnDragListener;
+Landroid/view/View$ListenerInfo;->mOnFocusChangeListener:Landroid/view/View$OnFocusChangeListener;
+Landroid/view/View$ListenerInfo;->mOnGenericMotionListener:Landroid/view/View$OnGenericMotionListener;
+Landroid/view/View$ListenerInfo;->mOnHoverListener:Landroid/view/View$OnHoverListener;
+Landroid/view/View$ListenerInfo;->mOnKeyListener:Landroid/view/View$OnKeyListener;
+Landroid/view/View$ListenerInfo;->mOnLongClickListener:Landroid/view/View$OnLongClickListener;
+Landroid/view/View$ListenerInfo;->mOnTouchListener:Landroid/view/View$OnTouchListener;
+Landroid/view/View$MeasureSpec;->makeSafeMeasureSpec(II)I
+Landroid/view/View$ScrollabilityCache;->host:Landroid/view/View;
+Landroid/view/View$ScrollabilityCache;->scrollBar:Landroid/widget/ScrollBarDrawable;
+Landroid/view/View$ScrollabilityCache;->state:I
+Landroid/view/View;-><init>()V
+Landroid/view/View;->applyDrawableToTransparentRegion(Landroid/graphics/drawable/Drawable;Landroid/graphics/Region;)V
+Landroid/view/View;->assignParent(Landroid/view/ViewParent;)V
+Landroid/view/View;->cancel(Landroid/view/View$SendViewScrolledAccessibilityEvent;)V
+Landroid/view/View;->clearAccessibilityFocus()V
+Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z
+Landroid/view/View;->computeOpaqueFlags()V
+Landroid/view/View;->createSnapshot(Landroid/view/ViewDebug$CanvasProvider;Z)Landroid/graphics/Bitmap;
+Landroid/view/View;->DBG:Z
+Landroid/view/View;->debug()V
+Landroid/view/View;->debug(I)V
+Landroid/view/View;->DEBUG_LAYOUT_PROPERTY:Ljava/lang/String;
+Landroid/view/View;->destroyHardwareResources()V
+Landroid/view/View;->dispatchAttachedToWindow(Landroid/view/View$AttachInfo;I)V
+Landroid/view/View;->dispatchDetachedFromWindow()V
+Landroid/view/View;->dispatchPointerEvent(Landroid/view/MotionEvent;)Z
+Landroid/view/View;->drawBackground(Landroid/graphics/Canvas;)V
+Landroid/view/View;->ensureTransformationInfo()V
+Landroid/view/View;->findViewByAccessibilityId(I)Landroid/view/View;
+Landroid/view/View;->fitsSystemWindows()Z
+Landroid/view/View;->gatherTransparentRegion(Landroid/graphics/Region;)Z
+Landroid/view/View;->getAccessibilityDelegate()Landroid/view/View$AccessibilityDelegate;
+Landroid/view/View;->getAccessibilityViewId()I
+Landroid/view/View;->getBoundsOnScreen(Landroid/graphics/Rect;)V
+Landroid/view/View;->getBoundsOnScreen(Landroid/graphics/Rect;Z)V
+Landroid/view/View;->getHorizontalScrollFactor()F
+Landroid/view/View;->getInverseMatrix()Landroid/graphics/Matrix;
+Landroid/view/View;->getIterableTextForAccessibility()Ljava/lang/CharSequence;
+Landroid/view/View;->getIteratorForGranularity(I)Landroid/view/AccessibilityIterators$TextSegmentIterator;
+Landroid/view/View;->getListenerInfo()Landroid/view/View$ListenerInfo;
+Landroid/view/View;->getLocationInSurface([I)V
+Landroid/view/View;->getLocationOnScreen()[I
+Landroid/view/View;->getRawTextAlignment()I
+Landroid/view/View;->getRawTextDirection()I
+Landroid/view/View;->getScrollCache()Landroid/view/View$ScrollabilityCache;
+Landroid/view/View;->getThreadedRenderer()Landroid/view/ThreadedRenderer;
+Landroid/view/View;->getTransitionAlpha()F
+Landroid/view/View;->getVerticalScrollFactor()F
+Landroid/view/View;->getViewRootImpl()Landroid/view/ViewRootImpl;
+Landroid/view/View;->getWindowDisplayFrame(Landroid/graphics/Rect;)V
+Landroid/view/View;->getWindowSession()Landroid/view/IWindowSession;
+Landroid/view/View;->hasIdentityMatrix()Z
+Landroid/view/View;->hasRtlSupport()Z
+Landroid/view/View;->hideTooltip()V
+Landroid/view/View;->includeForAccessibility()Z
+Landroid/view/View;->initializeFadingEdge(Landroid/content/res/TypedArray;)V
+Landroid/view/View;->initializeScrollbars(Landroid/content/res/TypedArray;)V
+Landroid/view/View;->initializeScrollbarsInternal(Landroid/content/res/TypedArray;)V
+Landroid/view/View;->internalSetPadding(IIII)V
+Landroid/view/View;->invalidate(Z)V
+Landroid/view/View;->invalidateParentCaches()V
+Landroid/view/View;->invalidateParentIfNeeded()V
+Landroid/view/View;->invalidateViewProperty(ZZ)V
+Landroid/view/View;->isDraggingScrollBar()Z
+Landroid/view/View;->isInScrollingContainer()Z
+Landroid/view/View;->isLayoutRtl()Z
+Landroid/view/View;->isOnScrollbarThumb(FF)Z
+Landroid/view/View;->isPaddingResolved()Z
+Landroid/view/View;->isRootNamespace()Z
+Landroid/view/View;->isVisibleToUser()Z
+Landroid/view/View;->isVisibleToUser(Landroid/graphics/Rect;)Z
+Landroid/view/View;->mAccessibilityDelegate:Landroid/view/View$AccessibilityDelegate;
+Landroid/view/View;->mAccessibilityViewId:I
+Landroid/view/View;->makeOptionalFitsSystemWindows()V
+Landroid/view/View;->mAnimator:Landroid/view/ViewPropertyAnimator;
+Landroid/view/View;->mAttachInfo:Landroid/view/View$AttachInfo;
+Landroid/view/View;->mBackground:Landroid/graphics/drawable/Drawable;
+Landroid/view/View;->mBackgroundResource:I
+Landroid/view/View;->mBottom:I
+Landroid/view/View;->mCachingFailed:Z
+Landroid/view/View;->mContext:Landroid/content/Context;
+Landroid/view/View;->mDrawingCache:Landroid/graphics/Bitmap;
+Landroid/view/View;->mHasPerformedLongPress:Z
+Landroid/view/View;->mKeyedTags:Landroid/util/SparseArray;
+Landroid/view/View;->mLayoutParams:Landroid/view/ViewGroup$LayoutParams;
+Landroid/view/View;->mLeft:I
+Landroid/view/View;->mListenerInfo:Landroid/view/View$ListenerInfo;
+Landroid/view/View;->mMeasuredHeight:I
+Landroid/view/View;->mMeasuredWidth:I
+Landroid/view/View;->mMinHeight:I
+Landroid/view/View;->mMinWidth:I
+Landroid/view/View;->mPaddingBottom:I
+Landroid/view/View;->mPaddingLeft:I
+Landroid/view/View;->mPaddingRight:I
+Landroid/view/View;->mPaddingTop:I
+Landroid/view/View;->mParent:Landroid/view/ViewParent;
+Landroid/view/View;->mPendingCheckForTap:Landroid/view/View$CheckForTap;
+Landroid/view/View;->mPrivateFlags2:I
+Landroid/view/View;->mPrivateFlags3:I
+Landroid/view/View;->mPrivateFlags:I
+Landroid/view/View;->mRecreateDisplayList:Z
+Landroid/view/View;->mRenderNode:Landroid/view/RenderNode;
+Landroid/view/View;->mResources:Landroid/content/res/Resources;
+Landroid/view/View;->mRight:I
+Landroid/view/View;->mScrollCache:Landroid/view/View$ScrollabilityCache;
+Landroid/view/View;->mScrollX:I
+Landroid/view/View;->mScrollY:I
+Landroid/view/View;->mStartActivityRequestWho:Ljava/lang/String;
+Landroid/view/View;->mTag:Ljava/lang/Object;
+Landroid/view/View;->mTop:I
+Landroid/view/View;->mTransformationInfo:Landroid/view/View$TransformationInfo;
+Landroid/view/View;->mUnscaledDrawingCache:Landroid/graphics/Bitmap;
+Landroid/view/View;->mVerticalScrollbarPosition:I
+Landroid/view/View;->mViewFlags:I
+Landroid/view/View;->NAVIGATION_BAR_TRANSIENT:I
+Landroid/view/View;->notifySubtreeAccessibilityStateChangedIfNeeded()V
+Landroid/view/View;->notifyViewAccessibilityStateChangedIfNeeded(I)V
+Landroid/view/View;->onCloseSystemDialogs(Ljava/lang/String;)V
+Landroid/view/View;->onDetachedFromWindowInternal()V
+Landroid/view/View;->onDrawHorizontalScrollBar(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIII)V
+Landroid/view/View;->onDrawVerticalScrollBar(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIII)V
+Landroid/view/View;->onFocusLost()V
+Landroid/view/View;->onInitializeAccessibilityEventInternal(Landroid/view/accessibility/AccessibilityEvent;)V
+Landroid/view/View;->performAccessibilityActionInternal(ILandroid/os/Bundle;)Z
+Landroid/view/View;->pointInView(FFF)Z
+Landroid/view/View;->recomputePadding()V
+Landroid/view/View;->removePerformClickCallback()V
+Landroid/view/View;->requestAccessibilityFocus()Z
+Landroid/view/View;->resetDisplayList()V
+Landroid/view/View;->resetPaddingToInitialValues()V
+Landroid/view/View;->resetResolvedDrawables()V
+Landroid/view/View;->resetResolvedLayoutDirection()V
+Landroid/view/View;->resetResolvedPadding()V
+Landroid/view/View;->resetResolvedTextAlignment()V
+Landroid/view/View;->resetResolvedTextDirection()V
+Landroid/view/View;->resetRtlProperties()V
+Landroid/view/View;->resolvePadding()V
+Landroid/view/View;->setAlphaNoInvalidation(F)Z
+Landroid/view/View;->setAnimationMatrix(Landroid/graphics/Matrix;)V
+Landroid/view/View;->setAssistBlocked(Z)V
+Landroid/view/View;->setDisabledSystemUiVisibility(I)V
+Landroid/view/View;->setFlags(II)V
+Landroid/view/View;->setFrame(IIII)Z
+Landroid/view/View;->setIsRootNamespace(Z)V
+Landroid/view/View;->setLeftTopRightBottom(IIII)V
+Landroid/view/View;->setTagInternal(ILjava/lang/Object;)V
+Landroid/view/View;->setTooltip(Ljava/lang/CharSequence;)V
+Landroid/view/View;->setTransitionAlpha(F)V
+Landroid/view/View;->startActivityForResult(Landroid/content/Intent;I)V
+Landroid/view/View;->STATUS_BAR_DISABLE_BACK:I
+Landroid/view/View;->STATUS_BAR_DISABLE_EXPAND:I
+Landroid/view/View;->STATUS_BAR_DISABLE_HOME:I
+Landroid/view/View;->STATUS_BAR_DISABLE_RECENT:I
+Landroid/view/View;->toGlobalMotionEvent(Landroid/view/MotionEvent;)Z
+Landroid/view/View;->toLocalMotionEvent(Landroid/view/MotionEvent;)Z
+Landroid/view/View;->transformMatrixToGlobal(Landroid/graphics/Matrix;)V
+Landroid/view/View;->transformMatrixToLocal(Landroid/graphics/Matrix;)V
+Landroid/view/View;->updateDisplayListIfDirty()Landroid/view/RenderNode;
+Landroid/view/ViewConfiguration;->getDeviceGlobalActionKeyTimeout()J
+Landroid/view/ViewConfiguration;->getDoubleTapMinTime()I
+Landroid/view/ViewConfiguration;->getDoubleTapSlop()I
+Landroid/view/ViewConfiguration;->getHoverTapSlop()I
+Landroid/view/ViewConfiguration;->getScaledDoubleTapTouchSlop()I
+Landroid/view/ViewConfiguration;->getScaledScrollFactor()I
+Landroid/view/ViewConfiguration;->isFadingMarqueeEnabled()Z
+Landroid/view/ViewConfiguration;->mFadingMarqueeEnabled:Z
+Landroid/view/ViewConfiguration;->sConfigurations:Landroid/util/SparseArray;
+Landroid/view/ViewConfiguration;->SCROLL_FRICTION:F
+Landroid/view/ViewConfiguration;->sHasPermanentMenuKey:Z
+Landroid/view/ViewConfiguration;->sHasPermanentMenuKeySet:Z
+Landroid/view/ViewDebug;->dispatchCommand(Landroid/view/View;Ljava/lang/String;Ljava/lang/String;Ljava/io/OutputStream;)V
+Landroid/view/ViewDebug;->dump(Landroid/view/View;ZZLjava/io/OutputStream;)V
+Landroid/view/ViewDebug;->getViewInstanceCount()J
+Landroid/view/ViewDebug;->getViewRootImplCount()J
+Landroid/view/ViewGroup$LayoutParams;-><init>()V
+Landroid/view/ViewGroup$MarginLayoutParams;->endMargin:I
+Landroid/view/ViewGroup$MarginLayoutParams;->setMarginsRelative(IIII)V
+Landroid/view/ViewGroup$MarginLayoutParams;->startMargin:I
+Landroid/view/ViewGroup$TouchTarget;->child:Landroid/view/View;
+Landroid/view/ViewGroup;->addTransientView(Landroid/view/View;I)V
+Landroid/view/ViewGroup;->cancelTouchTarget(Landroid/view/View;)V
+Landroid/view/ViewGroup;->DBG:Z
+Landroid/view/ViewGroup;->dispatchAttachedToWindow(Landroid/view/View$AttachInfo;I)V
+Landroid/view/ViewGroup;->dispatchDetachedFromWindow()V
+Landroid/view/ViewGroup;->dispatchGetDisplayList()V
+Landroid/view/ViewGroup;->dispatchViewAdded(Landroid/view/View;)V
+Landroid/view/ViewGroup;->dispatchViewRemoved(Landroid/view/View;)V
+Landroid/view/ViewGroup;->encodeProperties(Landroid/view/ViewHierarchyEncoder;)V
+Landroid/view/ViewGroup;->FLAG_DISALLOW_INTERCEPT:I
+Landroid/view/ViewGroup;->FLAG_SUPPORT_STATIC_TRANSFORMATIONS:I
+Landroid/view/ViewGroup;->FLAG_USE_CHILD_DRAWING_ORDER:I
+Landroid/view/ViewGroup;->getTransientView(I)Landroid/view/View;
+Landroid/view/ViewGroup;->getTransientViewCount()I
+Landroid/view/ViewGroup;->isTransformedTouchPointInView(FFLandroid/view/View;Landroid/graphics/PointF;)Z
+Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V
+Landroid/view/ViewGroup;->mChildren:[Landroid/view/View;
+Landroid/view/ViewGroup;->mChildrenCount:I
+Landroid/view/ViewGroup;->mDisappearingChildren:Ljava/util/ArrayList;
+Landroid/view/ViewGroup;->mFirstTouchTarget:Landroid/view/ViewGroup$TouchTarget;
+Landroid/view/ViewGroup;->mFocused:Landroid/view/View;
+Landroid/view/ViewGroup;->mGroupFlags:I
+Landroid/view/ViewGroup;->mOnHierarchyChangeListener:Landroid/view/ViewGroup$OnHierarchyChangeListener;
+Landroid/view/ViewGroup;->mPersistentDrawingCache:I
+Landroid/view/ViewGroup;->offsetChildrenTopAndBottom(I)V
+Landroid/view/ViewGroup;->onChildVisibilityChanged(Landroid/view/View;II)V
+Landroid/view/ViewGroup;->onInitializeAccessibilityNodeInfoInternal(Landroid/view/accessibility/AccessibilityNodeInfo;)V
+Landroid/view/ViewGroup;->removeTransientView(Landroid/view/View;)V
+Landroid/view/ViewGroup;->resetResolvedDrawables()V
+Landroid/view/ViewGroup;->resetResolvedLayoutDirection()V
+Landroid/view/ViewGroup;->resetResolvedPadding()V
+Landroid/view/ViewGroup;->resetResolvedTextAlignment()V
+Landroid/view/ViewGroup;->resetResolvedTextDirection()V
+Landroid/view/ViewGroup;->resolvePadding()V
+Landroid/view/ViewGroup;->suppressLayout(Z)V
+Landroid/view/ViewGroup;->transformPointToViewLocal([FLandroid/view/View;)V
+Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;F)V
+Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;I)V
+Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;Ljava/lang/String;)V
+Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;Z)V
+Landroid/view/ViewOverlay;->getOverlayView()Landroid/view/ViewGroup;
+Landroid/view/ViewOverlay;->isEmpty()Z
+Landroid/view/ViewPropertyAnimator;->mRTBackend:Landroid/view/ViewPropertyAnimatorRT;
+Landroid/view/ViewRootImpl$CalledFromWrongThreadException;-><init>(Ljava/lang/String;)V
+Landroid/view/ViewRootImpl;->addConfigCallback(Landroid/view/ViewRootImpl$ConfigChangedCallback;)V
+Landroid/view/ViewRootImpl;->cancelInvalidate(Landroid/view/View;)V
+Landroid/view/ViewRootImpl;->detachFunctor(J)V
+Landroid/view/ViewRootImpl;->dispatchInputEvent(Landroid/view/InputEvent;)V
+Landroid/view/ViewRootImpl;->dispatchInputEvent(Landroid/view/InputEvent;Landroid/view/InputEventReceiver;)V
+Landroid/view/ViewRootImpl;->dispatchKeyFromIme(Landroid/view/KeyEvent;)V
+Landroid/view/ViewRootImpl;->dispatchResized(Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;ZLandroid/util/MergedConfiguration;Landroid/graphics/Rect;ZZILandroid/view/DisplayCutout$ParcelableWrapper;)V
+Landroid/view/ViewRootImpl;->dispatchUnhandledInputEvent(Landroid/view/InputEvent;)V
+Landroid/view/ViewRootImpl;->enableHardwareAcceleration(Landroid/view/WindowManager$LayoutParams;)V
+Landroid/view/ViewRootImpl;->enqueueInputEvent(Landroid/view/InputEvent;)V
+Landroid/view/ViewRootImpl;->enqueueInputEvent(Landroid/view/InputEvent;Landroid/view/InputEventReceiver;IZ)V
+Landroid/view/ViewRootImpl;->ensureTouchMode(Z)Z
+Landroid/view/ViewRootImpl;->getAccessibilityFocusedHost()Landroid/view/View;
+Landroid/view/ViewRootImpl;->getAccessibilityFocusedVirtualView()Landroid/view/accessibility/AccessibilityNodeInfo;
+Landroid/view/ViewRootImpl;->getLastTouchPoint(Landroid/graphics/Point;)V
+Landroid/view/ViewRootImpl;->getView()Landroid/view/View;
+Landroid/view/ViewRootImpl;->getWindowFlags()I
+Landroid/view/ViewRootImpl;->invalidate()V
+Landroid/view/ViewRootImpl;->invokeFunctor(JZ)V
+Landroid/view/ViewRootImpl;->mAdded:Z
+Landroid/view/ViewRootImpl;->mAttachInfo:Landroid/view/View$AttachInfo;
+Landroid/view/ViewRootImpl;->mContext:Landroid/content/Context;
+Landroid/view/ViewRootImpl;->mDirty:Landroid/graphics/Rect;
+Landroid/view/ViewRootImpl;->mFallbackEventHandler:Landroid/view/FallbackEventHandler;
+Landroid/view/ViewRootImpl;->mHeight:I
+Landroid/view/ViewRootImpl;->mLastScrolledFocus:Ljava/lang/ref/WeakReference;
+Landroid/view/ViewRootImpl;->mStopped:Z
+Landroid/view/ViewRootImpl;->mSurface:Landroid/view/Surface;
+Landroid/view/ViewRootImpl;->mView:Landroid/view/View;
+Landroid/view/ViewRootImpl;->mWidth:I
+Landroid/view/ViewRootImpl;->mWindowSession:Landroid/view/IWindowSession;
+Landroid/view/ViewRootImpl;->scheduleTraversals()V
+Landroid/view/ViewRootImpl;->setLocalDragState(Ljava/lang/Object;)V
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;-><init>()V
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->contentInsets:Landroid/graphics/Rect;
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->mTouchableInsets:I
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->set(Landroid/view/ViewTreeObserver$InternalInsetsInfo;)V
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->setTouchableInsets(I)V
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->touchableRegion:Landroid/graphics/Region;
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->TOUCHABLE_INSETS_REGION:I
+Landroid/view/ViewTreeObserver$InternalInsetsInfo;->visibleInsets:Landroid/graphics/Rect;
+Landroid/view/ViewTreeObserver;->addOnComputeInternalInsetsListener(Landroid/view/ViewTreeObserver$OnComputeInternalInsetsListener;)V
+Landroid/view/ViewTreeObserver;->dispatchOnComputeInternalInsets(Landroid/view/ViewTreeObserver$InternalInsetsInfo;)V
+Landroid/view/ViewTreeObserver;->dispatchOnGlobalFocusChange(Landroid/view/View;Landroid/view/View;)V
+Landroid/view/ViewTreeObserver;->dispatchOnScrollChanged()V
+Landroid/view/ViewTreeObserver;->dispatchOnTouchModeChanged(Z)V
+Landroid/view/ViewTreeObserver;->hasComputeInternalInsetsListeners()Z
+Landroid/view/ViewTreeObserver;->mOnComputeInternalInsetsListeners:Landroid/view/ViewTreeObserver$CopyOnWriteArray;
+Landroid/view/ViewTreeObserver;->mOnGlobalLayoutListeners:Landroid/view/ViewTreeObserver$CopyOnWriteArray;
+Landroid/view/ViewTreeObserver;->mOnScrollChangedListeners:Landroid/view/ViewTreeObserver$CopyOnWriteArray;
+Landroid/view/ViewTreeObserver;->mOnTouchModeChangeListeners:Ljava/util/concurrent/CopyOnWriteArrayList;
+Landroid/view/ViewTreeObserver;->removeOnComputeInternalInsetsListener(Landroid/view/ViewTreeObserver$OnComputeInternalInsetsListener;)V
+Landroid/view/Window;->addPrivateFlags(I)V
+Landroid/view/Window;->alwaysReadCloseOnTouchAttr()V
+Landroid/view/Window;->isDestroyed()Z
+Landroid/view/Window;->mAppName:Ljava/lang/String;
+Landroid/view/Window;->mAppToken:Landroid/os/IBinder;
+Landroid/view/Window;->mCallback:Landroid/view/Window$Callback;
+Landroid/view/Window;->mContext:Landroid/content/Context;
+Landroid/view/Window;->mDestroyed:Z
+Landroid/view/Window;->mFeatures:I
+Landroid/view/Window;->mHardwareAccelerated:Z
+Landroid/view/Window;->mLocalFeatures:I
+Landroid/view/Window;->mWindowAttributes:Landroid/view/WindowManager$LayoutParams;
+Landroid/view/Window;->mWindowManager:Landroid/view/WindowManager;
+Landroid/view/Window;->mWindowStyle:Landroid/content/res/TypedArray;
+Landroid/view/Window;->setCloseOnTouchOutside(Z)V
+Landroid/view/Window;->setCloseOnTouchOutsideIfNotSet(Z)V
+Landroid/view/Window;->setNeedsMenuKey(I)V
+Landroid/view/Window;->shouldCloseOnTouch(Landroid/content/Context;Landroid/view/MotionEvent;)Z
+Landroid/view/WindowAnimationFrameStats;->init(J[J)V
+Landroid/view/WindowContentFrameStats;->init(J[J[J[J)V
+Landroid/view/WindowInsets;-><init>(Landroid/graphics/Rect;)V
+Landroid/view/WindowInsets;->CONSUMED:Landroid/view/WindowInsets;
+Landroid/view/WindowInsets;->getSystemWindowInsets()Landroid/graphics/Rect;
+Landroid/view/WindowInsets;->inset(IIII)Landroid/view/WindowInsets;
+Landroid/view/WindowLeaked;-><init>(Ljava/lang/String;)V
+Landroid/view/WindowManager$LayoutParams;->backup()V
+Landroid/view/WindowManager$LayoutParams;->FLAG_SLIPPERY:I
+Landroid/view/WindowManager$LayoutParams;->hasSystemUiListeners:Z
+Landroid/view/WindowManager$LayoutParams;->hideTimeoutMilliseconds:J
+Landroid/view/WindowManager$LayoutParams;->inputFeatures:I
+Landroid/view/WindowManager$LayoutParams;->INPUT_FEATURE_DISABLE_USER_ACTIVITY:I
+Landroid/view/WindowManager$LayoutParams;->needsMenuKey:I
+Landroid/view/WindowManager$LayoutParams;->NEEDS_MENU_SET_FALSE:I
+Landroid/view/WindowManager$LayoutParams;->NEEDS_MENU_SET_TRUE:I
+Landroid/view/WindowManager$LayoutParams;->PRIVATE_FLAG_SHOW_FOR_ALL_USERS:I
+Landroid/view/WindowManager$LayoutParams;->restore()V
+Landroid/view/WindowManager$LayoutParams;->subtreeSystemUiVisibility:I
+Landroid/view/WindowManager$LayoutParams;->TYPE_APPLICATION_MEDIA_OVERLAY:I
+Landroid/view/WindowManager$LayoutParams;->TYPE_DISPLAY_OVERLAY:I
+Landroid/view/WindowManager$LayoutParams;->TYPE_KEYGUARD:I
+Landroid/view/WindowManager$LayoutParams;->TYPE_SECURE_SYSTEM_OVERLAY:I
+Landroid/view/WindowManager$LayoutParams;->userActivityTimeout:J
+Landroid/view/WindowManagerGlobal;->getInstance()Landroid/view/WindowManagerGlobal;
+Landroid/view/WindowManagerGlobal;->getRootView(Ljava/lang/String;)Landroid/view/View;
+Landroid/view/WindowManagerGlobal;->getRootViews(Landroid/os/IBinder;)Ljava/util/ArrayList;
+Landroid/view/WindowManagerGlobal;->getViewRootNames()[Ljava/lang/String;
+Landroid/view/WindowManagerGlobal;->getWindowManagerService()Landroid/view/IWindowManager;
+Landroid/view/WindowManagerGlobal;->getWindowSession()Landroid/view/IWindowSession;
+Landroid/view/WindowManagerGlobal;->initialize()V
+Landroid/view/WindowManagerGlobal;->mLock:Ljava/lang/Object;
+Landroid/view/WindowManagerGlobal;->mParams:Ljava/util/ArrayList;
+Landroid/view/WindowManagerGlobal;->mRoots:Ljava/util/ArrayList;
+Landroid/view/WindowManagerGlobal;->mViews:Ljava/util/ArrayList;
+Landroid/view/WindowManagerGlobal;->peekWindowSession()Landroid/view/IWindowSession;
+Landroid/view/WindowManagerGlobal;->removeView(Landroid/view/View;Z)V
+Landroid/view/WindowManagerGlobal;->sDefaultWindowManager:Landroid/view/WindowManagerGlobal;
+Landroid/view/WindowManagerGlobal;->sWindowManagerService:Landroid/view/IWindowManager;
+Landroid/view/WindowManagerGlobal;->sWindowSession:Landroid/view/IWindowSession;
+Landroid/view/WindowManagerGlobal;->trimMemory(I)V
+Landroid/view/WindowManagerImpl;->mGlobal:Landroid/view/WindowManagerGlobal;
+Landroid/webkit/CacheManager$CacheResult;-><init>()V
+Landroid/webkit/CacheManager$CacheResult;->contentdisposition:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->contentLength:J
+Landroid/webkit/CacheManager$CacheResult;->crossDomain:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->encoding:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->etag:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->expires:J
+Landroid/webkit/CacheManager$CacheResult;->expiresString:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getContentDisposition()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getContentLength()J
+Landroid/webkit/CacheManager$CacheResult;->getEncoding()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getETag()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getExpires()J
+Landroid/webkit/CacheManager$CacheResult;->getExpiresString()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getHttpStatusCode()I
+Landroid/webkit/CacheManager$CacheResult;->getInputStream()Ljava/io/InputStream;
+Landroid/webkit/CacheManager$CacheResult;->getLastModified()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getLocalPath()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getLocation()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getMimeType()Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->getOutputStream()Ljava/io/OutputStream;
+Landroid/webkit/CacheManager$CacheResult;->httpStatusCode:I
+Landroid/webkit/CacheManager$CacheResult;->inStream:Ljava/io/InputStream;
+Landroid/webkit/CacheManager$CacheResult;->lastModified:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->localPath:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->location:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->mimeType:Ljava/lang/String;
+Landroid/webkit/CacheManager$CacheResult;->outFile:Ljava/io/File;
+Landroid/webkit/CacheManager$CacheResult;->outStream:Ljava/io/OutputStream;
+Landroid/webkit/CacheManager$CacheResult;->setEncoding(Ljava/lang/String;)V
+Landroid/webkit/CacheManager$CacheResult;->setInputStream(Ljava/io/InputStream;)V
+Landroid/webkit/CacheManager;->cacheDisabled()Z
+Landroid/webkit/CacheManager;->endCacheTransaction()Z
+Landroid/webkit/CacheManager;->getCacheFile(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/CacheManager$CacheResult;
+Landroid/webkit/CacheManager;->getCacheFileBaseDir()Ljava/io/File;
+Landroid/webkit/CacheManager;->saveCacheFile(Ljava/lang/String;JLandroid/webkit/CacheManager$CacheResult;)V
+Landroid/webkit/CacheManager;->saveCacheFile(Ljava/lang/String;Landroid/webkit/CacheManager$CacheResult;)V
+Landroid/webkit/CacheManager;->startCacheTransaction()Z
+Landroid/webkit/ConsoleMessage;->mLevel:Landroid/webkit/ConsoleMessage$MessageLevel;
+Landroid/webkit/ConsoleMessage;->mLineNumber:I
+Landroid/webkit/ConsoleMessage;->mMessage:Ljava/lang/String;
+Landroid/webkit/ConsoleMessage;->mSourceId:Ljava/lang/String;
+Landroid/webkit/IWebViewUpdateService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/webkit/IWebViewUpdateService$Stub$Proxy;->waitForAndGetProvider()Landroid/webkit/WebViewProviderResponse;
+Landroid/webkit/IWebViewUpdateService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/webkit/IWebViewUpdateService;
+Landroid/webkit/IWebViewUpdateService;->getCurrentWebViewPackageName()Ljava/lang/String;
+Landroid/webkit/IWebViewUpdateService;->getValidWebViewPackages()[Landroid/webkit/WebViewProviderInfo;
+Landroid/webkit/IWebViewUpdateService;->isFallbackPackage(Ljava/lang/String;)Z
+Landroid/webkit/JsResult;->mReceiver:Landroid/webkit/JsResult$ResultReceiver;
+Landroid/webkit/PluginData;-><init>(Ljava/io/InputStream;JLjava/util/Map;I)V
+Landroid/webkit/PluginData;->getContentLength()J
+Landroid/webkit/PluginData;->getHeaders()Ljava/util/Map;
+Landroid/webkit/PluginData;->getInputStream()Ljava/io/InputStream;
+Landroid/webkit/PluginData;->getStatusCode()I
+Landroid/webkit/UrlInterceptHandler;->getPluginData(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/PluginData;
+Landroid/webkit/UrlInterceptHandler;->service(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/CacheManager$CacheResult;
+Landroid/webkit/UrlInterceptRegistry;->getPluginData(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/PluginData;
+Landroid/webkit/UrlInterceptRegistry;->registerHandler(Landroid/webkit/UrlInterceptHandler;)Z
+Landroid/webkit/UrlInterceptRegistry;->setUrlInterceptDisabled(Z)V
+Landroid/webkit/UrlInterceptRegistry;->unregisterHandler(Landroid/webkit/UrlInterceptHandler;)Z
+Landroid/webkit/URLUtil;->isResourceUrl(Ljava/lang/String;)Z
+Landroid/webkit/URLUtil;->parseContentDisposition(Ljava/lang/String;)Ljava/lang/String;
+Landroid/webkit/URLUtil;->verifyURLEncoding(Ljava/lang/String;)Z
+Landroid/webkit/WebResourceResponse;->mImmutable:Z
+Landroid/webkit/WebResourceResponse;->mStatusCode:I
+Landroid/webkit/WebSettings$TextSize;->value:I
+Landroid/webkit/WebSettings;->getPluginsPath()Ljava/lang/String;
+Landroid/webkit/WebSettings;->getUseDoubleTree()Z
+Landroid/webkit/WebSettings;->setPluginsPath(Ljava/lang/String;)V
+Landroid/webkit/WebSettings;->setUseDoubleTree(Z)V
+Landroid/webkit/WebSyncManager;->mHandler:Landroid/os/Handler;
+Landroid/webkit/WebSyncManager;->syncFromRamToFlash()V
+Landroid/webkit/WebView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILjava/util/Map;Z)V
+Landroid/webkit/WebView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;ILjava/util/Map;Z)V
+Landroid/webkit/WebView;->checkThread()V
+Landroid/webkit/WebView;->debugDump()V
+Landroid/webkit/WebView;->disablePlatformNotifications()V
+Landroid/webkit/WebView;->emulateShiftHeld()V
+Landroid/webkit/WebView;->enablePlatformNotifications()V
+Landroid/webkit/WebView;->freeMemoryForTests()V
+Landroid/webkit/WebView;->getContentWidth()I
+Landroid/webkit/WebView;->getFactory()Landroid/webkit/WebViewFactoryProvider;
+Landroid/webkit/WebView;->getPluginList()Landroid/webkit/PluginList;
+Landroid/webkit/WebView;->getTouchIconUrl()Ljava/lang/String;
+Landroid/webkit/WebView;->getVisibleTitleHeight()I
+Landroid/webkit/WebView;->getZoomControls()Landroid/view/View;
+Landroid/webkit/WebView;->isPaused()Z
+Landroid/webkit/WebView;->mProvider:Landroid/webkit/WebViewProvider;
+Landroid/webkit/WebView;->mWebViewThread:Landroid/os/Looper;
+Landroid/webkit/WebView;->notifyFindDialogDismissed()V
+Landroid/webkit/WebView;->onDrawVerticalScrollBar(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIII)V
+Landroid/webkit/WebView;->refreshPlugins(Z)V
+Landroid/webkit/WebView;->restorePicture(Landroid/os/Bundle;Ljava/io/File;)Z
+Landroid/webkit/WebView;->savePicture(Landroid/os/Bundle;Ljava/io/File;)Z
+Landroid/webkit/WebView;->sEnforceThreadChecking:Z
+Landroid/webkit/WebView;->setFrame(IIII)Z
+Landroid/webkit/WebViewClient;->onUnhandledInputEvent(Landroid/webkit/WebView;Landroid/view/InputEvent;)V
+Landroid/webkit/WebViewDelegate;-><init>()V
+Landroid/webkit/WebViewFactory;->getProvider()Landroid/webkit/WebViewFactoryProvider;
+Landroid/webkit/WebViewFactory;->getProviderClass()Ljava/lang/Class;
+Landroid/webkit/WebViewFactory;->getUpdateService()Landroid/webkit/IWebViewUpdateService;
+Landroid/webkit/WebViewFactory;->getWebViewContextAndSetProvider()Landroid/content/Context;
+Landroid/webkit/WebViewFactory;->sPackageInfo:Landroid/content/pm/PackageInfo;
+Landroid/webkit/WebViewFactory;->sProviderInstance:Landroid/webkit/WebViewFactoryProvider;
+Landroid/webkit/WebViewProviderInfo;-><init>(Landroid/os/Parcel;)V
+Landroid/webkit/WebViewProviderResponse;->packageInfo:Landroid/content/pm/PackageInfo;
+Landroid/webkit/WebViewUpdateService;-><init>()V
+Landroid/widget/AbsListView$FlingRunnable;->endFling()V
+Landroid/widget/AbsListView$FlingRunnable;->mScroller:Landroid/widget/OverScroller;
+Landroid/widget/AbsListView$FlingRunnable;->start(I)V
+Landroid/widget/AbsListView$LayoutParams;->scrappedFromPosition:I
+Landroid/widget/AbsListView$LayoutParams;->viewType:I
+Landroid/widget/AbsListView$RecycleBin;->clear()V
+Landroid/widget/AbsListView$RecycleBin;->mRecyclerListener:Landroid/widget/AbsListView$RecyclerListener;
+Landroid/widget/AbsListView$SavedState;->firstId:J
+Landroid/widget/AbsListView$SavedState;->viewTop:I
+Landroid/widget/AbsListView;->canScrollDown()Z
+Landroid/widget/AbsListView;->canScrollUp()Z
+Landroid/widget/AbsListView;->findMotionRow(I)I
+Landroid/widget/AbsListView;->invokeOnItemScrollListener()V
+Landroid/widget/AbsListView;->isVerticalScrollBarHidden()Z
+Landroid/widget/AbsListView;->mActivePointerId:I
+Landroid/widget/AbsListView;->mAdapter:Landroid/widget/ListAdapter;
+Landroid/widget/AbsListView;->mChoiceActionMode:Landroid/view/ActionMode;
+Landroid/widget/AbsListView;->mContextMenuInfo:Landroid/view/ContextMenu$ContextMenuInfo;
+Landroid/widget/AbsListView;->mDataSetObserver:Landroid/widget/AbsListView$AdapterDataSetObserver;
+Landroid/widget/AbsListView;->mEdgeGlowBottom:Landroid/widget/EdgeEffect;
+Landroid/widget/AbsListView;->mEdgeGlowTop:Landroid/widget/EdgeEffect;
+Landroid/widget/AbsListView;->mFastScroll:Landroid/widget/FastScroller;
+Landroid/widget/AbsListView;->mFlingRunnable:Landroid/widget/AbsListView$FlingRunnable;
+Landroid/widget/AbsListView;->mIsChildViewEnabled:Z
+Landroid/widget/AbsListView;->mLayoutMode:I
+Landroid/widget/AbsListView;->mMaximumVelocity:I
+Landroid/widget/AbsListView;->mMotionPosition:I
+Landroid/widget/AbsListView;->mMotionY:I
+Landroid/widget/AbsListView;->mOnScrollListener:Landroid/widget/AbsListView$OnScrollListener;
+Landroid/widget/AbsListView;->mOverflingDistance:I
+Landroid/widget/AbsListView;->mOverscrollDistance:I
+Landroid/widget/AbsListView;->mPendingCheckForLongPress:Landroid/widget/AbsListView$CheckForLongPress;
+Landroid/widget/AbsListView;->mPendingCheckForTap:Landroid/widget/AbsListView$CheckForTap;
+Landroid/widget/AbsListView;->mPopup:Landroid/widget/PopupWindow;
+Landroid/widget/AbsListView;->mPositionScroller:Landroid/widget/AbsListView$AbsPositionScroller;
+Landroid/widget/AbsListView;->mRecycler:Landroid/widget/AbsListView$RecycleBin;
+Landroid/widget/AbsListView;->mSelectionBottomPadding:I
+Landroid/widget/AbsListView;->mSelectionTopPadding:I
+Landroid/widget/AbsListView;->mSelector:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AbsListView;->mSelectorPosition:I
+Landroid/widget/AbsListView;->mSelectorRect:Landroid/graphics/Rect;
+Landroid/widget/AbsListView;->mTouchMode:I
+Landroid/widget/AbsListView;->mTouchSlop:I
+Landroid/widget/AbsListView;->mVelocityTracker:Landroid/view/VelocityTracker;
+Landroid/widget/AbsListView;->performLongPress(Landroid/view/View;IJ)Z
+Landroid/widget/AbsListView;->performLongPress(Landroid/view/View;IJFF)Z
+Landroid/widget/AbsListView;->positionSelector(ILandroid/view/View;ZFF)V
+Landroid/widget/AbsListView;->reportScrollStateChange(I)V
+Landroid/widget/AbsListView;->resurrectSelectionIfNeeded()Z
+Landroid/widget/AbsListView;->smoothScrollBy(IIZZ)V
+Landroid/widget/AbsListView;->trackMotionScroll(II)Z
+Landroid/widget/AbsListView;->updateSelectorState()V
+Landroid/widget/AbsSeekBar;->mDisabledAlpha:F
+Landroid/widget/AbsSeekBar;->mIsDragging:Z
+Landroid/widget/AbsSeekBar;->mIsUserSeekable:Z
+Landroid/widget/AbsSeekBar;->mSplitTrack:Z
+Landroid/widget/AbsSeekBar;->mThumb:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AbsSeekBar;->mTouchProgressOffset:F
+Landroid/widget/AbsSeekBar;->trackTouchEvent(Landroid/view/MotionEvent;)V
+Landroid/widget/ActionMenuPresenter;->dismissPopupMenus()Z
+Landroid/widget/ActionMenuPresenter;->isOverflowMenuShowing()Z
+Landroid/widget/ActionMenuPresenter;->onRestoreInstanceState(Landroid/os/Parcelable;)V
+Landroid/widget/ActionMenuPresenter;->onSaveInstanceState()Landroid/os/Parcelable;
+Landroid/widget/ActionMenuView$ActionMenuChildView;->needsDividerBefore()Z
+Landroid/widget/ActionMenuView$LayoutParams;->cellsUsed:I
+Landroid/widget/ActionMenuView$LayoutParams;->expandable:Z
+Landroid/widget/ActionMenuView$LayoutParams;->expanded:Z
+Landroid/widget/ActionMenuView$LayoutParams;->extraPixels:I
+Landroid/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
+Landroid/widget/ActionMenuView$LayoutParams;->preventEdgeOffset:Z
+Landroid/widget/ActionMenuView;->hasDividerBeforeChildAt(I)Z
+Landroid/widget/ActionMenuView;->isOverflowMenuShowPending()Z
+Landroid/widget/ActionMenuView;->isOverflowReserved()Z
+Landroid/widget/ActionMenuView;->peekMenu()Lcom/android/internal/view/menu/MenuBuilder;
+Landroid/widget/ActionMenuView;->setExpandedActionViewsExclusive(Z)V
+Landroid/widget/ActionMenuView;->setMenuCallbacks(Lcom/android/internal/view/menu/MenuPresenter$Callback;Lcom/android/internal/view/menu/MenuBuilder$Callback;)V
+Landroid/widget/ActivityChooserModel;->chooseActivity(I)Landroid/content/Intent;
+Landroid/widget/ActivityChooserModel;->get(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/ActivityChooserModel;
+Landroid/widget/ActivityChooserModel;->getActivity(I)Landroid/content/pm/ResolveInfo;
+Landroid/widget/ActivityChooserModel;->getActivityCount()I
+Landroid/widget/ActivityChooserModel;->setIntent(Landroid/content/Intent;)V
+Landroid/widget/ActivityChooserModel;->setOnChooseActivityListener(Landroid/widget/ActivityChooserModel$OnChooseActivityListener;)V
+Landroid/widget/ActivityChooserView;->setExpandActivityOverflowButtonDrawable(Landroid/graphics/drawable/Drawable;)V
+Landroid/widget/AdapterView;->mDataChanged:Z
+Landroid/widget/AdapterView;->mFirstPosition:I
+Landroid/widget/AdapterView;->mNeedSync:Z
+Landroid/widget/AdapterView;->mNextSelectedPosition:I
+Landroid/widget/AdapterView;->mNextSelectedRowId:J
+Landroid/widget/AdapterView;->mOldSelectedPosition:I
+Landroid/widget/AdapterView;->mOnItemClickListener:Landroid/widget/AdapterView$OnItemClickListener;
+Landroid/widget/AdapterView;->mOnItemSelectedListener:Landroid/widget/AdapterView$OnItemSelectedListener;
+Landroid/widget/AdapterView;->mSelectedPosition:I
+Landroid/widget/AdapterView;->mSyncPosition:I
+Landroid/widget/AdapterView;->selectionChanged()V
+Landroid/widget/AdapterView;->setNextSelectedPositionInt(I)V
+Landroid/widget/AdapterView;->setSelectedPositionInt(I)V
+Landroid/widget/AnalogClock;->mDial:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AnalogClock;->mHourHand:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AnalogClock;->mMinuteHand:Landroid/graphics/drawable/Drawable;
+Landroid/widget/AppSecurityPermissions;-><init>(Landroid/content/Context;Ljava/lang/String;)V
+Landroid/widget/AppSecurityPermissions;->getPermissionCount()I
+Landroid/widget/AppSecurityPermissions;->getPermissionsView()Landroid/view/View;
+Landroid/widget/ArrayAdapter;->mLock:Ljava/lang/Object;
+Landroid/widget/ArrayAdapter;->mObjects:Ljava/util/List;
+Landroid/widget/ArrayAdapter;->mOriginalValues:Ljava/util/ArrayList;
+Landroid/widget/AutoCompleteTextView;->doAfterTextChanged()V
+Landroid/widget/AutoCompleteTextView;->doBeforeTextChanged()V
+Landroid/widget/AutoCompleteTextView;->ensureImeVisible(Z)V
+Landroid/widget/AutoCompleteTextView;->isInputMethodNotNeeded()Z
+Landroid/widget/AutoCompleteTextView;->mHintView:Landroid/widget/TextView;
+Landroid/widget/AutoCompleteTextView;->mObserver:Landroid/widget/AutoCompleteTextView$PopupDataSetObserver;
+Landroid/widget/AutoCompleteTextView;->mPassThroughClickListener:Landroid/widget/AutoCompleteTextView$PassThroughClickListener;
+Landroid/widget/AutoCompleteTextView;->mPopup:Landroid/widget/ListPopupWindow;
+Landroid/widget/AutoCompleteTextView;->setDropDownAlwaysVisible(Z)V
+Landroid/widget/AutoCompleteTextView;->setDropDownAnimationStyle(I)V
+Landroid/widget/AutoCompleteTextView;->setDropDownDismissedOnCompletion(Z)V
+Landroid/widget/AutoCompleteTextView;->setForceIgnoreOutsideTouch(Z)V
+Landroid/widget/AutoCompleteTextView;->showDropDownAfterLayout()V
+Landroid/widget/BaseAdapter;->mDataSetObservable:Landroid/database/DataSetObservable;
+Landroid/widget/CalendarView;->mDelegate:Landroid/widget/CalendarView$CalendarViewDelegate;
+Landroid/widget/CheckedTextView;->mCheckMarkDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/CheckedTextView;->mCheckMarkGravity:I
+Landroid/widget/CompoundButton;->mBroadcasting:Z
+Landroid/widget/CompoundButton;->mButtonDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/CompoundButton;->mOnCheckedChangeListener:Landroid/widget/CompoundButton$OnCheckedChangeListener;
+Landroid/widget/CursorAdapter;->mChangeObserver:Landroid/widget/CursorAdapter$ChangeObserver;
+Landroid/widget/CursorAdapter;->mContext:Landroid/content/Context;
+Landroid/widget/CursorAdapter;->mCursor:Landroid/database/Cursor;
+Landroid/widget/CursorAdapter;->mDataSetObserver:Landroid/database/DataSetObserver;
+Landroid/widget/CursorAdapter;->mDataValid:Z
+Landroid/widget/CursorAdapter;->mRowIDColumn:I
+Landroid/widget/DatePicker;->mDelegate:Landroid/widget/DatePicker$DatePickerDelegate;
+Landroid/widget/DatePicker;->setValidationCallback(Landroid/widget/DatePicker$ValidationCallback;)V
+Landroid/widget/DateTimeView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/widget/DateTimeView;->setTime(J)V
+Landroid/widget/DateTimeView;->update()V
+Landroid/widget/EdgeEffect;->mGlowScaleY:F
+Landroid/widget/EdgeEffect;->mPaint:Landroid/graphics/Paint;
+Landroid/widget/Editor$InputContentType;->privateImeOptions:Ljava/lang/String;
+Landroid/widget/Editor;->invalidateTextDisplayList()V
+Landroid/widget/Editor;->mCreatedWithASelection:Z
+Landroid/widget/Editor;->mInsertionControllerEnabled:Z
+Landroid/widget/Editor;->mSelectHandleCenter:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Editor;->mSelectHandleLeft:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Editor;->mSelectHandleRight:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Editor;->mSelectionControllerEnabled:Z
+Landroid/widget/Editor;->mShowCursor:J
+Landroid/widget/Editor;->mShowSoftInputOnFocus:Z
+Landroid/widget/ExpandableListView;->GROUP_STATE_SETS:[[I
+Landroid/widget/ExpandableListView;->mChildDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ExpandableListView;->mConnector:Landroid/widget/ExpandableListConnector;
+Landroid/widget/ExpandableListView;->mGroupIndicator:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ExpandableListView;->mIndicatorLeft:I
+Landroid/widget/ExpandableListView;->mIndicatorRight:I
+Landroid/widget/ExpandableListView;->mOnChildClickListener:Landroid/widget/ExpandableListView$OnChildClickListener;
+Landroid/widget/ExpandableListView;->mOnGroupClickListener:Landroid/widget/ExpandableListView$OnGroupClickListener;
+Landroid/widget/ExpandableListView;->mOnGroupCollapseListener:Landroid/widget/ExpandableListView$OnGroupCollapseListener;
+Landroid/widget/ExpandableListView;->mOnGroupExpandListener:Landroid/widget/ExpandableListView$OnGroupExpandListener;
+Landroid/widget/FastScroller;-><init>(Landroid/widget/AbsListView;I)V
+Landroid/widget/FastScroller;->mContainerRect:Landroid/graphics/Rect;
+Landroid/widget/FastScroller;->mHeaderCount:I
+Landroid/widget/FastScroller;->mLongList:Z
+Landroid/widget/FastScroller;->mMinimumTouchTarget:I
+Landroid/widget/FastScroller;->mThumbDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/FastScroller;->mThumbImage:Landroid/widget/ImageView;
+Landroid/widget/FastScroller;->mTrackDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/FastScroller;->mTrackImage:Landroid/widget/ImageView;
+Landroid/widget/FastScroller;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
+Landroid/widget/FastScroller;->onSizeChanged(IIII)V
+Landroid/widget/FastScroller;->onTouchEvent(Landroid/view/MotionEvent;)Z
+Landroid/widget/FastScroller;->remove()V
+Landroid/widget/FastScroller;->setState(I)V
+Landroid/widget/Filter;->setDelayer(Landroid/widget/Filter$Delayer;)V
+Landroid/widget/FrameLayout;->mForegroundPaddingBottom:I
+Landroid/widget/FrameLayout;->mForegroundPaddingLeft:I
+Landroid/widget/FrameLayout;->mForegroundPaddingRight:I
+Landroid/widget/FrameLayout;->mForegroundPaddingTop:I
+Landroid/widget/FrameLayout;->mMeasureAllChildren:Z
+Landroid/widget/Gallery$FlingRunnable;->startUsingVelocity(I)V
+Landroid/widget/Gallery;->fillToGalleryLeft()V
+Landroid/widget/Gallery;->fillToGalleryRight()V
+Landroid/widget/Gallery;->getCenterOfGallery()I
+Landroid/widget/Gallery;->getCenterOfView(Landroid/view/View;)I
+Landroid/widget/Gallery;->makeAndAddView(IIIZ)Landroid/view/View;
+Landroid/widget/Gallery;->mDownTouchPosition:I
+Landroid/widget/Gallery;->mDownTouchView:Landroid/view/View;
+Landroid/widget/Gallery;->mFlingRunnable:Landroid/widget/Gallery$FlingRunnable;
+Landroid/widget/Gallery;->mGestureDetector:Landroid/view/GestureDetector;
+Landroid/widget/Gallery;->moveDirection(I)Z
+Landroid/widget/Gallery;->mSelectedChild:Landroid/view/View;
+Landroid/widget/Gallery;->mSpacing:I
+Landroid/widget/Gallery;->trackMotionScroll(I)V
+Landroid/widget/GridLayout;->UNDEFINED_ALIGNMENT:Landroid/widget/GridLayout$Alignment;
+Landroid/widget/GridView;->fillDown(II)Landroid/view/View;
+Landroid/widget/GridView;->fillUp(II)Landroid/view/View;
+Landroid/widget/GridView;->mColumnWidth:I
+Landroid/widget/GridView;->mHorizontalSpacing:I
+Landroid/widget/GridView;->mNumColumns:I
+Landroid/widget/GridView;->mRequestedColumnWidth:I
+Landroid/widget/GridView;->mRequestedHorizontalSpacing:I
+Landroid/widget/GridView;->mRequestedNumColumns:I
+Landroid/widget/GridView;->mVerticalSpacing:I
+Landroid/widget/GridView;->sequenceScroll(I)Z
+Landroid/widget/HeaderViewListAdapter;->mAdapter:Landroid/widget/ListAdapter;
+Landroid/widget/HeaderViewListAdapter;->mFooterViewInfos:Ljava/util/ArrayList;
+Landroid/widget/HeaderViewListAdapter;->mHeaderViewInfos:Ljava/util/ArrayList;
+Landroid/widget/HorizontalScrollView;->mChildToScrollTo:Landroid/view/View;
+Landroid/widget/HorizontalScrollView;->mEdgeGlowLeft:Landroid/widget/EdgeEffect;
+Landroid/widget/HorizontalScrollView;->mEdgeGlowRight:Landroid/widget/EdgeEffect;
+Landroid/widget/HorizontalScrollView;->mIsBeingDragged:Z
+Landroid/widget/HorizontalScrollView;->mLastMotionX:I
+Landroid/widget/HorizontalScrollView;->mOverflingDistance:I
+Landroid/widget/HorizontalScrollView;->mOverscrollDistance:I
+Landroid/widget/HorizontalScrollView;->mScroller:Landroid/widget/OverScroller;
+Landroid/widget/HorizontalScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;
+Landroid/widget/HorizontalScrollView;->recycleVelocityTracker()V
+Landroid/widget/ImageView;->animateTransform(Landroid/graphics/Matrix;)V
+Landroid/widget/ImageView;->mAdjustViewBounds:Z
+Landroid/widget/ImageView;->mAlpha:I
+Landroid/widget/ImageView;->mCropToPadding:Z
+Landroid/widget/ImageView;->mDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ImageView;->mDrawableHeight:I
+Landroid/widget/ImageView;->mDrawableWidth:I
+Landroid/widget/ImageView;->mDrawMatrix:Landroid/graphics/Matrix;
+Landroid/widget/ImageView;->mMaxHeight:I
+Landroid/widget/ImageView;->mMaxWidth:I
+Landroid/widget/ImageView;->mRecycleableBitmapDrawable:Landroid/graphics/drawable/BitmapDrawable;
+Landroid/widget/ImageView;->mResource:I
+Landroid/widget/ImageView;->mUri:Landroid/net/Uri;
+Landroid/widget/ImageView;->resizeFromDrawable()V
+Landroid/widget/ImageView;->resolveUri()V
+Landroid/widget/ImageView;->scaleTypeToScaleToFit(Landroid/widget/ImageView$ScaleType;)Landroid/graphics/Matrix$ScaleToFit;
+Landroid/widget/ImageView;->setImageResourceAsync(I)Ljava/lang/Runnable;
+Landroid/widget/ImageView;->setImageURIAsync(Landroid/net/Uri;)Ljava/lang/Runnable;
+Landroid/widget/ImageView;->updateDrawable(Landroid/graphics/drawable/Drawable;)V
+Landroid/widget/LinearLayout$LayoutParams;->encodeProperties(Landroid/view/ViewHierarchyEncoder;)V
+Landroid/widget/LinearLayout;->INDEX_BOTTOM:I
+Landroid/widget/LinearLayout;->INDEX_TOP:I
+Landroid/widget/LinearLayout;->mDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/LinearLayout;->mGravity:I
+Landroid/widget/LinearLayout;->mMaxAscent:[I
+Landroid/widget/LinearLayout;->mMaxDescent:[I
+Landroid/widget/LinearLayout;->mTotalLength:I
+Landroid/widget/LinearLayout;->mUseLargestChild:Z
+Landroid/widget/ListPopupWindow;->buildDropDown()I
+Landroid/widget/ListPopupWindow;->isDropDownAlwaysVisible()Z
+Landroid/widget/ListPopupWindow;->mDropDownList:Landroid/widget/DropDownListView;
+Landroid/widget/ListPopupWindow;->mPopup:Landroid/widget/PopupWindow;
+Landroid/widget/ListPopupWindow;->setDropDownAlwaysVisible(Z)V
+Landroid/widget/ListPopupWindow;->setForceIgnoreOutsideTouch(Z)V
+Landroid/widget/ListPopupWindow;->setListItemExpandMax(I)V
+Landroid/widget/ListView;->arrowScroll(I)Z
+Landroid/widget/ListView;->correctTooHigh(I)V
+Landroid/widget/ListView;->correctTooLow(I)V
+Landroid/widget/ListView;->fillDown(II)Landroid/view/View;
+Landroid/widget/ListView;->fillSpecific(II)Landroid/view/View;
+Landroid/widget/ListView;->fillUp(II)Landroid/view/View;
+Landroid/widget/ListView;->findViewTraversal(I)Landroid/view/View;
+Landroid/widget/ListView;->findViewWithTagTraversal(Ljava/lang/Object;)Landroid/view/View;
+Landroid/widget/ListView;->getHeightForPosition(I)I
+Landroid/widget/ListView;->lookForSelectablePosition(IZ)I
+Landroid/widget/ListView;->makeAndAddView(IIZIZ)Landroid/view/View;
+Landroid/widget/ListView;->mAreAllItemsSelectable:Z
+Landroid/widget/ListView;->mDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ListView;->mDividerHeight:I
+Landroid/widget/ListView;->measureHeightOfChildren(IIIII)I
+Landroid/widget/ListView;->mFooterViewInfos:Ljava/util/ArrayList;
+Landroid/widget/ListView;->mHeaderViewInfos:Ljava/util/ArrayList;
+Landroid/widget/ListView;->scrollListItemsBy(I)V
+Landroid/widget/ListView;->setSelectionInt(I)V
+Landroid/widget/ListView;->trackMotionScroll(II)Z
+Landroid/widget/MediaController;->mAnchor:Landroid/view/View;
+Landroid/widget/MediaController;->mContext:Landroid/content/Context;
+Landroid/widget/MediaController;->mCurrentTime:Landroid/widget/TextView;
+Landroid/widget/MediaController;->mDecor:Landroid/view/View;
+Landroid/widget/MediaController;->mDecorLayoutParams:Landroid/view/WindowManager$LayoutParams;
+Landroid/widget/MediaController;->mEndTime:Landroid/widget/TextView;
+Landroid/widget/MediaController;->mFfwdButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mFfwdListener:Landroid/view/View$OnClickListener;
+Landroid/widget/MediaController;->mNextButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mPauseButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mPlayer:Landroid/widget/MediaController$MediaPlayerControl;
+Landroid/widget/MediaController;->mPrevButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mProgress:Landroid/widget/ProgressBar;
+Landroid/widget/MediaController;->mRewButton:Landroid/widget/ImageButton;
+Landroid/widget/MediaController;->mRewListener:Landroid/view/View$OnClickListener;
+Landroid/widget/MediaController;->mRoot:Landroid/view/View;
+Landroid/widget/MediaController;->mSeekListener:Landroid/widget/SeekBar$OnSeekBarChangeListener;
+Landroid/widget/MediaController;->mShowing:Z
+Landroid/widget/MediaController;->mWindow:Landroid/view/Window;
+Landroid/widget/MediaController;->mWindowManager:Landroid/view/WindowManager;
+Landroid/widget/MediaController;->updatePausePlay()V
+Landroid/widget/NumberPicker;->changeValueByOne(Z)V
+Landroid/widget/NumberPicker;->getTwoDigitFormatter()Landroid/widget/NumberPicker$Formatter;
+Landroid/widget/NumberPicker;->initializeSelectorWheelIndices()V
+Landroid/widget/NumberPicker;->mFlingScroller:Landroid/widget/Scroller;
+Landroid/widget/NumberPicker;->mInputText:Landroid/widget/EditText;
+Landroid/widget/NumberPicker;->mMaximumFlingVelocity:I
+Landroid/widget/NumberPicker;->mMaxValue:I
+Landroid/widget/NumberPicker;->mMinHeight:I
+Landroid/widget/NumberPicker;->mMinWidth:I
+Landroid/widget/NumberPicker;->mOnValueChangeListener:Landroid/widget/NumberPicker$OnValueChangeListener;
+Landroid/widget/NumberPicker;->mSelectionDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/NumberPicker;->mSelectionDividerHeight:I
+Landroid/widget/NumberPicker;->mSelectorIndices:[I
+Landroid/widget/NumberPicker;->mSelectorWheelPaint:Landroid/graphics/Paint;
+Landroid/widget/NumberPicker;->mTextSize:I
+Landroid/widget/NumberPicker;->SELECTOR_MIDDLE_ITEM_INDEX:I
+Landroid/widget/NumberPicker;->SELECTOR_WHEEL_ITEM_COUNT:I
+Landroid/widget/OverScroller$SplineOverScroller;->mCurrVelocity:F
+Landroid/widget/OverScroller;-><init>(Landroid/content/Context;Landroid/view/animation/Interpolator;Z)V
+Landroid/widget/OverScroller;->extendDuration(I)V
+Landroid/widget/OverScroller;->isScrollingInDirection(FF)Z
+Landroid/widget/OverScroller;->mInterpolator:Landroid/view/animation/Interpolator;
+Landroid/widget/OverScroller;->mScrollerY:Landroid/widget/OverScroller$SplineOverScroller;
+Landroid/widget/OverScroller;->setInterpolator(Landroid/view/animation/Interpolator;)V
+Landroid/widget/PopupMenu;->mContext:Landroid/content/Context;
+Landroid/widget/PopupMenu;->mPopup:Lcom/android/internal/view/menu/MenuPopupHelper;
+Landroid/widget/PopupWindow;->computeAnimationResource()I
+Landroid/widget/PopupWindow;->createPopupLayoutParams(Landroid/os/IBinder;)Landroid/view/WindowManager$LayoutParams;
+Landroid/widget/PopupWindow;->invokePopup(Landroid/view/WindowManager$LayoutParams;)V
+Landroid/widget/PopupWindow;->mAboveAnchor:Z
+Landroid/widget/PopupWindow;->mAboveAnchorBackgroundDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/PopupWindow;->mAnchor:Ljava/lang/ref/WeakReference;
+Landroid/widget/PopupWindow;->mAnimationStyle:I
+Landroid/widget/PopupWindow;->mBackgroundView:Landroid/view/View;
+Landroid/widget/PopupWindow;->mBelowAnchorBackgroundDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/PopupWindow;->mContentView:Landroid/view/View;
+Landroid/widget/PopupWindow;->mContext:Landroid/content/Context;
+Landroid/widget/PopupWindow;->mDecorView:Landroid/widget/PopupWindow$PopupDecorView;
+Landroid/widget/PopupWindow;->mHeightMode:I
+Landroid/widget/PopupWindow;->mIsDropdown:Z
+Landroid/widget/PopupWindow;->mIsShowing:Z
+Landroid/widget/PopupWindow;->mLastHeight:I
+Landroid/widget/PopupWindow;->mLastWidth:I
+Landroid/widget/PopupWindow;->mLayoutInScreen:Z
+Landroid/widget/PopupWindow;->mNotTouchModal:Z
+Landroid/widget/PopupWindow;->mOnDismissListener:Landroid/widget/PopupWindow$OnDismissListener;
+Landroid/widget/PopupWindow;->mOnScrollChangedListener:Landroid/view/ViewTreeObserver$OnScrollChangedListener;
+Landroid/widget/PopupWindow;->mOverlapAnchor:Z
+Landroid/widget/PopupWindow;->mTouchInterceptor:Landroid/view/View$OnTouchListener;
+Landroid/widget/PopupWindow;->mWidthMode:I
+Landroid/widget/PopupWindow;->mWindowLayoutType:I
+Landroid/widget/PopupWindow;->mWindowManager:Landroid/view/WindowManager;
+Landroid/widget/PopupWindow;->preparePopup(Landroid/view/WindowManager$LayoutParams;)V
+Landroid/widget/PopupWindow;->setAllowScrollingAnchorParent(Z)V
+Landroid/widget/PopupWindow;->setClipToScreenEnabled(Z)V
+Landroid/widget/PopupWindow;->setEpicenterBounds(Landroid/graphics/Rect;)V
+Landroid/widget/PopupWindow;->setLayoutInScreenEnabled(Z)V
+Landroid/widget/PopupWindow;->setLayoutInsetDecor(Z)V
+Landroid/widget/PopupWindow;->setTouchModal(Z)V
+Landroid/widget/PopupWindow;->showAtLocation(Landroid/os/IBinder;III)V
+Landroid/widget/PopupWindow;->updateAboveAnchor(Z)V
+Landroid/widget/ProgressBar;->mCurrentDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ProgressBar;->mDuration:I
+Landroid/widget/ProgressBar;->mIndeterminate:Z
+Landroid/widget/ProgressBar;->mMaxHeight:I
+Landroid/widget/ProgressBar;->mMinHeight:I
+Landroid/widget/ProgressBar;->mMinWidth:I
+Landroid/widget/ProgressBar;->mMirrorForRtl:Z
+Landroid/widget/ProgressBar;->mOnlyIndeterminate:Z
+Landroid/widget/ProgressBar;->refreshProgress(IIZZ)V
+Landroid/widget/ProgressBar;->setProgressInternal(IZZ)Z
+Landroid/widget/ProgressBar;->startAnimation()V
+Landroid/widget/ProgressBar;->stopAnimation()V
+Landroid/widget/ProgressBar;->tileify(Landroid/graphics/drawable/Drawable;Z)Landroid/graphics/drawable/Drawable;
+Landroid/widget/QuickContactBadge;->mOverlay:Landroid/graphics/drawable/Drawable;
+Landroid/widget/RadioGroup;->mChildOnCheckedChangeListener:Landroid/widget/CompoundButton$OnCheckedChangeListener;
+Landroid/widget/RadioGroup;->mOnCheckedChangeListener:Landroid/widget/RadioGroup$OnCheckedChangeListener;
+Landroid/widget/RatingBar;->mOnRatingBarChangeListener:Landroid/widget/RatingBar$OnRatingBarChangeListener;
+Landroid/widget/RelativeLayout$DependencyGraph$Node;-><init>()V
+Landroid/widget/RelativeLayout$LayoutParams;->mBottom:I
+Landroid/widget/RelativeLayout$LayoutParams;->mLeft:I
+Landroid/widget/RelativeLayout$LayoutParams;->mRight:I
+Landroid/widget/RelativeLayout$LayoutParams;->mTop:I
+Landroid/widget/RelativeLayout;->mGravity:I
+Landroid/widget/RemoteViews$Action;->mergeBehavior()I
+Landroid/widget/RemoteViews$Action;->viewId:I
+Landroid/widget/RemoteViews$BitmapCache;->mBitmaps:Ljava/util/ArrayList;
+Landroid/widget/RemoteViews$BitmapReflectionAction;->bitmap:Landroid/graphics/Bitmap;
+Landroid/widget/RemoteViews$BitmapReflectionAction;->methodName:Ljava/lang/String;
+Landroid/widget/RemoteViews$OnClickHandler;-><init>()V
+Landroid/widget/RemoteViews$OnClickHandler;->onClickHandler(Landroid/view/View;Landroid/app/PendingIntent;Landroid/content/Intent;)Z
+Landroid/widget/RemoteViews$ReflectionAction;->methodName:Ljava/lang/String;
+Landroid/widget/RemoteViews$ReflectionAction;->value:Ljava/lang/Object;
+Landroid/widget/RemoteViews$SetOnClickPendingIntent;->pendingIntent:Landroid/app/PendingIntent;
+Landroid/widget/RemoteViews$SetPendingIntentTemplate;->pendingIntentTemplate:Landroid/app/PendingIntent;
+Landroid/widget/RemoteViews$ViewGroupActionAdd;->mNestedViews:Landroid/widget/RemoteViews;
+Landroid/widget/RemoteViews;->addView(ILandroid/widget/RemoteViews;I)V
+Landroid/widget/RemoteViews;->estimateMemoryUsage()I
+Landroid/widget/RemoteViews;->mActions:Ljava/util/ArrayList;
+Landroid/widget/RemoteViews;->mApplication:Landroid/content/pm/ApplicationInfo;
+Landroid/widget/RemoteViews;->mBitmapCache:Landroid/widget/RemoteViews$BitmapCache;
+Landroid/widget/RemoteViews;->mergeRemoteViews(Landroid/widget/RemoteViews;)V
+Landroid/widget/RemoteViews;->mLayoutId:I
+Landroid/widget/RemoteViews;->mPortrait:Landroid/widget/RemoteViews;
+Landroid/widget/RemoteViews;->setIsWidgetCollectionChild(Z)V
+Landroid/widget/RemoteViews;->setRemoteAdapter(ILjava/util/ArrayList;I)V
+Landroid/widget/RemoteViewsAdapter;->getRemoteViewsServiceIntent()Landroid/content/Intent;
+Landroid/widget/RemoteViewsAdapter;->isDataReady()Z
+Landroid/widget/RemoteViewsAdapter;->mCache:Landroid/widget/RemoteViewsAdapter$FixedSizeRemoteViewsCache;
+Landroid/widget/RemoteViewsAdapter;->mWorkerThread:Landroid/os/HandlerThread;
+Landroid/widget/RemoteViewsAdapter;->saveRemoteViewsCache()V
+Landroid/widget/RemoteViewsAdapter;->setRemoteViewsOnClickHandler(Landroid/widget/RemoteViews$OnClickHandler;)V
+Landroid/widget/RemoteViewsAdapter;->setVisibleRangeHint(II)V
+Landroid/widget/ScrollBarDrawable;->mVerticalThumb:Landroid/graphics/drawable/Drawable;
+Landroid/widget/ScrollBarDrawable;->setHorizontalThumbDrawable(Landroid/graphics/drawable/Drawable;)V
+Landroid/widget/ScrollBarDrawable;->setVerticalThumbDrawable(Landroid/graphics/drawable/Drawable;)V
+Landroid/widget/Scroller;->DECELERATION_RATE:F
+Landroid/widget/Scroller;->INFLEXION:F
+Landroid/widget/Scroller;->mDeceleration:F
+Landroid/widget/Scroller;->mDuration:I
+Landroid/widget/Scroller;->mInterpolator:Landroid/view/animation/Interpolator;
+Landroid/widget/Scroller;->mPhysicalCoeff:F
+Landroid/widget/ScrollView;->canScroll()Z
+Landroid/widget/ScrollView;->endDrag()V
+Landroid/widget/ScrollView;->mChildToScrollTo:Landroid/view/View;
+Landroid/widget/ScrollView;->mEdgeGlowBottom:Landroid/widget/EdgeEffect;
+Landroid/widget/ScrollView;->mEdgeGlowTop:Landroid/widget/EdgeEffect;
+Landroid/widget/ScrollView;->mFlingStrictSpan:Landroid/os/StrictMode$Span;
+Landroid/widget/ScrollView;->mIsBeingDragged:Z
+Landroid/widget/ScrollView;->mLastMotionY:I
+Landroid/widget/ScrollView;->mLastScroll:J
+Landroid/widget/ScrollView;->mMinimumVelocity:I
+Landroid/widget/ScrollView;->mOverflingDistance:I
+Landroid/widget/ScrollView;->mOverscrollDistance:I
+Landroid/widget/ScrollView;->mScroller:Landroid/widget/OverScroller;
+Landroid/widget/ScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;
+Landroid/widget/SearchView$SearchAutoComplete;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Landroid/widget/SearchView;->mClearingFocus:Z
+Landroid/widget/SearchView;->mCloseButton:Landroid/widget/ImageView;
+Landroid/widget/SearchView;->mCollapsedImeOptions:I
+Landroid/widget/SearchView;->mExpandedInActionView:Z
+Landroid/widget/SearchView;->mIconified:Z
+Landroid/widget/SearchView;->mIconifiedByDefault:Z
+Landroid/widget/SearchView;->mOnClickListener:Landroid/view/View$OnClickListener;
+Landroid/widget/SearchView;->mOnItemClickListener:Landroid/widget/AdapterView$OnItemClickListener;
+Landroid/widget/SearchView;->mOnQueryChangeListener:Landroid/widget/SearchView$OnQueryTextListener;
+Landroid/widget/SearchView;->mSearchButton:Landroid/widget/ImageView;
+Landroid/widget/SearchView;->mSearchEditFrame:Landroid/view/View;
+Landroid/widget/SearchView;->mSearchHintIcon:Landroid/graphics/drawable/Drawable;
+Landroid/widget/SearchView;->mSearchPlate:Landroid/view/View;
+Landroid/widget/SearchView;->mSearchSrcTextView:Landroid/widget/SearchView$SearchAutoComplete;
+Landroid/widget/SearchView;->mSubmitArea:Landroid/view/View;
+Landroid/widget/SearchView;->mSuggestionsAdapter:Landroid/widget/CursorAdapter;
+Landroid/widget/SearchView;->mUserQuery:Ljava/lang/CharSequence;
+Landroid/widget/SearchView;->mVoiceButton:Landroid/widget/ImageView;
+Landroid/widget/SearchView;->mVoiceButtonEnabled:Z
+Landroid/widget/SearchView;->onCloseClicked()V
+Landroid/widget/SearchView;->setQuery(Ljava/lang/CharSequence;)V
+Landroid/widget/SearchView;->updateSubmitArea()V
+Landroid/widget/SearchView;->updateSubmitButton(Z)V
+Landroid/widget/SearchView;->updateViewsVisibility(Z)V
+Landroid/widget/SeekBar;->mOnSeekBarChangeListener:Landroid/widget/SeekBar$OnSeekBarChangeListener;
+Landroid/widget/SeekBar;->onProgressRefresh(FZI)V
+Landroid/widget/SimpleAdapter;->mData:Ljava/util/List;
+Landroid/widget/SimpleCursorAdapter;->mFrom:[I
+Landroid/widget/SimpleCursorAdapter;->mTo:[I
+Landroid/widget/SlidingDrawer;->mTopOffset:I
+Landroid/widget/SlidingDrawer;->mTouchDelta:I
+Landroid/widget/SlidingDrawer;->mTracking:Z
+Landroid/widget/SlidingDrawer;->mVelocityTracker:Landroid/view/VelocityTracker;
+Landroid/widget/SlidingDrawer;->prepareContent()V
+Landroid/widget/SlidingDrawer;->prepareTracking(I)V
+Landroid/widget/Spinner$DialogPopup;->isShowing()Z
+Landroid/widget/Spinner$SpinnerPopup;->isShowing()Z
+Landroid/widget/Spinner;->mForwardingListener:Landroid/widget/ForwardingListener;
+Landroid/widget/Spinner;->mPopup:Landroid/widget/Spinner$SpinnerPopup;
+Landroid/widget/Spinner;->setOnItemClickListenerInt(Landroid/widget/AdapterView$OnItemClickListener;)V
+Landroid/widget/Switch;->cancelPositionAnimator()V
+Landroid/widget/Switch;->mOffLayout:Landroid/text/Layout;
+Landroid/widget/Switch;->mOnLayout:Landroid/text/Layout;
+Landroid/widget/Switch;->mSwitchHeight:I
+Landroid/widget/Switch;->mSwitchMinWidth:I
+Landroid/widget/Switch;->mSwitchWidth:I
+Landroid/widget/Switch;->mThumbDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Switch;->mThumbWidth:I
+Landroid/widget/Switch;->mTrackDrawable:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Switch;->setThumbPosition(F)V
+Landroid/widget/TabHost$IntentContentStrategy;->getContentView()Landroid/view/View;
+Landroid/widget/TabHost$IntentContentStrategy;->tabClosed()V
+Landroid/widget/TabHost$TabSpec;->mContentStrategy:Landroid/widget/TabHost$ContentStrategy;
+Landroid/widget/TabHost$TabSpec;->mIndicatorStrategy:Landroid/widget/TabHost$IndicatorStrategy;
+Landroid/widget/TabHost;->mCurrentTab:I
+Landroid/widget/TabHost;->mOnTabChangeListener:Landroid/widget/TabHost$OnTabChangeListener;
+Landroid/widget/TabHost;->mTabSpecs:Ljava/util/List;
+Landroid/widget/TabWidget;->mDrawBottomStrips:Z
+Landroid/widget/TabWidget;->mSelectedTab:I
+Landroid/widget/TabWidget;->setTabSelectionListener(Landroid/widget/TabWidget$OnTabSelectionChanged;)V
+Landroid/widget/TextClock;->getFormat()Ljava/lang/CharSequence;
+Landroid/widget/TextClock;->onTimeChanged()V
+Landroid/widget/TextView$SavedState;->text:Ljava/lang/CharSequence;
+Landroid/widget/TextView;->assumeLayout()V
+Landroid/widget/TextView;->bringTextIntoView()Z
+Landroid/widget/TextView;->checkForRelayout()V
+Landroid/widget/TextView;->compressText(F)Z
+Landroid/widget/TextView;->createEditorIfNeeded()V
+Landroid/widget/TextView;->deleteText_internal(II)V
+Landroid/widget/TextView;->getHintLayout()Landroid/text/Layout;
+Landroid/widget/TextView;->getHorizontallyScrolling()Z
+Landroid/widget/TextView;->getIterableTextForAccessibility()Ljava/lang/CharSequence;
+Landroid/widget/TextView;->getLayoutAlignment()Landroid/text/Layout$Alignment;
+Landroid/widget/TextView;->getLineAtCoordinate(F)I
+Landroid/widget/TextView;->getTextColor(Landroid/content/Context;Landroid/content/res/TypedArray;I)I
+Landroid/widget/TextView;->getTextColors(Landroid/content/Context;Landroid/content/res/TypedArray;)Landroid/content/res/ColorStateList;
+Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic;
+Landroid/widget/TextView;->getTextForAccessibility()Ljava/lang/CharSequence;
+Landroid/widget/TextView;->getTextServicesLocale(Z)Ljava/util/Locale;
+Landroid/widget/TextView;->getUpdatedHighlightPath()Landroid/graphics/Path;
+Landroid/widget/TextView;->getVerticalOffset(Z)I
+Landroid/widget/TextView;->isSingleLine()Z
+Landroid/widget/TextView;->isTextEditable()Z
+Landroid/widget/TextView;->LINES:I
+Landroid/widget/TextView;->makeNewLayout(IILandroid/text/BoringLayout$Metrics;Landroid/text/BoringLayout$Metrics;IZ)V
+Landroid/widget/TextView;->mAllowTransformationLengthChange:Z
+Landroid/widget/TextView;->mBoring:Landroid/text/BoringLayout$Metrics;
+Landroid/widget/TextView;->mBufferType:Landroid/widget/TextView$BufferType;
+Landroid/widget/TextView;->mChangeWatcher:Landroid/widget/TextView$ChangeWatcher;
+Landroid/widget/TextView;->mCharWrapper:Landroid/widget/TextView$CharWrapper;
+Landroid/widget/TextView;->mCurHintTextColor:I
+Landroid/widget/TextView;->mCursorDrawableRes:I
+Landroid/widget/TextView;->mCurTextColor:I
+Landroid/widget/TextView;->mDesiredHeightAtMeasure:I
+Landroid/widget/TextView;->mDrawables:Landroid/widget/TextView$Drawables;
+Landroid/widget/TextView;->mEditableFactory:Landroid/text/Editable$Factory;
+Landroid/widget/TextView;->mEditor:Landroid/widget/Editor;
+Landroid/widget/TextView;->mGravity:I
+Landroid/widget/TextView;->mHighlightColor:I
+Landroid/widget/TextView;->mHighlightPaint:Landroid/graphics/Paint;
+Landroid/widget/TextView;->mHighlightPathBogus:Z
+Landroid/widget/TextView;->mHintBoring:Landroid/text/BoringLayout$Metrics;
+Landroid/widget/TextView;->mHintLayout:Landroid/text/Layout;
+Landroid/widget/TextView;->mHorizontallyScrolling:Z
+Landroid/widget/TextView;->mIncludePad:Z
+Landroid/widget/TextView;->mLayout:Landroid/text/Layout;
+Landroid/widget/TextView;->mListeners:Ljava/util/ArrayList;
+Landroid/widget/TextView;->mMarquee:Landroid/widget/TextView$Marquee;
+Landroid/widget/TextView;->mMarqueeFadeMode:I
+Landroid/widget/TextView;->mMaximum:I
+Landroid/widget/TextView;->mMaxMode:I
+Landroid/widget/TextView;->mMaxWidth:I
+Landroid/widget/TextView;->mMaxWidthMode:I
+Landroid/widget/TextView;->mMinimum:I
+Landroid/widget/TextView;->mMinWidth:I
+Landroid/widget/TextView;->mMinWidthMode:I
+Landroid/widget/TextView;->mOldMaximum:I
+Landroid/widget/TextView;->mOldMaxMode:I
+Landroid/widget/TextView;->mRestartMarquee:Z
+Landroid/widget/TextView;->mSavedHintLayout:Landroid/text/BoringLayout;
+Landroid/widget/TextView;->mSavedLayout:Landroid/text/BoringLayout;
+Landroid/widget/TextView;->mSavedMarqueeModeLayout:Landroid/text/Layout;
+Landroid/widget/TextView;->mShadowDx:F
+Landroid/widget/TextView;->mShadowDy:F
+Landroid/widget/TextView;->mShadowRadius:F
+Landroid/widget/TextView;->mSingleLine:Z
+Landroid/widget/TextView;->mSpacingAdd:F
+Landroid/widget/TextView;->mSpacingMult:F
+Landroid/widget/TextView;->mSpannableFactory:Landroid/text/Spannable$Factory;
+Landroid/widget/TextView;->mText:Ljava/lang/CharSequence;
+Landroid/widget/TextView;->mTextDir:Landroid/text/TextDirectionHeuristic;
+Landroid/widget/TextView;->mTextPaint:Landroid/text/TextPaint;
+Landroid/widget/TextView;->mTextSelectHandleLeftRes:I
+Landroid/widget/TextView;->mTextSelectHandleRes:I
+Landroid/widget/TextView;->mTextSelectHandleRightRes:I
+Landroid/widget/TextView;->mTransformed:Ljava/lang/CharSequence;
+Landroid/widget/TextView;->mUserSetTextScaleX:Z
+Landroid/widget/TextView;->nullLayouts()V
+Landroid/widget/TextView;->setInputType(IZ)V
+Landroid/widget/TextView;->setRawTextSize(FZ)V
+Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;ZI)V
+Landroid/widget/TextView;->startMarquee()V
+Landroid/widget/TextView;->startStopMarquee(Z)V
+Landroid/widget/TextView;->stopTextActionMode()V
+Landroid/widget/TextView;->viewportToContentVerticalOffset()I
+Landroid/widget/TimePicker;->mDelegate:Landroid/widget/TimePicker$TimePickerDelegate;
+Landroid/widget/Toast$TN;->handleHide()V
+Landroid/widget/Toast$TN;->mGravity:I
+Landroid/widget/Toast$TN;->mNextView:Landroid/view/View;
+Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
+Landroid/widget/Toast$TN;->mView:Landroid/view/View;
+Landroid/widget/Toast$TN;->mY:I
+Landroid/widget/Toast$TN;->show(Landroid/os/IBinder;)V
+Landroid/widget/Toast;->getService()Landroid/app/INotificationManager;
+Landroid/widget/Toast;->getWindowParams()Landroid/view/WindowManager$LayoutParams;
+Landroid/widget/Toast;->mDuration:I
+Landroid/widget/Toast;->mTN:Landroid/widget/Toast$TN;
+Landroid/widget/Toast;->sService:Landroid/app/INotificationManager;
+Landroid/widget/Toolbar;->mNavButtonView:Landroid/widget/ImageButton;
+Landroid/widget/Toolbar;->mTitleMarginBottom:I
+Landroid/widget/Toolbar;->mTitleMarginEnd:I
+Landroid/widget/Toolbar;->mTitleMarginStart:I
+Landroid/widget/Toolbar;->mTitleMarginTop:I
+Landroid/widget/Toolbar;->mTitleTextView:Landroid/widget/TextView;
+Landroid/widget/VideoView2$OnViewTypeChangedListener;->onViewTypeChanged(Landroid/view/View;I)V
+Landroid/widget/VideoView2;->getMediaController()Landroid/media/session/MediaController;
+Landroid/widget/VideoView2;->setOnViewTypeChangedListener(Landroid/widget/VideoView2$OnViewTypeChangedListener;)V
+Landroid/widget/VideoView2;->setVideoPath(Ljava/lang/String;)V
+Landroid/widget/VideoView;->mCurrentBufferPercentage:I
+Landroid/widget/VideoView;->mCurrentState:I
+Landroid/widget/VideoView;->mErrorListener:Landroid/media/MediaPlayer$OnErrorListener;
+Landroid/widget/VideoView;->mHeaders:Ljava/util/Map;
+Landroid/widget/VideoView;->mMediaController:Landroid/widget/MediaController;
+Landroid/widget/VideoView;->mMediaPlayer:Landroid/media/MediaPlayer;
+Landroid/widget/VideoView;->mPreparedListener:Landroid/media/MediaPlayer$OnPreparedListener;
+Landroid/widget/VideoView;->mSHCallback:Landroid/view/SurfaceHolder$Callback;
+Landroid/widget/VideoView;->mSurfaceHolder:Landroid/view/SurfaceHolder;
+Landroid/widget/VideoView;->mTargetState:I
+Landroid/widget/VideoView;->mUri:Landroid/net/Uri;
+Landroid/widget/VideoView;->mVideoHeight:I
+Landroid/widget/VideoView;->mVideoWidth:I
+Landroid/widget/VideoView;->release(Z)V
+Landroid/widget/VideoView;->STATE_IDLE:I
+Landroid/widget/ViewAnimator;->mFirstTime:Z
+Landroid/widget/ViewAnimator;->mWhichChild:I
+Landroid/widget/ViewAnimator;->showOnly(IZ)V
+Landroid/widget/ViewFlipper;->mUserPresent:Z
+Landroid/widget/ViewFlipper;->updateRunning(Z)V
+Landroid/widget/ZoomControls;->mZoomIn:Landroid/widget/ZoomButton;
+Landroid/widget/ZoomControls;->mZoomOut:Landroid/widget/ZoomButton;
+Lcom/android/i18n/phonenumbers/Phonemetadata$NumberFormat;->serialVersionUID:J
+Lcom/android/i18n/phonenumbers/Phonemetadata$PhoneMetadata;->serialVersionUID:J
+Lcom/android/i18n/phonenumbers/Phonemetadata$PhoneMetadataCollection;->serialVersionUID:J
+Lcom/android/i18n/phonenumbers/Phonemetadata$PhoneNumberDesc;->serialVersionUID:J
+Lcom/android/i18n/phonenumbers/Phonenumber$PhoneNumber;->serialVersionUID:J
+Lcom/android/ims/ImsConfigListener$Stub;-><init>()V
+Lcom/android/ims/ImsConfigListener;->onSetFeatureResponse(IIII)V
+Lcom/android/ims/internal/IImsCallSession$Stub;-><init>()V
+Lcom/android/ims/internal/IImsCallSession$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/ims/internal/IImsCallSession;
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionConferenceStateUpdated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsConferenceState;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHandover(Lcom/android/ims/internal/IImsCallSession;IILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHandoverFailed(Lcom/android/ims/internal/IImsCallSession;IILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHeld(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHoldFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHoldReceived(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionInviteParticipantsRequestDelivered(Lcom/android/ims/internal/IImsCallSession;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionInviteParticipantsRequestFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMergeComplete(Lcom/android/ims/internal/IImsCallSession;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMergeFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMergeStarted(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMultipartyStateChanged(Lcom/android/ims/internal/IImsCallSession;Z)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionProgressing(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsStreamMediaProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionResumed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionResumeFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionResumeReceived(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionStarted(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionStartFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionSuppServiceReceived(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsSuppServiceNotification;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionTerminated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionTtyModeReceived(Lcom/android/ims/internal/IImsCallSession;I)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionUpdated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsConfig$Stub;-><init>()V
+Lcom/android/ims/internal/IImsEcbm$Stub;-><init>()V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationAssociatedUriChanged([Landroid/net/Uri;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationChangeFailed(ILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationConnected()V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationConnectedWithRadioTech(I)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationDisconnected(Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationFeatureCapabilityChanged(I[I[I)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationProgressingWithRadioTech(I)V
+Lcom/android/ims/internal/IImsRegistrationListener;->voiceMessageCountUpdate(I)V
+Lcom/android/ims/internal/IImsService$Stub;-><init>()V
+Lcom/android/ims/internal/IImsService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/ims/internal/IImsService;
+Lcom/android/ims/internal/IImsUt$Stub;-><init>()V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationCallBarringQueried(Lcom/android/ims/internal/IImsUt;I[Landroid/telephony/ims/ImsSsInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationCallForwardQueried(Lcom/android/ims/internal/IImsUt;I[Landroid/telephony/ims/ImsCallForwardInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationCallWaitingQueried(Lcom/android/ims/internal/IImsUt;I[Landroid/telephony/ims/ImsSsInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationQueried(Lcom/android/ims/internal/IImsUt;ILandroid/os/Bundle;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationQueryFailed(Lcom/android/ims/internal/IImsUt;ILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationUpdated(Lcom/android/ims/internal/IImsUt;I)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationUpdateFailed(Lcom/android/ims/internal/IImsUt;ILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->changeCallDataUsage(J)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->changeCameraCapabilities(Landroid/telecom/VideoProfile$CameraCapabilities;)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->changePeerDimensions(II)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->changeVideoQuality(I)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->handleCallSessionEvent(I)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->receiveSessionModifyRequest(Landroid/telecom/VideoProfile;)V
+Lcom/android/ims/internal/IImsVideoCallCallback;->receiveSessionModifyResponse(ILandroid/telecom/VideoProfile;Landroid/telecom/VideoProfile;)V
+Lcom/android/ims/internal/IImsVideoCallProvider$Stub;-><init>()V
+Lcom/android/ims/internal/IImsVideoCallProvider;->setCallback(Lcom/android/ims/internal/IImsVideoCallCallback;)V
+Lcom/android/ims/internal/uce/common/CapInfo;-><init>()V
+Lcom/android/ims/internal/uce/common/CapInfo;->getCapTimestamp()J
+Lcom/android/ims/internal/uce/common/CapInfo;->isCdViaPresenceSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFtHttpSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFtSnFSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFtSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFtThumbSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFullSnFGroupChatSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isGeoPullFtSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isGeoPullSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isGeoPushSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isImSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isIpVideoSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isIpVoiceSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isIsSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isRcsIpVideoCallSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isRcsIpVideoOnlyCallSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isRcsIpVoiceCallSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isSmSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isSpSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isVsDuringCSSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isVsSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->setCapTimestamp(J)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setCdViaPresenceSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setExts([Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFtHttpSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFtSnFSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFtSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFtThumbSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setFullSnFGroupChatSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setGeoPullFtSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setGeoPullSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setGeoPushSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setImSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setIpVideoSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setIpVoiceSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setIsSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setRcsIpVideoCallSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setRcsIpVideoOnlyCallSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setRcsIpVoiceCallSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setSmSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setSpSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setVsDuringCSSupported(Z)V
+Lcom/android/ims/internal/uce/common/CapInfo;->setVsSupported(Z)V
+Lcom/android/ims/internal/uce/common/StatusCode;-><init>()V
+Lcom/android/ims/internal/uce/common/StatusCode;->getStatusCode()I
+Lcom/android/ims/internal/uce/common/StatusCode;->setStatusCode(I)V
+Lcom/android/ims/internal/uce/common/UceLong;-><init>()V
+Lcom/android/ims/internal/uce/common/UceLong;->getClientId()I
+Lcom/android/ims/internal/uce/common/UceLong;->getUceLong()J
+Lcom/android/ims/internal/uce/common/UceLong;->setClientId(I)V
+Lcom/android/ims/internal/uce/common/UceLong;->setUceLong(J)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->cmdStatus(Lcom/android/ims/internal/uce/options/OptionsCmdStatus;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->getVersionCb(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->incomingOptions(Ljava/lang/String;Lcom/android/ims/internal/uce/options/OptionsCapInfo;I)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->serviceAvailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->serviceUnavailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->sipResponseReceived(Ljava/lang/String;Lcom/android/ims/internal/uce/options/OptionsSipResponse;Lcom/android/ims/internal/uce/options/OptionsCapInfo;)V
+Lcom/android/ims/internal/uce/options/IOptionsService$Stub;-><init>()V
+Lcom/android/ims/internal/uce/options/IOptionsService;->addListener(ILcom/android/ims/internal/uce/options/IOptionsListener;Lcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getContactCap(ILjava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getContactListCap(I[Ljava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getMyInfo(II)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getVersion(I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->removeListener(ILcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->responseIncomingOptions(IIILjava/lang/String;Lcom/android/ims/internal/uce/options/OptionsCapInfo;Z)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->setMyInfo(ILcom/android/ims/internal/uce/common/CapInfo;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;-><init>()V
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;->getCapInfo()Lcom/android/ims/internal/uce/common/CapInfo;
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;->getSdp()Ljava/lang/String;
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;->setCapInfo(Lcom/android/ims/internal/uce/common/CapInfo;)V
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;->setSdp(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/options/OptionsCmdId;-><init>()V
+Lcom/android/ims/internal/uce/options/OptionsCmdId;->setCmdId(I)V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;-><init>()V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;->setCapInfo(Lcom/android/ims/internal/uce/common/CapInfo;)V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;->setCmdId(Lcom/android/ims/internal/uce/options/OptionsCmdId;)V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;->setStatus(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;->setUserData(I)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;-><init>()V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setCmdId(Lcom/android/ims/internal/uce/options/OptionsCmdId;)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setReasonPhrase(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setRequestId(I)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setRetryAfter(I)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setSipResponseCode(I)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->capInfoReceived(Ljava/lang/String;[Lcom/android/ims/internal/uce/presence/PresTupleInfo;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->cmdStatus(Lcom/android/ims/internal/uce/presence/PresCmdStatus;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->getVersionCb(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->listCapInfoReceived(Lcom/android/ims/internal/uce/presence/PresRlmiInfo;[Lcom/android/ims/internal/uce/presence/PresResInfo;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->publishTriggering(Lcom/android/ims/internal/uce/presence/PresPublishTriggerType;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->serviceAvailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->serviceUnAvailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->sipResponseReceived(Lcom/android/ims/internal/uce/presence/PresSipResponse;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->unpublishMessageSent()V
+Lcom/android/ims/internal/uce/presence/IPresenceService$Stub;-><init>()V
+Lcom/android/ims/internal/uce/presence/IPresenceService;->addListener(ILcom/android/ims/internal/uce/presence/IPresenceListener;Lcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->getContactCap(ILjava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->getContactListCap(I[Ljava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->getVersion(I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->publishMyCap(ILcom/android/ims/internal/uce/presence/PresCapInfo;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->reenableService(II)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->removeListener(ILcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->setNewFeatureTag(ILjava/lang/String;Lcom/android/ims/internal/uce/presence/PresServiceInfo;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/PresCapInfo;->getCapInfo()Lcom/android/ims/internal/uce/common/CapInfo;
+Lcom/android/ims/internal/uce/presence/PresCapInfo;->getContactUri()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresCapInfo;->mContactUri:Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresCmdId;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresCmdId;->setCmdId(I)V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;->setCmdId(Lcom/android/ims/internal/uce/presence/PresCmdId;)V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;->setRequestId(I)V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;->setStatus(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/presence/PresCmdStatus;->setUserData(I)V
+Lcom/android/ims/internal/uce/presence/PresPublishTriggerType;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresPublishTriggerType;->setPublishTrigeerType(I)V
+Lcom/android/ims/internal/uce/presence/PresResInfo;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresResInfo;->setDisplayName(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInfo;->setInstanceInfo(Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;)V
+Lcom/android/ims/internal/uce/presence/PresResInfo;->setResUri(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setPresentityUri(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setReason(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setResId(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setResInstanceState(I)V
+Lcom/android/ims/internal/uce/presence/PresResInstanceInfo;->setTupleInfo([Lcom/android/ims/internal/uce/presence/PresTupleInfo;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setFullState(Z)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setListName(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setPresSubscriptionState(Lcom/android/ims/internal/uce/presence/PresSubscriptionState;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setRequestId(I)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setSubscriptionExpireTime(I)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setSubscriptionTerminatedReason(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setUri(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresRlmiInfo;->setVersion(I)V
+Lcom/android/ims/internal/uce/presence/PresServiceInfo;->getMediaType()I
+Lcom/android/ims/internal/uce/presence/PresServiceInfo;->getServiceDesc()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresServiceInfo;->getServiceId()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresServiceInfo;->getServiceVer()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresSipResponse;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getCmdId()Lcom/android/ims/internal/uce/presence/PresCmdId;
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getReasonPhrase()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getRequestId()I
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getRetryAfter()I
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getSipResponseCode()I
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setCmdId(Lcom/android/ims/internal/uce/presence/PresCmdId;)V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setReasonPhrase(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setRequestId(I)V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setRetryAfter(I)V
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->setSipResponseCode(I)V
+Lcom/android/ims/internal/uce/presence/PresSubscriptionState;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresSubscriptionState;->setPresSubscriptionState(I)V
+Lcom/android/ims/internal/uce/presence/PresTupleInfo;-><init>()V
+Lcom/android/ims/internal/uce/presence/PresTupleInfo;->setContactUri(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresTupleInfo;->setFeatureTag(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/PresTupleInfo;->setTimestamp(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/uceservice/IUceListener$Stub;-><init>()V
+Lcom/android/ims/internal/uce/uceservice/IUceListener;->setStatus(I)V
+Lcom/android/ims/internal/uce/uceservice/IUceService$Stub;-><init>()V
+Lcom/android/ims/internal/uce/uceservice/IUceService;->createOptionsService(Lcom/android/ims/internal/uce/options/IOptionsListener;Lcom/android/ims/internal/uce/common/UceLong;)I
+Lcom/android/ims/internal/uce/uceservice/IUceService;->createPresenceService(Lcom/android/ims/internal/uce/presence/IPresenceListener;Lcom/android/ims/internal/uce/common/UceLong;)I
+Lcom/android/ims/internal/uce/uceservice/IUceService;->destroyOptionsService(I)V
+Lcom/android/ims/internal/uce/uceservice/IUceService;->destroyPresenceService(I)V
+Lcom/android/ims/internal/uce/uceservice/IUceService;->getOptionsService()Lcom/android/ims/internal/uce/options/IOptionsService;
+Lcom/android/ims/internal/uce/uceservice/IUceService;->getPresenceService()Lcom/android/ims/internal/uce/presence/IPresenceService;
+Lcom/android/ims/internal/uce/uceservice/IUceService;->getServiceStatus()Z
+Lcom/android/ims/internal/uce/uceservice/IUceService;->isServiceStarted()Z
+Lcom/android/ims/internal/uce/uceservice/IUceService;->startService(Lcom/android/ims/internal/uce/uceservice/IUceListener;)Z
+Lcom/android/ims/internal/uce/uceservice/IUceService;->stopService()Z
+Lcom/android/internal/app/AlertController$AlertParams;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/app/AlertController$AlertParams;->apply(Lcom/android/internal/app/AlertController;)V
+Lcom/android/internal/app/AlertController$AlertParams;->mAdapter:Landroid/widget/ListAdapter;
+Lcom/android/internal/app/AlertController$AlertParams;->mCancelable:Z
+Lcom/android/internal/app/AlertController$AlertParams;->mCheckedItem:I
+Lcom/android/internal/app/AlertController$AlertParams;->mCheckedItems:[Z
+Lcom/android/internal/app/AlertController$AlertParams;->mContext:Landroid/content/Context;
+Lcom/android/internal/app/AlertController$AlertParams;->mCursor:Landroid/database/Cursor;
+Lcom/android/internal/app/AlertController$AlertParams;->mCustomTitleView:Landroid/view/View;
+Lcom/android/internal/app/AlertController$AlertParams;->mIcon:Landroid/graphics/drawable/Drawable;
+Lcom/android/internal/app/AlertController$AlertParams;->mIconId:I
+Lcom/android/internal/app/AlertController$AlertParams;->mInflater:Landroid/view/LayoutInflater;
+Lcom/android/internal/app/AlertController$AlertParams;->mIsCheckedColumn:Ljava/lang/String;
+Lcom/android/internal/app/AlertController$AlertParams;->mIsMultiChoice:Z
+Lcom/android/internal/app/AlertController$AlertParams;->mIsSingleChoice:Z
+Lcom/android/internal/app/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mLabelColumn:Ljava/lang/String;
+Lcom/android/internal/app/AlertController$AlertParams;->mMessage:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mNegativeButtonListener:Landroid/content/DialogInterface$OnClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mNegativeButtonText:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mNeutralButtonListener:Landroid/content/DialogInterface$OnClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mNeutralButtonText:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnCancelListener:Landroid/content/DialogInterface$OnCancelListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnCheckboxClickListener:Landroid/content/DialogInterface$OnMultiChoiceClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnItemSelectedListener:Landroid/widget/AdapterView$OnItemSelectedListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mPositiveButtonListener:Landroid/content/DialogInterface$OnClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mPositiveButtonText:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mTitle:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mView:Landroid/view/View;
+Lcom/android/internal/app/AlertController$RecycleListView;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/app/AlertController$RecycleListView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Lcom/android/internal/app/AlertController;-><init>(Landroid/content/Context;Landroid/content/DialogInterface;Landroid/view/Window;)V
+Lcom/android/internal/app/AlertController;->getButton(I)Landroid/widget/Button;
+Lcom/android/internal/app/AlertController;->getListView()Landroid/widget/ListView;
+Lcom/android/internal/app/AlertController;->installContent()V
+Lcom/android/internal/app/AlertController;->mCustomTitleView:Landroid/view/View;
+Lcom/android/internal/app/AlertController;->mForceInverseBackground:Z
+Lcom/android/internal/app/AlertController;->mTitle:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController;->mView:Landroid/view/View;
+Lcom/android/internal/app/AlertController;->onKeyDown(ILandroid/view/KeyEvent;)Z
+Lcom/android/internal/app/AlertController;->onKeyUp(ILandroid/view/KeyEvent;)Z
+Lcom/android/internal/app/AlertController;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;Landroid/os/Message;)V
+Lcom/android/internal/app/AlertController;->setCustomTitle(Landroid/view/View;)V
+Lcom/android/internal/app/AlertController;->setIcon(I)V
+Lcom/android/internal/app/AlertController;->setIcon(Landroid/graphics/drawable/Drawable;)V
+Lcom/android/internal/app/AlertController;->setMessage(Ljava/lang/CharSequence;)V
+Lcom/android/internal/app/AlertController;->setTitle(Ljava/lang/CharSequence;)V
+Lcom/android/internal/app/AlertController;->setView(Landroid/view/View;)V
+Lcom/android/internal/app/IAppOpsService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/app/IAppOpsService$Stub$Proxy;->checkOperation(IILjava/lang/String;)I
+Lcom/android/internal/app/IAppOpsService$Stub$Proxy;->setMode(IILjava/lang/String;I)V
+Lcom/android/internal/app/IAppOpsService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IAppOpsService;
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_checkAudioOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_checkOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_checkPackage:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_finishOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_getOpsForPackage:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_getPackagesForOps:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_noteOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_noteProxyOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_removeUser:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_resetAllModes:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setAudioRestriction:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setMode:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setUidMode:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setUserRestriction:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_setUserRestrictions:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_startOperation:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_startWatchingMode:I
+Lcom/android/internal/app/IAppOpsService$Stub;->TRANSACTION_stopWatchingMode:I
+Lcom/android/internal/app/IAppOpsService;->finishOperation(Landroid/os/IBinder;IILjava/lang/String;)V
+Lcom/android/internal/app/IAppOpsService;->getOpsForPackage(ILjava/lang/String;[I)Ljava/util/List;
+Lcom/android/internal/app/IAppOpsService;->getPackagesForOps([I)Ljava/util/List;
+Lcom/android/internal/app/IAppOpsService;->resetAllModes(ILjava/lang/String;)V
+Lcom/android/internal/app/IAppOpsService;->setMode(IILjava/lang/String;I)V
+Lcom/android/internal/app/IBatteryStats$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/app/IBatteryStats$Stub;-><init>()V
+Lcom/android/internal/app/IBatteryStats$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IBatteryStats;
+Lcom/android/internal/app/IBatteryStats;->computeChargeTimeRemaining()J
+Lcom/android/internal/app/IBatteryStats;->getAwakeTimeBattery()J
+Lcom/android/internal/app/IBatteryStats;->getStatistics()[B
+Lcom/android/internal/app/IBatteryStats;->isCharging()Z
+Lcom/android/internal/app/IBatteryStats;->noteFullWifiLockAcquired(I)V
+Lcom/android/internal/app/IBatteryStats;->noteFullWifiLockReleased(I)V
+Lcom/android/internal/app/IBatteryStats;->notePhoneDataConnectionState(IZ)V
+Lcom/android/internal/app/IBatteryStats;->notePhoneOff()V
+Lcom/android/internal/app/IBatteryStats;->notePhoneOn()V
+Lcom/android/internal/app/IBatteryStats;->notePhoneSignalStrength(Landroid/telephony/SignalStrength;)V
+Lcom/android/internal/app/IBatteryStats;->notePhoneState(I)V
+Lcom/android/internal/app/IBatteryStats;->noteScreenBrightness(I)V
+Lcom/android/internal/app/IBatteryStats;->noteStartSensor(II)V
+Lcom/android/internal/app/IBatteryStats;->noteStopSensor(II)V
+Lcom/android/internal/app/IBatteryStats;->noteUserActivity(II)V
+Lcom/android/internal/app/IBatteryStats;->noteWifiMulticastDisabled(I)V
+Lcom/android/internal/app/IBatteryStats;->noteWifiMulticastEnabled(I)V
+Lcom/android/internal/app/IMediaContainerService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IMediaContainerService;
+Lcom/android/internal/app/IVoiceInteractionManagerService$Stub$Proxy;->showSessionFromSession(Landroid/os/IBinder;Landroid/os/Bundle;I)Z
+Lcom/android/internal/app/IVoiceInteractionManagerService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IVoiceInteractionManagerService;
+Lcom/android/internal/app/IVoiceInteractionManagerService;->getKeyphraseSoundModel(ILjava/lang/String;)Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseSoundModel;
+Lcom/android/internal/appwidget/IAppWidgetHost;->providerChanged(ILandroid/appwidget/AppWidgetProviderInfo;)V
+Lcom/android/internal/appwidget/IAppWidgetHost;->updateAppWidget(ILandroid/widget/RemoteViews;)V
+Lcom/android/internal/appwidget/IAppWidgetService$Stub;-><init>()V
+Lcom/android/internal/appwidget/IAppWidgetService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/appwidget/IAppWidgetService;
+Lcom/android/internal/appwidget/IAppWidgetService$Stub;->TRANSACTION_bindAppWidgetId:I
+Lcom/android/internal/appwidget/IAppWidgetService;->bindAppWidgetId(Ljava/lang/String;IILandroid/content/ComponentName;Landroid/os/Bundle;)Z
+Lcom/android/internal/appwidget/IAppWidgetService;->bindRemoteViewsService(Ljava/lang/String;ILandroid/content/Intent;Landroid/app/IApplicationThread;Landroid/os/IBinder;Landroid/app/IServiceConnection;I)Z
+Lcom/android/internal/appwidget/IAppWidgetService;->getAppWidgetIds(Landroid/content/ComponentName;)[I
+Lcom/android/internal/backup/IBackupTransport$Stub;-><init>()V
+Lcom/android/internal/backup/IBackupTransport$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/backup/IBackupTransport;
+Lcom/android/internal/backup/IBackupTransport;->clearBackupData(Landroid/content/pm/PackageInfo;)I
+Lcom/android/internal/backup/IBackupTransport;->finishBackup()I
+Lcom/android/internal/backup/IBackupTransport;->finishRestore()V
+Lcom/android/internal/backup/IBackupTransport;->getRestoreData(Landroid/os/ParcelFileDescriptor;)I
+Lcom/android/internal/backup/IBackupTransport;->initializeDevice()I
+Lcom/android/internal/backup/IBackupTransport;->requestBackupTime()J
+Lcom/android/internal/backup/IBackupTransport;->startRestore(J[Landroid/content/pm/PackageInfo;)I
+Lcom/android/internal/backup/IBackupTransport;->transportDirName()Ljava/lang/String;
+Lcom/android/internal/content/PackageMonitor;-><init>()V
+Lcom/android/internal/content/PackageMonitor;->isPackageDisappearing(Ljava/lang/String;)I
+Lcom/android/internal/content/PackageMonitor;->isPackageModified(Ljava/lang/String;)Z
+Lcom/android/internal/content/PackageMonitor;->onPackageChanged(Ljava/lang/String;I[Ljava/lang/String;)Z
+Lcom/android/internal/content/PackageMonitor;->onPackageRemoved(Ljava/lang/String;I)V
+Lcom/android/internal/content/PackageMonitor;->register(Landroid/content/Context;Landroid/os/Looper;Landroid/os/UserHandle;Z)V
+Lcom/android/internal/content/PackageMonitor;->register(Landroid/content/Context;Landroid/os/Looper;Z)V
+Lcom/android/internal/content/PackageMonitor;->unregister()V
+Lcom/android/internal/content/ReferrerIntent;-><init>(Landroid/content/Intent;Ljava/lang/String;)V
+Lcom/android/internal/content/ReferrerIntent;->mReferrer:Ljava/lang/String;
+Lcom/android/internal/location/ILocationProvider$Stub;-><init>()V
+Lcom/android/internal/location/ILocationProvider$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/location/ILocationProvider;
+Lcom/android/internal/location/ILocationProvider;->disable()V
+Lcom/android/internal/location/ILocationProvider;->enable()V
+Lcom/android/internal/location/ILocationProvider;->getProperties()Lcom/android/internal/location/ProviderProperties;
+Lcom/android/internal/location/ILocationProvider;->getStatus(Landroid/os/Bundle;)I
+Lcom/android/internal/location/ILocationProvider;->getStatusUpdateTime()J
+Lcom/android/internal/location/ILocationProvider;->sendExtraCommand(Ljava/lang/String;Landroid/os/Bundle;)Z
+Lcom/android/internal/location/ILocationProvider;->setRequest(Lcom/android/internal/location/ProviderRequest;Landroid/os/WorkSource;)V
+Lcom/android/internal/location/ProviderRequest;-><init>()V
+Lcom/android/internal/location/ProviderRequest;->interval:J
+Lcom/android/internal/location/ProviderRequest;->locationRequests:Ljava/util/List;
+Lcom/android/internal/location/ProviderRequest;->reportLocation:Z
+Lcom/android/internal/logging/MetricsLogger;-><init>()V
+Lcom/android/internal/logging/MetricsLogger;->write(Landroid/metrics/LogMaker;)V
+Lcom/android/internal/net/LegacyVpnInfo;-><init>()V
+Lcom/android/internal/net/LegacyVpnInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Lcom/android/internal/net/LegacyVpnInfo;->key:Ljava/lang/String;
+Lcom/android/internal/net/LegacyVpnInfo;->state:I
+Lcom/android/internal/net/VpnConfig;-><init>()V
+Lcom/android/internal/net/VpnProfile;-><init>(Landroid/os/Parcel;)V
+Lcom/android/internal/net/VpnProfile;->decode(Ljava/lang/String;[B)Lcom/android/internal/net/VpnProfile;
+Lcom/android/internal/net/VpnProfile;->key:Ljava/lang/String;
+Lcom/android/internal/net/VpnProfile;->name:Ljava/lang/String;
+Lcom/android/internal/net/VpnProfile;->saveLogin:Z
+Lcom/android/internal/net/VpnProfile;->server:Ljava/lang/String;
+Lcom/android/internal/net/VpnProfile;->type:I
+Lcom/android/internal/net/VpnProfile;->username:Ljava/lang/String;
+Lcom/android/internal/os/AtomicFile;-><init>(Ljava/io/File;)V
+Lcom/android/internal/os/AtomicFile;->failWrite(Ljava/io/FileOutputStream;)V
+Lcom/android/internal/os/AtomicFile;->finishWrite(Ljava/io/FileOutputStream;)V
+Lcom/android/internal/os/AtomicFile;->getBaseFile()Ljava/io/File;
+Lcom/android/internal/os/AtomicFile;->openAppend()Ljava/io/FileOutputStream;
+Lcom/android/internal/os/AtomicFile;->openRead()Ljava/io/FileInputStream;
+Lcom/android/internal/os/AtomicFile;->readFully()[B
+Lcom/android/internal/os/AtomicFile;->startWrite()Ljava/io/FileOutputStream;
+Lcom/android/internal/os/AtomicFile;->truncate()V
+Lcom/android/internal/os/BatterySipper$DrainType;->APP:Lcom/android/internal/os/BatterySipper$DrainType;
+Lcom/android/internal/os/BatterySipper$DrainType;->values()[Lcom/android/internal/os/BatterySipper$DrainType;
+Lcom/android/internal/os/BatterySipper;-><init>(Lcom/android/internal/os/BatterySipper$DrainType;Landroid/os/BatteryStats$Uid;D)V
+Lcom/android/internal/os/BatterySipper;->add(Lcom/android/internal/os/BatterySipper;)V
+Lcom/android/internal/os/BatterySipper;->cpuFgTimeMs:J
+Lcom/android/internal/os/BatterySipper;->cpuPowerMah:D
+Lcom/android/internal/os/BatterySipper;->cpuTimeMs:J
+Lcom/android/internal/os/BatterySipper;->drainType:Lcom/android/internal/os/BatterySipper$DrainType;
+Lcom/android/internal/os/BatterySipper;->getPackages()[Ljava/lang/String;
+Lcom/android/internal/os/BatterySipper;->getUid()I
+Lcom/android/internal/os/BatterySipper;->gpsTimeMs:J
+Lcom/android/internal/os/BatterySipper;->mPackages:[Ljava/lang/String;
+Lcom/android/internal/os/BatterySipper;->packageWithHighestDrain:Ljava/lang/String;
+Lcom/android/internal/os/BatterySipper;->totalPowerMah:D
+Lcom/android/internal/os/BatterySipper;->uidObj:Landroid/os/BatteryStats$Uid;
+Lcom/android/internal/os/BatterySipper;->usageTimeMs:J
+Lcom/android/internal/os/BatterySipper;->userId:I
+Lcom/android/internal/os/BatterySipper;->wakeLockTimeMs:J
+Lcom/android/internal/os/BatterySipper;->wifiRunningTimeMs:J
+Lcom/android/internal/os/BatteryStatsHelper;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/os/BatteryStatsHelper;-><init>(Landroid/content/Context;Z)V
+Lcom/android/internal/os/BatteryStatsHelper;-><init>(Landroid/content/Context;ZZ)V
+Lcom/android/internal/os/BatteryStatsHelper;->clearStats()V
+Lcom/android/internal/os/BatteryStatsHelper;->create(Landroid/os/Bundle;)V
+Lcom/android/internal/os/BatteryStatsHelper;->dropFile(Landroid/content/Context;Ljava/lang/String;)V
+Lcom/android/internal/os/BatteryStatsHelper;->getBatteryBroadcast()Landroid/content/Intent;
+Lcom/android/internal/os/BatteryStatsHelper;->getMaxPower()D
+Lcom/android/internal/os/BatteryStatsHelper;->getStats()Landroid/os/BatteryStats;
+Lcom/android/internal/os/BatteryStatsHelper;->getTotalPower()D
+Lcom/android/internal/os/BatteryStatsHelper;->getUsageList()Ljava/util/List;
+Lcom/android/internal/os/BatteryStatsHelper;->load()V
+Lcom/android/internal/os/BatteryStatsHelper;->mBatteryInfo:Lcom/android/internal/app/IBatteryStats;
+Lcom/android/internal/os/BatteryStatsHelper;->mPowerProfile:Lcom/android/internal/os/PowerProfile;
+Lcom/android/internal/os/BatteryStatsHelper;->mUsageList:Ljava/util/List;
+Lcom/android/internal/os/BatteryStatsHelper;->refreshStats(II)V
+Lcom/android/internal/os/BatteryStatsHelper;->refreshStats(ILandroid/util/SparseArray;)V
+Lcom/android/internal/os/BatteryStatsHelper;->refreshStats(ILjava/util/List;)V
+Lcom/android/internal/os/BatteryStatsHelper;->storeState()V
+Lcom/android/internal/os/BatteryStatsImpl$Counter;->mCount:Ljava/util/concurrent/atomic/AtomicInteger;
+Lcom/android/internal/os/BatteryStatsImpl$StopwatchTimer;->detach()V
+Lcom/android/internal/os/BatteryStatsImpl$Timer;->getCountLocked(I)I
+Lcom/android/internal/os/BatteryStatsImpl$Timer;->getTotalTimeLocked(JI)J
+Lcom/android/internal/os/BatteryStatsImpl$Timer;->writeTimerToParcel(Landroid/os/Parcel;Lcom/android/internal/os/BatteryStatsImpl$Timer;J)V
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->getBatteryStats()Lcom/android/internal/os/BatteryStatsImpl;
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->startLaunchedLocked()V
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->startRunningLocked()V
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->stopLaunchedLocked()V
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->stopRunningLocked()V
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->addCpuTimeLocked(II)V
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->addForegroundTimeLocked(J)V
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->getForegroundTime(I)J
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->getStarts(I)I
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->getSystemTime(I)J
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->getUserTime(I)J
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->incStartsLocked()V
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Sensor;->getHandle()I
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Sensor;->getSensorTime()Lcom/android/internal/os/BatteryStatsImpl$Timer;
+Lcom/android/internal/os/BatteryStatsImpl$Uid$Wakelock;->getWakeTime(I)Lcom/android/internal/os/BatteryStatsImpl$Timer;
+Lcom/android/internal/os/BatteryStatsImpl$Uid;->getProcessStats()Landroid/util/ArrayMap;
+Lcom/android/internal/os/BatteryStatsImpl$Uid;->getSensorStats()Landroid/util/SparseArray;
+Lcom/android/internal/os/BatteryStatsImpl$Uid;->getUid()I
+Lcom/android/internal/os/BatteryStatsImpl$Uid;->getWakelockStats()Landroid/util/ArrayMap;
+Lcom/android/internal/os/BatteryStatsImpl$Uid;->getWifiRunningTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl$Uid;->getWifiScanTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;-><init>(Landroid/os/Parcel;)V
+Lcom/android/internal/os/BatteryStatsImpl;->commitPendingDataToDisk()V
+Lcom/android/internal/os/BatteryStatsImpl;->computeBatteryRealtime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->computeBatteryTimeRemaining(J)J
+Lcom/android/internal/os/BatteryStatsImpl;->computeBatteryUptime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->CREATOR:Landroid/os/Parcelable$Creator;
+Lcom/android/internal/os/BatteryStatsImpl;->getAwakeTimeBattery()J
+Lcom/android/internal/os/BatteryStatsImpl;->getAwakeTimePlugged()J
+Lcom/android/internal/os/BatteryStatsImpl;->getBatteryRealtime(J)J
+Lcom/android/internal/os/BatteryStatsImpl;->getDischargeAmount(I)I
+Lcom/android/internal/os/BatteryStatsImpl;->getDischargeAmountScreenOff()I
+Lcom/android/internal/os/BatteryStatsImpl;->getDischargeAmountScreenOn()I
+Lcom/android/internal/os/BatteryStatsImpl;->getDischargeCurrentLevel()I
+Lcom/android/internal/os/BatteryStatsImpl;->getDischargeStartLevel()I
+Lcom/android/internal/os/BatteryStatsImpl;->getGlobalWifiRunningTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getKernelWakelockStats()Ljava/util/Map;
+Lcom/android/internal/os/BatteryStatsImpl;->getMobileRadioActiveTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getNetworkActivityBytes(II)J
+Lcom/android/internal/os/BatteryStatsImpl;->getNextHistoryLocked(Landroid/os/BatteryStats$HistoryItem;)Z
+Lcom/android/internal/os/BatteryStatsImpl;->getPackageStatsLocked(ILjava/lang/String;)Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg;
+Lcom/android/internal/os/BatteryStatsImpl;->getPhoneDataConnectionCount(II)I
+Lcom/android/internal/os/BatteryStatsImpl;->getPhoneDataConnectionTime(IJI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getPhoneOnTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getPhoneSignalScanningTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getPhoneSignalStrengthCount(II)I
+Lcom/android/internal/os/BatteryStatsImpl;->getPhoneSignalStrengthTime(IJI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getProcessStatsLocked(ILjava/lang/String;)Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;
+Lcom/android/internal/os/BatteryStatsImpl;->getScreenBrightnessTime(IJI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getScreenOnTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->getServiceStatsLocked(ILjava/lang/String;Ljava/lang/String;)Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;
+Lcom/android/internal/os/BatteryStatsImpl;->getUidStats()Landroid/util/SparseArray;
+Lcom/android/internal/os/BatteryStatsImpl;->getUidStatsLocked(I)Lcom/android/internal/os/BatteryStatsImpl$Uid;
+Lcom/android/internal/os/BatteryStatsImpl;->getWifiOnTime(JI)J
+Lcom/android/internal/os/BatteryStatsImpl;->isOnBattery()Z
+Lcom/android/internal/os/BatteryStatsImpl;->mFullTimers:Ljava/util/ArrayList;
+Lcom/android/internal/os/BatteryStatsImpl;->mPartialTimers:Ljava/util/ArrayList;
+Lcom/android/internal/os/BatteryStatsImpl;->mWindowTimers:Ljava/util/ArrayList;
+Lcom/android/internal/os/BatteryStatsImpl;->noteAudioOffLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->noteAudioOnLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->noteFullWifiLockAcquiredLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->noteFullWifiLockReleasedLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->notePhoneDataConnectionStateLocked(IZ)V
+Lcom/android/internal/os/BatteryStatsImpl;->notePhoneOffLocked()V
+Lcom/android/internal/os/BatteryStatsImpl;->notePhoneOnLocked()V
+Lcom/android/internal/os/BatteryStatsImpl;->notePhoneSignalStrengthLocked(Landroid/telephony/SignalStrength;)V
+Lcom/android/internal/os/BatteryStatsImpl;->noteScreenBrightnessLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->noteUserActivityLocked(II)V
+Lcom/android/internal/os/BatteryStatsImpl;->noteVideoOffLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->noteVideoOnLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->noteWifiMulticastDisabledLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->noteWifiMulticastEnabledLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->readLocked()V
+Lcom/android/internal/os/BatteryStatsImpl;->removeUidStatsLocked(I)V
+Lcom/android/internal/os/BatteryStatsImpl;->startIteratingHistoryLocked()Z
+Lcom/android/internal/os/FuseAppLoop;->onCommand(IJJJI[B)V
+Lcom/android/internal/os/FuseAppLoop;->onOpen(JJ)[B
+Lcom/android/internal/os/HandlerCaller;->obtainMessage(I)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageIO(IILjava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageIOO(IILjava/lang/Object;Ljava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageO(ILjava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageOO(ILjava/lang/Object;Ljava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->obtainMessageOOO(ILjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Landroid/os/Message;
+Lcom/android/internal/os/HandlerCaller;->sendMessage(Landroid/os/Message;)V
+Lcom/android/internal/os/IDropBoxManagerService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/os/IDropBoxManagerService;
+Lcom/android/internal/os/IDropBoxManagerService;->getNextEntry(Ljava/lang/String;J)Landroid/os/DropBoxManager$Entry;
+Lcom/android/internal/os/PowerProfile;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/os/PowerProfile;->getAveragePower(Ljava/lang/String;)D
+Lcom/android/internal/os/PowerProfile;->getAveragePower(Ljava/lang/String;I)D
+Lcom/android/internal/os/PowerProfile;->getBatteryCapacity()D
+Lcom/android/internal/os/PowerProfile;->getNumCpuClusters()I
+Lcom/android/internal/os/PowerProfile;->getNumSpeedStepsInCpuCluster(I)I
+Lcom/android/internal/os/PowerProfile;->POWER_BLUETOOTH_AT_CMD:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_BLUETOOTH_ON:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_CPU_ACTIVE:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_CPU_IDLE:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_GPS_ON:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_RADIO_ACTIVE:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_RADIO_ON:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_RADIO_SCANNING:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_SCREEN_FULL:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_SCREEN_ON:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_WIFI_ACTIVE:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_WIFI_ON:Ljava/lang/String;
+Lcom/android/internal/os/PowerProfile;->POWER_WIFI_SCAN:Ljava/lang/String;
+Lcom/android/internal/os/SomeArgs;->arg1:Ljava/lang/Object;
+Lcom/android/internal/os/SomeArgs;->arg2:Ljava/lang/Object;
+Lcom/android/internal/os/SomeArgs;->arg3:Ljava/lang/Object;
+Lcom/android/internal/os/SomeArgs;->argi2:I
+Lcom/android/internal/os/SomeArgs;->argi3:I
+Lcom/android/internal/os/SomeArgs;->obtain()Lcom/android/internal/os/SomeArgs;
+Lcom/android/internal/os/SomeArgs;->recycle()V
+Lcom/android/internal/policy/IKeyguardService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/policy/IKeyguardService;
+Lcom/android/internal/policy/IKeyguardService;->doKeyguardTimeout(Landroid/os/Bundle;)V
+Lcom/android/internal/policy/IKeyguardService;->setKeyguardEnabled(Z)V
+Lcom/android/internal/policy/IKeyguardStateCallback$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/policy/IKeyguardStateCallback;
+Lcom/android/internal/R$anim;->fade_in:I
+Lcom/android/internal/R$array;->config_autoBrightnessLcdBacklightValues:I
+Lcom/android/internal/R$array;->config_autoBrightnessLevels:I
+Lcom/android/internal/R$array;->config_mobile_hotspot_provision_app:I
+Lcom/android/internal/R$array;->config_sms_enabled_locking_shift_tables:I
+Lcom/android/internal/R$array;->config_sms_enabled_single_shift_tables:I
+Lcom/android/internal/R$array;->config_tether_bluetooth_regexs:I
+Lcom/android/internal/R$array;->config_tether_upstream_types:I
+Lcom/android/internal/R$array;->config_tether_usb_regexs:I
+Lcom/android/internal/R$array;->config_tether_wifi_regexs:I
+Lcom/android/internal/R$array;->maps_starting_lat_lng:I
+Lcom/android/internal/R$array;->maps_starting_zoom:I
+Lcom/android/internal/R$attr;->actionBarStyle:I
+Lcom/android/internal/R$attr;->buttonStyle:I
+Lcom/android/internal/R$attr;->description:I
+Lcom/android/internal/R$attr;->editTextStyle:I
+Lcom/android/internal/R$attr;->mapViewStyle:I
+Lcom/android/internal/R$attr;->popupWindowStyle:I
+Lcom/android/internal/R$attr;->state_above_anchor:I
+Lcom/android/internal/R$attr;->state_focused:I
+Lcom/android/internal/R$attr;->state_pressed:I
+Lcom/android/internal/R$attr;->state_selected:I
+Lcom/android/internal/R$attr;->switchStyle:I
+Lcom/android/internal/R$attr;->text:I
+Lcom/android/internal/R$attr;->title:I
+Lcom/android/internal/R$attr;->webViewStyle:I
+Lcom/android/internal/R$bool;->config_mms_content_disposition_support:I
+Lcom/android/internal/R$bool;->config_showNavigationBar:I
+Lcom/android/internal/R$dimen;-><init>()V
+Lcom/android/internal/R$dimen;->item_touch_helper_max_drag_scroll_per_frame:I
+Lcom/android/internal/R$dimen;->navigation_bar_height:I
+Lcom/android/internal/R$dimen;->navigation_bar_height_landscape:I
+Lcom/android/internal/R$dimen;->navigation_bar_width:I
+Lcom/android/internal/R$dimen;->status_bar_height:I
+Lcom/android/internal/R$dimen;->toast_y_offset:I
+Lcom/android/internal/R$drawable;->btn_check_off:I
+Lcom/android/internal/R$drawable;->compass_arrow:I
+Lcom/android/internal/R$drawable;->compass_base:I
+Lcom/android/internal/R$drawable;->ic_maps_indicator_current_position_anim:I
+Lcom/android/internal/R$drawable;->ic_menu_close_clear_cancel:I
+Lcom/android/internal/R$drawable;->loading_tile_android:I
+Lcom/android/internal/R$drawable;->maps_google_logo:I
+Lcom/android/internal/R$drawable;->no_tile_256:I
+Lcom/android/internal/R$drawable;->reticle:I
+Lcom/android/internal/R$drawable;->stat_sys_download:I
+Lcom/android/internal/R$fraction;->config_autoBrightnessAdjustmentMaxGamma:I
+Lcom/android/internal/R$id;->account_name:I
+Lcom/android/internal/R$id;->account_type:I
+Lcom/android/internal/R$id;->alertTitle:I
+Lcom/android/internal/R$id;->allow_button:I
+Lcom/android/internal/R$id;->amPm:I
+Lcom/android/internal/R$id;->authtoken_type:I
+Lcom/android/internal/R$id;->background:I
+Lcom/android/internal/R$id;->back_button:I
+Lcom/android/internal/R$id;->body:I
+Lcom/android/internal/R$id;->buttonPanel:I
+Lcom/android/internal/R$id;->camera:I
+Lcom/android/internal/R$id;->cancel:I
+Lcom/android/internal/R$id;->clip_children_set_tag:I
+Lcom/android/internal/R$id;->clip_children_tag:I
+Lcom/android/internal/R$id;->clip_to_padding_tag:I
+Lcom/android/internal/R$id;->closeButton:I
+Lcom/android/internal/R$id;->content:I
+Lcom/android/internal/R$id;->contentPanel:I
+Lcom/android/internal/R$id;->custom:I
+Lcom/android/internal/R$id;->customPanel:I
+Lcom/android/internal/R$id;->datePicker:I
+Lcom/android/internal/R$id;->day:I
+Lcom/android/internal/R$id;->deny_button:I
+Lcom/android/internal/R$id;->description:I
+Lcom/android/internal/R$id;->edit:I
+Lcom/android/internal/R$id;->edittext_container:I
+Lcom/android/internal/R$id;->find_next:I
+Lcom/android/internal/R$id;->find_prev:I
+Lcom/android/internal/R$id;->icon:I
+Lcom/android/internal/R$id;->keyboard:I
+Lcom/android/internal/R$id;->keyboardView:I
+Lcom/android/internal/R$id;->line1:I
+Lcom/android/internal/R$id;->list_item:I
+Lcom/android/internal/R$id;->matches:I
+Lcom/android/internal/R$id;->mediacontroller_progress:I
+Lcom/android/internal/R$id;->media_actions:I
+Lcom/android/internal/R$id;->message:I
+Lcom/android/internal/R$id;->minute:I
+Lcom/android/internal/R$id;->month:I
+Lcom/android/internal/R$id;->name:I
+Lcom/android/internal/R$id;->notification_header:I
+Lcom/android/internal/R$id;->ok:I
+Lcom/android/internal/R$id;->overlay:I
+Lcom/android/internal/R$id;->packages_list:I
+Lcom/android/internal/R$id;->package_label:I
+Lcom/android/internal/R$id;->parentPanel:I
+Lcom/android/internal/R$id;->pause:I
+Lcom/android/internal/R$id;->pending_intent_tag:I
+Lcom/android/internal/R$id;->progress:I
+Lcom/android/internal/R$id;->redo:I
+Lcom/android/internal/R$id;->remote_input_tag:I
+Lcom/android/internal/R$id;->right_icon:I
+Lcom/android/internal/R$id;->search_src_text:I
+Lcom/android/internal/R$id;->share:I
+Lcom/android/internal/R$id;->shortcut:I
+Lcom/android/internal/R$id;->status_bar_latest_event_content:I
+Lcom/android/internal/R$id;->tabcontent:I
+Lcom/android/internal/R$id;->tabs:I
+Lcom/android/internal/R$id;->text1:I
+Lcom/android/internal/R$id;->text2:I
+Lcom/android/internal/R$id;->text:I
+Lcom/android/internal/R$id;->time:I
+Lcom/android/internal/R$id;->timePicker:I
+Lcom/android/internal/R$id;->time_current:I
+Lcom/android/internal/R$id;->title:I
+Lcom/android/internal/R$id;->titleDivider:I
+Lcom/android/internal/R$id;->titleDividerTop:I
+Lcom/android/internal/R$id;->title_container:I
+Lcom/android/internal/R$id;->title_icon:I
+Lcom/android/internal/R$id;->title_template:I
+Lcom/android/internal/R$id;->topPanel:I
+Lcom/android/internal/R$id;->up:I
+Lcom/android/internal/R$id;->year:I
+Lcom/android/internal/R$id;->zoomControls:I
+Lcom/android/internal/R$id;->zoomMagnify:I
+Lcom/android/internal/R$integer;->config_screenBrightnessDim:I
+Lcom/android/internal/R$integer;->config_screenBrightnessSettingMaximum:I
+Lcom/android/internal/R$integer;->config_screenBrightnessSettingMinimum:I
+Lcom/android/internal/R$integer;->config_toastDefaultGravity:I
+Lcom/android/internal/R$interpolator;->accelerate_cubic:I
+Lcom/android/internal/R$interpolator;->decelerate_cubic:I
+Lcom/android/internal/R$layout;->notification_template_material_base:I
+Lcom/android/internal/R$layout;->preference_header_item:I
+Lcom/android/internal/R$layout;->screen_title:I
+Lcom/android/internal/R$layout;->select_dialog:I
+Lcom/android/internal/R$layout;->select_dialog_multichoice:I
+Lcom/android/internal/R$layout;->select_dialog_singlechoice:I
+Lcom/android/internal/R$layout;->webview_find:I
+Lcom/android/internal/R$layout;->zoom_magnify:I
+Lcom/android/internal/R$plurals;->matches_found:I
+Lcom/android/internal/R$raw;->loaderror:I
+Lcom/android/internal/R$raw;->nodomain:I
+Lcom/android/internal/R$string;->byteShort:I
+Lcom/android/internal/R$string;->cancel:I
+Lcom/android/internal/R$string;->enable_explore_by_touch_warning_title:I
+Lcom/android/internal/R$string;->gigabyteShort:I
+Lcom/android/internal/R$string;->kilobyteShort:I
+Lcom/android/internal/R$string;->map:I
+Lcom/android/internal/R$string;->megabyteShort:I
+Lcom/android/internal/R$string;->notification_title:I
+Lcom/android/internal/R$string;->no_matches:I
+Lcom/android/internal/R$string;->ok:I
+Lcom/android/internal/R$string;->petabyteShort:I
+Lcom/android/internal/R$string;->redo:I
+Lcom/android/internal/R$string;->share:I
+Lcom/android/internal/R$string;->terabyteShort:I
+Lcom/android/internal/R$string;->whichApplication:I
+Lcom/android/internal/R$style;->Animation_DropDownDown:I
+Lcom/android/internal/R$style;->Animation_DropDownUp:I
+Lcom/android/internal/R$style;->Animation_PopupWindow:I
+Lcom/android/internal/R$style;->Theme:I
+Lcom/android/internal/R$style;->Theme_Dialog_Alert:I
+Lcom/android/internal/R$style;->Theme_Holo_Light:I
+Lcom/android/internal/R$style;->Theme_Light:I
+Lcom/android/internal/R$styleable;-><init>()V
+Lcom/android/internal/R$styleable;->AbsListView:[I
+Lcom/android/internal/R$styleable;->AbsListView_cacheColorHint:I
+Lcom/android/internal/R$styleable;->AbsListView_choiceMode:I
+Lcom/android/internal/R$styleable;->AbsListView_drawSelectorOnTop:I
+Lcom/android/internal/R$styleable;->AbsListView_fastScrollAlwaysVisible:I
+Lcom/android/internal/R$styleable;->AbsListView_fastScrollEnabled:I
+Lcom/android/internal/R$styleable;->AbsListView_listSelector:I
+Lcom/android/internal/R$styleable;->AbsListView_scrollingCache:I
+Lcom/android/internal/R$styleable;->AbsListView_smoothScrollbar:I
+Lcom/android/internal/R$styleable;->AbsListView_stackFromBottom:I
+Lcom/android/internal/R$styleable;->AbsListView_textFilterEnabled:I
+Lcom/android/internal/R$styleable;->AbsListView_transcriptMode:I
+Lcom/android/internal/R$styleable;->AbsSpinner:[I
+Lcom/android/internal/R$styleable;->AccountAuthenticator:[I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_accountPreferences:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_accountType:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_customTokens:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_icon:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_label:I
+Lcom/android/internal/R$styleable;->AccountAuthenticator_smallIcon:I
+Lcom/android/internal/R$styleable;->ActionMode:[I
+Lcom/android/internal/R$styleable;->AdapterViewAnimator:[I
+Lcom/android/internal/R$styleable;->AdapterViewFlipper:[I
+Lcom/android/internal/R$styleable;->AlertDialog:[I
+Lcom/android/internal/R$styleable;->AnalogClock:[I
+Lcom/android/internal/R$styleable;->AndroidManifest:[I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity:[I
+Lcom/android/internal/R$styleable;->AndroidManifestActivityAlias:[I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_allowTaskReparenting:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_configChanges:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_description:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_enabled:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_excludeFromRecents:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_exported:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_hardwareAccelerated:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_icon:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_immersive:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_label:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_launchMode:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_logo:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_noHistory:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_permission:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_process:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_screenOrientation:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_taskAffinity:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_theme:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_uiOptions:I
+Lcom/android/internal/R$styleable;->AndroidManifestActivity_windowSoftInputMode:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication:[I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_enabled:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_hardwareAccelerated:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_label:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_largeHeap:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_permission:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_process:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_supportsRtl:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_theme:I
+Lcom/android/internal/R$styleable;->AndroidManifestApplication_uiOptions:I
+Lcom/android/internal/R$styleable;->AndroidManifestData:[I
+Lcom/android/internal/R$styleable;->AndroidManifestGrantUriPermission:[I
+Lcom/android/internal/R$styleable;->AndroidManifestInstrumentation:[I
+Lcom/android/internal/R$styleable;->AndroidManifestIntentFilter:[I
+Lcom/android/internal/R$styleable;->AndroidManifestIntentFilter_priority:I
+Lcom/android/internal/R$styleable;->AndroidManifestMetaData:[I
+Lcom/android/internal/R$styleable;->AndroidManifestMetaData_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestMetaData_resource:I
+Lcom/android/internal/R$styleable;->AndroidManifestMetaData_value:I
+Lcom/android/internal/R$styleable;->AndroidManifestOriginalPackage:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPackageVerifier:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPathPermission:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPermission:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPermissionGroup:[I
+Lcom/android/internal/R$styleable;->AndroidManifestPermissionTree:[I
+Lcom/android/internal/R$styleable;->AndroidManifestProtectedBroadcast:[I
+Lcom/android/internal/R$styleable;->AndroidManifestProvider:[I
+Lcom/android/internal/R$styleable;->AndroidManifestService:[I
+Lcom/android/internal/R$styleable;->AndroidManifestService_enabled:I
+Lcom/android/internal/R$styleable;->AndroidManifestService_exported:I
+Lcom/android/internal/R$styleable;->AndroidManifestService_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestService_permission:I
+Lcom/android/internal/R$styleable;->AndroidManifestService_process:I
+Lcom/android/internal/R$styleable;->AndroidManifestSupportsScreens:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesConfiguration:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesFeature:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesLibrary:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesPermission:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesPermission_name:I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesSdk:[I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesSdk_minSdkVersion:I
+Lcom/android/internal/R$styleable;->AndroidManifestUsesSdk_targetSdkVersion:I
+Lcom/android/internal/R$styleable;->AndroidManifest_installLocation:I
+Lcom/android/internal/R$styleable;->AndroidManifest_sharedUserId:I
+Lcom/android/internal/R$styleable;->AndroidManifest_versionCode:I
+Lcom/android/internal/R$styleable;->AndroidManifest_versionName:I
+Lcom/android/internal/R$styleable;->AppWidgetProviderInfo:[I
+Lcom/android/internal/R$styleable;->AutoCompleteTextView:[I
+Lcom/android/internal/R$styleable;->CheckBoxPreference:[I
+Lcom/android/internal/R$styleable;->CheckBoxPreference_disableDependentsState:I
+Lcom/android/internal/R$styleable;->CheckBoxPreference_summaryOff:I
+Lcom/android/internal/R$styleable;->CheckBoxPreference_summaryOn:I
+Lcom/android/internal/R$styleable;->CheckedTextView:[I
+Lcom/android/internal/R$styleable;->CheckedTextView_checked:I
+Lcom/android/internal/R$styleable;->CheckedTextView_checkMark:I
+Lcom/android/internal/R$styleable;->CompoundButton:[I
+Lcom/android/internal/R$styleable;->CompoundButton_button:I
+Lcom/android/internal/R$styleable;->CompoundButton_checked:I
+Lcom/android/internal/R$styleable;->ContactsDataKind:[I
+Lcom/android/internal/R$styleable;->CycleInterpolator:[I
+Lcom/android/internal/R$styleable;->DatePicker:[I
+Lcom/android/internal/R$styleable;->DialogPreference:[I
+Lcom/android/internal/R$styleable;->DialogPreference_dialogTitle:I
+Lcom/android/internal/R$styleable;->Dream:[I
+Lcom/android/internal/R$styleable;->EdgeEffect:[I
+Lcom/android/internal/R$styleable;->EdgeEffect_colorEdgeEffect:I
+Lcom/android/internal/R$styleable;->FastScroll:[I
+Lcom/android/internal/R$styleable;->FrameLayout:[I
+Lcom/android/internal/R$styleable;->FrameLayout_Layout:[I
+Lcom/android/internal/R$styleable;->Gallery:[I
+Lcom/android/internal/R$styleable;->GridView:[I
+Lcom/android/internal/R$styleable;->IconMenuView:[I
+Lcom/android/internal/R$styleable;->ImageView:[I
+Lcom/android/internal/R$styleable;->ImageView_scaleType:I
+Lcom/android/internal/R$styleable;->ImageView_src:I
+Lcom/android/internal/R$styleable;->Keyboard:[I
+Lcom/android/internal/R$styleable;->KeyboardView:[I
+Lcom/android/internal/R$styleable;->Keyboard_Key:[I
+Lcom/android/internal/R$styleable;->Keyboard_Row:[I
+Lcom/android/internal/R$styleable;->LinearLayout:[I
+Lcom/android/internal/R$styleable;->ListPreference:[I
+Lcom/android/internal/R$styleable;->ListPreference_entries:I
+Lcom/android/internal/R$styleable;->ListView:[I
+Lcom/android/internal/R$styleable;->ListView_divider:I
+Lcom/android/internal/R$styleable;->ListView_dividerHeight:I
+Lcom/android/internal/R$styleable;->ListView_entries:I
+Lcom/android/internal/R$styleable;->ListView_footerDividersEnabled:I
+Lcom/android/internal/R$styleable;->ListView_headerDividersEnabled:I
+Lcom/android/internal/R$styleable;->ListView_overScrollFooter:I
+Lcom/android/internal/R$styleable;->ListView_overScrollHeader:I
+Lcom/android/internal/R$styleable;->MapView:[I
+Lcom/android/internal/R$styleable;->MapView_apiKey:I
+Lcom/android/internal/R$styleable;->MenuGroup:[I
+Lcom/android/internal/R$styleable;->MenuItem:[I
+Lcom/android/internal/R$styleable;->MenuView:[I
+Lcom/android/internal/R$styleable;->NumberPicker:[I
+Lcom/android/internal/R$styleable;->PopupWindow:[I
+Lcom/android/internal/R$styleable;->PopupWindow_popupAnimationStyle:I
+Lcom/android/internal/R$styleable;->PopupWindow_popupBackground:I
+Lcom/android/internal/R$styleable;->Preference:[I
+Lcom/android/internal/R$styleable;->PreferenceGroup:[I
+Lcom/android/internal/R$styleable;->PreferenceGroup_orderingFromXml:I
+Lcom/android/internal/R$styleable;->Preference_defaultValue:I
+Lcom/android/internal/R$styleable;->Preference_dependency:I
+Lcom/android/internal/R$styleable;->Preference_enabled:I
+Lcom/android/internal/R$styleable;->Preference_fragment:I
+Lcom/android/internal/R$styleable;->Preference_icon:I
+Lcom/android/internal/R$styleable;->Preference_key:I
+Lcom/android/internal/R$styleable;->Preference_layout:I
+Lcom/android/internal/R$styleable;->Preference_order:I
+Lcom/android/internal/R$styleable;->Preference_persistent:I
+Lcom/android/internal/R$styleable;->Preference_selectable:I
+Lcom/android/internal/R$styleable;->Preference_shouldDisableView:I
+Lcom/android/internal/R$styleable;->Preference_summary:I
+Lcom/android/internal/R$styleable;->Preference_title:I
+Lcom/android/internal/R$styleable;->Preference_widgetLayout:I
+Lcom/android/internal/R$styleable;->ProgressBar:[I
+Lcom/android/internal/R$styleable;->QuickContactBadge:[I
+Lcom/android/internal/R$styleable;->RingtonePreference:[I
+Lcom/android/internal/R$styleable;->ScrollView:[I
+Lcom/android/internal/R$styleable;->ScrollView_fillViewport:I
+Lcom/android/internal/R$styleable;->Searchable:[I
+Lcom/android/internal/R$styleable;->SearchableActionKey:[I
+Lcom/android/internal/R$styleable;->SelectionModeDrawables:[I
+Lcom/android/internal/R$styleable;->Switch:[I
+Lcom/android/internal/R$styleable;->SwitchPreference:[I
+Lcom/android/internal/R$styleable;->SyncAdapter:[I
+Lcom/android/internal/R$styleable;->SyncAdapter_accountType:I
+Lcom/android/internal/R$styleable;->SyncAdapter_allowParallelSyncs:I
+Lcom/android/internal/R$styleable;->SyncAdapter_contentAuthority:I
+Lcom/android/internal/R$styleable;->SyncAdapter_isAlwaysSyncable:I
+Lcom/android/internal/R$styleable;->SyncAdapter_settingsActivity:I
+Lcom/android/internal/R$styleable;->SyncAdapter_supportsUploading:I
+Lcom/android/internal/R$styleable;->SyncAdapter_userVisible:I
+Lcom/android/internal/R$styleable;->TabWidget:[I
+Lcom/android/internal/R$styleable;->TextAppearance:[I
+Lcom/android/internal/R$styleable;->TextAppearance_fontFamily:I
+Lcom/android/internal/R$styleable;->TextAppearance_textAllCaps:I
+Lcom/android/internal/R$styleable;->TextAppearance_textColor:I
+Lcom/android/internal/R$styleable;->TextAppearance_textColorHighlight:I
+Lcom/android/internal/R$styleable;->TextAppearance_textColorHint:I
+Lcom/android/internal/R$styleable;->TextAppearance_textColorLink:I
+Lcom/android/internal/R$styleable;->TextAppearance_textSize:I
+Lcom/android/internal/R$styleable;->TextAppearance_textStyle:I
+Lcom/android/internal/R$styleable;->TextAppearance_typeface:I
+Lcom/android/internal/R$styleable;->TextClock:[I
+Lcom/android/internal/R$styleable;->TextView:[I
+Lcom/android/internal/R$styleable;->TextViewAppearance:[I
+Lcom/android/internal/R$styleable;->TextViewAppearance_textAppearance:I
+Lcom/android/internal/R$styleable;->TextView_autoLink:I
+Lcom/android/internal/R$styleable;->TextView_autoText:I
+Lcom/android/internal/R$styleable;->TextView_bufferType:I
+Lcom/android/internal/R$styleable;->TextView_capitalize:I
+Lcom/android/internal/R$styleable;->TextView_cursorVisible:I
+Lcom/android/internal/R$styleable;->TextView_digits:I
+Lcom/android/internal/R$styleable;->TextView_drawableBottom:I
+Lcom/android/internal/R$styleable;->TextView_drawableEnd:I
+Lcom/android/internal/R$styleable;->TextView_drawableLeft:I
+Lcom/android/internal/R$styleable;->TextView_drawablePadding:I
+Lcom/android/internal/R$styleable;->TextView_drawableRight:I
+Lcom/android/internal/R$styleable;->TextView_drawableStart:I
+Lcom/android/internal/R$styleable;->TextView_drawableTop:I
+Lcom/android/internal/R$styleable;->TextView_editable:I
+Lcom/android/internal/R$styleable;->TextView_editorExtras:I
+Lcom/android/internal/R$styleable;->TextView_ellipsize:I
+Lcom/android/internal/R$styleable;->TextView_ems:I
+Lcom/android/internal/R$styleable;->TextView_enabled:I
+Lcom/android/internal/R$styleable;->TextView_freezesText:I
+Lcom/android/internal/R$styleable;->TextView_gravity:I
+Lcom/android/internal/R$styleable;->TextView_height:I
+Lcom/android/internal/R$styleable;->TextView_hint:I
+Lcom/android/internal/R$styleable;->TextView_imeActionId:I
+Lcom/android/internal/R$styleable;->TextView_imeActionLabel:I
+Lcom/android/internal/R$styleable;->TextView_imeOptions:I
+Lcom/android/internal/R$styleable;->TextView_includeFontPadding:I
+Lcom/android/internal/R$styleable;->TextView_inputMethod:I
+Lcom/android/internal/R$styleable;->TextView_inputType:I
+Lcom/android/internal/R$styleable;->TextView_lines:I
+Lcom/android/internal/R$styleable;->TextView_lineSpacingExtra:I
+Lcom/android/internal/R$styleable;->TextView_lineSpacingMultiplier:I
+Lcom/android/internal/R$styleable;->TextView_linksClickable:I
+Lcom/android/internal/R$styleable;->TextView_marqueeRepeatLimit:I
+Lcom/android/internal/R$styleable;->TextView_maxEms:I
+Lcom/android/internal/R$styleable;->TextView_maxHeight:I
+Lcom/android/internal/R$styleable;->TextView_maxLength:I
+Lcom/android/internal/R$styleable;->TextView_maxLines:I
+Lcom/android/internal/R$styleable;->TextView_maxWidth:I
+Lcom/android/internal/R$styleable;->TextView_minEms:I
+Lcom/android/internal/R$styleable;->TextView_minHeight:I
+Lcom/android/internal/R$styleable;->TextView_minLines:I
+Lcom/android/internal/R$styleable;->TextView_minWidth:I
+Lcom/android/internal/R$styleable;->TextView_numeric:I
+Lcom/android/internal/R$styleable;->TextView_password:I
+Lcom/android/internal/R$styleable;->TextView_phoneNumber:I
+Lcom/android/internal/R$styleable;->TextView_privateImeOptions:I
+Lcom/android/internal/R$styleable;->TextView_scrollHorizontally:I
+Lcom/android/internal/R$styleable;->TextView_selectAllOnFocus:I
+Lcom/android/internal/R$styleable;->TextView_shadowColor:I
+Lcom/android/internal/R$styleable;->TextView_shadowDx:I
+Lcom/android/internal/R$styleable;->TextView_shadowDy:I
+Lcom/android/internal/R$styleable;->TextView_shadowRadius:I
+Lcom/android/internal/R$styleable;->TextView_singleLine:I
+Lcom/android/internal/R$styleable;->TextView_text:I
+Lcom/android/internal/R$styleable;->TextView_textAllCaps:I
+Lcom/android/internal/R$styleable;->TextView_textAppearance:I
+Lcom/android/internal/R$styleable;->TextView_textColor:I
+Lcom/android/internal/R$styleable;->TextView_textColorHighlight:I
+Lcom/android/internal/R$styleable;->TextView_textColorHint:I
+Lcom/android/internal/R$styleable;->TextView_textColorLink:I
+Lcom/android/internal/R$styleable;->TextView_textCursorDrawable:I
+Lcom/android/internal/R$styleable;->TextView_textEditSuggestionItemLayout:I
+Lcom/android/internal/R$styleable;->TextView_textIsSelectable:I
+Lcom/android/internal/R$styleable;->TextView_textScaleX:I
+Lcom/android/internal/R$styleable;->TextView_textSelectHandle:I
+Lcom/android/internal/R$styleable;->TextView_textSelectHandleLeft:I
+Lcom/android/internal/R$styleable;->TextView_textSelectHandleRight:I
+Lcom/android/internal/R$styleable;->TextView_textSize:I
+Lcom/android/internal/R$styleable;->TextView_textStyle:I
+Lcom/android/internal/R$styleable;->TextView_typeface:I
+Lcom/android/internal/R$styleable;->TextView_width:I
+Lcom/android/internal/R$styleable;->Theme:[I
+Lcom/android/internal/R$styleable;->TwoLineListItem:[I
+Lcom/android/internal/R$styleable;->View:[I
+Lcom/android/internal/R$styleable;->ViewAnimator:[I
+Lcom/android/internal/R$styleable;->ViewFlipper:[I
+Lcom/android/internal/R$styleable;->ViewGroup_Layout:[I
+Lcom/android/internal/R$styleable;->ViewGroup_Layout_layout_height:I
+Lcom/android/internal/R$styleable;->ViewGroup_Layout_layout_width:I
+Lcom/android/internal/R$styleable;->ViewStub:[I
+Lcom/android/internal/R$styleable;->ViewStub_inflatedId:I
+Lcom/android/internal/R$styleable;->ViewStub_layout:I
+Lcom/android/internal/R$styleable;->View_background:I
+Lcom/android/internal/R$styleable;->View_clickable:I
+Lcom/android/internal/R$styleable;->View_focusable:I
+Lcom/android/internal/R$styleable;->View_id:I
+Lcom/android/internal/R$styleable;->View_longClickable:I
+Lcom/android/internal/R$styleable;->WallpaperPreviewInfo:[I
+Lcom/android/internal/R$styleable;->Window:[I
+Lcom/android/internal/R$styleable;->WindowAnimation:[I
+Lcom/android/internal/R$styleable;->Window_windowActionBarFullscreenDecorLayout:I
+Lcom/android/internal/R$styleable;->Window_windowIsFloating:I
+Lcom/android/internal/R$styleable;->Window_windowIsTranslucent:I
+Lcom/android/internal/R$styleable;->Window_windowShowWallpaper:I
+Lcom/android/internal/R$xml;->power_profile:I
+Lcom/android/internal/statusbar/IStatusBar$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/statusbar/IStatusBar;
+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/statusbar/IStatusBarService;->collapsePanels()V
+Lcom/android/internal/statusbar/IStatusBarService;->disable(ILandroid/os/IBinder;Ljava/lang/String;)V
+Lcom/android/internal/statusbar/IStatusBarService;->expandNotificationsPanel()V
+Lcom/android/internal/statusbar/IStatusBarService;->handleSystemKey(I)V
+Lcom/android/internal/statusbar/IStatusBarService;->removeIcon(Ljava/lang/String;)V
+Lcom/android/internal/statusbar/IStatusBarService;->setIconVisibility(Ljava/lang/String;Z)V
+Lcom/android/internal/telecom/ITelecomService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telecom/ITelecomService;
+Lcom/android/internal/telecom/ITelecomService;->getCallState()I
+Lcom/android/internal/telephony/CallerInfo;-><init>()V
+Lcom/android/internal/telephony/CallerInfo;->contactIdOrZero:J
+Lcom/android/internal/telephony/CallerInfo;->getCallerInfo(Landroid/content/Context;Landroid/net/Uri;)Lcom/android/internal/telephony/CallerInfo;
+Lcom/android/internal/telephony/CallerInfo;->getCallerInfo(Landroid/content/Context;Ljava/lang/String;)Lcom/android/internal/telephony/CallerInfo;
+Lcom/android/internal/telephony/CallerInfo;->getCallerInfo(Landroid/content/Context;Ljava/lang/String;I)Lcom/android/internal/telephony/CallerInfo;
+Lcom/android/internal/telephony/CallerInfo;->name:Ljava/lang/String;
+Lcom/android/internal/telephony/CallerInfo;->numberLabel:Ljava/lang/String;
+Lcom/android/internal/telephony/CallerInfo;->numberType:I
+Lcom/android/internal/telephony/CallerInfo;->phoneNumber:Ljava/lang/String;
+Lcom/android/internal/telephony/EncodeException;-><init>(C)V
+Lcom/android/internal/telephony/EncodeException;-><init>(Ljava/lang/String;)V
+Lcom/android/internal/telephony/GsmAlphabet$LanguagePairCount;-><init>(I)V
+Lcom/android/internal/telephony/GsmAlphabet$LanguagePairCount;->languageCode:I
+Lcom/android/internal/telephony/GsmAlphabet$LanguagePairCount;->septetCounts:[I
+Lcom/android/internal/telephony/GsmAlphabet$LanguagePairCount;->unencodableCounts:[I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;-><init>()V
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->codeUnitCount:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->codeUnitSize:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->codeUnitsRemaining:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->languageShiftTable:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->languageTable:I
+Lcom/android/internal/telephony/GsmAlphabet$TextEncodingDetails;->msgCount:I
+Lcom/android/internal/telephony/GsmAlphabet;->charToGsm(C)I
+Lcom/android/internal/telephony/GsmAlphabet;->charToGsm(CZ)I
+Lcom/android/internal/telephony/GsmAlphabet;->countGsmSeptets(CZ)I
+Lcom/android/internal/telephony/GsmAlphabet;->findGsmSeptetLimitIndex(Ljava/lang/String;IIII)I
+Lcom/android/internal/telephony/GsmAlphabet;->gsm7BitPackedToString([BII)Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->gsm7BitPackedToString([BIIIII)Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->gsm8BitUnpackedToString([BII)Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->gsm8BitUnpackedToString([BIILjava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->gsmToChar(I)C
+Lcom/android/internal/telephony/GsmAlphabet;->packSmsChar([BII)V
+Lcom/android/internal/telephony/GsmAlphabet;->sCharsToGsmTables:[Landroid/util/SparseIntArray;
+Lcom/android/internal/telephony/GsmAlphabet;->sCharsToShiftTables:[Landroid/util/SparseIntArray;
+Lcom/android/internal/telephony/GsmAlphabet;->sEnabledLockingShiftTables:[I
+Lcom/android/internal/telephony/GsmAlphabet;->sEnabledSingleShiftTables:[I
+Lcom/android/internal/telephony/GsmAlphabet;->sHighestEnabledSingleShiftCode:I
+Lcom/android/internal/telephony/GsmAlphabet;->sLanguageShiftTables:[Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->sLanguageTables:[Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPacked(Ljava/lang/String;)[B
+Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPacked(Ljava/lang/String;IZII)[B
+Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPackedWithHeader(Ljava/lang/String;[BII)[B
+Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm8BitPacked(Ljava/lang/String;)[B
+Lcom/android/internal/telephony/ICarrierConfigLoader;->getConfigForSubId(I)Landroid/os/PersistableBundle;
+Lcom/android/internal/telephony/IMms$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IMms;
+Lcom/android/internal/telephony/IPhoneStateListener$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IPhoneStateListener;
+Lcom/android/internal/telephony/IPhoneStateListener;->onCallForwardingIndicatorChanged(Z)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onCallStateChanged(ILjava/lang/String;)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onCellLocationChanged(Landroid/os/Bundle;)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onDataActivity(I)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onDataConnectionStateChanged(II)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onMessageWaitingIndicatorChanged(Z)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onServiceStateChanged(Landroid/telephony/ServiceState;)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onSignalStrengthChanged(I)V
+Lcom/android/internal/telephony/IPhoneStateListener;->onSignalStrengthsChanged(Landroid/telephony/SignalStrength;)V
+Lcom/android/internal/telephony/IPhoneSubInfo$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/telephony/IPhoneSubInfo$Stub;-><init>()V
+Lcom/android/internal/telephony/IPhoneSubInfo$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IPhoneSubInfo;
+Lcom/android/internal/telephony/IPhoneSubInfo;->getIccSerialNumber(Ljava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/IPhoneSubInfo;->getSubscriberId(Ljava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/ISms$Stub;-><init>()V
+Lcom/android/internal/telephony/ISms$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ISms;
+Lcom/android/internal/telephony/ISub$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/telephony/ISub$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ISub;
+Lcom/android/internal/telephony/ISub;->getDefaultDataSubId()I
+Lcom/android/internal/telephony/ISub;->getDefaultSubId()I
+Lcom/android/internal/telephony/ISub;->setDefaultDataSubId(I)V
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->endCall()Z
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->endCallForSubscriber(I)Z
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->getDeviceId(Ljava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/ITelephony$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Lcom/android/internal/telephony/ITelephony$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ITelephony;
+Lcom/android/internal/telephony/ITelephony$Stub;->DESCRIPTOR:Ljava/lang/String;
+Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_answerRingingCall:I
+Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_call:I
+Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_endCall:I
+Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_getDeviceId:I
+Lcom/android/internal/telephony/ITelephony;->answerRingingCall()V
+Lcom/android/internal/telephony/ITelephony;->call(Ljava/lang/String;Ljava/lang/String;)V
+Lcom/android/internal/telephony/ITelephony;->dial(Ljava/lang/String;)V
+Lcom/android/internal/telephony/ITelephony;->disableDataConnectivity()Z
+Lcom/android/internal/telephony/ITelephony;->disableLocationUpdates()V
+Lcom/android/internal/telephony/ITelephony;->enableDataConnectivity()Z
+Lcom/android/internal/telephony/ITelephony;->enableLocationUpdates()V
+Lcom/android/internal/telephony/ITelephony;->endCall()Z
+Lcom/android/internal/telephony/ITelephony;->endCallForSubscriber(I)Z
+Lcom/android/internal/telephony/ITelephony;->getActivePhoneType()I
+Lcom/android/internal/telephony/ITelephony;->getCallState()I
+Lcom/android/internal/telephony/ITelephony;->getDataActivity()I
+Lcom/android/internal/telephony/ITelephony;->getDataEnabled(I)Z
+Lcom/android/internal/telephony/ITelephony;->getDataState()I
+Lcom/android/internal/telephony/ITelephony;->getNetworkType()I
+Lcom/android/internal/telephony/ITelephony;->getVoiceMessageCount()I
+Lcom/android/internal/telephony/ITelephony;->handlePinMmi(Ljava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->handlePinMmiForSubscriber(ILjava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->hasIccCard()Z
+Lcom/android/internal/telephony/ITelephony;->iccCloseLogicalChannel(II)Z
+Lcom/android/internal/telephony/ITelephony;->iccTransmitApduLogicalChannel(IIIIIIILjava/lang/String;)Ljava/lang/String;
+Lcom/android/internal/telephony/ITelephony;->isIdle(Ljava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->isIdleForSubscriber(ILjava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->isRadioOnForSubscriber(ILjava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->isRinging(Ljava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->setRadio(Z)Z
+Lcom/android/internal/telephony/ITelephony;->silenceRinger()V
+Lcom/android/internal/telephony/ITelephony;->supplyPin(Ljava/lang/String;)Z
+Lcom/android/internal/telephony/ITelephony;->toggleRadioOnOff()V
+Lcom/android/internal/telephony/ITelephony;->updateServiceLocation()V
+Lcom/android/internal/telephony/ITelephonyRegistry$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/telephony/ITelephonyRegistry$Stub;-><init>()V
+Lcom/android/internal/telephony/ITelephonyRegistry$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/ITelephonyRegistry;
+Lcom/android/internal/telephony/ITelephonyRegistry;->listen(Ljava/lang/String;Lcom/android/internal/telephony/IPhoneStateListener;IZ)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCallForwardingChanged(Z)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCallState(ILjava/lang/String;)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCellInfo(Ljava/util/List;)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCellLocation(Landroid/os/Bundle;)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyDataActivity(I)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyDataConnectionFailed(Ljava/lang/String;Ljava/lang/String;)V
+Lcom/android/internal/telephony/ITelephonyRegistry;->notifyOtaspChanged(I)V
+Lcom/android/internal/telephony/IWapPushManager$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/telephony/IWapPushManager;
+Lcom/android/internal/telephony/IWapPushManager;->addPackage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)Z
+Lcom/android/internal/telephony/IWapPushManager;->deletePackage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
+Lcom/android/internal/telephony/IWapPushManager;->updatePackage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)Z
+Lcom/android/internal/telephony/OperatorInfo$State;->CURRENT:Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/telephony/OperatorInfo$State;->FORBIDDEN:Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/telephony/OperatorInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+Lcom/android/internal/telephony/OperatorInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/android/internal/telephony/OperatorInfo$State;)V
+Lcom/android/internal/telephony/OperatorInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+Lcom/android/internal/telephony/OperatorInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Lcom/android/internal/telephony/OperatorInfo;->getOperatorAlphaLong()Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->getOperatorAlphaShort()Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->getOperatorNumeric()Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->getState()Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/telephony/OperatorInfo;->mOperatorAlphaLong:Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->mOperatorAlphaShort:Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->mOperatorNumeric:Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->mState:Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/telephony/OperatorInfo;->rilStateToState(Ljava/lang/String;)Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/telephony/SmsAddress;->origBytes:[B
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->CLASS_0:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->CLASS_1:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->CLASS_2:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->CLASS_3:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsConstants$MessageClass;->UNKNOWN:Lcom/android/internal/telephony/SmsConstants$MessageClass;
+Lcom/android/internal/telephony/SmsHeader$ConcatRef;-><init>()V
+Lcom/android/internal/telephony/SmsHeader$ConcatRef;->msgCount:I
+Lcom/android/internal/telephony/SmsHeader$ConcatRef;->refNumber:I
+Lcom/android/internal/telephony/SmsHeader$ConcatRef;->seqNumber:I
+Lcom/android/internal/telephony/SmsHeader$PortAddrs;-><init>()V
+Lcom/android/internal/telephony/SmsHeader$PortAddrs;->destPort:I
+Lcom/android/internal/telephony/SmsHeader$PortAddrs;->origPort:I
+Lcom/android/internal/telephony/SmsHeader;-><init>()V
+Lcom/android/internal/telephony/SmsHeader;->concatRef:Lcom/android/internal/telephony/SmsHeader$ConcatRef;
+Lcom/android/internal/telephony/SmsHeader;->fromByteArray([B)Lcom/android/internal/telephony/SmsHeader;
+Lcom/android/internal/telephony/SmsHeader;->languageShiftTable:I
+Lcom/android/internal/telephony/SmsHeader;->languageTable:I
+Lcom/android/internal/telephony/SmsHeader;->portAddrs:Lcom/android/internal/telephony/SmsHeader$PortAddrs;
+Lcom/android/internal/telephony/SmsHeader;->toByteArray(Lcom/android/internal/telephony/SmsHeader;)[B
+Lcom/android/internal/telephony/SmsMessageBase$SubmitPduBase;->encodedMessage:[B
+Lcom/android/internal/telephony/SmsMessageBase$SubmitPduBase;->encodedScAddress:[B
+Lcom/android/internal/telephony/SmsMessageBase;-><init>()V
+Lcom/android/internal/telephony/SmsMessageBase;->getDisplayMessageBody()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getDisplayOriginatingAddress()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getMessageBody()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getOriginatingAddress()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getProtocolIdentifier()I
+Lcom/android/internal/telephony/SmsMessageBase;->getPseudoSubject()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getServiceCenterAddress()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getStatus()I
+Lcom/android/internal/telephony/SmsMessageBase;->getTimestampMillis()J
+Lcom/android/internal/telephony/SmsMessageBase;->getUserData()[B
+Lcom/android/internal/telephony/SmsMessageBase;->getUserDataHeader()Lcom/android/internal/telephony/SmsHeader;
+Lcom/android/internal/telephony/SmsMessageBase;->isReplace()Z
+Lcom/android/internal/telephony/SmsMessageBase;->isReplyPathPresent()Z
+Lcom/android/internal/telephony/SmsMessageBase;->isStatusReportMessage()Z
+Lcom/android/internal/telephony/SmsMessageBase;->mIsMwi:Z
+Lcom/android/internal/telephony/SmsMessageBase;->mMessageBody:Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->mMessageRef:I
+Lcom/android/internal/telephony/SmsMessageBase;->mMwiDontStore:Z
+Lcom/android/internal/telephony/SmsMessageBase;->mMwiSense:Z
+Lcom/android/internal/telephony/SmsMessageBase;->mOriginatingAddress:Lcom/android/internal/telephony/SmsAddress;
+Lcom/android/internal/telephony/SmsMessageBase;->mPdu:[B
+Lcom/android/internal/telephony/SmsMessageBase;->mScAddress:Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->mUserDataHeader:Lcom/android/internal/telephony/SmsHeader;
+Lcom/android/internal/telephony/SmsRawData;-><init>([B)V
+Lcom/android/internal/telephony/SmsRawData;->CREATOR:Landroid/os/Parcelable$Creator;
+Lcom/android/internal/telephony/SmsRawData;->getBytes()[B
+Lcom/android/internal/textservice/ITextServicesManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/util/AsyncChannel;-><init>()V
+Lcom/android/internal/util/AsyncChannel;->cmdToString(I)Ljava/lang/String;
+Lcom/android/internal/util/AsyncChannel;->CMD_CHANNEL_FULL_CONNECTION:I
+Lcom/android/internal/util/AsyncChannel;->CMD_CHANNEL_HALF_CONNECTED:I
+Lcom/android/internal/util/AsyncChannel;->connect(Landroid/content/Context;Landroid/os/Handler;Landroid/os/Messenger;)V
+Lcom/android/internal/util/AsyncChannel;->connected(Landroid/content/Context;Landroid/os/Handler;Landroid/os/Messenger;)V
+Lcom/android/internal/util/AsyncChannel;->connectSync(Landroid/content/Context;Landroid/os/Handler;Landroid/os/Messenger;)I
+Lcom/android/internal/util/AsyncChannel;->disconnect()V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;I)V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;II)V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;IIILjava/lang/Object;)V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;ILjava/lang/Object;)V
+Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;Landroid/os/Message;)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(I)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(II)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(III)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(IIILjava/lang/Object;)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(Landroid/os/Message;)V
+Lcom/android/internal/util/AsyncChannel;->sendMessageSynchronously(III)Landroid/os/Message;
+Lcom/android/internal/util/AsyncChannel;->sendMessageSynchronously(Landroid/os/Message;)Landroid/os/Message;
+Lcom/android/internal/util/AsyncChannel;->STATUS_SUCCESSFUL:I
+Lcom/android/internal/util/FastPrintWriter;-><init>(Ljava/io/OutputStream;)V
+Lcom/android/internal/util/IndentingPrintWriter;-><init>(Ljava/io/Writer;Ljava/lang/String;)V
+Lcom/android/internal/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/internal/util/IndentingPrintWriter;
+Lcom/android/internal/util/IndentingPrintWriter;->increaseIndent()Lcom/android/internal/util/IndentingPrintWriter;
+Lcom/android/internal/util/JournaledFile;-><init>(Ljava/io/File;Ljava/io/File;)V
+Lcom/android/internal/util/JournaledFile;->chooseForRead()Ljava/io/File;
+Lcom/android/internal/util/JournaledFile;->chooseForWrite()Ljava/io/File;
+Lcom/android/internal/util/JournaledFile;->commit()V
+Lcom/android/internal/util/JournaledFile;->rollback()V
+Lcom/android/internal/util/XmlUtils;->beginDocument(Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)V
+Lcom/android/internal/util/XmlUtils;->convertValueToBoolean(Ljava/lang/CharSequence;Z)Z
+Lcom/android/internal/util/XmlUtils;->convertValueToInt(Ljava/lang/CharSequence;I)I
+Lcom/android/internal/util/XmlUtils;->nextElement(Lorg/xmlpull/v1/XmlPullParser;)V
+Lcom/android/internal/util/XmlUtils;->readMapXml(Ljava/io/InputStream;)Ljava/util/HashMap;
+Lcom/android/internal/util/XmlUtils;->skipCurrentTag(Lorg/xmlpull/v1/XmlPullParser;)V
+Lcom/android/internal/util/XmlUtils;->writeMapXml(Ljava/util/Map;Ljava/io/OutputStream;)V
+Lcom/android/internal/view/BaseIWindow;-><init>()V
+Lcom/android/internal/view/IInputConnectionWrapper;->mInputConnection:Landroid/view/inputmethod/InputConnection;
+Lcom/android/internal/view/IInputConnectionWrapper;->mLock:Ljava/lang/Object;
+Lcom/android/internal/view/IInputMethod$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/view/IInputMethod;
+Lcom/android/internal/view/IInputMethod;->attachToken(Landroid/os/IBinder;)V
+Lcom/android/internal/view/IInputMethod;->bindInput(Landroid/view/inputmethod/InputBinding;)V
+Lcom/android/internal/view/IInputMethod;->hideSoftInput(ILandroid/os/ResultReceiver;)V
+Lcom/android/internal/view/IInputMethod;->setSessionEnabled(Lcom/android/internal/view/IInputMethodSession;Z)V
+Lcom/android/internal/view/IInputMethod;->showSoftInput(ILandroid/os/ResultReceiver;)V
+Lcom/android/internal/view/IInputMethod;->unbindInput()V
+Lcom/android/internal/view/IInputMethodClient;->onBindMethod(Lcom/android/internal/view/InputBindResult;)V
+Lcom/android/internal/view/IInputMethodClient;->setUsingInputMethod(Z)V
+Lcom/android/internal/view/IInputMethodManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Lcom/android/internal/view/IInputMethodManager$Stub$Proxy;->getEnabledInputMethodList()Ljava/util/List;
+Lcom/android/internal/view/IInputMethodManager$Stub;-><init>()V
+Lcom/android/internal/view/IInputMethodManager$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/view/IInputMethodManager;
+Lcom/android/internal/view/IInputMethodManager;->addClient(Lcom/android/internal/view/IInputMethodClient;Lcom/android/internal/view/IInputContext;II)V
+Lcom/android/internal/view/IInputMethodManager;->removeClient(Lcom/android/internal/view/IInputMethodClient;)V
+Lcom/android/internal/view/IInputMethodSession$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/view/IInputMethodSession;
+Lcom/android/internal/view/InputBindResult;->CREATOR:Landroid/os/Parcelable$Creator;
+Lcom/android/internal/view/InputBindResult;->method:Lcom/android/internal/view/IInputMethodSession;
+Lcom/android/internal/view/menu/ActionMenuItemView;->hasText()Z
+Lcom/android/internal/view/menu/MenuBuilder$Callback;->onMenuItemSelected(Lcom/android/internal/view/menu/MenuBuilder;Landroid/view/MenuItem;)Z
+Lcom/android/internal/view/menu/MenuBuilder$Callback;->onMenuModeChange(Lcom/android/internal/view/menu/MenuBuilder;)V
+Lcom/android/internal/view/menu/MenuBuilder;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/view/menu/MenuBuilder;->addMenuPresenter(Lcom/android/internal/view/menu/MenuPresenter;)V
+Lcom/android/internal/view/menu/MenuBuilder;->addMenuPresenter(Lcom/android/internal/view/menu/MenuPresenter;Landroid/content/Context;)V
+Lcom/android/internal/view/menu/MenuBuilder;->collapseItemActionView(Lcom/android/internal/view/menu/MenuItemImpl;)Z
+Lcom/android/internal/view/menu/MenuBuilder;->getContext()Landroid/content/Context;
+Lcom/android/internal/view/menu/MenuBuilder;->getNonActionItems()Ljava/util/ArrayList;
+Lcom/android/internal/view/menu/MenuBuilder;->getRootMenu()Lcom/android/internal/view/menu/MenuBuilder;
+Lcom/android/internal/view/menu/MenuBuilder;->getVisibleItems()Ljava/util/ArrayList;
+Lcom/android/internal/view/menu/MenuBuilder;->mContext:Landroid/content/Context;
+Lcom/android/internal/view/menu/MenuBuilder;->removeMenuPresenter(Lcom/android/internal/view/menu/MenuPresenter;)V
+Lcom/android/internal/view/menu/MenuBuilder;->setCallback(Lcom/android/internal/view/menu/MenuBuilder$Callback;)V
+Lcom/android/internal/view/menu/MenuBuilder;->setCurrentMenuInfo(Landroid/view/ContextMenu$ContextMenuInfo;)V
+Lcom/android/internal/view/menu/MenuBuilder;->setDefaultShowAsAction(I)Lcom/android/internal/view/menu/MenuBuilder;
+Lcom/android/internal/view/menu/MenuBuilder;->setOptionalIconsVisible(Z)V
+Lcom/android/internal/view/menu/MenuBuilder;->startDispatchingItemsChanged()V
+Lcom/android/internal/view/menu/MenuBuilder;->stopDispatchingItemsChanged()V
+Lcom/android/internal/view/menu/MenuItemImpl;->invoke()Z
+Lcom/android/internal/view/menu/MenuItemImpl;->isActionButton()Z
+Lcom/android/internal/view/menu/MenuItemImpl;->mIconResId:I
+Lcom/android/internal/view/menu/MenuItemImpl;->requestsActionButton()Z
+Lcom/android/internal/view/menu/MenuItemImpl;->requiresActionButton()Z
+Lcom/android/internal/view/menu/MenuItemImpl;->setActionViewExpanded(Z)V
+Lcom/android/internal/view/menu/MenuItemImpl;->setMenuInfo(Landroid/view/ContextMenu$ContextMenuInfo;)V
+Lcom/android/internal/view/menu/MenuPopupHelper;-><init>(Landroid/content/Context;Lcom/android/internal/view/menu/MenuBuilder;)V
+Lcom/android/internal/view/menu/MenuPopupHelper;-><init>(Landroid/content/Context;Lcom/android/internal/view/menu/MenuBuilder;Landroid/view/View;)V
+Lcom/android/internal/view/menu/MenuPopupHelper;->dismiss()V
+Lcom/android/internal/view/menu/MenuPopupHelper;->mForceShowIcon:Z
+Lcom/android/internal/view/menu/MenuPopupHelper;->setForceShowIcon(Z)V
+Lcom/android/internal/view/menu/MenuPopupHelper;->setGravity(I)V
+Lcom/android/internal/view/menu/MenuPopupHelper;->show()V
+Lcom/android/internal/view/menu/MenuPopupHelper;->tryShow()Z
+Lcom/android/internal/view/menu/MenuPresenter$Callback;->onOpenSubMenu(Lcom/android/internal/view/menu/MenuBuilder;)Z
+Lcom/android/internal/view/menu/MenuView$ItemView;->getItemData()Lcom/android/internal/view/menu/MenuItemImpl;
+Lcom/android/internal/view/menu/MenuView;->getWindowAnimations()I
+Lcom/android/internal/view/menu/SubMenuBuilder;->getRootMenu()Lcom/android/internal/view/menu/MenuBuilder;
+Lcom/android/internal/view/menu/SubMenuBuilder;->setCallback(Lcom/android/internal/view/menu/MenuBuilder$Callback;)V
+Lcom/android/internal/widget/CachingIconView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
+Lcom/android/internal/widget/ILockSettings$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/widget/ILockSettings;
+Lcom/android/internal/widget/ILockSettings;->getBoolean(Ljava/lang/String;ZI)Z
+Lcom/android/internal/widget/ILockSettings;->getLong(Ljava/lang/String;JI)J
+Lcom/android/internal/widget/ILockSettings;->getString(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
+Lcom/android/internal/widget/ILockSettings;->havePassword(I)Z
+Lcom/android/internal/widget/ILockSettings;->havePattern(I)Z
+Lcom/android/internal/widget/ILockSettings;->setBoolean(Ljava/lang/String;ZI)V
+Lcom/android/internal/widget/ILockSettings;->setLong(Ljava/lang/String;JI)V
+Lcom/android/internal/widget/ILockSettings;->setString(Ljava/lang/String;Ljava/lang/String;I)V
+Lcom/android/internal/widget/IRemoteViewsFactory$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/widget/IRemoteViewsFactory;
+Lcom/android/internal/widget/IRemoteViewsFactory;->getCount()I
+Lcom/android/internal/widget/IRemoteViewsFactory;->getItemId(I)J
+Lcom/android/internal/widget/IRemoteViewsFactory;->getLoadingView()Landroid/widget/RemoteViews;
+Lcom/android/internal/widget/IRemoteViewsFactory;->getViewAt(I)Landroid/widget/RemoteViews;
+Lcom/android/internal/widget/IRemoteViewsFactory;->getViewTypeCount()I
+Lcom/android/internal/widget/IRemoteViewsFactory;->hasStableIds()Z
+Lcom/android/internal/widget/IRemoteViewsFactory;->isCreated()Z
+Lcom/android/internal/widget/IRemoteViewsFactory;->onDataSetChanged()V
+Lcom/android/internal/widget/ScrollingTabContainerView;-><init>(Landroid/content/Context;)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->addTab(Landroid/app/ActionBar$Tab;IZ)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->addTab(Landroid/app/ActionBar$Tab;Z)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->animateToTab(I)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->animateToVisibility(I)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->removeAllTabs()V
+Lcom/android/internal/widget/ScrollingTabContainerView;->removeTabAt(I)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->setAllowCollapse(Z)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->setTabSelected(I)V
+Lcom/android/internal/widget/ScrollingTabContainerView;->updateTab(I)V
+Lcom/android/okhttp/Connection;->getSocket()Ljava/net/Socket;
+Lcom/android/okhttp/ConnectionPool;->connections:Ljava/util/Deque;
+Lcom/android/okhttp/ConnectionPool;->keepAliveDurationNs:J
+Lcom/android/okhttp/ConnectionPool;->maxIdleConnections:I
+Lcom/android/okhttp/ConnectionPool;->systemDefault:Lcom/android/okhttp/ConnectionPool;
+Lcom/android/okhttp/HttpUrl$Builder;->build()Lcom/android/okhttp/HttpUrl;
+Lcom/android/okhttp/HttpUrl;->encodedPath()Ljava/lang/String;
+Lcom/android/okhttp/HttpUrl;->newBuilder()Lcom/android/okhttp/HttpUrl$Builder;
+Lcom/android/okhttp/HttpUrl;->parse(Ljava/lang/String;)Lcom/android/okhttp/HttpUrl;
+Lcom/android/okhttp/HttpUrl;->query()Ljava/lang/String;
+Lcom/android/okhttp/internal/http/HttpEngine;->getConnection()Lcom/android/okhttp/Connection;
+Lcom/android/okhttp/internal/http/HttpEngine;->hasResponse()Z
+Lcom/android/okhttp/internal/http/HttpEngine;->httpStream:Lcom/android/okhttp/internal/http/HttpStream;
+Lcom/android/okhttp/internal/http/HttpEngine;->networkRequest(Lcom/android/okhttp/Request;)Lcom/android/okhttp/Request;
+Lcom/android/okhttp/internal/http/HttpEngine;->networkRequest:Lcom/android/okhttp/Request;
+Lcom/android/okhttp/internal/http/HttpEngine;->priorResponse:Lcom/android/okhttp/Response;
+Lcom/android/okhttp/internal/http/HttpEngine;->readResponse()V
+Lcom/android/okhttp/internal/http/HttpEngine;->sendRequest()V
+Lcom/android/okhttp/internal/http/HttpEngine;->sentRequestMillis:J
+Lcom/android/okhttp/internal/http/HttpEngine;->userResponse:Lcom/android/okhttp/Response;
+Lcom/android/okhttp/internal/http/HttpEngine;->writingRequestHeaders()V
+Lcom/android/okhttp/internal/http/RouteSelector;->hasNext()Z
+Lcom/android/okhttp/OkHttpClient;-><init>()V
+Lcom/android/okhttp/OkHttpClient;->connectionPool:Lcom/android/okhttp/ConnectionPool;
+Lcom/android/okhttp/OkHttpClient;->DEFAULT_PROTOCOLS:Ljava/util/List;
+Lcom/android/okhttp/OkHttpClient;->dns:Lcom/android/okhttp/Dns;
+Lcom/android/okhttp/OkHttpClient;->getConnectionPool()Lcom/android/okhttp/ConnectionPool;
+Lcom/android/okhttp/OkHttpClient;->getCookieHandler()Ljava/net/CookieHandler;
+Lcom/android/okhttp/OkHttpClient;->getHostnameVerifier()Ljavax/net/ssl/HostnameVerifier;
+Lcom/android/okhttp/OkHttpClient;->getProxy()Ljava/net/Proxy;
+Lcom/android/okhttp/OkHttpClient;->getProxySelector()Ljava/net/ProxySelector;
+Lcom/android/okhttp/OkHttpClient;->getSslSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
+Lcom/android/okhttp/OkHttpClient;->setProtocols(Ljava/util/List;)Lcom/android/okhttp/OkHttpClient;
+Lcom/android/okhttp/OkHttpClient;->setRetryOnConnectionFailure(Z)V
+Lcom/android/okhttp/okio/ByteString;->readObject(Ljava/io/ObjectInputStream;)V
+Lcom/android/okhttp/okio/ByteString;->serialVersionUID:J
+Lcom/android/okhttp/okio/ByteString;->writeObject(Ljava/io/ObjectOutputStream;)V
+Lcom/android/okhttp/Request;->headers:Lcom/android/okhttp/Headers;
+Lcom/android/okhttp/Request;->method:Ljava/lang/String;
+Lcom/android/okhttp/Request;->url:Lcom/android/okhttp/HttpUrl;
+Lcom/android/okhttp/Response;->code:I
+Lcom/android/okhttp/Response;->headers:Lcom/android/okhttp/Headers;
+Lcom/android/okhttp/Response;->message:Ljava/lang/String;
+Lcom/android/okhttp/Response;->networkResponse:Lcom/android/okhttp/Response;
+Lcom/android/okhttp/Response;->protocol:Lcom/android/okhttp/Protocol;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getAlpnSelectedProtocol()[B
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getApplicationProtocol()Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getApplicationProtocols()[Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getChannelId()[B
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getHandshakeApplicationProtocol()Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getHostname()Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getHostnameOrIP()Ljava/lang/String;
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getNpnSelectedProtocol()[B
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->getSoWriteTimeout()I
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setAlpnProtocols([B)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setAlpnProtocols([Ljava/lang/String;)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setApplicationProtocols([Ljava/lang/String;)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setChannelIdEnabled(Z)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setChannelIdPrivateKey(Ljava/security/PrivateKey;)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setHandshakeTimeout(I)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setHostname(Ljava/lang/String;)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setNpnProtocols([B)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setSoWriteTimeout(I)V
+Lcom/android/org/conscrypt/AbstractConscryptSocket;->setUseSessionTickets(Z)V
+Lcom/android/org/conscrypt/ConscryptSocketBase;->getHostname()Ljava/lang/String;
+Lcom/android/org/conscrypt/ConscryptSocketBase;->getHostnameOrIP()Ljava/lang/String;
+Lcom/android/org/conscrypt/ConscryptSocketBase;->getSoWriteTimeout()I
+Lcom/android/org/conscrypt/ConscryptSocketBase;->setHandshakeTimeout(I)V
+Lcom/android/org/conscrypt/ConscryptSocketBase;->setHostname(Ljava/lang/String;)V
+Lcom/android/org/conscrypt/ConscryptSocketBase;->setSoWriteTimeout(I)V
+Lcom/android/org/conscrypt/ConscryptSocketBase;->socket:Ljava/net/Socket;
+Lcom/android/org/conscrypt/OpenSSLKey;-><init>(J)V
+Lcom/android/org/conscrypt/OpenSSLKey;->fromPrivateKey(Ljava/security/PrivateKey;)Lcom/android/org/conscrypt/OpenSSLKey;
+Lcom/android/org/conscrypt/OpenSSLKey;->getNativeRef()Lcom/android/org/conscrypt/NativeRef$EVP_PKEY;
+Lcom/android/org/conscrypt/OpenSSLKey;->getPublicKey()Ljava/security/PublicKey;
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getChannelId()[B
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getHostname()Ljava/lang/String;
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getHostnameOrIP()Ljava/lang/String;
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getNpnSelectedProtocol()[B
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getSoWriteTimeout()I
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([Ljava/lang/String;)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setChannelIdEnabled(Z)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setChannelIdPrivateKey(Ljava/security/PrivateKey;)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setHandshakeTimeout(I)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setHostname(Ljava/lang/String;)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setNpnProtocols([B)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setSoWriteTimeout(I)V
+Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V
+Lcom/android/org/conscrypt/OpenSSLX509Certificate;->fromX509PemInputStream(Ljava/io/InputStream;)Lcom/android/org/conscrypt/OpenSSLX509Certificate;
+Lcom/android/org/conscrypt/OpenSSLX509Certificate;->mContext:J
+Lcom/android/org/conscrypt/OpenSSLX509Certificate;->serialVersionUID:J
+Lcom/android/org/conscrypt/OpenSSLX509CertificateFactory$ParsingException;->serialVersionUID:J
+Lcom/android/org/conscrypt/TrustedCertificateStore;-><init>()V
+Lcom/android/org/conscrypt/TrustedCertificateStore;->getCertificateChain(Ljava/security/cert/X509Certificate;)Ljava/util/List;
+Lcom/android/org/conscrypt/TrustManagerImpl;-><init>(Ljava/security/KeyStore;)V
+Lcom/android/org/conscrypt/TrustManagerImpl;->checkServerTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
+Ldalvik/system/BaseDexClassLoader;-><init>(Ljava/lang/String;Ljava/io/File;Ljava/lang/String;Ljava/lang/ClassLoader;Z)V
+Ldalvik/system/BaseDexClassLoader;->addDexPath(Ljava/lang/String;)V
+Ldalvik/system/BaseDexClassLoader;->addDexPath(Ljava/lang/String;Z)V
+Ldalvik/system/BaseDexClassLoader;->getLdLibraryPath()Ljava/lang/String;
+Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList;
+Ldalvik/system/BlockGuard$BlockGuardPolicyException;-><init>(IILjava/lang/String;)V
+Ldalvik/system/BlockGuard$Policy;->onNetwork()V
+Ldalvik/system/BlockGuard$Policy;->onReadFromDisk()V
+Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy;
+Ldalvik/system/BlockGuard;->LAX_POLICY:Ldalvik/system/BlockGuard$Policy;
+Ldalvik/system/BlockGuard;->setThreadPolicy(Ldalvik/system/BlockGuard$Policy;)V
+Ldalvik/system/CloseGuard;->close()V
+Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard;
+Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V
+Ldalvik/system/CloseGuard;->setEnabled(Z)V
+Ldalvik/system/CloseGuard;->setReporter(Ldalvik/system/CloseGuard$Reporter;)V
+Ldalvik/system/CloseGuard;->warnIfOpen()V
+Ldalvik/system/DexFile$DFEnum;->mNameList:[Ljava/lang/String;
+Ldalvik/system/DexFile;->getClassNameList(Ljava/lang/Object;)[Ljava/lang/String;
+Ldalvik/system/DexFile;->isBackedByOatFile()Z
+Ldalvik/system/DexFile;->loadClassBinaryName(Ljava/lang/String;Ljava/lang/ClassLoader;Ljava/util/List;)Ljava/lang/Class;
+Ldalvik/system/DexFile;->loadDex(Ljava/lang/String;Ljava/lang/String;ILjava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ldalvik/system/DexFile;
+Ldalvik/system/DexFile;->mCookie:Ljava/lang/Object;
+Ldalvik/system/DexFile;->mFileName:Ljava/lang/String;
+Ldalvik/system/DexFile;->mInternalCookie:Ljava/lang/Object;
+Ldalvik/system/DexFile;->openDexFile(Ljava/lang/String;Ljava/lang/String;ILjava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ljava/lang/Object;
+Ldalvik/system/DexFile;->openDexFileNative(Ljava/lang/String;Ljava/lang/String;ILjava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ljava/lang/Object;
+Ldalvik/system/DexPathList$Element;-><init>(Ldalvik/system/DexFile;Ljava/io/File;)V
+Ldalvik/system/DexPathList$Element;-><init>(Ljava/io/File;ZLjava/io/File;Ldalvik/system/DexFile;)V
+Ldalvik/system/DexPathList$Element;->dexFile:Ldalvik/system/DexFile;
+Ldalvik/system/DexPathList$Element;->path:Ljava/io/File;
+Ldalvik/system/DexPathList$NativeLibraryElement;-><init>(Ljava/io/File;)V
+Ldalvik/system/DexPathList$NativeLibraryElement;->path:Ljava/io/File;
+Ldalvik/system/DexPathList;-><init>(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)V
+Ldalvik/system/DexPathList;->addDexPath(Ljava/lang/String;Ljava/io/File;)V
+Ldalvik/system/DexPathList;->addNativePath(Ljava/util/Collection;)V
+Ldalvik/system/DexPathList;->definingContext:Ljava/lang/ClassLoader;
+Ldalvik/system/DexPathList;->dexElements:[Ldalvik/system/DexPathList$Element;
+Ldalvik/system/DexPathList;->dexElementsSuppressedExceptions:[Ljava/io/IOException;
+Ldalvik/system/DexPathList;->loadDexFile(Ljava/io/File;Ljava/io/File;Ljava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ldalvik/system/DexFile;
+Ldalvik/system/DexPathList;->makeDexElements(Ljava/util/List;Ljava/io/File;Ljava/util/List;Ljava/lang/ClassLoader;)[Ldalvik/system/DexPathList$Element;
+Ldalvik/system/DexPathList;->makeInMemoryDexElements([Ljava/nio/ByteBuffer;Ljava/util/List;)[Ldalvik/system/DexPathList$Element;
+Ldalvik/system/DexPathList;->makePathElements(Ljava/util/List;)[Ldalvik/system/DexPathList$NativeLibraryElement;
+Ldalvik/system/DexPathList;->makePathElements(Ljava/util/List;Ljava/io/File;Ljava/util/List;)[Ldalvik/system/DexPathList$Element;
+Ldalvik/system/DexPathList;->nativeLibraryDirectories:Ljava/util/List;
+Ldalvik/system/DexPathList;->nativeLibraryPathElements:[Ldalvik/system/DexPathList$NativeLibraryElement;
+Ldalvik/system/DexPathList;->splitPaths(Ljava/lang/String;Z)Ljava/util/List;
+Ldalvik/system/DexPathList;->systemNativeLibraryDirectories:Ljava/util/List;
+Ldalvik/system/SocketTagger;->get()Ldalvik/system/SocketTagger;
+Ldalvik/system/SocketTagger;->tag(Ljava/net/Socket;)V
+Ldalvik/system/SocketTagger;->untag(Ljava/net/Socket;)V
+Ldalvik/system/VMDebug;->allowHiddenApiReflectionFrom(Ljava/lang/Class;)V
+Ldalvik/system/VMDebug;->dumpReferenceTables()V
+Ldalvik/system/VMDebug;->isDebuggerConnected()Z
+Ldalvik/system/VMRuntime;->addressOf(Ljava/lang/Object;)J
+Ldalvik/system/VMRuntime;->clearGrowthLimit()V
+Ldalvik/system/VMRuntime;->gcSoftReferences()V
+Ldalvik/system/VMRuntime;->getCurrentInstructionSet()Ljava/lang/String;
+Ldalvik/system/VMRuntime;->getExternalBytesAllocated()J
+Ldalvik/system/VMRuntime;->getInstructionSet(Ljava/lang/String;)Ljava/lang/String;
+Ldalvik/system/VMRuntime;->getMinimumHeapSize()J
+Ldalvik/system/VMRuntime;->getRuntime()Ldalvik/system/VMRuntime;
+Ldalvik/system/VMRuntime;->is64Bit()Z
+Ldalvik/system/VMRuntime;->is64BitAbi(Ljava/lang/String;)Z
+Ldalvik/system/VMRuntime;->newNonMovableArray(Ljava/lang/Class;I)Ljava/lang/Object;
+Ldalvik/system/VMRuntime;->registerNativeAllocation(I)V
+Ldalvik/system/VMRuntime;->registerNativeFree(I)V
+Ldalvik/system/VMRuntime;->runFinalization(J)V
+Ldalvik/system/VMRuntime;->runFinalizationSync()V
+Ldalvik/system/VMRuntime;->setMinimumHeapSize(J)J
+Ldalvik/system/VMRuntime;->setTargetHeapUtilization(F)F
+Ldalvik/system/VMRuntime;->setTargetSdkVersion(I)V
+Ldalvik/system/VMRuntime;->trackExternalAllocation(J)Z
+Ldalvik/system/VMRuntime;->trackExternalFree(J)V
+Ldalvik/system/VMRuntime;->vmInstructionSet()Ljava/lang/String;
+Ldalvik/system/VMRuntime;->vmLibrary()Ljava/lang/String;
+Ldalvik/system/VMStack;->fillStackTraceElements(Ljava/lang/Thread;[Ljava/lang/StackTraceElement;)I
+Ldalvik/system/VMStack;->getCallingClassLoader()Ljava/lang/ClassLoader;
+Ldalvik/system/VMStack;->getStackClass2()Ljava/lang/Class;
+Ldalvik/system/VMStack;->getThreadStackTrace(Ljava/lang/Thread;)[Ljava/lang/StackTraceElement;
+Ljava/awt/font/NumericShaper;->serialVersionUID:J
+Ljava/awt/font/NumericShaper;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/awt/font/TextAttribute;->serialVersionUID:J
+Ljava/beans/IndexedPropertyChangeEvent;->serialVersionUID:J
+Ljava/beans/PropertyChangeEvent;->serialVersionUID:J
+Ljava/beans/PropertyChangeSupport;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/beans/PropertyChangeSupport;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/beans/PropertyChangeSupport;->serialVersionUID:J
+Ljava/beans/PropertyChangeSupport;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/io/CharConversionException;->serialVersionUID:J
+Ljava/io/Console;->encoding()Ljava/lang/String;
+Ljava/io/EOFException;->serialVersionUID:J
+Ljava/io/File;->filePath:Ljava/nio/file/Path;
+Ljava/io/File;->fs:Ljava/io/FileSystem;
+Ljava/io/File;->path:Ljava/lang/String;
+Ljava/io/File;->prefixLength:I
+Ljava/io/File;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/io/File;->serialVersionUID:J
+Ljava/io/File;->status:Ljava/io/File$PathStatus;
+Ljava/io/File;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/io/FileDescriptor;->descriptor:I
+Ljava/io/FileDescriptor;->getInt$()I
+Ljava/io/FileDescriptor;->isSocket$()Z
+Ljava/io/FileDescriptor;->setInt$(I)V
+Ljava/io/FileInputStream;->fd:Ljava/io/FileDescriptor;
+Ljava/io/FileNotFoundException;->serialVersionUID:J
+Ljava/io/FileOutputStream;->channel:Ljava/nio/channels/FileChannel;
+Ljava/io/FileOutputStream;->fd:Ljava/io/FileDescriptor;
+Ljava/io/FileSystem;->canonicalize(Ljava/lang/String;)Ljava/lang/String;
+Ljava/io/FileSystem;->checkAccess(Ljava/io/File;I)Z
+Ljava/io/FileSystem;->compare(Ljava/io/File;Ljava/io/File;)I
+Ljava/io/FileSystem;->createDirectory(Ljava/io/File;)Z
+Ljava/io/FileSystem;->createFileExclusively(Ljava/lang/String;)Z
+Ljava/io/FileSystem;->delete(Ljava/io/File;)Z
+Ljava/io/FileSystem;->fromURIPath(Ljava/lang/String;)Ljava/lang/String;
+Ljava/io/FileSystem;->getBooleanAttributes(Ljava/io/File;)I
+Ljava/io/FileSystem;->getDefaultParent()Ljava/lang/String;
+Ljava/io/FileSystem;->getLastModifiedTime(Ljava/io/File;)J
+Ljava/io/FileSystem;->getLength(Ljava/io/File;)J
+Ljava/io/FileSystem;->getPathSeparator()C
+Ljava/io/FileSystem;->getSeparator()C
+Ljava/io/FileSystem;->getSpace(Ljava/io/File;I)J
+Ljava/io/FileSystem;->hashCode(Ljava/io/File;)I
+Ljava/io/FileSystem;->isAbsolute(Ljava/io/File;)Z
+Ljava/io/FileSystem;->list(Ljava/io/File;)[Ljava/lang/String;
+Ljava/io/FileSystem;->listRoots()[Ljava/io/File;
+Ljava/io/FileSystem;->normalize(Ljava/lang/String;)Ljava/lang/String;
+Ljava/io/FileSystem;->prefixLength(Ljava/lang/String;)I
+Ljava/io/FileSystem;->rename(Ljava/io/File;Ljava/io/File;)Z
+Ljava/io/FileSystem;->resolve(Ljava/io/File;)Ljava/lang/String;
+Ljava/io/FileSystem;->resolve(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
+Ljava/io/FileSystem;->setLastModifiedTime(Ljava/io/File;J)Z
+Ljava/io/FileSystem;->setPermission(Ljava/io/File;IZZ)Z
+Ljava/io/FileSystem;->setReadOnly(Ljava/io/File;)Z
+Ljava/io/InterruptedIOException;->serialVersionUID:J
+Ljava/io/InvalidClassException;->serialVersionUID:J
+Ljava/io/InvalidObjectException;->serialVersionUID:J
+Ljava/io/IOError;->serialVersionUID:J
+Ljava/io/IOException;->serialVersionUID:J
+Ljava/io/NotActiveException;->serialVersionUID:J
+Ljava/io/NotSerializableException;->serialVersionUID:J
+Ljava/io/ObjectInputStream;->bin:Ljava/io/ObjectInputStream$BlockDataInputStream;
+Ljava/io/ObjectInputStream;->bytesToDoubles([BI[DII)V
+Ljava/io/ObjectInputStream;->bytesToFloats([BI[FII)V
+Ljava/io/ObjectOutputStream;->protocol:I
+Ljava/io/ObjectStreamClass;->computeDefaultSUID(Ljava/lang/Class;)J
+Ljava/io/ObjectStreamClass;->computeFieldOffsets()V
+Ljava/io/ObjectStreamClass;->fields:[Ljava/io/ObjectStreamField;
+Ljava/io/ObjectStreamClass;->getConstructorId(Ljava/lang/Class;)J
+Ljava/io/ObjectStreamClass;->getLocalDesc()Ljava/io/ObjectStreamClass;
+Ljava/io/ObjectStreamClass;->getNumObjFields()I
+Ljava/io/ObjectStreamClass;->getPrimDataSize()I
+Ljava/io/ObjectStreamClass;->hasReadObjectMethod()Z
+Ljava/io/ObjectStreamClass;->hasReadObjectNoDataMethod()Z
+Ljava/io/ObjectStreamClass;->hasWriteObjectData()Z
+Ljava/io/ObjectStreamClass;->newInstance()Ljava/lang/Object;
+Ljava/io/ObjectStreamClass;->newInstance(Ljava/lang/Class;J)Ljava/lang/Object;
+Ljava/io/ObjectStreamClass;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/io/ObjectStreamClass;->serialVersionUID:J
+Ljava/io/ObjectStreamException;->serialVersionUID:J
+Ljava/io/ObjectStreamField;->getField()Ljava/lang/reflect/Field;
+Ljava/io/OptionalDataException;->serialVersionUID:J
+Ljava/io/RandomAccessFile;->fd:Ljava/io/FileDescriptor;
+Ljava/io/StreamCorruptedException;->serialVersionUID:J
+Ljava/io/SyncFailedException;->serialVersionUID:J
+Ljava/io/UncheckedIOException;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/io/UncheckedIOException;->serialVersionUID:J
+Ljava/io/UnsupportedEncodingException;->serialVersionUID:J
+Ljava/io/UTFDataFormatException;->serialVersionUID:J
+Ljava/io/WriteAbortedException;->serialVersionUID:J
+Ljava/lang/AbstractMethodError;->serialVersionUID:J
+Ljava/lang/AbstractStringBuilder;->value:[C
+Ljava/lang/annotation/AnnotationFormatError;->serialVersionUID:J
+Ljava/lang/annotation/AnnotationTypeMismatchException;->serialVersionUID:J
+Ljava/lang/annotation/IncompleteAnnotationException;->serialVersionUID:J
+Ljava/lang/ArithmeticException;->serialVersionUID:J
+Ljava/lang/ArrayIndexOutOfBoundsException;->serialVersionUID:J
+Ljava/lang/ArrayStoreException;->serialVersionUID:J
+Ljava/lang/AssertionError;->serialVersionUID:J
+Ljava/lang/Boolean;->serialVersionUID:J
+Ljava/lang/Boolean;->value:Z
+Ljava/lang/BootstrapMethodError;->serialVersionUID:J
+Ljava/lang/Byte;->serialVersionUID:J
+Ljava/lang/Byte;->toHexString(BZ)Ljava/lang/String;
+Ljava/lang/Byte;->value:B
+Ljava/lang/Character;->serialVersionUID:J
+Ljava/lang/Character;->value:C
+Ljava/lang/Class;-><init>()V
+Ljava/lang/Class;->accessFlags:I
+Ljava/lang/Class;->classLoader:Ljava/lang/ClassLoader;
+Ljava/lang/Class;->clinitThreadId:I
+Ljava/lang/Class;->dexCache:Ljava/lang/Object;
+Ljava/lang/Class;->dexClassDefIndex:I
+Ljava/lang/Class;->getDeclaredMethodsUnchecked(Z)[Ljava/lang/reflect/Method;
+Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;Z)Ljava/lang/reflect/Method;
+Ljava/lang/Class;->ifTable:[Ljava/lang/Object;
+Ljava/lang/Class;->name:Ljava/lang/String;
+Ljava/lang/Class;->objectSize:I
+Ljava/lang/Class;->serialVersionUID:J
+Ljava/lang/Class;->status:I
+Ljava/lang/ClassCastException;->serialVersionUID:J
+Ljava/lang/ClassCircularityError;->serialVersionUID:J
+Ljava/lang/ClassFormatError;->serialVersionUID:J
+Ljava/lang/ClassLoader;->parent:Ljava/lang/ClassLoader;
+Ljava/lang/ClassNotFoundException;->serialVersionUID:J
+Ljava/lang/CloneNotSupportedException;->serialVersionUID:J
+Ljava/lang/Daemons$Daemon;->isRunning()Z
+Ljava/lang/Daemons$Daemon;->start()V
+Ljava/lang/Daemons$Daemon;->stop()V
+Ljava/lang/Daemons$Daemon;->thread:Ljava/lang/Thread;
+Ljava/lang/Daemons$FinalizerDaemon;->finalizingObject:Ljava/lang/Object;
+Ljava/lang/Daemons$FinalizerDaemon;->INSTANCE:Ljava/lang/Daemons$FinalizerDaemon;
+Ljava/lang/Daemons$FinalizerWatchdogDaemon;->INSTANCE:Ljava/lang/Daemons$FinalizerWatchdogDaemon;
+Ljava/lang/Daemons$ReferenceQueueDaemon;->INSTANCE:Ljava/lang/Daemons$ReferenceQueueDaemon;
+Ljava/lang/Daemons;->MAX_FINALIZE_NANOS:J
+Ljava/lang/Daemons;->requestHeapTrim()V
+Ljava/lang/Daemons;->start()V
+Ljava/lang/Daemons;->stop()V
+Ljava/lang/Double;->serialVersionUID:J
+Ljava/lang/Double;->value:D
+Ljava/lang/Enum;->getSharedConstants(Ljava/lang/Class;)[Ljava/lang/Enum;
+Ljava/lang/Enum;->name:Ljava/lang/String;
+Ljava/lang/Enum;->ordinal:I
+Ljava/lang/Enum;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/lang/Enum;->readObjectNoData()V
+Ljava/lang/EnumConstantNotPresentException;->serialVersionUID:J
+Ljava/lang/Error;->serialVersionUID:J
+Ljava/lang/Exception;->serialVersionUID:J
+Ljava/lang/ExceptionInInitializerError;->serialVersionUID:J
+Ljava/lang/Float;->serialVersionUID:J
+Ljava/lang/Float;->value:F
+Ljava/lang/IllegalAccessError;->serialVersionUID:J
+Ljava/lang/IllegalAccessException;->serialVersionUID:J
+Ljava/lang/IllegalArgumentException;->serialVersionUID:J
+Ljava/lang/IllegalMonitorStateException;->serialVersionUID:J
+Ljava/lang/IllegalStateException;->serialVersionUID:J
+Ljava/lang/IllegalThreadStateException;->serialVersionUID:J
+Ljava/lang/IncompatibleClassChangeError;->serialVersionUID:J
+Ljava/lang/IndexOutOfBoundsException;->serialVersionUID:J
+Ljava/lang/InstantiationError;->serialVersionUID:J
+Ljava/lang/InstantiationException;->serialVersionUID:J
+Ljava/lang/Integer;->serialVersionUID:J
+Ljava/lang/Integer;->value:I
+Ljava/lang/InternalError;->serialVersionUID:J
+Ljava/lang/InterruptedException;->serialVersionUID:J
+Ljava/lang/invoke/LambdaConversionException;->serialVersionUID:J
+Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V
+Ljava/lang/invoke/MethodType;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/lang/invoke/MethodType;->readResolve()Ljava/lang/Object;
+Ljava/lang/invoke/MethodType;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/lang/invoke/MethodType;->serialVersionUID:J
+Ljava/lang/invoke/MethodType;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/lang/invoke/WrongMethodTypeException;->serialVersionUID:J
+Ljava/lang/LinkageError;->serialVersionUID:J
+Ljava/lang/Long;->serialVersionUID:J
+Ljava/lang/Long;->value:J
+Ljava/lang/NegativeArraySizeException;->serialVersionUID:J
+Ljava/lang/NoClassDefFoundError;->serialVersionUID:J
+Ljava/lang/NoSuchFieldError;->serialVersionUID:J
+Ljava/lang/NoSuchFieldException;->serialVersionUID:J
+Ljava/lang/NoSuchMethodError;->serialVersionUID:J
+Ljava/lang/NoSuchMethodException;->serialVersionUID:J
+Ljava/lang/NullPointerException;->serialVersionUID:J
+Ljava/lang/Number;->serialVersionUID:J
+Ljava/lang/NumberFormatException;->serialVersionUID:J
+Ljava/lang/Object;->identityHashCode(Ljava/lang/Object;)I
+Ljava/lang/OutOfMemoryError;->serialVersionUID:J
+Ljava/lang/ref/FinalizerReference;->add(Ljava/lang/Object;)V
+Ljava/lang/ref/FinalizerReference;->head:Ljava/lang/ref/FinalizerReference;
+Ljava/lang/ref/FinalizerReference;->next:Ljava/lang/ref/FinalizerReference;
+Ljava/lang/ref/FinalizerReference;->queue:Ljava/lang/ref/ReferenceQueue;
+Ljava/lang/ref/FinalizerReference;->remove(Ljava/lang/ref/FinalizerReference;)V
+Ljava/lang/ref/Reference;->getReferent()Ljava/lang/Object;
+Ljava/lang/ref/Reference;->referent:Ljava/lang/Object;
+Ljava/lang/ref/ReferenceQueue;->add(Ljava/lang/ref/Reference;)V
+Ljava/lang/reflect/AccessibleObject;->override:Z
+Ljava/lang/reflect/Constructor;->serializationCopy(Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
+Ljava/lang/reflect/Executable;->artMethod:J
+Ljava/lang/reflect/Field;->accessFlags:I
+Ljava/lang/reflect/Field;->getOffset()I
+Ljava/lang/reflect/GenericSignatureFormatError;->serialVersionUID:J
+Ljava/lang/reflect/InvocationTargetException;->serialVersionUID:J
+Ljava/lang/reflect/MalformedParameterizedTypeException;->serialVersionUID:J
+Ljava/lang/reflect/MalformedParametersException;->serialVersionUID:J
+Ljava/lang/reflect/Parameter;-><init>(Ljava/lang/String;ILjava/lang/reflect/Executable;I)V
+Ljava/lang/reflect/Proxy;->invoke(Ljava/lang/reflect/Proxy;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;
+Ljava/lang/reflect/Proxy;->serialVersionUID:J
+Ljava/lang/reflect/UndeclaredThrowableException;->serialVersionUID:J
+Ljava/lang/ReflectiveOperationException;->serialVersionUID:J
+Ljava/lang/Runtime;->load(Ljava/lang/String;Ljava/lang/ClassLoader;)V
+Ljava/lang/Runtime;->loadLibrary(Ljava/lang/String;Ljava/lang/ClassLoader;)V
+Ljava/lang/Runtime;->loadLibrary0(Ljava/lang/ClassLoader;Ljava/lang/String;)V
+Ljava/lang/Runtime;->mLibPaths:[Ljava/lang/String;
+Ljava/lang/Runtime;->nativeLoad(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/String;
+Ljava/lang/RuntimeException;->serialVersionUID:J
+Ljava/lang/RuntimePermission;->serialVersionUID:J
+Ljava/lang/SecurityException;->serialVersionUID:J
+Ljava/lang/Short;->serialVersionUID:J
+Ljava/lang/Short;->value:S
+Ljava/lang/StackOverflowError;->serialVersionUID:J
+Ljava/lang/StackTraceElement;->declaringClass:Ljava/lang/String;
+Ljava/lang/StackTraceElement;->fileName:Ljava/lang/String;
+Ljava/lang/StackTraceElement;->lineNumber:I
+Ljava/lang/StackTraceElement;->methodName:Ljava/lang/String;
+Ljava/lang/StackTraceElement;->serialVersionUID:J
+Ljava/lang/String$CaseInsensitiveComparator;->readResolve()Ljava/lang/Object;
+Ljava/lang/String$CaseInsensitiveComparator;->serialVersionUID:J
+Ljava/lang/String;-><init>(II[C)V
+Ljava/lang/String;->count:I
+Ljava/lang/String;->getCharsNoCheck(II[CI)V
+Ljava/lang/String;->hash:I
+Ljava/lang/String;->indexOf([CII[CIII)I
+Ljava/lang/String;->lastIndexOf([CII[CIII)I
+Ljava/lang/String;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/lang/String;->serialVersionUID:J
+Ljava/lang/StringBuffer;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/lang/StringBuffer;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/lang/StringBuffer;->serialVersionUID:J
+Ljava/lang/StringBuffer;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/lang/StringBuilder;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/lang/StringBuilder;->serialVersionUID:J
+Ljava/lang/StringBuilder;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/lang/StringIndexOutOfBoundsException;->serialVersionUID:J
+Ljava/lang/System;-><init>()V
+Ljava/lang/System;->arraycopy([BI[BII)V
+Ljava/lang/System;->arraycopy([CI[CII)V
+Ljava/lang/System;->arraycopy([FI[FII)V
+Ljava/lang/System;->arraycopy([II[III)V
+Ljava/lang/System;->arraycopy([JI[JII)V
+Ljava/lang/System;->arraycopy([SI[SII)V
+Ljava/lang/System;->arraycopy([ZI[ZII)V
+Ljava/lang/System;->log(CLjava/lang/String;Ljava/lang/Throwable;)V
+Ljava/lang/System;->logE(Ljava/lang/String;)V
+Ljava/lang/System;->logE(Ljava/lang/String;Ljava/lang/Throwable;)V
+Ljava/lang/System;->logW(Ljava/lang/String;Ljava/lang/Throwable;)V
+Ljava/lang/Thread;-><init>(Ljava/lang/ThreadGroup;Ljava/lang/String;IZ)V
+Ljava/lang/Thread;->contextClassLoader:Ljava/lang/ClassLoader;
+Ljava/lang/Thread;->daemon:Z
+Ljava/lang/Thread;->dispatchUncaughtException(Ljava/lang/Throwable;)V
+Ljava/lang/Thread;->getUncaughtExceptionPreHandler()Ljava/lang/Thread$UncaughtExceptionHandler;
+Ljava/lang/Thread;->group:Ljava/lang/ThreadGroup;
+Ljava/lang/Thread;->inheritableThreadLocals:Ljava/lang/ThreadLocal$ThreadLocalMap;
+Ljava/lang/Thread;->inheritedAccessControlContext:Ljava/security/AccessControlContext;
+Ljava/lang/Thread;->lock:Ljava/lang/Object;
+Ljava/lang/Thread;->name:Ljava/lang/String;
+Ljava/lang/Thread;->nativePeer:J
+Ljava/lang/Thread;->parkBlocker:Ljava/lang/Object;
+Ljava/lang/Thread;->priority:I
+Ljava/lang/Thread;->target:Ljava/lang/Runnable;
+Ljava/lang/Thread;->threadLocals:Ljava/lang/ThreadLocal$ThreadLocalMap;
+Ljava/lang/Thread;->threadSeqNumber:J
+Ljava/lang/ThreadDeath;->serialVersionUID:J
+Ljava/lang/ThreadGroup;->add(Ljava/lang/Thread;)V
+Ljava/lang/ThreadGroup;->groups:[Ljava/lang/ThreadGroup;
+Ljava/lang/ThreadGroup;->mainThreadGroup:Ljava/lang/ThreadGroup;
+Ljava/lang/ThreadGroup;->name:Ljava/lang/String;
+Ljava/lang/ThreadGroup;->ngroups:I
+Ljava/lang/ThreadGroup;->parent:Ljava/lang/ThreadGroup;
+Ljava/lang/ThreadGroup;->systemThreadGroup:Ljava/lang/ThreadGroup;
+Ljava/lang/ThreadGroup;->threadTerminated(Ljava/lang/Thread;)V
+Ljava/lang/ThreadLocal;->getMap(Ljava/lang/Thread;)Ljava/lang/ThreadLocal$ThreadLocalMap;
+Ljava/lang/Throwable;->backtrace:Ljava/lang/Object;
+Ljava/lang/Throwable;->cause:Ljava/lang/Throwable;
+Ljava/lang/Throwable;->detailMessage:Ljava/lang/String;
+Ljava/lang/Throwable;->getOurStackTrace()[Ljava/lang/StackTraceElement;
+Ljava/lang/Throwable;->nativeFillInStackTrace()Ljava/lang/Object;
+Ljava/lang/Throwable;->printStackTrace(Ljava/lang/Throwable$PrintStreamOrWriter;)V
+Ljava/lang/Throwable;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/lang/Throwable;->serialVersionUID:J
+Ljava/lang/Throwable;->stackTrace:[Ljava/lang/StackTraceElement;
+Ljava/lang/Throwable;->suppressedExceptions:Ljava/util/List;
+Ljava/lang/Throwable;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/lang/TypeNotPresentException;->serialVersionUID:J
+Ljava/lang/UnknownError;->serialVersionUID:J
+Ljava/lang/UnsatisfiedLinkError;->serialVersionUID:J
+Ljava/lang/UnsupportedClassVersionError;->serialVersionUID:J
+Ljava/lang/UnsupportedOperationException;->serialVersionUID:J
+Ljava/lang/VerifyError;->serialVersionUID:J
+Ljava/lang/VirtualMachineError;->serialVersionUID:J
+Ljava/lang/Void;-><init>()V
+Ljava/math/BigDecimal;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/math/BigDecimal;->serialVersionUID:J
+Ljava/math/BigDecimal;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/math/BigInteger;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/math/BigInteger;->serialVersionUID:J
+Ljava/math/BigInteger;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/math/MathContext;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/math/MathContext;->serialVersionUID:J
+Ljava/net/Authenticator;->theAuthenticator:Ljava/net/Authenticator;
+Ljava/net/BindException;->serialVersionUID:J
+Ljava/net/ConnectException;->serialVersionUID:J
+Ljava/net/DatagramSocket;->getFileDescriptor$()Ljava/io/FileDescriptor;
+Ljava/net/DatagramSocket;->impl:Ljava/net/DatagramSocketImpl;
+Ljava/net/HttpCookie;->assignors:Ljava/util/Map;
+Ljava/net/HttpCookie;->comment:Ljava/lang/String;
+Ljava/net/HttpCookie;->commentURL:Ljava/lang/String;
+Ljava/net/HttpCookie;->domain:Ljava/lang/String;
+Ljava/net/HttpCookie;->header:Ljava/lang/String;
+Ljava/net/HttpCookie;->httpOnly:Z
+Ljava/net/HttpCookie;->maxAge:J
+Ljava/net/HttpCookie;->name:Ljava/lang/String;
+Ljava/net/HttpCookie;->path:Ljava/lang/String;
+Ljava/net/HttpCookie;->portlist:Ljava/lang/String;
+Ljava/net/HttpCookie;->secure:Z
+Ljava/net/HttpCookie;->toDiscard:Z
+Ljava/net/HttpCookie;->tspecials:Ljava/lang/String;
+Ljava/net/HttpCookie;->value:Ljava/lang/String;
+Ljava/net/HttpCookie;->version:I
+Ljava/net/HttpCookie;->whenCreated:J
+Ljava/net/HttpRetryException;->serialVersionUID:J
+Ljava/net/Inet4Address;-><init>()V
+Ljava/net/Inet4Address;->ALL:Ljava/net/InetAddress;
+Ljava/net/Inet4Address;->ANY:Ljava/net/InetAddress;
+Ljava/net/Inet4Address;->serialVersionUID:J
+Ljava/net/Inet4Address;->writeReplace()Ljava/lang/Object;
+Ljava/net/Inet6Address$Inet6AddressHolder;->ipaddress:[B
+Ljava/net/Inet6Address$Inet6AddressHolder;->scope_id:I
+Ljava/net/Inet6Address$Inet6AddressHolder;->scope_id_set:Z
+Ljava/net/Inet6Address$Inet6AddressHolder;->scope_ifname:Ljava/net/NetworkInterface;
+Ljava/net/Inet6Address;-><init>()V
+Ljava/net/Inet6Address;->ANY:Ljava/net/InetAddress;
+Ljava/net/Inet6Address;->holder6:Ljava/net/Inet6Address$Inet6AddressHolder;
+Ljava/net/Inet6Address;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/net/Inet6Address;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/net/Inet6Address;->serialVersionUID:J
+Ljava/net/Inet6Address;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/net/InetAddress$InetAddressHolder;->address:I
+Ljava/net/InetAddress$InetAddressHolder;->family:I
+Ljava/net/InetAddress$InetAddressHolder;->hostName:Ljava/lang/String;
+Ljava/net/InetAddress$InetAddressHolder;->originalHostName:Ljava/lang/String;
+Ljava/net/InetAddress;->clearDnsCache()V
+Ljava/net/InetAddress;->getAllByNameOnNet(Ljava/lang/String;I)[Ljava/net/InetAddress;
+Ljava/net/InetAddress;->holder()Ljava/net/InetAddress$InetAddressHolder;
+Ljava/net/InetAddress;->holder:Ljava/net/InetAddress$InetAddressHolder;
+Ljava/net/InetAddress;->isNumeric(Ljava/lang/String;)Z
+Ljava/net/InetAddress;->parseNumericAddress(Ljava/lang/String;)Ljava/net/InetAddress;
+Ljava/net/InetAddress;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/net/InetAddress;->readResolve()Ljava/lang/Object;
+Ljava/net/InetAddress;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/net/InetAddress;->serialVersionUID:J
+Ljava/net/InetAddress;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/net/InetSocketAddress;->holder:Ljava/net/InetSocketAddress$InetSocketAddressHolder;
+Ljava/net/InetSocketAddress;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/net/InetSocketAddress;->readObjectNoData()V
+Ljava/net/InetSocketAddress;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/net/InetSocketAddress;->serialVersionUID:J
+Ljava/net/InetSocketAddress;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/net/InterfaceAddress;-><init>()V
+Ljava/net/MalformedURLException;->serialVersionUID:J
+Ljava/net/NoRouteToHostException;->serialVersionUID:J
+Ljava/net/PortUnreachableException;->serialVersionUID:J
+Ljava/net/ProtocolException;->serialVersionUID:J
+Ljava/net/Proxy;-><init>()V
+Ljava/net/ServerSocket;->factory:Ljava/net/SocketImplFactory;
+Ljava/net/Socket;->factory:Ljava/net/SocketImplFactory;
+Ljava/net/Socket;->getFileDescriptor$()Ljava/io/FileDescriptor;
+Ljava/net/Socket;->impl:Ljava/net/SocketImpl;
+Ljava/net/SocketAddress;->serialVersionUID:J
+Ljava/net/SocketException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
+Ljava/net/SocketException;->serialVersionUID:J
+Ljava/net/SocketImpl;->serverSocket:Ljava/net/ServerSocket;
+Ljava/net/SocketImpl;->socket:Ljava/net/Socket;
+Ljava/net/SocketTimeoutException;->serialVersionUID:J
+Ljava/net/UnknownHostException;->serialVersionUID:J
+Ljava/net/UnknownServiceException;->serialVersionUID:J
+Ljava/net/URI;->fragment:Ljava/lang/String;
+Ljava/net/URI;->host:Ljava/lang/String;
+Ljava/net/URI;->port:I
+Ljava/net/URI;->query:Ljava/lang/String;
+Ljava/net/URI;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/net/URI;->serialVersionUID:J
+Ljava/net/URI;->string:Ljava/lang/String;
+Ljava/net/URI;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/net/URISyntaxException;->serialVersionUID:J
+Ljava/net/URL;->factory:Ljava/net/URLStreamHandlerFactory;
+Ljava/net/URL;->handler:Ljava/net/URLStreamHandler;
+Ljava/net/URL;->handlers:Ljava/util/Hashtable;
+Ljava/net/URL;->protocol:Ljava/lang/String;
+Ljava/net/URL;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/net/URL;->readResolve()Ljava/lang/Object;
+Ljava/net/URL;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/net/URL;->serialVersionUID:J
+Ljava/net/URL;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/net/URLClassLoader;->acc:Ljava/security/AccessControlContext;
+Ljava/net/URLClassLoader;->ucp:Lsun/misc/URLClassPath;
+Ljava/nio/Buffer;->address:J
+Ljava/nio/Buffer;->capacity:I
+Ljava/nio/Buffer;->limit:I
+Ljava/nio/Buffer;->position:I
+Ljava/nio/Buffer;->_elementSizeShift:I
+Ljava/nio/BufferOverflowException;->serialVersionUID:J
+Ljava/nio/BufferUnderflowException;->serialVersionUID:J
+Ljava/nio/ByteBuffer;->hb:[B
+Ljava/nio/ByteBuffer;->isReadOnly:Z
+Ljava/nio/ByteBuffer;->offset:I
+Ljava/nio/channels/AcceptPendingException;->serialVersionUID:J
+Ljava/nio/channels/AlreadyBoundException;->serialVersionUID:J
+Ljava/nio/channels/AlreadyConnectedException;->serialVersionUID:J
+Ljava/nio/channels/AsynchronousCloseException;->serialVersionUID:J
+Ljava/nio/channels/CancelledKeyException;->serialVersionUID:J
+Ljava/nio/channels/ClosedByInterruptException;->serialVersionUID:J
+Ljava/nio/channels/ClosedChannelException;->serialVersionUID:J
+Ljava/nio/channels/ClosedSelectorException;->serialVersionUID:J
+Ljava/nio/channels/ConnectionPendingException;->serialVersionUID:J
+Ljava/nio/channels/FileLockInterruptionException;->serialVersionUID:J
+Ljava/nio/channels/IllegalBlockingModeException;->serialVersionUID:J
+Ljava/nio/channels/IllegalChannelGroupException;->serialVersionUID:J
+Ljava/nio/channels/IllegalSelectorException;->serialVersionUID:J
+Ljava/nio/channels/InterruptedByTimeoutException;->serialVersionUID:J
+Ljava/nio/channels/NoConnectionPendingException;->serialVersionUID:J
+Ljava/nio/channels/NonReadableChannelException;->serialVersionUID:J
+Ljava/nio/channels/NonWritableChannelException;->serialVersionUID:J
+Ljava/nio/channels/NotYetBoundException;->serialVersionUID:J
+Ljava/nio/channels/NotYetConnectedException;->serialVersionUID:J
+Ljava/nio/channels/OverlappingFileLockException;->serialVersionUID:J
+Ljava/nio/channels/ReadPendingException;->serialVersionUID:J
+Ljava/nio/channels/ShutdownChannelGroupException;->serialVersionUID:J
+Ljava/nio/channels/UnresolvedAddressException;->serialVersionUID:J
+Ljava/nio/channels/UnsupportedAddressTypeException;->serialVersionUID:J
+Ljava/nio/channels/WritePendingException;->serialVersionUID:J
+Ljava/nio/CharBuffer;->toString(II)Ljava/lang/String;
+Ljava/nio/charset/CharacterCodingException;->serialVersionUID:J
+Ljava/nio/charset/Charset;->defaultCharset:Ljava/nio/charset/Charset;
+Ljava/nio/charset/CharsetEncoder;->canEncode(Ljava/nio/CharBuffer;)Z
+Ljava/nio/charset/CoderMalfunctionError;->serialVersionUID:J
+Ljava/nio/charset/IllegalCharsetNameException;->serialVersionUID:J
+Ljava/nio/charset/MalformedInputException;->serialVersionUID:J
+Ljava/nio/charset/UnmappableCharacterException;->serialVersionUID:J
+Ljava/nio/charset/UnsupportedCharsetException;->serialVersionUID:J
+Ljava/nio/DirectByteBuffer;-><init>(JI)V
+Ljava/nio/file/AccessDeniedException;->serialVersionUID:J
+Ljava/nio/file/AtomicMoveNotSupportedException;->serialVersionUID:J
+Ljava/nio/file/attribute/UserPrincipalNotFoundException;->serialVersionUID:J
+Ljava/nio/file/ClosedDirectoryStreamException;->serialVersionUID:J
+Ljava/nio/file/ClosedFileSystemException;->serialVersionUID:J
+Ljava/nio/file/ClosedWatchServiceException;->serialVersionUID:J
+Ljava/nio/file/DirectoryIteratorException;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/nio/file/DirectoryIteratorException;->serialVersionUID:J
+Ljava/nio/file/DirectoryNotEmptyException;->serialVersionUID:J
+Ljava/nio/file/FileAlreadyExistsException;->serialVersionUID:J
+Ljava/nio/file/FileSystemAlreadyExistsException;->serialVersionUID:J
+Ljava/nio/file/FileSystemException;->serialVersionUID:J
+Ljava/nio/file/FileSystemLoopException;->serialVersionUID:J
+Ljava/nio/file/FileSystemNotFoundException;->serialVersionUID:J
+Ljava/nio/file/InvalidPathException;->serialVersionUID:J
+Ljava/nio/file/LinkPermission;->serialVersionUID:J
+Ljava/nio/file/NoSuchFileException;->serialVersionUID:J
+Ljava/nio/file/NotDirectoryException;->serialVersionUID:J
+Ljava/nio/file/NotLinkException;->serialVersionUID:J
+Ljava/nio/file/ProviderMismatchException;->serialVersionUID:J
+Ljava/nio/file/ProviderNotFoundException;->serialVersionUID:J
+Ljava/nio/file/ReadOnlyFileSystemException;->serialVersionUID:J
+Ljava/nio/InvalidMarkException;->serialVersionUID:J
+Ljava/nio/NIOAccess;->getBaseArray(Ljava/nio/Buffer;)Ljava/lang/Object;
+Ljava/nio/NIOAccess;->getBaseArrayOffset(Ljava/nio/Buffer;)I
+Ljava/nio/NIOAccess;->getBasePointer(Ljava/nio/Buffer;)J
+Ljava/nio/NioUtils;->freeDirectBuffer(Ljava/nio/ByteBuffer;)V
+Ljava/nio/NioUtils;->unsafeArray(Ljava/nio/ByteBuffer;)[B
+Ljava/nio/NioUtils;->unsafeArrayOffset(Ljava/nio/ByteBuffer;)I
+Ljava/nio/ReadOnlyBufferException;->serialVersionUID:J
+Ljava/security/AccessControlException;->serialVersionUID:J
+Ljava/security/acl/AclNotFoundException;->serialVersionUID:J
+Ljava/security/acl/LastOwnerException;->serialVersionUID:J
+Ljava/security/acl/NotOwnerException;->serialVersionUID:J
+Ljava/security/cert/Certificate$CertificateRep;->serialVersionUID:J
+Ljava/security/cert/Certificate;->serialVersionUID:J
+Ljava/security/cert/CertificateEncodingException;->serialVersionUID:J
+Ljava/security/cert/CertificateException;->serialVersionUID:J
+Ljava/security/cert/CertificateExpiredException;->serialVersionUID:J
+Ljava/security/cert/CertificateNotYetValidException;->serialVersionUID:J
+Ljava/security/cert/CertificateParsingException;->serialVersionUID:J
+Ljava/security/cert/CertificateRevokedException;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/security/cert/CertificateRevokedException;->serialVersionUID:J
+Ljava/security/cert/CertificateRevokedException;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/security/cert/CertPath$CertPathRep;->serialVersionUID:J
+Ljava/security/cert/CertPath;->serialVersionUID:J
+Ljava/security/cert/CertPathBuilderException;->serialVersionUID:J
+Ljava/security/cert/CertPathValidatorException;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/security/cert/CertPathValidatorException;->serialVersionUID:J
+Ljava/security/cert/CertStoreException;->serialVersionUID:J
+Ljava/security/cert/CRLException;->serialVersionUID:J
+Ljava/security/cert/X509Certificate;->serialVersionUID:J
+Ljava/security/CodeSigner;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/security/CodeSigner;->serialVersionUID:J
+Ljava/security/DigestException;->serialVersionUID:J
+Ljava/security/GeneralSecurityException;->serialVersionUID:J
+Ljava/security/GuardedObject;->serialVersionUID:J
+Ljava/security/GuardedObject;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/security/Identity;->serialVersionUID:J
+Ljava/security/IdentityScope;->serialVersionUID:J
+Ljava/security/InvalidAlgorithmParameterException;->serialVersionUID:J
+Ljava/security/InvalidKeyException;->serialVersionUID:J
+Ljava/security/InvalidParameterException;->serialVersionUID:J
+Ljava/security/KeyException;->serialVersionUID:J
+Ljava/security/KeyManagementException;->serialVersionUID:J
+Ljava/security/KeyPair;->serialVersionUID:J
+Ljava/security/KeyPairGenerator;->getInstance(Lsun/security/jca/GetInstance$Instance;Ljava/lang/String;)Ljava/security/KeyPairGenerator;
+Ljava/security/KeyRep;->serialVersionUID:J
+Ljava/security/KeyStore;->keyStoreSpi:Ljava/security/KeyStoreSpi;
+Ljava/security/KeyStoreException;->serialVersionUID:J
+Ljava/security/NoSuchAlgorithmException;->serialVersionUID:J
+Ljava/security/NoSuchProviderException;->serialVersionUID:J
+Ljava/security/PrivilegedActionException;->serialVersionUID:J
+Ljava/security/Provider;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/security/Provider;->serialVersionUID:J
+Ljava/security/ProviderException;->serialVersionUID:J
+Ljava/security/SecureRandom;->serialVersionUID:J
+Ljava/security/SecureRandomSpi;->serialVersionUID:J
+Ljava/security/Signature;->getInstance(Lsun/security/jca/GetInstance$Instance;Ljava/lang/String;)Ljava/security/Signature;
+Ljava/security/SignatureException;->serialVersionUID:J
+Ljava/security/SignedObject;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/security/SignedObject;->serialVersionUID:J
+Ljava/security/Signer;->serialVersionUID:J
+Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String;
+Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V
+Ljava/security/spec/InvalidKeySpecException;->serialVersionUID:J
+Ljava/security/spec/InvalidParameterSpecException;->serialVersionUID:J
+Ljava/security/Timestamp;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/security/Timestamp;->serialVersionUID:J
+Ljava/security/UnrecoverableEntryException;->serialVersionUID:J
+Ljava/security/UnrecoverableKeyException;->serialVersionUID:J
+Ljava/sql/BatchUpdateException;->serialVersionUID:J
+Ljava/sql/DataTruncation;->serialVersionUID:J
+Ljava/sql/Date;->serialVersionUID:J
+Ljava/sql/SQLClientInfoException;->serialVersionUID:J
+Ljava/sql/SQLDataException;->serialVersionUID:J
+Ljava/sql/SQLException;->serialVersionUID:J
+Ljava/sql/SQLFeatureNotSupportedException;->serialVersionUID:J
+Ljava/sql/SQLIntegrityConstraintViolationException;->serialVersionUID:J
+Ljava/sql/SQLInvalidAuthorizationSpecException;->serialVersionUID:J
+Ljava/sql/SQLNonTransientConnectionException;->serialVersionUID:J
+Ljava/sql/SQLNonTransientException;->serialVersionUID:J
+Ljava/sql/SQLRecoverableException;->serialVersionUID:J
+Ljava/sql/SQLSyntaxErrorException;->serialVersionUID:J
+Ljava/sql/SQLTimeoutException;->serialVersionUID:J
+Ljava/sql/SQLTransactionRollbackException;->serialVersionUID:J
+Ljava/sql/SQLTransientConnectionException;->serialVersionUID:J
+Ljava/sql/SQLTransientException;->serialVersionUID:J
+Ljava/sql/SQLWarning;->serialVersionUID:J
+Ljava/sql/Time;->serialVersionUID:J
+Ljava/sql/Timestamp;->serialVersionUID:J
+Ljava/text/AttributedCharacterIterator$Attribute;->serialVersionUID:J
+Ljava/text/ChoiceFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/text/ChoiceFormat;->serialVersionUID:J
+Ljava/text/Collator;->icuColl:Landroid/icu/text/Collator;
+Ljava/text/DateFormat$Field;->serialVersionUID:J
+Ljava/text/DateFormat;->is24Hour:Ljava/lang/Boolean;
+Ljava/text/DateFormat;->serialVersionUID:J
+Ljava/text/DateFormatSymbols;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/text/DateFormatSymbols;->serialVersionUID:J
+Ljava/text/DateFormatSymbols;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/text/DecimalFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/text/DecimalFormat;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/text/DecimalFormat;->serialVersionUID:J
+Ljava/text/DecimalFormat;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/text/DecimalFormatSymbols;->getPercentString()Ljava/lang/String;
+Ljava/text/DecimalFormatSymbols;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/text/DecimalFormatSymbols;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/text/DecimalFormatSymbols;->serialVersionUID:J
+Ljava/text/DecimalFormatSymbols;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/text/Format$Field;->serialVersionUID:J
+Ljava/text/Format;->serialVersionUID:J
+Ljava/text/MessageFormat$Field;->serialVersionUID:J
+Ljava/text/MessageFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/text/MessageFormat;->serialVersionUID:J
+Ljava/text/NumberFormat$Field;->serialVersionUID:J
+Ljava/text/NumberFormat;->getInstance(Ljava/util/Locale;I)Ljava/text/NumberFormat;
+Ljava/text/NumberFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/text/NumberFormat;->serialVersionUID:J
+Ljava/text/NumberFormat;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/text/ParseException;->serialVersionUID:J
+Ljava/text/SimpleDateFormat;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/text/SimpleDateFormat;->serialVersionUID:J
+Ljava/time/chrono/AbstractChronology;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/AbstractChronology;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/ChronoLocalDateImpl;->serialVersionUID:J
+Ljava/time/chrono/HijrahChronology;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/HijrahChronology;->serialVersionUID:J
+Ljava/time/chrono/HijrahChronology;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/HijrahDate;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/HijrahDate;->serialVersionUID:J
+Ljava/time/chrono/HijrahDate;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/IsoChronology;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/IsoChronology;->serialVersionUID:J
+Ljava/time/chrono/IsoChronology;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/JapaneseChronology;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/JapaneseChronology;->serialVersionUID:J
+Ljava/time/chrono/JapaneseChronology;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/JapaneseDate;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/JapaneseDate;->serialVersionUID:J
+Ljava/time/chrono/JapaneseDate;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/JapaneseEra;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/JapaneseEra;->serialVersionUID:J
+Ljava/time/chrono/JapaneseEra;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/MinguoChronology;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/MinguoChronology;->serialVersionUID:J
+Ljava/time/chrono/MinguoChronology;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/MinguoDate;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/MinguoDate;->serialVersionUID:J
+Ljava/time/chrono/MinguoDate;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/ThaiBuddhistChronology;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/ThaiBuddhistChronology;->serialVersionUID:J
+Ljava/time/chrono/ThaiBuddhistChronology;->writeReplace()Ljava/lang/Object;
+Ljava/time/chrono/ThaiBuddhistDate;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/chrono/ThaiBuddhistDate;->serialVersionUID:J
+Ljava/time/chrono/ThaiBuddhistDate;->writeReplace()Ljava/lang/Object;
+Ljava/time/Clock$FixedClock;->serialVersionUID:J
+Ljava/time/Clock$OffsetClock;->serialVersionUID:J
+Ljava/time/Clock$SystemClock;->serialVersionUID:J
+Ljava/time/Clock$TickClock;->serialVersionUID:J
+Ljava/time/DateTimeException;->serialVersionUID:J
+Ljava/time/Duration;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/Duration;->serialVersionUID:J
+Ljava/time/Duration;->toSeconds()Ljava/math/BigDecimal;
+Ljava/time/Duration;->writeReplace()Ljava/lang/Object;
+Ljava/time/format/DateTimeParseException;->serialVersionUID:J
+Ljava/time/Instant;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/Instant;->serialVersionUID:J
+Ljava/time/Instant;->writeReplace()Ljava/lang/Object;
+Ljava/time/LocalDate;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/LocalDate;->serialVersionUID:J
+Ljava/time/LocalDate;->writeReplace()Ljava/lang/Object;
+Ljava/time/LocalDateTime;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/LocalDateTime;->serialVersionUID:J
+Ljava/time/LocalDateTime;->writeReplace()Ljava/lang/Object;
+Ljava/time/LocalTime;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/LocalTime;->serialVersionUID:J
+Ljava/time/LocalTime;->writeReplace()Ljava/lang/Object;
+Ljava/time/MonthDay;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/MonthDay;->serialVersionUID:J
+Ljava/time/MonthDay;->writeReplace()Ljava/lang/Object;
+Ljava/time/OffsetDateTime;-><init>(Ljava/time/LocalDateTime;Ljava/time/ZoneOffset;)V
+Ljava/time/OffsetDateTime;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/OffsetDateTime;->serialVersionUID:J
+Ljava/time/OffsetDateTime;->writeReplace()Ljava/lang/Object;
+Ljava/time/OffsetTime;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/OffsetTime;->serialVersionUID:J
+Ljava/time/OffsetTime;->writeReplace()Ljava/lang/Object;
+Ljava/time/Period;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/Period;->serialVersionUID:J
+Ljava/time/Period;->writeReplace()Ljava/lang/Object;
+Ljava/time/temporal/JulianFields$Field;->serialVersionUID:J
+Ljava/time/temporal/UnsupportedTemporalTypeException;->serialVersionUID:J
+Ljava/time/temporal/ValueRange;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/temporal/ValueRange;->serialVersionUID:J
+Ljava/time/temporal/WeekFields;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/temporal/WeekFields;->readResolve()Ljava/lang/Object;
+Ljava/time/temporal/WeekFields;->serialVersionUID:J
+Ljava/time/Year;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/Year;->serialVersionUID:J
+Ljava/time/Year;->writeReplace()Ljava/lang/Object;
+Ljava/time/YearMonth;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/YearMonth;->serialVersionUID:J
+Ljava/time/YearMonth;->writeReplace()Ljava/lang/Object;
+Ljava/time/zone/ZoneOffsetTransition;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/zone/ZoneOffsetTransition;->serialVersionUID:J
+Ljava/time/zone/ZoneOffsetTransition;->writeReplace()Ljava/lang/Object;
+Ljava/time/zone/ZoneOffsetTransitionRule;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/zone/ZoneOffsetTransitionRule;->serialVersionUID:J
+Ljava/time/zone/ZoneOffsetTransitionRule;->writeReplace()Ljava/lang/Object;
+Ljava/time/zone/ZoneRules;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/zone/ZoneRules;->serialVersionUID:J
+Ljava/time/zone/ZoneRules;->writeReplace()Ljava/lang/Object;
+Ljava/time/zone/ZoneRulesException;->serialVersionUID:J
+Ljava/time/ZonedDateTime;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/ZonedDateTime;->serialVersionUID:J
+Ljava/time/ZonedDateTime;->writeReplace()Ljava/lang/Object;
+Ljava/time/ZoneId;->of(Ljava/lang/String;Z)Ljava/time/ZoneId;
+Ljava/time/ZoneId;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/ZoneId;->serialVersionUID:J
+Ljava/time/ZoneId;->writeReplace()Ljava/lang/Object;
+Ljava/time/ZoneOffset;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/time/ZoneOffset;->serialVersionUID:J
+Ljava/time/ZoneOffset;->writeReplace()Ljava/lang/Object;
+Ljava/util/AbstractMap$SimpleEntry;->serialVersionUID:J
+Ljava/util/AbstractMap$SimpleImmutableEntry;->serialVersionUID:J
+Ljava/util/ArrayDeque;->elements:[Ljava/lang/Object;
+Ljava/util/ArrayDeque;->head:I
+Ljava/util/ArrayDeque;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/ArrayDeque;->serialVersionUID:J
+Ljava/util/ArrayDeque;->tail:I
+Ljava/util/ArrayDeque;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/ArrayList$SubList;->offset:I
+Ljava/util/ArrayList$SubList;->parent:Ljava/util/AbstractList;
+Ljava/util/ArrayList$SubList;->parentOffset:I
+Ljava/util/ArrayList$SubList;->size:I
+Ljava/util/ArrayList;->elementData:[Ljava/lang/Object;
+Ljava/util/ArrayList;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/ArrayList;->serialVersionUID:J
+Ljava/util/ArrayList;->size:I
+Ljava/util/ArrayList;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/Arrays$ArrayList;->a:[Ljava/lang/Object;
+Ljava/util/Arrays$ArrayList;->serialVersionUID:J
+Ljava/util/Arrays;->checkOffsetAndCount(III)V
+Ljava/util/Arrays;->deepToString([Ljava/lang/Object;Ljava/lang/StringBuilder;Ljava/util/Set;)V
+Ljava/util/BitSet;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/BitSet;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/util/BitSet;->serialVersionUID:J
+Ljava/util/BitSet;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/Calendar;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/Calendar;->serialVersionUID:J
+Ljava/util/Calendar;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/Calendar;->zone:Ljava/util/TimeZone;
+Ljava/util/Collections$AsLIFOQueue;->serialVersionUID:J
+Ljava/util/Collections$CheckedCollection;->serialVersionUID:J
+Ljava/util/Collections$CheckedList;->serialVersionUID:J
+Ljava/util/Collections$CheckedMap;->serialVersionUID:J
+Ljava/util/Collections$CheckedNavigableMap;->serialVersionUID:J
+Ljava/util/Collections$CheckedNavigableSet;->serialVersionUID:J
+Ljava/util/Collections$CheckedQueue;->serialVersionUID:J
+Ljava/util/Collections$CheckedRandomAccessList;->serialVersionUID:J
+Ljava/util/Collections$CheckedSet;->serialVersionUID:J
+Ljava/util/Collections$CheckedSortedMap;->serialVersionUID:J
+Ljava/util/Collections$CheckedSortedSet;->serialVersionUID:J
+Ljava/util/Collections$CopiesList;->serialVersionUID:J
+Ljava/util/Collections$EmptyList;-><init>()V
+Ljava/util/Collections$EmptyList;->readResolve()Ljava/lang/Object;
+Ljava/util/Collections$EmptyList;->serialVersionUID:J
+Ljava/util/Collections$EmptyMap;-><init>()V
+Ljava/util/Collections$EmptyMap;->readResolve()Ljava/lang/Object;
+Ljava/util/Collections$EmptyMap;->serialVersionUID:J
+Ljava/util/Collections$EmptySet;->readResolve()Ljava/lang/Object;
+Ljava/util/Collections$EmptySet;->serialVersionUID:J
+Ljava/util/Collections$ReverseComparator2;->serialVersionUID:J
+Ljava/util/Collections$ReverseComparator;->readResolve()Ljava/lang/Object;
+Ljava/util/Collections$ReverseComparator;->serialVersionUID:J
+Ljava/util/Collections$SetFromMap;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/Collections$SetFromMap;->serialVersionUID:J
+Ljava/util/Collections$SingletonList;->serialVersionUID:J
+Ljava/util/Collections$SingletonMap;->serialVersionUID:J
+Ljava/util/Collections$SingletonSet;->serialVersionUID:J
+Ljava/util/Collections$SynchronizedCollection;->c:Ljava/util/Collection;
+Ljava/util/Collections$SynchronizedCollection;->serialVersionUID:J
+Ljava/util/Collections$SynchronizedCollection;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/Collections$SynchronizedList;->list:Ljava/util/List;
+Ljava/util/Collections$SynchronizedList;->readResolve()Ljava/lang/Object;
+Ljava/util/Collections$SynchronizedList;->serialVersionUID:J
+Ljava/util/Collections$SynchronizedMap;->m:Ljava/util/Map;
+Ljava/util/Collections$SynchronizedMap;->serialVersionUID:J
+Ljava/util/Collections$SynchronizedMap;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/Collections$SynchronizedNavigableMap;->serialVersionUID:J
+Ljava/util/Collections$SynchronizedNavigableSet;->serialVersionUID:J
+Ljava/util/Collections$SynchronizedRandomAccessList;->serialVersionUID:J
+Ljava/util/Collections$SynchronizedRandomAccessList;->writeReplace()Ljava/lang/Object;
+Ljava/util/Collections$SynchronizedSet;->serialVersionUID:J
+Ljava/util/Collections$SynchronizedSortedMap;->serialVersionUID:J
+Ljava/util/Collections$SynchronizedSortedSet;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableCollection;->c:Ljava/util/Collection;
+Ljava/util/Collections$UnmodifiableCollection;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableList;->readResolve()Ljava/lang/Object;
+Ljava/util/Collections$UnmodifiableList;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableMap$UnmodifiableEntrySet;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableMap;->m:Ljava/util/Map;
+Ljava/util/Collections$UnmodifiableMap;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableNavigableMap$EmptyNavigableMap;->readResolve()Ljava/lang/Object;
+Ljava/util/Collections$UnmodifiableNavigableMap$EmptyNavigableMap;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableNavigableMap;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableNavigableSet$EmptyNavigableSet;->readResolve()Ljava/lang/Object;
+Ljava/util/Collections$UnmodifiableNavigableSet$EmptyNavigableSet;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableNavigableSet;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableRandomAccessList;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableRandomAccessList;->writeReplace()Ljava/lang/Object;
+Ljava/util/Collections$UnmodifiableSet;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableSortedMap;->serialVersionUID:J
+Ljava/util/Collections$UnmodifiableSortedSet;->serialVersionUID:J
+Ljava/util/concurrent/ArrayBlockingQueue;->serialVersionUID:J
+Ljava/util/concurrent/atomic/AtomicBoolean;->serialVersionUID:J
+Ljava/util/concurrent/atomic/AtomicInteger;->serialVersionUID:J
+Ljava/util/concurrent/atomic/AtomicInteger;->value:I
+Ljava/util/concurrent/atomic/AtomicIntegerArray;->serialVersionUID:J
+Ljava/util/concurrent/atomic/AtomicLong;->serialVersionUID:J
+Ljava/util/concurrent/atomic/AtomicLongArray;->serialVersionUID:J
+Ljava/util/concurrent/atomic/AtomicReference;->serialVersionUID:J
+Ljava/util/concurrent/atomic/AtomicReferenceArray;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/atomic/AtomicReferenceArray;->serialVersionUID:J
+Ljava/util/concurrent/atomic/DoubleAccumulator$SerializationProxy;->readResolve()Ljava/lang/Object;
+Ljava/util/concurrent/atomic/DoubleAccumulator$SerializationProxy;->serialVersionUID:J
+Ljava/util/concurrent/atomic/DoubleAccumulator;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/atomic/DoubleAccumulator;->serialVersionUID:J
+Ljava/util/concurrent/atomic/DoubleAccumulator;->writeReplace()Ljava/lang/Object;
+Ljava/util/concurrent/atomic/DoubleAdder$SerializationProxy;->readResolve()Ljava/lang/Object;
+Ljava/util/concurrent/atomic/DoubleAdder$SerializationProxy;->serialVersionUID:J
+Ljava/util/concurrent/atomic/DoubleAdder;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/atomic/DoubleAdder;->serialVersionUID:J
+Ljava/util/concurrent/atomic/DoubleAdder;->writeReplace()Ljava/lang/Object;
+Ljava/util/concurrent/atomic/LongAccumulator$SerializationProxy;->readResolve()Ljava/lang/Object;
+Ljava/util/concurrent/atomic/LongAccumulator$SerializationProxy;->serialVersionUID:J
+Ljava/util/concurrent/atomic/LongAccumulator;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/atomic/LongAccumulator;->serialVersionUID:J
+Ljava/util/concurrent/atomic/LongAccumulator;->writeReplace()Ljava/lang/Object;
+Ljava/util/concurrent/atomic/LongAdder$SerializationProxy;->readResolve()Ljava/lang/Object;
+Ljava/util/concurrent/atomic/LongAdder$SerializationProxy;->serialVersionUID:J
+Ljava/util/concurrent/atomic/LongAdder;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/atomic/LongAdder;->serialVersionUID:J
+Ljava/util/concurrent/atomic/LongAdder;->writeReplace()Ljava/lang/Object;
+Ljava/util/concurrent/BrokenBarrierException;->serialVersionUID:J
+Ljava/util/concurrent/CancellationException;->serialVersionUID:J
+Ljava/util/concurrent/CompletionException;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentHashMap$BaseIterator;->hasMoreElements()Z
+Ljava/util/concurrent/ConcurrentHashMap$CollectionView;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentHashMap$EntrySetView;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentHashMap$KeySetView;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentHashMap$Segment;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentHashMap$ValuesView;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentHashMap;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/ConcurrentHashMap;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/util/concurrent/ConcurrentHashMap;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentHashMap;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/ConcurrentLinkedDeque;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/ConcurrentLinkedDeque;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentLinkedDeque;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/ConcurrentLinkedQueue;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/ConcurrentLinkedQueue;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentLinkedQueue;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/ConcurrentSkipListMap$SubMap;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentSkipListMap;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/ConcurrentSkipListMap;->serialVersionUID:J
+Ljava/util/concurrent/ConcurrentSkipListMap;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/ConcurrentSkipListSet;->serialVersionUID:J
+Ljava/util/concurrent/CopyOnWriteArrayList;->elements:[Ljava/lang/Object;
+Ljava/util/concurrent/CopyOnWriteArrayList;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/CopyOnWriteArrayList;->serialVersionUID:J
+Ljava/util/concurrent/CopyOnWriteArrayList;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/CopyOnWriteArraySet;->al:Ljava/util/concurrent/CopyOnWriteArrayList;
+Ljava/util/concurrent/CopyOnWriteArraySet;->serialVersionUID:J
+Ljava/util/concurrent/CountDownLatch$Sync;->serialVersionUID:J
+Ljava/util/concurrent/CountedCompleter;->serialVersionUID:J
+Ljava/util/concurrent/ExecutionException;->serialVersionUID:J
+Ljava/util/concurrent/Executors$RunnableAdapter;->task:Ljava/lang/Runnable;
+Ljava/util/concurrent/ForkJoinPool$AuxState;->serialVersionUID:J
+Ljava/util/concurrent/ForkJoinPool$EmptyTask;->serialVersionUID:J
+Ljava/util/concurrent/ForkJoinTask$AdaptedCallable;->serialVersionUID:J
+Ljava/util/concurrent/ForkJoinTask$AdaptedRunnable;->serialVersionUID:J
+Ljava/util/concurrent/ForkJoinTask$AdaptedRunnableAction;->serialVersionUID:J
+Ljava/util/concurrent/ForkJoinTask$RunnableExecuteAction;->serialVersionUID:J
+Ljava/util/concurrent/ForkJoinTask;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/ForkJoinTask;->serialVersionUID:J
+Ljava/util/concurrent/ForkJoinTask;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/FutureTask;->callable:Ljava/util/concurrent/Callable;
+Ljava/util/concurrent/FutureTask;->EXCEPTIONAL:I
+Ljava/util/concurrent/FutureTask;->outcome:Ljava/lang/Object;
+Ljava/util/concurrent/FutureTask;->state:I
+Ljava/util/concurrent/LinkedBlockingDeque;->first:Ljava/util/concurrent/LinkedBlockingDeque$Node;
+Ljava/util/concurrent/LinkedBlockingDeque;->lock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/concurrent/LinkedBlockingDeque;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/LinkedBlockingDeque;->serialVersionUID:J
+Ljava/util/concurrent/LinkedBlockingDeque;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/LinkedBlockingQueue;->capacity:I
+Ljava/util/concurrent/LinkedBlockingQueue;->head:Ljava/util/concurrent/LinkedBlockingQueue$Node;
+Ljava/util/concurrent/LinkedBlockingQueue;->putLock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/concurrent/LinkedBlockingQueue;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/LinkedBlockingQueue;->serialVersionUID:J
+Ljava/util/concurrent/LinkedBlockingQueue;->takeLock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/concurrent/LinkedBlockingQueue;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/LinkedTransferQueue$Node;->serialVersionUID:J
+Ljava/util/concurrent/LinkedTransferQueue;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/LinkedTransferQueue;->serialVersionUID:J
+Ljava/util/concurrent/LinkedTransferQueue;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/locks/AbstractOwnableSynchronizer;->serialVersionUID:J
+Ljava/util/concurrent/locks/AbstractQueuedLongSynchronizer$ConditionObject;->serialVersionUID:J
+Ljava/util/concurrent/locks/AbstractQueuedLongSynchronizer;->serialVersionUID:J
+Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject;->serialVersionUID:J
+Ljava/util/concurrent/locks/AbstractQueuedSynchronizer;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantLock$FairSync;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantLock$NonfairSync;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantLock$Sync;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/locks/ReentrantLock$Sync;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantLock;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantLock;->sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
+Ljava/util/concurrent/locks/ReentrantReadWriteLock$FairSync;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantReadWriteLock$NonfairSync;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantReadWriteLock$Sync;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/locks/ReentrantReadWriteLock$Sync;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->serialVersionUID:J
+Ljava/util/concurrent/locks/ReentrantReadWriteLock;->serialVersionUID:J
+Ljava/util/concurrent/locks/StampedLock;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/locks/StampedLock;->serialVersionUID:J
+Ljava/util/concurrent/PriorityBlockingQueue;->dequeue()Ljava/lang/Object;
+Ljava/util/concurrent/PriorityBlockingQueue;->lock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/concurrent/PriorityBlockingQueue;->notEmpty:Ljava/util/concurrent/locks/Condition;
+Ljava/util/concurrent/PriorityBlockingQueue;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/PriorityBlockingQueue;->serialVersionUID:J
+Ljava/util/concurrent/PriorityBlockingQueue;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/RecursiveAction;->serialVersionUID:J
+Ljava/util/concurrent/RecursiveTask;->serialVersionUID:J
+Ljava/util/concurrent/RejectedExecutionException;->serialVersionUID:J
+Ljava/util/concurrent/Semaphore$FairSync;->serialVersionUID:J
+Ljava/util/concurrent/Semaphore$NonfairSync;->serialVersionUID:J
+Ljava/util/concurrent/Semaphore$Sync;->serialVersionUID:J
+Ljava/util/concurrent/Semaphore;->serialVersionUID:J
+Ljava/util/concurrent/SynchronousQueue$FifoWaitQueue;->serialVersionUID:J
+Ljava/util/concurrent/SynchronousQueue$LifoWaitQueue;->serialVersionUID:J
+Ljava/util/concurrent/SynchronousQueue;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/concurrent/SynchronousQueue;->serialVersionUID:J
+Ljava/util/concurrent/SynchronousQueue;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/ThreadLocalRandom;->readResolve()Ljava/lang/Object;
+Ljava/util/concurrent/ThreadLocalRandom;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/util/concurrent/ThreadLocalRandom;->serialVersionUID:J
+Ljava/util/concurrent/ThreadLocalRandom;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/concurrent/ThreadPoolExecutor$Worker;->serialVersionUID:J
+Ljava/util/concurrent/ThreadPoolExecutor;->allowCoreThreadTimeOut:Z
+Ljava/util/concurrent/ThreadPoolExecutor;->ctl:Ljava/util/concurrent/atomic/AtomicInteger;
+Ljava/util/concurrent/ThreadPoolExecutor;->defaultHandler:Ljava/util/concurrent/RejectedExecutionHandler;
+Ljava/util/concurrent/ThreadPoolExecutor;->mainLock:Ljava/util/concurrent/locks/ReentrantLock;
+Ljava/util/concurrent/TimeoutException;->serialVersionUID:J
+Ljava/util/ConcurrentModificationException;->serialVersionUID:J
+Ljava/util/Currency;->readResolve()Ljava/lang/Object;
+Ljava/util/Currency;->serialVersionUID:J
+Ljava/util/Date;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/Date;->serialVersionUID:J
+Ljava/util/Date;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/DuplicateFormatFlagsException;->serialVersionUID:J
+Ljava/util/EmptyStackException;->serialVersionUID:J
+Ljava/util/EnumMap;->keyType:Ljava/lang/Class;
+Ljava/util/EnumMap;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/EnumMap;->serialVersionUID:J
+Ljava/util/EnumMap;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/EnumSet$SerializationProxy;->readResolve()Ljava/lang/Object;
+Ljava/util/EnumSet$SerializationProxy;->serialVersionUID:J
+Ljava/util/EnumSet;->elementType:Ljava/lang/Class;
+Ljava/util/EnumSet;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/EnumSet;->writeReplace()Ljava/lang/Object;
+Ljava/util/EventObject;->serialVersionUID:J
+Ljava/util/FormatFlagsConversionMismatchException;->serialVersionUID:J
+Ljava/util/FormatterClosedException;->serialVersionUID:J
+Ljava/util/GregorianCalendar;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/GregorianCalendar;->serialVersionUID:J
+Ljava/util/HashMap$HashIterator;->hasNext()Z
+Ljava/util/HashMap$HashIterator;->remove()V
+Ljava/util/HashMap$Node;->key:Ljava/lang/Object;
+Ljava/util/HashMap$Node;->next:Ljava/util/HashMap$Node;
+Ljava/util/HashMap$Node;->value:Ljava/lang/Object;
+Ljava/util/HashMap;->modCount:I
+Ljava/util/HashMap;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/HashMap;->serialVersionUID:J
+Ljava/util/HashMap;->table:[Ljava/util/HashMap$Node;
+Ljava/util/HashMap;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/HashSet;->map:Ljava/util/HashMap;
+Ljava/util/HashSet;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/HashSet;->serialVersionUID:J
+Ljava/util/HashSet;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/Hashtable;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/Hashtable;->serialVersionUID:J
+Ljava/util/Hashtable;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/IdentityHashMap;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/IdentityHashMap;->serialVersionUID:J
+Ljava/util/IdentityHashMap;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/IllegalFormatCodePointException;->serialVersionUID:J
+Ljava/util/IllegalFormatConversionException;->serialVersionUID:J
+Ljava/util/IllegalFormatException;->serialVersionUID:J
+Ljava/util/IllegalFormatFlagsException;->serialVersionUID:J
+Ljava/util/IllegalFormatPrecisionException;->serialVersionUID:J
+Ljava/util/IllegalFormatWidthException;->serialVersionUID:J
+Ljava/util/IllformedLocaleException;->serialVersionUID:J
+Ljava/util/InputMismatchException;->serialVersionUID:J
+Ljava/util/InvalidPropertiesFormatException;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/InvalidPropertiesFormatException;->serialVersionUID:J
+Ljava/util/InvalidPropertiesFormatException;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/jar/JarException;->serialVersionUID:J
+Ljava/util/jar/JarFile;->manifest:Ljava/util/jar/Manifest;
+Ljava/util/jar/JarVerifier$VerifierCodeSource;->serialVersionUID:J
+Ljava/util/LinkedHashMap$LinkedHashIterator;->hasNext()Z
+Ljava/util/LinkedHashMap;->accessOrder:Z
+Ljava/util/LinkedHashMap;->eldest()Ljava/util/Map$Entry;
+Ljava/util/LinkedHashMap;->serialVersionUID:J
+Ljava/util/LinkedHashSet;->serialVersionUID:J
+Ljava/util/LinkedList$Node;->item:Ljava/lang/Object;
+Ljava/util/LinkedList$Node;->next:Ljava/util/LinkedList$Node;
+Ljava/util/LinkedList;->first:Ljava/util/LinkedList$Node;
+Ljava/util/LinkedList;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/LinkedList;->serialVersionUID:J
+Ljava/util/LinkedList;->size:I
+Ljava/util/LinkedList;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/Locale;->createConstant(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;
+Ljava/util/Locale;->getInstance(Lsun/util/locale/BaseLocale;Lsun/util/locale/LocaleExtensions;)Ljava/util/Locale;
+Ljava/util/Locale;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/Locale;->readResolve()Ljava/lang/Object;
+Ljava/util/Locale;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/util/Locale;->serialVersionUID:J
+Ljava/util/Locale;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/logging/Handler;->sealed:Z
+Ljava/util/logging/Level;->readResolve()Ljava/lang/Object;
+Ljava/util/logging/Level;->serialVersionUID:J
+Ljava/util/logging/Logger;->treeLock:Ljava/lang/Object;
+Ljava/util/logging/LogManager;->getFormatterProperty(Ljava/lang/String;Ljava/util/logging/Formatter;)Ljava/util/logging/Formatter;
+Ljava/util/logging/LogRecord;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/logging/LogRecord;->serialVersionUID:J
+Ljava/util/logging/LogRecord;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/MissingFormatArgumentException;->serialVersionUID:J
+Ljava/util/MissingFormatWidthException;->serialVersionUID:J
+Ljava/util/MissingResourceException;->serialVersionUID:J
+Ljava/util/NoSuchElementException;->serialVersionUID:J
+Ljava/util/prefs/AbstractPreferences$NodeAddedEvent;->serialVersionUID:J
+Ljava/util/prefs/AbstractPreferences$NodeRemovedEvent;->serialVersionUID:J
+Ljava/util/prefs/BackingStoreException;->serialVersionUID:J
+Ljava/util/prefs/InvalidPreferencesFormatException;->serialVersionUID:J
+Ljava/util/prefs/NodeChangeEvent;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/prefs/NodeChangeEvent;->serialVersionUID:J
+Ljava/util/prefs/NodeChangeEvent;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/prefs/PreferenceChangeEvent;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/prefs/PreferenceChangeEvent;->serialVersionUID:J
+Ljava/util/prefs/PreferenceChangeEvent;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/PriorityQueue;->modCount:I
+Ljava/util/PriorityQueue;->queue:[Ljava/lang/Object;
+Ljava/util/PriorityQueue;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/PriorityQueue;->serialVersionUID:J
+Ljava/util/PriorityQueue;->size:I
+Ljava/util/PriorityQueue;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/Properties;->saveConvert(Ljava/lang/String;ZZ)Ljava/lang/String;
+Ljava/util/Properties;->serialVersionUID:J
+Ljava/util/Random;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/Random;->seedUniquifier()J
+Ljava/util/Random;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljava/util/Random;->serialVersionUID:J
+Ljava/util/Random;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/regex/Matcher;->appendPos:I
+Ljava/util/regex/Pattern;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/regex/Pattern;->serialVersionUID:J
+Ljava/util/regex/PatternSyntaxException;->serialVersionUID:J
+Ljava/util/ServiceConfigurationError;->serialVersionUID:J
+Ljava/util/SimpleTimeZone;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/SimpleTimeZone;->serialVersionUID:J
+Ljava/util/SimpleTimeZone;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/Stack;->serialVersionUID:J
+Ljava/util/TimerTask;->period:J
+Ljava/util/TimeZone;->serialVersionUID:J
+Ljava/util/TooManyListenersException;->serialVersionUID:J
+Ljava/util/TreeMap$AscendingSubMap;->serialVersionUID:J
+Ljava/util/TreeMap$DescendingSubMap;->serialVersionUID:J
+Ljava/util/TreeMap$NavigableSubMap;->serialVersionUID:J
+Ljava/util/TreeMap$SubMap;->readResolve()Ljava/lang/Object;
+Ljava/util/TreeMap$SubMap;->serialVersionUID:J
+Ljava/util/TreeMap;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/TreeMap;->serialVersionUID:J
+Ljava/util/TreeMap;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/TreeSet;->readObject(Ljava/io/ObjectInputStream;)V
+Ljava/util/TreeSet;->serialVersionUID:J
+Ljava/util/TreeSet;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/UnknownFormatConversionException;->serialVersionUID:J
+Ljava/util/UnknownFormatFlagsException;->serialVersionUID:J
+Ljava/util/UUID;->leastSigBits:J
+Ljava/util/UUID;->mostSigBits:J
+Ljava/util/UUID;->serialVersionUID:J
+Ljava/util/Vector;->elementData(I)Ljava/lang/Object;
+Ljava/util/Vector;->serialVersionUID:J
+Ljava/util/Vector;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljava/util/zip/Adler32;->update(II)I
+Ljava/util/zip/CRC32;->update(II)I
+Ljava/util/zip/DataFormatException;->serialVersionUID:J
+Ljava/util/zip/Deflater;->buf:[B
+Ljava/util/zip/Deflater;->finish:Z
+Ljava/util/zip/Deflater;->finished:Z
+Ljava/util/zip/Deflater;->len:I
+Ljava/util/zip/Deflater;->level:I
+Ljava/util/zip/Deflater;->off:I
+Ljava/util/zip/Deflater;->setParams:Z
+Ljava/util/zip/Deflater;->strategy:I
+Ljava/util/zip/Inflater;->buf:[B
+Ljava/util/zip/Inflater;->finished:Z
+Ljava/util/zip/Inflater;->len:I
+Ljava/util/zip/Inflater;->needDict:Z
+Ljava/util/zip/Inflater;->off:I
+Ljava/util/zip/ZipConstants;->CENATT:I
+Ljava/util/zip/ZipConstants;->CENATX:I
+Ljava/util/zip/ZipConstants;->CENCOM:I
+Ljava/util/zip/ZipConstants;->CENCRC:I
+Ljava/util/zip/ZipConstants;->CENDSK:I
+Ljava/util/zip/ZipConstants;->CENEXT:I
+Ljava/util/zip/ZipConstants;->CENFLG:I
+Ljava/util/zip/ZipConstants;->CENHDR:I
+Ljava/util/zip/ZipConstants;->CENHOW:I
+Ljava/util/zip/ZipConstants;->CENLEN:I
+Ljava/util/zip/ZipConstants;->CENNAM:I
+Ljava/util/zip/ZipConstants;->CENOFF:I
+Ljava/util/zip/ZipConstants;->CENSIG:J
+Ljava/util/zip/ZipConstants;->CENSIZ:I
+Ljava/util/zip/ZipConstants;->CENTIM:I
+Ljava/util/zip/ZipConstants;->CENVEM:I
+Ljava/util/zip/ZipConstants;->CENVER:I
+Ljava/util/zip/ZipConstants;->ENDCOM:I
+Ljava/util/zip/ZipConstants;->ENDHDR:I
+Ljava/util/zip/ZipConstants;->ENDOFF:I
+Ljava/util/zip/ZipConstants;->ENDSIG:J
+Ljava/util/zip/ZipConstants;->ENDSIZ:I
+Ljava/util/zip/ZipConstants;->ENDSUB:I
+Ljava/util/zip/ZipConstants;->ENDTOT:I
+Ljava/util/zip/ZipConstants;->EXTCRC:I
+Ljava/util/zip/ZipConstants;->EXTHDR:I
+Ljava/util/zip/ZipConstants;->EXTLEN:I
+Ljava/util/zip/ZipConstants;->EXTSIG:J
+Ljava/util/zip/ZipConstants;->EXTSIZ:I
+Ljava/util/zip/ZipConstants;->LOCCRC:I
+Ljava/util/zip/ZipConstants;->LOCEXT:I
+Ljava/util/zip/ZipConstants;->LOCFLG:I
+Ljava/util/zip/ZipConstants;->LOCHDR:I
+Ljava/util/zip/ZipConstants;->LOCHOW:I
+Ljava/util/zip/ZipConstants;->LOCLEN:I
+Ljava/util/zip/ZipConstants;->LOCNAM:I
+Ljava/util/zip/ZipConstants;->LOCSIG:J
+Ljava/util/zip/ZipConstants;->LOCSIZ:I
+Ljava/util/zip/ZipConstants;->LOCTIM:I
+Ljava/util/zip/ZipConstants;->LOCVER:I
+Ljava/util/zip/ZipEntry;-><init>(Ljava/lang/String;Ljava/lang/String;JJJII[BJ)V
+Ljava/util/zip/ZipEntry;->method:I
+Ljava/util/zip/ZipError;->serialVersionUID:J
+Ljava/util/zip/ZipException;->serialVersionUID:J
+Ljava/util/zip/ZipFile;->close(J)V
+Ljava/util/zip/ZipFile;->getEntry(J[BZ)J
+Ljava/util/zip/ZipFile;->jzfile:J
+Ljava/util/zip/ZipInputStream;->flag:I
+Ljava/util/zip/ZipInputStream;->tmpbuf:[B
+Ljava/util/zip/ZipOutputStream;->method:I
+Ljava/util/zip/ZipOutputStream;->names:Ljava/util/HashSet;
+Ljava/util/zip/ZipOutputStream;->written:J
+Ljavax/crypto/AEADBadTagException;->serialVersionUID:J
+Ljavax/crypto/BadPaddingException;->serialVersionUID:J
+Ljavax/crypto/ExemptionMechanismException;->serialVersionUID:J
+Ljavax/crypto/IllegalBlockSizeException;->serialVersionUID:J
+Ljavax/crypto/NoSuchPaddingException;->serialVersionUID:J
+Ljavax/crypto/SealedObject;->readObject(Ljava/io/ObjectInputStream;)V
+Ljavax/crypto/SealedObject;->serialVersionUID:J
+Ljavax/crypto/ShortBufferException;->serialVersionUID:J
+Ljavax/crypto/spec/SecretKeySpec;->serialVersionUID:J
+Ljavax/microedition/khronos/egl/EGL10;->eglReleaseThread()Z
+Ljavax/net/ssl/HandshakeCompletedEvent;->serialVersionUID:J
+Ljavax/net/ssl/SSLException;->serialVersionUID:J
+Ljavax/net/ssl/SSLHandshakeException;->serialVersionUID:J
+Ljavax/net/ssl/SSLKeyException;->serialVersionUID:J
+Ljavax/net/ssl/SSLPeerUnverifiedException;->serialVersionUID:J
+Ljavax/net/ssl/SSLProtocolException;->serialVersionUID:J
+Ljavax/net/ssl/SSLServerSocketFactory;->defaultServerSocketFactory:Ljavax/net/ssl/SSLServerSocketFactory;
+Ljavax/net/ssl/SSLSessionBindingEvent;->serialVersionUID:J
+Ljavax/net/ssl/SSLSocketFactory;->createSocket(Ljava/net/Socket;Ljava/io/InputStream;Z)Ljava/net/Socket;
+Ljavax/net/ssl/SSLSocketFactory;->defaultSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
+Ljavax/security/auth/callback/PasswordCallback;->serialVersionUID:J
+Ljavax/security/auth/callback/UnsupportedCallbackException;->serialVersionUID:J
+Ljavax/security/auth/DestroyFailedException;->serialVersionUID:J
+Ljavax/security/auth/login/LoginException;->serialVersionUID:J
+Ljavax/security/auth/Subject$SecureSet;->readObject(Ljava/io/ObjectInputStream;)V
+Ljavax/security/auth/Subject$SecureSet;->serialPersistentFields:[Ljava/io/ObjectStreamField;
+Ljavax/security/auth/Subject$SecureSet;->serialVersionUID:J
+Ljavax/security/auth/Subject$SecureSet;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljavax/security/auth/Subject;->readObject(Ljava/io/ObjectInputStream;)V
+Ljavax/security/auth/Subject;->serialVersionUID:J
+Ljavax/security/auth/Subject;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljavax/security/auth/x500/X500Principal;->readObject(Ljava/io/ObjectInputStream;)V
+Ljavax/security/auth/x500/X500Principal;->serialVersionUID:J
+Ljavax/security/auth/x500/X500Principal;->writeObject(Ljava/io/ObjectOutputStream;)V
+Ljavax/security/cert/CertificateEncodingException;->serialVersionUID:J
+Ljavax/security/cert/CertificateException;->serialVersionUID:J
+Ljavax/security/cert/CertificateExpiredException;->serialVersionUID:J
+Ljavax/security/cert/CertificateNotYetValidException;->serialVersionUID:J
+Ljavax/security/cert/CertificateParsingException;->serialVersionUID:J
+Ljavax/sql/ConnectionEvent;->serialVersionUID:J
+Ljavax/sql/RowSetEvent;->serialVersionUID:J
+Ljavax/xml/datatype/DatatypeConfigurationException;->readObject(Ljava/io/ObjectInputStream;)V
+Ljavax/xml/datatype/DatatypeConfigurationException;->serialVersionUID:J
+Ljavax/xml/namespace/QName;->readObject(Ljava/io/ObjectInputStream;)V
+Ljavax/xml/namespace/QName;->serialVersionUID:J
+Ljavax/xml/transform/TransformerException;->serialVersionUID:J
+Ljavax/xml/xpath/XPathException;->serialVersionUID:J
+Ljavax/xml/xpath/XPathExpressionException;->serialVersionUID:J
+Ljavax/xml/xpath/XPathFactoryConfigurationException;->serialVersionUID:J
+Ljavax/xml/xpath/XPathFunctionException;->serialVersionUID:J
+Llibcore/util/BasicLruCache;->map:Ljava/util/LinkedHashMap;
+Llibcore/util/ZoneInfo;->mTransitions:[J
+Llibcore/util/ZoneInfo;->readObject(Ljava/io/ObjectInputStream;)V
+Llibcore/util/ZoneInfo;->serialVersionUID:J
+Lorg/apache/http/conn/ConnectTimeoutException;->serialVersionUID:J
+Lorg/apache/http/conn/ssl/AbstractVerifier;->BAD_COUNTRY_2LDS:[Ljava/lang/String;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;-><init>()V
+Lorg/apache/http/conn/ssl/SSLSocketFactory;-><init>(Ljavax/net/ssl/SSLSocketFactory;)V
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->createKeyManagers(Ljava/security/KeyStore;Ljava/lang/String;)[Ljavax/net/ssl/KeyManager;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->createTrustManagers(Ljava/security/KeyStore;)[Ljavax/net/ssl/TrustManager;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->hostnameVerifier:Lorg/apache/http/conn/ssl/X509HostnameVerifier;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->nameResolver:Lorg/apache/http/conn/scheme/HostNameResolver;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->socketfactory:Ljavax/net/ssl/SSLSocketFactory;
+Lorg/apache/http/conn/ssl/SSLSocketFactory;->sslcontext:Ljavax/net/ssl/SSLContext;
+Lorg/ccil/cowan/tagsoup/AttributesImpl;->data:[Ljava/lang/String;
+Lorg/ccil/cowan/tagsoup/AttributesImpl;->length:I
+Lorg/json/JSONArray;->values:Ljava/util/List;
+Lorg/json/JSONArray;->writeTo(Lorg/json/JSONStringer;)V
+Lorg/json/JSONObject;->append(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
+Lorg/json/JSONObject;->checkName(Ljava/lang/String;)Ljava/lang/String;
+Lorg/json/JSONObject;->keySet()Ljava/util/Set;
+Lorg/json/JSONObject;->nameValuePairs:Ljava/util/LinkedHashMap;
+Lorg/json/JSONObject;->NEGATIVE_ZERO:Ljava/lang/Double;
+Lorg/json/JSONObject;->writeTo(Lorg/json/JSONStringer;)V
+Lorg/json/JSONStringer;-><init>(I)V
+Lorg/json/JSONStringer;->beforeKey()V
+Lorg/json/JSONStringer;->beforeValue()V
+Lorg/json/JSONStringer;->close(Lorg/json/JSONStringer$Scope;Lorg/json/JSONStringer$Scope;Ljava/lang/String;)Lorg/json/JSONStringer;
+Lorg/json/JSONStringer;->indent:Ljava/lang/String;
+Lorg/json/JSONStringer;->newline()V
+Lorg/json/JSONStringer;->open(Lorg/json/JSONStringer$Scope;Ljava/lang/String;)Lorg/json/JSONStringer;
+Lorg/json/JSONStringer;->out:Ljava/lang/StringBuilder;
+Lorg/json/JSONStringer;->peek()Lorg/json/JSONStringer$Scope;
+Lorg/json/JSONStringer;->replaceTop(Lorg/json/JSONStringer$Scope;)V
+Lorg/json/JSONStringer;->stack:Ljava/util/List;
+Lorg/json/JSONStringer;->string(Ljava/lang/String;)V
+Lorg/json/JSONTokener;->in:Ljava/lang/String;
+Lorg/json/JSONTokener;->nextCleanInternal()I
+Lorg/json/JSONTokener;->nextToInternal(Ljava/lang/String;)Ljava/lang/String;
+Lorg/json/JSONTokener;->pos:I
+Lorg/json/JSONTokener;->readArray()Lorg/json/JSONArray;
+Lorg/json/JSONTokener;->readEscapeCharacter()C
+Lorg/json/JSONTokener;->readLiteral()Ljava/lang/Object;
+Lorg/json/JSONTokener;->readObject()Lorg/json/JSONObject;
+Lorg/json/JSONTokener;->skipToEndOfLine()V
+Lorg/w3c/dom/ls/LSSerializerFilter;->getWhatToShow()I
+Lorg/w3c/dom/traversal/NodeFilter;->acceptNode(Lorg/w3c/dom/Node;)S
+Lorg/w3c/dom/traversal/NodeIterator;->detach()V
+Lorg/w3c/dom/traversal/NodeIterator;->nextNode()Lorg/w3c/dom/Node;
+Lorg/xml/sax/helpers/AttributesImpl;->badIndex(I)V
+Lorg/xml/sax/helpers/AttributesImpl;->data:[Ljava/lang/String;
+Lorg/xml/sax/helpers/AttributesImpl;->ensureCapacity(I)V
+Lorg/xml/sax/helpers/AttributesImpl;->length:I
+Lorg/xml/sax/helpers/LocatorImpl;->columnNumber:I
+Lorg/xml/sax/helpers/LocatorImpl;->lineNumber:I
+Lorg/xml/sax/helpers/LocatorImpl;->publicId:Ljava/lang/String;
+Lorg/xml/sax/helpers/LocatorImpl;->systemId:Ljava/lang/String;
+Lorg/xml/sax/helpers/NamespaceSupport;->contextPos:I
+Lorg/xml/sax/helpers/NamespaceSupport;->contexts:[Lorg/xml/sax/helpers/NamespaceSupport$Context;
+Lorg/xml/sax/helpers/NamespaceSupport;->currentContext:Lorg/xml/sax/helpers/NamespaceSupport$Context;
+Lorg/xml/sax/helpers/NamespaceSupport;->EMPTY_ENUMERATION:Ljava/util/Enumeration;
+Lorg/xml/sax/helpers/ParserAdapter;->attAdapter:Lorg/xml/sax/helpers/ParserAdapter$AttributeListAdapter;
+Lorg/xml/sax/helpers/ParserAdapter;->atts:Lorg/xml/sax/helpers/AttributesImpl;
+Lorg/xml/sax/helpers/ParserAdapter;->checkNotParsing(Ljava/lang/String;Ljava/lang/String;)V
+Lorg/xml/sax/helpers/ParserAdapter;->contentHandler:Lorg/xml/sax/ContentHandler;
+Lorg/xml/sax/helpers/ParserAdapter;->dtdHandler:Lorg/xml/sax/DTDHandler;
+Lorg/xml/sax/helpers/ParserAdapter;->entityResolver:Lorg/xml/sax/EntityResolver;
+Lorg/xml/sax/helpers/ParserAdapter;->errorHandler:Lorg/xml/sax/ErrorHandler;
+Lorg/xml/sax/helpers/ParserAdapter;->locator:Lorg/xml/sax/Locator;
+Lorg/xml/sax/helpers/ParserAdapter;->makeException(Ljava/lang/String;)Lorg/xml/sax/SAXParseException;
+Lorg/xml/sax/helpers/ParserAdapter;->nameParts:[Ljava/lang/String;
+Lorg/xml/sax/helpers/ParserAdapter;->namespaces:Z
+Lorg/xml/sax/helpers/ParserAdapter;->nsSupport:Lorg/xml/sax/helpers/NamespaceSupport;
+Lorg/xml/sax/helpers/ParserAdapter;->parser:Lorg/xml/sax/Parser;
+Lorg/xml/sax/helpers/ParserAdapter;->parsing:Z
+Lorg/xml/sax/helpers/ParserAdapter;->prefixes:Z
+Lorg/xml/sax/helpers/ParserAdapter;->processName(Ljava/lang/String;ZZ)[Ljava/lang/String;
+Lorg/xml/sax/helpers/ParserAdapter;->reportError(Ljava/lang/String;)V
+Lorg/xml/sax/helpers/ParserAdapter;->setup(Lorg/xml/sax/Parser;)V
+Lorg/xml/sax/helpers/ParserAdapter;->setupParser()V
+Lorg/xml/sax/helpers/XMLFilterImpl;->contentHandler:Lorg/xml/sax/ContentHandler;
+Lorg/xml/sax/helpers/XMLFilterImpl;->dtdHandler:Lorg/xml/sax/DTDHandler;
+Lorg/xml/sax/helpers/XMLFilterImpl;->entityResolver:Lorg/xml/sax/EntityResolver;
+Lorg/xml/sax/helpers/XMLFilterImpl;->errorHandler:Lorg/xml/sax/ErrorHandler;
+Lorg/xml/sax/helpers/XMLFilterImpl;->locator:Lorg/xml/sax/Locator;
+Lorg/xml/sax/helpers/XMLFilterImpl;->parent:Lorg/xml/sax/XMLReader;
+Lorg/xml/sax/helpers/XMLFilterImpl;->setupParse()V
+Lorg/xml/sax/helpers/XMLReaderAdapter;->documentHandler:Lorg/xml/sax/DocumentHandler;
+Lorg/xml/sax/helpers/XMLReaderAdapter;->qAtts:Lorg/xml/sax/helpers/XMLReaderAdapter$AttributesAdapter;
+Lorg/xml/sax/helpers/XMLReaderAdapter;->setup(Lorg/xml/sax/XMLReader;)V
+Lorg/xml/sax/helpers/XMLReaderAdapter;->setupXMLReader()V
+Lorg/xml/sax/helpers/XMLReaderAdapter;->xmlReader:Lorg/xml/sax/XMLReader;
+Lorg/xml/sax/helpers/XMLReaderFactory;->loadClass(Ljava/lang/ClassLoader;Ljava/lang/String;)Lorg/xml/sax/XMLReader;
+Lorg/xml/sax/InputSource;->byteStream:Ljava/io/InputStream;
+Lorg/xml/sax/InputSource;->characterStream:Ljava/io/Reader;
+Lorg/xml/sax/InputSource;->encoding:Ljava/lang/String;
+Lorg/xml/sax/InputSource;->publicId:Ljava/lang/String;
+Lorg/xml/sax/InputSource;->systemId:Ljava/lang/String;
+Lorg/xml/sax/SAXException;->exception:Ljava/lang/Exception;
+Lorg/xml/sax/SAXParseException;->columnNumber:I
+Lorg/xml/sax/SAXParseException;->init(Ljava/lang/String;Ljava/lang/String;II)V
+Lorg/xml/sax/SAXParseException;->lineNumber:I
+Lorg/xml/sax/SAXParseException;->publicId:Ljava/lang/String;
+Lorg/xml/sax/SAXParseException;->systemId:Ljava/lang/String;
+Lsun/misc/Unsafe;->theUnsafe:Lsun/misc/Unsafe;
+Lsun/misc/Unsafe;->THE_ONE:Lsun/misc/Unsafe;
+Lsun/misc/URLClassPath$JarLoader;->getJarFile()Ljava/util/jar/JarFile;
+Lsun/misc/URLClassPath;->lmap:Ljava/util/HashMap;
+Lsun/misc/URLClassPath;->loaders:Ljava/util/ArrayList;
+Lsun/misc/URLClassPath;->urls:Ljava/util/Stack;
+Lsun/security/pkcs/ParsingException;->serialVersionUID:J
+Lsun/security/util/ObjectIdentifier$HugeOidNotSupportedByOldJDK;->serialVersionUID:J
+Lsun/security/util/ObjectIdentifier;->readObject(Ljava/io/ObjectInputStream;)V
+Lsun/security/util/ObjectIdentifier;->serialVersionUID:J
+Lsun/security/util/ObjectIdentifier;->writeObject(Ljava/io/ObjectOutputStream;)V
+Lsun/security/x509/AlgorithmId;->serialVersionUID:J
+Lsun/security/x509/AVA;->hasRFC2253Keyword()Z
+Lsun/util/locale/LocaleSyntaxException;->serialVersionUID:J
diff --git a/config/hiddenapi-vendor-list.txt b/config/hiddenapi-vendor-list.txt
new file mode 100644
index 0000000..781f6e6
--- /dev/null
+++ b/config/hiddenapi-vendor-list.txt
@@ -0,0 +1,725 @@
+Landroid/accounts/AccountManager;-><init>(Landroid/content/Context;Landroid/accounts/IAccountManager;Landroid/os/Handler;)V
+Landroid/app/Activity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
+Landroid/app/ActivityManager$TaskDescription;->loadTaskDescriptionIcon(Ljava/lang/String;I)Landroid/graphics/Bitmap;
+Landroid/app/ActivityManager$TaskSnapshot;->getSnapshot()Landroid/graphics/GraphicBuffer;
+Landroid/app/ActivityManagerNative;->broadcastStickyIntent(Landroid/content/Intent;Ljava/lang/String;I)V
+Landroid/app/ActivityView;-><init>(Landroid/content/Context;)V
+Landroid/app/ActivityView;->release()V
+Landroid/app/ActivityView;->startActivity(Landroid/app/PendingIntent;)V
+Landroid/app/ActivityView;->startActivity(Landroid/content/Intent;)V
+Landroid/app/AppOpsManager$OpEntry;->getOp()I
+Landroid/app/AppOpsManager$OpEntry;->getTime()J
+Landroid/app/AppOpsManager$OpEntry;->isRunning()Z
+Landroid/app/AppOpsManager$PackageOps;->getOps()Ljava/util/List;
+Landroid/app/AppOpsManager$PackageOps;->getPackageName()Ljava/lang/String;
+Landroid/app/AppOpsManager$PackageOps;->getUid()I
+Landroid/app/AppOpsManager;->getPackagesForOps([I)Ljava/util/List;
+Landroid/app/AppOpsManager;->getToken(Lcom/android/internal/app/IAppOpsService;)Landroid/os/IBinder;
+Landroid/app/IActivityController$Stub;-><init>()V
+Landroid/app/IActivityManager;->cancelTaskWindowTransition(I)V
+Landroid/app/IActivityManager;->closeSystemDialogs(Ljava/lang/String;)V
+Landroid/app/IActivityManager;->getCurrentUser()Landroid/content/pm/UserInfo;
+Landroid/app/IActivityManager;->getLockTaskModeState()I
+Landroid/app/IActivityManager;->getProcessMemoryInfo([I)[Landroid/os/Debug$MemoryInfo;
+Landroid/app/IActivityManager;->getRecentTasks(III)Landroid/content/pm/ParceledListSlice;
+Landroid/app/IActivityManager;->getRunningAppProcesses()Ljava/util/List;
+Landroid/app/IActivityManager;->getTaskSnapshot(IZ)Landroid/app/ActivityManager$TaskSnapshot;
+Landroid/app/IActivityManager;->registerTaskStackListener(Landroid/app/ITaskStackListener;)V
+Landroid/app/IActivityManager;->removeTask(I)Z
+Landroid/app/IActivityManager;->startActivity(Landroid/app/IApplicationThread;Ljava/lang/String;Landroid/content/Intent;Ljava/lang/String;Landroid/os/IBinder;Ljava/lang/String;IILandroid/app/ProfilerInfo;Landroid/os/Bundle;)I
+Landroid/app/IActivityManager;->startActivityAsUser(Landroid/app/IApplicationThread;Ljava/lang/String;Landroid/content/Intent;Ljava/lang/String;Landroid/os/IBinder;Ljava/lang/String;IILandroid/app/ProfilerInfo;Landroid/os/Bundle;I)I
+Landroid/app/IActivityManager;->startActivityFromRecents(ILandroid/os/Bundle;)I
+Landroid/app/IAlarmManager;->setTime(J)Z
+Landroid/app/KeyguardManager;->isDeviceLocked(I)Z
+Landroid/app/NotificationManager;->cancelAsUser(Ljava/lang/String;ILandroid/os/UserHandle;)V
+Landroid/app/StatusBarManager;->removeIcon(Ljava/lang/String;)V
+Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
+Landroid/app/TaskStackListener;->onActivityDismissingDockedStack()V
+Landroid/app/TaskStackListener;->onActivityForcedResizable(Ljava/lang/String;II)V
+Landroid/app/TaskStackListener;->onActivityLaunchOnSecondaryDisplayFailed()V
+Landroid/app/TaskStackListener;->onActivityRequestedOrientationChanged(II)V
+Landroid/app/TaskStackListener;->onActivityUnpinned()V
+Landroid/app/TaskStackListener;->onPinnedActivityRestartAttempt(Z)V
+Landroid/app/TaskStackListener;->onPinnedStackAnimationEnded()V
+Landroid/app/TaskStackListener;->onPinnedStackAnimationStarted()V
+Landroid/app/TaskStackListener;->onTaskMovedToFront(I)V
+Landroid/app/TaskStackListener;->onTaskProfileLocked(II)V
+Landroid/app/TaskStackListener;->onTaskRemoved(I)V
+Landroid/app/TaskStackListener;->onTaskSnapshotChanged(ILandroid/app/ActivityManager$TaskSnapshot;)V
+Landroid/app/TaskStackListener;->onTaskStackChanged()V
+Landroid/app/WallpaperColors;-><init>(Landroid/graphics/Color;Landroid/graphics/Color;Landroid/graphics/Color;I)V
+Landroid/bluetooth/BluetoothHeadset;->phoneStateChanged(IIILjava/lang/String;I)V
+Landroid/bluetooth/IBluetooth;->sendConnectionStateChange(Landroid/bluetooth/BluetoothDevice;III)V
+Landroid/companion/AssociationRequest;->getDeviceFilters()Ljava/util/List;
+Landroid/companion/AssociationRequest;->isSingleDevice()Z
+Landroid/companion/BluetoothDeviceFilter;->getAddress()Ljava/lang/String;
+Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceDisplayNameInternal(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
+Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceDisplayNameInternal(Landroid/net/wifi/ScanResult;)Ljava/lang/String;
+Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceMacAddress(Landroid/os/Parcelable;)Ljava/lang/String;
+Landroid/companion/BluetoothLeDeviceFilter;->getScanFilter()Landroid/bluetooth/le/ScanFilter;
+Landroid/companion/DeviceFilter;->getDeviceDisplayName(Landroid/os/Parcelable;)Ljava/lang/String;
+Landroid/companion/DeviceFilter;->matches(Landroid/os/Parcelable;)Z
+Landroid/companion/ICompanionDeviceDiscoveryService$Stub;-><init>()V
+Landroid/companion/ICompanionDeviceDiscoveryServiceCallback;->onDeviceSelected(Ljava/lang/String;ILjava/lang/String;)V
+Landroid/companion/ICompanionDeviceDiscoveryServiceCallback;->onDeviceSelectionCancel()V
+Landroid/companion/IFindDeviceCallback;->onSuccess(Landroid/app/PendingIntent;)V
+Landroid/content/ContentProvider;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Landroid/content/pm/PathPermission;)V
+Landroid/content/ContentProvider;->attachInfoForTesting(Landroid/content/Context;Landroid/content/pm/ProviderInfo;)V
+Landroid/content/ContentProvider;->getIContentProvider()Landroid/content/IContentProvider;
+Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
+Landroid/content/ContentValues;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;
+Landroid/content/ContentValues;->putStringArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V
+Landroid/content/Context;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
+Landroid/content/Context;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
+Landroid/content/Context;->startServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
+Landroid/content/ContextWrapper;->getThemeResId()I
+Landroid/content/Intent;->getExtra(Ljava/lang/String;)Ljava/lang/Object;
+Landroid/content/Intent;->getIBinderExtra(Ljava/lang/String;)Landroid/os/IBinder;
+Landroid/content/Intent;->resolveSystemService(Landroid/content/pm/PackageManager;I)Landroid/content/ComponentName;
+Landroid/content/pm/IPackageDataObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageDeleteObserver$Stub;-><init>()V
+Landroid/content/pm/IPackageDeleteObserver;->packageDeleted(Ljava/lang/String;I)V
+Landroid/content/pm/IPackageManager;->getActivityInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ActivityInfo;
+Landroid/content/pm/IPackageManager;->getApplicationInfo(Ljava/lang/String;II)Landroid/content/pm/ApplicationInfo;
+Landroid/content/pm/IPackageManager;->getHomeActivities(Ljava/util/List;)Landroid/content/ComponentName;
+Landroid/content/pm/IPackageManager;->getPackageInfo(Ljava/lang/String;II)Landroid/content/pm/PackageInfo;
+Landroid/content/pm/IPackageStatsObserver;->onGetStatsCompleted(Landroid/content/pm/PackageStats;Z)V
+Landroid/database/sqlite/SqliteWrapper;->insert(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
+Landroid/database/sqlite/SqliteWrapper;->query(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
+Landroid/graphics/Bitmap;->createGraphicBufferHandle()Landroid/graphics/GraphicBuffer;
+Landroid/graphics/Bitmap;->createHardwareBitmap(Landroid/graphics/GraphicBuffer;)Landroid/graphics/Bitmap;
+Landroid/graphics/drawable/Drawable;->isProjected()Z
+Landroid/graphics/drawable/Drawable;->updateTintFilter(Landroid/graphics/PorterDuffColorFilter;Landroid/content/res/ColorStateList;Landroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter;
+Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
+Landroid/hardware/display/DisplayManagerGlobal;->getInstance()Landroid/hardware/display/DisplayManagerGlobal;
+Landroid/hardware/display/DisplayManagerGlobal;->getRealDisplay(I)Landroid/view/Display;
+Landroid/hardware/location/GeofenceHardware;-><init>(Landroid/hardware/location/IGeofenceHardware;)V
+Landroid/hardware/location/IActivityRecognitionHardwareClient;->onAvailabilityChanged(ZLandroid/hardware/location/IActivityRecognitionHardware;)V
+Landroid/location/IGeocodeProvider;->getFromLocation(DDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String;
+Landroid/location/IGeocodeProvider;->getFromLocationName(Ljava/lang/String;DDDDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String;
+Landroid/location/IGeofenceProvider;->setGeofenceHardware(Landroid/hardware/location/IGeofenceHardware;)V
+Landroid/location/ILocationManager;->getNetworkProviderPackage()Ljava/lang/String;
+Landroid/location/ILocationManager;->reportLocation(Landroid/location/Location;Z)V
+Landroid/location/INetInitiatedListener$Stub;-><init>()V
+Landroid/location/INetInitiatedListener;->sendNiResponse(II)Z
+Landroid/location/Location;->setExtraLocation(Ljava/lang/String;Landroid/location/Location;)V
+Landroid/media/AudioManager;->registerAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V
+Landroid/media/AudioManager;->unregisterAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V
+Landroid/media/AudioSystem;->checkAudioFlinger()I
+Landroid/media/AudioSystem;->getForceUse(I)I
+Landroid/media/AudioSystem;->getParameters(Ljava/lang/String;)Ljava/lang/String;
+Landroid/media/AudioSystem;->setForceUse(II)I
+Landroid/media/AudioSystem;->setParameters(Ljava/lang/String;)I
+Landroid/media/MediaDrm$Certificate;->getContent()[B
+Landroid/media/MediaDrm$Certificate;->getWrappedPrivateKey()[B
+Landroid/media/MediaDrm$CertificateRequest;->getData()[B
+Landroid/media/MediaDrm$CertificateRequest;->getDefaultUrl()Ljava/lang/String;
+Landroid/media/MediaDrm;->getCertificateRequest(ILjava/lang/String;)Landroid/media/MediaDrm$CertificateRequest;
+Landroid/media/MediaDrm;->provideCertificateResponse([B)Landroid/media/MediaDrm$Certificate;
+Landroid/media/MediaDrm;->signRSA([BLjava/lang/String;[B[B)[B
+Landroid/media/tv/ITvRemoteProvider$Stub;-><init>()V
+Landroid/media/tv/ITvRemoteServiceInput;->clearInputBridge(Landroid/os/IBinder;)V
+Landroid/media/tv/ITvRemoteServiceInput;->closeInputBridge(Landroid/os/IBinder;)V
+Landroid/media/tv/ITvRemoteServiceInput;->openInputBridge(Landroid/os/IBinder;Ljava/lang/String;III)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendKeyDown(Landroid/os/IBinder;I)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendKeyUp(Landroid/os/IBinder;I)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendPointerDown(Landroid/os/IBinder;III)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendPointerSync(Landroid/os/IBinder;)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendPointerUp(Landroid/os/IBinder;I)V
+Landroid/media/tv/ITvRemoteServiceInput;->sendTimestamp(Landroid/os/IBinder;J)V
+Landroid/net/ConnectivityManager$PacketKeepalive;->stop()V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;-><init>()V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onError(I)V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStarted()V
+Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStopped()V
+Landroid/net/ConnectivityManager;->getActiveNetworkQuotaInfo()Landroid/net/NetworkQuotaInfo;
+Landroid/net/ConnectivityManager;->setAirplaneMode(Z)V
+Landroid/net/ConnectivityManager;->startNattKeepalive(Landroid/net/Network;ILandroid/net/ConnectivityManager$PacketKeepaliveCallback;Ljava/net/InetAddress;ILjava/net/InetAddress;)Landroid/net/ConnectivityManager$PacketKeepalive;
+Landroid/net/ConnectivityManager;->tether(Ljava/lang/String;)I
+Landroid/net/ConnectivityManager;->untether(Ljava/lang/String;)I
+Landroid/net/DhcpResults;-><init>()V
+Landroid/net/DhcpResults;-><init>(Landroid/net/DhcpResults;)V
+Landroid/net/DhcpResults;-><init>(Landroid/net/StaticIpConfiguration;)V
+Landroid/net/DhcpResults;->leaseDuration:I
+Landroid/net/DhcpResults;->mtu:I
+Landroid/net/DhcpResults;->serverAddress:Ljava/net/Inet4Address;
+Landroid/net/DhcpResults;->vendorInfo:Ljava/lang/String;
+Landroid/net/IConnectivityManager;->getAllNetworkState()[Landroid/net/NetworkState;
+Landroid/net/INetd$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetd;
+Landroid/net/INetd;->interfaceAddAddress(Ljava/lang/String;Ljava/lang/String;I)V
+Landroid/net/INetworkPolicyManager;->getNetworkQuotaInfo(Landroid/net/NetworkState;)Landroid/net/NetworkQuotaInfo;
+Landroid/net/INetworkStatsService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetworkStatsService;
+Landroid/net/INetworkStatsSession;->getHistoryForNetwork(Landroid/net/NetworkTemplate;I)Landroid/net/NetworkStatsHistory;
+Landroid/net/INetworkStatsSession;->getHistoryForUid(Landroid/net/NetworkTemplate;IIII)Landroid/net/NetworkStatsHistory;
+Landroid/net/InterfaceConfiguration;-><init>()V
+Landroid/net/InterfaceConfiguration;->setLinkAddress(Landroid/net/LinkAddress;)V
+Landroid/net/LinkAddress;-><init>(Ljava/lang/String;)V
+Landroid/net/LinkAddress;-><init>(Ljava/net/InetAddress;I)V
+Landroid/net/LinkAddress;->isIPv6()Z
+Landroid/net/LinkAddress;->isSameAddressAs(Landroid/net/LinkAddress;)Z
+Landroid/net/LinkProperties$ProvisioningChange;->GAINED_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->LOST_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->STILL_NOT_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->STILL_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties$ProvisioningChange;->values()[Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties;-><init>()V
+Landroid/net/LinkProperties;-><init>(Landroid/net/LinkProperties;)V
+Landroid/net/LinkProperties;->addDnsServer(Ljava/net/InetAddress;)Z
+Landroid/net/LinkProperties;->addRoute(Landroid/net/RouteInfo;)Z
+Landroid/net/LinkProperties;->addStackedLink(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->clear()V
+Landroid/net/LinkProperties;->compareProvisioning(Landroid/net/LinkProperties;Landroid/net/LinkProperties;)Landroid/net/LinkProperties$ProvisioningChange;
+Landroid/net/LinkProperties;->getAllInterfaceNames()Ljava/util/List;
+Landroid/net/LinkProperties;->getAllRoutes()Ljava/util/List;
+Landroid/net/LinkProperties;->getMtu()I
+Landroid/net/LinkProperties;->getStackedLinks()Ljava/util/List;
+Landroid/net/LinkProperties;->hasGlobalIPv6Address()Z
+Landroid/net/LinkProperties;->hasIPv4Address()Z
+Landroid/net/LinkProperties;->hasIPv4DefaultRoute()Z
+Landroid/net/LinkProperties;->hasIPv4DnsServer()Z
+Landroid/net/LinkProperties;->hasIPv6DefaultRoute()Z
+Landroid/net/LinkProperties;->hasIPv6DnsServer()Z
+Landroid/net/LinkProperties;->isIdenticalAddresses(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalDnses(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalRoutes(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIdenticalStackedLinks(Landroid/net/LinkProperties;)Z
+Landroid/net/LinkProperties;->isIPv6Provisioned()Z
+Landroid/net/LinkProperties;->isProvisioned()Z
+Landroid/net/LinkProperties;->isReachable(Ljava/net/InetAddress;)Z
+Landroid/net/LinkProperties;->removeDnsServer(Ljava/net/InetAddress;)Z
+Landroid/net/LinkProperties;->removeRoute(Landroid/net/RouteInfo;)Z
+Landroid/net/LinkProperties;->setDnsServers(Ljava/util/Collection;)V
+Landroid/net/LinkProperties;->setDomains(Ljava/lang/String;)V
+Landroid/net/LinkProperties;->setInterfaceName(Ljava/lang/String;)V
+Landroid/net/LinkProperties;->setLinkAddresses(Ljava/util/Collection;)V
+Landroid/net/LinkProperties;->setMtu(I)V
+Landroid/net/LinkProperties;->setTcpBufferSizes(Ljava/lang/String;)V
+Landroid/net/MacAddress;->ALL_ZEROS_ADDRESS:Landroid/net/MacAddress;
+Landroid/net/metrics/ApfProgramEvent;-><init>()V
+Landroid/net/metrics/ApfProgramEvent;->actualLifetime:J
+Landroid/net/metrics/ApfProgramEvent;->currentRas:I
+Landroid/net/metrics/ApfProgramEvent;->filteredRas:I
+Landroid/net/metrics/ApfProgramEvent;->flags:I
+Landroid/net/metrics/ApfProgramEvent;->flagsFor(ZZ)I
+Landroid/net/metrics/ApfProgramEvent;->lifetime:J
+Landroid/net/metrics/ApfProgramEvent;->programLength:I
+Landroid/net/metrics/ApfStats;-><init>()V
+Landroid/net/metrics/ApfStats;->droppedRas:I
+Landroid/net/metrics/ApfStats;->durationMs:J
+Landroid/net/metrics/ApfStats;->matchingRas:I
+Landroid/net/metrics/ApfStats;->maxProgramSize:I
+Landroid/net/metrics/ApfStats;->parseErrors:I
+Landroid/net/metrics/ApfStats;->programUpdates:I
+Landroid/net/metrics/ApfStats;->programUpdatesAll:I
+Landroid/net/metrics/ApfStats;->programUpdatesAllowingMulticast:I
+Landroid/net/metrics/ApfStats;->receivedRas:I
+Landroid/net/metrics/ApfStats;->zeroLifetimeRas:I
+Landroid/net/metrics/DhcpClientEvent;-><init>(Ljava/lang/String;I)V
+Landroid/net/metrics/DhcpErrorEvent;-><init>(I)V
+Landroid/net/metrics/DhcpErrorEvent;->BOOTP_TOO_SHORT:I
+Landroid/net/metrics/DhcpErrorEvent;->BUFFER_UNDERFLOW:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_BAD_MAGIC_COOKIE:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_INVALID_OPTION_LENGTH:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_COOKIE:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_MSG_TYPE:I
+Landroid/net/metrics/DhcpErrorEvent;->DHCP_UNKNOWN_MSG_TYPE:I
+Landroid/net/metrics/DhcpErrorEvent;->errorCodeWithOption(II)I
+Landroid/net/metrics/DhcpErrorEvent;->L2_TOO_SHORT:I
+Landroid/net/metrics/DhcpErrorEvent;->L2_WRONG_ETH_TYPE:I
+Landroid/net/metrics/DhcpErrorEvent;->L3_INVALID_IP:I
+Landroid/net/metrics/DhcpErrorEvent;->L3_NOT_IPV4:I
+Landroid/net/metrics/DhcpErrorEvent;->L3_TOO_SHORT:I
+Landroid/net/metrics/DhcpErrorEvent;->L4_NOT_UDP:I
+Landroid/net/metrics/DhcpErrorEvent;->L4_WRONG_PORT:I
+Landroid/net/metrics/DhcpErrorEvent;->PARSING_ERROR:I
+Landroid/net/metrics/DhcpErrorEvent;->RECEIVE_ERROR:I
+Landroid/net/metrics/IpConnectivityLog;-><init>()V
+Landroid/net/metrics/IpConnectivityLog;->log(Landroid/os/Parcelable;)Z
+Landroid/net/metrics/IpConnectivityLog;->log(Ljava/lang/String;Landroid/os/Parcelable;)Z
+Landroid/net/metrics/IpManagerEvent;-><init>(IJ)V
+Landroid/net/metrics/IpReachabilityEvent;-><init>(I)V
+Landroid/net/metrics/IpReachabilityEvent;->nudFailureEventType(ZZ)I
+Landroid/net/metrics/RaEvent$Builder;-><init>()V
+Landroid/net/metrics/RaEvent$Builder;->build()Landroid/net/metrics/RaEvent;
+Landroid/net/metrics/RaEvent$Builder;->updateDnsslLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updatePrefixPreferredLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updatePrefixValidLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updateRdnssLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updateRouteInfoLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/metrics/RaEvent$Builder;->updateRouterLifetime(J)Landroid/net/metrics/RaEvent$Builder;
+Landroid/net/Network;-><init>(I)V
+Landroid/net/Network;->netId:I
+Landroid/net/NetworkCapabilities;->getNetworkSpecifier()Landroid/net/NetworkSpecifier;
+Landroid/net/NetworkCapabilities;->getSignalStrength()I
+Landroid/net/NetworkCapabilities;->hasSignalStrength()Z
+Landroid/net/NetworkCapabilities;->transportNamesOf([I)Ljava/lang/String;
+Landroid/net/NetworkQuotaInfo;->getEstimatedBytes()J
+Landroid/net/NetworkQuotaInfo;->getHardLimitBytes()J
+Landroid/net/NetworkQuotaInfo;->getSoftLimitBytes()J
+Landroid/net/NetworkRequest$Builder;->setSignalStrength(I)Landroid/net/NetworkRequest$Builder;
+Landroid/net/NetworkRequest;->networkCapabilities:Landroid/net/NetworkCapabilities;
+Landroid/net/NetworkState;->network:Landroid/net/Network;
+Landroid/net/NetworkStats$Entry;-><init>()V
+Landroid/net/NetworkStats$Entry;->iface:Ljava/lang/String;
+Landroid/net/NetworkStats$Entry;->rxBytes:J
+Landroid/net/NetworkStats$Entry;->rxPackets:J
+Landroid/net/NetworkStats$Entry;->set:I
+Landroid/net/NetworkStats$Entry;->tag:I
+Landroid/net/NetworkStats$Entry;->txBytes:J
+Landroid/net/NetworkStats$Entry;->txPackets:J
+Landroid/net/NetworkStats$Entry;->uid:I
+Landroid/net/NetworkStats;-><init>(JI)V
+Landroid/net/NetworkStats;->combineValues(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats;
+Landroid/net/NetworkStatsHistory$Entry;->txBytes:J
+Landroid/net/NetworkStatsHistory;->getStart()J
+Landroid/net/NetworkStatsHistory;->getValues(JJLandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
+Landroid/net/NetworkTemplate;->buildTemplateMobileAll(Ljava/lang/String;)Landroid/net/NetworkTemplate;
+Landroid/net/NetworkUtils;->attachControlPacketFilter(Ljava/io/FileDescriptor;I)V
+Landroid/net/NetworkUtils;->attachDhcpFilter(Ljava/io/FileDescriptor;)V
+Landroid/net/NetworkUtils;->attachRaFilter(Ljava/io/FileDescriptor;I)V
+Landroid/net/NetworkUtils;->getImplicitNetmask(Ljava/net/Inet4Address;)I
+Landroid/net/NetworkUtils;->netmaskToPrefixLength(Ljava/net/Inet4Address;)I
+Landroid/net/NetworkUtils;->protectFromVpn(Ljava/io/FileDescriptor;)Z
+Landroid/net/RouteInfo;-><init>(Landroid/net/IpPrefix;Ljava/net/InetAddress;Ljava/lang/String;)V
+Landroid/net/RouteInfo;->hasGateway()Z
+Landroid/net/RouteInfo;->selectBestRoute(Ljava/util/Collection;Ljava/net/InetAddress;)Landroid/net/RouteInfo;
+Landroid/net/SntpClient;->getNtpTime()J
+Landroid/net/SntpClient;->getNtpTimeReference()J
+Landroid/net/SntpClient;->getRoundTripTime()J
+Landroid/net/SntpClient;->requestTime(Ljava/lang/String;I)Z
+Landroid/net/StaticIpConfiguration;->dnsServers:Ljava/util/ArrayList;
+Landroid/net/StaticIpConfiguration;->domains:Ljava/lang/String;
+Landroid/net/StaticIpConfiguration;->getRoutes(Ljava/lang/String;)Ljava/util/List;
+Landroid/net/StringNetworkSpecifier;->specifier:Ljava/lang/String;
+Landroid/net/TrafficStats;->getMobileTcpRxPackets()J
+Landroid/net/TrafficStats;->getMobileTcpTxPackets()J
+Landroid/net/wifi/WifiInfo;->is5GHz()Z
+Landroid/net/wifi/WifiInfo;->score: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;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/BatteryStats$HistoryItem;-><init>()V
+Landroid/os/BatteryStats$HistoryItem;->batteryLevel:B
+Landroid/os/BatteryStats$HistoryItem;->cmd:B
+Landroid/os/BatteryStats$HistoryItem;->states:I
+Landroid/os/BatteryStats$HistoryItem;->time:J
+Landroid/os/BatteryStats$Timer;->getCountLocked(I)I
+Landroid/os/BatteryStats$Uid$Wakelock;->getWakeTime(I)Landroid/os/BatteryStats$Timer;
+Landroid/os/BatteryStats$Uid;-><init>()V
+Landroid/os/BatteryStats$Uid;->getWifiRunningTime(JI)J
+Landroid/os/BatteryStats;->getNextHistoryLocked(Landroid/os/BatteryStats$HistoryItem;)Z
+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/Environment;->getLegacyExternalStorageDirectory()Ljava/io/File;
+Landroid/os/Handler;-><init>(Landroid/os/Looper;Landroid/os/Handler$Callback;Z)V
+Landroid/os/Handler;->getMain()Landroid/os/Handler;
+Landroid/os/HwBinder;->reportSyspropChanged()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;->enableIpv6(Ljava/lang/String;)V
+Landroid/os/INetworkManagementService;->isBandwidthControlEnabled()Z
+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;->setIPv6AddrGenMode(Ljava/lang/String;I)V
+Landroid/os/INetworkManagementService;->unregisterObserver(Landroid/net/INetworkManagementEventObserver;)V
+Landroid/os/IPowerManager;->goToSleep(JII)V
+Landroid/os/IPowerManager;->reboot(ZLjava/lang/String;Z)V
+Landroid/os/IRemoteCallback$Stub;-><init>()V
+Landroid/os/Parcel;->readBlob()[B
+Landroid/os/Parcel;->readStringArray()[Ljava/lang/String;
+Landroid/os/Parcel;->writeBlob([B)V
+Landroid/os/Registrant;-><init>(Landroid/os/Handler;ILjava/lang/Object;)V
+Landroid/os/Registrant;->clear()V
+Landroid/os/Registrant;->notifyRegistrant()V
+Landroid/os/Registrant;->notifyRegistrant(Landroid/os/AsyncResult;)V
+Landroid/os/RegistrantList;-><init>()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;->remove(Landroid/os/Handler;)V
+Landroid/os/RegistrantList;->removeCleared()V
+Landroid/os/RemoteException;->rethrowFromSystemServer()Ljava/lang/RuntimeException;
+Landroid/os/ServiceSpecificException;->errorCode:I
+Landroid/os/storage/DiskInfo;->getId()Ljava/lang/String;
+Landroid/os/storage/StorageEventListener;-><init>()V
+Landroid/os/storage/StorageManager;->findVolumeById(Ljava/lang/String;)Landroid/os/storage/VolumeInfo;
+Landroid/os/storage/StorageManager;->from(Landroid/content/Context;)Landroid/os/storage/StorageManager;
+Landroid/os/storage/StorageManager;->registerListener(Landroid/os/storage/StorageEventListener;)V
+Landroid/os/storage/StorageManager;->unregisterListener(Landroid/os/storage/StorageEventListener;)V
+Landroid/os/storage/StorageVolume;->getId()Ljava/lang/String;
+Landroid/os/storage/VolumeInfo;->getId()Ljava/lang/String;
+Landroid/os/SystemProperties;->reportSyspropChanged()V
+Landroid/os/SystemService;->start(Ljava/lang/String;)V
+Landroid/os/SystemService;->stop(Ljava/lang/String;)V
+Landroid/os/SystemVibrator;-><init>()V
+Landroid/os/UserHandle;->isSameApp(II)Z
+Landroid/os/UserManager;->hasUserRestriction(Ljava/lang/String;Landroid/os/UserHandle;)Z
+Landroid/os/UserManager;->isAdminUser()Z
+Landroid/print/PrintDocumentAdapter$LayoutResultCallback;-><init>()V
+Landroid/print/PrintDocumentAdapter$WriteResultCallback;-><init>()V
+Landroid/provider/CalendarContract$Events;->PROVIDER_WRITABLE_COLUMNS:[Ljava/lang/String;
+Landroid/provider/ContactsContract$CommonDataKinds$Phone;->getDisplayLabel(Landroid/content/Context;ILjava/lang/CharSequence;)Ljava/lang/CharSequence;
+Landroid/provider/Settings$Global;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
+Landroid/provider/Settings$Secure;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
+Landroid/provider/Telephony$Mms;->isEmailAddress(Ljava/lang/String;)Z
+Landroid/provider/Telephony$Sms$Draft;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
+Landroid/provider/Telephony$Sms$Outbox;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZJ)Landroid/net/Uri;
+Landroid/R$styleable;->CheckBoxPreference:[I
+Landroid/service/dreams/DreamService;->canDoze()Z
+Landroid/service/dreams/DreamService;->isDozing()Z
+Landroid/service/dreams/DreamService;->startDozing()V
+Landroid/service/dreams/DreamService;->stopDozing()V
+Landroid/service/euicc/EuiccProfileInfo;-><init>(Ljava/lang/String;[Landroid/telephony/UiccAccessRule;Ljava/lang/String;)V
+Landroid/service/euicc/GetDefaultDownloadableSubscriptionListResult;->result:I
+Landroid/service/euicc/GetDownloadableSubscriptionMetadataResult;->result:I
+Landroid/service/vr/VrListenerService;->onCurrentVrActivityChanged(Landroid/content/ComponentName;ZI)V
+Landroid/system/NetlinkSocketAddress;-><init>(II)V
+Landroid/system/Os;->bind(Ljava/io/FileDescriptor;Ljava/net/SocketAddress;)V
+Landroid/system/Os;->connect(Ljava/io/FileDescriptor;Ljava/net/SocketAddress;)V
+Landroid/system/Os;->sendto(Ljava/io/FileDescriptor;[BIIILjava/net/SocketAddress;)I
+Landroid/system/Os;->setsockoptIfreq(Ljava/io/FileDescriptor;IILjava/lang/String;)V
+Landroid/system/Os;->setsockoptTimeval(Ljava/io/FileDescriptor;IILandroid/system/StructTimeval;)V
+Landroid/system/PacketSocketAddress;-><init>(I[B)V
+Landroid/system/PacketSocketAddress;-><init>(SI)V
+Landroid/telecom/ParcelableCall;->CREATOR:Landroid/os/Parcelable$Creator;
+Landroid/telecom/ParcelableCall;->getConnectTimeMillis()J
+Landroid/telecom/ParcelableCall;->getDisconnectCause()Landroid/telecom/DisconnectCause;
+Landroid/telecom/ParcelableCall;->getHandle()Landroid/net/Uri;
+Landroid/telecom/ParcelableCall;->getId()Ljava/lang/String;
+Landroid/telecom/TelecomManager;->from(Landroid/content/Context;)Landroid/telecom/TelecomManager;
+Landroid/telecom/VideoProfile$CameraCapabilities;-><init>(IIZF)V
+Landroid/telephony/euicc/DownloadableSubscription;->encodedActivationCode:Ljava/lang/String;
+Landroid/telephony/euicc/DownloadableSubscription;->setAccessRules([Landroid/telephony/UiccAccessRule;)V
+Landroid/telephony/euicc/DownloadableSubscription;->setCarrierName(Ljava/lang/String;)V
+Landroid/telephony/ims/compat/feature/ImsFeature;->getFeatureState()I
+Landroid/telephony/ims/compat/feature/ImsFeature;->setFeatureState(I)V
+Landroid/telephony/ims/compat/feature/MMTelFeature;-><init>()V
+Landroid/telephony/ims/compat/ImsService;-><init>()V
+Landroid/telephony/ims/compat/ImsService;->mImsServiceController:Landroid/os/IBinder;
+Landroid/telephony/ims/compat/stub/ImsCallSessionImplBase;-><init>()V
+Landroid/telephony/ims/compat/stub/ImsConfigImplBase;-><init>(Landroid/content/Context;)V
+Landroid/telephony/ims/compat/stub/ImsConfigImplBase;->getIImsConfig()Lcom/android/ims/internal/IImsConfig;
+Landroid/telephony/ims/compat/stub/ImsUtListenerImplBase;-><init>()V
+Landroid/telephony/ims/ImsCallForwardInfo;-><init>()V
+Landroid/telephony/ims/ImsCallForwardInfo;->mCondition:I
+Landroid/telephony/ims/ImsCallForwardInfo;->mNumber:Ljava/lang/String;
+Landroid/telephony/ims/ImsCallForwardInfo;->mServiceClass:I
+Landroid/telephony/ims/ImsCallForwardInfo;->mStatus:I
+Landroid/telephony/ims/ImsCallForwardInfo;->mTimeSeconds:I
+Landroid/telephony/ims/ImsCallForwardInfo;->mToA:I
+Landroid/telephony/ims/ImsCallProfile;->mCallExtras:Landroid/os/Bundle;
+Landroid/telephony/ims/ImsCallProfile;->mCallType:I
+Landroid/telephony/ims/ImsCallProfile;->mMediaProfile:Landroid/telephony/ims/ImsStreamMediaProfile;
+Landroid/telephony/ims/ImsCallProfile;->mRestrictCause:I
+Landroid/telephony/ims/ImsCallProfile;->presentationToOIR(I)I
+Landroid/telephony/ims/ImsExternalCallState;-><init>(ILandroid/net/Uri;ZIIZ)V
+Landroid/telephony/ims/ImsReasonInfo;-><init>(II)V
+Landroid/telephony/ims/ImsReasonInfo;->mCode:I
+Landroid/telephony/ims/ImsReasonInfo;->mExtraCode:I
+Landroid/telephony/ims/ImsReasonInfo;->mExtraMessage:Ljava/lang/String;
+Landroid/telephony/ims/ImsSsInfo;->mIcbNum:Ljava/lang/String;
+Landroid/telephony/ims/ImsSsInfo;->mStatus:I
+Landroid/telephony/ims/ImsStreamMediaProfile;-><init>()V
+Landroid/telephony/ims/ImsStreamMediaProfile;->mAudioDirection:I
+Landroid/telephony/ims/ImsStreamMediaProfile;->mAudioQuality:I
+Landroid/telephony/ims/ImsStreamMediaProfile;->mVideoDirection:I
+Landroid/telephony/ims/ImsVideoCallProvider;->getInterface()Lcom/android/ims/internal/IImsVideoCallProvider;
+Landroid/telephony/mbms/IMbmsStreamingSessionCallback$Stub;-><init>()V
+Landroid/telephony/mbms/IStreamingServiceCallback$Stub;-><init>()V
+Landroid/telephony/mbms/vendor/IMbmsStreamingService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/telephony/mbms/vendor/IMbmsStreamingService;
+Landroid/telephony/mbms/vendor/IMbmsStreamingService;->getPlaybackUri(ILjava/lang/String;)Landroid/net/Uri;
+Landroid/telephony/mbms/vendor/IMbmsStreamingService;->initialize(Landroid/telephony/mbms/IMbmsStreamingSessionCallback;I)I
+Landroid/telephony/mbms/vendor/IMbmsStreamingService;->requestUpdateStreamingServices(ILjava/util/List;)I
+Landroid/telephony/mbms/vendor/IMbmsStreamingService;->startStreaming(ILjava/lang/String;Landroid/telephony/mbms/IStreamingServiceCallback;)I
+Landroid/telephony/PhoneNumberUtils;->formatNumber(Ljava/lang/String;I)Ljava/lang/String;
+Landroid/telephony/PhoneNumberUtils;->isEmergencyNumber(ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isPotentialEmergencyNumber(ILjava/lang/String;)Z
+Landroid/telephony/PhoneNumberUtils;->isPotentialLocalEmergencyNumber(Landroid/content/Context;ILjava/lang/String;)Z
+Landroid/telephony/PhoneStateListener;-><init>(Ljava/lang/Integer;)V
+Landroid/telephony/PhoneStateListener;-><init>(Ljava/lang/Integer;Landroid/os/Looper;)V
+Landroid/telephony/PreciseCallState;->getBackgroundCallState()I
+Landroid/telephony/PreciseCallState;->getForegroundCallState()I
+Landroid/telephony/RadioAccessFamily;-><init>(II)V
+Landroid/telephony/RadioAccessFamily;->getRafFromNetworkType(I)I
+Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/telephony/Rlog;->i(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/telephony/ServiceState;->bitmaskHasTech(II)Z
+Landroid/telephony/ServiceState;->getDataRegState()I
+Landroid/telephony/ServiceState;->getDataRoaming()Z
+Landroid/telephony/ServiceState;->getRilDataRadioTechnology()I
+Landroid/telephony/ServiceState;->getVoiceNetworkType()I
+Landroid/telephony/ServiceState;->getVoiceRegState()I
+Landroid/telephony/ServiceState;->isCdma(I)Z
+Landroid/telephony/ServiceState;->isEmergencyOnly()Z
+Landroid/telephony/ServiceState;->isGsm(I)Z
+Landroid/telephony/ServiceState;->mergeServiceStates(Landroid/telephony/ServiceState;Landroid/telephony/ServiceState;)Landroid/telephony/ServiceState;
+Landroid/telephony/ServiceState;->rilRadioTechnologyToString(I)Ljava/lang/String;
+Landroid/telephony/SubscriptionInfo;->setDisplayName(Ljava/lang/CharSequence;)V
+Landroid/telephony/SubscriptionInfo;->setIconTint(I)V
+Landroid/telephony/SubscriptionManager;->clearDefaultsForInactiveSubIds()V
+Landroid/telephony/SubscriptionManager;->getDefaultVoicePhoneId()I
+Landroid/telephony/SubscriptionManager;->getResourcesForSubId(Landroid/content/Context;I)Landroid/content/res/Resources;
+Landroid/telephony/SubscriptionManager;->isActiveSubId(I)Z
+Landroid/telephony/SubscriptionManager;->isUsableSubIdValue(I)Z
+Landroid/telephony/SubscriptionManager;->isValidPhoneId(I)Z
+Landroid/telephony/SubscriptionManager;->isValidSlotIndex(I)Z
+Landroid/telephony/SubscriptionManager;->isValidSubscriptionId(I)Z
+Landroid/telephony/SubscriptionManager;->putPhoneIdAndSubIdExtra(Landroid/content/Intent;I)V
+Landroid/telephony/SubscriptionManager;->putPhoneIdAndSubIdExtra(Landroid/content/Intent;II)V
+Landroid/telephony/SubscriptionManager;->setDisplayName(Ljava/lang/String;IJ)I
+Landroid/telephony/SubscriptionManager;->setIconTint(II)I
+Landroid/telephony/TelephonyManager$MultiSimVariants;->DSDA:Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager$MultiSimVariants;->DSDS:Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager;->getIntAtIndex(Landroid/content/ContentResolver;Ljava/lang/String;I)I
+Landroid/telephony/TelephonyManager;->getIsimDomain()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getNetworkTypeName()Ljava/lang/String;
+Landroid/telephony/TelephonyManager;->getPreferredNetworkType(I)I
+Landroid/telephony/TelephonyManager;->getServiceStateForSubscriber(I)Landroid/telephony/ServiceState;
+Landroid/telephony/TelephonyManager;->getVoiceMessageCount()I
+Landroid/telephony/TelephonyManager;->getVoiceNetworkType(I)I
+Landroid/telephony/TelephonyManager;->isImsRegistered()Z
+Landroid/telephony/TelephonyManager;->nvResetConfig(I)Z
+Landroid/telephony/TelephonyManager;->putIntAtIndex(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
+Landroid/telephony/TelephonyManager;->setPreferredNetworkType(II)Z
+Landroid/text/TextUtils;->isPrintableAsciiOnly(Ljava/lang/CharSequence;)Z
+Landroid/util/IconDrawableFactory;->getBadgedIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;I)Landroid/graphics/drawable/Drawable;
+Landroid/util/IconDrawableFactory;->newInstance(Landroid/content/Context;)Landroid/util/IconDrawableFactory;
+Landroid/util/LocalLog$ReadOnlyLocalLog;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
+Landroid/util/LocalLog;-><init>(I)V
+Landroid/util/LocalLog;->log(Ljava/lang/String;)V
+Landroid/util/LocalLog;->readOnlyLocalLog()Landroid/util/LocalLog$ReadOnlyLocalLog;
+Landroid/util/LongArray;-><init>()V
+Landroid/util/LongArray;->add(IJ)V
+Landroid/util/LongArray;->get(I)J
+Landroid/util/LongArray;->size()I
+Landroid/util/RecurrenceRule;->buildRecurringMonthly(ILjava/time/ZoneId;)Landroid/util/RecurrenceRule;
+Landroid/util/RecurrenceRule;->start:Ljava/time/ZonedDateTime;
+Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
+Landroid/util/Slog;->println(ILjava/lang/String;Ljava/lang/String;)I
+Landroid/util/Slog;->wtf(Ljava/lang/String;Ljava/lang/String;)I
+Landroid/view/AppTransitionAnimationSpec;-><init>(ILandroid/graphics/GraphicBuffer;Landroid/graphics/Rect;)V
+Landroid/view/BatchedInputEventReceiver;-><init>(Landroid/view/InputChannel;Landroid/os/Looper;Landroid/view/Choreographer;)V
+Landroid/view/Choreographer;->getSfInstance()Landroid/view/Choreographer;
+Landroid/view/DisplayListCanvas;->drawRenderNode(Landroid/view/RenderNode;)V
+Landroid/view/IAppTransitionAnimationSpecsFuture$Stub;-><init>()V
+Landroid/view/IWindowManager;->destroyInputConsumer(Ljava/lang/String;)Z
+Landroid/view/IWindowManager;->endProlongedAnimations()V
+Landroid/view/IWindowManager;->getStableInsets(ILandroid/graphics/Rect;)V
+Landroid/view/IWindowManager;->overridePendingAppTransitionMultiThumbFuture(Landroid/view/IAppTransitionAnimationSpecsFuture;Landroid/os/IRemoteCallback;Z)V
+Landroid/view/RenderNode;->create(Ljava/lang/String;Landroid/view/View;)Landroid/view/RenderNode;
+Landroid/view/RenderNode;->end(Landroid/view/DisplayListCanvas;)V
+Landroid/view/RenderNode;->isValid()Z
+Landroid/view/RenderNode;->setClipToBounds(Z)Z
+Landroid/view/RenderNode;->setLeftTopRightBottom(IIII)Z
+Landroid/view/RenderNode;->start(II)Landroid/view/DisplayListCanvas;
+Landroid/view/Surface;->getNextFrameNumber()J
+Landroid/view/ThreadedRenderer;->createHardwareBitmap(Landroid/view/RenderNode;II)Landroid/graphics/Bitmap;
+Landroid/view/View;->hideTooltip()V
+Landroid/view/View;->setTooltip(Ljava/lang/CharSequence;)V
+Landroid/webkit/WebSettings;->getPluginsPath()Ljava/lang/String;
+Landroid/webkit/WebSettings;->getUseDoubleTree()Z
+Landroid/webkit/WebSettings;->setPluginsPath(Ljava/lang/String;)V
+Landroid/webkit/WebSettings;->setUseDoubleTree(Z)V
+Landroid/webkit/WebView;->getPluginList()Landroid/webkit/PluginList;
+Landroid/webkit/WebView;->getZoomControls()Landroid/view/View;
+Landroid/webkit/WebView;->refreshPlugins(Z)V
+Landroid/widget/ListView;->lookForSelectablePosition(IZ)I
+Lcom/android/ims/ImsConfigListener;->onSetFeatureResponse(IIII)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionConferenceStateUpdated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsConferenceState;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHandover(Lcom/android/ims/internal/IImsCallSession;IILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHandoverFailed(Lcom/android/ims/internal/IImsCallSession;IILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHeld(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHoldFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHoldReceived(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionInviteParticipantsRequestDelivered(Lcom/android/ims/internal/IImsCallSession;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionInviteParticipantsRequestFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMergeComplete(Lcom/android/ims/internal/IImsCallSession;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMergeFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMergeStarted(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionMultipartyStateChanged(Lcom/android/ims/internal/IImsCallSession;Z)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionProgressing(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsStreamMediaProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionResumed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionResumeFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionResumeReceived(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionStarted(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionStartFailed(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionSuppServiceReceived(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsSuppServiceNotification;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionTerminated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionTtyModeReceived(Lcom/android/ims/internal/IImsCallSession;I)V
+Lcom/android/ims/internal/IImsCallSessionListener;->callSessionUpdated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsCallProfile;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationAssociatedUriChanged([Landroid/net/Uri;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationChangeFailed(ILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationConnectedWithRadioTech(I)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationDisconnected(Landroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationFeatureCapabilityChanged(I[I[I)V
+Lcom/android/ims/internal/IImsRegistrationListener;->registrationProgressingWithRadioTech(I)V
+Lcom/android/ims/internal/IImsRegistrationListener;->voiceMessageCountUpdate(I)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationCallBarringQueried(Lcom/android/ims/internal/IImsUt;I[Landroid/telephony/ims/ImsSsInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationCallForwardQueried(Lcom/android/ims/internal/IImsUt;I[Landroid/telephony/ims/ImsCallForwardInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationCallWaitingQueried(Lcom/android/ims/internal/IImsUt;I[Landroid/telephony/ims/ImsSsInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationQueried(Lcom/android/ims/internal/IImsUt;ILandroid/os/Bundle;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationQueryFailed(Lcom/android/ims/internal/IImsUt;ILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationUpdated(Lcom/android/ims/internal/IImsUt;I)V
+Lcom/android/ims/internal/IImsUtListener;->utConfigurationUpdateFailed(Lcom/android/ims/internal/IImsUt;ILandroid/telephony/ims/ImsReasonInfo;)V
+Lcom/android/ims/internal/uce/common/CapInfo;->getCapTimestamp()J
+Lcom/android/ims/internal/uce/common/CapInfo;->isCdViaPresenceSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFtHttpSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFtSnFSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFtSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFtThumbSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isFullSnFGroupChatSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isGeoPullFtSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isGeoPullSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isGeoPushSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isImSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isIpVideoSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isIpVoiceSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isIsSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isRcsIpVideoCallSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isRcsIpVideoOnlyCallSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isRcsIpVoiceCallSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isSmSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isSpSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isVsDuringCSSupported()Z
+Lcom/android/ims/internal/uce/common/CapInfo;->isVsSupported()Z
+Lcom/android/ims/internal/uce/common/StatusCode;->getStatusCode()I
+Lcom/android/ims/internal/uce/common/UceLong;-><init>()V
+Lcom/android/ims/internal/uce/common/UceLong;->getClientId()I
+Lcom/android/ims/internal/uce/common/UceLong;->setClientId(I)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->cmdStatus(Lcom/android/ims/internal/uce/options/OptionsCmdStatus;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->getVersionCb(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->incomingOptions(Ljava/lang/String;Lcom/android/ims/internal/uce/options/OptionsCapInfo;I)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->serviceAvailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->serviceUnavailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/options/IOptionsListener;->sipResponseReceived(Ljava/lang/String;Lcom/android/ims/internal/uce/options/OptionsSipResponse;Lcom/android/ims/internal/uce/options/OptionsCapInfo;)V
+Lcom/android/ims/internal/uce/options/IOptionsService$Stub;-><init>()V
+Lcom/android/ims/internal/uce/options/IOptionsService;->addListener(ILcom/android/ims/internal/uce/options/IOptionsListener;Lcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getContactCap(ILjava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getContactListCap(I[Ljava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getMyInfo(II)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->getVersion(I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->removeListener(ILcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->responseIncomingOptions(IIILjava/lang/String;Lcom/android/ims/internal/uce/options/OptionsCapInfo;Z)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/IOptionsService;->setMyInfo(ILcom/android/ims/internal/uce/common/CapInfo;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;-><init>()V
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;->getCapInfo()Lcom/android/ims/internal/uce/common/CapInfo;
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;->getSdp()Ljava/lang/String;
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;->setCapInfo(Lcom/android/ims/internal/uce/common/CapInfo;)V
+Lcom/android/ims/internal/uce/options/OptionsCapInfo;->setSdp(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/options/OptionsCmdId;-><init>()V
+Lcom/android/ims/internal/uce/options/OptionsCmdId;->setCmdId(I)V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;-><init>()V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;->setCapInfo(Lcom/android/ims/internal/uce/common/CapInfo;)V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;->setCmdId(Lcom/android/ims/internal/uce/options/OptionsCmdId;)V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;->setStatus(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/options/OptionsCmdStatus;->setUserData(I)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;-><init>()V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setCmdId(Lcom/android/ims/internal/uce/options/OptionsCmdId;)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setReasonPhrase(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setRequestId(I)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setRetryAfter(I)V
+Lcom/android/ims/internal/uce/options/OptionsSipResponse;->setSipResponseCode(I)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->capInfoReceived(Ljava/lang/String;[Lcom/android/ims/internal/uce/presence/PresTupleInfo;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->cmdStatus(Lcom/android/ims/internal/uce/presence/PresCmdStatus;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->getVersionCb(Ljava/lang/String;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->listCapInfoReceived(Lcom/android/ims/internal/uce/presence/PresRlmiInfo;[Lcom/android/ims/internal/uce/presence/PresResInfo;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->publishTriggering(Lcom/android/ims/internal/uce/presence/PresPublishTriggerType;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->serviceAvailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->serviceUnAvailable(Lcom/android/ims/internal/uce/common/StatusCode;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->sipResponseReceived(Lcom/android/ims/internal/uce/presence/PresSipResponse;)V
+Lcom/android/ims/internal/uce/presence/IPresenceListener;->unpublishMessageSent()V
+Lcom/android/ims/internal/uce/presence/IPresenceService$Stub;-><init>()V
+Lcom/android/ims/internal/uce/presence/IPresenceService;->addListener(ILcom/android/ims/internal/uce/presence/IPresenceListener;Lcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->getContactCap(ILjava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->getContactListCap(I[Ljava/lang/String;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->getVersion(I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->publishMyCap(ILcom/android/ims/internal/uce/presence/PresCapInfo;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->reenableService(II)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->removeListener(ILcom/android/ims/internal/uce/common/UceLong;)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/IPresenceService;->setNewFeatureTag(ILjava/lang/String;Lcom/android/ims/internal/uce/presence/PresServiceInfo;I)Lcom/android/ims/internal/uce/common/StatusCode;
+Lcom/android/ims/internal/uce/presence/PresCapInfo;->getCapInfo()Lcom/android/ims/internal/uce/common/CapInfo;
+Lcom/android/ims/internal/uce/presence/PresCapInfo;->getContactUri()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresCapInfo;->mContactUri:Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresServiceInfo;->getMediaType()I
+Lcom/android/ims/internal/uce/presence/PresServiceInfo;->getServiceDesc()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresServiceInfo;->getServiceId()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresServiceInfo;->getServiceVer()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getCmdId()Lcom/android/ims/internal/uce/presence/PresCmdId;
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getReasonPhrase()Ljava/lang/String;
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getRequestId()I
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getRetryAfter()I
+Lcom/android/ims/internal/uce/presence/PresSipResponse;->getSipResponseCode()I
+Lcom/android/ims/internal/uce/uceservice/IUceListener;->setStatus(I)V
+Lcom/android/ims/internal/uce/uceservice/IUceService$Stub;-><init>()V
+Lcom/android/ims/internal/uce/uceservice/IUceService;->createOptionsService(Lcom/android/ims/internal/uce/options/IOptionsListener;Lcom/android/ims/internal/uce/common/UceLong;)I
+Lcom/android/ims/internal/uce/uceservice/IUceService;->createPresenceService(Lcom/android/ims/internal/uce/presence/IPresenceListener;Lcom/android/ims/internal/uce/common/UceLong;)I
+Lcom/android/ims/internal/uce/uceservice/IUceService;->destroyOptionsService(I)V
+Lcom/android/ims/internal/uce/uceservice/IUceService;->destroyPresenceService(I)V
+Lcom/android/ims/internal/uce/uceservice/IUceService;->getOptionsService()Lcom/android/ims/internal/uce/options/IOptionsService;
+Lcom/android/ims/internal/uce/uceservice/IUceService;->getPresenceService()Lcom/android/ims/internal/uce/presence/IPresenceService;
+Lcom/android/ims/internal/uce/uceservice/IUceService;->getServiceStatus()Z
+Lcom/android/ims/internal/uce/uceservice/IUceService;->isServiceStarted()Z
+Lcom/android/ims/internal/uce/uceservice/IUceService;->startService(Lcom/android/ims/internal/uce/uceservice/IUceListener;)Z
+Lcom/android/ims/internal/uce/uceservice/IUceService;->stopService()Z
+Lcom/android/internal/app/AlertController$AlertParams;->mIconId:I
+Lcom/android/internal/app/AlertController$AlertParams;->mMessage:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mNegativeButtonListener:Landroid/content/DialogInterface$OnClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mNegativeButtonText:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mPositiveButtonListener:Landroid/content/DialogInterface$OnClickListener;
+Lcom/android/internal/app/AlertController$AlertParams;->mPositiveButtonText:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mTitle:Ljava/lang/CharSequence;
+Lcom/android/internal/app/AlertController$AlertParams;->mView:Landroid/view/View;
+Lcom/android/internal/app/AlertController;->getButton(I)Landroid/widget/Button;
+Lcom/android/internal/app/IAppOpsService;->finishOperation(Landroid/os/IBinder;IILjava/lang/String;)V
+Lcom/android/internal/content/PackageMonitor;-><init>()V
+Lcom/android/internal/content/PackageMonitor;->register(Landroid/content/Context;Landroid/os/Looper;Landroid/os/UserHandle;Z)V
+Lcom/android/internal/content/PackageMonitor;->unregister()V
+Lcom/android/internal/location/ILocationProvider$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/location/ILocationProvider;
+Lcom/android/internal/location/ILocationProvider;->disable()V
+Lcom/android/internal/location/ILocationProvider;->enable()V
+Lcom/android/internal/location/ILocationProvider;->getProperties()Lcom/android/internal/location/ProviderProperties;
+Lcom/android/internal/location/ILocationProvider;->getStatus(Landroid/os/Bundle;)I
+Lcom/android/internal/location/ILocationProvider;->getStatusUpdateTime()J
+Lcom/android/internal/location/ILocationProvider;->sendExtraCommand(Ljava/lang/String;Landroid/os/Bundle;)Z
+Lcom/android/internal/location/ILocationProvider;->setRequest(Lcom/android/internal/location/ProviderRequest;Landroid/os/WorkSource;)V
+Lcom/android/internal/location/ProviderRequest;-><init>()V
+Lcom/android/internal/location/ProviderRequest;->interval:J
+Lcom/android/internal/location/ProviderRequest;->locationRequests:Ljava/util/List;
+Lcom/android/internal/location/ProviderRequest;->reportLocation:Z
+Lcom/android/internal/os/SomeArgs;->arg2:Ljava/lang/Object;
+Lcom/android/internal/os/SomeArgs;->arg3:Ljava/lang/Object;
+Lcom/android/internal/os/SomeArgs;->obtain()Lcom/android/internal/os/SomeArgs;
+Lcom/android/internal/os/SomeArgs;->recycle()V
+Lcom/android/internal/R$styleable;->NumberPicker:[I
+Lcom/android/internal/R$styleable;->TwoLineListItem:[I
+Lcom/android/internal/telephony/GsmAlphabet;->gsm7BitPackedToString([BII)Ljava/lang/String;
+Lcom/android/internal/telephony/GsmAlphabet;->stringToGsm7BitPacked(Ljava/lang/String;)[B
+Lcom/android/internal/telephony/ITelephony;->getDataEnabled(I)Z
+Lcom/android/internal/telephony/OperatorInfo$State;->CURRENT:Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/telephony/OperatorInfo$State;->FORBIDDEN:Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/telephony/OperatorInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+Lcom/android/internal/telephony/OperatorInfo;->CREATOR:Landroid/os/Parcelable$Creator;
+Lcom/android/internal/telephony/OperatorInfo;->getOperatorAlphaLong()Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->getOperatorAlphaShort()Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->getOperatorNumeric()Ljava/lang/String;
+Lcom/android/internal/telephony/OperatorInfo;->getState()Lcom/android/internal/telephony/OperatorInfo$State;
+Lcom/android/internal/util/AsyncChannel;-><init>()V
+Lcom/android/internal/util/AsyncChannel;->connect(Landroid/content/Context;Landroid/os/Handler;Landroid/os/Messenger;)V
+Lcom/android/internal/util/AsyncChannel;->sendMessage(Landroid/os/Message;)V
+Lcom/android/internal/util/IndentingPrintWriter;-><init>(Ljava/io/Writer;Ljava/lang/String;)V
+Lcom/android/internal/util/XmlUtils;->beginDocument(Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)V
+Lcom/android/internal/util/XmlUtils;->nextElement(Lorg/xmlpull/v1/XmlPullParser;)V
+Ljava/lang/System;->arraycopy([BI[BII)V
+Ljava/net/Inet4Address;->ALL:Ljava/net/InetAddress;
+Ljava/net/Inet4Address;->ANY:Ljava/net/InetAddress;
+Ljava/net/Inet6Address;->ANY:Ljava/net/InetAddress;
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index dbdb81c..025609e 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -128,6 +128,8 @@
import com.android.internal.policy.DecorView;
import com.android.internal.policy.PhoneWindow;
+import dalvik.system.VMRuntime;
+
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
@@ -7039,11 +7041,12 @@
mFragments.dispatchStart();
mFragments.reportLoaderStart();
- // This property is set for all builds except final release
- boolean isDlwarningEnabled = SystemProperties.getInt("ro.bionic.ld.warning", 0) == 1;
boolean isAppDebuggable =
(mApplication.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
+ // This property is set for all non-user builds except final release
+ boolean isDlwarningEnabled = SystemProperties.getInt("ro.bionic.ld.warning", 0) == 1;
+
if (isAppDebuggable || isDlwarningEnabled) {
String dlwarning = getDlWarning();
if (dlwarning != null) {
@@ -7064,6 +7067,31 @@
}
}
+ // This property is set for all non-user builds except final release
+ boolean isApiWarningEnabled = SystemProperties.getInt("ro.art.hiddenapi.warning", 0) == 1;
+
+ if (isAppDebuggable || isApiWarningEnabled) {
+ if (!mMainThread.mHiddenApiWarningShown && VMRuntime.getRuntime().hasUsedHiddenApi()) {
+ // Only show the warning once per process.
+ mMainThread.mHiddenApiWarningShown = true;
+
+ String appName = getApplicationInfo().loadLabel(getPackageManager())
+ .toString();
+ String warning = "Detected problems with API compatibility\n"
+ + "(visit g.co/dev/appcompat for more info)";
+ if (isAppDebuggable) {
+ new AlertDialog.Builder(this)
+ .setTitle(appName)
+ .setMessage(warning)
+ .setPositiveButton(android.R.string.ok, null)
+ .setCancelable(false)
+ .show();
+ } else {
+ Toast.makeText(this, appName + "\n" + warning, Toast.LENGTH_LONG).show();
+ }
+ }
+ }
+
mActivityTransitionState.enterReady(this);
}
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 2ecd312..7c5afba 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -266,6 +266,7 @@
boolean mJitEnabled = false;
boolean mSomeActivitiesChanged = false;
boolean mUpdatingSystemConfig = false;
+ /* package */ boolean mHiddenApiWarningShown = false;
// These can be accessed by multiple threads; mResourcesManager is the lock.
// XXX For now we keep around information about all packages we have
@@ -611,7 +612,7 @@
streamingOutput);
profiling = true;
} catch (RuntimeException e) {
- Slog.w(TAG, "Profiling failed on path " + profileFile);
+ Slog.w(TAG, "Profiling failed on path " + profileFile, e);
try {
profileFd.close();
profileFd = null;
@@ -963,7 +964,8 @@
}
public void setHttpProxy(String host, String port, String exclList, Uri pacFileUrl) {
- final ConnectivityManager cm = ConnectivityManager.from(getSystemContext());
+ final ConnectivityManager cm = ConnectivityManager.from(
+ getApplication() != null ? getApplication() : getSystemContext());
final Network network = cm.getBoundNetworkForProcess();
if (network != null) {
Proxy.setHttpProxySystemProperty(cm.getDefaultProxy());
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index b331d84..e8fbbd7 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -252,8 +252,10 @@
public static final int OP_INSTANT_APP_START_FOREGROUND = 68;
/** @hide Answer incoming phone calls */
public static final int OP_ANSWER_PHONE_CALLS = 69;
+ /** @hide Continue handover of a call from another app */
+ public static final int OP_ACCEPT_HANDOVER = 70;
/** @hide */
- public static final int _NUM_OP = 70;
+ public static final int _NUM_OP = 71;
/** Access to coarse location information. */
public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
@@ -365,6 +367,12 @@
/** Answer incoming phone calls */
public static final String OPSTR_ANSWER_PHONE_CALLS
= "android:answer_phone_calls";
+ /***
+ * Accept call handover
+ * @hide
+ */
+ public static final String OPSTR_ACCEPT_HANDOVER
+ = "android:accept_handover";
// Warning: If an permission is added here it also has to be added to
// com.android.packageinstaller.permission.utils.EventLogger
@@ -400,6 +408,7 @@
OP_USE_SIP,
OP_PROCESS_OUTGOING_CALLS,
OP_ANSWER_PHONE_CALLS,
+ OP_ACCEPT_HANDOVER,
// Microphone
OP_RECORD_AUDIO,
// Camera
@@ -492,7 +501,8 @@
OP_REQUEST_INSTALL_PACKAGES,
OP_PICTURE_IN_PICTURE,
OP_INSTANT_APP_START_FOREGROUND,
- OP_ANSWER_PHONE_CALLS
+ OP_ANSWER_PHONE_CALLS,
+ OP_ACCEPT_HANDOVER
};
/**
@@ -570,6 +580,7 @@
OPSTR_PICTURE_IN_PICTURE,
OPSTR_INSTANT_APP_START_FOREGROUND,
OPSTR_ANSWER_PHONE_CALLS,
+ OPSTR_ACCEPT_HANDOVER
};
/**
@@ -647,6 +658,7 @@
"PICTURE_IN_PICTURE",
"INSTANT_APP_START_FOREGROUND",
"ANSWER_PHONE_CALLS",
+ "ACCEPT_HANDOVER"
};
/**
@@ -724,6 +736,7 @@
null, // no permission for entering picture-in-picture on hide
Manifest.permission.INSTANT_APP_FOREGROUND_SERVICE,
Manifest.permission.ANSWER_PHONE_CALLS,
+ Manifest.permission.ACCEPT_HANDOVER
};
/**
@@ -802,6 +815,7 @@
null, // ENTER_PICTURE_IN_PICTURE_ON_HIDE
null, // INSTANT_APP_START_FOREGROUND
null, // ANSWER_PHONE_CALLS
+ null, // ACCEPT_HANDOVER
};
/**
@@ -879,6 +893,7 @@
false, // ENTER_PICTURE_IN_PICTURE_ON_HIDE
false, // INSTANT_APP_START_FOREGROUND
false, // ANSWER_PHONE_CALLS
+ false, // ACCEPT_HANDOVER
};
/**
@@ -955,6 +970,7 @@
AppOpsManager.MODE_ALLOWED, // OP_PICTURE_IN_PICTURE
AppOpsManager.MODE_DEFAULT, // OP_INSTANT_APP_START_FOREGROUND
AppOpsManager.MODE_ALLOWED, // ANSWER_PHONE_CALLS
+ AppOpsManager.MODE_ALLOWED, // ACCEPT_HANDOVER
};
/**
@@ -1035,6 +1051,7 @@
false, // OP_PICTURE_IN_PICTURE
false,
false, // ANSWER_PHONE_CALLS
+ false, // ACCEPT_HANDOVER
};
/**
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 4d47d82..5bc1e76 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -56,6 +56,7 @@
import android.content.pm.SharedLibraryInfo;
import android.content.pm.VerifierDeviceIdentity;
import android.content.pm.VersionedPackage;
+import android.content.pm.dex.ArtManager;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.Bitmap;
@@ -122,6 +123,8 @@
private UserManager mUserManager;
@GuardedBy("mLock")
private PackageInstaller mInstaller;
+ @GuardedBy("mLock")
+ private ArtManager mArtManager;
@GuardedBy("mDelegates")
private final ArrayList<MoveCallbackDelegate> mDelegates = new ArrayList<>();
@@ -2763,4 +2766,18 @@
throw e.rethrowAsRuntimeException();
}
}
+
+ @Override
+ public ArtManager getArtManager() {
+ synchronized (mLock) {
+ if (mArtManager == null) {
+ try {
+ mArtManager = new ArtManager(mPM.getArtManager());
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+ return mArtManager;
+ }
+ }
}
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 64ddfbc..8baa6b8 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -1009,6 +1009,22 @@
}
@Override
+ public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+ String[] receiverPermissions) {
+ warnIfCallingFromSystemProcess();
+ String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
+ try {
+ intent.prepareToLeaveProcess(this);
+ ActivityManager.getService().broadcastIntent(
+ mMainThread.getApplicationThread(), intent, resolvedType, null,
+ Activity.RESULT_OK, null, null, receiverPermissions, AppOpsManager.OP_NONE,
+ null, false, false, user.getIdentifier());
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ @Override
public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
warnIfCallingFromSystemProcess();
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index b162cb1..44a8930 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -264,7 +264,7 @@
* @return Whether the dialog is currently showing.
*/
public boolean isShowing() {
- return mShowing;
+ return mDecor == null ? false : mDecor.getVisibility() == View.VISIBLE;
}
/**
@@ -291,7 +291,10 @@
if (mWindow.hasFeature(Window.FEATURE_ACTION_BAR)) {
mWindow.invalidatePanelMenu(Window.FEATURE_ACTION_BAR);
}
- mDecor.setVisibility(View.VISIBLE);
+ if (mDecor.getVisibility() != View.VISIBLE) {
+ mDecor.setVisibility(View.VISIBLE);
+ sendShowMessage();
+ }
}
return;
}
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index 1811748..7b1afa5 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -137,6 +137,7 @@
void publishService(in IBinder token, in Intent intent, in IBinder service);
void activityResumed(in IBinder token);
void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent);
+ void setAgentApp(in String packageName, @nullable String agent);
void setAlwaysFinish(boolean enabled);
boolean startInstrumentation(in ComponentName className, in String profileFile,
int flags, in Bundle arguments, in IInstrumentationWatcher watcher,
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index 236a42c..903031e 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -28,6 +28,7 @@
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.dex.ArtManager;
import android.content.pm.split.SplitDependencyLoader;
import android.content.res.AssetManager;
import android.content.res.CompatibilityInfo;
@@ -35,7 +36,6 @@
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
-import android.os.Environment;
import android.os.FileUtils;
import android.os.Handler;
import android.os.IBinder;
@@ -49,13 +49,15 @@
import android.util.AndroidRuntimeException;
import android.util.ArrayMap;
import android.util.Log;
-import android.util.LogPrinter;
import android.util.Slog;
import android.util.SparseArray;
import android.view.Display;
import android.view.DisplayAdjustments;
+
import com.android.internal.util.ArrayUtils;
+
import dalvik.system.VMRuntime;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -729,13 +731,6 @@
}
}
- // Keep in sync with installd (frameworks/native/cmds/installd/commands.cpp).
- private static File getPrimaryProfileFile(String packageName) {
- File profileDir = Environment.getDataProfilesDePackageDirectory(
- UserHandle.myUserId(), packageName);
- return new File(profileDir, "primary.prof");
- }
-
private void setupJitProfileSupport() {
if (!SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false)) {
return;
@@ -763,10 +758,12 @@
return;
}
- final File profileFile = getPrimaryProfileFile(mPackageName);
-
- VMRuntime.registerAppInfo(profileFile.getPath(),
- codePaths.toArray(new String[codePaths.size()]));
+ for (int i = codePaths.size() - 1; i >= 0; i--) {
+ String splitName = i == 0 ? null : mApplicationInfo.splitNames[i - 1];
+ String profileFile = ArtManager.getCurrentProfilePath(
+ mPackageName, UserHandle.myUserId(), splitName);
+ VMRuntime.registerAppInfo(profileFile, new String[] {codePaths.get(i)});
+ }
// Register the app data directory with the reporter. It will
// help deciding whether or not a dex file is the primary apk or a
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java
index b7d3f57..6e37525 100644
--- a/core/java/android/app/PendingIntent.java
+++ b/core/java/android/app/PendingIntent.java
@@ -189,7 +189,7 @@
*/
public interface OnFinished {
/**
- * Called when a send operation as completed.
+ * Called when a send operation has completed.
*
* @param pendingIntent The PendingIntent this operation was sent through.
* @param intent The original Intent that was sent.
diff --git a/core/java/android/app/ProfilerInfo.java b/core/java/android/app/ProfilerInfo.java
index 044b780..8f718df 100644
--- a/core/java/android/app/ProfilerInfo.java
+++ b/core/java/android/app/ProfilerInfo.java
@@ -85,6 +85,15 @@
}
/**
+ * Return a new ProfilerInfo instance, with fields populated from this object,
+ * and {@link agent} and {@link attachAgentDuringBind} as given.
+ */
+ public ProfilerInfo setAgent(String agent, boolean attachAgentDuringBind) {
+ return new ProfilerInfo(this.profileFile, this.profileFd, this.samplingInterval,
+ this.autoStopProfiler, this.streamingOutput, agent, attachAgentDuringBind);
+ }
+
+ /**
* Close profileFd, if it is open. The field will be null after a call to this function.
*/
public void closeFd() {
diff --git a/core/java/android/app/StatusBarManager.java b/core/java/android/app/StatusBarManager.java
index 4a09214..3d1b73b 100644
--- a/core/java/android/app/StatusBarManager.java
+++ b/core/java/android/app/StatusBarManager.java
@@ -121,9 +121,10 @@
*/
public void disable(int what) {
try {
+ final int userId = Binder.getCallingUserHandle().getIdentifier();
final IStatusBarService svc = getService();
if (svc != null) {
- svc.disable(what, mToken, mContext.getPackageName());
+ svc.disableForUser(what, mToken, mContext.getPackageName(), userId);
}
} catch (RemoteException ex) {
throw ex.rethrowFromSystemServer();
@@ -138,9 +139,10 @@
*/
public void disable2(@Disable2Flags int what) {
try {
+ final int userId = Binder.getCallingUserHandle().getIdentifier();
final IStatusBarService svc = getService();
if (svc != null) {
- svc.disable2(what, mToken, mContext.getPackageName());
+ svc.disable2ForUser(what, mToken, mContext.getPackageName(), userId);
}
} catch (RemoteException ex) {
throw ex.rethrowFromSystemServer();
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 97c6681..aa1738d 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -22,6 +22,7 @@
import android.app.admin.IDevicePolicyManager;
import android.app.job.IJobScheduler;
import android.app.job.JobScheduler;
+import android.app.timedetector.TimeDetector;
import android.app.timezone.RulesManager;
import android.app.trust.TrustManager;
import android.app.usage.IStorageStatsManager;
@@ -271,12 +272,12 @@
}});
registerService(Context.IPSEC_SERVICE, IpSecManager.class,
- new StaticServiceFetcher<IpSecManager>() {
+ new CachedServiceFetcher<IpSecManager>() {
@Override
- public IpSecManager createService() {
+ public IpSecManager createService(ContextImpl ctx) throws ServiceNotFoundException {
IBinder b = ServiceManager.getService(Context.IPSEC_SERVICE);
IIpSecService service = IIpSecService.Stub.asInterface(b);
- return new IpSecManager(service);
+ return new IpSecManager(ctx, service);
}});
registerService(Context.COUNTRY_DETECTOR, CountryDetector.class,
@@ -905,6 +906,14 @@
public RulesManager createService(ContextImpl ctx) {
return new RulesManager(ctx.getOuterContext());
}});
+
+ registerService(Context.TIME_DETECTOR_SERVICE, TimeDetector.class,
+ new CachedServiceFetcher<TimeDetector>() {
+ @Override
+ public TimeDetector createService(ContextImpl ctx)
+ throws ServiceNotFoundException {
+ return new TimeDetector();
+ }});
}
/**
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 121b58a..d1500a8 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -3134,9 +3134,6 @@
/**
* Flag for {@link #wipeData(int)}: also erase the device's eUICC data.
- *
- * TODO(b/35851809): make this public.
- * @hide
*/
public static final int WIPE_EUICC = 0x0004;
diff --git a/core/java/android/app/timedetector/ITimeDetectorService.aidl b/core/java/android/app/timedetector/ITimeDetectorService.aidl
new file mode 100644
index 0000000..f624446
--- /dev/null
+++ b/core/java/android/app/timedetector/ITimeDetectorService.aidl
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+package android.app.timedetector;
+
+import android.app.timedetector.TimeSignal;
+
+/**
+ * System private API to comunicate with time detector service.
+ *
+ * <p>Used by parts of the Android system with signals associated with the device's time to provide
+ * information to the Time Detector Service.
+ *
+ * <p>Use the {@link android.app.timedetector.TimeDetector} class rather than going through
+ * this Binder interface directly. See {@link android.app.timedetector.TimeDetectorService} for
+ * more complete documentation.
+ *
+ *
+ * {@hide}
+ */
+interface ITimeDetectorService {
+ void suggestTime(in TimeSignal timeSignal);
+}
diff --git a/core/java/android/app/timedetector/TimeDetector.java b/core/java/android/app/timedetector/TimeDetector.java
new file mode 100644
index 0000000..052050d
--- /dev/null
+++ b/core/java/android/app/timedetector/TimeDetector.java
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+package android.app.timedetector;
+
+import android.annotation.NonNull;
+import android.annotation.SystemService;
+import android.content.Context;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.ServiceManager.ServiceNotFoundException;
+import android.util.Log;
+
+/**
+ * The interface through which system components can send signals to the TimeDetectorService.
+ * @hide
+ */
+@SystemService(Context.TIME_DETECTOR_SERVICE)
+public final class TimeDetector {
+ private static final String TAG = "timedetector.TimeDetector";
+ private static final boolean DEBUG = false;
+
+ private final ITimeDetectorService mITimeDetectorService;
+
+ public TimeDetector() throws ServiceNotFoundException {
+ mITimeDetectorService = ITimeDetectorService.Stub.asInterface(
+ ServiceManager.getServiceOrThrow(Context.TIME_DETECTOR_SERVICE));
+ }
+
+ /**
+ * Suggests the current time to the detector. The detector may ignore the signal if better
+ * signals are available such as those that come from more reliable sources or were
+ * determined more recently.
+ */
+ public void suggestTime(@NonNull TimeSignal timeSignal) {
+ if (DEBUG) {
+ Log.d(TAG, "suggestTime called: " + timeSignal);
+ }
+ try {
+ mITimeDetectorService.suggestTime(timeSignal);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+}
diff --git a/telephony/java/android/telephony/ims/internal/stub/ImsFeatureConfiguration.aidl b/core/java/android/app/timedetector/TimeSignal.aidl
similarity index 83%
copy from telephony/java/android/telephony/ims/internal/stub/ImsFeatureConfiguration.aidl
copy to core/java/android/app/timedetector/TimeSignal.aidl
index e890cf8..d2ec357 100644
--- a/telephony/java/android/telephony/ims/internal/stub/ImsFeatureConfiguration.aidl
+++ b/core/java/android/app/timedetector/TimeSignal.aidl
@@ -11,9 +11,9 @@
* 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
+ * limitations under the License.
*/
-package android.telephony.ims.internal.stub;
+package android.app.timedetector;
-parcelable ImsFeatureConfiguration;
+parcelable TimeSignal;
\ No newline at end of file
diff --git a/core/java/android/app/timedetector/TimeSignal.java b/core/java/android/app/timedetector/TimeSignal.java
new file mode 100644
index 0000000..7ba03cc
--- /dev/null
+++ b/core/java/android/app/timedetector/TimeSignal.java
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+
+package android.app.timedetector;
+
+import android.annotation.NonNull;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.TimestampedValue;
+
+import java.util.Objects;
+
+/**
+ * A time signal from a named source. The value consists of the number of milliseconds elapsed since
+ * 1/1/1970 00:00:00 UTC and the time according to the elapsed realtime clock when that number was
+ * established. The elapsed realtime clock is considered accurate but volatile, so time signals
+ * must not be persisted across device resets.
+ *
+ * @hide
+ */
+public final class TimeSignal implements Parcelable {
+
+ public static final Parcelable.Creator<TimeSignal> CREATOR =
+ new Parcelable.Creator<TimeSignal>() {
+ public TimeSignal createFromParcel(Parcel in) {
+ return TimeSignal.createFromParcel(in);
+ }
+
+ public TimeSignal[] newArray(int size) {
+ return new TimeSignal[size];
+ }
+ };
+
+ public static final String SOURCE_ID_NITZ = "nitz";
+
+ private final String mSourceId;
+ private final TimestampedValue<Long> mUtcTime;
+
+ public TimeSignal(String sourceId, TimestampedValue<Long> utcTime) {
+ mSourceId = Objects.requireNonNull(sourceId);
+ mUtcTime = Objects.requireNonNull(utcTime);
+ }
+
+ private static TimeSignal createFromParcel(Parcel in) {
+ String sourceId = in.readString();
+ TimestampedValue<Long> utcTime =
+ TimestampedValue.readFromParcel(in, null /* classLoader */, Long.class);
+ return new TimeSignal(sourceId, utcTime);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ dest.writeString(mSourceId);
+ TimestampedValue.writeToParcel(dest, mUtcTime);
+ }
+
+ @NonNull
+ public String getSourceId() {
+ return mSourceId;
+ }
+
+ @NonNull
+ public TimestampedValue<Long> getUtcTime() {
+ return mUtcTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TimeSignal that = (TimeSignal) o;
+ return Objects.equals(mSourceId, that.mSourceId)
+ && Objects.equals(mUtcTime, that.mUtcTime);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mSourceId, mUtcTime);
+ }
+
+ @Override
+ public String toString() {
+ return "TimeSignal{"
+ + "mSourceId='" + mSourceId + '\''
+ + ", mUtcTime=" + mUtcTime
+ + '}';
+ }
+}
diff --git a/core/java/android/app/usage/NetworkStats.java b/core/java/android/app/usage/NetworkStats.java
index d33af4f..6ca2349 100644
--- a/core/java/android/app/usage/NetworkStats.java
+++ b/core/java/android/app/usage/NetworkStats.java
@@ -24,7 +24,6 @@
import android.net.NetworkTemplate;
import android.net.TrafficStats;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.util.IntArray;
import android.util.Log;
@@ -98,9 +97,8 @@
/** @hide */
NetworkStats(Context context, NetworkTemplate template, int flags, long startTimestamp,
- long endTimestamp) throws RemoteException, SecurityException {
- final INetworkStatsService statsService = INetworkStatsService.Stub.asInterface(
- ServiceManager.getService(Context.NETWORK_STATS_SERVICE));
+ long endTimestamp, INetworkStatsService statsService)
+ throws RemoteException, SecurityException {
// Open network stats session
mSession = statsService.openSessionForUsageStats(flags, context.getOpPackageName());
mCloseGuard.open("close");
diff --git a/core/java/android/app/usage/NetworkStatsManager.java b/core/java/android/app/usage/NetworkStatsManager.java
index 5576e86..2357637 100644
--- a/core/java/android/app/usage/NetworkStatsManager.java
+++ b/core/java/android/app/usage/NetworkStatsManager.java
@@ -37,6 +37,8 @@
import android.os.ServiceManager.ServiceNotFoundException;
import android.util.Log;
+import com.android.internal.annotations.VisibleForTesting;
+
/**
* Provides access to network usage history and statistics. Usage data is collected in
* discrete bins of time called 'Buckets'. See {@link NetworkStats.Bucket} for details.
@@ -107,9 +109,15 @@
* {@hide}
*/
public NetworkStatsManager(Context context) throws ServiceNotFoundException {
+ this(context, INetworkStatsService.Stub.asInterface(
+ ServiceManager.getServiceOrThrow(Context.NETWORK_STATS_SERVICE)));
+ }
+
+ /** @hide */
+ @VisibleForTesting
+ public NetworkStatsManager(Context context, INetworkStatsService service) {
mContext = context;
- mService = INetworkStatsService.Stub.asInterface(
- ServiceManager.getServiceOrThrow(Context.NETWORK_STATS_SERVICE));
+ mService = service;
setPollOnOpen(true);
}
@@ -135,7 +143,8 @@
public Bucket querySummaryForDevice(NetworkTemplate template,
long startTime, long endTime) throws SecurityException, RemoteException {
Bucket bucket = null;
- NetworkStats stats = new NetworkStats(mContext, template, mFlags, startTime, endTime);
+ NetworkStats stats = new NetworkStats(mContext, template, mFlags, startTime, endTime,
+ mService);
bucket = stats.getDeviceSummaryForNetwork();
stats.close();
@@ -208,7 +217,7 @@
}
NetworkStats stats;
- stats = new NetworkStats(mContext, template, mFlags, startTime, endTime);
+ stats = new NetworkStats(mContext, template, mFlags, startTime, endTime, mService);
stats.startSummaryEnumeration();
stats.close();
@@ -245,7 +254,7 @@
}
NetworkStats result;
- result = new NetworkStats(mContext, template, mFlags, startTime, endTime);
+ result = new NetworkStats(mContext, template, mFlags, startTime, endTime, mService);
result.startSummaryEnumeration();
return result;
@@ -295,7 +304,7 @@
NetworkStats result;
try {
- result = new NetworkStats(mContext, template, mFlags, startTime, endTime);
+ result = new NetworkStats(mContext, template, mFlags, startTime, endTime, mService);
result.startHistoryEnumeration(uid, tag);
} catch (RemoteException e) {
Log.e(TAG, "Error while querying stats for uid=" + uid + " tag=" + tag, e);
@@ -341,7 +350,7 @@
}
NetworkStats result;
- result = new NetworkStats(mContext, template, mFlags, startTime, endTime);
+ result = new NetworkStats(mContext, template, mFlags, startTime, endTime, mService);
result.startUserUidEnumeration();
return result;
}
@@ -451,19 +460,20 @@
}
private static NetworkTemplate createTemplate(int networkType, String subscriberId) {
- NetworkTemplate template = null;
+ final NetworkTemplate template;
switch (networkType) {
- case ConnectivityManager.TYPE_MOBILE: {
- template = NetworkTemplate.buildTemplateMobileAll(subscriberId);
- } break;
- case ConnectivityManager.TYPE_WIFI: {
+ case ConnectivityManager.TYPE_MOBILE:
+ template = subscriberId == null
+ ? NetworkTemplate.buildTemplateMobileWildcard()
+ : NetworkTemplate.buildTemplateMobileAll(subscriberId);
+ break;
+ case ConnectivityManager.TYPE_WIFI:
template = NetworkTemplate.buildTemplateWifiWildcard();
- } break;
- default: {
+ break;
+ default:
throw new IllegalArgumentException("Cannot create template for network type "
+ networkType + ", subscriberId '"
+ NetworkIdentity.scrubSubscriberId(subscriberId) + "'.");
- }
}
return template;
}
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java
index 35a21a4..419eda3 100644
--- a/core/java/android/bluetooth/BluetoothA2dp.java
+++ b/core/java/android/bluetooth/BluetoothA2dp.java
@@ -25,7 +25,6 @@
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
-import android.media.AudioManager;
import android.os.Binder;
import android.os.IBinder;
import android.os.ParcelUuid;
@@ -300,11 +299,7 @@
}
/**
- * Initiate connection to a profile of the remote bluetooth device.
- *
- * <p> Currently, the system supports only 1 connection to the
- * A2DP profile. The API will automatically disconnect connected
- * devices before connecting.
+ * Initiate connection to a profile of the remote Bluetooth device.
*
* <p> This API returns false in scenarios like the profile on the
* device is already connected or Bluetooth is not turned on.
@@ -603,34 +598,6 @@
}
/**
- * Tells remote device to adjust volume. Only if absolute volume is
- * supported. Uses the following values:
- * <ul>
- * <li>{@link AudioManager#ADJUST_LOWER}</li>
- * <li>{@link AudioManager#ADJUST_RAISE}</li>
- * <li>{@link AudioManager#ADJUST_MUTE}</li>
- * <li>{@link AudioManager#ADJUST_UNMUTE}</li>
- * </ul>
- *
- * @param direction One of the supported adjust values.
- * @hide
- */
- public void adjustAvrcpAbsoluteVolume(int direction) {
- if (DBG) Log.d(TAG, "adjustAvrcpAbsoluteVolume");
- try {
- mServiceLock.readLock().lock();
- if (mService != null && isEnabled()) {
- mService.adjustAvrcpAbsoluteVolume(direction);
- }
- if (mService == null) Log.w(TAG, "Proxy not attached to service");
- } catch (RemoteException e) {
- Log.e(TAG, "Error talking to BT service in adjustAvrcpAbsoluteVolume()", e);
- } finally {
- mServiceLock.readLock().unlock();
- }
- }
-
- /**
* Tells remote device to set an absolute volume. Only if absolute volume is supported
*
* @param volume Absolute volume to be set on AVRCP side
@@ -699,15 +666,17 @@
/**
* Gets the current codec status (configuration and capability).
*
+ * @param device the remote Bluetooth device. If null, use the current
+ * active A2DP Bluetooth device.
* @return the current codec status
* @hide
*/
- public BluetoothCodecStatus getCodecStatus() {
- if (DBG) Log.d(TAG, "getCodecStatus");
+ public BluetoothCodecStatus getCodecStatus(BluetoothDevice device) {
+ if (DBG) Log.d(TAG, "getCodecStatus(" + device + ")");
try {
mServiceLock.readLock().lock();
if (mService != null && isEnabled()) {
- return mService.getCodecStatus();
+ return mService.getCodecStatus(device);
}
if (mService == null) {
Log.w(TAG, "Proxy not attached to service");
@@ -724,15 +693,18 @@
/**
* Sets the codec configuration preference.
*
+ * @param device the remote Bluetooth device. If null, use the current
+ * active A2DP Bluetooth device.
* @param codecConfig the codec configuration preference
* @hide
*/
- public void setCodecConfigPreference(BluetoothCodecConfig codecConfig) {
- if (DBG) Log.d(TAG, "setCodecConfigPreference");
+ public void setCodecConfigPreference(BluetoothDevice device,
+ BluetoothCodecConfig codecConfig) {
+ if (DBG) Log.d(TAG, "setCodecConfigPreference(" + device + ")");
try {
mServiceLock.readLock().lock();
if (mService != null && isEnabled()) {
- mService.setCodecConfigPreference(codecConfig);
+ mService.setCodecConfigPreference(device, codecConfig);
}
if (mService == null) Log.w(TAG, "Proxy not attached to service");
return;
@@ -747,36 +719,42 @@
/**
* Enables the optional codecs.
*
+ * @param device the remote Bluetooth device. If null, use the currect
+ * active A2DP Bluetooth device.
* @hide
*/
- public void enableOptionalCodecs() {
- if (DBG) Log.d(TAG, "enableOptionalCodecs");
- enableDisableOptionalCodecs(true);
+ public void enableOptionalCodecs(BluetoothDevice device) {
+ if (DBG) Log.d(TAG, "enableOptionalCodecs(" + device + ")");
+ enableDisableOptionalCodecs(device, true);
}
/**
* Disables the optional codecs.
*
+ * @param device the remote Bluetooth device. If null, use the currect
+ * active A2DP Bluetooth device.
* @hide
*/
- public void disableOptionalCodecs() {
- if (DBG) Log.d(TAG, "disableOptionalCodecs");
- enableDisableOptionalCodecs(false);
+ public void disableOptionalCodecs(BluetoothDevice device) {
+ if (DBG) Log.d(TAG, "disableOptionalCodecs(" + device + ")");
+ enableDisableOptionalCodecs(device, false);
}
/**
* Enables or disables the optional codecs.
*
+ * @param device the remote Bluetooth device. If null, use the currect
+ * active A2DP Bluetooth device.
* @param enable if true, enable the optional codecs, other disable them
*/
- private void enableDisableOptionalCodecs(boolean enable) {
+ private void enableDisableOptionalCodecs(BluetoothDevice device, boolean enable) {
try {
mServiceLock.readLock().lock();
if (mService != null && isEnabled()) {
if (enable) {
- mService.enableOptionalCodecs();
+ mService.enableOptionalCodecs(device);
} else {
- mService.disableOptionalCodecs();
+ mService.disableOptionalCodecs(device);
}
}
if (mService == null) Log.w(TAG, "Proxy not attached to service");
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 6c8fe2e..df75b0d 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -80,8 +80,7 @@
* {@link #getBondedDevices()}; start device discovery with
* {@link #startDiscovery()}; or create a {@link BluetoothServerSocket} to
* listen for incoming RFComm connection requests with {@link
- * #listenUsingRfcommWithServiceRecord(String, UUID)}; listen for incoming L2CAP Connection-oriented
- * Channels (CoC) connection requests with listenUsingL2capCoc(int)}; or start a scan for
+ * #listenUsingRfcommWithServiceRecord(String, UUID)}; or start a scan for
* Bluetooth LE devices with {@link #startLeScan(LeScanCallback callback)}.
* </p>
* <p>This class is thread safe.</p>
@@ -391,6 +390,58 @@
public static final int SCAN_MODE_CONNECTABLE_DISCOVERABLE = 23;
/**
+ * Device only has a display.
+ *
+ * @hide
+ */
+ public static final int IO_CAPABILITY_OUT = 0;
+
+ /**
+ * Device has a display and the ability to input Yes/No.
+ *
+ * @hide
+ */
+ public static final int IO_CAPABILITY_IO = 1;
+
+ /**
+ * Device only has a keyboard for entry but no display.
+ *
+ * @hide
+ */
+ public static final int IO_CAPABILITY_IN = 2;
+
+ /**
+ * Device has no Input or Output capability.
+ *
+ * @hide
+ */
+ public static final int IO_CAPABILITY_NONE = 3;
+
+ /**
+ * Device has a display and a full keyboard.
+ *
+ * @hide
+ */
+ public static final int IO_CAPABILITY_KBDISP = 4;
+
+ /**
+ * Maximum range value for Input/Output capabilities.
+ *
+ * <p>This should be updated when adding a new Input/Output capability. Other code
+ * like validation depends on this being accurate.
+ *
+ * @hide
+ */
+ public static final int IO_CAPABILITY_MAX = 5;
+
+ /**
+ * The Input/Output capability of the device is unknown.
+ *
+ * @hide
+ */
+ public static final int IO_CAPABILITY_UNKNOWN = 255;
+
+ /**
* Broadcast Action: The local Bluetooth adapter has started the remote
* device discovery process.
* <p>This usually involves an inquiry scan of about 12 seconds, followed
@@ -537,13 +588,14 @@
"android.bluetooth.adapter.action.BLE_ACL_DISCONNECTED";
/** The profile is in disconnected state */
- public static final int STATE_DISCONNECTED = 0;
+ public static final int STATE_DISCONNECTED = BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTED;
/** The profile is in connecting state */
- public static final int STATE_CONNECTING = 1;
+ public static final int STATE_CONNECTING = BluetoothProtoEnums.CONNECTION_STATE_CONNECTING;
/** The profile is in connected state */
- public static final int STATE_CONNECTED = 2;
+ public static final int STATE_CONNECTED = BluetoothProtoEnums.CONNECTION_STATE_CONNECTED;
/** The profile is in disconnecting state */
- public static final int STATE_DISCONNECTING = 3;
+ public static final int STATE_DISCONNECTING =
+ BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTING;
/** @hide */
public static final String BLUETOOTH_MANAGER_SERVICE = "bluetooth_manager";
@@ -675,6 +727,10 @@
if (!getLeAccess()) {
return null;
}
+ if (!isMultipleAdvertisementSupported()) {
+ Log.e(TAG, "Bluetooth LE advertising not supported");
+ return null;
+ }
synchronized (mLock) {
if (sBluetoothLeAdvertiser == null) {
sBluetoothLeAdvertiser = new BluetoothLeAdvertiser(mManagerService);
@@ -1221,6 +1277,106 @@
}
/**
+ * Returns the Input/Output capability of the device for classic Bluetooth.
+ *
+ * @return Input/Output capability of the device. One of {@link #IO_CAPABILITY_OUT},
+ * {@link #IO_CAPABILITY_IO}, {@link #IO_CAPABILITY_IN}, {@link #IO_CAPABILITY_NONE},
+ * {@link #IO_CAPABILITY_KBDISP} or {@link #IO_CAPABILITY_UNKNOWN}.
+ *
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
+ public int getIoCapability() {
+ if (getState() != STATE_ON) return BluetoothAdapter.IO_CAPABILITY_UNKNOWN;
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null) return mService.getIoCapability();
+ } catch (RemoteException e) {
+ Log.e(TAG, e.getMessage(), e);
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ return BluetoothAdapter.IO_CAPABILITY_UNKNOWN;
+ }
+
+ /**
+ * Sets the Input/Output capability of the device for classic Bluetooth.
+ *
+ * <p>Changing the Input/Output capability of a device only takes effect on restarting the
+ * Bluetooth stack. You would need to restart the stack using {@link BluetoothAdapter#disable()}
+ * and {@link BluetoothAdapter#enable()} to see the changes.
+ *
+ * @param capability Input/Output capability of the device. One of {@link #IO_CAPABILITY_OUT},
+ * {@link #IO_CAPABILITY_IO}, {@link #IO_CAPABILITY_IN},
+ * {@link #IO_CAPABILITY_NONE} or {@link #IO_CAPABILITY_KBDISP}.
+ *
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+ public boolean setIoCapability(int capability) {
+ if (getState() != STATE_ON) return false;
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null) return mService.setIoCapability(capability);
+ } catch (RemoteException e) {
+ Log.e(TAG, e.getMessage(), e);
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ return false;
+ }
+
+ /**
+ * Returns the Input/Output capability of the device for BLE operations.
+ *
+ * @return Input/Output capability of the device. One of {@link #IO_CAPABILITY_OUT},
+ * {@link #IO_CAPABILITY_IO}, {@link #IO_CAPABILITY_IN}, {@link #IO_CAPABILITY_NONE},
+ * {@link #IO_CAPABILITY_KBDISP} or {@link #IO_CAPABILITY_UNKNOWN}.
+ *
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
+ public int getLeIoCapability() {
+ if (getState() != STATE_ON) return BluetoothAdapter.IO_CAPABILITY_UNKNOWN;
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null) return mService.getLeIoCapability();
+ } catch (RemoteException e) {
+ Log.e(TAG, e.getMessage(), e);
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ return BluetoothAdapter.IO_CAPABILITY_UNKNOWN;
+ }
+
+ /**
+ * Sets the Input/Output capability of the device for BLE operations.
+ *
+ * <p>Changing the Input/Output capability of a device only takes effect on restarting the
+ * Bluetooth stack. You would need to restart the stack using {@link BluetoothAdapter#disable()}
+ * and {@link BluetoothAdapter#enable()} to see the changes.
+ *
+ * @param capability Input/Output capability of the device. One of {@link #IO_CAPABILITY_OUT},
+ * {@link #IO_CAPABILITY_IO}, {@link #IO_CAPABILITY_IN},
+ * {@link #IO_CAPABILITY_NONE} or {@link #IO_CAPABILITY_KBDISP}.
+ *
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+ public boolean setLeIoCapability(int capability) {
+ if (getState() != STATE_ON) return false;
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null) return mService.setLeIoCapability(capability);
+ } catch (RemoteException e) {
+ Log.e(TAG, e.getMessage(), e);
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ return false;
+ }
+
+ /**
* Get the current Bluetooth scan mode of the local Bluetooth adapter.
* <p>The Bluetooth scan mode determines if the local adapter is
* connectable and/or discoverable from remote Bluetooth devices.
@@ -2303,6 +2459,9 @@
} else if (profile == BluetoothProfile.HID_DEVICE) {
BluetoothHidDevice hidDevice = new BluetoothHidDevice(context, listener);
return true;
+ } else if (profile == BluetoothProfile.HEARING_AID) {
+ BluetoothHearingAid hearingAid = new BluetoothHearingAid(context, listener);
+ return true;
} else {
return false;
}
@@ -2385,6 +2544,9 @@
BluetoothHidDevice hidDevice = (BluetoothHidDevice) proxy;
hidDevice.close();
break;
+ case BluetoothProfile.HEARING_AID:
+ BluetoothHearingAid hearingAid = (BluetoothHearingAid) proxy;
+ hearingAid.close();
}
}
diff --git a/core/java/android/bluetooth/BluetoothCodecStatus.java b/core/java/android/bluetooth/BluetoothCodecStatus.java
index 7ae4cb7..3a05e70 100644
--- a/core/java/android/bluetooth/BluetoothCodecStatus.java
+++ b/core/java/android/bluetooth/BluetoothCodecStatus.java
@@ -57,13 +57,35 @@
if (o instanceof BluetoothCodecStatus) {
BluetoothCodecStatus other = (BluetoothCodecStatus) o;
return (Objects.equals(other.mCodecConfig, mCodecConfig)
- && Objects.equals(other.mCodecsLocalCapabilities, mCodecsLocalCapabilities)
- && Objects.equals(other.mCodecsSelectableCapabilities,
+ && sameCapabilities(other.mCodecsLocalCapabilities, mCodecsLocalCapabilities)
+ && sameCapabilities(other.mCodecsSelectableCapabilities,
mCodecsSelectableCapabilities));
}
return false;
}
+ /**
+ * Checks whether two arrays of capabilities contain same capabilities.
+ * The order of the capabilities in each array is ignored.
+ *
+ * @param c1 the first array of capabilities to compare
+ * @param c2 the second array of capabilities to compare
+ * @return true if both arrays contain same capabilities
+ */
+ private static boolean sameCapabilities(BluetoothCodecConfig[] c1,
+ BluetoothCodecConfig[] c2) {
+ if (c1 == null) {
+ return (c2 == null);
+ }
+ if (c2 == null) {
+ return false;
+ }
+ if (c1.length != c2.length) {
+ return false;
+ }
+ return Arrays.asList(c1).containsAll(Arrays.asList(c2));
+ }
+
@Override
public int hashCode() {
return Objects.hash(mCodecConfig, mCodecsLocalCapabilities,
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index a2af342..457119d 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -98,22 +98,22 @@
public static final int GATT_FAILURE = 0x101;
/**
- * Connection paramter update - Use the connection paramters recommended by the
+ * Connection parameter update - Use the connection parameters recommended by the
* Bluetooth SIG. This is the default value if no connection parameter update
* is requested.
*/
public static final int CONNECTION_PRIORITY_BALANCED = 0;
/**
- * Connection paramter update - Request a high priority, low latency connection.
- * An application should only request high priority connection paramters to transfer
- * large amounts of data over LE quickly. Once the transfer is complete, the application
- * should request {@link BluetoothGatt#CONNECTION_PRIORITY_BALANCED} connectoin parameters
- * to reduce energy use.
+ * Connection parameter update - Request a high priority, low latency connection.
+ * An application should only request high priority connection parameters to transfer large
+ * amounts of data over LE quickly. Once the transfer is complete, the application should
+ * request {@link BluetoothGatt#CONNECTION_PRIORITY_BALANCED} connection parameters to reduce
+ * energy use.
*/
public static final int CONNECTION_PRIORITY_HIGH = 1;
- /** Connection paramter update - Request low power, reduced data rate connection parameters. */
+ /** Connection parameter update - Request low power, reduced data rate connection parameters. */
public static final int CONNECTION_PRIORITY_LOW_POWER = 2;
/**
@@ -1507,6 +1507,40 @@
}
/**
+ * Request an LE connection parameter update.
+ *
+ * <p>This function will send an LE connection parameters update request to the remote device.
+ *
+ * @return true, if the request is send to the Bluetooth stack.
+ * @hide
+ */
+ public boolean requestLeConnectionUpdate(int minConnectionInterval, int maxConnectionInterval,
+ int slaveLatency, int supervisionTimeout,
+ int minConnectionEventLen, int maxConnectionEventLen) {
+ if (DBG) {
+ Log.d(TAG, "requestLeConnectionUpdate() - min=(" + minConnectionInterval
+ + ")" + (1.25 * minConnectionInterval)
+ + "msec, max=(" + maxConnectionInterval + ")"
+ + (1.25 * maxConnectionInterval) + "msec, latency=" + slaveLatency
+ + ", timeout=" + supervisionTimeout + "msec" + ", min_ce="
+ + minConnectionEventLen + ", max_ce=" + maxConnectionEventLen);
+ }
+ if (mService == null || mClientIf == 0) return false;
+
+ try {
+ mService.leConnectionUpdate(mClientIf, mDevice.getAddress(),
+ minConnectionInterval, maxConnectionInterval,
+ slaveLatency, supervisionTimeout,
+ minConnectionEventLen, maxConnectionEventLen);
+ } catch (RemoteException e) {
+ Log.e(TAG, "", e);
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
* Not supported - please use {@link BluetoothManager#getConnectedDevices(int)}
* with {@link BluetoothProfile#GATT} as argument
*
diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java
index 4ed2500..ef1b0bd 100644
--- a/core/java/android/bluetooth/BluetoothGattServer.java
+++ b/core/java/android/bluetooth/BluetoothGattServer.java
@@ -701,10 +701,14 @@
* <p>If the local device has already exposed services when this function
* is called, a service update notification will be sent to all clients.
*
+ * <p>The {@link BluetoothGattServerCallback#onServiceAdded} callback will indicate
+ * whether this service has been added successfully. Do not add another service
+ * before this callback.
+ *
* <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
*
* @param service Service to be added to the list of services provided by this device.
- * @return true, if the service has been added successfully
+ * @return true, if the request to add service has been initiated
*/
public boolean addService(BluetoothGattService service) {
if (DBG) Log.d(TAG, "addService() - service: " + service.getUuid());
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index a68f485..0c91a20 100644
--- a/core/java/android/bluetooth/BluetoothHeadset.java
+++ b/core/java/android/bluetooth/BluetoothHeadset.java
@@ -16,6 +16,7 @@
package android.bluetooth;
+import android.Manifest;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
@@ -633,8 +634,9 @@
* <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
*
* @param device Bluetooth headset
- * @return false if there is no headset connected of if the connected headset doesn't support
- * voice recognition or on error, true otherwise
+ * @return false if there is no headset connected, or the connected headset doesn't support
+ * voice recognition, or voice recognition is already started, or audio channel is occupied,
+ * or on error, true otherwise
*/
public boolean startVoiceRecognition(BluetoothDevice device) {
if (DBG) log("startVoiceRecognition()");
@@ -654,10 +656,15 @@
* Stop Bluetooth Voice Recognition mode, and shut down the
* Bluetooth audio path.
*
+ * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+ * If this function returns true, this intent will be broadcasted with
+ * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_DISCONNECTED}.
+ *
* <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
*
* @param device Bluetooth headset
- * @return false if there is no headset connected or on error, true otherwise
+ * @return false if there is no headset connected, or voice recognition has not started,
+ * or voice recognition has ended on this headset, or on error, true otherwise
*/
public boolean stopVoiceRecognition(BluetoothDevice device) {
if (DBG) log("stopVoiceRecognition()");
@@ -798,11 +805,12 @@
}
/**
- * Check if Bluetooth SCO audio is connected.
+ * Check if at least one headset's SCO audio is connected or connecting
*
* <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
*
- * @return true if SCO is connected, false otherwise or on error
+ * @return true if at least one device's SCO audio is connected or connecting, false otherwise
+ * or on error
* @hide
*/
public boolean isAudioOn() {
@@ -821,11 +829,21 @@
}
/**
- * Initiates a connection of headset audio.
- * It setup SCO channel with remote connected headset device.
+ * Initiates a connection of headset audio to the current active device
*
- * @return true if successful false if there was some error such as there is no connected
- * headset
+ * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+ * If this function returns true, this intent will be broadcasted with
+ * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_CONNECTING}.
+ *
+ * <p> {@link #EXTRA_STATE} will transition from
+ * {@link #STATE_AUDIO_CONNECTING} to {@link #STATE_AUDIO_CONNECTED} when
+ * audio connection is established and to {@link #STATE_AUDIO_DISCONNECTED}
+ * in case of failure to establish the audio connection.
+ *
+ * Note that this intent will not be sent if {@link BluetoothHeadset#isAudioOn()} is true
+ * before calling this method
+ *
+ * @return false if there was some error such as there is no active headset
* @hide
*/
public boolean connectAudio() {
@@ -844,11 +862,14 @@
}
/**
- * Initiates a disconnection of headset audio.
- * It tears down the SCO channel from remote headset device.
+ * Initiates a disconnection of HFP SCO audio.
+ * Tear down voice recognition or virtual voice call if any.
*
- * @return true if successful false if there was some error such as there is no connected SCO
- * channel
+ * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+ * If this function returns true, this intent will be broadcasted with
+ * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_DISCONNECTED}.
+ *
+ * @return false if audio is not connected, or on error, true otherwise
* @hide
*/
public boolean disconnectAudio() {
@@ -867,22 +888,33 @@
}
/**
- * Initiates a SCO channel connection with the headset (if connected).
- * Also initiates a virtual voice call for Handsfree devices as many devices
- * do not accept SCO audio without a call.
- * This API allows the handsfree device to be used for routing non-cellular
- * call audio.
+ * Initiates a SCO channel connection as a virtual voice call to the current active device
+ * Active handsfree device will be notified of incoming call and connected call.
*
- * @param device Remote Bluetooth Device
- * @return true if successful, false if there was some error.
+ * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+ * If this function returns true, this intent will be broadcasted with
+ * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_CONNECTING}.
+ *
+ * <p> {@link #EXTRA_STATE} will transition from
+ * {@link #STATE_AUDIO_CONNECTING} to {@link #STATE_AUDIO_CONNECTED} when
+ * audio connection is established and to {@link #STATE_AUDIO_DISCONNECTED}
+ * in case of failure to establish the audio connection.
+ *
+ * @return true if successful, false if one of the following case applies
+ * - SCO audio is not idle (connecting or connected)
+ * - virtual call has already started
+ * - there is no active device
+ * - a Telecom managed call is going on
+ * - binder is dead or Bluetooth is disabled or other error
* @hide
*/
- public boolean startScoUsingVirtualVoiceCall(BluetoothDevice device) {
+ @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
+ public boolean startScoUsingVirtualVoiceCall() {
if (DBG) log("startScoUsingVirtualVoiceCall()");
final IBluetoothHeadset service = mService;
- if (service != null && isEnabled() && isValidDevice(device)) {
+ if (service != null && isEnabled()) {
try {
- return service.startScoUsingVirtualVoiceCall(device);
+ return service.startScoUsingVirtualVoiceCall();
} catch (RemoteException e) {
Log.e(TAG, e.toString());
}
@@ -894,19 +926,24 @@
}
/**
- * Terminates an ongoing SCO connection and the associated virtual
- * call.
+ * Terminates an ongoing SCO connection and the associated virtual call.
*
- * @param device Remote Bluetooth Device
- * @return true if successful, false if there was some error.
+ * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+ * If this function returns true, this intent will be broadcasted with
+ * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_DISCONNECTED}.
+ *
+ * @return true if successful, false if one of the following case applies
+ * - virtual voice call is not started or has ended
+ * - binder is dead or Bluetooth is disabled or other error
* @hide
*/
- public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice device) {
+ @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
+ public boolean stopScoUsingVirtualVoiceCall() {
if (DBG) log("stopScoUsingVirtualVoiceCall()");
final IBluetoothHeadset service = mService;
- if (service != null && isEnabled() && isValidDevice(device)) {
+ if (service != null && isEnabled()) {
try {
- return service.stopScoUsingVirtualVoiceCall(device);
+ return service.stopScoUsingVirtualVoiceCall();
} catch (RemoteException e) {
Log.e(TAG, e.toString());
}
diff --git a/core/java/android/bluetooth/BluetoothHearingAid.java b/core/java/android/bluetooth/BluetoothHearingAid.java
new file mode 100644
index 0000000..159e165
--- /dev/null
+++ b/core/java/android/bluetooth/BluetoothHearingAid.java
@@ -0,0 +1,764 @@
+/*
+ * Copyright 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.
+ */
+
+package android.bluetooth;
+
+import android.Manifest;
+import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
+import android.annotation.SdkConstant;
+import android.annotation.SdkConstant.SdkConstantType;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.Binder;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.android.internal.annotations.GuardedBy;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+/**
+ * This class provides the public APIs to control the Bluetooth Hearing Aid
+ * profile.
+ *
+ * <p>BluetoothHearingAid is a proxy object for controlling the Bluetooth Hearing Aid
+ * Service via IPC. Use {@link BluetoothAdapter#getProfileProxy} to get
+ * the BluetoothHearingAid proxy object.
+ *
+ * <p> Each method is protected with its appropriate permission.
+ * @hide
+ */
+public final class BluetoothHearingAid implements BluetoothProfile {
+ private static final String TAG = "BluetoothHearingAid";
+ private static final boolean DBG = false;
+ private static final boolean VDBG = false;
+
+ /**
+ * Intent used to broadcast the change in connection state of the Hearing Aid
+ * profile.
+ *
+ * <p>This intent will have 3 extras:
+ * <ul>
+ * <li> {@link #EXTRA_STATE} - The current state of the profile. </li>
+ * <li> {@link #EXTRA_PREVIOUS_STATE}- The previous state of the profile.</li>
+ * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
+ * </ul>
+ *
+ * <p>{@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} can be any of
+ * {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTING},
+ * {@link #STATE_CONNECTED}, {@link #STATE_DISCONNECTING}.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to
+ * receive.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_CONNECTION_STATE_CHANGED =
+ "android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED";
+
+ /**
+ * Intent used to broadcast the change in the Playing state of the Hearing Aid
+ * profile.
+ *
+ * <p>This intent will have 3 extras:
+ * <ul>
+ * <li> {@link #EXTRA_STATE} - The current state of the profile. </li>
+ * <li> {@link #EXTRA_PREVIOUS_STATE}- The previous state of the profile. </li>
+ * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
+ * </ul>
+ *
+ * <p>{@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} can be any of
+ * {@link #STATE_PLAYING}, {@link #STATE_NOT_PLAYING},
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to
+ * receive.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_PLAYING_STATE_CHANGED =
+ "android.bluetooth.hearingaid.profile.action.PLAYING_STATE_CHANGED";
+
+ /**
+ * Intent used to broadcast the selection of a connected device as active.
+ *
+ * <p>This intent will have one extra:
+ * <ul>
+ * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. It can
+ * be null if no device is active. </li>
+ * </ul>
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to
+ * receive.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_ACTIVE_DEVICE_CHANGED =
+ "android.bluetooth.hearingaid.profile.action.ACTIVE_DEVICE_CHANGED";
+
+ /**
+ * Hearing Aid device is streaming music. This state can be one of
+ * {@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} of
+ * {@link #ACTION_PLAYING_STATE_CHANGED} intent.
+ */
+ public static final int STATE_PLAYING = 10;
+
+ /**
+ * Hearing Aid device is NOT streaming music. This state can be one of
+ * {@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} of
+ * {@link #ACTION_PLAYING_STATE_CHANGED} intent.
+ */
+ public static final int STATE_NOT_PLAYING = 11;
+
+ /** This device represents Left Hearing Aid. */
+ public static final int SIDE_LEFT = IBluetoothHearingAid.SIDE_LEFT;
+
+ /** This device represents Right Hearing Aid. */
+ public static final int SIDE_RIGHT = IBluetoothHearingAid.SIDE_RIGHT;
+
+ /** This device is Monaural. */
+ public static final int MODE_MONAURAL = IBluetoothHearingAid.MODE_MONAURAL;
+
+ /** This device is Binaural (should receive only left or right audio). */
+ public static final int MODE_BINAURAL = IBluetoothHearingAid.MODE_BINAURAL;
+
+ /** Can't read ClientID for this device */
+ public static final long HI_SYNC_ID_INVALID = IBluetoothHearingAid.HI_SYNC_ID_INVALID;
+
+ private Context mContext;
+ private ServiceListener mServiceListener;
+ private final ReentrantReadWriteLock mServiceLock = new ReentrantReadWriteLock();
+ @GuardedBy("mServiceLock")
+ private IBluetoothHearingAid mService;
+ private BluetoothAdapter mAdapter;
+
+ private final IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
+ new IBluetoothStateChangeCallback.Stub() {
+ public void onBluetoothStateChange(boolean up) {
+ if (DBG) Log.d(TAG, "onBluetoothStateChange: up=" + up);
+ if (!up) {
+ if (VDBG) Log.d(TAG, "Unbinding service...");
+ try {
+ mServiceLock.writeLock().lock();
+ mService = null;
+ mContext.unbindService(mConnection);
+ } catch (Exception re) {
+ Log.e(TAG, "", re);
+ } finally {
+ mServiceLock.writeLock().unlock();
+ }
+ } else {
+ try {
+ mServiceLock.readLock().lock();
+ if (mService == null) {
+ if (VDBG) Log.d(TAG, "Binding service...");
+ doBind();
+ }
+ } catch (Exception re) {
+ Log.e(TAG, "", re);
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+ }
+ };
+
+ /**
+ * Create a BluetoothHearingAid proxy object for interacting with the local
+ * Bluetooth Hearing Aid service.
+ */
+ /*package*/ BluetoothHearingAid(Context context, ServiceListener l) {
+ mContext = context;
+ mServiceListener = l;
+ mAdapter = BluetoothAdapter.getDefaultAdapter();
+ IBluetoothManager mgr = mAdapter.getBluetoothManager();
+ if (mgr != null) {
+ try {
+ mgr.registerStateChangeCallback(mBluetoothStateChangeCallback);
+ } catch (RemoteException e) {
+ Log.e(TAG, "", e);
+ }
+ }
+
+ doBind();
+ }
+
+ void doBind() {
+ Intent intent = new Intent(IBluetoothHearingAid.class.getName());
+ ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0);
+ intent.setComponent(comp);
+ if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0,
+ android.os.Process.myUserHandle())) {
+ Log.e(TAG, "Could not bind to Bluetooth Hearing Aid Service with " + intent);
+ return;
+ }
+ }
+
+ /*package*/ void close() {
+ mServiceListener = null;
+ IBluetoothManager mgr = mAdapter.getBluetoothManager();
+ if (mgr != null) {
+ try {
+ mgr.unregisterStateChangeCallback(mBluetoothStateChangeCallback);
+ } catch (Exception e) {
+ Log.e(TAG, "", e);
+ }
+ }
+
+ try {
+ mServiceLock.writeLock().lock();
+ if (mService != null) {
+ mService = null;
+ mContext.unbindService(mConnection);
+ }
+ } catch (Exception re) {
+ Log.e(TAG, "", re);
+ } finally {
+ mServiceLock.writeLock().unlock();
+ }
+ }
+
+ @Override
+ public void finalize() {
+ // The empty finalize needs to be kept or the
+ // cts signature tests would fail.
+ }
+
+ /**
+ * Initiate connection to a profile of the remote bluetooth device.
+ *
+ * <p> This API returns false in scenarios like the profile on the
+ * device is already connected or Bluetooth is not turned on.
+ * When this API returns true, it is guaranteed that
+ * connection state intent for the profile will be broadcasted with
+ * the state. Users can get the connection state of the profile
+ * from this intent.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}
+ * permission.
+ *
+ * @param device Remote Bluetooth Device
+ * @return false on immediate error, true otherwise
+ * @hide
+ */
+ public boolean connect(BluetoothDevice device) {
+ if (DBG) log("connect(" + device + ")");
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled() && isValidDevice(device)) {
+ return mService.connect(device);
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return false;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return false;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Initiate disconnection from a profile
+ *
+ * <p> This API will return false in scenarios like the profile on the
+ * Bluetooth device is not in connected state etc. When this API returns,
+ * true, it is guaranteed that the connection state change
+ * intent will be broadcasted with the state. Users can get the
+ * disconnection state of the profile from this intent.
+ *
+ * <p> If the disconnection is initiated by a remote device, the state
+ * will transition from {@link #STATE_CONNECTED} to
+ * {@link #STATE_DISCONNECTED}. If the disconnect is initiated by the
+ * host (local) device the state will transition from
+ * {@link #STATE_CONNECTED} to state {@link #STATE_DISCONNECTING} to
+ * state {@link #STATE_DISCONNECTED}. The transition to
+ * {@link #STATE_DISCONNECTING} can be used to distinguish between the
+ * two scenarios.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}
+ * permission.
+ *
+ * @param device Remote Bluetooth Device
+ * @return false on immediate error, true otherwise
+ * @hide
+ */
+ public boolean disconnect(BluetoothDevice device) {
+ if (DBG) log("disconnect(" + device + ")");
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled() && isValidDevice(device)) {
+ return mService.disconnect(device);
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return false;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return false;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<BluetoothDevice> getConnectedDevices() {
+ if (VDBG) log("getConnectedDevices()");
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()) {
+ return mService.getConnectedDevices();
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return new ArrayList<BluetoothDevice>();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return new ArrayList<BluetoothDevice>();
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
+ if (VDBG) log("getDevicesMatchingStates()");
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()) {
+ return mService.getDevicesMatchingConnectionStates(states);
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return new ArrayList<BluetoothDevice>();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return new ArrayList<BluetoothDevice>();
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getConnectionState(BluetoothDevice device) {
+ if (VDBG) log("getState(" + device + ")");
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()
+ && isValidDevice(device)) {
+ return mService.getConnectionState(device);
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return BluetoothProfile.STATE_DISCONNECTED;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return BluetoothProfile.STATE_DISCONNECTED;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Select a connected device as active.
+ *
+ * The active device selection is per profile. An active device's
+ * purpose is profile-specific. For example, Hearing Aid audio
+ * streaming is to the active Hearing Aid device. If a remote device
+ * is not connected, it cannot be selected as active.
+ *
+ * <p> This API returns false in scenarios like the profile on the
+ * device is not connected or Bluetooth is not turned on.
+ * When this API returns true, it is guaranteed that the
+ * {@link #ACTION_ACTIVE_DEVICE_CHANGED} intent will be broadcasted
+ * with the active device.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}
+ * permission.
+ *
+ * @param device the remote Bluetooth device. Could be null to clear
+ * the active device and stop streaming audio to a Bluetooth device.
+ * @return false on immediate error, true otherwise
+ * @hide
+ */
+ public boolean setActiveDevice(@Nullable BluetoothDevice device) {
+ if (DBG) log("setActiveDevice(" + device + ")");
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()
+ && ((device == null) || isValidDevice(device))) {
+ mService.setActiveDevice(device);
+ return true;
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return false;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return false;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Get the connected physical Hearing Aid devices that are active
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
+ * permission.
+ *
+ * @return the list of active devices. The first element is the left active
+ * device; the second element is the right active device. If either or both side
+ * is not active, it will be null on that position. Returns empty list on error.
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH)
+ public List<BluetoothDevice> getActiveDevices() {
+ if (VDBG) log("getActiveDevices()");
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()) {
+ return mService.getActiveDevices();
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return new ArrayList<>();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return new ArrayList<>();
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Set priority of the profile
+ *
+ * <p> The device should already be paired.
+ * Priority can be one of {@link #PRIORITY_ON} orgetBluetoothManager
+ * {@link #PRIORITY_OFF},
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}
+ * permission.
+ *
+ * @param device Paired bluetooth device
+ * @param priority
+ * @return true if priority is set, false on error
+ * @hide
+ */
+ public boolean setPriority(BluetoothDevice device, int priority) {
+ if (DBG) log("setPriority(" + device + ", " + priority + ")");
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()
+ && isValidDevice(device)) {
+ if (priority != BluetoothProfile.PRIORITY_OFF
+ && priority != BluetoothProfile.PRIORITY_ON) {
+ return false;
+ }
+ return mService.setPriority(device, priority);
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return false;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return false;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Get the priority of the profile.
+ *
+ * <p> The priority can be any of:
+ * {@link #PRIORITY_AUTO_CONNECT}, {@link #PRIORITY_OFF},
+ * {@link #PRIORITY_ON}, {@link #PRIORITY_UNDEFINED}
+ *
+ * @param device Bluetooth device
+ * @return priority of the device
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH)
+ public int getPriority(BluetoothDevice device) {
+ if (VDBG) log("getPriority(" + device + ")");
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()
+ && isValidDevice(device)) {
+ return mService.getPriority(device);
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return BluetoothProfile.PRIORITY_OFF;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return BluetoothProfile.PRIORITY_OFF;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Helper for converting a state to a string.
+ *
+ * For debug use only - strings are not internationalized.
+ *
+ * @hide
+ */
+ public static String stateToString(int state) {
+ switch (state) {
+ case STATE_DISCONNECTED:
+ return "disconnected";
+ case STATE_CONNECTING:
+ return "connecting";
+ case STATE_CONNECTED:
+ return "connected";
+ case STATE_DISCONNECTING:
+ return "disconnecting";
+ case STATE_PLAYING:
+ return "playing";
+ case STATE_NOT_PLAYING:
+ return "not playing";
+ default:
+ return "<unknown state " + state + ">";
+ }
+ }
+
+ /**
+ * Get the volume of the device.
+ *
+ * <p> The volume is between -128 dB (mute) to 0 dB.
+ *
+ * @return volume of the hearing aid device.
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH)
+ public int getVolume() {
+ if (VDBG) {
+ log("getVolume()");
+ }
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()) {
+ return mService.getVolume();
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return 0;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return 0;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Tells remote device to adjust volume. Uses the following values:
+ * <ul>
+ * <li>{@link AudioManager#ADJUST_LOWER}</li>
+ * <li>{@link AudioManager#ADJUST_RAISE}</li>
+ * <li>{@link AudioManager#ADJUST_MUTE}</li>
+ * <li>{@link AudioManager#ADJUST_UNMUTE}</li>
+ * </ul>
+ *
+ * @param direction One of the supported adjust values.
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH)
+ public void adjustVolume(int direction) {
+ if (DBG) log("adjustVolume(" + direction + ")");
+
+ try {
+ mServiceLock.readLock().lock();
+
+ if (mService == null) {
+ Log.w(TAG, "Proxy not attached to service");
+ return;
+ }
+
+ if (!isEnabled()) return;
+
+ mService.adjustVolume(direction);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Tells remote device to set an absolute volume.
+ *
+ * @param volume Absolute volume to be set on remote
+ * @hide
+ */
+ public void setVolume(int volume) {
+ if (DBG) Log.d(TAG, "setVolume(" + volume + ")");
+
+ try {
+ mServiceLock.readLock().lock();
+ if (mService == null) {
+ Log.w(TAG, "Proxy not attached to service");
+ return;
+ }
+
+ if (!isEnabled()) return;
+
+ mService.setVolume(volume);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Get the CustomerId of the device.
+ *
+ * @param device Bluetooth device
+ * @return the CustomerId of the device
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH)
+ public long getHiSyncId(BluetoothDevice device) {
+ if (VDBG) {
+ log("getCustomerId(" + device + ")");
+ }
+ try {
+ mServiceLock.readLock().lock();
+ if (mService == null) {
+ Log.w(TAG, "Proxy not attached to service");
+ return HI_SYNC_ID_INVALID;
+ }
+
+ if (!isEnabled() || !isValidDevice(device)) return HI_SYNC_ID_INVALID;
+
+ return mService.getHiSyncId(device);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return HI_SYNC_ID_INVALID;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Get the side of the device.
+ *
+ * @param device Bluetooth device.
+ * @return SIDE_LEFT or SIDE_RIGHT
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH)
+ public int getDeviceSide(BluetoothDevice device) {
+ if (VDBG) {
+ log("getDeviceSide(" + device + ")");
+ }
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()
+ && isValidDevice(device)) {
+ return mService.getDeviceSide(device);
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return SIDE_LEFT;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return SIDE_LEFT;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ /**
+ * Get the mode of the device.
+ *
+ * @param device Bluetooth device
+ * @return MODE_MONAURAL or MODE_BINAURAL
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.BLUETOOTH)
+ public int getDeviceMode(BluetoothDevice device) {
+ if (VDBG) {
+ log("getDeviceMode(" + device + ")");
+ }
+ try {
+ mServiceLock.readLock().lock();
+ if (mService != null && isEnabled()
+ && isValidDevice(device)) {
+ return mService.getDeviceMode(device);
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return MODE_MONAURAL;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return MODE_MONAURAL;
+ } finally {
+ mServiceLock.readLock().unlock();
+ }
+ }
+
+ private final ServiceConnection mConnection = new ServiceConnection() {
+ public void onServiceConnected(ComponentName className, IBinder service) {
+ if (DBG) Log.d(TAG, "Proxy object connected");
+ try {
+ mServiceLock.writeLock().lock();
+ mService = IBluetoothHearingAid.Stub.asInterface(Binder.allowBlocking(service));
+ } finally {
+ mServiceLock.writeLock().unlock();
+ }
+
+ if (mServiceListener != null) {
+ mServiceListener.onServiceConnected(BluetoothProfile.HEARING_AID,
+ BluetoothHearingAid.this);
+ }
+ }
+
+ public void onServiceDisconnected(ComponentName className) {
+ if (DBG) Log.d(TAG, "Proxy object disconnected");
+ try {
+ mServiceLock.writeLock().lock();
+ mService = null;
+ } finally {
+ mServiceLock.writeLock().unlock();
+ }
+ if (mServiceListener != null) {
+ mServiceListener.onServiceDisconnected(BluetoothProfile.HEARING_AID);
+ }
+ }
+ };
+
+ private boolean isEnabled() {
+ if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true;
+ return false;
+ }
+
+ private boolean isValidDevice(BluetoothDevice device) {
+ if (device == null) return false;
+
+ if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true;
+ return false;
+ }
+
+ private static void log(String msg) {
+ Log.d(TAG, msg);
+ }
+}
diff --git a/core/java/android/bluetooth/BluetoothHidDevice.java b/core/java/android/bluetooth/BluetoothHidDevice.java
index 2fab305..4a466c6 100644
--- a/core/java/android/bluetooth/BluetoothHidDevice.java
+++ b/core/java/android/bluetooth/BluetoothHidDevice.java
@@ -27,8 +27,8 @@
import android.util.Log;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
+import java.util.concurrent.Executor;
/**
* Provides the public APIs to control the Bluetooth HID Device profile.
@@ -37,7 +37,6 @@
* Use {@link BluetoothAdapter#getProfileProxy} to get the BluetoothHidDevice proxy object.
*/
public final class BluetoothHidDevice implements BluetoothProfile {
-
private static final String TAG = BluetoothHidDevice.class.getSimpleName();
/**
@@ -62,106 +61,327 @@
"android.bluetooth.hiddevice.profile.action.CONNECTION_STATE_CHANGED";
/**
- * Constants representing device subclass.
+ * Constant representing unspecified HID device subclass.
*
* @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
- * BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceCallback)
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
*/
public static final byte SUBCLASS1_NONE = (byte) 0x00;
+ /**
+ * Constant representing keyboard subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS1_KEYBOARD = (byte) 0x40;
+ /**
+ * Constant representing mouse subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS1_MOUSE = (byte) 0x80;
+ /**
+ * Constant representing combo keyboard and mouse subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS1_COMBO = (byte) 0xC0;
+ /**
+ * Constant representing uncategorized HID device subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS2_UNCATEGORIZED = (byte) 0x00;
+ /**
+ * Constant representing joystick subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS2_JOYSTICK = (byte) 0x01;
+ /**
+ * Constant representing gamepad subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS2_GAMEPAD = (byte) 0x02;
+ /**
+ * Constant representing remote control subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS2_REMOTE_CONTROL = (byte) 0x03;
+ /**
+ * Constant representing sensing device subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS2_SENSING_DEVICE = (byte) 0x04;
+ /**
+ * Constant representing digitizer tablet subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS2_DIGITIZER_TABLET = (byte) 0x05;
+ /**
+ * Constant representing card reader subclass.
+ *
+ * @see #registerApp (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)
+ */
public static final byte SUBCLASS2_CARD_READER = (byte) 0x06;
/**
- * Constants representing report types.
+ * Constant representing HID Input Report type.
*
- * @see BluetoothHidDeviceCallback#onGetReport(BluetoothDevice, byte, byte, int)
- * @see BluetoothHidDeviceCallback#onSetReport(BluetoothDevice, byte, byte, byte[])
- * @see BluetoothHidDeviceCallback#onInterruptData(BluetoothDevice, byte, byte[])
+ * @see Callback#onGetReport(BluetoothDevice, byte, byte, int)
+ * @see Callback#onSetReport(BluetoothDevice, byte, byte, byte[])
+ * @see Callback#onInterruptData(BluetoothDevice, byte, byte[])
*/
public static final byte REPORT_TYPE_INPUT = (byte) 1;
+ /**
+ * Constant representing HID Output Report type.
+ *
+ * @see Callback#onGetReport(BluetoothDevice, byte, byte, int)
+ * @see Callback#onSetReport(BluetoothDevice, byte, byte, byte[])
+ * @see Callback#onInterruptData(BluetoothDevice, byte, byte[])
+ */
public static final byte REPORT_TYPE_OUTPUT = (byte) 2;
+ /**
+ * Constant representing HID Feature Report type.
+ *
+ * @see Callback#onGetReport(BluetoothDevice, byte, byte, int)
+ * @see Callback#onSetReport(BluetoothDevice, byte, byte, byte[])
+ * @see Callback#onInterruptData(BluetoothDevice, byte, byte[])
+ */
public static final byte REPORT_TYPE_FEATURE = (byte) 3;
/**
- * Constants representing error response for Set Report.
+ * Constant representing success response for Set Report.
*
- * @see BluetoothHidDeviceCallback#onSetReport(BluetoothDevice, byte, byte, byte[])
+ * @see Callback#onSetReport(BluetoothDevice, byte, byte, byte[])
*/
public static final byte ERROR_RSP_SUCCESS = (byte) 0;
+ /**
+ * Constant representing error response for Set Report due to "not ready".
+ *
+ * @see Callback#onSetReport(BluetoothDevice, byte, byte, byte[])
+ */
public static final byte ERROR_RSP_NOT_READY = (byte) 1;
+ /**
+ * Constant representing error response for Set Report due to "invalid report ID".
+ *
+ * @see Callback#onSetReport(BluetoothDevice, byte, byte, byte[])
+ */
public static final byte ERROR_RSP_INVALID_RPT_ID = (byte) 2;
+ /**
+ * Constant representing error response for Set Report due to "unsupported request".
+ *
+ * @see Callback#onSetReport(BluetoothDevice, byte, byte, byte[])
+ */
public static final byte ERROR_RSP_UNSUPPORTED_REQ = (byte) 3;
+ /**
+ * Constant representing error response for Set Report due to "invalid parameter".
+ *
+ * @see Callback#onSetReport(BluetoothDevice, byte, byte, byte[])
+ */
public static final byte ERROR_RSP_INVALID_PARAM = (byte) 4;
+ /**
+ * Constant representing error response for Set Report with unknown reason.
+ *
+ * @see Callback#onSetReport(BluetoothDevice, byte, byte, byte[])
+ */
public static final byte ERROR_RSP_UNKNOWN = (byte) 14;
/**
- * Constants representing protocol mode used set by host. Default is always {@link
+ * Constant representing boot protocol mode used set by host. Default is always {@link
* #PROTOCOL_REPORT_MODE} unless notified otherwise.
*
- * @see BluetoothHidDeviceCallback#onSetProtocol(BluetoothDevice, byte)
+ * @see Callback#onSetProtocol(BluetoothDevice, byte)
*/
public static final byte PROTOCOL_BOOT_MODE = (byte) 0;
+ /**
+ * Constant representing report protocol mode used set by host. Default is always {@link
+ * #PROTOCOL_REPORT_MODE} unless notified otherwise.
+ *
+ * @see Callback#onSetProtocol(BluetoothDevice, byte)
+ */
public static final byte PROTOCOL_REPORT_MODE = (byte) 1;
+ /**
+ * The template class that applications use to call callback functions on events from the HID
+ * host. Callback functions are wrapped in this class and registered to the Android system
+ * during app registration.
+ */
+ public abstract static class Callback {
+
+ private static final String TAG = "BluetoothHidDevCallback";
+
+ /**
+ * Callback called when application registration state changes. Usually it's called due to
+ * either {@link BluetoothHidDevice#registerApp (String, String, String, byte, byte[],
+ * Executor, Callback)} or {@link BluetoothHidDevice#unregisterApp()} , but can be also
+ * unsolicited in case e.g. Bluetooth was turned off in which case application is
+ * unregistered automatically.
+ *
+ * @param pluggedDevice {@link BluetoothDevice} object which represents host that currently
+ * has Virtual Cable established with device. Only valid when application is registered,
+ * can be <code>null</code>.
+ * @param registered <code>true</code> if application is registered, <code>false</code>
+ * otherwise.
+ */
+ public void onAppStatusChanged(BluetoothDevice pluggedDevice, boolean registered) {
+ Log.d(
+ TAG,
+ "onAppStatusChanged: pluggedDevice="
+ + pluggedDevice
+ + " registered="
+ + registered);
+ }
+
+ /**
+ * Callback called when connection state with remote host was changed. Application can
+ * assume than Virtual Cable is established when called with {@link
+ * BluetoothProfile#STATE_CONNECTED} <code>state</code>.
+ *
+ * @param device {@link BluetoothDevice} object representing host device which connection
+ * state was changed.
+ * @param state Connection state as defined in {@link BluetoothProfile}.
+ */
+ public void onConnectionStateChanged(BluetoothDevice device, int state) {
+ Log.d(TAG, "onConnectionStateChanged: device=" + device + " state=" + state);
+ }
+
+ /**
+ * Callback called when GET_REPORT is received from remote host. Should be replied by
+ * application using {@link BluetoothHidDevice#replyReport(BluetoothDevice, byte, byte,
+ * byte[])}.
+ *
+ * @param type Requested Report Type.
+ * @param id Requested Report Id, can be 0 if no Report Id are defined in descriptor.
+ * @param bufferSize Requested buffer size, application shall respond with at least given
+ * number of bytes.
+ */
+ public void onGetReport(BluetoothDevice device, byte type, byte id, int bufferSize) {
+ Log.d(
+ TAG,
+ "onGetReport: device="
+ + device
+ + " type="
+ + type
+ + " id="
+ + id
+ + " bufferSize="
+ + bufferSize);
+ }
+
+ /**
+ * Callback called when SET_REPORT is received from remote host. In case received data are
+ * invalid, application shall respond with {@link
+ * BluetoothHidDevice#reportError(BluetoothDevice, byte)}.
+ *
+ * @param type Report Type.
+ * @param id Report Id.
+ * @param data Report data.
+ */
+ public void onSetReport(BluetoothDevice device, byte type, byte id, byte[] data) {
+ Log.d(TAG, "onSetReport: device=" + device + " type=" + type + " id=" + id);
+ }
+
+ /**
+ * Callback called when SET_PROTOCOL is received from remote host. Application shall use
+ * this information to send only reports valid for given protocol mode. By default, {@link
+ * BluetoothHidDevice#PROTOCOL_REPORT_MODE} shall be assumed.
+ *
+ * @param protocol Protocol Mode.
+ */
+ public void onSetProtocol(BluetoothDevice device, byte protocol) {
+ Log.d(TAG, "onSetProtocol: device=" + device + " protocol=" + protocol);
+ }
+
+ /**
+ * Callback called when report data is received over interrupt channel. Report Type is
+ * assumed to be {@link BluetoothHidDevice#REPORT_TYPE_OUTPUT}.
+ *
+ * @param reportId Report Id.
+ * @param data Report data.
+ */
+ public void onInterruptData(BluetoothDevice device, byte reportId, byte[] data) {
+ Log.d(TAG, "onInterruptData: device=" + device + " reportId=" + reportId);
+ }
+
+ /**
+ * Callback called when Virtual Cable is removed. After this callback is received connection
+ * will be disconnected automatically.
+ */
+ public void onVirtualCableUnplug(BluetoothDevice device) {
+ Log.d(TAG, "onVirtualCableUnplug: device=" + device);
+ }
+ }
+
private Context mContext;
-
private ServiceListener mServiceListener;
-
private volatile IBluetoothHidDevice mService;
-
private BluetoothAdapter mAdapter;
- private static class BluetoothHidDeviceCallbackWrapper
- extends IBluetoothHidDeviceCallback.Stub {
+ private static class CallbackWrapper extends IBluetoothHidDeviceCallback.Stub {
- private BluetoothHidDeviceCallback mCallback;
+ private final Executor mExecutor;
+ private final Callback mCallback;
- public BluetoothHidDeviceCallbackWrapper(BluetoothHidDeviceCallback callback) {
+ CallbackWrapper(Executor executor, Callback callback) {
+ mExecutor = executor;
mCallback = callback;
}
@Override
public void onAppStatusChanged(BluetoothDevice pluggedDevice, boolean registered) {
- mCallback.onAppStatusChanged(pluggedDevice, registered);
+ clearCallingIdentity();
+ mExecutor.execute(() -> mCallback.onAppStatusChanged(pluggedDevice, registered));
}
@Override
public void onConnectionStateChanged(BluetoothDevice device, int state) {
- mCallback.onConnectionStateChanged(device, state);
+ clearCallingIdentity();
+ mExecutor.execute(() -> mCallback.onConnectionStateChanged(device, state));
}
@Override
public void onGetReport(BluetoothDevice device, byte type, byte id, int bufferSize) {
- mCallback.onGetReport(device, type, id, bufferSize);
+ clearCallingIdentity();
+ mExecutor.execute(() -> mCallback.onGetReport(device, type, id, bufferSize));
}
@Override
public void onSetReport(BluetoothDevice device, byte type, byte id, byte[] data) {
- mCallback.onSetReport(device, type, id, data);
+ clearCallingIdentity();
+ mExecutor.execute(() -> mCallback.onSetReport(device, type, id, data));
}
@Override
public void onSetProtocol(BluetoothDevice device, byte protocol) {
- mCallback.onSetProtocol(device, protocol);
+ clearCallingIdentity();
+ mExecutor.execute(() -> mCallback.onSetProtocol(device, protocol));
}
@Override
public void onInterruptData(BluetoothDevice device, byte reportId, byte[] data) {
- mCallback.onInterruptData(device, reportId, data);
+ clearCallingIdentity();
+ mExecutor.execute(() -> mCallback.onInterruptData(device, reportId, data));
}
@Override
public void onVirtualCableUnplug(BluetoothDevice device) {
- mCallback.onVirtualCableUnplug(device);
+ clearCallingIdentity();
+ mExecutor.execute(() -> mCallback.onVirtualCableUnplug(device));
}
}
@@ -213,8 +433,6 @@
};
BluetoothHidDevice(Context context, ServiceListener listener) {
- Log.v(TAG, "BluetoothHidDevice");
-
mContext = context;
mServiceListener = listener;
mAdapter = BluetoothAdapter.getDefaultAdapter();
@@ -245,7 +463,6 @@
}
void doUnbind() {
- Log.d(TAG, "Unbinding HidDevService");
if (mService != null) {
mService = null;
try {
@@ -257,8 +474,6 @@
}
void close() {
- Log.v(TAG, "close()");
-
IBluetoothManager mgr = mAdapter.getBluetoothManager();
if (mgr != null) {
try {
@@ -277,8 +492,6 @@
/** {@inheritDoc} */
@Override
public List<BluetoothDevice> getConnectedDevices() {
- Log.v(TAG, "getConnectedDevices()");
-
final IBluetoothHidDevice service = mService;
if (service != null) {
try {
@@ -290,14 +503,12 @@
Log.w(TAG, "Proxy not attached to service");
}
- return new ArrayList<BluetoothDevice>();
+ return new ArrayList<>();
}
/** {@inheritDoc} */
@Override
public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
- Log.v(TAG, "getDevicesMatchingConnectionStates(): states=" + Arrays.toString(states));
-
final IBluetoothHidDevice service = mService;
if (service != null) {
try {
@@ -309,14 +520,12 @@
Log.w(TAG, "Proxy not attached to service");
}
- return new ArrayList<BluetoothDevice>();
+ return new ArrayList<>();
}
/** {@inheritDoc} */
@Override
public int getConnectionState(BluetoothDevice device) {
- Log.v(TAG, "getConnectionState(): device=" + device);
-
final IBluetoothHidDevice service = mService;
if (service != null) {
try {
@@ -336,9 +545,9 @@
* when application is registered. Only one application can be registered at one time. When an
* application is registered, the HID Host service will be disabled until it is unregistered.
* When no longer used, application should be unregistered using {@link #unregisterApp()}. The
- * registration status should be tracked by the application by handling callback from
- * BluetoothHidDeviceCallback#onAppStatusChanged. The app registration status is not related to
- * the return value of this method.
+ * app will be automatically unregistered if it is not foreground. The registration status
+ * should be tracked by the application by handling callback from Callback#onAppStatusChanged.
+ * The app registration status is not related to the return value of this method.
*
* @param sdp {@link BluetoothHidDeviceAppSdpSettings} object of HID Device SDP record. The HID
* Device SDP record is required.
@@ -348,27 +557,36 @@
* @param outQos {@link BluetoothHidDeviceAppQosSettings} object of Outgoing QoS Settings. The
* Outgoing QoS Settings is not required. Use null or default
* BluetoothHidDeviceAppQosSettings.Builder for default values.
- * @param callback {@link BluetoothHidDeviceCallback} object to which callback messages will be
- * sent. The BluetoothHidDeviceCallback object is required.
+ * @param executor {@link Executor} object on which callback will be executed. The Executor
+ * object is required.
+ * @param callback {@link Callback} object to which callback messages will be sent. The Callback
+ * object is required.
* @return true if the command is successfully sent; otherwise false.
*/
- public boolean registerApp(BluetoothHidDeviceAppSdpSettings sdp,
- BluetoothHidDeviceAppQosSettings inQos, BluetoothHidDeviceAppQosSettings outQos,
- BluetoothHidDeviceCallback callback) {
- Log.v(TAG, "registerApp(): sdp=" + sdp + " inQos=" + inQos + " outQos=" + outQos
- + " callback=" + callback);
-
+ public boolean registerApp(
+ BluetoothHidDeviceAppSdpSettings sdp,
+ BluetoothHidDeviceAppQosSettings inQos,
+ BluetoothHidDeviceAppQosSettings outQos,
+ Executor executor,
+ Callback callback) {
boolean result = false;
- if (sdp == null || callback == null) {
- return false;
+ if (sdp == null) {
+ throw new IllegalArgumentException("sdp parameter cannot be null");
+ }
+
+ if (executor == null) {
+ throw new IllegalArgumentException("executor parameter cannot be null");
+ }
+
+ if (callback == null) {
+ throw new IllegalArgumentException("callback parameter cannot be null");
}
final IBluetoothHidDevice service = mService;
if (service != null) {
try {
- BluetoothHidDeviceCallbackWrapper cbw =
- new BluetoothHidDeviceCallbackWrapper(callback);
+ CallbackWrapper cbw = new CallbackWrapper(executor, callback);
result = service.registerApp(sdp, inQos, outQos, cbw);
} catch (RemoteException e) {
Log.e(TAG, e.toString());
@@ -384,16 +602,13 @@
* Unregisters application. Active connection will be disconnected and no new connections will
* be allowed until registered again using {@link #registerApp
* (BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceAppQosSettings,
- * BluetoothHidDeviceAppQosSettings, BluetoothHidDeviceCallback)} The registration status should
- * be tracked by the application by handling callback from
- * BluetoothHidDeviceCallback#onAppStatusChanged. The app registration status is not related to
- * the return value of this method.
+ * BluetoothHidDeviceAppQosSettings, Executor, Callback)}. The registration status should be
+ * tracked by the application by handling callback from Callback#onAppStatusChanged. The app
+ * registration status is not related to the return value of this method.
*
* @return true if the command is successfully sent; otherwise false.
*/
public boolean unregisterApp() {
- Log.v(TAG, "unregisterApp()");
-
boolean result = false;
final IBluetoothHidDevice service = mService;
@@ -437,7 +652,7 @@
/**
* Sends report to remote host as reply for GET_REPORT request from {@link
- * BluetoothHidDeviceCallback#onGetReport(BluetoothDevice, byte, byte, int)}.
+ * Callback#onGetReport(BluetoothDevice, byte, byte, int)}.
*
* @param type Report Type, as in request.
* @param id Report Id, as in request.
@@ -445,8 +660,6 @@
* @return true if the command is successfully sent; otherwise false.
*/
public boolean replyReport(BluetoothDevice device, byte type, byte id, byte[] data) {
- Log.v(TAG, "replyReport(): device=" + device + " type=" + type + " id=" + id);
-
boolean result = false;
final IBluetoothHidDevice service = mService;
@@ -465,14 +678,12 @@
/**
* Sends error handshake message as reply for invalid SET_REPORT request from {@link
- * BluetoothHidDeviceCallback#onSetReport(BluetoothDevice, byte, byte, byte[])}.
+ * Callback#onSetReport(BluetoothDevice, byte, byte, byte[])}.
*
* @param error Error to be sent for SET_REPORT via HANDSHAKE.
* @return true if the command is successfully sent; otherwise false.
*/
public boolean reportError(BluetoothDevice device, byte error) {
- Log.v(TAG, "reportError(): device=" + device + " error=" + error);
-
boolean result = false;
final IBluetoothHidDevice service = mService;
@@ -490,20 +701,17 @@
}
/**
- * Sends Virtual Cable Unplug to currently connected host.
+ * Gets the application name of the current HidDeviceService user.
*
- * @return
+ * @return the current user name, or empty string if cannot get the name
* {@hide}
*/
- public boolean unplug(BluetoothDevice device) {
- Log.v(TAG, "unplug(): device=" + device);
-
- boolean result = false;
-
+ public String getUserAppName() {
final IBluetoothHidDevice service = mService;
+
if (service != null) {
try {
- result = service.unplug(device);
+ return service.getUserAppName();
} catch (RemoteException e) {
Log.e(TAG, e.toString());
}
@@ -511,21 +719,18 @@
Log.w(TAG, "Proxy not attached to service");
}
- return result;
+ return "";
}
/**
* Initiates connection to host which is currently paired with this device. If the application
* is not registered, #connect(BluetoothDevice) will fail. The connection state should be
- * tracked by the application by handling callback from
- * BluetoothHidDeviceCallback#onConnectionStateChanged. The connection state is not related to
- * the return value of this method.
+ * tracked by the application by handling callback from Callback#onConnectionStateChanged. The
+ * connection state is not related to the return value of this method.
*
* @return true if the command is successfully sent; otherwise false.
*/
public boolean connect(BluetoothDevice device) {
- Log.v(TAG, "connect(): device=" + device);
-
boolean result = false;
final IBluetoothHidDevice service = mService;
@@ -544,14 +749,12 @@
/**
* Disconnects from currently connected host. The connection state should be tracked by the
- * application by handling callback from BluetoothHidDeviceCallback#onConnectionStateChanged.
- * The connection state is not related to the return value of this method.
+ * application by handling callback from Callback#onConnectionStateChanged. The connection state
+ * is not related to the return value of this method.
*
* @return true if the command is successfully sent; otherwise false.
*/
public boolean disconnect(BluetoothDevice device) {
- Log.v(TAG, "disconnect(): device=" + device);
-
boolean result = false;
final IBluetoothHidDevice service = mService;
diff --git a/core/java/android/bluetooth/BluetoothHidDeviceAppQosSettings.java b/core/java/android/bluetooth/BluetoothHidDeviceAppQosSettings.java
index c05df2d..a485b89 100644
--- a/core/java/android/bluetooth/BluetoothHidDeviceAppQosSettings.java
+++ b/core/java/android/bluetooth/BluetoothHidDeviceAppQosSettings.java
@@ -29,12 +29,12 @@
*/
public final class BluetoothHidDeviceAppQosSettings implements Parcelable {
- public final int serviceType;
- public final int tokenRate;
- public final int tokenBucketSize;
- public final int peakBandwidth;
- public final int latency;
- public final int delayVariation;
+ private final int mServiceType;
+ private final int mTokenRate;
+ private final int mTokenBucketSize;
+ private final int mPeakBandwidth;
+ private final int mLatency;
+ private final int mDelayVariation;
public static final int SERVICE_NO_TRAFFIC = 0x00;
public static final int SERVICE_BEST_EFFORT = 0x01;
@@ -44,38 +44,53 @@
/**
* Create a BluetoothHidDeviceAppQosSettings object for the Bluetooth L2CAP channel. The QoS
- * Settings is optional. Recommended to use BluetoothHidDeviceAppQosSettings.Builder.
- * Please refer to Bluetooth HID Specfication v1.1.1 Section 5.2 and Appendix D for parameters.
+ * Settings is optional. Please refer to Bluetooth HID Specfication v1.1.1 Section 5.2 and
+ * Appendix D for parameters.
*
- * @param serviceType L2CAP service type
- * @param tokenRate L2CAP token rate
- * @param tokenBucketSize L2CAP token bucket size
- * @param peakBandwidth L2CAP peak bandwidth
- * @param latency L2CAP latency
- * @param delayVariation L2CAP delay variation
+ * @param serviceType L2CAP service type, default = SERVICE_BEST_EFFORT
+ * @param tokenRate L2CAP token rate, default = 0
+ * @param tokenBucketSize L2CAP token bucket size, default = 0
+ * @param peakBandwidth L2CAP peak bandwidth, default = 0
+ * @param latency L2CAP latency, default = MAX
+ * @param delayVariation L2CAP delay variation, default = MAX
*/
- public BluetoothHidDeviceAppQosSettings(int serviceType, int tokenRate, int tokenBucketSize,
- int peakBandwidth, int latency, int delayVariation) {
- this.serviceType = serviceType;
- this.tokenRate = tokenRate;
- this.tokenBucketSize = tokenBucketSize;
- this.peakBandwidth = peakBandwidth;
- this.latency = latency;
- this.delayVariation = delayVariation;
+ public BluetoothHidDeviceAppQosSettings(
+ int serviceType,
+ int tokenRate,
+ int tokenBucketSize,
+ int peakBandwidth,
+ int latency,
+ int delayVariation) {
+ mServiceType = serviceType;
+ mTokenRate = tokenRate;
+ mTokenBucketSize = tokenBucketSize;
+ mPeakBandwidth = peakBandwidth;
+ mLatency = latency;
+ mDelayVariation = delayVariation;
}
- @Override
- public boolean equals(Object o) {
- if (o instanceof BluetoothHidDeviceAppQosSettings) {
- BluetoothHidDeviceAppQosSettings qos = (BluetoothHidDeviceAppQosSettings) o;
- return this.serviceType == qos.serviceType
- && this.tokenRate == qos.tokenRate
- && this.tokenBucketSize == qos.tokenBucketSize
- && this.peakBandwidth == qos.peakBandwidth
- && this.latency == qos.latency
- && this.delayVariation == qos.delayVariation;
- }
- return false;
+ public int getServiceType() {
+ return mServiceType;
+ }
+
+ public int getTokenRate() {
+ return mTokenRate;
+ }
+
+ public int getTokenBucketSize() {
+ return mTokenBucketSize;
+ }
+
+ public int getPeakBandwidth() {
+ return mPeakBandwidth;
+ }
+
+ public int getLatency() {
+ return mLatency;
+ }
+
+ public int getDelayVariation() {
+ return mDelayVariation;
}
@Override
@@ -106,104 +121,11 @@
@Override
public void writeToParcel(Parcel out, int flags) {
- out.writeInt(serviceType);
- out.writeInt(tokenRate);
- out.writeInt(tokenBucketSize);
- out.writeInt(peakBandwidth);
- out.writeInt(latency);
- out.writeInt(delayVariation);
- }
-
- /** @return an int array representation of this instance */
- public int[] toArray() {
- return new int[] {
- serviceType, tokenRate, tokenBucketSize, peakBandwidth, latency, delayVariation
- };
- }
-
- /** A helper to build the BluetoothHidDeviceAppQosSettings object. */
- public static class Builder {
- // Optional parameters - initialized to default values
- private int mServiceType = SERVICE_BEST_EFFORT;
- private int mTokenRate = 0;
- private int mTokenBucketSize = 0;
- private int mPeakBandwidth = 0;
- private int mLatency = MAX;
- private int mDelayVariation = MAX;
-
- /**
- * Set the service type.
- *
- * @param val service type. Should be one of {SERVICE_NO_TRAFFIC, SERVICE_BEST_EFFORT,
- * SERVICE_GUARANTEED}, with SERVICE_BEST_EFFORT being the default one.
- * @return BluetoothHidDeviceAppQosSettings Builder with specified service type.
- */
- public Builder serviceType(int val) {
- mServiceType = val;
- return this;
- }
- /**
- * Set the token rate.
- *
- * @param val token rate
- * @return BluetoothHidDeviceAppQosSettings Builder with specified token rate.
- */
- public Builder tokenRate(int val) {
- mTokenRate = val;
- return this;
- }
-
- /**
- * Set the bucket size.
- *
- * @param val bucket size
- * @return BluetoothHidDeviceAppQosSettings Builder with specified bucket size.
- */
- public Builder tokenBucketSize(int val) {
- mTokenBucketSize = val;
- return this;
- }
-
- /**
- * Set the peak bandwidth.
- *
- * @param val peak bandwidth
- * @return BluetoothHidDeviceAppQosSettings Builder with specified peak bandwidth.
- */
- public Builder peakBandwidth(int val) {
- mPeakBandwidth = val;
- return this;
- }
- /**
- * Set the latency.
- *
- * @param val latency
- * @return BluetoothHidDeviceAppQosSettings Builder with specified latency.
- */
- public Builder latency(int val) {
- mLatency = val;
- return this;
- }
-
- /**
- * Set the delay variation.
- *
- * @param val delay variation
- * @return BluetoothHidDeviceAppQosSettings Builder with specified delay variation.
- */
- public Builder delayVariation(int val) {
- mDelayVariation = val;
- return this;
- }
-
- /**
- * Build the BluetoothHidDeviceAppQosSettings object.
- *
- * @return BluetoothHidDeviceAppQosSettings object with current settings.
- */
- public BluetoothHidDeviceAppQosSettings build() {
- return new BluetoothHidDeviceAppQosSettings(mServiceType, mTokenRate, mTokenBucketSize,
- mPeakBandwidth, mLatency, mDelayVariation);
- }
+ out.writeInt(mServiceType);
+ out.writeInt(mTokenRate);
+ out.writeInt(mTokenBucketSize);
+ out.writeInt(mPeakBandwidth);
+ out.writeInt(mLatency);
+ out.writeInt(mDelayVariation);
}
}
diff --git a/core/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java b/core/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java
index 562c559..237082e 100644
--- a/core/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java
+++ b/core/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java
@@ -19,7 +19,6 @@
import android.os.Parcel;
import android.os.Parcelable;
-import java.util.Arrays;
/**
* Represents the Service Discovery Protocol (SDP) settings for a Bluetooth HID Device application.
@@ -31,11 +30,11 @@
*/
public final class BluetoothHidDeviceAppSdpSettings implements Parcelable {
- public final String name;
- public final String description;
- public final String provider;
- public final byte subclass;
- public final byte[] descriptors;
+ private final String mName;
+ private final String mDescription;
+ private final String mProvider;
+ private final byte mSubclass;
+ private final byte[] mDescriptors;
/**
* Create a BluetoothHidDeviceAppSdpSettings object for the Bluetooth SDP record.
@@ -52,24 +51,31 @@
*/
public BluetoothHidDeviceAppSdpSettings(
String name, String description, String provider, byte subclass, byte[] descriptors) {
- this.name = name;
- this.description = description;
- this.provider = provider;
- this.subclass = subclass;
- this.descriptors = descriptors.clone();
+ mName = name;
+ mDescription = description;
+ mProvider = provider;
+ mSubclass = subclass;
+ mDescriptors = descriptors.clone();
}
- @Override
- public boolean equals(Object o) {
- if (o instanceof BluetoothHidDeviceAppSdpSettings) {
- BluetoothHidDeviceAppSdpSettings sdp = (BluetoothHidDeviceAppSdpSettings) o;
- return this.name.equals(sdp.name)
- && this.description.equals(sdp.description)
- && this.provider.equals(sdp.provider)
- && this.subclass == sdp.subclass
- && Arrays.equals(this.descriptors, sdp.descriptors);
- }
- return false;
+ public String getName() {
+ return mName;
+ }
+
+ public String getDescription() {
+ return mDescription;
+ }
+
+ public String getProvider() {
+ return mProvider;
+ }
+
+ public byte getSubclass() {
+ return mSubclass;
+ }
+
+ public byte[] getDescriptors() {
+ return mDescriptors;
}
@Override
@@ -99,10 +105,10 @@
@Override
public void writeToParcel(Parcel out, int flags) {
- out.writeString(name);
- out.writeString(description);
- out.writeString(provider);
- out.writeByte(subclass);
- out.writeByteArray(descriptors);
+ out.writeString(mName);
+ out.writeString(mDescription);
+ out.writeString(mProvider);
+ out.writeByte(mSubclass);
+ out.writeByteArray(mDescriptors);
}
}
diff --git a/core/java/android/bluetooth/BluetoothHidDeviceCallback.java b/core/java/android/bluetooth/BluetoothHidDeviceCallback.java
deleted file mode 100644
index e71b00f..0000000
--- a/core/java/android/bluetooth/BluetoothHidDeviceCallback.java
+++ /dev/null
@@ -1,120 +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.
- */
-
-package android.bluetooth;
-
-import android.util.Log;
-
-/**
- * The template class that applications use to call callback functions on events from the HID host.
- * Callback functions are wrapped in this class and registered to the Android system during app
- * registration.
- *
- * <p>{@see BluetoothHidDevice}
- */
-public abstract class BluetoothHidDeviceCallback {
-
- private static final String TAG = "BluetoothHidDevCallback";
-
- /**
- * Callback called when application registration state changes. Usually it's called due to
- * either {@link BluetoothHidDevice#registerApp (String, String, String, byte, byte[],
- * BluetoothHidDeviceCallback)} or {@link BluetoothHidDevice#unregisterApp()} , but can be also
- * unsolicited in case e.g. Bluetooth was turned off in which case application is unregistered
- * automatically.
- *
- * @param pluggedDevice {@link BluetoothDevice} object which represents host that currently has
- * Virtual Cable established with device. Only valid when application is registered, can be
- * <code>null</code>.
- * @param registered <code>true</code> if application is registered, <code>false</code>
- * otherwise.
- */
- public void onAppStatusChanged(BluetoothDevice pluggedDevice, boolean registered) {
- Log.d(TAG,
- "onAppStatusChanged: pluggedDevice=" + pluggedDevice + " registered=" + registered);
- }
-
- /**
- * Callback called when connection state with remote host was changed. Application can assume
- * than Virtual Cable is established when called with {@link BluetoothProfile#STATE_CONNECTED}
- * <code>state</code>.
- *
- * @param device {@link BluetoothDevice} object representing host device which connection state
- * was changed.
- * @param state Connection state as defined in {@link BluetoothProfile}.
- */
- public void onConnectionStateChanged(BluetoothDevice device, int state) {
- Log.d(TAG, "onConnectionStateChanged: device=" + device + " state=" + state);
- }
-
- /**
- * Callback called when GET_REPORT is received from remote host. Should be replied by
- * application using {@link BluetoothHidDevice#replyReport(BluetoothDevice, byte, byte,
- * byte[])}.
- *
- * @param type Requested Report Type.
- * @param id Requested Report Id, can be 0 if no Report Id are defined in descriptor.
- * @param bufferSize Requested buffer size, application shall respond with at least given number
- * of bytes.
- */
- public void onGetReport(BluetoothDevice device, byte type, byte id, int bufferSize) {
- Log.d(TAG, "onGetReport: device=" + device + " type=" + type + " id=" + id + " bufferSize="
- + bufferSize);
- }
-
- /**
- * Callback called when SET_REPORT is received from remote host. In case received data are
- * invalid, application shall respond with {@link
- * BluetoothHidDevice#reportError(BluetoothDevice, byte)}.
- *
- * @param type Report Type.
- * @param id Report Id.
- * @param data Report data.
- */
- public void onSetReport(BluetoothDevice device, byte type, byte id, byte[] data) {
- Log.d(TAG, "onSetReport: device=" + device + " type=" + type + " id=" + id);
- }
-
- /**
- * Callback called when SET_PROTOCOL is received from remote host. Application shall use this
- * information to send only reports valid for given protocol mode. By default, {@link
- * BluetoothHidDevice#PROTOCOL_REPORT_MODE} shall be assumed.
- *
- * @param protocol Protocol Mode.
- */
- public void onSetProtocol(BluetoothDevice device, byte protocol) {
- Log.d(TAG, "onSetProtocol: device=" + device + " protocol=" + protocol);
- }
-
- /**
- * Callback called when report data is received over interrupt channel. Report Type is assumed
- * to be {@link BluetoothHidDevice#REPORT_TYPE_OUTPUT}.
- *
- * @param reportId Report Id.
- * @param data Report data.
- */
- public void onInterruptData(BluetoothDevice device, byte reportId, byte[] data) {
- Log.d(TAG, "onInterruptData: device=" + device + " reportId=" + reportId);
- }
-
- /**
- * Callback called when Virtual Cable is removed. After this callback is
- * received connection will be disconnected automatically.
- */
- public void onVirtualCableUnplug(BluetoothDevice device) {
- Log.d(TAG, "onVirtualCableUnplug: device=" + device);
- }
-}
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index 0e2263f..6aeb94d 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -38,7 +38,7 @@
* This extra represents the current connection state of the profile of the
* Bluetooth device.
*/
- public static final String EXTRA_STATE = "android.bluetooth.profile.extra.STATE";
+ String EXTRA_STATE = "android.bluetooth.profile.extra.STATE";
/**
* Extra for the connection state intents of the individual profiles.
@@ -46,123 +46,137 @@
* This extra represents the previous connection state of the profile of the
* Bluetooth device.
*/
- public static final String EXTRA_PREVIOUS_STATE =
+ String EXTRA_PREVIOUS_STATE =
"android.bluetooth.profile.extra.PREVIOUS_STATE";
/** The profile is in disconnected state */
- public static final int STATE_DISCONNECTED = 0;
+ int STATE_DISCONNECTED = 0;
/** The profile is in connecting state */
- public static final int STATE_CONNECTING = 1;
+ int STATE_CONNECTING = 1;
/** The profile is in connected state */
- public static final int STATE_CONNECTED = 2;
+ int STATE_CONNECTED = 2;
/** The profile is in disconnecting state */
- public static final int STATE_DISCONNECTING = 3;
+ int STATE_DISCONNECTING = 3;
/**
* Headset and Handsfree profile
*/
- public static final int HEADSET = 1;
+ int HEADSET = 1;
/**
* A2DP profile.
*/
- public static final int A2DP = 2;
+ int A2DP = 2;
/**
* Health Profile
*/
- public static final int HEALTH = 3;
+ int HEALTH = 3;
/**
* HID Host
*
* @hide
*/
- public static final int HID_HOST = 4;
+ int HID_HOST = 4;
/**
* PAN Profile
*
* @hide
*/
- public static final int PAN = 5;
+ int PAN = 5;
/**
* PBAP
*
* @hide
*/
- public static final int PBAP = 6;
+ int PBAP = 6;
/**
* GATT
*/
- public static final int GATT = 7;
+ int GATT = 7;
/**
* GATT_SERVER
*/
- public static final int GATT_SERVER = 8;
+ int GATT_SERVER = 8;
/**
* MAP Profile
*
* @hide
*/
- public static final int MAP = 9;
+ int MAP = 9;
/*
* SAP Profile
* @hide
*/
- public static final int SAP = 10;
+ int SAP = 10;
/**
* A2DP Sink Profile
*
* @hide
*/
- public static final int A2DP_SINK = 11;
+ int A2DP_SINK = 11;
/**
* AVRCP Controller Profile
*
* @hide
*/
- public static final int AVRCP_CONTROLLER = 12;
+ int AVRCP_CONTROLLER = 12;
+
+ /**
+ * AVRCP Target Profile
+ *
+ * @hide
+ */
+ int AVRCP = 13;
/**
* Headset Client - HFP HF Role
*
* @hide
*/
- public static final int HEADSET_CLIENT = 16;
+ int HEADSET_CLIENT = 16;
/**
* PBAP Client
*
* @hide
*/
- public static final int PBAP_CLIENT = 17;
+ int PBAP_CLIENT = 17;
/**
* MAP Messaging Client Equipment (MCE)
*
* @hide
*/
- public static final int MAP_CLIENT = 18;
+ int MAP_CLIENT = 18;
/**
* HID Device
*/
- public static final int HID_DEVICE = 19;
+ int HID_DEVICE = 19;
/**
* Object Push Profile (OPP)
*
* @hide
*/
- public static final int OPP = 20;
+ int OPP = 20;
+
+ /**
+ * Hearing Aid Device
+ *
+ * @hide
+ */
+ int HEARING_AID = 21;
/**
* Max profile ID. This value should be updated whenever a new profile is added to match
@@ -170,7 +184,7 @@
*
* @hide
*/
- public static final int MAX_PROFILE_ID = 20;
+ int MAX_PROFILE_ID = 21;
/**
* Default priority for devices that we try to auto-connect to and
@@ -178,7 +192,7 @@
*
* @hide
**/
- public static final int PRIORITY_AUTO_CONNECT = 1000;
+ int PRIORITY_AUTO_CONNECT = 1000;
/**
* Default priority for devices that allow incoming
@@ -187,7 +201,7 @@
* @hide
**/
@SystemApi
- public static final int PRIORITY_ON = 100;
+ int PRIORITY_ON = 100;
/**
* Default priority for devices that does not allow incoming
@@ -196,14 +210,14 @@
* @hide
**/
@SystemApi
- public static final int PRIORITY_OFF = 0;
+ int PRIORITY_OFF = 0;
/**
* Default priority when not set or when the device is unpaired
*
* @hide
*/
- public static final int PRIORITY_UNDEFINED = -1;
+ int PRIORITY_UNDEFINED = -1;
/**
* Get connected devices for this specific profile.
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java
index 09f9684..09a5b59 100644
--- a/core/java/android/bluetooth/BluetoothSocket.java
+++ b/core/java/android/bluetooth/BluetoothSocket.java
@@ -676,6 +676,35 @@
mExcludeSdp = excludeSdp;
}
+ /**
+ * Set the LE Transmit Data Length to be the maximum that the BT Controller is capable of. This
+ * parameter is used by the BT Controller to set the maximum transmission packet size on this
+ * connection. This function is currently used for testing only.
+ * @hide
+ */
+ public void requestMaximumTxDataLength() throws IOException {
+ if (mDevice == null) {
+ throw new IOException("requestMaximumTxDataLength is called on null device");
+ }
+
+ try {
+ if (mSocketState == SocketState.CLOSED) {
+ throw new IOException("socket closed");
+ }
+ IBluetooth bluetoothProxy =
+ BluetoothAdapter.getDefaultAdapter().getBluetoothService(null);
+ if (bluetoothProxy == null) {
+ throw new IOException("Bluetooth is off");
+ }
+
+ if (DBG) Log.d(TAG, "requestMaximumTxDataLength");
+ bluetoothProxy.getSocketManager().requestMaximumTxDataLength(mDevice);
+ } catch (RemoteException e) {
+ Log.e(TAG, Log.getStackTraceString(new Throwable()));
+ throw new IOException("unable to send RPC: " + e.getMessage());
+ }
+ }
+
private String convertAddr(final byte[] addr) {
return String.format(Locale.US, "%02X:%02X:%02X:%02X:%02X:%02X",
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
diff --git a/core/java/android/bluetooth/BluetoothUuid.java b/core/java/android/bluetooth/BluetoothUuid.java
index 76cb3f5..605dbd2 100644
--- a/core/java/android/bluetooth/BluetoothUuid.java
+++ b/core/java/android/bluetooth/BluetoothUuid.java
@@ -79,6 +79,8 @@
ParcelUuid.fromString("00001132-0000-1000-8000-00805F9B34FB");
public static final ParcelUuid SAP =
ParcelUuid.fromString("0000112D-0000-1000-8000-00805F9B34FB");
+ public static final ParcelUuid HearingAid =
+ ParcelUuid.fromString("0000FDF0-0000-1000-8000-00805f9b34fb");
public static final ParcelUuid BASE_UUID =
ParcelUuid.fromString("00000000-0000-1000-8000-00805F9B34FB");
diff --git a/core/java/android/bluetooth/le/ScanRecord.java b/core/java/android/bluetooth/le/ScanRecord.java
index f8aaba9..04dd060 100644
--- a/core/java/android/bluetooth/le/ScanRecord.java
+++ b/core/java/android/bluetooth/le/ScanRecord.java
@@ -117,7 +117,7 @@
*/
@Nullable
public byte[] getServiceData(ParcelUuid serviceDataUuid) {
- if (serviceDataUuid == null) {
+ if (serviceDataUuid == null || mServiceData == null) {
return null;
}
return mServiceData.get(serviceDataUuid);
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 70087da..da3e7cb 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -1950,6 +1950,33 @@
/**
* Broadcast the given intent to all interested BroadcastReceivers, allowing
+ * an array of required permissions to be enforced. This call is asynchronous; it returns
+ * immediately, and you will continue executing while the receivers are run. No results are
+ * propagated from receivers and receivers can not abort the broadcast. If you want to allow
+ * receivers to propagate results or abort the broadcast, you must send an ordered broadcast
+ * using {@link #sendOrderedBroadcast(Intent, String)}.
+ *
+ * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts.
+ *
+ * @param intent The Intent to broadcast; all receivers matching this
+ * Intent will receive the broadcast.
+ * @param user The user to send the broadcast to.
+ * @param receiverPermissions Array of names of permissions that a receiver must hold
+ * in order to receive your broadcast.
+ * If null or empty, no permissions are required.
+ *
+ * @see android.content.BroadcastReceiver
+ * @see #registerReceiver
+ * @see #sendBroadcast(Intent)
+ * @see #sendOrderedBroadcast(Intent, String)
+ * @see #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)
+ * @hide
+ */
+ public abstract void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+ String[] receiverPermissions);
+
+ /**
+ * Broadcast the given intent to all interested BroadcastReceivers, allowing
* an optional required permission to be enforced. This
* call is asynchronous; it returns immediately, and you will continue
* executing while the receivers are run. No results are propagated from
@@ -2992,7 +3019,8 @@
//@hide: CONTEXTHUB_SERVICE,
SYSTEM_HEALTH_SERVICE,
//@hide: INCIDENT_SERVICE,
- COMPANION_DEVICE_SERVICE
+ COMPANION_DEVICE_SERVICE,
+ //@hide: TIME_DETECTOR_SERVICE,
})
@Retention(RetentionPolicy.SOURCE)
public @interface ServiceName {}
@@ -3583,10 +3611,8 @@
*
* @see #getSystemService
* @see android.telephony.euicc.EuiccManager
- * TODO(b/35851809): Unhide this API.
- * @hide
*/
- public static final String EUICC_SERVICE = "euicc_service";
+ public static final String EUICC_SERVICE = "euicc";
/**
* Use with {@link #getSystemService(String)} to retrieve a
@@ -3594,10 +3620,10 @@
*
* @see #getSystemService(String)
* @see android.telephony.euicc.EuiccCardManager
- * TODO(b/35851809): Make this a SystemApi.
* @hide
*/
- public static final String EUICC_CARD_SERVICE = "euicc_card_service";
+ @SystemApi
+ public static final String EUICC_CARD_SERVICE = "euicc_card";
/**
* Use with {@link #getSystemService(String)} to retrieve a
@@ -4062,6 +4088,25 @@
public static final String TIME_ZONE_RULES_MANAGER_SERVICE = "timezone";
/**
+ * Use with {@link #getSystemService} to retrieve a
+ * {@link android.se.omapi.ISecureElementService}
+ * for accessing the SecureElementService.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String SECURE_ELEMENT_SERVICE = "secure_element";
+
+ /**
+ * Use with {@link #getSystemService(String)} to retrieve an
+ * {@link android.app.timedetector.ITimeDetectorService}.
+ * @hide
+ *
+ * @see #getSystemService(String)
+ */
+ public static final String TIME_DETECTOR_SERVICE = "time_detector";
+
+ /**
* Determine whether the given permission is allowed for a particular
* process and user ID running in the system.
*
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index 85acdc6b..3a5fccb 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -449,6 +449,13 @@
}
/** @hide */
+ @Override
+ public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+ String[] receiverPermissions) {
+ mBase.sendBroadcastAsUserMultiplePermissions(intent, user, receiverPermissions);
+ }
+
+ /** @hide */
@SystemApi
@Override
public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index c865dd7..760fd80 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -3552,6 +3552,10 @@
* <p class="note">This is a protected intent that can only be sent by the system.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable} and the helper
+ * functions {@code ServiceStateTable.getUriForSubscriptionIdAndField} and
+ * {@code ServiceStateTable.getUriForSubscriptionId} to subscribe to changes to the ServiceState
+ * for a given subscription id and field with a ContentObserver or using JobScheduler.
*/
@Deprecated
@SystemApi
@@ -3567,6 +3571,7 @@
* @see android.telephony.ServiceState#STATE_POWER_OFF
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#VOICE_REG_STATE}.
*/
@Deprecated
@SystemApi
@@ -3580,6 +3585,7 @@
* @see android.telephony.ServiceState#STATE_POWER_OFF
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#DATA_REG_STATE}.
*/
@Deprecated
@SystemApi
@@ -3590,6 +3596,7 @@
* type.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#VOICE_ROAMING_TYPE}.
*/
@Deprecated
@SystemApi
@@ -3600,6 +3607,7 @@
* type.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#DATA_ROAMING_TYPE}.
*/
@Deprecated
@SystemApi
@@ -3611,6 +3619,8 @@
* {@code null} if the operator name is not known or unregistered.
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#VOICE_OPERATOR_ALPHA_LONG}.
*/
@Deprecated
@SystemApi
@@ -3622,6 +3632,8 @@
* {@code null} if the operator name is not known or unregistered.
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#VOICE_OPERATOR_ALPHA_SHORT}.
*/
@Deprecated
@SystemApi
@@ -3633,6 +3645,7 @@
* network.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#VOICE_OPERATOR_NUMERIC}.
*/
@Deprecated
@SystemApi
@@ -3644,6 +3657,8 @@
* {@code null} if the operator name is not known or unregistered.
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#DATA_OPERATOR_ALPHA_LONG}.
*/
@Deprecated
@SystemApi
@@ -3655,6 +3670,8 @@
* {@code null} if the operator name is not known or unregistered.
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#DATA_OPERATOR_ALPHA_SHORT}.
*/
@Deprecated
@SystemApi
@@ -3666,6 +3683,7 @@
* data operator.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#DATA_OPERATOR_NUMERIC}.
*/
@Deprecated
@SystemApi
@@ -3677,6 +3695,8 @@
* Will be {@code true} if manual mode, {@code false} if automatic mode.
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#IS_MANUAL_NETWORK_SELECTION}.
*/
@Deprecated
@SystemApi
@@ -3687,6 +3707,8 @@
* radio technology.
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#RIL_VOICE_RADIO_TECHNOLOGY}.
*/
@Deprecated
@SystemApi
@@ -3697,6 +3719,8 @@
* radio technology.
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#RIL_DATA_RADIO_TECHNOLOGY}.
*/
@Deprecated
@SystemApi
@@ -3708,6 +3732,7 @@
* Will be {@code true} if support, {@code false} otherwise.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#CSS_INDICATOR}.
*/
@Deprecated
@SystemApi
@@ -3718,6 +3743,7 @@
* id. {@code Integer.MAX_VALUE} if unknown.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#NETWORK_ID}.
*/
@Deprecated
@SystemApi
@@ -3728,6 +3754,7 @@
* {@code Integer.MAX_VALUE} if unknown.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#SYSTEM_ID}.
*/
@Deprecated
@SystemApi
@@ -3738,6 +3765,7 @@
* indicator if registered on a CDMA or EVDO system or {@code -1} if not.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#CDMA_ROAMING_INDICATOR}.
*/
@Deprecated
@SystemApi
@@ -3748,6 +3776,8 @@
* indicator from the PRL if registered on a CDMA or EVDO system {@code -1} if not.
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#CDMA_DEFAULT_ROAMING_INDICATOR}.
*/
@Deprecated
@SystemApi
@@ -3759,6 +3789,7 @@
* {@code true} if in emergency only mode, {@code false} otherwise.
* @hide
* @removed
+ * @deprecated Use {@link android.provider.Telephony.ServiceStateTable#IS_EMERGENCY_ONLY}.
*/
@Deprecated
@SystemApi
@@ -3770,6 +3801,8 @@
* {@code true} if registration indicates roaming, {@code false} otherwise
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#IS_DATA_ROAMING_FROM_REGISTRATION}.
*/
@Deprecated
@SystemApi
@@ -3782,6 +3815,8 @@
* {@code true} if carrier aggregation is in use, {@code false} otherwise.
* @hide
* @removed
+ * @deprecated Use
+ * {@link android.provider.Telephony.ServiceStateTable#IS_USING_CARRIER_AGGREGATION}.
*/
@Deprecated
@SystemApi
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 664bcbca..f04f763 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -35,6 +35,7 @@
import android.util.SparseArray;
import com.android.internal.util.ArrayUtils;
+import com.android.server.SystemConfig;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -1045,6 +1046,59 @@
/** @hide */
public String[] splitClassLoaderNames;
+ /**
+ * Represents the default policy. The actual policy used will depend on other properties of
+ * the application, e.g. the target SDK version.
+ * @hide
+ */
+ public static final int HIDDEN_API_ENFORCEMENT_DEFAULT = -1;
+ /**
+ * No API enforcement; the app can access the entire internal private API. Only for use by
+ * system apps.
+ * @hide
+ */
+ public static final int HIDDEN_API_ENFORCEMENT_NONE = 0;
+ /**
+ * No API enforcement, but enable the detection logic and warnings. Observed behaviour is the
+ * same as {@link #HIDDEN_API_ENFORCEMENT_NONE} but you may see warnings in the log when APIs
+ * are accessed.
+ * @hide
+ * */
+ public static final int HIDDEN_API_ENFORCEMENT_JUST_WARN = 1;
+ /**
+ * Dark grey list enforcement. Enforces the dark grey and black lists
+ * @hide
+ */
+ public static final int HIDDEN_API_ENFORCEMENT_DARK_GREY_AND_BLACK = 2;
+ /**
+ * Blacklist enforcement only.
+ * @hide
+ */
+ public static final int HIDDEN_API_ENFORCEMENT_BLACK = 3;
+
+ private static final int HIDDEN_API_ENFORCEMENT_MAX = HIDDEN_API_ENFORCEMENT_BLACK;
+
+ /**
+ * Values in this IntDef MUST be kept in sync with enum hiddenapi::EnforcementPolicy in
+ * art/runtime/hidden_api.h
+ * @hide
+ */
+ @IntDef(prefix = { "HIDDEN_API_ENFORCEMENT_" }, value = {
+ HIDDEN_API_ENFORCEMENT_DEFAULT,
+ HIDDEN_API_ENFORCEMENT_NONE,
+ HIDDEN_API_ENFORCEMENT_JUST_WARN,
+ HIDDEN_API_ENFORCEMENT_DARK_GREY_AND_BLACK,
+ HIDDEN_API_ENFORCEMENT_BLACK,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface HiddenApiEnforcementPolicy {}
+
+ private boolean isValidHiddenApiEnforcementPolicy(int policy) {
+ return policy >= HIDDEN_API_ENFORCEMENT_DEFAULT && policy <= HIDDEN_API_ENFORCEMENT_MAX;
+ }
+
+ private int mHiddenApiPolicy = HIDDEN_API_ENFORCEMENT_DEFAULT;
+
public void dump(Printer pw, String prefix) {
dump(pw, prefix, DUMP_FLAG_ALL);
}
@@ -1132,6 +1186,7 @@
if (category != CATEGORY_UNDEFINED) {
pw.println(prefix + "category=" + category);
}
+ pw.println(prefix + "HiddenApiEnforcementPolicy=" + getHiddenApiEnforcementPolicy());
}
super.dumpBack(pw, prefix);
}
@@ -1227,6 +1282,7 @@
targetSandboxVersion = orig.targetSandboxVersion;
classLoaderName = orig.classLoaderName;
splitClassLoaderNames = orig.splitClassLoaderNames;
+ mHiddenApiPolicy = orig.mHiddenApiPolicy;
}
public String toString() {
@@ -1297,6 +1353,7 @@
dest.writeInt(targetSandboxVersion);
dest.writeString(classLoaderName);
dest.writeStringArray(splitClassLoaderNames);
+ dest.writeInt(mHiddenApiPolicy);
}
public static final Parcelable.Creator<ApplicationInfo> CREATOR
@@ -1364,6 +1421,7 @@
targetSandboxVersion = source.readInt();
classLoaderName = source.readString();
splitClassLoaderNames = source.readStringArray();
+ mHiddenApiPolicy = source.readInt();
}
/**
@@ -1455,6 +1513,33 @@
}
}
+ private boolean isPackageWhitelistedForHiddenApis() {
+ return SystemConfig.getInstance().getHiddenApiWhitelistedApps().contains(packageName);
+ }
+
+ /**
+ * @hide
+ */
+ public @HiddenApiEnforcementPolicy int getHiddenApiEnforcementPolicy() {
+ if (mHiddenApiPolicy != HIDDEN_API_ENFORCEMENT_DEFAULT) {
+ return mHiddenApiPolicy;
+ }
+ if (isPackageWhitelistedForHiddenApis() && (isSystemApp() || isUpdatedSystemApp())) {
+ return HIDDEN_API_ENFORCEMENT_NONE;
+ }
+ return HIDDEN_API_ENFORCEMENT_BLACK;
+ }
+
+ /**
+ * @hide
+ */
+ public void setHiddenApiEnforcementPolicy(@HiddenApiEnforcementPolicy int policy) {
+ if (!isValidHiddenApiEnforcementPolicy(policy)) {
+ throw new IllegalArgumentException("Invalid API enforcement policy: " + policy);
+ }
+ mHiddenApiPolicy = policy;
+ }
+
/**
* @hide
*/
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 0e70645..73a403d 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -48,6 +48,7 @@
import android.content.pm.UserInfo;
import android.content.pm.VerifierDeviceIdentity;
import android.content.pm.VersionedPackage;
+import android.content.pm.dex.IArtManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
@@ -664,4 +665,6 @@
ComponentName getInstantAppInstallerComponent();
String getInstantAppAndroidId(String packageName, int userId);
+
+ IArtManager getArtManager();
}
diff --git a/core/java/android/content/pm/LimitedLengthInputStream.java b/core/java/android/content/pm/LimitedLengthInputStream.java
index e787277..19b681e 100644
--- a/core/java/android/content/pm/LimitedLengthInputStream.java
+++ b/core/java/android/content/pm/LimitedLengthInputStream.java
@@ -1,9 +1,10 @@
package android.content.pm;
+import libcore.util.ArrayUtils;
+
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.Arrays;
/**
* A class that limits the amount of data that is read from an InputStream. When
@@ -71,7 +72,7 @@
}
final int arrayLength = buffer.length;
- Arrays.checkOffsetAndCount(arrayLength, offset, byteCount);
+ ArrayUtils.throwsIfOutOfBounds(arrayLength, offset, byteCount);
if (mOffset > Long.MAX_VALUE - byteCount) {
throw new IOException("offset out of bounds: " + mOffset + " + " + byteCount);
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 89751da..6f98adc 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -42,6 +42,7 @@
import android.content.IntentFilter;
import android.content.IntentSender;
import android.content.pm.PackageParser.PackageParserException;
+import android.content.pm.dex.ArtManager;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.Rect;
@@ -1316,6 +1317,15 @@
*/
public static final int INSTALL_FAILED_INSTANT_APP_INVALID = -116;
+ /**
+ * Installation parse return code: this is passed in the
+ * {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the dex metadata file is invalid or
+ * if there was no matching apk file for a dex metadata file.
+ *
+ * @hide
+ */
+ public static final int INSTALL_FAILED_BAD_DEX_METADATA = -117;
+
/** @hide */
@IntDef(flag = true, prefix = { "DELETE_" }, value = {
DELETE_KEEP_DATA,
@@ -2078,8 +2088,6 @@
/**
* Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: The device
* supports embedded subscriptions on eUICCs.
- * TODO(b/35851809): Make this public.
- * @hide
*/
@SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_TELEPHONY_EUICC = "android.hardware.telephony.euicc";
@@ -5634,6 +5642,8 @@
case INSTALL_FAILED_DUPLICATE_PERMISSION: return "INSTALL_FAILED_DUPLICATE_PERMISSION";
case INSTALL_FAILED_NO_MATCHING_ABIS: return "INSTALL_FAILED_NO_MATCHING_ABIS";
case INSTALL_FAILED_ABORTED: return "INSTALL_FAILED_ABORTED";
+ case INSTALL_FAILED_BAD_DEX_METADATA:
+ return "INSTALL_FAILED_BAD_DEX_METADATA";
default: return Integer.toString(status);
}
}
@@ -5678,6 +5688,7 @@
case INSTALL_PARSE_FAILED_BAD_SHARED_USER_ID: return PackageInstaller.STATUS_FAILURE_INVALID;
case INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: return PackageInstaller.STATUS_FAILURE_INVALID;
case INSTALL_PARSE_FAILED_MANIFEST_EMPTY: return PackageInstaller.STATUS_FAILURE_INVALID;
+ case INSTALL_FAILED_BAD_DEX_METADATA: return PackageInstaller.STATUS_FAILURE_INVALID;
case INSTALL_FAILED_INTERNAL_ERROR: return PackageInstaller.STATUS_FAILURE;
case INSTALL_FAILED_USER_RESTRICTED: return PackageInstaller.STATUS_FAILURE_INCOMPATIBLE;
case INSTALL_FAILED_DUPLICATE_PERMISSION: return PackageInstaller.STATUS_FAILURE_CONFLICT;
@@ -5879,4 +5890,14 @@
@SystemApi
public abstract void registerDexModule(String dexModulePath,
@Nullable DexModuleRegisterCallback callback);
+
+ /**
+ * Returns the {@link ArtManager} associated with this package manager.
+ *
+ * @hide
+ */
+ @SystemApi
+ public @NonNull ArtManager getArtManager() {
+ throw new UnsupportedOperationException("getArtManager not implemented in subclass");
+ }
}
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index cb9ecf3..a22f6d6 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -96,8 +96,8 @@
import com.android.internal.util.XmlUtils;
import libcore.io.IoUtils;
-
import libcore.util.EmptyArray;
+
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -250,6 +250,9 @@
}
/** @hide */
+ public static final String APK_FILE_EXTENSION = ".apk";
+
+ /** @hide */
public static class NewPermissionInfo {
public final String name;
public final int sdkVersion;
@@ -616,7 +619,7 @@
}
public static boolean isApkPath(String path) {
- return path.endsWith(".apk");
+ return path.endsWith(APK_FILE_EXTENSION);
}
/**
@@ -2337,10 +2340,10 @@
com.android.internal.R.styleable.AndroidManifestUsesSdk_minSdkVersion);
if (val != null) {
if (val.type == TypedValue.TYPE_STRING && val.string != null) {
- targetCode = minCode = val.string.toString();
+ minCode = val.string.toString();
} else {
// If it's not a string, it's an integer.
- targetVers = minVers = val.data;
+ minVers = val.data;
}
}
@@ -2356,6 +2359,9 @@
// If it's not a string, it's an integer.
targetVers = val.data;
}
+ } else {
+ targetVers = minVers;
+ targetCode = minCode;
}
sa.recycle();
@@ -3301,7 +3307,7 @@
&& (perm.info.protectionLevel&PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY) == 0
&& (perm.info.protectionLevel&PermissionInfo.PROTECTION_MASK_BASE) !=
PermissionInfo.PROTECTION_SIGNATURE) {
- outError[0] = "<permission> protectionLevel specifies a non-instnat flag but is "
+ outError[0] = "<permission> protectionLevel specifies a non-instant flag but is "
+ "not based on signature type";
mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
return false;
diff --git a/core/java/android/content/pm/dex/ArtManager.java b/core/java/android/content/pm/dex/ArtManager.java
new file mode 100644
index 0000000..0753063
--- /dev/null
+++ b/core/java/android/content/pm/dex/ArtManager.java
@@ -0,0 +1,209 @@
+/**
+ * Copyright 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.
+ */
+
+package android.content.pm.dex;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
+import android.annotation.SystemApi;
+import android.os.Environment;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.util.Slog;
+
+import java.io.File;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.concurrent.Executor;
+
+/**
+ * Class for retrieving various kinds of information related to the runtime artifacts of
+ * packages that are currently installed on the device.
+ *
+ * @hide
+ */
+@SystemApi
+public class ArtManager {
+ private static final String TAG = "ArtManager";
+
+ /** The snapshot failed because the package was not found. */
+ public static final int SNAPSHOT_FAILED_PACKAGE_NOT_FOUND = 0;
+ /** The snapshot failed because the package code path does not exist. */
+ public static final int SNAPSHOT_FAILED_CODE_PATH_NOT_FOUND = 1;
+ /** The snapshot failed because of an internal error (e.g. error during opening profiles). */
+ public static final int SNAPSHOT_FAILED_INTERNAL_ERROR = 2;
+
+ /** Constant used for applications profiles. */
+ public static final int PROFILE_APPS = 0;
+ /** Constant used for the boot image profile. */
+ public static final int PROFILE_BOOT_IMAGE = 1;
+
+ /** @hide */
+ @IntDef(flag = true, prefix = { "PROFILE_" }, value = {
+ PROFILE_APPS,
+ PROFILE_BOOT_IMAGE,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ProfileType {}
+
+
+ private IArtManager mArtManager;
+
+ /**
+ * @hide
+ */
+ public ArtManager(@NonNull IArtManager manager) {
+ mArtManager = manager;
+ }
+
+ /**
+ * Snapshots a runtime profile according to the {@code profileType} parameter.
+ *
+ * If {@code profileType} is {@link ArtManager#PROFILE_APPS} the method will snapshot
+ * the profile for for an apk belonging to the package {@code packageName}.
+ * The apk is identified by {@code codePath}.
+ *
+ * If {@code profileType} is {@code ArtManager.PROFILE_BOOT_IMAGE} the method will snapshot
+ * the profile for the boot image. In this case {@code codePath can be null}. The parameters
+ * {@code packageName} and {@code codePath} are ignored.
+ *u
+ * The calling process must have {@code android.permission.READ_RUNTIME_PROFILE} permission.
+ *
+ * The result will be posted on the {@code executor} using the given {@code callback}.
+ * The profile will be available as a read-only {@link android.os.ParcelFileDescriptor}.
+ *
+ * This method will throw {@link IllegalStateException} if
+ * {@link ArtManager#isRuntimeProfilingEnabled(int)} does not return true for the given
+ * {@code profileType}.
+ *
+ * @param profileType the type of profile that should be snapshot (boot image or app)
+ * @param packageName the target package name or null if the target is the boot image
+ * @param codePath the code path for which the profile should be retrieved or null if
+ * the target is the boot image
+ * @param callback the callback which should be used for the result
+ * @param executor the executor which should be used to post the result
+ */
+ @RequiresPermission(android.Manifest.permission.READ_RUNTIME_PROFILES)
+ public void snapshotRuntimeProfile(@ProfileType int profileType, @Nullable String packageName,
+ @Nullable String codePath, @NonNull Executor executor,
+ @NonNull SnapshotRuntimeProfileCallback callback) {
+ Slog.d(TAG, "Requesting profile snapshot for " + packageName + ":" + codePath);
+
+ SnapshotRuntimeProfileCallbackDelegate delegate =
+ new SnapshotRuntimeProfileCallbackDelegate(callback, executor);
+ try {
+ mArtManager.snapshotRuntimeProfile(profileType, packageName, codePath, delegate);
+ } catch (RemoteException e) {
+ e.rethrowAsRuntimeException();
+ }
+ }
+
+ /**
+ * Returns true if runtime profiles are enabled for the given type, false otherwise.
+ *
+ * The calling process must have {@code android.permission.READ_RUNTIME_PROFILE} permission.
+ *
+ * @param profileType can be either {@link ArtManager#PROFILE_APPS}
+ * or {@link ArtManager#PROFILE_BOOT_IMAGE}
+ */
+ @RequiresPermission(android.Manifest.permission.READ_RUNTIME_PROFILES)
+ public boolean isRuntimeProfilingEnabled(@ProfileType int profileType) {
+ try {
+ return mArtManager.isRuntimeProfilingEnabled(profileType);
+ } catch (RemoteException e) {
+ e.rethrowAsRuntimeException();
+ }
+ return false;
+ }
+
+ /**
+ * Callback used for retrieving runtime profiles.
+ */
+ public abstract static class SnapshotRuntimeProfileCallback {
+ /**
+ * Called when the profile snapshot finished with success.
+ *
+ * @param profileReadFd the file descriptor that can be used to read the profile. Note that
+ * the file might be empty (which is valid profile).
+ */
+ public abstract void onSuccess(ParcelFileDescriptor profileReadFd);
+
+ /**
+ * Called when the profile snapshot finished with an error.
+ *
+ * @param errCode the error code {@see SNAPSHOT_FAILED_PACKAGE_NOT_FOUND,
+ * SNAPSHOT_FAILED_CODE_PATH_NOT_FOUND, SNAPSHOT_FAILED_INTERNAL_ERROR}.
+ */
+ public abstract void onError(int errCode);
+ }
+
+ private static class SnapshotRuntimeProfileCallbackDelegate
+ extends android.content.pm.dex.ISnapshotRuntimeProfileCallback.Stub {
+ private final ArtManager.SnapshotRuntimeProfileCallback mCallback;
+ private final Executor mExecutor;
+
+ private SnapshotRuntimeProfileCallbackDelegate(
+ ArtManager.SnapshotRuntimeProfileCallback callback, Executor executor) {
+ mCallback = callback;
+ mExecutor = executor;
+ }
+
+ @Override
+ public void onSuccess(final ParcelFileDescriptor profileReadFd) {
+ mExecutor.execute(() -> mCallback.onSuccess(profileReadFd));
+ }
+
+ @Override
+ public void onError(int errCode) {
+ mExecutor.execute(() -> mCallback.onError(errCode));
+ }
+ }
+
+ /**
+ * Return the profile name for the given split. If {@code splitName} is null the
+ * method returns the profile name for the base apk.
+ *
+ * @hide
+ */
+ public static String getProfileName(String splitName) {
+ return splitName == null ? "primary.prof" : splitName + ".split.prof";
+ }
+
+ /**
+ * Return the path to the current profile corresponding to given package and split.
+ *
+ * @hide
+ */
+ public static String getCurrentProfilePath(String packageName, int userId, String splitName) {
+ File profileDir = Environment.getDataProfilesDePackageDirectory(userId, packageName);
+ return new File(profileDir, getProfileName(splitName)).getAbsolutePath();
+ }
+
+ /**
+ * Return the snapshot profile file for the given package and profile name.
+ *
+ * KEEP in sync with installd dexopt.cpp.
+ * TODO(calin): inject the snapshot profile name from PM to avoid the dependency.
+ *
+ * @hide
+ */
+ public static File getProfileSnapshotFileForName(String packageName, String profileName) {
+ File profileDir = Environment.getDataRefProfilesDePackageDirectory(packageName);
+ return new File(profileDir, profileName + ".snapshot");
+ }
+}
diff --git a/core/java/android/content/pm/dex/DexMetadataHelper.java b/core/java/android/content/pm/dex/DexMetadataHelper.java
new file mode 100644
index 0000000..5d10b88
--- /dev/null
+++ b/core/java/android/content/pm/dex/DexMetadataHelper.java
@@ -0,0 +1,230 @@
+/**
+ * Copyright 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.
+ */
+
+package android.content.pm.dex;
+
+import static android.content.pm.PackageManager.INSTALL_FAILED_BAD_DEX_METADATA;
+import static android.content.pm.PackageParser.APK_FILE_EXTENSION;
+
+import android.content.pm.PackageParser;
+import android.content.pm.PackageParser.PackageLite;
+import android.content.pm.PackageParser.PackageParserException;
+import android.util.ArrayMap;
+import android.util.jar.StrictJarFile;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Helper class used to compute and validate the location of dex metadata files.
+ *
+ * @hide
+ */
+public class DexMetadataHelper {
+ private static final String DEX_METADATA_FILE_EXTENSION = ".dm";
+
+ private DexMetadataHelper() {}
+
+ /** Return true if the given file is a dex metadata file. */
+ public static boolean isDexMetadataFile(File file) {
+ return isDexMetadataPath(file.getName());
+ }
+
+ /** Return true if the given path is a dex metadata path. */
+ private static boolean isDexMetadataPath(String path) {
+ return path.endsWith(DEX_METADATA_FILE_EXTENSION);
+ }
+
+ /**
+ * Return the size (in bytes) of all dex metadata files associated with the given package.
+ */
+ public static long getPackageDexMetadataSize(PackageLite pkg) {
+ long sizeBytes = 0;
+ Collection<String> dexMetadataList = DexMetadataHelper.getPackageDexMetadata(pkg).values();
+ for (String dexMetadata : dexMetadataList) {
+ sizeBytes += new File(dexMetadata).length();
+ }
+ return sizeBytes;
+ }
+
+ /**
+ * Search for the dex metadata file associated with the given target file.
+ * If it exists, the method returns the dex metadata file; otherwise it returns null.
+ *
+ * Note that this performs a loose matching suitable to be used in the InstallerSession logic.
+ * i.e. the method will attempt to match the {@code dmFile} regardless of {@code targetFile}
+ * extension (e.g. 'foo.dm' will match 'foo' or 'foo.apk').
+ */
+ public static File findDexMetadataForFile(File targetFile) {
+ String dexMetadataPath = buildDexMetadataPathForFile(targetFile);
+ File dexMetadataFile = new File(dexMetadataPath);
+ return dexMetadataFile.exists() ? dexMetadataFile : null;
+ }
+
+ /**
+ * Return the dex metadata files for the given package as a map
+ * [code path -> dex metadata path].
+ *
+ * NOTE: involves I/O checks.
+ */
+ public static Map<String, String> getPackageDexMetadata(PackageParser.Package pkg) {
+ return buildPackageApkToDexMetadataMap(pkg.getAllCodePaths());
+ }
+
+ /**
+ * Return the dex metadata files for the given package as a map
+ * [code path -> dex metadata path].
+ *
+ * NOTE: involves I/O checks.
+ */
+ private static Map<String, String> getPackageDexMetadata(PackageLite pkg) {
+ return buildPackageApkToDexMetadataMap(pkg.getAllCodePaths());
+ }
+
+ /**
+ * Look up the dex metadata files for the given code paths building the map
+ * [code path -> dex metadata].
+ *
+ * For each code path (.apk) the method checks if a matching dex metadata file (.dm) exists.
+ * If it does it adds the pair to the returned map.
+ *
+ * Note that this method will do a loose
+ * matching based on the extension ('foo.dm' will match 'foo.apk' or 'foo').
+ *
+ * This should only be used for code paths extracted from a package structure after the naming
+ * was enforced in the installer.
+ */
+ private static Map<String, String> buildPackageApkToDexMetadataMap(
+ List<String> codePaths) {
+ ArrayMap<String, String> result = new ArrayMap<>();
+ for (int i = codePaths.size() - 1; i >= 0; i--) {
+ String codePath = codePaths.get(i);
+ String dexMetadataPath = buildDexMetadataPathForFile(new File(codePath));
+
+ if (Files.exists(Paths.get(dexMetadataPath))) {
+ result.put(codePath, dexMetadataPath);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Return the dex metadata path associated with the given code path.
+ * (replaces '.apk' extension with '.dm')
+ *
+ * @throws IllegalArgumentException if the code path is not an .apk.
+ */
+ public static String buildDexMetadataPathForApk(String codePath) {
+ if (!PackageParser.isApkPath(codePath)) {
+ throw new IllegalStateException(
+ "Corrupted package. Code path is not an apk " + codePath);
+ }
+ return codePath.substring(0, codePath.length() - APK_FILE_EXTENSION.length())
+ + DEX_METADATA_FILE_EXTENSION;
+ }
+
+ /**
+ * Return the dex metadata path corresponding to the given {@code targetFile} using a loose
+ * matching.
+ * i.e. the method will attempt to match the {@code dmFile} regardless of {@code targetFile}
+ * extension (e.g. 'foo.dm' will match 'foo' or 'foo.apk').
+ */
+ private static String buildDexMetadataPathForFile(File targetFile) {
+ return PackageParser.isApkFile(targetFile)
+ ? buildDexMetadataPathForApk(targetFile.getPath())
+ : targetFile.getPath() + DEX_METADATA_FILE_EXTENSION;
+ }
+
+ /**
+ * Validate the dex metadata files installed for the given package.
+ *
+ * @throws PackageParserException in case of errors.
+ */
+ public static void validatePackageDexMetadata(PackageParser.Package pkg)
+ throws PackageParserException {
+ Collection<String> apkToDexMetadataList = getPackageDexMetadata(pkg).values();
+ for (String dexMetadata : apkToDexMetadataList) {
+ validateDexMetadataFile(dexMetadata);
+ }
+ }
+
+ /**
+ * Validate that the given file is a dex metadata archive.
+ * This is just a sanity validation that the file is a zip archive.
+ *
+ * @throws PackageParserException if the file is not a .dm file.
+ */
+ private static void validateDexMetadataFile(String dmaPath) throws PackageParserException {
+ StrictJarFile jarFile = null;
+ try {
+ jarFile = new StrictJarFile(dmaPath, false, false);
+ } catch (IOException e) {
+ throw new PackageParserException(INSTALL_FAILED_BAD_DEX_METADATA,
+ "Error opening " + dmaPath, e);
+ } finally {
+ if (jarFile != null) {
+ try {
+ jarFile.close();
+ } catch (IOException ignored) {
+ }
+ }
+ }
+ }
+
+ /**
+ * Validates that all dex metadata paths in the given list have a matching apk.
+ * (for any foo.dm there should be either a 'foo' of a 'foo.apk' file).
+ * If that's not the case it throws {@code IllegalStateException}.
+ *
+ * This is used to perform a basic sanity check during adb install commands.
+ * (The installer does not support stand alone .dm files)
+ */
+ public static void validateDexPaths(String[] paths) {
+ ArrayList<String> apks = new ArrayList<>();
+ for (int i = 0; i < paths.length; i++) {
+ if (PackageParser.isApkPath(paths[i])) {
+ apks.add(paths[i]);
+ }
+ }
+ ArrayList<String> unmatchedDmFiles = new ArrayList<>();
+ for (int i = 0; i < paths.length; i++) {
+ String dmPath = paths[i];
+ if (isDexMetadataPath(dmPath)) {
+ boolean valid = false;
+ for (int j = apks.size() - 1; j >= 0; j--) {
+ if (dmPath.equals(buildDexMetadataPathForFile(new File(apks.get(j))))) {
+ valid = true;
+ break;
+ }
+ }
+ if (!valid) {
+ unmatchedDmFiles.add(dmPath);
+ }
+ }
+ }
+ if (!unmatchedDmFiles.isEmpty()) {
+ throw new IllegalStateException("Unmatched .dm files: " + unmatchedDmFiles);
+ }
+ }
+
+}
diff --git a/core/java/android/content/pm/dex/IArtManager.aidl b/core/java/android/content/pm/dex/IArtManager.aidl
new file mode 100644
index 0000000..6abfdba
--- /dev/null
+++ b/core/java/android/content/pm/dex/IArtManager.aidl
@@ -0,0 +1,58 @@
+/*
+** Copyright 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.
+*/
+
+package android.content.pm.dex;
+
+import android.content.pm.dex.ISnapshotRuntimeProfileCallback;
+
+/**
+ * A system service that provides access to runtime and compiler artifacts.
+ *
+ * @hide
+ */
+interface IArtManager {
+ /**
+ * Snapshots a runtime profile according to the {@code profileType} parameter.
+ *
+ * If {@code profileType} is {@link ArtManager#PROFILE_APPS} the method will snapshot
+ * the profile for for an apk belonging to the package {@code packageName}.
+ * The apk is identified by {@code codePath}.
+ *
+ * If {@code profileType} is {@code ArtManager.PROFILE_BOOT_IMAGE} the method will snapshot
+ * the profile for the boot image. In this case {@code codePath can be null}. The parameters
+ * {@code packageName} and {@code codePath} are ignored.
+ *
+ * The calling process must have {@code android.permission.READ_RUNTIME_PROFILE} permission.
+ *
+ * The result will be posted on the {@code executor} using the given {@code callback}.
+ * The profile will be available as a read-only {@link android.os.ParcelFileDescriptor}.
+ *
+ * This method will throw {@link IllegalStateException} if
+ * {@link ArtManager#isRuntimeProfilingEnabled(int)} does not return true for the given
+ * {@code profileType}.
+ */
+ oneway void snapshotRuntimeProfile(int profileType, in String packageName,
+ in String codePath, in ISnapshotRuntimeProfileCallback callback);
+
+ /**
+ * Returns true if runtime profiles are enabled for the given type, false otherwise.
+ * The type can be can be either {@code ArtManager.PROFILE_APPS}
+ * or {@code ArtManager.PROFILE_BOOT_IMAGE}.
+ *
+ * @param profileType
+ */
+ boolean isRuntimeProfilingEnabled(int profileType);
+}
diff --git a/core/java/android/content/pm/dex/ISnapshotRuntimeProfileCallback.aidl b/core/java/android/content/pm/dex/ISnapshotRuntimeProfileCallback.aidl
new file mode 100644
index 0000000..3b4838f
--- /dev/null
+++ b/core/java/android/content/pm/dex/ISnapshotRuntimeProfileCallback.aidl
@@ -0,0 +1,29 @@
+/*
+** Copyright 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.
+*/
+
+package android.content.pm.dex;
+
+import android.os.ParcelFileDescriptor;
+
+/**
+ * Callback used to post the result of a profile-snapshot operation.
+ *
+ * @hide
+ */
+oneway interface ISnapshotRuntimeProfileCallback {
+ void onSuccess(in ParcelFileDescriptor profileReadFd);
+ void onError(int errCode);
+}
diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java
index f0adcd6..97284fb 100644
--- a/core/java/android/content/res/AssetManager.java
+++ b/core/java/android/content/res/AssetManager.java
@@ -67,7 +67,7 @@
public static final int ACCESS_BUFFER = 3;
private static final String TAG = "AssetManager";
- private static final boolean localLOGV = false || false;
+ private static final boolean localLOGV = false;
private static final boolean DEBUG_REFS = false;
diff --git a/core/java/android/hardware/location/IFusedLocationHardware.aidl b/core/java/android/hardware/location/IFusedLocationHardware.aidl
deleted file mode 100644
index 2ea4d23..0000000
--- a/core/java/android/hardware/location/IFusedLocationHardware.aidl
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2013, 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/license/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.hardware.location;
-
-import android.hardware.location.IFusedLocationHardwareSink;
-import android.location.FusedBatchOptions;
-
-/**
- * Fused Location hardware interface.
- * This interface is the basic set of supported functionality by Fused Hardware
- * modules that offer Location batching capabilities.
- *
- * @hide
- */
-interface IFusedLocationHardware {
- /**
- * Registers a sink with the Location Hardware object.
- *
- * @param eventSink The sink to register.
- */
- void registerSink(in IFusedLocationHardwareSink eventSink) = 0;
-
- /**
- * Unregisters a sink with the Location Hardware object.
- *
- * @param eventSink The sink to unregister.
- */
- void unregisterSink(in IFusedLocationHardwareSink eventSink) = 1;
-
- /**
- * Provides access to the batch size available in Hardware.
- *
- * @return The batch size the hardware supports.
- */
- int getSupportedBatchSize() = 2;
-
- /**
- * Requests the Hardware to start batching locations.
- *
- * @param id An Id associated with the request.
- * @param batchOptions The options required for batching.
- *
- * @throws RuntimeException if the request Id exists.
- */
- void startBatching(in int id, in FusedBatchOptions batchOptions) = 3;
-
- /**
- * Requests the Hardware to stop batching for the given Id.
- *
- * @param id The request that needs to be stopped.
- * @throws RuntimeException if the request Id is unknown.
- */
- void stopBatching(in int id) = 4;
-
- /**
- * Updates a batching operation in progress.
- *
- * @param id The Id of the operation to update.
- * @param batchOptions The options to apply to the given operation.
- *
- * @throws RuntimeException if the Id of the request is unknown.
- */
- void updateBatchingOptions(in int id, in FusedBatchOptions batchOptions) = 5;
-
- /**
- * Requests the most recent locations available in Hardware.
- * This operation does not dequeue the locations, so still other batching
- * events will continue working.
- *
- * @param batchSizeRequested The number of locations requested.
- */
- void requestBatchOfLocations(in int batchSizeRequested) = 6;
-
- /**
- * Flags if the Hardware supports injection of diagnostic data.
- *
- * @return True if data injection is supported, false otherwise.
- */
- boolean supportsDiagnosticDataInjection() = 7;
-
- /**
- * Injects diagnostic data into the Hardware subsystem.
- *
- * @param data The data to inject.
- * @throws RuntimeException if injection is not supported.
- */
- void injectDiagnosticData(in String data) = 8;
-
- /**
- * Flags if the Hardware supports injection of device context information.
- *
- * @return True if device context injection is supported, false otherwise.
- */
- boolean supportsDeviceContextInjection() = 9;
-
- /**
- * Injects device context information into the Hardware subsystem.
- *
- * @param deviceEnabledContext The context to inject.
- * @throws RuntimeException if injection is not supported.
- */
- void injectDeviceContext(in int deviceEnabledContext) = 10;
-
- /**
- * Requests all batched locations currently available in Hardware
- * and clears the buffer. Any subsequent calls will not return any
- * of the locations returned in this call.
- */
- void flushBatchedLocations() = 11;
-
- /**
- * Returns the version of this FLP HAL implementation.
- */
- int getVersion() = 12;
-}
diff --git a/core/java/android/hardware/location/IFusedLocationHardwareSink.aidl b/core/java/android/hardware/location/IFusedLocationHardwareSink.aidl
deleted file mode 100644
index a7dd035..0000000
--- a/core/java/android/hardware/location/IFusedLocationHardwareSink.aidl
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2013, 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/license/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.hardware.location;
-
-import android.location.Location;
-
-/**
- * Fused Location hardware event sink interface.
- * This interface defines the set of events that the FusedLocationHardware provides.
- *
- * @hide
- */
-oneway interface IFusedLocationHardwareSink {
- /**
- * Event generated when a batch of location information is available.
- *
- * @param locations The batch of location information available.
- */
- void onLocationAvailable(in Location[] locations) = 0;
-
- /**
- * Event generated from FLP HAL to provide diagnostic data to the platform.
- *
- * @param data The diagnostic data provided by FLP HAL.
- */
- void onDiagnosticDataAvailable(in String data) = 1;
-
- /**
- * Event generated from FLP HAL to provide a mask of supported
- * capabilities. Should be called immediatly after init.
- */
- void onCapabilities(int capabilities) = 2;
-
- /**
- * Event generated from FLP HAL when the status of location batching
- * changes (location is successful/unsuccessful).
- */
- void onStatusChanged(int status) = 3;
-}
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 7a20943..1bafcaec 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -1726,9 +1726,9 @@
}
/**
- * Called when the input method window has been shown to the user, after
- * previously not being visible. This is done after all of the UI setup
- * for the window has occurred (creating its views etc).
+ * Called immediately before the input method window is shown to the user.
+ * You could override this to prepare for the window to be shown
+ * (update view structure etc).
*/
public void onWindowShown() {
// Intentionally empty
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 11d338d..7be708a 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -112,15 +112,21 @@
* <p/>
* For a disconnect event, the boolean extra EXTRA_NO_CONNECTIVITY
* is set to {@code true} if there are no connected networks at all.
+ *
+ * @deprecated apps should use the more versatile {@link #requestNetwork},
+ * {@link #registerNetworkCallback} or {@link #registerDefaultNetworkCallback}
+ * functions instead for faster and more detailed updates about the network
+ * changes they care about.
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ @Deprecated
public static final String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
/**
* A temporary hack until SUPL system can get off the legacy APIS.
* They do too many network requests and the long list of apps listening
- * and waking due to the CONNECTIVITY_ACTION bcast makes it expensive.
- * Use this bcast intent instead for SUPL requests.
+ * and waking due to the CONNECTIVITY_ACTION broadcast makes it expensive.
+ * Use this broadcast intent instead for SUPL requests.
* @hide
*/
public static final String CONNECTIVITY_ACTION_SUPL =
@@ -146,7 +152,7 @@
* call {@link CaptivePortal#reportCaptivePortalDismissed} so the system can
* reevaluate the network. If reevaluation finds the network no longer
* subject to a captive portal, the network may become the default active
- * data network. </li>
+ * data network.</li>
* <li> When the app handling this action believes the user explicitly wants
* to ignore the captive portal and the network, the app should call
* {@link CaptivePortal#ignoreNetwork}. </li>
@@ -232,6 +238,14 @@
public static final String EXTRA_CAPTIVE_PORTAL_URL = "android.net.extra.CAPTIVE_PORTAL_URL";
/**
+ * Key for passing a {@link android.net.captiveportal.CaptivePortalProbeSpec} to the captive
+ * portal login activity.
+ * {@hide}
+ */
+ public static final String EXTRA_CAPTIVE_PORTAL_PROBE_SPEC =
+ "android.net.extra.CAPTIVE_PORTAL_PROBE_SPEC";
+
+ /**
* Key for passing a user agent string to the captive portal login activity.
* {@hide}
*/
@@ -246,7 +260,8 @@
* {@hide}
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String ACTION_DATA_ACTIVITY_CHANGE = "android.net.conn.DATA_ACTIVITY_CHANGE";
+ public static final String ACTION_DATA_ACTIVITY_CHANGE =
+ "android.net.conn.DATA_ACTIVITY_CHANGE";
/**
* The lookup key for an enum that indicates the network device type on which this data activity
* change happens.
@@ -377,14 +392,14 @@
/**
* Invalid tethering type.
- * @see #startTethering(int, OnStartTetheringCallback, boolean)
+ * @see #startTethering(int, boolean, OnStartTetheringCallback)
* @hide
*/
public static final int TETHERING_INVALID = -1;
/**
* Wifi tethering type.
- * @see #startTethering(int, OnStartTetheringCallback, boolean)
+ * @see #startTethering(int, boolean, OnStartTetheringCallback)
* @hide
*/
@SystemApi
@@ -392,7 +407,7 @@
/**
* USB tethering type.
- * @see #startTethering(int, OnStartTetheringCallback, boolean)
+ * @see #startTethering(int, boolean, OnStartTetheringCallback)
* @hide
*/
@SystemApi
@@ -400,7 +415,7 @@
/**
* Bluetooth tethering type.
- * @see #startTethering(int, OnStartTetheringCallback, boolean)
+ * @see #startTethering(int, boolean, OnStartTetheringCallback)
* @hide
*/
@SystemApi
@@ -447,133 +462,177 @@
public static final int TYPE_NONE = -1;
/**
- * The Mobile data connection. When active, all data traffic
- * will use this network type's interface by default
- * (it has a default route)
+ * A Mobile data connection. Devices may support more than one.
+ *
+ * @deprecated Applications should instead use {@link NetworkCapabilities#hasTransport} or
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request an
+ * appropriate network. {@see NetworkCapabilities} for supported transports.
*/
+ @Deprecated
public static final int TYPE_MOBILE = 0;
+
/**
- * The WIFI data connection. When active, all data traffic
- * will use this network type's interface by default
- * (it has a default route).
+ * A WIFI data connection. Devices may support more than one.
+ *
+ * @deprecated Applications should instead use {@link NetworkCapabilities#hasTransport} or
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request an
+ * appropriate network. {@see NetworkCapabilities} for supported transports.
*/
+ @Deprecated
public static final int TYPE_WIFI = 1;
+
/**
* An MMS-specific Mobile data connection. This network type may use the
* same network interface as {@link #TYPE_MOBILE} or it may use a different
* one. This is used by applications needing to talk to the carrier's
* Multimedia Messaging Service servers.
*
- * @deprecated Applications should instead use
+ * @deprecated Applications should instead use {@link NetworkCapabilities#hasCapability} or
* {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request a network that
* provides the {@link NetworkCapabilities#NET_CAPABILITY_MMS} capability.
*/
@Deprecated
public static final int TYPE_MOBILE_MMS = 2;
+
/**
* A SUPL-specific Mobile data connection. This network type may use the
* same network interface as {@link #TYPE_MOBILE} or it may use a different
* one. This is used by applications needing to talk to the carrier's
* Secure User Plane Location servers for help locating the device.
*
- * @deprecated Applications should instead use
+ * @deprecated Applications should instead use {@link NetworkCapabilities#hasCapability} or
* {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request a network that
* provides the {@link NetworkCapabilities#NET_CAPABILITY_SUPL} capability.
*/
@Deprecated
public static final int TYPE_MOBILE_SUPL = 3;
+
/**
* A DUN-specific Mobile data connection. This network type may use the
* same network interface as {@link #TYPE_MOBILE} or it may use a different
* one. This is sometimes by the system when setting up an upstream connection
* for tethering so that the carrier is aware of DUN traffic.
+ *
+ * @deprecated Applications should instead use {@link NetworkCapabilities#hasCapability} or
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request a network that
+ * provides the {@link NetworkCapabilities#NET_CAPABILITY_DUN} capability.
*/
+ @Deprecated
public static final int TYPE_MOBILE_DUN = 4;
+
/**
* A High Priority Mobile data connection. This network type uses the
* same network interface as {@link #TYPE_MOBILE} but the routing setup
* is different.
*
- * @deprecated Applications should instead use
- * {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request a network that
- * uses the {@link NetworkCapabilities#TRANSPORT_CELLULAR} transport.
+ * @deprecated Applications should instead use {@link NetworkCapabilities#hasTransport} or
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request an
+ * appropriate network. {@see NetworkCapabilities} for supported transports.
*/
@Deprecated
public static final int TYPE_MOBILE_HIPRI = 5;
+
/**
- * The WiMAX data connection. When active, all data traffic
- * will use this network type's interface by default
- * (it has a default route).
+ * A WiMAX data connection.
+ *
+ * @deprecated Applications should instead use {@link NetworkCapabilities#hasTransport} or
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request an
+ * appropriate network. {@see NetworkCapabilities} for supported transports.
*/
+ @Deprecated
public static final int TYPE_WIMAX = 6;
/**
- * The Bluetooth data connection. When active, all data traffic
- * will use this network type's interface by default
- * (it has a default route).
+ * A Bluetooth data connection.
+ *
+ * @deprecated Applications should instead use {@link NetworkCapabilities#hasTransport} or
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request an
+ * appropriate network. {@see NetworkCapabilities} for supported transports.
*/
+ @Deprecated
public static final int TYPE_BLUETOOTH = 7;
/**
* Dummy data connection. This should not be used on shipping devices.
+ * @deprecated This is not used any more.
*/
+ @Deprecated
public static final int TYPE_DUMMY = 8;
/**
- * The Ethernet data connection. When active, all data traffic
- * will use this network type's interface by default
- * (it has a default route).
+ * An Ethernet data connection.
+ *
+ * @deprecated Applications should instead use {@link NetworkCapabilities#hasTransport} or
+ * {@link #requestNetwork(NetworkRequest, NetworkCallback)} to request an
+ * appropriate network. {@see NetworkCapabilities} for supported transports.
*/
+ @Deprecated
public static final int TYPE_ETHERNET = 9;
/**
* Over the air Administration.
+ * @deprecated Use {@link NetworkCapabilities} instead.
* {@hide}
*/
+ @Deprecated
public static final int TYPE_MOBILE_FOTA = 10;
/**
* IP Multimedia Subsystem.
+ * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_IMS} instead.
* {@hide}
*/
+ @Deprecated
public static final int TYPE_MOBILE_IMS = 11;
/**
* Carrier Branded Services.
+ * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_CBS} instead.
* {@hide}
*/
+ @Deprecated
public static final int TYPE_MOBILE_CBS = 12;
/**
* A Wi-Fi p2p connection. Only requesting processes will have access to
* the peers connected.
+ * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_WIFI_P2P} instead.
* {@hide}
*/
+ @Deprecated
public static final int TYPE_WIFI_P2P = 13;
/**
* The network to use for initially attaching to the network
+ * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_IA} instead.
* {@hide}
*/
+ @Deprecated
public static final int TYPE_MOBILE_IA = 14;
/**
* Emergency PDN connection for emergency services. This
* may include IMS and MMS in emergency situations.
+ * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_EIMS} instead.
* {@hide}
*/
+ @Deprecated
public static final int TYPE_MOBILE_EMERGENCY = 15;
/**
* The network that uses proxy to achieve connectivity.
+ * @deprecated Use {@link NetworkCapabilities} instead.
* {@hide}
*/
+ @Deprecated
public static final int TYPE_PROXY = 16;
/**
* A virtual network using one or more native bearers.
* It may or may not be providing security services.
+ * @deprecated Applications should use {@link NetworkCapabilities#TRANSPORT_VPN} instead.
*/
+ @Deprecated
public static final int TYPE_VPN = 17;
/** {@hide} */
@@ -606,7 +665,7 @@
/**
* Static unique request used as a tombstone for NetworkCallbacks that have been unregistered.
* This allows to distinguish when unregistering NetworkCallbacks those that were never
- * registered and those that were already unregistered.
+ * registered from those that were already unregistered.
* @hide
*/
private static final NetworkRequest ALREADY_UNREGISTERED =
@@ -680,8 +739,10 @@
* @param type the type needing naming
* @return a String for the given type, or a string version of the type ("87")
* if no name is known.
+ * @deprecated Types are deprecated. Use {@link NetworkCapabilities} instead.
* {@hide}
*/
+ @Deprecated
public static String getNetworkTypeName(int type) {
switch (type) {
case TYPE_NONE:
@@ -732,8 +793,10 @@
* This should be replaced in the future by a network property.
* @param networkType the type to check
* @return a boolean - {@code true} if uses cellular network, else {@code false}
+ * @deprecated Types are deprecated. Use {@link NetworkCapabilities} instead.
* {@hide}
*/
+ @Deprecated
public static boolean isNetworkTypeMobile(int networkType) {
switch (networkType) {
case TYPE_MOBILE:
@@ -755,8 +818,10 @@
/**
* Checks if the given network type is backed by a Wi-Fi radio.
*
+ * @deprecated Types are deprecated. Use {@link NetworkCapabilities} instead.
* @hide
*/
+ @Deprecated
public static boolean isNetworkTypeWifi(int networkType) {
switch (networkType) {
case TYPE_WIFI:
@@ -805,6 +870,10 @@
* You should always check {@link NetworkInfo#isConnected()} before initiating
* network traffic. This may return {@code null} when there is no default
* network.
+ * Note that if the default network is a VPN, this method will return the
+ * NetworkInfo for one of its underlying networks instead, or null if the
+ * VPN agent did not specify any. Apps interested in learning about VPNs
+ * should use {@link #getNetworkInfo(android.net.Network)} instead.
*
* @return a {@link NetworkInfo} object for the current default network
* or {@code null} if no default network is currently active
@@ -962,7 +1031,11 @@
* which you're interested.
* @return a {@link NetworkInfo} object for the requested
* network type or {@code null} if the type is not
- * supported by the device.
+ * supported by the device. If {@code networkType} is
+ * TYPE_VPN and a VPN is active for the calling app,
+ * then this method will try to return one of the
+ * underlying networks for the VPN or null if the
+ * VPN agent didn't specify any.
*
* @deprecated This method does not support multiple connected networks
* of the same type. Use {@link #getAllNetworks} and
@@ -1422,8 +1495,8 @@
};
}
- private static HashMap<NetworkCapabilities, LegacyRequest> sLegacyRequests =
- new HashMap<NetworkCapabilities, LegacyRequest>();
+ private static final HashMap<NetworkCapabilities, LegacyRequest> sLegacyRequests =
+ new HashMap<>();
private NetworkRequest findRequestForFeature(NetworkCapabilities netCap) {
synchronized (sLegacyRequests) {
@@ -1523,6 +1596,8 @@
* IllegalArgumentException if no mapping from the legacy type to
* NetworkCapabilities is known.
*
+ * @deprecated Types are deprecated. Use {@link NetworkCallback} or {@link NetworkRequest}
+ * to find the network instead.
* @hide
*/
public static NetworkCapabilities networkCapabilitiesForType(int type) {
@@ -1561,8 +1636,9 @@
* {@code onStarted} method will be called. If an error occurs, {@code onError} will be called,
* specifying one of the {@code ERROR_*} constants in this class.
*
- * To stop an existing keepalive, call {@link stop}. The system will call {@code onStopped} if
- * the operation was successfull or {@code onError} if an error occurred.
+ * To stop an existing keepalive, call {@link PacketKeepalive#stop}. The system will call
+ * {@link PacketKeepaliveCallback#onStopped} if the operation was successful or
+ * {@link PacketKeepaliveCallback#onError} if an error occurred.
*
* @hide
*/
@@ -1596,8 +1672,12 @@
/** The hardware returned an error. */
public static final int ERROR_HARDWARE_ERROR = -31;
+ /** The NAT-T destination port for IPsec */
public static final int NATT_PORT = 4500;
+ /** The minimum interval in seconds between keepalive packet transmissions */
+ public static final int MIN_INTERVAL = 10;
+
private final Network mNetwork;
private final PacketKeepaliveCallback mCallback;
private final Looper mLooper;
@@ -1819,7 +1899,7 @@
* to initiate network traffic), you can retrieve its instantaneous state with
* {@link ConnectivityManager#isDefaultNetworkActive}.
*/
- public void onNetworkActive();
+ void onNetworkActive();
}
private INetworkManagementService getNetworkManagementService() {
@@ -1834,8 +1914,7 @@
}
private final ArrayMap<OnNetworkActiveListener, INetworkActivityListener>
- mNetworkActivityListeners
- = new ArrayMap<OnNetworkActiveListener, INetworkActivityListener>();
+ mNetworkActivityListeners = new ArrayMap<>();
/**
* Start listening to reports when the system's default data network is active, meaning it is
@@ -1915,13 +1994,6 @@
* services.jar, possibly in com.android.server.net. */
/** {@hide} */
- public static final boolean checkChangePermission(Context context) {
- int uid = Binder.getCallingUid();
- return Settings.checkAndNoteChangeNetworkStateOperation(context, uid, Settings
- .getPackageNameForUid(context, uid), false /* throwException */);
- }
-
- /** {@hide} */
public static final void enforceChangePermission(Context context) {
int uid = Binder.getCallingUid();
Settings.checkAndNoteChangeNetworkStateOperation(context, uid, Settings
@@ -2145,12 +2217,12 @@
/**
* Called when tethering has been successfully started.
*/
- public void onTetheringStarted() {};
+ public void onTetheringStarted() {}
/**
* Called when starting tethering failed.
*/
- public void onTetheringFailed() {};
+ public void onTetheringFailed() {}
}
/**
@@ -2370,6 +2442,7 @@
*
* @param networkType The type of network you want to report on
* @param percentage The quality of the connection 0 is bad, 100 is good
+ * @deprecated Types are deprecated. Use {@link #reportNetworkConnectivity} instead.
* {@hide}
*/
public void reportInetCondition(int networkType, int percentage) {
@@ -2501,9 +2574,10 @@
*
* @param networkType The network type we'd like to check
* @return {@code true} if supported, else {@code false}
- *
+ * @deprecated Types are deprecated. Use {@link NetworkCapabilities} instead.
* @hide
*/
+ @Deprecated
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
public boolean isNetworkSupported(int networkType) {
try {
@@ -2585,9 +2659,6 @@
/**
* Set sign in error notification to visible or in visible
*
- * @param visible
- * @param networkType
- *
* {@hide}
* @deprecated Doesn't properly deal with multiple connected networks of the same type.
*/
@@ -2656,7 +2727,7 @@
* A {@code NetworkCallback} is registered by calling
* {@link #requestNetwork(NetworkRequest, NetworkCallback)},
* {@link #registerNetworkCallback(NetworkRequest, NetworkCallback)},
- * or {@link #registerDefaultNetworkCallback(NetworkCallback). A {@code NetworkCallback} is
+ * or {@link #registerDefaultNetworkCallback(NetworkCallback)}. A {@code NetworkCallback} is
* unregistered by calling {@link #unregisterNetworkCallback(NetworkCallback)}.
* A {@code NetworkCallback} should be registered at most once at any time.
* A {@code NetworkCallback} that has been unregistered can be registered again.
@@ -2685,6 +2756,32 @@
* satisfying the request changes.
*
* @param network The {@link Network} of the satisfying network.
+ * @param networkCapabilities The {@link NetworkCapabilities} of the satisfying network.
+ * @param linkProperties The {@link LinkProperties} of the satisfying network.
+ * @hide
+ */
+ public void onAvailable(Network network, NetworkCapabilities networkCapabilities,
+ LinkProperties linkProperties) {
+ // Internally only this method is called when a new network is available, and
+ // it calls the callback in the same way and order that older versions used
+ // to call so as not to change the behavior.
+ onAvailable(network);
+ if (!networkCapabilities.hasCapability(
+ NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED)) {
+ onNetworkSuspended(network);
+ }
+ onCapabilitiesChanged(network, networkCapabilities);
+ onLinkPropertiesChanged(network, linkProperties);
+ }
+
+ /**
+ * Called when the framework connects and has declared a new network ready for use.
+ * This callback may be called more than once if the {@link Network} that is
+ * satisfying the request changes. This will always immediately be followed by a
+ * call to {@link #onCapabilitiesChanged(Network, NetworkCapabilities)} then by a
+ * call to {@link #onLinkPropertiesChanged(Network, LinkProperties)}.
+ *
+ * @param network The {@link Network} of the satisfying network.
*/
public void onAvailable(Network network) {}
@@ -2727,7 +2824,8 @@
* changes capabilities but still satisfies the stated need.
*
* @param network The {@link Network} whose capabilities have changed.
- * @param networkCapabilities The new {@link android.net.NetworkCapabilities} for this network.
+ * @param networkCapabilities The new {@link android.net.NetworkCapabilities} for this
+ * network.
*/
public void onCapabilitiesChanged(Network network,
NetworkCapabilities networkCapabilities) {}
@@ -2743,7 +2841,7 @@
/**
* Called when the network the framework connected to for this request
- * goes into {@link NetworkInfo.DetailedState.SUSPENDED}.
+ * goes into {@link NetworkInfo.State#SUSPENDED}.
* This generally means that while the TCP connections are still live,
* temporarily network data fails to transfer. Specifically this is used
* on cellular networks to mask temporary outages when driving through
@@ -2754,9 +2852,8 @@
/**
* Called when the network the framework connected to for this request
- * returns from a {@link NetworkInfo.DetailedState.SUSPENDED} state.
- * This should always be preceeded by a matching {@code onNetworkSuspended}
- * call.
+ * returns from a {@link NetworkInfo.State#SUSPENDED} state. This should always be
+ * preceded by a matching {@link NetworkCallback#onNetworkSuspended} call.
* @hide
*/
public void onNetworkResumed(Network network) {}
@@ -2770,7 +2867,7 @@
* @hide
*/
public interface Errors {
- static int TOO_MANY_REQUESTS = 1;
+ int TOO_MANY_REQUESTS = 1;
}
/** @hide */
@@ -2865,7 +2962,9 @@
break;
}
case CALLBACK_AVAILABLE: {
- callback.onAvailable(network);
+ NetworkCapabilities cap = getObject(message, NetworkCapabilities.class);
+ LinkProperties lp = getObject(message, LinkProperties.class);
+ callback.onAvailable(network, cap, lp);
break;
}
case CALLBACK_LOSING: {
@@ -3025,7 +3124,7 @@
* as these {@code NetworkCapabilities} represent states that a particular
* network may never attain, and whether a network will attain these states
* is unknown prior to bringing up the network so the framework does not
- * know how to go about satisfing a request with these capabilities.
+ * know how to go about satisfying a request with these capabilities.
*
* <p>This method requires the caller to hold either the
* {@link android.Manifest.permission#CHANGE_NETWORK_STATE} permission
@@ -3085,7 +3184,7 @@
* Request a network to satisfy a set of {@link android.net.NetworkCapabilities}, limited
* by a timeout.
*
- * This function behaves identically to the non-timedout version, but if a suitable
+ * This function behaves identically to the version without timeout, but if a suitable
* network is not found within the given time (in milliseconds) the
* {@link NetworkCallback#onUnavailable} callback is called. The request can still be
* released normally by calling {@link #unregisterNetworkCallback(NetworkCallback)} but does
@@ -3166,7 +3265,7 @@
* as these {@code NetworkCapabilities} represent states that a particular
* network may never attain, and whether a network will attain these states
* is unknown prior to bringing up the network so the framework does not
- * know how to go about satisfing a request with these capabilities.
+ * know how to go about satisfying a request with these capabilities.
*
* <p>This method requires the caller to hold either the
* {@link android.Manifest.permission#CHANGE_NETWORK_STATE} permission
@@ -3331,9 +3430,9 @@
// capabilities, this request is guaranteed, at all times, to be
// satisfied by the same network, if any, that satisfies the default
// request, i.e., the system default network.
- NetworkCapabilities nullCapabilities = null;
CallbackHandler cbHandler = new CallbackHandler(handler);
- sendRequestForNetwork(nullCapabilities, networkCallback, 0, REQUEST, TYPE_NONE, cbHandler);
+ sendRequestForNetwork(null /* NetworkCapabilities need */, networkCallback, 0,
+ REQUEST, TYPE_NONE, cbHandler);
}
/**
@@ -3568,7 +3667,7 @@
* @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
*/
public boolean bindProcessToNetwork(Network network) {
- // Forcing callers to call thru non-static function ensures ConnectivityManager
+ // Forcing callers to call through non-static function ensures ConnectivityManager
// instantiated.
return setProcessDefaultNetwork(network);
}
diff --git a/core/java/android/net/EthernetManager.java b/core/java/android/net/EthernetManager.java
index 31a3096..ecccda5 100644
--- a/core/java/android/net/EthernetManager.java
+++ b/core/java/android/net/EthernetManager.java
@@ -18,9 +18,6 @@
import android.annotation.SystemService;
import android.content.Context;
-import android.net.IEthernetManager;
-import android.net.IEthernetServiceListener;
-import android.net.IpConfiguration;
import android.os.Handler;
import android.os.Message;
import android.os.RemoteException;
@@ -45,18 +42,18 @@
if (msg.what == MSG_AVAILABILITY_CHANGED) {
boolean isAvailable = (msg.arg1 == 1);
for (Listener listener : mListeners) {
- listener.onAvailabilityChanged(isAvailable);
+ listener.onAvailabilityChanged((String) msg.obj, isAvailable);
}
}
}
};
- private final ArrayList<Listener> mListeners = new ArrayList<Listener>();
+ private final ArrayList<Listener> mListeners = new ArrayList<>();
private final IEthernetServiceListener.Stub mServiceListener =
new IEthernetServiceListener.Stub() {
@Override
- public void onAvailabilityChanged(boolean isAvailable) {
+ public void onAvailabilityChanged(String iface, boolean isAvailable) {
mHandler.obtainMessage(
- MSG_AVAILABILITY_CHANGED, isAvailable ? 1 : 0, 0, null).sendToTarget();
+ MSG_AVAILABILITY_CHANGED, isAvailable ? 1 : 0, 0, iface).sendToTarget();
}
};
@@ -66,9 +63,10 @@
public interface Listener {
/**
* Called when Ethernet port's availability is changed.
- * @param isAvailable {@code true} if one or more Ethernet port exists.
+ * @param iface Ethernet interface name
+ * @param isAvailable {@code true} if Ethernet port exists.
*/
- public void onAvailabilityChanged(boolean isAvailable);
+ void onAvailabilityChanged(String iface, boolean isAvailable);
}
/**
@@ -86,9 +84,9 @@
* Get Ethernet configuration.
* @return the Ethernet Configuration, contained in {@link IpConfiguration}.
*/
- public IpConfiguration getConfiguration() {
+ public IpConfiguration getConfiguration(String iface) {
try {
- return mService.getConfiguration();
+ return mService.getConfiguration(iface);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -97,21 +95,29 @@
/**
* Set Ethernet configuration.
*/
- public void setConfiguration(IpConfiguration config) {
+ public void setConfiguration(String iface, IpConfiguration config) {
try {
- mService.setConfiguration(config);
+ mService.setConfiguration(iface, config);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/**
- * Indicates whether the system currently has one or more
- * Ethernet interfaces.
+ * Indicates whether the system currently has one or more Ethernet interfaces.
*/
public boolean isAvailable() {
+ return getAvailableInterfaces().length > 0;
+ }
+
+ /**
+ * Indicates whether the system has given interface.
+ *
+ * @param iface Ethernet interface name
+ */
+ public boolean isAvailable(String iface) {
try {
- return mService.isAvailable();
+ return mService.isAvailable(iface);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -137,6 +143,17 @@
}
/**
+ * Returns an array of available Ethernet interface names.
+ */
+ public String[] getAvailableInterfaces() {
+ try {
+ return mService.getAvailableInterfaces();
+ } catch (RemoteException e) {
+ throw e.rethrowAsRuntimeException();
+ }
+ }
+
+ /**
* Removes a listener.
* @param listener A {@link Listener} to remove.
* @throws IllegalArgumentException If the listener is null.
diff --git a/core/java/android/net/IEthernetManager.aidl b/core/java/android/net/IEthernetManager.aidl
index 7a92eb9..94960b5 100644
--- a/core/java/android/net/IEthernetManager.aidl
+++ b/core/java/android/net/IEthernetManager.aidl
@@ -26,9 +26,10 @@
/** {@hide} */
interface IEthernetManager
{
- IpConfiguration getConfiguration();
- void setConfiguration(in IpConfiguration config);
- boolean isAvailable();
+ String[] getAvailableInterfaces();
+ IpConfiguration getConfiguration(String iface);
+ void setConfiguration(String iface, in IpConfiguration config);
+ boolean isAvailable(String iface);
void addListener(in IEthernetServiceListener listener);
void removeListener(in IEthernetServiceListener listener);
}
diff --git a/core/java/android/net/IEthernetServiceListener.aidl b/core/java/android/net/IEthernetServiceListener.aidl
index 356690e8..782fa19 100644
--- a/core/java/android/net/IEthernetServiceListener.aidl
+++ b/core/java/android/net/IEthernetServiceListener.aidl
@@ -19,5 +19,5 @@
/** @hide */
oneway interface IEthernetServiceListener
{
- void onAvailabilityChanged(boolean isAvailable);
+ void onAvailabilityChanged(String iface, boolean isAvailable);
}
diff --git a/core/java/android/net/IIpSecService.aidl b/core/java/android/net/IIpSecService.aidl
index eeb30e2..d6774d4 100644
--- a/core/java/android/net/IIpSecService.aidl
+++ b/core/java/android/net/IIpSecService.aidl
@@ -16,11 +16,13 @@
package android.net;
+import android.net.LinkAddress;
import android.net.Network;
import android.net.IpSecConfig;
import android.net.IpSecUdpEncapResponse;
import android.net.IpSecSpiResponse;
import android.net.IpSecTransformResponse;
+import android.net.IpSecTunnelInterfaceResponse;
import android.os.Bundle;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
@@ -39,11 +41,35 @@
void closeUdpEncapsulationSocket(int resourceId);
- IpSecTransformResponse createTransform(in IpSecConfig c, in IBinder binder);
+ IpSecTunnelInterfaceResponse createTunnelInterface(
+ in String localAddr,
+ in String remoteAddr,
+ in Network underlyingNetwork,
+ in IBinder binder,
+ in String callingPackage);
+
+ void addAddressToTunnelInterface(
+ int tunnelResourceId,
+ in LinkAddress localAddr,
+ in String callingPackage);
+
+ void removeAddressFromTunnelInterface(
+ int tunnelResourceId,
+ in LinkAddress localAddr,
+ in String callingPackage);
+
+ void deleteTunnelInterface(int resourceId, in String callingPackage);
+
+ IpSecTransformResponse createTransform(
+ in IpSecConfig c, in IBinder binder, in String callingPackage);
void deleteTransform(int transformId);
- void applyTransportModeTransform(in ParcelFileDescriptor socket, int direction, int transformId);
+ void applyTransportModeTransform(
+ in ParcelFileDescriptor socket, int direction, int transformId);
+
+ void applyTunnelModeTransform(
+ int tunnelResourceId, int direction, int transformResourceId, in String callingPackage);
void removeTransportModeTransforms(in ParcelFileDescriptor socket);
}
diff --git a/core/java/android/net/INetdEventCallback.aidl b/core/java/android/net/INetdEventCallback.aidl
index 1fd9423..1e75bf4 100644
--- a/core/java/android/net/INetdEventCallback.aidl
+++ b/core/java/android/net/INetdEventCallback.aidl
@@ -20,8 +20,9 @@
oneway interface INetdEventCallback {
// Possible addNetdEventCallback callers.
- const int CALLBACK_CALLER_DEVICE_POLICY = 0;
- const int CALLBACK_CALLER_NETWORK_WATCHLIST = 1;
+ const int CALLBACK_CALLER_CONNECTIVITY_SERVICE = 0;
+ const int CALLBACK_CALLER_DEVICE_POLICY = 1;
+ const int CALLBACK_CALLER_NETWORK_WATCHLIST = 2;
/**
* Reports a single DNS lookup function call.
@@ -39,6 +40,18 @@
int uid);
/**
+ * Represents a private DNS validation success or failure.
+ * This method must not block or perform long-running operations.
+ *
+ * @param netId the ID of the network the validation was performed on.
+ * @param ipAddress the IP address for which validation was performed.
+ * @param hostname the hostname for which validation was performed.
+ * @param validated whether or not validation was successful.
+ */
+ void onPrivateDnsValidationEvent(int netId, String ipAddress, String hostname,
+ boolean validated);
+
+ /**
* Reports a single connect library call.
* This method must not block or perform long-running operations.
*
diff --git a/core/java/android/net/INetworkStatsService.aidl b/core/java/android/net/INetworkStatsService.aidl
index 90e3ffd..eab7041 100644
--- a/core/java/android/net/INetworkStatsService.aidl
+++ b/core/java/android/net/INetworkStatsService.aidl
@@ -44,6 +44,16 @@
/** Return data layer snapshot of UID network usage. */
NetworkStats getDataLayerSnapshotForUid(int uid);
+
+ /** Get a detailed snapshot of stats since boot for all UIDs.
+ *
+ * <p>Results will not always be limited to stats on requiredIfaces when specified: stats for
+ * interfaces stacked on the specified interfaces, or for interfaces on which the specified
+ * interfaces are stacked on, will also be included.
+ * @param requiredIfaces Interface names to get data for, or {@link NetworkStats#INTERFACES_ALL}.
+ */
+ NetworkStats getDetailedUidStats(in String[] requiredIfaces);
+
/** Return set of any ifaces associated with mobile networks since boot. */
String[] getMobileIfaces();
diff --git a/core/java/android/net/IpPrefix.java b/core/java/android/net/IpPrefix.java
index 6e2654e..4631c56 100644
--- a/core/java/android/net/IpPrefix.java
+++ b/core/java/android/net/IpPrefix.java
@@ -25,6 +25,7 @@
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;
+import java.util.Comparator;
/**
* This class represents an IP prefix, i.e., a contiguous block of IP addresses aligned on a
@@ -187,6 +188,20 @@
}
/**
+ * Returns whether the specified prefix is entirely contained in this prefix.
+ *
+ * Note this is mathematical inclusion, so a prefix is always contained within itself.
+ * @param otherPrefix the prefix to test
+ * @hide
+ */
+ public boolean containsPrefix(IpPrefix otherPrefix) {
+ if (otherPrefix.getPrefixLength() < prefixLength) return false;
+ final byte[] otherAddress = otherPrefix.getRawAddress();
+ NetworkUtils.maskRawAddress(otherAddress, prefixLength);
+ return Arrays.equals(otherAddress, address);
+ }
+
+ /**
* @hide
*/
public boolean isIPv6() {
@@ -230,6 +245,38 @@
}
/**
+ * Returns a comparator ordering IpPrefixes by length, shorter to longer.
+ * Contents of the address will break ties.
+ * @hide
+ */
+ public static Comparator<IpPrefix> lengthComparator() {
+ return new Comparator<IpPrefix>() {
+ @Override
+ public int compare(IpPrefix prefix1, IpPrefix prefix2) {
+ if (prefix1.isIPv4()) {
+ if (prefix2.isIPv6()) return -1;
+ } else {
+ if (prefix2.isIPv4()) return 1;
+ }
+ final int p1len = prefix1.getPrefixLength();
+ final int p2len = prefix2.getPrefixLength();
+ if (p1len < p2len) return -1;
+ if (p2len < p1len) return 1;
+ final byte[] a1 = prefix1.address;
+ final byte[] a2 = prefix2.address;
+ final int len = a1.length < a2.length ? a1.length : a2.length;
+ for (int i = 0; i < len; ++i) {
+ if (a1[i] < a2[i]) return -1;
+ if (a1[i] > a2[i]) return 1;
+ }
+ if (a2.length < len) return 1;
+ if (a1.length < len) return -1;
+ return 0;
+ }
+ };
+ }
+
+ /**
* Implement the Parcelable interface.
*/
public static final Creator<IpPrefix> CREATOR =
diff --git a/core/java/android/net/IpSecAlgorithm.java b/core/java/android/net/IpSecAlgorithm.java
index c69a4d4..8034bb6 100644
--- a/core/java/android/net/IpSecAlgorithm.java
+++ b/core/java/android/net/IpSecAlgorithm.java
@@ -38,6 +38,13 @@
private static final String TAG = "IpSecAlgorithm";
/**
+ * Null cipher.
+ *
+ * @hide
+ */
+ public static final String CRYPT_NULL = "ecb(cipher_null)";
+
+ /**
* AES-CBC Encryption/Ciphering Algorithm.
*
* <p>Valid lengths for this key are {128, 192, 256}.
@@ -49,7 +56,8 @@
* new applications and is provided for legacy compatibility with 3gpp infrastructure.</b>
*
* <p>Keys for this algorithm must be 128 bits in length.
- * <p>Valid truncation lengths are multiples of 8 bits from 96 to (default) 128.
+ *
+ * <p>Valid truncation lengths are multiples of 8 bits from 96 to 128.
*/
public static final String AUTH_HMAC_MD5 = "hmac(md5)";
@@ -58,7 +66,8 @@
* new applications and is provided for legacy compatibility with 3gpp infrastructure.</b>
*
* <p>Keys for this algorithm must be 160 bits in length.
- * <p>Valid truncation lengths are multiples of 8 bits from 96 to (default) 160.
+ *
+ * <p>Valid truncation lengths are multiples of 8 bits from 96 to 160.
*/
public static final String AUTH_HMAC_SHA1 = "hmac(sha1)";
@@ -66,7 +75,8 @@
* SHA256 HMAC Authentication/Integrity Algorithm.
*
* <p>Keys for this algorithm must be 256 bits in length.
- * <p>Valid truncation lengths are multiples of 8 bits from 96 to (default) 256.
+ *
+ * <p>Valid truncation lengths are multiples of 8 bits from 96 to 256.
*/
public static final String AUTH_HMAC_SHA256 = "hmac(sha256)";
@@ -74,7 +84,8 @@
* SHA384 HMAC Authentication/Integrity Algorithm.
*
* <p>Keys for this algorithm must be 384 bits in length.
- * <p>Valid truncation lengths are multiples of 8 bits from 192 to (default) 384.
+ *
+ * <p>Valid truncation lengths are multiples of 8 bits from 192 to 384.
*/
public static final String AUTH_HMAC_SHA384 = "hmac(sha384)";
@@ -82,7 +93,8 @@
* SHA512 HMAC Authentication/Integrity Algorithm.
*
* <p>Keys for this algorithm must be 512 bits in length.
- * <p>Valid truncation lengths are multiples of 8 bits from 256 to (default) 512.
+ *
+ * <p>Valid truncation lengths are multiples of 8 bits from 256 to 512.
*/
public static final String AUTH_HMAC_SHA512 = "hmac(sha512)";
@@ -105,6 +117,7 @@
AUTH_HMAC_MD5,
AUTH_HMAC_SHA1,
AUTH_HMAC_SHA256,
+ AUTH_HMAC_SHA384,
AUTH_HMAC_SHA512,
AUTH_CRYPT_AES_GCM
})
@@ -119,11 +132,14 @@
* Creates an IpSecAlgorithm of one of the supported types. Supported algorithm names are
* defined as constants in this class.
*
+ * <p>For algorithms that produce an integrity check value, the truncation length is a required
+ * parameter. See {@link #IpSecAlgorithm(String algorithm, byte[] key, int truncLenBits)}
+ *
* @param algorithm name of the algorithm.
* @param key key padded to a multiple of 8 bits.
*/
- public IpSecAlgorithm(@AlgorithmName String algorithm, @NonNull byte[] key) {
- this(algorithm, key, key.length * 8);
+ public IpSecAlgorithm(@NonNull @AlgorithmName String algorithm, @NonNull byte[] key) {
+ this(algorithm, key, 0);
}
/**
@@ -137,7 +153,8 @@
* @param key key padded to a multiple of 8 bits.
* @param truncLenBits number of bits of output hash to use.
*/
- public IpSecAlgorithm(@AlgorithmName String algorithm, @NonNull byte[] key, int truncLenBits) {
+ public IpSecAlgorithm(
+ @NonNull @AlgorithmName String algorithm, @NonNull byte[] key, int truncLenBits) {
mName = algorithm;
mKey = key.clone();
mTruncLenBits = truncLenBits;
@@ -145,11 +162,13 @@
}
/** Get the algorithm name */
+ @NonNull
public String getName() {
return mName;
}
/** Get the key for this algorithm */
+ @NonNull
public byte[] getKey() {
return mKey.clone();
}
@@ -218,6 +237,7 @@
case AUTH_CRYPT_AES_GCM:
// The keying material for GCM is a key plus a 32-bit salt
isValidLen = keyLen == 128 + 32 || keyLen == 192 + 32 || keyLen == 256 + 32;
+ isValidTruncLen = truncLen == 64 || truncLen == 96 || truncLen == 128;
break;
default:
throw new IllegalArgumentException("Couldn't find an algorithm: " + name);
@@ -263,6 +283,7 @@
}
@Override
+ @NonNull
public String toString() {
return new StringBuilder()
.append("{mName=")
diff --git a/core/java/android/net/IpSecConfig.java b/core/java/android/net/IpSecConfig.java
index 80b0af3..8599f47 100644
--- a/core/java/android/net/IpSecConfig.java
+++ b/core/java/android/net/IpSecConfig.java
@@ -65,6 +65,10 @@
// An interval, in seconds between the NattKeepalive packets
private int mNattKeepaliveInterval;
+ // XFRM mark and mask
+ private int mMarkValue;
+ private int mMarkMask;
+
/** Set the mode for this IPsec transform */
public void setMode(int mode) {
mMode = mode;
@@ -121,6 +125,14 @@
mNattKeepaliveInterval = interval;
}
+ public void setMarkValue(int mark) {
+ mMarkValue = mark;
+ }
+
+ public void setMarkMask(int mask) {
+ mMarkMask = mask;
+ }
+
// Transport or Tunnel
public int getMode() {
return mMode;
@@ -170,6 +182,14 @@
return mNattKeepaliveInterval;
}
+ public int getMarkValue() {
+ return mMarkValue;
+ }
+
+ public int getMarkMask() {
+ return mMarkMask;
+ }
+
// Parcelable Methods
@Override
@@ -191,11 +211,32 @@
out.writeInt(mEncapSocketResourceId);
out.writeInt(mEncapRemotePort);
out.writeInt(mNattKeepaliveInterval);
+ out.writeInt(mMarkValue);
+ out.writeInt(mMarkMask);
}
@VisibleForTesting
public IpSecConfig() {}
+ /** Copy constructor */
+ @VisibleForTesting
+ public IpSecConfig(IpSecConfig c) {
+ mMode = c.mMode;
+ mSourceAddress = c.mSourceAddress;
+ mDestinationAddress = c.mDestinationAddress;
+ mNetwork = c.mNetwork;
+ mSpiResourceId = c.mSpiResourceId;
+ mEncryption = c.mEncryption;
+ mAuthentication = c.mAuthentication;
+ mAuthenticatedEncryption = c.mAuthenticatedEncryption;
+ mEncapType = c.mEncapType;
+ mEncapSocketResourceId = c.mEncapSocketResourceId;
+ mEncapRemotePort = c.mEncapRemotePort;
+ mNattKeepaliveInterval = c.mNattKeepaliveInterval;
+ mMarkValue = c.mMarkValue;
+ mMarkMask = c.mMarkMask;
+ }
+
private IpSecConfig(Parcel in) {
mMode = in.readInt();
mSourceAddress = in.readString();
@@ -212,6 +253,8 @@
mEncapSocketResourceId = in.readInt();
mEncapRemotePort = in.readInt();
mNattKeepaliveInterval = in.readInt();
+ mMarkValue = in.readInt();
+ mMarkMask = in.readInt();
}
@Override
@@ -242,6 +285,10 @@
.append(mAuthentication)
.append(", mAuthenticatedEncryption=")
.append(mAuthenticatedEncryption)
+ .append(", mMarkValue=")
+ .append(mMarkValue)
+ .append(", mMarkMask=")
+ .append(mMarkMask)
.append("}");
return strBuilder.toString();
@@ -275,6 +322,8 @@
&& IpSecAlgorithm.equals(lhs.mEncryption, rhs.mEncryption)
&& IpSecAlgorithm.equals(
lhs.mAuthenticatedEncryption, rhs.mAuthenticatedEncryption)
- && IpSecAlgorithm.equals(lhs.mAuthentication, rhs.mAuthentication));
+ && IpSecAlgorithm.equals(lhs.mAuthentication, rhs.mAuthentication)
+ && lhs.mMarkValue == rhs.mMarkValue
+ && lhs.mMarkMask == rhs.mMarkMask);
}
}
diff --git a/core/java/android/net/IpSecManager.java b/core/java/android/net/IpSecManager.java
index 6125394..1145d5b 100644
--- a/core/java/android/net/IpSecManager.java
+++ b/core/java/android/net/IpSecManager.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
@@ -26,6 +27,9 @@
import android.os.Binder;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
+import android.os.ServiceSpecificException;
+import android.system.ErrnoException;
+import android.system.OsConstants;
import android.util.AndroidException;
import android.util.Log;
@@ -57,14 +61,18 @@
private static final String TAG = "IpSecManager";
/**
- * For direction-specific attributes of an {@link IpSecTransform}, indicates that an attribute
- * applies to traffic towards the host.
+ * Used when applying a transform to direct traffic through an {@link IpSecTransform}
+ * towards the host.
+ *
+ * <p>See {@link #applyTransportModeTransform(Socket, int, IpSecTransform)}.
*/
public static final int DIRECTION_IN = 0;
/**
- * For direction-specific attributes of an {@link IpSecTransform}, indicates that an attribute
- * applies to traffic from the host.
+ * Used when applying a transform to direct traffic through an {@link IpSecTransform}
+ * away from the host.
+ *
+ * <p>See {@link #applyTransportModeTransform(Socket, int, IpSecTransform)}.
*/
public static final int DIRECTION_OUT = 1;
@@ -135,6 +143,7 @@
}
}
+ private final Context mContext;
private final IIpSecService mService;
/**
@@ -167,11 +176,16 @@
public void close() {
try {
mService.releaseSecurityParameterIndex(mResourceId);
- mResourceId = INVALID_RESOURCE_ID;
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
+ } catch (Exception e) {
+ // On close we swallow all random exceptions since failure to close is not
+ // actionable by the user.
+ Log.e(TAG, "Failed to close " + this + ", Exception=" + e);
+ } finally {
+ mResourceId = INVALID_RESOURCE_ID;
+ mCloseGuard.close();
}
- mCloseGuard.close();
}
/** Check that the SPI was closed properly. */
@@ -222,7 +236,6 @@
throw new RuntimeException(
"Invalid Resource ID returned by IpSecService: " + status);
}
-
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -234,6 +247,17 @@
public int getResourceId() {
return mResourceId;
}
+
+ @Override
+ public String toString() {
+ return new StringBuilder()
+ .append("SecurityParameterIndex{spi=")
+ .append(mSpi)
+ .append(",resourceId=")
+ .append(mResourceId)
+ .append("}")
+ .toString();
+ }
}
/**
@@ -248,14 +272,19 @@
* @throws {@link #ResourceUnavailableException} indicating that too many SPIs are
* currently allocated for this user
*/
- public SecurityParameterIndex allocateSecurityParameterIndex(InetAddress destinationAddress)
- throws ResourceUnavailableException {
+ @NonNull
+ public SecurityParameterIndex allocateSecurityParameterIndex(
+ @NonNull InetAddress destinationAddress) throws ResourceUnavailableException {
try {
return new SecurityParameterIndex(
mService,
destinationAddress,
IpSecManager.INVALID_SECURITY_PARAMETER_INDEX);
+ } catch (ServiceSpecificException e) {
+ throw rethrowUncheckedExceptionFromServiceSpecificException(e);
} catch (SpiUnavailableException unlikely) {
+ // Because this function allocates a totally random SPI, it really shouldn't ever
+ // fail to allocate an SPI; we simply need this because the exception is checked.
throw new ResourceUnavailableException("No SPIs available");
}
}
@@ -268,20 +297,26 @@
*
* @param destinationAddress the destination address for traffic bearing the requested SPI.
* For inbound traffic, the destination should be an address currently assigned on-device.
- * @param requestedSpi the requested SPI, or '0' to allocate a random SPI
+ * @param requestedSpi the requested SPI. The range 1-255 is reserved and may not be used. See
+ * RFC 4303 Section 2.1.
* @return the reserved SecurityParameterIndex
* @throws {@link #ResourceUnavailableException} indicating that too many SPIs are
* currently allocated for this user
* @throws {@link #SpiUnavailableException} indicating that the requested SPI could not be
* reserved
*/
+ @NonNull
public SecurityParameterIndex allocateSecurityParameterIndex(
- InetAddress destinationAddress, int requestedSpi)
+ @NonNull InetAddress destinationAddress, int requestedSpi)
throws SpiUnavailableException, ResourceUnavailableException {
if (requestedSpi == IpSecManager.INVALID_SECURITY_PARAMETER_INDEX) {
throw new IllegalArgumentException("Requested SPI must be a valid (non-zero) SPI");
}
- return new SecurityParameterIndex(mService, destinationAddress, requestedSpi);
+ try {
+ return new SecurityParameterIndex(mService, destinationAddress, requestedSpi);
+ } catch (ServiceSpecificException e) {
+ throw rethrowUncheckedExceptionFromServiceSpecificException(e);
+ }
}
/**
@@ -298,22 +333,39 @@
* will throw IOException if the user deactivates the transform (by calling {@link
* IpSecTransform#close()}) without calling {@link #removeTransportModeTransforms}.
*
+ * <p>Note that when applied to TCP sockets, calling {@link IpSecTransform#close()} on an
+ * applied transform before completion of graceful shutdown may result in the shutdown sequence
+ * failing to complete. As such, applications requiring graceful shutdown MUST close the socket
+ * prior to deactivating the applied transform. Socket closure may be performed asynchronously
+ * (in batches), so the returning of a close function does not guarantee shutdown of a socket.
+ * Setting an SO_LINGER timeout results in socket closure being performed synchronously, and is
+ * sufficient to ensure shutdown.
+ *
+ * Specifically, if the transform is deactivated (by calling {@link IpSecTransform#close()}),
+ * prior to the socket being closed, the standard [FIN - FIN/ACK - ACK], or the reset [RST]
+ * packets are dropped due to the lack of a valid Transform. Similarly, if a socket without the
+ * SO_LINGER option set is closed, the delayed/batched FIN packets may be dropped.
+ *
* <h4>Rekey Procedure</h4>
*
- * <p>When applying a new tranform to a socket, the previous transform will be removed. However,
- * inbound traffic on the old transform will continue to be decrypted until that transform is
- * deallocated by calling {@link IpSecTransform#close()}. This overlap allows rekey procedures
- * where both transforms are valid until both endpoints are using the new transform and all
- * in-flight packets have been received.
+ * <p>When applying a new tranform to a socket in the outbound direction, the previous transform
+ * will be removed and the new transform will take effect immediately, sending all traffic on
+ * the new transform; however, when applying a transform in the inbound direction, traffic
+ * on the old transform will continue to be decrypted and delivered until that transform is
+ * deallocated by calling {@link IpSecTransform#close()}. This overlap allows lossless rekey
+ * procedures where both transforms are valid until both endpoints are using the new transform
+ * and all in-flight packets have been received.
*
* @param socket a stream socket
- * @param direction the policy direction either {@link #DIRECTION_IN} or {@link #DIRECTION_OUT}
+ * @param direction the direction in which the transform should be applied
* @param transform a transport mode {@code IpSecTransform}
* @throws IOException indicating that the transform could not be applied
*/
- public void applyTransportModeTransform(
- Socket socket, int direction, IpSecTransform transform)
- throws IOException {
+ public void applyTransportModeTransform(@NonNull Socket socket,
+ @PolicyDirection int direction, @NonNull IpSecTransform transform) throws IOException {
+ // Ensure creation of FD. See b/77548890 for more details.
+ socket.getSoLinger();
+
applyTransportModeTransform(socket.getFileDescriptor$(), direction, transform);
}
@@ -333,19 +385,21 @@
*
* <h4>Rekey Procedure</h4>
*
- * <p>When applying a new tranform to a socket, the previous transform will be removed. However,
- * inbound traffic on the old transform will continue to be decrypted until that transform is
- * deallocated by calling {@link IpSecTransform#close()}. This overlap allows rekey procedures
- * where both transforms are valid until both endpoints are using the new transform and all
- * in-flight packets have been received.
+ * <p>When applying a new tranform to a socket in the outbound direction, the previous transform
+ * will be removed and the new transform will take effect immediately, sending all traffic on
+ * the new transform; however, when applying a transform in the inbound direction, traffic
+ * on the old transform will continue to be decrypted and delivered until that transform is
+ * deallocated by calling {@link IpSecTransform#close()}. This overlap allows lossless rekey
+ * procedures where both transforms are valid until both endpoints are using the new transform
+ * and all in-flight packets have been received.
*
* @param socket a datagram socket
- * @param direction the policy direction either DIRECTION_IN or DIRECTION_OUT
+ * @param direction the direction in which the transform should be applied
* @param transform a transport mode {@code IpSecTransform}
* @throws IOException indicating that the transform could not be applied
*/
- public void applyTransportModeTransform(
- DatagramSocket socket, int direction, IpSecTransform transform) throws IOException {
+ public void applyTransportModeTransform(@NonNull DatagramSocket socket,
+ @PolicyDirection int direction, @NonNull IpSecTransform transform) throws IOException {
applyTransportModeTransform(socket.getFileDescriptor$(), direction, transform);
}
@@ -363,47 +417,48 @@
* will throw IOException if the user deactivates the transform (by calling {@link
* IpSecTransform#close()}) without calling {@link #removeTransportModeTransforms}.
*
+ * <p>Note that when applied to TCP sockets, calling {@link IpSecTransform#close()} on an
+ * applied transform before completion of graceful shutdown may result in the shutdown sequence
+ * failing to complete. As such, applications requiring graceful shutdown MUST close the socket
+ * prior to deactivating the applied transform. Socket closure may be performed asynchronously
+ * (in batches), so the returning of a close function does not guarantee shutdown of a socket.
+ * Setting an SO_LINGER timeout results in socket closure being performed synchronously, and is
+ * sufficient to ensure shutdown.
+ *
+ * Specifically, if the transform is deactivated (by calling {@link IpSecTransform#close()}),
+ * prior to the socket being closed, the standard [FIN - FIN/ACK - ACK], or the reset [RST]
+ * packets are dropped due to the lack of a valid Transform. Similarly, if a socket without the
+ * SO_LINGER option set is closed, the delayed/batched FIN packets may be dropped.
+ *
* <h4>Rekey Procedure</h4>
*
- * <p>When applying a new tranform to a socket, the previous transform will be removed. However,
- * inbound traffic on the old transform will continue to be decrypted until that transform is
- * deallocated by calling {@link IpSecTransform#close()}. This overlap allows rekey procedures
- * where both transforms are valid until both endpoints are using the new transform and all
- * in-flight packets have been received.
+ * <p>When applying a new tranform to a socket in the outbound direction, the previous transform
+ * will be removed and the new transform will take effect immediately, sending all traffic on
+ * the new transform; however, when applying a transform in the inbound direction, traffic
+ * on the old transform will continue to be decrypted and delivered until that transform is
+ * deallocated by calling {@link IpSecTransform#close()}. This overlap allows lossless rekey
+ * procedures where both transforms are valid until both endpoints are using the new transform
+ * and all in-flight packets have been received.
*
* @param socket a socket file descriptor
- * @param direction the policy direction either DIRECTION_IN or DIRECTION_OUT
+ * @param direction the direction in which the transform should be applied
* @param transform a transport mode {@code IpSecTransform}
* @throws IOException indicating that the transform could not be applied
*/
- public void applyTransportModeTransform(
- FileDescriptor socket, int direction, IpSecTransform transform)
- throws IOException {
+ public void applyTransportModeTransform(@NonNull FileDescriptor socket,
+ @PolicyDirection int direction, @NonNull IpSecTransform transform) throws IOException {
// We dup() the FileDescriptor here because if we don't, then the ParcelFileDescriptor()
// constructor takes control and closes the user's FD when we exit the method.
try (ParcelFileDescriptor pfd = ParcelFileDescriptor.dup(socket)) {
mService.applyTransportModeTransform(pfd, direction, transform.getResourceId());
+ } catch (ServiceSpecificException e) {
+ throw rethrowCheckedExceptionFromServiceSpecificException(e);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/**
- * Apply an active Tunnel Mode IPsec Transform to a network, which will tunnel all traffic to
- * and from that network's interface with IPsec (applies an outer IP header and IPsec Header to
- * all traffic, and expects an additional IP header and IPsec Header on all inbound traffic).
- * Applications should probably not use this API directly. Instead, they should use {@link
- * VpnService} to provide VPN capability in a more generic fashion.
- *
- * <p>TODO: Update javadoc for tunnel mode APIs at the same time the APIs are re-worked.
- *
- * @param net a {@link Network} that will be tunneled via IP Sec.
- * @param transform an {@link IpSecTransform}, which must be an active Tunnel Mode transform.
- * @hide
- */
- public void applyTunnelModeTransform(Network net, IpSecTransform transform) {}
-
- /**
* Remove an IPsec transform from a stream socket.
*
* <p>Once removed, traffic on the socket will not be encrypted. Removing transforms from a
@@ -416,8 +471,10 @@
* @param socket a socket that previously had a transform applied to it
* @throws IOException indicating that the transform could not be removed from the socket
*/
- public void removeTransportModeTransforms(Socket socket)
- throws IOException {
+ public void removeTransportModeTransforms(@NonNull Socket socket) throws IOException {
+ // Ensure creation of FD. See b/77548890 for more details.
+ socket.getSoLinger();
+
removeTransportModeTransforms(socket.getFileDescriptor$());
}
@@ -434,8 +491,7 @@
* @param socket a socket that previously had a transform applied to it
* @throws IOException indicating that the transform could not be removed from the socket
*/
- public void removeTransportModeTransforms(DatagramSocket socket)
- throws IOException {
+ public void removeTransportModeTransforms(@NonNull DatagramSocket socket) throws IOException {
removeTransportModeTransforms(socket.getFileDescriptor$());
}
@@ -452,10 +508,11 @@
* @param socket a socket that previously had a transform applied to it
* @throws IOException indicating that the transform could not be removed from the socket
*/
- public void removeTransportModeTransforms(FileDescriptor socket)
- throws IOException {
+ public void removeTransportModeTransforms(@NonNull FileDescriptor socket) throws IOException {
try (ParcelFileDescriptor pfd = ParcelFileDescriptor.dup(socket)) {
mService.removeTransportModeTransforms(pfd);
+ } catch (ServiceSpecificException e) {
+ throw rethrowCheckedExceptionFromServiceSpecificException(e);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -483,7 +540,7 @@
* signalling and UDP encapsulated IPsec traffic. Instances can be obtained by calling {@link
* IpSecManager#openUdpEncapsulationSocket}. The provided socket cannot be re-bound by the
* caller. The caller should not close the {@code FileDescriptor} returned by {@link
- * #getSocket}, but should use {@link #close} instead.
+ * #getFileDescriptor}, but should use {@link #close} instead.
*
* <p>Allowing the user to close or unbind a UDP encapsulation socket could impact the traffic
* of the next user who binds to that port. To prevent this scenario, these sockets are held
@@ -522,8 +579,8 @@
mCloseGuard.open("constructor");
}
- /** Get the wrapped socket. */
- public FileDescriptor getSocket() {
+ /** Get the encapsulation socket's file descriptor. */
+ public FileDescriptor getFileDescriptor() {
if (mPfd == null) {
return null;
}
@@ -549,6 +606,13 @@
mResourceId = INVALID_RESOURCE_ID;
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
+ } catch (Exception e) {
+ // On close we swallow all random exceptions since failure to close is not
+ // actionable by the user.
+ Log.e(TAG, "Failed to close " + this + ", Exception=" + e);
+ } finally {
+ mResourceId = INVALID_RESOURCE_ID;
+ mCloseGuard.close();
}
try {
@@ -557,7 +621,6 @@
Log.e(TAG, "Failed to close UDP Encapsulation Socket with Port= " + mPort);
throw e;
}
- mCloseGuard.close();
}
/** Check that the socket was closed properly. */
@@ -574,6 +637,17 @@
public int getResourceId() {
return mResourceId;
}
+
+ @Override
+ public String toString() {
+ return new StringBuilder()
+ .append("UdpEncapsulationSocket{port=")
+ .append(mPort)
+ .append(",resourceId=")
+ .append(mResourceId)
+ .append("}")
+ .toString();
+ }
};
/**
@@ -591,6 +665,7 @@
// safely usable for Encapsulation without allowing a user to possibly unbind from/close
// the port, which could potentially impact the traffic of the next user who binds to that
// socket.
+ @NonNull
public UdpEncapsulationSocket openUdpEncapsulationSocket(int port)
throws IOException, ResourceUnavailableException {
/*
@@ -600,7 +675,11 @@
if (port == 0) {
throw new IllegalArgumentException("Specified port must be a valid port number!");
}
- return new UdpEncapsulationSocket(mService, port);
+ try {
+ return new UdpEncapsulationSocket(mService, port);
+ } catch (ServiceSpecificException e) {
+ throw rethrowCheckedExceptionFromServiceSpecificException(e);
+ }
}
/**
@@ -620,9 +699,14 @@
// safely usable for Encapsulation without allowing a user to possibly unbind from/close
// the port, which could potentially impact the traffic of the next user who binds to that
// socket.
+ @NonNull
public UdpEncapsulationSocket openUdpEncapsulationSocket()
throws IOException, ResourceUnavailableException {
- return new UdpEncapsulationSocket(mService, 0);
+ try {
+ return new UdpEncapsulationSocket(mService, 0);
+ } catch (ServiceSpecificException e) {
+ throw rethrowCheckedExceptionFromServiceSpecificException(e);
+ }
}
/**
@@ -639,6 +723,7 @@
*/
@SystemApi
public static final class IpSecTunnelInterface implements AutoCloseable {
+ private final String mOpPackageName;
private final IIpSecService mService;
private final InetAddress mRemoteAddress;
private final InetAddress mLocalAddress;
@@ -648,6 +733,7 @@
private int mResourceId = INVALID_RESOURCE_ID;
/** Get the underlying SPI held by this object. */
+ @NonNull
public String getInterfaceName() {
return mInterfaceName;
}
@@ -659,10 +745,20 @@
* tunneled traffic.
*
* @param address the local address for traffic inside the tunnel
- * @throws IOException if the address could not be added
+ * @param prefixLen length of the InetAddress prefix
* @hide
*/
- public void addAddress(LinkAddress address) throws IOException {
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
+ public void addAddress(@NonNull InetAddress address, int prefixLen) throws IOException {
+ try {
+ mService.addAddressToTunnelInterface(
+ mResourceId, new LinkAddress(address, prefixLen), mOpPackageName);
+ } catch (ServiceSpecificException e) {
+ throw rethrowCheckedExceptionFromServiceSpecificException(e);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
}
/**
@@ -671,21 +767,56 @@
* <p>Remove an address which was previously added to the IpSecTunnelInterface
*
* @param address to be removed
- * @throws IOException if the address could not be removed
+ * @param prefixLen length of the InetAddress prefix
* @hide
*/
- public void removeAddress(LinkAddress address) throws IOException {
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
+ public void removeAddress(@NonNull InetAddress address, int prefixLen) throws IOException {
+ try {
+ mService.removeAddressFromTunnelInterface(
+ mResourceId, new LinkAddress(address, prefixLen), mOpPackageName);
+ } catch (ServiceSpecificException e) {
+ throw rethrowCheckedExceptionFromServiceSpecificException(e);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
}
- private IpSecTunnelInterface(@NonNull IIpSecService service,
+ private IpSecTunnelInterface(@NonNull Context ctx, @NonNull IIpSecService service,
@NonNull InetAddress localAddress, @NonNull InetAddress remoteAddress,
@NonNull Network underlyingNetwork)
throws ResourceUnavailableException, IOException {
+ mOpPackageName = ctx.getOpPackageName();
mService = service;
mLocalAddress = localAddress;
mRemoteAddress = remoteAddress;
mUnderlyingNetwork = underlyingNetwork;
- // TODO: Call IpSecService
+
+ try {
+ IpSecTunnelInterfaceResponse result =
+ mService.createTunnelInterface(
+ localAddress.getHostAddress(),
+ remoteAddress.getHostAddress(),
+ underlyingNetwork,
+ new Binder(),
+ mOpPackageName);
+ switch (result.status) {
+ case Status.OK:
+ break;
+ case Status.RESOURCE_UNAVAILABLE:
+ throw new ResourceUnavailableException(
+ "No more tunnel interfaces may be allocated by this requester.");
+ default:
+ throw new RuntimeException(
+ "Unknown status returned by IpSecService: " + result.status);
+ }
+ mResourceId = result.resourceId;
+ mInterfaceName = result.interfaceName;
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ mCloseGuard.open("constructor");
}
/**
@@ -697,13 +828,18 @@
*/
@Override
public void close() {
- // try {
- // TODO: Call IpSecService
- mResourceId = INVALID_RESOURCE_ID;
- // } catch (RemoteException e) {
- // throw e.rethrowFromSystemServer();
- // }
- mCloseGuard.close();
+ try {
+ mService.deleteTunnelInterface(mResourceId, mOpPackageName);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ } catch (Exception e) {
+ // On close we swallow all random exceptions since failure to close is not
+ // actionable by the user.
+ Log.e(TAG, "Failed to close " + this + ", Exception=" + e);
+ } finally {
+ mResourceId = INVALID_RESOURCE_ID;
+ mCloseGuard.close();
+ }
}
/** Check that the Interface was closed properly. */
@@ -714,11 +850,31 @@
}
close();
}
+
+ /** @hide */
+ @VisibleForTesting
+ public int getResourceId() {
+ return mResourceId;
+ }
+
+ @Override
+ public String toString() {
+ return new StringBuilder()
+ .append("IpSecTunnelInterface{ifname=")
+ .append(mInterfaceName)
+ .append(",resourceId=")
+ .append(mResourceId)
+ .append("}")
+ .toString();
+ }
}
/**
* Create a new IpSecTunnelInterface as a local endpoint for tunneled IPsec traffic.
*
+ * <p>An application that creates tunnels is responsible for cleaning up the tunnel when the
+ * underlying network goes away, and the onLost() callback is received.
+ *
* @param localAddress The local addres of the tunnel
* @param remoteAddress The local addres of the tunnel
* @param underlyingNetwork the {@link Network} that will carry traffic for this tunnel.
@@ -729,14 +885,26 @@
* @hide
*/
@SystemApi
+ @NonNull
+ @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
public IpSecTunnelInterface createIpSecTunnelInterface(@NonNull InetAddress localAddress,
@NonNull InetAddress remoteAddress, @NonNull Network underlyingNetwork)
throws ResourceUnavailableException, IOException {
- return new IpSecTunnelInterface(mService, localAddress, remoteAddress, underlyingNetwork);
+ try {
+ return new IpSecTunnelInterface(
+ mContext, mService, localAddress, remoteAddress, underlyingNetwork);
+ } catch (ServiceSpecificException e) {
+ throw rethrowCheckedExceptionFromServiceSpecificException(e);
+ }
}
/**
- * Apply a transform to the IpSecTunnelInterface
+ * Apply an active Tunnel Mode IPsec Transform to a {@link IpSecTunnelInterface}, which will
+ * tunnel all traffic for the given direction through the underlying network's interface with
+ * IPsec (applies an outer IP header and IPsec Header to all traffic, and expects an additional
+ * IP header and IPsec Header on all inbound traffic).
+ * <p>Applications should probably not use this API directly.
+ *
*
* @param tunnel The {@link IpSecManager#IpSecTunnelInterface} that will use the supplied
* transform.
@@ -748,17 +916,68 @@
* @hide
*/
@SystemApi
- public void applyTunnelModeTransform(IpSecTunnelInterface tunnel, int direction,
- IpSecTransform transform) throws IOException {
- // TODO: call IpSecService
+ @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
+ public void applyTunnelModeTransform(@NonNull IpSecTunnelInterface tunnel,
+ @PolicyDirection int direction, @NonNull IpSecTransform transform) throws IOException {
+ try {
+ mService.applyTunnelModeTransform(
+ tunnel.getResourceId(), direction,
+ transform.getResourceId(), mContext.getOpPackageName());
+ } catch (ServiceSpecificException e) {
+ throw rethrowCheckedExceptionFromServiceSpecificException(e);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
}
+
/**
* Construct an instance of IpSecManager within an application context.
*
* @param context the application context for this manager
* @hide
*/
- public IpSecManager(IIpSecService service) {
+ public IpSecManager(Context ctx, IIpSecService service) {
+ mContext = ctx;
mService = checkNotNull(service, "missing service");
}
+
+ private static void maybeHandleServiceSpecificException(ServiceSpecificException sse) {
+ // OsConstants are late binding, so switch statements can't be used.
+ if (sse.errorCode == OsConstants.EINVAL) {
+ throw new IllegalArgumentException(sse);
+ } else if (sse.errorCode == OsConstants.EAGAIN) {
+ throw new IllegalStateException(sse);
+ } else if (sse.errorCode == OsConstants.EOPNOTSUPP) {
+ throw new UnsupportedOperationException(sse);
+ }
+ }
+
+ /**
+ * Convert an Errno SSE to the correct Unchecked exception type.
+ *
+ * This method never actually returns.
+ */
+ // package
+ static RuntimeException
+ rethrowUncheckedExceptionFromServiceSpecificException(ServiceSpecificException sse) {
+ maybeHandleServiceSpecificException(sse);
+ throw new RuntimeException(sse);
+ }
+
+ /**
+ * Convert an Errno SSE to the correct Checked or Unchecked exception type.
+ *
+ * This method may throw IOException, or it may throw an unchecked exception; it will never
+ * actually return.
+ */
+ // package
+ static IOException rethrowCheckedExceptionFromServiceSpecificException(
+ ServiceSpecificException sse) throws IOException {
+ // First see if this is an unchecked exception of a type we know.
+ // If so, then we prefer the unchecked (specific) type of exception.
+ maybeHandleServiceSpecificException(sse);
+ // If not, then all we can do is provide the SSE in the form of an IOException.
+ throw new ErrnoException(
+ "IpSec encountered errno=" + sse.errorCode, sse.errorCode).rethrowAsIOException();
+ }
}
diff --git a/core/java/android/net/IpSecTransform.java b/core/java/android/net/IpSecTransform.java
index 37e2c4f..23c8aa3 100644
--- a/core/java/android/net/IpSecTransform.java
+++ b/core/java/android/net/IpSecTransform.java
@@ -17,14 +17,19 @@
import static android.net.IpSecManager.INVALID_RESOURCE_ID;
+import static com.android.internal.util.Preconditions.checkNotNull;
+
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.content.Context;
import android.os.Binder;
+import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.ServiceSpecificException;
import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
@@ -80,9 +85,11 @@
@Retention(RetentionPolicy.SOURCE)
public @interface EncapType {}
- private IpSecTransform(Context context, IpSecConfig config) {
+ /** @hide */
+ @VisibleForTesting
+ public IpSecTransform(Context context, IpSecConfig config) {
mContext = context;
- mConfig = config;
+ mConfig = new IpSecConfig(config);
mResourceId = INVALID_RESOURCE_ID;
}
@@ -124,19 +131,15 @@
synchronized (this) {
try {
IIpSecService svc = getIpSecService();
- IpSecTransformResponse result = svc.createTransform(mConfig, new Binder());
+ IpSecTransformResponse result = svc.createTransform(
+ mConfig, new Binder(), mContext.getOpPackageName());
int status = result.status;
checkResultStatus(status);
mResourceId = result.resourceId;
-
- /* Keepalive will silently fail if not needed by the config; but, if needed and
- * it fails to start, we need to bail because a transform will not be reliable
- * to use if keepalive is expected to offload and fails.
- */
- // FIXME: if keepalive fails, we need to fail spectacularly
- startKeepalive(mContext);
Log.d(TAG, "Added Transform with Id " + mResourceId);
mCloseGuard.open("build");
+ } catch (ServiceSpecificException e) {
+ throw IpSecManager.rethrowUncheckedExceptionFromServiceSpecificException(e);
} catch (RemoteException e) {
throw e.rethrowAsRuntimeException();
}
@@ -146,6 +149,18 @@
}
/**
+ * Equals method used for testing
+ *
+ * @hide
+ */
+ @VisibleForTesting
+ public static boolean equals(IpSecTransform lhs, IpSecTransform rhs) {
+ if (lhs == null || rhs == null) return (lhs == rhs);
+ return IpSecConfig.equals(lhs.getConfig(), rhs.getConfig())
+ && lhs.mResourceId == rhs.mResourceId;
+ }
+
+ /**
* Deactivate this {@code IpSecTransform} and free allocated resources.
*
* <p>Deactivating a transform while it is still applied to a socket will result in errors on
@@ -164,15 +179,15 @@
return;
}
try {
- /* Order matters here because the keepalive is best-effort but could fail in some
- * horrible way to be removed if the wifi (or cell) subsystem has crashed, and we
- * still want to clear out the transform.
- */
IIpSecService svc = getIpSecService();
svc.deleteTransform(mResourceId);
- stopKeepalive();
+ stopNattKeepalive();
} catch (RemoteException e) {
throw e.rethrowAsRuntimeException();
+ } catch (Exception e) {
+ // On close we swallow all random exceptions since failure to close is not
+ // actionable by the user.
+ Log.e(TAG, "Failed to close " + this + ", Exception=" + e);
} finally {
mResourceId = INVALID_RESOURCE_ID;
mCloseGuard.close();
@@ -198,42 +213,35 @@
private final Context mContext;
private final CloseGuard mCloseGuard = CloseGuard.get();
private ConnectivityManager.PacketKeepalive mKeepalive;
- private int mKeepaliveStatus = ConnectivityManager.PacketKeepalive.NO_KEEPALIVE;
- private Object mKeepaliveSyncLock = new Object();
- private ConnectivityManager.PacketKeepaliveCallback mKeepaliveCallback =
+ private Handler mCallbackHandler;
+ private final ConnectivityManager.PacketKeepaliveCallback mKeepaliveCallback =
new ConnectivityManager.PacketKeepaliveCallback() {
@Override
public void onStarted() {
- synchronized (mKeepaliveSyncLock) {
- mKeepaliveStatus = ConnectivityManager.PacketKeepalive.SUCCESS;
- mKeepaliveSyncLock.notifyAll();
+ synchronized (this) {
+ mCallbackHandler.post(() -> mUserKeepaliveCallback.onStarted());
}
}
@Override
public void onStopped() {
- synchronized (mKeepaliveSyncLock) {
- mKeepaliveStatus = ConnectivityManager.PacketKeepalive.NO_KEEPALIVE;
- mKeepaliveSyncLock.notifyAll();
+ synchronized (this) {
+ mKeepalive = null;
+ mCallbackHandler.post(() -> mUserKeepaliveCallback.onStopped());
}
}
@Override
public void onError(int error) {
- synchronized (mKeepaliveSyncLock) {
- mKeepaliveStatus = error;
- mKeepaliveSyncLock.notifyAll();
+ synchronized (this) {
+ mKeepalive = null;
+ mCallbackHandler.post(() -> mUserKeepaliveCallback.onError(error));
}
}
};
- /* Package */
- void startKeepalive(Context c) {
- if (mConfig.getNattKeepaliveInterval() != 0) {
- Log.wtf(TAG, "Keepalive not yet supported.");
- }
- }
+ private NattKeepaliveCallback mUserKeepaliveCallback;
/** @hide */
@VisibleForTesting
@@ -241,9 +249,101 @@
return mResourceId;
}
- /* Package */
- void stopKeepalive() {
- return;
+ /**
+ * A callback class to provide status information regarding a NAT-T keepalive session
+ *
+ * <p>Use this callback to receive status information regarding a NAT-T keepalive session
+ * by registering it when calling {@link #startNattKeepalive}.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static class NattKeepaliveCallback {
+ /** The specified {@code Network} is not connected. */
+ public static final int ERROR_INVALID_NETWORK = 1;
+ /** The hardware does not support this request. */
+ public static final int ERROR_HARDWARE_UNSUPPORTED = 2;
+ /** The hardware returned an error. */
+ public static final int ERROR_HARDWARE_ERROR = 3;
+
+ /** The requested keepalive was successfully started. */
+ public void onStarted() {}
+ /** The keepalive was successfully stopped. */
+ public void onStopped() {}
+ /** An error occurred. */
+ public void onError(int error) {}
+ }
+
+ /**
+ * Start a NAT-T keepalive session for the current transform.
+ *
+ * For a transform that is using UDP encapsulated IPv4, NAT-T offloading provides
+ * a power efficient mechanism of sending NAT-T packets at a specified interval.
+ *
+ * @param userCallback a {@link #NattKeepaliveCallback} to receive asynchronous status
+ * information about the requested NAT-T keepalive session.
+ * @param intervalSeconds the interval between NAT-T keepalives being sent. The
+ * the allowed range is between 20 and 3600 seconds.
+ * @param handler a handler on which to post callbacks when received.
+ *
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(anyOf = {
+ android.Manifest.permission.MANAGE_IPSEC_TUNNELS,
+ android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD
+ })
+ public void startNattKeepalive(@NonNull NattKeepaliveCallback userCallback,
+ int intervalSeconds, @NonNull Handler handler) throws IOException {
+ checkNotNull(userCallback);
+ if (intervalSeconds < 20 || intervalSeconds > 3600) {
+ throw new IllegalArgumentException("Invalid NAT-T keepalive interval");
+ }
+ checkNotNull(handler);
+ if (mResourceId == INVALID_RESOURCE_ID) {
+ throw new IllegalStateException(
+ "Packet keepalive cannot be started for an inactive transform");
+ }
+
+ synchronized (mKeepaliveCallback) {
+ if (mKeepaliveCallback != null) {
+ throw new IllegalStateException("Keepalive already active");
+ }
+
+ mUserKeepaliveCallback = userCallback;
+ ConnectivityManager cm = (ConnectivityManager) mContext.getSystemService(
+ Context.CONNECTIVITY_SERVICE);
+ mKeepalive = cm.startNattKeepalive(
+ mConfig.getNetwork(), intervalSeconds, mKeepaliveCallback,
+ NetworkUtils.numericToInetAddress(mConfig.getSourceAddress()),
+ 4500, // FIXME urgently, we need to get the port number from the Encap socket
+ NetworkUtils.numericToInetAddress(mConfig.getDestinationAddress()));
+ mCallbackHandler = handler;
+ }
+ }
+
+ /**
+ * Stop an ongoing NAT-T keepalive session.
+ *
+ * Calling this API will request that an ongoing NAT-T keepalive session be terminated.
+ * If this API is not called when a Transform is closed, the underlying NAT-T session will
+ * be terminated automatically.
+ *
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(anyOf = {
+ android.Manifest.permission.MANAGE_IPSEC_TUNNELS,
+ android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD
+ })
+ public void stopNattKeepalive() {
+ synchronized (mKeepaliveCallback) {
+ if (mKeepalive == null) {
+ Log.e(TAG, "No active keepalive to stop");
+ return;
+ }
+ mKeepalive.stop();
+ }
}
/** This class is used to build {@link IpSecTransform} objects. */
@@ -258,6 +358,7 @@
*
* @param algo {@link IpSecAlgorithm} specifying the encryption to be applied.
*/
+ @NonNull
public IpSecTransform.Builder setEncryption(@NonNull IpSecAlgorithm algo) {
// TODO: throw IllegalArgumentException if algo is not an encryption algorithm.
Preconditions.checkNotNull(algo);
@@ -272,6 +373,7 @@
*
* @param algo {@link IpSecAlgorithm} specifying the authentication to be applied.
*/
+ @NonNull
public IpSecTransform.Builder setAuthentication(@NonNull IpSecAlgorithm algo) {
// TODO: throw IllegalArgumentException if algo is not an authentication algorithm.
Preconditions.checkNotNull(algo);
@@ -292,6 +394,7 @@
* @param algo {@link IpSecAlgorithm} specifying the authenticated encryption algorithm to
* be applied.
*/
+ @NonNull
public IpSecTransform.Builder setAuthenticatedEncryption(@NonNull IpSecAlgorithm algo) {
Preconditions.checkNotNull(algo);
mConfig.setAuthenticatedEncryption(algo);
@@ -311,6 +414,7 @@
* @param remotePort the UDP port number of the remote host that will send and receive
* encapsulated traffic. In the case of IKEv2, this should be port 4500.
*/
+ @NonNull
public IpSecTransform.Builder setIpv4Encapsulation(
@NonNull IpSecManager.UdpEncapsulationSocket localSocket, int remotePort) {
Preconditions.checkNotNull(localSocket);
@@ -323,26 +427,6 @@
return this;
}
- // TODO: Decrease the minimum keepalive to maybe 10?
- // TODO: Probably a better exception to throw for NATTKeepalive failure
- // TODO: Specify the needed NATT keepalive permission.
- /**
- * Set NAT-T keepalives to be sent with a given interval.
- *
- * <p>This will set power-efficient keepalive packets to be sent by the system. If NAT-T
- * keepalive is requested but cannot be activated, then creation of an {@link
- * IpSecTransform} will fail when calling the build method.
- *
- * @param intervalSeconds the maximum number of seconds between keepalive packets. Must be
- * between 20s and 3600s.
- * @hide
- */
- @SystemApi
- public IpSecTransform.Builder setNattKeepalive(int intervalSeconds) {
- mConfig.setNattKeepaliveInterval(intervalSeconds);
- return this;
- }
-
/**
* Build a transport mode {@link IpSecTransform}.
*
@@ -364,6 +448,7 @@
* collides with an existing transform
* @throws IOException indicating other errors
*/
+ @NonNull
public IpSecTransform buildTransportModeTransform(
@NonNull InetAddress sourceAddress,
@NonNull IpSecManager.SecurityParameterIndex spi)
@@ -400,6 +485,8 @@
* @hide
*/
@SystemApi
+ @NonNull
+ @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
public IpSecTransform buildTunnelModeTransform(
@NonNull InetAddress sourceAddress,
@NonNull IpSecManager.SecurityParameterIndex spi)
@@ -413,7 +500,7 @@
mConfig.setMode(MODE_TUNNEL);
mConfig.setSourceAddress(sourceAddress.getHostAddress());
mConfig.setSpiResourceId(spi.getResourceId());
- return new IpSecTransform(mContext, mConfig);
+ return new IpSecTransform(mContext, mConfig).activate();
}
/**
@@ -427,4 +514,13 @@
mConfig = new IpSecConfig();
}
}
+
+ @Override
+ public String toString() {
+ return new StringBuilder()
+ .append("IpSecTransform{resourceId=")
+ .append(mResourceId)
+ .append("}")
+ .toString();
+ }
}
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl b/core/java/android/net/IpSecTunnelInterfaceResponse.aidl
similarity index 80%
copy from telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
copy to core/java/android/net/IpSecTunnelInterfaceResponse.aidl
index d648a35..7239221 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
+++ b/core/java/android/net/IpSecTunnelInterfaceResponse.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -14,6 +14,7 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.net;
-parcelable ImsStreamMediaProfile;
+/** @hide */
+parcelable IpSecTunnelInterfaceResponse;
diff --git a/core/java/android/net/IpSecTunnelInterfaceResponse.java b/core/java/android/net/IpSecTunnelInterfaceResponse.java
new file mode 100644
index 0000000..c23d831
--- /dev/null
+++ b/core/java/android/net/IpSecTunnelInterfaceResponse.java
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+package android.net;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * This class is used to return an IpSecTunnelInterface resource Id and and corresponding status
+ * from the IpSecService to an IpSecTunnelInterface object.
+ *
+ * @hide
+ */
+public final class IpSecTunnelInterfaceResponse implements Parcelable {
+ private static final String TAG = "IpSecTunnelInterfaceResponse";
+
+ public final int resourceId;
+ public final String interfaceName;
+ public final int status;
+ // Parcelable Methods
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(status);
+ out.writeInt(resourceId);
+ out.writeString(interfaceName);
+ }
+
+ public IpSecTunnelInterfaceResponse(int inStatus) {
+ if (inStatus == IpSecManager.Status.OK) {
+ throw new IllegalArgumentException("Valid status implies other args must be provided");
+ }
+ status = inStatus;
+ resourceId = IpSecManager.INVALID_RESOURCE_ID;
+ interfaceName = "";
+ }
+
+ public IpSecTunnelInterfaceResponse(int inStatus, int inResourceId, String inInterfaceName) {
+ status = inStatus;
+ resourceId = inResourceId;
+ interfaceName = inInterfaceName;
+ }
+
+ private IpSecTunnelInterfaceResponse(Parcel in) {
+ status = in.readInt();
+ resourceId = in.readInt();
+ interfaceName = in.readString();
+ }
+
+ public static final Parcelable.Creator<IpSecTunnelInterfaceResponse> CREATOR =
+ new Parcelable.Creator<IpSecTunnelInterfaceResponse>() {
+ public IpSecTunnelInterfaceResponse createFromParcel(Parcel in) {
+ return new IpSecTunnelInterfaceResponse(in);
+ }
+
+ public IpSecTunnelInterfaceResponse[] newArray(int size) {
+ return new IpSecTunnelInterfaceResponse[size];
+ }
+ };
+}
diff --git a/telephony/java/com/android/ims/ImsConferenceState.aidl b/core/java/android/net/KeepalivePacketData.aidl
similarity index 83%
copy from telephony/java/com/android/ims/ImsConferenceState.aidl
copy to core/java/android/net/KeepalivePacketData.aidl
index 2fc029f..d456b53 100644
--- a/telephony/java/com/android/ims/ImsConferenceState.aidl
+++ b/core/java/android/net/KeepalivePacketData.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.net;
-parcelable ImsConferenceState;
+parcelable KeepalivePacketData;
diff --git a/services/core/java/com/android/server/connectivity/KeepalivePacketData.java b/core/java/android/net/KeepalivePacketData.java
similarity index 64%
rename from services/core/java/com/android/server/connectivity/KeepalivePacketData.java
rename to core/java/android/net/KeepalivePacketData.java
index 2ccfdd1..7436ad0 100644
--- a/services/core/java/com/android/server/connectivity/KeepalivePacketData.java
+++ b/core/java/android/net/KeepalivePacketData.java
@@ -14,30 +14,29 @@
* limitations under the License.
*/
-package com.android.server.connectivity;
+package android.net;
-import android.system.OsConstants;
-import android.net.ConnectivityManager;
-import android.net.NetworkUtils;
+import static android.net.ConnectivityManager.PacketKeepalive.*;
+
import android.net.util.IpUtils;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.system.OsConstants;
+import android.util.Log;
import java.net.Inet4Address;
-import java.net.Inet6Address;
import java.net.InetAddress;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
-import static android.net.ConnectivityManager.PacketKeepalive.*;
-
/**
* Represents the actual packets that are sent by the
* {@link android.net.ConnectivityManager.PacketKeepalive} API.
*
* @hide
*/
-public class KeepalivePacketData {
- /** Protocol of the packet to send; one of the OsConstants.ETH_P_* values. */
- public final int protocol;
+public class KeepalivePacketData implements Parcelable {
+ private static final String TAG = "KeepalivePacketData";
/** Source IP address */
public final InetAddress srcAddress;
@@ -51,57 +50,50 @@
/** Destination port */
public final int dstPort;
- /** Destination MAC address. Can change if routing changes. */
- public byte[] dstMac;
-
/** Packet data. A raw byte string of packet data, not including the link-layer header. */
- public final byte[] data;
+ private final byte[] mPacket;
private static final int IPV4_HEADER_LENGTH = 20;
private static final int UDP_HEADER_LENGTH = 8;
+ // This should only be constructed via static factory methods, such as
+ // nattKeepalivePacket
protected KeepalivePacketData(InetAddress srcAddress, int srcPort,
InetAddress dstAddress, int dstPort, byte[] data) throws InvalidPacketException {
this.srcAddress = srcAddress;
this.dstAddress = dstAddress;
this.srcPort = srcPort;
this.dstPort = dstPort;
- this.data = data;
+ this.mPacket = data;
// Check we have two IP addresses of the same family.
- if (srcAddress == null || dstAddress == null ||
- !srcAddress.getClass().getName().equals(dstAddress.getClass().getName())) {
- throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
- }
-
- // Set the protocol.
- if (this.dstAddress instanceof Inet4Address) {
- this.protocol = OsConstants.ETH_P_IP;
- } else if (this.dstAddress instanceof Inet6Address) {
- this.protocol = OsConstants.ETH_P_IPV6;
- } else {
+ if (srcAddress == null || dstAddress == null || !srcAddress.getClass().getName()
+ .equals(dstAddress.getClass().getName())) {
+ Log.e(TAG, "Invalid or mismatched InetAddresses in KeepalivePacketData");
throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
}
// Check the ports.
if (!IpUtils.isValidUdpOrTcpPort(srcPort) || !IpUtils.isValidUdpOrTcpPort(dstPort)) {
+ Log.e(TAG, "Invalid ports in KeepalivePacketData");
throw new InvalidPacketException(ERROR_INVALID_PORT);
}
}
public static class InvalidPacketException extends Exception {
- final public int error;
+ public final int error;
public InvalidPacketException(int error) {
this.error = error;
}
}
- /**
- * Creates an IPsec NAT-T keepalive packet with the specified parameters.
- */
+ public byte[] getPacket() {
+ return mPacket.clone();
+ }
+
public static KeepalivePacketData nattKeepalivePacket(
- InetAddress srcAddress, int srcPort,
- InetAddress dstAddress, int dstPort) throws InvalidPacketException {
+ InetAddress srcAddress, int srcPort, InetAddress dstAddress, int dstPort)
+ throws InvalidPacketException {
if (!(srcAddress instanceof Inet4Address) || !(dstAddress instanceof Inet4Address)) {
throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
@@ -134,4 +126,39 @@
return new KeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, buf.array());
}
+
+ /* Parcelable Implementation */
+ public int describeContents() {
+ return 0;
+ }
+
+ /** Write to parcel */
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeString(srcAddress.getHostAddress());
+ out.writeString(dstAddress.getHostAddress());
+ out.writeInt(srcPort);
+ out.writeInt(dstPort);
+ out.writeByteArray(mPacket);
+ }
+
+ private KeepalivePacketData(Parcel in) {
+ srcAddress = NetworkUtils.numericToInetAddress(in.readString());
+ dstAddress = NetworkUtils.numericToInetAddress(in.readString());
+ srcPort = in.readInt();
+ dstPort = in.readInt();
+ mPacket = in.createByteArray();
+ }
+
+ /** Parcelable Creator */
+ public static final Parcelable.Creator<KeepalivePacketData> CREATOR =
+ new Parcelable.Creator<KeepalivePacketData>() {
+ public KeepalivePacketData createFromParcel(Parcel in) {
+ return new KeepalivePacketData(in);
+ }
+
+ public KeepalivePacketData[] newArray(int size) {
+ return new KeepalivePacketData[size];
+ }
+ };
+
}
diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java
index f525b1f..bd2db92 100644
--- a/core/java/android/net/LinkProperties.java
+++ b/core/java/android/net/LinkProperties.java
@@ -32,6 +32,7 @@
import java.util.Hashtable;
import java.util.List;
import java.util.Objects;
+import java.util.StringJoiner;
/**
* Describes the properties of a network link.
@@ -48,12 +49,13 @@
public final class LinkProperties implements Parcelable {
// The interface described by the network link.
private String mIfaceName;
- private ArrayList<LinkAddress> mLinkAddresses = new ArrayList<LinkAddress>();
- private ArrayList<InetAddress> mDnses = new ArrayList<InetAddress>();
+ private ArrayList<LinkAddress> mLinkAddresses = new ArrayList<>();
+ private ArrayList<InetAddress> mDnses = new ArrayList<>();
+ private ArrayList<InetAddress> mValidatedPrivateDnses = new ArrayList<>();
private boolean mUsePrivateDns;
private String mPrivateDnsServerName;
private String mDomains;
- private ArrayList<RouteInfo> mRoutes = new ArrayList<RouteInfo>();
+ private ArrayList<RouteInfo> mRoutes = new ArrayList<>();
private ProxyInfo mHttpProxy;
private int mMtu;
// in the format "rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max"
@@ -65,15 +67,14 @@
// Stores the properties of links that are "stacked" above this link.
// Indexed by interface name to allow modification and to prevent duplicates being added.
- private Hashtable<String, LinkProperties> mStackedLinks =
- new Hashtable<String, LinkProperties>();
+ private Hashtable<String, LinkProperties> mStackedLinks = new Hashtable<>();
/**
* @hide
*/
public static class CompareResult<T> {
- public final List<T> removed = new ArrayList<T>();
- public final List<T> added = new ArrayList<T>();
+ public final List<T> removed = new ArrayList<>();
+ public final List<T> added = new ArrayList<>();
public CompareResult() {}
@@ -92,12 +93,9 @@
@Override
public String toString() {
- String retVal = "removed=[";
- for (T addr : removed) retVal += addr.toString() + ",";
- retVal += "] added=[";
- for (T addr : added) retVal += addr.toString() + ",";
- retVal += "]";
- return retVal;
+ return "removed=[" + TextUtils.join(",", removed)
+ + "] added=[" + TextUtils.join(",", added)
+ + "]";
}
}
@@ -119,7 +117,7 @@
public static ProvisioningChange compareProvisioning(
LinkProperties before, LinkProperties after) {
if (before.isProvisioned() && after.isProvisioned()) {
- // On dualstack networks, DHCPv4 renewals can occasionally fail.
+ // On dual-stack networks, DHCPv4 renewals can occasionally fail.
// When this happens, IPv6-reachable services continue to function
// normally but IPv4-only services (naturally) fail.
//
@@ -130,7 +128,7 @@
//
// For users, this is confusing and unexpected behaviour, and is
// not necessarily easy to diagnose. Therefore, we treat changing
- // from a dualstack network to an IPv6-only network equivalent to
+ // from a dual-stack network to an IPv6-only network equivalent to
// a total loss of provisioning.
//
// For one such example of this, see b/18867306.
@@ -138,7 +136,7 @@
// Additionally, losing IPv6 provisioning can result in TCP
// connections getting stuck until timeouts fire and other
// baffling failures. Therefore, loss of either IPv4 or IPv6 on a
- // previously dualstack network is deemed a lost of provisioning.
+ // previously dual-stack network is deemed a lost of provisioning.
if ((before.isIPv4Provisioned() && !after.isIPv4Provisioned()) ||
(before.isIPv6Provisioned() && !after.isIPv6Provisioned())) {
return ProvisioningChange.LOST_PROVISIONING;
@@ -164,19 +162,19 @@
*/
public LinkProperties(LinkProperties source) {
if (source != null) {
- mIfaceName = source.getInterfaceName();
- for (LinkAddress l : source.getLinkAddresses()) mLinkAddresses.add(l);
- for (InetAddress i : source.getDnsServers()) mDnses.add(i);
+ mIfaceName = source.mIfaceName;
+ mLinkAddresses.addAll(source.mLinkAddresses);
+ mDnses.addAll(source.mDnses);
+ mValidatedPrivateDnses.addAll(source.mValidatedPrivateDnses);
mUsePrivateDns = source.mUsePrivateDns;
mPrivateDnsServerName = source.mPrivateDnsServerName;
- mDomains = source.getDomains();
- for (RouteInfo r : source.getRoutes()) mRoutes.add(r);
- mHttpProxy = (source.getHttpProxy() == null) ?
- null : new ProxyInfo(source.getHttpProxy());
+ mDomains = source.mDomains;
+ mRoutes.addAll(source.mRoutes);
+ mHttpProxy = (source.mHttpProxy == null) ? null : new ProxyInfo(source.mHttpProxy);
for (LinkProperties l: source.mStackedLinks.values()) {
addStackedLink(l);
}
- setMtu(source.getMtu());
+ setMtu(source.mMtu);
mTcpBufferSizes = source.mTcpBufferSizes;
}
}
@@ -190,7 +188,7 @@
*/
public void setInterfaceName(String iface) {
mIfaceName = iface;
- ArrayList<RouteInfo> newRoutes = new ArrayList<RouteInfo>(mRoutes.size());
+ ArrayList<RouteInfo> newRoutes = new ArrayList<>(mRoutes.size());
for (RouteInfo route : mRoutes) {
newRoutes.add(routeWithInterface(route));
}
@@ -210,8 +208,8 @@
* @hide
*/
public List<String> getAllInterfaceNames() {
- List<String> interfaceNames = new ArrayList<String>(mStackedLinks.size() + 1);
- if (mIfaceName != null) interfaceNames.add(new String(mIfaceName));
+ List<String> interfaceNames = new ArrayList<>(mStackedLinks.size() + 1);
+ if (mIfaceName != null) interfaceNames.add(mIfaceName);
for (LinkProperties stacked: mStackedLinks.values()) {
interfaceNames.addAll(stacked.getAllInterfaceNames());
}
@@ -225,11 +223,11 @@
* prefix lengths for each address. This is a simplified utility alternative to
* {@link LinkProperties#getLinkAddresses}.
*
- * @return An umodifiable {@link List} of {@link InetAddress} for this link.
+ * @return An unmodifiable {@link List} of {@link InetAddress} for this link.
* @hide
*/
public List<InetAddress> getAddresses() {
- List<InetAddress> addresses = new ArrayList<InetAddress>();
+ List<InetAddress> addresses = new ArrayList<>();
for (LinkAddress linkAddress : mLinkAddresses) {
addresses.add(linkAddress.getAddress());
}
@@ -241,7 +239,7 @@
* @hide
*/
public List<InetAddress> getAllAddresses() {
- List<InetAddress> addresses = new ArrayList<InetAddress>();
+ List<InetAddress> addresses = new ArrayList<>();
for (LinkAddress linkAddress : mLinkAddresses) {
addresses.add(linkAddress.getAddress());
}
@@ -318,8 +316,7 @@
* @hide
*/
public List<LinkAddress> getAllLinkAddresses() {
- List<LinkAddress> addresses = new ArrayList<LinkAddress>();
- addresses.addAll(mLinkAddresses);
+ List<LinkAddress> addresses = new ArrayList<>(mLinkAddresses);
for (LinkProperties stacked: mStackedLinks.values()) {
addresses.addAll(stacked.getAllLinkAddresses());
}
@@ -374,7 +371,7 @@
* Replaces the DNS servers in this {@code LinkProperties} with
* the given {@link Collection} of {@link InetAddress} objects.
*
- * @param addresses The {@link Collection} of DNS servers to set in this object.
+ * @param dnsServers The {@link Collection} of DNS servers to set in this object.
* @hide
*/
public void setDnsServers(Collection<InetAddress> dnsServers) {
@@ -387,7 +384,7 @@
/**
* Returns all the {@link InetAddress} for DNS servers on this link.
*
- * @return An umodifiable {@link List} of {@link InetAddress} for DNS servers on
+ * @return An unmodifiable {@link List} of {@link InetAddress} for DNS servers on
* this link.
*/
public List<InetAddress> getDnsServers() {
@@ -448,6 +445,65 @@
}
/**
+ * Adds the given {@link InetAddress} to the list of validated private DNS servers,
+ * if not present. This is distinct from the server name in that these are actually
+ * resolved addresses.
+ *
+ * @param dnsServer The {@link InetAddress} to add to the list of validated private DNS servers.
+ * @return true if the DNS server was added, false if it was already present.
+ * @hide
+ */
+ public boolean addValidatedPrivateDnsServer(InetAddress dnsServer) {
+ if (dnsServer != null && !mValidatedPrivateDnses.contains(dnsServer)) {
+ mValidatedPrivateDnses.add(dnsServer);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Removes the given {@link InetAddress} from the list of validated private DNS servers.
+ *
+ * @param dnsServer The {@link InetAddress} to remove from the list of validated private DNS
+ * servers.
+ * @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;
+ }
+
+ /**
+ * Replaces the validated private DNS servers in this {@code LinkProperties} with
+ * the given {@link Collection} of {@link InetAddress} objects.
+ *
+ * @param dnsServers The {@link Collection} of validated private DNS servers to set in this
+ * object.
+ * @hide
+ */
+ public void setValidatedPrivateDnsServers(Collection<InetAddress> dnsServers) {
+ mValidatedPrivateDnses.clear();
+ for (InetAddress dnsServer: dnsServers) {
+ addValidatedPrivateDnsServer(dnsServer);
+ }
+ }
+
+ /**
+ * 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
+ * DNS servers on this link.
+ * @hide
+ */
+ public List<InetAddress> getValidatedPrivateDnsServers() {
+ return Collections.unmodifiableList(mValidatedPrivateDnses);
+ }
+
+ /**
* Sets the DNS domain search path used on this link.
*
* @param domains A {@link String} listing in priority order the comma separated
@@ -580,7 +636,7 @@
* @hide
*/
public void ensureDirectlyConnectedRoutes() {
- for (LinkAddress addr: mLinkAddresses) {
+ for (LinkAddress addr : mLinkAddresses) {
addRoute(new RouteInfo(addr, null, mIfaceName));
}
}
@@ -590,8 +646,7 @@
* @hide
*/
public List<RouteInfo> getAllRoutes() {
- List<RouteInfo> routes = new ArrayList<>();
- routes.addAll(mRoutes);
+ List<RouteInfo> routes = new ArrayList<>(mRoutes);
for (LinkProperties stacked: mStackedLinks.values()) {
routes.addAll(stacked.getAllRoutes());
}
@@ -622,7 +677,7 @@
/**
* Adds a stacked link.
*
- * If there is already a stacked link with the same interfacename as link,
+ * 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.
*
@@ -662,9 +717,9 @@
*/
public @NonNull List<LinkProperties> getStackedLinks() {
if (mStackedLinks.isEmpty()) {
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
- List<LinkProperties> stacked = new ArrayList<LinkProperties>();
+ List<LinkProperties> stacked = new ArrayList<>();
for (LinkProperties link : mStackedLinks.values()) {
stacked.add(new LinkProperties(link));
}
@@ -698,48 +753,76 @@
@Override
public String toString() {
- String ifaceName = (mIfaceName == null ? "" : "InterfaceName: " + mIfaceName + " ");
+ // Space as a separator, so no need for spaces at start/end of the individual fragments.
+ final StringJoiner resultJoiner = new StringJoiner(" ", "{", "}");
- String linkAddresses = "LinkAddresses: [";
- for (LinkAddress addr : mLinkAddresses) linkAddresses += addr.toString() + ",";
- linkAddresses += "] ";
-
- String dns = "DnsAddresses: [";
- for (InetAddress addr : mDnses) dns += addr.getHostAddress() + ",";
- dns += "] ";
-
- String usePrivateDns = "UsePrivateDns: " + mUsePrivateDns + " ";
-
- String privateDnsServerName = "";
- if (privateDnsServerName != null) {
- privateDnsServerName = "PrivateDnsServerName: " + mPrivateDnsServerName + " ";
+ if (mIfaceName != null) {
+ resultJoiner.add("InterfaceName:");
+ resultJoiner.add(mIfaceName);
}
- String domainName = "Domains: " + mDomains;
+ resultJoiner.add("LinkAddresses: [");
+ if (!mLinkAddresses.isEmpty()) {
+ resultJoiner.add(TextUtils.join(",", mLinkAddresses));
+ }
+ resultJoiner.add("]");
- String mtu = " MTU: " + mMtu;
+ resultJoiner.add("DnsAddresses: [");
+ if (!mDnses.isEmpty()) {
+ resultJoiner.add(TextUtils.join(",", mDnses));
+ }
+ resultJoiner.add("]");
- String tcpBuffSizes = "";
- if (mTcpBufferSizes != null) {
- tcpBuffSizes = " TcpBufferSizes: " + mTcpBufferSizes;
+ if (mUsePrivateDns) {
+ resultJoiner.add("UsePrivateDns: true");
}
- String routes = " Routes: [";
- for (RouteInfo route : mRoutes) routes += route.toString() + ",";
- routes += "] ";
- String proxy = (mHttpProxy == null ? "" : " HttpProxy: " + mHttpProxy.toString() + " ");
+ if (mPrivateDnsServerName != null) {
+ resultJoiner.add("PrivateDnsServerName:");
+ resultJoiner.add(mPrivateDnsServerName);
+ }
- String stacked = "";
- if (mStackedLinks.values().size() > 0) {
- stacked += " Stacked: [";
- for (LinkProperties link: mStackedLinks.values()) {
- stacked += " [" + link.toString() + " ],";
+ if (!mValidatedPrivateDnses.isEmpty()) {
+ final StringJoiner validatedPrivateDnsesJoiner =
+ new StringJoiner(",", "ValidatedPrivateDnsAddresses: [", "]");
+ for (final InetAddress addr : mValidatedPrivateDnses) {
+ validatedPrivateDnsesJoiner.add(addr.getHostAddress());
}
- stacked += "] ";
+ resultJoiner.add(validatedPrivateDnsesJoiner.toString());
}
- return "{" + ifaceName + linkAddresses + routes + dns + usePrivateDns
- + privateDnsServerName + domainName + mtu + tcpBuffSizes + proxy
- + stacked + "}";
+
+ resultJoiner.add("Domains:");
+ resultJoiner.add(mDomains);
+
+ resultJoiner.add("MTU:");
+ resultJoiner.add(Integer.toString(mMtu));
+
+ if (mTcpBufferSizes != null) {
+ resultJoiner.add("TcpBufferSizes:");
+ resultJoiner.add(mTcpBufferSizes);
+ }
+
+ resultJoiner.add("Routes: [");
+ if (!mRoutes.isEmpty()) {
+ resultJoiner.add(TextUtils.join(",", mRoutes));
+ }
+ resultJoiner.add("]");
+
+ if (mHttpProxy != null) {
+ resultJoiner.add("HttpProxy:");
+ resultJoiner.add(mHttpProxy.toString());
+ }
+
+ final Collection<LinkProperties> stackedLinksValues = mStackedLinks.values();
+ if (!stackedLinksValues.isEmpty()) {
+ final StringJoiner stackedLinksJoiner = new StringJoiner(",", "Stacked: [", "]");
+ for (final LinkProperties lp : stackedLinksValues) {
+ stackedLinksJoiner.add("[ " + lp + " ]");
+ }
+ resultJoiner.add(stackedLinksJoiner.toString());
+ }
+
+ return resultJoiner.toString();
}
/**
@@ -956,10 +1039,10 @@
if (mDomains == null) {
if (targetDomains != null) return false;
} else {
- if (mDomains.equals(targetDomains) == false) return false;
+ if (!mDomains.equals(targetDomains)) return false;
}
return (mDnses.size() == targetDnses.size()) ?
- mDnses.containsAll(targetDnses) : false;
+ mDnses.containsAll(targetDnses) : false;
}
/**
@@ -977,6 +1060,20 @@
}
/**
+ * Compares this {@code LinkProperties} validated private DNS addresses against
+ * the target
+ *
+ * @param target LinkProperties to compare.
+ * @return {@code true} if both are identical, {@code false} otherwise.
+ * @hide
+ */
+ public boolean isIdenticalValidatedPrivateDnses(LinkProperties target) {
+ Collection<InetAddress> targetDnses = target.getValidatedPrivateDnsServers();
+ return (mValidatedPrivateDnses.size() == targetDnses.size())
+ ? mValidatedPrivateDnses.containsAll(targetDnses) : false;
+ }
+
+ /**
* Compares this {@code LinkProperties} Routes against the target
*
* @param target LinkProperties to compare.
@@ -986,7 +1083,7 @@
public boolean isIdenticalRoutes(LinkProperties target) {
Collection<RouteInfo> targetRoutes = target.getRoutes();
return (mRoutes.size() == targetRoutes.size()) ?
- mRoutes.containsAll(targetRoutes) : false;
+ mRoutes.containsAll(targetRoutes) : false;
}
/**
@@ -998,7 +1095,7 @@
*/
public boolean isIdenticalHttpProxy(LinkProperties target) {
return getHttpProxy() == null ? target.getHttpProxy() == null :
- getHttpProxy().equals(target.getHttpProxy());
+ getHttpProxy().equals(target.getHttpProxy());
}
/**
@@ -1044,7 +1141,6 @@
return Objects.equals(mTcpBufferSizes, target.mTcpBufferSizes);
}
- @Override
/**
* Compares this {@code LinkProperties} instance against the target
* LinkProperties in {@code obj}. Two LinkPropertieses are equal if
@@ -1059,13 +1155,14 @@
* @param obj the object to be tested for equality.
* @return {@code true} if both objects are equal, {@code false} otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (!(obj instanceof LinkProperties)) return false;
LinkProperties target = (LinkProperties) obj;
- /**
+ /*
* This method does not check that stacked interfaces are equal, because
* stacked interfaces are not so much a property of the link as a
* description of connections between links.
@@ -1074,6 +1171,7 @@
&& isIdenticalAddresses(target)
&& isIdenticalDnses(target)
&& isIdenticalPrivateDns(target)
+ && isIdenticalValidatedPrivateDnses(target)
&& isIdenticalRoutes(target)
&& isIdenticalHttpProxy(target)
&& isIdenticalStackedLinks(target)
@@ -1121,6 +1219,19 @@
}
/**
+ * Compares the validated private DNS addresses in this LinkProperties with another
+ * LinkProperties.
+ *
+ * @param target a LinkProperties with the new list of validated private dns addresses
+ * @return the differences between the DNS addresses.
+ * @hide
+ */
+ public CompareResult<InetAddress> compareValidatedPrivateDnses(LinkProperties target) {
+ return new CompareResult<>(mValidatedPrivateDnses,
+ target != null ? target.getValidatedPrivateDnsServers() : null);
+ }
+
+ /**
* Compares all routes in this LinkProperties with another LinkProperties,
* examining both the the base link and all stacked links.
*
@@ -1158,16 +1269,18 @@
}
- @Override
/**
- * generate hashcode based on significant fields
+ * Generate hashcode based on significant fields
+ *
* Equal objects must produce the same hash code, while unequal objects
* may have the same hash codes.
*/
+ @Override
public int hashCode() {
return ((null == mIfaceName) ? 0 : mIfaceName.hashCode()
+ mLinkAddresses.size() * 31
+ mDnses.size() * 37
+ + mValidatedPrivateDnses.size() * 61
+ ((null == mDomains) ? 0 : mDomains.hashCode())
+ mRoutes.size() * 41
+ ((null == mHttpProxy) ? 0 : mHttpProxy.hashCode())
@@ -1184,12 +1297,16 @@
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(getInterfaceName());
dest.writeInt(mLinkAddresses.size());
- for(LinkAddress linkAddress : mLinkAddresses) {
+ for (LinkAddress linkAddress : mLinkAddresses) {
dest.writeParcelable(linkAddress, flags);
}
dest.writeInt(mDnses.size());
- for(InetAddress d : mDnses) {
+ for (InetAddress d : mDnses) {
+ dest.writeByteArray(d.getAddress());
+ }
+ dest.writeInt(mValidatedPrivateDnses.size());
+ for (InetAddress d : mValidatedPrivateDnses) {
dest.writeByteArray(d.getAddress());
}
dest.writeBoolean(mUsePrivateDns);
@@ -1198,7 +1315,7 @@
dest.writeInt(mMtu);
dest.writeString(mTcpBufferSizes);
dest.writeInt(mRoutes.size());
- for(RouteInfo route : mRoutes) {
+ for (RouteInfo route : mRoutes) {
dest.writeParcelable(route, flags);
}
@@ -1208,7 +1325,7 @@
} else {
dest.writeByte((byte)0);
}
- ArrayList<LinkProperties> stackedLinks = new ArrayList(mStackedLinks.values());
+ ArrayList<LinkProperties> stackedLinks = new ArrayList<>(mStackedLinks.values());
dest.writeList(stackedLinks);
}
@@ -1225,26 +1342,33 @@
netProp.setInterfaceName(iface);
}
int addressCount = in.readInt();
- for (int i=0; i<addressCount; i++) {
- netProp.addLinkAddress((LinkAddress)in.readParcelable(null));
+ for (int i = 0; i < addressCount; i++) {
+ netProp.addLinkAddress(in.readParcelable(null));
}
addressCount = in.readInt();
- for (int i=0; i<addressCount; i++) {
+ for (int i = 0; i < addressCount; i++) {
try {
netProp.addDnsServer(InetAddress.getByAddress(in.createByteArray()));
} catch (UnknownHostException e) { }
}
+ addressCount = in.readInt();
+ for (int i = 0; i < addressCount; i++) {
+ try {
+ netProp.addValidatedPrivateDnsServer(
+ InetAddress.getByAddress(in.createByteArray()));
+ } catch (UnknownHostException e) { }
+ }
netProp.setUsePrivateDns(in.readBoolean());
netProp.setPrivateDnsServerName(in.readString());
netProp.setDomains(in.readString());
netProp.setMtu(in.readInt());
netProp.setTcpBufferSizes(in.readString());
addressCount = in.readInt();
- for (int i=0; i<addressCount; i++) {
- netProp.addRoute((RouteInfo)in.readParcelable(null));
+ for (int i = 0; i < addressCount; i++) {
+ netProp.addRoute(in.readParcelable(null));
}
if (in.readByte() == 1) {
- netProp.setHttpProxy((ProxyInfo)in.readParcelable(null));
+ netProp.setHttpProxy(in.readParcelable(null));
}
ArrayList<LinkProperties> stackedLinks = new ArrayList<LinkProperties>();
in.readList(stackedLinks, LinkProperties.class.getClassLoader());
@@ -1259,16 +1383,15 @@
}
};
- /**
- * Check the valid MTU range based on IPv4 or IPv6.
- * @hide
- */
- public static boolean isValidMtu(int mtu, boolean ipv6) {
- if (ipv6) {
- if ((mtu >= MIN_MTU_V6 && mtu <= MAX_MTU)) return true;
- } else {
- if ((mtu >= MIN_MTU && mtu <= MAX_MTU)) return true;
- }
- return false;
+ /**
+ * Check the valid MTU range based on IPv4 or IPv6.
+ * @hide
+ */
+ public static boolean isValidMtu(int mtu, boolean ipv6) {
+ if (ipv6) {
+ return mtu >= MIN_MTU_V6 && mtu <= MAX_MTU;
+ } else {
+ return mtu >= MIN_MTU && mtu <= MAX_MTU;
}
+ }
}
diff --git a/core/java/android/net/MacAddress.java b/core/java/android/net/MacAddress.java
index 287bdc8..74d6470 100644
--- a/core/java/android/net/MacAddress.java
+++ b/core/java/android/net/MacAddress.java
@@ -26,6 +26,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.security.SecureRandom;
import java.util.Arrays;
import java.util.Random;
@@ -329,16 +330,34 @@
/**
* Returns a generated MAC address whose 24 least significant bits constituting the
- * NIC part of the address are randomly selected.
+ * NIC part of the address are randomly selected and has Google OUI base.
*
* The locally assigned bit is always set to 1. The multicast bit is always set to 0.
*
- * @return a random locally assigned MacAddress.
+ * @return a random locally assigned, unicast MacAddress with Google OUI.
+ *
+ * @hide
+ */
+ public static @NonNull MacAddress createRandomUnicastAddressWithGoogleBase() {
+ return createRandomUnicastAddress(BASE_GOOGLE_MAC, new SecureRandom());
+ }
+
+ /**
+ * Returns a generated MAC address whose 46 bits, excluding the locally assigned bit and the
+ * unicast bit, are randomly selected.
+ *
+ * The locally assigned bit is always set to 1. The multicast bit is always set to 0.
+ *
+ * @return a random locally assigned, unicast MacAddress.
*
* @hide
*/
public static @NonNull MacAddress createRandomUnicastAddress() {
- return createRandomUnicastAddress(BASE_GOOGLE_MAC, new Random());
+ SecureRandom r = new SecureRandom();
+ long addr = r.nextLong() & VALID_LONG_MASK;
+ addr |= LOCALLY_ASSIGNED_MASK;
+ addr &= ~MULTICAST_MASK;
+ return new MacAddress(addr);
}
/**
@@ -355,8 +374,8 @@
*/
public static @NonNull MacAddress createRandomUnicastAddress(MacAddress base, Random r) {
long addr = (base.mAddr & OUI_MASK) | (NIC_MASK & r.nextLong());
- addr = addr | LOCALLY_ASSIGNED_MASK;
- addr = addr & ~MULTICAST_MASK;
+ addr |= LOCALLY_ASSIGNED_MASK;
+ addr &= ~MULTICAST_MASK;
return new MacAddress(addr);
}
diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java
index 3683d34..d1cccac 100644
--- a/core/java/android/net/Network.java
+++ b/core/java/android/net/Network.java
@@ -25,6 +25,8 @@
import com.android.okhttp.internalandroidapi.Dns;
import com.android.okhttp.internalandroidapi.HttpURLConnectionFactory;
+import libcore.io.IoUtils;
+
import java.io.FileDescriptor;
import java.io.IOException;
import java.net.DatagramSocket;
@@ -77,6 +79,21 @@
private static final long httpKeepAliveDurationMs =
Long.parseLong(System.getProperty("http.keepAliveDuration", "300000")); // 5 minutes.
+ // A boolean to control how getAllByName()/getByName() behaves in the face
+ // of Private DNS.
+ //
+ // When true, these calls will request that DNS resolution bypass any
+ // Private DNS that might otherwise apply. Use of this feature is restricted
+ // and permission checks are made by netd (attempts to bypass Private DNS
+ // without appropriate permission are silently turned into vanilla DNS
+ // requests). This only affects DNS queries made using this network object.
+ //
+ // It it not parceled to receivers because (a) it can be set or cleared at
+ // anytime and (b) receivers should be explicit about attempts to bypass
+ // Private DNS so that the intent of the code is easily determined and
+ // code search audits are possible.
+ private boolean mPrivateDnsBypass = false;
+
/**
* @hide
*/
@@ -100,7 +117,7 @@
* @throws UnknownHostException if the address lookup fails.
*/
public InetAddress[] getAllByName(String host) throws UnknownHostException {
- return InetAddress.getAllByNameOnNet(host, netId);
+ return InetAddress.getAllByNameOnNet(host, getNetIdForResolv());
}
/**
@@ -114,20 +131,38 @@
* if the address lookup fails.
*/
public InetAddress getByName(String host) throws UnknownHostException {
- return InetAddress.getByNameOnNet(host, netId);
+ return InetAddress.getByNameOnNet(host, getNetIdForResolv());
+ }
+
+ /**
+ * Specify whether or not Private DNS should be bypassed when attempting
+ * to use {@link #getAllByName(String)}/{@link #getByName(String)} methods on the given
+ * instance for hostname resolution.
+ *
+ * @hide
+ */
+ public void setPrivateDnsBypass(boolean bypass) {
+ mPrivateDnsBypass = bypass;
+ }
+
+ /**
+ * Returns a netid marked with the Private DNS bypass flag.
+ *
+ * This flag must be kept in sync with the NETID_USE_LOCAL_NAMESERVERS flag
+ * in system/netd/include/NetdClient.h.
+ *
+ * @hide
+ */
+ public int getNetIdForResolv() {
+ return mPrivateDnsBypass
+ ? (int) (0x80000000L | (long) netId) // Non-portable DNS resolution flag.
+ : netId;
}
/**
* A {@code SocketFactory} that produces {@code Socket}'s bound to this network.
*/
private class NetworkBoundSocketFactory extends SocketFactory {
- private final int mNetId;
-
- public NetworkBoundSocketFactory(int netId) {
- super();
- mNetId = netId;
- }
-
private Socket connectToHost(String host, int port, SocketAddress localAddress)
throws IOException {
// Lookup addresses only on this Network.
@@ -136,9 +171,15 @@
for (int i = 0; i < hostAddresses.length; i++) {
try {
Socket socket = createSocket();
- if (localAddress != null) socket.bind(localAddress);
- socket.connect(new InetSocketAddress(hostAddresses[i], port));
- return socket;
+ boolean failed = true;
+ try {
+ if (localAddress != null) socket.bind(localAddress);
+ socket.connect(new InetSocketAddress(hostAddresses[i], port));
+ failed = false;
+ return socket;
+ } finally {
+ if (failed) IoUtils.closeQuietly(socket);
+ }
} catch (IOException e) {
if (i == (hostAddresses.length - 1)) throw e;
}
@@ -147,7 +188,8 @@
}
@Override
- public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException {
+ public Socket createSocket(String host, int port, InetAddress localHost, int localPort)
+ throws IOException {
return connectToHost(host, port, new InetSocketAddress(localHost, localPort));
}
@@ -155,15 +197,27 @@
public Socket createSocket(InetAddress address, int port, InetAddress localAddress,
int localPort) throws IOException {
Socket socket = createSocket();
- socket.bind(new InetSocketAddress(localAddress, localPort));
- socket.connect(new InetSocketAddress(address, port));
+ boolean failed = true;
+ try {
+ socket.bind(new InetSocketAddress(localAddress, localPort));
+ socket.connect(new InetSocketAddress(address, port));
+ failed = false;
+ } finally {
+ if (failed) IoUtils.closeQuietly(socket);
+ }
return socket;
}
@Override
public Socket createSocket(InetAddress host, int port) throws IOException {
Socket socket = createSocket();
- socket.connect(new InetSocketAddress(host, port));
+ boolean failed = true;
+ try {
+ socket.connect(new InetSocketAddress(host, port));
+ failed = false;
+ } finally {
+ if (failed) IoUtils.closeQuietly(socket);
+ }
return socket;
}
@@ -175,7 +229,13 @@
@Override
public Socket createSocket() throws IOException {
Socket socket = new Socket();
- bindSocket(socket);
+ boolean failed = true;
+ try {
+ bindSocket(socket);
+ failed = false;
+ } finally {
+ if (failed) IoUtils.closeQuietly(socket);
+ }
return socket;
}
}
@@ -193,7 +253,7 @@
if (mNetworkBoundSocketFactory == null) {
synchronized (mLock) {
if (mNetworkBoundSocketFactory == null) {
- mNetworkBoundSocketFactory = new NetworkBoundSocketFactory(netId);
+ mNetworkBoundSocketFactory = new NetworkBoundSocketFactory();
}
}
}
@@ -388,7 +448,7 @@
@Override
public boolean equals(Object obj) {
- if (obj instanceof Network == false) return false;
+ if (!(obj instanceof Network)) return false;
Network other = (Network)obj;
return this.netId == other.netId;
}
diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java
index 2dacf8f..52a2354 100644
--- a/core/java/android/net/NetworkAgent.java
+++ b/core/java/android/net/NetworkAgent.java
@@ -17,6 +17,7 @@
package android.net;
import android.content.Context;
+import android.net.ConnectivityManager.PacketKeepalive;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@@ -26,7 +27,6 @@
import com.android.internal.util.AsyncChannel;
import com.android.internal.util.Protocol;
-import android.net.ConnectivityManager.PacketKeepalive;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -101,20 +101,6 @@
public static final int EVENT_NETWORK_SCORE_CHANGED = BASE + 4;
/**
- * Sent by the NetworkAgent to ConnectivityService to add new UID ranges
- * to be forced into this Network. For VPNs only.
- * obj = UidRange[] to forward
- */
- public static final int EVENT_UID_RANGES_ADDED = BASE + 5;
-
- /**
- * Sent by the NetworkAgent to ConnectivityService to remove UID ranges
- * from being forced into this Network. For VPNs only.
- * obj = UidRange[] to stop forwarding
- */
- public static final int EVENT_UID_RANGES_REMOVED = BASE + 6;
-
- /**
* Sent by ConnectivityService to the NetworkAgent to inform the agent of the
* networks status - whether we could use the network or could not, due to
* either a bad network configuration (no internet link) or captive portal.
@@ -390,22 +376,6 @@
}
/**
- * Called by the VPN code when it wants to add ranges of UIDs to be routed
- * through the VPN network.
- */
- public void addUidRanges(UidRange[] ranges) {
- queueOrSendMessage(EVENT_UID_RANGES_ADDED, ranges);
- }
-
- /**
- * Called by the VPN code when it wants to remove ranges of UIDs from being routed
- * through the VPN network.
- */
- public void removeUidRanges(UidRange[] ranges) {
- queueOrSendMessage(EVENT_UID_RANGES_REMOVED, ranges);
- }
-
- /**
* Called by the bearer to indicate this network was manually selected by the user.
* This should be called before the NetworkInfo is marked CONNECTED so that this
* Network can be given special treatment at that time. If {@code acceptUnvalidated} is
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index be85583..83553df 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -17,9 +17,12 @@
package android.net;
import android.annotation.IntDef;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.net.ConnectivityManager.NetworkCallback;
import android.os.Parcel;
import android.os.Parcelable;
+import android.util.ArraySet;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.BitUtils;
@@ -28,6 +31,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
+import java.util.Set;
import java.util.StringJoiner;
/**
@@ -46,6 +50,7 @@
*/
public final class NetworkCapabilities implements Parcelable {
private static final String TAG = "NetworkCapabilities";
+ private static final int INVALID_UID = -1;
/**
* @hide
@@ -57,12 +62,7 @@
public NetworkCapabilities(NetworkCapabilities nc) {
if (nc != null) {
- mNetworkCapabilities = nc.mNetworkCapabilities;
- mTransportTypes = nc.mTransportTypes;
- mLinkUpBandwidthKbps = nc.mLinkUpBandwidthKbps;
- mLinkDownBandwidthKbps = nc.mLinkDownBandwidthKbps;
- mNetworkSpecifier = nc.mNetworkSpecifier;
- mSignalStrength = nc.mSignalStrength;
+ set(nc);
}
}
@@ -72,10 +72,30 @@
* @hide
*/
public void clearAll() {
- mNetworkCapabilities = mTransportTypes = 0;
+ mNetworkCapabilities = mTransportTypes = mUnwantedNetworkCapabilities = 0;
mLinkUpBandwidthKbps = mLinkDownBandwidthKbps = LINK_BANDWIDTH_UNSPECIFIED;
mNetworkSpecifier = null;
mSignalStrength = SIGNAL_STRENGTH_UNSPECIFIED;
+ mUids = null;
+ mEstablishingVpnAppUid = INVALID_UID;
+ mSSID = null;
+ }
+
+ /**
+ * Set all contents of this object to the contents of a NetworkCapabilities.
+ * @hide
+ */
+ public void set(NetworkCapabilities nc) {
+ mNetworkCapabilities = nc.mNetworkCapabilities;
+ mTransportTypes = nc.mTransportTypes;
+ mLinkUpBandwidthKbps = nc.mLinkUpBandwidthKbps;
+ mLinkDownBandwidthKbps = nc.mLinkDownBandwidthKbps;
+ mNetworkSpecifier = nc.mNetworkSpecifier;
+ mSignalStrength = nc.mSignalStrength;
+ setUids(nc.mUids); // Will make the defensive copy
+ mEstablishingVpnAppUid = nc.mEstablishingVpnAppUid;
+ mUnwantedNetworkCapabilities = nc.mUnwantedNetworkCapabilities;
+ mSSID = nc.mSSID;
}
/**
@@ -84,6 +104,11 @@
*/
private long mNetworkCapabilities;
+ /**
+ * If any capabilities specified here they must not exist in the matching Network.
+ */
+ private long mUnwantedNetworkCapabilities;
+
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@IntDef(prefix = { "NET_CAPABILITY_" }, value = {
@@ -108,6 +133,8 @@
NET_CAPABILITY_NOT_ROAMING,
NET_CAPABILITY_FOREGROUND,
NET_CAPABILITY_NOT_CONGESTED,
+ NET_CAPABILITY_NOT_SUSPENDED,
+ NET_CAPABILITY_OEM_PAID,
})
public @interface NetCapability { }
@@ -231,7 +258,6 @@
/**
* Indicates that this network is available for use by apps, and not a network that is being
* kept up in the background to facilitate fast network switching.
- * @hide
*/
public static final int NET_CAPABILITY_FOREGROUND = 19;
@@ -244,8 +270,28 @@
*/
public static final int NET_CAPABILITY_NOT_CONGESTED = 20;
+ /**
+ * Indicates that this network is not currently suspended.
+ * <p>
+ * When a network is suspended, the network's IP addresses and any connections
+ * established on the network remain valid, but the network is temporarily unable
+ * to transfer data. This can happen, for example, if a cellular network experiences
+ * a temporary loss of signal, such as when driving through a tunnel, etc.
+ * A network with this capability is not suspended, so is expected to be able to
+ * transfer data.
+ */
+ public static final int NET_CAPABILITY_NOT_SUSPENDED = 21;
+
+ /**
+ * Indicates that traffic that goes through this network is paid by oem. For example,
+ * this network can be used by system apps to upload telemetry data.
+ * @hide
+ */
+ @SystemApi
+ public static final int NET_CAPABILITY_OEM_PAID = 22;
+
private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS;
- private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_NOT_CONGESTED;
+ private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_OEM_PAID;
/**
* Network capabilities that are expected to be mutable, i.e., can change while a particular
@@ -254,12 +300,13 @@
private static final long MUTABLE_CAPABILITIES =
// TRUSTED can change when user explicitly connects to an untrusted network in Settings.
// http://b/18206275
- (1 << NET_CAPABILITY_TRUSTED) |
- (1 << NET_CAPABILITY_VALIDATED) |
- (1 << NET_CAPABILITY_CAPTIVE_PORTAL) |
- (1 << NET_CAPABILITY_NOT_ROAMING) |
- (1 << NET_CAPABILITY_FOREGROUND) |
- (1 << NET_CAPABILITY_NOT_CONGESTED);
+ (1 << NET_CAPABILITY_TRUSTED)
+ | (1 << NET_CAPABILITY_VALIDATED)
+ | (1 << NET_CAPABILITY_CAPTIVE_PORTAL)
+ | (1 << NET_CAPABILITY_NOT_ROAMING)
+ | (1 << NET_CAPABILITY_FOREGROUND)
+ | (1 << NET_CAPABILITY_NOT_CONGESTED)
+ | (1 << NET_CAPABILITY_NOT_SUSPENDED);
/**
* Network capabilities that are not allowed in NetworkRequests. This exists because the
@@ -281,7 +328,7 @@
/**
* Capabilities that suggest that a network is restricted.
- * {@see #maybeMarkCapabilitiesRestricted}.
+ * {@see #maybeMarkCapabilitiesRestricted}, {@see #FORCE_RESTRICTED_CAPABILITIES}
*/
@VisibleForTesting
/* package */ static final long RESTRICTED_CAPABILITIES =
@@ -295,6 +342,13 @@
(1 << NET_CAPABILITY_XCAP);
/**
+ * Capabilities that force network to be restricted.
+ * {@see #maybeMarkCapabilitiesRestricted}.
+ */
+ private static final long FORCE_RESTRICTED_CAPABILITIES =
+ (1 << NET_CAPABILITY_OEM_PAID);
+
+ /**
* Capabilities that suggest that a network is unrestricted.
* {@see #maybeMarkCapabilitiesRestricted}.
*/
@@ -309,31 +363,55 @@
* Adds the given capability to this {@code NetworkCapability} instance.
* Multiple capabilities may be applied sequentially. Note that when searching
* for a network to satisfy a request, all capabilities requested must be satisfied.
+ * <p>
+ * If the given capability was previously added to the list of unwanted capabilities
+ * then the capability will also be removed from the list of unwanted capabilities.
*
* @param capability the capability to be added.
* @return This NetworkCapabilities instance, to facilitate chaining.
* @hide
*/
public NetworkCapabilities addCapability(@NetCapability int capability) {
- if (capability < MIN_NET_CAPABILITY || capability > MAX_NET_CAPABILITY) {
- throw new IllegalArgumentException("NetworkCapability out of range");
- }
+ checkValidCapability(capability);
mNetworkCapabilities |= 1 << capability;
+ mUnwantedNetworkCapabilities &= ~(1 << capability); // remove from unwanted capability list
return this;
}
/**
+ * Adds the given capability to the list of unwanted capabilities of this
+ * {@code NetworkCapability} instance. Multiple unwanted capabilities may be applied
+ * sequentially. Note that when searching for a network to satisfy a request, the network
+ * must not contain any capability from unwanted capability list.
+ * <p>
+ * If the capability was previously added to the list of required capabilities (for
+ * example, it was there by default or added using {@link #addCapability(int)} method), then
+ * it will be removed from the list of required capabilities as well.
+ *
+ * @see #addCapability(int)
+ * @hide
+ */
+ public void addUnwantedCapability(@NetCapability int capability) {
+ checkValidCapability(capability);
+ mUnwantedNetworkCapabilities |= 1 << capability;
+ mNetworkCapabilities &= ~(1 << capability); // remove from requested capabilities
+ }
+
+ /**
* Removes (if found) the given capability from this {@code NetworkCapability} instance.
+ * <p>
+ * Note that this method removes capabilities that were added via {@link #addCapability(int)},
+ * {@link #addUnwantedCapability(int)} or {@link #setCapabilities(int[], int[])} .
*
* @param capability the capability to be removed.
* @return This NetworkCapabilities instance, to facilitate chaining.
* @hide
*/
public NetworkCapabilities removeCapability(@NetCapability int capability) {
- if (capability < MIN_NET_CAPABILITY || capability > MAX_NET_CAPABILITY) {
- throw new IllegalArgumentException("NetworkCapability out of range");
- }
- mNetworkCapabilities &= ~(1 << capability);
+ checkValidCapability(capability);
+ final long mask = ~(1 << capability);
+ mNetworkCapabilities &= mask;
+ mUnwantedNetworkCapabilities &= mask;
return this;
}
@@ -358,35 +436,64 @@
* @return an array of capability values for this instance.
* @hide
*/
+ @TestApi
public @NetCapability int[] getCapabilities() {
return BitUtils.unpackBits(mNetworkCapabilities);
}
/**
+ * Gets all the unwanted capabilities set on this {@code NetworkCapability} instance.
+ *
+ * @return an array of unwanted capability values for this instance.
+ * @hide
+ */
+ public @NetCapability int[] getUnwantedCapabilities() {
+ return BitUtils.unpackBits(mUnwantedNetworkCapabilities);
+ }
+
+
+ /**
* Sets all the capabilities set on this {@code NetworkCapability} instance.
* This overwrites any existing capabilities.
*
* @hide
*/
- public void setCapabilities(@NetCapability int[] capabilities) {
+ public void setCapabilities(@NetCapability int[] capabilities,
+ @NetCapability int[] unwantedCapabilities) {
mNetworkCapabilities = BitUtils.packBits(capabilities);
+ mUnwantedNetworkCapabilities = BitUtils.packBits(unwantedCapabilities);
}
/**
- * Tests for the presence of a capabilitity on this instance.
+ * @deprecated use {@link #setCapabilities(int[], int[])}
+ * @hide
+ */
+ @Deprecated
+ public void setCapabilities(@NetCapability int[] capabilities) {
+ setCapabilities(capabilities, new int[] {});
+ }
+
+ /**
+ * Tests for the presence of a capability on this instance.
*
* @param capability the capabilities to be tested for.
* @return {@code true} if set on this instance.
*/
public boolean hasCapability(@NetCapability int capability) {
- if (capability < MIN_NET_CAPABILITY || capability > MAX_NET_CAPABILITY) {
- return false;
- }
- return ((mNetworkCapabilities & (1 << capability)) != 0);
+ return isValidCapability(capability)
+ && ((mNetworkCapabilities & (1 << capability)) != 0);
}
+ /** @hide */
+ public boolean hasUnwantedCapability(@NetCapability int capability) {
+ return isValidCapability(capability)
+ && ((mUnwantedNetworkCapabilities & (1 << capability)) != 0);
+ }
+
+ /** Note this method may result in having the same capability in wanted and unwanted lists. */
private void combineNetCapabilities(NetworkCapabilities nc) {
this.mNetworkCapabilities |= nc.mNetworkCapabilities;
+ this.mUnwantedNetworkCapabilities |= nc.mUnwantedNetworkCapabilities;
}
/**
@@ -397,7 +504,9 @@
* @hide
*/
public String describeFirstNonRequestableCapability() {
- final long nonRequestable = (mNetworkCapabilities & NON_REQUESTABLE_CAPABILITIES);
+ final long nonRequestable = (mNetworkCapabilities | mUnwantedNetworkCapabilities)
+ & NON_REQUESTABLE_CAPABILITIES;
+
if (nonRequestable != 0) {
return capabilityNameOf(BitUtils.unpackBits(nonRequestable)[0]);
}
@@ -407,21 +516,29 @@
}
private boolean satisfiedByNetCapabilities(NetworkCapabilities nc, boolean onlyImmutable) {
- long networkCapabilities = this.mNetworkCapabilities;
+ long requestedCapabilities = mNetworkCapabilities;
+ long requestedUnwantedCapabilities = mUnwantedNetworkCapabilities;
+ long providedCapabilities = nc.mNetworkCapabilities;
+
if (onlyImmutable) {
- networkCapabilities = networkCapabilities & ~MUTABLE_CAPABILITIES;
+ requestedCapabilities &= ~MUTABLE_CAPABILITIES;
+ requestedUnwantedCapabilities &= ~MUTABLE_CAPABILITIES;
}
- return ((nc.mNetworkCapabilities & networkCapabilities) == networkCapabilities);
+ return ((providedCapabilities & requestedCapabilities) == requestedCapabilities)
+ && ((requestedUnwantedCapabilities & providedCapabilities) == 0);
}
/** @hide */
public boolean equalsNetCapabilities(NetworkCapabilities nc) {
- return (nc.mNetworkCapabilities == this.mNetworkCapabilities);
+ return (nc.mNetworkCapabilities == this.mNetworkCapabilities)
+ && (nc.mUnwantedNetworkCapabilities == this.mUnwantedNetworkCapabilities);
}
private boolean equalsNetCapabilitiesRequestable(NetworkCapabilities that) {
return ((this.mNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES) ==
- (that.mNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES));
+ (that.mNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES))
+ && ((this.mUnwantedNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES) ==
+ (that.mUnwantedNetworkCapabilities & ~NON_REQUESTABLE_CAPABILITIES));
}
/**
@@ -434,16 +551,21 @@
* @hide
*/
public void maybeMarkCapabilitiesRestricted() {
+ // Check if we have any capability that forces the network to be restricted.
+ final boolean forceRestrictedCapability =
+ (mNetworkCapabilities & FORCE_RESTRICTED_CAPABILITIES) != 0;
+
// Verify there aren't any unrestricted capabilities. If there are we say
- // the whole thing is unrestricted.
+ // the whole thing is unrestricted unless it is forced to be restricted.
final boolean hasUnrestrictedCapabilities =
- ((mNetworkCapabilities & UNRESTRICTED_CAPABILITIES) != 0);
+ (mNetworkCapabilities & UNRESTRICTED_CAPABILITIES) != 0;
// Must have at least some restricted capabilities.
final boolean hasRestrictedCapabilities =
- ((mNetworkCapabilities & RESTRICTED_CAPABILITIES) != 0);
+ (mNetworkCapabilities & RESTRICTED_CAPABILITIES) != 0;
- if (hasRestrictedCapabilities && !hasUnrestrictedCapabilities) {
+ if (forceRestrictedCapability
+ || (hasRestrictedCapabilities && !hasUnrestrictedCapabilities)) {
removeCapability(NET_CAPABILITY_NOT_RESTRICTED);
}
}
@@ -579,6 +701,7 @@
* @return an array of transport type values for this instance.
* @hide
*/
+ @TestApi
public @Transport int[] getTransportTypes() {
return BitUtils.unpackBits(mTransportTypes);
}
@@ -618,6 +741,29 @@
}
/**
+ * UID of the app that manages this network, or INVALID_UID if none/unknown.
+ *
+ * This field keeps track of the UID of the app that created this network and is in charge
+ * of managing it. In the practice, it is used to store the UID of VPN apps so it is named
+ * accordingly, but it may be renamed if other mechanisms are offered for third party apps
+ * to create networks.
+ *
+ * Because this field is only used in the services side (and to avoid apps being able to
+ * set this to whatever they want), this field is not parcelled and will not be conserved
+ * across the IPC boundary.
+ * @hide
+ */
+ private int mEstablishingVpnAppUid = INVALID_UID;
+
+ /**
+ * Set the UID of the managing app.
+ * @hide
+ */
+ public void setEstablishingVpnAppUid(final int uid) {
+ mEstablishingVpnAppUid = uid;
+ }
+
+ /**
* Value indicating that link bandwidth is unspecified.
* @hide
*/
@@ -789,7 +935,7 @@
/**
* Sets the signal strength. This is a signed integer, with higher values indicating a stronger
* signal. The exact units are bearer-dependent. For example, Wi-Fi uses the same RSSI units
- * reported by WifiManager.
+ * reported by wifi code.
* <p>
* Note that when used to register a network callback, this specifies the minimum acceptable
* signal strength. When received as the state of an existing network it specifies the current
@@ -836,7 +982,243 @@
}
/**
- * Combine a set of Capabilities to this one. Useful for coming up with the complete set
+ * List of UIDs this network applies to. No restriction if null.
+ * <p>
+ * For networks, mUids represent the list of network this applies to, and null means this
+ * network applies to all UIDs.
+ * For requests, mUids is the list of UIDs this network MUST apply to to match ; ALL UIDs
+ * must be included in a network so that they match. As an exception to the general rule,
+ * a null mUids field for requests mean "no requirements" rather than what the general rule
+ * would suggest ("must apply to all UIDs") : this is because this has shown to be what users
+ * of this API expect in practice. A network that must match all UIDs can still be
+ * expressed with a set ranging the entire set of possible UIDs.
+ * <p>
+ * mUids is typically (and at this time, only) used by VPN. This network is only available to
+ * the UIDs in this list, and it is their default network. Apps in this list that wish to
+ * bypass the VPN can do so iff the VPN app allows them to or if they are privileged. If this
+ * member is null, then the network is not restricted by app UID. If it's an empty list, then
+ * it means nobody can use it.
+ * As a special exception, the app managing this network (as identified by its UID stored in
+ * mEstablishingVpnAppUid) can always see this network. This is embodied by a special check in
+ * satisfiedByUids. That still does not mean the network necessarily <strong>applies</strong>
+ * to the app that manages it as determined by #appliesToUid.
+ * <p>
+ * Please note that in principle a single app can be associated with multiple UIDs because
+ * each app will have a different UID when it's run as a different (macro-)user. A single
+ * macro user can only have a single active VPN app at any given time however.
+ * <p>
+ * Also please be aware this class does not try to enforce any normalization on this. Callers
+ * can only alter the UIDs by setting them wholesale : this class does not provide any utility
+ * to add or remove individual UIDs or ranges. If callers have any normalization needs on
+ * their own (like requiring sortedness or no overlap) they need to enforce it
+ * themselves. Some of the internal methods also assume this is normalized as in no adjacent
+ * or overlapping ranges are present.
+ *
+ * @hide
+ */
+ private ArraySet<UidRange> mUids = null;
+
+ /**
+ * Convenience method to set the UIDs this network applies to to a single UID.
+ * @hide
+ */
+ public NetworkCapabilities setSingleUid(int uid) {
+ final ArraySet<UidRange> identity = new ArraySet<>(1);
+ identity.add(new UidRange(uid, uid));
+ setUids(identity);
+ return this;
+ }
+
+ /**
+ * Set the list of UIDs this network applies to.
+ * This makes a copy of the set so that callers can't modify it after the call.
+ * @hide
+ */
+ public NetworkCapabilities setUids(Set<UidRange> uids) {
+ if (null == uids) {
+ mUids = null;
+ } else {
+ mUids = new ArraySet<>(uids);
+ }
+ return this;
+ }
+
+ /**
+ * Get the list of UIDs this network applies to.
+ * This returns a copy of the set so that callers can't modify the original object.
+ * @hide
+ */
+ public Set<UidRange> getUids() {
+ return null == mUids ? null : new ArraySet<>(mUids);
+ }
+
+ /**
+ * Test whether this network applies to this UID.
+ * @hide
+ */
+ public boolean appliesToUid(int uid) {
+ if (null == mUids) return true;
+ for (UidRange range : mUids) {
+ if (range.contains(uid)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Tests if the set of UIDs that this network applies to is the same as the passed network.
+ * <p>
+ * This test only checks whether equal range objects are in both sets. It will
+ * return false if the ranges are not exactly the same, even if the covered UIDs
+ * are for an equivalent result.
+ * <p>
+ * Note that this method is not very optimized, which is fine as long as it's not used very
+ * often.
+ * <p>
+ * nc is assumed nonnull.
+ *
+ * @hide
+ */
+ @VisibleForTesting
+ public boolean equalsUids(NetworkCapabilities nc) {
+ Set<UidRange> comparedUids = nc.mUids;
+ if (null == comparedUids) return null == mUids;
+ if (null == mUids) return false;
+ // Make a copy so it can be mutated to check that all ranges in mUids
+ // also are in uids.
+ final Set<UidRange> uids = new ArraySet<>(mUids);
+ for (UidRange range : comparedUids) {
+ if (!uids.contains(range)) {
+ return false;
+ }
+ uids.remove(range);
+ }
+ return uids.isEmpty();
+ }
+
+ /**
+ * Test whether the passed NetworkCapabilities satisfies the UIDs this capabilities require.
+ *
+ * This method is called on the NetworkCapabilities embedded in a request with the
+ * capabilities of an available network. It checks whether all the UIDs from this listen
+ * (representing the UIDs that must have access to the network) are satisfied by the UIDs
+ * in the passed nc (representing the UIDs that this network is available to).
+ * <p>
+ * As a special exception, the UID that created the passed network (as represented by its
+ * mEstablishingVpnAppUid field) always satisfies a NetworkRequest requiring it (of LISTEN
+ * or REQUEST types alike), even if the network does not apply to it. That is so a VPN app
+ * can see its own network when it listens for it.
+ * <p>
+ * nc is assumed nonnull. Else, NPE.
+ * @see #appliesToUid
+ * @hide
+ */
+ public boolean satisfiedByUids(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;
+ if (!nc.appliesToUidRange(requiredRange)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Returns whether this network applies to the passed ranges.
+ * This assumes that to apply, the passed range has to be entirely contained
+ * within one of the ranges this network applies to. If the ranges are not normalized,
+ * this method may return false even though all required UIDs are covered because no
+ * single range contained them all.
+ * @hide
+ */
+ @VisibleForTesting
+ public boolean appliesToUidRange(UidRange requiredRange) {
+ if (null == mUids) return true;
+ for (UidRange uidRange : mUids) {
+ if (uidRange.containsRange(requiredRange)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Combine the UIDs this network currently applies to with the UIDs the passed
+ * NetworkCapabilities apply to.
+ * nc is assumed nonnull.
+ */
+ private void combineUids(NetworkCapabilities nc) {
+ if (null == nc.mUids || null == mUids) {
+ mUids = null;
+ return;
+ }
+ mUids.addAll(nc.mUids);
+ }
+
+
+ /**
+ * The SSID of the network, or null if not applicable or unknown.
+ * <p>
+ * This is filled in by wifi code.
+ * @hide
+ */
+ private String mSSID;
+
+ /**
+ * Sets the SSID of this network.
+ * @hide
+ */
+ public NetworkCapabilities setSSID(String ssid) {
+ mSSID = ssid;
+ return this;
+ }
+
+ /**
+ * Gets the SSID of this network, or null if none or unknown.
+ * @hide
+ */
+ public String getSSID() {
+ return mSSID;
+ }
+
+ /**
+ * Tests if the SSID of this network is the same as the SSID of the passed network.
+ * @hide
+ */
+ public boolean equalsSSID(NetworkCapabilities nc) {
+ return Objects.equals(mSSID, nc.mSSID);
+ }
+
+ /**
+ * Check if the SSID requirements of this object are matched by the passed object.
+ * @hide
+ */
+ public boolean satisfiedBySSID(NetworkCapabilities nc) {
+ return mSSID == null || mSSID.equals(nc.mSSID);
+ }
+
+ /**
+ * Combine SSIDs of the capabilities.
+ * <p>
+ * This is only legal if either the SSID of this object is null, or both SSIDs are
+ * equal.
+ * @hide
+ */
+ private void combineSSIDs(NetworkCapabilities nc) {
+ if (mSSID != null && !mSSID.equals(nc.mSSID)) {
+ throw new IllegalStateException("Can't combine two SSIDs");
+ }
+ setSSID(nc.mSSID);
+ }
+
+ /**
+ * Combine a set of Capabilities to this one. Useful for coming up with the complete set.
+ * <p>
+ * Note that this method may break an invariant of having a particular capability in either
+ * wanted or unwanted lists but never in both. Requests that have the same capability in
+ * both lists will never be satisfied.
* @hide
*/
public void combineCapabilities(NetworkCapabilities nc) {
@@ -845,6 +1227,8 @@
combineLinkBandwidths(nc);
combineSpecifiers(nc);
combineSignalStrength(nc);
+ combineUids(nc);
+ combineSSIDs(nc);
}
/**
@@ -857,12 +1241,14 @@
* @hide
*/
private boolean satisfiedByNetworkCapabilities(NetworkCapabilities nc, boolean onlyImmutable) {
- return (nc != null &&
- satisfiedByNetCapabilities(nc, onlyImmutable) &&
- satisfiedByTransportTypes(nc) &&
- (onlyImmutable || satisfiedByLinkBandwidths(nc)) &&
- satisfiedBySpecifier(nc) &&
- (onlyImmutable || satisfiedBySignalStrength(nc)));
+ return (nc != null
+ && satisfiedByNetCapabilities(nc, onlyImmutable)
+ && satisfiedByTransportTypes(nc)
+ && (onlyImmutable || satisfiedByLinkBandwidths(nc))
+ && satisfiedBySpecifier(nc)
+ && (onlyImmutable || satisfiedBySignalStrength(nc))
+ && (onlyImmutable || satisfiedByUids(nc))
+ && (onlyImmutable || satisfiedBySSID(nc)));
}
/**
@@ -945,24 +1331,30 @@
@Override
public boolean equals(Object obj) {
if (obj == null || (obj instanceof NetworkCapabilities == false)) return false;
- NetworkCapabilities that = (NetworkCapabilities)obj;
- return (equalsNetCapabilities(that) &&
- equalsTransportTypes(that) &&
- equalsLinkBandwidths(that) &&
- equalsSignalStrength(that) &&
- equalsSpecifier(that));
+ NetworkCapabilities that = (NetworkCapabilities) obj;
+ return (equalsNetCapabilities(that)
+ && equalsTransportTypes(that)
+ && equalsLinkBandwidths(that)
+ && equalsSignalStrength(that)
+ && equalsSpecifier(that)
+ && equalsUids(that)
+ && equalsSSID(that));
}
@Override
public int hashCode() {
- return ((int)(mNetworkCapabilities & 0xFFFFFFFF) +
- ((int)(mNetworkCapabilities >> 32) * 3) +
- ((int)(mTransportTypes & 0xFFFFFFFF) * 5) +
- ((int)(mTransportTypes >> 32) * 7) +
- (mLinkUpBandwidthKbps * 11) +
- (mLinkDownBandwidthKbps * 13) +
- Objects.hashCode(mNetworkSpecifier) * 17 +
- (mSignalStrength * 19));
+ return (int) (mNetworkCapabilities & 0xFFFFFFFF)
+ + ((int) (mNetworkCapabilities >> 32) * 3)
+ + ((int) (mUnwantedNetworkCapabilities & 0xFFFFFFFF) * 5)
+ + ((int) (mUnwantedNetworkCapabilities >> 32) * 7)
+ + ((int) (mTransportTypes & 0xFFFFFFFF) * 11)
+ + ((int) (mTransportTypes >> 32) * 13)
+ + (mLinkUpBandwidthKbps * 17)
+ + (mLinkDownBandwidthKbps * 19)
+ + Objects.hashCode(mNetworkSpecifier) * 23
+ + (mSignalStrength * 29)
+ + Objects.hashCode(mUids) * 31
+ + Objects.hashCode(mSSID) * 37;
}
@Override
@@ -972,11 +1364,14 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(mNetworkCapabilities);
+ dest.writeLong(mUnwantedNetworkCapabilities);
dest.writeLong(mTransportTypes);
dest.writeInt(mLinkUpBandwidthKbps);
dest.writeInt(mLinkDownBandwidthKbps);
dest.writeParcelable((Parcelable) mNetworkSpecifier, flags);
dest.writeInt(mSignalStrength);
+ dest.writeArraySet(mUids);
+ dest.writeString(mSSID);
}
public static final Creator<NetworkCapabilities> CREATOR =
@@ -986,11 +1381,15 @@
NetworkCapabilities netCap = new NetworkCapabilities();
netCap.mNetworkCapabilities = in.readLong();
+ netCap.mUnwantedNetworkCapabilities = in.readLong();
netCap.mTransportTypes = in.readLong();
netCap.mLinkUpBandwidthKbps = in.readInt();
netCap.mLinkDownBandwidthKbps = in.readInt();
netCap.mNetworkSpecifier = in.readParcelable(null);
netCap.mSignalStrength = in.readInt();
+ netCap.mUids = (ArraySet<UidRange>) in.readArraySet(
+ null /* ClassLoader, null for default */);
+ netCap.mSSID = in.readString();
return netCap;
}
@Override
@@ -1001,29 +1400,77 @@
@Override
public String toString() {
- // TODO: enumerate bits for transports and capabilities instead of creating arrays.
- // TODO: use a StringBuilder instead of string concatenation.
- int[] types = getTransportTypes();
- String transports = (types.length > 0) ? " Transports: " + transportNamesOf(types) : "";
-
- types = getCapabilities();
- String capabilities = (types.length > 0 ? " Capabilities: " : "");
- for (int i = 0; i < types.length; ) {
- capabilities += capabilityNameOf(types[i]);
- if (++i < types.length) capabilities += "&";
+ final StringBuilder sb = new StringBuilder("[");
+ if (0 != mTransportTypes) {
+ sb.append(" Transports: ");
+ appendStringRepresentationOfBitMaskToStringBuilder(sb, mTransportTypes,
+ NetworkCapabilities::transportNameOf, "|");
+ }
+ if (0 != mNetworkCapabilities) {
+ sb.append(" Capabilities: ");
+ appendStringRepresentationOfBitMaskToStringBuilder(sb, mNetworkCapabilities,
+ NetworkCapabilities::capabilityNameOf, "&");
+ }
+ if (0 != mNetworkCapabilities) {
+ sb.append(" Unwanted: ");
+ appendStringRepresentationOfBitMaskToStringBuilder(sb, mUnwantedNetworkCapabilities,
+ NetworkCapabilities::capabilityNameOf, "&");
+ }
+ if (mLinkUpBandwidthKbps > 0) {
+ sb.append(" LinkUpBandwidth>=").append(mLinkUpBandwidthKbps).append("Kbps");
+ }
+ if (mLinkDownBandwidthKbps > 0) {
+ sb.append(" LinkDnBandwidth>=").append(mLinkDownBandwidthKbps).append("Kbps");
+ }
+ if (mNetworkSpecifier != null) {
+ sb.append(" Specifier: <").append(mNetworkSpecifier).append(">");
+ }
+ if (hasSignalStrength()) {
+ sb.append(" SignalStrength: ").append(mSignalStrength);
}
- String upBand = ((mLinkUpBandwidthKbps > 0) ? " LinkUpBandwidth>=" +
- mLinkUpBandwidthKbps + "Kbps" : "");
- String dnBand = ((mLinkDownBandwidthKbps > 0) ? " LinkDnBandwidth>=" +
- mLinkDownBandwidthKbps + "Kbps" : "");
+ if (null != mUids) {
+ if ((1 == mUids.size()) && (mUids.valueAt(0).count() == 1)) {
+ sb.append(" Uid: ").append(mUids.valueAt(0).start);
+ } else {
+ sb.append(" Uids: <").append(mUids).append(">");
+ }
+ }
+ if (mEstablishingVpnAppUid != INVALID_UID) {
+ sb.append(" EstablishingAppUid: ").append(mEstablishingVpnAppUid);
+ }
- String specifier = (mNetworkSpecifier == null ?
- "" : " Specifier: <" + mNetworkSpecifier + ">");
+ if (null != mSSID) {
+ sb.append(" SSID: ").append(mSSID);
+ }
- String signalStrength = (hasSignalStrength() ? " SignalStrength: " + mSignalStrength : "");
+ sb.append("]");
+ return sb.toString();
+ }
- return "[" + transports + capabilities + upBand + dnBand + specifier + signalStrength + "]";
+
+ private interface NameOf {
+ String nameOf(int value);
+ }
+ /**
+ * @hide
+ */
+ public static void appendStringRepresentationOfBitMaskToStringBuilder(StringBuilder sb,
+ long bitMask, NameOf nameFetcher, String separator) {
+ int bitPos = 0;
+ boolean firstElementAdded = false;
+ while (bitMask != 0) {
+ if ((bitMask & 1) != 0) {
+ if (firstElementAdded) {
+ sb.append(separator);
+ } else {
+ firstElementAdded = true;
+ }
+ sb.append(nameFetcher.nameOf(bitPos));
+ }
+ bitMask >>= 1;
+ ++bitPos;
+ }
}
/**
@@ -1065,6 +1512,8 @@
case NET_CAPABILITY_NOT_ROAMING: return "NOT_ROAMING";
case NET_CAPABILITY_FOREGROUND: return "FOREGROUND";
case NET_CAPABILITY_NOT_CONGESTED: return "NOT_CONGESTED";
+ case NET_CAPABILITY_NOT_SUSPENDED: return "NOT_SUSPENDED";
+ case NET_CAPABILITY_OEM_PAID: return "OEM_PAID";
default: return Integer.toString(capability);
}
}
@@ -1096,4 +1545,13 @@
Preconditions.checkArgument(
isValidTransport(transport), "Invalid TransportType " + transport);
}
+
+ private static boolean isValidCapability(@NetworkCapabilities.NetCapability int capability) {
+ return capability >= MIN_NET_CAPABILITY && capability <= MAX_NET_CAPABILITY;
+ }
+
+ private static void checkValidCapability(@NetworkCapabilities.NetCapability int capability) {
+ Preconditions.checkArgument(isValidCapability(capability),
+ "NetworkCapability " + capability + "out of range");
+ }
}
diff --git a/core/java/android/net/NetworkInfo.java b/core/java/android/net/NetworkInfo.java
index e6ad89a..999771a 100644
--- a/core/java/android/net/NetworkInfo.java
+++ b/core/java/android/net/NetworkInfo.java
@@ -38,14 +38,18 @@
* <table>
* <tr><td><b>Detailed state</b></td><td><b>Coarse-grained state</b></td></tr>
* <tr><td><code>IDLE</code></td><td><code>DISCONNECTED</code></td></tr>
- * <tr><td><code>SCANNING</code></td><td><code>CONNECTING</code></td></tr>
+ * <tr><td><code>SCANNING</code></td><td><code>DISCONNECTED</code></td></tr>
* <tr><td><code>CONNECTING</code></td><td><code>CONNECTING</code></td></tr>
* <tr><td><code>AUTHENTICATING</code></td><td><code>CONNECTING</code></td></tr>
+ * <tr><td><code>OBTAINING_IPADDR</code></td><td><code>CONNECTING</code></td></tr>
+ * <tr><td><code>VERIFYING_POOR_LINK</code></td><td><code>CONNECTING</code></td></tr>
+ * <tr><td><code>CAPTIVE_PORTAL_CHECK</code></td><td><code>CONNECTING</code></td></tr>
* <tr><td><code>CONNECTED</code></td><td><code>CONNECTED</code></td></tr>
+ * <tr><td><code>SUSPENDED</code></td><td><code>SUSPENDED</code></td></tr>
* <tr><td><code>DISCONNECTING</code></td><td><code>DISCONNECTING</code></td></tr>
* <tr><td><code>DISCONNECTED</code></td><td><code>DISCONNECTED</code></td></tr>
- * <tr><td><code>UNAVAILABLE</code></td><td><code>DISCONNECTED</code></td></tr>
* <tr><td><code>FAILED</code></td><td><code>DISCONNECTED</code></td></tr>
+ * <tr><td><code>BLOCKED</code></td><td><code>DISCONNECTED</code></td></tr>
* </table>
*/
public enum State {
@@ -163,8 +167,17 @@
* @return one of {@link ConnectivityManager#TYPE_MOBILE}, {@link
* ConnectivityManager#TYPE_WIFI}, {@link ConnectivityManager#TYPE_WIMAX}, {@link
* ConnectivityManager#TYPE_ETHERNET}, {@link ConnectivityManager#TYPE_BLUETOOTH}, or other
- * types defined by {@link ConnectivityManager}
+ * types defined by {@link ConnectivityManager}.
+ * @deprecated Callers should switch to checking {@link NetworkCapabilities#hasTransport}
+ * instead with one of the NetworkCapabilities#TRANSPORT_* constants :
+ * {@link #getType} and {@link #getTypeName} cannot account for networks using
+ * multiple transports. Note that generally apps should not care about transport;
+ * {@link NetworkCapabilities#NET_CAPABILITY_NOT_METERED} and
+ * {@link NetworkCapabilities#getLinkDownstreamBandwidthKbps} are calls that
+ * apps concerned with meteredness or bandwidth should be looking at, as they
+ * offer this information with much better accuracy.
*/
+ @Deprecated
public int getType() {
synchronized (this) {
return mNetworkType;
@@ -172,8 +185,10 @@
}
/**
+ * @deprecated Use {@link NetworkCapabilities} instead
* @hide
*/
+ @Deprecated
public void setType(int type) {
synchronized (this) {
mNetworkType = type;
@@ -205,7 +220,16 @@
* Return a human-readable name describe the type of the network,
* for example "WIFI" or "MOBILE".
* @return the name of the network type
+ * @deprecated Callers should switch to checking {@link NetworkCapabilities#hasTransport}
+ * instead with one of the NetworkCapabilities#TRANSPORT_* constants :
+ * {@link #getType} and {@link #getTypeName} cannot account for networks using
+ * multiple transports. Note that generally apps should not care about transport;
+ * {@link NetworkCapabilities#NET_CAPABILITY_NOT_METERED} and
+ * {@link NetworkCapabilities#getLinkDownstreamBandwidthKbps} are calls that
+ * apps concerned with meteredness or bandwidth should be looking at, as they
+ * offer this information with much better accuracy.
*/
+ @Deprecated
public String getTypeName() {
synchronized (this) {
return mTypeName;
@@ -230,7 +254,15 @@
* that the network is fully usable.
* @return {@code true} if network connectivity exists or is in the process
* of being established, {@code false} otherwise.
+ * @deprecated Apps should instead use the
+ * {@link android.net.ConnectivityManager.NetworkCallback} API to
+ * learn about connectivity changes.
+ * {@link ConnectivityManager#registerDefaultNetworkCallback} and
+ * {@link ConnectivityManager#registerNetworkCallback}. These will
+ * give a more accurate picture of the connectivity state of
+ * the device and let apps react more easily and quickly to changes.
*/
+ @Deprecated
public boolean isConnectedOrConnecting() {
synchronized (this) {
return mState == State.CONNECTED || mState == State.CONNECTING;
@@ -259,8 +291,18 @@
* data roaming has been disabled.</li>
* <li>The device's radio is turned off, e.g., because airplane mode is enabled.</li>
* </ul>
+ * Since Android L, this always returns {@code true}, because the system only
+ * returns info for available networks.
* @return {@code true} if the network is available, {@code false} otherwise
+ * @deprecated Apps should instead use the
+ * {@link android.net.ConnectivityManager.NetworkCallback} API to
+ * learn about connectivity changes.
+ * {@link ConnectivityManager#registerDefaultNetworkCallback} and
+ * {@link ConnectivityManager#registerNetworkCallback}. These will
+ * give a more accurate picture of the connectivity state of
+ * the device and let apps react more easily and quickly to changes.
*/
+ @Deprecated
public boolean isAvailable() {
synchronized (this) {
return mIsAvailable;
@@ -270,9 +312,11 @@
/**
* Sets if the network is available, ie, if the connectivity is possible.
* @param isAvailable the new availability value.
+ * @deprecated Use {@link NetworkCapabilities} instead
*
* @hide
*/
+ @Deprecated
public void setIsAvailable(boolean isAvailable) {
synchronized (this) {
mIsAvailable = isAvailable;
@@ -285,7 +329,10 @@
* network following a disconnect from another network.
* @return {@code true} if this is a failover attempt, {@code false}
* otherwise.
+ * @deprecated This field is not populated in recent Android releases,
+ * and does not make a lot of sense in a multi-network world.
*/
+ @Deprecated
public boolean isFailover() {
synchronized (this) {
return mIsFailover;
@@ -296,8 +343,10 @@
* Set the failover boolean.
* @param isFailover {@code true} to mark the current connection attempt
* as a failover.
+ * @deprecated This hasn't been set in any recent Android release.
* @hide
*/
+ @Deprecated
public void setFailover(boolean isFailover) {
synchronized (this) {
mIsFailover = isFailover;
@@ -322,7 +371,10 @@
}
}
- /** {@hide} */
+ /**
+ * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING} instead.
+ * {@hide}
+ */
@VisibleForTesting
@Deprecated
public void setRoaming(boolean isRoaming) {
@@ -334,7 +386,15 @@
/**
* Reports the current coarse-grained state of the network.
* @return the coarse-grained state
+ * @deprecated Apps should instead use the
+ * {@link android.net.ConnectivityManager.NetworkCallback} API to
+ * learn about connectivity changes.
+ * {@link ConnectivityManager#registerDefaultNetworkCallback} and
+ * {@link ConnectivityManager#registerNetworkCallback}. These will
+ * give a more accurate picture of the connectivity state of
+ * the device and let apps react more easily and quickly to changes.
*/
+ @Deprecated
public State getState() {
synchronized (this) {
return mState;
@@ -358,8 +418,10 @@
* if one was supplied. May be {@code null}.
* @param extraInfo an optional {@code String} providing addditional network state
* information passed up from the lower networking layers.
+ * @deprecated Use {@link NetworkCapabilities} instead.
* @hide
*/
+ @Deprecated
public void setDetailedState(DetailedState detailedState, String reason, String extraInfo) {
synchronized (this) {
this.mDetailedState = detailedState;
@@ -385,6 +447,8 @@
* Report the reason an attempt to establish connectivity failed,
* if one is available.
* @return the reason for failure, or null if not available
+ * @deprecated This method does not have a consistent contract that could make it useful
+ * to callers.
*/
public String getReason() {
synchronized (this) {
diff --git a/core/java/android/net/NetworkRequest.java b/core/java/android/net/NetworkRequest.java
index 97ded2d..f3669fb3 100644
--- a/core/java/android/net/NetworkRequest.java
+++ b/core/java/android/net/NetworkRequest.java
@@ -17,11 +17,15 @@
package android.net;
import android.annotation.NonNull;
+import android.net.NetworkCapabilities.NetCapability;
+import android.net.NetworkCapabilities.Transport;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.Process;
import android.text.TextUtils;
import java.util.Objects;
+import java.util.Set;
/**
* Defines a request for a network, made through {@link NetworkRequest.Builder} and used
@@ -131,12 +135,18 @@
* needed in terms of {@link NetworkCapabilities} features
*/
public static class Builder {
- private final NetworkCapabilities mNetworkCapabilities = new NetworkCapabilities();
+ private final NetworkCapabilities mNetworkCapabilities;
/**
* Default constructor for Builder.
*/
- public Builder() {}
+ public Builder() {
+ // By default, restrict this request to networks available to this app.
+ // Apps can rescind this restriction, but ConnectivityService will enforce
+ // it for apps that do not have the NETWORK_SETTINGS permission.
+ mNetworkCapabilities = new NetworkCapabilities();
+ mNetworkCapabilities.setSingleUid(Process.myUid());
+ }
/**
* Build {@link NetworkRequest} give the current set of capabilities.
@@ -187,8 +197,39 @@
* @hide
*/
public Builder setCapabilities(NetworkCapabilities nc) {
- mNetworkCapabilities.clearAll();
- mNetworkCapabilities.combineCapabilities(nc);
+ mNetworkCapabilities.set(nc);
+ return this;
+ }
+
+ /**
+ * Set the watched UIDs for this request. This will be reset and wiped out unless
+ * the calling app holds the CHANGE_NETWORK_STATE permission.
+ *
+ * @param uids The watched UIDs as a set of UidRanges, or null for everything.
+ * @return The builder to facilitate chaining.
+ * @hide
+ */
+ public Builder setUids(Set<UidRange> uids) {
+ mNetworkCapabilities.setUids(uids);
+ return this;
+ }
+
+ /**
+ * Add a capability that must not exist in the requested network.
+ * <p>
+ * If the capability was previously added to the list of required capabilities (for
+ * example, it was there by default or added using {@link #addCapability(int)} method), then
+ * it will be removed from the list of required capabilities as well.
+ *
+ * @see #addCapability(int)
+ *
+ * @param capability The capability to add to unwanted capability list.
+ * @return The builder to facilitate chaining.
+ *
+ * @hide
+ */
+ public Builder addUnwantedCapability(@NetworkCapabilities.NetCapability int capability) {
+ mNetworkCapabilities.addUnwantedCapability(capability);
return this;
}
@@ -383,6 +424,29 @@
return type == Type.BACKGROUND_REQUEST;
}
+ /**
+ * @see Builder#addCapability(int)
+ */
+ public boolean hasCapability(@NetCapability int capability) {
+ return networkCapabilities.hasCapability(capability);
+ }
+
+ /**
+ * @see Builder#addUnwantedCapability(int)
+ *
+ * @hide
+ */
+ public boolean hasUnwantedCapability(@NetCapability int capability) {
+ return networkCapabilities.hasUnwantedCapability(capability);
+ }
+
+ /**
+ * @see Builder#addTransportType(int)
+ */
+ public boolean hasTransport(@Transport int transportType) {
+ return networkCapabilities.hasTransport(transportType);
+ }
+
public String toString() {
return "NetworkRequest [ " + type + " id=" + requestId +
(legacyType != ConnectivityManager.TYPE_NONE ? ", legacyType=" + legacyType : "") +
diff --git a/core/java/android/net/NetworkStats.java b/core/java/android/net/NetworkStats.java
index 01b2b39..d6cbc88 100644
--- a/core/java/android/net/NetworkStats.java
+++ b/core/java/android/net/NetworkStats.java
@@ -31,6 +31,7 @@
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
+import java.util.Map;
import java.util.Objects;
/**
@@ -64,6 +65,9 @@
/** Debug {@link #set} value when the VPN stats are moved out of a vpn UID. */
public static final int SET_DBG_VPN_OUT = 1002;
+ /** Include all interfaces when filtering */
+ public static final String[] INTERFACES_ALL = null;
+
/** {@link #tag} value for total data across all tags. */
// TODO: Rename TAG_NONE to TAG_ALL.
public static final int TAG_NONE = 0;
@@ -94,6 +98,11 @@
/** Denotes a request for stats at the interface and UID level. */
public static final int STATS_PER_UID = 1;
+ private static final String CLATD_INTERFACE_PREFIX = "v4-";
+ // Delta between IPv4 header (20b) and IPv6 header (40b).
+ // Used for correct stats accounting on clatd interfaces.
+ private static final int IPV4V6_HEADER_DELTA = 20;
+
// TODO: move fields to "mVariable" notation
/**
@@ -359,23 +368,27 @@
capacity = newLength;
}
- iface[size] = entry.iface;
- uid[size] = entry.uid;
- set[size] = entry.set;
- tag[size] = entry.tag;
- metered[size] = entry.metered;
- roaming[size] = entry.roaming;
- defaultNetwork[size] = entry.defaultNetwork;
- rxBytes[size] = entry.rxBytes;
- rxPackets[size] = entry.rxPackets;
- txBytes[size] = entry.txBytes;
- txPackets[size] = entry.txPackets;
- operations[size] = entry.operations;
+ setValues(size, entry);
size++;
return this;
}
+ private void setValues(int i, Entry entry) {
+ iface[i] = entry.iface;
+ uid[i] = entry.uid;
+ set[i] = entry.set;
+ tag[i] = entry.tag;
+ metered[i] = entry.metered;
+ roaming[i] = entry.roaming;
+ defaultNetwork[i] = entry.defaultNetwork;
+ rxBytes[i] = entry.rxBytes;
+ rxPackets[i] = entry.rxPackets;
+ txBytes[i] = entry.txBytes;
+ txPackets[i] = entry.txPackets;
+ operations[i] = entry.operations;
+ }
+
/**
* Return specific stats entry.
*/
@@ -745,6 +758,75 @@
}
/**
+ * Calculate and apply adjustments to captured statistics for 464xlat traffic counted twice.
+ *
+ * <p>This mutates both base and stacked traffic stats, to account respectively for
+ * double-counted traffic and IPv4/IPv6 header size difference.
+ *
+ * <p>For 464xlat traffic, xt_qtaguid sees every IPv4 packet twice, once as a native IPv4
+ * packet on the stacked interface, and once as translated to an IPv6 packet on the
+ * base interface. For correct stats accounting on the base interface, every 464xlat
+ * packet needs to be subtracted from the root UID on the base interface both for tx
+ * and rx traffic (http://b/12249687, http:/b/33681750).
+ *
+ * <p>This method will behave fine if {@code stackedIfaces} is an non-synchronized but add-only
+ * {@code ConcurrentHashMap}
+ * @param baseTraffic Traffic on the base interfaces. Will be mutated.
+ * @param stackedTraffic Stats with traffic stacked on top of our ifaces. Will also be mutated.
+ * @param stackedIfaces Mapping ipv6if -> ipv4if interface where traffic is counted on both.
+ */
+ public static void apply464xlatAdjustments(NetworkStats baseTraffic,
+ NetworkStats stackedTraffic, Map<String, String> stackedIfaces) {
+ // Total 464xlat traffic to subtract from uid 0 on all base interfaces.
+ // stackedIfaces may grow afterwards, but NetworkStats will just be resized automatically.
+ final NetworkStats adjustments = new NetworkStats(0, stackedIfaces.size());
+
+ // For recycling
+ Entry entry = null;
+ Entry adjust = new NetworkStats.Entry(IFACE_ALL, 0, 0, 0, 0, 0, 0, 0L, 0L, 0L, 0L, 0L);
+
+ for (int i = 0; i < stackedTraffic.size; i++) {
+ entry = stackedTraffic.getValues(i, entry);
+ if (entry.iface == null || !entry.iface.startsWith(CLATD_INTERFACE_PREFIX)) {
+ continue;
+ }
+ final String baseIface = stackedIfaces.get(entry.iface);
+ if (baseIface == null) {
+ continue;
+ }
+ // Subtract any 464lat traffic seen for the root UID on the current base interface.
+ adjust.iface = baseIface;
+ adjust.rxBytes = -(entry.rxBytes + entry.rxPackets * IPV4V6_HEADER_DELTA);
+ adjust.txBytes = -(entry.txBytes + entry.txPackets * IPV4V6_HEADER_DELTA);
+ adjust.rxPackets = -entry.rxPackets;
+ adjust.txPackets = -entry.txPackets;
+ adjustments.combineValues(adjust);
+
+ // For 464xlat traffic, xt_qtaguid only counts the bytes of the native IPv4 packet sent
+ // on the stacked interface with prefix "v4-" and drops the IPv6 header size after
+ // unwrapping. To account correctly for on-the-wire traffic, add the 20 additional bytes
+ // difference for all packets (http://b/12249687, http:/b/33681750).
+ entry.rxBytes += entry.rxPackets * IPV4V6_HEADER_DELTA;
+ entry.txBytes += entry.txPackets * IPV4V6_HEADER_DELTA;
+ stackedTraffic.setValues(i, entry);
+ }
+
+ baseTraffic.combineAllValues(adjustments);
+ }
+
+ /**
+ * Calculate and apply adjustments to captured statistics for 464xlat traffic counted twice.
+ *
+ * <p>This mutates the object this method is called on. Equivalent to calling
+ * {@link #apply464xlatAdjustments(NetworkStats, NetworkStats, Map)} with {@code this} as
+ * base and stacked traffic.
+ * @param stackedIfaces Mapping ipv6if -> ipv4if interface where traffic is counted on both.
+ */
+ public void apply464xlatAdjustments(Map<String, String> stackedIfaces) {
+ apply464xlatAdjustments(this, this, stackedIfaces);
+ }
+
+ /**
* Return total statistics grouped by {@link #iface}; doesn't mutate the
* original structure.
*/
@@ -824,6 +906,39 @@
return stats;
}
+ /**
+ * Only keep entries that match all specified filters.
+ *
+ * <p>This mutates the original structure in place. After this method is called,
+ * size is the number of matching entries, and capacity is the previous capacity.
+ * @param limitUid UID to filter for, or {@link #UID_ALL}.
+ * @param limitIfaces Interfaces to filter for, or {@link #INTERFACES_ALL}.
+ * @param limitTag Tag to filter for, or {@link #TAG_ALL}.
+ */
+ public void filter(int limitUid, String[] limitIfaces, int limitTag) {
+ if (limitUid == UID_ALL && limitTag == TAG_ALL && limitIfaces == INTERFACES_ALL) {
+ return;
+ }
+
+ Entry entry = new Entry();
+ int nextOutputEntry = 0;
+ for (int i = 0; i < size; i++) {
+ entry = getValues(i, entry);
+ final boolean matches =
+ (limitUid == UID_ALL || limitUid == entry.uid)
+ && (limitTag == TAG_ALL || limitTag == entry.tag)
+ && (limitIfaces == INTERFACES_ALL
+ || ArrayUtils.contains(limitIfaces, entry.iface));
+
+ if (matches) {
+ setValues(nextOutputEntry, entry);
+ nextOutputEntry++;
+ }
+ }
+
+ size = nextOutputEntry;
+ }
+
public void dump(String prefix, PrintWriter pw) {
pw.print(prefix);
pw.print("NetworkStats: elapsedRealtime="); pw.println(elapsedRealtime);
diff --git a/core/java/android/net/NetworkUtils.java b/core/java/android/net/NetworkUtils.java
index fe9563d..9a5d502 100644
--- a/core/java/android/net/NetworkUtils.java
+++ b/core/java/android/net/NetworkUtils.java
@@ -16,19 +16,20 @@
package android.net;
-import java.io.FileDescriptor;
-import java.net.InetAddress;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.Collection;
-import java.util.Locale;
-
import android.os.Parcel;
import android.util.Log;
import android.util.Pair;
+import java.io.FileDescriptor;
+import java.math.BigInteger;
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+import java.util.Collection;
+import java.util.Locale;
+import java.util.TreeSet;
/**
* Native methods for managing network interfaces.
@@ -385,4 +386,72 @@
result = builder.toString();
return result;
}
+
+ /**
+ * Returns a prefix set without overlaps.
+ *
+ * This expects the src set to be sorted from shorter to longer. Results are undefined
+ * failing this condition. The returned prefix set is sorted in the same order as the
+ * passed set, with the same comparator.
+ */
+ private static TreeSet<IpPrefix> deduplicatePrefixSet(final TreeSet<IpPrefix> src) {
+ final TreeSet<IpPrefix> dst = new TreeSet<>(src.comparator());
+ // Prefixes match addresses that share their upper part up to their length, therefore
+ // the only kind of possible overlap in two prefixes is strict inclusion of the longer
+ // (more restrictive) in the shorter (including equivalence if they have the same
+ // length).
+ // Because prefixes in the src set are sorted from shorter to longer, deduplicating
+ // is done by simply iterating in order, and not adding any longer prefix that is
+ // already covered by a shorter one.
+ newPrefixes:
+ for (IpPrefix newPrefix : src) {
+ for (IpPrefix existingPrefix : dst) {
+ if (existingPrefix.containsPrefix(newPrefix)) {
+ continue newPrefixes;
+ }
+ }
+ dst.add(newPrefix);
+ }
+ return dst;
+ }
+
+ /**
+ * Returns how many IPv4 addresses match any of the prefixes in the passed ordered set.
+ *
+ * Obviously this returns an integral value between 0 and 2**32.
+ * The behavior is undefined if any of the prefixes is not an IPv4 prefix or if the
+ * set is not ordered smallest prefix to longer prefix.
+ *
+ * @param prefixes the set of prefixes, ordered by length
+ */
+ public static long routedIPv4AddressCount(final TreeSet<IpPrefix> prefixes) {
+ long routedIPCount = 0;
+ for (final IpPrefix prefix : deduplicatePrefixSet(prefixes)) {
+ if (!prefix.isIPv4()) {
+ Log.wtf(TAG, "Non-IPv4 prefix in routedIPv4AddressCount");
+ }
+ int rank = 32 - prefix.getPrefixLength();
+ routedIPCount += 1L << rank;
+ }
+ return routedIPCount;
+ }
+
+ /**
+ * Returns how many IPv6 addresses match any of the prefixes in the passed ordered set.
+ *
+ * This returns a BigInteger between 0 and 2**128.
+ * The behavior is undefined if any of the prefixes is not an IPv6 prefix or if the
+ * set is not ordered smallest prefix to longer prefix.
+ */
+ public static BigInteger routedIPv6AddressCount(final TreeSet<IpPrefix> prefixes) {
+ BigInteger routedIPCount = BigInteger.ZERO;
+ for (final IpPrefix prefix : deduplicatePrefixSet(prefixes)) {
+ if (!prefix.isIPv6()) {
+ Log.wtf(TAG, "Non-IPv6 prefix in routedIPv6AddressCount");
+ }
+ int rank = 128 - prefix.getPrefixLength();
+ routedIPCount = routedIPCount.add(BigInteger.ONE.shiftLeft(rank));
+ }
+ return routedIPCount;
+ }
}
diff --git a/core/java/android/net/OWNERS b/core/java/android/net/OWNERS
index 6758d95..3cd37bf 100644
--- a/core/java/android/net/OWNERS
+++ b/core/java/android/net/OWNERS
@@ -1,5 +1,6 @@
+set noparent
+
ek@google.com
-hugobenichi@google.com
jsharkey@android.com
jchalard@google.com
lorenzo@google.com
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index 0b1569c..a7aa380 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -19,11 +19,13 @@
import android.os.SystemProperties;
import android.util.Log;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.RoSystemProperties;
import com.android.org.conscrypt.Conscrypt;
import com.android.org.conscrypt.OpenSSLContextImpl;
import com.android.org.conscrypt.OpenSSLSocketImpl;
import com.android.org.conscrypt.SSLClientSessionCache;
+
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
@@ -31,6 +33,7 @@
import java.security.KeyManagementException;
import java.security.PrivateKey;
import java.security.cert.X509Certificate;
+
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
@@ -306,8 +309,10 @@
/**
* Returns an array containing the concatenation of length-prefixed byte
* strings.
+ * @hide
*/
- static byte[] toLengthPrefixedList(byte[]... items) {
+ @VisibleForTesting
+ public static byte[] toLengthPrefixedList(byte[]... items) {
if (items.length == 0) {
throw new IllegalArgumentException("items.length == 0");
}
diff --git a/core/java/android/net/SntpClient.java b/core/java/android/net/SntpClient.java
index ffc735c..ddf63ca 100644
--- a/core/java/android/net/SntpClient.java
+++ b/core/java/android/net/SntpClient.java
@@ -80,25 +80,31 @@
*
* @param host host name of the server.
* @param timeout network timeout in milliseconds.
+ * @param network network over which to send the request.
* @return true if the transaction was successful.
*/
- public boolean requestTime(String host, int timeout) {
+ public boolean requestTime(String host, int timeout, Network network) {
+ // This flag only affects DNS resolution and not other socket semantics,
+ // therefore it's safe to set unilaterally rather than take more
+ // defensive measures like making a copy.
+ network.setPrivateDnsBypass(true);
InetAddress address = null;
try {
- address = InetAddress.getByName(host);
+ address = network.getByName(host);
} catch (Exception e) {
EventLogTags.writeNtpFailure(host, e.toString());
if (DBG) Log.d(TAG, "request time failed: " + e);
return false;
}
- return requestTime(address, NTP_PORT, timeout);
+ return requestTime(address, NTP_PORT, timeout, network);
}
- public boolean requestTime(InetAddress address, int port, int timeout) {
+ public boolean requestTime(InetAddress address, int port, int timeout, Network network) {
DatagramSocket socket = null;
final int oldTag = TrafficStats.getAndSetThreadStatsTag(TrafficStats.TAG_SYSTEM_NTP);
try {
socket = new DatagramSocket();
+ network.bindSocket(socket);
socket.setSoTimeout(timeout);
byte[] buffer = new byte[NTP_PACKET_SIZE];
DatagramPacket request = new DatagramPacket(buffer, buffer.length, address, port);
@@ -168,6 +174,12 @@
return true;
}
+ @Deprecated
+ public boolean requestTime(String host, int timeout) {
+ Log.w(TAG, "Shame on you for calling the hidden API requestTime()!");
+ return false;
+ }
+
/**
* Returns the time computed from the NTP transaction.
*
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java
index 196a3bc..fa4624e 100644
--- a/core/java/android/net/TrafficStats.java
+++ b/core/java/android/net/TrafficStats.java
@@ -433,6 +433,10 @@
}
}
+ private static long addIfSupported(long stat) {
+ return (stat == UNSUPPORTED) ? 0 : stat;
+ }
+
/**
* Return number of packets transmitted across mobile networks since device
* boot. Counts packets across all mobile network interfaces, and always
@@ -445,7 +449,7 @@
public static long getMobileTxPackets() {
long total = 0;
for (String iface : getMobileIfaces()) {
- total += getTxPackets(iface);
+ total += addIfSupported(getTxPackets(iface));
}
return total;
}
@@ -462,7 +466,7 @@
public static long getMobileRxPackets() {
long total = 0;
for (String iface : getMobileIfaces()) {
- total += getRxPackets(iface);
+ total += addIfSupported(getRxPackets(iface));
}
return total;
}
@@ -479,7 +483,7 @@
public static long getMobileTxBytes() {
long total = 0;
for (String iface : getMobileIfaces()) {
- total += getTxBytes(iface);
+ total += addIfSupported(getTxBytes(iface));
}
return total;
}
@@ -496,7 +500,7 @@
public static long getMobileRxBytes() {
long total = 0;
for (String iface : getMobileIfaces()) {
- total += getRxBytes(iface);
+ total += addIfSupported(getRxBytes(iface));
}
return total;
}
@@ -511,9 +515,7 @@
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
- if (stat != UNSUPPORTED) {
- total += stat;
- }
+ total += addIfSupported(stat);
}
return total;
}
@@ -528,9 +530,7 @@
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
- if (stat != UNSUPPORTED) {
- total += stat;
- }
+ total += addIfSupported(stat);
}
return total;
}
diff --git a/core/java/android/net/UidRange.java b/core/java/android/net/UidRange.java
index fd465d9..3164929 100644
--- a/core/java/android/net/UidRange.java
+++ b/core/java/android/net/UidRange.java
@@ -21,8 +21,6 @@
import android.os.Parcel;
import android.os.Parcelable;
-import java.lang.IllegalArgumentException;
-
/**
* An inclusive range of UIDs.
*
@@ -53,6 +51,13 @@
}
/**
+ * Returns the count of UIDs in this range.
+ */
+ public int count() {
+ return 1 + stop - start;
+ }
+
+ /**
* @return {@code true} if this range contains every UID contained by the {@param other} range.
*/
public boolean containsRange(UidRange other) {
diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java
index d5377c7..e1556b4 100644
--- a/core/java/android/net/Uri.java
+++ b/core/java/android/net/Uri.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.Nullable;
import android.content.Intent;
import android.os.Environment;
import android.os.Parcel;
@@ -23,6 +24,8 @@
import android.os.StrictMode;
import android.util.Log;
+import libcore.net.UriCodec;
+
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@@ -38,8 +41,6 @@
import java.util.RandomAccess;
import java.util.Set;
-import libcore.net.UriCodec;
-
/**
* Immutable URI reference. A URI reference includes a URI and a fragment, the
* component of the URI following a '#'. Builds and parses URI references
@@ -174,6 +175,7 @@
*
* @return the scheme or null if this is a relative URI
*/
+ @Nullable
public abstract String getScheme();
/**
@@ -208,6 +210,7 @@
*
* @return the authority for this URI or null if not present
*/
+ @Nullable
public abstract String getAuthority();
/**
@@ -219,6 +222,7 @@
*
* @return the authority for this URI or null if not present
*/
+ @Nullable
public abstract String getEncodedAuthority();
/**
@@ -228,6 +232,7 @@
*
* @return the user info for this URI or null if not present
*/
+ @Nullable
public abstract String getUserInfo();
/**
@@ -237,6 +242,7 @@
*
* @return the user info for this URI or null if not present
*/
+ @Nullable
public abstract String getEncodedUserInfo();
/**
@@ -246,6 +252,7 @@
*
* @return the host for this URI or null if not present
*/
+ @Nullable
public abstract String getHost();
/**
@@ -262,6 +269,7 @@
* @return the decoded path, or null if this is not a hierarchical URI
* (like "mailto:nobody@google.com") or the URI is invalid
*/
+ @Nullable
public abstract String getPath();
/**
@@ -270,6 +278,7 @@
* @return the encoded path, or null if this is not a hierarchical URI
* (like "mailto:nobody@google.com") or the URI is invalid
*/
+ @Nullable
public abstract String getEncodedPath();
/**
@@ -280,6 +289,7 @@
*
* @return the decoded query or null if there isn't one
*/
+ @Nullable
public abstract String getQuery();
/**
@@ -290,6 +300,7 @@
*
* @return the encoded query or null if there isn't one
*/
+ @Nullable
public abstract String getEncodedQuery();
/**
@@ -297,6 +308,7 @@
*
* @return the decoded fragment or null if there isn't one
*/
+ @Nullable
public abstract String getFragment();
/**
@@ -304,6 +316,7 @@
*
* @return the encoded fragment or null if there isn't one
*/
+ @Nullable
public abstract String getEncodedFragment();
/**
@@ -318,6 +331,7 @@
*
* @return the decoded last segment or null if the path is empty
*/
+ @Nullable
public abstract String getLastPathSegment();
/**
@@ -370,7 +384,7 @@
if (scheme != null) {
if (scheme.equalsIgnoreCase("tel") || scheme.equalsIgnoreCase("sip")
|| scheme.equalsIgnoreCase("sms") || scheme.equalsIgnoreCase("smsto")
- || scheme.equalsIgnoreCase("mailto")) {
+ || scheme.equalsIgnoreCase("mailto") || scheme.equalsIgnoreCase("nfc")) {
StringBuilder builder = new StringBuilder(64);
builder.append(scheme);
builder.append(':');
@@ -1666,6 +1680,7 @@
* @throws NullPointerException if key is null
* @return the decoded value or null if no parameter is found
*/
+ @Nullable
public String getQueryParameter(String key) {
if (isOpaque()) {
throw new UnsupportedOperationException(NOT_HIERARCHICAL);
diff --git a/core/java/android/net/captiveportal/CaptivePortalProbeResult.java b/core/java/android/net/captiveportal/CaptivePortalProbeResult.java
new file mode 100644
index 0000000..1634694
--- /dev/null
+++ b/core/java/android/net/captiveportal/CaptivePortalProbeResult.java
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+package android.net.captiveportal;
+
+import android.annotation.Nullable;
+
+/**
+ * Result of calling isCaptivePortal().
+ * @hide
+ */
+public final class CaptivePortalProbeResult {
+ public static final int SUCCESS_CODE = 204;
+ public static final int FAILED_CODE = 599;
+ public static final int PORTAL_CODE = 302;
+
+ public static final CaptivePortalProbeResult FAILED = new CaptivePortalProbeResult(FAILED_CODE);
+ public static final CaptivePortalProbeResult SUCCESS =
+ new CaptivePortalProbeResult(SUCCESS_CODE);
+
+ private final int mHttpResponseCode; // HTTP response code returned from Internet probe.
+ public final String redirectUrl; // Redirect destination returned from Internet probe.
+ public final String detectUrl; // URL where a 204 response code indicates
+ // captive portal has been appeased.
+ @Nullable
+ public final CaptivePortalProbeSpec probeSpec;
+
+ public CaptivePortalProbeResult(int httpResponseCode) {
+ this(httpResponseCode, null, null);
+ }
+
+ public CaptivePortalProbeResult(int httpResponseCode, String redirectUrl, String detectUrl) {
+ this(httpResponseCode, redirectUrl, detectUrl, null);
+ }
+
+ public CaptivePortalProbeResult(int httpResponseCode, String redirectUrl, String detectUrl,
+ CaptivePortalProbeSpec probeSpec) {
+ mHttpResponseCode = httpResponseCode;
+ this.redirectUrl = redirectUrl;
+ this.detectUrl = detectUrl;
+ this.probeSpec = probeSpec;
+ }
+
+ public boolean isSuccessful() {
+ return mHttpResponseCode == SUCCESS_CODE;
+ }
+
+ public boolean isPortal() {
+ return !isSuccessful() && (mHttpResponseCode >= 200) && (mHttpResponseCode <= 399);
+ }
+
+ public boolean isFailed() {
+ return !isSuccessful() && !isPortal();
+ }
+}
diff --git a/core/java/android/net/captiveportal/CaptivePortalProbeSpec.java b/core/java/android/net/captiveportal/CaptivePortalProbeSpec.java
new file mode 100644
index 0000000..57a926a
--- /dev/null
+++ b/core/java/android/net/captiveportal/CaptivePortalProbeSpec.java
@@ -0,0 +1,180 @@
+/*
+ * 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.
+ */
+
+package android.net.captiveportal;
+
+import static android.net.captiveportal.CaptivePortalProbeResult.PORTAL_CODE;
+import static android.net.captiveportal.CaptivePortalProbeResult.SUCCESS_CODE;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.text.TextUtils;
+import android.util.Log;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+/** @hide */
+public abstract class CaptivePortalProbeSpec {
+ public static final String HTTP_LOCATION_HEADER_NAME = "Location";
+
+ private static final String TAG = CaptivePortalProbeSpec.class.getSimpleName();
+ private static final String REGEX_SEPARATOR = "@@/@@";
+ private static final String SPEC_SEPARATOR = "@@,@@";
+
+ private final String mEncodedSpec;
+ private final URL mUrl;
+
+ CaptivePortalProbeSpec(String encodedSpec, URL url) {
+ mEncodedSpec = encodedSpec;
+ mUrl = url;
+ }
+
+ /**
+ * Parse a {@link CaptivePortalProbeSpec} from a {@link String}.
+ *
+ * <p>The valid format is a URL followed by two regular expressions, each separated by "@@/@@".
+ * @throws MalformedURLException The URL has invalid format for {@link URL#URL(String)}.
+ * @throws ParseException The string is empty, does not match the above format, or a regular
+ * expression is invalid for {@link Pattern#compile(String)}.
+ */
+ @NonNull
+ public static CaptivePortalProbeSpec parseSpec(String spec) throws ParseException,
+ MalformedURLException {
+ if (TextUtils.isEmpty(spec)) {
+ throw new ParseException("Empty probe spec", 0 /* errorOffset */);
+ }
+
+ String[] splits = TextUtils.split(spec, REGEX_SEPARATOR);
+ if (splits.length != 3) {
+ throw new ParseException("Probe spec does not have 3 parts", 0 /* errorOffset */);
+ }
+
+ final int statusRegexPos = splits[0].length() + REGEX_SEPARATOR.length();
+ final int locationRegexPos = statusRegexPos + splits[1].length() + REGEX_SEPARATOR.length();
+ final Pattern statusRegex = parsePatternIfNonEmpty(splits[1], statusRegexPos);
+ final Pattern locationRegex = parsePatternIfNonEmpty(splits[2], locationRegexPos);
+
+ return new RegexMatchProbeSpec(spec, new URL(splits[0]), statusRegex, locationRegex);
+ }
+
+ @Nullable
+ private static Pattern parsePatternIfNonEmpty(String pattern, int pos) throws ParseException {
+ if (TextUtils.isEmpty(pattern)) {
+ return null;
+ }
+ try {
+ return Pattern.compile(pattern);
+ } catch (PatternSyntaxException e) {
+ throw new ParseException(
+ String.format("Invalid status pattern [%s]: %s", pattern, e),
+ pos /* errorOffset */);
+ }
+ }
+
+ /**
+ * Parse a {@link CaptivePortalProbeSpec} from a {@link String}, or return a fallback spec
+ * based on the status code of the provided URL if the spec cannot be parsed.
+ */
+ @Nullable
+ public static CaptivePortalProbeSpec parseSpecOrNull(@Nullable String spec) {
+ if (spec != null) {
+ try {
+ return parseSpec(spec);
+ } catch (ParseException | MalformedURLException e) {
+ Log.e(TAG, "Invalid probe spec: " + spec, e);
+ // Fall through
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Parse a config String to build an array of {@link CaptivePortalProbeSpec}.
+ *
+ * <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.
+ */
+ public static CaptivePortalProbeSpec[] parseCaptivePortalProbeSpecs(String settingsVal) {
+ List<CaptivePortalProbeSpec> specs = new ArrayList<>();
+ if (settingsVal != null) {
+ for (String spec : TextUtils.split(settingsVal, SPEC_SEPARATOR)) {
+ try {
+ specs.add(parseSpec(spec));
+ } catch (ParseException | MalformedURLException e) {
+ Log.e(TAG, "Invalid probe spec: " + spec, e);
+ }
+ }
+ }
+
+ if (specs.isEmpty()) {
+ Log.e(TAG, String.format("could not create any validation spec from %s", settingsVal));
+ }
+ return specs.toArray(new CaptivePortalProbeSpec[specs.size()]);
+ }
+
+ /**
+ * Get the probe result from HTTP status and location header.
+ */
+ public abstract CaptivePortalProbeResult getResult(int status, @Nullable String locationHeader);
+
+ public String getEncodedSpec() {
+ return mEncodedSpec;
+ }
+
+ public URL getUrl() {
+ return mUrl;
+ }
+
+ /**
+ * Implementation of {@link CaptivePortalProbeSpec} that is based on configurable regular
+ * expressions for the HTTP status code and location header (if any). Matches indicate that
+ * the page is not a portal.
+ * This probe cannot fail: it always returns SUCCESS_CODE or PORTAL_CODE
+ */
+ private static class RegexMatchProbeSpec extends CaptivePortalProbeSpec {
+ @Nullable
+ final Pattern mStatusRegex;
+ @Nullable
+ final Pattern mLocationHeaderRegex;
+
+ RegexMatchProbeSpec(
+ String spec, URL url, Pattern statusRegex, Pattern locationHeaderRegex) {
+ super(spec, url);
+ mStatusRegex = statusRegex;
+ mLocationHeaderRegex = locationHeaderRegex;
+ }
+
+ @Override
+ public CaptivePortalProbeResult getResult(int status, String locationHeader) {
+ final boolean statusMatch = safeMatch(String.valueOf(status), mStatusRegex);
+ final boolean locationMatch = safeMatch(locationHeader, mLocationHeaderRegex);
+ final int returnCode = statusMatch && locationMatch ? SUCCESS_CODE : PORTAL_CODE;
+ return new CaptivePortalProbeResult(
+ returnCode, locationHeader, getUrl().toString(), this);
+ }
+ }
+
+ private static boolean safeMatch(@Nullable String value, @Nullable Pattern pattern) {
+ // No value is a match ("no location header" passes the location rule for non-redirects)
+ return pattern == null || TextUtils.isEmpty(value) || pattern.matcher(value).matches();
+ }
+}
diff --git a/core/java/android/net/metrics/ApfStats.java b/core/java/android/net/metrics/ApfStats.java
index 3b0dc7e..76a781d 100644
--- a/core/java/android/net/metrics/ApfStats.java
+++ b/core/java/android/net/metrics/ApfStats.java
@@ -20,7 +20,7 @@
import android.os.Parcelable;
/**
- * An event logged for an interface with APF capabilities when its IpManager state machine exits.
+ * An event logged for an interface with APF capabilities when its IpClient state machine exits.
* {@hide}
*/
public final class ApfStats implements Parcelable {
diff --git a/core/java/android/net/metrics/IpManagerEvent.java b/core/java/android/net/metrics/IpManagerEvent.java
index a94b928..f8a63ce 100644
--- a/core/java/android/net/metrics/IpManagerEvent.java
+++ b/core/java/android/net/metrics/IpManagerEvent.java
@@ -40,11 +40,12 @@
public static final int ERROR_STARTING_IPV6 = 5;
public static final int ERROR_STARTING_IPREACHABILITYMONITOR = 6;
public static final int ERROR_INVALID_PROVISIONING = 7;
+ public static final int ERROR_INTERFACE_NOT_FOUND = 8;
@IntDef(value = {
PROVISIONING_OK, PROVISIONING_FAIL, COMPLETE_LIFECYCLE,
ERROR_STARTING_IPV4, ERROR_STARTING_IPV6, ERROR_STARTING_IPREACHABILITYMONITOR,
- ERROR_INVALID_PROVISIONING,
+ ERROR_INVALID_PROVISIONING, ERROR_INTERFACE_NOT_FOUND,
})
@Retention(RetentionPolicy.SOURCE)
public @interface EventType {}
diff --git a/core/java/android/net/metrics/NetworkMetrics.java b/core/java/android/net/metrics/NetworkMetrics.java
index 2b662a0..66d92c4 100644
--- a/core/java/android/net/metrics/NetworkMetrics.java
+++ b/core/java/android/net/metrics/NetworkMetrics.java
@@ -96,6 +96,16 @@
}
}
+ /** Accumulate a single netd sock_diag poll result reported by netd. */
+ public void addTcpStatsResult(int sent, int lost, int rttUs, int sentAckDiffMs) {
+ if (pendingSummary == null) {
+ pendingSummary = new Summary(netId, transports);
+ }
+ pendingSummary.tcpLossRate.count(lost, sent);
+ pendingSummary.roundTripTimeUs.count(rttUs);
+ pendingSummary.sentAckTimeDiffenceMs.count(sentAckDiffMs);
+ }
+
/** Represents running sums for dns and connect average error counts and average latencies. */
public static class Summary {
@@ -109,6 +119,13 @@
public final Metrics connectLatencies = new Metrics();
// Blocking and non blocking connect error rate measured in percentage points.
public final Metrics connectErrorRate = new Metrics();
+ // TCP socket packet loss stats collected from Netlink sock_diag.
+ public final Metrics tcpLossRate = new Metrics();
+ // TCP averaged microsecond round-trip-time stats collected from Netlink sock_diag.
+ public final Metrics roundTripTimeUs = new Metrics();
+ // TCP stats collected from Netlink sock_diag that averages millisecond per-socket
+ // differences between last packet sent timestamp and last ack received timestamp.
+ public final Metrics sentAckTimeDiffenceMs = new Metrics();
public Summary(int netId, long transports) {
this.netId = netId;
@@ -120,6 +137,7 @@
dnsErrorRate.merge(that.dnsErrorRate);
connectLatencies.merge(that.connectLatencies);
connectErrorRate.merge(that.connectErrorRate);
+ tcpLossRate.merge(that.tcpLossRate);
}
@Override
@@ -135,6 +153,10 @@
j.add(String.format("connect avg=%dms max=%dms err=%.1f%% tot=%d",
(int) connectLatencies.average(), (int) connectLatencies.max,
100 * connectErrorRate.average(), connectErrorRate.count));
+ j.add(String.format("tcp avg_loss=%.1f%% total_sent=%d total_lost=%d",
+ 100 * tcpLossRate.average(), tcpLossRate.count, (int) tcpLossRate.sum));
+ j.add(String.format("tcp rtt=%dms", (int) (roundTripTimeUs.average() / 1000)));
+ j.add(String.format("tcp sent-ack_diff=%dms", (int) sentAckTimeDiffenceMs.average()));
return j.toString();
}
}
@@ -152,7 +174,11 @@
}
void count(double value) {
- count++;
+ count(value, 1);
+ }
+
+ void count(double value, int subcount) {
+ count += subcount;
sum += value;
max = Math.max(max, value);
}
diff --git a/services/net/java/android/net/util/IpUtils.java b/core/java/android/net/util/IpUtils.java
similarity index 100%
rename from services/net/java/android/net/util/IpUtils.java
rename to core/java/android/net/util/IpUtils.java
diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java
index debef63..c3f23a1 100644
--- a/core/java/android/nfc/NfcAdapter.java
+++ b/core/java/android/nfc/NfcAdapter.java
@@ -147,6 +147,19 @@
public static final String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED";
/**
+ * Broadcast Action: Intent to notify an application that an transaction event has occurred
+ * on the Secure Element.
+ *
+ * <p>This intent will only be sent if the application has requested permission for
+ * {@link android.Manifest.permission#NFC_TRANSACTION_EVENT} and if the application has the
+ * necessary access to Secure Element which witnessed the particular event.
+ */
+ @RequiresPermission(android.Manifest.permission.NFC_TRANSACTION_EVENT)
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_TRANSACTION_DETECTED =
+ "android.nfc.action.TRANSACTION_DETECTED";
+
+ /**
* Broadcast to only the activity that handles ACTION_TAG_DISCOVERED
* @hide
*/
@@ -197,6 +210,23 @@
*/
public static final String EXTRA_ADAPTER_STATE = "android.nfc.extra.ADAPTER_STATE";
+ /**
+ * Mandatory byte[] extra field in {@link #ACTION_TRANSACTION_DETECTED}
+ */
+ public static final String EXTRA_AID = "android.nfc.extra.AID";
+
+ /**
+ * Optional byte[] extra field in {@link #ACTION_TRANSACTION_DETECTED}
+ */
+ public static final String EXTRA_DATA = "android.nfc.extra.DATA";
+
+ /**
+ * Mandatory String extra field in {@link #ACTION_TRANSACTION_DETECTED}
+ * Indicates the Secure Element on which the transaction occurred.
+ * eSE1...eSEn for Embedded Secure Elements, SIM1...SIMn for UICC, etc.
+ */
+ public static final String EXTRA_SECURE_ELEMENT_NAME = "android.nfc.extra.SECURE_ELEMENT_NAME";
+
public static final int STATE_OFF = 1;
public static final int STATE_TURNING_ON = 2;
public static final int STATE_ON = 3;
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java
index 336e1b4..5652d6d 100644
--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -22,6 +22,7 @@
import android.util.Log;
import android.util.Slog;
+import com.android.internal.os.BinderInternal;
import com.android.internal.util.FastPrintWriter;
import com.android.internal.util.FunctionalUtils.ThrowingRunnable;
import com.android.internal.util.FunctionalUtils.ThrowingSupplier;
@@ -361,7 +362,9 @@
* Add the calling thread to the IPC thread pool. This function does
* not return until the current process is exiting.
*/
- public static final native void joinThreadPool();
+ public static final void joinThreadPool() {
+ BinderInternal.joinThreadPool();
+ }
/**
* Returns true if the specified interface is a proxy.
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 3f98a88..d44d515 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -188,7 +188,11 @@
public static final String INCREMENTAL = getString("ro.build.version.incremental");
/**
- * The user-visible version string. E.g., "1.0" or "3.4b5".
+ * The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas".
+ *
+ * This field is an opaque string. Do not assume that its value
+ * has any particular structure or that values of RELEASE from
+ * different releases can be somehow ordered.
*/
public static final String RELEASE = getString("ro.build.version.release");
diff --git a/core/java/android/os/ChildZygoteProcess.java b/core/java/android/os/ChildZygoteProcess.java
new file mode 100644
index 0000000..337a3e2
--- /dev/null
+++ b/core/java/android/os/ChildZygoteProcess.java
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+package android.os;
+
+import android.net.LocalSocketAddress;
+
+/**
+ * Represents a connection to a child-zygote process. A child-zygote is spawend from another
+ * zygote process using {@link startChildZygote()}.
+ *
+ * {@hide}
+ */
+public class ChildZygoteProcess extends ZygoteProcess {
+ /**
+ * The PID of the child zygote process.
+ */
+ private final int mPid;
+
+ ChildZygoteProcess(LocalSocketAddress socketAddress, int pid) {
+ super(socketAddress, null);
+ mPid = pid;
+ }
+
+ /**
+ * Returns the PID of the child-zygote process.
+ */
+ public int getPid() {
+ return mPid;
+ }
+}
diff --git a/core/java/android/os/CommonClock.java b/core/java/android/os/CommonClock.java
deleted file mode 100644
index 2ecf317..0000000
--- a/core/java/android/os/CommonClock.java
+++ /dev/null
@@ -1,405 +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.
- */
-package android.os;
-
-import java.net.InetSocketAddress;
-import java.util.NoSuchElementException;
-import android.os.Binder;
-import android.os.CommonTimeUtils;
-import android.os.IBinder;
-import android.os.Parcel;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-
-/**
- * Used for accessing the android common time service's common clock and receiving notifications
- * about common time synchronization status changes.
- * @hide
- */
-public class CommonClock {
- /**
- * Sentinel value returned by {@link #getTime()} and {@link #getEstimatedError()} when the
- * common time service is not able to determine the current common time due to a lack of
- * synchronization.
- */
- public static final long TIME_NOT_SYNCED = -1;
-
- /**
- * Sentinel value returned by {@link #getTimelineId()} when the common time service is not
- * currently synced to any timeline.
- */
- public static final long INVALID_TIMELINE_ID = 0;
-
- /**
- * Sentinel value returned by {@link #getEstimatedError()} when the common time service is not
- * currently synced to any timeline.
- */
- public static final int ERROR_ESTIMATE_UNKNOWN = 0x7FFFFFFF;
-
- /**
- * Value used by {@link #getState()} to indicate that there was an internal error while
- * attempting to determine the state of the common time service.
- */
- public static final int STATE_INVALID = -1;
-
- /**
- * Value used by {@link #getState()} to indicate that the common time service is in its initial
- * state and attempting to find the current timeline master, if any. The service will
- * transition to either {@link #STATE_CLIENT} if it finds an active master, or to
- * {@link #STATE_MASTER} if no active master is found and this client becomes the master of a
- * new timeline.
- */
- public static final int STATE_INITIAL = 0;
-
- /**
- * Value used by {@link #getState()} to indicate that the common time service is in its client
- * state and is synchronizing its time to a different timeline master on the network.
- */
- public static final int STATE_CLIENT = 1;
-
- /**
- * Value used by {@link #getState()} to indicate that the common time service is in its master
- * state and is serving as the timeline master for other common time service clients on the
- * network.
- */
- public static final int STATE_MASTER = 2;
-
- /**
- * Value used by {@link #getState()} to indicate that the common time service is in its Ronin
- * state. Common time service instances in the client state enter the Ronin state after their
- * timeline master becomes unreachable on the network. Common time services who enter the Ronin
- * state will begin a new master election for the timeline they were recently clients of. As
- * clients detect they are not the winner and drop out of the election, they will transition to
- * the {@link #STATE_WAIT_FOR_ELECTION} state. When there is only one client remaining in the
- * election, it will assume ownership of the timeline and transition to the
- * {@link #STATE_MASTER} state. During the election, all clients will allow their timeline to
- * drift without applying correction.
- */
- public static final int STATE_RONIN = 3;
-
- /**
- * Value used by {@link #getState()} to indicate that the common time service is waiting for a
- * master election to conclude and for the new master to announce itself before transitioning to
- * the {@link #STATE_CLIENT} state. If no new master announces itself within the timeout
- * threshold, the time service will transition back to the {@link #STATE_RONIN} state in order
- * to restart the election.
- */
- public static final int STATE_WAIT_FOR_ELECTION = 4;
-
- /**
- * Name of the underlying native binder service
- */
- public static final String SERVICE_NAME = "common_time.clock";
-
- /**
- * Class constructor.
- * @throws android.os.RemoteException
- */
- public CommonClock()
- throws RemoteException {
- mRemote = ServiceManager.getService(SERVICE_NAME);
- if (null == mRemote)
- throw new RemoteException();
-
- mInterfaceDesc = mRemote.getInterfaceDescriptor();
- mUtils = new CommonTimeUtils(mRemote, mInterfaceDesc);
- mRemote.linkToDeath(mDeathHandler, 0);
- registerTimelineChangeListener();
- }
-
- /**
- * Handy class factory method.
- */
- static public CommonClock create() {
- CommonClock retVal;
-
- try {
- retVal = new CommonClock();
- }
- catch (RemoteException e) {
- retVal = null;
- }
-
- return retVal;
- }
-
- /**
- * Release all native resources held by this {@link android.os.CommonClock} instance. Once
- * resources have been released, the {@link android.os.CommonClock} instance is disconnected from
- * the native service and will throw a {@link android.os.RemoteException} if any of its
- * methods are called. Clients should always call release on their client instances before
- * releasing their last Java reference to the instance. Failure to do this will cause
- * non-deterministic native resource reclamation and may cause the common time service to remain
- * active on the network for longer than it should.
- */
- public void release() {
- unregisterTimelineChangeListener();
- if (null != mRemote) {
- try {
- mRemote.unlinkToDeath(mDeathHandler, 0);
- }
- catch (NoSuchElementException e) { }
- mRemote = null;
- }
- mUtils = null;
- }
-
- /**
- * Gets the common clock's current time.
- *
- * @return a signed 64-bit value representing the current common time in microseconds, or the
- * special value {@link #TIME_NOT_SYNCED} if the common time service is currently not
- * synchronized.
- * @throws android.os.RemoteException
- */
- public long getTime()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetLong(METHOD_GET_COMMON_TIME, TIME_NOT_SYNCED);
- }
-
- /**
- * Gets the current estimation of common clock's synchronization accuracy from the common time
- * service.
- *
- * @return a signed 32-bit value representing the common time service's estimation of
- * synchronization accuracy in microseconds, or the special value
- * {@link #ERROR_ESTIMATE_UNKNOWN} if the common time service is currently not synchronized.
- * Negative values indicate that the local server estimates that the nominal common time is
- * behind the local server's time (in other words, the local clock is running fast) Positive
- * values indicate that the local server estimates that the nominal common time is ahead of the
- * local server's time (in other words, the local clock is running slow)
- * @throws android.os.RemoteException
- */
- public int getEstimatedError()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetInt(METHOD_GET_ESTIMATED_ERROR, ERROR_ESTIMATE_UNKNOWN);
- }
-
- /**
- * Gets the ID of the timeline the common time service is currently synchronizing its clock to.
- *
- * @return a long representing the unique ID of the timeline the common time service is
- * currently synchronizing with, or {@link #INVALID_TIMELINE_ID} if the common time service is
- * currently not synchronized.
- * @throws android.os.RemoteException
- */
- public long getTimelineId()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetLong(METHOD_GET_TIMELINE_ID, INVALID_TIMELINE_ID);
- }
-
- /**
- * Gets the current state of this clock's common time service in the the master election
- * algorithm.
- *
- * @return a integer indicating the current state of the this clock's common time service in the
- * master election algorithm or {@link #STATE_INVALID} if there is an internal error.
- * @throws android.os.RemoteException
- */
- public int getState()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetInt(METHOD_GET_STATE, STATE_INVALID);
- }
-
- /**
- * Gets the IP address and UDP port of the current timeline master.
- *
- * @return an InetSocketAddress containing the IP address and UDP port of the current timeline
- * master, or null if there is no current master.
- * @throws android.os.RemoteException
- */
- public InetSocketAddress getMasterAddr()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetSockaddr(METHOD_GET_MASTER_ADDRESS);
- }
-
- /**
- * The OnTimelineChangedListener interface defines a method called by the
- * {@link android.os.CommonClock} instance to indicate that the time synchronization service has
- * either synchronized with a new timeline, or is no longer a member of any timeline. The
- * client application can implement this interface and register the listener with the
- * {@link #setTimelineChangedListener(OnTimelineChangedListener)} method.
- */
- public interface OnTimelineChangedListener {
- /**
- * Method called when the time service's timeline has changed.
- *
- * @param newTimelineId a long which uniquely identifies the timeline the time
- * synchronization service is now a member of, or {@link #INVALID_TIMELINE_ID} if the the
- * service is not synchronized to any timeline.
- */
- void onTimelineChanged(long newTimelineId);
- }
-
- /**
- * Registers an OnTimelineChangedListener interface.
- * <p>Call this method with a null listener to stop receiving server death notifications.
- */
- public void setTimelineChangedListener(OnTimelineChangedListener listener) {
- synchronized (mListenerLock) {
- mTimelineChangedListener = listener;
- }
- }
-
- /**
- * The OnServerDiedListener interface defines a method called by the
- * {@link android.os.CommonClock} instance to indicate that the connection to the native media
- * server has been broken and that the {@link android.os.CommonClock} instance will need to be
- * released and re-created. The client application can implement this interface and register
- * the listener with the {@link #setServerDiedListener(OnServerDiedListener)} method.
- */
- public interface OnServerDiedListener {
- /**
- * Method called when the native media server has died. <p>If the native common time
- * service encounters a fatal error and needs to restart, the binder connection from the
- * {@link android.os.CommonClock} instance to the common time service will be broken. To
- * restore functionality, clients should {@link #release()} their old visualizer and create
- * a new instance.
- */
- void onServerDied();
- }
-
- /**
- * Registers an OnServerDiedListener interface.
- * <p>Call this method with a null listener to stop receiving server death notifications.
- */
- public void setServerDiedListener(OnServerDiedListener listener) {
- synchronized (mListenerLock) {
- mServerDiedListener = listener;
- }
- }
-
- protected void finalize() throws Throwable { release(); }
-
- private void throwOnDeadServer() throws RemoteException {
- if ((null == mRemote) || (null == mUtils))
- throw new RemoteException();
- }
-
- private final Object mListenerLock = new Object();
- private OnTimelineChangedListener mTimelineChangedListener = null;
- private OnServerDiedListener mServerDiedListener = null;
-
- private IBinder mRemote = null;
- private String mInterfaceDesc = "";
- private CommonTimeUtils mUtils;
-
- private IBinder.DeathRecipient mDeathHandler = new IBinder.DeathRecipient() {
- public void binderDied() {
- synchronized (mListenerLock) {
- if (null != mServerDiedListener)
- mServerDiedListener.onServerDied();
- }
- }
- };
-
- private class TimelineChangedListener extends Binder {
- @Override
- protected boolean onTransact(int code, Parcel data, Parcel reply, int flags)
- throws RemoteException {
- switch (code) {
- case METHOD_CBK_ON_TIMELINE_CHANGED:
- data.enforceInterface(DESCRIPTOR);
- long timelineId = data.readLong();
- synchronized (mListenerLock) {
- if (null != mTimelineChangedListener)
- mTimelineChangedListener.onTimelineChanged(timelineId);
- }
- return true;
- }
-
- return super.onTransact(code, data, reply, flags);
- }
-
- private static final String DESCRIPTOR = "android.os.ICommonClockListener";
- };
-
- private TimelineChangedListener mCallbackTgt = null;
-
- private void registerTimelineChangeListener() throws RemoteException {
- if (null != mCallbackTgt)
- return;
-
- boolean success = false;
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
- mCallbackTgt = new TimelineChangedListener();
-
- try {
- data.writeInterfaceToken(mInterfaceDesc);
- data.writeStrongBinder(mCallbackTgt);
- mRemote.transact(METHOD_REGISTER_LISTENER, data, reply, 0);
- success = (0 == reply.readInt());
- }
- catch (RemoteException e) {
- success = false;
- }
- finally {
- reply.recycle();
- data.recycle();
- }
-
- // Did we catch a remote exception or fail to register our callback target? If so, our
- // object must already be dead (or be as good as dead). Clear out all of our state so that
- // our other methods will properly indicate a dead object.
- if (!success) {
- mCallbackTgt = null;
- mRemote = null;
- mUtils = null;
- }
- }
-
- private void unregisterTimelineChangeListener() {
- if (null == mCallbackTgt)
- return;
-
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
-
- try {
- data.writeInterfaceToken(mInterfaceDesc);
- data.writeStrongBinder(mCallbackTgt);
- mRemote.transact(METHOD_UNREGISTER_LISTENER, data, reply, 0);
- }
- catch (RemoteException e) { }
- finally {
- reply.recycle();
- data.recycle();
- mCallbackTgt = null;
- }
- }
-
- private static final int METHOD_IS_COMMON_TIME_VALID = IBinder.FIRST_CALL_TRANSACTION;
- private static final int METHOD_COMMON_TIME_TO_LOCAL_TIME = METHOD_IS_COMMON_TIME_VALID + 1;
- private static final int METHOD_LOCAL_TIME_TO_COMMON_TIME = METHOD_COMMON_TIME_TO_LOCAL_TIME + 1;
- private static final int METHOD_GET_COMMON_TIME = METHOD_LOCAL_TIME_TO_COMMON_TIME + 1;
- private static final int METHOD_GET_COMMON_FREQ = METHOD_GET_COMMON_TIME + 1;
- private static final int METHOD_GET_LOCAL_TIME = METHOD_GET_COMMON_FREQ + 1;
- private static final int METHOD_GET_LOCAL_FREQ = METHOD_GET_LOCAL_TIME + 1;
- private static final int METHOD_GET_ESTIMATED_ERROR = METHOD_GET_LOCAL_FREQ + 1;
- private static final int METHOD_GET_TIMELINE_ID = METHOD_GET_ESTIMATED_ERROR + 1;
- private static final int METHOD_GET_STATE = METHOD_GET_TIMELINE_ID + 1;
- private static final int METHOD_GET_MASTER_ADDRESS = METHOD_GET_STATE + 1;
- private static final int METHOD_REGISTER_LISTENER = METHOD_GET_MASTER_ADDRESS + 1;
- private static final int METHOD_UNREGISTER_LISTENER = METHOD_REGISTER_LISTENER + 1;
-
- private static final int METHOD_CBK_ON_TIMELINE_CHANGED = IBinder.FIRST_CALL_TRANSACTION;
-}
diff --git a/core/java/android/os/CommonTimeConfig.java b/core/java/android/os/CommonTimeConfig.java
deleted file mode 100644
index 1f9fab5..0000000
--- a/core/java/android/os/CommonTimeConfig.java
+++ /dev/null
@@ -1,447 +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.
- */
-package android.os;
-
-import java.net.InetSocketAddress;
-import java.util.NoSuchElementException;
-
-import android.os.CommonTimeUtils;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-
-/**
- * Used for configuring and controlling the status of the android common time service.
- * @hide
- */
-public class CommonTimeConfig {
- /**
- * Successful operation.
- */
- public static final int SUCCESS = 0;
- /**
- * Unspecified error.
- */
- public static final int ERROR = -1;
- /**
- * Operation failed due to bad parameter value.
- */
- public static final int ERROR_BAD_VALUE = -4;
- /**
- * Operation failed due to dead remote object.
- */
- public static final int ERROR_DEAD_OBJECT = -7;
-
- /**
- * Sentinel value returned by {@link #getMasterElectionGroupId()} when an error occurs trying to
- * fetch the master election group.
- */
- public static final long INVALID_GROUP_ID = -1;
-
- /**
- * Name of the underlying native binder service
- */
- public static final String SERVICE_NAME = "common_time.config";
-
- /**
- * Class constructor.
- * @throws android.os.RemoteException
- */
- public CommonTimeConfig()
- throws RemoteException {
- mRemote = ServiceManager.getService(SERVICE_NAME);
- if (null == mRemote)
- throw new RemoteException();
-
- mInterfaceDesc = mRemote.getInterfaceDescriptor();
- mUtils = new CommonTimeUtils(mRemote, mInterfaceDesc);
- mRemote.linkToDeath(mDeathHandler, 0);
- }
-
- /**
- * Handy class factory method.
- */
- static public CommonTimeConfig create() {
- CommonTimeConfig retVal;
-
- try {
- retVal = new CommonTimeConfig();
- }
- catch (RemoteException e) {
- retVal = null;
- }
-
- return retVal;
- }
-
- /**
- * Release all native resources held by this {@link android.os.CommonTimeConfig} instance. Once
- * resources have been released, the {@link android.os.CommonTimeConfig} instance is
- * disconnected from the native service and will throw a {@link android.os.RemoteException} if
- * any of its methods are called. Clients should always call release on their client instances
- * before releasing their last Java reference to the instance. Failure to do this will cause
- * non-deterministic native resource reclamation and may cause the common time service to remain
- * active on the network for longer than it should.
- */
- public void release() {
- if (null != mRemote) {
- try {
- mRemote.unlinkToDeath(mDeathHandler, 0);
- }
- catch (NoSuchElementException e) { }
- mRemote = null;
- }
- mUtils = null;
- }
-
- /**
- * Gets the current priority of the common time service used in the master election protocol.
- *
- * @return an 8 bit value indicating the priority of this common time service relative to other
- * common time services operating in the same domain.
- * @throws android.os.RemoteException
- */
- public byte getMasterElectionPriority()
- throws RemoteException {
- throwOnDeadServer();
- return (byte)mUtils.transactGetInt(METHOD_GET_MASTER_ELECTION_PRIORITY, -1);
- }
-
- /**
- * Sets the current priority of the common time service used in the master election protocol.
- *
- * @param priority priority of the common time service used in the master election protocol.
- * Lower numbers are lower priority.
- * @return {@link #SUCCESS} in case of success,
- * {@link #ERROR} or {@link #ERROR_DEAD_OBJECT} in case of failure.
- */
- public int setMasterElectionPriority(byte priority) {
- if (checkDeadServer())
- return ERROR_DEAD_OBJECT;
- return mUtils.transactSetInt(METHOD_SET_MASTER_ELECTION_PRIORITY, priority);
- }
-
- /**
- * Gets the IP endpoint used by the time service to participate in the master election protocol.
- *
- * @return an InetSocketAddress containing the IP address and UDP port being used by the
- * system's common time service to participate in the master election protocol.
- * @throws android.os.RemoteException
- */
- public InetSocketAddress getMasterElectionEndpoint()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetSockaddr(METHOD_GET_MASTER_ELECTION_ENDPOINT);
- }
-
- /**
- * Sets the IP endpoint used by the common time service to participate in the master election
- * protocol.
- *
- * @param ep The IP address and UDP port to be used by the common time service to participate in
- * the master election protocol. The supplied IP address must be either the broadcast or
- * multicast address, unicast addresses are considered to be illegal values.
- * @return {@link #SUCCESS} in case of success,
- * {@link #ERROR}, {@link #ERROR_BAD_VALUE} or {@link #ERROR_DEAD_OBJECT} in case of failure.
- */
- public int setMasterElectionEndpoint(InetSocketAddress ep) {
- if (checkDeadServer())
- return ERROR_DEAD_OBJECT;
- return mUtils.transactSetSockaddr(METHOD_SET_MASTER_ELECTION_ENDPOINT, ep);
- }
-
- /**
- * Gets the current group ID used by the common time service in the master election protocol.
- *
- * @return The 64-bit group ID of the common time service.
- * @throws android.os.RemoteException
- */
- public long getMasterElectionGroupId()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetLong(METHOD_GET_MASTER_ELECTION_GROUP_ID, INVALID_GROUP_ID);
- }
-
- /**
- * Sets the current group ID used by the common time service in the master election protocol.
- *
- * @param id The 64-bit group ID of the common time service.
- * @return {@link #SUCCESS} in case of success,
- * {@link #ERROR}, {@link #ERROR_BAD_VALUE} or {@link #ERROR_DEAD_OBJECT} in case of failure.
- */
- public int setMasterElectionGroupId(long id) {
- if (checkDeadServer())
- return ERROR_DEAD_OBJECT;
- return mUtils.transactSetLong(METHOD_SET_MASTER_ELECTION_GROUP_ID, id);
- }
-
- /**
- * Gets the name of the network interface which the common time service attempts to bind to.
- *
- * @return a string with the network interface name which the common time service is bound to,
- * or null if the service is currently unbound. Examples of interface names are things like
- * "eth0", or "wlan0".
- * @throws android.os.RemoteException
- */
- public String getInterfaceBinding()
- throws RemoteException {
- throwOnDeadServer();
-
- String ifaceName = mUtils.transactGetString(METHOD_GET_INTERFACE_BINDING, null);
-
- if ((null != ifaceName) && (0 == ifaceName.length()))
- return null;
-
- return ifaceName;
- }
-
- /**
- * Sets the name of the network interface which the common time service should attempt to bind
- * to.
- *
- * @param ifaceName The name of the network interface ("eth0", "wlan0", etc...) wich the common
- * time service should attempt to bind to, or null to force the common time service to unbind
- * from the network and run in networkless mode.
- * @return {@link #SUCCESS} in case of success,
- * {@link #ERROR}, {@link #ERROR_BAD_VALUE} or {@link #ERROR_DEAD_OBJECT} in case of failure.
- */
- public int setNetworkBinding(String ifaceName) {
- if (checkDeadServer())
- return ERROR_DEAD_OBJECT;
-
- return mUtils.transactSetString(METHOD_SET_INTERFACE_BINDING,
- (null == ifaceName) ? "" : ifaceName);
- }
-
- /**
- * Gets the amount of time the common time service will wait between master announcements when
- * it is the timeline master.
- *
- * @return The time (in milliseconds) between master announcements.
- * @throws android.os.RemoteException
- */
- public int getMasterAnnounceInterval()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetInt(METHOD_GET_MASTER_ANNOUNCE_INTERVAL, -1);
- }
-
- /**
- * Sets the amount of time the common time service will wait between master announcements when
- * it is the timeline master.
- *
- * @param interval The time (in milliseconds) between master announcements.
- * @return {@link #SUCCESS} in case of success,
- * {@link #ERROR}, {@link #ERROR_BAD_VALUE} or {@link #ERROR_DEAD_OBJECT} in case of failure.
- */
- public int setMasterAnnounceInterval(int interval) {
- if (checkDeadServer())
- return ERROR_DEAD_OBJECT;
- return mUtils.transactSetInt(METHOD_SET_MASTER_ANNOUNCE_INTERVAL, interval);
- }
-
- /**
- * Gets the amount of time the common time service will wait between time synchronization
- * requests when it is the client of another common time service on the network.
- *
- * @return The time (in milliseconds) between time sync requests.
- * @throws android.os.RemoteException
- */
- public int getClientSyncInterval()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetInt(METHOD_GET_CLIENT_SYNC_INTERVAL, -1);
- }
-
- /**
- * Sets the amount of time the common time service will wait between time synchronization
- * requests when it is the client of another common time service on the network.
- *
- * @param interval The time (in milliseconds) between time sync requests.
- * @return {@link #SUCCESS} in case of success,
- * {@link #ERROR}, {@link #ERROR_BAD_VALUE} or {@link #ERROR_DEAD_OBJECT} in case of failure.
- */
- public int setClientSyncInterval(int interval) {
- if (checkDeadServer())
- return ERROR_DEAD_OBJECT;
- return mUtils.transactSetInt(METHOD_SET_CLIENT_SYNC_INTERVAL, interval);
- }
-
- /**
- * Gets the panic threshold for the estimated error level of the common time service. When the
- * common time service's estimated error rises above this level, the service will panic and
- * reset, causing a discontinuity in the currently synchronized timeline.
- *
- * @return The threshold (in microseconds) past which the common time service will panic.
- * @throws android.os.RemoteException
- */
- public int getPanicThreshold()
- throws RemoteException {
- throwOnDeadServer();
- return mUtils.transactGetInt(METHOD_GET_PANIC_THRESHOLD, -1);
- }
-
- /**
- * Sets the panic threshold for the estimated error level of the common time service. When the
- * common time service's estimated error rises above this level, the service will panic and
- * reset, causing a discontinuity in the currently synchronized timeline.
- *
- * @param threshold The threshold (in microseconds) past which the common time service will
- * panic.
- * @return {@link #SUCCESS} in case of success,
- * {@link #ERROR}, {@link #ERROR_BAD_VALUE} or {@link #ERROR_DEAD_OBJECT} in case of failure.
- */
- public int setPanicThreshold(int threshold) {
- if (checkDeadServer())
- return ERROR_DEAD_OBJECT;
- return mUtils.transactSetInt(METHOD_SET_PANIC_THRESHOLD, threshold);
- }
-
- /**
- * Gets the current state of the common time service's auto disable flag.
- *
- * @return The current state of the common time service's auto disable flag.
- * @throws android.os.RemoteException
- */
- public boolean getAutoDisable()
- throws RemoteException {
- throwOnDeadServer();
- return (1 == mUtils.transactGetInt(METHOD_GET_AUTO_DISABLE, 1));
- }
-
- /**
- * Sets the current state of the common time service's auto disable flag. When the time
- * service's auto disable flag is set, it will automatically cease all network activity when
- * it has no active local clients, resuming activity the next time the service has interested
- * local clients. When the auto disabled flag is cleared, the common time service will continue
- * to participate the time synchronization group even when it has no active local clients.
- *
- * @param autoDisable The desired state of the common time service's auto disable flag.
- * @return {@link #SUCCESS} in case of success,
- * {@link #ERROR} or {@link #ERROR_DEAD_OBJECT} in case of failure.
- */
- public int setAutoDisable(boolean autoDisable) {
- if (checkDeadServer())
- return ERROR_DEAD_OBJECT;
-
- return mUtils.transactSetInt(METHOD_SET_AUTO_DISABLE, autoDisable ? 1 : 0);
- }
-
- /**
- * At startup, the time service enters the initial state and remains there until it is given a
- * network interface to bind to. Common time will be unavailable to clients of the common time
- * service until the service joins a network (even an empty network). Devices may use the
- * {@link #forceNetworklessMasterMode()} method to force a time service in the INITIAL state
- * with no network configuration to assume MASTER status for a brand new timeline in order to
- * allow clients of the common time service to operate, even though the device is isolated and
- * not on any network. When a networkless master does join a network, it will defer to any
- * masters already on the network, or continue to maintain the timeline it made up during its
- * networkless state if no other masters are detected. Attempting to force a client into master
- * mode while it is actively bound to a network will fail with the status code {@link #ERROR}
- *
- * @return {@link #SUCCESS} in case of success,
- * {@link #ERROR} or {@link #ERROR_DEAD_OBJECT} in case of failure.
- */
- public int forceNetworklessMasterMode() {
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
-
- try {
- data.writeInterfaceToken(mInterfaceDesc);
- mRemote.transact(METHOD_FORCE_NETWORKLESS_MASTER_MODE, data, reply, 0);
-
- return reply.readInt();
- }
- catch (RemoteException e) {
- return ERROR_DEAD_OBJECT;
- }
- finally {
- reply.recycle();
- data.recycle();
- }
- }
-
- /**
- * The OnServerDiedListener interface defines a method called by the
- * {@link android.os.CommonTimeConfig} instance to indicate that the connection to the native
- * media server has been broken and that the {@link android.os.CommonTimeConfig} instance will
- * need to be released and re-created. The client application can implement this interface and
- * register the listener with the {@link #setServerDiedListener(OnServerDiedListener)} method.
- */
- public interface OnServerDiedListener {
- /**
- * Method called when the native common time service has died. <p>If the native common time
- * service encounters a fatal error and needs to restart, the binder connection from the
- * {@link android.os.CommonTimeConfig} instance to the common time service will be broken.
- */
- void onServerDied();
- }
-
- /**
- * Registers an OnServerDiedListener interface.
- * <p>Call this method with a null listener to stop receiving server death notifications.
- */
- public void setServerDiedListener(OnServerDiedListener listener) {
- synchronized (mListenerLock) {
- mServerDiedListener = listener;
- }
- }
-
- protected void finalize() throws Throwable { release(); }
-
- private boolean checkDeadServer() {
- return ((null == mRemote) || (null == mUtils));
- }
-
- private void throwOnDeadServer() throws RemoteException {
- if (checkDeadServer())
- throw new RemoteException();
- }
-
- private final Object mListenerLock = new Object();
- private OnServerDiedListener mServerDiedListener = null;
-
- private IBinder mRemote = null;
- private String mInterfaceDesc = "";
- private CommonTimeUtils mUtils;
-
- private IBinder.DeathRecipient mDeathHandler = new IBinder.DeathRecipient() {
- public void binderDied() {
- synchronized (mListenerLock) {
- if (null != mServerDiedListener)
- mServerDiedListener.onServerDied();
- }
- }
- };
-
- private static final int METHOD_GET_MASTER_ELECTION_PRIORITY = IBinder.FIRST_CALL_TRANSACTION;
- private static final int METHOD_SET_MASTER_ELECTION_PRIORITY = METHOD_GET_MASTER_ELECTION_PRIORITY + 1;
- private static final int METHOD_GET_MASTER_ELECTION_ENDPOINT = METHOD_SET_MASTER_ELECTION_PRIORITY + 1;
- private static final int METHOD_SET_MASTER_ELECTION_ENDPOINT = METHOD_GET_MASTER_ELECTION_ENDPOINT + 1;
- private static final int METHOD_GET_MASTER_ELECTION_GROUP_ID = METHOD_SET_MASTER_ELECTION_ENDPOINT + 1;
- private static final int METHOD_SET_MASTER_ELECTION_GROUP_ID = METHOD_GET_MASTER_ELECTION_GROUP_ID + 1;
- private static final int METHOD_GET_INTERFACE_BINDING = METHOD_SET_MASTER_ELECTION_GROUP_ID + 1;
- private static final int METHOD_SET_INTERFACE_BINDING = METHOD_GET_INTERFACE_BINDING + 1;
- private static final int METHOD_GET_MASTER_ANNOUNCE_INTERVAL = METHOD_SET_INTERFACE_BINDING + 1;
- private static final int METHOD_SET_MASTER_ANNOUNCE_INTERVAL = METHOD_GET_MASTER_ANNOUNCE_INTERVAL + 1;
- private static final int METHOD_GET_CLIENT_SYNC_INTERVAL = METHOD_SET_MASTER_ANNOUNCE_INTERVAL + 1;
- private static final int METHOD_SET_CLIENT_SYNC_INTERVAL = METHOD_GET_CLIENT_SYNC_INTERVAL + 1;
- private static final int METHOD_GET_PANIC_THRESHOLD = METHOD_SET_CLIENT_SYNC_INTERVAL + 1;
- private static final int METHOD_SET_PANIC_THRESHOLD = METHOD_GET_PANIC_THRESHOLD + 1;
- private static final int METHOD_GET_AUTO_DISABLE = METHOD_SET_PANIC_THRESHOLD + 1;
- private static final int METHOD_SET_AUTO_DISABLE = METHOD_GET_AUTO_DISABLE + 1;
- private static final int METHOD_FORCE_NETWORKLESS_MASTER_MODE = METHOD_SET_AUTO_DISABLE + 1;
-}
diff --git a/core/java/android/os/CommonTimeUtils.java b/core/java/android/os/CommonTimeUtils.java
deleted file mode 100644
index ba060b8..0000000
--- a/core/java/android/os/CommonTimeUtils.java
+++ /dev/null
@@ -1,293 +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.
- */
-package android.os;
-
-import java.net.InetAddress;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.InetSocketAddress;
-import java.util.Locale;
-import static android.system.OsConstants.*;
-
-class CommonTimeUtils {
- /**
- * Successful operation.
- */
- public static final int SUCCESS = 0;
- /**
- * Unspecified error.
- */
- public static final int ERROR = -1;
- /**
- * Operation failed due to bad parameter value.
- */
- public static final int ERROR_BAD_VALUE = -4;
- /**
- * Operation failed due to dead remote object.
- */
- public static final int ERROR_DEAD_OBJECT = -7;
-
- public CommonTimeUtils(IBinder remote, String interfaceDesc) {
- mRemote = remote;
- mInterfaceDesc = interfaceDesc;
- }
-
- public int transactGetInt(int method_code, int error_ret_val)
- throws RemoteException {
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
- int ret_val;
-
- try {
- int res;
- data.writeInterfaceToken(mInterfaceDesc);
- mRemote.transact(method_code, data, reply, 0);
-
- res = reply.readInt();
- ret_val = (0 == res) ? reply.readInt() : error_ret_val;
- }
- finally {
- reply.recycle();
- data.recycle();
- }
-
- return ret_val;
- }
-
- public int transactSetInt(int method_code, int val) {
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
-
- try {
- data.writeInterfaceToken(mInterfaceDesc);
- data.writeInt(val);
- mRemote.transact(method_code, data, reply, 0);
-
- return reply.readInt();
- }
- catch (RemoteException e) {
- return ERROR_DEAD_OBJECT;
- }
- finally {
- reply.recycle();
- data.recycle();
- }
- }
-
- public long transactGetLong(int method_code, long error_ret_val)
- throws RemoteException {
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
- long ret_val;
-
- try {
- int res;
- data.writeInterfaceToken(mInterfaceDesc);
- mRemote.transact(method_code, data, reply, 0);
-
- res = reply.readInt();
- ret_val = (0 == res) ? reply.readLong() : error_ret_val;
- }
- finally {
- reply.recycle();
- data.recycle();
- }
-
- return ret_val;
- }
-
- public int transactSetLong(int method_code, long val) {
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
-
- try {
- data.writeInterfaceToken(mInterfaceDesc);
- data.writeLong(val);
- mRemote.transact(method_code, data, reply, 0);
-
- return reply.readInt();
- }
- catch (RemoteException e) {
- return ERROR_DEAD_OBJECT;
- }
- finally {
- reply.recycle();
- data.recycle();
- }
- }
-
- public String transactGetString(int method_code, String error_ret_val)
- throws RemoteException {
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
- String ret_val;
-
- try {
- int res;
- data.writeInterfaceToken(mInterfaceDesc);
- mRemote.transact(method_code, data, reply, 0);
-
- res = reply.readInt();
- ret_val = (0 == res) ? reply.readString() : error_ret_val;
- }
- finally {
- reply.recycle();
- data.recycle();
- }
-
- return ret_val;
- }
-
- public int transactSetString(int method_code, String val) {
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
-
- try {
- data.writeInterfaceToken(mInterfaceDesc);
- data.writeString(val);
- mRemote.transact(method_code, data, reply, 0);
-
- return reply.readInt();
- }
- catch (RemoteException e) {
- return ERROR_DEAD_OBJECT;
- }
- finally {
- reply.recycle();
- data.recycle();
- }
- }
-
- public InetSocketAddress transactGetSockaddr(int method_code)
- throws RemoteException {
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
- InetSocketAddress ret_val = null;
-
- try {
- int res;
- data.writeInterfaceToken(mInterfaceDesc);
- mRemote.transact(method_code, data, reply, 0);
-
- res = reply.readInt();
- if (0 == res) {
- int type;
- int port = 0;
- String addrStr = null;
-
- type = reply.readInt();
-
- if (AF_INET == type) {
- int addr = reply.readInt();
- port = reply.readInt();
- addrStr = String.format(Locale.US, "%d.%d.%d.%d",
- (addr >> 24) & 0xFF,
- (addr >> 16) & 0xFF,
- (addr >> 8) & 0xFF,
- addr & 0xFF);
- } else if (AF_INET6 == type) {
- int addr1 = reply.readInt();
- int addr2 = reply.readInt();
- int addr3 = reply.readInt();
- int addr4 = reply.readInt();
-
- port = reply.readInt();
-
- int flowinfo = reply.readInt();
- int scope_id = reply.readInt();
-
- addrStr = String.format(Locale.US, "[%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X]",
- (addr1 >> 16) & 0xFFFF, addr1 & 0xFFFF,
- (addr2 >> 16) & 0xFFFF, addr2 & 0xFFFF,
- (addr3 >> 16) & 0xFFFF, addr3 & 0xFFFF,
- (addr4 >> 16) & 0xFFFF, addr4 & 0xFFFF);
- }
-
- if (null != addrStr) {
- ret_val = new InetSocketAddress(addrStr, port);
- }
- }
- }
- finally {
- reply.recycle();
- data.recycle();
- }
-
- return ret_val;
- }
-
- public int transactSetSockaddr(int method_code, InetSocketAddress addr) {
- android.os.Parcel data = android.os.Parcel.obtain();
- android.os.Parcel reply = android.os.Parcel.obtain();
- int ret_val = ERROR;
-
- try {
- data.writeInterfaceToken(mInterfaceDesc);
-
- if (null == addr) {
- data.writeInt(0);
- } else {
- data.writeInt(1);
- final InetAddress a = addr.getAddress();
- final byte[] b = a.getAddress();
- final int p = addr.getPort();
-
- if (a instanceof Inet4Address) {
- int v4addr = (((int)b[0] & 0xFF) << 24) |
- (((int)b[1] & 0xFF) << 16) |
- (((int)b[2] & 0xFF) << 8) |
- ((int)b[3] & 0xFF);
-
- data.writeInt(AF_INET);
- data.writeInt(v4addr);
- data.writeInt(p);
- } else
- if (a instanceof Inet6Address) {
- int i;
- Inet6Address v6 = (Inet6Address)a;
- data.writeInt(AF_INET6);
- for (i = 0; i < 4; ++i) {
- int aword = (((int)b[(i*4) + 0] & 0xFF) << 24) |
- (((int)b[(i*4) + 1] & 0xFF) << 16) |
- (((int)b[(i*4) + 2] & 0xFF) << 8) |
- ((int)b[(i*4) + 3] & 0xFF);
- data.writeInt(aword);
- }
- data.writeInt(p);
- data.writeInt(0); // flow info
- data.writeInt(v6.getScopeId());
- } else {
- return ERROR_BAD_VALUE;
- }
- }
-
- mRemote.transact(method_code, data, reply, 0);
- ret_val = reply.readInt();
- }
- catch (RemoteException e) {
- ret_val = ERROR_DEAD_OBJECT;
- }
- finally {
- reply.recycle();
- data.recycle();
- }
-
- return ret_val;
- }
-
- private IBinder mRemote;
- private String mInterfaceDesc;
-};
diff --git a/core/java/android/os/ConfigUpdate.java b/core/java/android/os/ConfigUpdate.java
index 1396877..3632fef 100644
--- a/core/java/android/os/ConfigUpdate.java
+++ b/core/java/android/os/ConfigUpdate.java
@@ -89,6 +89,14 @@
public static final String ACTION_UPDATE_SMART_SELECTION
= "android.intent.action.UPDATE_SMART_SELECTION";
+ /**
+ * Update carrier id config file.
+ * @hide
+ */
+ @SystemApi
+ public static final String ACTION_UPDATE_CARRIER_ID_DB
+ = "android.os.action.UPDATE_CARRIER_ID_DB";
+
private ConfigUpdate() {
}
}
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index 5b0e5bbc..d8eae8c 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -291,7 +291,7 @@
}
/** {@hide} */
- public static File getReferenceProfile(String packageName) {
+ public static File getDataRefProfilesDePackageDirectory(String packageName) {
return buildPath(getDataDirectory(), "misc", "profiles", "ref", packageName);
}
diff --git a/core/java/android/os/FileBridge.java b/core/java/android/os/FileBridge.java
index 3ac88c5..21fd819 100644
--- a/core/java/android/os/FileBridge.java
+++ b/core/java/android/os/FileBridge.java
@@ -27,12 +27,12 @@
import libcore.io.IoUtils;
import libcore.io.Memory;
import libcore.io.Streams;
+import libcore.util.ArrayUtils;
import java.io.FileDescriptor;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteOrder;
-import java.util.Arrays;
/**
* Simple bridge that allows file access across process boundaries without
@@ -178,7 +178,7 @@
@Override
public void write(byte[] buffer, int byteOffset, int byteCount) throws IOException {
- Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
+ ArrayUtils.throwsIfOutOfBounds(buffer.length, byteOffset, byteCount);
Memory.pokeInt(mTemp, 0, CMD_WRITE, ByteOrder.BIG_ENDIAN);
Memory.pokeInt(mTemp, 4, byteCount, ByteOrder.BIG_ENDIAN);
IoBridge.write(mClient, mTemp, 0, MSG_LENGTH);
diff --git a/core/java/android/os/HidlSupport.java b/core/java/android/os/HidlSupport.java
index 4d7d931..91b796a 100644
--- a/core/java/android/os/HidlSupport.java
+++ b/core/java/android/os/HidlSupport.java
@@ -16,6 +16,8 @@
package android.os;
+import android.annotation.SystemApi;
+
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
@@ -25,6 +27,7 @@
import java.util.stream.IntStream;
/** @hide */
+@SystemApi
public class HidlSupport {
/**
* Similar to Objects.deepEquals, but also take care of lists.
@@ -36,7 +39,9 @@
* 2.3 Both are Lists, elements are checked recursively
* 2.4 (If both are collections other than lists or maps, throw an error)
* 2.5 lft.equals(rgt) returns true
+ * @hide
*/
+ @SystemApi
public static boolean deepEquals(Object lft, Object rgt) {
if (lft == rgt) {
return true;
@@ -91,6 +96,7 @@
* and should be avoided).
*
* @param <E> Inner object type.
+ * @hide
*/
public static final class Mutable<E> {
public E value;
@@ -106,7 +112,9 @@
/**
* Similar to Arrays.deepHashCode, but also take care of lists.
+ * @hide
*/
+ @SystemApi
public static int deepHashCode(Object o) {
if (o == null) {
return 0;
@@ -133,6 +141,7 @@
return o.hashCode();
}
+ /** @hide */
private static void throwErrorIfUnsupportedType(Object o) {
if (o instanceof Collection<?> && !(o instanceof List<?>)) {
throw new UnsupportedOperationException(
@@ -146,6 +155,7 @@
}
}
+ /** @hide */
private static int primitiveArrayHashCode(Object o) {
Class<?> elementType = o.getClass().getComponentType();
if (elementType == boolean.class) {
@@ -185,7 +195,9 @@
* - If both interfaces are stubs, asBinder() returns the object itself. By default,
* auto-generated IFoo.Stub does not override equals(), but an implementation can
* optionally override it, and {@code interfacesEqual} will use it here.
+ * @hide
*/
+ @SystemApi
public static boolean interfacesEqual(IHwInterface lft, Object rgt) {
if (lft == rgt) {
return true;
@@ -200,7 +212,12 @@
}
/**
- * Return PID of process if sharable to clients.
+ * Return PID of process only if on a non-user build. For debugging purposes.
+ * @hide
*/
+ @SystemApi
public static native int getPidIfSharable();
+
+ /** @hide */
+ public HidlSupport() {}
}
diff --git a/core/java/android/os/HwBinder.java b/core/java/android/os/HwBinder.java
index 5e2a081..228fe7a 100644
--- a/core/java/android/os/HwBinder.java
+++ b/core/java/android/os/HwBinder.java
@@ -16,16 +16,26 @@
package android.os;
+import android.annotation.SystemApi;
+
import libcore.util.NativeAllocationRegistry;
import java.util.NoSuchElementException;
/** @hide */
+@SystemApi
public abstract class HwBinder implements IHwBinder {
private static final String TAG = "HwBinder";
private static final NativeAllocationRegistry sNativeRegistry;
+ /**
+ * Create and initialize a HwBinder object and the native objects
+ * used to allow this to participate in hwbinder transactions.
+ *
+ * @hide
+ */
+ @SystemApi
public HwBinder() {
native_setup();
@@ -34,33 +44,90 @@
mNativeContext);
}
+ /** @hide */
@Override
public final native void transact(
int code, HwParcel request, HwParcel reply, int flags)
throws RemoteException;
+ /**
+ * Process a hwbinder transaction.
+ *
+ * @param code interface specific code for interface.
+ * @param request parceled transaction
+ * @param reply object to parcel reply into
+ * @param flags transaction flags to be chosen by wire protocol
+ *
+ * @hide
+ */
+ @SystemApi
public abstract void onTransact(
int code, HwParcel request, HwParcel reply, int flags)
throws RemoteException;
+ /**
+ * Registers this service with the hwservicemanager.
+ *
+ * @param serviceName instance name of the service
+ * @hide
+ */
+ @SystemApi
public native final void registerService(String serviceName)
throws RemoteException;
+ /**
+ * Returns the specified service from the hwservicemanager. Does not retry.
+ *
+ * @param iface fully-qualified interface name for example foo.bar@1.3::IBaz
+ * @param serviceName the instance name of the service for example default.
+ * @throws NoSuchElementException when the service is unavailable
+ * @hide
+ */
+ @SystemApi
public static final IHwBinder getService(
String iface,
String serviceName)
throws RemoteException, NoSuchElementException {
return getService(iface, serviceName, false /* retry */);
}
+ /**
+ * Returns the specified service from the hwservicemanager.
+ * @param iface fully-qualified interface name for example foo.bar@1.3::IBaz
+ * @param serviceName the instance name of the service for example default.
+ * @param retry whether to wait for the service to start if it's not already started
+ * @throws NoSuchElementException when the service is unavailable
+ * @hide
+ */
+ @SystemApi
public static native final IHwBinder getService(
String iface,
String serviceName,
boolean retry)
throws RemoteException, NoSuchElementException;
+ /**
+ * Configures how many threads the process-wide hwbinder threadpool
+ * has to process incoming requests.
+ *
+ * @param maxThreads total number of threads to create (includes this thread if
+ * callerWillJoin is true)
+ * @param callerWillJoin whether joinRpcThreadpool will be called in advance
+ * @hide
+ */
+ @SystemApi
public static native final void configureRpcThreadpool(
long maxThreads, boolean callerWillJoin);
+ /**
+ * Current thread will join hwbinder threadpool and process
+ * commands in the pool. Should be called after configuring
+ * a threadpool with callerWillJoin true and then registering
+ * the provided service if this thread doesn't need to do
+ * anything else.
+ *
+ * @hide
+ */
+ @SystemApi
public static native final void joinRpcThreadpool();
// Returns address of the "freeFunction".
@@ -82,7 +149,26 @@
private static native void native_report_sysprop_change();
/**
+ * Enable instrumentation if available.
+ *
+ * On a non-user build, this method:
+ * - tries to enable atracing (if enabled)
+ * - tries to enable coverage dumps (if running in VTS)
+ * - tries to enable record and replay (if running in VTS)
+ *
+ * @hide
+ */
+ @SystemApi
+ public static void enableInstrumentation() {
+ native_report_sysprop_change();
+ }
+
+ /**
* Notifies listeners that a system property has changed
+ *
+ * TODO(b/72480743): remove this method
+ *
+ * @hide
*/
public static void reportSyspropChanged() {
native_report_sysprop_change();
diff --git a/core/java/android/os/HwBlob.java b/core/java/android/os/HwBlob.java
index 5e9b9ae3..405651e 100644
--- a/core/java/android/os/HwBlob.java
+++ b/core/java/android/os/HwBlob.java
@@ -17,10 +17,17 @@
package android.os;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
import libcore.util.NativeAllocationRegistry;
-/** @hide */
+/**
+ * Represents fixed sized allocation of marshalled data used. Helper methods
+ * allow for access to the unmarshalled data in a variety of ways.
+ *
+ * @hide
+ */
+@SystemApi
public class HwBlob {
private static final String TAG = "HwBlob";
@@ -34,48 +41,276 @@
mNativeContext);
}
+ /**
+ * @param offset offset to unmarshall a boolean from
+ * @return the unmarshalled boolean value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final boolean getBool(long offset);
+ /**
+ * @param offset offset to unmarshall a byte from
+ * @return the unmarshalled byte value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final byte getInt8(long offset);
+ /**
+ * @param offset offset to unmarshall a short from
+ * @return the unmarshalled short value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final short getInt16(long offset);
+ /**
+ * @param offset offset to unmarshall an int from
+ * @return the unmarshalled int value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final int getInt32(long offset);
+ /**
+ * @param offset offset to unmarshall a long from
+ * @return the unmarshalled long value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final long getInt64(long offset);
+ /**
+ * @param offset offset to unmarshall a float from
+ * @return the unmarshalled float value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final float getFloat(long offset);
+ /**
+ * @param offset offset to unmarshall a double from
+ * @return the unmarshalled double value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final double getDouble(long offset);
+ /**
+ * @param offset offset to unmarshall a string from
+ * @return the unmarshalled string value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final String getString(long offset);
/**
- The copyTo... methods copy the blob's data, starting from the given
- byte offset, into the array. A total of "size" _elements_ are copied.
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jboolean)] out of the blob.
*/
public native final void copyToBoolArray(long offset, boolean[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jbyte)] out of the blob.
+ */
public native final void copyToInt8Array(long offset, byte[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jshort)] out of the blob.
+ */
public native final void copyToInt16Array(long offset, short[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jint)] out of the blob.
+ */
public native final void copyToInt32Array(long offset, int[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jlong)] out of the blob.
+ */
public native final void copyToInt64Array(long offset, long[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jfloat)] out of the blob.
+ */
public native final void copyToFloatArray(long offset, float[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jdouble)] out of the blob.
+ */
public native final void copyToDoubleArray(long offset, double[] array, int size);
+ /**
+ * Writes a boolean value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jboolean)] is out of range
+ */
public native final void putBool(long offset, boolean x);
+ /**
+ * Writes a byte value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jbyte)] is out of range
+ */
public native final void putInt8(long offset, byte x);
+ /**
+ * Writes a short value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jshort)] is out of range
+ */
public native final void putInt16(long offset, short x);
+ /**
+ * Writes a int value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jint)] is out of range
+ */
public native final void putInt32(long offset, int x);
+ /**
+ * Writes a long value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jlong)] is out of range
+ */
public native final void putInt64(long offset, long x);
+ /**
+ * Writes a float value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jfloat)] is out of range
+ */
public native final void putFloat(long offset, float x);
+ /**
+ * Writes a double value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jdouble)] is out of range
+ */
public native final void putDouble(long offset, double x);
+ /**
+ * Writes a string value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jstring)] is out of range
+ */
public native final void putString(long offset, String x);
+ /**
+ * Put a boolean array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jboolean)] out of the blob.
+ */
public native final void putBoolArray(long offset, boolean[] x);
+ /**
+ * Put a byte array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jbyte)] out of the blob.
+ */
public native final void putInt8Array(long offset, byte[] x);
+ /**
+ * Put a short array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jshort)] out of the blob.
+ */
public native final void putInt16Array(long offset, short[] x);
+ /**
+ * Put a int array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jint)] out of the blob.
+ */
public native final void putInt32Array(long offset, int[] x);
+ /**
+ * Put a long array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jlong)] out of the blob.
+ */
public native final void putInt64Array(long offset, long[] x);
+ /**
+ * Put a float array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jfloat)] out of the blob.
+ */
public native final void putFloatArray(long offset, float[] x);
+ /**
+ * Put a double array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jdouble)] out of the blob.
+ */
public native final void putDoubleArray(long offset, double[] x);
+ /**
+ * Write another HwBlob into this blob at the specified location.
+ *
+ * @param offset location to write value
+ * @param blob data to write
+ * @throws IndexOutOfBoundsException if [offset, offset + blob's size] outside of the range of
+ * this blob.
+ */
public native final void putBlob(long offset, HwBlob blob);
+ /**
+ * @return current handle of HwBlob for reference in a parcelled binder transaction
+ */
public native final long handle();
+ /**
+ * Convert a primitive to a wrapped array for boolean.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Boolean[] wrapArray(@NonNull boolean[] array) {
final int n = array.length;
Boolean[] wrappedArray = new Boolean[n];
@@ -85,6 +320,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for long.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Long[] wrapArray(@NonNull long[] array) {
final int n = array.length;
Long[] wrappedArray = new Long[n];
@@ -94,6 +335,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for byte.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Byte[] wrapArray(@NonNull byte[] array) {
final int n = array.length;
Byte[] wrappedArray = new Byte[n];
@@ -103,6 +350,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for short.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Short[] wrapArray(@NonNull short[] array) {
final int n = array.length;
Short[] wrappedArray = new Short[n];
@@ -112,6 +365,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for int.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Integer[] wrapArray(@NonNull int[] array) {
final int n = array.length;
Integer[] wrappedArray = new Integer[n];
@@ -121,6 +380,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for float.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Float[] wrapArray(@NonNull float[] array) {
final int n = array.length;
Float[] wrappedArray = new Float[n];
@@ -130,6 +395,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for double.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Double[] wrapArray(@NonNull double[] array) {
final int n = array.length;
Double[] wrappedArray = new Double[n];
diff --git a/core/java/android/os/HwParcel.java b/core/java/android/os/HwParcel.java
index 4ba1144..0eb62c95 100644
--- a/core/java/android/os/HwParcel.java
+++ b/core/java/android/os/HwParcel.java
@@ -16,17 +16,32 @@
package android.os;
-import java.util.ArrayList;
-import java.util.Arrays;
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
import libcore.util.NativeAllocationRegistry;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
+import java.util.Arrays;
+
/** @hide */
+@SystemApi
public class HwParcel {
private static final String TAG = "HwParcel";
+ @IntDef(prefix = { "STATUS_" }, value = {
+ STATUS_SUCCESS,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Status {}
+
+ /**
+ * Success return error for a transaction. Written to parcels
+ * using writeStatus.
+ */
public static final int STATUS_SUCCESS = 0;
- public static final int STATUS_ERROR = -1;
private static final NativeAllocationRegistry sNativeRegistry;
@@ -38,6 +53,9 @@
mNativeContext);
}
+ /**
+ * Creates an initialized and empty parcel.
+ */
public HwParcel() {
native_setup(true /* allocate */);
@@ -46,25 +64,106 @@
mNativeContext);
}
+ /**
+ * Writes an interface token into the parcel used to verify that
+ * a transaction has made it to the write type of interface.
+ *
+ * @param interfaceName fully qualified name of interface message
+ * is being sent to.
+ */
public native final void writeInterfaceToken(String interfaceName);
+ /**
+ * Writes a boolean value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeBool(boolean val);
+ /**
+ * Writes a byte value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeInt8(byte val);
+ /**
+ * Writes a short value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeInt16(short val);
+ /**
+ * Writes a int value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeInt32(int val);
+ /**
+ * Writes a long value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeInt64(long val);
+ /**
+ * Writes a float value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeFloat(float val);
+ /**
+ * Writes a double value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeDouble(double val);
+ /**
+ * Writes a String value to the end of the parcel.
+ *
+ * Note, this will be converted to UTF-8 when it is written.
+ *
+ * @param val to write
+ */
public native final void writeString(String val);
+ /**
+ * Writes an array of boolean values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeBoolVector(boolean[] val);
+ /**
+ * Writes an array of byte values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeInt8Vector(byte[] val);
+ /**
+ * Writes an array of short values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeInt16Vector(short[] val);
+ /**
+ * Writes an array of int values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeInt32Vector(int[] val);
+ /**
+ * Writes an array of long values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeInt64Vector(long[] val);
+ /**
+ * Writes an array of float values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeFloatVector(float[] val);
+ /**
+ * Writes an array of double values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeDoubleVector(double[] val);
+ /**
+ * Writes an array of String values to the end of the parcel.
+ *
+ * Note, these will be converted to UTF-8 as they are written.
+ *
+ * @param val to write
+ */
private native final void writeStringVector(String[] val);
+ /**
+ * Helper method to write a list of Booleans to val.
+ * @param val list to write
+ */
public final void writeBoolVector(ArrayList<Boolean> val) {
final int n = val.size();
boolean[] array = new boolean[n];
@@ -75,6 +174,10 @@
writeBoolVector(array);
}
+ /**
+ * Helper method to write a list of Booleans to the end of the parcel.
+ * @param val list to write
+ */
public final void writeInt8Vector(ArrayList<Byte> val) {
final int n = val.size();
byte[] array = new byte[n];
@@ -85,6 +188,10 @@
writeInt8Vector(array);
}
+ /**
+ * Helper method to write a list of Shorts to the end of the parcel.
+ * @param val list to write
+ */
public final void writeInt16Vector(ArrayList<Short> val) {
final int n = val.size();
short[] array = new short[n];
@@ -95,6 +202,10 @@
writeInt16Vector(array);
}
+ /**
+ * Helper method to write a list of Integers to the end of the parcel.
+ * @param val list to write
+ */
public final void writeInt32Vector(ArrayList<Integer> val) {
final int n = val.size();
int[] array = new int[n];
@@ -105,6 +216,10 @@
writeInt32Vector(array);
}
+ /**
+ * Helper method to write a list of Longs to the end of the parcel.
+ * @param val list to write
+ */
public final void writeInt64Vector(ArrayList<Long> val) {
final int n = val.size();
long[] array = new long[n];
@@ -115,6 +230,10 @@
writeInt64Vector(array);
}
+ /**
+ * Helper method to write a list of Floats to the end of the parcel.
+ * @param val list to write
+ */
public final void writeFloatVector(ArrayList<Float> val) {
final int n = val.size();
float[] array = new float[n];
@@ -125,6 +244,10 @@
writeFloatVector(array);
}
+ /**
+ * Helper method to write a list of Doubles to the end of the parcel.
+ * @param val list to write
+ */
public final void writeDoubleVector(ArrayList<Double> val) {
final int n = val.size();
double[] array = new double[n];
@@ -135,93 +258,272 @@
writeDoubleVector(array);
}
+ /**
+ * Helper method to write a list of Strings to the end of the parcel.
+ * @param val list to write
+ */
public final void writeStringVector(ArrayList<String> val) {
writeStringVector(val.toArray(new String[val.size()]));
}
+ /**
+ * Write a hwbinder object to the end of the parcel.
+ * @param binder value to write
+ */
public native final void writeStrongBinder(IHwBinder binder);
+ /**
+ * Checks to make sure that the interface name matches the name written by the parcel
+ * sender by writeInterfaceToken
+ *
+ * @throws SecurityException interface doesn't match
+ */
public native final void enforceInterface(String interfaceName);
+
+ /**
+ * Reads a boolean value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final boolean readBool();
+ /**
+ * Reads a byte value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final byte readInt8();
+ /**
+ * Reads a short value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final short readInt16();
+ /**
+ * Reads a int value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final int readInt32();
+ /**
+ * Reads a long value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final long readInt64();
+ /**
+ * Reads a float value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final float readFloat();
+ /**
+ * Reads a double value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final double readDouble();
+ /**
+ * Reads a String value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final String readString();
+ /**
+ * Reads an array of boolean values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final boolean[] readBoolVectorAsArray();
+ /**
+ * Reads an array of byte values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final byte[] readInt8VectorAsArray();
+ /**
+ * Reads an array of short values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final short[] readInt16VectorAsArray();
+ /**
+ * Reads an array of int values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final int[] readInt32VectorAsArray();
+ /**
+ * Reads an array of long values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final long[] readInt64VectorAsArray();
+ /**
+ * Reads an array of float values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final float[] readFloatVectorAsArray();
+ /**
+ * Reads an array of double values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final double[] readDoubleVectorAsArray();
+ /**
+ * Reads an array of String values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final String[] readStringVectorAsArray();
+ /**
+ * Convenience method to read a Boolean vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Boolean> readBoolVector() {
Boolean[] array = HwBlob.wrapArray(readBoolVectorAsArray());
return new ArrayList<Boolean>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Byte vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Byte> readInt8Vector() {
Byte[] array = HwBlob.wrapArray(readInt8VectorAsArray());
return new ArrayList<Byte>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Short vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Short> readInt16Vector() {
Short[] array = HwBlob.wrapArray(readInt16VectorAsArray());
return new ArrayList<Short>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Integer vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Integer> readInt32Vector() {
Integer[] array = HwBlob.wrapArray(readInt32VectorAsArray());
return new ArrayList<Integer>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Long vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Long> readInt64Vector() {
Long[] array = HwBlob.wrapArray(readInt64VectorAsArray());
return new ArrayList<Long>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Float vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Float> readFloatVector() {
Float[] array = HwBlob.wrapArray(readFloatVectorAsArray());
return new ArrayList<Float>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Double vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Double> readDoubleVector() {
Double[] array = HwBlob.wrapArray(readDoubleVectorAsArray());
return new ArrayList<Double>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a String vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<String> readStringVector() {
return new ArrayList<String>(Arrays.asList(readStringVectorAsArray()));
}
+ /**
+ * Reads a strong binder value from the parcel.
+ * @return binder object read from parcel or null if no binder can be read
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final IHwBinder readStrongBinder();
- // Handle is stored as part of the blob.
+ /**
+ * Read opaque segment of data as a blob.
+ * @return blob of size expectedSize
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final HwBlob readBuffer(long expectedSize);
+ /**
+ * Read a buffer written using scatter gather.
+ *
+ * @param expectedSize size that buffer should be
+ * @param parentHandle handle from which to read the embedded buffer
+ * @param offset offset into parent
+ * @param nullable whether or not to allow for a null return
+ * @return blob of data with size expectedSize
+ * @throws NoSuchElementException if an embedded buffer is not available to read
+ * @throws IllegalArgumentException if expectedSize < 0
+ * @throws NullPointerException if the transaction specified the blob to be null
+ * but nullable is false
+ */
public native final HwBlob readEmbeddedBuffer(
long expectedSize, long parentHandle, long offset,
boolean nullable);
+ /**
+ * Write a buffer into the transaction.
+ * @param blob blob to write into the parcel.
+ */
public native final void writeBuffer(HwBlob blob);
-
+ /**
+ * Write a status value into the blob.
+ * @param status value to write
+ */
public native final void writeStatus(int status);
+ /**
+ * @throws IllegalArgumentException if a success vaue cannot be read
+ * @throws RemoteException if success value indicates a transaction error
+ */
public native final void verifySuccess();
+ /**
+ * Should be called to reduce memory pressure when this object no longer needs
+ * to be written to.
+ */
public native final void releaseTemporaryStorage();
+ /**
+ * Should be called when object is no longer needed to reduce possible memory
+ * pressure if the Java GC does not get to this object in time.
+ */
public native final void release();
+ /**
+ * Sends the parcel to the specified destination.
+ */
public native final void send();
// Returns address of the "freeFunction".
diff --git a/core/java/android/os/IHwBinder.java b/core/java/android/os/IHwBinder.java
index 619f4dc..a565dee 100644
--- a/core/java/android/os/IHwBinder.java
+++ b/core/java/android/os/IHwBinder.java
@@ -16,26 +16,70 @@
package android.os;
+import android.annotation.SystemApi;
+
/** @hide */
+@SystemApi
public interface IHwBinder {
// These MUST match their corresponding libhwbinder/IBinder.h definition !!!
+ /** @hide */
public static final int FIRST_CALL_TRANSACTION = 1;
+ /** @hide */
public static final int FLAG_ONEWAY = 1;
+ /**
+ * Process a hwbinder transaction.
+ *
+ * @param code interface specific code for interface.
+ * @param request parceled transaction
+ * @param reply object to parcel reply into
+ * @param flags transaction flags to be chosen by wire protocol
+ *
+ * @hide
+ */
+ @SystemApi
public void transact(
int code, HwParcel request, HwParcel reply, int flags)
throws RemoteException;
+ /**
+ * Return as IHwInterface instance only if this implements descriptor.
+ *
+ * @param descriptor for example foo.bar@1.0::IBaz
+ * @hide
+ */
+ @SystemApi
public IHwInterface queryLocalInterface(String descriptor);
/**
* Interface for receiving a callback when the process hosting a service
* has gone away.
*/
+ @SystemApi
public interface DeathRecipient {
+ /**
+ * Callback for a registered process dying.
+ *
+ * @param cookie cookie this death recipient was registered with.
+ */
+ @SystemApi
public void serviceDied(long cookie);
}
+ /**
+ * Notifies the death recipient with the cookie when the process containing
+ * this binder dies.
+ *
+ * @param recipient callback object to be called on object death.
+ * @param cookie value to be given to callback on object death.
+ */
+ @SystemApi
public boolean linkToDeath(DeathRecipient recipient, long cookie);
+ /**
+ * Unregisters the death recipient from this binder.
+ *
+ * @param recipient callback to no longer recieve death notifications on this binder.
+ */
+ @SystemApi
public boolean unlinkToDeath(DeathRecipient recipient);
}
diff --git a/core/java/android/os/IHwInterface.java b/core/java/android/os/IHwInterface.java
index 7c5ac6f..1d9e2b0 100644
--- a/core/java/android/os/IHwInterface.java
+++ b/core/java/android/os/IHwInterface.java
@@ -16,7 +16,13 @@
package android.os;
+import android.annotation.SystemApi;
/** @hide */
+@SystemApi
public interface IHwInterface {
+ /**
+ * @return the binder object that corresponds to this interface.
+ */
+ @SystemApi
public IHwBinder asBinder();
}
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index a5e1934..31dbafa 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -268,10 +268,12 @@
NetworkStats getNetworkStatsDetail();
/**
- * Return detailed network statistics for the requested UID,
+ * Return detailed network statistics for the requested UID and interfaces,
* including interface and tag details.
+ * @param uid UID to obtain statistics for, or {@link NetworkStats#UID_ALL}.
+ * @param ifaces Interfaces to obtain statistics for, or {@link NetworkStats#INTERFACES_ALL}.
*/
- NetworkStats getNetworkStatsUidDetail(int uid);
+ NetworkStats getNetworkStatsUidDetail(int uid, in String[] ifaces);
/**
* Return summary of network statistics all tethering interfaces.
@@ -340,7 +342,7 @@
* Configure name servers, search paths, and resolver parameters for the given network.
*/
void setDnsConfigurationForNetwork(int netId, in String[] servers, in String[] domains,
- in int[] params, boolean useTls, String tlsHostname);
+ in int[] params, String tlsHostname, in String[] tlsServers);
void setFirewallEnabled(boolean enabled);
boolean isFirewallEnabled();
diff --git a/core/java/android/os/MessageQueue.java b/core/java/android/os/MessageQueue.java
index 624e28a..0b98ecf 100644
--- a/core/java/android/os/MessageQueue.java
+++ b/core/java/android/os/MessageQueue.java
@@ -254,6 +254,7 @@
} else if (record != null) {
record.mEvents = 0;
mFileDescriptorRecords.removeAt(index);
+ nativeSetFileDescriptorEvents(mPtr, fdNum, 0);
}
}
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index fae9d53..8847414 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -31,6 +31,7 @@
import dalvik.annotation.optimization.FastNative;
import dalvik.system.VMRuntime;
+import libcore.util.ArrayUtils;
import libcore.util.SneakyThrow;
import java.io.ByteArrayInputStream;
@@ -46,7 +47,6 @@
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -602,7 +602,7 @@
writeInt(-1);
return;
}
- Arrays.checkOffsetAndCount(b.length, offset, len);
+ ArrayUtils.throwsIfOutOfBounds(b.length, offset, len);
nativeWriteByteArray(mNativePtr, b, offset, len);
}
@@ -631,7 +631,7 @@
writeInt(-1);
return;
}
- Arrays.checkOffsetAndCount(b.length, offset, len);
+ ArrayUtils.throwsIfOutOfBounds(b.length, offset, len);
nativeWriteBlob(mNativePtr, b, offset, len);
}
diff --git a/core/java/android/os/ParcelFileDescriptor.aidl b/core/java/android/os/ParcelFileDescriptor.aidl
index 6bbd99e..c07b980 100644
--- a/core/java/android/os/ParcelFileDescriptor.aidl
+++ b/core/java/android/os/ParcelFileDescriptor.aidl
@@ -17,4 +17,4 @@
package android.os;
-parcelable ParcelFileDescriptor cpp_header "android/os/parcel_file_descriptor.h";
+parcelable ParcelFileDescriptor cpp_header "binder/ParcelFileDescriptor.h";
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 9ad5ca4..d693ee8 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -140,6 +140,12 @@
public static final int CAMERASERVER_UID = 1047;
/**
+ * Defines the UID/GID for the tethering DNS resolver (currently dnsmasq).
+ * @hide
+ */
+ public static final int DNS_TETHER_UID = 1052;
+
+ /**
* Defines the UID/GID for the WebView zygote process.
* @hide
*/
@@ -151,6 +157,12 @@
*/
public static final int OTA_UPDATE_UID = 1061;
+ /**
+ * Defines the UID/GID for the Secure Element service process.
+ * @hide
+ */
+ public static final int SE_UID = 1068;
+
/** {@hide} */
public static final int NOBODY_UID = 9999;
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index 3b6df5d..0789afd 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -196,9 +196,14 @@
*/
public static final int DETECT_UNBUFFERED_IO = 0x20; // for ThreadPolicy
+ /**
+ * @hide
+ */
+ public static final int DETECT_EXPLICIT_GC = 0x40; // for ThreadPolicy
+
private static final int ALL_THREAD_DETECT_BITS =
DETECT_DISK_WRITE | DETECT_DISK_READ | DETECT_NETWORK | DETECT_CUSTOM |
- DETECT_RESOURCE_MISMATCH | DETECT_UNBUFFERED_IO;
+ DETECT_RESOURCE_MISMATCH | DETECT_UNBUFFERED_IO | DETECT_EXPLICIT_GC;
// Byte 2: Process-policy
@@ -557,6 +562,27 @@
}
/**
+ * Detect explicit GC requests, i.e. calls to Runtime.gc().
+ *
+ * @hide
+ */
+ public Builder detectExplicitGc() {
+ // TODO(b/3400644): Un-hide this for next API update
+ // TODO(b/3400644): Call this from detectAll in next API update
+ return enable(DETECT_EXPLICIT_GC);
+ }
+
+ /**
+ * Disable detection of explicit GC requests, i.e. calls to Runtime.gc().
+ *
+ * @hide
+ */
+ public Builder permitExplicitGc() {
+ // TODO(b/3400644): Un-hide this for next API update
+ return disable(DETECT_EXPLICIT_GC);
+ }
+
+ /**
* Show an annoying dialog to the developer on detected
* violations, rate-limited to be only a little annoying.
*/
@@ -1094,6 +1120,15 @@
}
/**
+ * @hide
+ */
+ private static class StrictModeExplicitGcViolation extends StrictModeViolation {
+ StrictModeExplicitGcViolation(int policyMask) {
+ super(policyMask, DETECT_EXPLICIT_GC, null);
+ }
+ }
+
+ /**
* Returns the bitmask of the current thread's policy.
*
* @return the bitmask of all the DETECT_* and PENALTY_* bits currently enabled
@@ -1414,7 +1449,7 @@
startHandlingViolationException(e);
}
- // Part of BlockGuard.Policy; just part of StrictMode:
+ // Part of BlockGuard.Policy interface:
public void onUnbufferedIO() {
if ((mPolicyMask & DETECT_UNBUFFERED_IO) == 0) {
return;
@@ -1457,6 +1492,20 @@
startHandlingViolationException(e);
}
+ // Part of BlockGuard.Policy interface:
+ public void onExplicitGc() {
+ if ((mPolicyMask & DETECT_EXPLICIT_GC) == 0) {
+ return;
+ }
+ if (tooManyViolationsThisLoop()) {
+ return;
+ }
+ BlockGuard.BlockGuardPolicyException e =
+ new StrictModeExplicitGcViolation(mPolicyMask);
+ e.fillInStackTrace();
+ startHandlingViolationException(e);
+ }
+
public void setPolicyMask(int policyMask) {
mPolicyMask = policyMask;
}
diff --git a/core/java/android/os/SystemProperties.java b/core/java/android/os/SystemProperties.java
index 4f6d322..89168ae 100644
--- a/core/java/android/os/SystemProperties.java
+++ b/core/java/android/os/SystemProperties.java
@@ -189,7 +189,12 @@
}
ArrayList<Runnable> callbacks = new ArrayList<Runnable>(sChangeCallbacks);
for (int i=0; i<callbacks.size(); i++) {
- callbacks.get(i).run();
+ try {
+ callbacks.get(i).run();
+ } catch (Throwable t) {
+ Log.wtf(TAG, "Exception in SystemProperties change callback", t);
+ // Ignore and try to go on.
+ }
}
}
}
diff --git a/core/java/android/os/Trace.java b/core/java/android/os/Trace.java
index fa96dd3..855e3e6 100644
--- a/core/java/android/os/Trace.java
+++ b/core/java/android/os/Trace.java
@@ -89,6 +89,10 @@
public static final long TRACE_TAG_NETWORK = 1L << 21;
/** @hide */
public static final long TRACE_TAG_ADB = 1L << 22;
+ /** @hide */
+ public static final long TRACE_TAG_AIDL = 1L << 24;
+ /** @hide */
+ public static final long TRACE_TAG_NNAPI = 1L << 25;
private static final long TRACE_TAG_NOT_READY = 1L << 63;
private static final int MAX_SECTION_NAME_LEN = 127;
diff --git a/core/java/android/os/VintfObject.java b/core/java/android/os/VintfObject.java
index 12a495b..fb22194 100644
--- a/core/java/android/os/VintfObject.java
+++ b/core/java/android/os/VintfObject.java
@@ -80,4 +80,11 @@
* ("28", ["libjpeg.so", "libbase.so"])]
*/
public static native Map<String, String[]> getVndkSnapshots();
+
+ /**
+ * @return target FCM version, a number specified in the device manifest
+ * indicating the FCM version that the device manifest implements. Null if
+ * device manifest doesn't specify this number (for legacy devices).
+ */
+ public static native Long getTargetFrameworkCompatibilityMatrixVersion();
}
diff --git a/core/java/android/os/WorkSource.java b/core/java/android/os/WorkSource.java
index ecec448..5bf051d 100644
--- a/core/java/android/os/WorkSource.java
+++ b/core/java/android/os/WorkSource.java
@@ -4,6 +4,9 @@
import android.util.Log;
import android.util.proto.ProtoOutputStream;
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.util.ArrayList;
import java.util.Arrays;
/**
@@ -356,6 +359,15 @@
return result;
}
+ /**
+ * Temporary dummy function.
+ * @hide
+ */
+ public ArrayList<WorkChain> getWorkChains() {
+ return null;
+ }
+
+
private boolean removeUids(WorkSource other) {
int N1 = mNum;
final int[] uids1 = mUids;
@@ -664,6 +676,52 @@
}
}
+ /**
+ * Temporary dummy class for WorkChain. Will be removed.
+ * @hide
+ */
+ public static final class WorkChain implements Parcelable {
+ // @VisibleForTesting
+ public WorkChain() {
+ }
+
+ private WorkChain(Parcel in) {
+ in.readInt();
+ }
+
+ /** @hide */
+ @VisibleForTesting
+ public int[] getUids() {
+ return null;
+ }
+
+ /** @hide */
+ @VisibleForTesting
+ public String[] getTags() {
+ return null;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(0);
+ }
+
+ public static final Parcelable.Creator<WorkChain> CREATOR =
+ new Parcelable.Creator<WorkChain>() {
+ public WorkChain createFromParcel(Parcel in) {
+ return new WorkChain(in);
+ }
+ public WorkChain[] newArray(int size) {
+ return new WorkChain[size];
+ }
+ };
+ }
+
@Override
public int describeContents() {
return 0;
diff --git a/core/java/android/os/ZygoteProcess.java b/core/java/android/os/ZygoteProcess.java
index 670f794..bb77a93 100644
--- a/core/java/android/os/ZygoteProcess.java
+++ b/core/java/android/os/ZygoteProcess.java
@@ -32,7 +32,9 @@
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
+import java.util.UUID;
/*package*/ class ZygoteStartFailedEx extends Exception {
ZygoteStartFailedEx(String s) {
@@ -61,18 +63,27 @@
/**
* The name of the socket used to communicate with the primary zygote.
*/
- private final String mSocket;
+ private final LocalSocketAddress mSocket;
/**
* The name of the secondary (alternate ABI) zygote socket.
*/
- private final String mSecondarySocket;
+ private final LocalSocketAddress mSecondarySocket;
public ZygoteProcess(String primarySocket, String secondarySocket) {
+ this(new LocalSocketAddress(primarySocket, LocalSocketAddress.Namespace.RESERVED),
+ new LocalSocketAddress(secondarySocket, LocalSocketAddress.Namespace.RESERVED));
+ }
+
+ public ZygoteProcess(LocalSocketAddress primarySocket, LocalSocketAddress secondarySocket) {
mSocket = primarySocket;
mSecondarySocket = secondarySocket;
}
+ public LocalSocketAddress getPrimarySocketAddress() {
+ return mSocket;
+ }
+
/**
* State for communicating with the zygote process.
*/
@@ -92,14 +103,13 @@
this.abiList = abiList;
}
- public static ZygoteState connect(String socketAddress) throws IOException {
+ public static ZygoteState connect(LocalSocketAddress address) throws IOException {
DataInputStream zygoteInputStream = null;
BufferedWriter zygoteWriter = null;
final LocalSocket zygoteSocket = new LocalSocket();
try {
- zygoteSocket.connect(new LocalSocketAddress(socketAddress,
- LocalSocketAddress.Namespace.RESERVED));
+ zygoteSocket.connect(address);
zygoteInputStream = new DataInputStream(zygoteSocket.getInputStream());
@@ -115,8 +125,8 @@
}
String abiListString = getAbiList(zygoteWriter, zygoteInputStream);
- Log.i("Zygote", "Process: zygote socket " + socketAddress + " opened, supported ABIS: "
- + abiListString);
+ Log.i("Zygote", "Process: zygote socket " + address.getNamespace() + "/"
+ + address.getName() + " opened, supported ABIS: " + abiListString);
return new ZygoteState(zygoteSocket, zygoteInputStream, zygoteWriter,
Arrays.asList(abiListString.split(",")));
@@ -149,6 +159,13 @@
private final Object mLock = new Object();
/**
+ * List of exemptions to the API blacklist. These are prefix matches on the runtime format
+ * symbol signature. Any matching symbol is treated by the runtime as being on the light grey
+ * list.
+ */
+ private List<String> mApiBlacklistExemptions = Collections.emptyList();
+
+ /**
* The state of the connection to the primary zygote.
*/
private ZygoteState primaryZygoteState;
@@ -166,7 +183,7 @@
* The process will continue running after this function returns.
*
* <p>If processes are not enabled, a new thread in the caller's
- * process is created and main() of <var>processClass</var> called there.
+ * process is created and main() of <var>processclass</var> called there.
*
* <p>The niceName parameter, if not an empty string, is a custom name to
* give to the process instead of using processClass. This allows you to
@@ -209,7 +226,8 @@
try {
return startViaZygote(processClass, niceName, uid, gid, gids,
runtimeFlags, mountExternal, targetSdkVersion, seInfo,
- abi, instructionSet, appDataDir, invokeWith, zygoteArgs);
+ abi, instructionSet, appDataDir, invokeWith, false /* startChildZygote */,
+ zygoteArgs);
} catch (ZygoteStartFailedEx ex) {
Log.e(LOG_TAG,
"Starting VM process through Zygote failed");
@@ -325,6 +343,8 @@
* @param abi the ABI the process should use.
* @param instructionSet null-ok the instruction set to use.
* @param appDataDir null-ok the data directory of the app.
+ * @param startChildZygote Start a sub-zygote. This creates a new zygote process
+ * that has its state cloned from this zygote process.
* @param extraArgs Additional arguments to supply to the zygote process.
* @return An object that describes the result of the attempt to start the process.
* @throws ZygoteStartFailedEx if process start failed for any reason
@@ -340,6 +360,7 @@
String instructionSet,
String appDataDir,
String invokeWith,
+ boolean startChildZygote,
String[] extraArgs)
throws ZygoteStartFailedEx {
ArrayList<String> argsForZygote = new ArrayList<String>();
@@ -396,6 +417,10 @@
argsForZygote.add(invokeWith);
}
+ if (startChildZygote) {
+ argsForZygote.add("--start-child-zygote");
+ }
+
argsForZygote.add(processClass);
if (extraArgs != null) {
@@ -410,6 +435,18 @@
}
/**
+ * Closes the connections to the zygote, if they exist.
+ */
+ public void close() {
+ if (primaryZygoteState != null) {
+ primaryZygoteState.close();
+ }
+ if (secondaryZygoteState != null) {
+ secondaryZygoteState.close();
+ }
+ }
+
+ /**
* Tries to establish a connection to the zygote that handles a given {@code abi}. Might block
* and retry if the zygote is unresponsive. This method is a no-op if a connection is
* already open.
@@ -425,6 +462,79 @@
}
/**
+ * Attempt to retrieve the PID of the zygote serving the given abi.
+ */
+ public int getZygotePid(String abi) {
+ try {
+ synchronized (mLock) {
+ ZygoteState state = openZygoteSocketIfNeeded(abi);
+
+ // Each query starts with the argument count (1 in this case)
+ state.writer.write("1");
+ // ... followed by a new-line.
+ state.writer.newLine();
+ // ... followed by our only argument.
+ state.writer.write("--get-pid");
+ state.writer.newLine();
+ state.writer.flush();
+
+ // The response is a length prefixed stream of ASCII bytes.
+ int numBytes = state.inputStream.readInt();
+ byte[] bytes = new byte[numBytes];
+ state.inputStream.readFully(bytes);
+
+ return Integer.parseInt(new String(bytes, StandardCharsets.US_ASCII));
+ }
+ } catch (Exception ex) {
+ throw new RuntimeException("Failure retrieving pid", ex);
+ }
+ }
+
+ /**
+ * Push hidden API blacklisting exemptions into the zygote process(es).
+ *
+ * <p>The list of exemptions will take affect for all new processes forked from the zygote after
+ * this call.
+ *
+ * @param exemptions List of hidden API exemption prefixes. Any matching members are treated as
+ * whitelisted/public APIs (i.e. allowed, no logging of usage).
+ */
+ public void setApiBlacklistExemptions(List<String> exemptions) {
+ synchronized (mLock) {
+ mApiBlacklistExemptions = exemptions;
+ maybeSetApiBlacklistExemptions(primaryZygoteState, true);
+ maybeSetApiBlacklistExemptions(secondaryZygoteState, true);
+ }
+ }
+
+ @GuardedBy("mLock")
+ private void maybeSetApiBlacklistExemptions(ZygoteState state, boolean sendIfEmpty) {
+ if (state == null || state.isClosed()) {
+ return;
+ }
+ if (!sendIfEmpty && mApiBlacklistExemptions.isEmpty()) {
+ return;
+ }
+ try {
+ state.writer.write(Integer.toString(mApiBlacklistExemptions.size() + 1));
+ state.writer.newLine();
+ state.writer.write("--set-api-blacklist-exemptions");
+ state.writer.newLine();
+ for (int i = 0; i < mApiBlacklistExemptions.size(); ++i) {
+ state.writer.write(mApiBlacklistExemptions.get(i));
+ state.writer.newLine();
+ }
+ state.writer.flush();
+ int status = state.inputStream.readInt();
+ if (status != 0) {
+ Slog.e(LOG_TAG, "Failed to set API blacklist exemptions; status " + status);
+ }
+ } catch (IOException ioe) {
+ Slog.e(LOG_TAG, "Failed to set API blacklist exemptions", ioe);
+ }
+ }
+
+ /**
* Tries to open socket to Zygote process if not already open. If
* already open, does nothing. May block and retry. Requires that mLock be held.
*/
@@ -438,8 +548,8 @@
} catch (IOException ioe) {
throw new ZygoteStartFailedEx("Error connecting to primary zygote", ioe);
}
+ maybeSetApiBlacklistExemptions(primaryZygoteState, false);
}
-
if (primaryZygoteState.matches(abi)) {
return primaryZygoteState;
}
@@ -451,6 +561,7 @@
} catch (IOException ioe) {
throw new ZygoteStartFailedEx("Error connecting to secondary zygote", ioe);
}
+ maybeSetApiBlacklistExemptions(secondaryZygoteState, false);
}
if (secondaryZygoteState.matches(abi)) {
@@ -514,9 +625,19 @@
* @param socketName The name of the socket to connect to.
*/
public static void waitForConnectionToZygote(String socketName) {
+ final LocalSocketAddress address =
+ new LocalSocketAddress(socketName, LocalSocketAddress.Namespace.RESERVED);
+ waitForConnectionToZygote(address);
+ }
+
+ /**
+ * Try connecting to the Zygote over and over again until we hit a time-out.
+ * @param address The name of the socket to connect to.
+ */
+ public static void waitForConnectionToZygote(LocalSocketAddress address) {
for (int n = 20; n >= 0; n--) {
try {
- final ZygoteState zs = ZygoteState.connect(socketName);
+ final ZygoteState zs = ZygoteState.connect(address);
zs.close();
return;
} catch (IOException ioe) {
@@ -529,6 +650,38 @@
} catch (InterruptedException ie) {
}
}
- Slog.wtf(LOG_TAG, "Failed to connect to Zygote through socket " + socketName);
+ Slog.wtf(LOG_TAG, "Failed to connect to Zygote through socket " + address.getName());
+ }
+
+ /**
+ * Starts a new zygote process as a child of this zygote. This is used to create
+ * secondary zygotes that inherit data from the zygote that this object
+ * communicates with. This returns a new ZygoteProcess representing a connection
+ * to the newly created zygote. Throws an exception if the zygote cannot be started.
+ */
+ public ChildZygoteProcess startChildZygote(final String processClass,
+ final String niceName,
+ int uid, int gid, int[] gids,
+ int runtimeFlags,
+ String seInfo,
+ String abi,
+ String instructionSet) {
+ // Create an unguessable address in the global abstract namespace.
+ final LocalSocketAddress serverAddress = new LocalSocketAddress(
+ processClass + "/" + UUID.randomUUID().toString());
+
+ final String[] extraArgs = {Zygote.CHILD_ZYGOTE_SOCKET_NAME_ARG + serverAddress.getName()};
+
+ Process.ProcessStartResult result;
+ try {
+ result = startViaZygote(processClass, niceName, uid, gid,
+ gids, runtimeFlags, 0 /* mountExternal */, 0 /* targetSdkVersion */, seInfo,
+ abi, instructionSet, null /* appDataDir */, null /* invokeWith */,
+ true /* startChildZygote */, extraArgs);
+ } catch (ZygoteStartFailedEx ex) {
+ throw new RuntimeException("Starting child-zygote through Zygote failed", ex);
+ }
+
+ return new ChildZygoteProcess(serverAddress, result.pid);
}
}
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl b/core/java/android/os/connectivity/CellularBatteryStats.aidl
similarity index 80%
copy from telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
copy to core/java/android/os/connectivity/CellularBatteryStats.aidl
index d648a35..ca0a585 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
+++ b/core/java/android/os/connectivity/CellularBatteryStats.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -14,6 +14,7 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.os.connectivity;
-parcelable ImsStreamMediaProfile;
+/** {@hide} */
+parcelable CellularBatteryStats;
\ No newline at end of file
diff --git a/core/java/android/os/connectivity/CellularBatteryStats.java b/core/java/android/os/connectivity/CellularBatteryStats.java
new file mode 100644
index 0000000..2593c85
--- /dev/null
+++ b/core/java/android/os/connectivity/CellularBatteryStats.java
@@ -0,0 +1,242 @@
+/*
+ * 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.
+ */
+package android.os.connectivity;
+
+import android.os.BatteryStats;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import android.telephony.ModemActivityInfo;
+import android.telephony.SignalStrength;
+
+import java.util.Arrays;
+
+/**
+ * API for Cellular power stats
+ *
+ * @hide
+ */
+public final class CellularBatteryStats implements Parcelable {
+
+ private long mLoggingDurationMs;
+ private long mKernelActiveTimeMs;
+ private long mNumPacketsTx;
+ private long mNumBytesTx;
+ private long mNumPacketsRx;
+ private long mNumBytesRx;
+ private long mSleepTimeMs;
+ private long mIdleTimeMs;
+ private long mRxTimeMs;
+ private long mEnergyConsumedMaMs;
+ private long[] mTimeInRatMs;
+ private long[] mTimeInRxSignalStrengthLevelMs;
+ private long[] mTxTimeMs;
+
+ public static final Parcelable.Creator<CellularBatteryStats> CREATOR = new
+ Parcelable.Creator<CellularBatteryStats>() {
+ public CellularBatteryStats createFromParcel(Parcel in) {
+ return new CellularBatteryStats(in);
+ }
+
+ public CellularBatteryStats[] newArray(int size) {
+ return new CellularBatteryStats[size];
+ }
+ };
+
+ public CellularBatteryStats() {
+ initialize();
+ }
+
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeLong(mLoggingDurationMs);
+ out.writeLong(mKernelActiveTimeMs);
+ out.writeLong(mNumPacketsTx);
+ out.writeLong(mNumBytesTx);
+ out.writeLong(mNumPacketsRx);
+ out.writeLong(mNumBytesRx);
+ out.writeLong(mSleepTimeMs);
+ out.writeLong(mIdleTimeMs);
+ out.writeLong(mRxTimeMs);
+ out.writeLong(mEnergyConsumedMaMs);
+ out.writeLongArray(mTimeInRatMs);
+ out.writeLongArray(mTimeInRxSignalStrengthLevelMs);
+ out.writeLongArray(mTxTimeMs);
+ }
+
+ public void readFromParcel(Parcel in) {
+ mLoggingDurationMs = in.readLong();
+ mKernelActiveTimeMs = in.readLong();
+ mNumPacketsTx = in.readLong();
+ mNumBytesTx = in.readLong();
+ mNumPacketsRx = in.readLong();
+ mNumBytesRx = in.readLong();
+ mSleepTimeMs = in.readLong();
+ mIdleTimeMs = in.readLong();
+ mRxTimeMs = in.readLong();
+ mEnergyConsumedMaMs = in.readLong();
+ in.readLongArray(mTimeInRatMs);
+ in.readLongArray(mTimeInRxSignalStrengthLevelMs);
+ in.readLongArray(mTxTimeMs);
+ }
+
+ public long getLoggingDurationMs() {
+ return mLoggingDurationMs;
+ }
+
+ public long getKernelActiveTimeMs() {
+ return mKernelActiveTimeMs;
+ }
+
+ public long getNumPacketsTx() {
+ return mNumPacketsTx;
+ }
+
+ public long getNumBytesTx() {
+ return mNumBytesTx;
+ }
+
+ public long getNumPacketsRx() {
+ return mNumPacketsRx;
+ }
+
+ public long getNumBytesRx() {
+ return mNumBytesRx;
+ }
+
+ public long getSleepTimeMs() {
+ return mSleepTimeMs;
+ }
+
+ public long getIdleTimeMs() {
+ return mIdleTimeMs;
+ }
+
+ public long getRxTimeMs() {
+ return mRxTimeMs;
+ }
+
+ public long getEnergyConsumedMaMs() {
+ return mEnergyConsumedMaMs;
+ }
+
+ public long[] getTimeInRatMs() {
+ return mTimeInRatMs;
+ }
+
+ public long[] getTimeInRxSignalStrengthLevelMs() {
+ return mTimeInRxSignalStrengthLevelMs;
+ }
+
+ public long[] getTxTimeMs() {
+ return mTxTimeMs;
+ }
+
+ public void setLoggingDurationMs(long t) {
+ mLoggingDurationMs = t;
+ return;
+ }
+
+ public void setKernelActiveTimeMs(long t) {
+ mKernelActiveTimeMs = t;
+ return;
+ }
+
+ public void setNumPacketsTx(long n) {
+ mNumPacketsTx = n;
+ return;
+ }
+
+ public void setNumBytesTx(long b) {
+ mNumBytesTx = b;
+ return;
+ }
+
+ public void setNumPacketsRx(long n) {
+ mNumPacketsRx = n;
+ return;
+ }
+
+ public void setNumBytesRx(long b) {
+ mNumBytesRx = b;
+ return;
+ }
+
+ public void setSleepTimeMs(long t) {
+ mSleepTimeMs = t;
+ return;
+ }
+
+ public void setIdleTimeMs(long t) {
+ mIdleTimeMs = t;
+ return;
+ }
+
+ public void setRxTimeMs(long t) {
+ mRxTimeMs = t;
+ return;
+ }
+
+ public void setEnergyConsumedMaMs(long e) {
+ mEnergyConsumedMaMs = e;
+ return;
+ }
+
+ public void setTimeInRatMs(long[] t) {
+ mTimeInRatMs = Arrays.copyOfRange(t, 0,
+ Math.min(t.length, BatteryStats.NUM_DATA_CONNECTION_TYPES));
+ return;
+ }
+
+ public void setTimeInRxSignalStrengthLevelMs(long[] t) {
+ mTimeInRxSignalStrengthLevelMs = Arrays.copyOfRange(t, 0,
+ Math.min(t.length, SignalStrength.NUM_SIGNAL_STRENGTH_BINS));
+ return;
+ }
+
+ public void setTxTimeMs(long[] t) {
+ mTxTimeMs = Arrays.copyOfRange(t, 0, Math.min(t.length, ModemActivityInfo.TX_POWER_LEVELS));
+ return;
+ }
+
+ public int describeContents() {
+ return 0;
+ }
+
+ private CellularBatteryStats(Parcel in) {
+ initialize();
+ readFromParcel(in);
+ }
+
+ private void initialize() {
+ mLoggingDurationMs = 0;
+ mKernelActiveTimeMs = 0;
+ mNumPacketsTx = 0;
+ mNumBytesTx = 0;
+ mNumPacketsRx = 0;
+ mNumBytesRx = 0;
+ mSleepTimeMs = 0;
+ mIdleTimeMs = 0;
+ mRxTimeMs = 0;
+ mEnergyConsumedMaMs = 0;
+ mTimeInRatMs = new long[BatteryStats.NUM_DATA_CONNECTION_TYPES];
+ Arrays.fill(mTimeInRatMs, 0);
+ mTimeInRxSignalStrengthLevelMs = new long[SignalStrength.NUM_SIGNAL_STRENGTH_BINS];
+ Arrays.fill(mTimeInRxSignalStrengthLevelMs, 0);
+ mTxTimeMs = new long[ModemActivityInfo.TX_POWER_LEVELS];
+ Arrays.fill(mTxTimeMs, 0);
+ return;
+ }
+}
\ No newline at end of file
diff --git a/core/java/android/os/storage/VolumeInfo.java b/core/java/android/os/storage/VolumeInfo.java
index a21e05e..932f0c2 100644
--- a/core/java/android/os/storage/VolumeInfo.java
+++ b/core/java/android/os/storage/VolumeInfo.java
@@ -318,7 +318,9 @@
* {@link android.Manifest.permission#WRITE_MEDIA_STORAGE}.
*/
public File getInternalPathForUser(int userId) {
- if (type == TYPE_PUBLIC) {
+ if (path == null) {
+ return null;
+ } else if (type == TYPE_PUBLIC) {
// TODO: plumb through cleaner path from vold
return new File(path.replace("/storage/", "/mnt/media_rw/"));
} else {
diff --git a/core/java/android/provider/BlockedNumberContract.java b/core/java/android/provider/BlockedNumberContract.java
index fb11d00..67c6fb9 100644
--- a/core/java/android/provider/BlockedNumberContract.java
+++ b/core/java/android/provider/BlockedNumberContract.java
@@ -19,6 +19,7 @@
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
+import android.telecom.Log;
/**
* <p>
@@ -228,6 +229,25 @@
/** @hide */
public static final String RES_CAN_BLOCK_NUMBERS = "can_block";
+ /** @hide */
+ public static final String RES_ENHANCED_SETTING_IS_ENABLED = "enhanced_setting_enabled";
+
+ /** @hide */
+ public static final String RES_SHOW_EMERGENCY_CALL_NOTIFICATION =
+ "show_emergency_call_notification";
+
+ /** @hide */
+ public static final String EXTRA_ENHANCED_SETTING_KEY = "extra_enhanced_setting_key";
+
+ /** @hide */
+ public static final String EXTRA_ENHANCED_SETTING_VALUE = "extra_enhanced_setting_value";
+
+ /** @hide */
+ public static final String EXTRA_CONTACT_EXIST = "extra_contact_exist";
+
+ /** @hide */
+ public static final String EXTRA_CALL_PRESENTATION = "extra_call_presentation";
+
/**
* Returns whether a given number is in the blocked list.
*
@@ -242,9 +262,16 @@
*/
@WorkerThread
public static boolean isBlocked(Context context, String phoneNumber) {
- final Bundle res = context.getContentResolver().call(
- AUTHORITY_URI, METHOD_IS_BLOCKED, phoneNumber, null);
- return res != null && res.getBoolean(RES_NUMBER_IS_BLOCKED, false);
+ try {
+ final Bundle res = context.getContentResolver().call(
+ AUTHORITY_URI, METHOD_IS_BLOCKED, phoneNumber, null);
+ return res != null && res.getBoolean(RES_NUMBER_IS_BLOCKED, false);
+ } catch (NullPointerException | IllegalArgumentException ex) {
+ // The content resolver can throw an NPE or IAE; we don't want to crash Telecom if
+ // either of these happen.
+ Log.w(null, "isBlocked: provider not ready.");
+ return false;
+ }
}
/**
@@ -278,9 +305,16 @@
* @return {@code true} if the current user can block numbers.
*/
public static boolean canCurrentUserBlockNumbers(Context context) {
- final Bundle res = context.getContentResolver().call(
- AUTHORITY_URI, METHOD_CAN_CURRENT_USER_BLOCK_NUMBERS, null, null);
- return res != null && res.getBoolean(RES_CAN_BLOCK_NUMBERS, false);
+ try {
+ final Bundle res = context.getContentResolver().call(
+ AUTHORITY_URI, METHOD_CAN_CURRENT_USER_BLOCK_NUMBERS, null, null);
+ return res != null && res.getBoolean(RES_CAN_BLOCK_NUMBERS, false);
+ } catch (NullPointerException | IllegalArgumentException ex) {
+ // The content resolver can throw an NPE or IAE; we don't want to crash Telecom if
+ // either of these happen.
+ Log.w(null, "canCurrentUserBlockNumbers: provider not ready.");
+ return false;
+ }
}
/**
@@ -314,11 +348,33 @@
public static final String METHOD_GET_BLOCK_SUPPRESSION_STATUS =
"get_block_suppression_status";
+ public static final String METHOD_SHOULD_SHOW_EMERGENCY_CALL_NOTIFICATION =
+ "should_show_emergency_call_notification";
+
public static final String RES_IS_BLOCKING_SUPPRESSED = "blocking_suppressed";
public static final String RES_BLOCKING_SUPPRESSED_UNTIL_TIMESTAMP =
"blocking_suppressed_until_timestamp";
+ public static final String METHOD_GET_ENHANCED_BLOCK_SETTING = "get_enhanced_block_setting";
+ public static final String METHOD_SET_ENHANCED_BLOCK_SETTING = "set_enhanced_block_setting";
+
+ /* Preference key of block numbers not in contacts setting. */
+ public static final String ENHANCED_SETTING_KEY_BLOCK_UNREGISTERED =
+ "block_numbers_not_in_contacts_setting";
+ /* Preference key of block private number calls setting. */
+ public static final String ENHANCED_SETTING_KEY_BLOCK_PRIVATE =
+ "block_private_number_calls_setting";
+ /* Preference key of block payphone calls setting. */
+ public static final String ENHANCED_SETTING_KEY_BLOCK_PAYPHONE =
+ "block_payphone_calls_setting";
+ /* Preference key of block unknown calls setting. */
+ public static final String ENHANCED_SETTING_KEY_BLOCK_UNKNOWN =
+ "block_unknown_calls_setting";
+ /* Preference key for whether should show an emergency call notification. */
+ public static final String ENHANCED_SETTING_KEY_SHOW_EMERGENCY_CALL_NOTIFICATION =
+ "show_emergency_call_notification";
+
/**
* Notifies the provider that emergency services were contacted by the user.
* <p> This results in {@link #shouldSystemBlockNumber} returning {@code false} independent
@@ -327,8 +383,14 @@
* the provider unless {@link #endBlockSuppression(Context)} is called.
*/
public static void notifyEmergencyContact(Context context) {
- context.getContentResolver().call(
- AUTHORITY_URI, METHOD_NOTIFY_EMERGENCY_CONTACT, null, null);
+ try {
+ context.getContentResolver().call(
+ AUTHORITY_URI, METHOD_NOTIFY_EMERGENCY_CONTACT, null, null);
+ } catch (NullPointerException | IllegalArgumentException ex) {
+ // The content resolver can throw an NPE or IAE; we don't want to crash Telecom if
+ // either of these happen.
+ Log.w(null, "notifyEmergencyContact: provider not ready.");
+ }
}
/**
@@ -342,14 +404,27 @@
/**
* Returns {@code true} if {@code phoneNumber} is blocked taking
- * {@link #notifyEmergencyContact(Context)} into consideration. If emergency services have
- * not been contacted recently, this method is equivalent to
- * {@link #isBlocked(Context, String)}.
+ * {@link #notifyEmergencyContact(Context)} into consideration. If emergency services
+ * have not been contacted recently and enhanced call blocking not been enabled, this
+ * method is equivalent to {@link #isBlocked(Context, String)}.
+ *
+ * @param context the context of the caller.
+ * @param phoneNumber the number to check.
+ * @param extras the extra attribute of the number.
+ * @return {@code true} if should block the number. {@code false} otherwise.
*/
- public static boolean shouldSystemBlockNumber(Context context, String phoneNumber) {
- final Bundle res = context.getContentResolver().call(
- AUTHORITY_URI, METHOD_SHOULD_SYSTEM_BLOCK_NUMBER, phoneNumber, null);
- return res != null && res.getBoolean(RES_NUMBER_IS_BLOCKED, false);
+ public static boolean shouldSystemBlockNumber(Context context, String phoneNumber,
+ Bundle extras) {
+ try {
+ final Bundle res = context.getContentResolver().call(
+ AUTHORITY_URI, METHOD_SHOULD_SYSTEM_BLOCK_NUMBER, phoneNumber, extras);
+ return res != null && res.getBoolean(RES_NUMBER_IS_BLOCKED, false);
+ } catch (NullPointerException | IllegalArgumentException ex) {
+ // The content resolver can throw an NPE or IAE; we don't want to crash Telecom if
+ // either of these happen.
+ Log.w(null, "shouldSystemBlockNumber: provider not ready.");
+ return false;
+ }
}
/**
@@ -363,9 +438,76 @@
}
/**
- * Represents the current status of {@link #shouldSystemBlockNumber(Context, String)}. If
- * emergency services have been contacted recently, {@link #isSuppressed} is {@code true},
- * and blocking is disabled until the timestamp {@link #untilTimestampMillis}.
+ * Check whether should show the emergency call notification.
+ *
+ * @param context the context of the caller.
+ * @return {@code true} if should show emergency call notification. {@code false} otherwise.
+ */
+ public static boolean shouldShowEmergencyCallNotification(Context context) {
+ try {
+ final Bundle res = context.getContentResolver().call(
+ AUTHORITY_URI, METHOD_SHOULD_SHOW_EMERGENCY_CALL_NOTIFICATION, null, null);
+ return res != null && res.getBoolean(RES_SHOW_EMERGENCY_CALL_NOTIFICATION, false);
+ } catch (NullPointerException | IllegalArgumentException ex) {
+ // The content resolver can throw an NPE or IAE; we don't want to crash Telecom if
+ // either of these happen.
+ Log.w(null, "shouldShowEmergencyCallNotification: provider not ready.");
+ return false;
+ }
+ }
+
+ /**
+ * Check whether the enhanced block setting is enabled.
+ *
+ * @param context the context of the caller.
+ * @param key the key of the setting to check, can be
+ * {@link #ENHANCED_SETTING_KEY_BLOCK_UNREGISTERED}
+ * {@link #ENHANCED_SETTING_KEY_BLOCK_PRIVATE}
+ * {@link #ENHANCED_SETTING_KEY_BLOCK_PAYPHONE}
+ * {@link #ENHANCED_SETTING_KEY_BLOCK_UNKNOWN}
+ * {@link #ENHANCED_SETTING_KEY_EMERGENCY_CALL_NOTIFICATION_SHOWING}
+ * @return {@code true} if the setting is enabled. {@code false} otherwise.
+ */
+ public static boolean getEnhancedBlockSetting(Context context, String key) {
+ Bundle extras = new Bundle();
+ extras.putString(EXTRA_ENHANCED_SETTING_KEY, key);
+ try {
+ final Bundle res = context.getContentResolver().call(
+ AUTHORITY_URI, METHOD_GET_ENHANCED_BLOCK_SETTING, null, extras);
+ return res != null && res.getBoolean(RES_ENHANCED_SETTING_IS_ENABLED, false);
+ } catch (NullPointerException | IllegalArgumentException ex) {
+ // The content resolver can throw an NPE or IAE; we don't want to crash Telecom if
+ // either of these happen.
+ Log.w(null, "getEnhancedBlockSetting: provider not ready.");
+ return false;
+ }
+ }
+
+ /**
+ * Set the enhanced block setting enabled status.
+ *
+ * @param context the context of the caller.
+ * @param key the key of the setting to set, can be
+ * {@link #ENHANCED_SETTING_KEY_BLOCK_UNREGISTERED}
+ * {@link #ENHANCED_SETTING_KEY_BLOCK_PRIVATE}
+ * {@link #ENHANCED_SETTING_KEY_BLOCK_PAYPHONE}
+ * {@link #ENHANCED_SETTING_KEY_BLOCK_UNKNOWN}
+ * {@link #ENHANCED_SETTING_KEY_EMERGENCY_CALL_NOTIFICATION_SHOWING}
+ * @param value the enabled statue of the setting to set.
+ */
+ public static void setEnhancedBlockSetting(Context context, String key, boolean value) {
+ Bundle extras = new Bundle();
+ extras.putString(EXTRA_ENHANCED_SETTING_KEY, key);
+ extras.putBoolean(EXTRA_ENHANCED_SETTING_VALUE, value);
+ context.getContentResolver().call(AUTHORITY_URI, METHOD_SET_ENHANCED_BLOCK_SETTING,
+ null, extras);
+ }
+
+ /**
+ * Represents the current status of
+ * {@link #shouldSystemBlockNumber(Context, String, Bundle)}. If emergency services
+ * have been contacted recently, {@link #isSuppressed} is {@code true}, and blocking
+ * is disabled until the timestamp {@link #untilTimestampMillis}.
*/
public static class BlockSuppressionStatus {
public final boolean isSuppressed;
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index 60df467..70de09e 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -223,14 +223,14 @@
/** Call was WIFI call. */
public static final int FEATURES_WIFI = 1 << 3;
- /** Call was on RTT at some point */
- public static final int FEATURES_RTT = 1 << 4;
-
/**
* Indicates the call underwent Assisted Dialing.
* @hide
*/
- public static final Integer FEATURES_ASSISTED_DIALING_USED = 0x10;
+ public static final int FEATURES_ASSISTED_DIALING_USED = 1 << 4;
+
+ /** Call was on RTT at some point */
+ public static final int FEATURES_RTT = 1 << 5;
/**
* The phone number as the user entered it.
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index ed68276..b607d4a 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3621,6 +3621,14 @@
public static final Validator VIBRATE_WHEN_RINGING_VALIDATOR = sBooleanValidator;
/**
+ * When {@code 1}, Telecom enhanced call blocking functionality is enabled. When
+ * {@code 0}, enhanced call blocking functionality is disabled.
+ * @hide
+ */
+ public static final String DEBUG_ENABLE_ENHANCED_CALL_BLOCKING =
+ "debug.enable_enhanced_calling";
+
+ /**
* Whether the audible DTMF tones are played by the dialer when dialing. The value is
* boolean (1 or 0).
*/
@@ -6241,6 +6249,15 @@
public static final String TTY_MODE_ENABLED = "tty_mode_enabled";
/**
+ * User-selected RTT mode. When on, outgoing and incoming calls will be answered as RTT
+ * calls when supported by the device and carrier. Boolean value.
+ * 0 = OFF
+ * 1 = ON
+ */
+ public static final String RTT_CALLING_MODE = "rtt_calling_mode";
+
+ /**
+ /**
* Controls whether settings backup is enabled.
* Type: int ( 0 = disabled, 1 = enabled )
* @hide
@@ -7197,6 +7214,7 @@
PREFERRED_TTY_MODE,
ENHANCED_VOICE_PRIVACY_ENABLED,
TTY_MODE_ENABLED,
+ RTT_CALLING_MODE,
INCALL_POWER_BUTTON_BEHAVIOR,
NIGHT_DISPLAY_CUSTOM_START_TIME,
NIGHT_DISPLAY_CUSTOM_END_TIME,
@@ -7838,9 +7856,8 @@
*
* @see android.service.euicc.EuiccService
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+ @SystemApi
public static final String DEFAULT_SM_DP_PLUS = "default_sm_dp_plus";
/**
@@ -7851,6 +7868,7 @@
* (0 = false, 1 = true)
* @hide
*/
+ @SystemApi
public static final String EUICC_PROVISIONED = "euicc_provisioned";
/**
@@ -8646,13 +8664,58 @@
public static final String RECOMMENDED_NETWORK_EVALUATOR_CACHE_EXPIRY_MS =
"recommended_network_evaluator_cache_expiry_ms";
- /**
+ /**
* Settings to allow BLE scans to be enabled even when Bluetooth is turned off for
* connectivity.
* @hide
*/
- public static final String BLE_SCAN_ALWAYS_AVAILABLE =
- "ble_scan_always_enabled";
+ public static final String BLE_SCAN_ALWAYS_AVAILABLE = "ble_scan_always_enabled";
+
+ /**
+ * The length in milliseconds of a BLE scan window in a low-power scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_LOW_POWER_WINDOW_MS = "ble_scan_low_power_window_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan window in a balanced scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_BALANCED_WINDOW_MS = "ble_scan_balanced_window_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan window in a low-latency scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_LOW_LATENCY_WINDOW_MS =
+ "ble_scan_low_latency_window_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan interval in a low-power scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_LOW_POWER_INTERVAL_MS =
+ "ble_scan_low_power_interval_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan interval in a balanced scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_BALANCED_INTERVAL_MS =
+ "ble_scan_balanced_interval_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan interval in a low-latency scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_LOW_LATENCY_INTERVAL_MS =
+ "ble_scan_low_latency_interval_ms";
+
+ /**
+ * The mode that BLE scanning clients will be moved to when in the background.
+ * @hide
+ */
+ public static final String BLE_SCAN_BACKGROUND_MODE = "ble_scan_background_mode";
/**
* Used to save the Wifi_ON state prior to tethering.
@@ -9113,6 +9176,15 @@
"captive_portal_other_fallback_urls";
/**
+ * A list of captive portal detection specifications used in addition to the fallback URLs.
+ * Each spec has the format url@@/@@statusCodeRegex@@/@@contentRegex. Specs are separated
+ * by "@@,@@".
+ * @hide
+ */
+ public static final String CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS =
+ "captive_portal_fallback_probe_specs";
+
+ /**
* Whether to use HTTPS for network validation. This is enabled by default and the setting
* needs to be set to 0 to disable it. This setting is a misnomer because captive portals
* don't actually use HTTPS, but it's consistent with the other settings.
@@ -10333,6 +10405,14 @@
"storage_settings_clobber_threshold";
/**
+ * Exemptions to the hidden API blacklist.
+ *
+ * @hide
+ */
+ public static final String HIDDEN_API_BLACKLIST_EXEMPTIONS =
+ "hidden_api_blacklist_exemptions";
+
+ /**
* Settings to backup. This is here so that it's in the same place as the settings
* keys and easy to update.
*
diff --git a/core/java/android/se/omapi/Channel.java b/core/java/android/se/omapi/Channel.java
new file mode 100644
index 0000000..5db3c1a
--- /dev/null
+++ b/core/java/android/se/omapi/Channel.java
@@ -0,0 +1,257 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.RemoteException;
+import android.os.ServiceSpecificException;
+import android.util.Log;
+
+import java.io.IOException;
+
+/**
+ * Instances of this class represent an ISO/IEC 7816-4 channel opened to a
+ * Secure Element. It can be either a logical channel or the basic channel. They
+ * can be used to send APDUs to the secure element. Channels are opened by
+ * calling the Session.openBasicChannel(byte[]) or
+ * Session.openLogicalChannel(byte[]) methods.
+ *
+ * @see <a href="http://globalplatform.org">GlobalPlatform Open Mobile API</a>
+ */
+public final class Channel implements java.nio.channels.Channel {
+
+ private static final String TAG = "OMAPI.Channel";
+ private Session mSession;
+ private final ISecureElementChannel mChannel;
+ private final SEService mService;
+ private final Object mLock = new Object();
+
+ Channel(@NonNull SEService service, @NonNull Session session,
+ @NonNull ISecureElementChannel channel) {
+ if (service == null || session == null || channel == null) {
+ throw new IllegalArgumentException("Parameters cannot be null");
+ }
+ mService = service;
+ mSession = session;
+ mChannel = channel;
+ }
+
+ /**
+ * Closes this channel to the Secure Element. If the method is called when
+ * the channel is already closed, this method will be ignored. The close()
+ * method shall wait for completion of any pending transmit(byte[] command)
+ * before closing the channel.
+ */
+ public void close() {
+ if (isOpen()) {
+ synchronized (mLock) {
+ try {
+ mChannel.close();
+ } catch (Exception e) {
+ Log.e(TAG, "Error closing channel", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Tells if this channel is open.
+ *
+ * @return <code>false</code> if the channel is closed or in case of an error.
+ * <code>true</code> otherwise.
+ */
+ public boolean isOpen() {
+ if (!mService.isConnected()) {
+ Log.e(TAG, "service not connected to system");
+ return false;
+ }
+ try {
+ return !mChannel.isClosed();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Exception in isClosed()");
+ return false;
+ }
+ }
+
+ /**
+ * Returns a boolean telling if this channel is the basic channel.
+ *
+ * @return <code>true</code> if this channel is a basic channel. <code>false</code> if
+ * this channel is a logical channel.
+ */
+ public boolean isBasicChannel() {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ try {
+ return mChannel.isBasicChannel();
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+
+ /**
+ * Transmit an APDU command (as per ISO/IEC 7816-4) to the Secure Element. The
+ * underlying layers generate as many TPDUs as necessary to transport this APDU. The
+ * API shall ensure that all available data returned from Secure Element, including
+ * concatenated responses, are retrieved and made available to the calling application. If a
+ * warning status code is received the API wont check for further response data but will
+ * return all data received so far and the warning status code.<br>
+ * The transport part is invisible from the application. The generated response is the
+ * response of the APDU which means that all protocols related responses are handled
+ * inside the API or the underlying implementation.<br>
+ * The transmit method shall support extended length APDU commands independently of
+ * the coding within the ATR.<br>
+ * For status word '61 XX' the API or underlying implementation shall issue a GET
+ * RESPONSE command as specified by ISO 7816-4 standard with LE=XX; for the status
+ * word '6C XX', the API or underlying implementation shall reissue the input command
+ * with LE=XX. For other status words, the API (or underlying implementation) shall return
+ * the complete response including data and status word to the device application. The API
+ * (or underlying implementation) shall not handle internally the received status words. The
+ * channel shall not be closed even if the Secure Element answered with an error code.
+ * The system ensures the synchronization between all the concurrent calls to this method,
+ * and that only one APDU will be sent at a time, irrespective of the number of TPDUs that
+ * might be required to transport it to the SE. The entire APDU communication to this SE is
+ * locked to the APDU.<br>
+ * The channel information in the class byte in the APDU will be ignored. The system will
+ * add any required information to ensure the APDU is transported on this channel.
+ * The only restrictions on the set of commands that can be sent is defined below, the API
+ * implementation shall be able to send all other commands: <br>
+ * <ul>
+ * <li>MANAGE_CHANNEL commands are not allowed.</li>
+ * <li>SELECT by DF Name (p1=04) are not allowed.</li>
+ * <li>CLA bytes with channel numbers are de-masked.</li>
+ * </ul>
+ *
+ * @param command the APDU command to be transmitted, as a byte array.
+ *
+ * @return the response received, as a byte array. The returned byte array contains the data
+ * bytes in the following order:
+ * [<first data byte>, ..., <last data byte>, <sw1>, <sw2>]
+ *
+ * @throws IOException if there is a communication problem to the reader or the Secure Element.
+ * @throws IllegalStateException if the channel is used after being closed.
+ * @throws IllegalArgumentException if the command byte array is less than 4 bytes long.
+ * @throws IllegalArgumentException if Lc byte is inconsistent with length of the byte array.
+ * @throws IllegalArgumentException if CLA byte is invalid according to [2] (0xff).
+ * @throws IllegalArgumentException if INS byte is invalid according to [2] (0x6x or 0x9x).
+ * @throws SecurityException if the command is filtered by the security policy.
+ * @throws NullPointerException if command is NULL.
+ */
+ public @NonNull byte[] transmit(@NonNull byte[] command) throws IOException {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ synchronized (mLock) {
+ try {
+ byte[] response = mChannel.transmit(command);
+ if (response == null) {
+ throw new IOException("Error in communicating with Secure Element");
+ }
+ return response;
+ } catch (ServiceSpecificException e) {
+ throw new IOException(e.getMessage());
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+ }
+
+ /**
+ * Get the session that has opened this channel.
+ *
+ * @return the session object this channel is bound to.
+ */
+ public @NonNull Session getSession() {
+ return mSession;
+ }
+
+ /**
+ * Returns the data as received from the application select command inclusively the status word
+ * received at applet selection.
+ * The returned byte array contains the data bytes in the following order:
+ * [<first data byte>, ..., <last data byte>, <sw1>, <sw2>]
+ * @return The data as returned by the application select command inclusively the status word.
+ * Only the status word if the application select command has no returned data.
+ * Returns null if an application select command has not been performed or the selection
+ * response can not be retrieved by the reader implementation.
+ */
+ public @Nullable byte[] getSelectResponse() {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+
+ byte[] response;
+ try {
+ response = mChannel.getSelectResponse();
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+
+ if (response != null && response.length == 0) {
+ response = null;
+ }
+ return response;
+ }
+
+ /**
+ * Performs a selection of the next Applet on this channel that matches to the partial AID
+ * specified in the openBasicChannel(byte[] aid) or openLogicalChannel(byte[] aid) method.
+ * This mechanism can be used by a device application to iterate through all Applets
+ * matching to the same partial AID.
+ * If selectNext() returns true a new Applet was successfully selected on this channel.
+ * If no further Applet exists with matches to the partial AID this method returns false
+ * and the already selected Applet stays selected. <br>
+ *
+ * Since the API cannot distinguish between a partial and full AID the API shall rely on the
+ * response of the Secure Element for the return value of this method. <br>
+ * The implementation of the underlying SELECT command within this method shall use
+ * the same values as the corresponding openBasicChannel(byte[] aid) or
+ * openLogicalChannel(byte[] aid) command with the option: <br>
+ * P2='02' (Next occurrence) <br>
+ * The select response stored in the Channel object shall be updated with the APDU
+ * response of the SELECT command.
+
+ * @return <code>true</code> if new Applet was selected on this channel.
+ <code>false</code> he already selected Applet stays selected on this channel.
+ *
+ * @throws IOException if there is a communication problem to the reader or the Secure Element.
+ * @throws IllegalStateException if the channel is used after being closed.
+ * @throws UnsupportedOperationException if this operation is not supported by the card.
+ */
+ public boolean selectNext() throws IOException {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ try {
+ synchronized (mLock) {
+ return mChannel.selectNext();
+ }
+ } catch (ServiceSpecificException e) {
+ throw new IOException(e.getMessage());
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+}
diff --git a/core/java/android/se/omapi/ISecureElementChannel.aidl b/core/java/android/se/omapi/ISecureElementChannel.aidl
new file mode 100644
index 0000000..4ae57ab
--- /dev/null
+++ b/core/java/android/se/omapi/ISecureElementChannel.aidl
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.se.omapi.ISecureElementSession;
+
+/** @hide */
+interface ISecureElementChannel {
+
+ /**
+ * Closes the specified connection and frees internal resources.
+ * A logical channel will be closed.
+ */
+ void close();
+
+ /**
+ * Tells if this channel is closed.
+ *
+ * @return <code>true</code> if the channel is closed,
+ * <code>false</code> otherwise.
+ */
+ boolean isClosed();
+
+ /**
+ * Returns a boolean telling if this channel is the basic channel.
+ *
+ * @return <code>true</code> if this channel is a basic channel.
+ * <code>false</code> if this channel is a logical channel.
+ */
+ boolean isBasicChannel();
+
+ /**
+ * Returns the data as received from the application select command
+ * inclusively the status word. The returned byte array contains the data
+ * bytes in the following order:
+ * [<first data byte>, ..., <last data byte>, <sw1>, <sw2>]
+ */
+ byte[] getSelectResponse();
+
+ /**
+ * Transmits the specified command APDU and returns the response APDU.
+ * MANAGE channel commands are not supported.
+ * Selection of applets is not supported in logical channels.
+ */
+ byte[] transmit(in byte[] command);
+
+ /**
+ * Performs a selection of the next Applet on this channel that matches to
+ * the partial AID specified in the openBasicChannel(byte[] aid) or
+ * openLogicalChannel(byte[] aid) method. This mechanism can be used by a
+ * device application to iterate through all Applets matching to the same
+ * partial AID.
+ * If selectNext() returns true a new Applet was successfully selected on
+ * this channel.
+ * If no further Applet exists with matches to the partial AID this method
+ * returns false and the already selected Applet stays selected.
+ *
+ * @return <code>true</code> if new Applet was successfully selected.
+ * <code>false</code> if no further Applet exists which matches the
+ * partial AID.
+ */
+ boolean selectNext();
+}
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl b/core/java/android/se/omapi/ISecureElementListener.aidl
similarity index 69%
copy from telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl
copy to core/java/android/se/omapi/ISecureElementListener.aidl
index f6005b6..e9dd181 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl
+++ b/core/java/android/se/omapi/ISecureElementListener.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 The Android Open Source Project
+ * 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.
@@ -13,13 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
-package android.telephony.ims.internal.aidl;
+package android.se.omapi;
/**
- * See RcsFeature for more information.
- * {@hide}
+ * Interface to receive call-backs when the service is connected.
+ * @hide
*/
-interface IImsRcsFeature {
- //Empty Default Implementation
-}
\ No newline at end of file
+interface ISecureElementListener {
+}
diff --git a/core/java/android/se/omapi/ISecureElementReader.aidl b/core/java/android/se/omapi/ISecureElementReader.aidl
new file mode 100644
index 0000000..a312c44
--- /dev/null
+++ b/core/java/android/se/omapi/ISecureElementReader.aidl
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.se.omapi.ISecureElementSession;
+
+/** @hide */
+interface ISecureElementReader {
+
+ /**
+ * Returns true if a card is present in the specified reader.
+ * Returns false if a card is not present in the specified reader.
+ */
+ boolean isSecureElementPresent();
+
+ /**
+ * Connects to a secure element in this reader. <br>
+ * This method prepares (initialises) the Secure Element for communication
+ * before the Session object is returned (e.g. powers the Secure Element by
+ * ICC ON if its not already on). There might be multiple sessions opened at
+ * the same time on the same reader. The system ensures the interleaving of
+ * APDUs between the respective sessions.
+ *
+ * @return a Session object to be used to create Channels.
+ */
+ ISecureElementSession openSession();
+
+ /**
+ * Close all the sessions opened on this reader. All the channels opened by
+ * all these sessions will be closed.
+ */
+ void closeSessions();
+
+}
diff --git a/core/java/android/se/omapi/ISecureElementService.aidl b/core/java/android/se/omapi/ISecureElementService.aidl
new file mode 100644
index 0000000..4fa799e
--- /dev/null
+++ b/core/java/android/se/omapi/ISecureElementService.aidl
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.se.omapi.ISecureElementReader;
+
+/**
+ * SecureElement service interface.
+ * @hide
+ */
+interface ISecureElementService {
+
+ /**
+ * Returns the friendly names of available Secure Element readers.
+ */
+ String[] getReaders();
+
+ /**
+ * Returns SecureElement Service reader object to the given name.
+ */
+ ISecureElementReader getReader(String reader);
+
+ /**
+ * Checks if the application defined by the package name is allowed to
+ * receive NFC transaction events for the defined AID.
+ */
+ boolean[] isNFCEventAllowed(String reader, in byte[] aid,
+ in String[] packageNames);
+
+}
diff --git a/core/java/android/se/omapi/ISecureElementSession.aidl b/core/java/android/se/omapi/ISecureElementSession.aidl
new file mode 100644
index 0000000..8ea599f
--- /dev/null
+++ b/core/java/android/se/omapi/ISecureElementSession.aidl
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.se.omapi.ISecureElementChannel;
+import android.se.omapi.ISecureElementReader;
+import android.se.omapi.ISecureElementListener;
+
+/** @hide */
+interface ISecureElementSession {
+
+ /**
+ * Returns the ATR of the connected card or null if the ATR is not available
+ */
+ byte[] getAtr();
+
+ /**
+ * Close the connection with the Secure Element. This will close any
+ * channels opened by this application with this Secure Element.
+ */
+ void close();
+
+ /**
+ * Close any channel opened on this session.
+ */
+ void closeChannels();
+
+
+ /**
+ * Tells if this session is closed.
+ *
+ * @return <code>true</code> if the session is closed, false otherwise.
+ */
+ boolean isClosed();
+
+ /**
+ * Opens a connection using the basic channel of the card in the
+ * specified reader and returns a channel handle. Selects the specified
+ * applet if aid != null.
+ * Logical channels cannot be opened with this connection.
+ * Use interface method openLogicalChannel() to open a logical channel.
+ */
+ ISecureElementChannel openBasicChannel(in byte[] aid, in byte p2,
+ ISecureElementListener listener);
+
+ /**
+ * Opens a connection using the next free logical channel of the card in the
+ * specified reader. Selects the specified applet.
+ * Selection of other applets with this connection is not supported.
+ */
+ ISecureElementChannel openLogicalChannel(in byte[] aid, in byte p2,
+ ISecureElementListener listener);
+}
diff --git a/core/java/android/se/omapi/Reader.java b/core/java/android/se/omapi/Reader.java
new file mode 100644
index 0000000..80262f7
--- /dev/null
+++ b/core/java/android/se/omapi/Reader.java
@@ -0,0 +1,153 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.annotation.NonNull;
+import android.os.RemoteException;
+import android.os.ServiceSpecificException;
+import android.util.Log;
+
+import java.io.IOException;
+
+/**
+ * Instances of this class represent Secure Element Readers supported to this
+ * device. These Readers can be physical devices or virtual devices. They can be
+ * removable or not. They can contain Secure Element that can or cannot be
+ * removed.
+ *
+ * @see <a href="http://globalplatform.org">GlobalPlatform Open Mobile API</a>
+ */
+public final class Reader {
+
+ private static final String TAG = "OMAPI.Reader";
+ private final String mName;
+ private final SEService mService;
+ private ISecureElementReader mReader;
+ private final Object mLock = new Object();
+
+
+ Reader(@NonNull SEService service, @NonNull String name, @NonNull ISecureElementReader reader) {
+ if (reader == null || service == null || name == null) {
+ throw new IllegalArgumentException("Parameters cannot be null");
+ }
+ mName = name;
+ mService = service;
+ mReader = reader;
+ }
+
+ /**
+ * Return the name of this reader.
+ * <ul>
+ * <li>If this reader is a SIM reader, then its name must be "SIM[Slot]".</li>
+ * <li>If the reader is a SD or micro SD reader, then its name must be "SD[Slot]"</li>
+ * <li>If the reader is a embedded SE reader, then its name must be "eSE[Slot]"</li>
+ * </ul>
+ * Slot is a decimal number without leading zeros. The Numbering must start with 1
+ * (e.g. SIM1, SIM2, ... or SD1, SD2, ... or eSE1, eSE2, ...).
+ * The slot number “1” for a reader is optional
+ * (SIM and SIM1 are both valid for the first SIM-reader,
+ * but if there are two readers then the second reader must be named SIM2).
+ * This applies also for other SD or SE readers.
+ *
+ * @return the reader name, as a String.
+ */
+ public @NonNull String getName() {
+ return mName;
+ }
+
+ /**
+ * Connects to a Secure Element in this reader. <br>
+ * This method prepares (initialises) the Secure Element for communication
+ * before the Session object is returned (e.g. powers the Secure Element by
+ * ICC ON if its not already on). There might be multiple sessions opened at
+ * the same time on the same reader. The system ensures the interleaving of
+ * APDUs between the respective sessions.
+ *
+ * @throws IOException if something went wrong with the communicating to the
+ * Secure Element or the reader.
+ * @return a Session object to be used to create Channels.
+ */
+ public @NonNull Session openSession() throws IOException {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service is not connected");
+ }
+
+ synchronized (mLock) {
+ ISecureElementSession session;
+ try {
+ session = mReader.openSession();
+ } catch (ServiceSpecificException e) {
+ throw new IOException(e.getMessage());
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ if (session == null) {
+ throw new IOException("service session is null.");
+ }
+ return new Session(mService, session, this);
+ }
+ }
+
+ /**
+ * Check if a Secure Element is present in this reader.
+ *
+ * @throws IllegalStateException if the service is not connected
+ * @return <code>true</code> if the SE is present, <code>false</code> otherwise.
+ */
+ public boolean isSecureElementPresent() {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service is not connected");
+ }
+
+ try {
+ return mReader.isSecureElementPresent();
+ } catch (RemoteException e) {
+ throw new IllegalStateException("Error in isSecureElementPresent()");
+ }
+ }
+
+ /**
+ * Return the Secure Element service this reader is bound to.
+ *
+ * @return the SEService object.
+ */
+ public @NonNull SEService getSEService() {
+ return mService;
+ }
+
+ /**
+ * Close all the sessions opened on this reader.
+ * All the channels opened by all these sessions will be closed.
+ */
+ public void closeSessions() {
+ if (!mService.isConnected()) {
+ Log.e(TAG, "service is not connected");
+ return;
+ }
+ synchronized (mLock) {
+ try {
+ mReader.closeSessions();
+ } catch (RemoteException ignore) { }
+ }
+ }
+}
diff --git a/core/java/android/se/omapi/SEService.java b/core/java/android/se/omapi/SEService.java
new file mode 100644
index 0000000..00060ab
--- /dev/null
+++ b/core/java/android/se/omapi/SEService.java
@@ -0,0 +1,273 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.annotation.NonNull;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+
+import java.util.HashMap;
+import java.util.concurrent.Executor;
+
+/**
+ * The SEService realises the communication to available Secure Elements on the
+ * device. This is the entry point of this API. It is used to connect to the
+ * infrastructure and get access to a list of Secure Element Readers.
+ *
+ * @see <a href="http://simalliance.org">SIMalliance Open Mobile API v3.0</a>
+ */
+public final class SEService {
+
+ /**
+ * Error code used with ServiceSpecificException.
+ * Thrown if there was an error communicating with the Secure Element.
+ *
+ * @hide
+ */
+ public static final int IO_ERROR = 1;
+
+ /**
+ * Error code used with ServiceSpecificException.
+ * Thrown if AID cannot be selected or is not available when opening
+ * a logical channel.
+ *
+ * @hide
+ */
+ public static final int NO_SUCH_ELEMENT_ERROR = 2;
+
+ /**
+ * Interface to send call-backs to the application when the service is connected.
+ */
+ public interface OnConnectedListener {
+ /**
+ * Called by the framework when the service is connected.
+ */
+ void onConnected();
+ }
+
+ /**
+ * Listener object that allows the notification of the caller if this
+ * SEService could be bound to the backend.
+ */
+ private class SEListener extends ISecureElementListener.Stub {
+ public OnConnectedListener mListener = null;
+ public Executor mExecutor = null;
+
+ @Override
+ public IBinder asBinder() {
+ return this;
+ }
+
+ public void onConnected() {
+ if (mListener != null && mExecutor != null) {
+ mExecutor.execute(new Runnable() {
+ @Override
+ public void run() {
+ mListener.onConnected();
+ }
+ });
+ }
+ }
+ }
+ private SEListener mSEListener = new SEListener();
+
+ private static final String TAG = "OMAPI.SEService";
+
+ private final Object mLock = new Object();
+
+ /** The client context (e.g. activity). */
+ private final Context mContext;
+
+ /** The backend system. */
+ private volatile ISecureElementService mSecureElementService;
+
+ /**
+ * Class for interacting with the main interface of the backend.
+ */
+ private ServiceConnection mConnection;
+
+ /**
+ * Collection of available readers
+ */
+ private final HashMap<String, Reader> mReaders = new HashMap<String, Reader>();
+
+ /**
+ * Establishes a new connection that can be used to connect to all the
+ * Secure Elements available in the system. The connection process can be
+ * quite long, so it happens in an asynchronous way. It is usable only if
+ * the specified listener is called or if isConnected() returns
+ * <code>true</code>. <br>
+ * The call-back object passed as a parameter will have its
+ * onConnected() method called when the connection actually happen.
+ *
+ * @param context
+ * the context of the calling application. Cannot be
+ * <code>null</code>.
+ * @param listener
+ * a OnConnectedListener object.
+ * @param executor
+ * an Executor which will be used when invoking the callback.
+ */
+ public SEService(@NonNull Context context, @NonNull Executor executor,
+ @NonNull OnConnectedListener listener) {
+
+ if (context == null || listener == null || executor == null) {
+ throw new NullPointerException("Arguments must not be null");
+ }
+
+ mContext = context;
+ mSEListener.mListener = listener;
+ mSEListener.mExecutor = executor;
+
+ mConnection = new ServiceConnection() {
+
+ public synchronized void onServiceConnected(
+ ComponentName className, IBinder service) {
+
+ mSecureElementService = ISecureElementService.Stub.asInterface(service);
+ if (mSEListener != null) {
+ mSEListener.onConnected();
+ }
+ Log.i(TAG, "Service onServiceConnected");
+ }
+
+ public void onServiceDisconnected(ComponentName className) {
+ mSecureElementService = null;
+ Log.i(TAG, "Service onServiceDisconnected");
+ }
+ };
+
+ Intent intent = new Intent(ISecureElementService.class.getName());
+ intent.setClassName("com.android.se",
+ "com.android.se.SecureElementService");
+ boolean bindingSuccessful =
+ mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
+ if (bindingSuccessful) {
+ Log.i(TAG, "bindService successful");
+ }
+ }
+
+ /**
+ * Tells whether or not the service is connected.
+ *
+ * @return <code>true</code> if the service is connected.
+ */
+ public boolean isConnected() {
+ return mSecureElementService != null;
+ }
+
+ /**
+ * Returns an array of available Secure Element readers.
+ * There must be no duplicated objects in the returned list.
+ * All available readers shall be listed even if no card is inserted.
+ *
+ * @return An array of Readers. If there are no readers the returned array
+ * is of length 0.
+ */
+ public @NonNull Reader[] getReaders() {
+ if (mSecureElementService == null) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ String[] readerNames;
+ try {
+ readerNames = mSecureElementService.getReaders();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+
+ Reader[] readers = new Reader[readerNames.length];
+ int i = 0;
+ for (String readerName : readerNames) {
+ if (mReaders.get(readerName) == null) {
+ try {
+ mReaders.put(readerName, new Reader(this, readerName,
+ getReader(readerName)));
+ readers[i++] = mReaders.get(readerName);
+ } catch (Exception e) {
+ Log.e(TAG, "Error adding Reader: " + readerName, e);
+ }
+ } else {
+ readers[i++] = mReaders.get(readerName);
+ }
+ }
+ return readers;
+ }
+
+ /**
+ * Releases all Secure Elements resources allocated by this SEService
+ * (including any binding to an underlying service).
+ * As a result isConnected() will return false after shutdown() was called.
+ * After this method call, the SEService object is not connected.
+ * This method should be called when connection to the Secure Element is not needed
+ * or in the termination method of the calling application
+ * (or part of this application) which is bound to this SEService.
+ */
+ public void shutdown() {
+ synchronized (mLock) {
+ if (mSecureElementService != null) {
+ for (Reader reader : mReaders.values()) {
+ try {
+ reader.closeSessions();
+ } catch (Exception ignore) { }
+ }
+ }
+ try {
+ mContext.unbindService(mConnection);
+ } catch (IllegalArgumentException e) {
+ // Do nothing and fail silently since an error here indicates
+ // that binding never succeeded in the first place.
+ }
+ mSecureElementService = null;
+ }
+ }
+
+ /**
+ * Returns the version of the OpenMobile API specification this
+ * implementation is based on.
+ *
+ * @return String containing the OpenMobile API version (e.g. "3.0").
+ */
+ public @NonNull String getVersion() {
+ return "3.3";
+ }
+
+ @NonNull ISecureElementListener getListener() {
+ return mSEListener;
+ }
+
+ /**
+ * Obtain a Reader instance from the SecureElementService
+ */
+ private @NonNull ISecureElementReader getReader(String name) {
+ try {
+ return mSecureElementService.getReader(name);
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+}
diff --git a/core/java/android/se/omapi/Session.java b/core/java/android/se/omapi/Session.java
new file mode 100644
index 0000000..d5f8c82
--- /dev/null
+++ b/core/java/android/se/omapi/Session.java
@@ -0,0 +1,361 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.RemoteException;
+import android.os.ServiceSpecificException;
+import android.util.Log;
+
+import java.io.IOException;
+import java.util.NoSuchElementException;
+
+/**
+ * Instances of this class represent a connection session to one of the Secure
+ * Elements available on the device. These objects can be used to get a
+ * communication channel with an Applet in the Secure Element.
+ * This channel can be the basic channel or a logical channel.
+ *
+ * @see <a href="http://simalliance.org">SIMalliance Open Mobile API v3.0</a>
+ */
+public final class Session {
+
+ private final Object mLock = new Object();
+ private final SEService mService;
+ private final Reader mReader;
+ private final ISecureElementSession mSession;
+ private static final String TAG = "OMAPI.Session";
+
+ Session(@NonNull SEService service, @NonNull ISecureElementSession session,
+ @NonNull Reader reader) {
+ if (service == null || reader == null || session == null) {
+ throw new IllegalArgumentException("Parameters cannot be null");
+ }
+ mService = service;
+ mReader = reader;
+ mSession = session;
+ }
+
+ /**
+ * Get the reader that provides this session.
+ *
+ * @return The Reader object.
+ */
+ public @NonNull Reader getReader() {
+ return mReader;
+ }
+
+ /**
+ * Get the Answer to Reset of this Secure Element. <br>
+ * The returned byte array can be null if the ATR for this Secure Element is
+ * not available.
+ *
+ * @throws IllegalStateException if there was an error connecting to SE or
+ * if the service was not connected.
+ * @return the ATR as a byte array or null.
+ */
+ public @Nullable byte[] getATR() {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ try {
+ return mSession.getAtr();
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+
+ /**
+ * Close the connection with the Secure Element. This will close any
+ * channels opened by this application with this Secure Element.
+ */
+ public void close() {
+ if (!mService.isConnected()) {
+ Log.e(TAG, "service not connected to system");
+ return;
+ }
+ synchronized (mLock) {
+ try {
+ mSession.close();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error closing session", e);
+ }
+ }
+ }
+
+ /**
+ * Tells if this session is closed.
+ *
+ * @return <code>true</code> if the session is closed, false otherwise.
+ */
+ public boolean isClosed() {
+ try {
+ return mSession.isClosed();
+ } catch (RemoteException e) {
+ // If there was an error here, then the session is considered close
+ return true;
+ }
+ }
+
+ /**
+ * Close any channel opened on this session.
+ */
+ public void closeChannels() {
+ if (!mService.isConnected()) {
+ Log.e(TAG, "service not connected to system");
+ return;
+ }
+
+ synchronized (mLock) {
+ try {
+ mSession.closeChannels();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error closing channels", e);
+ }
+ }
+ }
+
+ /**
+ * Get an access to the basic channel, as defined in the ISO/IEC 7816-4 specification (the
+ * one that has number 0). The obtained object is an instance of the Channel class.
+ * If the AID is null, it means no Applet is to be selected on this channel and the default
+ * Applet is used. If the AID is defined then the corresponding Applet is selected.
+ * Once this channel has been opened by a device application, it is considered as "locked"
+ * by this device application, and other calls to this method will return null, until the
+ * channel is closed. Some Secure Elements (like the UICC) might always keep the basic channel
+ * locked (i.e. return null to applications), to prevent access to the basic channel, while
+ * some other might return a channel object implementing some kind of filtering on the
+ * commands, restricting the set of accepted command to a smaller set.
+ * It is recommended for the UICC to reject the opening of the basic channel to a specific
+ * applet, by always answering null to such a request.
+ * For other Secure Elements, the recommendation is to accept opening the basic channel
+ * on the default applet until another applet is selected on the basic channel. As there is no
+ * other way than a reset to select again the default applet, the implementation of the
+ * transport API should guarantee that the openBasicChannel(null) command will return
+ * null until a reset occurs.
+ * With previous release (V2.05) it was not possible to set P2 value, this value was always
+ * set to '00'.Except for specific needs it is recommended to keep P2 to '00'. It is
+ * recommended that the device allows all values for P2, however only the following values
+ * are mandatory: '00', '04', '08', '0C'(as defined in [2])
+ * The implementation of the underlying SELECT command within this method shall be
+ * based on ISO 7816-4 with following options:
+ * <ul>
+ * <li>CLA = '00'</li>
+ * <li>INS = 'A4'</li>
+ * <li>P1 = '04' (Select by DF name/application identifier)</li>
+ * </ul>
+ *
+ * The select response data can be retrieved with byte[] getSelectResponse().
+ * The API shall handle received status word as follow. If the status word indicates that the
+ * Secure Element was able to open a channel (e.g. status word '90 00' or status words
+ * referencing a warning in ISO-7816-4: '62 XX' or '63 XX') the API shall keep the
+ * channel opened and the next getSelectResponse() shall return the received status
+ * word.
+ * Other received status codes indicating that the Secure Element was able not to open a
+ * channel shall be considered as an error and the corresponding channel shall not be
+ * opened.
+ * The function without P2 as parameter is provided for backwards compatibility and will
+ * fall back to a select command with P2='00'.
+ *
+ * @param aid the AID of the Applet to be selected on this channel, as a
+ * byte array, or null if no Applet is to be selected.
+ * @param p2 the P2 parameter of the SELECT APDU executed on this channel.
+ * @throws IOException if there is a communication problem to the reader or
+ * the Secure Element.
+ * @throws IllegalStateException if the Secure Element session is used after
+ * being closed.
+ * @throws IllegalArgumentException if the aid's length is not within 5 to
+ * 16 (inclusive).
+ * @throws SecurityException if the calling application cannot be granted
+ * access to this AID or the default Applet on this
+ * session.
+ * @throws NoSuchElementException if the AID on the Secure Element is not available or cannot be
+ * selected.
+ * @throws UnsupportedOperationException if the given P2 parameter is not
+ * supported by the device
+ * @return an instance of Channel if available or null.
+ */
+ public @Nullable Channel openBasicChannel(@Nullable byte[] aid, @Nullable byte p2)
+ throws IOException {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+
+ synchronized (mLock) {
+ try {
+ ISecureElementChannel channel = mSession.openBasicChannel(aid, p2,
+ mReader.getSEService().getListener());
+ if (channel == null) {
+ return null;
+ }
+ return new Channel(mService, this, channel);
+ } catch (ServiceSpecificException e) {
+ if (e.errorCode == SEService.IO_ERROR) {
+ throw new IOException(e.getMessage());
+ } else if (e.errorCode == SEService.NO_SUCH_ELEMENT_ERROR) {
+ throw new NoSuchElementException(e.getMessage());
+ } else {
+ throw new IllegalStateException(e.getMessage());
+ }
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+ }
+
+ /**
+ * This method is provided to ease the development of mobile application and for compliancy
+ * with existing applications.
+ * This method is equivalent to openBasicChannel(aid, P2=0x00)
+ *
+ * @param aid the AID of the Applet to be selected on this channel, as a
+ * byte array, or null if no Applet is to be selected.
+ * @throws IOException if there is a communication problem to the reader or
+ * the Secure Element.
+ * @throws IllegalStateException if the Secure Element session is used after
+ * being closed.
+ * @throws IllegalArgumentException if the aid's length is not within 5 to
+ * 16 (inclusive).
+ * @throws SecurityException if the calling application cannot be granted
+ * access to this AID or the default Applet on this
+ * session.
+ * @throws NoSuchElementException if the AID on the Secure Element is not available or cannot be
+ * selected.
+ * @throws UnsupportedOperationException if the given P2 parameter is not
+ * supported by the device
+ * @return an instance of Channel if available or null.
+ */
+ public @Nullable Channel openBasicChannel(@Nullable byte[] aid) throws IOException {
+ return openBasicChannel(aid, (byte) 0x00);
+ }
+
+ /**
+ * Open a logical channel with the Secure Element, selecting the Applet represented by
+ * the given AID. If the AID is null, which means no Applet is to be selected on this
+ * channel, the default Applet is used. It's up to the Secure Element to choose which
+ * logical channel will be used.
+ * With previous release (V2.05) it was not possible to set P2 value, this value was always
+ * set to '00'.Except for specific needs it is recommended to keep P2 to '00'. It is
+ * recommended that the device allows all values for P2, however only the following values
+ * are mandatory: '00', '04', '08', '0C'(as defined in [2])
+ * The implementation of the underlying SELECT command within this method shall be
+ * based on ISO 7816-4 with following options:
+ *
+ * <ul>
+ * <li>CLA = '01' to '03', '40 to 4F'</li>
+ * <li>INS = 'A4'</li>
+ * <li>P1 = '04' (Select by DF name/application identifier)</li>
+ * </ul>
+ *
+ * The select response data can be retrieved with byte[] getSelectResponse().
+ * The API shall handle received status word as follow. If the status word indicates that the
+ * Secure Element was able to open a channel (e.g. status word '90 00' or status words
+ * referencing a warning in ISO-7816-4: '62 XX' or '63 XX') the API shall keep the
+ * channel opened and the next getSelectResponse() shall return the received status
+ * word.
+ * Other received status codes indicating that the Secure Element was able not to open a
+ * channel shall be considered as an error and the corresponding channel shall not be
+ * opened.
+ * In case of UICC it is recommended for the API to reject the opening of the logical
+ * channel without a specific AID, by always answering null to such a request.
+ * The function without P2 as parameter is provided for backwards compatibility and will
+ * fall back to a select command with P2=00.
+ *
+ * @param aid the AID of the Applet to be selected on this channel, as a
+ * byte array.
+ * @param p2 the P2 parameter of the SELECT APDU executed on this channel.
+ * @throws IOException if there is a communication problem to the reader or
+ * the Secure Element.
+ * @throws IllegalStateException if the Secure Element is used after being
+ * closed.
+ * @throws IllegalArgumentException if the aid's length is not within 5 to
+ * 16 (inclusive).
+ * @throws SecurityException if the calling application cannot be granted
+ * access to this AID or the default Applet on this
+ * session.
+ * @throws NoSuchElementException if the AID on the Secure Element is not
+ * available or cannot be selected or a logical channel is already
+ * open to a non-multiselectable Applet.
+ * @throws UnsupportedOperationException if the given P2 parameter is not
+ * supported by the device.
+ * @return an instance of Channel. Null if the Secure Element is unable to
+ * provide a new logical channel.
+ */
+ public @Nullable Channel openLogicalChannel(@Nullable byte[] aid, @Nullable byte p2)
+ throws IOException {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ synchronized (mLock) {
+ try {
+ ISecureElementChannel channel = mSession.openLogicalChannel(
+ aid,
+ p2,
+ mReader.getSEService().getListener());
+ if (channel == null) {
+ return null;
+ }
+ return new Channel(mService, this, channel);
+ } catch (ServiceSpecificException e) {
+ if (e.errorCode == SEService.IO_ERROR) {
+ throw new IOException(e.getMessage());
+ } else if (e.errorCode == SEService.NO_SUCH_ELEMENT_ERROR) {
+ throw new NoSuchElementException(e.getMessage());
+ } else {
+ throw new IllegalStateException(e.getMessage());
+ }
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+ }
+
+ /**
+ * This method is provided to ease the development of mobile application and for compliancy
+ * with existing applications.
+ * This method is equivalent to openLogicalChannel(aid, P2=0x00)
+ *
+ * @param aid the AID of the Applet to be selected on this channel, as a
+ * byte array.
+ * @throws IOException if there is a communication problem to the reader or
+ * the Secure Element.
+ * @throws IllegalStateException if the Secure Element is used after being
+ * closed.
+ * @throws IllegalArgumentException if the aid's length is not within 5 to
+ * 16 (inclusive).
+ * @throws SecurityException if the calling application cannot be granted
+ * access to this AID or the default Applet on this
+ * session.
+ * @throws NoSuchElementException if the AID on the Secure Element is not
+ * available or cannot be selected or a logical channel is already
+ * open to a non-multiselectable Applet.
+ * @throws UnsupportedOperationException if the given P2 parameter is not
+ * supported by the device.
+ * @return an instance of Channel. Null if the Secure Element is unable to
+ * provide a new logical channel.
+ */
+ public @Nullable Channel openLogicalChannel(@Nullable byte[] aid) throws IOException {
+ return openLogicalChannel(aid, (byte) 0x00);
+ }
+}
diff --git a/core/java/android/service/euicc/EuiccProfileInfo.java b/core/java/android/service/euicc/EuiccProfileInfo.java
index 8e752d1..4bbee61 100644
--- a/core/java/android/service/euicc/EuiccProfileInfo.java
+++ b/core/java/android/service/euicc/EuiccProfileInfo.java
@@ -17,6 +17,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.service.carrier.CarrierIdentifier;
@@ -26,15 +27,15 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Arrays;
+import java.util.List;
import java.util.Objects;
/**
* Information about an embedded profile (subscription) on an eUICC.
*
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+@SystemApi
public final class EuiccProfileInfo implements Parcelable {
/** Profile policy rules (bit mask) */
@@ -44,6 +45,7 @@
POLICY_RULE_DO_NOT_DELETE,
POLICY_RULE_DELETE_AFTER_DISABLING
})
+ /** @hide */
public @interface PolicyRule {}
/** Once this profile is enabled, it cannot be disabled. */
public static final int POLICY_RULE_DO_NOT_DISABLE = 1;
@@ -60,6 +62,7 @@
PROFILE_CLASS_OPERATIONAL,
PROFILE_CLASS_UNSET
})
+ /** @hide */
public @interface ProfileClass {}
/** Testing profiles */
public static final int PROFILE_CLASS_TESTING = 0;
@@ -80,6 +83,7 @@
PROFILE_STATE_ENABLED,
PROFILE_STATE_UNSET
})
+ /** @hide */
public @interface ProfileState {}
/** Disabled profiles */
public static final int PROFILE_STATE_DISABLED = 0;
@@ -92,34 +96,34 @@
public static final int PROFILE_STATE_UNSET = -1;
/** The iccid of the subscription. */
- public final String iccid;
+ private final String mIccid;
/** An optional nickname for the subscription. */
- public final @Nullable String nickname;
+ private final @Nullable String mNickname;
/** The service provider name for the subscription. */
- public final String serviceProviderName;
+ private final String mServiceProviderName;
/** The profile name for the subscription. */
- public final String profileName;
+ private final String mProfileName;
/** Profile class for the subscription. */
- @ProfileClass public final int profileClass;
+ @ProfileClass private final int mProfileClass;
/** The profile state of the subscription. */
- @ProfileState public final int state;
+ @ProfileState private final int mState;
/** The operator Id of the subscription. */
- public final CarrierIdentifier carrierIdentifier;
+ private final CarrierIdentifier mCarrierIdentifier;
/** The policy rules of the subscription. */
- @PolicyRule public final int policyRules;
+ @PolicyRule private final int mPolicyRules;
/**
* Optional access rules defining which apps can manage this subscription. If unset, only the
* platform can manage it.
*/
- public final @Nullable UiccAccessRule[] accessRules;
+ private final @Nullable UiccAccessRule[] mAccessRules;
public static final Creator<EuiccProfileInfo> CREATOR = new Creator<EuiccProfileInfo>() {
@Override
@@ -144,51 +148,51 @@
if (!TextUtils.isDigitsOnly(iccid)) {
throw new IllegalArgumentException("iccid contains invalid characters: " + iccid);
}
- this.iccid = iccid;
- this.accessRules = accessRules;
- this.nickname = nickname;
+ this.mIccid = iccid;
+ this.mAccessRules = accessRules;
+ this.mNickname = nickname;
- this.serviceProviderName = null;
- this.profileName = null;
- this.profileClass = PROFILE_CLASS_UNSET;
- this.state = PROFILE_CLASS_UNSET;
- this.carrierIdentifier = null;
- this.policyRules = 0;
+ this.mServiceProviderName = null;
+ this.mProfileName = null;
+ this.mProfileClass = PROFILE_CLASS_UNSET;
+ this.mState = PROFILE_STATE_UNSET;
+ this.mCarrierIdentifier = null;
+ this.mPolicyRules = 0;
}
private EuiccProfileInfo(Parcel in) {
- iccid = in.readString();
- nickname = in.readString();
- serviceProviderName = in.readString();
- profileName = in.readString();
- profileClass = in.readInt();
- state = in.readInt();
+ mIccid = in.readString();
+ mNickname = in.readString();
+ mServiceProviderName = in.readString();
+ mProfileName = in.readString();
+ mProfileClass = in.readInt();
+ mState = in.readInt();
byte exist = in.readByte();
if (exist == (byte) 1) {
- carrierIdentifier = CarrierIdentifier.CREATOR.createFromParcel(in);
+ mCarrierIdentifier = CarrierIdentifier.CREATOR.createFromParcel(in);
} else {
- carrierIdentifier = null;
+ mCarrierIdentifier = null;
}
- policyRules = in.readInt();
- accessRules = in.createTypedArray(UiccAccessRule.CREATOR);
+ mPolicyRules = in.readInt();
+ mAccessRules = in.createTypedArray(UiccAccessRule.CREATOR);
}
@Override
public void writeToParcel(Parcel dest, int flags) {
- dest.writeString(iccid);
- dest.writeString(nickname);
- dest.writeString(serviceProviderName);
- dest.writeString(profileName);
- dest.writeInt(profileClass);
- dest.writeInt(state);
- if (carrierIdentifier != null) {
+ dest.writeString(mIccid);
+ dest.writeString(mNickname);
+ dest.writeString(mServiceProviderName);
+ dest.writeString(mProfileName);
+ dest.writeInt(mProfileClass);
+ dest.writeInt(mState);
+ if (mCarrierIdentifier != null) {
dest.writeByte((byte) 1);
- carrierIdentifier.writeToParcel(dest, flags);
+ mCarrierIdentifier.writeToParcel(dest, flags);
} else {
dest.writeByte((byte) 0);
}
- dest.writeInt(policyRules);
- dest.writeTypedArray(accessRules, flags);
+ dest.writeInt(mPolicyRules);
+ dest.writeTypedArray(mAccessRules, flags);
}
@Override
@@ -198,45 +202,50 @@
/** The builder to build a new {@link EuiccProfileInfo} instance. */
public static final class Builder {
- public String iccid;
- public UiccAccessRule[] accessRules;
- public String nickname;
- public String serviceProviderName;
- public String profileName;
- @ProfileClass public int profileClass;
- @ProfileState public int state;
- public CarrierIdentifier carrierIdentifier;
- @PolicyRule public int policyRules;
+ private String mIccid;
+ private List<UiccAccessRule> mAccessRules;
+ private String mNickname;
+ private String mServiceProviderName;
+ private String mProfileName;
+ @ProfileClass private int mProfileClass;
+ @ProfileState private int mState;
+ private CarrierIdentifier mCarrierIdentifier;
+ @PolicyRule private int mPolicyRules;
- public Builder() {}
+ public Builder(String value) {
+ if (!TextUtils.isDigitsOnly(value)) {
+ throw new IllegalArgumentException("iccid contains invalid characters: " + value);
+ }
+ mIccid = value;
+ }
public Builder(EuiccProfileInfo baseProfile) {
- iccid = baseProfile.iccid;
- nickname = baseProfile.nickname;
- serviceProviderName = baseProfile.serviceProviderName;
- profileName = baseProfile.profileName;
- profileClass = baseProfile.profileClass;
- state = baseProfile.state;
- carrierIdentifier = baseProfile.carrierIdentifier;
- policyRules = baseProfile.policyRules;
- accessRules = baseProfile.accessRules;
+ mIccid = baseProfile.mIccid;
+ mNickname = baseProfile.mNickname;
+ mServiceProviderName = baseProfile.mServiceProviderName;
+ mProfileName = baseProfile.mProfileName;
+ mProfileClass = baseProfile.mProfileClass;
+ mState = baseProfile.mState;
+ mCarrierIdentifier = baseProfile.mCarrierIdentifier;
+ mPolicyRules = baseProfile.mPolicyRules;
+ mAccessRules = Arrays.asList(baseProfile.mAccessRules);
}
/** Builds the profile instance. */
public EuiccProfileInfo build() {
- if (iccid == null) {
+ if (mIccid == null) {
throw new IllegalStateException("ICCID must be set for a profile.");
}
return new EuiccProfileInfo(
- iccid,
- nickname,
- serviceProviderName,
- profileName,
- profileClass,
- state,
- carrierIdentifier,
- policyRules,
- accessRules);
+ mIccid,
+ mNickname,
+ mServiceProviderName,
+ mProfileName,
+ mProfileClass,
+ mState,
+ mCarrierIdentifier,
+ mPolicyRules,
+ mAccessRules);
}
/** Sets the iccId of the subscription. */
@@ -244,55 +253,55 @@
if (!TextUtils.isDigitsOnly(value)) {
throw new IllegalArgumentException("iccid contains invalid characters: " + value);
}
- iccid = value;
+ mIccid = value;
return this;
}
/** Sets the nickname of the subscription. */
public Builder setNickname(String value) {
- nickname = value;
+ mNickname = value;
return this;
}
/** Sets the service provider name of the subscription. */
public Builder setServiceProviderName(String value) {
- serviceProviderName = value;
+ mServiceProviderName = value;
return this;
}
/** Sets the profile name of the subscription. */
public Builder setProfileName(String value) {
- profileName = value;
+ mProfileName = value;
return this;
}
/** Sets the profile class of the subscription. */
public Builder setProfileClass(@ProfileClass int value) {
- profileClass = value;
+ mProfileClass = value;
return this;
}
/** Sets the state of the subscription. */
public Builder setState(@ProfileState int value) {
- state = value;
+ mState = value;
return this;
}
/** Sets the carrier identifier of the subscription. */
public Builder setCarrierIdentifier(CarrierIdentifier value) {
- carrierIdentifier = value;
+ mCarrierIdentifier = value;
return this;
}
/** Sets the policy rules of the subscription. */
public Builder setPolicyRules(@PolicyRule int value) {
- policyRules = value;
+ mPolicyRules = value;
return this;
}
/** Sets the access rules of the subscription. */
- public Builder setUiccAccessRule(@Nullable UiccAccessRule[] value) {
- accessRules = value;
+ public Builder setUiccAccessRule(@Nullable List<UiccAccessRule> value) {
+ mAccessRules = value;
return this;
}
}
@@ -306,75 +315,81 @@
@ProfileState int state,
CarrierIdentifier carrierIdentifier,
@PolicyRule int policyRules,
- @Nullable UiccAccessRule[] accessRules) {
- this.iccid = iccid;
- this.nickname = nickname;
- this.serviceProviderName = serviceProviderName;
- this.profileName = profileName;
- this.profileClass = profileClass;
- this.state = state;
- this.carrierIdentifier = carrierIdentifier;
- this.policyRules = policyRules;
- this.accessRules = accessRules;
+ @Nullable List<UiccAccessRule> accessRules) {
+ this.mIccid = iccid;
+ this.mNickname = nickname;
+ this.mServiceProviderName = serviceProviderName;
+ this.mProfileName = profileName;
+ this.mProfileClass = profileClass;
+ this.mState = state;
+ this.mCarrierIdentifier = carrierIdentifier;
+ this.mPolicyRules = policyRules;
+ if (accessRules != null && accessRules.size() > 0) {
+ this.mAccessRules = accessRules.toArray(new UiccAccessRule[accessRules.size()]);
+ } else {
+ this.mAccessRules = null;
+ }
}
/** Gets the ICCID string. */
public String getIccid() {
- return iccid;
+ return mIccid;
}
/** Gets the access rules. */
@Nullable
- public UiccAccessRule[] getUiccAccessRules() {
- return accessRules;
+ public List<UiccAccessRule> getUiccAccessRules() {
+ if (mAccessRules == null) return null;
+ return Arrays.asList(mAccessRules);
}
/** Gets the nickname. */
+ @Nullable
public String getNickname() {
- return nickname;
+ return mNickname;
}
/** Gets the service provider name. */
public String getServiceProviderName() {
- return serviceProviderName;
+ return mServiceProviderName;
}
/** Gets the profile name. */
public String getProfileName() {
- return profileName;
+ return mProfileName;
}
/** Gets the profile class. */
@ProfileClass
public int getProfileClass() {
- return profileClass;
+ return mProfileClass;
}
/** Gets the state of the subscription. */
@ProfileState
public int getState() {
- return state;
+ return mState;
}
/** Gets the carrier identifier. */
public CarrierIdentifier getCarrierIdentifier() {
- return carrierIdentifier;
+ return mCarrierIdentifier;
}
/** Gets the policy rules. */
@PolicyRule
public int getPolicyRules() {
- return policyRules;
+ return mPolicyRules;
}
/** Returns whether any policy rule exists. */
public boolean hasPolicyRules() {
- return policyRules != 0;
+ return mPolicyRules != 0;
}
/** Checks whether a certain policy rule exists. */
public boolean hasPolicyRule(@PolicyRule int policy) {
- return (policyRules & policy) != 0;
+ return (mPolicyRules & policy) != 0;
}
@Override
@@ -387,50 +402,50 @@
}
EuiccProfileInfo that = (EuiccProfileInfo) obj;
- return Objects.equals(iccid, that.iccid)
- && Objects.equals(nickname, that.nickname)
- && Objects.equals(serviceProviderName, that.serviceProviderName)
- && Objects.equals(profileName, that.profileName)
- && profileClass == that.profileClass
- && state == that.state
- && Objects.equals(carrierIdentifier, that.carrierIdentifier)
- && policyRules == that.policyRules
- && Arrays.equals(accessRules, that.accessRules);
+ return Objects.equals(mIccid, that.mIccid)
+ && Objects.equals(mNickname, that.mNickname)
+ && Objects.equals(mServiceProviderName, that.mServiceProviderName)
+ && Objects.equals(mProfileName, that.mProfileName)
+ && mProfileClass == that.mProfileClass
+ && mState == that.mState
+ && Objects.equals(mCarrierIdentifier, that.mCarrierIdentifier)
+ && mPolicyRules == that.mPolicyRules
+ && Arrays.equals(mAccessRules, that.mAccessRules);
}
@Override
public int hashCode() {
int result = 1;
- result = 31 * result + Objects.hashCode(iccid);
- result = 31 * result + Objects.hashCode(nickname);
- result = 31 * result + Objects.hashCode(serviceProviderName);
- result = 31 * result + Objects.hashCode(profileName);
- result = 31 * result + profileClass;
- result = 31 * result + state;
- result = 31 * result + Objects.hashCode(carrierIdentifier);
- result = 31 * result + policyRules;
- result = 31 * result + Arrays.hashCode(accessRules);
+ result = 31 * result + Objects.hashCode(mIccid);
+ result = 31 * result + Objects.hashCode(mNickname);
+ result = 31 * result + Objects.hashCode(mServiceProviderName);
+ result = 31 * result + Objects.hashCode(mProfileName);
+ result = 31 * result + mProfileClass;
+ result = 31 * result + mState;
+ result = 31 * result + Objects.hashCode(mCarrierIdentifier);
+ result = 31 * result + mPolicyRules;
+ result = 31 * result + Arrays.hashCode(mAccessRules);
return result;
}
@Override
public String toString() {
return "EuiccProfileInfo (nickname="
- + nickname
+ + mNickname
+ ", serviceProviderName="
- + serviceProviderName
+ + mServiceProviderName
+ ", profileName="
- + profileName
+ + mProfileName
+ ", profileClass="
- + profileClass
+ + mProfileClass
+ ", state="
- + state
+ + mState
+ ", CarrierIdentifier="
- + carrierIdentifier.toString()
+ + mCarrierIdentifier
+ ", policyRules="
- + policyRules
+ + mPolicyRules
+ ", accessRules="
- + Arrays.toString(accessRules)
+ + Arrays.toString(mAccessRules)
+ ")";
}
}
diff --git a/core/java/android/service/euicc/EuiccService.java b/core/java/android/service/euicc/EuiccService.java
index be85800..b87faef 100644
--- a/core/java/android/service/euicc/EuiccService.java
+++ b/core/java/android/service/euicc/EuiccService.java
@@ -17,6 +17,7 @@
import android.annotation.CallSuper;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
@@ -41,8 +42,11 @@
* <p>To implement the LPA backend, you must extend this class and declare this service in your
* manifest file. The service must require the
* {@link android.Manifest.permission#BIND_EUICC_SERVICE} permission and include an intent filter
- * with the {@link #EUICC_SERVICE_INTERFACE} action. The priority of the intent filter must be set
- * to a non-zero value in case multiple implementations are present on the device. For example:
+ * with the {@link #EUICC_SERVICE_INTERFACE} action. It's suggested that the priority of the intent
+ * filter to be set to a non-zero value in case multiple implementations are present on the device.
+ * See the below example. Note that there will be problem if two LPAs are present and they have the
+ * same priority.
+ * Example:
*
* <pre>{@code
* <service android:name=".MyEuiccService"
@@ -65,9 +69,9 @@
* filter with the appropriate action, the {@link #CATEGORY_EUICC_UI} category, and a non-zero
* priority.
*
- * TODO(b/35851809): Make this a SystemApi.
* @hide
*/
+@SystemApi
public abstract class EuiccService extends Service {
/** Action which must be included in this service's intent filter. */
public static final String EUICC_SERVICE_INTERFACE = "android.service.euicc.EuiccService";
@@ -77,7 +81,10 @@
// LUI actions. These are passthroughs of the corresponding EuiccManager actions.
- /** @see android.telephony.euicc.EuiccManager#ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS */
+ /**
+ * @see android.telephony.euicc.EuiccManager#ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS
+ * The difference is this one is used by system to bring up the LUI.
+ */
public static final String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS =
"android.service.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS";
/** @see android.telephony.euicc.EuiccManager#ACTION_PROVISION_EMBEDDED_SUBSCRIPTION */
@@ -88,7 +95,10 @@
// require user interaction.
// TODO(b/33075886): Define extras for any input parameters to these dialogs once they are
// more scoped out.
- /** Alert the user that this action will result in an active SIM being deactivated. */
+ /**
+ * Alert the user that this action will result in an active SIM being deactivated.
+ * To implement the LUI triggered by the system, you need to define this in AndroidManifest.xml.
+ */
public static final String ACTION_RESOLVE_DEACTIVATE_SIM =
"android.service.euicc.action.RESOLVE_DEACTIVATE_SIM";
/**
@@ -102,7 +112,11 @@
public static final String ACTION_RESOLVE_CONFIRMATION_CODE =
"android.service.euicc.action.RESOLVE_CONFIRMATION_CODE";
- /** Intent extra set for resolution requests containing the package name of the calling app. */
+ /**
+ * Intent extra set for resolution requests containing the package name of the calling app.
+ * This is used by the above actions including ACTION_RESOLVE_DEACTIVATE_SIM,
+ * ACTION_RESOLVE_NO_PRIVILEGES and ACTION_RESOLVE_CONFIRMATION_CODE.
+ */
public static final String EXTRA_RESOLUTION_CALLING_PACKAGE =
"android.service.euicc.extra.RESOLUTION_CALLING_PACKAGE";
@@ -136,10 +150,18 @@
RESOLUTION_ACTIONS.add(EuiccService.ACTION_RESOLVE_CONFIRMATION_CODE);
}
- /** Boolean extra for resolution actions indicating whether the user granted consent. */
- public static final String RESOLUTION_EXTRA_CONSENT = "consent";
- /** String extra for resolution actions indicating the carrier confirmation code. */
- public static final String RESOLUTION_EXTRA_CONFIRMATION_CODE = "confirmation_code";
+ /**
+ * Boolean extra for resolution actions indicating whether the user granted consent.
+ * This is used and set by the implementation and used in {@code EuiccOperation}.
+ */
+ public static final String EXTRA_RESOLUTION_CONSENT =
+ "android.service.euicc.extra.RESOLUTION_CONSENT";
+ /**
+ * String extra for resolution actions indicating the carrier confirmation code.
+ * This is used and set by the implementation and used in {@code EuiccOperation}.
+ */
+ public static final String EXTRA_RESOLUTION_CONFIRMATION_CODE =
+ "android.service.euicc.extra.RESOLUTION_CONFIRMATION_CODE";
private final IEuiccService.Stub mStubWrapper;
@@ -199,9 +221,9 @@
*
* @see IEuiccService#startOtaIfNecessary
*/
- public interface OtaStatusChangedCallback {
+ public abstract static class OtaStatusChangedCallback {
/** Called when OTA status is changed. */
- void onOtaStatusChanged(int status);
+ public abstract void onOtaStatusChanged(int status);
}
/**
@@ -238,8 +260,7 @@
/**
* Populate {@link DownloadableSubscription} metadata for the given downloadable subscription.
*
- * @param slotId ID of the SIM slot to use for the operation. This is currently not populated
- * but is here to future-proof the APIs.
+ * @param slotId ID of the SIM slot to use for the operation.
* @param subscription A subscription whose metadata needs to be populated.
* @param forceDeactivateSim If true, and if an active SIM must be deactivated to access the
* eUICC, perform this action automatically. Otherwise, {@link #RESULT_MUST_DEACTIVATE_SIM)}
@@ -267,8 +288,7 @@
/**
* Download the given subscription.
*
- * @param slotId ID of the SIM slot to use for the operation. This is currently not populated
- * but is here to future-proof the APIs.
+ * @param slotId ID of the SIM slot to use for the operation.
* @param subscription The subscription to download.
* @param switchAfterDownload If true, the subscription should be enabled upon successful
* download.
@@ -286,8 +306,7 @@
/**
* Return a list of all @link EuiccProfileInfo}s.
*
- * @param slotId ID of the SIM slot to use for the operation. This is currently not populated
- * but is here to future-proof the APIs.
+ * @param slotId ID of the SIM slot to use for the operation.
* @return The result of the operation.
* @see android.telephony.SubscriptionManager#getAvailableSubscriptionInfoList
* @see android.telephony.SubscriptionManager#getAccessibleSubscriptionInfoList
@@ -297,8 +316,7 @@
/**
* Return info about the eUICC chip/device.
*
- * @param slotId ID of the SIM slot to use for the operation. This is currently not populated
- * but is here to future-proof the APIs.
+ * @param slotId ID of the SIM slot to use for the operation.
* @return the {@link EuiccInfo} for the eUICC chip/device.
* @see android.telephony.euicc.EuiccManager#getEuiccInfo
*/
@@ -310,8 +328,7 @@
* <p>If the subscription is currently active, it should be deactivated first (equivalent to a
* physical SIM being ejected).
*
- * @param slotId ID of the SIM slot to use for the operation. This is currently not populated
- * but is here to future-proof the APIs.
+ * @param slotId ID of the SIM slot to use for the operation.
* @param iccid the ICCID of the subscription to delete.
* @return the result of the delete operation. May be one of the predefined {@code RESULT_}
* constants or any implementation-specific code starting with {@link #RESULT_FIRST_USER}.
@@ -322,8 +339,7 @@
/**
* Switch to the given subscription.
*
- * @param slotId ID of the SIM slot to use for the operation. This is currently not populated
- * but is here to future-proof the APIs.
+ * @param slotId ID of the SIM slot to use for the operation.
* @param iccid the ICCID of the subscription to enable. May be null, in which case the current
* profile should be deactivated and no profile should be activated to replace it - this is
* equivalent to a physical SIM being ejected.
@@ -340,8 +356,7 @@
/**
* Update the nickname of the given subscription.
*
- * @param slotId ID of the SIM slot to use for the operation. This is currently not populated
- * but is here to future-proof the APIs.
+ * @param slotId ID of the SIM slot to use for the operation.
* @param iccid the ICCID of the subscription to update.
* @param nickname the new nickname to apply.
* @return the result of the update operation. May be one of the predefined {@code RESULT_}
diff --git a/core/java/android/service/euicc/GetDefaultDownloadableSubscriptionListResult.java b/core/java/android/service/euicc/GetDefaultDownloadableSubscriptionListResult.java
index 5a24492..e2171ae 100644
--- a/core/java/android/service/euicc/GetDefaultDownloadableSubscriptionListResult.java
+++ b/core/java/android/service/euicc/GetDefaultDownloadableSubscriptionListResult.java
@@ -16,16 +16,19 @@
package android.service.euicc;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.euicc.DownloadableSubscription;
+import java.util.Arrays;
+import java.util.List;
+
/**
* Result of a {@link EuiccService#onGetDefaultDownloadableSubscriptionList} operation.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+@SystemApi
public final class GetDefaultDownloadableSubscriptionListResult implements Parcelable {
public static final Creator<GetDefaultDownloadableSubscriptionListResult> CREATOR =
@@ -42,20 +45,35 @@
};
/**
- * Result of the operation.
+ * @hide
+ * @deprecated - Do no use. Use getResult() instead.
+ */
+ @Deprecated
+ public final int result;
+
+ @Nullable
+ private final DownloadableSubscription[] mSubscriptions;
+
+ /**
+ * Gets the result of the operation.
*
* <p>May be one of the predefined {@code RESULT_} constants in EuiccService or any
* implementation-specific code starting with {@link EuiccService#RESULT_FIRST_USER}.
*/
- public final int result;
+ public int getResult() {
+ return result;
+ }
/**
- * The available {@link DownloadableSubscription}s (with filled-in metadata).
+ * Gets the available {@link DownloadableSubscription}s (with filled-in metadata).
*
* <p>Only non-null if {@link #result} is {@link EuiccService#RESULT_OK}.
*/
@Nullable
- public final DownloadableSubscription[] subscriptions;
+ public List<DownloadableSubscription> getDownloadableSubscriptions() {
+ if (mSubscriptions == null) return null;
+ return Arrays.asList(mSubscriptions);
+ }
/**
* Construct a new {@link GetDefaultDownloadableSubscriptionListResult}.
@@ -70,25 +88,25 @@
@Nullable DownloadableSubscription[] subscriptions) {
this.result = result;
if (this.result == EuiccService.RESULT_OK) {
- this.subscriptions = subscriptions;
+ this.mSubscriptions = subscriptions;
} else {
if (subscriptions != null) {
throw new IllegalArgumentException(
"Error result with non-null subscriptions: " + result);
}
- this.subscriptions = null;
+ this.mSubscriptions = null;
}
}
private GetDefaultDownloadableSubscriptionListResult(Parcel in) {
this.result = in.readInt();
- this.subscriptions = in.createTypedArray(DownloadableSubscription.CREATOR);
+ this.mSubscriptions = in.createTypedArray(DownloadableSubscription.CREATOR);
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(result);
- dest.writeTypedArray(subscriptions, flags);
+ dest.writeTypedArray(mSubscriptions, flags);
}
@Override
diff --git a/core/java/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java b/core/java/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
index de8a307..1edb539 100644
--- a/core/java/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
+++ b/core/java/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
@@ -16,6 +16,7 @@
package android.service.euicc;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.euicc.DownloadableSubscription;
@@ -23,9 +24,8 @@
/**
* Result of a {@link EuiccService#onGetDownloadableSubscriptionMetadata} operation.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+@SystemApi
public final class GetDownloadableSubscriptionMetadataResult implements Parcelable {
public static final Creator<GetDownloadableSubscriptionMetadataResult> CREATOR =
@@ -42,20 +42,34 @@
};
/**
- * Result of the operation.
+ * @hide
+ * @deprecated - Do no use. Use getResult() instead.
+ */
+ @Deprecated
+ public final int result;
+
+ @Nullable
+ private final DownloadableSubscription mSubscription;
+
+ /**
+ * Gets the result of the operation.
*
* <p>May be one of the predefined {@code RESULT_} constants in EuiccService or any
* implementation-specific code starting with {@link EuiccService#RESULT_FIRST_USER}.
*/
- public final int result;
+ public int getResult() {
+ return result;
+ }
/**
- * The {@link DownloadableSubscription} with filled-in metadata.
+ * Gets the {@link DownloadableSubscription} with filled-in metadata.
*
* <p>Only non-null if {@link #result} is {@link EuiccService#RESULT_OK}.
*/
@Nullable
- public final DownloadableSubscription subscription;
+ public DownloadableSubscription getDownloadableSubscription() {
+ return mSubscription;
+ }
/**
* Construct a new {@link GetDownloadableSubscriptionMetadataResult}.
@@ -70,25 +84,25 @@
@Nullable DownloadableSubscription subscription) {
this.result = result;
if (this.result == EuiccService.RESULT_OK) {
- this.subscription = subscription;
+ this.mSubscription = subscription;
} else {
if (subscription != null) {
throw new IllegalArgumentException(
"Error result with non-null subscription: " + result);
}
- this.subscription = null;
+ this.mSubscription = null;
}
}
private GetDownloadableSubscriptionMetadataResult(Parcel in) {
this.result = in.readInt();
- this.subscription = in.readTypedObject(DownloadableSubscription.CREATOR);
+ this.mSubscription = in.readTypedObject(DownloadableSubscription.CREATOR);
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(result);
- dest.writeTypedObject(this.subscription, flags);
+ dest.writeTypedObject(this.mSubscription, flags);
}
@Override
diff --git a/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java b/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java
index 7ad8488..464d136 100644
--- a/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java
+++ b/core/java/android/service/euicc/GetEuiccProfileInfoListResult.java
@@ -16,15 +16,18 @@
package android.service.euicc;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
+import java.util.Arrays;
+import java.util.List;
+
/**
* Result of a {@link EuiccService#onGetEuiccProfileInfoList} operation.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+@SystemApi
public final class GetEuiccProfileInfoListResult implements Parcelable {
public static final Creator<GetEuiccProfileInfoListResult> CREATOR =
@@ -41,19 +44,38 @@
};
/**
- * Result of the operation.
+ * @hide
+ * @deprecated - Do no use. Use getResult() instead.
+ */
+ @Deprecated
+ public final int result;
+
+ @Nullable
+ private final EuiccProfileInfo[] mProfiles;
+
+ private final boolean mIsRemovable;
+
+ /**
+ * Gets the result of the operation.
*
* <p>May be one of the predefined {@code RESULT_} constants in EuiccService or any
* implementation-specific code starting with {@link EuiccService#RESULT_FIRST_USER}.
*/
- public final int result;
+ public int getResult() {
+ return result;
+ }
- /** The profile list (only upon success). */
+ /** Gets the profile list (only upon success). */
@Nullable
- public final EuiccProfileInfo[] profiles;
+ public List<EuiccProfileInfo> getProfiles() {
+ if (mProfiles == null) return null;
+ return Arrays.asList(mProfiles);
+ }
- /** Whether the eUICC is removable. */
- public final boolean isRemovable;
+ /** Gets whether the eUICC is removable. */
+ public boolean getIsRemovable() {
+ return mIsRemovable;
+ }
/**
* Construct a new {@link GetEuiccProfileInfoListResult}.
@@ -71,30 +93,29 @@
public GetEuiccProfileInfoListResult(
int result, @Nullable EuiccProfileInfo[] profiles, boolean isRemovable) {
this.result = result;
- this.isRemovable = isRemovable;
+ this.mIsRemovable = isRemovable;
if (this.result == EuiccService.RESULT_OK) {
- this.profiles = profiles;
+ this.mProfiles = profiles;
} else {
if (profiles != null) {
throw new IllegalArgumentException(
"Error result with non-null profiles: " + result);
}
- this.profiles = null;
+ this.mProfiles = null;
}
-
}
private GetEuiccProfileInfoListResult(Parcel in) {
this.result = in.readInt();
- this.profiles = in.createTypedArray(EuiccProfileInfo.CREATOR);
- this.isRemovable = in.readBoolean();
+ this.mProfiles = in.createTypedArray(EuiccProfileInfo.CREATOR);
+ this.mIsRemovable = in.readBoolean();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(result);
- dest.writeTypedArray(profiles, flags);
- dest.writeBoolean(isRemovable);
+ dest.writeTypedArray(mProfiles, flags);
+ dest.writeBoolean(mIsRemovable);
}
@Override
diff --git a/core/java/android/text/format/DateFormat.java b/core/java/android/text/format/DateFormat.java
index b5a8aca..285a5f0 100755
--- a/core/java/android/text/format/DateFormat.java
+++ b/core/java/android/text/format/DateFormat.java
@@ -158,9 +158,9 @@
private static Locale sIs24HourLocale;
private static boolean sIs24Hour;
-
/**
- * Returns true if user preference is set to 24-hour format.
+ * Returns true if times should be formatted as 24 hour times, false if times should be
+ * formatted as 12 hour (AM/PM) times. Based on the user's chosen locale and other preferences.
* @param context the context to use for the content resolver
* @return true if 24 hour time format is selected, false otherwise.
*/
@@ -169,7 +169,8 @@
}
/**
- * Returns true if user preference with the given user handle is set to 24-hour format.
+ * Returns true if times should be formatted as 24 hour times, false if times should be
+ * formatted as 12 hour (AM/PM) times. Based on the user's chosen locale and other preferences.
* @param context the context to use for the content resolver
* @param userHandle the user handle of the user to query.
* @return true if 24 hour time format is selected, false otherwise.
diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java
index b7099b6..13de172 100644
--- a/core/java/android/util/DisplayMetrics.java
+++ b/core/java/android/util/DisplayMetrics.java
@@ -120,6 +120,14 @@
public static final int DENSITY_420 = 420;
/**
+ * Intermediate density for screens that sit somewhere between
+ * {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi).
+ * This is not a density that applications should target, instead relying
+ * on the system to scale their {@link #DENSITY_XXHIGH} assets for them.
+ */
+ public static final int DENSITY_440 = 440;
+
+ /**
* Standard quantized DPI for extra-extra-high-density screens.
*/
public static final int DENSITY_XXHIGH = 480;
diff --git a/core/java/android/util/MutableBoolean.java b/core/java/android/util/MutableBoolean.java
index ed837ab..44e73cc 100644
--- a/core/java/android/util/MutableBoolean.java
+++ b/core/java/android/util/MutableBoolean.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableBoolean {
public boolean value;
diff --git a/core/java/android/util/MutableByte.java b/core/java/android/util/MutableByte.java
index cc6b00a..b9ec25d 100644
--- a/core/java/android/util/MutableByte.java
+++ b/core/java/android/util/MutableByte.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableByte {
public byte value;
diff --git a/core/java/android/util/MutableChar.java b/core/java/android/util/MutableChar.java
index 9a2e2bc..9f7a9ae 100644
--- a/core/java/android/util/MutableChar.java
+++ b/core/java/android/util/MutableChar.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableChar {
public char value;
diff --git a/core/java/android/util/MutableDouble.java b/core/java/android/util/MutableDouble.java
index bd7329a..56e539b 100644
--- a/core/java/android/util/MutableDouble.java
+++ b/core/java/android/util/MutableDouble.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableDouble {
public double value;
diff --git a/core/java/android/util/MutableFloat.java b/core/java/android/util/MutableFloat.java
index e6f2d7d..6d7ad59 100644
--- a/core/java/android/util/MutableFloat.java
+++ b/core/java/android/util/MutableFloat.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableFloat {
public float value;
diff --git a/core/java/android/util/MutableInt.java b/core/java/android/util/MutableInt.java
index a3d8606..bb24566 100644
--- a/core/java/android/util/MutableInt.java
+++ b/core/java/android/util/MutableInt.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableInt {
public int value;
diff --git a/core/java/android/util/MutableLong.java b/core/java/android/util/MutableLong.java
index 575068e..86e70e1 100644
--- a/core/java/android/util/MutableLong.java
+++ b/core/java/android/util/MutableLong.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableLong {
public long value;
diff --git a/core/java/android/util/MutableShort.java b/core/java/android/util/MutableShort.java
index 48fb232..b94ab07 100644
--- a/core/java/android/util/MutableShort.java
+++ b/core/java/android/util/MutableShort.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableShort {
public short value;
diff --git a/core/java/android/util/NtpTrustedTime.java b/core/java/android/util/NtpTrustedTime.java
index ed2d3c6..30d7b6c 100644
--- a/core/java/android/util/NtpTrustedTime.java
+++ b/core/java/android/util/NtpTrustedTime.java
@@ -20,6 +20,7 @@
import android.content.Context;
import android.content.res.Resources;
import android.net.ConnectivityManager;
+import android.net.Network;
import android.net.NetworkInfo;
import android.net.SntpClient;
import android.os.SystemClock;
@@ -80,6 +81,18 @@
@Override
public boolean forceRefresh() {
+ // We can't do this at initialization time: ConnectivityService might not be running yet.
+ synchronized (this) {
+ if (mCM == null) {
+ mCM = sContext.getSystemService(ConnectivityManager.class);
+ }
+ }
+
+ final Network network = mCM == null ? null : mCM.getActiveNetwork();
+ return forceRefresh(network);
+ }
+
+ public boolean forceRefresh(Network network) {
if (TextUtils.isEmpty(mServer)) {
// missing server, so no trusted time available
return false;
@@ -88,11 +101,11 @@
// We can't do this at initialization time: ConnectivityService might not be running yet.
synchronized (this) {
if (mCM == null) {
- mCM = (ConnectivityManager) sContext.getSystemService(Context.CONNECTIVITY_SERVICE);
+ mCM = sContext.getSystemService(ConnectivityManager.class);
}
}
- final NetworkInfo ni = mCM == null ? null : mCM.getActiveNetworkInfo();
+ final NetworkInfo ni = mCM == null ? null : mCM.getNetworkInfo(network);
if (ni == null || !ni.isConnected()) {
if (LOGD) Log.d(TAG, "forceRefresh: no connectivity");
return false;
@@ -101,7 +114,7 @@
if (LOGD) Log.d(TAG, "forceRefresh() from cache miss");
final SntpClient client = new SntpClient();
- if (client.requestTime(mServer, (int) mTimeout)) {
+ if (client.requestTime(mServer, (int) mTimeout, network)) {
mHasCache = true;
mCachedNtpTime = client.getNtpTime();
mCachedNtpElapsedRealtime = client.getNtpTimeReference();
diff --git a/core/java/android/util/StatsLog.java b/core/java/android/util/StatsLog.java
new file mode 100644
index 0000000..433dd3a
--- /dev/null
+++ b/core/java/android/util/StatsLog.java
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+package android.util;
+
+/**
+ * @hide
+ * Temporary dummy class for StatsLog. Will be removed.
+ */
+public final class StatsLog {
+ private static final String TAG = "StatsManager";
+
+ public static final int BLUETOOTH_ENABLED_STATE_CHANGED = 0;
+ public static final int BLUETOOTH_ENABLED_STATE_CHANGED__STATE__UNKNOWN = 0;
+ public static final int BLUETOOTH_ENABLED_STATE_CHANGED__STATE__ENABLED = 1;
+ public static final int BLUETOOTH_ENABLED_STATE_CHANGED__STATE__DISABLED = 2;
+
+ public static final int BLUETOOTH_CONNECTION_STATE_CHANGED = 1;
+
+ public static final int BLUETOOTH_A2DP_AUDIO_STATE_CHANGED = 2;
+ public static final int BLUETOOTH_A2DP_AUDIO_STATE_CHANGED__STATE__UNKNOWN = 0;
+ public static final int BLUETOOTH_A2DP_AUDIO_STATE_CHANGED__STATE__PLAY = 1;
+ public static final int BLUETOOTH_A2DP_AUDIO_STATE_CHANGED__STATE__STOP = 2;
+
+ public static final int BLE_SCAN_STATE_CHANGED = 2;
+ public static final int BLE_SCAN_STATE_CHANGED__STATE__OFF = 0;
+ public static final int BLE_SCAN_STATE_CHANGED__STATE__ON = 1;
+ public static final int BLE_SCAN_STATE_CHANGED__STATE__RESET = 2;
+
+ private StatsLog() {}
+
+ public static void write(int id, int field1) {}
+
+ public static void write(int id, int field1, int field2, int field3) {}
+
+ public static void write_non_chained(int id, int uid, String tag,
+ int field1, int field2, String field3) {}
+
+ /** I am a dummy javadoc comment. */
+ public static void write(int code, int[] uid, String[] tag, int arg2,
+ boolean arg3, boolean arg4, boolean arg5) {};
+
+ /** I am a dummy javadoc comment. */
+ public static void write_non_chained(int code, int arg1, String arg2, int arg3,
+ boolean arg4, boolean arg5, boolean arg6) {};
+}
diff --git a/core/java/android/util/TimestampedValue.java b/core/java/android/util/TimestampedValue.java
new file mode 100644
index 0000000..75fa18d
--- /dev/null
+++ b/core/java/android/util/TimestampedValue.java
@@ -0,0 +1,129 @@
+/*
+ * 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.
+ */
+
+package android.util;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.Parcel;
+import android.os.SystemClock;
+
+import java.util.Objects;
+
+/**
+ * A value with an associated reference time. The reference time will typically be provided by the
+ * elapsed realtime clock. The elapsed realtime clock can be obtained using methods like
+ * {@link SystemClock#elapsedRealtime()} or {@link SystemClock#elapsedRealtimeClock()}.
+ * If a suitable clock is used the reference time can be used to identify the age of a value or
+ * ordering between values.
+ *
+ * <p>To read and write a timestamped value from / to a Parcel see
+ * {@link #readFromParcel(Parcel, ClassLoader, Class)} and
+ * {@link #writeToParcel(Parcel, TimestampedValue)}.
+ *
+ * @param <T> the type of the value with an associated timestamp
+ * @hide
+ */
+public final class TimestampedValue<T> {
+ private final long mReferenceTimeMillis;
+ private final T mValue;
+
+ public TimestampedValue(long referenceTimeMillis, T value) {
+ mReferenceTimeMillis = referenceTimeMillis;
+ mValue = value;
+ }
+
+ public long getReferenceTimeMillis() {
+ return mReferenceTimeMillis;
+ }
+
+ public T getValue() {
+ return mValue;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TimestampedValue<?> that = (TimestampedValue<?>) o;
+ return mReferenceTimeMillis == that.mReferenceTimeMillis
+ && Objects.equals(mValue, that.mValue);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mReferenceTimeMillis, mValue);
+ }
+
+ @Override
+ public String toString() {
+ return "TimestampedValue{"
+ + "mReferenceTimeMillis=" + mReferenceTimeMillis
+ + ", mValue=" + mValue
+ + '}';
+ }
+
+ /**
+ * Read a {@link TimestampedValue} from a parcel that was stored using
+ * {@link #writeToParcel(Parcel, TimestampedValue)}.
+ *
+ * <p>The marshalling/unmarshalling of the value relies upon {@link Parcel#writeValue(Object)}
+ * and {@link Parcel#readValue(ClassLoader)} and so this method can only be used with types
+ * supported by those methods.
+ *
+ * @param in the Parcel to read from
+ * @param classLoader the ClassLoader to pass to {@link Parcel#readValue(ClassLoader)}
+ * @param valueClass the expected type of the value, typically the same as {@code <T>} but can
+ * also be a subclass
+ * @throws RuntimeException if the value read is not compatible with {@code valueClass} or the
+ * object could not be read
+ */
+ @SuppressWarnings("unchecked")
+ @NonNull
+ public static <T> TimestampedValue<T> readFromParcel(
+ @NonNull Parcel in, @Nullable ClassLoader classLoader, Class<? extends T> valueClass) {
+ long referenceTimeMillis = in.readLong();
+ T value = (T) in.readValue(classLoader);
+ // Equivalent to static code: if (!(value.getClass() instanceof {valueClass})) {
+ if (value != null && !valueClass.isAssignableFrom(value.getClass())) {
+ throw new RuntimeException("Value was of type " + value.getClass()
+ + " is not assignable to " + valueClass);
+ }
+ return new TimestampedValue<>(referenceTimeMillis, value);
+ }
+
+ /**
+ * Write a {@link TimestampedValue} to a parcel so that it can be read using
+ * {@link #readFromParcel(Parcel, ClassLoader, Class)}.
+ *
+ * <p>The marshalling/unmarshalling of the value relies upon {@link Parcel#writeValue(Object)}
+ * and {@link Parcel#readValue(ClassLoader)} and so this method can only be used with types
+ * supported by those methods.
+ *
+ * @param dest the Parcel
+ * @param timestampedValue the value
+ * @throws RuntimeException if the value could not be written to the Parcel
+ */
+ public static void writeToParcel(
+ @NonNull Parcel dest, @NonNull TimestampedValue<?> timestampedValue) {
+ dest.writeLong(timestampedValue.mReferenceTimeMillis);
+ dest.writeValue(timestampedValue.mValue);
+ }
+}
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index e576a0f..79f42df 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -397,4 +397,10 @@
* Return the touch region for the current IME window, or an empty region if there is none.
*/
Region getCurrentImeTouchRegion();
+
+ /**
+ * Requests that the WindowManager sends WindowManagerPolicy#ACTION_USER_ACTIVITY_NOTIFICATION
+ * on the next user activity.
+ */
+ void requestUserActivityNotification();
}
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index c4ffb4c..8e4f5b4 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -159,6 +159,12 @@
public final static boolean WATCH_POINTER = false;
/**
+ * Broadcast sent when a user activity is detected.
+ */
+ public final static String ACTION_USER_ACTIVITY_NOTIFICATION =
+ "android.intent.action.USER_ACTIVITY_NOTIFICATION";
+
+ /**
* Sticky broadcast of the current HDMI plugged state.
*/
public final static String ACTION_HDMI_PLUGGED = "android.intent.action.HDMI_PLUGGED";
@@ -1741,4 +1747,10 @@
* @return true if ready; false otherwise.
*/
boolean canDismissBootAnimation();
+
+ /**
+ * Requests that the WindowManager sends WindowManagerPolicy#ACTION_USER_ACTIVITY_NOTIFICATION
+ * on the next user activity.
+ */
+ public void requestUserActivityNotification();
}
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java
index 668cfba..d06a20b 100644
--- a/core/java/android/webkit/WebViewFactory.java
+++ b/core/java/android/webkit/WebViewFactory.java
@@ -463,7 +463,7 @@
*/
public static int onWebViewProviderChanged(PackageInfo packageInfo) {
String[] nativeLibs = null;
- String originalSourceDir = packageInfo.applicationInfo.sourceDir;
+ ApplicationInfo originalAppInfo = new ApplicationInfo(packageInfo.applicationInfo);
try {
fixupStubApplicationInfo(packageInfo.applicationInfo,
AppGlobals.getInitialApplication().getPackageManager());
@@ -474,7 +474,7 @@
Log.e(LOGTAG, "error preparing webview native library", t);
}
- WebViewZygote.onWebViewProviderChanged(packageInfo, originalSourceDir);
+ WebViewZygote.onWebViewProviderChanged(packageInfo, originalAppInfo);
return prepareWebViewInSystemServer(nativeLibs);
}
diff --git a/core/java/android/webkit/WebViewZygote.java b/core/java/android/webkit/WebViewZygote.java
index 0204dff..ca3a227 100644
--- a/core/java/android/webkit/WebViewZygote.java
+++ b/core/java/android/webkit/WebViewZygote.java
@@ -17,31 +17,25 @@
package android.webkit;
import android.app.LoadedApk;
+import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.os.Build;
-import android.os.SystemService;
+import android.os.ChildZygoteProcess;
+import android.os.Process;
import android.os.ZygoteProcess;
import android.text.TextUtils;
-import android.util.AndroidRuntimeException;
import android.util.Log;
import com.android.internal.annotations.GuardedBy;
import java.io.File;
-import java.io.IOException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
-import java.util.concurrent.TimeoutException;
/** @hide */
public class WebViewZygote {
private static final String LOGTAG = "WebViewZygote";
- private static final String WEBVIEW_ZYGOTE_SERVICE_32 = "webview_zygote32";
- private static final String WEBVIEW_ZYGOTE_SERVICE_64 = "webview_zygote64";
- private static final String WEBVIEW_ZYGOTE_SOCKET = "webview_zygote";
-
/**
* Lock object that protects all other static members.
*/
@@ -52,14 +46,7 @@
* is not running or is not connected.
*/
@GuardedBy("sLock")
- private static ZygoteProcess sZygote;
-
- /**
- * Variable that allows us to determine whether the WebView zygote Service has already been
- * started.
- */
- @GuardedBy("sLock")
- private static boolean sStartedService = false;
+ private static ChildZygoteProcess sZygote;
/**
* Information about the selected WebView package. This is set from #onWebViewProviderChanged().
@@ -68,11 +55,11 @@
private static PackageInfo sPackage;
/**
- * Cache key for the selected WebView package's classloader. This is set from
+ * Original ApplicationInfo for the selected WebView package before stub fixup. This is set from
* #onWebViewProviderChanged().
*/
@GuardedBy("sLock")
- private static String sPackageCacheKey;
+ private static ApplicationInfo sPackageOriginalAppInfo;
/**
* Flag for whether multi-process WebView is enabled. If this is false, the zygote
@@ -85,7 +72,7 @@
synchronized (sLock) {
if (sZygote != null) return sZygote;
- waitForServiceStartAndConnect();
+ connectToZygoteIfNeededLocked();
return sZygote;
}
}
@@ -106,83 +93,42 @@
synchronized (sLock) {
sMultiprocessEnabled = enabled;
- // When toggling between multi-process being on/off, start or stop the
- // service. If it is enabled and the zygote is not yet started, bring up the service.
- // Otherwise, bring down the service. The name may be null if the package
- // information has not yet been resolved.
- final String serviceName = getServiceNameLocked();
- if (serviceName == null) return;
-
- if (enabled) {
- if (!sStartedService) {
- SystemService.start(serviceName);
- sStartedService = true;
- }
- } else {
- SystemService.stop(serviceName);
- sStartedService = false;
- sZygote = null;
+ // When multi-process is disabled, kill the zygote. When it is enabled,
+ // the zygote is not explicitly started here to avoid waiting on the
+ // zygote launch at boot. Instead, the zygote will be started when it is
+ // first needed in getProcess().
+ if (!enabled) {
+ stopZygoteLocked();
}
}
}
- public static void onWebViewProviderChanged(PackageInfo packageInfo, String cacheKey) {
+ public static void onWebViewProviderChanged(PackageInfo packageInfo,
+ ApplicationInfo originalAppInfo) {
synchronized (sLock) {
sPackage = packageInfo;
- sPackageCacheKey = cacheKey;
+ sPackageOriginalAppInfo = originalAppInfo;
// If multi-process is not enabled, then do not start the zygote service.
if (!sMultiprocessEnabled) {
return;
}
- final String serviceName = getServiceNameLocked();
- sZygote = null;
-
- // The service may enter the RUNNING state before it opens the socket,
- // so connectToZygoteIfNeededLocked() may still fail.
- if (SystemService.isStopped(serviceName)) {
- SystemService.start(serviceName);
- } else {
- SystemService.restart(serviceName);
- }
- sStartedService = true;
- }
- }
-
- private static void waitForServiceStartAndConnect() {
- if (!sStartedService) {
- throw new AndroidRuntimeException("Tried waiting for the WebView Zygote Service to " +
- "start running without first starting the service.");
- }
-
- String serviceName;
- synchronized (sLock) {
- serviceName = getServiceNameLocked();
- }
- try {
- SystemService.waitForState(serviceName, SystemService.State.RUNNING, 5000);
- } catch (TimeoutException e) {
- Log.e(LOGTAG, "Timed out waiting for " + serviceName);
- return;
- }
-
- synchronized (sLock) {
- connectToZygoteIfNeededLocked();
+ stopZygoteLocked();
}
}
@GuardedBy("sLock")
- private static String getServiceNameLocked() {
- if (sPackage == null)
- return null;
-
- if (Arrays.asList(Build.SUPPORTED_64_BIT_ABIS).contains(
- sPackage.applicationInfo.primaryCpuAbi)) {
- return WEBVIEW_ZYGOTE_SERVICE_64;
+ private static void stopZygoteLocked() {
+ if (sZygote != null) {
+ // Close the connection and kill the zygote process. This will not cause
+ // child processes to be killed by itself. But if this is called in response to
+ // setMultiprocessEnabled() or onWebViewProviderChanged(), the WebViewUpdater
+ // will kill all processes that depend on the WebView package.
+ sZygote.close();
+ Process.killProcess(sZygote.getPid());
+ sZygote = null;
}
-
- return WEBVIEW_ZYGOTE_SERVICE_32;
}
@GuardedBy("sLock")
@@ -196,14 +142,17 @@
return;
}
- final String serviceName = getServiceNameLocked();
- if (!SystemService.isRunning(serviceName)) {
- Log.e(LOGTAG, serviceName + " is not running");
- return;
- }
-
try {
- sZygote = new ZygoteProcess(WEBVIEW_ZYGOTE_SOCKET, null);
+ sZygote = Process.zygoteProcess.startChildZygote(
+ "com.android.internal.os.WebViewZygoteInit",
+ "webview_zygote",
+ Process.WEBVIEW_ZYGOTE_UID,
+ Process.WEBVIEW_ZYGOTE_UID,
+ null, // gids
+ 0, // runtimeFlags
+ "webview_zygote", // seInfo
+ sPackage.applicationInfo.primaryCpuAbi, // abi
+ null); // instructionSet
// All the work below is usually done by LoadedApk, but the zygote can't talk to
// PackageManager or construct a LoadedApk since it's single-threaded pre-fork, so
@@ -218,14 +167,21 @@
final String zip = (zipPaths.size() == 1) ? zipPaths.get(0) :
TextUtils.join(File.pathSeparator, zipPaths);
- ZygoteProcess.waitForConnectionToZygote(WEBVIEW_ZYGOTE_SOCKET);
+ // In the case where the ApplicationInfo has been modified by the stub WebView,
+ // we need to use the original ApplicationInfo to determine what the original classpath
+ // would have been to use as a cache key.
+ LoadedApk.makePaths(null, false, sPackageOriginalAppInfo, zipPaths, null);
+ final String cacheKey = (zipPaths.size() == 1) ? zipPaths.get(0) :
+ TextUtils.join(File.pathSeparator, zipPaths);
+
+ ZygoteProcess.waitForConnectionToZygote(sZygote.getPrimarySocketAddress());
Log.d(LOGTAG, "Preloading package " + zip + " " + librarySearchPath);
- sZygote.preloadPackageForAbi(zip, librarySearchPath, sPackageCacheKey,
+ sZygote.preloadPackageForAbi(zip, librarySearchPath, cacheKey,
Build.SUPPORTED_ABIS[0]);
} catch (Exception e) {
- Log.e(LOGTAG, "Error connecting to " + serviceName, e);
- sZygote = null;
+ Log.e(LOGTAG, "Error connecting to webview zygote", e);
+ stopZygoteLocked();
}
}
}
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 91e2f7d..6c7455d 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -3866,6 +3866,7 @@
private void onTouchDown(MotionEvent ev) {
mHasPerformedLongPress = false;
mActivePointerId = ev.getPointerId(0);
+ hideSelector();
if (mTouchMode == TOUCH_MODE_OVERFLING) {
// Stopped the fling. It is a scroll.
@@ -5226,17 +5227,21 @@
}
mRecycler.fullyDetachScrapViews();
+ boolean selectorOnScreen = false;
if (!inTouchMode && mSelectedPosition != INVALID_POSITION) {
final int childIndex = mSelectedPosition - mFirstPosition;
if (childIndex >= 0 && childIndex < getChildCount()) {
positionSelector(mSelectedPosition, getChildAt(childIndex));
+ selectorOnScreen = true;
}
} else if (mSelectorPosition != INVALID_POSITION) {
final int childIndex = mSelectorPosition - mFirstPosition;
if (childIndex >= 0 && childIndex < getChildCount()) {
- positionSelector(INVALID_POSITION, getChildAt(childIndex));
+ positionSelector(mSelectorPosition, getChildAt(childIndex));
+ selectorOnScreen = true;
}
- } else {
+ }
+ if (!selectorOnScreen) {
mSelectorRect.setEmpty();
}
diff --git a/core/java/com/android/internal/app/IBatteryStats.aidl b/core/java/com/android/internal/app/IBatteryStats.aidl
index 4275e0b..f4f4317 100644
--- a/core/java/com/android/internal/app/IBatteryStats.aidl
+++ b/core/java/com/android/internal/app/IBatteryStats.aidl
@@ -22,6 +22,7 @@
import android.net.wifi.WifiActivityEnergyInfo;
import android.os.ParcelFileDescriptor;
import android.os.WorkSource;
+import android.os.connectivity.CellularBatteryStats;
import android.os.health.HealthStatsParceler;
import android.telephony.DataConnectionRealTimeInfo;
import android.telephony.ModemActivityInfo;
@@ -134,6 +135,9 @@
void noteResetBleScan();
void noteBleScanResults(in WorkSource ws, int numNewResults);
+ /** {@hide} */
+ CellularBatteryStats getCellularBatteryStats();
+
HealthStatsParceler takeUidSnapshot(int uid);
HealthStatsParceler[] takeUidSnapshots(in int[] uid);
diff --git a/core/java/com/android/internal/content/PackageHelper.java b/core/java/com/android/internal/content/PackageHelper.java
index e923223..97500f2 100644
--- a/core/java/com/android/internal/content/PackageHelper.java
+++ b/core/java/com/android/internal/content/PackageHelper.java
@@ -26,6 +26,7 @@
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PackageParser.PackageLite;
+import android.content.pm.dex.DexMetadataHelper;
import android.os.Environment;
import android.os.FileUtils;
import android.os.IBinder;
@@ -663,6 +664,9 @@
}
}
+ // Include raw dex metadata files
+ sizeBytes += DexMetadataHelper.getPackageDexMetadataSize(pkg);
+
// Include all relevant native code
sizeBytes += NativeLibraryHelper.sumNativeBinariesWithOverride(handle, abiOverride);
diff --git a/core/java/com/android/internal/net/NetworkStatsFactory.java b/core/java/com/android/internal/net/NetworkStatsFactory.java
index b576a20..41802cc 100644
--- a/core/java/com/android/internal/net/NetworkStatsFactory.java
+++ b/core/java/com/android/internal/net/NetworkStatsFactory.java
@@ -22,23 +22,27 @@
import static android.net.NetworkStats.UID_ALL;
import static com.android.server.NetworkManagementSocketTagger.kernelToTag;
+import android.annotation.Nullable;
import android.net.NetworkStats;
import android.os.StrictMode;
import android.os.SystemClock;
-import android.util.ArrayMap;
-import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.ProcFileReader;
import libcore.io.IoUtils;
+import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileReader;
import java.io.IOException;
import java.net.ProtocolException;
-import java.util.Objects;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
/**
* Creates {@link NetworkStats} instances by parsing various {@code /proc/}
@@ -50,11 +54,6 @@
private static final boolean USE_NATIVE_PARSING = true;
private static final boolean SANITY_CHECK_NATIVE = false;
- private static final String CLATD_INTERFACE_PREFIX = "v4-";
- // Delta between IPv4 header (20b) and IPv6 header (40b).
- // Used for correct stats accounting on clatd interfaces.
- private static final int IPV4V6_HEADER_DELTA = 20;
-
/** Path to {@code /proc/net/xt_qtaguid/iface_stat_all}. */
private final File mStatsXtIfaceAll;
/** Path to {@code /proc/net/xt_qtaguid/iface_stat_fmt}. */
@@ -62,29 +61,86 @@
/** Path to {@code /proc/net/xt_qtaguid/stats}. */
private final File mStatsXtUid;
- // TODO: to improve testability and avoid global state, do not use a static variable.
- @GuardedBy("sStackedIfaces")
- private static final ArrayMap<String, String> sStackedIfaces = new ArrayMap<>();
+ private boolean mUseBpfStats;
+
+ // TODO: only do adjustments in NetworkStatsService and remove this.
+ /**
+ * (Stacked interface) -> (base interface) association for all connected ifaces since boot.
+ *
+ * Because counters must never roll backwards, once a given interface is stacked on top of an
+ * underlying interface, the stacked interface can never be stacked on top of
+ * another interface. */
+ private static final ConcurrentHashMap<String, String> sStackedIfaces
+ = new ConcurrentHashMap<>();
public static void noteStackedIface(String stackedIface, String baseIface) {
- synchronized (sStackedIfaces) {
- if (baseIface != null) {
- sStackedIfaces.put(stackedIface, baseIface);
- } else {
- sStackedIfaces.remove(stackedIface);
- }
+ if (stackedIface != null && baseIface != null) {
+ sStackedIfaces.put(stackedIface, baseIface);
}
}
- public NetworkStatsFactory() {
- this(new File("/proc/"));
+ /**
+ * Get a set of interfaces containing specified ifaces and stacked interfaces.
+ *
+ * <p>The added stacked interfaces are ifaces stacked on top of the specified ones, or ifaces
+ * on which the specified ones are stacked. Stacked interfaces are those noted with
+ * {@link #noteStackedIface(String, String)}, but only interfaces noted before this method
+ * is called are guaranteed to be included.
+ */
+ public static String[] augmentWithStackedInterfaces(@Nullable String[] requiredIfaces) {
+ if (requiredIfaces == NetworkStats.INTERFACES_ALL) {
+ return null;
+ }
+
+ HashSet<String> relatedIfaces = new HashSet<>(Arrays.asList(requiredIfaces));
+ // ConcurrentHashMap's EntrySet iterators are "guaranteed to traverse
+ // elements as they existed upon construction exactly once, and may
+ // (but are not guaranteed to) reflect any modifications subsequent to construction".
+ // This is enough here.
+ for (Map.Entry<String, String> entry : sStackedIfaces.entrySet()) {
+ if (relatedIfaces.contains(entry.getKey())) {
+ relatedIfaces.add(entry.getValue());
+ } else if (relatedIfaces.contains(entry.getValue())) {
+ relatedIfaces.add(entry.getKey());
+ }
+ }
+
+ String[] outArray = new String[relatedIfaces.size()];
+ return relatedIfaces.toArray(outArray);
+ }
+
+ /**
+ * Applies 464xlat adjustments with ifaces noted with {@link #noteStackedIface(String, String)}.
+ * @see NetworkStats#apply464xlatAdjustments(NetworkStats, NetworkStats, Map)
+ */
+ public static void apply464xlatAdjustments(NetworkStats baseTraffic,
+ NetworkStats stackedTraffic) {
+ NetworkStats.apply464xlatAdjustments(baseTraffic, stackedTraffic, sStackedIfaces);
}
@VisibleForTesting
- public NetworkStatsFactory(File procRoot) {
+ public static void clearStackedIfaces() {
+ sStackedIfaces.clear();
+ }
+
+ public NetworkStatsFactory() {
+ this(new File("/proc/"), new File("/sys/fs/bpf/traffic_uid_stats_map").exists());
+ }
+
+ @VisibleForTesting
+ public NetworkStatsFactory(File procRoot, boolean useBpfStats) {
mStatsXtIfaceAll = new File(procRoot, "net/xt_qtaguid/iface_stat_all");
mStatsXtIfaceFmt = new File(procRoot, "net/xt_qtaguid/iface_stat_fmt");
mStatsXtUid = new File(procRoot, "net/xt_qtaguid/stats");
+ mUseBpfStats = useBpfStats;
+ }
+
+ public NetworkStats readBpfNetworkStatsDev() throws IOException {
+ final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6);
+ if (nativeReadNetworkStatsDev(stats) != 0) {
+ throw new IOException("Failed to parse bpf iface stats");
+ }
+ return stats;
}
/**
@@ -96,6 +152,11 @@
* @throws IllegalStateException when problem parsing stats.
*/
public NetworkStats readNetworkStatsSummaryDev() throws IOException {
+
+ // Return xt_bpf stats if switched to bpf module.
+ if (mUseBpfStats)
+ return readBpfNetworkStatsDev();
+
final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6);
@@ -147,6 +208,11 @@
* @throws IllegalStateException when problem parsing stats.
*/
public NetworkStats readNetworkStatsSummaryXt() throws IOException {
+
+ // Return xt_bpf stats if qtaguid module is replaced.
+ if (mUseBpfStats)
+ return readBpfNetworkStatsDev();
+
final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
// return null when kernel doesn't support
@@ -192,51 +258,10 @@
NetworkStats lastStats) throws IOException {
final NetworkStats stats =
readNetworkStatsDetailInternal(limitUid, limitIfaces, limitTag, lastStats);
- final ArrayMap<String, String> stackedIfaces;
- synchronized (sStackedIfaces) {
- stackedIfaces = new ArrayMap<>(sStackedIfaces);
- }
- // Total 464xlat traffic to subtract from uid 0 on all base interfaces.
- final NetworkStats adjustments = new NetworkStats(0, stackedIfaces.size());
- NetworkStats.Entry entry = null; // For recycling
-
- // For 464xlat traffic, xt_qtaguid sees every IPv4 packet twice, once as a native IPv4
- // packet on the stacked interface, and once as translated to an IPv6 packet on the
- // base interface. For correct stats accounting on the base interface, every 464xlat
- // packet needs to be subtracted from the root UID on the base interface both for tx
- // and rx traffic (http://b/12249687, http:/b/33681750).
- for (int i = 0; i < stats.size(); i++) {
- entry = stats.getValues(i, entry);
- if (entry.iface == null || !entry.iface.startsWith(CLATD_INTERFACE_PREFIX)) {
- continue;
- }
- final String baseIface = stackedIfaces.get(entry.iface);
- if (baseIface == null) {
- continue;
- }
-
- NetworkStats.Entry adjust =
- new NetworkStats.Entry(baseIface, 0, 0, 0, 0, 0, 0, 0L, 0L, 0L, 0L, 0L);
- // Subtract any 464lat traffic seen for the root UID on the current base interface.
- adjust.rxBytes -= (entry.rxBytes + entry.rxPackets * IPV4V6_HEADER_DELTA);
- adjust.txBytes -= (entry.txBytes + entry.txPackets * IPV4V6_HEADER_DELTA);
- adjust.rxPackets -= entry.rxPackets;
- adjust.txPackets -= entry.txPackets;
- adjustments.combineValues(adjust);
-
- // For 464xlat traffic, xt_qtaguid only counts the bytes of the native IPv4 packet sent
- // on the stacked interface with prefix "v4-" and drops the IPv6 header size after
- // unwrapping. To account correctly for on-the-wire traffic, add the 20 additional bytes
- // difference for all packets (http://b/12249687, http:/b/33681750).
- entry.rxBytes = entry.rxPackets * IPV4V6_HEADER_DELTA;
- entry.txBytes = entry.txPackets * IPV4V6_HEADER_DELTA;
- entry.rxPackets = 0;
- entry.txPackets = 0;
- stats.combineValues(entry);
- }
-
- stats.combineAllValues(adjustments);
+ // No locking here: apply464xlatAdjustments behaves fine with an add-only ConcurrentHashMap.
+ // TODO: remove this and only apply adjustments in NetworkStatsService.
+ stats.apply464xlatAdjustments(sStackedIfaces);
return stats;
}
@@ -252,7 +277,7 @@
stats = new NetworkStats(SystemClock.elapsedRealtime(), -1);
}
if (nativeReadNetworkStatsDetail(stats, mStatsXtUid.getAbsolutePath(), limitUid,
- limitIfaces, limitTag) != 0) {
+ limitIfaces, limitTag, mUseBpfStats) != 0) {
throw new IOException("Failed to parse network stats");
}
if (SANITY_CHECK_NATIVE) {
@@ -346,6 +371,9 @@
* are expected to monotonically increase since device boot.
*/
@VisibleForTesting
- public static native int nativeReadNetworkStatsDetail(
- NetworkStats stats, String path, int limitUid, String[] limitIfaces, int limitTag);
+ public static native int nativeReadNetworkStatsDetail(NetworkStats stats, String path,
+ int limitUid, String[] limitIfaces, int limitTag, boolean useBpfStats);
+
+ @VisibleForTesting
+ public static native int nativeReadNetworkStatsDev(NetworkStats stats);
}
diff --git a/core/java/com/android/internal/net/OWNERS b/core/java/com/android/internal/net/OWNERS
index 10d44bd..ef44ef7 100644
--- a/core/java/com/android/internal/net/OWNERS
+++ b/core/java/com/android/internal/net/OWNERS
@@ -1,7 +1,6 @@
set noparent
ek@google.com
-hugobenichi@google.com
jchalard@google.com
jsharkey@android.com
lorenzo@google.com
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index f26c0cd..10618d4 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -30,6 +30,7 @@
import android.os.BatteryManager;
import android.os.BatteryStats;
import android.os.Build;
+import android.os.connectivity.CellularBatteryStats;
import android.os.FileUtils;
import android.os.Handler;
import android.os.IBatteryPropertiesRegistrar;
@@ -11262,6 +11263,51 @@
return (msPerLevel * (100-mCurrentBatteryLevel)) * 1000;
}
+ /*@hide */
+ public CellularBatteryStats getCellularBatteryStats() {
+ CellularBatteryStats s = new CellularBatteryStats();
+ final int which = STATS_SINCE_CHARGED;
+ final long rawRealTime = SystemClock.elapsedRealtime() * 1000;
+ final ControllerActivityCounter counter = getModemControllerActivity();
+ final long idleTimeMs = counter.getIdleTimeCounter().getCountLocked(which);
+ final long rxTimeMs = counter.getRxTimeCounter().getCountLocked(which);
+ final long energyConsumedMaMs = counter.getPowerCounter().getCountLocked(which);
+ long[] timeInRatMs = new long[BatteryStats.NUM_DATA_CONNECTION_TYPES];
+ for (int i = 0; i < timeInRatMs.length; i++) {
+ timeInRatMs[i] = getPhoneDataConnectionTime(i, rawRealTime, which) / 1000;
+ }
+ long[] timeInRxSignalStrengthLevelMs = new long[SignalStrength.NUM_SIGNAL_STRENGTH_BINS];
+ for (int i = 0; i < timeInRxSignalStrengthLevelMs.length; i++) {
+ timeInRxSignalStrengthLevelMs[i]
+ = getPhoneSignalStrengthTime(i, rawRealTime, which) / 1000;
+ }
+ long[] txTimeMs = new long[Math.min(ModemActivityInfo.TX_POWER_LEVELS,
+ counter.getTxTimeCounters().length)];
+ long totalTxTimeMs = 0;
+ for (int i = 0; i < txTimeMs.length; i++) {
+ txTimeMs[i] = counter.getTxTimeCounters()[i].getCountLocked(which);
+ totalTxTimeMs += txTimeMs[i];
+ }
+ final long totalControllerActivityTimeMs
+ = computeBatteryRealtime(SystemClock.elapsedRealtime() * 1000, which) / 1000;
+ final long sleepTimeMs
+ = totalControllerActivityTimeMs - (idleTimeMs + rxTimeMs + totalTxTimeMs);
+ s.setLoggingDurationMs(computeBatteryRealtime(rawRealTime, which) / 1000);
+ s.setKernelActiveTimeMs(getMobileRadioActiveTime(rawRealTime, which) / 1000);
+ s.setNumPacketsTx(getNetworkActivityPackets(NETWORK_MOBILE_TX_DATA, which));
+ s.setNumBytesTx(getNetworkActivityBytes(NETWORK_MOBILE_TX_DATA, which));
+ s.setNumPacketsRx(getNetworkActivityPackets(NETWORK_MOBILE_RX_DATA, which));
+ s.setNumBytesRx(getNetworkActivityBytes(NETWORK_MOBILE_RX_DATA, which));
+ s.setSleepTimeMs(sleepTimeMs);
+ s.setIdleTimeMs(idleTimeMs);
+ s.setRxTimeMs(rxTimeMs);
+ s.setEnergyConsumedMaMs(energyConsumedMaMs);
+ s.setTimeInRatMs(timeInRatMs);
+ s.setTimeInRxSignalStrengthLevelMs(timeInRxSignalStrengthLevelMs);
+ s.setTxTimeMs(txTimeMs);
+ return s;
+ }
+
@Override
public LevelStepTracker getChargeLevelStepTracker() {
return mChargeStepTracker;
diff --git a/core/java/com/android/internal/os/RuntimeInit.java b/core/java/com/android/internal/os/RuntimeInit.java
index 66475e4..a9cd5c8 100644
--- a/core/java/com/android/internal/os/RuntimeInit.java
+++ b/core/java/com/android/internal/os/RuntimeInit.java
@@ -34,6 +34,7 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
+import java.util.Objects;
import java.util.TimeZone;
import java.util.logging.LogManager;
import org.apache.harmony.luni.internal.util.TimezoneGetter;
@@ -67,14 +68,19 @@
* but apps can override that behavior.
*/
private static class LoggingHandler implements Thread.UncaughtExceptionHandler {
+ public volatile boolean mTriggered = false;
+
@Override
public void uncaughtException(Thread t, Throwable e) {
+ mTriggered = true;
+
// Don't re-enter if KillApplicationHandler has already run
if (mCrashing) return;
- if (mApplicationObject == null) {
- // The "FATAL EXCEPTION" string is still used on Android even though
- // apps can set a custom UncaughtExceptionHandler that renders uncaught
- // exceptions non-fatal.
+
+ // mApplicationObject is null for non-zygote java programs (e.g. "am")
+ // There are also apps running with the system UID. We don't want the
+ // first clause in either of these two cases, only for system_server.
+ if (mApplicationObject == null && (Process.SYSTEM_UID == Process.myUid())) {
Clog_e(TAG, "*** FATAL EXCEPTION IN SYSTEM PROCESS: " + t.getName(), e);
} else {
StringBuilder message = new StringBuilder();
@@ -95,12 +101,33 @@
/**
* Handle application death from an uncaught exception. The framework
* catches these for the main threads, so this should only matter for
- * threads created by applications. Before this method runs,
- * {@link LoggingHandler} will already have logged details.
+ * threads created by applications. Before this method runs, the given
+ * instance of {@link LoggingHandler} should already have logged details
+ * (and if not it is run first).
*/
private static class KillApplicationHandler implements Thread.UncaughtExceptionHandler {
+ private final LoggingHandler mLoggingHandler;
+
+ /**
+ * Create a new KillApplicationHandler that follows the given LoggingHandler.
+ * If {@link #uncaughtException(Thread, Throwable) uncaughtException} is called
+ * on the created instance without {@code loggingHandler} having been triggered,
+ * {@link LoggingHandler#uncaughtException(Thread, Throwable)
+ * loggingHandler.uncaughtException} will be called first.
+ *
+ * @param loggingHandler the {@link LoggingHandler} expected to have run before
+ * this instance's {@link #uncaughtException(Thread, Throwable) uncaughtException}
+ * is being called.
+ */
+ public KillApplicationHandler(LoggingHandler loggingHandler) {
+ this.mLoggingHandler = Objects.requireNonNull(loggingHandler);
+ }
+
+ @Override
public void uncaughtException(Thread t, Throwable e) {
try {
+ ensureLogging(t, e);
+
// Don't re-enter -- avoid infinite loops if crash-reporting crashes.
if (mCrashing) return;
mCrashing = true;
@@ -131,6 +158,33 @@
System.exit(10);
}
}
+
+ /**
+ * Ensures that the logging handler has been triggered.
+ *
+ * See b/73380984. This reinstates the pre-O behavior of
+ *
+ * {@code thread.getUncaughtExceptionHandler().uncaughtException(thread, e);}
+ *
+ * logging the exception (in addition to killing the app). This behavior
+ * was never documented / guaranteed but helps in diagnostics of apps
+ * using the pattern.
+ *
+ * If this KillApplicationHandler is invoked the "regular" way (by
+ * {@link Thread#dispatchUncaughtException(Throwable)
+ * Thread.dispatchUncaughtException} in case of an uncaught exception)
+ * then the pre-handler (expected to be {@link #mLoggingHandler}) will already
+ * have run. Otherwise, we manually invoke it here.
+ */
+ private void ensureLogging(Thread t, Throwable e) {
+ if (!mLoggingHandler.mTriggered) {
+ try {
+ mLoggingHandler.uncaughtException(t, e);
+ } catch (Throwable loggingThrowable) {
+ // Ignored.
+ }
+ }
+ }
}
protected static final void commonInit() {
@@ -140,8 +194,9 @@
* set handlers; these apply to all threads in the VM. Apps can replace
* the default handler, but not the pre handler.
*/
- Thread.setUncaughtExceptionPreHandler(new LoggingHandler());
- Thread.setDefaultUncaughtExceptionHandler(new KillApplicationHandler());
+ LoggingHandler loggingHandler = new LoggingHandler();
+ Thread.setUncaughtExceptionPreHandler(loggingHandler);
+ Thread.setDefaultUncaughtExceptionHandler(new KillApplicationHandler(loggingHandler));
/*
* Install a TimezoneGetter subclass for ZoneInfo.db
@@ -229,7 +284,7 @@
* @param argv Argument vector for main()
* @param classLoader the classLoader to load {@className} with
*/
- private static Runnable findStaticMain(String className, String[] argv,
+ protected static Runnable findStaticMain(String className, String[] argv,
ClassLoader classLoader) {
Class<?> cl;
diff --git a/core/java/com/android/internal/os/WebViewZygoteInit.java b/core/java/com/android/internal/os/WebViewZygoteInit.java
index cadb66a..32b580c 100644
--- a/core/java/com/android/internal/os/WebViewZygoteInit.java
+++ b/core/java/com/android/internal/os/WebViewZygoteInit.java
@@ -18,9 +18,11 @@
import android.app.ApplicationLoaders;
import android.net.LocalSocket;
+import android.net.LocalServerSocket;
import android.os.Build;
import android.system.ErrnoException;
import android.system.Os;
+import android.system.OsConstants;
import android.text.TextUtils;
import android.util.Log;
import android.webkit.WebViewFactory;
@@ -118,18 +120,35 @@
}
public static void main(String argv[]) {
- sServer = new WebViewZygoteServer();
+ Log.i(TAG, "Starting WebViewZygoteInit");
- // Zygote goes into its own process group.
- try {
- Os.setpgid(0, 0);
- } catch (ErrnoException ex) {
- throw new RuntimeException("Failed to setpgid(0,0)", ex);
+ String socketName = null;
+ for (String arg : argv) {
+ Log.i(TAG, arg);
+ if (arg.startsWith(Zygote.CHILD_ZYGOTE_SOCKET_NAME_ARG)) {
+ socketName = arg.substring(Zygote.CHILD_ZYGOTE_SOCKET_NAME_ARG.length());
+ }
}
+ if (socketName == null) {
+ throw new RuntimeException("No " + Zygote.CHILD_ZYGOTE_SOCKET_NAME_ARG + " specified");
+ }
+
+ try {
+ Os.prctl(OsConstants.PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
+ } catch (ErrnoException ex) {
+ throw new RuntimeException("Failed to set PR_SET_NO_NEW_PRIVS", ex);
+ }
+
+ sServer = new WebViewZygoteServer();
final Runnable caller;
try {
- sServer.registerServerSocket("webview_zygote");
+ sServer.registerServerSocketAtAbstractName(socketName);
+
+ // Add the abstract socket to the FD whitelist so that the native zygote code
+ // can properly detach it after forking.
+ Zygote.nativeAllowFileAcrossFork("ABSTRACT/" + socketName);
+
// The select loop returns early in the child process after a fork and
// loops forever in the zygote.
caller = sServer.runSelectLoop(TextUtils.join(",", Build.SUPPORTED_ABIS));
diff --git a/core/java/com/android/internal/os/WrapperInit.java b/core/java/com/android/internal/os/WrapperInit.java
index 4901080..f0e7796 100644
--- a/core/java/com/android/internal/os/WrapperInit.java
+++ b/core/java/com/android/internal/os/WrapperInit.java
@@ -115,6 +115,14 @@
command.append(' ');
command.append(appProcess);
+ // Generate bare minimum of debug information to be able to backtrace through JITed code.
+ // We assume that if the invoke wrapper is used, backtraces are desirable:
+ // * The wrap.sh script can only be used by debuggable apps, which would enable this flag
+ // without the script anyway (the fork-zygote path). So this makes the two consistent.
+ // * The wrap.* property can only be used on userdebug builds and is likely to be used by
+ // developers (e.g. enable debug-malloc), in which case backtraces are also useful.
+ command.append(" -Xcompiler-option --generate-mini-debug-info");
+
command.append(" /system/bin --application");
if (niceName != null) {
command.append(" '--nice-name=").append(niceName).append("'");
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index 9167076..e187862 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -55,6 +55,25 @@
public static final int DISABLE_VERIFIER = 1 << 9;
/** Only use oat files located in /system. Otherwise use dex/jar/apk . */
public static final int ONLY_USE_SYSTEM_OAT_FILES = 1 << 10;
+ /** Force generation of native debugging information for backtraces. */
+ public static final int DEBUG_GENERATE_MINI_DEBUG_INFO = 1 << 11;
+ /**
+ * Hidden API access restrictions. This is a mask for bits representing the API enforcement
+ * policy, defined by {@code @ApplicationInfo.HiddenApiEnforcementPolicy}.
+ */
+ public static final int API_ENFORCEMENT_POLICY_MASK = (1 << 12) | (1 << 13);
+ /**
+ * Bit shift for use with {@link #API_ENFORCEMENT_POLICY_MASK}.
+ *
+ * (flags & API_ENFORCEMENT_POLICY_MASK) >> API_ENFORCEMENT_POLICY_SHIFT gives
+ * @ApplicationInfo.ApiEnforcementPolicy values.
+ */
+ public static final int API_ENFORCEMENT_POLICY_SHIFT =
+ Integer.numberOfTrailingZeros(API_ENFORCEMENT_POLICY_MASK);
+ /**
+ * Enable system server ART profiling.
+ */
+ public static final int PROFILE_SYSTEM_SERVER = 1 << 14;
/** No external storage should be mounted. */
public static final int MOUNT_EXTERNAL_NONE = 0;
@@ -67,6 +86,13 @@
private static final ZygoteHooks VM_HOOKS = new ZygoteHooks();
+ /**
+ * An extraArg passed when a zygote process is forking a child-zygote, specifying a name
+ * in the abstract socket namespace. This socket name is what the new child zygote
+ * should listen for connections on.
+ */
+ public static final String CHILD_ZYGOTE_SOCKET_NAME_ARG = "--zygote-socket=";
+
private Zygote() {}
/** Called for some security initialization before any fork. */
@@ -98,6 +124,8 @@
* @param fdsToIgnore null-ok an array of ints, either null or holding
* one or more POSIX file descriptor numbers that are to be ignored
* in the file descriptor table check.
+ * @param startChildZygote if true, the new child process will itself be a
+ * new zygote process.
* @param instructionSet null-ok the instruction set to use.
* @param appDataDir null-ok the data directory of the app.
*
@@ -106,13 +134,13 @@
*/
public static int forkAndSpecialize(int uid, int gid, int[] gids, int runtimeFlags,
int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose,
- int[] fdsToIgnore, String instructionSet, String appDataDir) {
+ int[] fdsToIgnore, boolean startChildZygote, String instructionSet, String appDataDir) {
VM_HOOKS.preFork();
// Resets nice priority for zygote process.
resetNicePriority();
int pid = nativeForkAndSpecialize(
uid, gid, gids, runtimeFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose,
- fdsToIgnore, instructionSet, appDataDir);
+ fdsToIgnore, startChildZygote, instructionSet, appDataDir);
// Enable tracing as soon as possible for the child process.
if (pid == 0) {
Trace.setTracingEnabled(true, runtimeFlags);
@@ -126,7 +154,7 @@
native private static int nativeForkAndSpecialize(int uid, int gid, int[] gids,int runtimeFlags,
int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose,
- int[] fdsToIgnore, String instructionSet, String appDataDir);
+ int[] fdsToIgnore, boolean startChildZygote, String instructionSet, String appDataDir);
/**
* Called to do any initialization before starting an application.
@@ -186,8 +214,8 @@
native protected static void nativeUnmountStorageOnInit();
private static void callPostForkChildHooks(int runtimeFlags, boolean isSystemServer,
- String instructionSet) {
- VM_HOOKS.postForkChild(runtimeFlags, isSystemServer, instructionSet);
+ boolean isZygote, String instructionSet) {
+ VM_HOOKS.postForkChild(runtimeFlags, isSystemServer, isZygote, instructionSet);
}
/**
diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java
index 6a87b1f..b9f33e7 100644
--- a/core/java/com/android/internal/os/ZygoteConnection.java
+++ b/core/java/com/android/internal/os/ZygoteConnection.java
@@ -47,6 +47,8 @@
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
+import java.util.Arrays;
+
import libcore.io.IoUtils;
/**
@@ -148,6 +150,11 @@
return null;
}
+ if (parsedArgs.pidQuery) {
+ handlePidQuery();
+ return null;
+ }
+
if (parsedArgs.preloadDefault) {
handlePreload();
return null;
@@ -159,6 +166,11 @@
return null;
}
+ if (parsedArgs.apiBlacklistExemptions != null) {
+ handleApiBlacklistExemptions(parsedArgs.apiBlacklistExemptions);
+ return null;
+ }
+
if (parsedArgs.permittedCapabilities != 0 || parsedArgs.effectiveCapabilities != 0) {
throw new ZygoteSecurityException("Client may not specify capabilities: " +
"permitted=0x" + Long.toHexString(parsedArgs.permittedCapabilities) +
@@ -221,8 +233,8 @@
pid = Zygote.forkAndSpecialize(parsedArgs.uid, parsedArgs.gid, parsedArgs.gids,
parsedArgs.runtimeFlags, rlimits, parsedArgs.mountExternal, parsedArgs.seInfo,
- parsedArgs.niceName, fdsToClose, fdsToIgnore, parsedArgs.instructionSet,
- parsedArgs.appDataDir);
+ parsedArgs.niceName, fdsToClose, fdsToIgnore, parsedArgs.startChildZygote,
+ parsedArgs.instructionSet, parsedArgs.appDataDir);
try {
if (pid == 0) {
@@ -233,7 +245,8 @@
IoUtils.closeQuietly(serverPipeFd);
serverPipeFd = null;
- return handleChildProc(parsedArgs, descriptors, childPipeFd);
+ return handleChildProc(parsedArgs, descriptors, childPipeFd,
+ parsedArgs.startChildZygote);
} else {
// In the parent. A pid < 0 indicates a failure and will be handled in
// handleParentProc.
@@ -258,6 +271,17 @@
}
}
+ private void handlePidQuery() {
+ try {
+ String pidString = String.valueOf(Process.myPid());
+ final byte[] pidStringBytes = pidString.getBytes(StandardCharsets.US_ASCII);
+ mSocketOutStream.writeInt(pidStringBytes.length);
+ mSocketOutStream.write(pidStringBytes);
+ } catch (IOException ioe) {
+ throw new IllegalStateException("Error writing to command socket", ioe);
+ }
+ }
+
/**
* Preloads resources if the zygote is in lazily preload mode. Writes the result of the
* preload operation; {@code 0} when a preload was initiated due to this request and {@code 1}
@@ -277,6 +301,15 @@
}
}
+ private void handleApiBlacklistExemptions(String[] exemptions) {
+ try {
+ ZygoteInit.setApiBlacklistExemptions(exemptions);
+ mSocketOutStream.writeInt(0);
+ } catch (IOException ioe) {
+ throw new IllegalStateException("Error writing to command socket", ioe);
+ }
+ }
+
protected void preload() {
ZygoteInit.lazyPreload();
}
@@ -415,6 +448,25 @@
boolean preloadDefault;
/**
+ * Whether this is a request to start a zygote process as a child of this zygote.
+ * Set with --start-child-zygote. The remaining arguments must include the
+ * CHILD_ZYGOTE_SOCKET_NAME_ARG flag to indicate the abstract socket name that
+ * should be used for communication.
+ */
+ boolean startChildZygote;
+
+ /**
+ * Whether the current arguments constitute a request for the zygote's PID.
+ */
+ boolean pidQuery;
+
+ /**
+ * Exemptions from API blacklisting. These are sent to the pre-forked zygote at boot time,
+ * or when they change, via --set-api-blacklist-exemptions.
+ */
+ String[] apiBlacklistExemptions;
+
+ /**
* Constructs instance and parses args
* @param args zygote command-line args
* @throws IllegalArgumentException
@@ -555,6 +607,8 @@
mountExternal = Zygote.MOUNT_EXTERNAL_WRITE;
} else if (arg.equals("--query-abi-list")) {
abiListQuery = true;
+ } else if (arg.equals("--get-pid")) {
+ pidQuery = true;
} else if (arg.startsWith("--instruction-set=")) {
instructionSet = arg.substring(arg.indexOf('=') + 1);
} else if (arg.startsWith("--app-data-dir=")) {
@@ -565,12 +619,19 @@
preloadPackageCacheKey = args[++curArg];
} else if (arg.equals("--preload-default")) {
preloadDefault = true;
+ } else if (arg.equals("--start-child-zygote")) {
+ startChildZygote = true;
+ } else if (arg.equals("--set-api-blacklist-exemptions")) {
+ // consume all remaining args; this is a stand-alone command, never included
+ // with the regular fork command.
+ apiBlacklistExemptions = Arrays.copyOfRange(args, curArg + 1, args.length);
+ curArg = args.length;
} else {
break;
}
}
- if (abiListQuery) {
+ if (abiListQuery || pidQuery) {
if (args.length - curArg > 0) {
throw new IllegalArgumentException("Unexpected arguments after --query-abi-list.");
}
@@ -579,7 +640,7 @@
throw new IllegalArgumentException(
"Unexpected arguments after --preload-package.");
}
- } else if (!preloadDefault) {
+ } else if (!preloadDefault && apiBlacklistExemptions == null) {
if (!seenRuntimeArgs) {
throw new IllegalArgumentException("Unexpected argument : " + args[curArg]);
}
@@ -587,6 +648,20 @@
remainingArgs = new String[args.length - curArg];
System.arraycopy(args, curArg, remainingArgs, 0, remainingArgs.length);
}
+
+ if (startChildZygote) {
+ boolean seenChildSocketArg = false;
+ for (String arg : remainingArgs) {
+ if (arg.startsWith(Zygote.CHILD_ZYGOTE_SOCKET_NAME_ARG)) {
+ seenChildSocketArg = true;
+ break;
+ }
+ }
+ if (!seenChildSocketArg) {
+ throw new IllegalArgumentException("--start-child-zygote specified " +
+ "without " + Zygote.CHILD_ZYGOTE_SOCKET_NAME_ARG);
+ }
+ }
}
}
@@ -739,9 +814,10 @@
* @param parsedArgs non-null; zygote args
* @param descriptors null-ok; new file descriptors for stdio if available.
* @param pipeFd null-ok; pipe for communication back to Zygote.
+ * @param isZygote whether this new child process is itself a new Zygote.
*/
private Runnable handleChildProc(Arguments parsedArgs, FileDescriptor[] descriptors,
- FileDescriptor pipeFd) {
+ FileDescriptor pipeFd, boolean isZygote) {
/**
* By the time we get here, the native code has closed the two actual Zygote
* socket connections, and substituted /dev/null in their place. The LocalSocket
@@ -778,8 +854,13 @@
// Should not get here.
throw new IllegalStateException("WrapperInit.execApplication unexpectedly returned");
} else {
- return ZygoteInit.zygoteInit(parsedArgs.targetSdkVersion, parsedArgs.remainingArgs,
- null /* classLoader */);
+ if (!isZygote) {
+ return ZygoteInit.zygoteInit(parsedArgs.targetSdkVersion, parsedArgs.remainingArgs,
+ null /* classLoader */);
+ } else {
+ return ZygoteInit.childZygoteInit(parsedArgs.targetSdkVersion,
+ parsedArgs.remainingArgs, null /* classLoader */);
+ }
}
}
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 21f1fb6..d1d0628 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -35,6 +35,7 @@
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
+import android.os.UserHandle;
import android.os.ZygoteProcess;
import android.os.storage.StorageManager;
import android.security.keystore.AndroidKeyStoreProvider;
@@ -466,13 +467,7 @@
"dalvik.vm.profilesystemserver", false);
if (profileSystemServer && (Build.IS_USERDEBUG || Build.IS_ENG)) {
try {
- File profileDir = Environment.getDataProfilesDePackageDirectory(
- Process.SYSTEM_UID, "system_server");
- File profile = new File(profileDir, "primary.prof");
- profile.getParentFile().mkdirs();
- profile.createNewFile();
- String[] codePaths = systemServerClasspath.split(":");
- VMRuntime.registerAppInfo(profile.getPath(), codePaths);
+ prepareSystemServerProfile(systemServerClasspath);
} catch (Exception e) {
Log.wtf(TAG, "Failed to set up system server profile", e);
}
@@ -515,6 +510,41 @@
}
/**
+ * 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.
+ */
+ private static void prepareSystemServerProfile(String systemServerClasspath)
+ throws RemoteException {
+ if (systemServerClasspath.isEmpty()) {
+ return;
+ }
+ String[] codePaths = systemServerClasspath.split(":");
+
+ final IInstalld installd = IInstalld.Stub
+ .asInterface(ServiceManager.getService("installd"));
+
+ String systemServerPackageName = "android";
+ String systemServerProfileName = "primary.prof";
+ installd.prepareAppProfile(
+ systemServerPackageName,
+ UserHandle.USER_SYSTEM,
+ UserHandle.getAppId(Process.SYSTEM_UID),
+ systemServerProfileName,
+ codePaths[0],
+ /*dexMetadata*/ null);
+
+ File profileDir = Environment.getDataProfilesDePackageDirectory(
+ UserHandle.USER_SYSTEM, systemServerPackageName);
+ String profilePath = new File(profileDir, systemServerProfileName).getAbsolutePath();
+ VMRuntime.registerAppInfo(profilePath, codePaths);
+ }
+
+ public static void setApiBlacklistExemptions(String[] exemptions) {
+ VMRuntime.getRuntime().setHiddenApiExemptions(exemptions);
+ }
+
+ /**
* Creates a PathClassLoader for the given class path that is associated with a shared
* namespace, i.e., this classloader can access platform-private native libraries. The
* classloader will use java.library.path as the native library path.
@@ -576,7 +606,8 @@
installd.dexopt(classPathElement, Process.SYSTEM_UID, packageName,
instructionSet, dexoptNeeded, outputPath, dexFlags, compilerFilter,
uuid, classLoaderContext, seInfo, false /* downgrade */,
- targetSdkVersion);
+ targetSdkVersion, /*profileName*/ null, /*dexMetadataPath*/ null,
+ "server-dexopt");
} 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: "
@@ -666,6 +697,12 @@
ZygoteConnection.applyDebuggerSystemProperty(parsedArgs);
ZygoteConnection.applyInvokeWithSystemProperty(parsedArgs);
+ boolean profileSystemServer = SystemProperties.getBoolean(
+ "dalvik.vm.profilesystemserver", false);
+ if (profileSystemServer) {
+ parsedArgs.runtimeFlags |= Zygote.PROFILE_SYSTEM_SERVER;
+ }
+
/* Request to fork the system server process */
pid = Zygote.forkSystemServer(
parsedArgs.uid, parsedArgs.gid,
@@ -755,7 +792,7 @@
throw new RuntimeException("No ABI list supplied.");
}
- zygoteServer.registerServerSocket(socketName);
+ zygoteServer.registerServerSocketFromEnv(socketName);
// In some configurations, we avoid preloading resources and classes eagerly.
// In such cases, we will preload things prior to our first fork.
if (!enableLazyPreload) {
@@ -870,5 +907,16 @@
return RuntimeInit.applicationInit(targetSdkVersion, argv, classLoader);
}
+ /**
+ * The main function called when starting a child zygote process. This is used as an
+ * alternative to zygoteInit(), which skips calling into initialization routines that
+ * start the Binder threadpool.
+ */
+ static final Runnable childZygoteInit(
+ int targetSdkVersion, String[] argv, ClassLoader classLoader) {
+ RuntimeInit.Arguments args = new RuntimeInit.Arguments(argv);
+ return RuntimeInit.findStaticMain(args.startClass, args.startArgs, classLoader);
+ }
+
private static final native void nativeZygoteInit();
}
diff --git a/core/java/com/android/internal/os/ZygoteServer.java b/core/java/com/android/internal/os/ZygoteServer.java
index 8baa15a..fecf9b9 100644
--- a/core/java/com/android/internal/os/ZygoteServer.java
+++ b/core/java/com/android/internal/os/ZygoteServer.java
@@ -44,9 +44,21 @@
private static final String ANDROID_SOCKET_PREFIX = "ANDROID_SOCKET_";
+ /**
+ * Listening socket that accepts new server connections.
+ */
private LocalServerSocket mServerSocket;
/**
+ * Whether or not mServerSocket's underlying FD should be closed directly.
+ * If mServerSocket is created with an existing FD, closing the socket does
+ * not close the FD and it must be closed explicitly. If the socket is created
+ * with a name instead, then closing the socket will close the underlying FD
+ * and it should not be double-closed.
+ */
+ private boolean mCloseSocketFd;
+
+ /**
* Set by the child process, immediately after a call to {@code Zygote.forkAndSpecialize}.
*/
private boolean mIsForkChild;
@@ -59,11 +71,12 @@
}
/**
- * Registers a server socket for zygote command connections
+ * Registers a server socket for zygote command connections. This locates the server socket
+ * file descriptor through an ANDROID_SOCKET_ environment variable.
*
* @throws RuntimeException when open fails
*/
- void registerServerSocket(String socketName) {
+ void registerServerSocketFromEnv(String socketName) {
if (mServerSocket == null) {
int fileDesc;
final String fullSocketName = ANDROID_SOCKET_PREFIX + socketName;
@@ -78,6 +91,7 @@
FileDescriptor fd = new FileDescriptor();
fd.setInt$(fileDesc);
mServerSocket = new LocalServerSocket(fd);
+ mCloseSocketFd = true;
} catch (IOException ex) {
throw new RuntimeException(
"Error binding to local socket '" + fileDesc + "'", ex);
@@ -86,6 +100,22 @@
}
/**
+ * Registers a server socket for zygote command connections. This opens the server socket
+ * at the specified name in the abstract socket namespace.
+ */
+ void registerServerSocketAtAbstractName(String socketName) {
+ if (mServerSocket == null) {
+ try {
+ mServerSocket = new LocalServerSocket(socketName);
+ mCloseSocketFd = false;
+ } catch (IOException ex) {
+ throw new RuntimeException(
+ "Error binding to abstract socket '" + socketName + "'", ex);
+ }
+ }
+ }
+
+ /**
* Waits for and accepts a single command connection. Throws
* RuntimeException on failure.
*/
@@ -112,7 +142,7 @@
if (mServerSocket != null) {
FileDescriptor fd = mServerSocket.getFileDescriptor();
mServerSocket.close();
- if (fd != null) {
+ if (fd != null && mCloseSocketFd) {
Os.close(fd);
}
}
@@ -219,6 +249,11 @@
Log.e(TAG, "Caught post-fork exception in child process.", e);
throw e;
}
+ } finally {
+ // Reset the child flag, in the event that the child process is a child-
+ // zygote. The flag will not be consulted this loop pass after the Runnable
+ // is returned.
+ mIsForkChild = false;
}
}
}
diff --git a/core/java/com/android/internal/util/HexDump.java b/core/java/com/android/internal/util/HexDump.java
index 7be95d8..af00400 100644
--- a/core/java/com/android/internal/util/HexDump.java
+++ b/core/java/com/android/internal/util/HexDump.java
@@ -16,18 +16,21 @@
package com.android.internal.util;
+import android.annotation.Nullable;
+
public class HexDump
{
private final static char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
private final static char[] HEX_LOWER_CASE_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
- public static String dumpHexString(byte[] array)
- {
+ public static String dumpHexString(@Nullable byte[] array) {
+ if (array == null) return "(null)";
return dumpHexString(array, 0, array.length);
}
- public static String dumpHexString(byte[] array, int offset, int length)
+ public static String dumpHexString(@Nullable byte[] array, int offset, int length)
{
+ if (array == null) return "(null)";
StringBuilder result = new StringBuilder();
byte[] line = new byte[16];
diff --git a/core/java/com/android/internal/view/menu/MenuPopupHelper.java b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
index 6af41a5..324f923 100644
--- a/core/java/com/android/internal/view/menu/MenuPopupHelper.java
+++ b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
@@ -256,7 +256,7 @@
final int hgrav = Gravity.getAbsoluteGravity(mDropDownGravity,
mAnchorView.getLayoutDirection()) & Gravity.HORIZONTAL_GRAVITY_MASK;
if (hgrav == Gravity.RIGHT) {
- xOffset += mAnchorView.getWidth();
+ xOffset -= mAnchorView.getWidth();
}
popup.setHorizontalOffset(xOffset);
diff --git a/core/java/com/android/internal/view/menu/StandardMenuPopup.java b/core/java/com/android/internal/view/menu/StandardMenuPopup.java
index d9ca5be..445379b 100644
--- a/core/java/com/android/internal/view/menu/StandardMenuPopup.java
+++ b/core/java/com/android/internal/view/menu/StandardMenuPopup.java
@@ -263,7 +263,6 @@
mShownAnchorView, mOverflowOnly, mPopupStyleAttr, mPopupStyleRes);
subPopup.setPresenterCallback(mPresenterCallback);
subPopup.setForceShowIcon(MenuPopup.shouldPreserveIconSpacing(subMenu));
- subPopup.setGravity(mDropDownGravity);
// Pass responsibility for handling onDismiss to the submenu.
subPopup.setOnDismissListener(mOnDismissListener);
@@ -273,8 +272,17 @@
mMenu.close(false /* closeAllMenus */);
// Show the new sub-menu popup at the same location as this popup.
- final int horizontalOffset = mPopup.getHorizontalOffset();
+ int horizontalOffset = mPopup.getHorizontalOffset();
final int verticalOffset = mPopup.getVerticalOffset();
+
+ // As xOffset of parent menu popup is subtracted with Anchor width for Gravity.RIGHT,
+ // So, again to display sub-menu popup in same xOffset, add the Anchor width.
+ final int hgrav = Gravity.getAbsoluteGravity(mDropDownGravity,
+ mAnchorView.getLayoutDirection()) & Gravity.HORIZONTAL_GRAVITY_MASK;
+ if (hgrav == Gravity.RIGHT) {
+ horizontalOffset += mAnchorView.getWidth();
+ }
+
if (subPopup.tryShow(horizontalOffset, verticalOffset)) {
if (mPresenterCallback != null) {
mPresenterCallback.onOpenSubMenu(subMenu);
diff --git a/core/java/com/android/server/BootReceiver.java b/core/java/com/android/server/BootReceiver.java
index 8848e393..87fde41 100644
--- a/core/java/com/android/server/BootReceiver.java
+++ b/core/java/com/android/server/BootReceiver.java
@@ -161,7 +161,7 @@
.append("Revision: ")
.append(SystemProperties.get("ro.revision", "")).append("\n")
.append("Bootloader: ").append(Build.BOOTLOADER).append("\n")
- .append("Radio: ").append(Build.RADIO).append("\n")
+ .append("Radio: ").append(Build.getRadioVersion()).append("\n")
.append("Kernel: ")
.append(FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n"))
.append("\n").toString();
diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java
index 7778892..bdb5f99 100644
--- a/core/java/com/android/server/SystemConfig.java
+++ b/core/java/com/android/server/SystemConfig.java
@@ -60,6 +60,7 @@
private static final int ALLOW_PERMISSIONS = 0x04;
private static final int ALLOW_APP_CONFIGS = 0x08;
private static final int ALLOW_PRIVAPP_PERMISSIONS = 0x10;
+ private static final int ALLOW_HIDDENAPI_WHITELISTING = 0x20;
private static final int ALLOW_ALL = ~0;
// Group-ids that are given to all packages as read from etc/permissions/*.xml.
@@ -134,6 +135,9 @@
// These are the permitted backup transport service components
final ArraySet<ComponentName> mBackupTransportWhitelist = new ArraySet<>();
+ // Package names that are exempted from private API blacklisting
+ final ArraySet<String> mHiddenApiPackageWhitelist = new ArraySet<>();
+
// These are the packages of carrier-associated apps which should be disabled until used until
// a SIM is inserted which grants carrier privileges to that carrier app.
final ArrayMap<String, List<String>> mDisabledUntilUsedPreinstalledCarrierAssociatedApps =
@@ -204,6 +208,10 @@
return mSystemUserBlacklistedApps;
}
+ public ArraySet<String> getHiddenApiWhitelistedApps() {
+ return mHiddenApiPackageWhitelist;
+ }
+
public ArraySet<ComponentName> getDefaultVrComponents() {
return mDefaultVrComponents;
}
@@ -327,6 +335,7 @@
boolean allowPermissions = (permissionFlag & ALLOW_PERMISSIONS) != 0;
boolean allowAppConfigs = (permissionFlag & ALLOW_APP_CONFIGS) != 0;
boolean allowPrivappPermissions = (permissionFlag & ALLOW_PRIVAPP_PERMISSIONS) != 0;
+ boolean allowApiWhitelisting = (permissionFlag & ALLOW_HIDDENAPI_WHITELISTING) != 0;
while (true) {
XmlUtils.nextElement(parser);
if (parser.getEventType() == XmlPullParser.END_DOCUMENT) {
@@ -569,6 +578,15 @@
XmlUtils.skipCurrentTag(parser);
} else if ("privapp-permissions".equals(name) && allowPrivappPermissions) {
readPrivAppPermissions(parser);
+ } else if ("hidden-api-whitelisted-app".equals(name) && allowApiWhitelisting) {
+ String pkgname = parser.getAttributeValue(null, "package");
+ if (pkgname == null) {
+ Slog.w(TAG, "<hidden-api-whitelisted-app> without package in " + permFile
+ + " at " + parser.getPositionDescription());
+ } else {
+ mHiddenApiPackageWhitelist.add(pkgname);
+ }
+ XmlUtils.skipCurrentTag(parser);
} else {
XmlUtils.skipCurrentTag(parser);
continue;
diff --git a/core/java/com/android/server/net/BaseNetdEventCallback.java b/core/java/com/android/server/net/BaseNetdEventCallback.java
new file mode 100644
index 0000000..fdba2f3
--- /dev/null
+++ b/core/java/com/android/server/net/BaseNetdEventCallback.java
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+package com.android.server.net;
+
+import android.net.INetdEventCallback;
+
+/**
+ * Base {@link INetdEventCallback} that provides no-op
+ * implementations which can be overridden.
+ *
+ * @hide
+ */
+public class BaseNetdEventCallback extends INetdEventCallback.Stub {
+ @Override
+ public void onDnsEvent(String hostname, String[] ipAddresses,
+ int ipAddressesCount, long timestamp, int uid) {
+ // default no-op
+ }
+
+ @Override
+ public void onPrivateDnsValidationEvent(int netId, String ipAddress,
+ String hostname, boolean validated) {
+ // default no-op
+ }
+
+ @Override
+ public void onConnectEvent(String ipAddr, int port, long timestamp, int uid) {
+ // default no-op
+ }
+}
diff --git a/core/java/com/android/server/net/OWNERS b/core/java/com/android/server/net/OWNERS
index 6f77e04..ce50558 100644
--- a/core/java/com/android/server/net/OWNERS
+++ b/core/java/com/android/server/net/OWNERS
@@ -1,7 +1,6 @@
set noparent
ek@google.com
-hugobenichi@google.com
jchalard@google.com
lorenzo@google.com
satk@google.com
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index bc98716..b3fb43d 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -215,6 +215,8 @@
],
shared_libs: [
+ "libbpf",
+ "libnetdutils",
"libmemtrack",
"libandroidfw",
"libappfuse",
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 35ab56a..a7e0fec 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -20,6 +20,7 @@
#include <android_runtime/AndroidRuntime.h>
+#include <android-base/macros.h>
#include <android-base/properties.h>
#include <binder/IBinder.h>
#include <binder/IPCThreadState.h>
@@ -590,7 +591,6 @@
{
JavaVMInitArgs initArgs;
char propBuf[PROPERTY_VALUE_MAX];
- char stackTraceFileBuf[sizeof("-Xstacktracefile:")-1 + PROPERTY_VALUE_MAX];
char jniOptsBuf[sizeof("-Xjniopts:")-1 + PROPERTY_VALUE_MAX];
char heapstartsizeOptsBuf[sizeof("-Xms")-1 + PROPERTY_VALUE_MAX];
char heapsizeOptsBuf[sizeof("-Xmx")-1 + PROPERTY_VALUE_MAX];
@@ -598,6 +598,7 @@
char heapminfreeOptsBuf[sizeof("-XX:HeapMinFree=")-1 + PROPERTY_VALUE_MAX];
char heapmaxfreeOptsBuf[sizeof("-XX:HeapMaxFree=")-1 + PROPERTY_VALUE_MAX];
char usejitOptsBuf[sizeof("-Xusejit:")-1 + PROPERTY_VALUE_MAX];
+ char jitpthreadpriorityOptsBuf[sizeof("-Xjitpthreadpriority:")-1 + PROPERTY_VALUE_MAX];
char jitmaxsizeOptsBuf[sizeof("-Xjitmaxsize:")-1 + PROPERTY_VALUE_MAX];
char jitinitialsizeOptsBuf[sizeof("-Xjitinitialsize:")-1 + PROPERTY_VALUE_MAX];
char jitthresholdOptsBuf[sizeof("-Xjitthreshold:")-1 + PROPERTY_VALUE_MAX];
@@ -672,16 +673,6 @@
executionMode = kEMJitCompiler;
}
- // If dalvik.vm.stack-trace-dir is set, it enables the "new" stack trace
- // dump scheme and a new file is created for each stack dump. If it isn't set,
- // the old scheme is enabled.
- property_get("dalvik.vm.stack-trace-dir", propBuf, "");
- if (strlen(propBuf) > 0) {
- addOption("-Xusetombstonedtraces");
- } else {
- parseRuntimeOption("dalvik.vm.stack-trace-file", stackTraceFileBuf, "-Xstacktracefile:");
- }
-
strcpy(jniOptsBuf, "-Xjniopts:");
if (parseRuntimeOption("dalvik.vm.jniopts", jniOptsBuf, "-Xjniopts:")) {
ALOGI("JNI options: '%s'\n", jniOptsBuf);
@@ -727,6 +718,9 @@
parseRuntimeOption("dalvik.vm.jitmaxsize", jitmaxsizeOptsBuf, "-Xjitmaxsize:");
parseRuntimeOption("dalvik.vm.jitinitialsize", jitinitialsizeOptsBuf, "-Xjitinitialsize:");
parseRuntimeOption("dalvik.vm.jitthreshold", jitthresholdOptsBuf, "-Xjitthreshold:");
+ parseRuntimeOption("dalvik.vm.jitpthreadpriority",
+ jitpthreadpriorityOptsBuf,
+ "-Xjitpthreadpriority:");
property_get("dalvik.vm.usejitprofiles", useJitProfilesOptsBuf, "");
if (strcmp(useJitProfilesOptsBuf, "true") == 0) {
addOption("-Xjitsaveprofilinginfo");
@@ -740,6 +734,12 @@
jittransitionweightOptBuf,
"-Xjittransitionweight:");
+ property_get("dalvik.vm.profilebootimage", propBuf, "");
+ if (strcmp(propBuf, "true") == 0) {
+ addOption("-Xps-profile-boot-class-path");
+ addOption("-Xps-profile-aot-code");
+ }
+
/*
* Madvise related options.
*/
@@ -761,18 +761,17 @@
/*
* Enable debugging only for apps forked from zygote.
- * Set suspend=y to pause during VM init and use android ADB transport.
*/
if (zygote) {
+ // Set the JDWP provider and required arguments. By default let the runtime choose how JDWP is
+ // implemented. When this is not set the runtime defaults to not allowing JDWP.
addOption("-XjdwpOptions:suspend=n,server=y");
+ parseRuntimeOption("dalvik.vm.jdwp-provider",
+ jdwpProviderBuf,
+ "-XjdwpProvider:",
+ "default");
}
- // Set the JDWP provider. By default let the runtime choose.
- parseRuntimeOption("dalvik.vm.jdwp-provider",
- jdwpProviderBuf,
- "-XjdwpProvider:",
- "default");
-
parseRuntimeOption("dalvik.vm.lockprof.threshold",
lockProfThresholdBuf,
"-Xlockprofthreshold:");
@@ -819,12 +818,6 @@
addOption("-Ximage-compiler-option");
addOption("--image-classes=/system/etc/preloaded-classes");
- // If there is a compiled-classes file, push it.
- if (hasFile("/system/etc/compiled-classes")) {
- addOption("-Ximage-compiler-option");
- addOption("--compiled-classes=/system/etc/compiled-classes");
- }
-
// If there is a dirty-image-objects file, push it.
if (hasFile("/system/etc/dirty-image-objects")) {
addOption("-Ximage-compiler-option");
@@ -861,34 +854,18 @@
// The runtime will compile a boot image, when necessary, not using installd. Thus, we need to
// pass the instruction-set-features/variant as an image-compiler-option.
- // TODO: Find a better way for the instruction-set.
-#if defined(__arm__)
- constexpr const char* instruction_set = "arm";
-#elif defined(__aarch64__)
- constexpr const char* instruction_set = "arm64";
-#elif defined(__mips__) && !defined(__LP64__)
- constexpr const char* instruction_set = "mips";
-#elif defined(__mips__) && defined(__LP64__)
- constexpr const char* instruction_set = "mips64";
-#elif defined(__i386__)
- constexpr const char* instruction_set = "x86";
-#elif defined(__x86_64__)
- constexpr const char* instruction_set = "x86_64";
-#else
- constexpr const char* instruction_set = "unknown";
-#endif
// Note: it is OK to reuse the buffer, as the values are exactly the same between
// * compiler-option, used for runtime compilation (DexClassLoader)
// * image-compiler-option, used for boot-image compilation on device
// Copy the variant.
- sprintf(dex2oat_isa_variant_key, "dalvik.vm.isa.%s.variant", instruction_set);
+ sprintf(dex2oat_isa_variant_key, "dalvik.vm.isa.%s.variant", ABI_STRING);
parseCompilerOption(dex2oat_isa_variant_key, dex2oat_isa_variant,
"--instruction-set-variant=", "-Ximage-compiler-option");
parseCompilerOption(dex2oat_isa_variant_key, dex2oat_isa_variant,
"--instruction-set-variant=", "-Xcompiler-option");
// Copy the features.
- sprintf(dex2oat_isa_features_key, "dalvik.vm.isa.%s.features", instruction_set);
+ sprintf(dex2oat_isa_features_key, "dalvik.vm.isa.%s.features", ABI_STRING);
parseCompilerOption(dex2oat_isa_features_key, dex2oat_isa_features,
"--instruction-set-features=", "-Ximage-compiler-option");
parseCompilerOption(dex2oat_isa_features_key, dex2oat_isa_features,
@@ -930,10 +907,13 @@
}
// Native bridge library. "0" means that native bridge is disabled.
+ //
+ // Note: bridging is only enabled for the zygote. Other runs of
+ // app_process may not have the permissions to mount etc.
property_get("ro.dalvik.vm.native.bridge", propBuf, "");
if (propBuf[0] == '\0') {
ALOGW("ro.dalvik.vm.native.bridge is not expected to be empty");
- } else if (strcmp(propBuf, "0") != 0) {
+ } else if (zygote && strcmp(propBuf, "0") != 0) {
snprintf(nativeBridgeLibrary, sizeof("-XX:NativeBridge=") + PROPERTY_VALUE_MAX,
"-XX:NativeBridge=%s", propBuf);
addOption(nativeBridgeLibrary);
@@ -969,6 +949,12 @@
addOption("--generate-debug-info");
}
+ // The mini-debug-info makes it possible to backtrace through JIT code.
+ if (property_get_bool("dalvik.vm.minidebuginfo", 0)) {
+ addOption("-Xcompiler-option");
+ addOption("--generate-mini-debug-info");
+ }
+
/*
* Retrieve the build fingerprint and provide it to the runtime. That way, ANR dumps will
* contain the fingerprint and can be parsed.
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index d3da21b..b35d92f 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -902,146 +902,6 @@
jint android_os_Debug_getProxyObjectCount(JNIEnv* env, jobject clazz);
jint android_os_Debug_getDeathObjectCount(JNIEnv* env, jobject clazz);
-
-/* pulled out of bionic */
-extern "C" void get_malloc_leak_info(uint8_t** info, size_t* overallSize,
- size_t* infoSize, size_t* totalMemory, size_t* backtraceSize);
-extern "C" void free_malloc_leak_info(uint8_t* info);
-#define SIZE_FLAG_ZYGOTE_CHILD (1<<31)
-
-static size_t gNumBacktraceElements;
-
-/*
- * This is a qsort() callback.
- *
- * See dumpNativeHeap() for comments about the data format and sort order.
- */
-static int compareHeapRecords(const void* vrec1, const void* vrec2)
-{
- const size_t* rec1 = (const size_t*) vrec1;
- const size_t* rec2 = (const size_t*) vrec2;
- size_t size1 = *rec1;
- size_t size2 = *rec2;
-
- if (size1 < size2) {
- return 1;
- } else if (size1 > size2) {
- return -1;
- }
-
- uintptr_t* bt1 = (uintptr_t*)(rec1 + 2);
- uintptr_t* bt2 = (uintptr_t*)(rec2 + 2);
- for (size_t idx = 0; idx < gNumBacktraceElements; idx++) {
- uintptr_t addr1 = bt1[idx];
- uintptr_t addr2 = bt2[idx];
- if (addr1 == addr2) {
- if (addr1 == 0)
- break;
- continue;
- }
- if (addr1 < addr2) {
- return -1;
- } else if (addr1 > addr2) {
- return 1;
- }
- }
-
- return 0;
-}
-
-/*
- * The get_malloc_leak_info() call returns an array of structs that
- * look like this:
- *
- * size_t size
- * size_t allocations
- * intptr_t backtrace[32]
- *
- * "size" is the size of the allocation, "backtrace" is a fixed-size
- * array of function pointers, and "allocations" is the number of
- * allocations with the exact same size and backtrace.
- *
- * The entries are sorted by descending total size (i.e. size*allocations)
- * then allocation count. For best results with "diff" we'd like to sort
- * primarily by individual size then stack trace. Since the entries are
- * fixed-size, and we're allowed (by the current implementation) to mangle
- * them, we can do this in place.
- */
-static void dumpNativeHeap(FILE* fp)
-{
- uint8_t* info = NULL;
- size_t overallSize, infoSize, totalMemory, backtraceSize;
-
- get_malloc_leak_info(&info, &overallSize, &infoSize, &totalMemory,
- &backtraceSize);
- if (info == NULL) {
- fprintf(fp, "Native heap dump not available. To enable, run these"
- " commands (requires root):\n");
- fprintf(fp, "# adb shell stop\n");
- fprintf(fp, "# adb shell setprop libc.debug.malloc.options "
- "backtrace\n");
- fprintf(fp, "# adb shell start\n");
- return;
- }
- assert(infoSize != 0);
- assert(overallSize % infoSize == 0);
-
- fprintf(fp, "Android Native Heap Dump v1.0\n\n");
-
- size_t recordCount = overallSize / infoSize;
- fprintf(fp, "Total memory: %zu\n", totalMemory);
- fprintf(fp, "Allocation records: %zd\n", recordCount);
- fprintf(fp, "Backtrace size: %zd\n", backtraceSize);
- fprintf(fp, "\n");
-
- /* re-sort the entries */
- gNumBacktraceElements = backtraceSize;
- qsort(info, recordCount, infoSize, compareHeapRecords);
-
- /* dump the entries to the file */
- const uint8_t* ptr = info;
- for (size_t idx = 0; idx < recordCount; idx++) {
- size_t size = *(size_t*) ptr;
- size_t allocations = *(size_t*) (ptr + sizeof(size_t));
- uintptr_t* backtrace = (uintptr_t*) (ptr + sizeof(size_t) * 2);
-
- fprintf(fp, "z %d sz %8zu num %4zu bt",
- (size & SIZE_FLAG_ZYGOTE_CHILD) != 0,
- size & ~SIZE_FLAG_ZYGOTE_CHILD,
- allocations);
- for (size_t bt = 0; bt < backtraceSize; bt++) {
- if (backtrace[bt] == 0) {
- break;
- } else {
-#ifdef __LP64__
- fprintf(fp, " %016" PRIxPTR, backtrace[bt]);
-#else
- fprintf(fp, " %08" PRIxPTR, backtrace[bt]);
-#endif
- }
- }
- fprintf(fp, "\n");
-
- ptr += infoSize;
- }
-
- free_malloc_leak_info(info);
-
- fprintf(fp, "MAPS\n");
- const char* maps = "/proc/self/maps";
- UniqueFile in = MakeUniqueFile(maps, "re");
- if (in == nullptr) {
- fprintf(fp, "Could not open %s\n", maps);
- return;
- }
- char buf[BUFSIZ];
- while (size_t n = fread(buf, sizeof(char), BUFSIZ, in.get())) {
- fwrite(buf, sizeof(char), n, fp);
- }
-
- fprintf(fp, "END\n");
-}
-
static bool openFile(JNIEnv* env, jobject fileDescriptor, UniqueFile& fp)
{
if (fileDescriptor == NULL) {
@@ -1072,6 +932,9 @@
return true;
}
+/* pulled out of bionic */
+extern "C" void write_malloc_leak_info(FILE* fp);
+
/*
* Dump the native heap, writing human-readable output to the specified
* file descriptor.
@@ -1085,7 +948,9 @@
}
ALOGD("Native heap dump starting...\n");
- dumpNativeHeap(fp.get());
+ // Formatting of the native heap dump is handled by malloc debug itself.
+ // See https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md#backtrace-heap-dump-format
+ write_malloc_leak_info(fp.get());
ALOGD("Native heap dump complete.\n");
}
diff --git a/core/jni/android_os_Parcel.cpp b/core/jni/android_os_Parcel.cpp
index f0ac79a..a5a3986 100644
--- a/core/jni/android_os_Parcel.cpp
+++ b/core/jni/android_os_Parcel.cpp
@@ -28,9 +28,9 @@
#include <sys/types.h>
#include <unistd.h>
-#include <utils/Atomic.h>
#include <binder/IInterface.h>
#include <binder/IPCThreadState.h>
+#include <cutils/atomic.h>
#include <utils/Log.h>
#include <utils/SystemClock.h>
#include <utils/List.h>
diff --git a/core/jni/android_os_SystemProperties.cpp b/core/jni/android_os_SystemProperties.cpp
index a94cac0..9ec7517 100644
--- a/core/jni/android_os_SystemProperties.cpp
+++ b/core/jni/android_os_SystemProperties.cpp
@@ -124,6 +124,12 @@
if (sVM->GetEnv((void **)&env, JNI_VERSION_1_4) >= 0) {
//ALOGI("Java SystemProperties: calling %p", sCallChangeCallbacks);
env->CallStaticVoidMethod(sClazz, sCallChangeCallbacks);
+ // There should not be any exceptions. But we must guarantee
+ // there are none on return.
+ if (env->ExceptionCheck()) {
+ env->ExceptionClear();
+ LOG(ERROR) << "Exception pending after sysprop_change!";
+ }
}
}
}
diff --git a/core/jni/android_os_VintfObject.cpp b/core/jni/android_os_VintfObject.cpp
index 1659168..e8ef349 100644
--- a/core/jni/android_os_VintfObject.cpp
+++ b/core/jni/android_os_VintfObject.cpp
@@ -32,10 +32,13 @@
static jclass gHashMapClazz;
static jmethodID gHashMapInit;
static jmethodID gHashMapPut;
+static jclass gLongClazz;
+static jmethodID gLongValueOf;
namespace android {
using vintf::HalManifest;
+using vintf::Level;
using vintf::SchemaType;
using vintf::VintfObject;
using vintf::XmlConverter;
@@ -154,6 +157,14 @@
return jMap;
}
+static jobject android_os_VintfObject_getTargetFrameworkCompatibilityMatrixVersion(JNIEnv* env, jclass) {
+ std::shared_ptr<const HalManifest> manifest = VintfObject::GetDeviceHalManifest();
+ if (manifest == nullptr || manifest->level() == Level::UNSPECIFIED) {
+ return nullptr;
+ }
+ return env->CallStaticObjectMethod(gLongClazz, gLongValueOf, static_cast<jlong>(manifest->level()));
+}
+
// ----------------------------------------------------------------------------
static const JNINativeMethod gVintfObjectMethods[] = {
@@ -163,6 +174,7 @@
{"getHalNamesAndVersions", "()[Ljava/lang/String;", (void*)android_os_VintfObject_getHalNamesAndVersions},
{"getSepolicyVersion", "()Ljava/lang/String;", (void*)android_os_VintfObject_getSepolicyVersion},
{"getVndkSnapshots", "()Ljava/util/Map;", (void*)android_os_VintfObject_getVndkSnapshots},
+ {"getTargetFrameworkCompatibilityMatrixVersion", "()Ljava/lang/Long;", (void*)android_os_VintfObject_getTargetFrameworkCompatibilityMatrixVersion},
};
const char* const kVintfObjectPathName = "android/os/VintfObject";
@@ -175,6 +187,8 @@
gHashMapInit = GetMethodIDOrDie(env, gHashMapClazz, "<init>", "()V");
gHashMapPut = GetMethodIDOrDie(env, gHashMapClazz,
"put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
+ gLongClazz = MakeGlobalRefOrDie(env, FindClassOrDie(env, "java/lang/Long"));
+ gLongValueOf = GetStaticMethodIDOrDie(env, gLongClazz, "valueOf", "(J)Ljava/lang/Long;");
return RegisterMethodsOrDie(env, kVintfObjectPathName, gVintfObjectMethods,
NELEM(gVintfObjectMethods));
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index 560c384..a040940 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -34,8 +34,8 @@
#include <binder/IPCThreadState.h>
#include <binder/Parcel.h>
#include <binder/ProcessState.h>
+#include <cutils/atomic.h>
#include <log/log.h>
-#include <utils/Atomic.h>
#include <utils/KeyedVector.h>
#include <utils/List.h>
#include <utils/Log.h>
@@ -664,7 +664,7 @@
nativeData->mObject = val;
gNativeDataCache = nullptr;
++gNumProxies;
- if (++gNumProxies >= gProxiesWarned + PROXY_WARN_INTERVAL) {
+ if (gNumProxies >= gProxiesWarned + PROXY_WARN_INTERVAL) {
ALOGW("Unexpectedly many live BinderProxies: %d\n", gNumProxies);
gProxiesWarned = gNumProxies;
}
diff --git a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
index d254de6..c15b7ee 100644
--- a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
+++ b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
@@ -30,7 +30,14 @@
#include <utils/Log.h>
#include <utils/misc.h>
-#include <utils/Vector.h>
+
+#include "android-base/unique_fd.h"
+#include "bpf/BpfNetworkStats.h"
+#include "bpf/BpfUtils.h"
+
+using android::bpf::hasBpfSupport;
+using android::bpf::parseBpfNetworkStatsDetail;
+using android::bpf::stats_line;
namespace android {
@@ -53,17 +60,6 @@
jfieldID operations;
} gNetworkStatsClassInfo;
-struct stats_line {
- char iface[32];
- int32_t uid;
- int32_t set;
- int32_t tag;
- int64_t rxBytes;
- int64_t rxPackets;
- int64_t txBytes;
- int64_t txPackets;
-};
-
static jobjectArray get_string_array(JNIEnv* env, jobject obj, jfieldID field, int size, bool grow)
{
if (!grow) {
@@ -97,33 +93,14 @@
return env->NewLongArray(size);
}
-static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats,
- jstring path, jint limitUid, jobjectArray limitIfacesObj, jint limitTag) {
- ScopedUtfChars path8(env, path);
- if (path8.c_str() == NULL) {
- return -1;
- }
-
- FILE *fp = fopen(path8.c_str(), "r");
+static int legacyReadNetworkStatsDetail(std::vector<stats_line>* lines,
+ const std::vector<std::string>& limitIfaces,
+ int limitTag, int limitUid, const char* path) {
+ FILE* fp = fopen(path, "r");
if (fp == NULL) {
return -1;
}
- Vector<String8> limitIfaces;
- if (limitIfacesObj != NULL && env->GetArrayLength(limitIfacesObj) > 0) {
- int num = env->GetArrayLength(limitIfacesObj);
- limitIfaces.setCapacity(num);
- for (int i=0; i<num; i++) {
- jstring string = (jstring)env->GetObjectArrayElement(limitIfacesObj, i);
- ScopedUtfChars string8(env, string);
- if (string8.c_str() != NULL) {
- limitIfaces.add(String8(string8.c_str()));
- }
- }
- }
-
- Vector<stats_line> lines;
-
int lastIdx = 1;
int idx;
char buffer[384];
@@ -215,7 +192,7 @@
//ALOGI("skipping due to uid: %s", buffer);
continue;
}
- lines.push_back(s);
+ lines->push_back(s);
} else {
//ALOGI("skipping due to bad remaining fields: %s", pos);
}
@@ -225,8 +202,13 @@
ALOGE("Failed to close netstats file");
return -1;
}
+ return 0;
+}
+static int statsLinesToNetworkStats(JNIEnv* env, jclass clazz, jobject stats,
+ std::vector<stats_line>& lines) {
int size = lines.size();
+
bool grow = size > env->GetIntField(stats, gNetworkStatsClassInfo.capacity);
ScopedLocalRef<jobjectArray> iface(env, get_string_array(env, stats,
@@ -297,14 +279,58 @@
env->SetObjectField(stats, gNetworkStatsClassInfo.txPackets, txPackets.getJavaArray());
env->SetObjectField(stats, gNetworkStatsClassInfo.operations, operations.getJavaArray());
}
-
return 0;
}
+static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats, jstring path,
+ jint limitUid, jobjectArray limitIfacesObj, jint limitTag,
+ jboolean useBpfStats) {
+ ScopedUtfChars path8(env, path);
+ if (path8.c_str() == NULL) {
+ return -1;
+ }
+
+ std::vector<std::string> limitIfaces;
+ if (limitIfacesObj != NULL && env->GetArrayLength(limitIfacesObj) > 0) {
+ int num = env->GetArrayLength(limitIfacesObj);
+ for (int i = 0; i < num; i++) {
+ jstring string = (jstring)env->GetObjectArrayElement(limitIfacesObj, i);
+ ScopedUtfChars string8(env, string);
+ if (string8.c_str() != NULL) {
+ limitIfaces.push_back(std::string(string8.c_str()));
+ }
+ }
+ }
+ std::vector<stats_line> lines;
+
+
+ if (useBpfStats) {
+ if (parseBpfNetworkStatsDetail(&lines, limitIfaces, limitTag, limitUid) < 0)
+ return -1;
+ } else {
+ if (legacyReadNetworkStatsDetail(&lines, limitIfaces, limitTag,
+ limitUid, path8.c_str()) < 0)
+ return -1;
+ }
+
+ return statsLinesToNetworkStats(env, clazz, stats, lines);
+}
+
+static int readNetworkStatsDev(JNIEnv* env, jclass clazz, jobject stats) {
+ std::vector<stats_line> lines;
+
+ if (parseBpfNetworkStatsDev(&lines) < 0)
+ return -1;
+
+ return statsLinesToNetworkStats(env, clazz, stats, lines);
+}
+
static const JNINativeMethod gMethods[] = {
{ "nativeReadNetworkStatsDetail",
- "(Landroid/net/NetworkStats;Ljava/lang/String;I[Ljava/lang/String;I)I",
- (void*) readNetworkStatsDetail }
+ "(Landroid/net/NetworkStats;Ljava/lang/String;I[Ljava/lang/String;IZ)I",
+ (void*) readNetworkStatsDetail },
+ { "nativeReadNetworkStatsDev", "(Landroid/net/NetworkStats;)I",
+ (void*) readNetworkStatsDev },
};
int register_com_android_internal_net_NetworkStatsFactory(JNIEnv* env) {
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 63dba43..8d6a280 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -71,6 +71,9 @@
using android::base::StringPrintf;
using android::base::WriteStringToFile;
+#define CREATE_ERROR(...) StringPrintf("%s:%d: ", __FILE__, __LINE__). \
+ append(StringPrintf(__VA_ARGS__))
+
static pid_t gSystemServerPid = 0;
static const char kZygoteClassName[] = "com/android/internal/os/Zygote";
@@ -141,62 +144,77 @@
errno = saved_errno;
}
-// Configures the SIGCHLD handler for the zygote process. This is configured
-// very late, because earlier in the runtime we may fork() and exec()
-// other processes, and we want to waitpid() for those rather than
+// Configures the SIGCHLD/SIGHUP handlers for the zygote process. This is
+// configured very late, because earlier in the runtime we may fork() and
+// exec() other processes, and we want to waitpid() for those rather than
// have them be harvested immediately.
//
+// Ignore SIGHUP because all processes forked by the zygote are in the same
+// process group as the zygote and we don't want to be notified if we become
+// an orphaned group and have one or more stopped processes. This is not a
+// theoretical concern :
+// - we can become an orphaned group if one of our direct descendants forks
+// and is subsequently killed before its children.
+// - crash_dump routinely STOPs the process it's tracing.
+//
+// See issues b/71965619 and b/25567761 for further details.
+//
// This ends up being called repeatedly before each fork(), but there's
// no real harm in that.
-static void SetSigChldHandler() {
- struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = SigChldHandler;
+static void SetSignalHandlers() {
+ struct sigaction sig_chld = {};
+ sig_chld.sa_handler = SigChldHandler;
- int err = sigaction(SIGCHLD, &sa, NULL);
- if (err < 0) {
+ if (sigaction(SIGCHLD, &sig_chld, NULL) < 0) {
ALOGW("Error setting SIGCHLD handler: %s", strerror(errno));
}
+
+ struct sigaction sig_hup = {};
+ sig_hup.sa_handler = SIG_IGN;
+ if (sigaction(SIGHUP, &sig_hup, NULL) < 0) {
+ ALOGW("Error setting SIGHUP handler: %s", strerror(errno));
+ }
}
// Sets the SIGCHLD handler back to default behavior in zygote children.
-static void UnsetSigChldHandler() {
+static void UnsetChldSignalHandler() {
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_DFL;
- int err = sigaction(SIGCHLD, &sa, NULL);
- if (err < 0) {
+ if (sigaction(SIGCHLD, &sa, NULL) < 0) {
ALOGW("Error unsetting SIGCHLD handler: %s", strerror(errno));
}
}
// Calls POSIX setgroups() using the int[] object as an argument.
// A NULL argument is tolerated.
-static void SetGids(JNIEnv* env, jintArray javaGids) {
+static bool SetGids(JNIEnv* env, jintArray javaGids, std::string* error_msg) {
if (javaGids == NULL) {
- return;
+ return true;
}
ScopedIntArrayRO gids(env, javaGids);
if (gids.get() == NULL) {
- RuntimeAbort(env, __LINE__, "Getting gids int array failed");
+ *error_msg = CREATE_ERROR("Getting gids int array failed");
+ return false;
}
int rc = setgroups(gids.size(), reinterpret_cast<const gid_t*>(&gids[0]));
if (rc == -1) {
- std::ostringstream oss;
- oss << "setgroups failed: " << strerror(errno) << ", gids.size=" << gids.size();
- RuntimeAbort(env, __LINE__, oss.str().c_str());
+ *error_msg = CREATE_ERROR("setgroups failed: %s, gids.size=%zu", strerror(errno), gids.size());
+ return false;
}
+
+ return true;
}
// Sets the resource limits via setrlimit(2) for the values in the
// two-dimensional array of integers that's passed in. The second dimension
// contains a tuple of length 3: (resource, rlim_cur, rlim_max). NULL is
// treated as an empty array.
-static void SetRLimits(JNIEnv* env, jobjectArray javaRlimits) {
+static bool SetRLimits(JNIEnv* env, jobjectArray javaRlimits, std::string* error_msg) {
if (javaRlimits == NULL) {
- return;
+ return true;
}
rlimit rlim;
@@ -206,7 +224,8 @@
ScopedLocalRef<jobject> javaRlimitObject(env, env->GetObjectArrayElement(javaRlimits, i));
ScopedIntArrayRO javaRlimit(env, reinterpret_cast<jintArray>(javaRlimitObject.get()));
if (javaRlimit.size() != 3) {
- RuntimeAbort(env, __LINE__, "rlimits array must have a second dimension of size 3");
+ *error_msg = CREATE_ERROR("rlimits array must have a second dimension of size 3");
+ return false;
}
rlim.rlim_cur = javaRlimit[1];
@@ -214,11 +233,13 @@
int rc = setrlimit(javaRlimit[0], &rlim);
if (rc == -1) {
- ALOGE("setrlimit(%d, {%ld, %ld}) failed", javaRlimit[0], rlim.rlim_cur,
+ *error_msg = CREATE_ERROR("setrlimit(%d, {%ld, %ld}) failed", javaRlimit[0], rlim.rlim_cur,
rlim.rlim_max);
- RuntimeAbort(env, __LINE__, "setrlimit failed");
+ return false;
}
}
+
+ return true;
}
// The debug malloc library needs to know whether it's the zygote or a child.
@@ -239,21 +260,23 @@
}
// Apply system or app filter based on uid.
- if (getuid() >= AID_APP_START) {
+ if (uid >= AID_APP_START) {
set_app_seccomp_filter();
} else {
set_system_seccomp_filter();
}
}
-static void EnableKeepCapabilities(JNIEnv* env) {
+static bool EnableKeepCapabilities(std::string* error_msg) {
int rc = prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);
if (rc == -1) {
- RuntimeAbort(env, __LINE__, "prctl(PR_SET_KEEPCAPS) failed");
+ *error_msg = CREATE_ERROR("prctl(PR_SET_KEEPCAPS) failed: %s", strerror(errno));
+ return false;
}
+ return true;
}
-static void DropCapabilitiesBoundingSet(JNIEnv* env) {
+static bool DropCapabilitiesBoundingSet(std::string* error_msg) {
for (int i = 0; prctl(PR_CAPBSET_READ, i, 0, 0, 0) >= 0; i++) {
int rc = prctl(PR_CAPBSET_DROP, i, 0, 0, 0);
if (rc == -1) {
@@ -261,14 +284,15 @@
ALOGE("prctl(PR_CAPBSET_DROP) failed with EINVAL. Please verify "
"your kernel is compiled with file capabilities support");
} else {
- ALOGE("prctl(PR_CAPBSET_DROP, %d) failed: %s", i, strerror(errno));
- RuntimeAbort(env, __LINE__, "prctl(PR_CAPBSET_DROP) failed");
+ *error_msg = CREATE_ERROR("prctl(PR_CAPBSET_DROP, %d) failed: %s", i, strerror(errno));
+ return false;
}
}
}
+ return true;
}
-static void SetInheritable(JNIEnv* env, uint64_t inheritable) {
+static bool SetInheritable(uint64_t inheritable, std::string* error_msg) {
__user_cap_header_struct capheader;
memset(&capheader, 0, sizeof(capheader));
capheader.version = _LINUX_CAPABILITY_VERSION_3;
@@ -276,21 +300,23 @@
__user_cap_data_struct capdata[2];
if (capget(&capheader, &capdata[0]) == -1) {
- ALOGE("capget failed: %s", strerror(errno));
- RuntimeAbort(env, __LINE__, "capget failed");
+ *error_msg = CREATE_ERROR("capget failed: %s", strerror(errno));
+ return false;
}
capdata[0].inheritable = inheritable;
capdata[1].inheritable = inheritable >> 32;
if (capset(&capheader, &capdata[0]) == -1) {
- ALOGE("capset(inh=%" PRIx64 ") failed: %s", inheritable, strerror(errno));
- RuntimeAbort(env, __LINE__, "capset failed");
+ *error_msg = CREATE_ERROR("capset(inh=%" PRIx64 ") failed: %s", inheritable, strerror(errno));
+ return false;
}
+
+ return true;
}
-static void SetCapabilities(JNIEnv* env, uint64_t permitted, uint64_t effective,
- uint64_t inheritable) {
+static bool SetCapabilities(uint64_t permitted, uint64_t effective, uint64_t inheritable,
+ std::string* error_msg) {
__user_cap_header_struct capheader;
memset(&capheader, 0, sizeof(capheader));
capheader.version = _LINUX_CAPABILITY_VERSION_3;
@@ -306,18 +332,20 @@
capdata[1].inheritable = inheritable >> 32;
if (capset(&capheader, &capdata[0]) == -1) {
- ALOGE("capset(perm=%" PRIx64 ", eff=%" PRIx64 ", inh=%" PRIx64 ") failed: %s", permitted,
- effective, inheritable, strerror(errno));
- RuntimeAbort(env, __LINE__, "capset failed");
+ *error_msg = CREATE_ERROR("capset(perm=%" PRIx64 ", eff=%" PRIx64 ", inh=%" PRIx64 ") "
+ "failed: %s", permitted, effective, inheritable, strerror(errno));
+ return false;
}
+ return true;
}
-static void SetSchedulerPolicy(JNIEnv* env) {
+static bool SetSchedulerPolicy(std::string* error_msg) {
errno = -set_sched_policy(0, SP_DEFAULT);
if (errno != 0) {
- ALOGE("set_sched_policy(0, SP_DEFAULT) failed");
- RuntimeAbort(env, __LINE__, "set_sched_policy(0, SP_DEFAULT) failed");
+ *error_msg = CREATE_ERROR("set_sched_policy(0, SP_DEFAULT) failed: %s", strerror(errno));
+ return false;
}
+ return true;
}
static int UnmountTree(const char* path) {
@@ -351,7 +379,7 @@
// Create a private mount namespace and bind mount appropriate emulated
// storage for the given user.
static bool MountEmulatedStorage(uid_t uid, jint mount_mode,
- bool force_mount_namespace) {
+ bool force_mount_namespace, std::string* error_msg) {
// See storage config details at http://source.android.com/tech/storage/
String8 storageSource;
@@ -368,7 +396,7 @@
// Create a second private mount namespace for our process
if (unshare(CLONE_NEWNS) == -1) {
- ALOGW("Failed to unshare(): %s", strerror(errno));
+ *error_msg = CREATE_ERROR("Failed to unshare(): %s", strerror(errno));
return false;
}
@@ -379,7 +407,9 @@
if (TEMP_FAILURE_RETRY(mount(storageSource.string(), "/storage",
NULL, MS_BIND | MS_REC | MS_SLAVE, NULL)) == -1) {
- ALOGW("Failed to mount %s to /storage: %s", storageSource.string(), strerror(errno));
+ *error_msg = CREATE_ERROR("Failed to mount %s to /storage: %s",
+ storageSource.string(),
+ strerror(errno));
return false;
}
@@ -387,11 +417,14 @@
userid_t user_id = multiuser_get_user_id(uid);
const String8 userSource(String8::format("/mnt/user/%d", user_id));
if (fs_prepare_dir(userSource.string(), 0751, 0, 0) == -1) {
+ *error_msg = CREATE_ERROR("fs_prepare_dir failed on %s", userSource.string());
return false;
}
if (TEMP_FAILURE_RETRY(mount(userSource.string(), "/storage/self",
NULL, MS_BIND, NULL)) == -1) {
- ALOGW("Failed to mount %s to /storage/self: %s", userSource.string(), strerror(errno));
+ *error_msg = CREATE_ERROR("Failed to mount %s to /storage/self: %s",
+ userSource.string(),
+ strerror(errno));
return false;
}
@@ -423,31 +456,32 @@
// descriptor (if any) is closed via dup2(), replacing it with a valid
// (open) descriptor to /dev/null.
-static void DetachDescriptors(JNIEnv* env, jintArray fdsToClose) {
+static bool DetachDescriptors(JNIEnv* env, jintArray fdsToClose, std::string* error_msg) {
if (!fdsToClose) {
- return;
+ return true;
}
jsize count = env->GetArrayLength(fdsToClose);
ScopedIntArrayRO ar(env, fdsToClose);
if (ar.get() == NULL) {
- RuntimeAbort(env, __LINE__, "Bad fd array");
+ *error_msg = "Bad fd array";
+ return false;
}
jsize i;
int devnull;
for (i = 0; i < count; i++) {
devnull = open("/dev/null", O_RDWR);
if (devnull < 0) {
- ALOGE("Failed to open /dev/null: %s", strerror(errno));
- RuntimeAbort(env, __LINE__, "Failed to open /dev/null");
- continue;
+ *error_msg = std::string("Failed to open /dev/null: ").append(strerror(errno));
+ return false;
}
ALOGV("Switching descriptor %d to /dev/null: %s", ar[i], strerror(errno));
if (dup2(devnull, ar[i]) < 0) {
- ALOGE("Failed dup2() on descriptor %d: %s", ar[i], strerror(errno));
- RuntimeAbort(env, __LINE__, "Failed dup2()");
+ *error_msg = StringPrintf("Failed dup2() on descriptor %d: %s", ar[i], strerror(errno));
+ return false;
}
close(devnull);
}
+ return true;
}
void SetThreadName(const char* thread_name) {
@@ -475,25 +509,30 @@
if (errno != 0) {
ALOGW("Unable to set the name of current thread to '%s': %s", buf, strerror(errno));
}
+ // Update base::logging default tag.
+ android::base::SetDefaultTag(buf);
}
// The list of open zygote file descriptors.
static FileDescriptorTable* gOpenFdTable = NULL;
-static void FillFileDescriptorVector(JNIEnv* env,
+static bool FillFileDescriptorVector(JNIEnv* env,
jintArray java_fds,
- std::vector<int>* fds) {
+ std::vector<int>* fds,
+ std::string* error_msg) {
CHECK(fds != nullptr);
if (java_fds != nullptr) {
ScopedIntArrayRO ar(env, java_fds);
if (ar.get() == nullptr) {
- RuntimeAbort(env, __LINE__, "Bad fd array");
+ *error_msg = "Bad fd array";
+ return false;
}
fds->reserve(ar.size());
for (size_t i = 0; i < ar.size(); ++i) {
fds->push_back(ar[i]);
}
}
+ return true;
}
// Utility routine to fork zygote and specialize the child process.
@@ -503,40 +542,61 @@
jint mount_external,
jstring java_se_info, jstring java_se_name,
bool is_system_server, jintArray fdsToClose,
- jintArray fdsToIgnore,
+ jintArray fdsToIgnore, bool is_child_zygote,
jstring instructionSet, jstring dataDir) {
- SetSigChldHandler();
+ SetSignalHandlers();
sigset_t sigchld;
sigemptyset(&sigchld);
sigaddset(&sigchld, SIGCHLD);
+ auto fail_fn = [env, java_se_name, is_system_server](const std::string& msg)
+ __attribute__ ((noreturn)) {
+ const char* se_name_c_str = nullptr;
+ std::unique_ptr<ScopedUtfChars> se_name;
+ if (java_se_name != nullptr) {
+ se_name.reset(new ScopedUtfChars(env, java_se_name));
+ se_name_c_str = se_name->c_str();
+ }
+ if (se_name_c_str == nullptr && is_system_server) {
+ se_name_c_str = "system_server";
+ }
+ const std::string& error_msg = (se_name_c_str == nullptr)
+ ? msg
+ : StringPrintf("(%s) %s", se_name_c_str, msg.c_str());
+ env->FatalError(error_msg.c_str());
+ __builtin_unreachable();
+ };
+
// Temporarily block SIGCHLD during forks. The SIGCHLD handler might
// log, which would result in the logging FDs we close being reopened.
// This would cause failures because the FDs are not whitelisted.
//
// Note that the zygote process is single threaded at this point.
if (sigprocmask(SIG_BLOCK, &sigchld, nullptr) == -1) {
- ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
- RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_BLOCK, { SIGCHLD }) failed.");
+ fail_fn(CREATE_ERROR("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno)));
}
// Close any logging related FDs before we start evaluating the list of
// file descriptors.
__android_log_close();
+ std::string error_msg;
+
// If this is the first fork for this zygote, create the open FD table.
// If it isn't, we just need to check whether the list of open files has
// changed (and it shouldn't in the normal case).
std::vector<int> fds_to_ignore;
- FillFileDescriptorVector(env, fdsToIgnore, &fds_to_ignore);
+ if (!FillFileDescriptorVector(env, fdsToIgnore, &fds_to_ignore, &error_msg)) {
+ fail_fn(error_msg);
+ }
if (gOpenFdTable == NULL) {
- gOpenFdTable = FileDescriptorTable::Create(fds_to_ignore);
+ gOpenFdTable = FileDescriptorTable::Create(fds_to_ignore, &error_msg);
if (gOpenFdTable == NULL) {
- RuntimeAbort(env, __LINE__, "Unable to construct file descriptor table.");
+ fail_fn(error_msg);
}
- } else if (!gOpenFdTable->Restat(fds_to_ignore)) {
- RuntimeAbort(env, __LINE__, "Unable to restat file descriptor table.");
+ } else if (!gOpenFdTable->Restat(fds_to_ignore, &error_msg)) {
+ fail_fn(error_msg);
}
pid_t pid = fork();
@@ -545,31 +605,33 @@
PreApplicationInit();
// Clean up any descriptors which must be closed immediately
- DetachDescriptors(env, fdsToClose);
+ if (!DetachDescriptors(env, fdsToClose, &error_msg)) {
+ fail_fn(error_msg);
+ }
// Re-open all remaining open file descriptors so that they aren't shared
// with the zygote across a fork.
- if (!gOpenFdTable->ReopenOrDetach()) {
- RuntimeAbort(env, __LINE__, "Unable to reopen whitelisted descriptors.");
+ if (!gOpenFdTable->ReopenOrDetach(&error_msg)) {
+ fail_fn(error_msg);
}
if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) {
- ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
- RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_UNBLOCK, { SIGCHLD }) failed.");
+ fail_fn(CREATE_ERROR("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno)));
}
- // Must be called when the new process still has CAP_SYS_ADMIN. The other alternative is to
- // call prctl(PR_SET_NO_NEW_PRIVS, 1) afterward, but that breaks SELinux domain transition (see
- // b/71859146).
- SetUpSeccompFilter(uid);
-
// Keep capabilities across UID change, unless we're staying root.
if (uid != 0) {
- EnableKeepCapabilities(env);
+ if (!EnableKeepCapabilities(&error_msg)) {
+ fail_fn(error_msg);
+ }
}
- SetInheritable(env, permittedCapabilities);
- DropCapabilitiesBoundingSet(env);
+ if (!SetInheritable(permittedCapabilities, &error_msg)) {
+ fail_fn(error_msg);
+ }
+ if (!DropCapabilitiesBoundingSet(&error_msg)) {
+ fail_fn(error_msg);
+ }
bool use_native_bridge = !is_system_server && (instructionSet != NULL)
&& android::NativeBridgeAvailable();
@@ -586,8 +648,8 @@
ALOGW("Native bridge will not be used because dataDir == NULL.");
}
- if (!MountEmulatedStorage(uid, mount_external, use_native_bridge)) {
- ALOGW("Failed to mount emulated storage: %s", strerror(errno));
+ if (!MountEmulatedStorage(uid, mount_external, use_native_bridge, &error_msg)) {
+ ALOGW("Failed to mount emulated storage: %s (%s)", error_msg.c_str(), strerror(errno));
if (errno == ENOTCONN || errno == EROFS) {
// When device is actively encrypting, we get ENOTCONN here
// since FUSE was mounted before the framework restarted.
@@ -595,7 +657,7 @@
// FUSE hasn't been created yet by init.
// In either case, continue without external storage.
} else {
- RuntimeAbort(env, __LINE__, "Cannot continue without emulated storage");
+ fail_fn(error_msg);
}
}
@@ -610,9 +672,14 @@
}
}
- SetGids(env, javaGids);
+ std::string error_msg;
+ if (!SetGids(env, javaGids, &error_msg)) {
+ fail_fn(error_msg);
+ }
- SetRLimits(env, javaRlimits);
+ if (!SetRLimits(env, javaRlimits, &error_msg)) {
+ fail_fn(error_msg);
+ }
if (use_native_bridge) {
ScopedUtfChars isa_string(env, instructionSet);
@@ -622,14 +689,39 @@
int rc = setresgid(gid, gid, gid);
if (rc == -1) {
- ALOGE("setresgid(%d) failed: %s", gid, strerror(errno));
- RuntimeAbort(env, __LINE__, "setresgid failed");
+ fail_fn(CREATE_ERROR("setresgid(%d) failed: %s", gid, strerror(errno)));
}
+ // Must be called when the new process still has CAP_SYS_ADMIN, in this case, before changing
+ // uid from 0, which clears capabilities. The other alternative is to call
+ // prctl(PR_SET_NO_NEW_PRIVS, 1) afterward, but that breaks SELinux domain transition (see
+ // b/71859146). As the result, privileged syscalls used below still need to be accessible in
+ // app process.
+ SetUpSeccompFilter(uid);
+
rc = setresuid(uid, uid, uid);
if (rc == -1) {
- ALOGE("setresuid(%d) failed: %s", uid, strerror(errno));
- RuntimeAbort(env, __LINE__, "setresuid failed");
+ fail_fn(CREATE_ERROR("setresuid(%d) failed: %s", uid, strerror(errno)));
+ }
+
+ // The "dumpable" flag of a process, which controls core dump generation, is
+ // overwritten by the value in /proc/sys/fs/suid_dumpable when the effective
+ // user or group ID changes. See proc(5) for possible values. In most cases,
+ // the value is 0, so core dumps are disabled for zygote children. However,
+ // when running in a Chrome OS container, the value is already set to 2,
+ // which allows the external crash reporter to collect all core dumps. Since
+ // only system crashes are interested, core dump is disabled for app
+ // processes. This also ensures compliance with CTS.
+ int dumpable = prctl(PR_GET_DUMPABLE);
+ if (dumpable == -1) {
+ ALOGE("prctl(PR_GET_DUMPABLE) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "prctl(PR_GET_DUMPABLE) failed");
+ }
+ if (dumpable == 2 && uid >= AID_APP) {
+ if (prctl(PR_SET_DUMPABLE, 0, 0, 0, 0) == -1) {
+ ALOGE("prctl(PR_SET_DUMPABLE, 0) failed: %s", strerror(errno));
+ RuntimeAbort(env, __LINE__, "prctl(PR_SET_DUMPABLE, 0) failed");
+ }
}
if (NeedsNoRandomizeWorkaround()) {
@@ -641,9 +733,14 @@
}
}
- SetCapabilities(env, permittedCapabilities, effectiveCapabilities, permittedCapabilities);
+ if (!SetCapabilities(permittedCapabilities, effectiveCapabilities, permittedCapabilities,
+ &error_msg)) {
+ fail_fn(error_msg);
+ }
- SetSchedulerPolicy(env);
+ if (!SetSchedulerPolicy(&error_msg)) {
+ fail_fn(error_msg);
+ }
const char* se_info_c_str = NULL;
ScopedUtfChars* se_info = NULL;
@@ -651,7 +748,7 @@
se_info = new ScopedUtfChars(env, java_se_info);
se_info_c_str = se_info->c_str();
if (se_info_c_str == NULL) {
- RuntimeAbort(env, __LINE__, "se_info_c_str == NULL");
+ fail_fn("se_info_c_str == NULL");
}
}
const char* se_name_c_str = NULL;
@@ -660,42 +757,41 @@
se_name = new ScopedUtfChars(env, java_se_name);
se_name_c_str = se_name->c_str();
if (se_name_c_str == NULL) {
- RuntimeAbort(env, __LINE__, "se_name_c_str == NULL");
+ fail_fn("se_name_c_str == NULL");
}
}
rc = selinux_android_setcontext(uid, is_system_server, se_info_c_str, se_name_c_str);
if (rc == -1) {
- ALOGE("selinux_android_setcontext(%d, %d, \"%s\", \"%s\") failed", uid,
- is_system_server, se_info_c_str, se_name_c_str);
- RuntimeAbort(env, __LINE__, "selinux_android_setcontext failed");
+ fail_fn(CREATE_ERROR("selinux_android_setcontext(%d, %d, \"%s\", \"%s\") failed", uid,
+ is_system_server, se_info_c_str, se_name_c_str));
}
// Make it easier to debug audit logs by setting the main thread's name to the
// nice name rather than "app_process".
- if (se_info_c_str == NULL && is_system_server) {
+ if (se_name_c_str == NULL && is_system_server) {
se_name_c_str = "system_server";
}
- if (se_info_c_str != NULL) {
+ if (se_name_c_str != NULL) {
SetThreadName(se_name_c_str);
}
delete se_info;
delete se_name;
- UnsetSigChldHandler();
+ // Unset the SIGCHLD handler, but keep ignoring SIGHUP (rationale in SetSignalHandlers).
+ UnsetChldSignalHandler();
env->CallStaticVoidMethod(gZygoteClass, gCallPostForkChildHooks, runtime_flags,
- is_system_server, instructionSet);
+ is_system_server, is_child_zygote, instructionSet);
if (env->ExceptionCheck()) {
- RuntimeAbort(env, __LINE__, "Error calling post fork hooks.");
+ fail_fn("Error calling post fork hooks.");
}
} else if (pid > 0) {
// the parent process
// We blocked SIGCHLD prior to a fork, we unblock it here.
if (sigprocmask(SIG_UNBLOCK, &sigchld, nullptr) == -1) {
- ALOGE("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno));
- RuntimeAbort(env, __LINE__, "Call to sigprocmask(SIG_UNBLOCK, { SIGCHLD }) failed.");
+ fail_fn(CREATE_ERROR("sigprocmask(SIG_SETMASK, { SIGCHLD }) failed: %s", strerror(errno)));
}
}
return pid;
@@ -734,8 +830,7 @@
JNIEnv* env, jclass, jint uid, jint gid, jintArray gids,
jint runtime_flags, jobjectArray rlimits,
jint mount_external, jstring se_info, jstring se_name,
- jintArray fdsToClose,
- jintArray fdsToIgnore,
+ jintArray fdsToClose, jintArray fdsToIgnore, jboolean is_child_zygote,
jstring instructionSet, jstring appDataDir) {
jlong capabilities = 0;
@@ -772,13 +867,22 @@
capabilities |= (1LL << CAP_BLOCK_SUSPEND);
}
+ // If forking a child zygote process, that zygote will need to be able to change
+ // the UID and GID of processes it forks, as well as drop those capabilities.
+ if (is_child_zygote) {
+ capabilities |= (1LL << CAP_SETUID);
+ capabilities |= (1LL << CAP_SETGID);
+ capabilities |= (1LL << CAP_SETPCAP);
+ }
+
// Containers run without some capabilities, so drop any caps that are not
// available.
capabilities &= GetEffectiveCapabilityMask(env);
return ForkAndSpecializeCommon(env, uid, gid, gids, runtime_flags,
rlimits, capabilities, capabilities, mount_external, se_info,
- se_name, false, fdsToClose, fdsToIgnore, instructionSet, appDataDir);
+ se_name, false, fdsToClose, fdsToIgnore, is_child_zygote == JNI_TRUE,
+ instructionSet, appDataDir);
}
static jint com_android_internal_os_Zygote_nativeForkSystemServer(
@@ -789,7 +893,7 @@
runtime_flags, rlimits,
permittedCapabilities, effectiveCapabilities,
MOUNT_EXTERNAL_DEFAULT, NULL, NULL, true, NULL,
- NULL, NULL, NULL);
+ NULL, false, NULL, NULL);
if (pid > 0) {
// The zygote process checks whether the child process has died or not.
ALOGI("System server process %d has been created", pid);
@@ -863,7 +967,7 @@
{ "nativeSecurityInit", "()V",
(void *) com_android_internal_os_Zygote_nativeSecurityInit },
{ "nativeForkAndSpecialize",
- "(II[II[[IILjava/lang/String;Ljava/lang/String;[I[ILjava/lang/String;Ljava/lang/String;)I",
+ "(II[II[[IILjava/lang/String;Ljava/lang/String;[I[IZLjava/lang/String;Ljava/lang/String;)I",
(void *) com_android_internal_os_Zygote_nativeForkAndSpecialize },
{ "nativeForkSystemServer", "(II[II[[IJJ)I",
(void *) com_android_internal_os_Zygote_nativeForkSystemServer },
@@ -878,7 +982,7 @@
int register_com_android_internal_os_Zygote(JNIEnv* env) {
gZygoteClass = MakeGlobalRefOrDie(env, FindClassOrDie(env, kZygoteClassName));
gCallPostForkChildHooks = GetStaticMethodIDOrDie(env, gZygoteClass, "callPostForkChildHooks",
- "(IZLjava/lang/String;)V");
+ "(IZZLjava/lang/String;)V");
return RegisterMethodsOrDie(env, "com/android/internal/os/Zygote", gMethods, NELEM(gMethods));
}
diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp
index 956b724..b19848b 100644
--- a/core/jni/fd_utils.cpp
+++ b/core/jni/fd_utils.cpp
@@ -119,14 +119,57 @@
FileDescriptorWhitelist* FileDescriptorWhitelist::instance_ = nullptr;
+// Keeps track of all relevant information (flags, offset etc.) of an
+// open zygote file descriptor.
+class FileDescriptorInfo {
+ public:
+ // Create a FileDescriptorInfo for a given file descriptor. Returns
+ // |NULL| if an error occurred.
+ static FileDescriptorInfo* CreateFromFd(int fd, std::string* error_msg);
+
+ // Checks whether the file descriptor associated with this object
+ // refers to the same description.
+ bool Restat() const;
+
+ bool ReopenOrDetach(std::string* error_msg) const;
+
+ const int fd;
+ const struct stat stat;
+ const std::string file_path;
+ const int open_flags;
+ const int fd_flags;
+ const int fs_flags;
+ const off_t offset;
+ const bool is_sock;
+
+ private:
+ FileDescriptorInfo(int fd);
+
+ FileDescriptorInfo(struct stat stat, const std::string& file_path, int fd, int open_flags,
+ int fd_flags, int fs_flags, off_t offset);
+
+ // Returns the locally-bound name of the socket |fd|. Returns true
+ // iff. all of the following hold :
+ //
+ // - the socket's sa_family is AF_UNIX.
+ // - the length of the path is greater than zero (i.e, not an unnamed socket).
+ // - the first byte of the path isn't zero (i.e, not a socket with an abstract
+ // address).
+ static bool GetSocketName(const int fd, std::string* result);
+
+ bool DetachSocket(std::string* error_msg) const;
+
+ DISALLOW_COPY_AND_ASSIGN(FileDescriptorInfo);
+};
+
// static
-FileDescriptorInfo* FileDescriptorInfo::CreateFromFd(int fd) {
+FileDescriptorInfo* FileDescriptorInfo::CreateFromFd(int fd, std::string* error_msg) {
struct stat f_stat;
// This should never happen; the zygote should always have the right set
// of permissions required to stat all its open files.
if (TEMP_FAILURE_RETRY(fstat(fd, &f_stat)) == -1) {
- PLOG(ERROR) << "Unable to stat fd " << fd;
- return NULL;
+ *error_msg = android::base::StringPrintf("Unable to stat %d", fd);
+ return nullptr;
}
const FileDescriptorWhitelist* whitelist = FileDescriptorWhitelist::Get();
@@ -134,13 +177,15 @@
if (S_ISSOCK(f_stat.st_mode)) {
std::string socket_name;
if (!GetSocketName(fd, &socket_name)) {
- return NULL;
+ *error_msg = "Unable to get socket name";
+ return nullptr;
}
if (!whitelist->IsAllowed(socket_name)) {
- LOG(ERROR) << "Socket name not whitelisted : " << socket_name
- << " (fd=" << fd << ")";
- return NULL;
+ *error_msg = android::base::StringPrintf("Socket name not whitelisted : %s (fd=%d)",
+ socket_name.c_str(),
+ fd);
+ return nullptr;
}
return new FileDescriptorInfo(fd);
@@ -157,19 +202,22 @@
// with the child process across forks but those should have been closed
// before we got to this point.
if (!S_ISCHR(f_stat.st_mode) && !S_ISREG(f_stat.st_mode)) {
- LOG(ERROR) << "Unsupported st_mode " << f_stat.st_mode;
- return NULL;
+ *error_msg = android::base::StringPrintf("Unsupported st_mode %u", f_stat.st_mode);
+ return nullptr;
}
std::string file_path;
const std::string fd_path = android::base::StringPrintf("/proc/self/fd/%d", fd);
if (!android::base::Readlink(fd_path, &file_path)) {
- return NULL;
+ *error_msg = android::base::StringPrintf("Could not read fd link %s: %s",
+ fd_path.c_str(),
+ strerror(errno));
+ return nullptr;
}
if (!whitelist->IsAllowed(file_path)) {
- LOG(ERROR) << "Not whitelisted : " << file_path;
- return NULL;
+ *error_msg = std::string("Not whitelisted : ").append(file_path);
+ return nullptr;
}
// File descriptor flags : currently on FD_CLOEXEC. We can set these
@@ -177,8 +225,11 @@
// there won't be any races.
const int fd_flags = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFD));
if (fd_flags == -1) {
- PLOG(ERROR) << "Failed fcntl(" << fd << ", F_GETFD)";
- return NULL;
+ *error_msg = android::base::StringPrintf("Failed fcntl(%d, F_GETFD) (%s): %s",
+ fd,
+ file_path.c_str(),
+ strerror(errno));
+ return nullptr;
}
// File status flags :
@@ -195,8 +246,11 @@
// their presence and pass them in to open().
int fs_flags = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL));
if (fs_flags == -1) {
- PLOG(ERROR) << "Failed fcntl(" << fd << ", F_GETFL)";
- return NULL;
+ *error_msg = android::base::StringPrintf("Failed fcntl(%d, F_GETFL) (%s): %s",
+ fd,
+ file_path.c_str(),
+ strerror(errno));
+ return nullptr;
}
// File offset : Ignore the offset for non seekable files.
@@ -221,9 +275,9 @@
return f_stat.st_ino == stat.st_ino && f_stat.st_dev == stat.st_dev;
}
-bool FileDescriptorInfo::ReopenOrDetach() const {
+bool FileDescriptorInfo::ReopenOrDetach(std::string* error_msg) const {
if (is_sock) {
- return DetachSocket();
+ return DetachSocket(error_msg);
}
// NOTE: This might happen if the file was unlinked after being opened.
@@ -232,31 +286,49 @@
const int new_fd = TEMP_FAILURE_RETRY(open(file_path.c_str(), open_flags));
if (new_fd == -1) {
- PLOG(ERROR) << "Failed open(" << file_path << ", " << open_flags << ")";
+ *error_msg = android::base::StringPrintf("Failed open(%s, %i): %s",
+ file_path.c_str(),
+ open_flags,
+ strerror(errno));
return false;
}
if (TEMP_FAILURE_RETRY(fcntl(new_fd, F_SETFD, fd_flags)) == -1) {
close(new_fd);
- PLOG(ERROR) << "Failed fcntl(" << new_fd << ", F_SETFD, " << fd_flags << ")";
+ *error_msg = android::base::StringPrintf("Failed fcntl(%d, F_SETFD, %d) (%s): %s",
+ new_fd,
+ fd_flags,
+ file_path.c_str(),
+ strerror(errno));
return false;
}
if (TEMP_FAILURE_RETRY(fcntl(new_fd, F_SETFL, fs_flags)) == -1) {
close(new_fd);
- PLOG(ERROR) << "Failed fcntl(" << new_fd << ", F_SETFL, " << fs_flags << ")";
+ *error_msg = android::base::StringPrintf("Failed fcntl(%d, F_SETFL, %d) (%s): %s",
+ new_fd,
+ fs_flags,
+ file_path.c_str(),
+ strerror(errno));
return false;
}
if (offset != -1 && TEMP_FAILURE_RETRY(lseek64(new_fd, offset, SEEK_SET)) == -1) {
close(new_fd);
- PLOG(ERROR) << "Failed lseek64(" << new_fd << ", SEEK_SET)";
+ *error_msg = android::base::StringPrintf("Failed lseek64(%d, SEEK_SET) (%s): %s",
+ new_fd,
+ file_path.c_str(),
+ strerror(errno));
return false;
}
if (TEMP_FAILURE_RETRY(dup2(new_fd, fd)) == -1) {
close(new_fd);
- PLOG(ERROR) << "Failed dup2(" << fd << ", " << new_fd << ")";
+ *error_msg = android::base::StringPrintf("Failed dup2(%d, %d) (%s): %s",
+ fd,
+ new_fd,
+ file_path.c_str(),
+ strerror(errno));
return false;
}
@@ -313,10 +385,12 @@
return false;
}
- // This is a local socket with an abstract address, we do not accept it.
+ // This is a local socket with an abstract address. Remove the leading NUL byte and
+ // add a human-readable "ABSTRACT/" prefix.
if (unix_addr->sun_path[0] == '\0') {
- LOG(ERROR) << "Unsupported AF_UNIX socket (fd=" << fd << ") with abstract address.";
- return false;
+ *result = "ABSTRACT/";
+ result->append(&unix_addr->sun_path[1], path_len - 1);
+ return true;
}
// If we're here, sun_path must refer to a null terminated filesystem
@@ -330,20 +404,22 @@
return true;
}
-bool FileDescriptorInfo::DetachSocket() const {
+bool FileDescriptorInfo::DetachSocket(std::string* error_msg) const {
const int dev_null_fd = open("/dev/null", O_RDWR);
if (dev_null_fd < 0) {
- PLOG(ERROR) << "Failed to open /dev/null";
+ *error_msg = std::string("Failed to open /dev/null: ").append(strerror(errno));
return false;
}
if (dup2(dev_null_fd, fd) == -1) {
- PLOG(ERROR) << "Failed dup2 on socket descriptor " << fd;
+ *error_msg = android::base::StringPrintf("Failed dup2 on socket descriptor %d: %s",
+ fd,
+ strerror(errno));
return false;
}
if (close(dev_null_fd) == -1) {
- PLOG(ERROR) << "Failed close(" << dev_null_fd << ")";
+ *error_msg = android::base::StringPrintf("Failed close(%d): %s", dev_null_fd, strerror(errno));
return false;
}
@@ -351,11 +427,12 @@
}
// static
-FileDescriptorTable* FileDescriptorTable::Create(const std::vector<int>& fds_to_ignore) {
+FileDescriptorTable* FileDescriptorTable::Create(const std::vector<int>& fds_to_ignore,
+ std::string* error_msg) {
DIR* d = opendir(kFdPath);
- if (d == NULL) {
- PLOG(ERROR) << "Unable to open directory " << std::string(kFdPath);
- return NULL;
+ if (d == nullptr) {
+ *error_msg = std::string("Unable to open directory ").append(kFdPath);
+ return nullptr;
}
int dir_fd = dirfd(d);
dirent* e;
@@ -371,7 +448,7 @@
continue;
}
- FileDescriptorInfo* info = FileDescriptorInfo::CreateFromFd(fd);
+ FileDescriptorInfo* info = FileDescriptorInfo::CreateFromFd(fd, error_msg);
if (info == NULL) {
if (closedir(d) == -1) {
PLOG(ERROR) << "Unable to close directory";
@@ -382,19 +459,21 @@
}
if (closedir(d) == -1) {
- PLOG(ERROR) << "Unable to close directory";
- return NULL;
+ *error_msg = "Unable to close directory";
+ return nullptr;
}
return new FileDescriptorTable(open_fd_map);
}
-bool FileDescriptorTable::Restat(const std::vector<int>& fds_to_ignore) {
+bool FileDescriptorTable::Restat(const std::vector<int>& fds_to_ignore, std::string* error_msg) {
std::set<int> open_fds;
// First get the list of open descriptors.
DIR* d = opendir(kFdPath);
if (d == NULL) {
- PLOG(ERROR) << "Unable to open directory " << std::string(kFdPath);
+ *error_msg = android::base::StringPrintf("Unable to open directory %s: %s",
+ kFdPath,
+ strerror(errno));
return false;
}
@@ -414,21 +493,21 @@
}
if (closedir(d) == -1) {
- PLOG(ERROR) << "Unable to close directory";
+ *error_msg = android::base::StringPrintf("Unable to close directory: %s", strerror(errno));
return false;
}
- return RestatInternal(open_fds);
+ return RestatInternal(open_fds, error_msg);
}
// Reopens all file descriptors that are contained in the table. Returns true
// if all descriptors were successfully re-opened or detached, and false if an
// error occurred.
-bool FileDescriptorTable::ReopenOrDetach() {
+bool FileDescriptorTable::ReopenOrDetach(std::string* error_msg) {
std::unordered_map<int, FileDescriptorInfo*>::const_iterator it;
for (it = open_fd_map_.begin(); it != open_fd_map_.end(); ++it) {
const FileDescriptorInfo* info = it->second;
- if (info == NULL || !info->ReopenOrDetach()) {
+ if (info == NULL || !info->ReopenOrDetach(error_msg)) {
return false;
}
}
@@ -441,7 +520,7 @@
: open_fd_map_(map) {
}
-bool FileDescriptorTable::RestatInternal(std::set<int>& open_fds) {
+bool FileDescriptorTable::RestatInternal(std::set<int>& open_fds, std::string* error_msg) {
bool error = false;
// Iterate through the list of file descriptors we've already recorded
@@ -449,6 +528,8 @@
//
// (a) they continue to be open.
// (b) they refer to the same file.
+ //
+ // We'll only store the last error message.
std::unordered_map<int, FileDescriptorInfo*>::iterator it = open_fd_map_.begin();
while (it != open_fd_map_.end()) {
std::set<int>::const_iterator element = open_fds.find(it->first);
@@ -469,7 +550,7 @@
// The file descriptor refers to a different description. We must
// update our entry in the table.
delete it->second;
- it->second = FileDescriptorInfo::CreateFromFd(*element);
+ it->second = FileDescriptorInfo::CreateFromFd(*element, error_msg);
if (it->second == NULL) {
// The descriptor no longer no longer refers to a whitelisted file.
// We flag an error and remove it from the list of files we're
@@ -504,7 +585,7 @@
std::set<int>::const_iterator it;
for (it = open_fds.begin(); it != open_fds.end(); ++it) {
const int fd = (*it);
- FileDescriptorInfo* info = FileDescriptorInfo::CreateFromFd(fd);
+ FileDescriptorInfo* info = FileDescriptorInfo::CreateFromFd(fd, error_msg);
if (info == NULL) {
// A newly opened file is not on the whitelist. Flag an error and
// continue.
diff --git a/core/jni/fd_utils.h b/core/jni/fd_utils.h
index a39e387..a3570d7 100644
--- a/core/jni/fd_utils.h
+++ b/core/jni/fd_utils.h
@@ -28,6 +28,8 @@
#include <android-base/macros.h>
+class FileDescriptorInfo;
+
// Whitelist of open paths that the zygote is allowed to keep open.
//
// In addition to the paths listed in kPathWhitelist in file_utils.cpp, and
@@ -66,49 +68,6 @@
DISALLOW_COPY_AND_ASSIGN(FileDescriptorWhitelist);
};
-// Keeps track of all relevant information (flags, offset etc.) of an
-// open zygote file descriptor.
-class FileDescriptorInfo {
- public:
- // Create a FileDescriptorInfo for a given file descriptor. Returns
- // |NULL| if an error occurred.
- static FileDescriptorInfo* CreateFromFd(int fd);
-
- // Checks whether the file descriptor associated with this object
- // refers to the same description.
- bool Restat() const;
-
- bool ReopenOrDetach() const;
-
- const int fd;
- const struct stat stat;
- const std::string file_path;
- const int open_flags;
- const int fd_flags;
- const int fs_flags;
- const off_t offset;
- const bool is_sock;
-
- private:
- FileDescriptorInfo(int fd);
-
- FileDescriptorInfo(struct stat stat, const std::string& file_path, int fd, int open_flags,
- int fd_flags, int fs_flags, off_t offset);
-
- // Returns the locally-bound name of the socket |fd|. Returns true
- // iff. all of the following hold :
- //
- // - the socket's sa_family is AF_UNIX.
- // - the length of the path is greater than zero (i.e, not an unnamed socket).
- // - the first byte of the path isn't zero (i.e, not a socket with an abstract
- // address).
- static bool GetSocketName(const int fd, std::string* result);
-
- bool DetachSocket() const;
-
- DISALLOW_COPY_AND_ASSIGN(FileDescriptorInfo);
-};
-
// A FileDescriptorTable is a collection of FileDescriptorInfo objects
// keyed by their FDs.
class FileDescriptorTable {
@@ -116,19 +75,20 @@
// Creates a new FileDescriptorTable. This function scans
// /proc/self/fd for the list of open file descriptors and collects
// information about them. Returns NULL if an error occurs.
- static FileDescriptorTable* Create(const std::vector<int>& fds_to_ignore);
+ static FileDescriptorTable* Create(const std::vector<int>& fds_to_ignore,
+ std::string* error_msg);
- bool Restat(const std::vector<int>& fds_to_ignore);
+ bool Restat(const std::vector<int>& fds_to_ignore, std::string* error_msg);
// Reopens all file descriptors that are contained in the table. Returns true
// if all descriptors were successfully re-opened or detached, and false if an
// error occurred.
- bool ReopenOrDetach();
+ bool ReopenOrDetach(std::string* error_msg);
private:
FileDescriptorTable(const std::unordered_map<int, FileDescriptorInfo*>& map);
- bool RestatInternal(std::set<int>& open_fds);
+ bool RestatInternal(std::set<int>& open_fds, std::string* error_msg);
static int ParseFd(dirent* e, int dir_fd);
diff --git a/core/proto/android/bluetooth/enums.proto b/core/proto/android/bluetooth/enums.proto
new file mode 100644
index 0000000..9e459e6
--- /dev/null
+++ b/core/proto/android/bluetooth/enums.proto
@@ -0,0 +1,43 @@
+/*
+ * Copyright 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.
+ */
+
+syntax = "proto2";
+package android.bluetooth;
+
+option java_outer_classname = "BluetoothProtoEnums";
+option java_multiple_files = true;
+
+// Bluetooth connection states.
+enum ConnectionStateEnum {
+ CONNECTION_STATE_DISCONNECTED = 0;
+ CONNECTION_STATE_CONNECTING = 1;
+ CONNECTION_STATE_CONNECTED = 2;
+ CONNECTION_STATE_DISCONNECTING = 3;
+}
+
+// Bluetooth Adapter Enable and Disable Reasons
+enum EnableDisableReasonEnum {
+ ENABLE_DISABLE_REASON_UNSPECIFIED = 0;
+ ENABLE_DISABLE_REASON_APPLICATION_REQUEST = 1;
+ ENABLE_DISABLE_REASON_AIRPLANE_MODE = 2;
+ ENABLE_DISABLE_REASON_DISALLOWED = 3;
+ ENABLE_DISABLE_REASON_RESTARTED = 4;
+ ENABLE_DISABLE_REASON_START_ERROR = 5;
+ ENABLE_DISABLE_REASON_SYSTEM_BOOT = 6;
+ ENABLE_DISABLE_REASON_CRASH = 7;
+ ENABLE_DISABLE_REASON_USER_SWITCH = 8;
+ ENABLE_DISABLE_REASON_RESTORE_USER_SETTING = 9;
+}
\ No newline at end of file
diff --git a/core/proto/android/providers/settings.proto b/core/proto/android/providers/settings.proto
index ef6eb09..f78ebca 100644
--- a/core/proto/android/providers/settings.proto
+++ b/core/proto/android/providers/settings.proto
@@ -335,6 +335,7 @@
SettingProto uninstalled_instant_app_min_cache_period = 290;
SettingProto uninstalled_instant_app_max_cache_period = 291;
SettingProto unused_static_shared_lib_min_cache_period = 292;
+ SettingProto hidden_api_blacklist_exemptions = 293;
}
message SecureSettingsProto {
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index fdda55b..6087229 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -86,6 +86,7 @@
<protected-broadcast android:name="android.intent.action.OVERLAY_CHANGED" />
<protected-broadcast android:name="android.intent.action.OVERLAY_REMOVED" />
<protected-broadcast android:name="android.intent.action.OVERLAY_PRIORITY_CHANGED" />
+ <protected-broadcast android:name="android.intent.action.USER_ACTIVITY_NOTIFICATION" />
<protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED" />
<protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGING" />
@@ -173,6 +174,12 @@
<protected-broadcast
android:name="android.bluetooth.headsetclient.profile.action.LAST_VTAG" />
<protected-broadcast
+ android:name="android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED" />
+ <protected-broadcast
+ android:name="android.bluetooth.hearingaid.profile.action.PLAYING_STATE_CHANGED" />
+ <protected-broadcast
+ android:name="android.bluetooth.hearingaid.profile.action.ACTIVE_DEVICE_CHANGED" />
+ <protected-broadcast
android:name="android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED" />
<protected-broadcast
android:name="android.bluetooth.a2dp.profile.action.ACTIVE_DEVICE_CHANGED" />
@@ -950,6 +957,23 @@
android:description="@string/permdesc_manageOwnCalls"
android:protectionLevel="normal" />
+ <!-- Allows a calling app to continue a call which was started in another app. An example is a
+ video calling app that wants to continue a voice call on the user's mobile network.<p>
+ When the handover of a call from one app to another takes place, there are two devices
+ which are involved in the handover; the initiating and receiving devices. The initiating
+ device is where the request to handover the call was started, and the receiving device is
+ where the handover request is confirmed by the other party.<p>
+ This permission protects access to
+ {@link android.telecom.TelecomManager#acceptHandover(Uri, int, PhoneAccountHandle)}, which
+ the receiving side of the handover uses to accept a handover.
+ <p>Protection level: dangerous
+ -->
+ <permission android:name="android.permission.ACCEPT_HANDOVER"
+ android:permissionGroup="android.permission-group.PHONE"
+ android.label="@string/permlab_acceptHandover"
+ android:description="@string/permdesc_acceptHandover"
+ android:protectionLevel="dangerous" />
+
<!-- ====================================================================== -->
<!-- Permissions for accessing the device microphone -->
<!-- ====================================================================== -->
@@ -1287,6 +1311,13 @@
android:label="@string/permlab_changeWifiState"
android:protectionLevel="normal" />
+ <!-- @SystemApi @hide Allows apps to create and manage IPsec tunnels.
+ <p>Only granted to applications that are currently bound by the
+ system for creating and managing IPsec-based interfaces.
+ -->
+ <permission android:name="android.permission.MANAGE_IPSEC_TUNNELS"
+ android:protectionLevel="signature|appop" />
+
<!-- @SystemApi @hide Allows applications to read Wi-Fi credential.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.READ_WIFI_CREDENTIAL"
@@ -1368,6 +1399,11 @@
<permission android:name="android.permission.MANAGE_LOWPAN_INTERFACES"
android:protectionLevel="signature|privileged" />
+ <!-- @hide Allows an app to bypass Private DNS.
+ <p>Not for use by third-party applications. -->
+ <permission android:name="android.permission.NETWORK_BYPASS_PRIVATE_DNS"
+ android:protectionLevel="signature" />
+
<!-- ======================================= -->
<!-- Permissions for short range, peripheral networks -->
<!-- ======================================= -->
@@ -1415,6 +1451,12 @@
android:label="@string/permlab_nfc"
android:protectionLevel="normal" />
+ <!-- Allows applications to receive NFC transaction events.
+ <p>Protection level: normal
+ -->
+ <permission android:name="android.permission.NFC_TRANSACTION_EVENT"
+ android:protectionLevel="normal" />
+
<!-- @SystemApi Allows an internal user to use privileged ConnectivityManager APIs.
@hide -->
<permission android:name="android.permission.CONNECTIVITY_INTERNAL"
@@ -1733,19 +1775,38 @@
<permission android:name="android.permission.BIND_IMS_SERVICE"
android:protectionLevel="signature|privileged" />
- <!-- Allows an application to manage embedded subscriptions (those on a eUICC) through
- EuiccManager APIs.
+ <!-- Must be required by a telephony data service to ensure that only the
+ system can bind to it.
+ <p>Protection level: signature
+ @SystemApi
+ @hide
+ -->
+ <permission android:name="android.permission.BIND_TELEPHONY_DATA_SERVICE"
+ android:protectionLevel="signature" />
+
+ <!-- Must be required by a NetworkService to ensure that only the
+ system can bind to it.
+ <p>Protection level: signature
+ @SystemApi
+ @hide
+ -->
+ <permission android:name="android.permission.BIND_TELEPHONY_NETWORK_SERVICE"
+ android:protectionLevel="signature" />
+
+ <!-- @SystemApi Allows an application to manage embedded subscriptions (those on a eUICC)
+ through EuiccManager APIs.
<p>Protection level: signature|privileged|development
- TODO(b/35851809): Mark this as a SystemApi and remove com. prefix.
- @hide -->
- <permission android:name="com.android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"
+ @hide
+ -->
+ <permission android:name="android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"
android:protectionLevel="signature|privileged|development" />
- <!-- Must be required by an EuiccService to ensure that only the system can bind to it.
+ <!-- @SystemApi Must be required by an EuiccService to ensure that only the system can bind to
+ it.
<p>Protection level: signature
- TODO(b/35851809): Mark this as a SystemApi and remove com. prefix.
- @hide -->
- <permission android:name="com.android.permission.BIND_EUICC_SERVICE"
+ @hide
+ -->
+ <permission android:name="android.permission.BIND_EUICC_SERVICE"
android:protectionLevel="signature" />
<!-- ================================== -->
@@ -3567,6 +3628,11 @@
<permission android:name="android.permission.INSTANT_APP_FOREGROUND_SERVICE"
android:protectionLevel="signature|development|instant|appop" />
+ <!-- @SystemApi Allows an application to read the runtime profiles of other apps.
+ @hide <p>Not for use by third-party applications. -->
+ <permission android:name="android.permission.READ_RUNTIME_PROFILES"
+ android:protectionLevel="signature|privileged" />
+
<application android:process="system"
android:persistent="true"
android:hasCode="false"
@@ -3839,6 +3905,14 @@
</intent-filter>
</receiver>
+ <receiver android:name="com.android.server.updates.CarrierIdInstallReceiver"
+ android:permission="android.permission.UPDATE_CONFIG">
+ <intent-filter>
+ <action android:name="android.os.action.UPDATE_CARRIER_ID_DB" />
+ <data android:scheme="content" android:host="*" android:mimeType="*/*" />
+ </intent-filter>
+ </receiver>
+
<receiver android:name="com.android.server.MasterClearReceiver"
android:permission="android.permission.MASTER_CLEAR">
<intent-filter
diff --git a/core/res/res/values-mcc405/config.xml b/core/res/res/values-mcc405/config.xml
index 6b77e9c..4cadef7 100644
--- a/core/res/res/values-mcc405/config.xml
+++ b/core/res/res/values-mcc405/config.xml
@@ -20,4 +20,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether camera shutter sound is forced or not (country specific). -->
<bool name="config_camera_sound_forced">true</bool>
+ <!-- Show area update info settings in CellBroadcastReceiver and information in SIM status in Settings app -->
+ <bool name="config_showAreaUpdateInfoSettings">true</bool>
</resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 5cc727d..d56c726 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -360,6 +360,25 @@
<!-- Regex of wired ethernet ifaces -->
<string translatable="false" name="config_ethernet_iface_regex">eth\\d</string>
+
+
+ <!-- Configuration of Ethernet interfaces in the following format:
+ <interface name|mac address>;[Network Capabilities];[IP config]
+ Where
+ [Network Capabilities] Optional. A comma seprated list of network capabilities.
+ Values must be from NetworkCapabilities#NET_CAPABILITIES_* constants.
+ [IP config] Optional. If empty or not specified - DHCP will be used, otherwise
+ use the following format to specify static IP configuration:
+ ip=<ip-address/mask> gateway=<ip-address> dns=<comma-sep-ip-addresses>
+ domains=<comma-sep-domains>
+ -->
+ <string-array translatable="false" name="config_ethernet_interfaces">
+ <!--
+ <item>eth1;12,13,14,15;ip=192.168.0.10/24 gateway=192.168.0.1 dns=4.4.4.4,8.8.8.8</item>
+ <item>eth2;;ip=192.168.0.11/24</item>
+ -->
+ </string-array>
+
<!-- If the mobile hotspot feature requires provisioning, a package name and class name
can be provided to launch a supported application that provisions the devices.
@@ -486,11 +505,11 @@
<!-- String containing the apn value for tethering. May be overriden by secure settings
TETHER_DUN_APN. Value is a comma separated series of strings:
"name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type",
- Or string format of ApnSettingV3.
+ Or string format of ApnSettingV3 or higher.
note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN"
Multiple entries are separated by using string-array:
"<item>[ApnSettingV3]Name,apn,,,,,,,,,123,45,,mms|*,IPV6,IP,true,14,,,,,,,spn,testspn</item>
- <item>[ApnSettingV3]Name1,apn2,,,,,,,,,123,46,,mms|*,IPV6,IP,true,12,,,,,,,,</item>" -->
+ <item>[ApnSettingV5]Name1,apn2,,,,,,,,,123,46,,mms|*,IPV6,IP,true,12,,,,,,,,,,</item>" -->
<string-array translatable="false" name="config_tether_apndata">
</string-array>
@@ -1561,6 +1580,9 @@
<!-- Operating volatage for bluetooth controller. 0 by default-->
<integer translatable="false" name="config_bluetooth_operating_voltage_mv">0</integer>
+ <!-- Max number of connected audio devices supported by Bluetooth stack -->
+ <integer name="config_bluetooth_max_connected_audio_devices">5</integer>
+
<!-- Whether supported profiles should be reloaded upon enabling bluetooth -->
<bool name="config_bluetooth_reload_supported_profiles_when_enabled">false</bool>
@@ -2073,6 +2095,9 @@
<!-- Whether UI for multi user should be shown -->
<bool name="config_enableMultiUserUI">false</bool>
+ <!-- Whether the new Auto Selection Network UI should be shown -->
+ <bool name="config_enableNewAutoSelectNetworkUI">false</bool>
+
<!-- If true, then we do not ask user for permission for apps to connect to USB devices.
Do not set this to true for production devices. Doing so will cause you to fail CTS. -->
<bool name="config_disableUsbPermissionDialogs">false</bool>
@@ -2383,6 +2408,32 @@
in the display pipeline plus some slack just to be sure. -->
<integer name="config_drawLockTimeoutMillis">120</integer>
+ <!-- An array of device capabilities defined by GSMA SGP.22 v2.0.
+ The first item is the capability name that the device supports. The second item is the
+ major version. The minor and revision versions are default to 0s.
+ The device capabilities and their definition in the spec are:
+ gsm : gsmSupportedRelease
+ utran : utranSupportedRelease
+ cdma1x : cdma2000onexSupportedRelease
+ hrpd : cdma2000hrpdSupportedRelease
+ ehrpd : cdma2000ehrpdSupportedRelease
+ eutran : eutranSupportedRelease
+ nfc : contactlessSupportedRelease
+ crl : rspCrlSupportedVersion
+ -->
+ <string-array translatable="false" name="config_telephonyEuiccDeviceCapabilities">
+ <!-- Example:
+ <item>"gsm,11"</item>
+ <item>"utran,11"</item>
+ <item>"cdma1x,1"</item>
+ <item>"hrpd,3"</item>
+ <item>"ehrpd,12"</item>
+ <item>"eutran,11"</item>
+ <item>"nfc,1"</item>
+ <item>"crl,1"</item>
+ -->
+ </string-array>
+
<!-- default telephony hardware configuration for this platform.
-->
<!-- this string array should be overridden by the device to present a list
@@ -2468,6 +2519,14 @@
<!-- Flag specifying whether or not IMS will use the dynamic ImsResolver -->
<bool name="config_dynamic_bind_ims">false</bool>
+ <!-- Cellular data service package name to bind to by default. If none is specified in an overlay, an
+ empty string is passed in -->
+ <string name="config_wwan_data_service_package" translatable="false">com.android.phone</string>
+
+ <!-- IWLAN data service package name to bind to by default. If none is specified in an overlay, an
+ empty string is passed in -->
+ <string name="config_wlan_data_service_package" translatable="false"></string>
+
<bool name="config_networkSamplingWakesDevice">true</bool>
<!-- Home (non-roaming) values for CDMA roaming indicator.
@@ -3097,4 +3156,11 @@
<bool name="config_display_no_service_when_sim_unready">false</bool>
<bool name="config_supportBluetoothPersistedState">true</bool>
+
+ <!-- Cellular network service package name to bind to by default. -->
+ <string name="config_wwan_network_service_package" translatable="false">com.android.phone</string>
+
+ <!-- IWLAN network service package name to bind to by default. If none is specified in an overlay, an
+ empty string is passed in -->
+ <string name="config_wlan_network_service_package" translatable="false"></string>
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index befebd9..9e38efe 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -138,25 +138,28 @@
<string name="CLIRPermanent">You can\'t change the caller ID setting.</string>
<!-- Notification title to tell the user that data service is blocked by access control. -->
- <string name="RestrictedOnDataTitle">No data service</string>
+ <string name="RestrictedOnDataTitle">No mobile data service</string>
<!-- Notification title to tell the user that emergency calling is blocked by access control. -->
- <string name="RestrictedOnEmergencyTitle">No emergency calling</string>
+ <string name="RestrictedOnEmergencyTitle">Emergency calling unavailable</string>
<!-- Notification title to tell the user that normal service is blocked by access control. -->
<string name="RestrictedOnNormalTitle">No voice service</string>
<!-- Notification title to tell the user that all emergency and normal voice services are blocked by access control. -->
- <string name="RestrictedOnAllVoiceTitle">No voice/emergency service</string>
+ <string name="RestrictedOnAllVoiceTitle">No voice service or emergency calling</string>
<!-- Notification content to tell the user that voice/data/emergency service is blocked by access control. -->
- <string name="RestrictedStateContent">Temporarily not offered by the mobile network at your location</string>
+ <string name="RestrictedStateContent">Temporarily turned off by your carrier</string>
+
+ <!-- Notification content to tell the user that voice/data/emergency service is blocked by access control when multiple SIMs are active. -->
+ <string name="RestrictedStateContentMsimTemplate">Temporarily turned off by your carrier for SIM <xliff:g id="simNumber" example="1">%d</xliff:g></string>
<!-- Displayed to tell the user that they should switch their network preference. -->
- <string name="NetworkPreferenceSwitchTitle">Can\u2019t reach network</string>
+ <string name="NetworkPreferenceSwitchTitle">Can\u2019t reach mobile network</string>
<!-- Displayed to tell the user that they should switch their network preference. -->
- <string name="NetworkPreferenceSwitchSummary">To improve reception, try changing the type selected at Settings > Network & Internet > Mobile networks > Preferred network type."</string>
+ <string name="NetworkPreferenceSwitchSummary">Try changing preferred network. Tap to change.</string>
<!-- Displayed to tell the user that emergency calls might not be available. -->
- <string name="EmergencyCallWarningTitle">Wi\u2011Fi calling is active</string>
+ <string name="EmergencyCallWarningTitle">Emergency calling unavailable</string>
<!-- Displayed to tell the user that emergency calls might not be available. -->
- <string name="EmergencyCallWarningSummary">Emergency calls require a mobile network.</string>
+ <string name="EmergencyCallWarningSummary">Can\u2019t make emergency calls over Wi\u2011Fi</string>
<!-- Telephony notification channel name for a channel containing network alert notifications. -->
<string name="notification_channel_network_alert">Alerts</string>
@@ -215,14 +218,14 @@
<string name="roamingTextSearching">Searching for Service</string>
<!-- Displayed when WFC registration fails -->
- <string name="wfcRegErrorTitle">Wi-Fi Calling</string>
+ <string name="wfcRegErrorTitle">Couldn\u2019t set up Wi\u2011Fi calling</string>
<!-- WFC Operator Error Messages showed as alerts -->
<string-array name="wfcOperatorErrorAlertMessages">
<item>To make calls and send messages over Wi-Fi, first ask your carrier to set up this service. Then turn on Wi-Fi calling again from Settings. (Error code: <xliff:g id="code" example="REG09 - No 911 Address">%1$s</xliff:g>)</item>
</string-array>
<!-- WFC Operator Error Messages showed as notifications -->
<string-array name="wfcOperatorErrorNotificationMessages">
- <item>Register with your carrier (Error code: <xliff:g id="code" example="REG09 - No 911 Address">%1$s</xliff:g>)</item>
+ <item>Issue registering Wi\u2011Fi calling with your carrier: <xliff:g id="code" example="REG09 - No 911 Address">%1$s</xliff:g></item>
</string-array>
<!-- Template for showing mobile network operator name while WFC is active -->
<string-array name="wfcSpnFormats">
@@ -1076,6 +1079,17 @@
<string name="permdesc_manageOwnCalls">Allows the app to route its calls through the system in
order to improve the calling experience.</string>
+ <!-- Title of an application permission. When granted to a third party app, the user is giving
+ access to the app to continue a call which originated in another app. For example, the
+ user could be in a voice call over their carrier's mobile network, and a third party video
+ calling app wants to continue that voice call as a video call. -->
+ <string name="permlab_acceptHandover">continue a call from another app</string>
+ <!-- Description of an application permission. When granted to a third party app, the user is
+ giving access to the app to continue a call which originated in another app. For example,
+ the user could be in a voice call over their carrier's mobile network, and a third party
+ video calling app wants to continue that voice call as a video call. -->
+ <string name="permdesc_acceptHandover">Allows the app to continue a call which was started in another app.</string>
+
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_readPhoneNumbers">read phone numbers</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
@@ -3451,6 +3465,13 @@
<string name="tethered_notification_title">Tethering or hotspot active</string>
<string name="tethered_notification_message">Tap to set up.</string>
+ <!-- Strings for tether disabling notification -->
+ <!-- This notification is shown when tethering has been disabled on a user's device.
+ The device is managed by the user's employer. Tethering can't be turned on unless the
+ IT administrator allows it. The noun "admin" is another reference for "IT administrator." -->
+ <string name="disable_tether_notification_title">Tethering is disabled</string>
+ <string name="disable_tether_notification_message">Contact your admin for details</string>
+
<!-- Strings for possible PreferenceActivity Back/Next buttons -->
<string name="back_button_label">Back</string>
<string name="next_button_label">Next</string>
@@ -4419,14 +4440,14 @@
<!-- Displayed when the USSD/SS request is modified by STK CC to a
different request. This will be displayed in a toast. -->
- <string name="stk_cc_ussd_to_dial">USSD request is modified to DIAL request.</string>
- <string name="stk_cc_ussd_to_ss">USSD request is modified to SS request.</string>
- <string name="stk_cc_ussd_to_ussd">USSD request is modified to new USSD request.</string>
- <string name="stk_cc_ussd_to_dial_video">USSD request is modified to Video DIAL request.</string>
- <string name="stk_cc_ss_to_dial">SS request is modified to DIAL request.</string>
- <string name="stk_cc_ss_to_dial_video">SS request is modified to Video DIAL request.</string>
- <string name="stk_cc_ss_to_ussd">SS request is modified to USSD request.</string>
- <string name="stk_cc_ss_to_ss">SS request is modified to new SS request.</string>
+ <string name="stk_cc_ussd_to_dial">USSD request changed to regular call</string>
+ <string name="stk_cc_ussd_to_ss">USSD request changed to SS request</string>
+ <string name="stk_cc_ussd_to_ussd">Changed to new USSD request</string>
+ <string name="stk_cc_ussd_to_dial_video">USSD request changed to video call</string>
+ <string name="stk_cc_ss_to_dial">SS request changed to regular call</string>
+ <string name="stk_cc_ss_to_dial_video">SS request changed to video call</string>
+ <string name="stk_cc_ss_to_ussd">SS request changed to USSD request</string>
+ <string name="stk_cc_ss_to_ss">Changed to new SS request</string>
<!-- Content description of the work profile icon in the notification. -->
<string name="notification_work_profile_content_description">Work profile</string>
@@ -4664,11 +4685,17 @@
<!-- Primary ETWS (Earthquake and Tsunami Warning System) default message for others -->
<string name="etws_primary_default_message_others"></string>
- <!-- Title of notification when UE fails to register network with MM reject cause code. -->
- <string name="mmcc_authentication_reject">SIM not allowed</string>
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned</string>
- <string name="mmcc_illegal_ms">SIM not allowed</string>
- <string name="mmcc_illegal_me">Phone not allowed</string>
+ <!-- Title of notification when UE fails CS registration network with MM reject cause code from network. -->
+ <string name="mmcc_authentication_reject">SIM not allowed for voice</string>
+ <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned for voice</string>
+ <string name="mmcc_illegal_ms">SIM not allowed for voice</string>
+ <string name="mmcc_illegal_me">Phone not allowed for voice</string>
+
+ <!-- Title of notification when UE fails to register network with MM reject cause code when multiple SIMs are active. -->
+ <string name="mmcc_authentication_reject_msim_template">SIM <xliff:g id="simNumber" example="1">%d</xliff:g> not allowed</string>
+ <string name="mmcc_imsi_unknown_in_hlr_msim_template">SIM <xliff:g id="simNumber" example="1">%d</xliff:g> not provisioned</string>
+ <string name="mmcc_illegal_ms_msim_template">SIM <xliff:g id="simNumber" example="1">%d</xliff:g> not allowed</string>
+ <string name="mmcc_illegal_me_msim_template">SIM <xliff:g id="simNumber" example="1">%d</xliff:g> not allowed</string>
<!-- Popup window default title to be read by a screen reader-->
<string name="popup_window_default_title">Popup Window</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index fb755a1..e52f0f8 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -264,6 +264,10 @@
<java-symbol type="bool" name="config_mms_content_disposition_support" />
<java-symbol type="string" name="config_ims_package" />
<java-symbol type="bool" name="config_dynamic_bind_ims" />
+ <java-symbol type="string" name="config_wwan_data_service_package" />
+ <java-symbol type="string" name="config_wlan_data_service_package" />
+ <java-symbol type="string" name="config_wwan_network_service_package" />
+ <java-symbol type="string" name="config_wlan_network_service_package" />
<java-symbol type="bool" name="config_networkSamplingWakesDevice" />
<java-symbol type="bool" name="config_showMenuShortcutsWhenKeyboardPresent" />
<java-symbol type="bool" name="config_sip_wifi_only" />
@@ -307,6 +311,7 @@
<java-symbol type="bool" name="config_forceDefaultOrientation" />
<java-symbol type="bool" name="config_wifi_batched_scan_supported" />
<java-symbol type="bool" name="config_enableMultiUserUI"/>
+ <java-symbol type="bool" name="config_enableNewAutoSelectNetworkUI"/>
<java-symbol type="bool" name="config_disableUsbPermissionDialogs"/>
<java-symbol type="bool" name="config_hasRecents" />
<java-symbol type="bool" name="config_windowShowCircularMask" />
@@ -391,6 +396,7 @@
<java-symbol type="integer" name="config_wifi_framework_current_network_boost" />
<java-symbol type="integer" name="config_bluetooth_max_advertisers" />
<java-symbol type="integer" name="config_bluetooth_max_scan_filters" />
+ <java-symbol type="integer" name="config_bluetooth_max_connected_audio_devices" />
<java-symbol type="integer" name="config_burnInProtectionMinHorizontalOffset" />
<java-symbol type="integer" name="config_burnInProtectionMaxHorizontalOffset" />
<java-symbol type="integer" name="config_burnInProtectionMinVerticalOffset" />
@@ -541,6 +547,7 @@
<java-symbol type="string" name="RestrictedOnEmergencyTitle" />
<java-symbol type="string" name="RestrictedOnNormalTitle" />
<java-symbol type="string" name="RestrictedStateContent" />
+ <java-symbol type="string" name="RestrictedStateContentMsimTemplate" />
<java-symbol type="string" name="notification_channel_network_alert" />
<java-symbol type="string" name="notification_channel_call_forward" />
<java-symbol type="string" name="notification_channel_emergency_callback" />
@@ -634,6 +641,7 @@
<java-symbol type="string" name="chooseActivity" />
<java-symbol type="string" name="config_default_dns_server" />
<java-symbol type="string" name="config_ethernet_iface_regex" />
+ <java-symbol type="array" name="config_ethernet_interfaces" />
<java-symbol type="string" name="config_forceVoiceInteractionServicePackage" />
<java-symbol type="string" name="config_mms_user_agent" />
<java-symbol type="string" name="config_mms_user_agent_profile_url" />
@@ -1190,6 +1198,7 @@
<java-symbol type="array" name="config_disabledUntilUsedPreinstalledCarrierApps" />
<java-symbol type="array" name="config_callBarringMMI" />
<java-symbol type="array" name="config_globalActionsList" />
+ <java-symbol type="array" name="config_telephonyEuiccDeviceCapabilities" />
<java-symbol type="array" name="config_telephonyHardware" />
<java-symbol type="array" name="config_keySystemUuidMapping" />
<java-symbol type="array" name="config_gpsParameters" />
@@ -1948,6 +1957,10 @@
<java-symbol type="string" name="mmcc_imsi_unknown_in_hlr" />
<java-symbol type="string" name="mmcc_illegal_ms" />
<java-symbol type="string" name="mmcc_illegal_me" />
+ <java-symbol type="string" name="mmcc_authentication_reject_msim_template" />
+ <java-symbol type="string" name="mmcc_imsi_unknown_in_hlr_msim_template" />
+ <java-symbol type="string" name="mmcc_illegal_ms_msim_template" />
+ <java-symbol type="string" name="mmcc_illegal_me_msim_template" />
<java-symbol type="string" name="notification_listener_binding_label" />
<java-symbol type="string" name="vr_listener_binding_label" />
<java-symbol type="string" name="condition_provider_service_binding_label" />
@@ -1960,6 +1973,8 @@
<java-symbol type="string" name="smv_process" />
<java-symbol type="string" name="tethered_notification_message" />
<java-symbol type="string" name="tethered_notification_title" />
+ <java-symbol type="string" name="disable_tether_notification_message" />
+ <java-symbol type="string" name="disable_tether_notification_title" />
<java-symbol type="string" name="adb_debugging_notification_channel_tv" />
<java-symbol type="string" name="usb_accessory_notification_title" />
<java-symbol type="string" name="usb_mtp_notification_title" />
diff --git a/core/res/res/xml/sms_short_codes.xml b/core/res/res/xml/sms_short_codes.xml
index f5b350b..fb78b3b 100644
--- a/core/res/res/xml/sms_short_codes.xml
+++ b/core/res/res/xml/sms_short_codes.xml
@@ -34,7 +34,7 @@
http://smscoin.net/software/engine/WordPress/Paid+SMS-registration/ -->
<!-- Arab Emirates -->
- <shortcode country="ae" free="3214|1017" />
+ <shortcode country="ae" pattern="\\d{1,5}" free="3214|1017" />
<!-- Albania: 5 digits, known short codes listed -->
<shortcode country="al" pattern="\\d{5}" premium="15191|55[56]00" />
@@ -61,7 +61,7 @@
<shortcode country="bh" pattern="\\d{1,5}" free="81181" />
<!-- Brazil: 1-5 digits (standard system default, not country specific) -->
- <shortcode country="br" pattern="\\d{1,5}" free="6000[012]\\d|876|5500|9963" />
+ <shortcode country="br" pattern="\\d{1,5}" free="6000[012]\\d|876|5500|9963|4141|8000" />
<!-- Belarus: 4 digits -->
<shortcode country="by" pattern="\\d{4}" premium="3336|4161|444[4689]|501[34]|7781" />
@@ -73,14 +73,14 @@
<shortcode country="ch" pattern="[2-9]\\d{2,4}" premium="543|83111|30118" free="98765" />
<!-- Chile: 4-5 digits (not confirmed), known premium codes listed -->
- <shortcode country="cl" pattern="\\d{4,5}" free="9963" />
+ <shortcode country="cl" pattern="\\d{4,5}" free="9963|9240" />
<!-- China: premium shortcodes start with "1066", free shortcodes start with "1065":
http://clients.txtnation.com/entries/197192-china-premium-sms-short-code-requirements -->
<shortcode country="cn" premium="1066.*" free="1065.*" />
<!-- Colombia: 1-6 digits (not confirmed) -->
- <shortcode country="co" pattern="\\d{1,6}" free="890350" />
+ <shortcode country="co" pattern="\\d{1,6}" free="890350|908160" />
<!-- Cyprus: 4-6 digits (not confirmed), known premium codes listed, plus EU -->
<shortcode country="cy" pattern="\\d{4,6}" premium="7510" free="116\\d{3}" />
@@ -104,7 +104,7 @@
<shortcode country="es" premium="[23][57]\\d{3}|280\\d{2}|[79]9[57]\\d{3}" free="116\\d{3}|22791|222145|22189" />
<!-- Finland: 5-6 digits, premium 0600, 0700: http://en.wikipedia.org/wiki/Telephone_numbers_in_Finland -->
- <shortcode country="fi" pattern="\\d{5,6}" premium="0600.*|0700.*|171(?:59|63)" free="116\\d{3}|14789" />
+ <shortcode country="fi" pattern="\\d{5,6}" premium="0600.*|0700.*|171(?:59|63)" free="116\\d{3}|14789|17110" />
<!-- France: 5 digits, free: 3xxxx, premium [4-8]xxxx, plus EU:
http://clients.txtnation.com/entries/161972-france-premium-sms-short-code-requirements,
@@ -126,7 +126,7 @@
<shortcode country="gr" pattern="\\d{5}" premium="54\\d{3}|19[0-5]\\d{2}" free="116\\d{3}|12115" />
<!-- Croatia -->
- <shortcode country="hr" free="13062" />
+ <shortcode country="hr" pattern="\\d{1,5}" free="13062" />
<!-- Hungary: 4 or 10 digits starting with 1 or 0, plus EU:
http://clients.txtnation.com/entries/209633-hungary-premium-sms-short-code-regulations -->
@@ -136,7 +136,7 @@
<shortcode country="in" pattern="\\d{1,5}" free="59336|53969" />
<!-- Indonesia: 1-5 digits (standard system default, not country specific) -->
- <shortcode country="id" pattern="\\d{1,5}" free="99477|6006|46645" />
+ <shortcode country="id" pattern="\\d{1,5}" free="99477|6006|46645|363" />
<!-- Ireland: 5 digits, 5xxxx (50xxx=free, 5[12]xxx=standard), plus EU:
http://www.comreg.ie/_fileupload/publications/ComReg1117.pdf -->
@@ -150,7 +150,7 @@
<shortcode country="it" pattern="\\d{5}" premium="4\\d{4}" free="116\\d{3}|4112503" standard="43\\d{3}" />
<!-- Japan: 8083 used by SOFTBANK_DCB_2 -->
- <shortcode country="jp" free="8083" />
+ <shortcode country="jp" pattern="\\d{1,5}" free="8083" />
<!-- Kenya: 5 digits, known premium codes listed -->
<shortcode country="ke" pattern="\\d{5}" free="21725" />
@@ -165,10 +165,10 @@
<shortcode country="kz" pattern="\\d{4}" premium="335[02]|4161|444[469]|77[2359]0|8444|919[3-5]|968[2-5]" />
<!-- Kuwait: 1-5 digits (standard system default, not country specific) -->
- <shortcode country="kw" pattern="\\d{1,5}" free="1378|50420|94006" />
+ <shortcode country="kw" pattern="\\d{1,5}" free="1378|50420|94006|55991" />
<!-- Lithuania: 3-5 digits, known premium codes listed, plus EU -->
- <shortcode country="lt" pattern="\\d{3,5}" premium="13[89]1|1394|16[34]5" free="116\\d{3}|1399" />
+ <shortcode country="lt" pattern="\\d{3,5}" premium="13[89]1|1394|16[34]5" free="116\\d{3}|1399|1324" />
<!-- Luxembourg: 5 digits, 6xxxx, plus EU:
http://www.luxgsm.lu/assets/files/filepage/file_1253803400.pdf -->
@@ -190,7 +190,7 @@
<shortcode country="nl" pattern="\\d{4}" premium="4466|5040" free="116\\d{3}|2223|6225|2223" />
<!-- Norway: 4-5 digits (not confirmed), known premium codes listed -->
- <shortcode country="no" pattern="\\d{4,5}" premium="2201|222[67]" />
+ <shortcode country="no" pattern="\\d{4,5}" premium="2201|222[67]" free="2171" />
<!-- New Zealand: 3-4 digits, known premium codes listed -->
<shortcode country="nz" pattern="\\d{3,4}" premium="3903|8995|4679" free="3067|3068|4053" />
@@ -199,10 +199,10 @@
<shortcode country="pe" pattern="\\d{4,5}" free="9963" />
<!-- Philippines -->
- <shortcode country="ph" free="2147|5495|5496" />
+ <shortcode country="ph" pattern="\\d{1,5}" free="2147|5495|5496" />
<!-- Pakistan -->
- <shortcode country="pk" free="2057" />
+ <shortcode country="pk" pattern="\\d{1,5}" free="2057" />
<!-- Poland: 4-5 digits (not confirmed), known premium codes listed, plus EU -->
<shortcode country="pl" pattern="\\d{4,5}" premium="74240|79(?:10|866)|92525" free="116\\d{3}|8012|80921" />
@@ -224,7 +224,7 @@
<shortcode country="ru" pattern="\\d{4}" premium="1(?:1[56]1|899)|2(?:09[57]|322|47[46]|880|990)|3[589]33|4161|44(?:4[3-9]|81)|77(?:33|81)|8424" free="6954|8501" standard="2037|2044"/>
<!-- Saudi Arabia -->
- <shortcode country="sa" free="8145" />
+ <shortcode country="sa" pattern="\\d{1,5}" free="8145" />
<!-- Sweden: 5 digits (72xxx), plus EU: http://www.viatel.se/en/premium-sms/ -->
<shortcode country="se" premium="72\\d{3}" free="116\\d{3}" />
@@ -240,13 +240,13 @@
<shortcode country="sk" premium="\\d{4}" free="116\\d{3}|8000" />
<!-- Thailand: 4186001 used by AIS_TH_DCB -->
- <shortcode country="th" free="4186001" />
+ <shortcode country="th" pattern="\\d{1,5}" premium="4\\d{6}" free="4186001" />
<!-- Tajikistan: 4 digits, known premium codes listed -->
<shortcode country="tj" pattern="\\d{4}" premium="11[3-7]1|4161|4333|444[689]" />
<!-- Turkey -->
- <shortcode country="tr" free="7529|5528|6493" />
+ <shortcode country="tr" pattern="\\d{1,5}" free="7529|5528|6493" />
<!-- Ukraine: 4 digits, known premium codes listed -->
<shortcode country="ua" pattern="\\d{4}" premium="444[3-9]|70[579]4|7540" />
diff --git a/core/tests/BTtraffic/Android.mk b/core/tests/BTtraffic/Android.mk
index 7d83527..f826ae9 100644
--- a/core/tests/BTtraffic/Android.mk
+++ b/core/tests/BTtraffic/Android.mk
@@ -9,6 +9,7 @@
$(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := bttraffic
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/core/tests/BroadcastRadioTests/Android.mk b/core/tests/BroadcastRadioTests/Android.mk
index c409e3a..69bae86 100644
--- a/core/tests/BroadcastRadioTests/Android.mk
+++ b/core/tests/BroadcastRadioTests/Android.mk
@@ -23,6 +23,7 @@
LOCAL_MODULE_TAGS := tests
# TODO(b/13282254): uncomment when b/13282254 is fixed
# LOCAL_SDK_VERSION := current
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util android-support-test testng
diff --git a/core/tests/ConnectivityManagerTest/Android.mk b/core/tests/ConnectivityManagerTest/Android.mk
index 39cf4a4..93c53d2 100644
--- a/core/tests/ConnectivityManagerTest/Android.mk
+++ b/core/tests/ConnectivityManagerTest/Android.mk
@@ -25,6 +25,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := ConnectivityManagerTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
diff --git a/core/tests/SvcMonitor/Android.mk b/core/tests/SvcMonitor/Android.mk
index 2b80455..94ddccb 100644
--- a/core/tests/SvcMonitor/Android.mk
+++ b/core/tests/SvcMonitor/Android.mk
@@ -9,6 +9,7 @@
$(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := svcmonitor
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/core/tests/bandwidthtests/Android.mk b/core/tests/bandwidthtests/Android.mk
index 2af92df..56526bc 100644
--- a/core/tests/bandwidthtests/Android.mk
+++ b/core/tests/bandwidthtests/Android.mk
@@ -25,6 +25,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner org.apache.http.legacy
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := BandwidthTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/core/tests/benchmarks/src/com/android/internal/net/NetworkStatsFactoryBenchmark.java b/core/tests/benchmarks/src/com/android/internal/net/NetworkStatsFactoryBenchmark.java
index e62fbd65..c213464 100644
--- a/core/tests/benchmarks/src/com/android/internal/net/NetworkStatsFactoryBenchmark.java
+++ b/core/tests/benchmarks/src/com/android/internal/net/NetworkStatsFactoryBenchmark.java
@@ -53,7 +53,7 @@
stats, mStats.getAbsolutePath(), NetworkStats.UID_ALL,
// Looks like this was broken by change d0c5b9abed60b7bc056d026bf0f2b2235410fb70
// Fixed compilation problem but needs addressing properly.
- new String[0], 999);
+ new String[0], 999, false);
}
}
}
diff --git a/core/tests/bluetoothtests/Android.mk b/core/tests/bluetoothtests/Android.mk
index f53419a..41582de 100644
--- a/core/tests/bluetoothtests/Android.mk
+++ b/core/tests/bluetoothtests/Android.mk
@@ -11,6 +11,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := BluetoothTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecConfigTest.java b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecConfigTest.java
new file mode 100644
index 0000000..59b4665
--- /dev/null
+++ b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecConfigTest.java
@@ -0,0 +1,327 @@
+/*
+ * Copyright 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.
+ */
+
+package android.bluetooth;
+
+import android.test.suitebuilder.annotation.SmallTest;
+import android.util.Log;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit test cases for {@link BluetoothCodecConfig}.
+ * <p>
+ * To run this test, use:
+ * runtest --path core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecConfigTest.java
+ */
+public class BluetoothCodecConfigTest extends TestCase {
+ private static final int[] kCodecTypeArray = new int[] {
+ BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
+ BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX,
+ BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD,
+ BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
+ BluetoothCodecConfig.SOURCE_CODEC_TYPE_MAX,
+ BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID,
+ };
+ private static final int[] kCodecPriorityArray = new int[] {
+ BluetoothCodecConfig.CODEC_PRIORITY_DISABLED,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST,
+ };
+ private static final int[] kSampleRateArray = new int[] {
+ BluetoothCodecConfig.SAMPLE_RATE_NONE,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.SAMPLE_RATE_88200,
+ BluetoothCodecConfig.SAMPLE_RATE_96000,
+ BluetoothCodecConfig.SAMPLE_RATE_176400,
+ BluetoothCodecConfig.SAMPLE_RATE_192000,
+ };
+ private static final int[] kBitsPerSampleArray = new int[] {
+ BluetoothCodecConfig.BITS_PER_SAMPLE_NONE,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_32,
+ };
+ private static final int[] kChannelModeArray = new int[] {
+ BluetoothCodecConfig.CHANNEL_MODE_NONE,
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ };
+ private static final long[] kCodecSpecific1Array = new long[] { 1000, 1001, 1002, 1003, };
+ private static final long[] kCodecSpecific2Array = new long[] { 2000, 2001, 2002, 2003, };
+ private static final long[] kCodecSpecific3Array = new long[] { 3000, 3001, 3002, 3003, };
+ private static final long[] kCodecSpecific4Array = new long[] { 4000, 4001, 4002, 4003, };
+
+ private static final int kTotalConfigs = kCodecTypeArray.length * kCodecPriorityArray.length *
+ kSampleRateArray.length * kBitsPerSampleArray.length * kChannelModeArray.length *
+ kCodecSpecific1Array.length * kCodecSpecific2Array.length * kCodecSpecific3Array.length *
+ kCodecSpecific4Array.length;
+
+ private int selectCodecType(int configId) {
+ int left = kCodecTypeArray.length;
+ int right = kTotalConfigs / left;
+ int index = configId / right;
+ index = index % kCodecTypeArray.length;
+ return kCodecTypeArray[index];
+ }
+
+ private int selectCodecPriority(int configId) {
+ int left = kCodecTypeArray.length * kCodecPriorityArray.length;
+ int right = kTotalConfigs / left;
+ int index = configId / right;
+ index = index % kCodecPriorityArray.length;
+ return kCodecPriorityArray[index];
+ }
+
+ private int selectSampleRate(int configId) {
+ int left = kCodecTypeArray.length * kCodecPriorityArray.length * kSampleRateArray.length;
+ int right = kTotalConfigs / left;
+ int index = configId / right;
+ index = index % kSampleRateArray.length;
+ return kSampleRateArray[index];
+ }
+
+ private int selectBitsPerSample(int configId) {
+ int left = kCodecTypeArray.length * kCodecPriorityArray.length * kSampleRateArray.length *
+ kBitsPerSampleArray.length;
+ int right = kTotalConfigs / left;
+ int index = configId / right;
+ index = index % kBitsPerSampleArray.length;
+ return kBitsPerSampleArray[index];
+ }
+
+ private int selectChannelMode(int configId) {
+ int left = kCodecTypeArray.length * kCodecPriorityArray.length * kSampleRateArray.length *
+ kBitsPerSampleArray.length * kChannelModeArray.length;
+ int right = kTotalConfigs / left;
+ int index = configId / right;
+ index = index % kChannelModeArray.length;
+ return kChannelModeArray[index];
+ }
+
+ private long selectCodecSpecific1(int configId) {
+ int left = kCodecTypeArray.length * kCodecPriorityArray.length * kSampleRateArray.length *
+ kBitsPerSampleArray.length * kChannelModeArray.length * kCodecSpecific1Array.length;
+ int right = kTotalConfigs / left;
+ int index = configId / right;
+ index = index % kCodecSpecific1Array.length;
+ return kCodecSpecific1Array[index];
+ }
+
+ private long selectCodecSpecific2(int configId) {
+ int left = kCodecTypeArray.length * kCodecPriorityArray.length * kSampleRateArray.length *
+ kBitsPerSampleArray.length * kChannelModeArray.length * kCodecSpecific1Array.length *
+ kCodecSpecific2Array.length;
+ int right = kTotalConfigs / left;
+ int index = configId / right;
+ index = index % kCodecSpecific2Array.length;
+ return kCodecSpecific2Array[index];
+ }
+
+ private long selectCodecSpecific3(int configId) {
+ int left = kCodecTypeArray.length * kCodecPriorityArray.length * kSampleRateArray.length *
+ kBitsPerSampleArray.length * kChannelModeArray.length * kCodecSpecific1Array.length *
+ kCodecSpecific2Array.length * kCodecSpecific3Array.length;
+ int right = kTotalConfigs / left;
+ int index = configId / right;
+ index = index % kCodecSpecific3Array.length;
+ return kCodecSpecific3Array[index];
+ }
+
+ private long selectCodecSpecific4(int configId) {
+ int left = kCodecTypeArray.length * kCodecPriorityArray.length * kSampleRateArray.length *
+ kBitsPerSampleArray.length * kChannelModeArray.length * kCodecSpecific1Array.length *
+ kCodecSpecific2Array.length * kCodecSpecific3Array.length *
+ kCodecSpecific4Array.length;
+ int right = kTotalConfigs / left;
+ int index = configId / right;
+ index = index % kCodecSpecific4Array.length;
+ return kCodecSpecific4Array[index];
+ }
+
+ @SmallTest
+ public void testBluetoothCodecConfig_valid_get_methods() {
+
+ for (int config_id = 0; config_id < kTotalConfigs; config_id++) {
+ int codec_type = selectCodecType(config_id);
+ int codec_priority = selectCodecPriority(config_id);
+ int sample_rate = selectSampleRate(config_id);
+ int bits_per_sample = selectBitsPerSample(config_id);
+ int channel_mode = selectChannelMode(config_id);
+ long codec_specific1 = selectCodecSpecific1(config_id);
+ long codec_specific2 = selectCodecSpecific2(config_id);
+ long codec_specific3 = selectCodecSpecific3(config_id);
+ long codec_specific4 = selectCodecSpecific4(config_id);
+
+ BluetoothCodecConfig bcc = new BluetoothCodecConfig(codec_type, codec_priority,
+ sample_rate, bits_per_sample,
+ channel_mode, codec_specific1,
+ codec_specific2, codec_specific3,
+ codec_specific4);
+ if (sample_rate == BluetoothCodecConfig.SAMPLE_RATE_NONE) {
+ assertFalse(bcc.isValid());
+ } else if (bits_per_sample == BluetoothCodecConfig.BITS_PER_SAMPLE_NONE) {
+ assertFalse(bcc.isValid());
+ } else if (channel_mode == BluetoothCodecConfig.CHANNEL_MODE_NONE) {
+ assertFalse(bcc.isValid());
+ } else {
+ assertTrue(bcc.isValid());
+ }
+
+ if (codec_type == BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC) {
+ assertTrue(bcc.isMandatoryCodec());
+ } else {
+ assertFalse(bcc.isMandatoryCodec());
+ }
+
+ if (codec_type == BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC) {
+ assertEquals("SBC", bcc.getCodecName());
+ }
+ if (codec_type == BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC) {
+ assertEquals("AAC", bcc.getCodecName());
+ }
+ if (codec_type == BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX) {
+ assertEquals("aptX", bcc.getCodecName());
+ }
+ if (codec_type == BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD) {
+ assertEquals("aptX HD", bcc.getCodecName());
+ }
+ if (codec_type == BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC) {
+ assertEquals("LDAC", bcc.getCodecName());
+ }
+ if (codec_type == BluetoothCodecConfig.SOURCE_CODEC_TYPE_MAX) {
+ assertEquals("UNKNOWN CODEC(" + BluetoothCodecConfig.SOURCE_CODEC_TYPE_MAX + ")",
+ bcc.getCodecName());
+ }
+ if (codec_type == BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID) {
+ assertEquals("INVALID CODEC", bcc.getCodecName());
+ }
+
+ assertEquals(codec_type, bcc.getCodecType());
+ assertEquals(codec_priority, bcc.getCodecPriority());
+ assertEquals(sample_rate, bcc.getSampleRate());
+ assertEquals(bits_per_sample, bcc.getBitsPerSample());
+ assertEquals(channel_mode, bcc.getChannelMode());
+ assertEquals(codec_specific1, bcc.getCodecSpecific1());
+ assertEquals(codec_specific2, bcc.getCodecSpecific2());
+ assertEquals(codec_specific3, bcc.getCodecSpecific3());
+ assertEquals(codec_specific4, bcc.getCodecSpecific4());
+ }
+ }
+
+ @SmallTest
+ public void testBluetoothCodecConfig_equals() {
+ BluetoothCodecConfig bcc1 =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ BluetoothCodecConfig bcc2_same =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+ assertTrue(bcc1.equals(bcc2_same));
+
+ BluetoothCodecConfig bcc3_codec_type =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+ assertFalse(bcc1.equals(bcc3_codec_type));
+
+ BluetoothCodecConfig bcc4_codec_priority =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+ assertFalse(bcc1.equals(bcc4_codec_priority));
+
+ BluetoothCodecConfig bcc5_sample_rate =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+ assertFalse(bcc1.equals(bcc5_sample_rate));
+
+ BluetoothCodecConfig bcc6_bits_per_sample =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+ assertFalse(bcc1.equals(bcc6_bits_per_sample));
+
+ BluetoothCodecConfig bcc7_channel_mode =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+ assertFalse(bcc1.equals(bcc7_channel_mode));
+
+ BluetoothCodecConfig bcc8_codec_specific1 =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1001, 2000, 3000, 4000);
+ assertFalse(bcc1.equals(bcc8_codec_specific1));
+
+ BluetoothCodecConfig bcc9_codec_specific2 =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2002, 3000, 4000);
+ assertFalse(bcc1.equals(bcc9_codec_specific2));
+
+ BluetoothCodecConfig bcc10_codec_specific3 =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3003, 4000);
+ assertFalse(bcc1.equals(bcc10_codec_specific3));
+
+ BluetoothCodecConfig bcc11_codec_specific4 =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4004);
+ assertFalse(bcc1.equals(bcc11_codec_specific4));
+ }
+}
diff --git a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecStatusTest.java b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecStatusTest.java
new file mode 100644
index 0000000..83bf2ed
--- /dev/null
+++ b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecStatusTest.java
@@ -0,0 +1,468 @@
+/*
+ * Copyright 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.
+ */
+
+package android.bluetooth;
+
+import android.test.suitebuilder.annotation.SmallTest;
+import android.util.Log;
+
+import java.util.Arrays;
+import java.util.Objects;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit test cases for {@link BluetoothCodecStatus}.
+ * <p>
+ * To run this test, use:
+ * runtest --path core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecStatusTest.java
+ */
+public class BluetoothCodecStatusTest extends TestCase {
+
+ // Codec configs: A and B are same; C is different
+ private static final BluetoothCodecConfig config_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig config_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig config_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ // Local capabilities: A and B are same; C is different
+ private static final BluetoothCodecConfig local_capability1_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability1_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability1_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+
+ private static final BluetoothCodecConfig local_capability2_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability2_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability2_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability3_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability3_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability3_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability4_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability4_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability4_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability5_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000 |
+ BluetoothCodecConfig.SAMPLE_RATE_88200 |
+ BluetoothCodecConfig.SAMPLE_RATE_96000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_32,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability5_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000 |
+ BluetoothCodecConfig.SAMPLE_RATE_88200 |
+ BluetoothCodecConfig.SAMPLE_RATE_96000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_32,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig local_capability5_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000 |
+ BluetoothCodecConfig.SAMPLE_RATE_88200 |
+ BluetoothCodecConfig.SAMPLE_RATE_96000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_32,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+
+ // Selectable capabilities: A and B are same; C is different
+ private static final BluetoothCodecConfig selectable_capability1_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability1_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability1_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability2_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability2_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability2_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability3_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability3_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability3_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability4_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability4_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability4_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability5_A =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000 |
+ BluetoothCodecConfig.SAMPLE_RATE_88200 |
+ BluetoothCodecConfig.SAMPLE_RATE_96000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_32,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability5_B =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000 |
+ BluetoothCodecConfig.SAMPLE_RATE_88200 |
+ BluetoothCodecConfig.SAMPLE_RATE_96000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_32,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO |
+ BluetoothCodecConfig.CHANNEL_MODE_MONO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig selectable_capability5_C =
+ new BluetoothCodecConfig(BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
+ BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
+ BluetoothCodecConfig.SAMPLE_RATE_44100 |
+ BluetoothCodecConfig.SAMPLE_RATE_48000 |
+ BluetoothCodecConfig.SAMPLE_RATE_88200 |
+ BluetoothCodecConfig.SAMPLE_RATE_96000,
+ BluetoothCodecConfig.BITS_PER_SAMPLE_16 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_24 |
+ BluetoothCodecConfig.BITS_PER_SAMPLE_32,
+ BluetoothCodecConfig.CHANNEL_MODE_STEREO,
+ 1000, 2000, 3000, 4000);
+
+ private static final BluetoothCodecConfig[] local_capability_A = {
+ local_capability1_A,
+ local_capability2_A,
+ local_capability3_A,
+ local_capability4_A,
+ local_capability5_A,
+ };
+
+ private static final BluetoothCodecConfig[] local_capability_B = {
+ local_capability1_B,
+ local_capability2_B,
+ local_capability3_B,
+ local_capability4_B,
+ local_capability5_B,
+ };
+
+ private static final BluetoothCodecConfig[] local_capability_B_reordered = {
+ local_capability5_B,
+ local_capability4_B,
+ local_capability2_B,
+ local_capability3_B,
+ local_capability1_B,
+ };
+
+ private static final BluetoothCodecConfig[] local_capability_C = {
+ local_capability1_C,
+ local_capability2_C,
+ local_capability3_C,
+ local_capability4_C,
+ local_capability5_C,
+ };
+
+ private static final BluetoothCodecConfig[] selectable_capability_A = {
+ selectable_capability1_A,
+ selectable_capability2_A,
+ selectable_capability3_A,
+ selectable_capability4_A,
+ selectable_capability5_A,
+ };
+
+ private static final BluetoothCodecConfig[] selectable_capability_B = {
+ selectable_capability1_B,
+ selectable_capability2_B,
+ selectable_capability3_B,
+ selectable_capability4_B,
+ selectable_capability5_B,
+ };
+
+ private static final BluetoothCodecConfig[] selectable_capability_B_reordered = {
+ selectable_capability5_B,
+ selectable_capability4_B,
+ selectable_capability2_B,
+ selectable_capability3_B,
+ selectable_capability1_B,
+ };
+
+ private static final BluetoothCodecConfig[] selectable_capability_C = {
+ selectable_capability1_C,
+ selectable_capability2_C,
+ selectable_capability3_C,
+ selectable_capability4_C,
+ selectable_capability5_C,
+ };
+
+ private static final BluetoothCodecStatus bcs_A =
+ new BluetoothCodecStatus(config_A, local_capability_A, selectable_capability_A);
+ private static final BluetoothCodecStatus bcs_B =
+ new BluetoothCodecStatus(config_B, local_capability_B, selectable_capability_B);
+ private static final BluetoothCodecStatus bcs_B_reordered =
+ new BluetoothCodecStatus(config_B, local_capability_B_reordered,
+ selectable_capability_B_reordered);
+ private static final BluetoothCodecStatus bcs_C =
+ new BluetoothCodecStatus(config_C, local_capability_C, selectable_capability_C);
+
+ @SmallTest
+ public void testBluetoothCodecStatus_get_methods() {
+
+ assertTrue(Objects.equals(bcs_A.getCodecConfig(), config_A));
+ assertTrue(Objects.equals(bcs_A.getCodecConfig(), config_B));
+ assertFalse(Objects.equals(bcs_A.getCodecConfig(), config_C));
+
+ assertTrue(Arrays.equals(bcs_A.getCodecsLocalCapabilities(), local_capability_A));
+ assertTrue(Arrays.equals(bcs_A.getCodecsLocalCapabilities(), local_capability_B));
+ assertFalse(Arrays.equals(bcs_A.getCodecsLocalCapabilities(), local_capability_C));
+
+ assertTrue(Arrays.equals(bcs_A.getCodecsSelectableCapabilities(),
+ selectable_capability_A));
+ assertTrue(Arrays.equals(bcs_A.getCodecsSelectableCapabilities(),
+ selectable_capability_B));
+ assertFalse(Arrays.equals(bcs_A.getCodecsSelectableCapabilities(),
+ selectable_capability_C));
+ }
+
+ @SmallTest
+ public void testBluetoothCodecStatus_equals() {
+ assertTrue(bcs_A.equals(bcs_B));
+ assertTrue(bcs_B.equals(bcs_A));
+ assertTrue(bcs_A.equals(bcs_B_reordered));
+ assertTrue(bcs_B_reordered.equals(bcs_A));
+ assertFalse(bcs_A.equals(bcs_C));
+ assertFalse(bcs_C.equals(bcs_A));
+ }
+}
diff --git a/core/tests/coretests/Android.mk b/core/tests/coretests/Android.mk
index dbc9e5d..a97e79b 100644
--- a/core/tests/coretests/Android.mk
+++ b/core/tests/coretests/Android.mk
@@ -40,6 +40,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner conscrypt telephony-common org.apache.http.legacy
LOCAL_PACKAGE_NAME := FrameworksCoreTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
@@ -48,6 +49,13 @@
FrameworkCoreTests_intermediates := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME))/test_apks/res
LOCAL_RESOURCE_DIR := $(FrameworkCoreTests_intermediates) $(LOCAL_PATH)/res
+# Disable AAPT2 because the hacks below depend on the AAPT rules implementation
+LOCAL_USE_AAPT2 := false
+# When AAPT2 is enabled it will need --warn-manifest-validation to fix:
+# frameworks/base/core/tests/coretests/AndroidManifest.xml:26: error: unknown element <meta-data> found.
+# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
+# LOCAL_AAPT_FLAGS += --warn-manifest-validation
+
include $(BUILD_PACKAGE)
# Rules to copy all the test apks to the intermediate raw resource directory
FrameworkCoreTests_all_apks_res := $(addprefix $(FrameworkCoreTests_intermediates)/raw/, \
diff --git a/core/tests/coretests/AndroidManifest.xml b/core/tests/coretests/AndroidManifest.xml
index ab9912a..c0a8acd 100644
--- a/core/tests/coretests/AndroidManifest.xml
+++ b/core/tests/coretests/AndroidManifest.xml
@@ -1041,6 +1041,13 @@
</intent-filter>
</activity>
+ <activity android:name="android.view.menu.ContextMenuActivity" android:label="ContextMenu" android:theme="@android:style/Theme.Material">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
+ </intent-filter>
+ </activity>
+
<activity android:name="android.view.menu.MenuWith1Item" android:label="MenuWith1Item">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/core/tests/coretests/DisabledTestApp/Android.mk b/core/tests/coretests/DisabledTestApp/Android.mk
index a5daedf..e4304f7 100644
--- a/core/tests/coretests/DisabledTestApp/Android.mk
+++ b/core/tests/coretests/DisabledTestApp/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := DisabledTestApp
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/core/tests/coretests/EnabledTestApp/Android.mk b/core/tests/coretests/EnabledTestApp/Android.mk
index 4b986d3..cd37f08 100644
--- a/core/tests/coretests/EnabledTestApp/Android.mk
+++ b/core/tests/coretests/EnabledTestApp/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := EnabledTestApp
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/core/tests/coretests/apks/FrameworkCoreTests_apk.mk b/core/tests/coretests/apks/FrameworkCoreTests_apk.mk
index 1e03270..8a7d72a5 100644
--- a/core/tests/coretests/apks/FrameworkCoreTests_apk.mk
+++ b/core/tests/coretests/apks/FrameworkCoreTests_apk.mk
@@ -6,6 +6,7 @@
# Make sure every package name gets the FrameworkCoreTests_ prefix.
LOCAL_PACKAGE_NAME := FrameworkCoreTests_$(LOCAL_PACKAGE_NAME)
+LOCAL_SDK_VERSION := current
# Every package should have a native library
LOCAL_JNI_SHARED_LIBRARIES := libframeworks_coretests_jni
diff --git a/core/tests/coretests/apks/install-split-base/Android.mk b/core/tests/coretests/apks/install-split-base/Android.mk
new file mode 100644
index 0000000..5b60e31
--- /dev/null
+++ b/core/tests/coretests/apks/install-split-base/Android.mk
@@ -0,0 +1,10 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PACKAGE_NAME := install_split_base
+
+include $(FrameworkCoreTests_BUILD_PACKAGE)
\ No newline at end of file
diff --git a/core/tests/coretests/apks/install-split-base/AndroidManifest.xml b/core/tests/coretests/apks/install-split-base/AndroidManifest.xml
new file mode 100644
index 0000000..c2bfedd
--- /dev/null
+++ b/core/tests/coretests/apks/install-split-base/AndroidManifest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.frameworks.coretests.install_split"
+ android:isolatedSplits="true">
+
+ <application android:label="ClassloaderSplitApp">
+ <activity android:name=".BaseActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl b/core/tests/coretests/apks/install-split-base/src/com/google/android/dexapis/splitapp/BaseActivity.java
similarity index 73%
copy from telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
copy to core/tests/coretests/apks/install-split-base/src/com/google/android/dexapis/splitapp/BaseActivity.java
index d648a35..cb5760ce 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
+++ b/core/tests/coretests/apks/install-split-base/src/com/google/android/dexapis/splitapp/BaseActivity.java
@@ -1,5 +1,5 @@
-/*
- * Copyright (c) 2013 The Android Open Source Project
+/**
+ * Copyright 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.
@@ -14,6 +14,10 @@
* limitations under the License.
*/
-package com.android.ims;
+package com.google.android.dexapis.splitapp;
-parcelable ImsStreamMediaProfile;
+import android.app.Activity;
+
+/** Main activity */
+public class BaseActivity extends Activity {
+}
diff --git a/core/tests/coretests/apks/install-split-feature-a/Android.mk b/core/tests/coretests/apks/install-split-feature-a/Android.mk
new file mode 100644
index 0000000..0f37d16
--- /dev/null
+++ b/core/tests/coretests/apks/install-split-feature-a/Android.mk
@@ -0,0 +1,14 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PACKAGE_NAME := install_split_feature_a
+
+LOCAL_USE_AAPT2 := true
+LOCAL_AAPT_FLAGS += --custom-package com.google.android.dexapis.splitapp.feature_a
+LOCAL_AAPT_FLAGS += --package-id 0x80
+
+include $(FrameworkCoreTests_BUILD_PACKAGE)
\ No newline at end of file
diff --git a/core/tests/coretests/apks/install-split-feature-a/AndroidManifest.xml b/core/tests/coretests/apks/install-split-feature-a/AndroidManifest.xml
new file mode 100644
index 0000000..3221c75
--- /dev/null
+++ b/core/tests/coretests/apks/install-split-feature-a/AndroidManifest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.frameworks.coretests.install_split"
+ featureSplit="feature_a">
+
+ <application>
+ <activity android:name=".feature_a.FeatureAActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl b/core/tests/coretests/apks/install-split-feature-a/src/com/google/android/dexapis/splitapp/feature_a/FeatureAActivity.java
similarity index 72%
copy from telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
copy to core/tests/coretests/apks/install-split-feature-a/src/com/google/android/dexapis/splitapp/feature_a/FeatureAActivity.java
index d648a35..0af5f89 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
+++ b/core/tests/coretests/apks/install-split-feature-a/src/com/google/android/dexapis/splitapp/feature_a/FeatureAActivity.java
@@ -1,5 +1,5 @@
-/*
- * Copyright (c) 2013 The Android Open Source Project
+/**
+ * Copyright 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.
@@ -14,6 +14,10 @@
* limitations under the License.
*/
-package com.android.ims;
+package com.google.android.dexapis.splitapp.feature_a;
-parcelable ImsStreamMediaProfile;
+import android.app.Activity;
+
+/** Main activity */
+public class FeatureAActivity extends Activity {
+}
diff --git a/core/tests/coretests/apks/install_jni_lib/Android.bp b/core/tests/coretests/apks/install_jni_lib/Android.bp
new file mode 100644
index 0000000..c1a6bd0
--- /dev/null
+++ b/core/tests/coretests/apks/install_jni_lib/Android.bp
@@ -0,0 +1,26 @@
+// 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.
+
+cc_test_library {
+ name: "libframeworks_coretests_jni",
+
+ srcs: ["com_android_frameworks_coretests_JNITest.cpp"],
+
+ sdk_version: "16",
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/core/tests/coretests/apks/install_jni_lib/Android.mk b/core/tests/coretests/apks/install_jni_lib/Android.mk
deleted file mode 100644
index d7b38e8..0000000
--- a/core/tests/coretests/apks/install_jni_lib/Android.mk
+++ /dev/null
@@ -1,37 +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)
-
-LOCAL_SRC_FILES := \
- com_android_frameworks_coretests_JNITest.cpp
-
-LOCAL_SDK_VERSION := 16
-
-LOCAL_CFLAGS += -Wall -Werror
-
-LOCAL_MODULE := libframeworks_coretests_jni
-
-# this does not prevent build system
-# from installing library to /system/lib
-LOCAL_MODULE_TAGS := tests
-
-# .. we want to avoid that... so we put it somewhere
-# bionic linker cant find it without outside help (nativetests):
-LOCAL_MODULE_PATH_32 := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
-LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/core/tests/coretests/apks/install_multi_package/Android.mk b/core/tests/coretests/apks/install_multi_package/Android.mk
index 2813dad2..9727593 100644
--- a/core/tests/coretests/apks/install_multi_package/Android.mk
+++ b/core/tests/coretests/apks/install_multi_package/Android.mk
@@ -7,6 +7,12 @@
LOCAL_PACKAGE_NAME := install_multi_package
+LOCAL_USE_AAPT2 := true
+# Disable AAPT2 manifest checks to fix:
+# frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:46: error: unexpected element <package> found in <manifest>.
+# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
+LOCAL_AAPT_FLAGS += --warn-manifest-validation
+
include $(FrameworkCoreTests_BUILD_PACKAGE)
#include $(BUILD_PACKAGE)
diff --git a/core/tests/coretests/apks/install_verifier_bad/Android.mk b/core/tests/coretests/apks/install_verifier_bad/Android.mk
index a6f9d5b..679327c 100644
--- a/core/tests/coretests/apks/install_verifier_bad/Android.mk
+++ b/core/tests/coretests/apks/install_verifier_bad/Android.mk
@@ -5,4 +5,10 @@
LOCAL_PACKAGE_NAME := install_verifier_bad
+LOCAL_USE_AAPT2 := true
+# Disable AAPT2 manifest checks to fix:
+# frameworks/base/core/tests/coretests/apks/install_verifier_bad/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
+# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
+LOCAL_AAPT_FLAGS += --warn-manifest-validation
+
include $(FrameworkCoreTests_BUILD_PACKAGE)
diff --git a/core/tests/coretests/apks/install_verifier_good/Android.mk b/core/tests/coretests/apks/install_verifier_good/Android.mk
index 6f2d44f..7d621b3 100644
--- a/core/tests/coretests/apks/install_verifier_good/Android.mk
+++ b/core/tests/coretests/apks/install_verifier_good/Android.mk
@@ -5,4 +5,10 @@
LOCAL_PACKAGE_NAME := install_verifier_good
+LOCAL_USE_AAPT2 := true
+# Disable AAPT2 manifest checks to fix:
+# frameworks/base/core/tests/coretests/apks/install_verifier_good/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
+# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
+LOCAL_AAPT_FLAGS += --warn-manifest-validation
+
include $(FrameworkCoreTests_BUILD_PACKAGE)
diff --git a/core/tests/coretests/res/layout/context_menu.xml b/core/tests/coretests/res/layout/context_menu.xml
new file mode 100644
index 0000000..3b9e2bd
--- /dev/null
+++ b/core/tests/coretests/res/layout/context_menu.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 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.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:id="@+id/context_menu_target_ltr"
+ android:orientation="horizontal"
+ android:layoutDirection="ltr"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="50px"
+ android:layout_marginEnd="50px">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="LTR"/>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/context_menu_target_rtl"
+ android:orientation="horizontal"
+ android:layoutDirection="rtl"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="50px"
+ android:layout_marginEnd="50px">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="RTL"/>
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/core/tests/coretests/src/android/app/timezone/RulesUpdaterContractTest.java b/core/tests/coretests/src/android/app/timezone/RulesUpdaterContractTest.java
index 91f8ebc..fe6a1d2 100644
--- a/core/tests/coretests/src/android/app/timezone/RulesUpdaterContractTest.java
+++ b/core/tests/coretests/src/android/app/timezone/RulesUpdaterContractTest.java
@@ -24,6 +24,7 @@
import android.content.Context;
import android.content.Intent;
+import android.os.UserHandle;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
@@ -57,8 +58,9 @@
RulesUpdaterContract.sendBroadcast(mockContext, packageName, tokenBytes);
- verify(mockContext).sendBroadcast(
+ verify(mockContext).sendBroadcastAsUser(
filterEquals(expectedIntent),
+ eq(UserHandle.SYSTEM),
eq(RulesUpdaterContract.UPDATE_TIME_ZONE_RULES_PERMISSION));
}
diff --git a/core/tests/coretests/src/android/content/pm/dex/DexMetadataHelperTest.java b/core/tests/coretests/src/android/content/pm/dex/DexMetadataHelperTest.java
new file mode 100644
index 0000000..a183736
--- /dev/null
+++ b/core/tests/coretests/src/android/content/pm/dex/DexMetadataHelperTest.java
@@ -0,0 +1,235 @@
+/**
+ * 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.
+ */
+
+package android.content.pm.dex;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageParser;
+import android.content.pm.PackageParser.ApkLite;
+import android.content.pm.PackageParser.Package;
+import android.content.pm.PackageParser.PackageLite;
+import android.content.pm.PackageParser.PackageParserException;
+import android.os.FileUtils;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.frameworks.coretests.R;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import libcore.io.IoUtils;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class DexMetadataHelperTest {
+ private static final String APK_FILE_EXTENSION = ".apk";
+ private static final String DEX_METADATA_FILE_EXTENSION = ".dm";
+
+ private File mTmpDir = null;
+
+ @Before
+ public void setUp() {
+ mTmpDir = IoUtils.createTemporaryDirectory("DexMetadataHelperTest");
+ }
+
+ @After
+ public void tearDown() {
+ if (mTmpDir != null) {
+ File[] files = mTmpDir.listFiles();
+ for (File f : files) {
+ f.delete();
+ }
+ }
+ }
+
+ private File createDexMetadataFile(String apkFileName) throws IOException {
+ File dmFile = new File(mTmpDir, apkFileName.replace(APK_FILE_EXTENSION,
+ DEX_METADATA_FILE_EXTENSION));
+ try (FileOutputStream fos = new FileOutputStream(dmFile)) {
+ try (ZipOutputStream zipOs = new ZipOutputStream(fos)) {
+ zipOs.putNextEntry(new ZipEntry("primary.prof"));
+ zipOs.closeEntry();
+ }
+ }
+ return dmFile;
+ }
+
+ private File copyApkToToTmpDir(String apkFileName, int apkResourceId) throws IOException {
+ Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
+ File outFile = new File(mTmpDir, apkFileName);
+ try (InputStream is = context.getResources().openRawResource(apkResourceId)) {
+ FileUtils.copyToFileOrThrow(is, outFile);
+ }
+ return outFile;
+ }
+
+ @Test
+ public void testParsePackageWithDmFileValid() throws IOException, PackageParserException {
+ copyApkToToTmpDir("install_split_base.apk", R.raw.install_split_base);
+ createDexMetadataFile("install_split_base.apk");
+ Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */);
+
+ Map<String, String> packageDexMetadata = DexMetadataHelper.getPackageDexMetadata(pkg);
+ assertEquals(1, packageDexMetadata.size());
+ String baseDexMetadata = packageDexMetadata.get(pkg.baseCodePath);
+ assertNotNull(baseDexMetadata);
+ assertTrue(isDexMetadataForApk(baseDexMetadata, pkg.baseCodePath));
+ }
+
+ @Test
+ public void testParsePackageSplitsWithDmFileValid()
+ throws IOException, PackageParserException {
+ copyApkToToTmpDir("install_split_base.apk", R.raw.install_split_base);
+ copyApkToToTmpDir("install_split_feature_a.apk", R.raw.install_split_feature_a);
+ createDexMetadataFile("install_split_base.apk");
+ createDexMetadataFile("install_split_feature_a.apk");
+ Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */);
+
+ Map<String, String> packageDexMetadata = DexMetadataHelper.getPackageDexMetadata(pkg);
+ assertEquals(2, packageDexMetadata.size());
+ String baseDexMetadata = packageDexMetadata.get(pkg.baseCodePath);
+ assertNotNull(baseDexMetadata);
+ assertTrue(isDexMetadataForApk(baseDexMetadata, pkg.baseCodePath));
+
+ String splitDexMetadata = packageDexMetadata.get(pkg.splitCodePaths[0]);
+ assertNotNull(splitDexMetadata);
+ assertTrue(isDexMetadataForApk(splitDexMetadata, pkg.splitCodePaths[0]));
+ }
+
+ @Test
+ public void testParsePackageSplitsNoBaseWithDmFileValid()
+ throws IOException, PackageParserException {
+ copyApkToToTmpDir("install_split_base.apk", R.raw.install_split_base);
+ copyApkToToTmpDir("install_split_feature_a.apk", R.raw.install_split_feature_a);
+ createDexMetadataFile("install_split_feature_a.apk");
+ Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */);
+
+ Map<String, String> packageDexMetadata = DexMetadataHelper.getPackageDexMetadata(pkg);
+ assertEquals(1, packageDexMetadata.size());
+
+ String splitDexMetadata = packageDexMetadata.get(pkg.splitCodePaths[0]);
+ assertNotNull(splitDexMetadata);
+ assertTrue(isDexMetadataForApk(splitDexMetadata, pkg.splitCodePaths[0]));
+ }
+
+ @Test
+ public void testParsePackageWithDmFileInvalid() throws IOException {
+ copyApkToToTmpDir("install_split_base.apk", R.raw.install_split_base);
+ File invalidDmFile = new File(mTmpDir, "install_split_base.dm");
+ Files.createFile(invalidDmFile.toPath());
+ try {
+ PackageParser.Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */);
+ DexMetadataHelper.validatePackageDexMetadata(pkg);
+ } catch (PackageParserException e) {
+ assertEquals(e.error, PackageManager.INSTALL_FAILED_BAD_DEX_METADATA);
+ }
+ }
+
+ @Test
+ public void testParsePackageSplitsWithDmFileInvalid()
+ throws IOException, PackageParserException {
+ copyApkToToTmpDir("install_split_base.apk", R.raw.install_split_base);
+ copyApkToToTmpDir("install_split_feature_a.apk", R.raw.install_split_feature_a);
+ createDexMetadataFile("install_split_base.apk");
+ File invalidDmFile = new File(mTmpDir, "install_split_feature_a.dm");
+ Files.createFile(invalidDmFile.toPath());
+
+ try {
+ PackageParser.Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */);
+ DexMetadataHelper.validatePackageDexMetadata(pkg);
+ } catch (PackageParserException e) {
+ assertEquals(e.error, PackageManager.INSTALL_FAILED_BAD_DEX_METADATA);
+ }
+ }
+
+ @Test
+ public void testPackageWithDmFileNoMatch() throws IOException {
+ copyApkToToTmpDir("install_split_base.apk", R.raw.install_split_base);
+ createDexMetadataFile("non_existent.apk");
+
+ try {
+ DexMetadataHelper.validateDexPaths(mTmpDir.list());
+ fail("Should fail validation");
+ } catch (IllegalStateException e) {
+ // expected.
+ }
+ }
+
+ @Test
+ public void testPackageSplitsWithDmFileNoMatch()
+ throws IOException, PackageParserException {
+ copyApkToToTmpDir("install_split_base.apk", R.raw.install_split_base);
+ copyApkToToTmpDir("install_split_feature_a.apk", R.raw.install_split_feature_a);
+ createDexMetadataFile("install_split_base.apk");
+ createDexMetadataFile("install_split_feature_a.mistake.apk");
+
+ try {
+ DexMetadataHelper.validateDexPaths(mTmpDir.list());
+ fail("Should fail validation");
+ } catch (IllegalStateException e) {
+ // expected.
+ }
+ }
+
+ @Test
+ public void testPackageSizeWithDmFile()
+ throws IOException, PackageParserException {
+ copyApkToToTmpDir("install_split_base.apk", R.raw.install_split_base);
+ File dm = createDexMetadataFile("install_split_base.apk");
+ PackageParser.PackageLite pkg = new PackageParser().parsePackageLite(mTmpDir,
+ 0 /* flags */);
+
+ Assert.assertEquals(dm.length(), DexMetadataHelper.getPackageDexMetadataSize(pkg));
+ }
+
+ // This simulates the 'adb shell pm install' flow.
+ @Test
+ public void testPackageSizeWithPartialPackageLite() throws IOException, PackageParserException {
+ File base = copyApkToToTmpDir("install_split_base", R.raw.install_split_base);
+ File dm = createDexMetadataFile("install_split_base.apk");
+ ApkLite baseApk = PackageParser.parseApkLite(base, 0);
+ PackageLite pkgLite = new PackageLite(null, baseApk, null, null, null, null,
+ null, null);
+ Assert.assertEquals(dm.length(), DexMetadataHelper.getPackageDexMetadataSize(pkgLite));
+
+ }
+
+ private static boolean isDexMetadataForApk(String dmaPath, String apkPath) {
+ return apkPath.substring(0, apkPath.length() - APK_FILE_EXTENSION.length()).equals(
+ dmaPath.substring(0, dmaPath.length() - DEX_METADATA_FILE_EXTENSION.length()));
+ }
+}
diff --git a/core/tests/coretests/src/android/net/NetworkPolicyManagerTest.java b/core/tests/coretests/src/android/net/NetworkPolicyManagerTest.java
index f520b0e..c6758ce 100644
--- a/core/tests/coretests/src/android/net/NetworkPolicyManagerTest.java
+++ b/core/tests/coretests/src/android/net/NetworkPolicyManagerTest.java
@@ -80,7 +80,7 @@
uidPoliciesToStringTest(POLICY_REJECT_METERED_BACKGROUND,
"1 (REJECT_METERED_BACKGROUND)");
uidPoliciesToStringTest(POLICY_ALLOW_METERED_BACKGROUND,
- "4 (ALLOW_BACKGROUND_BATTERY_SAVE)");
+ "4 (ALLOW_METERED_BACKGROUND)");
}
private void uidPoliciesToStringTest(int policyRules, String... expectedOptions) {
diff --git a/core/tests/coretests/src/android/net/SSLTest.java b/core/tests/coretests/src/android/net/SSLCertificateSocketFactoryTest.java
similarity index 64%
rename from core/tests/coretests/src/android/net/SSLTest.java
rename to core/tests/coretests/src/android/net/SSLCertificateSocketFactoryTest.java
index 45d28ae..5cbf02a 100644
--- a/core/tests/coretests/src/android/net/SSLTest.java
+++ b/core/tests/coretests/src/android/net/SSLCertificateSocketFactoryTest.java
@@ -16,39 +16,19 @@
package android.net;
-import android.test.suitebuilder.annotation.Suppress;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
import java.util.Arrays;
-import junit.framework.TestCase;
-public class SSLTest extends TestCase {
- //This test relies on network resources.
- @Suppress
- public void testCertificate() throws Exception {
- // test www.fortify.net/sslcheck.html
- Socket ssl = SSLCertificateSocketFactory.getDefault().createSocket("www.fortify.net",443);
- assertNotNull(ssl);
-
- OutputStream out = ssl.getOutputStream();
- assertNotNull(out);
-
- InputStream in = ssl.getInputStream();
- assertNotNull(in);
-
- String get = "GET /sslcheck.html HTTP/1.1\r\nHost: 68.178.217.222\r\n\r\n";
-
- // System.out.println("going for write...");
- out.write(get.getBytes());
-
- byte[] b = new byte[1024];
- // System.out.println("going for read...");
- int ret = in.read(b);
-
- // System.out.println(new String(b));
- }
-
+@RunWith(AndroidJUnit4.class)
+public class SSLCertificateSocketFactoryTest {
+ @Test
public void testStringsToLengthPrefixedBytes() {
byte[] expected = {
6, 's', 'p', 'd', 'y', '/', '2',
@@ -59,6 +39,7 @@
new byte[] { 'h', 't', 't', 'p', '/', '1', '.', '1' })));
}
+ @Test
public void testStringsToLengthPrefixedBytesEmptyArray() {
try {
SSLCertificateSocketFactory.toLengthPrefixedList();
@@ -67,6 +48,7 @@
}
}
+ @Test
public void testStringsToLengthPrefixedBytesEmptyByteArray() {
try {
SSLCertificateSocketFactory.toLengthPrefixedList(new byte[0]);
@@ -75,6 +57,7 @@
}
}
+ @Test
public void testStringsToLengthPrefixedBytesOversizedInput() {
try {
SSLCertificateSocketFactory.toLengthPrefixedList(new byte[256]);
diff --git a/core/tests/coretests/src/android/net/SntpClientTest.java b/core/tests/coretests/src/android/net/SntpClientTest.java
index 8b8cf67..d72738c 100644
--- a/core/tests/coretests/src/android/net/SntpClientTest.java
+++ b/core/tests/coretests/src/android/net/SntpClientTest.java
@@ -16,20 +16,28 @@
package android.net;
-import android.net.SntpClient;
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+
import libcore.util.HexEncoding;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;
import java.util.Arrays;
-import junit.framework.TestCase;
-
-public class SntpClientTest extends TestCase {
+@RunWith(AndroidJUnit4.class)
+public class SntpClientTest {
private static final String TAG = "SntpClientTest";
private static final int ORIGINATE_TIME_OFFSET = 24;
@@ -58,36 +66,50 @@
"d9ca945194bd3fff" +
"d9ca945194bd4001";
- private final SntpTestServer mServer = new SntpTestServer();
- private final SntpClient mClient = new SntpClient();
+ private SntpTestServer mServer;
+ private SntpClient mClient;
+ private Network mNetwork;
+ @Before
+ public void setUp() throws Exception {
+ // NETID_UNSET allows the test to run, with a loopback server, even w/o external networking
+ mNetwork = new Network(ConnectivityManager.NETID_UNSET);
+ mServer = new SntpTestServer();
+ mClient = new SntpClient();
+ }
+
+ @Test
public void testBasicWorkingSntpClientQuery() throws Exception {
mServer.setServerReply(HexEncoding.decode(WORKING_VERSION4.toCharArray(), false));
- assertTrue(mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500));
+ assertTrue(mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500, mNetwork));
assertEquals(1, mServer.numRequestsReceived());
assertEquals(1, mServer.numRepliesSent());
}
+ @Test
public void testDnsResolutionFailure() throws Exception {
- assertFalse(mClient.requestTime("ntp.server.doesnotexist.example", 5000));
+ assertFalse(mClient.requestTime("ntp.server.doesnotexist.example", 5000, mNetwork));
}
+ @Test
public void testTimeoutFailure() throws Exception {
mServer.clearServerReply();
- assertFalse(mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500));
+ assertFalse(mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500, mNetwork));
assertEquals(1, mServer.numRequestsReceived());
assertEquals(0, mServer.numRepliesSent());
}
+ @Test
public void testIgnoreLeapNoSync() throws Exception {
final byte[] reply = HexEncoding.decode(WORKING_VERSION4.toCharArray(), false);
reply[0] |= (byte) 0xc0;
mServer.setServerReply(reply);
- assertFalse(mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500));
+ assertFalse(mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500, mNetwork));
assertEquals(1, mServer.numRequestsReceived());
assertEquals(1, mServer.numRepliesSent());
}
+ @Test
public void testAcceptOnlyServerAndBroadcastModes() throws Exception {
final byte[] reply = HexEncoding.decode(WORKING_VERSION4.toCharArray(), false);
for (int i = 0; i <= 7; i++) {
@@ -95,7 +117,8 @@
reply[0] &= (byte) 0xf8;
reply[0] |= (byte) i;
mServer.setServerReply(reply);
- final boolean rval = mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500);
+ final boolean rval = mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500,
+ mNetwork);
switch (i) {
case NTP_MODE_SERVER:
case NTP_MODE_BROADCAST:
@@ -110,6 +133,7 @@
}
}
+ @Test
public void testAcceptableStrataOnly() throws Exception {
final int STRATUM_MIN = 1;
final int STRATUM_MAX = 15;
@@ -119,7 +143,8 @@
final String logMsg = "stratum: " + i;
reply[1] = (byte) i;
mServer.setServerReply(reply);
- final boolean rval = mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500);
+ final boolean rval = mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500,
+ mNetwork);
if (STRATUM_MIN <= i && i <= STRATUM_MAX) {
assertTrue(logMsg, rval);
} else {
@@ -130,11 +155,12 @@
}
}
+ @Test
public void testZeroTransmitTime() throws Exception {
final byte[] reply = HexEncoding.decode(WORKING_VERSION4.toCharArray(), false);
Arrays.fill(reply, TRANSMIT_TIME_OFFSET, TRANSMIT_TIME_OFFSET + 8, (byte) 0x00);
mServer.setServerReply(reply);
- assertFalse(mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500));
+ assertFalse(mClient.requestTime(mServer.getAddress(), mServer.getPort(), 500, mNetwork));
assertEquals(1, mServer.numRequestsReceived());
assertEquals(1, mServer.numRepliesSent());
}
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index 19808ca..d513936 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -64,6 +64,7 @@
Settings.System.NOTIFICATION_LIGHT_PULSE, // candidate for backup?
Settings.System.NOTIFICATION_SOUND_CACHE, // internal cache
Settings.System.POINTER_LOCATION, // backup candidate?
+ Settings.System.DEBUG_ENABLE_ENHANCED_CALL_BLOCKING, // used for testing only
Settings.System.RINGTONE_CACHE, // internal cache
Settings.System.SETUP_WIZARD_HAS_RUN, // Only used by SuW
Settings.System.SHOW_GTALK_SERVICE_STATUS, // candidate for backup?
@@ -111,6 +112,13 @@
Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD,
Settings.Global.BATTERY_DISCHARGE_THRESHOLD,
Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE,
+ Settings.Global.BLE_SCAN_LOW_POWER_WINDOW_MS,
+ Settings.Global.BLE_SCAN_LOW_POWER_INTERVAL_MS,
+ Settings.Global.BLE_SCAN_BALANCED_WINDOW_MS,
+ Settings.Global.BLE_SCAN_BALANCED_INTERVAL_MS,
+ Settings.Global.BLE_SCAN_LOW_LATENCY_WINDOW_MS,
+ Settings.Global.BLE_SCAN_LOW_LATENCY_INTERVAL_MS,
+ Settings.Global.BLE_SCAN_BACKGROUND_MODE,
Settings.Global.BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX,
Settings.Global.BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX,
Settings.Global.BLUETOOTH_A2DP_SUPPORTS_OPTIONAL_CODECS_PREFIX,
@@ -131,6 +139,7 @@
Settings.Global.CAPTIVE_PORTAL_HTTP_URL,
Settings.Global.CAPTIVE_PORTAL_MODE,
Settings.Global.CAPTIVE_PORTAL_OTHER_FALLBACK_URLS,
+ Settings.Global.CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS,
Settings.Global.CAPTIVE_PORTAL_SERVER,
Settings.Global.CAPTIVE_PORTAL_USE_HTTPS,
Settings.Global.CAPTIVE_PORTAL_USER_AGENT,
@@ -407,7 +416,8 @@
Settings.Global.WTF_IS_FATAL,
Settings.Global.ZEN_MODE,
Settings.Global.ZEN_MODE_CONFIG_ETAG,
- Settings.Global.ZEN_MODE_RINGER_LEVEL);
+ Settings.Global.ZEN_MODE_RINGER_LEVEL,
+ Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS);
private static final Set<String> BACKUP_BLACKLISTED_SECURE_SETTINGS =
newHashSet(
diff --git a/core/tests/coretests/src/android/service/euicc/EuiccProfileInfoTest.java b/core/tests/coretests/src/android/service/euicc/EuiccProfileInfoTest.java
index 1e3ddf3..e69d1e7 100644
--- a/core/tests/coretests/src/android/service/euicc/EuiccProfileInfoTest.java
+++ b/core/tests/coretests/src/android/service/euicc/EuiccProfileInfoTest.java
@@ -30,14 +30,15 @@
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.Arrays;
+
@SmallTest
@RunWith(AndroidJUnit4.class)
public class EuiccProfileInfoTest {
@Test
public void testWriteToParcel() {
EuiccProfileInfo p =
- new EuiccProfileInfo.Builder()
- .setIccid("21430000000000006587")
+ new EuiccProfileInfo.Builder("21430000000000006587")
.setNickname("profile nickname")
.setServiceProviderName("service provider")
.setProfileName("profile name")
@@ -50,9 +51,7 @@
"45"))
.setPolicyRules(EuiccProfileInfo.POLICY_RULE_DO_NOT_DELETE)
.setUiccAccessRule(
- new UiccAccessRule[] {
- new UiccAccessRule(new byte[] {}, "package", 12345L)
- })
+ Arrays.asList(new UiccAccessRule(new byte[] {}, "package", 12345L)))
.build();
Parcel parcel = Parcel.obtain();
@@ -68,8 +67,7 @@
@Test
public void testWriteToParcelNullCarrierId() {
EuiccProfileInfo p =
- new EuiccProfileInfo.Builder()
- .setIccid("21430000000000006587")
+ new EuiccProfileInfo.Builder("21430000000000006587")
.setNickname("profile nickname")
.setServiceProviderName("service provider")
.setProfileName("profile name")
@@ -77,9 +75,8 @@
.setState(EuiccProfileInfo.PROFILE_STATE_ENABLED)
.setPolicyRules(EuiccProfileInfo.POLICY_RULE_DO_NOT_DELETE)
.setUiccAccessRule(
- new UiccAccessRule[] {
- new UiccAccessRule(new byte[] {}, "package", 12345L)
- })
+ Arrays.asList(new UiccAccessRule(new byte[] {}, "package", 12345L))
+ )
.build();
Parcel parcel = Parcel.obtain();
@@ -95,8 +92,7 @@
@Test
public void testBuilderAndGetters() {
EuiccProfileInfo p =
- new EuiccProfileInfo.Builder()
- .setIccid("21430000000000006587")
+ new EuiccProfileInfo.Builder("21430000000000006587")
.setNickname("profile nickname")
.setProfileName("profile name")
.setServiceProviderName("service provider")
@@ -108,10 +104,7 @@
.setState(EuiccProfileInfo.PROFILE_STATE_ENABLED)
.setProfileClass(EuiccProfileInfo.PROFILE_CLASS_OPERATIONAL)
.setPolicyRules(EuiccProfileInfo.POLICY_RULE_DO_NOT_DELETE)
- .setUiccAccessRule(
- new UiccAccessRule[] {
- new UiccAccessRule(new byte[0], null, 0)
- })
+ .setUiccAccessRule(Arrays.asList(new UiccAccessRule(new byte[0], null, 0)))
.build();
assertEquals("21430000000000006587", p.getIccid());
@@ -130,14 +123,13 @@
assertFalse(p.hasPolicyRule(EuiccProfileInfo.POLICY_RULE_DO_NOT_DISABLE));
assertArrayEquals(
new UiccAccessRule[] {new UiccAccessRule(new byte[0], null, 0)},
- p.getUiccAccessRules());
+ p.getUiccAccessRules().toArray());
}
@Test
public void testBuilder_BasedOnAnotherProfile() {
EuiccProfileInfo p =
- new EuiccProfileInfo.Builder()
- .setIccid("21430000000000006587")
+ new EuiccProfileInfo.Builder("21430000000000006587")
.setNickname("profile nickname")
.setProfileName("profile name")
.setServiceProviderName("service provider")
@@ -150,9 +142,7 @@
.setProfileClass(EuiccProfileInfo.PROFILE_CLASS_OPERATIONAL)
.setPolicyRules(EuiccProfileInfo.POLICY_RULE_DO_NOT_DELETE)
.setUiccAccessRule(
- new UiccAccessRule[] {
- new UiccAccessRule(new byte[0], null, 0)
- })
+ Arrays.asList(new UiccAccessRule(new byte[] {}, "package", 12345L)))
.build();
EuiccProfileInfo copied = new EuiccProfileInfo.Builder(p).build();
@@ -164,8 +154,7 @@
@Test
public void testEqualsHashCode() {
EuiccProfileInfo p =
- new EuiccProfileInfo.Builder()
- .setIccid("21430000000000006587")
+ new EuiccProfileInfo.Builder("21430000000000006587")
.setNickname("profile nickname")
.setProfileName("profile name")
.setServiceProviderName("service provider")
@@ -177,10 +166,7 @@
.setState(EuiccProfileInfo.PROFILE_STATE_ENABLED)
.setProfileClass(EuiccProfileInfo.PROFILE_STATE_ENABLED)
.setPolicyRules(EuiccProfileInfo.POLICY_RULE_DO_NOT_DELETE)
- .setUiccAccessRule(
- new UiccAccessRule[] {
- new UiccAccessRule(new byte[0], null, 0)
- })
+ .setUiccAccessRule(Arrays.asList(new UiccAccessRule(new byte[0], null, 0)))
.build();
assertTrue(p.equals(p));
@@ -229,13 +215,13 @@
}
@Test(expected = IllegalStateException.class)
- public void testBuilderBuild_NoIccid() {
- new EuiccProfileInfo.Builder().build();
+ public void testBuilderBuild_IllegalIccid() {
+ new EuiccProfileInfo.Builder("abc").build();
}
@Test(expected = IllegalArgumentException.class)
public void testBuilderSetOperatorMccMnc_Illegal() {
- new EuiccProfileInfo.Builder()
+ new EuiccProfileInfo.Builder("21430000000000006587")
.setCarrierIdentifier(new CarrierIdentifier(new byte[] {1, 2, 3, 4}, null, null));
}
diff --git a/core/tests/coretests/src/android/util/PollingCheck.java b/core/tests/coretests/src/android/util/PollingCheck.java
new file mode 100644
index 0000000..468b9b2
--- /dev/null
+++ b/core/tests/coretests/src/android/util/PollingCheck.java
@@ -0,0 +1,104 @@
+/*
+ * 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.
+ */
+
+package android.util;
+
+import org.junit.Assert;
+
+/**
+ * Utility used for testing that allows to poll for a certain condition to happen within a timeout.
+ *
+ * Code copied from com.android.compatibility.common.util.PollingCheck
+ */
+public abstract class PollingCheck {
+
+ private static final long DEFAULT_TIMEOUT = 3000;
+ private static final long TIME_SLICE = 50;
+ private final long mTimeout;
+
+ /**
+ * The condition that the PollingCheck should use to proceed successfully.
+ */
+ public interface PollingCheckCondition {
+
+ /**
+ * @return Whether the polling condition has been met.
+ */
+ boolean canProceed();
+ }
+
+ public PollingCheck(long timeout) {
+ mTimeout = timeout;
+ }
+
+ protected abstract boolean check();
+
+ /**
+ * Start running the polling check.
+ */
+ public void run() {
+ if (check()) {
+ return;
+ }
+
+ long timeout = mTimeout;
+ while (timeout > 0) {
+ try {
+ Thread.sleep(TIME_SLICE);
+ } catch (InterruptedException e) {
+ Assert.fail("unexpected InterruptedException");
+ }
+
+ if (check()) {
+ return;
+ }
+
+ timeout -= TIME_SLICE;
+ }
+
+ Assert.fail("unexpected timeout");
+ }
+
+ /**
+ * Instantiate and start polling for a given condition with a default 3000ms timeout.
+ *
+ * @param condition The condition to check for success.
+ */
+ public static void waitFor(final PollingCheckCondition condition) {
+ new PollingCheck(DEFAULT_TIMEOUT) {
+ @Override
+ protected boolean check() {
+ return condition.canProceed();
+ }
+ }.run();
+ }
+
+ /**
+ * Instantiate and start polling for a given condition.
+ *
+ * @param timeout Time out in ms
+ * @param condition The condition to check for success.
+ */
+ public static void waitFor(long timeout, final PollingCheckCondition condition) {
+ new PollingCheck(timeout) {
+ @Override
+ protected boolean check() {
+ return condition.canProceed();
+ }
+ }.run();
+ }
+}
+
diff --git a/core/tests/coretests/src/android/util/TimestampedValueTest.java b/core/tests/coretests/src/android/util/TimestampedValueTest.java
new file mode 100644
index 0000000..7117c1b
--- /dev/null
+++ b/core/tests/coretests/src/android/util/TimestampedValueTest.java
@@ -0,0 +1,119 @@
+/*
+ * 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.
+ */
+
+package android.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.fail;
+
+import android.os.Parcel;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class TimestampedValueTest {
+
+ @Test
+ public void testEqualsAndHashcode() {
+ TimestampedValue<String> one1000one = new TimestampedValue<>(1000, "one");
+ assertEqualsAndHashCode(one1000one, one1000one);
+
+ TimestampedValue<String> one1000two = new TimestampedValue<>(1000, "one");
+ assertEqualsAndHashCode(one1000one, one1000two);
+
+ TimestampedValue<String> two1000 = new TimestampedValue<>(1000, "two");
+ assertNotEquals(one1000one, two1000);
+
+ TimestampedValue<String> one2000 = new TimestampedValue<>(2000, "one");
+ assertNotEquals(one1000one, one2000);
+ }
+
+ private static void assertEqualsAndHashCode(Object one, Object two) {
+ assertEquals(one, two);
+ assertEquals(one.hashCode(), two.hashCode());
+ }
+
+ @Test
+ public void testParceling() {
+ TimestampedValue<String> stringValue = new TimestampedValue<>(1000, "Hello");
+ Parcel parcel = Parcel.obtain();
+ try {
+ TimestampedValue.writeToParcel(parcel, stringValue);
+
+ parcel.setDataPosition(0);
+
+ TimestampedValue<String> stringValueCopy =
+ TimestampedValue.readFromParcel(parcel, null /* classLoader */, String.class);
+ assertEquals(stringValue, stringValueCopy);
+ } finally {
+ parcel.recycle();
+ }
+ }
+
+ @Test
+ public void testParceling_valueClassOk() {
+ TimestampedValue<String> stringValue = new TimestampedValue<>(1000, "Hello");
+ Parcel parcel = Parcel.obtain();
+ try {
+ TimestampedValue.writeToParcel(parcel, stringValue);
+
+ parcel.setDataPosition(0);
+
+ TimestampedValue<Object> stringValueCopy =
+ TimestampedValue.readFromParcel(parcel, null /* classLoader */, Object.class);
+ assertEquals(stringValue, stringValueCopy);
+ } finally {
+ parcel.recycle();
+ }
+ }
+
+ @Test
+ public void testParceling_valueClassIncompatible() {
+ TimestampedValue<String> stringValue = new TimestampedValue<>(1000, "Hello");
+ Parcel parcel = Parcel.obtain();
+ try {
+ TimestampedValue.writeToParcel(parcel, stringValue);
+
+ parcel.setDataPosition(0);
+
+ TimestampedValue.readFromParcel(parcel, null /* classLoader */, Double.class);
+ fail();
+ } catch (RuntimeException expected) {
+ } finally {
+ parcel.recycle();
+ }
+ }
+
+ @Test
+ public void testParceling_nullValue() {
+ TimestampedValue<String> nullValue = new TimestampedValue<>(1000, null);
+ Parcel parcel = Parcel.obtain();
+ try {
+ TimestampedValue.writeToParcel(parcel, nullValue);
+
+ parcel.setDataPosition(0);
+
+ TimestampedValue<Object> nullValueCopy =
+ TimestampedValue.readFromParcel(parcel, null /* classLoader */, String.class);
+ assertEquals(nullValue, nullValueCopy);
+ } finally {
+ parcel.recycle();
+ }
+ }
+}
diff --git a/core/tests/coretests/src/android/view/menu/ContextMenuActivity.java b/core/tests/coretests/src/android/view/menu/ContextMenuActivity.java
new file mode 100644
index 0000000..830b3d5
--- /dev/null
+++ b/core/tests/coretests/src/android/view/menu/ContextMenuActivity.java
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+package android.view.menu;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.ContextMenu;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+
+import com.android.frameworks.coretests.R;
+
+public class ContextMenuActivity extends Activity {
+
+ static final String LABEL_ITEM = "Item";
+ static final String LABEL_SUBMENU = "Submenu";
+ static final String LABEL_SUBITEM = "Subitem";
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.context_menu);
+ registerForContextMenu(getTargetLtr());
+ registerForContextMenu(getTargetRtl());
+ }
+
+ @Override
+ public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
+ menu.add(LABEL_ITEM);
+ menu.addSubMenu(LABEL_SUBMENU).add(LABEL_SUBITEM);
+ }
+
+ View getTargetLtr() {
+ return findViewById(R.id.context_menu_target_ltr);
+ }
+
+ View getTargetRtl() {
+ return findViewById(R.id.context_menu_target_rtl);
+ }
+}
diff --git a/core/tests/coretests/src/android/view/menu/ContextMenuTest.java b/core/tests/coretests/src/android/view/menu/ContextMenuTest.java
new file mode 100644
index 0000000..59d4e55
--- /dev/null
+++ b/core/tests/coretests/src/android/view/menu/ContextMenuTest.java
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+package android.view.menu;
+
+import android.content.Context;
+import android.graphics.Point;
+import android.support.test.filters.MediumTest;
+import android.test.ActivityInstrumentationTestCase;
+import android.util.PollingCheck;
+import android.view.Display;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.espresso.ContextMenuUtils;
+
+@MediumTest
+public class ContextMenuTest extends ActivityInstrumentationTestCase<ContextMenuActivity> {
+
+ public ContextMenuTest() {
+ super("com.android.frameworks.coretests", ContextMenuActivity.class);
+ }
+
+ public void testContextMenuPositionLtr() throws InterruptedException {
+ testMenuPosition(getActivity().getTargetLtr());
+ }
+
+ public void testContextMenuPositionRtl() throws InterruptedException {
+ testMenuPosition(getActivity().getTargetRtl());
+ }
+
+ private void testMenuPosition(View target) throws InterruptedException {
+ final int minScreenDimension = getMinScreenDimension();
+ if (minScreenDimension < 320) {
+ // Assume there is insufficient room for the context menu to be aligned properly.
+ return;
+ }
+
+ int offsetX = target.getWidth() / 2;
+ int offsetY = target.getHeight() / 2;
+
+ getInstrumentation().runOnMainSync(() -> target.performLongClick(offsetX, offsetY));
+
+ PollingCheck.waitFor(
+ () -> ContextMenuUtils.isMenuItemClickable(ContextMenuActivity.LABEL_SUBMENU));
+
+ ContextMenuUtils.assertContextMenuAlignment(target, offsetX, offsetY);
+
+ ContextMenuUtils.clickMenuItem(ContextMenuActivity.LABEL_SUBMENU);
+
+ PollingCheck.waitFor(
+ () -> ContextMenuUtils.isMenuItemClickable(ContextMenuActivity.LABEL_SUBITEM));
+
+ if (minScreenDimension < getCascadingMenuTreshold()) {
+ // A non-cascading submenu should be displayed at the same location as its parent.
+ // Not testing cascading submenu position, as it is positioned differently.
+ ContextMenuUtils.assertContextMenuAlignment(target, offsetX, offsetY);
+ }
+ }
+
+ /**
+ * Returns the minimum of the default display's width and height.
+ */
+ private int getMinScreenDimension() {
+ final WindowManager windowManager = (WindowManager) getActivity().getSystemService(
+ Context.WINDOW_SERVICE);
+ final Display display = windowManager.getDefaultDisplay();
+ final Point displaySize = new Point();
+ display.getRealSize(displaySize);
+ return Math.min(displaySize.x, displaySize.y);
+ }
+
+ /**
+ * Returns the minimum display size where cascading submenus are supported.
+ */
+ private int getCascadingMenuTreshold() {
+ // Use the same dimension resource as in MenuPopupHelper.createPopup().
+ return getActivity().getResources().getDimensionPixelSize(
+ com.android.internal.R.dimen.cascading_menus_min_smallest_width);
+ }
+}
diff --git a/core/tests/coretests/src/android/widget/espresso/ContextMenuUtils.java b/core/tests/coretests/src/android/widget/espresso/ContextMenuUtils.java
index c8218aa..487a881 100644
--- a/core/tests/coretests/src/android/widget/espresso/ContextMenuUtils.java
+++ b/core/tests/coretests/src/android/widget/espresso/ContextMenuUtils.java
@@ -17,25 +17,32 @@
package android.widget.espresso;
import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.RootMatchers.withDecorView;
import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
import static android.support.test.espresso.matcher.ViewMatchers.hasFocus;
import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast;
import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.not;
-import com.android.internal.view.menu.ListMenuItemView;
-
import android.support.test.espresso.NoMatchingRootException;
import android.support.test.espresso.NoMatchingViewException;
import android.support.test.espresso.ViewInteraction;
import android.support.test.espresso.matcher.ViewMatchers;
+import android.view.View;
import android.widget.MenuPopupWindow.MenuDropDownListView;
+import com.android.internal.view.menu.ListMenuItemView;
+
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.hamcrest.TypeSafeMatcher;
+
/**
* Espresso utility methods for the context menu.
*/
@@ -82,10 +89,15 @@
private static void asssertContextMenuContainsItemWithEnabledState(String itemLabel,
boolean enabled) {
onContextMenu().check(matches(
- hasDescendant(allOf(
- isAssignableFrom(ListMenuItemView.class),
- enabled ? isEnabled() : not(isEnabled()),
- hasDescendant(withText(itemLabel))))));
+ hasDescendant(getVisibleMenuItemMatcher(itemLabel, enabled))));
+ }
+
+ private static Matcher<View> getVisibleMenuItemMatcher(String itemLabel, boolean enabled) {
+ return allOf(
+ isAssignableFrom(ListMenuItemView.class),
+ hasDescendant(withText(itemLabel)),
+ enabled ? isEnabled() : not(isEnabled()),
+ isDisplayingAtLeast(90));
}
/**
@@ -107,4 +119,70 @@
public static void assertContextMenuContainsItemDisabled(String itemLabel) {
asssertContextMenuContainsItemWithEnabledState(itemLabel, false);
}
+
+ /**
+ * Asserts that the context menu window is aligned to a given view with a given offset.
+ *
+ * @param anchor Anchor view.
+ * @param offsetX x offset
+ * @param offsetY y offset.
+ * @throws AssertionError if the assertion fails
+ */
+ public static void assertContextMenuAlignment(View anchor, int offsetX, int offsetY) {
+ int [] expectedLocation = new int[2];
+ anchor.getLocationOnScreen(expectedLocation);
+ expectedLocation[0] += offsetX;
+ expectedLocation[1] += offsetY;
+
+ final boolean rtl = anchor.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
+
+ onContextMenu().check(matches(new TypeSafeMatcher<View>() {
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("root view ");
+ description.appendText(rtl ? "right" : "left");
+ description.appendText("=");
+ description.appendText(Integer.toString(offsetX));
+ description.appendText(", top=");
+ description.appendText(Integer.toString(offsetY));
+ }
+
+ @Override
+ public boolean matchesSafely(View view) {
+ View rootView = view.getRootView();
+ int [] actualLocation = new int[2];
+ rootView.getLocationOnScreen(actualLocation);
+ if (rtl) {
+ actualLocation[0] += rootView.getWidth();
+ }
+ return expectedLocation[0] == actualLocation[0]
+ && expectedLocation[1] == actualLocation[1];
+ }
+ }));
+ }
+
+ /**
+ * Check is the menu item is clickable (i.e. visible and enabled).
+ *
+ * @param itemLabel Label of the item.
+ * @return True if the menu item is clickable.
+ */
+ public static boolean isMenuItemClickable(String itemLabel) {
+ try {
+ onContextMenu().check(matches(
+ hasDescendant(getVisibleMenuItemMatcher(itemLabel, true))));
+ return true;
+ } catch (NoMatchingRootException | NoMatchingViewException | AssertionError e) {
+ return false;
+ }
+ }
+
+ /**
+ * Click on a menu item with the specified label
+ * @param itemLabel Label of the item.
+ */
+ public static void clickMenuItem(String itemLabel) {
+ onView(getVisibleMenuItemMatcher(itemLabel, true))
+ .inRoot(withDecorView(hasFocus())).perform(click());
+ }
}
diff --git a/core/tests/coretests/src/com/android/internal/util/HexDumpTest.java b/core/tests/coretests/src/com/android/internal/util/HexDumpTest.java
index 951e87a..359bd5e 100644
--- a/core/tests/coretests/src/com/android/internal/util/HexDumpTest.java
+++ b/core/tests/coretests/src/com/android/internal/util/HexDumpTest.java
@@ -25,4 +25,7 @@
assertEquals("ABCDEF", HexDump.toHexString(
new byte[] { (byte) 0xab, (byte) 0xcd, (byte) 0xef }, true));
}
+ public void testNullArray() {
+ assertEquals("(null)", HexDump.toHexString(null));
+ }
}
diff --git a/core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk b/core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
index 47ee2cf..3261a1a 100644
--- a/core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
+++ b/core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
@@ -24,6 +24,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := DownloadManagerTestApp
+LOCAL_PRIVATE_PLATFORM_APIS := true
ifneq ($(TARGET_BUILD_VARIANT),user)
# Need to run as system app to get access to Settings. This test won't work for user builds.
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk
index 99bcd6c..a6c5373 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk
@@ -36,10 +36,8 @@
include $(BUILD_PACKAGE)
-ifndef LOCAL_JACK_ENABLED
$(mainDexList): $(full_classes_proguard_jar) | $(MAINDEXCLASSES)
$(hide) mkdir -p $(dir $@)
$(MAINDEXCLASSES) $< 1>$@
$(built_dex_intermediate): $(mainDexList)
-endif
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/AndroidManifest.xml b/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/AndroidManifest.xml
index e3068920..7cd01e54 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/AndroidManifest.xml
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/AndroidManifest.xml
@@ -7,6 +7,8 @@
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
+ <!-- Required for com.android.framework.multidexlegacytestservices.test2 -->
+ <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
<application
android:label="MultiDexLegacyTestServices">
@@ -124,6 +126,6 @@
<action android:name="com.android.framework.multidexlegacytestservices.action.Service19" />
</intent-filter>
</service>
- </application>
+ </application>
</manifest>
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/src/com/android/framework/multidexlegacytestservices/AbstractService.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/src/com/android/framework/multidexlegacytestservices/AbstractService.java
index 7b83999..cb0a591 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/src/com/android/framework/multidexlegacytestservices/AbstractService.java
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestServices/src/com/android/framework/multidexlegacytestservices/AbstractService.java
@@ -60,35 +60,40 @@
// of the result file will be too big.
RandomAccessFile raf = new RandomAccessFile(resultFile, "rw");
raf.seek(raf.length());
- Log.i(TAG, "Writing 0x42434445 at " + raf.length() + " in " + resultFile.getPath());
- raf.writeInt(0x42434445);
+ if (raf.length() == 0) {
+ Log.i(TAG, "Writing 0x42434445 at " + raf.length() + " in " + resultFile.getPath());
+ raf.writeInt(0x42434445);
+ } else {
+ Log.w(TAG, "Service was restarted appending 0x42434445 twice at " + raf.length()
+ + " in " + resultFile.getPath());
+ raf.writeInt(0x42434445);
+ raf.writeInt(0x42434445);
+ }
raf.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- MultiDex.install(applicationContext);
- Log.i(TAG, "Multi dex installation done.");
+ MultiDex.install(applicationContext);
+ Log.i(TAG, "Multi dex installation done.");
- int value = getValue();
- Log.i(TAG, "Saving the result (" + value + ") to " + resultFile.getPath());
- try {
+ int value = getValue();
+ Log.i(TAG, "Saving the result (" + value + ") to " + resultFile.getPath());
// Append the check value in result file, keeping the constant values already written.
- RandomAccessFile raf = new RandomAccessFile(resultFile, "rw");
+ raf = new RandomAccessFile(resultFile, "rw");
raf.seek(raf.length());
Log.i(TAG, "Writing result at " + raf.length() + " in " + resultFile.getPath());
raf.writeInt(value);
raf.close();
} catch (IOException e) {
- e.printStackTrace();
- }
- try {
- // Writing end of processing flags, the existence of the file is the criteria
- RandomAccessFile raf = new RandomAccessFile(new File(applicationContext.getFilesDir(), getId() + ".complete"), "rw");
- Log.i(TAG, "creating complete file " + resultFile.getPath());
- raf.writeInt(0x32333435);
- raf.close();
- } catch (IOException e) {
- e.printStackTrace();
+ throw new AssertionError(e);
+ } finally {
+ try {
+ // Writing end of processing flags, the existence of the file is the criteria
+ RandomAccessFile raf = new RandomAccessFile(
+ new File(applicationContext.getFilesDir(), getId() + ".complete"), "rw");
+ Log.i(TAG, "creating complete file " + resultFile.getPath());
+ raf.writeInt(0x32333435);
+ raf.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
}
}
@@ -119,9 +124,10 @@
intermediate = ReflectIntermediateClass.get(45, 80, 20 /* 5 seems enough on a nakasi,
using 20 to get some margin */);
} catch (Exception e) {
- e.printStackTrace();
+ throw new AssertionError(e);
}
- int value = new com.android.framework.multidexlegacytestservices.manymethods.Big001().get1() +
+ int value =
+ new com.android.framework.multidexlegacytestservices.manymethods.Big001().get1() +
new com.android.framework.multidexlegacytestservices.manymethods.Big002().get2() +
new com.android.framework.multidexlegacytestservices.manymethods.Big003().get3() +
new com.android.framework.multidexlegacytestservices.manymethods.Big004().get4() +
diff --git a/cmds/idmap/Android.mk b/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk
similarity index 62%
rename from cmds/idmap/Android.mk
rename to core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk
index aeb8a0c..f3d98a8 100644
--- a/cmds/idmap/Android.mk
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2012 The Android Open Source Project
+# Copyright (C) 2014 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.
@@ -13,18 +13,21 @@
# limitations under the License.
LOCAL_PATH:= $(call my-dir)
+
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := idmap.cpp create.cpp scan.cpp inspect.cpp
+LOCAL_MODULE_TAGS := tests
-LOCAL_SHARED_LIBRARIES := liblog libutils libandroidfw libcutils
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_MODULE := idmap
+LOCAL_PACKAGE_NAME := MultiDexLegacyTestServicesTests2
-LOCAL_C_INCLUDES := external/zlib
+LOCAL_JAVA_LIBRARIES := android-support-multidex
+LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
-LOCAL_MODULE_TAGS := optional
+LOCAL_SDK_VERSION := 9
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
+LOCAL_DEX_PREOPT := false
-include $(BUILD_EXECUTABLE)
+include $(BUILD_PACKAGE)
+
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/AndroidManifest.xml b/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/AndroidManifest.xml
new file mode 100644
index 0000000..0ab2959
--- /dev/null
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/AndroidManifest.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.framework.multidexlegacytestservices.test2"
+ android:versionCode="1"
+ android:versionName="1.0" >
+
+ <uses-sdk android:minSdkVersion="9" />
+ <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.framework.multidexlegacytestservices" />
+
+ <application
+ android:label="multidexlegacytestservices.test2" >
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+</manifest>
\ No newline at end of file
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/src/com/android/framework/multidexlegacytestservices/test2/ServicesTests.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/src/com/android/framework/multidexlegacytestservices/test2/ServicesTests.java
new file mode 100644
index 0000000..900f203
--- /dev/null
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/src/com/android/framework/multidexlegacytestservices/test2/ServicesTests.java
@@ -0,0 +1,381 @@
+/*
+ * 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.
+ */
+
+package com.android.framework.multidexlegacytestservices.test2;
+
+import android.app.ActivityManager;
+import android.content.Context;
+import android.content.Intent;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+import android.util.Log;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.util.concurrent.TimeoutException;
+import junit.framework.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Run the tests with: <code>adb shell am instrument -w
+ * com.android.framework.multidexlegacytestservices.test2/android.support.test.runner.AndroidJUnitRunner
+ * </code>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ServicesTests {
+ private static final String TAG = "ServicesTests";
+
+ static {
+ Log.i(TAG, "Initializing");
+ }
+
+ private class ExtensionFilter implements FileFilter {
+ private final String ext;
+
+ public ExtensionFilter(String ext) {
+ this.ext = ext;
+ }
+
+ @Override
+ public boolean accept(File file) {
+ return file.getName().endsWith(ext);
+ }
+ }
+
+ private class ExtractedZipFilter extends ExtensionFilter {
+ public ExtractedZipFilter() {
+ super(".zip");
+ }
+
+ @Override
+ public boolean accept(File file) {
+ return super.accept(file) && !file.getName().startsWith("tmp-");
+ }
+ }
+
+ private static final int ENDHDR = 22;
+
+ private static final String SERVICE_BASE_ACTION =
+ "com.android.framework.multidexlegacytestservices.action.Service";
+ private static final int MIN_SERVICE = 1;
+ private static final int MAX_SERVICE = 19;
+ private static final String COMPLETION_SUCCESS = "Success";
+
+ private File targetFilesDir;
+
+ @Before
+ public void setup() throws Exception {
+ Log.i(TAG, "setup");
+ killServices();
+
+ File applicationDataDir =
+ new File(InstrumentationRegistry.getTargetContext().getApplicationInfo().dataDir);
+ clearDirContent(applicationDataDir);
+ targetFilesDir = InstrumentationRegistry.getTargetContext().getFilesDir();
+
+ Log.i(TAG, "setup done");
+ }
+
+ @Test
+ public void testStressConcurentLaunch() throws Exception {
+ startServices();
+ waitServicesCompletion();
+ String completionStatus = getServicesCompletionStatus();
+ if (completionStatus != COMPLETION_SUCCESS) {
+ Assert.fail(completionStatus);
+ }
+ }
+
+ @Test
+ public void testRecoverFromZipCorruption() throws Exception {
+ int serviceId = 1;
+ // Ensure extraction.
+ initServicesWorkFiles();
+ startService(serviceId);
+ waitServicesCompletion(serviceId);
+
+ // Corruption of the extracted zips.
+ tamperAllExtractedZips();
+
+ killServices();
+ checkRecover();
+ }
+
+ @Test
+ public void testRecoverFromDexCorruption() throws Exception {
+ int serviceId = 1;
+ // Ensure extraction.
+ initServicesWorkFiles();
+ startService(serviceId);
+ waitServicesCompletion(serviceId);
+
+ // Corruption of the odex files.
+ tamperAllOdex();
+
+ killServices();
+ checkRecover();
+ }
+
+ @Test
+ public void testRecoverFromZipCorruptionStressTest() throws Exception {
+ Thread startServices =
+ new Thread() {
+ @Override
+ public void run() {
+ startServices();
+ }
+ };
+
+ startServices.start();
+
+ // Start services lasts more than 80s, lets cause a few corruptions during this interval.
+ for (int i = 0; i < 80; i++) {
+ Thread.sleep(1000);
+ tamperAllExtractedZips();
+ }
+ startServices.join();
+ try {
+ waitServicesCompletion();
+ } catch (TimeoutException e) {
+ // Can happen.
+ }
+
+ killServices();
+ checkRecover();
+ }
+
+ @Test
+ public void testRecoverFromDexCorruptionStressTest() throws Exception {
+ Thread startServices =
+ new Thread() {
+ @Override
+ public void run() {
+ startServices();
+ }
+ };
+
+ startServices.start();
+
+ // Start services lasts more than 80s, lets cause a few corruptions during this interval.
+ for (int i = 0; i < 80; i++) {
+ Thread.sleep(1000);
+ tamperAllOdex();
+ }
+ startServices.join();
+ try {
+ waitServicesCompletion();
+ } catch (TimeoutException e) {
+ // Will probably happen most of the time considering what we're doing...
+ }
+
+ killServices();
+ checkRecover();
+ }
+
+ private static void clearDirContent(File dir) {
+ for (File subElement : dir.listFiles()) {
+ if (subElement.isDirectory()) {
+ clearDirContent(subElement);
+ }
+ if (!subElement.delete()) {
+ throw new AssertionError("Failed to clear '" + subElement.getAbsolutePath() + "'");
+ }
+ }
+ }
+
+ private void startServices() {
+ Log.i(TAG, "start services");
+ initServicesWorkFiles();
+ for (int i = MIN_SERVICE; i <= MAX_SERVICE; i++) {
+ startService(i);
+ try {
+ Thread.sleep((i - 1) * (1 << (i / 5)));
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+
+ private void startService(int serviceId) {
+ Log.i(TAG, "start service " + serviceId);
+ InstrumentationRegistry.getContext().startService(new Intent(SERVICE_BASE_ACTION + serviceId));
+ }
+
+ private void initServicesWorkFiles() {
+ for (int i = MIN_SERVICE; i <= MAX_SERVICE; i++) {
+ File resultFile = new File(targetFilesDir, "Service" + i);
+ resultFile.delete();
+ Assert.assertFalse(
+ "Failed to delete result file '" + resultFile.getAbsolutePath() + "'.",
+ resultFile.exists());
+ File completeFile = new File(targetFilesDir, "Service" + i + ".complete");
+ completeFile.delete();
+ Assert.assertFalse(
+ "Failed to delete completion file '" + completeFile.getAbsolutePath() + "'.",
+ completeFile.exists());
+ }
+ }
+
+ private void waitServicesCompletion() throws TimeoutException {
+ Log.i(TAG, "start sleeping");
+ int attempt = 0;
+ int maxAttempt = 50; // 10 is enough for a nexus S
+ do {
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ }
+ attempt++;
+ if (attempt >= maxAttempt) {
+ throw new TimeoutException();
+ }
+ } while (!areAllServicesCompleted());
+ }
+
+ private void waitServicesCompletion(int serviceId) throws TimeoutException {
+ Log.i(TAG, "start sleeping");
+ int attempt = 0;
+ int maxAttempt = 50; // 10 is enough for a nexus S
+ do {
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ }
+ attempt++;
+ if (attempt >= maxAttempt) {
+ throw new TimeoutException();
+ }
+ } while (isServiceRunning(serviceId));
+ }
+
+ private String getServicesCompletionStatus() {
+ String status = COMPLETION_SUCCESS;
+ for (int i = MIN_SERVICE; i <= MAX_SERVICE; i++) {
+ File resultFile = new File(targetFilesDir, "Service" + i);
+ if (!resultFile.isFile()) {
+ status = "Service" + i + " never completed.";
+ break;
+ }
+ if (resultFile.length() != 8) {
+ status = "Service" + i + " was restarted.";
+ break;
+ }
+ }
+ Log.i(TAG, "Services completion status: " + status);
+ return status;
+ }
+
+ private String getServiceCompletionStatus(int serviceId) {
+ String status = COMPLETION_SUCCESS;
+ File resultFile = new File(targetFilesDir, "Service" + serviceId);
+ if (!resultFile.isFile()) {
+ status = "Service" + serviceId + " never completed.";
+ } else if (resultFile.length() != 8) {
+ status = "Service" + serviceId + " was restarted.";
+ }
+ Log.i(TAG, "Service " + serviceId + " completion status: " + status);
+ return status;
+ }
+
+ private boolean areAllServicesCompleted() {
+ for (int i = MIN_SERVICE; i <= MAX_SERVICE; i++) {
+ if (isServiceRunning(i)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private boolean isServiceRunning(int i) {
+ File completeFile = new File(targetFilesDir, "Service" + i + ".complete");
+ return !completeFile.exists();
+ }
+
+ private File getSecondaryFolder() {
+ File dir =
+ new File(
+ new File(
+ InstrumentationRegistry.getTargetContext().getApplicationInfo().dataDir,
+ "code_cache"),
+ "secondary-dexes");
+ Assert.assertTrue(dir.getAbsolutePath(), dir.isDirectory());
+ return dir;
+ }
+
+ private void tamperAllExtractedZips() throws IOException {
+ // First attempt was to just overwrite zip entries but keep central directory, this was no
+ // trouble for Dalvik that was just ignoring those zip and using the odex files.
+ Log.i(TAG, "Tamper extracted zip files by overwriting all content by '\\0's.");
+ byte[] zeros = new byte[4 * 1024];
+ // Do not tamper tmp zip during their extraction.
+ for (File zip : getSecondaryFolder().listFiles(new ExtractedZipFilter())) {
+ long fileLength = zip.length();
+ Assert.assertTrue(fileLength > ENDHDR);
+ zip.setWritable(true);
+ RandomAccessFile raf = new RandomAccessFile(zip, "rw");
+ try {
+ int index = 0;
+ while (index < fileLength) {
+ int length = (int) Math.min(zeros.length, fileLength - index);
+ raf.write(zeros, 0, length);
+ index += length;
+ }
+ } finally {
+ raf.close();
+ }
+ }
+ }
+
+ private void tamperAllOdex() throws IOException {
+ Log.i(TAG, "Tamper odex files by overwriting some content by '\\0's.");
+ byte[] zeros = new byte[4 * 1024];
+ // I think max size would be 40 (u1[8] + 8 u4) but it's a test so lets take big margins.
+ int savedSizeForOdexHeader = 80;
+ for (File odex : getSecondaryFolder().listFiles(new ExtensionFilter(".dex"))) {
+ long fileLength = odex.length();
+ Assert.assertTrue(fileLength > zeros.length + savedSizeForOdexHeader);
+ odex.setWritable(true);
+ RandomAccessFile raf = new RandomAccessFile(odex, "rw");
+ try {
+ raf.seek(savedSizeForOdexHeader);
+ raf.write(zeros, 0, zeros.length);
+ } finally {
+ raf.close();
+ }
+ }
+ }
+
+ private void checkRecover() throws TimeoutException {
+ Log.i(TAG, "Check recover capability");
+ int serviceId = 1;
+ // Start one service and check it was able to run correctly even if a previous run failed.
+ initServicesWorkFiles();
+ startService(serviceId);
+ waitServicesCompletion(serviceId);
+ String completionStatus = getServiceCompletionStatus(serviceId);
+ if (completionStatus != COMPLETION_SUCCESS) {
+ Assert.fail(completionStatus);
+ }
+ }
+
+ private void killServices() {
+ ((ActivityManager)
+ InstrumentationRegistry.getContext().getSystemService(Context.ACTIVITY_SERVICE))
+ .killBackgroundProcesses("com.android.framework.multidexlegacytestservices");
+ }
+}
diff --git a/core/tests/hosttests/test-apps/SharedUid/32/Android.mk b/core/tests/hosttests/test-apps/SharedUid/32/Android.mk
index e141bbe..7b44f9e 100644
--- a/core/tests/hosttests/test-apps/SharedUid/32/Android.mk
+++ b/core/tests/hosttests/test-apps/SharedUid/32/Android.mk
@@ -36,8 +36,3 @@
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
-
-# ============================================================
-
-# Also build all of the sub-targets under this one: the shared library.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.bp b/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.bp
new file mode 100644
index 0000000..6db0ba5
--- /dev/null
+++ b/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.bp
@@ -0,0 +1,38 @@
+//
+// Copyright (C) 2008 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.
+//
+
+// This makefile supplies the rules for building a library of JNI code for
+// use by our example of how to bundle a shared library with an APK.
+
+cc_test_library {
+
+ // This is the target being built.
+ name: "libpmtest32",
+ compile_multilib: "32",
+
+ // All of the source files that we will compile.
+ srcs: ["native.cpp"],
+
+ shared_libs: ["liblog"],
+
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+
+ sdk_version: "current",
+}
diff --git a/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.mk b/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.mk
deleted file mode 100644
index 994131a..0000000
--- a/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright (C) 2008 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.
-#
-
-# This makefile supplies the rules for building a library of JNI code for
-# use by our example of how to bundle a shared library with an APK.
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-# This is the target being built.
-LOCAL_MODULE:= libpmtest32
-LOCAL_MULTILIB := 32
-LOCAL_MODULE_TAGS := tests
-
-# All of the source files that we will compile.
-LOCAL_SRC_FILES:= \
- native.cpp
-
-# All of the shard libraries we link against.
-LOCAL_SHARED_LIBRARIES := liblog
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-# Also need the JNI headers.
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE)
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/core/tests/hosttests/test-apps/SharedUid/32/jni/native.cpp b/core/tests/hosttests/test-apps/SharedUid/32/jni/native.cpp
index 99cf587..fe32454 100644
--- a/core/tests/hosttests/test-apps/SharedUid/32/jni/native.cpp
+++ b/core/tests/hosttests/test-apps/SharedUid/32/jni/native.cpp
@@ -15,12 +15,15 @@
*/
#define LOG_TAG "pmtest32 native.cpp"
-#include <utils/Log.h>
+#include <android/log.h>
#include <stdio.h>
#include "jni.h"
+#define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
+#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
+
static jint
add(JNIEnv */* env */, jobject /* thiz */, jint a, jint b) {
int result = a + b;
diff --git a/core/tests/hosttests/test-apps/SharedUid/64/Android.mk b/core/tests/hosttests/test-apps/SharedUid/64/Android.mk
index 4f24f33..cc088c1a 100644
--- a/core/tests/hosttests/test-apps/SharedUid/64/Android.mk
+++ b/core/tests/hosttests/test-apps/SharedUid/64/Android.mk
@@ -36,8 +36,3 @@
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
-
-# ============================================================
-
-# Also build all of the sub-targets under this one: the shared library.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.bp b/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.bp
new file mode 100644
index 0000000..582f2a7
--- /dev/null
+++ b/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.bp
@@ -0,0 +1,37 @@
+//
+// Copyright (C) 2008 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.
+//
+
+// This Android.bp supplies the rules for building a library of JNI code for
+// use by our example of how to bundle a shared library with an APK.
+
+cc_test_library {
+ // This is the target being built.
+ name: "libpmtest64",
+ compile_multilib: "64",
+
+ // All of the source files that we will compile.
+ srcs: ["native.cpp"],
+
+ shared_libs: ["liblog"],
+
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+
+ sdk_version: "current",
+}
diff --git a/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.mk b/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.mk
deleted file mode 100644
index 6c2679b..0000000
--- a/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Copyright (C) 2008 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.
-#
-
-# This makefile supplies the rules for building a library of JNI code for
-# use by our example of how to bundle a shared library with an APK.
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-# This is the target being built.
-LOCAL_MODULE:= libpmtest64
-LOCAL_MULTILIB := 64
-LOCAL_MODULE_TAGS := tests
-
-
-# All of the source files that we will compile.
-LOCAL_SRC_FILES:= \
- native.cpp
-
-# All of the shared libraries we link against.
-LOCAL_SHARED_LIBRARIES := \
- libutils liblog
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-# Also need the JNI headers.
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE)
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/core/tests/hosttests/test-apps/SharedUid/64/jni/native.cpp b/core/tests/hosttests/test-apps/SharedUid/64/jni/native.cpp
index 0b6d750..ad9e746 100644
--- a/core/tests/hosttests/test-apps/SharedUid/64/jni/native.cpp
+++ b/core/tests/hosttests/test-apps/SharedUid/64/jni/native.cpp
@@ -15,12 +15,15 @@
*/
#define LOG_TAG "pmtest64 native.cpp"
-#include <utils/Log.h>
+#include <android/log.h>
#include <stdio.h>
#include "jni.h"
+#define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
+#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
+
static jint
add(JNIEnv */* env */, jobject /* thiz */, jint a, jint b) {
int result = a + b;
diff --git a/core/tests/hosttests/test-apps/SharedUid/dual/Android.mk b/core/tests/hosttests/test-apps/SharedUid/dual/Android.mk
index 60af2b9..5bcd078 100644
--- a/core/tests/hosttests/test-apps/SharedUid/dual/Android.mk
+++ b/core/tests/hosttests/test-apps/SharedUid/dual/Android.mk
@@ -56,8 +56,3 @@
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
-
-# ============================================================
-
-# Also build all of the sub-targets under this one: the shared library.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.bp b/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.bp
new file mode 100644
index 0000000..3e043afe
--- /dev/null
+++ b/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.bp
@@ -0,0 +1,39 @@
+//
+// Copyright (C) 2008 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.
+//
+
+// This Android.bp supplies the rules for building a library of JNI code for
+// use by our example of how to bundle a shared library with an APK.
+
+cc_test_library {
+
+ // This is the target being built.
+ name: "libpmtestdual",
+ compile_multilib: "both",
+ gtest: false,
+
+ // All of the source files that we will compile.
+ srcs: ["native.cpp"],
+
+ shared_libs: ["liblog"],
+
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+
+ sdk_version: "current",
+}
diff --git a/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.mk b/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.mk
deleted file mode 100644
index d668f29..0000000
--- a/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (C) 2008 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.
-#
-
-# This makefile supplies the rules for building a library of JNI code for
-# use by our example of how to bundle a shared library with an APK.
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-# This is the target being built.
-LOCAL_MODULE:= libpmtestdual
-LOCAL_MULTILIB := both
-LOCAL_MODULE_TAGS := tests
-
-# All of the source files that we will compile.
-LOCAL_SRC_FILES:= \
- native.cpp
-
-# All of the shard libraries we link against.
-LOCAL_LDLIBS = -llog
-LOCAL_SHARED_LIBRARIES := liblog
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-# Also need the JNI headers.
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE)
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/core/tests/hosttests/test-apps/SharedUid/dual/jni/native.cpp b/core/tests/hosttests/test-apps/SharedUid/dual/jni/native.cpp
index 3947e21..5c5088f 100644
--- a/core/tests/hosttests/test-apps/SharedUid/dual/jni/native.cpp
+++ b/core/tests/hosttests/test-apps/SharedUid/dual/jni/native.cpp
@@ -15,12 +15,15 @@
*/
#define LOG_TAG "pmtestdual native.cpp"
-#include <utils/Log.h>
+#include <android/log.h>
#include <stdio.h>
#include "jni.h"
+#define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
+#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
+
static jint
add(JNIEnv */* env */, jobject /* thiz */, jint a, jint b) {
int result = a + b;
diff --git a/core/tests/notificationtests/Android.mk b/core/tests/notificationtests/Android.mk
index 0551eb6..910d5aa 100644
--- a/core/tests/notificationtests/Android.mk
+++ b/core/tests/notificationtests/Android.mk
@@ -10,6 +10,9 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := NotificationStressTests
+# Could build against SDK if it wasn't for the @RepetitiveTest annotation.
+LOCAL_PRIVATE_PLATFORM_APIS := true
+
LOCAL_STATIC_JAVA_LIBRARIES := \
junit \
diff --git a/core/tests/overlaytests/OverlayTest/Android.mk b/core/tests/overlaytests/OverlayTest/Android.mk
index 964348f..8f4b829 100644
--- a/core/tests/overlaytests/OverlayTest/Android.mk
+++ b/core/tests/overlaytests/OverlayTest/Android.mk
@@ -5,6 +5,8 @@
LOCAL_PACKAGE_NAME := OverlayTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
+
LOCAL_DEX_PREOPT := false
LOCAL_JAVA_LIBRARIES += legacy-test
diff --git a/core/tests/packagemanagertests/Android.mk b/core/tests/packagemanagertests/Android.mk
index 5bfde78..f95231f 100644
--- a/core/tests/packagemanagertests/Android.mk
+++ b/core/tests/packagemanagertests/Android.mk
@@ -15,6 +15,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := FrameworksCorePackageManagerTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
diff --git a/core/tests/systemproperties/Android.mk b/core/tests/systemproperties/Android.mk
index 4c2e224..d58ed54 100644
--- a/core/tests/systemproperties/Android.mk
+++ b/core/tests/systemproperties/Android.mk
@@ -12,6 +12,7 @@
LOCAL_STATIC_JAVA_LIBRARIES := android-common frameworks-core-util-lib
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := FrameworksCoreSystemPropertiesTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
diff --git a/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java b/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java
index 282b001..933e54e 100644
--- a/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java
+++ b/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java
@@ -16,6 +16,9 @@
package android.os;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
import junit.framework.TestCase;
import android.os.SystemProperties;
@@ -141,4 +144,48 @@
} catch (NullPointerException npe) {
}
}
+
+ @SmallTest
+ public void testCallbacks() {
+ // Latches are not really necessary, but are easy to use.
+ final CountDownLatch wait1 = new CountDownLatch(1);
+ final CountDownLatch wait2 = new CountDownLatch(1);
+
+ Runnable r1 = new Runnable() {
+ boolean done = false;
+ @Override
+ public void run() {
+ if (done) {
+ return;
+ }
+ done = true;
+
+ wait1.countDown();
+ throw new RuntimeException("test");
+ }
+ };
+
+ Runnable r2 = new Runnable() {
+ @Override
+ public void run() {
+ wait2.countDown();
+ }
+ };
+
+ SystemProperties.addChangeCallback(r1);
+ SystemProperties.addChangeCallback(r2);
+
+ SystemProperties.reportSyspropChanged();
+
+ try {
+ assertTrue(wait1.await(5, TimeUnit.SECONDS));
+ } catch (InterruptedException e) {
+ fail("InterruptedException");
+ }
+ try {
+ assertTrue(wait2.await(5, TimeUnit.SECONDS));
+ } catch (InterruptedException e) {
+ fail("InterruptedException");
+ }
+ }
}
diff --git a/core/tests/utiltests/Android.mk b/core/tests/utiltests/Android.mk
index 233d070..b142af0 100644
--- a/core/tests/utiltests/Android.mk
+++ b/core/tests/utiltests/Android.mk
@@ -22,6 +22,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := FrameworksUtilTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
diff --git a/data/etc/Android.mk b/data/etc/Android.mk
index b2c6840..936ad22 100644
--- a/data/etc/Android.mk
+++ b/data/etc/Android.mk
@@ -39,3 +39,11 @@
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
LOCAL_SRC_FILES := $(LOCAL_MODULE)
include $(BUILD_PREBUILT)
+
+########################
+include $(CLEAR_VARS)
+LOCAL_MODULE := hiddenapi-package-whitelist.xml
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/sysconfig
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+include $(BUILD_PREBUILT)
diff --git a/data/etc/hiddenapi-package-whitelist.xml b/data/etc/hiddenapi-package-whitelist.xml
new file mode 100644
index 0000000..bacddf14
--- /dev/null
+++ b/data/etc/hiddenapi-package-whitelist.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ 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
+ -->
+
+<!--
+This XML file declares which system apps should be exempted from the hidden API blacklisting, i.e.
+which apps should be allowed to access the entire private API.
+-->
+
+<config>
+ <hidden-api-whitelisted-app package="android.car.cluster.loggingrenderer" />
+ <hidden-api-whitelisted-app package="android.car.input.service" />
+ <hidden-api-whitelisted-app package="android.car.usb.handler" />
+ <hidden-api-whitelisted-app package="android.ext.services" />
+ <hidden-api-whitelisted-app package="com.android.apps.tag" />
+ <hidden-api-whitelisted-app package="com.android.backupconfirm" />
+ <hidden-api-whitelisted-app package="com.android.basicsmsreceiver" />
+ <hidden-api-whitelisted-app package="com.android.bluetooth" />
+ <hidden-api-whitelisted-app package="com.android.bluetoothdebug" />
+ <hidden-api-whitelisted-app package="com.android.bluetoothmidiservice" />
+ <hidden-api-whitelisted-app package="com.android.bookmarkprovider" />
+ <hidden-api-whitelisted-app package="com.android.calllogbackup" />
+ <hidden-api-whitelisted-app package="com.android.camera" />
+ <hidden-api-whitelisted-app package="com.android.captiveportallogin" />
+ <hidden-api-whitelisted-app package="com.android.car" />
+ <hidden-api-whitelisted-app package="com.android.car.dialer" />
+ <hidden-api-whitelisted-app package="com.android.car.hvac" />
+ <hidden-api-whitelisted-app package="com.android.car.mapsplaceholder" />
+ <hidden-api-whitelisted-app package="com.android.car.media" />
+ <hidden-api-whitelisted-app package="com.android.car.media.localmediaplayer" />
+ <hidden-api-whitelisted-app package="com.android.car.messenger" />
+ <hidden-api-whitelisted-app package="com.android.car.overview" />
+ <hidden-api-whitelisted-app package="com.android.car.radio" />
+ <hidden-api-whitelisted-app package="com.android.car.settings" />
+ <hidden-api-whitelisted-app package="com.android.car.stream" />
+ <hidden-api-whitelisted-app package="com.android.car.systemupdater" />
+ <hidden-api-whitelisted-app package="com.android.car.trust" />
+ <hidden-api-whitelisted-app package="com.android.carrierconfig" />
+ <hidden-api-whitelisted-app package="com.android.carrierdefaultapp" />
+ <hidden-api-whitelisted-app package="com.android.cellbroadcastreceiver" />
+ <hidden-api-whitelisted-app package="com.android.certinstaller" />
+ <hidden-api-whitelisted-app package="com.android.companiondevicemanager" />
+ <hidden-api-whitelisted-app package="com.android.customlocale2" />
+ <hidden-api-whitelisted-app package="com.android.defcontainer" />
+ <hidden-api-whitelisted-app package="com.android.documentsui" />
+ <hidden-api-whitelisted-app package="com.android.dreams.basic" />
+ <hidden-api-whitelisted-app package="com.android.egg" />
+ <hidden-api-whitelisted-app package="com.android.emergency" />
+ <hidden-api-whitelisted-app package="com.android.externalstorage" />
+ <hidden-api-whitelisted-app package="com.android.fakeoemfeatures" />
+ <hidden-api-whitelisted-app package="com.android.gallery" />
+ <hidden-api-whitelisted-app package="com.android.hotspot2" />
+ <hidden-api-whitelisted-app package="com.android.keychain" />
+ <hidden-api-whitelisted-app package="com.android.location.fused" />
+ <hidden-api-whitelisted-app package="com.android.managedprovisioning" />
+ <hidden-api-whitelisted-app package="com.android.mms.service" />
+ <hidden-api-whitelisted-app package="com.android.mtp" />
+ <hidden-api-whitelisted-app package="com.android.musicfx" />
+ <hidden-api-whitelisted-app package="com.android.nfc" />
+ <hidden-api-whitelisted-app package="com.android.osu" />
+ <hidden-api-whitelisted-app package="com.android.packageinstaller" />
+ <hidden-api-whitelisted-app package="com.android.pacprocessor" />
+ <hidden-api-whitelisted-app package="com.android.phone" />
+ <hidden-api-whitelisted-app package="com.android.pmc" />
+ <hidden-api-whitelisted-app package="com.android.printservice.recommendation" />
+ <hidden-api-whitelisted-app package="com.android.printspooler" />
+ <hidden-api-whitelisted-app package="com.android.providers.blockednumber" />
+ <hidden-api-whitelisted-app package="com.android.providers.calendar" />
+ <hidden-api-whitelisted-app package="com.android.providers.contacts" />
+ <hidden-api-whitelisted-app package="com.android.providers.downloads" />
+ <hidden-api-whitelisted-app package="com.android.providers.downloads.ui" />
+ <hidden-api-whitelisted-app package="com.android.providers.media" />
+ <hidden-api-whitelisted-app package="com.android.providers.settings" />
+ <hidden-api-whitelisted-app package="com.android.providers.telephony" />
+ <hidden-api-whitelisted-app package="com.android.providers.tv" />
+ <hidden-api-whitelisted-app package="com.android.providers.userdictionary" />
+ <hidden-api-whitelisted-app package="com.android.provision" />
+ <hidden-api-whitelisted-app package="com.android.proxyhandler" />
+ <hidden-api-whitelisted-app package="com.android.sdksetup" />
+ <hidden-api-whitelisted-app package="com.android.se" />
+ <hidden-api-whitelisted-app package="com.android.server.telecom" />
+ <hidden-api-whitelisted-app package="com.android.service.ims" />
+ <hidden-api-whitelisted-app package="com.android.service.ims.presence" />
+ <hidden-api-whitelisted-app package="com.android.settings" />
+ <hidden-api-whitelisted-app package="com.android.sharedstoragebackup" />
+ <hidden-api-whitelisted-app package="com.android.shell" />
+ <hidden-api-whitelisted-app package="com.android.smspush" />
+ <hidden-api-whitelisted-app package="com.android.spare_parts" />
+ <hidden-api-whitelisted-app package="com.android.statementservice" />
+ <hidden-api-whitelisted-app package="com.android.stk" />
+ <hidden-api-whitelisted-app package="com.android.storagemanager" />
+ <hidden-api-whitelisted-app package="com.android.support.car.lenspicker" />
+ <hidden-api-whitelisted-app package="com.android.systemui" />
+ <hidden-api-whitelisted-app package="com.android.systemui.plugins" />
+ <hidden-api-whitelisted-app package="com.android.terminal" />
+ <hidden-api-whitelisted-app package="com.android.timezone.updater" />
+ <hidden-api-whitelisted-app package="com.android.traceur" />
+ <hidden-api-whitelisted-app package="com.android.tv.settings" />
+ <hidden-api-whitelisted-app package="com.android.vpndialogs" />
+ <hidden-api-whitelisted-app package="com.android.wallpaper.livepicker" />
+ <hidden-api-whitelisted-app package="com.android.wallpaperbackup" />
+ <hidden-api-whitelisted-app package="com.android.wallpapercropper" />
+ <hidden-api-whitelisted-app package="com.googlecode.android_scripting" />
+ <hidden-api-whitelisted-app package="jp.co.omronsoft.openwnn" />
+</config>
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index 26741fe..64085ea 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -167,10 +167,6 @@
file="/system/framework/android.test.mock.jar" />
<library name="android.test.runner"
file="/system/framework/android.test.runner.jar" />
- <library name="javax.obex"
- file="/system/framework/javax.obex.jar" />
- <library name="org.apache.http.legacy"
- file="/system/framework/org.apache.http.legacy.jar" />
<!-- These are the standard packages that are white-listed to always have internet
access while in power save mode, even if they aren't in the foreground. -->
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index 6a3a973..f2fe654 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -56,6 +56,8 @@
</privapp-permissions>
<privapp-permissions package="com.android.emergency">
+ <!-- Required to place emergency calls from emergency info screen. -->
+ <permission name="android.permission.CALL_PRIVILEGED"/>
<permission name="android.permission.MANAGE_USERS"/>
</privapp-permissions>
@@ -134,6 +136,7 @@
<permission name="android.permission.BIND_CARRIER_MESSAGING_SERVICE"/>
<permission name="android.permission.BIND_CARRIER_SERVICES"/>
<permission name="android.permission.BIND_IMS_SERVICE"/>
+ <permission name="android.permission.BIND_TELEPHONY_DATA_SERVICE"/>
<permission name="android.permission.BIND_VISUAL_VOICEMAIL_SERVICE"/>
<permission name="android.permission.CALL_PRIVILEGED"/>
<permission name="android.permission.CHANGE_COMPONENT_ENABLED_STATE"/>
@@ -146,6 +149,7 @@
<permission name="android.permission.LOCAL_MAC_ADDRESS"/>
<permission name="android.permission.MANAGE_USERS"/>
<permission name="android.permission.MODIFY_PHONE_STATE"/>
+ <permission name="android.permission.PACKAGE_USAGE_STATS"/>
<permission name="android.permission.PERFORM_CDMA_PROVISIONING"/>
<permission name="android.permission.READ_NETWORK_USAGE_HISTORY"/>
<permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
@@ -164,7 +168,7 @@
<permission name="android.permission.UPDATE_LOCK"/>
<permission name="android.permission.WRITE_APN_SETTINGS"/>
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
- <permission name="com.android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"/>
+ <permission name="android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"/>
<permission name="com.android.voicemail.permission.READ_VOICEMAIL"/>
<permission name="com.android.voicemail.permission.WRITE_VOICEMAIL"/>
</privapp-permissions>
@@ -212,6 +216,7 @@
<permission name="android.permission.CALL_PRIVILEGED"/>
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
<permission name="android.permission.MANAGE_USERS"/>
+ <permission name="android.permission.MODIFY_AUDIO_ROUTING" />
<permission name="android.permission.MODIFY_PHONE_STATE"/>
<permission name="android.permission.STOP_APP_SWITCHES"/>
<permission name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"/>
@@ -346,6 +351,7 @@
<permission name="android.permission.WRITE_DREAM_STATE"/>
<permission name="android.permission.WRITE_MEDIA_STORAGE"/>
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
+ <permission name="android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"/>
</privapp-permissions>
<privapp-permissions package="com.android.tv">
diff --git a/data/sounds/AllAudio.mk b/data/sounds/AllAudio.mk
index edfd380..bf8067c 100644
--- a/data/sounds/AllAudio.mk
+++ b/data/sounds/AllAudio.mk
@@ -232,4 +232,5 @@
$(LOCAL_PATH)/effects/ogg/WirelessChargingStarted.ogg:system/media/audio/ui/WirelessChargingStarted.ogg \
$(LOCAL_PATH)/effects/ogg/camera_click_48k.ogg:system/media/audio/ui/camera_click.ogg \
$(LOCAL_PATH)/effects/ogg/camera_focus.ogg:system/media/audio/ui/camera_focus.ogg \
-
+ $(LOCAL_PATH)/effects/ogg/ChargingStarted.ogg:system/media/audio/ui/ChargingStarted.ogg \
+ $(LOCAL_PATH)/effects/ogg/InCallNotification.ogg:system/media/audio/ui/InCallNotification.ogg \
diff --git a/data/sounds/AudioPackage10.mk b/data/sounds/AudioPackage10.mk
index c5222af..72aa7fe 100644
--- a/data/sounds/AudioPackage10.mk
+++ b/data/sounds/AudioPackage10.mk
@@ -32,6 +32,8 @@
$(LOCAL_PATH)/effects/ogg/Lock_48k.ogg:system/media/audio/ui/Lock.ogg \
$(LOCAL_PATH)/effects/ogg/Unlock_48k.ogg:system/media/audio/ui/Unlock.ogg \
$(LOCAL_PATH)/effects/ogg/Trusted_48k.ogg:system/media/audio/ui/Trusted.ogg \
+ $(LOCAL_PATH)/effects/ogg/ChargingStarted.ogg:system/media/audio/ui/ChargingStarted.ogg \
+ $(LOCAL_PATH)/effects/ogg/InCallNotification.ogg:system/media/audio/ui/InCallNotification.ogg \
$(LOCAL_PATH)/effects/material/ogg/WirelessChargingStarted_48k.ogg:system/media/audio/ui/WirelessChargingStarted.ogg \
$(LOCAL_PATH)/notifications/ogg/Adara.ogg:system/media/audio/notifications/Adara.ogg \
$(LOCAL_PATH)/notifications/ogg/Alya.ogg:system/media/audio/notifications/Alya.ogg \
diff --git a/data/sounds/AudioPackage11.mk b/data/sounds/AudioPackage11.mk
index 43c83b9..665ce52 100644
--- a/data/sounds/AudioPackage11.mk
+++ b/data/sounds/AudioPackage11.mk
@@ -32,6 +32,8 @@
$(LOCAL_PATH)/effects/ogg/Lock_48k.ogg:system/media/audio/ui/Lock.ogg \
$(LOCAL_PATH)/effects/ogg/Unlock_48k.ogg:system/media/audio/ui/Unlock.ogg \
$(LOCAL_PATH)/effects/ogg/Trusted_48k.ogg:system/media/audio/ui/Trusted.ogg \
+ $(LOCAL_PATH)/effects/ogg/ChargingStarted.ogg:system/media/audio/ui/ChargingStarted.ogg \.
+ $(LOCAL_PATH)/effects/ogg/InCallNotification.ogg:system/media/audio/ui/InCallNotification.ogg \
$(LOCAL_PATH)/effects/material/ogg/WirelessChargingStarted_48k.ogg:system/media/audio/ui/WirelessChargingStarted.ogg \
$(LOCAL_PATH)/notifications/ogg/Adara.ogg:system/media/audio/notifications/Adara.ogg \
$(LOCAL_PATH)/notifications/ogg/Alya.ogg:system/media/audio/notifications/Alya.ogg \
diff --git a/data/sounds/AudioPackage12.mk b/data/sounds/AudioPackage12.mk
index cd4d35b..44a8f9e 100644
--- a/data/sounds/AudioPackage12.mk
+++ b/data/sounds/AudioPackage12.mk
@@ -12,7 +12,7 @@
NOTIFICATION_FILES := Ariel Ceres Carme Elara Europa Iapetus Io Rhea Salacia Titan Tethys
RINGTONE_FILES := Callisto Dione Ganymede Luna Oberon Phobos Sedna Titania Triton Umbriel
EFFECT_FILES := Effect_Tick KeypressReturn KeypressInvalid KeypressDelete KeypressSpacebar KeypressStandard \
- camera_focus Dock Undock Lock Unlock Trusted
+ camera_focus Dock Undock Lock Unlock Trusted ChargingStarted InCallNotification
MATERIAL_EFFECT_FILES := camera_click VideoRecord LowBattery WirelessChargingStarted VideoStop
PRODUCT_COPY_FILES += $(foreach fn,$(ALARM_FILES),\
diff --git a/data/sounds/AudioPackage12_48.mk b/data/sounds/AudioPackage12_48.mk
index 80758f4..09fab04 100644
--- a/data/sounds/AudioPackage12_48.mk
+++ b/data/sounds/AudioPackage12_48.mk
@@ -12,7 +12,7 @@
NOTIFICATION_FILES := Ariel Ceres Carme Elara Europa Iapetus Io Rhea Salacia Titan Tethys
RINGTONE_FILES := Callisto Dione Ganymede Luna Oberon Phobos Sedna Titania Triton Umbriel
EFFECT_FILES := Effect_Tick KeypressReturn KeypressInvalid KeypressDelete KeypressSpacebar KeypressStandard \
- Lock Unlock Trusted
+ Lock Unlock Trusted ChargingStarted InCallNotification
MATERIAL_EFFECT_FILES := camera_click VideoRecord LowBattery WirelessChargingStarted VideoStop
# Alarms not yet available in 48 kHz
diff --git a/data/sounds/AudioPackage13.mk b/data/sounds/AudioPackage13.mk
index d33a4af..de4ee04 100644
--- a/data/sounds/AudioPackage13.mk
+++ b/data/sounds/AudioPackage13.mk
@@ -13,7 +13,7 @@
RINGTONE_FILES := Atria Callisto Dione Ganymede Luna Oberon Phobos Pyxis Sedna Titania Triton \
Umbriel
EFFECT_FILES := Effect_Tick KeypressReturn KeypressInvalid KeypressDelete KeypressSpacebar KeypressStandard \
- camera_focus Dock Undock Lock Unlock Trusted
+ camera_focus Dock Undock Lock Unlock Trusted ChargingStarted InCallNotification
MATERIAL_EFFECT_FILES := camera_click VideoRecord WirelessChargingStarted LowBattery VideoStop
PRODUCT_COPY_FILES += $(foreach fn,$(ALARM_FILES),\
diff --git a/data/sounds/AudioPackage13_48.mk b/data/sounds/AudioPackage13_48.mk
index 9c320ae..889d581 100644
--- a/data/sounds/AudioPackage13_48.mk
+++ b/data/sounds/AudioPackage13_48.mk
@@ -13,7 +13,7 @@
RINGTONE_FILES := Atria Callisto Dione Ganymede Luna Oberon Phobos Pyxis Sedna Titania Triton \
Umbriel
EFFECT_FILES := Effect_Tick KeypressReturn KeypressInvalid KeypressDelete KeypressSpacebar KeypressStandard \
- Lock Unlock Trusted
+ Lock Unlock Trusted ChargingStarted InCallNotification
MATERIAL_EFFECT_FILES := camera_click VideoRecord WirelessChargingStarted LowBattery VideoStop
PRODUCT_COPY_FILES += $(foreach fn,$(ALARM_FILES),\
diff --git a/data/sounds/effects/ChargingStarted.ogg b/data/sounds/effects/ChargingStarted.ogg
new file mode 100644
index 0000000..f09e273
--- /dev/null
+++ b/data/sounds/effects/ChargingStarted.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/ChargingStarted.ogg b/data/sounds/effects/ogg/ChargingStarted.ogg
new file mode 100644
index 0000000..f09e273
--- /dev/null
+++ b/data/sounds/effects/ogg/ChargingStarted.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/ChargingStarted_48k.ogg b/data/sounds/effects/ogg/ChargingStarted_48k.ogg
new file mode 100644
index 0000000..f09e273
--- /dev/null
+++ b/data/sounds/effects/ogg/ChargingStarted_48k.ogg
Binary files differ
diff --git a/data/sounds/effects/ogg/InCallNotification_48k.ogg b/data/sounds/effects/ogg/InCallNotification_48k.ogg
new file mode 100644
index 0000000..4481ccb2
--- /dev/null
+++ b/data/sounds/effects/ogg/InCallNotification_48k.ogg
Binary files differ
diff --git a/drm/java/android/drm/DrmOutputStream.java b/drm/java/android/drm/DrmOutputStream.java
index ba1c56f..9c23834 100644
--- a/drm/java/android/drm/DrmOutputStream.java
+++ b/drm/java/android/drm/DrmOutputStream.java
@@ -27,13 +27,13 @@
import libcore.io.IoBridge;
import libcore.io.Streams;
+import libcore.util.ArrayUtils;
import java.io.FileDescriptor;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.UnknownServiceException;
-import java.util.Arrays;
/**
* Stream that applies a {@link DrmManagerClient} transformation to data before
@@ -91,7 +91,7 @@
@Override
public void write(byte[] buffer, int offset, int count) throws IOException {
- Arrays.checkOffsetAndCount(buffer.length, offset, count);
+ ArrayUtils.throwsIfOutOfBounds(buffer.length, offset, count);
final byte[] exactBuffer;
if (count == buffer.length) {
diff --git a/drm/jni/Android.bp b/drm/jni/Android.bp
new file mode 100644
index 0000000..1e33f0e
--- /dev/null
+++ b/drm/jni/Android.bp
@@ -0,0 +1,38 @@
+//
+// Copyright (C) 2010 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.
+//
+
+cc_library_shared {
+ name: "libdrmframework_jni",
+
+ srcs: ["android_drm_DrmManagerClient.cpp"],
+
+ shared_libs: [
+ "libdrmframework",
+ "liblog",
+ "libutils",
+ "libandroid_runtime",
+ "libnativehelper",
+ "libbinder",
+ "libdl",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+}
diff --git a/drm/jni/Android.mk b/drm/jni/Android.mk
deleted file mode 100644
index d0797a9..0000000
--- a/drm/jni/Android.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (C) 2010 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:= \
- android_drm_DrmManagerClient.cpp
-
-LOCAL_MODULE:= libdrmframework_jni
-
-LOCAL_SHARED_LIBRARIES := \
- libdrmframework \
- liblog \
- libutils \
- libandroid_runtime \
- libnativehelper \
- libbinder \
- libdl
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE) \
- $(TOP)/frameworks/av/drm/libdrmframework/include \
- $(TOP)/frameworks/av/drm/libdrmframework/plugins/common/include \
- $(TOP)/frameworks/av/include \
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java
index e3740e3..7ad062a 100644
--- a/graphics/java/android/graphics/drawable/BitmapDrawable.java
+++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java
@@ -163,7 +163,7 @@
/**
* Create a drawable by opening a given file path and decoding the bitmap.
*/
- @SuppressWarnings("unused")
+ @SuppressWarnings({ "unused", "ChainingConstructorIgnoresParameter" })
public BitmapDrawable(Resources res, String filepath) {
this(new BitmapState(BitmapFactory.decodeFile(filepath)), null);
mBitmapState.mTargetDensity = mTargetDensity;
@@ -188,7 +188,7 @@
/**
* Create a drawable by decoding a bitmap from the given input stream.
*/
- @SuppressWarnings("unused")
+ @SuppressWarnings({ "unused", "ChainingConstructorIgnoresParameter" })
public BitmapDrawable(Resources res, java.io.InputStream is) {
this(new BitmapState(BitmapFactory.decodeStream(is)), null);
mBitmapState.mTargetDensity = mTargetDensity;
diff --git a/libs/androidfw/Android.bp b/libs/androidfw/Android.bp
index 1d14fa0..89c1080 100644
--- a/libs/androidfw/Android.bp
+++ b/libs/androidfw/Android.bp
@@ -44,6 +44,7 @@
"ZipUtils.cpp",
],
export_include_dirs: ["include"],
+ export_shared_lib_headers: ["libz"],
target: {
android: {
srcs: [
diff --git a/libs/androidfw/Asset.cpp b/libs/androidfw/Asset.cpp
index 247458d..c512a6b 100644
--- a/libs/androidfw/Asset.cpp
+++ b/libs/androidfw/Asset.cpp
@@ -26,7 +26,7 @@
#include <androidfw/Util.h>
#include <androidfw/ZipFileRO.h>
#include <androidfw/ZipUtils.h>
-#include <utils/Atomic.h>
+#include <cutils/atomic.h>
#include <utils/FileMap.h>
#include <utils/Log.h>
#include <utils/threads.h>
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index 5603508..b4ccae7 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -28,7 +28,7 @@
#include <androidfw/misc.h>
#include <androidfw/ResourceTypes.h>
#include <androidfw/ZipFileRO.h>
-#include <utils/Atomic.h>
+#include <cutils/atomic.h>
#include <utils/Log.h>
#include <utils/String8.h>
#include <utils/String8.h>
diff --git a/libs/androidfw/OWNERS b/libs/androidfw/OWNERS
new file mode 100644
index 0000000..23ec5ab
--- /dev/null
+++ b/libs/androidfw/OWNERS
@@ -0,0 +1,2 @@
+set noparent
+toddke@google.com
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 7a0ef2b..b184d12 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -32,7 +32,7 @@
#include <androidfw/ByteBucketArray.h>
#include <androidfw/ResourceTypes.h>
#include <androidfw/TypeWrappers.h>
-#include <utils/Atomic.h>
+#include <cutils/atomic.h>
#include <utils/ByteOrder.h>
#include <utils/Debug.h>
#include <utils/Log.h>
diff --git a/libs/androidfw/tests/data/appaslib/build b/libs/androidfw/tests/data/appaslib/build
index baaf700..fb86b45 100755
--- a/libs/androidfw/tests/data/appaslib/build
+++ b/libs/androidfw/tests/data/appaslib/build
@@ -17,7 +17,7 @@
set -e
-PATH_TO_FRAMEWORK_RES=$(gettop)/prebuilts/sdk/current/android.jar
+PATH_TO_FRAMEWORK_RES=$(gettop)/prebuilts/sdk/current/public/android.jar
aapt package -M AndroidManifest.xml -S res -I $PATH_TO_FRAMEWORK_RES -F appaslib.apk -f
aapt package -M AndroidManifest.xml -S res -I $PATH_TO_FRAMEWORK_RES -F appaslib_lib.apk -f --shared-lib
diff --git a/libs/androidfw/tests/data/basic/build b/libs/androidfw/tests/data/basic/build
index d619800..aedebb6 100755
--- a/libs/androidfw/tests/data/basic/build
+++ b/libs/androidfw/tests/data/basic/build
@@ -17,7 +17,7 @@
set -e
-PATH_TO_FRAMEWORK_RES=${ANDROID_BUILD_TOP}/prebuilts/sdk/current/android.jar
+PATH_TO_FRAMEWORK_RES=${ANDROID_BUILD_TOP}/prebuilts/sdk/current/public/android.jar
aapt package \
-M AndroidManifest.xml \
diff --git a/libs/androidfw/tests/data/feature/build b/libs/androidfw/tests/data/feature/build
index aa2f716..e55efd4 100755
--- a/libs/androidfw/tests/data/feature/build
+++ b/libs/androidfw/tests/data/feature/build
@@ -17,7 +17,7 @@
set -e
-PATH_TO_FRAMEWORK_RES=${ANDROID_BUILD_TOP}/prebuilts/sdk/current/android.jar
+PATH_TO_FRAMEWORK_RES=${ANDROID_BUILD_TOP}/prebuilts/sdk/current/public/android.jar
aapt2 compile --dir res -o compiled.flata
aapt2 link -o feature.apk \
diff --git a/libs/androidfw/tests/data/libclient/build b/libs/androidfw/tests/data/libclient/build
index 08310e3..ac69472 100755
--- a/libs/androidfw/tests/data/libclient/build
+++ b/libs/androidfw/tests/data/libclient/build
@@ -17,7 +17,7 @@
set -e
-PATH_TO_FRAMEWORK_RES=${ANDROID_BUILD_TOP}/prebuilts/sdk/current/android.jar
+PATH_TO_FRAMEWORK_RES=${ANDROID_BUILD_TOP}/prebuilts/sdk/current/public/android.jar
PATH_TO_LIB_ONE=../lib_one/lib_one.apk
PATH_TO_LIB_TWO=../lib_two/lib_two.apk
diff --git a/libs/androidfw/tests/data/sparse/build b/libs/androidfw/tests/data/sparse/build
index 305593f..bfc0bef 100755
--- a/libs/androidfw/tests/data/sparse/build
+++ b/libs/androidfw/tests/data/sparse/build
@@ -17,7 +17,7 @@
set -e
-PATH_TO_FRAMEWORK_RES=${ANDROID_BUILD_TOP}/prebuilts/sdk/current/android.jar
+PATH_TO_FRAMEWORK_RES=${ANDROID_BUILD_TOP}/prebuilts/sdk/current/public/android.jar
aapt2 compile --dir res -o compiled.flata
aapt2 link --manifest AndroidManifest.xml -I $PATH_TO_FRAMEWORK_RES -o sparse.apk --enable-sparse-encoding compiled.flata
diff --git a/libs/common_time/Android.mk b/libs/common_time/Android.mk
deleted file mode 100644
index 636f057..0000000
--- a/libs/common_time/Android.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-#
-# common_time_service
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- common_clock_service.cpp \
- common_time_config_service.cpp \
- common_time_server.cpp \
- common_time_server_api.cpp \
- common_time_server_packets.cpp \
- clock_recovery.cpp \
- common_clock.cpp \
- main.cpp \
- utils.cpp \
- LinearTransform.cpp
-
-# Uncomment to enable vesbose logging and debug service.
-#TIME_SERVICE_DEBUG=true
-ifeq ($(TIME_SERVICE_DEBUG), true)
-LOCAL_SRC_FILES += diag_thread.cpp
-LOCAL_CFLAGS += -DTIME_SERVICE_DEBUG
-endif
-
-LOCAL_SHARED_LIBRARIES := \
- libbinder \
- libcommon_time_client \
- libutils \
- liblog
-
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE := common_time
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-include $(BUILD_EXECUTABLE)
diff --git a/libs/common_time/LinearTransform.cpp b/libs/common_time/LinearTransform.cpp
deleted file mode 100644
index 6730855..0000000
--- a/libs/common_time/LinearTransform.cpp
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#define __STDC_LIMIT_MACROS
-
-#include "LinearTransform.h"
-#include <assert.h>
-
-
-// disable sanitize as these functions may intentionally overflow (see comments below).
-// the ifdef can be removed when host builds use clang.
-#if defined(__clang__)
-#define ATTRIBUTE_NO_SANITIZE_INTEGER __attribute__((no_sanitize("integer")))
-#else
-#define ATTRIBUTE_NO_SANITIZE_INTEGER
-#endif
-
-namespace android {
-
-// sanitize failure with T = int32_t and x = 0x80000000
-template<class T>
-ATTRIBUTE_NO_SANITIZE_INTEGER
-static inline T ABS(T x) { return (x < 0) ? -x : x; }
-
-// Static math methods involving linear transformations
-// remote sanitize failure on overflow case.
-ATTRIBUTE_NO_SANITIZE_INTEGER
-static bool scale_u64_to_u64(
- uint64_t val,
- uint32_t N,
- uint32_t D,
- uint64_t* res,
- bool round_up_not_down) {
- uint64_t tmp1, tmp2;
- uint32_t r;
-
- assert(res);
- assert(D);
-
- // Let U32(X) denote a uint32_t containing the upper 32 bits of a 64 bit
- // integer X.
- // Let L32(X) denote a uint32_t containing the lower 32 bits of a 64 bit
- // integer X.
- // Let X[A, B] with A <= B denote bits A through B of the integer X.
- // Let (A | B) denote the concatination of two 32 bit ints, A and B.
- // IOW X = (A | B) => U32(X) == A && L32(X) == B
- //
- // compute M = val * N (a 96 bit int)
- // ---------------------------------
- // tmp2 = U32(val) * N (a 64 bit int)
- // tmp1 = L32(val) * N (a 64 bit int)
- // which means
- // M = val * N = (tmp2 << 32) + tmp1
- tmp2 = (val >> 32) * N;
- tmp1 = (val & UINT32_MAX) * N;
-
- // compute M[32, 95]
- // tmp2 = tmp2 + U32(tmp1)
- // = (U32(val) * N) + U32(L32(val) * N)
- // = M[32, 95]
- tmp2 += tmp1 >> 32;
-
- // if M[64, 95] >= D, then M/D has bits > 63 set and we have
- // an overflow.
- if ((tmp2 >> 32) >= D) {
- *res = UINT64_MAX;
- return false;
- }
-
- // Divide. Going in we know
- // tmp2 = M[32, 95]
- // U32(tmp2) < D
- r = tmp2 % D;
- tmp2 /= D;
-
- // At this point
- // tmp1 = L32(val) * N
- // tmp2 = M[32, 95] / D
- // = (M / D)[32, 95]
- // r = M[32, 95] % D
- // U32(tmp2) = 0
- //
- // compute tmp1 = (r | M[0, 31])
- tmp1 = (tmp1 & UINT32_MAX) | ((uint64_t)r << 32);
-
- // Divide again. Keep the remainder around in order to round properly.
- r = tmp1 % D;
- tmp1 /= D;
-
- // At this point
- // tmp2 = (M / D)[32, 95]
- // tmp1 = (M / D)[ 0, 31]
- // r = M % D
- // U32(tmp1) = 0
- // U32(tmp2) = 0
-
- // Pack the result and deal with the round-up case (As well as the
- // remote possiblility over overflow in such a case).
- *res = (tmp2 << 32) | tmp1;
- if (r && round_up_not_down) {
- ++(*res);
- if (!(*res)) {
- *res = UINT64_MAX;
- return false;
- }
- }
-
- return true;
-}
-
-// at least one known sanitize failure (see comment below)
-ATTRIBUTE_NO_SANITIZE_INTEGER
-static bool linear_transform_s64_to_s64(
- int64_t val,
- int64_t basis1,
- int32_t N,
- uint32_t D,
- bool invert_frac,
- int64_t basis2,
- int64_t* out) {
- uint64_t scaled, res;
- uint64_t abs_val;
- bool is_neg;
-
- if (!out)
- return false;
-
- // Compute abs(val - basis_64). Keep track of whether or not this delta
- // will be negative after the scale opertaion.
- if (val < basis1) {
- is_neg = true;
- abs_val = basis1 - val;
- } else {
- is_neg = false;
- abs_val = val - basis1;
- }
-
- if (N < 0)
- is_neg = !is_neg;
-
- if (!scale_u64_to_u64(abs_val,
- invert_frac ? D : ABS(N),
- invert_frac ? ABS(N) : D,
- &scaled,
- is_neg))
- return false; // overflow/undeflow
-
- // if scaled is >= 0x8000<etc>, then we are going to overflow or
- // underflow unless ABS(basis2) is large enough to pull us back into the
- // non-overflow/underflow region.
- if (scaled & INT64_MIN) {
- if (is_neg && (basis2 < 0))
- return false; // certain underflow
-
- if (!is_neg && (basis2 >= 0))
- return false; // certain overflow
-
- if (ABS(basis2) <= static_cast<int64_t>(scaled & INT64_MAX))
- return false; // not enough
-
- // Looks like we are OK
- *out = (is_neg ? (-scaled) : scaled) + basis2;
- } else {
- // Scaled fits within signed bounds, so we just need to check for
- // over/underflow for two signed integers. Basically, if both scaled
- // and basis2 have the same sign bit, and the result has a different
- // sign bit, then we have under/overflow. An easy way to compute this
- // is
- // (scaled_signbit XNOR basis_signbit) &&
- // (scaled_signbit XOR res_signbit)
- // ==
- // (scaled_signbit XOR basis_signbit XOR 1) &&
- // (scaled_signbit XOR res_signbit)
-
- if (is_neg)
- scaled = -scaled; // known sanitize failure
- res = scaled + basis2;
-
- if ((scaled ^ basis2 ^ INT64_MIN) & (scaled ^ res) & INT64_MIN)
- return false;
-
- *out = res;
- }
-
- return true;
-}
-
-bool LinearTransform::doForwardTransform(int64_t a_in, int64_t* b_out) const {
- if (0 == a_to_b_denom)
- return false;
-
- return linear_transform_s64_to_s64(a_in,
- a_zero,
- a_to_b_numer,
- a_to_b_denom,
- false,
- b_zero,
- b_out);
-}
-
-bool LinearTransform::doReverseTransform(int64_t b_in, int64_t* a_out) const {
- if (0 == a_to_b_numer)
- return false;
-
- return linear_transform_s64_to_s64(b_in,
- b_zero,
- a_to_b_numer,
- a_to_b_denom,
- true,
- a_zero,
- a_out);
-}
-
-template <class T> void LinearTransform::reduce(T* N, T* D) {
- T a, b;
- if (!N || !D || !(*D)) {
- assert(false);
- return;
- }
-
- a = *N;
- b = *D;
-
- if (a == 0) {
- *D = 1;
- return;
- }
-
- // This implements Euclid's method to find GCD.
- if (a < b) {
- T tmp = a;
- a = b;
- b = tmp;
- }
-
- while (1) {
- // a is now the greater of the two.
- const T remainder = a % b;
- if (remainder == 0) {
- *N /= b;
- *D /= b;
- return;
- }
- // by swapping remainder and b, we are guaranteeing that a is
- // still the greater of the two upon entrance to the loop.
- a = b;
- b = remainder;
- }
-};
-
-template void LinearTransform::reduce<uint64_t>(uint64_t* N, uint64_t* D);
-template void LinearTransform::reduce<uint32_t>(uint32_t* N, uint32_t* D);
-
-// sanitize failure if *N = 0x80000000
-ATTRIBUTE_NO_SANITIZE_INTEGER
-void LinearTransform::reduce(int32_t* N, uint32_t* D) {
- if (N && D && *D) {
- if (*N < 0) {
- *N = -(*N);
- reduce(reinterpret_cast<uint32_t*>(N), D);
- *N = -(*N);
- } else {
- reduce(reinterpret_cast<uint32_t*>(N), D);
- }
- }
-}
-
-} // namespace android
diff --git a/libs/common_time/LinearTransform.h b/libs/common_time/LinearTransform.h
deleted file mode 100644
index bf6ab8e..0000000
--- a/libs/common_time/LinearTransform.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#ifndef _LINEAR_TRANSFORM_H
-#define _LINEAR_TRANSFORM_H
-
-#include <stdint.h>
-
-namespace android {
-
-// LinearTransform defines a structure which hold the definition of a
-// transformation from single dimensional coordinate system A into coordinate
-// system B (and back again). Values in A and in B are 64 bit, the linear
-// scale factor is expressed as a rational number using two 32 bit values.
-//
-// Specifically, let
-// f(a) = b
-// F(b) = f^-1(b) = a
-// then
-//
-// f(a) = (((a - a_zero) * a_to_b_numer) / a_to_b_denom) + b_zero;
-//
-// and
-//
-// F(b) = (((b - b_zero) * a_to_b_denom) / a_to_b_numer) + a_zero;
-//
-struct LinearTransform {
- int64_t a_zero;
- int64_t b_zero;
- int32_t a_to_b_numer;
- uint32_t a_to_b_denom;
-
- // Transform from A->B
- // Returns true on success, or false in the case of a singularity or an
- // overflow.
- bool doForwardTransform(int64_t a_in, int64_t* b_out) const;
-
- // Transform from B->A
- // Returns true on success, or false in the case of a singularity or an
- // overflow.
- bool doReverseTransform(int64_t b_in, int64_t* a_out) const;
-
- // Helpers which will reduce the fraction N/D using Euclid's method.
- template <class T> static void reduce(T* N, T* D);
- static void reduce(int32_t* N, uint32_t* D);
-};
-
-
-}
-
-#endif // _LINEAR_TRANSFORM_H
diff --git a/libs/common_time/clock_recovery.cpp b/libs/common_time/clock_recovery.cpp
deleted file mode 100644
index 392caa0..0000000
--- a/libs/common_time/clock_recovery.cpp
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-/*
- * A service that exchanges time synchronization information between
- * a master that defines a timeline and clients that follow the timeline.
- */
-
-#define __STDC_LIMIT_MACROS
-#define LOG_TAG "common_time"
-#include <utils/Log.h>
-#include <inttypes.h>
-#include <stdint.h>
-
-#include <common_time/local_clock.h>
-#include <assert.h>
-
-#include "clock_recovery.h"
-#include "common_clock.h"
-#ifdef TIME_SERVICE_DEBUG
-#include "diag_thread.h"
-#endif
-
-// Define log macro so we can make LOGV into LOGE when we are exclusively
-// debugging this code.
-#ifdef TIME_SERVICE_DEBUG
-#define LOG_TS ALOGE
-#else
-#define LOG_TS ALOGV
-#endif
-
-namespace android {
-
-ClockRecoveryLoop::ClockRecoveryLoop(LocalClock* local_clock,
- CommonClock* common_clock) {
- assert(NULL != local_clock);
- assert(NULL != common_clock);
-
- local_clock_ = local_clock;
- common_clock_ = common_clock;
-
- local_clock_can_slew_ = local_clock_->initCheck() &&
- (local_clock_->setLocalSlew(0) == OK);
- tgt_correction_ = 0;
- cur_correction_ = 0;
-
- // Precompute the max rate at which we are allowed to change the VCXO
- // control.
- uint64_t N = 0x10000ull * 1000ull;
- uint64_t D = local_clock_->getLocalFreq() * kMinFullRangeSlewChange_mSec;
- LinearTransform::reduce(&N, &D);
- while ((N > INT32_MAX) || (D > UINT32_MAX)) {
- N >>= 1;
- D >>= 1;
- LinearTransform::reduce(&N, &D);
- }
- time_to_cur_slew_.a_to_b_numer = static_cast<int32_t>(N);
- time_to_cur_slew_.a_to_b_denom = static_cast<uint32_t>(D);
-
- reset(true, true);
-
-#ifdef TIME_SERVICE_DEBUG
- diag_thread_ = new DiagThread(common_clock_, local_clock_);
- if (diag_thread_ != NULL) {
- status_t res = diag_thread_->startWorkThread();
- if (res != OK)
- ALOGW("Failed to start A@H clock recovery diagnostic thread.");
- } else
- ALOGW("Failed to allocate diagnostic thread.");
-#endif
-}
-
-ClockRecoveryLoop::~ClockRecoveryLoop() {
-#ifdef TIME_SERVICE_DEBUG
- diag_thread_->stopWorkThread();
-#endif
-}
-
-// Constants.
-const float ClockRecoveryLoop::dT = 1.0;
-const float ClockRecoveryLoop::Kc = 1.0f;
-const float ClockRecoveryLoop::Ti = 15.0f;
-const float ClockRecoveryLoop::Tf = 0.05;
-const float ClockRecoveryLoop::bias_Fc = 0.01;
-const float ClockRecoveryLoop::bias_RC = (dT / (2 * 3.14159f * bias_Fc));
-const float ClockRecoveryLoop::bias_Alpha = (dT / (bias_RC + dT));
-const int64_t ClockRecoveryLoop::panic_thresh_ = 50000;
-const int64_t ClockRecoveryLoop::control_thresh_ = 10000;
-const float ClockRecoveryLoop::COmin = -100.0f;
-const float ClockRecoveryLoop::COmax = 100.0f;
-const uint32_t ClockRecoveryLoop::kMinFullRangeSlewChange_mSec = 300;
-const int ClockRecoveryLoop::kSlewChangeStepPeriod_mSec = 10;
-
-
-void ClockRecoveryLoop::reset(bool position, bool frequency) {
- Mutex::Autolock lock(&lock_);
- reset_l(position, frequency);
-}
-
-uint32_t ClockRecoveryLoop::findMinRTTNdx(DisciplineDataPoint* data,
- uint32_t count) {
- uint32_t min_rtt = 0;
- for (uint32_t i = 1; i < count; ++i)
- if (data[min_rtt].rtt > data[i].rtt)
- min_rtt = i;
-
- return min_rtt;
-}
-
-bool ClockRecoveryLoop::pushDisciplineEvent(int64_t local_time,
- int64_t nominal_common_time,
- int64_t rtt) {
- Mutex::Autolock lock(&lock_);
-
- int64_t local_common_time = 0;
- common_clock_->localToCommon(local_time, &local_common_time);
- int64_t raw_delta = nominal_common_time - local_common_time;
-
-#ifdef TIME_SERVICE_DEBUG
- ALOGE("local=%lld, common=%lld, delta=%lld, rtt=%lld\n",
- local_common_time, nominal_common_time,
- raw_delta, rtt);
-#endif
-
- // If we have not defined a basis for common time, then we need to use these
- // initial points to do so. In order to avoid significant initial error
- // from a particularly bad startup data point, we collect the first N data
- // points and choose the best of them before moving on.
- if (!common_clock_->isValid()) {
- if (startup_filter_wr_ < kStartupFilterSize) {
- DisciplineDataPoint& d = startup_filter_data_[startup_filter_wr_];
- d.local_time = local_time;
- d.nominal_common_time = nominal_common_time;
- d.rtt = rtt;
- startup_filter_wr_++;
- }
-
- if (startup_filter_wr_ == kStartupFilterSize) {
- uint32_t min_rtt = findMinRTTNdx(startup_filter_data_,
- kStartupFilterSize);
-
- common_clock_->setBasis(
- startup_filter_data_[min_rtt].local_time,
- startup_filter_data_[min_rtt].nominal_common_time);
- }
-
- return true;
- }
-
- int64_t observed_common;
- int64_t delta;
- float delta_f, dCO;
- int32_t tgt_correction;
-
- if (OK != common_clock_->localToCommon(local_time, &observed_common)) {
- // Since we just checked to make certain that this conversion was valid,
- // and no one else in the system should be messing with it, if this
- // conversion is suddenly invalid, it is a good reason to panic.
- ALOGE("Failed to convert local time to common time in %s:%d",
- __PRETTY_FUNCTION__, __LINE__);
- return false;
- }
-
- // Implement a filter which should match NTP filtering behavior when a
- // client is associated with only one peer of lower stratum. Basically,
- // always use the best of the N last data points, where best is defined as
- // lowest round trip time. NTP uses an N of 8; we use a value of 6.
- //
- // TODO(johngro) : experiment with other filter strategies. The goal here
- // is to mitigate the effects of high RTT data points which typically have
- // large asymmetries in the TX/RX legs. Downside of the existing NTP
- // approach (particularly because of the PID controller we are using to
- // produce the control signal from the filtered data) are that the rate at
- // which discipline events are actually acted upon becomes irregular and can
- // become drawn out (the time between actionable event can go way up). If
- // the system receives a strong high quality data point, the proportional
- // component of the controller can produce a strong correction which is left
- // in place for too long causing overshoot. In addition, the integral
- // component of the system currently is an approximation based on the
- // assumption of a more or less homogeneous sampling of the error. Its
- // unclear what the effect of undermining this assumption would be right
- // now.
-
- // Two ideas which come to mind immediately would be to...
- // 1) Keep a history of more data points (32 or so) and ignore data points
- // whose RTT is more than a certain number of standard deviations outside
- // of the norm.
- // 2) Eliminate the PID controller portion of this system entirely.
- // Instead, move to a system which uses a very wide filter (128 data
- // points or more) with a sum-of-least-squares line fitting approach to
- // tracking the long term drift. This would take the place of the I
- // component in the current PID controller. Also use a much more narrow
- // outlier-rejector filter (as described in #1) to drive a short term
- // correction factor similar to the P component of the PID controller.
- assert(filter_wr_ < kFilterSize);
- filter_data_[filter_wr_].local_time = local_time;
- filter_data_[filter_wr_].observed_common_time = observed_common;
- filter_data_[filter_wr_].nominal_common_time = nominal_common_time;
- filter_data_[filter_wr_].rtt = rtt;
- filter_data_[filter_wr_].point_used = false;
- uint32_t current_point = filter_wr_;
- filter_wr_ = (filter_wr_ + 1) % kFilterSize;
- if (!filter_wr_)
- filter_full_ = true;
-
- uint32_t scan_end = filter_full_ ? kFilterSize : filter_wr_;
- uint32_t min_rtt = findMinRTTNdx(filter_data_, scan_end);
- // We only use packets with low RTTs for control. If the packet RTT
- // is less than the panic threshold, we can probably eat the jitter with the
- // control loop. Otherwise, take the packet only if it better than all
- // of the packets we have in the history. That way we try to track
- // something, even if it is noisy.
- if (current_point == min_rtt || rtt < control_thresh_) {
- delta_f = delta = nominal_common_time - observed_common;
-
- last_error_est_valid_ = true;
- last_error_est_usec_ = delta;
-
- // Compute the error then clamp to the panic threshold. If we ever
- // exceed this amt of error, its time to panic and reset the system.
- // Given that the error in the measurement of the error could be as
- // high as the RTT of the data point, we don't actually panic until
- // the implied error (delta) is greater than the absolute panic
- // threashold plus the RTT. IOW - we don't panic until we are
- // absoluely sure that our best case sync is worse than the absolute
- // panic threshold.
- int64_t effective_panic_thresh = panic_thresh_ + rtt;
- if ((delta > effective_panic_thresh) ||
- (delta < -effective_panic_thresh)) {
- // PANIC!!!
- reset_l(false, true);
- return false;
- }
-
- } else {
- // We do not have a good packet to look at, but we also do not want to
- // free-run the clock at some crazy slew rate. So we guess the
- // trajectory of the clock based on the last controller output and the
- // estimated bias of our clock against the master.
- // The net effect of this is that CO == CObias after some extended
- // period of no feedback.
- delta_f = last_delta_f_ - dT*(CO - CObias);
- delta = delta_f;
- }
-
- // Velocity form PI control equation.
- dCO = Kc * (1.0f + dT/Ti) * delta_f - Kc * last_delta_f_;
- CO += dCO * Tf; // Filter CO by applying gain <1 here.
-
- // Save error terms for later.
- last_delta_f_ = delta_f;
-
- // Clamp CO to +/- 100ppm.
- if (CO < COmin)
- CO = COmin;
- else if (CO > COmax)
- CO = COmax;
-
- // Update the controller bias.
- CObias = bias_Alpha * CO + (1.0f - bias_Alpha) * lastCObias;
- lastCObias = CObias;
-
- // Convert PPM to 16-bit int range. Add some guard band (-0.01) so we
- // don't get fp weirdness.
- tgt_correction = CO * 327.66;
-
- // If there was a change in the amt of correction to use, update the
- // system.
- setTargetCorrection_l(tgt_correction);
-
- LOG_TS("clock_loop %" PRId64 " %f %f %f %d\n", raw_delta, delta_f, CO, CObias, tgt_correction);
-
-#ifdef TIME_SERVICE_DEBUG
- diag_thread_->pushDisciplineEvent(
- local_time,
- observed_common,
- nominal_common_time,
- tgt_correction,
- rtt);
-#endif
-
- return true;
-}
-
-int32_t ClockRecoveryLoop::getLastErrorEstimate() {
- Mutex::Autolock lock(&lock_);
-
- if (last_error_est_valid_)
- return last_error_est_usec_;
- else
- return ICommonClock::kErrorEstimateUnknown;
-}
-
-void ClockRecoveryLoop::reset_l(bool position, bool frequency) {
- assert(NULL != common_clock_);
-
- if (position) {
- common_clock_->resetBasis();
- startup_filter_wr_ = 0;
- }
-
- if (frequency) {
- last_error_est_valid_ = false;
- last_error_est_usec_ = 0;
- last_delta_f_ = 0.0;
- CO = 0.0f;
- lastCObias = CObias = 0.0f;
- setTargetCorrection_l(0);
- applySlew_l();
- }
-
- filter_wr_ = 0;
- filter_full_ = false;
-}
-
-void ClockRecoveryLoop::setTargetCorrection_l(int32_t tgt) {
- // When we make a change to the slew rate, we need to be careful to not
- // change it too quickly as it can anger some HDMI sinks out there, notably
- // some Sony panels from the 2010-2011 timeframe. From experimenting with
- // some of these sinks, it seems like swinging from one end of the range to
- // another in less that 190mSec or so can start to cause trouble. Adding in
- // a hefty margin, we limit the system to a full range sweep in no less than
- // 300mSec.
- if (tgt_correction_ != tgt) {
- int64_t now = local_clock_->getLocalTime();
-
- tgt_correction_ = tgt;
-
- // Set up the transformation to figure out what the slew should be at
- // any given point in time in the future.
- time_to_cur_slew_.a_zero = now;
- time_to_cur_slew_.b_zero = cur_correction_;
-
- // Make sure the sign of the slope is headed in the proper direction.
- bool needs_increase = (cur_correction_ < tgt_correction_);
- bool is_increasing = (time_to_cur_slew_.a_to_b_numer > 0);
- if (( needs_increase && !is_increasing) ||
- (!needs_increase && is_increasing)) {
- time_to_cur_slew_.a_to_b_numer = -time_to_cur_slew_.a_to_b_numer;
- }
-
- // Finally, figure out when the change will be finished and start the
- // slew operation.
- time_to_cur_slew_.doReverseTransform(tgt_correction_,
- &slew_change_end_time_);
-
- applySlew_l();
- }
-}
-
-bool ClockRecoveryLoop::applySlew_l() {
- bool ret = true;
-
- // If cur == tgt, there is no ongoing sleq rate change and we are already
- // finished.
- if (cur_correction_ == tgt_correction_)
- goto bailout;
-
- if (local_clock_can_slew_) {
- int64_t now = local_clock_->getLocalTime();
- int64_t tmp;
-
- if (now >= slew_change_end_time_) {
- cur_correction_ = tgt_correction_;
- next_slew_change_timeout_.setTimeout(-1);
- } else {
- time_to_cur_slew_.doForwardTransform(now, &tmp);
-
- if (tmp > INT16_MAX)
- cur_correction_ = INT16_MAX;
- else if (tmp < INT16_MIN)
- cur_correction_ = INT16_MIN;
- else
- cur_correction_ = static_cast<int16_t>(tmp);
-
- next_slew_change_timeout_.setTimeout(kSlewChangeStepPeriod_mSec);
- ret = false;
- }
-
- local_clock_->setLocalSlew(cur_correction_);
- } else {
- // Since we are not actually changing the rate of a HW clock, we don't
- // need to worry to much about changing the slew rate so fast that we
- // anger any downstream HDMI devices.
- cur_correction_ = tgt_correction_;
- next_slew_change_timeout_.setTimeout(-1);
-
- // The SW clock recovery implemented by the common clock class expects
- // values expressed in PPM. CO is in ppm.
- common_clock_->setSlew(local_clock_->getLocalTime(), CO);
- }
-
-bailout:
- return ret;
-}
-
-int ClockRecoveryLoop::applyRateLimitedSlew() {
- Mutex::Autolock lock(&lock_);
-
- int ret = next_slew_change_timeout_.msecTillTimeout();
- if (!ret) {
- if (applySlew_l())
- next_slew_change_timeout_.setTimeout(-1);
- ret = next_slew_change_timeout_.msecTillTimeout();
- }
-
- return ret;
-}
-
-} // namespace android
diff --git a/libs/common_time/clock_recovery.h b/libs/common_time/clock_recovery.h
deleted file mode 100644
index 8066a39..0000000
--- a/libs/common_time/clock_recovery.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#ifndef __CLOCK_RECOVERY_H__
-#define __CLOCK_RECOVERY_H__
-
-#include <stdint.h>
-#include <common_time/ICommonClock.h>
-#include <utils/threads.h>
-
-#include "LinearTransform.h"
-
-#ifdef TIME_SERVICE_DEBUG
-#include "diag_thread.h"
-#endif
-
-#include "utils.h"
-
-namespace android {
-
-class CommonClock;
-class LocalClock;
-
-class ClockRecoveryLoop {
- public:
- ClockRecoveryLoop(LocalClock* local_clock, CommonClock* common_clock);
- ~ClockRecoveryLoop();
-
- void reset(bool position, bool frequency);
- bool pushDisciplineEvent(int64_t local_time,
- int64_t nominal_common_time,
- int64_t data_point_rtt);
- int32_t getLastErrorEstimate();
-
- // Applies the next step in any ongoing slew change operation. Returns a
- // timeout suitable for use with poll/select indicating the number of mSec
- // until the next change should be applied.
- int applyRateLimitedSlew();
-
- private:
-
- // Tuned using the "Good Gain" method.
- // See:
- // http://techteach.no/publications/books/dynamics_and_control/tuning_pid_controller.pdf
-
- // Controller period (1Hz for now).
- static const float dT;
-
- // Controller gain, positive and unitless. Larger values converge faster,
- // but can cause instability.
- static const float Kc;
-
- // Integral reset time. Smaller values cause loop to track faster, but can
- // also cause instability.
- static const float Ti;
-
- // Controller output filter time constant. Range (0-1). Smaller values make
- // output smoother, but slow convergence.
- static const float Tf;
-
- // Low-pass filter for bias tracker.
- static const float bias_Fc; // HZ
- static const float bias_RC; // Computed in constructor.
- static const float bias_Alpha; // Computed inconstructor.
-
- // The maximum allowed error (as indicated by a pushDisciplineEvent) before
- // we panic.
- static const int64_t panic_thresh_;
-
- // The maximum allowed error rtt time for packets to be used for control
- // feedback, unless the packet is the best in recent memory.
- static const int64_t control_thresh_;
-
- typedef struct {
- int64_t local_time;
- int64_t observed_common_time;
- int64_t nominal_common_time;
- int64_t rtt;
- bool point_used;
- } DisciplineDataPoint;
-
- static uint32_t findMinRTTNdx(DisciplineDataPoint* data, uint32_t count);
-
- void reset_l(bool position, bool frequency);
- void setTargetCorrection_l(int32_t tgt);
- bool applySlew_l();
-
- // The local clock HW abstraction we use as the basis for common time.
- LocalClock* local_clock_;
- bool local_clock_can_slew_;
-
- // The common clock we end up controlling along with the lock used to
- // serialize operations.
- CommonClock* common_clock_;
- Mutex lock_;
-
- // parameters maintained while running and reset during a reset
- // of the frequency correction.
- bool last_error_est_valid_;
- int32_t last_error_est_usec_;
- float last_delta_f_;
- int32_t tgt_correction_;
- int32_t cur_correction_;
- LinearTransform time_to_cur_slew_;
- int64_t slew_change_end_time_;
- Timeout next_slew_change_timeout_;
-
- // Contoller Output.
- float CO;
-
- // Bias tracking for trajectory estimation.
- float CObias;
- float lastCObias;
-
- // Controller output bounds. The controller will not try to
- // slew faster that +/-100ppm offset from center per interation.
- static const float COmin;
- static const float COmax;
-
- // State kept for filtering the discipline data.
- static const uint32_t kFilterSize = 16;
- DisciplineDataPoint filter_data_[kFilterSize];
- uint32_t filter_wr_;
- bool filter_full_;
-
- static const uint32_t kStartupFilterSize = 4;
- DisciplineDataPoint startup_filter_data_[kStartupFilterSize];
- uint32_t startup_filter_wr_;
-
- // Minimum number of milliseconds over which we allow a full range change
- // (from rail to rail) of the VCXO control signal. This is the rate
- // limiting factor which keeps us from changing the clock rate so fast that
- // we get in trouble with certain HDMI sinks.
- static const uint32_t kMinFullRangeSlewChange_mSec;
-
- // How much time (in msec) to wait
- static const int kSlewChangeStepPeriod_mSec;
-
-#ifdef TIME_SERVICE_DEBUG
- sp<DiagThread> diag_thread_;
-#endif
-};
-
-} // namespace android
-
-#endif // __CLOCK_RECOVERY_H__
diff --git a/libs/common_time/common_clock.cpp b/libs/common_time/common_clock.cpp
deleted file mode 100644
index aed52f1..0000000
--- a/libs/common_time/common_clock.cpp
+++ /dev/null
@@ -1,150 +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.
- */
-
-#define __STDC_LIMIT_MACROS
-
-#define LOG_TAG "common_time"
-#include <utils/Log.h>
-
-#include <inttypes.h>
-#include <stdint.h>
-
-#include <utils/Errors.h>
-
-#include "common_clock.h"
-
-namespace android {
-
-CommonClock::CommonClock() {
- cur_slew_ = 0;
- cur_trans_valid_ = false;
-
- cur_trans_.a_zero = 0;
- cur_trans_.b_zero = 0;
- cur_trans_.a_to_b_numer = local_to_common_freq_numer_ = 1;
- cur_trans_.a_to_b_denom = local_to_common_freq_denom_ = 1;
- duration_trans_ = cur_trans_;
-}
-
-bool CommonClock::init(uint64_t local_freq) {
- Mutex::Autolock lock(&lock_);
-
- if (!local_freq)
- return false;
-
- uint64_t numer = kCommonFreq;
- uint64_t denom = local_freq;
-
- LinearTransform::reduce(&numer, &denom);
- if ((numer > UINT32_MAX) || (denom > UINT32_MAX)) {
- ALOGE("Overflow in CommonClock::init while trying to reduce %" PRIu64 "/%" PRIu64,
- kCommonFreq, local_freq);
- return false;
- }
-
- cur_trans_.a_to_b_numer = local_to_common_freq_numer_ =
- static_cast<uint32_t>(numer);
- cur_trans_.a_to_b_denom = local_to_common_freq_denom_ =
- static_cast<uint32_t>(denom);
- duration_trans_ = cur_trans_;
-
- return true;
-}
-
-status_t CommonClock::localToCommon(int64_t local, int64_t *common_out) const {
- Mutex::Autolock lock(&lock_);
-
- if (!cur_trans_valid_)
- return INVALID_OPERATION;
-
- if (!cur_trans_.doForwardTransform(local, common_out))
- return INVALID_OPERATION;
-
- return OK;
-}
-
-status_t CommonClock::commonToLocal(int64_t common, int64_t *local_out) const {
- Mutex::Autolock lock(&lock_);
-
- if (!cur_trans_valid_)
- return INVALID_OPERATION;
-
- if (!cur_trans_.doReverseTransform(common, local_out))
- return INVALID_OPERATION;
-
- return OK;
-}
-
-int64_t CommonClock::localDurationToCommonDuration(int64_t localDur) const {
- int64_t ret;
- duration_trans_.doForwardTransform(localDur, &ret);
- return ret;
-}
-
-void CommonClock::setBasis(int64_t local, int64_t common) {
- Mutex::Autolock lock(&lock_);
-
- cur_trans_.a_zero = local;
- cur_trans_.b_zero = common;
- cur_trans_valid_ = true;
-}
-
-void CommonClock::resetBasis() {
- Mutex::Autolock lock(&lock_);
-
- cur_trans_.a_zero = 0;
- cur_trans_.b_zero = 0;
- cur_trans_valid_ = false;
-}
-
-status_t CommonClock::setSlew(int64_t change_time, int32_t ppm) {
- Mutex::Autolock lock(&lock_);
-
- int64_t new_local_basis;
- int64_t new_common_basis;
-
- if (cur_trans_valid_) {
- new_local_basis = change_time;
- if (!cur_trans_.doForwardTransform(change_time, &new_common_basis)) {
- ALOGE("Overflow when attempting to set slew rate to %d", ppm);
- return INVALID_OPERATION;
- }
- } else {
- new_local_basis = 0;
- new_common_basis = 0;
- }
-
- cur_slew_ = ppm;
- uint32_t n1 = local_to_common_freq_numer_;
- uint32_t n2 = 1000000 + cur_slew_;
-
- uint32_t d1 = local_to_common_freq_denom_;
- uint32_t d2 = 1000000;
-
- // n1/d1 has already been reduced, no need to do so here.
- LinearTransform::reduce(&n1, &d2);
- LinearTransform::reduce(&n2, &d1);
- LinearTransform::reduce(&n2, &d2);
-
- cur_trans_.a_zero = new_local_basis;
- cur_trans_.b_zero = new_common_basis;
- cur_trans_.a_to_b_numer = n1 * n2;
- cur_trans_.a_to_b_denom = d1 * d2;
-
- return OK;
-}
-
-} // namespace android
diff --git a/libs/common_time/common_clock.h b/libs/common_time/common_clock.h
deleted file mode 100644
index 5e4e5f5..0000000
--- a/libs/common_time/common_clock.h
+++ /dev/null
@@ -1,58 +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.
- */
-
-#ifndef __COMMON_CLOCK_H__
-#define __COMMON_CLOCK_H__
-
-#include <stdint.h>
-
-#include <utils/Errors.h>
-#include <utils/threads.h>
-
-#include "LinearTransform.h"
-
-namespace android {
-
-class CommonClock {
- public:
- CommonClock();
-
- bool init(uint64_t local_freq);
-
- status_t localToCommon(int64_t local, int64_t *common_out) const;
- status_t commonToLocal(int64_t common, int64_t *local_out) const;
- int64_t localDurationToCommonDuration(int64_t localDur) const;
- uint64_t getCommonFreq() const { return kCommonFreq; }
- bool isValid() const { return cur_trans_valid_; }
- status_t setSlew(int64_t change_time, int32_t ppm);
- void setBasis(int64_t local, int64_t common);
- void resetBasis();
- private:
- mutable Mutex lock_;
-
- int32_t cur_slew_;
- uint32_t local_to_common_freq_numer_;
- uint32_t local_to_common_freq_denom_;
-
- LinearTransform duration_trans_;
- LinearTransform cur_trans_;
- bool cur_trans_valid_;
-
- static const uint64_t kCommonFreq = 1000000ull;
-};
-
-} // namespace android
-#endif // __COMMON_CLOCK_H__
diff --git a/libs/common_time/common_clock_service.cpp b/libs/common_time/common_clock_service.cpp
deleted file mode 100644
index 592ab1d..0000000
--- a/libs/common_time/common_clock_service.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#include <common_time/local_clock.h>
-#include <utils/String8.h>
-
-#include "common_clock_service.h"
-#include "common_clock.h"
-#include "common_time_server.h"
-
-namespace android {
-
-sp<CommonClockService> CommonClockService::instantiate(
- CommonTimeServer& timeServer) {
- sp<CommonClockService> tcc = new CommonClockService(timeServer);
- if (tcc == NULL)
- return NULL;
-
- defaultServiceManager()->addService(ICommonClock::kServiceName, tcc);
- return tcc;
-}
-
-status_t CommonClockService::dump(int fd, const Vector<String16>& args) {
- Mutex::Autolock lock(mRegistrationLock);
- return mTimeServer.dumpClockInterface(fd, args, mListeners.size());
-}
-
-status_t CommonClockService::isCommonTimeValid(bool* valid,
- uint32_t* timelineID) {
- return mTimeServer.isCommonTimeValid(valid, timelineID);
-}
-
-status_t CommonClockService::commonTimeToLocalTime(int64_t commonTime,
- int64_t* localTime) {
- return mTimeServer.getCommonClock().commonToLocal(commonTime, localTime);
-}
-
-status_t CommonClockService::localTimeToCommonTime(int64_t localTime,
- int64_t* commonTime) {
- return mTimeServer.getCommonClock().localToCommon(localTime, commonTime);
-}
-
-status_t CommonClockService::getCommonTime(int64_t* commonTime) {
- return localTimeToCommonTime(mTimeServer.getLocalClock().getLocalTime(), commonTime);
-}
-
-status_t CommonClockService::getCommonFreq(uint64_t* freq) {
- *freq = mTimeServer.getCommonClock().getCommonFreq();
- return OK;
-}
-
-status_t CommonClockService::getLocalTime(int64_t* localTime) {
- *localTime = mTimeServer.getLocalClock().getLocalTime();
- return OK;
-}
-
-status_t CommonClockService::getLocalFreq(uint64_t* freq) {
- *freq = mTimeServer.getLocalClock().getLocalFreq();
- return OK;
-}
-
-status_t CommonClockService::getEstimatedError(int32_t* estimate) {
- *estimate = mTimeServer.getEstimatedError();
- return OK;
-}
-
-status_t CommonClockService::getTimelineID(uint64_t* id) {
- *id = mTimeServer.getTimelineID();
- return OK;
-}
-
-status_t CommonClockService::getState(State* state) {
- *state = mTimeServer.getState();
- return OK;
-}
-
-status_t CommonClockService::getMasterAddr(struct sockaddr_storage* addr) {
- return mTimeServer.getMasterAddr(addr);
-}
-
-status_t CommonClockService::registerListener(
- const sp<ICommonClockListener>& listener) {
- Mutex::Autolock lock(mRegistrationLock);
-
- { // scoping for autolock pattern
- Mutex::Autolock lock(mCallbackLock);
- // check whether this is a duplicate
- for (size_t i = 0; i < mListeners.size(); i++) {
- if (IInterface::asBinder(mListeners[i]) == IInterface::asBinder(listener))
- return ALREADY_EXISTS;
- }
- }
-
- mListeners.add(listener);
- mTimeServer.reevaluateAutoDisableState(0 != mListeners.size());
- return IInterface::asBinder(listener)->linkToDeath(this);
-}
-
-status_t CommonClockService::unregisterListener(
- const sp<ICommonClockListener>& listener) {
- Mutex::Autolock lock(mRegistrationLock);
- status_t ret_val = NAME_NOT_FOUND;
-
- { // scoping for autolock pattern
- Mutex::Autolock lock(mCallbackLock);
- for (size_t i = 0; i < mListeners.size(); i++) {
- if (IInterface::asBinder(mListeners[i]) == IInterface::asBinder(listener)) {
- IInterface::asBinder(mListeners[i])->unlinkToDeath(this);
- mListeners.removeAt(i);
- ret_val = OK;
- break;
- }
- }
- }
-
- mTimeServer.reevaluateAutoDisableState(0 != mListeners.size());
- return ret_val;
-}
-
-void CommonClockService::binderDied(const wp<IBinder>& who) {
- Mutex::Autolock lock(mRegistrationLock);
-
- { // scoping for autolock pattern
- Mutex::Autolock lock(mCallbackLock);
- for (size_t i = 0; i < mListeners.size(); i++) {
- if (IInterface::asBinder(mListeners[i]) == who) {
- mListeners.removeAt(i);
- break;
- }
- }
- }
-
- mTimeServer.reevaluateAutoDisableState(0 != mListeners.size());
-}
-
-void CommonClockService::notifyOnTimelineChanged(uint64_t timelineID) {
- Mutex::Autolock lock(mCallbackLock);
-
- for (size_t i = 0; i < mListeners.size(); i++) {
- mListeners[i]->onTimelineChanged(timelineID);
- }
-}
-
-}; // namespace android
diff --git a/libs/common_time/common_clock_service.h b/libs/common_time/common_clock_service.h
deleted file mode 100644
index aea507e..0000000
--- a/libs/common_time/common_clock_service.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#ifndef ANDROID_COMMON_CLOCK_SERVICE_H
-#define ANDROID_COMMON_CLOCK_SERVICE_H
-
-#include <sys/socket.h>
-#include <common_time/ICommonClock.h>
-
-namespace android {
-
-class CommonTimeServer;
-
-class CommonClockService : public BnCommonClock,
- public android::IBinder::DeathRecipient {
- public:
- static sp<CommonClockService> instantiate(CommonTimeServer& timeServer);
-
- virtual status_t dump(int fd, const Vector<String16>& args);
-
- virtual status_t isCommonTimeValid(bool* valid, uint32_t *timelineID);
- virtual status_t commonTimeToLocalTime(int64_t common_time,
- int64_t* local_time);
- virtual status_t localTimeToCommonTime(int64_t local_time,
- int64_t* common_time);
- virtual status_t getCommonTime(int64_t* common_time);
- virtual status_t getCommonFreq(uint64_t* freq);
- virtual status_t getLocalTime(int64_t* local_time);
- virtual status_t getLocalFreq(uint64_t* freq);
- virtual status_t getEstimatedError(int32_t* estimate);
- virtual status_t getTimelineID(uint64_t* id);
- virtual status_t getState(ICommonClock::State* state);
- virtual status_t getMasterAddr(struct sockaddr_storage* addr);
-
- virtual status_t registerListener(
- const sp<ICommonClockListener>& listener);
- virtual status_t unregisterListener(
- const sp<ICommonClockListener>& listener);
-
- void notifyOnTimelineChanged(uint64_t timelineID);
-
- private:
- explicit CommonClockService(CommonTimeServer& timeServer)
- : mTimeServer(timeServer) { };
-
- virtual void binderDied(const wp<IBinder>& who);
-
- CommonTimeServer& mTimeServer;
-
- // locks used to synchronize access to the list of registered listeners.
- // The callback lock is held whenever the list is used to perform callbacks
- // or while the list is being modified. The registration lock used to
- // serialize access across registerListener, unregisterListener, and
- // binderDied.
- //
- // The reason for two locks is that registerListener, unregisterListener,
- // and binderDied each call into the core service and obtain the core
- // service thread lock when they call reevaluateAutoDisableState. The core
- // service thread obtains the main thread lock whenever its thread is
- // running, and sometimes needs to call notifyOnTimelineChanged which then
- // obtains the callback lock. If callers of registration functions were
- // holding the callback lock when they called into the core service, we
- // would have a classic A/B, B/A ordering deadlock. To avoid this, the
- // registration functions hold the registration lock for the duration of
- // their call, but hold the callback lock only while they mutate the list.
- // This way, the list's size cannot change (because of the registration
- // lock) during the call into reevaluateAutoDisableState, but the core work
- // thread can still safely call notifyOnTimelineChanged while holding the
- // main thread lock.
- Mutex mCallbackLock;
- Mutex mRegistrationLock;
-
- Vector<sp<ICommonClockListener> > mListeners;
-};
-
-}; // namespace android
-
-#endif // ANDROID_COMMON_CLOCK_SERVICE_H
diff --git a/libs/common_time/common_time_config_service.cpp b/libs/common_time/common_time_config_service.cpp
deleted file mode 100644
index 9585618..0000000
--- a/libs/common_time/common_time_config_service.cpp
+++ /dev/null
@@ -1,112 +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.
- */
-
-#include <utils/String8.h>
-
-#include "common_time_config_service.h"
-#include "common_time_server.h"
-
-namespace android {
-
-sp<CommonTimeConfigService> CommonTimeConfigService::instantiate(
- CommonTimeServer& timeServer) {
- sp<CommonTimeConfigService> ctcs = new CommonTimeConfigService(timeServer);
- if (ctcs == NULL)
- return NULL;
-
- defaultServiceManager()->addService(ICommonTimeConfig::kServiceName, ctcs);
- return ctcs;
-}
-
-status_t CommonTimeConfigService::dump(int fd, const Vector<String16>& args) {
- return mTimeServer.dumpConfigInterface(fd, args);
-}
-
-status_t CommonTimeConfigService::getMasterElectionPriority(uint8_t *priority) {
- return mTimeServer.getMasterElectionPriority(priority);
-}
-
-status_t CommonTimeConfigService::setMasterElectionPriority(uint8_t priority) {
- return mTimeServer.setMasterElectionPriority(priority);
-}
-
-status_t CommonTimeConfigService::getMasterElectionEndpoint(
- struct sockaddr_storage *addr) {
- return mTimeServer.getMasterElectionEndpoint(addr);
-}
-
-status_t CommonTimeConfigService::setMasterElectionEndpoint(
- const struct sockaddr_storage *addr) {
- return mTimeServer.setMasterElectionEndpoint(addr);
-}
-
-status_t CommonTimeConfigService::getMasterElectionGroupId(uint64_t *id) {
- return mTimeServer.getMasterElectionGroupId(id);
-}
-
-status_t CommonTimeConfigService::setMasterElectionGroupId(uint64_t id) {
- return mTimeServer.setMasterElectionGroupId(id);
-}
-
-status_t CommonTimeConfigService::getInterfaceBinding(String16& ifaceName) {
- String8 tmp;
- status_t ret = mTimeServer.getInterfaceBinding(tmp);
- ifaceName = String16(tmp);
- return ret;
-}
-
-status_t CommonTimeConfigService::setInterfaceBinding(const String16& ifaceName) {
- String8 tmp(ifaceName);
- return mTimeServer.setInterfaceBinding(tmp);
-}
-
-status_t CommonTimeConfigService::getMasterAnnounceInterval(int *interval) {
- return mTimeServer.getMasterAnnounceInterval(interval);
-}
-
-status_t CommonTimeConfigService::setMasterAnnounceInterval(int interval) {
- return mTimeServer.setMasterAnnounceInterval(interval);
-}
-
-status_t CommonTimeConfigService::getClientSyncInterval(int *interval) {
- return mTimeServer.getClientSyncInterval(interval);
-}
-
-status_t CommonTimeConfigService::setClientSyncInterval(int interval) {
- return mTimeServer.setClientSyncInterval(interval);
-}
-
-status_t CommonTimeConfigService::getPanicThreshold(int *threshold) {
- return mTimeServer.getPanicThreshold(threshold);
-}
-
-status_t CommonTimeConfigService::setPanicThreshold(int threshold) {
- return mTimeServer.setPanicThreshold(threshold);
-}
-
-status_t CommonTimeConfigService::getAutoDisable(bool *autoDisable) {
- return mTimeServer.getAutoDisable(autoDisable);
-}
-
-status_t CommonTimeConfigService::setAutoDisable(bool autoDisable) {
- return mTimeServer.setAutoDisable(autoDisable);
-}
-
-status_t CommonTimeConfigService::forceNetworklessMasterMode() {
- return mTimeServer.forceNetworklessMasterMode();
-}
-
-}; // namespace android
diff --git a/libs/common_time/common_time_config_service.h b/libs/common_time/common_time_config_service.h
deleted file mode 100644
index 23abb1a..0000000
--- a/libs/common_time/common_time_config_service.h
+++ /dev/null
@@ -1,60 +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.
- */
-
-#ifndef ANDROID_COMMON_TIME_CONFIG_SERVICE_H
-#define ANDROID_COMMON_TIME_CONFIG_SERVICE_H
-
-#include <sys/socket.h>
-#include <common_time/ICommonTimeConfig.h>
-
-namespace android {
-
-class String16;
-class CommonTimeServer;
-
-class CommonTimeConfigService : public BnCommonTimeConfig {
- public:
- static sp<CommonTimeConfigService> instantiate(CommonTimeServer& timeServer);
-
- virtual status_t dump(int fd, const Vector<String16>& args);
-
- virtual status_t getMasterElectionPriority(uint8_t *priority);
- virtual status_t setMasterElectionPriority(uint8_t priority);
- virtual status_t getMasterElectionEndpoint(struct sockaddr_storage *addr);
- virtual status_t setMasterElectionEndpoint(const struct sockaddr_storage *addr);
- virtual status_t getMasterElectionGroupId(uint64_t *id);
- virtual status_t setMasterElectionGroupId(uint64_t id);
- virtual status_t getInterfaceBinding(String16& ifaceName);
- virtual status_t setInterfaceBinding(const String16& ifaceName);
- virtual status_t getMasterAnnounceInterval(int *interval);
- virtual status_t setMasterAnnounceInterval(int interval);
- virtual status_t getClientSyncInterval(int *interval);
- virtual status_t setClientSyncInterval(int interval);
- virtual status_t getPanicThreshold(int *threshold);
- virtual status_t setPanicThreshold(int threshold);
- virtual status_t getAutoDisable(bool *autoDisable);
- virtual status_t setAutoDisable(bool autoDisable);
- virtual status_t forceNetworklessMasterMode();
-
- private:
- explicit CommonTimeConfigService(CommonTimeServer& timeServer)
- : mTimeServer(timeServer) { }
- CommonTimeServer& mTimeServer;
-
-};
-
-}; // namespace android
-
-#endif // ANDROID_COMMON_TIME_CONFIG_SERVICE_H
diff --git a/libs/common_time/common_time_server.cpp b/libs/common_time/common_time_server.cpp
deleted file mode 100644
index b1495ef..0000000
--- a/libs/common_time/common_time_server.cpp
+++ /dev/null
@@ -1,1507 +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.
- */
-
-/*
- * A service that exchanges time synchronization information between
- * a master that defines a timeline and clients that follow the timeline.
- */
-
-#define LOG_TAG "common_time"
-#include <utils/Log.h>
-
-#include <arpa/inet.h>
-#include <assert.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <linux/if_ether.h>
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <netinet/ip.h>
-#include <poll.h>
-#include <stdio.h>
-#include <sys/eventfd.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <common_time/local_clock.h>
-#include <binder/IPCThreadState.h>
-#include <binder/ProcessState.h>
-#include <utils/Timers.h>
-
-#include "common_clock_service.h"
-#include "common_time_config_service.h"
-#include "common_time_server.h"
-#include "common_time_server_packets.h"
-#include "clock_recovery.h"
-#include "common_clock.h"
-
-#define MAX_INT ((int)0x7FFFFFFF)
-
-namespace android {
-
-const char* CommonTimeServer::kDefaultMasterElectionAddr = "255.255.255.255";
-const uint16_t CommonTimeServer::kDefaultMasterElectionPort = 8886;
-const uint64_t CommonTimeServer::kDefaultSyncGroupID = 1;
-const uint8_t CommonTimeServer::kDefaultMasterPriority = 1;
-const uint32_t CommonTimeServer::kDefaultMasterAnnounceIntervalMs = 10000;
-const uint32_t CommonTimeServer::kDefaultSyncRequestIntervalMs = 1000;
-const uint32_t CommonTimeServer::kDefaultPanicThresholdUsec = 50000;
-const bool CommonTimeServer::kDefaultAutoDisable = true;
-const int CommonTimeServer::kSetupRetryTimeoutMs = 30000;
-const int64_t CommonTimeServer::kNoGoodDataPanicThresholdUsec = 600000000ll;
-const uint32_t CommonTimeServer::kRTTDiscardPanicThreshMultiplier = 5;
-
-// timeout value representing an infinite timeout
-const int CommonTimeServer::kInfiniteTimeout = -1;
-
-/*** Initial state constants ***/
-
-// number of WhoIsMaster attempts sent before giving up
-const int CommonTimeServer::kInitial_NumWhoIsMasterRetries = 6;
-
-// timeout used when waiting for a response to a WhoIsMaster request
-const int CommonTimeServer::kInitial_WhoIsMasterTimeoutMs = 500;
-
-/*** Client state constants ***/
-
-// number of sync requests that can fail before a client assumes its master
-// is dead
-const int CommonTimeServer::kClient_NumSyncRequestRetries = 10;
-
-/*** Master state constants ***/
-
-/*** Ronin state constants ***/
-
-// number of WhoIsMaster attempts sent before declaring ourselves master
-const int CommonTimeServer::kRonin_NumWhoIsMasterRetries = 20;
-
-// timeout used when waiting for a response to a WhoIsMaster request
-const int CommonTimeServer::kRonin_WhoIsMasterTimeoutMs = 500;
-
-/*** WaitForElection state constants ***/
-
-// how long do we wait for an announcement from a master before
-// trying another election?
-const int CommonTimeServer::kWaitForElection_TimeoutMs = 12500;
-
-CommonTimeServer::CommonTimeServer()
- : Thread(false)
- , mState(ICommonClock::STATE_INITIAL)
- , mClockRecovery(&mLocalClock, &mCommonClock)
- , mSocket(-1)
- , mLastPacketRxLocalTime(0)
- , mTimelineID(ICommonClock::kInvalidTimelineID)
- , mClockSynced(false)
- , mCommonClockHasClients(false)
- , mStateChangeLog("Recent State Change Events", 30)
- , mElectionLog("Recent Master Election Traffic", 30)
- , mBadPktLog("Recent Bad Packet RX Info", 8)
- , mInitial_WhoIsMasterRequestTimeouts(0)
- , mClient_MasterDeviceID(0)
- , mClient_MasterDevicePriority(0)
- , mRonin_WhoIsMasterRequestTimeouts(0) {
- // zero out sync stats
- resetSyncStats();
-
- // Setup the master election endpoint to use the default.
- struct sockaddr_in* meep =
- reinterpret_cast<struct sockaddr_in*>(&mMasterElectionEP);
- memset(&mMasterElectionEP, 0, sizeof(mMasterElectionEP));
- inet_aton(kDefaultMasterElectionAddr, &meep->sin_addr);
- meep->sin_family = AF_INET;
- meep->sin_port = htons(kDefaultMasterElectionPort);
-
- // Zero out the master endpoint.
- memset(&mMasterEP, 0, sizeof(mMasterEP));
- mMasterEPValid = false;
- mBindIfaceValid = false;
- setForceLowPriority(false);
-
- // Set all remaining configuration parameters to their defaults.
- mDeviceID = 0;
- mSyncGroupID = kDefaultSyncGroupID;
- mMasterPriority = kDefaultMasterPriority;
- mMasterAnnounceIntervalMs = kDefaultMasterAnnounceIntervalMs;
- mSyncRequestIntervalMs = kDefaultSyncRequestIntervalMs;
- mPanicThresholdUsec = kDefaultPanicThresholdUsec;
- mAutoDisable = kDefaultAutoDisable;
-
- // Create the eventfd we will use to signal our thread to wake up when
- // needed.
- mWakeupThreadFD = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
-
- // seed the random number generator (used to generated timeline IDs)
- srand48(static_cast<unsigned int>(systemTime()));
-}
-
-CommonTimeServer::~CommonTimeServer() {
- shutdownThread();
-
- // No need to grab the lock here. We are in the destructor; if the the user
- // has a thread in any of the APIs while the destructor is being called,
- // there is a threading problem a the application level we cannot reasonably
- // do anything about.
- cleanupSocket_l();
-
- if (mWakeupThreadFD >= 0) {
- close(mWakeupThreadFD);
- mWakeupThreadFD = -1;
- }
-}
-
-bool CommonTimeServer::startServices() {
- // start the ICommonClock service
- mICommonClock = CommonClockService::instantiate(*this);
- if (mICommonClock == NULL)
- return false;
-
- // start the ICommonTimeConfig service
- mICommonTimeConfig = CommonTimeConfigService::instantiate(*this);
- if (mICommonTimeConfig == NULL)
- return false;
-
- return true;
-}
-
-bool CommonTimeServer::threadLoop() {
- // Register our service interfaces.
- if (!startServices())
- return false;
-
- // Hold the lock while we are in the main thread loop. It will release the
- // lock when it blocks, and hold the lock at all other times.
- mLock.lock();
- runStateMachine_l();
- mLock.unlock();
-
- IPCThreadState::self()->stopProcess();
- return false;
-}
-
-bool CommonTimeServer::runStateMachine_l() {
- if (!mLocalClock.initCheck())
- return false;
-
- if (!mCommonClock.init(mLocalClock.getLocalFreq()))
- return false;
-
- // Enter the initial state.
- becomeInitial("startup");
-
- // run the state machine
- while (!exitPending()) {
- struct pollfd pfds[2];
- int rc, timeout;
- int eventCnt = 0;
- int64_t wakeupTime;
- uint32_t t1, t2;
- bool needHandleTimeout = false;
-
- // We are always interested in our wakeup FD.
- pfds[eventCnt].fd = mWakeupThreadFD;
- pfds[eventCnt].events = POLLIN;
- pfds[eventCnt].revents = 0;
- eventCnt++;
-
- // If we have a valid socket, then we are interested in what it has to
- // say as well.
- if (mSocket >= 0) {
- pfds[eventCnt].fd = mSocket;
- pfds[eventCnt].events = POLLIN;
- pfds[eventCnt].revents = 0;
- eventCnt++;
- }
-
- t1 = static_cast<uint32_t>(mCurTimeout.msecTillTimeout());
- t2 = static_cast<uint32_t>(mClockRecovery.applyRateLimitedSlew());
- timeout = static_cast<int>(t1 < t2 ? t1 : t2);
-
- // Note, we were holding mLock when this function was called. We
- // release it only while we are blocking and hold it at all other times.
- mLock.unlock();
- rc = poll(pfds, eventCnt, timeout);
- wakeupTime = mLocalClock.getLocalTime();
- mLock.lock();
-
- // Is it time to shutdown? If so, don't hesitate... just do it.
- if (exitPending())
- break;
-
- // Did the poll fail? This should never happen and is fatal if it does.
- if (rc < 0) {
- ALOGE("%s:%d poll failed", __PRETTY_FUNCTION__, __LINE__);
- return false;
- }
-
- if (rc == 0) {
- needHandleTimeout = !mCurTimeout.msecTillTimeout();
- if (needHandleTimeout)
- mCurTimeout.setTimeout(kInfiniteTimeout);
- }
-
- // Were we woken up on purpose? If so, clear the eventfd with a read.
- if (pfds[0].revents)
- clearPendingWakeupEvents_l();
-
- // Is out bind address dirty? If so, clean up our socket (if any).
- // Alternatively, do we have an active socket but should be auto
- // disabled? If so, release the socket and enter the proper sync state.
- bool droppedSocket = false;
- if (mBindIfaceDirty || ((mSocket >= 0) && shouldAutoDisable())) {
- cleanupSocket_l();
- mBindIfaceDirty = false;
- droppedSocket = true;
- }
-
- // Do we not have a socket but should have one? If so, try to set one
- // up.
- if ((mSocket < 0) && mBindIfaceValid && !shouldAutoDisable()) {
- if (setupSocket_l()) {
- // Success! We are now joining a new network (either coming
- // from no network, or coming from a potentially different
- // network). Force our priority to be lower so that we defer to
- // any other masters which may already be on the network we are
- // joining. Later, when we enter either the client or the
- // master state, we will clear this flag and go back to our
- // normal election priority.
- setForceLowPriority(true);
- switch (mState) {
- // If we were in initial (whether we had a immediately
- // before this network or not) we want to simply reset the
- // system and start again. Forcing a transition from
- // INITIAL to INITIAL should do the job.
- case CommonClockService::STATE_INITIAL:
- becomeInitial("bound interface");
- break;
-
- // If we were in the master state, then either we were the
- // master in a no-network situation, or we were the master
- // of a different network and have moved to a new interface.
- // In either case, immediately transition to Ronin at low
- // priority. If there is no one in the network we just
- // joined, we will become master soon enough. If there is,
- // we want to be certain to defer master status to the
- // existing timeline currently running on the network.
- //
- case CommonClockService::STATE_MASTER:
- becomeRonin("leaving networkless mode");
- break;
-
- // If we were in any other state (CLIENT, RONIN, or
- // WAIT_FOR_ELECTION) then we must be moving from one
- // network to another. We have lost our old master;
- // transition to RONIN in an attempt to find a new master.
- // If there are none out there, we will just assume
- // responsibility for the timeline we used to be a client
- // of.
- default:
- becomeRonin("bound interface");
- break;
- }
- } else {
- // That's odd... we failed to set up our socket. This could be
- // due to some transient network change which will work itself
- // out shortly; schedule a retry attempt in the near future.
- mCurTimeout.setTimeout(kSetupRetryTimeoutMs);
- }
-
- // One way or the other, we don't have any data to process at this
- // point (since we just tried to bulid a new socket). Loop back
- // around and wait for the next thing to do.
- continue;
- } else if (droppedSocket) {
- // We just lost our socket, and for whatever reason (either no
- // config, or auto disable engaged) we are not supposed to rebuild
- // one at this time. We are not going to rebuild our socket until
- // something about our config/auto-disabled status changes, so we
- // are basically in network-less mode. If we are already in either
- // INITIAL or MASTER, just stay there until something changes. If
- // we are in any other state (CLIENT, RONIN or WAIT_FOR_ELECTION),
- // then transition to either INITIAL or MASTER depending on whether
- // or not our timeline is valid.
- mStateChangeLog.log(ANDROID_LOG_INFO, LOG_TAG,
- "Entering networkless mode interface is %s, "
- "shouldAutoDisable = %s",
- mBindIfaceValid ? "valid" : "invalid",
- shouldAutoDisable() ? "true" : "false");
- if ((mState != ICommonClock::STATE_INITIAL) &&
- (mState != ICommonClock::STATE_MASTER)) {
- if (mTimelineID == ICommonClock::kInvalidTimelineID)
- becomeInitial("network-less mode");
- else
- becomeMaster("network-less mode");
- }
-
- continue;
- }
-
- // Time to handle the timeouts?
- if (needHandleTimeout) {
- if (!handleTimeout())
- ALOGE("handleTimeout failed");
- continue;
- }
-
- // Does our socket have data for us (assuming we still have one, we
- // may have RXed a packet at the same time as a config change telling us
- // to shut our socket down)? If so, process its data.
- if ((mSocket >= 0) && (eventCnt > 1) && (pfds[1].revents)) {
- mLastPacketRxLocalTime = wakeupTime;
- if (!handlePacket())
- ALOGE("handlePacket failed");
- }
- }
-
- cleanupSocket_l();
- return true;
-}
-
-void CommonTimeServer::clearPendingWakeupEvents_l() {
- int64_t tmp;
- read(mWakeupThreadFD, &tmp, sizeof(tmp));
-}
-
-void CommonTimeServer::wakeupThread_l() {
- int64_t tmp = 1;
- write(mWakeupThreadFD, &tmp, sizeof(tmp));
-}
-
-void CommonTimeServer::cleanupSocket_l() {
- if (mSocket >= 0) {
- close(mSocket);
- mSocket = -1;
- }
-}
-
-void CommonTimeServer::shutdownThread() {
- // Flag the work thread for shutdown.
- this->requestExit();
-
- // Signal the thread in case its sleeping.
- mLock.lock();
- wakeupThread_l();
- mLock.unlock();
-
- // Wait for the thread to exit.
- this->join();
-}
-
-bool CommonTimeServer::setupSocket_l() {
- int rc;
- bool ret_val = false;
- struct sockaddr_in* ipv4_addr = NULL;
- char masterElectionEPStr[64];
- const int one = 1;
-
- // This should never be needed, but if we happened to have an old socket
- // lying around, be sure to not leak it before proceeding.
- cleanupSocket_l();
-
- // If we don't have a valid endpoint to bind to, then how did we get here in
- // the first place? Regardless, we know that we are going to fail to bind,
- // so don't even try.
- if (!mBindIfaceValid)
- return false;
-
- sockaddrToString(mMasterElectionEP, true, masterElectionEPStr,
- sizeof(masterElectionEPStr));
- mStateChangeLog.log(ANDROID_LOG_INFO, LOG_TAG,
- "Building socket :: bind = %s master election = %s",
- mBindIface.string(), masterElectionEPStr);
-
- // TODO: add proper support for IPv6. Right now, we block IPv6 addresses at
- // the configuration interface level.
- if (AF_INET != mMasterElectionEP.ss_family) {
- mStateChangeLog.log(ANDROID_LOG_WARN, LOG_TAG,
- "TODO: add proper IPv6 support");
- goto bailout;
- }
-
- // open a UDP socket for the timeline serivce
- mSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- if (mSocket < 0) {
- mStateChangeLog.log(ANDROID_LOG_ERROR, LOG_TAG,
- "Failed to create socket (errno = %d)", errno);
- goto bailout;
- }
-
- // Bind to the selected interface using Linux's spiffy SO_BINDTODEVICE.
- struct ifreq ifr;
- memset(&ifr, 0, sizeof(ifr));
- snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", mBindIface.string());
- ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = 0;
- rc = setsockopt(mSocket, SOL_SOCKET, SO_BINDTODEVICE,
- (void *)&ifr, sizeof(ifr));
- if (rc) {
- mStateChangeLog.log(ANDROID_LOG_ERROR, LOG_TAG,
- "Failed to bind socket at to interface %s "
- "(errno = %d)", ifr.ifr_name, errno);
- goto bailout;
- }
-
- // Bind our socket to INADDR_ANY and the master election port. The
- // interface binding we made using SO_BINDTODEVICE should limit us to
- // traffic only on the interface we are interested in. We need to bind to
- // INADDR_ANY and the specific master election port in order to be able to
- // receive both unicast traffic and master election multicast traffic with
- // just a single socket.
- struct sockaddr_in bindAddr;
- ipv4_addr = reinterpret_cast<struct sockaddr_in*>(&mMasterElectionEP);
- memcpy(&bindAddr, ipv4_addr, sizeof(bindAddr));
- bindAddr.sin_addr.s_addr = INADDR_ANY;
- rc = bind(mSocket,
- reinterpret_cast<const sockaddr *>(&bindAddr),
- sizeof(bindAddr));
- if (rc) {
- mStateChangeLog.log(ANDROID_LOG_ERROR, LOG_TAG,
- "Failed to bind socket to port %hu (errno = %d)",
- ntohs(bindAddr.sin_port), errno);
- goto bailout;
- }
-
- if (0xE0000000 == (ntohl(ipv4_addr->sin_addr.s_addr) & 0xF0000000)) {
- // If our master election endpoint is a multicast address, be sure to join
- // the multicast group.
- struct ip_mreq mreq;
- mreq.imr_multiaddr = ipv4_addr->sin_addr;
- mreq.imr_interface.s_addr = htonl(INADDR_ANY);
- rc = setsockopt(mSocket, IPPROTO_IP, IP_ADD_MEMBERSHIP,
- &mreq, sizeof(mreq));
- if (rc == -1) {
- ALOGE("Failed to join multicast group at %s. (errno = %d)",
- masterElectionEPStr, errno);
- goto bailout;
- }
-
- // disable loopback of multicast packets
- const int zero = 0;
- rc = setsockopt(mSocket, IPPROTO_IP, IP_MULTICAST_LOOP,
- &zero, sizeof(zero));
- if (rc == -1) {
- mStateChangeLog.log(ANDROID_LOG_ERROR, LOG_TAG,
- "Failed to disable multicast loopback "
- "(errno = %d)", errno);
- goto bailout;
- }
- } else
- if (ntohl(ipv4_addr->sin_addr.s_addr) == 0xFFFFFFFF) {
- // If the master election address is the broadcast address, then enable
- // the broadcast socket option
- rc = setsockopt(mSocket, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one));
- if (rc == -1) {
- mStateChangeLog.log(ANDROID_LOG_ERROR, LOG_TAG,
- "Failed to enable broadcast (errno = %d)",
- errno);
- goto bailout;
- }
- } else {
- // If the master election address is neither broadcast, nor multicast,
- // then we are misconfigured. The config API layer should prevent this
- // from ever happening.
- goto bailout;
- }
-
- // Set the TTL of sent packets to 1. (Time protocol sync should never leave
- // the local subnet)
- rc = setsockopt(mSocket, IPPROTO_IP, IP_TTL, &one, sizeof(one));
- if (rc == -1) {
- mStateChangeLog.log(ANDROID_LOG_ERROR, LOG_TAG,
- "Failed to set TTL to %d (errno = %d)", one, errno);
- goto bailout;
- }
-
- // get the device's unique ID
- if (!assignDeviceID())
- goto bailout;
-
- ret_val = true;
-
-bailout:
- if (!ret_val)
- cleanupSocket_l();
- return ret_val;
-}
-
-// generate a unique device ID that can be used for arbitration
-bool CommonTimeServer::assignDeviceID() {
- if (!mBindIfaceValid)
- return false;
-
- struct ifreq ifr;
- memset(&ifr, 0, sizeof(ifr));
- ifr.ifr_addr.sa_family = AF_INET;
- strlcpy(ifr.ifr_name, mBindIface.string(), IFNAMSIZ);
-
- int rc = ioctl(mSocket, SIOCGIFHWADDR, &ifr);
- if (rc) {
- ALOGE("%s:%d ioctl failed", __PRETTY_FUNCTION__, __LINE__);
- return false;
- }
-
- if (ifr.ifr_addr.sa_family != ARPHRD_ETHER) {
- ALOGE("%s:%d got non-Ethernet address", __PRETTY_FUNCTION__, __LINE__);
- return false;
- }
-
- mDeviceID = 0;
- for (int i = 0; i < ETH_ALEN; i++) {
- mDeviceID = (mDeviceID << 8) | ifr.ifr_hwaddr.sa_data[i];
- }
-
- return true;
-}
-
-// generate a new timeline ID
-void CommonTimeServer::assignTimelineID() {
- do {
- mTimelineID = (static_cast<uint64_t>(lrand48()) << 32)
- | static_cast<uint64_t>(lrand48());
- } while (mTimelineID == ICommonClock::kInvalidTimelineID);
-}
-
-// Select a preference between the device IDs of two potential masters.
-// Returns true if the first ID wins, or false if the second ID wins.
-bool CommonTimeServer::arbitrateMaster(
- uint64_t deviceID1, uint8_t devicePrio1,
- uint64_t deviceID2, uint8_t devicePrio2) {
- return ((devicePrio1 > devicePrio2) ||
- ((devicePrio1 == devicePrio2) && (deviceID1 > deviceID2)));
-}
-
-static void hexDumpToString(const uint8_t* src, size_t src_len,
- char* dst, size_t dst_len) {
- size_t offset = 0;
- size_t i;
-
- for (i = 0; (i < src_len) && (offset < dst_len); ++i) {
- int res;
- if (0 == (i % 16)) {
- res = snprintf(dst + offset, dst_len - offset, "\n%04zx :", i);
- if (res < 0)
- break;
- offset += res;
- if (offset >= dst_len)
- break;
- }
-
- res = snprintf(dst + offset, dst_len - offset, " %02x", src[i]);
- if (res < 0)
- break;
- offset += res;
- }
-
- dst[dst_len - 1] = 0;
-}
-
-bool CommonTimeServer::handlePacket() {
- uint8_t buf[256];
- struct sockaddr_storage srcAddr;
- socklen_t srcAddrLen = sizeof(srcAddr);
-
- ssize_t recvBytes = recvfrom(
- mSocket, buf, sizeof(buf), 0,
- reinterpret_cast<sockaddr *>(&srcAddr), &srcAddrLen);
-
- if (recvBytes < 0) {
- mBadPktLog.log(ANDROID_LOG_ERROR, LOG_TAG, "recvfrom failed (%s)",
- strerror(errno));
- return false;
- }
-
- UniversalTimeServicePacket pkt;
- if (pkt.deserializePacket(buf, recvBytes, mSyncGroupID) < 0) {
- char hex[256];
- char srcEPStr[64];
-
- hexDumpToString(buf, static_cast<size_t>(recvBytes), hex, sizeof(hex));
- sockaddrToString(srcAddr, true, srcEPStr, sizeof(srcEPStr));
-
- mBadPktLog.log("Failed to parse %d byte packet from %s.%s",
- recvBytes, srcEPStr, hex);
- return false;
- }
-
- bool result;
- switch (pkt.packetType) {
- case TIME_PACKET_WHO_IS_MASTER_REQUEST:
- result = handleWhoIsMasterRequest(&pkt.p.who_is_master_request,
- srcAddr);
- break;
-
- case TIME_PACKET_WHO_IS_MASTER_RESPONSE:
- result = handleWhoIsMasterResponse(&pkt.p.who_is_master_response,
- srcAddr);
- break;
-
- case TIME_PACKET_SYNC_REQUEST:
- result = handleSyncRequest(&pkt.p.sync_request, srcAddr);
- break;
-
- case TIME_PACKET_SYNC_RESPONSE:
- result = handleSyncResponse(&pkt.p.sync_response, srcAddr);
- break;
-
- case TIME_PACKET_MASTER_ANNOUNCEMENT:
- result = handleMasterAnnouncement(&pkt.p.master_announcement,
- srcAddr);
- break;
-
- default: {
- char srcEPStr[64];
- sockaddrToString(srcAddr, true, srcEPStr, sizeof(srcEPStr));
-
- mBadPktLog.log(ANDROID_LOG_WARN, LOG_TAG,
- "unknown packet type (%d) from %s",
- pkt.packetType, srcEPStr);
-
- result = false;
- } break;
- }
-
- return result;
-}
-
-bool CommonTimeServer::handleTimeout() {
- // If we have no socket, then this must be a timeout to retry socket setup.
- if (mSocket < 0)
- return true;
-
- switch (mState) {
- case ICommonClock::STATE_INITIAL:
- return handleTimeoutInitial();
- case ICommonClock::STATE_CLIENT:
- return handleTimeoutClient();
- case ICommonClock::STATE_MASTER:
- return handleTimeoutMaster();
- case ICommonClock::STATE_RONIN:
- return handleTimeoutRonin();
- case ICommonClock::STATE_WAIT_FOR_ELECTION:
- return handleTimeoutWaitForElection();
- }
-
- return false;
-}
-
-bool CommonTimeServer::handleTimeoutInitial() {
- if (++mInitial_WhoIsMasterRequestTimeouts ==
- kInitial_NumWhoIsMasterRetries) {
- // none of our attempts to discover a master succeeded, so make
- // this device the master
- return becomeMaster("initial timeout");
- } else {
- // retry the WhoIsMaster request
- return sendWhoIsMasterRequest();
- }
-}
-
-bool CommonTimeServer::handleTimeoutClient() {
- if (shouldPanicNotGettingGoodData())
- return becomeInitial("timeout panic, no good data");
-
- if (mClient_SyncRequestPending) {
- mClient_SyncRequestPending = false;
-
- if (++mClient_SyncRequestTimeouts < kClient_NumSyncRequestRetries) {
- // a sync request has timed out, so retry
- return sendSyncRequest();
- } else {
- // The master has failed to respond to a sync request for too many
- // times in a row. Assume the master is dead and start electing
- // a new master.
- return becomeRonin("master not responding");
- }
- } else {
- // initiate the next sync request
- return sendSyncRequest();
- }
-}
-
-bool CommonTimeServer::handleTimeoutMaster() {
- // send another announcement from the master
- return sendMasterAnnouncement();
-}
-
-bool CommonTimeServer::handleTimeoutRonin() {
- if (++mRonin_WhoIsMasterRequestTimeouts == kRonin_NumWhoIsMasterRetries) {
- // no other master is out there, so we won the election
- return becomeMaster("no better masters detected");
- } else {
- return sendWhoIsMasterRequest();
- }
-}
-
-bool CommonTimeServer::handleTimeoutWaitForElection() {
- return becomeRonin("timeout waiting for election conclusion");
-}
-
-bool CommonTimeServer::handleWhoIsMasterRequest(
- const WhoIsMasterRequestPacket* request,
- const sockaddr_storage& srcAddr) {
- // Skip our own messages which come back via broadcast loopback.
- if (request->senderDeviceID == mDeviceID)
- return true;
-
- char srcEPStr[64];
- sockaddrToString(srcAddr, true, srcEPStr, sizeof(srcEPStr));
- mElectionLog.log("RXed WhoIs master request while in state %s. "
- "src %s reqTID %016llx ourTID %016llx",
- stateToString(mState), srcEPStr,
- request->timelineID, mTimelineID);
-
- if (mState == ICommonClock::STATE_MASTER) {
- // is this request related to this master's timeline?
- if (request->timelineID != ICommonClock::kInvalidTimelineID &&
- request->timelineID != mTimelineID)
- return true;
-
- WhoIsMasterResponsePacket pkt;
- pkt.initHeader(mTimelineID, mSyncGroupID);
- pkt.deviceID = mDeviceID;
- pkt.devicePriority = effectivePriority();
-
- mElectionLog.log("TXing WhoIs master resp to %s while in state %s. "
- "ourTID %016llx ourGID %016llx ourDID %016llx "
- "ourPrio %u",
- srcEPStr, stateToString(mState),
- mTimelineID, mSyncGroupID,
- pkt.deviceID, pkt.devicePriority);
-
- uint8_t buf[256];
- ssize_t bufSz = pkt.serializePacket(buf, sizeof(buf));
- if (bufSz < 0)
- return false;
-
- ssize_t sendBytes = sendto(
- mSocket, buf, bufSz, 0,
- reinterpret_cast<const sockaddr *>(&srcAddr),
- sizeof(srcAddr));
- if (sendBytes == -1) {
- ALOGE("%s:%d sendto failed", __PRETTY_FUNCTION__, __LINE__);
- return false;
- }
- } else if (mState == ICommonClock::STATE_RONIN) {
- // if we hear a WhoIsMaster request from another device following
- // the same timeline and that device wins arbitration, then we will stop
- // trying to elect ourselves master and will instead wait for an
- // announcement from the election winner
- if (request->timelineID != mTimelineID)
- return true;
-
- if (arbitrateMaster(request->senderDeviceID,
- request->senderDevicePriority,
- mDeviceID,
- effectivePriority()))
- return becomeWaitForElection("would lose election");
-
- return true;
- } else if (mState == ICommonClock::STATE_INITIAL) {
- // If a group of devices booted simultaneously (e.g. after a power
- // outage) and all of them are in the initial state and there is no
- // master, then each device may time out and declare itself master at
- // the same time. To avoid this, listen for
- // WhoIsMaster(InvalidTimeline) requests from peers. If we would lose
- // arbitration against that peer, reset our timeout count so that the
- // peer has a chance to become master before we time out.
- if (request->timelineID == ICommonClock::kInvalidTimelineID &&
- arbitrateMaster(request->senderDeviceID,
- request->senderDevicePriority,
- mDeviceID,
- effectivePriority())) {
- mInitial_WhoIsMasterRequestTimeouts = 0;
- }
- }
-
- return true;
-}
-
-bool CommonTimeServer::handleWhoIsMasterResponse(
- const WhoIsMasterResponsePacket* response,
- const sockaddr_storage& srcAddr) {
- // Skip our own messages which come back via broadcast loopback.
- if (response->deviceID == mDeviceID)
- return true;
-
- char srcEPStr[64];
- sockaddrToString(srcAddr, true, srcEPStr, sizeof(srcEPStr));
- mElectionLog.log("RXed WhoIs master response while in state %s. "
- "src %s respTID %016llx respDID %016llx respPrio %u "
- "ourTID %016llx",
- stateToString(mState), srcEPStr,
- response->timelineID,
- response->deviceID,
- static_cast<uint32_t>(response->devicePriority),
- mTimelineID);
-
- if (mState == ICommonClock::STATE_INITIAL || mState == ICommonClock::STATE_RONIN) {
- return becomeClient(srcAddr,
- response->deviceID,
- response->devicePriority,
- response->timelineID,
- "heard whois response");
- } else if (mState == ICommonClock::STATE_CLIENT) {
- // if we get multiple responses because there are multiple devices
- // who believe that they are master, then follow the master that
- // wins arbitration
- if (arbitrateMaster(response->deviceID,
- response->devicePriority,
- mClient_MasterDeviceID,
- mClient_MasterDevicePriority)) {
- return becomeClient(srcAddr,
- response->deviceID,
- response->devicePriority,
- response->timelineID,
- "heard whois response");
- }
- }
-
- return true;
-}
-
-bool CommonTimeServer::handleSyncRequest(const SyncRequestPacket* request,
- const sockaddr_storage& srcAddr) {
- SyncResponsePacket pkt;
- pkt.initHeader(mTimelineID, mSyncGroupID);
-
- if ((mState == ICommonClock::STATE_MASTER) &&
- (mTimelineID == request->timelineID)) {
- int64_t rxLocalTime = mLastPacketRxLocalTime;
- int64_t rxCommonTime;
-
- // If we are master on an actual network and have actual clients, then
- // we are no longer low priority.
- setForceLowPriority(false);
-
- if (OK != mCommonClock.localToCommon(rxLocalTime, &rxCommonTime)) {
- return false;
- }
-
- int64_t txLocalTime = mLocalClock.getLocalTime();;
- int64_t txCommonTime;
- if (OK != mCommonClock.localToCommon(txLocalTime, &txCommonTime)) {
- return false;
- }
-
- pkt.nak = 0;
- pkt.clientTxLocalTime = request->clientTxLocalTime;
- pkt.masterRxCommonTime = rxCommonTime;
- pkt.masterTxCommonTime = txCommonTime;
- } else {
- pkt.nak = 1;
- pkt.clientTxLocalTime = 0;
- pkt.masterRxCommonTime = 0;
- pkt.masterTxCommonTime = 0;
- }
-
- uint8_t buf[256];
- ssize_t bufSz = pkt.serializePacket(buf, sizeof(buf));
- if (bufSz < 0)
- return false;
-
- ssize_t sendBytes = sendto(
- mSocket, &buf, bufSz, 0,
- reinterpret_cast<const sockaddr *>(&srcAddr),
- sizeof(srcAddr));
- if (sendBytes == -1) {
- ALOGE("%s:%d sendto failed", __PRETTY_FUNCTION__, __LINE__);
- return false;
- }
-
- return true;
-}
-
-bool CommonTimeServer::handleSyncResponse(
- const SyncResponsePacket* response,
- const sockaddr_storage& srcAddr) {
- if (mState != ICommonClock::STATE_CLIENT)
- return true;
-
- assert(mMasterEPValid);
- if (!sockaddrMatch(srcAddr, mMasterEP, true)) {
- char srcEP[64], expectedEP[64];
- sockaddrToString(srcAddr, true, srcEP, sizeof(srcEP));
- sockaddrToString(mMasterEP, true, expectedEP, sizeof(expectedEP));
- ALOGI("Dropping sync response from unexpected address."
- " Expected %s Got %s", expectedEP, srcEP);
- return true;
- }
-
- if (response->nak) {
- // if our master is no longer accepting requests, then we need to find
- // a new master
- return becomeRonin("master NAK'ed");
- }
-
- mClient_SyncRequestPending = 0;
- mClient_SyncRequestTimeouts = 0;
- mClient_PacketRTTLog.logRX(response->clientTxLocalTime,
- mLastPacketRxLocalTime);
-
- bool result;
- if (!(mClient_SyncRespsRXedFromCurMaster++)) {
- // the first request/response exchange between a client and a master
- // may take unusually long due to ARP, so discard it.
- result = true;
- } else {
- int64_t clientTxLocalTime = response->clientTxLocalTime;
- int64_t clientRxLocalTime = mLastPacketRxLocalTime;
- int64_t masterTxCommonTime = response->masterTxCommonTime;
- int64_t masterRxCommonTime = response->masterRxCommonTime;
-
- int64_t rtt = (clientRxLocalTime - clientTxLocalTime);
- int64_t avgLocal = (clientTxLocalTime + clientRxLocalTime) >> 1;
- int64_t avgCommon = (masterTxCommonTime + masterRxCommonTime) >> 1;
-
- // if the RTT of the packet is significantly larger than the panic
- // threshold, we should simply discard it. Its better to do nothing
- // than to take cues from a packet like that.
- int64_t rttCommon = mCommonClock.localDurationToCommonDuration(rtt);
- if (rttCommon > (static_cast<int64_t>(mPanicThresholdUsec) *
- kRTTDiscardPanicThreshMultiplier)) {
- ALOGV("Dropping sync response with RTT of %" PRId64 " uSec", rttCommon);
- mClient_ExpiredSyncRespsRXedFromCurMaster++;
- if (shouldPanicNotGettingGoodData())
- return becomeInitial("RX panic, no good data");
- return true;
- } else {
- result = mClockRecovery.pushDisciplineEvent(avgLocal, avgCommon, rttCommon);
- mClient_LastGoodSyncRX = clientRxLocalTime;
-
- if (result) {
- // indicate to listeners that we've synced to the common timeline
- notifyClockSync();
- } else {
- ALOGE("Panic! Observed clock sync error is too high to tolerate,"
- " resetting state machine and starting over.");
- notifyClockSyncLoss();
- return becomeInitial("panic");
- }
- }
- }
-
- mCurTimeout.setTimeout(mSyncRequestIntervalMs);
- return result;
-}
-
-bool CommonTimeServer::handleMasterAnnouncement(
- const MasterAnnouncementPacket* packet,
- const sockaddr_storage& srcAddr) {
- uint64_t newDeviceID = packet->deviceID;
- uint8_t newDevicePrio = packet->devicePriority;
- uint64_t newTimelineID = packet->timelineID;
-
- // Skip our own messages which come back via broadcast loopback.
- if (newDeviceID == mDeviceID)
- return true;
-
- char srcEPStr[64];
- sockaddrToString(srcAddr, true, srcEPStr, sizeof(srcEPStr));
- mElectionLog.log("RXed master announcement while in state %s. "
- "src %s srcDevID %lld srcPrio %u srcTID %016llx",
- stateToString(mState), srcEPStr,
- newDeviceID, static_cast<uint32_t>(newDevicePrio),
- newTimelineID);
-
- if (mState == ICommonClock::STATE_INITIAL ||
- mState == ICommonClock::STATE_RONIN ||
- mState == ICommonClock::STATE_WAIT_FOR_ELECTION) {
- // if we aren't currently following a master, then start following
- // this new master
- return becomeClient(srcAddr,
- newDeviceID,
- newDevicePrio,
- newTimelineID,
- "heard master announcement");
- } else if (mState == ICommonClock::STATE_CLIENT) {
- // if the new master wins arbitration against our current master,
- // then become a client of the new master
- if (arbitrateMaster(newDeviceID,
- newDevicePrio,
- mClient_MasterDeviceID,
- mClient_MasterDevicePriority))
- return becomeClient(srcAddr,
- newDeviceID,
- newDevicePrio,
- newTimelineID,
- "heard master announcement");
- } else if (mState == ICommonClock::STATE_MASTER) {
- // two masters are competing - if the new one wins arbitration, then
- // cease acting as master
- if (arbitrateMaster(newDeviceID, newDevicePrio,
- mDeviceID, effectivePriority()))
- return becomeClient(srcAddr, newDeviceID,
- newDevicePrio, newTimelineID,
- "heard master announcement");
- }
-
- return true;
-}
-
-bool CommonTimeServer::sendWhoIsMasterRequest() {
- assert(mState == ICommonClock::STATE_INITIAL || mState == ICommonClock::STATE_RONIN);
-
- // If we have no socket, then we must be in the unconfigured initial state.
- // Don't report any errors, just don't try to send the initial who-is-master
- // query. Eventually, our network will either become configured, or we will
- // be forced into network-less master mode by higher level code.
- if (mSocket < 0) {
- assert(mState == ICommonClock::STATE_INITIAL);
- return true;
- }
-
- bool ret = false;
- WhoIsMasterRequestPacket pkt;
- pkt.initHeader(mSyncGroupID);
- pkt.senderDeviceID = mDeviceID;
- pkt.senderDevicePriority = effectivePriority();
-
- uint8_t buf[256];
- ssize_t bufSz = pkt.serializePacket(buf, sizeof(buf));
- if (bufSz >= 0) {
- char dstEPStr[64];
- sockaddrToString(mMasterElectionEP, true, dstEPStr, sizeof(dstEPStr));
- mElectionLog.log("TXing WhoIs master request to %s while in state %s. "
- "ourTID %016llx ourGID %016llx ourDID %016llx "
- "ourPrio %u",
- dstEPStr, stateToString(mState),
- mTimelineID, mSyncGroupID,
- pkt.senderDeviceID, pkt.senderDevicePriority);
-
- ssize_t sendBytes = sendto(
- mSocket, buf, bufSz, 0,
- reinterpret_cast<const sockaddr *>(&mMasterElectionEP),
- sizeof(mMasterElectionEP));
- if (sendBytes < 0)
- ALOGE("WhoIsMaster sendto failed (errno %d)", errno);
- ret = true;
- }
-
- if (mState == ICommonClock::STATE_INITIAL) {
- mCurTimeout.setTimeout(kInitial_WhoIsMasterTimeoutMs);
- } else {
- mCurTimeout.setTimeout(kRonin_WhoIsMasterTimeoutMs);
- }
-
- return ret;
-}
-
-bool CommonTimeServer::sendSyncRequest() {
- // If we are sending sync requests, then we must be in the client state and
- // we must have a socket (when we have no network, we are only supposed to
- // be in INITIAL or MASTER)
- assert(mState == ICommonClock::STATE_CLIENT);
- assert(mSocket >= 0);
-
- bool ret = false;
- SyncRequestPacket pkt;
- pkt.initHeader(mTimelineID, mSyncGroupID);
- pkt.clientTxLocalTime = mLocalClock.getLocalTime();
-
- if (!mClient_FirstSyncTX)
- mClient_FirstSyncTX = pkt.clientTxLocalTime;
-
- mClient_PacketRTTLog.logTX(pkt.clientTxLocalTime);
-
- uint8_t buf[256];
- ssize_t bufSz = pkt.serializePacket(buf, sizeof(buf));
- if (bufSz >= 0) {
- ssize_t sendBytes = sendto(
- mSocket, buf, bufSz, 0,
- reinterpret_cast<const sockaddr *>(&mMasterEP),
- sizeof(mMasterEP));
- if (sendBytes < 0)
- ALOGE("SyncRequest sendto failed (errno %d)", errno);
- ret = true;
- }
-
- mClient_SyncsSentToCurMaster++;
- mCurTimeout.setTimeout(mSyncRequestIntervalMs);
- mClient_SyncRequestPending = true;
-
- return ret;
-}
-
-bool CommonTimeServer::sendMasterAnnouncement() {
- bool ret = false;
- assert(mState == ICommonClock::STATE_MASTER);
-
- // If we are being asked to send a master announcement, but we have no
- // socket, we must be in network-less master mode. Don't bother to send the
- // announcement, and don't bother to schedule a timeout. When the network
- // comes up, the work thread will get poked and start the process of
- // figuring out who the current master should be.
- if (mSocket < 0) {
- mCurTimeout.setTimeout(kInfiniteTimeout);
- return true;
- }
-
- MasterAnnouncementPacket pkt;
- pkt.initHeader(mTimelineID, mSyncGroupID);
- pkt.deviceID = mDeviceID;
- pkt.devicePriority = effectivePriority();
-
- uint8_t buf[256];
- ssize_t bufSz = pkt.serializePacket(buf, sizeof(buf));
- if (bufSz >= 0) {
- char dstEPStr[64];
- sockaddrToString(mMasterElectionEP, true, dstEPStr, sizeof(dstEPStr));
- mElectionLog.log("TXing Master announcement to %s while in state %s. "
- "ourTID %016llx ourGID %016llx ourDID %016llx "
- "ourPrio %u",
- dstEPStr, stateToString(mState),
- mTimelineID, mSyncGroupID,
- pkt.deviceID, pkt.devicePriority);
-
- ssize_t sendBytes = sendto(
- mSocket, buf, bufSz, 0,
- reinterpret_cast<const sockaddr *>(&mMasterElectionEP),
- sizeof(mMasterElectionEP));
- if (sendBytes < 0)
- ALOGE("MasterAnnouncement sendto failed (errno %d)", errno);
- ret = true;
- }
-
- mCurTimeout.setTimeout(mMasterAnnounceIntervalMs);
- return ret;
-}
-
-bool CommonTimeServer::becomeClient(const sockaddr_storage& masterEP,
- uint64_t masterDeviceID,
- uint8_t masterDevicePriority,
- uint64_t timelineID,
- const char* cause) {
- char newEPStr[64], oldEPStr[64];
- sockaddrToString(masterEP, true, newEPStr, sizeof(newEPStr));
- sockaddrToString(mMasterEP, mMasterEPValid, oldEPStr, sizeof(oldEPStr));
-
- mStateChangeLog.log(ANDROID_LOG_INFO, LOG_TAG,
- "%s --> CLIENT (%s) :%s"
- " OldMaster: %02x-%014llx::%016llx::%s"
- " NewMaster: %02x-%014llx::%016llx::%s",
- stateToString(mState), cause,
- (mTimelineID != timelineID) ? " (new timeline)" : "",
- mClient_MasterDevicePriority, mClient_MasterDeviceID,
- mTimelineID, oldEPStr,
- masterDevicePriority, masterDeviceID,
- timelineID, newEPStr);
-
- if (mTimelineID != timelineID) {
- // start following a new timeline
- mTimelineID = timelineID;
- mClockRecovery.reset(true, true);
- notifyClockSyncLoss();
- } else {
- // start following a new master on the existing timeline
- mClockRecovery.reset(false, true);
- }
-
- mMasterEP = masterEP;
- mMasterEPValid = true;
-
- // If we are on a real network as a client of a real master, then we should
- // no longer force low priority. If our master disappears, we should have
- // the high priority bit set during the election to replace the master
- // because this group was a real group and not a singleton created in
- // networkless mode.
- setForceLowPriority(false);
-
- mClient_MasterDeviceID = masterDeviceID;
- mClient_MasterDevicePriority = masterDevicePriority;
- resetSyncStats();
-
- setState(ICommonClock::STATE_CLIENT);
-
- // add some jitter to when the various clients send their requests
- // in order to reduce the likelihood that a group of clients overload
- // the master after receiving a master announcement
- usleep((lrand48() % 100) * 1000);
-
- return sendSyncRequest();
-}
-
-bool CommonTimeServer::becomeMaster(const char* cause) {
- uint64_t oldTimelineID = mTimelineID;
- if (mTimelineID == ICommonClock::kInvalidTimelineID) {
- // this device has not been following any existing timeline,
- // so it will create a new timeline and declare itself master
- assert(!mCommonClock.isValid());
-
- // set the common time basis
- mCommonClock.setBasis(mLocalClock.getLocalTime(), 0);
-
- // assign an arbitrary timeline iD
- assignTimelineID();
-
- // notify listeners that we've created a common timeline
- notifyClockSync();
- }
-
- mStateChangeLog.log(ANDROID_LOG_INFO, LOG_TAG,
- "%s --> MASTER (%s) : %s timeline %016llx",
- stateToString(mState), cause,
- (oldTimelineID == mTimelineID) ? "taking ownership of"
- : "creating new",
- mTimelineID);
-
- memset(&mMasterEP, 0, sizeof(mMasterEP));
- mMasterEPValid = false;
- mClient_MasterDevicePriority = effectivePriority();
- mClient_MasterDeviceID = mDeviceID;
- mClockRecovery.reset(false, true);
- resetSyncStats();
-
- setState(ICommonClock::STATE_MASTER);
- return sendMasterAnnouncement();
-}
-
-bool CommonTimeServer::becomeRonin(const char* cause) {
- // If we were the client of a given timeline, but had never received even a
- // single time sync packet, then we transition back to Initial instead of
- // Ronin. If we transition to Ronin and end up becoming the new Master, we
- // will be unable to service requests for other clients because we never
- // actually knew what time it was. By going to initial, we ensure that
- // other clients who know what time it is, but would lose master arbitration
- // in the Ronin case, will step up and become the proper new master of the
- // old timeline.
-
- char oldEPStr[64];
- sockaddrToString(mMasterEP, mMasterEPValid, oldEPStr, sizeof(oldEPStr));
- memset(&mMasterEP, 0, sizeof(mMasterEP));
- mMasterEPValid = false;
-
- if (mCommonClock.isValid()) {
- mStateChangeLog.log(ANDROID_LOG_INFO, LOG_TAG,
- "%s --> RONIN (%s) : lost track of previously valid timeline "
- "%02x-%014llx::%016llx::%s (%d TXed %d RXed %d RXExpired)",
- stateToString(mState), cause,
- mClient_MasterDevicePriority, mClient_MasterDeviceID,
- mTimelineID, oldEPStr,
- mClient_SyncsSentToCurMaster,
- mClient_SyncRespsRXedFromCurMaster,
- mClient_ExpiredSyncRespsRXedFromCurMaster);
-
- mRonin_WhoIsMasterRequestTimeouts = 0;
- setState(ICommonClock::STATE_RONIN);
- return sendWhoIsMasterRequest();
- } else {
- mStateChangeLog.log(ANDROID_LOG_INFO, LOG_TAG,
- "%s --> INITIAL (%s) : never synced timeline "
- "%02x-%014llx::%016llx::%s (%d TXed %d RXed %d RXExpired)",
- stateToString(mState), cause,
- mClient_MasterDevicePriority, mClient_MasterDeviceID,
- mTimelineID, oldEPStr,
- mClient_SyncsSentToCurMaster,
- mClient_SyncRespsRXedFromCurMaster,
- mClient_ExpiredSyncRespsRXedFromCurMaster);
-
- return becomeInitial("ronin, no timeline");
- }
-}
-
-bool CommonTimeServer::becomeWaitForElection(const char* cause) {
- mStateChangeLog.log(ANDROID_LOG_INFO, LOG_TAG,
- "%s --> WAIT_FOR_ELECTION (%s) : dropping out of election,"
- " waiting %d mSec for completion.",
- stateToString(mState), cause, kWaitForElection_TimeoutMs);
-
- setState(ICommonClock::STATE_WAIT_FOR_ELECTION);
- mCurTimeout.setTimeout(kWaitForElection_TimeoutMs);
- return true;
-}
-
-bool CommonTimeServer::becomeInitial(const char* cause) {
- mStateChangeLog.log(ANDROID_LOG_INFO, LOG_TAG,
- "Entering INITIAL (%s), total reset.",
- cause);
-
- setState(ICommonClock::STATE_INITIAL);
-
- // reset clock recovery
- mClockRecovery.reset(true, true);
-
- // reset internal state bookkeeping.
- mCurTimeout.setTimeout(kInfiniteTimeout);
- memset(&mMasterEP, 0, sizeof(mMasterEP));
- mMasterEPValid = false;
- mLastPacketRxLocalTime = 0;
- mTimelineID = ICommonClock::kInvalidTimelineID;
- mClockSynced = false;
- mInitial_WhoIsMasterRequestTimeouts = 0;
- mClient_MasterDeviceID = 0;
- mClient_MasterDevicePriority = 0;
- mRonin_WhoIsMasterRequestTimeouts = 0;
- resetSyncStats();
-
- // send the first request to discover the master
- return sendWhoIsMasterRequest();
-}
-
-void CommonTimeServer::notifyClockSync() {
- if (!mClockSynced) {
- mClockSynced = true;
- mICommonClock->notifyOnTimelineChanged(mTimelineID);
- }
-}
-
-void CommonTimeServer::notifyClockSyncLoss() {
- if (mClockSynced) {
- mClockSynced = false;
- mICommonClock->notifyOnTimelineChanged(
- ICommonClock::kInvalidTimelineID);
- }
-}
-
-void CommonTimeServer::setState(ICommonClock::State s) {
- mState = s;
-}
-
-const char* CommonTimeServer::stateToString(ICommonClock::State s) {
- switch(s) {
- case ICommonClock::STATE_INITIAL:
- return "INITIAL";
- case ICommonClock::STATE_CLIENT:
- return "CLIENT";
- case ICommonClock::STATE_MASTER:
- return "MASTER";
- case ICommonClock::STATE_RONIN:
- return "RONIN";
- case ICommonClock::STATE_WAIT_FOR_ELECTION:
- return "WAIT_FOR_ELECTION";
- default:
- return "unknown";
- }
-}
-
-void CommonTimeServer::sockaddrToString(const sockaddr_storage& addr,
- bool addrValid,
- char* buf, size_t bufLen) {
- if (!bufLen || !buf)
- return;
-
- if (addrValid) {
- switch (addr.ss_family) {
- case AF_INET: {
- const struct sockaddr_in* sa =
- reinterpret_cast<const struct sockaddr_in*>(&addr);
- unsigned long a = ntohl(sa->sin_addr.s_addr);
- uint16_t p = ntohs(sa->sin_port);
- snprintf(buf, bufLen, "%lu.%lu.%lu.%lu:%hu",
- ((a >> 24) & 0xFF), ((a >> 16) & 0xFF),
- ((a >> 8) & 0xFF), (a & 0xFF), p);
- } break;
-
- case AF_INET6: {
- const struct sockaddr_in6* sa =
- reinterpret_cast<const struct sockaddr_in6*>(&addr);
- const uint8_t* a = sa->sin6_addr.s6_addr;
- uint16_t p = ntohs(sa->sin6_port);
- snprintf(buf, bufLen,
- "%02X%02X:%02X%02X:%02X%02X:%02X%02X:"
- "%02X%02X:%02X%02X:%02X%02X:%02X%02X port %hd",
- a[0], a[1], a[ 2], a[ 3], a[ 4], a[ 5], a[ 6], a[ 7],
- a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15],
- p);
- } break;
-
- default:
- snprintf(buf, bufLen,
- "<unknown sockaddr family %d>", addr.ss_family);
- break;
- }
- } else {
- snprintf(buf, bufLen, "<none>");
- }
-
- buf[bufLen - 1] = 0;
-}
-
-bool CommonTimeServer::sockaddrMatch(const sockaddr_storage& a1,
- const sockaddr_storage& a2,
- bool matchAddressOnly) {
- if (a1.ss_family != a2.ss_family)
- return false;
-
- switch (a1.ss_family) {
- case AF_INET: {
- const struct sockaddr_in* sa1 =
- reinterpret_cast<const struct sockaddr_in*>(&a1);
- const struct sockaddr_in* sa2 =
- reinterpret_cast<const struct sockaddr_in*>(&a2);
-
- if (sa1->sin_addr.s_addr != sa2->sin_addr.s_addr)
- return false;
-
- return (matchAddressOnly || (sa1->sin_port == sa2->sin_port));
- } break;
-
- case AF_INET6: {
- const struct sockaddr_in6* sa1 =
- reinterpret_cast<const struct sockaddr_in6*>(&a1);
- const struct sockaddr_in6* sa2 =
- reinterpret_cast<const struct sockaddr_in6*>(&a2);
-
- if (memcmp(&sa1->sin6_addr, &sa2->sin6_addr, sizeof(sa2->sin6_addr)))
- return false;
-
- return (matchAddressOnly || (sa1->sin6_port == sa2->sin6_port));
- } break;
-
- // Huh? We don't deal in non-IPv[46] addresses. Not sure how we got
- // here, but we don't know how to comapre these addresses and simply
- // default to a no-match decision.
- default: return false;
- }
-}
-
-bool CommonTimeServer::shouldPanicNotGettingGoodData() {
- if (mClient_FirstSyncTX) {
- int64_t now = mLocalClock.getLocalTime();
- int64_t delta = now - (mClient_LastGoodSyncRX
- ? mClient_LastGoodSyncRX
- : mClient_FirstSyncTX);
- int64_t deltaUsec = mCommonClock.localDurationToCommonDuration(delta);
-
- if (deltaUsec >= kNoGoodDataPanicThresholdUsec)
- return true;
- }
-
- return false;
-}
-
-void CommonTimeServer::PacketRTTLog::logTX(int64_t txTime) {
- txTimes[wrPtr] = txTime;
- rxTimes[wrPtr] = 0;
- wrPtr = (wrPtr + 1) % RTT_LOG_SIZE;
- if (!wrPtr)
- logFull = true;
-}
-
-void CommonTimeServer::PacketRTTLog::logRX(int64_t txTime, int64_t rxTime) {
- if (!logFull && !wrPtr)
- return;
-
- uint32_t i = logFull ? wrPtr : 0;
- do {
- if (txTimes[i] == txTime) {
- rxTimes[i] = rxTime;
- break;
- }
- i = (i + 1) % RTT_LOG_SIZE;
- } while (i != wrPtr);
-}
-
-} // namespace android
diff --git a/libs/common_time/common_time_server.h b/libs/common_time/common_time_server.h
deleted file mode 100644
index 6e18050..0000000
--- a/libs/common_time/common_time_server.h
+++ /dev/null
@@ -1,324 +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.
- */
-
-#ifndef ANDROID_COMMON_TIME_SERVER_H
-#define ANDROID_COMMON_TIME_SERVER_H
-
-#include <arpa/inet.h>
-#include <stdint.h>
-#include <sys/socket.h>
-
-#include <common_time/ICommonClock.h>
-#include <common_time/local_clock.h>
-#include <utils/String8.h>
-
-#include "clock_recovery.h"
-#include "common_clock.h"
-#include "common_time_server_packets.h"
-#include "utils.h"
-
-#define RTT_LOG_SIZE 30
-
-namespace android {
-
-class CommonClockService;
-class CommonTimeConfigService;
-
-/***** time service implementation *****/
-
-class CommonTimeServer : public Thread {
- public:
- CommonTimeServer();
- ~CommonTimeServer();
-
- bool startServices();
-
- // Common Clock API methods
- CommonClock& getCommonClock() { return mCommonClock; }
- LocalClock& getLocalClock() { return mLocalClock; }
- uint64_t getTimelineID();
- int32_t getEstimatedError();
- ICommonClock::State getState();
- status_t getMasterAddr(struct sockaddr_storage* addr);
- status_t isCommonTimeValid(bool* valid, uint32_t* timelineID);
-
- // Config API methods
- status_t getMasterElectionPriority(uint8_t *priority);
- status_t setMasterElectionPriority(uint8_t priority);
- status_t getMasterElectionEndpoint(struct sockaddr_storage *addr);
- status_t setMasterElectionEndpoint(const struct sockaddr_storage *addr);
- status_t getMasterElectionGroupId(uint64_t *id);
- status_t setMasterElectionGroupId(uint64_t id);
- status_t getInterfaceBinding(String8& ifaceName);
- status_t setInterfaceBinding(const String8& ifaceName);
- status_t getMasterAnnounceInterval(int *interval);
- status_t setMasterAnnounceInterval(int interval);
- status_t getClientSyncInterval(int *interval);
- status_t setClientSyncInterval(int interval);
- status_t getPanicThreshold(int *threshold);
- status_t setPanicThreshold(int threshold);
- status_t getAutoDisable(bool *autoDisable);
- status_t setAutoDisable(bool autoDisable);
- status_t forceNetworklessMasterMode();
-
- // Method used by the CommonClockService to notify the core service about
- // changes in the number of active common clock clients.
- void reevaluateAutoDisableState(bool commonClockHasClients);
-
- status_t dumpClockInterface(int fd, const Vector<String16>& args,
- size_t activeClients);
- status_t dumpConfigInterface(int fd, const Vector<String16>& args);
-
- private:
- class PacketRTTLog {
- public:
- PacketRTTLog() {
- resetLog();
- }
-
- void resetLog() {
- wrPtr = 0;
- logFull = 0;
- }
-
- void logTX(int64_t txTime);
- void logRX(int64_t txTime, int64_t rxTime);
- void dumpLog(int fd, const CommonClock& cclk);
-
- private:
- uint32_t wrPtr;
- bool logFull;
- int64_t txTimes[RTT_LOG_SIZE];
- int64_t rxTimes[RTT_LOG_SIZE];
- };
-
- bool threadLoop();
-
- bool runStateMachine_l();
- bool setupSocket_l();
-
- void assignTimelineID();
- bool assignDeviceID();
-
- static bool arbitrateMaster(uint64_t deviceID1, uint8_t devicePrio1,
- uint64_t deviceID2, uint8_t devicePrio2);
-
- bool handlePacket();
- bool handleWhoIsMasterRequest (const WhoIsMasterRequestPacket* request,
- const sockaddr_storage& srcAddr);
- bool handleWhoIsMasterResponse(const WhoIsMasterResponsePacket* response,
- const sockaddr_storage& srcAddr);
- bool handleSyncRequest (const SyncRequestPacket* request,
- const sockaddr_storage& srcAddr);
- bool handleSyncResponse (const SyncResponsePacket* response,
- const sockaddr_storage& srcAddr);
- bool handleMasterAnnouncement (const MasterAnnouncementPacket* packet,
- const sockaddr_storage& srcAddr);
-
- bool handleTimeout();
- bool handleTimeoutInitial();
- bool handleTimeoutClient();
- bool handleTimeoutMaster();
- bool handleTimeoutRonin();
- bool handleTimeoutWaitForElection();
-
- bool sendWhoIsMasterRequest();
- bool sendSyncRequest();
- bool sendMasterAnnouncement();
-
- bool becomeClient(const sockaddr_storage& masterAddr,
- uint64_t masterDeviceID,
- uint8_t masterDevicePriority,
- uint64_t timelineID,
- const char* cause);
- bool becomeMaster(const char* cause);
- bool becomeRonin(const char* cause);
- bool becomeWaitForElection(const char* cause);
- bool becomeInitial(const char* cause);
-
- void notifyClockSync();
- void notifyClockSyncLoss();
-
- ICommonClock::State mState;
- void setState(ICommonClock::State s);
-
- void clearPendingWakeupEvents_l();
- void wakeupThread_l();
- void cleanupSocket_l();
- void shutdownThread();
-
- inline uint8_t effectivePriority() const {
- return (mMasterPriority & 0x7F) |
- (mForceLowPriority ? 0x00 : 0x80);
- }
-
- inline bool shouldAutoDisable() const {
- return (mAutoDisable && !mCommonClockHasClients);
- }
-
- inline void resetSyncStats() {
- mClient_SyncRequestPending = false;
- mClient_SyncRequestTimeouts = 0;
- mClient_SyncsSentToCurMaster = 0;
- mClient_SyncRespsRXedFromCurMaster = 0;
- mClient_ExpiredSyncRespsRXedFromCurMaster = 0;
- mClient_FirstSyncTX = 0;
- mClient_LastGoodSyncRX = 0;
- mClient_PacketRTTLog.resetLog();
- }
-
- bool shouldPanicNotGettingGoodData();
-
- // Helper to keep track of the state machine's current timeout
- Timeout mCurTimeout;
-
- // common clock, local clock abstraction, and clock recovery loop
- CommonClock mCommonClock;
- LocalClock mLocalClock;
- ClockRecoveryLoop mClockRecovery;
-
- // implementation of ICommonClock
- sp<CommonClockService> mICommonClock;
-
- // implementation of ICommonTimeConfig
- sp<CommonTimeConfigService> mICommonTimeConfig;
-
- // UDP socket for the time sync protocol
- int mSocket;
-
- // eventfd used to wakeup the work thread in response to configuration
- // changes.
- int mWakeupThreadFD;
-
- // timestamp captured when a packet is received
- int64_t mLastPacketRxLocalTime;
-
- // ID of the timeline that this device is following
- uint64_t mTimelineID;
-
- // flag for whether the clock has been synced to a timeline
- bool mClockSynced;
-
- // flag used to indicate that clients should be considered to be lower
- // priority than all of their peers during elections. This flag is set and
- // cleared by the state machine. It is set when the client joins a new
- // network. If the client had been a master in the old network (or an
- // isolated master with no network connectivity) it should defer to any
- // masters which may already be on the network. It will be cleared whenever
- // the state machine transitions to the master state.
- bool mForceLowPriority;
- inline void setForceLowPriority(bool val) {
- mForceLowPriority = val;
- if (mState == ICommonClock::STATE_MASTER)
- mClient_MasterDevicePriority = effectivePriority();
- }
-
- // Lock to synchronize access to internal state and configuration.
- Mutex mLock;
-
- // Flag updated by the common clock service to indicate that it does or does
- // not currently have registered clients. When the the auto disable flag is
- // cleared on the common time service, the service will participate in
- // network synchronization whenever it has a valid network interface to bind
- // to. When the auto disable flag is set on the common time service, it
- // will only participate in network synchronization when it has both a valid
- // interface AND currently active common clock clients.
- bool mCommonClockHasClients;
-
- // Internal logs used for dumpsys.
- LogRing mStateChangeLog;
- LogRing mElectionLog;
- LogRing mBadPktLog;
-
- // Configuration info
- struct sockaddr_storage mMasterElectionEP; // Endpoint over which we conduct master election
- String8 mBindIface; // Endpoint for the service to bind to.
- bool mBindIfaceValid; // whether or not the bind Iface is valid.
- bool mBindIfaceDirty; // whether or not the bind Iface is valid.
- struct sockaddr_storage mMasterEP; // Endpoint of our current master (if any)
- bool mMasterEPValid;
- uint64_t mDeviceID; // unique ID of this device
- uint64_t mSyncGroupID; // synchronization group ID of this device.
- uint8_t mMasterPriority; // Priority of this device in master election.
- uint32_t mMasterAnnounceIntervalMs;
- uint32_t mSyncRequestIntervalMs;
- uint32_t mPanicThresholdUsec;
- bool mAutoDisable;
-
- // Config defaults.
- static const char* kDefaultMasterElectionAddr;
- static const uint16_t kDefaultMasterElectionPort;
- static const uint64_t kDefaultSyncGroupID;
- static const uint8_t kDefaultMasterPriority;
- static const uint32_t kDefaultMasterAnnounceIntervalMs;
- static const uint32_t kDefaultSyncRequestIntervalMs;
- static const uint32_t kDefaultPanicThresholdUsec;
- static const bool kDefaultAutoDisable;
-
- // Priority mask and shift fields.
- static const uint64_t kDeviceIDMask;
- static const uint8_t kDevicePriorityMask;
- static const uint8_t kDevicePriorityHiLowBit;
- static const uint32_t kDevicePriorityShift;
-
- // Unconfgurable constants
- static const int kSetupRetryTimeoutMs;
- static const int64_t kNoGoodDataPanicThresholdUsec;
- static const uint32_t kRTTDiscardPanicThreshMultiplier;
-
- /*** status while in the Initial state ***/
- int mInitial_WhoIsMasterRequestTimeouts;
- static const int kInitial_NumWhoIsMasterRetries;
- static const int kInitial_WhoIsMasterTimeoutMs;
-
- /*** status while in the Client state ***/
- uint64_t mClient_MasterDeviceID;
- uint8_t mClient_MasterDevicePriority;
- bool mClient_SyncRequestPending;
- int mClient_SyncRequestTimeouts;
- uint32_t mClient_SyncsSentToCurMaster;
- uint32_t mClient_SyncRespsRXedFromCurMaster;
- uint32_t mClient_ExpiredSyncRespsRXedFromCurMaster;
- int64_t mClient_FirstSyncTX;
- int64_t mClient_LastGoodSyncRX;
- PacketRTTLog mClient_PacketRTTLog;
- static const int kClient_NumSyncRequestRetries;
-
-
- /*** status while in the Master state ***/
- static const uint32_t kDefaultMaster_AnnouncementIntervalMs;
-
- /*** status while in the Ronin state ***/
- int mRonin_WhoIsMasterRequestTimeouts;
- static const int kRonin_NumWhoIsMasterRetries;
- static const int kRonin_WhoIsMasterTimeoutMs;
-
- /*** status while in the WaitForElection state ***/
- static const int kWaitForElection_TimeoutMs;
-
- static const int kInfiniteTimeout;
-
- static const char* stateToString(ICommonClock::State s);
- static void sockaddrToString(const sockaddr_storage& addr, bool addrValid,
- char* buf, size_t bufLen);
- static bool sockaddrMatch(const sockaddr_storage& a1,
- const sockaddr_storage& a2,
- bool matchAddressOnly);
-};
-
-} // namespace android
-
-#endif // ANDROID_COMMON_TIME_SERVER_H
diff --git a/libs/common_time/common_time_server_api.cpp b/libs/common_time/common_time_server_api.cpp
deleted file mode 100644
index 60e6567..0000000
--- a/libs/common_time/common_time_server_api.cpp
+++ /dev/null
@@ -1,440 +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.
- */
-
-/*
- * A service that exchanges time synchronization information between
- * a master that defines a timeline and clients that follow the timeline.
- */
-
-#define LOG_TAG "common_time"
-#include <utils/Log.h>
-
-#include <binder/IServiceManager.h>
-#include <binder/IPCThreadState.h>
-
-#include "common_time_server.h"
-
-#include <inttypes.h>
-
-namespace android {
-
-//
-// Clock API
-//
-uint64_t CommonTimeServer::getTimelineID() {
- AutoMutex _lock(&mLock);
- return mTimelineID;
-}
-
-ICommonClock::State CommonTimeServer::getState() {
- AutoMutex _lock(&mLock);
- return mState;
-}
-
-status_t CommonTimeServer::getMasterAddr(struct sockaddr_storage* addr) {
- AutoMutex _lock(&mLock);
- if (mMasterEPValid) {
- memcpy(addr, &mMasterEP, sizeof(*addr));
- return OK;
- }
-
- return UNKNOWN_ERROR;
-}
-
-int32_t CommonTimeServer::getEstimatedError() {
- AutoMutex _lock(&mLock);
-
- if (ICommonClock::STATE_MASTER == mState)
- return 0;
-
- if (!mClockSynced)
- return ICommonClock::kErrorEstimateUnknown;
-
- return mClockRecovery.getLastErrorEstimate();
-}
-
-status_t CommonTimeServer::isCommonTimeValid(bool* valid,
- uint32_t* timelineID) {
- AutoMutex _lock(&mLock);
- *valid = mCommonClock.isValid();
- *timelineID = mTimelineID;
- return OK;
-}
-
-//
-// Config API
-//
-status_t CommonTimeServer::getMasterElectionPriority(uint8_t *priority) {
- AutoMutex _lock(&mLock);
- *priority = mMasterPriority;
- return OK;
-}
-
-status_t CommonTimeServer::setMasterElectionPriority(uint8_t priority) {
- AutoMutex _lock(&mLock);
-
- if (priority > 0x7F)
- return BAD_VALUE;
-
- mMasterPriority = priority;
- return OK;
-}
-
-status_t CommonTimeServer::getMasterElectionEndpoint(
- struct sockaddr_storage *addr) {
- AutoMutex _lock(&mLock);
- memcpy(addr, &mMasterElectionEP, sizeof(*addr));
- return OK;
-}
-
-status_t CommonTimeServer::setMasterElectionEndpoint(
- const struct sockaddr_storage *addr) {
- AutoMutex _lock(&mLock);
-
- if (!addr)
- return BAD_VALUE;
-
- // TODO: add proper support for IPv6
- if (addr->ss_family != AF_INET)
- return BAD_VALUE;
-
- // Only multicast and broadcast endpoints with explicit ports are allowed.
- uint16_t ipv4Port = ntohs(
- reinterpret_cast<const struct sockaddr_in*>(addr)->sin_port);
- if (!ipv4Port)
- return BAD_VALUE;
-
- uint32_t ipv4Addr = ntohl(
- reinterpret_cast<const struct sockaddr_in*>(addr)->sin_addr.s_addr);
- if ((ipv4Addr != 0xFFFFFFFF) && (0xE0000000 != (ipv4Addr & 0xF0000000)))
- return BAD_VALUE;
-
- memcpy(&mMasterElectionEP, addr, sizeof(mMasterElectionEP));
-
- // Force a rebind in order to change election enpoints.
- mBindIfaceDirty = true;
- wakeupThread_l();
- return OK;
-}
-
-status_t CommonTimeServer::getMasterElectionGroupId(uint64_t *id) {
- AutoMutex _lock(&mLock);
- *id = mSyncGroupID;
- return OK;
-}
-
-status_t CommonTimeServer::setMasterElectionGroupId(uint64_t id) {
- AutoMutex _lock(&mLock);
- mSyncGroupID = id;
- return OK;
-}
-
-status_t CommonTimeServer::getInterfaceBinding(String8& ifaceName) {
- AutoMutex _lock(&mLock);
- if (!mBindIfaceValid)
- return INVALID_OPERATION;
- ifaceName = mBindIface;
- return OK;
-}
-
-status_t CommonTimeServer::setInterfaceBinding(const String8& ifaceName) {
- AutoMutex _lock(&mLock);
-
- mBindIfaceDirty = true;
- if (ifaceName.size()) {
- mBindIfaceValid = true;
- mBindIface = ifaceName;
- } else {
- mBindIfaceValid = false;
- mBindIface.clear();
- }
-
- wakeupThread_l();
- return OK;
-}
-
-status_t CommonTimeServer::getMasterAnnounceInterval(int *interval) {
- AutoMutex _lock(&mLock);
- *interval = mMasterAnnounceIntervalMs;
- return OK;
-}
-
-status_t CommonTimeServer::setMasterAnnounceInterval(int interval) {
- AutoMutex _lock(&mLock);
-
- if (interval > (6 *3600000)) // Max interval is once every 6 hrs
- return BAD_VALUE;
-
- if (interval < 500) // Min interval is once per 0.5 seconds
- return BAD_VALUE;
-
- mMasterAnnounceIntervalMs = interval;
- if (ICommonClock::STATE_MASTER == mState) {
- int pendingTimeout = mCurTimeout.msecTillTimeout();
- if ((kInfiniteTimeout == pendingTimeout) ||
- (pendingTimeout > interval)) {
- mCurTimeout.setTimeout(mMasterAnnounceIntervalMs);
- wakeupThread_l();
- }
- }
-
- return OK;
-}
-
-status_t CommonTimeServer::getClientSyncInterval(int *interval) {
- AutoMutex _lock(&mLock);
- *interval = mSyncRequestIntervalMs;
- return OK;
-}
-
-status_t CommonTimeServer::setClientSyncInterval(int interval) {
- AutoMutex _lock(&mLock);
-
- if (interval > (3600000)) // Max interval is once every 60 min
- return BAD_VALUE;
-
- if (interval < 250) // Min interval is once per 0.25 seconds
- return BAD_VALUE;
-
- mSyncRequestIntervalMs = interval;
- if (ICommonClock::STATE_CLIENT == mState) {
- int pendingTimeout = mCurTimeout.msecTillTimeout();
- if ((kInfiniteTimeout == pendingTimeout) ||
- (pendingTimeout > interval)) {
- mCurTimeout.setTimeout(mSyncRequestIntervalMs);
- wakeupThread_l();
- }
- }
-
- return OK;
-}
-
-status_t CommonTimeServer::getPanicThreshold(int *threshold) {
- AutoMutex _lock(&mLock);
- *threshold = mPanicThresholdUsec;
- return OK;
-}
-
-status_t CommonTimeServer::setPanicThreshold(int threshold) {
- AutoMutex _lock(&mLock);
-
- if (threshold < 1000) // Min threshold is 1mSec
- return BAD_VALUE;
-
- mPanicThresholdUsec = threshold;
- return OK;
-}
-
-status_t CommonTimeServer::getAutoDisable(bool *autoDisable) {
- AutoMutex _lock(&mLock);
- *autoDisable = mAutoDisable;
- return OK;
-}
-
-status_t CommonTimeServer::setAutoDisable(bool autoDisable) {
- AutoMutex _lock(&mLock);
- mAutoDisable = autoDisable;
- wakeupThread_l();
- return OK;
-}
-
-status_t CommonTimeServer::forceNetworklessMasterMode() {
- AutoMutex _lock(&mLock);
-
- // Can't force networkless master mode if we are currently bound to a
- // network.
- if (mSocket >= 0)
- return INVALID_OPERATION;
-
- becomeMaster("force networkless");
-
- return OK;
-}
-
-void CommonTimeServer::reevaluateAutoDisableState(bool commonClockHasClients) {
- AutoMutex _lock(&mLock);
- bool needWakeup = (mAutoDisable && mMasterEPValid &&
- (commonClockHasClients != mCommonClockHasClients));
-
- mCommonClockHasClients = commonClockHasClients;
-
- if (needWakeup) {
- ALOGI("Waking up service, auto-disable is engaged and service now has%s"
- " clients", mCommonClockHasClients ? "" : " no");
- wakeupThread_l();
- }
-}
-
-#define dump_printf(a, b...) do { \
- int res; \
- res = snprintf(buffer, sizeof(buffer), a, b); \
- buffer[sizeof(buffer) - 1] = 0; \
- if (res > 0) \
- write(fd, buffer, res); \
-} while (0)
-#define checked_percentage(a, b) ((0 == (b)) ? 0.0f : ((100.0f * (a)) / (b)))
-
-status_t CommonTimeServer::dumpClockInterface(int fd,
- const Vector<String16>& /* args */,
- size_t activeClients) {
- AutoMutex _lock(&mLock);
- const size_t SIZE = 256;
- char buffer[SIZE];
-
- if (checkCallingPermission(String16("android.permission.DUMP")) == false) {
- snprintf(buffer, SIZE, "Permission Denial: "
- "can't dump CommonClockService from pid=%d, uid=%d\n",
- IPCThreadState::self()->getCallingPid(),
- IPCThreadState::self()->getCallingUid());
- write(fd, buffer, strlen(buffer));
- } else {
- int64_t commonTime;
- int64_t localTime;
- bool synced;
- char maStr[64];
-
- localTime = mLocalClock.getLocalTime();
- synced = (OK == mCommonClock.localToCommon(localTime, &commonTime));
- sockaddrToString(mMasterEP, mMasterEPValid, maStr, sizeof(maStr));
-
- dump_printf("Common Clock Service Status\nLocal time : %" PRId64 "\n",
- localTime);
-
- if (synced)
- dump_printf("Common time : %" PRId64 "\n", commonTime);
- else
- dump_printf("Common time : %s\n", "not synced");
-
- dump_printf("Timeline ID : %016" PRIu64 "\n", mTimelineID);
- dump_printf("State : %s\n", stateToString(mState));
- dump_printf("Master Addr : %s\n", maStr);
-
-
- if (synced) {
- int32_t est = (ICommonClock::STATE_MASTER != mState)
- ? mClockRecovery.getLastErrorEstimate()
- : 0;
- dump_printf("Error Est. : %.3f msec\n",
- static_cast<float>(est) / 1000.0);
- } else {
- dump_printf("Error Est. : %s\n", "unknown");
- }
-
- dump_printf("Syncs TXes : %u\n", mClient_SyncsSentToCurMaster);
- dump_printf("Syncs RXes : %u (%.2f%%)\n",
- mClient_SyncRespsRXedFromCurMaster,
- checked_percentage(
- mClient_SyncRespsRXedFromCurMaster,
- mClient_SyncsSentToCurMaster));
- dump_printf("RXs Expired : %u (%.2f%%)\n",
- mClient_ExpiredSyncRespsRXedFromCurMaster,
- checked_percentage(
- mClient_ExpiredSyncRespsRXedFromCurMaster,
- mClient_SyncsSentToCurMaster));
-
- if (!mClient_LastGoodSyncRX) {
- dump_printf("Last Good RX : %s\n", "unknown");
- } else {
- int64_t localDelta, usecDelta;
- localDelta = localTime - mClient_LastGoodSyncRX;
- usecDelta = mCommonClock.localDurationToCommonDuration(localDelta);
- dump_printf("Last Good RX : %" PRId64 " uSec ago\n", usecDelta);
- }
-
- dump_printf("Active Clients : %zu\n", activeClients);
- mClient_PacketRTTLog.dumpLog(fd, mCommonClock);
- mStateChangeLog.dumpLog(fd);
- mElectionLog.dumpLog(fd);
- mBadPktLog.dumpLog(fd);
- }
-
- return NO_ERROR;
-}
-
-status_t CommonTimeServer::dumpConfigInterface(int fd,
- const Vector<String16>& /* args */) {
- AutoMutex _lock(&mLock);
- const size_t SIZE = 256;
- char buffer[SIZE];
-
- if (checkCallingPermission(String16("android.permission.DUMP")) == false) {
- snprintf(buffer, SIZE, "Permission Denial: "
- "can't dump CommonTimeConfigService from pid=%d, uid=%d\n",
- IPCThreadState::self()->getCallingPid(),
- IPCThreadState::self()->getCallingUid());
- write(fd, buffer, strlen(buffer));
- } else {
- char meStr[64];
-
- sockaddrToString(mMasterElectionEP, true, meStr, sizeof(meStr));
-
- dump_printf("Common Time Config Service Status\n"
- "Bound Interface : %s\n",
- mBindIfaceValid ? mBindIface.string() : "<unbound>");
- dump_printf("Master Election Endpoint : %s\n", meStr);
- dump_printf("Master Election Group ID : %016" PRIu64 "\n", mSyncGroupID);
- dump_printf("Master Announce Interval : %d mSec\n",
- mMasterAnnounceIntervalMs);
- dump_printf("Client Sync Interval : %d mSec\n",
- mSyncRequestIntervalMs);
- dump_printf("Panic Threshold : %d uSec\n",
- mPanicThresholdUsec);
- dump_printf("Base ME Prio : 0x%02x\n",
- static_cast<uint32_t>(mMasterPriority));
- dump_printf("Effective ME Prio : 0x%02x\n",
- static_cast<uint32_t>(effectivePriority()));
- dump_printf("Auto Disable Allowed : %s\n",
- mAutoDisable ? "yes" : "no");
- dump_printf("Auto Disable Engaged : %s\n",
- shouldAutoDisable() ? "yes" : "no");
- }
-
- return NO_ERROR;
-}
-
-void CommonTimeServer::PacketRTTLog::dumpLog(int fd, const CommonClock& cclk) {
- const size_t SIZE = 256;
- char buffer[SIZE];
- uint32_t avail = !logFull ? wrPtr : RTT_LOG_SIZE;
-
- if (!avail)
- return;
-
- dump_printf("\nPacket Log (%d entries)\n", avail);
-
- uint32_t ndx = 0;
- uint32_t i = logFull ? wrPtr : 0;
- do {
- if (rxTimes[i]) {
- int64_t delta = rxTimes[i] - txTimes[i];
- int64_t deltaUsec = cclk.localDurationToCommonDuration(delta);
- dump_printf("pkt[%2d] : localTX %12" PRId64 " localRX %12" PRId64 " "
- "(%.3f msec RTT)\n",
- ndx, txTimes[i], rxTimes[i],
- static_cast<float>(deltaUsec) / 1000.0);
- } else {
- dump_printf("pkt[%2d] : localTX %12" PRId64 " localRX never\n",
- ndx, txTimes[i]);
- }
- i = (i + 1) % RTT_LOG_SIZE;
- ndx++;
- } while (i != wrPtr);
-}
-
-#undef dump_printf
-#undef checked_percentage
-
-} // namespace android
diff --git a/libs/common_time/common_time_server_packets.cpp b/libs/common_time/common_time_server_packets.cpp
deleted file mode 100644
index c7c893d..0000000
--- a/libs/common_time/common_time_server_packets.cpp
+++ /dev/null
@@ -1,293 +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.
- */
-
-/*
- * A service that exchanges time synchronization information between
- * a master that defines a timeline and clients that follow the timeline.
- */
-
-#define LOG_TAG "common_time"
-#include <utils/Log.h>
-
-#include <arpa/inet.h>
-#include <stdint.h>
-
-#include "common_time_server_packets.h"
-
-namespace android {
-
-const uint32_t TimeServicePacketHeader::kMagic =
- (static_cast<uint32_t>('c') << 24) |
- (static_cast<uint32_t>('c') << 16) |
- (static_cast<uint32_t>('l') << 8) |
- static_cast<uint32_t>('k');
-
-const uint16_t TimeServicePacketHeader::kCurVersion = 1;
-
-#define SERIALIZE_FIELD(field_name, type, converter) \
- do { \
- if ((offset + sizeof(field_name)) > length) \
- return -1; \
- *((type*)(data + offset)) = converter(field_name); \
- offset += sizeof(field_name); \
- } while (0)
-#define SERIALIZE_INT16(field_name) SERIALIZE_FIELD(field_name, int16_t, htons)
-#define SERIALIZE_INT32(field_name) SERIALIZE_FIELD(field_name, int32_t, htonl)
-#define SERIALIZE_INT64(field_name) SERIALIZE_FIELD(field_name, int64_t, htonq)
-
-#define DESERIALIZE_FIELD(field_name, type, converter) \
- do { \
- if ((offset + sizeof(field_name)) > length) \
- return -1; \
- (field_name) = converter(*((type*)(data + offset))); \
- offset += sizeof(field_name); \
- } while (0)
-#define DESERIALIZE_INT16(field_name) DESERIALIZE_FIELD(field_name, int16_t, ntohs)
-#define DESERIALIZE_INT32(field_name) DESERIALIZE_FIELD(field_name, int32_t, ntohl)
-#define DESERIALIZE_INT64(field_name) DESERIALIZE_FIELD(field_name, int64_t, ntohq)
-
-#define kDevicePriorityShift 56
-#define kDeviceIDMask ((static_cast<uint64_t>(1) << kDevicePriorityShift) - 1)
-
-inline uint64_t packDeviceID(uint64_t devID, uint8_t prio) {
- return (devID & kDeviceIDMask) |
- (static_cast<uint64_t>(prio) << kDevicePriorityShift);
-}
-
-inline uint64_t unpackDeviceID(uint64_t packed) {
- return (packed & kDeviceIDMask);
-}
-
-inline uint8_t unpackDevicePriority(uint64_t packed) {
- return static_cast<uint8_t>(packed >> kDevicePriorityShift);
-}
-
-ssize_t TimeServicePacketHeader::serializeHeader(uint8_t* data,
- uint32_t length) {
- ssize_t offset = 0;
- int16_t pktType = static_cast<int16_t>(packetType);
- SERIALIZE_INT32(magic);
- SERIALIZE_INT16(version);
- SERIALIZE_INT16(pktType);
- SERIALIZE_INT64(timelineID);
- SERIALIZE_INT64(syncGroupID);
- return offset;
-}
-
-ssize_t TimeServicePacketHeader::deserializeHeader(const uint8_t* data,
- uint32_t length) {
- ssize_t offset = 0;
- int16_t tmp;
- DESERIALIZE_INT32(magic);
- DESERIALIZE_INT16(version);
- DESERIALIZE_INT16(tmp);
- DESERIALIZE_INT64(timelineID);
- DESERIALIZE_INT64(syncGroupID);
- packetType = static_cast<TimeServicePacketType>(tmp);
- return offset;
-}
-
-ssize_t TimeServicePacketHeader::serializePacket(uint8_t* data,
- uint32_t length) {
- ssize_t ret, tmp;
-
- ret = serializeHeader(data, length);
- if (ret < 0)
- return ret;
-
- data += ret;
- length -= ret;
-
- switch (packetType) {
- case TIME_PACKET_WHO_IS_MASTER_REQUEST:
- tmp =((WhoIsMasterRequestPacket*)(this))->serializePacket(data,
- length);
- break;
- case TIME_PACKET_WHO_IS_MASTER_RESPONSE:
- tmp =((WhoIsMasterResponsePacket*)(this))->serializePacket(data,
- length);
- break;
- case TIME_PACKET_SYNC_REQUEST:
- tmp =((SyncRequestPacket*)(this))->serializePacket(data, length);
- break;
- case TIME_PACKET_SYNC_RESPONSE:
- tmp =((SyncResponsePacket*)(this))->serializePacket(data, length);
- break;
- case TIME_PACKET_MASTER_ANNOUNCEMENT:
- tmp =((MasterAnnouncementPacket*)(this))->serializePacket(data,
- length);
- break;
- default:
- return -1;
- }
-
- if (tmp < 0)
- return tmp;
-
- return ret + tmp;
-}
-
-ssize_t UniversalTimeServicePacket::deserializePacket(
- const uint8_t* data,
- uint32_t length,
- uint64_t expectedSyncGroupID) {
- ssize_t ret;
- TimeServicePacketHeader* header;
- if (length < 8)
- return -1;
-
- packetType = ntohs(*((uint16_t*)(data + 6)));
- switch (packetType) {
- case TIME_PACKET_WHO_IS_MASTER_REQUEST:
- ret = p.who_is_master_request.deserializePacket(data, length);
- header = &p.who_is_master_request;
- break;
- case TIME_PACKET_WHO_IS_MASTER_RESPONSE:
- ret = p.who_is_master_response.deserializePacket(data, length);
- header = &p.who_is_master_response;
- break;
- case TIME_PACKET_SYNC_REQUEST:
- ret = p.sync_request.deserializePacket(data, length);
- header = &p.sync_request;
- break;
- case TIME_PACKET_SYNC_RESPONSE:
- ret = p.sync_response.deserializePacket(data, length);
- header = &p.sync_response;
- break;
- case TIME_PACKET_MASTER_ANNOUNCEMENT:
- ret = p.master_announcement.deserializePacket(data, length);
- header = &p.master_announcement;
- break;
- default:
- return -1;
- }
-
- if ((ret >= 0) && !header->checkPacket(expectedSyncGroupID))
- ret = -1;
-
- return ret;
-}
-
-ssize_t WhoIsMasterRequestPacket::serializePacket(uint8_t* data,
- uint32_t length) {
- ssize_t offset = serializeHeader(data, length);
- if (offset > 0) {
- uint64_t packed = packDeviceID(senderDeviceID, senderDevicePriority);
- SERIALIZE_INT64(packed);
- }
- return offset;
-}
-
-ssize_t WhoIsMasterRequestPacket::deserializePacket(const uint8_t* data,
- uint32_t length) {
- ssize_t offset = deserializeHeader(data, length);
- if (offset > 0) {
- uint64_t packed;
- DESERIALIZE_INT64(packed);
- senderDeviceID = unpackDeviceID(packed);
- senderDevicePriority = unpackDevicePriority(packed);
- }
- return offset;
-}
-
-ssize_t WhoIsMasterResponsePacket::serializePacket(uint8_t* data,
- uint32_t length) {
- ssize_t offset = serializeHeader(data, length);
- if (offset > 0) {
- uint64_t packed = packDeviceID(deviceID, devicePriority);
- SERIALIZE_INT64(packed);
- }
- return offset;
-}
-
-ssize_t WhoIsMasterResponsePacket::deserializePacket(const uint8_t* data,
- uint32_t length) {
- ssize_t offset = deserializeHeader(data, length);
- if (offset > 0) {
- uint64_t packed;
- DESERIALIZE_INT64(packed);
- deviceID = unpackDeviceID(packed);
- devicePriority = unpackDevicePriority(packed);
- }
- return offset;
-}
-
-ssize_t SyncRequestPacket::serializePacket(uint8_t* data,
- uint32_t length) {
- ssize_t offset = serializeHeader(data, length);
- if (offset > 0) {
- SERIALIZE_INT64(clientTxLocalTime);
- }
- return offset;
-}
-
-ssize_t SyncRequestPacket::deserializePacket(const uint8_t* data,
- uint32_t length) {
- ssize_t offset = deserializeHeader(data, length);
- if (offset > 0) {
- DESERIALIZE_INT64(clientTxLocalTime);
- }
- return offset;
-}
-
-ssize_t SyncResponsePacket::serializePacket(uint8_t* data,
- uint32_t length) {
- ssize_t offset = serializeHeader(data, length);
- if (offset > 0) {
- SERIALIZE_INT64(clientTxLocalTime);
- SERIALIZE_INT64(masterRxCommonTime);
- SERIALIZE_INT64(masterTxCommonTime);
- SERIALIZE_INT32(nak);
- }
- return offset;
-}
-
-ssize_t SyncResponsePacket::deserializePacket(const uint8_t* data,
- uint32_t length) {
- ssize_t offset = deserializeHeader(data, length);
- if (offset > 0) {
- DESERIALIZE_INT64(clientTxLocalTime);
- DESERIALIZE_INT64(masterRxCommonTime);
- DESERIALIZE_INT64(masterTxCommonTime);
- DESERIALIZE_INT32(nak);
- }
- return offset;
-}
-
-ssize_t MasterAnnouncementPacket::serializePacket(uint8_t* data,
- uint32_t length) {
- ssize_t offset = serializeHeader(data, length);
- if (offset > 0) {
- uint64_t packed = packDeviceID(deviceID, devicePriority);
- SERIALIZE_INT64(packed);
- }
- return offset;
-}
-
-ssize_t MasterAnnouncementPacket::deserializePacket(const uint8_t* data,
- uint32_t length) {
- ssize_t offset = deserializeHeader(data, length);
- if (offset > 0) {
- uint64_t packed;
- DESERIALIZE_INT64(packed);
- deviceID = unpackDeviceID(packed);
- devicePriority = unpackDevicePriority(packed);
- }
- return offset;
-}
-
-} // namespace android
-
diff --git a/libs/common_time/common_time_server_packets.h b/libs/common_time/common_time_server_packets.h
deleted file mode 100644
index 57ba8a2..0000000
--- a/libs/common_time/common_time_server_packets.h
+++ /dev/null
@@ -1,189 +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.
- */
-
-#ifndef ANDROID_COMMON_TIME_SERVER_PACKETS_H
-#define ANDROID_COMMON_TIME_SERVER_PACKETS_H
-
-#include <stdint.h>
-#include <common_time/ICommonClock.h>
-
-namespace android {
-
-/***** time sync protocol packets *****/
-
-enum TimeServicePacketType {
- TIME_PACKET_WHO_IS_MASTER_REQUEST = 1,
- TIME_PACKET_WHO_IS_MASTER_RESPONSE,
- TIME_PACKET_SYNC_REQUEST,
- TIME_PACKET_SYNC_RESPONSE,
- TIME_PACKET_MASTER_ANNOUNCEMENT,
-};
-
-class TimeServicePacketHeader {
- public:
- friend class UniversalTimeServicePacket;
- // magic number identifying the protocol
- uint32_t magic;
-
- // protocol version of the packet
- uint16_t version;
-
- // type of the packet
- TimeServicePacketType packetType;
-
- // the timeline ID
- uint64_t timelineID;
-
- // synchronization group this packet belongs to (used to operate multiple
- // synchronization domains which all use the same master election endpoint)
- uint64_t syncGroupID;
-
- ssize_t serializePacket(uint8_t* data, uint32_t length);
-
- protected:
- void initHeader(TimeServicePacketType type,
- const uint64_t tlID,
- const uint64_t groupID) {
- magic = kMagic;
- version = kCurVersion;
- packetType = type;
- timelineID = tlID;
- syncGroupID = groupID;
- }
-
- bool checkPacket(uint64_t expectedSyncGroupID) const {
- return ((magic == kMagic) &&
- (version == kCurVersion) &&
- (!expectedSyncGroupID || (syncGroupID == expectedSyncGroupID)));
- }
-
- ssize_t serializeHeader(uint8_t* data, uint32_t length);
- ssize_t deserializeHeader(const uint8_t* data, uint32_t length);
-
- private:
- static const uint32_t kMagic;
- static const uint16_t kCurVersion;
-};
-
-// packet querying for a suitable master
-class WhoIsMasterRequestPacket : public TimeServicePacketHeader {
- public:
- uint64_t senderDeviceID;
- uint8_t senderDevicePriority;
-
- void initHeader(const uint64_t groupID) {
- TimeServicePacketHeader::initHeader(TIME_PACKET_WHO_IS_MASTER_REQUEST,
- ICommonClock::kInvalidTimelineID,
- groupID);
- }
-
- ssize_t serializePacket(uint8_t* data, uint32_t length);
- ssize_t deserializePacket(const uint8_t* data, uint32_t length);
-};
-
-// response to a WhoIsMaster request
-class WhoIsMasterResponsePacket : public TimeServicePacketHeader {
- public:
- uint64_t deviceID;
- uint8_t devicePriority;
-
- void initHeader(const uint64_t tlID, const uint64_t groupID) {
- TimeServicePacketHeader::initHeader(TIME_PACKET_WHO_IS_MASTER_RESPONSE,
- tlID, groupID);
- }
-
- ssize_t serializePacket(uint8_t* data, uint32_t length);
- ssize_t deserializePacket(const uint8_t* data, uint32_t length);
-};
-
-// packet sent by a client requesting correspondence between local
-// and common time
-class SyncRequestPacket : public TimeServicePacketHeader {
- public:
- // local time when this request was transmitted
- int64_t clientTxLocalTime;
-
- void initHeader(const uint64_t tlID, const uint64_t groupID) {
- TimeServicePacketHeader::initHeader(TIME_PACKET_SYNC_REQUEST,
- tlID, groupID);
- }
-
- ssize_t serializePacket(uint8_t* data, uint32_t length);
- ssize_t deserializePacket(const uint8_t* data, uint32_t length);
-};
-
-// response to a sync request sent by the master
-class SyncResponsePacket : public TimeServicePacketHeader {
- public:
- // local time when this request was transmitted by the client
- int64_t clientTxLocalTime;
-
- // common time when the master received the request
- int64_t masterRxCommonTime;
-
- // common time when the master transmitted the response
- int64_t masterTxCommonTime;
-
- // flag that is set if the recipient of the sync request is not acting
- // as a master for the requested timeline
- uint32_t nak;
-
- void initHeader(const uint64_t tlID, const uint64_t groupID) {
- TimeServicePacketHeader::initHeader(TIME_PACKET_SYNC_RESPONSE,
- tlID, groupID);
- }
-
- ssize_t serializePacket(uint8_t* data, uint32_t length);
- ssize_t deserializePacket(const uint8_t* data, uint32_t length);
-};
-
-// announcement of the master's presence
-class MasterAnnouncementPacket : public TimeServicePacketHeader {
- public:
- // the master's device ID
- uint64_t deviceID;
- uint8_t devicePriority;
-
- void initHeader(const uint64_t tlID, const uint64_t groupID) {
- TimeServicePacketHeader::initHeader(TIME_PACKET_MASTER_ANNOUNCEMENT,
- tlID, groupID);
- }
-
- ssize_t serializePacket(uint8_t* data, uint32_t length);
- ssize_t deserializePacket(const uint8_t* data, uint32_t length);
-};
-
-class UniversalTimeServicePacket {
- public:
- uint16_t packetType;
- union {
- WhoIsMasterRequestPacket who_is_master_request;
- WhoIsMasterResponsePacket who_is_master_response;
- SyncRequestPacket sync_request;
- SyncResponsePacket sync_response;
- MasterAnnouncementPacket master_announcement;
- } p;
-
- ssize_t deserializePacket(const uint8_t* data,
- uint32_t length,
- uint64_t expectedSyncGroupID);
-};
-
-}; // namespace android
-
-#endif // ANDROID_COMMON_TIME_SERVER_PACKETS_H
-
-
diff --git a/libs/common_time/diag_thread.cpp b/libs/common_time/diag_thread.cpp
deleted file mode 100644
index 4cb9551..0000000
--- a/libs/common_time/diag_thread.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#define LOG_TAG "common_time"
-#include <utils/Log.h>
-
-#include <fcntl.h>
-#include <linux/in.h>
-#include <linux/tcp.h>
-#include <poll.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <utils/Errors.h>
-#include <utils/misc.h>
-
-#include <common_time/local_clock.h>
-
-#include "common_clock.h"
-#include "diag_thread.h"
-
-#define kMaxEvents 16
-#define kListenPort 9876
-
-static bool setNonblocking(int fd) {
- int flags = fcntl(fd, F_GETFL);
- if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
- ALOGE("Failed to set socket (%d) to non-blocking mode (errno %d)",
- fd, errno);
- return false;
- }
-
- return true;
-}
-
-static bool setNodelay(int fd) {
- int tmp = 1;
- if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &tmp, sizeof(tmp)) < 0) {
- ALOGE("Failed to set socket (%d) to no-delay mode (errno %d)",
- fd, errno);
- return false;
- }
-
- return true;
-}
-
-namespace android {
-
-DiagThread::DiagThread(CommonClock* common_clock, LocalClock* local_clock) {
- common_clock_ = common_clock;
- local_clock_ = local_clock;
- listen_fd_ = -1;
- data_fd_ = -1;
- kernel_logID_basis_known_ = false;
- discipline_log_ID_ = 0;
-}
-
-DiagThread::~DiagThread() {
-}
-
-status_t DiagThread::startWorkThread() {
- status_t res;
- stopWorkThread();
- res = run("Diag");
-
- if (res != OK)
- ALOGE("Failed to start work thread (res = %d)", res);
-
- return res;
-}
-
-void DiagThread::stopWorkThread() {
- status_t res;
- res = requestExitAndWait(); // block until thread exit.
- if (res != OK)
- ALOGE("Failed to stop work thread (res = %d)", res);
-}
-
-bool DiagThread::openListenSocket() {
- bool ret = false;
- int flags;
- cleanupListenSocket();
-
- if ((listen_fd_ = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
- ALOGE("Socket failed.");
- goto bailout;
- }
-
- // Set non-blocking operation
- if (!setNonblocking(listen_fd_))
- goto bailout;
-
- struct sockaddr_in addr;
- memset(&addr, 0, sizeof(addr));
- addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = INADDR_ANY;
- addr.sin_port = htons(kListenPort);
-
- if (bind(listen_fd_, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
- ALOGE("Bind failed.");
- goto bailout;
- }
-
- if (listen(listen_fd_, 1) < 0) {
- ALOGE("Listen failed.");
- goto bailout;
- }
-
- ret = true;
-bailout:
- if (!ret)
- cleanupListenSocket();
-
- return ret;
-}
-
-void DiagThread::cleanupListenSocket() {
- if (listen_fd_ >= 0) {
- int res;
-
- struct linger l;
- l.l_onoff = 1;
- l.l_linger = 0;
-
- setsockopt(listen_fd_, SOL_SOCKET, SO_LINGER, &l, sizeof(l));
- shutdown(listen_fd_, SHUT_RDWR);
- close(listen_fd_);
- listen_fd_ = -1;
- }
-}
-
-void DiagThread::cleanupDataSocket() {
- if (data_fd_ >= 0) {
- int res;
-
- struct linger l;
- l.l_onoff = 1;
- l.l_linger = 0;
-
- setsockopt(data_fd_, SOL_SOCKET, SO_LINGER, &l, sizeof(l));
- shutdown(data_fd_, SHUT_RDWR);
- close(data_fd_);
- data_fd_ = -1;
- }
-}
-
-void DiagThread::resetLogIDs() {
- // Drain and discard all of the events from the kernel
- struct local_time_debug_event events[kMaxEvents];
- while(local_clock_->getDebugLog(events, kMaxEvents) > 0)
- ;
-
- {
- Mutex::Autolock lock(&discipline_log_lock_);
- discipline_log_.clear();
- discipline_log_ID_ = 0;
- }
-
- kernel_logID_basis_known_ = false;
-}
-
-void DiagThread::pushDisciplineEvent(int64_t observed_local_time,
- int64_t observed_common_time,
- int64_t nominal_common_time,
- int32_t total_correction,
- int32_t rtt) {
- Mutex::Autolock lock(&discipline_log_lock_);
-
- DisciplineEventRecord evt;
-
- evt.event_id = discipline_log_ID_++;
-
- evt.action_local_time = local_clock_->getLocalTime();
- common_clock_->localToCommon(evt.action_local_time,
- &evt.action_common_time);
-
- evt.observed_local_time = observed_local_time;
- evt.observed_common_time = observed_common_time;
- evt.nominal_common_time = nominal_common_time;
- evt.total_correction = total_correction;
- evt.rtt = rtt;
-
- discipline_log_.push_back(evt);
- while (discipline_log_.size() > kMaxDisciplineLogSize)
- discipline_log_.erase(discipline_log_.begin());
-}
-
-bool DiagThread::threadLoop() {
- struct pollfd poll_fds[1];
-
- if (!openListenSocket()) {
- ALOGE("Failed to open listen socket");
- goto bailout;
- }
-
- while (!exitPending()) {
- memset(&poll_fds, 0, sizeof(poll_fds));
-
- if (data_fd_ < 0) {
- poll_fds[0].fd = listen_fd_;
- poll_fds[0].events = POLLIN;
- } else {
- poll_fds[0].fd = data_fd_;
- poll_fds[0].events = POLLRDHUP | POLLIN;
- }
-
- int poll_res = poll(poll_fds, NELEM(poll_fds), 50);
- if (poll_res < 0) {
- ALOGE("Fatal error (%d,%d) while waiting on events",
- poll_res, errno);
- goto bailout;
- }
-
- if (exitPending())
- break;
-
- if (poll_fds[0].revents) {
- if (poll_fds[0].fd == listen_fd_) {
- data_fd_ = accept(listen_fd_, NULL, NULL);
-
- if (data_fd_ < 0) {
- ALOGW("Failed accept on socket %d with err %d",
- listen_fd_, errno);
- } else {
- if (!setNonblocking(data_fd_))
- cleanupDataSocket();
- if (!setNodelay(data_fd_))
- cleanupDataSocket();
- }
- } else
- if (poll_fds[0].fd == data_fd_) {
- if (poll_fds[0].revents & POLLRDHUP) {
- // Connection hung up; time to clean up.
- cleanupDataSocket();
- } else
- if (poll_fds[0].revents & POLLIN) {
- uint8_t cmd;
- if (read(data_fd_, &cmd, sizeof(cmd)) > 0) {
- switch(cmd) {
- case 'r':
- case 'R':
- resetLogIDs();
- break;
- }
- }
- }
- }
- }
-
- struct local_time_debug_event events[kMaxEvents];
- int amt = local_clock_->getDebugLog(events, kMaxEvents);
-
- if (amt > 0) {
- for (int i = 0; i < amt; i++) {
- struct local_time_debug_event& e = events[i];
-
- if (!kernel_logID_basis_known_) {
- kernel_logID_basis_ = e.local_timesync_event_id;
- kernel_logID_basis_known_ = true;
- }
-
- char buf[1024];
- int64_t common_time;
- status_t res = common_clock_->localToCommon(e.local_time,
- &common_time);
- snprintf(buf, sizeof(buf), "E,%lld,%lld,%lld,%d\n",
- e.local_timesync_event_id - kernel_logID_basis_,
- e.local_time,
- common_time,
- (OK == res) ? 1 : 0);
- buf[sizeof(buf) - 1] = 0;
-
- if (data_fd_ >= 0)
- write(data_fd_, buf, strlen(buf));
- }
- }
-
- { // scope for autolock pattern
- Mutex::Autolock lock(&discipline_log_lock_);
-
- while (discipline_log_.size() > 0) {
- char buf[1024];
- DisciplineEventRecord& e = *discipline_log_.begin();
- snprintf(buf, sizeof(buf),
- "D,%lld,%lld,%lld,%lld,%lld,%lld,%d,%d\n",
- e.event_id,
- e.action_local_time,
- e.action_common_time,
- e.observed_local_time,
- e.observed_common_time,
- e.nominal_common_time,
- e.total_correction,
- e.rtt);
- buf[sizeof(buf) - 1] = 0;
-
- if (data_fd_ >= 0)
- write(data_fd_, buf, strlen(buf));
-
- discipline_log_.erase(discipline_log_.begin());
- }
- }
- }
-
-bailout:
- cleanupDataSocket();
- cleanupListenSocket();
- return false;
-}
-
-} // namespace android
diff --git a/libs/common_time/diag_thread.h b/libs/common_time/diag_thread.h
deleted file mode 100644
index c630e0d..0000000
--- a/libs/common_time/diag_thread.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#ifndef __DIAG_THREAD_H__
-#define __DIAG_THREAD_H__
-
-#include <utils/List.h>
-#include <utils/threads.h>
-
-namespace android {
-
-class CommonClock;
-class LocalClock;
-
-class DiagThread : public Thread {
- public:
- DiagThread(CommonClock* common_clock, LocalClock* local_clock);
- ~DiagThread();
-
- status_t startWorkThread();
- void stopWorkThread();
- virtual bool threadLoop();
-
- void pushDisciplineEvent(int64_t observed_local_time,
- int64_t observed_common_time,
- int64_t nominal_common_time,
- int32_t total_correction,
- int32_t rtt);
-
- private:
- typedef struct {
- int64_t event_id;
- int64_t action_local_time;
- int64_t action_common_time;
- int64_t observed_local_time;
- int64_t observed_common_time;
- int64_t nominal_common_time;
- int32_t total_correction;
- int32_t rtt;
- } DisciplineEventRecord;
-
- bool openListenSocket();
- void cleanupListenSocket();
- void cleanupDataSocket();
- void resetLogIDs();
-
- CommonClock* common_clock_;
- LocalClock* local_clock_;
- int listen_fd_;
- int data_fd_;
-
- int64_t kernel_logID_basis_;
- bool kernel_logID_basis_known_;
-
- static const size_t kMaxDisciplineLogSize = 16;
- Mutex discipline_log_lock_;
- List<DisciplineEventRecord> discipline_log_;
- int64_t discipline_log_ID_;
-};
-
-} // namespace android
-
-#endif //__ DIAG_THREAD_H__
diff --git a/libs/common_time/main.cpp b/libs/common_time/main.cpp
deleted file mode 100644
index ac52c85..0000000
--- a/libs/common_time/main.cpp
+++ /dev/null
@@ -1,43 +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.
- */
-
-/*
- * A service that exchanges time synchronization information between
- * a master that defines a timeline and clients that follow the timeline.
- */
-
-#define LOG_TAG "common_time"
-#include <utils/Log.h>
-
-#include <binder/IPCThreadState.h>
-#include <binder/ProcessState.h>
-
-#include "common_time_server.h"
-
-int main() {
- using namespace android;
-
- sp<CommonTimeServer> service = new CommonTimeServer();
- if (service == NULL)
- return 1;
-
- ProcessState::self()->startThreadPool();
- service->run("CommonTimeServer", ANDROID_PRIORITY_NORMAL);
-
- IPCThreadState::self()->joinThreadPool();
- return 0;
-}
-
diff --git a/libs/common_time/utils.cpp b/libs/common_time/utils.cpp
deleted file mode 100644
index ddcdfe7..0000000
--- a/libs/common_time/utils.cpp
+++ /dev/null
@@ -1,164 +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.
- */
-
-#define LOG_TAG "common_time"
-#include <utils/Log.h>
-
-#include "utils.h"
-
-namespace android {
-
-void Timeout::setTimeout(int msec) {
- if (msec < 0) {
- mSystemEndTime = 0;
- return;
- }
-
- mSystemEndTime = systemTime() + (static_cast<nsecs_t>(msec) * 1000000);
-}
-
-int Timeout::msecTillTimeout(nsecs_t nowTime) {
- if (!mSystemEndTime) {
- return -1;
- }
-
- if (mSystemEndTime < nowTime) {
- return 0;
- }
-
- nsecs_t delta = mSystemEndTime - nowTime;
- delta += 999999;
- delta /= 1000000;
- if (delta > 0x7FFFFFFF) {
- return 0x7FFFFFFF;
- }
-
- return static_cast<int>(delta);
-}
-
-LogRing::LogRing(const char* header, size_t entries)
- : mSize(entries)
- , mWr(0)
- , mIsFull(false)
- , mHeader(header) {
- mRingBuffer = new Entry[mSize];
- if (NULL == mRingBuffer)
- ALOGE("Failed to allocate log ring with %zu entries.", mSize);
-}
-
-LogRing::~LogRing() {
- if (NULL != mRingBuffer)
- delete[] mRingBuffer;
-}
-
-void LogRing::log(int prio, const char* tag, const char* fmt, ...) {
- va_list argp;
- va_start(argp, fmt);
- internalLog(prio, tag, fmt, argp);
- va_end(argp);
-}
-
-void LogRing::log(const char* fmt, ...) {
- va_list argp;
- va_start(argp, fmt);
- internalLog(0, NULL, fmt, argp);
- va_end(argp);
-}
-
-void LogRing::internalLog(int prio,
- const char* tag,
- const char* fmt,
- va_list argp) {
- if (NULL != mRingBuffer) {
- Mutex::Autolock lock(&mLock);
- String8 s(String8::formatV(fmt, argp));
- Entry* last = NULL;
-
- if (mIsFull || mWr)
- last = &(mRingBuffer[(mWr + mSize - 1) % mSize]);
-
-
- if ((NULL != last) && !last->s.compare(s)) {
- gettimeofday(&(last->last_ts), NULL);
- ++last->count;
- } else {
- gettimeofday(&mRingBuffer[mWr].first_ts, NULL);
- mRingBuffer[mWr].last_ts = mRingBuffer[mWr].first_ts;
- mRingBuffer[mWr].count = 1;
- mRingBuffer[mWr].s.setTo(s);
-
- mWr = (mWr + 1) % mSize;
- if (!mWr)
- mIsFull = true;
- }
- }
-
- if (NULL != tag)
- LOG_PRI_VA(prio, tag, fmt, argp);
-}
-
-void LogRing::dumpLog(int fd) {
- if (NULL == mRingBuffer)
- return;
-
- Mutex::Autolock lock(&mLock);
-
- if (!mWr && !mIsFull)
- return;
-
- char buf[1024];
- int res;
- size_t start = mIsFull ? mWr : 0;
- size_t count = mIsFull ? mSize : mWr;
- static const char* kTimeFmt = "%a %b %d %Y %H:%M:%S";
-
- res = snprintf(buf, sizeof(buf), "\n%s\n", mHeader);
- if (res > 0)
- write(fd, buf, res);
-
- for (size_t i = 0; i < count; ++i) {
- struct tm t;
- char timebuf[64];
- char repbuf[96];
- size_t ndx = (start + i) % mSize;
-
- if (1 != mRingBuffer[ndx].count) {
- localtime_r(&mRingBuffer[ndx].last_ts.tv_sec, &t);
- strftime(timebuf, sizeof(timebuf), kTimeFmt, &t);
- snprintf(repbuf, sizeof(repbuf),
- " (repeated %d times, last was %s.%03ld)",
- mRingBuffer[ndx].count,
- timebuf,
- mRingBuffer[ndx].last_ts.tv_usec / 1000);
- repbuf[sizeof(repbuf) - 1] = 0;
- } else {
- repbuf[0] = 0;
- }
-
- localtime_r(&mRingBuffer[ndx].first_ts.tv_sec, &t);
- strftime(timebuf, sizeof(timebuf), kTimeFmt, &t);
- res = snprintf(buf, sizeof(buf), "[%2zu] %s.%03ld :: %s%s\n",
- i, timebuf,
- mRingBuffer[ndx].first_ts.tv_usec / 1000,
- mRingBuffer[ndx].s.string(),
- repbuf);
-
- if (res > 0)
- write(fd, buf, res);
- }
-}
-
-} // namespace android
diff --git a/libs/common_time/utils.h b/libs/common_time/utils.h
deleted file mode 100644
index c28cf0a..0000000
--- a/libs/common_time/utils.h
+++ /dev/null
@@ -1,83 +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.
- */
-
-#ifndef __UTILS_H__
-#define __UTILS_H__
-
-#include <stdint.h>
-#include <unistd.h>
-
-#include <utils/String8.h>
-#include <utils/threads.h>
-#include <utils/Timers.h>
-
-namespace android {
-
-class Timeout {
- public:
- Timeout() : mSystemEndTime(0) { }
-
- // Set a timeout which should occur msec milliseconds from now.
- // Negative values will cancel any current timeout;
- void setTimeout(int msec);
-
- // Return the number of milliseconds until the timeout occurs, or -1 if
- // no timeout is scheduled.
- int msecTillTimeout(nsecs_t nowTime);
- int msecTillTimeout() { return msecTillTimeout(systemTime()); }
-
- private:
- // The systemTime() at which the timeout will be complete, or 0 if no
- // timeout is currently scheduled.
- nsecs_t mSystemEndTime;
-};
-
-class LogRing {
- public:
- LogRing(const char* header, size_t entries);
- ~LogRing();
-
- // Send a log message to logcat as well as storing it in the ring buffer.
- void log(int prio, const char* tag, const char* fmt, ...);
-
- // Add a log message the ring buffer, do not send the message to logcat.
- void log(const char* fmt, ...);
-
- // Dump the log to an fd (dumpsys style)
- void dumpLog(int fd);
-
- private:
- class Entry {
- public:
- uint32_t count;
- struct timeval first_ts;
- struct timeval last_ts;
- String8 s;
- };
-
- Mutex mLock;
- Entry* mRingBuffer;
- size_t mSize;
- size_t mWr;
- bool mIsFull;
- const char* mHeader;
-
- void internalLog(int prio, const char* tag, const char* fmt, va_list va);
-};
-
-} // namespace android
-
-#endif // __UTILS_H__
diff --git a/libs/hwui/Extensions.cpp b/libs/hwui/Extensions.cpp
index 1e71cb0..69d5130 100644
--- a/libs/hwui/Extensions.cpp
+++ b/libs/hwui/Extensions.cpp
@@ -59,6 +59,7 @@
mHas1BitStencil = extensions.has("GL_OES_stencil1");
mHas4BitStencil = extensions.has("GL_OES_stencil4");
mHasUnpackSubImage = extensions.has("GL_EXT_unpack_subimage");
+ mHasRenderableFloatTexture = extensions.has("GL_OES_texture_half_float");
mHasSRGB = mVersionMajor >= 3 || extensions.has("GL_EXT_sRGB");
mHasSRGBWriteControl = extensions.has("GL_EXT_sRGB_write_control");
diff --git a/libs/hwui/Extensions.h b/libs/hwui/Extensions.h
index 0ecfdb1..7af7f79 100644
--- a/libs/hwui/Extensions.h
+++ b/libs/hwui/Extensions.h
@@ -38,6 +38,9 @@
inline bool hasPixelBufferObjects() const { return mVersionMajor >= 3; }
inline bool hasOcclusionQueries() const { return mVersionMajor >= 3; }
inline bool hasFloatTextures() const { return mVersionMajor >= 3; }
+ inline bool hasRenderableFloatTextures() const {
+ return (mVersionMajor >= 3 && mVersionMinor >= 2) || mHasRenderableFloatTexture;
+ }
inline bool hasSRGB() const { return mHasSRGB; }
inline bool hasSRGBWriteControl() const { return hasSRGB() && mHasSRGBWriteControl; }
inline bool hasLinearBlending() const { return hasSRGB() && mHasLinearBlending; }
@@ -56,6 +59,7 @@
bool mHasSRGB;
bool mHasSRGBWriteControl;
bool mHasLinearBlending;
+ bool mHasRenderableFloatTexture;
int mVersionMajor;
int mVersionMinor;
diff --git a/libs/hwui/OpenGLReadback.cpp b/libs/hwui/OpenGLReadback.cpp
index 2687410..751e203 100644
--- a/libs/hwui/OpenGLReadback.cpp
+++ b/libs/hwui/OpenGLReadback.cpp
@@ -128,7 +128,8 @@
return CopyResult::DestinationInvalid;
}
- if (bitmap->colorType() == kRGBA_F16_SkColorType && !caches.extensions().hasFloatTextures()) {
+ if (bitmap->colorType() == kRGBA_F16_SkColorType &&
+ !caches.extensions().hasRenderableFloatTextures()) {
ALOGW("Can't copy surface into bitmap, RGBA_F16 config is not supported");
return CopyResult::DestinationInvalid;
}
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index b767046..11360a1 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -62,7 +62,7 @@
"uniform mediump vec4 roundRectInnerRectLTWH;\n"
"uniform mediump float roundRectRadius;\n";
const char* gVS_Header_Varyings_HasTexture =
- "varying vec2 outTexCoords;\n";
+ "varying highp vec2 outTexCoords;\n";
const char* gVS_Header_Varyings_HasColors =
"varying vec4 outColors;\n";
const char* gVS_Header_Varyings_HasVertexAlpha =
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 5d7f594..b8815b5 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -295,7 +295,7 @@
// If there's a multi-frameInterval gap we effectively already dropped a frame,
// so consider the queue healthy.
- if (swapA.swapCompletedTime - swapB.swapCompletedTime > frameInterval * 3) {
+ if (std::abs(swapA.swapCompletedTime - swapB.swapCompletedTime) > frameInterval * 3) {
return false;
}
diff --git a/libs/services/include/android/os/DropBoxManager.h b/libs/services/include/android/os/DropBoxManager.h
index 8717178..3449a7b 100644
--- a/libs/services/include/android/os/DropBoxManager.h
+++ b/libs/services/include/android/os/DropBoxManager.h
@@ -57,7 +57,11 @@
// and a handle will be passed to the system process, so no additional permissions
// are required from the system process. Returns NULL if the file can't be opened.
Status addFile(const String16& tag, const string& filename, int flags);
-
+
+ // Create a new Entry from an already opened file. Takes ownership of the
+ // file descriptor.
+ Status addFile(const String16& tag, int fd, int flags);
+
class Entry : public virtual RefBase, public Parcelable {
public:
Entry();
diff --git a/libs/services/src/os/DropBoxManager.cpp b/libs/services/src/os/DropBoxManager.cpp
index bbb45f0..95246a0 100644
--- a/libs/services/src/os/DropBoxManager.cpp
+++ b/libs/services/src/os/DropBoxManager.cpp
@@ -179,7 +179,17 @@
ALOGW("DropboxManager: %s", message.c_str());
return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE, message.c_str());
}
+ return addFile(tag, fd, flags);
+}
+Status
+DropBoxManager::addFile(const String16& tag, int fd, int flags)
+{
+ if (fd == -1) {
+ string message("invalid fd (-1) passed to to addFile");
+ ALOGW("DropboxManager: %s", message.c_str());
+ return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE, message.c_str());
+ }
Entry entry(tag, flags, fd);
return add(entry);
}
@@ -196,4 +206,3 @@
}
}} // namespace android::os
-
diff --git a/location/java/android/location/IFusedProvider.aidl b/location/java/android/location/IFusedProvider.aidl
deleted file mode 100644
index e86ad1a..0000000
--- a/location/java/android/location/IFusedProvider.aidl
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2013 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.location;
-
-import android.hardware.location.IFusedLocationHardware;
-
-/**
- * Interface definition for Location providers that require FLP services.
- * @hide
- */
-oneway interface IFusedProvider {
- /**
- * Provides access to a FusedLocationHardware instance needed for the provider to work.
- *
- * @param instance The FusedLocationHardware available for the provider to use.
- */
- void onFusedLocationHardwareChange(in IFusedLocationHardware instance);
-}
diff --git a/location/lib/Android.bp b/location/lib/Android.bp
new file mode 100644
index 0000000..447195d
--- /dev/null
+++ b/location/lib/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.
+//
+
+java_sdk_library {
+ name: "com.android.location.provider",
+ srcs: ["java/**/*.java"],
+ api_packages: ["com.android.location.provider"],
+}
diff --git a/location/lib/Android.mk b/location/lib/Android.mk
deleted file mode 100644
index 62f5677..0000000
--- a/location/lib/Android.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Copyright (C) 2010 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)
-
-# the library
-# ============================================================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= com.android.location.provider
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- $(call all-subdir-java-files) \
- $(call all-aidl-files-under, java)
-
-include $(BUILD_JAVA_LIBRARY)
-
-
-# ==== com.google.location.xml lib def ========================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := com.android.location.provider.xml
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE_CLASS := ETC
-
-# This will install the file in /system/etc/permissions
-#
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
-
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-
-include $(BUILD_PREBUILT)
diff --git a/location/lib/api/current.txt b/location/lib/api/current.txt
new file mode 100644
index 0000000..1e69f16
--- /dev/null
+++ b/location/lib/api/current.txt
@@ -0,0 +1,47 @@
+package com.android.location.provider {
+
+ public abstract deprecated class FusedProvider {
+ ctor public FusedProvider();
+ method public android.os.IBinder getBinder();
+ }
+
+ public abstract class LocationProviderBase {
+ ctor public LocationProviderBase(java.lang.String, com.android.location.provider.ProviderPropertiesUnbundled);
+ method public android.os.IBinder getBinder();
+ method public abstract void onDisable();
+ method public void onDump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
+ method public abstract void onEnable();
+ method public abstract int onGetStatus(android.os.Bundle);
+ method public abstract long onGetStatusUpdateTime();
+ method public boolean onSendExtraCommand(java.lang.String, android.os.Bundle);
+ method public abstract void onSetRequest(com.android.location.provider.ProviderRequestUnbundled, android.os.WorkSource);
+ method public final void reportLocation(android.location.Location);
+ field public static final java.lang.String EXTRA_NO_GPS_LOCATION = "noGPSLocation";
+ field public static final java.lang.String FUSED_PROVIDER = "fused";
+ }
+
+ public final class LocationRequestUnbundled {
+ method public long getFastestInterval();
+ method public long getInterval();
+ method public int getQuality();
+ method public float getSmallestDisplacement();
+ field public static final int ACCURACY_BLOCK = 102; // 0x66
+ field public static final int ACCURACY_CITY = 104; // 0x68
+ field public static final int ACCURACY_FINE = 100; // 0x64
+ field public static final int POWER_HIGH = 203; // 0xcb
+ field public static final int POWER_LOW = 201; // 0xc9
+ field public static final int POWER_NONE = 200; // 0xc8
+ }
+
+ public final class ProviderPropertiesUnbundled {
+ method public static com.android.location.provider.ProviderPropertiesUnbundled create(boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, int);
+ }
+
+ public final class ProviderRequestUnbundled {
+ method public long getInterval();
+ method public java.util.List<com.android.location.provider.LocationRequestUnbundled> getLocationRequests();
+ method public boolean getReportLocation();
+ }
+
+}
+
diff --git a/location/lib/api/removed.txt b/location/lib/api/removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/location/lib/api/removed.txt
diff --git a/location/lib/api/system-current.txt b/location/lib/api/system-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/location/lib/api/system-current.txt
diff --git a/location/lib/api/system-removed.txt b/location/lib/api/system-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/location/lib/api/system-removed.txt
diff --git a/location/lib/api/test-current.txt b/location/lib/api/test-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/location/lib/api/test-current.txt
diff --git a/location/lib/api/test-removed.txt b/location/lib/api/test-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/location/lib/api/test-removed.txt
diff --git a/location/lib/com.android.location.provider.xml b/location/lib/com.android.location.provider.xml
deleted file mode 100644
index 000e68f..0000000
--- a/location/lib/com.android.location.provider.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<permissions>
- <library name="com.android.location.provider"
- file="/system/framework/com.android.location.provider.jar" />
-</permissions>
diff --git a/location/lib/java/com/android/location/provider/ActivityChangedEvent.java b/location/lib/java/com/android/location/provider/ActivityChangedEvent.java
index c7dfc88..843dd67 100644
--- a/location/lib/java/com/android/location/provider/ActivityChangedEvent.java
+++ b/location/lib/java/com/android/location/provider/ActivityChangedEvent.java
@@ -23,6 +23,7 @@
/**
* A class representing an event for Activity changes.
+ * @hide
*/
public class ActivityChangedEvent {
private final List<ActivityRecognitionEvent> mActivityRecognitionEvents;
diff --git a/location/lib/java/com/android/location/provider/ActivityRecognitionEvent.java b/location/lib/java/com/android/location/provider/ActivityRecognitionEvent.java
index a39cff2..e54dea4 100644
--- a/location/lib/java/com/android/location/provider/ActivityRecognitionEvent.java
+++ b/location/lib/java/com/android/location/provider/ActivityRecognitionEvent.java
@@ -18,6 +18,7 @@
/**
* A class that represents an Activity Recognition Event.
+ * @hide
*/
public class ActivityRecognitionEvent {
private final String mActivity;
diff --git a/location/lib/java/com/android/location/provider/ActivityRecognitionProvider.java b/location/lib/java/com/android/location/provider/ActivityRecognitionProvider.java
index bc2dae1..0eff7d3 100644
--- a/location/lib/java/com/android/location/provider/ActivityRecognitionProvider.java
+++ b/location/lib/java/com/android/location/provider/ActivityRecognitionProvider.java
@@ -28,6 +28,7 @@
/**
* A class that exposes {@link IActivityRecognitionHardware} functionality to unbundled services.
+ * @hide
*/
public final class ActivityRecognitionProvider {
private final IActivityRecognitionHardware mService;
diff --git a/location/lib/java/com/android/location/provider/ActivityRecognitionProviderClient.java b/location/lib/java/com/android/location/provider/ActivityRecognitionProviderClient.java
index 0b878d7..326d901 100644
--- a/location/lib/java/com/android/location/provider/ActivityRecognitionProviderClient.java
+++ b/location/lib/java/com/android/location/provider/ActivityRecognitionProviderClient.java
@@ -27,6 +27,7 @@
/**
* A client class for interaction with an Activity-Recognition provider.
+ * @hide
*/
public abstract class ActivityRecognitionProviderClient {
private static final String TAG = "ArProviderClient";
diff --git a/location/lib/java/com/android/location/provider/ActivityRecognitionProviderWatcher.java b/location/lib/java/com/android/location/provider/ActivityRecognitionProviderWatcher.java
index 7139025..42f77b4 100644
--- a/location/lib/java/com/android/location/provider/ActivityRecognitionProviderWatcher.java
+++ b/location/lib/java/com/android/location/provider/ActivityRecognitionProviderWatcher.java
@@ -30,6 +30,7 @@
* A watcher class for Activity-Recognition instances.
*
* @deprecated use {@link ActivityRecognitionProviderClient} instead.
+ * @hide
*/
@Deprecated
public class ActivityRecognitionProviderWatcher {
diff --git a/location/lib/java/com/android/location/provider/FusedLocationHardware.java b/location/lib/java/com/android/location/provider/FusedLocationHardware.java
deleted file mode 100644
index eb3b2f4..0000000
--- a/location/lib/java/com/android/location/provider/FusedLocationHardware.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (C) 2013 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 com.android.location.provider;
-
-import android.hardware.location.IFusedLocationHardware;
-import android.hardware.location.IFusedLocationHardwareSink;
-
-import android.location.Location;
-
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.RemoteException;
-import android.util.Log;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Class that exposes IFusedLocationHardware functionality to unbundled services.
- */
-public final class FusedLocationHardware {
- private static final String TAG = "FusedLocationHardware";
-
- private IFusedLocationHardware mLocationHardware;
-
- // the list uses a copy-on-write pattern to update its contents
- HashMap<FusedLocationHardwareSink, DispatcherHandler> mSinkList =
- new HashMap<FusedLocationHardwareSink, DispatcherHandler>();
-
- private IFusedLocationHardwareSink mInternalSink = new IFusedLocationHardwareSink.Stub() {
- @Override
- public void onLocationAvailable(Location[] locations) {
- dispatchLocations(locations);
- }
-
- @Override
- public void onDiagnosticDataAvailable(String data) {
- dispatchDiagnosticData(data);
- }
-
- @Override
- public void onCapabilities(int capabilities) {
- dispatchCapabilities(capabilities);
- }
-
- @Override
- public void onStatusChanged(int status) {
- dispatchStatus(status);
- }
- };
-
- /**
- * @hide
- */
- public FusedLocationHardware(IFusedLocationHardware locationHardware) {
- mLocationHardware = locationHardware;
- }
-
- /*
- * Methods to provide a Facade for IFusedLocationHardware
- */
- public void registerSink(FusedLocationHardwareSink sink, Looper looper) {
- if(sink == null || looper == null) {
- throw new IllegalArgumentException("Parameter sink and looper cannot be null.");
- }
-
- boolean registerSink;
- synchronized (mSinkList) {
- // register only on first insertion
- registerSink = mSinkList.size() == 0;
- // guarantee uniqueness
- if(mSinkList.containsKey(sink)) {
- return;
- }
-
- HashMap<FusedLocationHardwareSink, DispatcherHandler> newSinkList =
- new HashMap<FusedLocationHardwareSink, DispatcherHandler>(mSinkList);
- newSinkList.put(sink, new DispatcherHandler(looper));
- mSinkList = newSinkList;
- }
-
- if(registerSink) {
- try {
- mLocationHardware.registerSink(mInternalSink);
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at registerSink");
- }
- }
- }
-
- public void unregisterSink(FusedLocationHardwareSink sink) {
- if(sink == null) {
- throw new IllegalArgumentException("Parameter sink cannot be null.");
- }
-
- boolean unregisterSink;
- synchronized(mSinkList) {
- if(!mSinkList.containsKey(sink)) {
- //done
- return;
- }
-
- HashMap<FusedLocationHardwareSink, DispatcherHandler> newSinkList =
- new HashMap<FusedLocationHardwareSink, DispatcherHandler>(mSinkList);
- newSinkList.remove(sink);
- //unregister after the last sink
- unregisterSink = newSinkList.size() == 0;
-
- mSinkList = newSinkList;
- }
-
- if(unregisterSink) {
- try {
- mLocationHardware.unregisterSink(mInternalSink);
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at unregisterSink");
- }
- }
- }
-
- public int getSupportedBatchSize() {
- try {
- return mLocationHardware.getSupportedBatchSize();
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at getSupportedBatchSize");
- return 0;
- }
- }
-
- public void startBatching(int id, GmsFusedBatchOptions batchOptions) {
- try {
- mLocationHardware.startBatching(id, batchOptions.getParcelableOptions());
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at startBatching");
- }
- }
-
- public void stopBatching(int id) {
- try {
- mLocationHardware.stopBatching(id);
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at stopBatching");
- }
- }
-
- public void updateBatchingOptions(int id, GmsFusedBatchOptions batchOptions) {
- try {
- mLocationHardware.updateBatchingOptions(id, batchOptions.getParcelableOptions());
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at updateBatchingOptions");
- }
- }
-
- public void requestBatchOfLocations(int batchSizeRequest) {
- try {
- mLocationHardware.requestBatchOfLocations(batchSizeRequest);
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at requestBatchOfLocations");
- }
- }
-
- public void flushBatchedLocations() {
- try {
- mLocationHardware.flushBatchedLocations();
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at flushBatchedLocations");
- }
- }
-
- public boolean supportsDiagnosticDataInjection() {
- try {
- return mLocationHardware.supportsDiagnosticDataInjection();
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at supportsDiagnisticDataInjection");
- return false;
- }
- }
-
- public void injectDiagnosticData(String data) {
- try {
- mLocationHardware.injectDiagnosticData(data);
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at injectDiagnosticData");
- }
- }
-
- public boolean supportsDeviceContextInjection() {
- try {
- return mLocationHardware.supportsDeviceContextInjection();
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at supportsDeviceContextInjection");
- return false;
- }
- }
-
- public void injectDeviceContext(int deviceEnabledContext) {
- try {
- mLocationHardware.injectDeviceContext(deviceEnabledContext);
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at injectDeviceContext");
- }
- }
-
-
- /**
- * Returns the version of the FLP HAL.
- *
- * <p>Version 1 is the initial release.
- * <p>Version 2 adds the ability to use {@link #flushBatchedLocations},
- * {@link FusedLocationHardwareSink#onCapabilities}, and
- * {@link FusedLocationHardwareSink#onStatusChanged}.
- *
- * <p>This method is only available on API 23 or later. Older APIs have version 1.
- */
- public int getVersion() {
- try {
- return mLocationHardware.getVersion();
- } catch(RemoteException e) {
- Log.e(TAG, "RemoteException at getVersion");
- }
- return 1;
- }
-
- /*
- * Helper methods and classes
- */
- private class DispatcherHandler extends Handler {
- public static final int DISPATCH_LOCATION = 1;
- public static final int DISPATCH_DIAGNOSTIC_DATA = 2;
- public static final int DISPATCH_CAPABILITIES = 3;
- public static final int DISPATCH_STATUS = 4;
-
- public DispatcherHandler(Looper looper) {
- super(looper, null /*callback*/ , true /*async*/);
- }
-
- @Override
- public void handleMessage(Message message) {
- MessageCommand command = (MessageCommand) message.obj;
- switch(message.what) {
- case DISPATCH_LOCATION:
- command.dispatchLocation();
- break;
- case DISPATCH_DIAGNOSTIC_DATA:
- command.dispatchDiagnosticData();
- break;
- case DISPATCH_CAPABILITIES:
- command.dispatchCapabilities();
- break;
- case DISPATCH_STATUS:
- command.dispatchStatus();
- break;
- default:
- Log.e(TAG, "Invalid dispatch message");
- break;
- }
- }
- }
-
- private class MessageCommand {
- private final FusedLocationHardwareSink mSink;
- private final Location[] mLocations;
- private final String mData;
- private final int mCapabilities;
- private final int mStatus;
-
- public MessageCommand(
- FusedLocationHardwareSink sink,
- Location[] locations,
- String data,
- int capabilities,
- int status) {
- mSink = sink;
- mLocations = locations;
- mData = data;
- mCapabilities = capabilities;
- mStatus = status;
- }
-
- public void dispatchLocation() {
- mSink.onLocationAvailable(mLocations);
- }
-
- public void dispatchDiagnosticData() {
- mSink.onDiagnosticDataAvailable(mData);
- }
-
- public void dispatchCapabilities() {
- mSink.onCapabilities(mCapabilities);
- }
-
- public void dispatchStatus() {
- mSink.onStatusChanged(mStatus);
- }
- }
-
- private void dispatchLocations(Location[] locations) {
- HashMap<FusedLocationHardwareSink, DispatcherHandler> sinks;
- synchronized (mSinkList) {
- sinks = mSinkList;
- }
-
- for(Map.Entry<FusedLocationHardwareSink, DispatcherHandler> entry : sinks.entrySet()) {
- Message message = Message.obtain(
- entry.getValue(),
- DispatcherHandler.DISPATCH_LOCATION,
- new MessageCommand(entry.getKey(), locations, null /*data*/, 0, 0));
- message.sendToTarget();
- }
- }
-
- private void dispatchDiagnosticData(String data) {
- HashMap<FusedLocationHardwareSink, DispatcherHandler> sinks;
- synchronized(mSinkList) {
- sinks = mSinkList;
- }
-
- for(Map.Entry<FusedLocationHardwareSink, DispatcherHandler> entry : sinks.entrySet()) {
- Message message = Message.obtain(
- entry.getValue(),
- DispatcherHandler.DISPATCH_DIAGNOSTIC_DATA,
- new MessageCommand(entry.getKey(), null /*locations*/, data, 0, 0));
- message.sendToTarget();
- }
- }
-
- private void dispatchCapabilities(int capabilities) {
- HashMap<FusedLocationHardwareSink, DispatcherHandler> sinks;
- synchronized(mSinkList) {
- sinks = mSinkList;
- }
-
- for(Map.Entry<FusedLocationHardwareSink, DispatcherHandler> entry : sinks.entrySet()) {
- Message message = Message.obtain(
- entry.getValue(),
- DispatcherHandler.DISPATCH_CAPABILITIES,
- new MessageCommand(entry.getKey(), null /*locations*/, null, capabilities, 0));
- message.sendToTarget();
- }
- }
-
- private void dispatchStatus(int status) {
- HashMap<FusedLocationHardwareSink, DispatcherHandler> sinks;
- synchronized(mSinkList) {
- sinks = mSinkList;
- }
-
- for(Map.Entry<FusedLocationHardwareSink, DispatcherHandler> entry : sinks.entrySet()) {
- Message message = Message.obtain(
- entry.getValue(),
- DispatcherHandler.DISPATCH_STATUS,
- new MessageCommand(entry.getKey(), null /*locations*/, null, 0, status));
- message.sendToTarget();
- }
- }
-}
diff --git a/location/lib/java/com/android/location/provider/FusedLocationHardwareSink.java b/location/lib/java/com/android/location/provider/FusedLocationHardwareSink.java
deleted file mode 100644
index 01d37ac..0000000
--- a/location/lib/java/com/android/location/provider/FusedLocationHardwareSink.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2013 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 com.android.location.provider;
-
-import android.location.Location;
-
-/**
- * Base class for sinks to interact with FusedLocationHardware.
- *
- * <p>Default implementations allow new methods to be added without crashing
- * clients compiled against an old library version.
- */
-public class FusedLocationHardwareSink {
- /**
- * Called when one or more locations are available from the FLP
- * HAL.
- */
- public void onLocationAvailable(Location[] locations) {
- // default do nothing
- }
-
- /**
- * Called when diagnostic data is available from the FLP HAL.
- */
- public void onDiagnosticDataAvailable(String data) {
- // default do nothing
- }
-
- /**
- * Called when capabilities are available from the FLP HAL.
- * Should be called once right after initialization.
- *
- * @param capabilities A bitmask of capabilities defined in
- * fused_location.h.
- */
- public void onCapabilities(int capabilities) {
- // default do nothing
- }
-
- /**
- * Called when the status changes in the underlying FLP HAL
- * implementation (the ability to compute location). This
- * callback will only be made on version 2 or later
- * (see {@link FusedLocationHardware#getVersion()}).
- *
- * @param status One of FLP_STATUS_LOCATION_AVAILABLE or
- * FLP_STATUS_LOCATION_UNAVAILABLE as defined in
- * fused_location.h.
- */
- public void onStatusChanged(int status) {
- // default do nothing
- }
-}
\ No newline at end of file
diff --git a/location/lib/java/com/android/location/provider/FusedProvider.java b/location/lib/java/com/android/location/provider/FusedProvider.java
index c966ade..78a593b 100644
--- a/location/lib/java/com/android/location/provider/FusedProvider.java
+++ b/location/lib/java/com/android/location/provider/FusedProvider.java
@@ -16,8 +16,6 @@
package com.android.location.provider;
-import android.hardware.location.IFusedLocationHardware;
-import android.location.IFusedProvider;
import android.os.IBinder;
/**
@@ -26,17 +24,12 @@
* <p>Fused providers can be implemented as services and return the result of
* {@link com.android.location.provider.FusedProvider#getBinder()} in its getBinder() method.
*
- * <p>IMPORTANT: This class is effectively a public API for unbundled applications, and must remain
- * API stable. See README.txt in the root of this package for more information.
+ * @deprecated This class should no longer be used. The location service does not uses this.
+ * This class exist here just to prevent existing apps having reference to this class from
+ * breaking.
*/
+@Deprecated
public abstract class FusedProvider {
- private IFusedProvider.Stub mProvider = new IFusedProvider.Stub() {
- @Override
- public void onFusedLocationHardwareChange(IFusedLocationHardware instance) {
- setFusedLocationHardware(new FusedLocationHardware(instance));
- }
- };
-
/**
* Gets the Binder associated with the provider.
* This is intended to be used for the onBind() method of a service that implements a fused
@@ -45,13 +38,6 @@
* @return The IBinder instance associated with the provider.
*/
public IBinder getBinder() {
- return mProvider;
+ return null;
}
-
- /**
- * Sets the FusedLocationHardware instance in the provider..
- * @param value The instance to set. This can be null in cases where the service connection
- * is disconnected.
- */
- public abstract void setFusedLocationHardware(FusedLocationHardware value);
}
diff --git a/location/lib/java/com/android/location/provider/GeocodeProvider.java b/location/lib/java/com/android/location/provider/GeocodeProvider.java
index d7a34af..f7f3d82 100644
--- a/location/lib/java/com/android/location/provider/GeocodeProvider.java
+++ b/location/lib/java/com/android/location/provider/GeocodeProvider.java
@@ -33,6 +33,7 @@
* <p>IMPORTANT: This class is effectively a public API for unbundled
* applications, and must remain API stable. See README.txt in the root
* of this package for more information.
+ * @hide
*/
public abstract class GeocodeProvider {
diff --git a/location/lib/java/com/android/location/provider/GeofenceProvider.java b/location/lib/java/com/android/location/provider/GeofenceProvider.java
index fafaa84..43690ab 100644
--- a/location/lib/java/com/android/location/provider/GeofenceProvider.java
+++ b/location/lib/java/com/android/location/provider/GeofenceProvider.java
@@ -31,6 +31,7 @@
* <p>IMPORTANT: This class is effectively a public API for unbundled
* applications, and must remain API stable. See README.txt in the root
* of this package for more information.
+ * @hide
*/
public abstract class GeofenceProvider {
diff --git a/location/lib/java/com/android/location/provider/GmsFusedBatchOptions.java b/location/lib/java/com/android/location/provider/GmsFusedBatchOptions.java
deleted file mode 100644
index 29818ec..0000000
--- a/location/lib/java/com/android/location/provider/GmsFusedBatchOptions.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2013 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 com.android.location.provider;
-
-import android.location.FusedBatchOptions;
-
-/**
- * Class that exposes FusedBatchOptions to the GmsCore .
- */
-public class GmsFusedBatchOptions {
- private FusedBatchOptions mOptions = new FusedBatchOptions();
-
- /*
- * Methods that provide a facade for properties in FusedBatchOptions.
- */
- public void setMaxPowerAllocationInMW(double value) {
- mOptions.setMaxPowerAllocationInMW(value);
- }
-
- public double getMaxPowerAllocationInMW() {
- return mOptions.getMaxPowerAllocationInMW();
- }
-
- public void setPeriodInNS(long value) {
- mOptions.setPeriodInNS(value);
- }
-
- public long getPeriodInNS() {
- return mOptions.getPeriodInNS();
- }
-
- public void setSmallestDisplacementMeters(float value) {
- mOptions.setSmallestDisplacementMeters(value);
- }
-
- public float getSmallestDisplacementMeters() {
- return mOptions.getSmallestDisplacementMeters();
- }
-
- public void setSourceToUse(int source) {
- mOptions.setSourceToUse(source);
- }
-
- public void resetSourceToUse(int source) {
- mOptions.resetSourceToUse(source);
- }
-
- public boolean isSourceToUseSet(int source) {
- return mOptions.isSourceToUseSet(source);
- }
-
- public int getSourcesToUse() {
- return mOptions.getSourcesToUse();
- }
-
- public void setFlag(int flag) {
- mOptions.setFlag(flag);
- }
-
- public void resetFlag(int flag) {
- mOptions.resetFlag(flag);
- }
-
- public boolean isFlagSet(int flag) {
- return mOptions.isFlagSet(flag);
- }
-
- public int getFlags() {
- return mOptions.getFlags();
- }
-
- /**
- * Definition of enum flag sets needed by this class.
- * Such values need to be kept in sync with the ones in fused_location.h
- */
-
- public static final class SourceTechnologies {
- public static int GNSS = 1<<0;
- public static int WIFI = 1<<1;
- public static int SENSORS = 1<<2;
- public static int CELL = 1<<3;
- public static int BLUETOOTH = 1<<4;
- }
-
- public static final class BatchFlags {
- public static int WAKEUP_ON_FIFO_FULL = 1<<0;
- public static int CALLBACK_ON_LOCATION_FIX = 1<<1;
- }
-
- /*
- * Method definitions for internal use.
- */
-
- /*
- * @hide
- */
- public FusedBatchOptions getParcelableOptions() {
- return mOptions;
- }
-}
diff --git a/location/lib/java/com/android/location/provider/LocationProviderBase.java b/location/lib/java/com/android/location/provider/LocationProviderBase.java
index d717f40..30655f5 100644
--- a/location/lib/java/com/android/location/provider/LocationProviderBase.java
+++ b/location/lib/java/com/android/location/provider/LocationProviderBase.java
@@ -56,6 +56,7 @@
public abstract class LocationProviderBase {
private final String TAG;
+ /** @hide */
protected final ILocationManager mLocationManager;
private final ProviderProperties mProperties;
private final IBinder mBinder;
diff --git a/location/lib/java/com/android/location/provider/ProviderPropertiesUnbundled.java b/location/lib/java/com/android/location/provider/ProviderPropertiesUnbundled.java
index 9ee4df21..b1a1bda 100644
--- a/location/lib/java/com/android/location/provider/ProviderPropertiesUnbundled.java
+++ b/location/lib/java/com/android/location/provider/ProviderPropertiesUnbundled.java
@@ -41,6 +41,7 @@
mProperties = properties;
}
+ /** @hide */
public ProviderProperties getProviderProperties() {
return mProperties;
}
diff --git a/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java b/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java
index ad3d1df..6a8e618 100644
--- a/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java
+++ b/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java
@@ -33,6 +33,7 @@
public final class ProviderRequestUnbundled {
private final ProviderRequest mRequest;
+ /** @hide */
public ProviderRequestUnbundled(ProviderRequest request) {
mRequest = request;
}
diff --git a/location/tests/locationtests/Android.mk b/location/tests/locationtests/Android.mk
index 902cd96..c65f596 100644
--- a/location/tests/locationtests/Android.mk
+++ b/location/tests/locationtests/Android.mk
@@ -9,6 +9,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := FrameworksLocationTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/lowpan/tests/Android.mk b/lowpan/tests/Android.mk
index bb0a944..0042ff9 100644
--- a/lowpan/tests/Android.mk
+++ b/lowpan/tests/Android.mk
@@ -34,10 +34,6 @@
# This only works if the class name matches the file name and the directory structure
# matches the package.
local_classes := $(subst /,.,$(patsubst src/%.java,%,$(local_java_files)))
-# Utility variables to allow replacing a space with a comma
-comma:= ,
-empty:=
-space:= $(empty) $(empty)
# Convert class name list to jacoco exclude list
# This appends a * to all classes and replace the space separators with commas.
# These patterns will match all classes in this module and their inner classes.
@@ -58,6 +54,7 @@
android.test.runner \
LOCAL_PACKAGE_NAME := FrameworksLowpanApiTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 339c767..29d7dee 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -1552,6 +1552,21 @@
}
/**
+ * Broadcast Action: microphone muting state changed.
+ *
+ * You <em>cannot</em> receive this through components declared
+ * in manifests, only by explicitly registering for it with
+ * {@link Context#registerReceiver(BroadcastReceiver, IntentFilter)
+ * Context.registerReceiver()}.
+ *
+ * <p>The intent has no extra values, use {@link #isMicrophoneMute} to check whether the
+ * microphone is muted.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_MICROPHONE_MUTE_CHANGED =
+ "android.media.action.MICROPHONE_MUTE_CHANGED";
+
+ /**
* Sets the audio mode.
* <p>
* The audio mode encompasses audio routing AND the behavior of
@@ -3606,6 +3621,21 @@
}
/**
+ * Indicate Hearing Aid connection state change.
+ * @param device Bluetooth device connected/disconnected
+ * @param state new connection state (BluetoothProfile.STATE_xxx)
+ * {@hide}
+ */
+ public void setHearingAidDeviceConnectionState(BluetoothDevice device, int state) {
+ final IAudioService service = getService();
+ try {
+ service.setHearingAidDeviceConnectionState(device, state);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Indicate A2DP source or sink connection state change.
* @param device Bluetooth device connected/disconnected
* @param state new connection state (BluetoothProfile.STATE_xxx)
@@ -3634,6 +3664,7 @@
* @param device Bluetooth device connected/disconnected
* @param state new connection state (BluetoothProfile.STATE_xxx)
* @param profile profile for the A2DP device
+ * @param a2dpVolume New volume for the connecting device. Does nothing if disconnecting.
* (either {@link android.bluetooth.BluetoothProfile.A2DP} or
* {@link android.bluetooth.BluetoothProfile.A2DP_SINK})
* @param suppressNoisyIntent if true the
@@ -3643,12 +3674,13 @@
* {@hide}
*/
public int setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(
- BluetoothDevice device, int state, int profile, boolean suppressNoisyIntent) {
+ BluetoothDevice device, int state, int profile,
+ boolean suppressNoisyIntent, int a2dpVolume) {
final IAudioService service = getService();
int delay = 0;
try {
delay = service.setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(device,
- state, profile, suppressNoisyIntent);
+ state, profile, suppressNoisyIntent, a2dpVolume);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -4246,8 +4278,7 @@
/**
* The list of {@link AudioDeviceCallback} objects to receive add/remove notifications.
*/
- private ArrayMap<AudioDeviceCallback, NativeEventHandlerDelegate>
- mDeviceCallbacks =
+ private final ArrayMap<AudioDeviceCallback, NativeEventHandlerDelegate> mDeviceCallbacks =
new ArrayMap<AudioDeviceCallback, NativeEventHandlerDelegate>();
/**
@@ -4458,22 +4489,21 @@
calcListDeltas(mPreviousPorts, current_ports, GET_DEVICES_ALL);
AudioDeviceInfo[] removed_devices =
calcListDeltas(current_ports, mPreviousPorts, GET_DEVICES_ALL);
-
if (added_devices.length != 0 || removed_devices.length != 0) {
synchronized (mDeviceCallbacks) {
for (int i = 0; i < mDeviceCallbacks.size(); i++) {
handler = mDeviceCallbacks.valueAt(i).getHandler();
if (handler != null) {
- if (added_devices.length != 0) {
- handler.sendMessage(Message.obtain(handler,
- MSG_DEVICES_DEVICES_ADDED,
- added_devices));
- }
if (removed_devices.length != 0) {
handler.sendMessage(Message.obtain(handler,
MSG_DEVICES_DEVICES_REMOVED,
removed_devices));
}
+ if (added_devices.length != 0) {
+ handler.sendMessage(Message.obtain(handler,
+ MSG_DEVICES_DEVICES_ADDED,
+ added_devices));
+ }
}
}
}
diff --git a/media/java/android/media/AudioPlaybackConfiguration.java b/media/java/android/media/AudioPlaybackConfiguration.java
index 8a36f91..7dfdb20 100644
--- a/media/java/android/media/AudioPlaybackConfiguration.java
+++ b/media/java/android/media/AudioPlaybackConfiguration.java
@@ -43,6 +43,8 @@
/** @hide */
public static final int PLAYER_PIID_INVALID = -1;
/** @hide */
+ public static final int PLAYER_PIID_UNASSIGNED = 0;
+ /** @hide */
public static final int PLAYER_UPID_INVALID = -1;
// information about the implementation
diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl
index 6c65223..d757b81 100644
--- a/media/java/android/media/IAudioService.aidl
+++ b/media/java/android/media/IAudioService.aidl
@@ -143,6 +143,8 @@
void setWiredDeviceConnectionState(int type, int state, String address, String name,
String caller);
+ void setHearingAidDeviceConnectionState(in BluetoothDevice device, int state);
+
int setBluetoothA2dpDeviceConnectionState(in BluetoothDevice device, int state, int profile);
void handleBluetoothA2dpDeviceConfigChange(in BluetoothDevice device);
@@ -204,7 +206,7 @@
oneway void playerHasOpPlayAudio(in int piid, in boolean hasOpPlayAudio);
int setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(in BluetoothDevice device,
- int state, int profile, boolean suppressNoisyIntent);
+ int state, int profile, boolean suppressNoisyIntent, int a2dpVolume);
// WARNING: read warning at top of file, it is recommended to add new methods at the end
}
diff --git a/media/java/android/media/PlayerBase.java b/media/java/android/media/PlayerBase.java
index 09449a1..d8ebd71 100644
--- a/media/java/android/media/PlayerBase.java
+++ b/media/java/android/media/PlayerBase.java
@@ -31,6 +31,7 @@
import android.os.ServiceManager;
import android.util.Log;
+import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.IAppOpsCallback;
import com.android.internal.app.IAppOpsService;
@@ -58,20 +59,29 @@
protected float mRightVolume = 1.0f;
protected float mAuxEffectSendLevel = 0.0f;
- // for AppOps
- private IAppOpsService mAppOps; // may be null
- private IAppOpsCallback mAppOpsCallback;
- private boolean mHasAppOpsPlayAudio = true; // sync'd on mLock
+ // NEVER call into AudioService (see getService()) with mLock held: PlayerBase can run in
+ // the same process as AudioService, which can synchronously call back into this class,
+ // causing deadlocks between the two
private final Object mLock = new Object();
+ // for AppOps
+ private @Nullable IAppOpsService mAppOps;
+ private IAppOpsCallback mAppOpsCallback;
+ @GuardedBy("mLock")
+ private boolean mHasAppOpsPlayAudio = true;
+
private final int mImplType;
// uniquely identifies the Player Interface throughout the system (P I Id)
- private int mPlayerIId;
+ private int mPlayerIId = AudioPlaybackConfiguration.PLAYER_PIID_UNASSIGNED;
- private int mState; // sync'd on mLock
- private int mStartDelayMs = 0; // sync'd on mLock
- private float mPanMultiplierL = 1.0f; // sync'd on mLock
- private float mPanMultiplierR = 1.0f; // sync'd on mLock
+ @GuardedBy("mLock")
+ private int mState;
+ @GuardedBy("mLock")
+ private int mStartDelayMs = 0;
+ @GuardedBy("mLock")
+ private float mPanMultiplierL = 1.0f;
+ @GuardedBy("mLock")
+ private float mPanMultiplierR = 1.0f;
/**
* Constructor. Must be given audio attributes, as they are required for AppOps.
@@ -133,16 +143,24 @@
}
}
+ private void updateState(int state) {
+ final int piid;
+ synchronized (mLock) {
+ mState = state;
+ piid = mPlayerIId;
+ }
+ try {
+ getService().playerEvent(piid, state);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error talking to audio service, "
+ + AudioPlaybackConfiguration.toLogFriendlyPlayerState(state)
+ + " state will not be tracked for piid=" + piid, e);
+ }
+ }
+
void baseStart() {
if (DEBUG) { Log.v(TAG, "baseStart() piid=" + mPlayerIId); }
- try {
- synchronized (mLock) {
- mState = AudioPlaybackConfiguration.PLAYER_STATE_STARTED;
- getService().playerEvent(mPlayerIId, mState);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "Error talking to audio service, STARTED state will not be tracked", e);
- }
+ updateState(AudioPlaybackConfiguration.PLAYER_STATE_STARTED);
synchronized (mLock) {
if (isRestricted_sync()) {
playerSetVolume(true/*muting*/,0, 0);
@@ -164,26 +182,12 @@
void basePause() {
if (DEBUG) { Log.v(TAG, "basePause() piid=" + mPlayerIId); }
- try {
- synchronized (mLock) {
- mState = AudioPlaybackConfiguration.PLAYER_STATE_PAUSED;
- getService().playerEvent(mPlayerIId, mState);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "Error talking to audio service, PAUSED state will not be tracked", e);
- }
+ updateState(AudioPlaybackConfiguration.PLAYER_STATE_PAUSED);
}
void baseStop() {
if (DEBUG) { Log.v(TAG, "baseStop() piid=" + mPlayerIId); }
- try {
- synchronized (mLock) {
- mState = AudioPlaybackConfiguration.PLAYER_STATE_STOPPED;
- getService().playerEvent(mPlayerIId, mState);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "Error talking to audio service, STOPPED state will not be tracked", e);
- }
+ updateState(AudioPlaybackConfiguration.PLAYER_STATE_STOPPED);
}
void baseSetPan(float pan) {
@@ -227,12 +231,16 @@
*/
void baseRelease() {
if (DEBUG) { Log.v(TAG, "baseRelease() piid=" + mPlayerIId + " state=" + mState); }
+ boolean releasePlayer = false;
+ synchronized (mLock) {
+ if (mState != AudioPlaybackConfiguration.PLAYER_STATE_RELEASED) {
+ releasePlayer = true;
+ mState = AudioPlaybackConfiguration.PLAYER_STATE_RELEASED;
+ }
+ }
try {
- synchronized (mLock) {
- if (mState != AudioPlaybackConfiguration.PLAYER_STATE_RELEASED) {
- getService().releasePlayer(mPlayerIId);
- mState = AudioPlaybackConfiguration.PLAYER_STATE_RELEASED;
- }
+ if (releasePlayer) {
+ getService().releasePlayer(mPlayerIId);
}
} catch (RemoteException e) {
Log.e(TAG, "Error talking to audio service, the player will still be tracked", e);
diff --git a/media/java/android/media/RingtoneManager.java b/media/java/android/media/RingtoneManager.java
index 3eb9d52..e3450ee 100644
--- a/media/java/android/media/RingtoneManager.java
+++ b/media/java/android/media/RingtoneManager.java
@@ -33,6 +33,7 @@
import android.media.MediaScannerConnection.MediaScannerConnectionClient;
import android.net.Uri;
import android.os.Environment;
+import android.os.FileUtils;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
import android.os.Process;
@@ -955,7 +956,8 @@
// Find a filename. Throws FileNotFoundException if none can be found.
final File outFile = Utils.getUniqueExternalFile(mContext, subdirectory,
- Utils.getFileDisplayNameFromUri(mContext, fileUri), mimeType);
+ FileUtils.buildValidFatFilename(Utils.getFileDisplayNameFromUri(mContext, fileUri)),
+ mimeType);
// Copy contents to external ringtone storage. Throws IOException if the copy fails.
try (final InputStream input = mContext.getContentResolver().openInputStream(fileUri);
diff --git a/media/lib/remotedisplay/Android.mk b/media/lib/remotedisplay/Android.mk
index ea1ac2b..e88c0f1 100644
--- a/media/lib/remotedisplay/Android.mk
+++ b/media/lib/remotedisplay/Android.mk
@@ -22,9 +22,7 @@
LOCAL_MODULE:= com.android.media.remotedisplay
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, java) \
- $(call all-aidl-files-under, java)
+LOCAL_SRC_FILES := $(call all-java-files-under, java)
include $(BUILD_JAVA_LIBRARY)
diff --git a/media/lib/signer/Android.bp b/media/lib/signer/Android.bp
new file mode 100644
index 0000000..3b25787
--- /dev/null
+++ b/media/lib/signer/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.
+//
+
+java_sdk_library {
+ name: "com.android.mediadrm.signer",
+ srcs: ["java/**/*.java"],
+ api_packages: ["com.android.mediadrm.signer"],
+}
diff --git a/media/lib/signer/Android.mk b/media/lib/signer/Android.mk
deleted file mode 100644
index b0d3177..0000000
--- a/media/lib/signer/Android.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Copyright (C) 2013 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)
-
-# the mediadrm signer library
-# ============================================================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= com.android.mediadrm.signer
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, java) \
- $(call all-aidl-files-under, java)
-
-include $(BUILD_JAVA_LIBRARY)
-
-
-# ==== com.android.mediadrm.signer.xml lib def ========================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := com.android.mediadrm.signer.xml
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE_CLASS := ETC
-
-# This will install the file in /system/etc/permissions
-#
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
-
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-
-include $(BUILD_PREBUILT)
diff --git a/media/lib/signer/api/current.txt b/media/lib/signer/api/current.txt
new file mode 100644
index 0000000..4aa912d
--- /dev/null
+++ b/media/lib/signer/api/current.txt
@@ -0,0 +1,21 @@
+package com.android.mediadrm.signer {
+
+ public final class MediaDrmSigner {
+ method public static com.android.mediadrm.signer.MediaDrmSigner.CertificateRequest getCertificateRequest(android.media.MediaDrm, int, java.lang.String);
+ method public static com.android.mediadrm.signer.MediaDrmSigner.Certificate provideCertificateResponse(android.media.MediaDrm, byte[]) throws android.media.DeniedByServerException;
+ method public static byte[] signRSA(android.media.MediaDrm, byte[], java.lang.String, byte[], byte[]);
+ field public static final int CERTIFICATE_TYPE_X509 = 1; // 0x1
+ }
+
+ public static final class MediaDrmSigner.Certificate {
+ method public byte[] getContent();
+ method public byte[] getWrappedPrivateKey();
+ }
+
+ public static final class MediaDrmSigner.CertificateRequest {
+ method public byte[] getData();
+ method public java.lang.String getDefaultUrl();
+ }
+
+}
+
diff --git a/media/lib/signer/api/removed.txt b/media/lib/signer/api/removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/signer/api/removed.txt
diff --git a/media/lib/signer/api/system-current.txt b/media/lib/signer/api/system-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/signer/api/system-current.txt
diff --git a/media/lib/signer/api/system-removed.txt b/media/lib/signer/api/system-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/signer/api/system-removed.txt
diff --git a/media/lib/signer/api/test-current.txt b/media/lib/signer/api/test-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/signer/api/test-current.txt
diff --git a/media/lib/signer/api/test-removed.txt b/media/lib/signer/api/test-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/signer/api/test-removed.txt
diff --git a/media/lib/signer/com.android.mediadrm.signer.xml b/media/lib/signer/com.android.mediadrm.signer.xml
deleted file mode 100644
index fd3a115..0000000
--- a/media/lib/signer/com.android.mediadrm.signer.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 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.
--->
-
-<permissions>
- <library name="com.android.mediadrm.signer"
- file="/system/framework/com.android.mediadrm.signer.jar" />
-</permissions>
diff --git a/media/lib/tvremote/Android.bp b/media/lib/tvremote/Android.bp
new file mode 100644
index 0000000..5f101a3
--- /dev/null
+++ b/media/lib/tvremote/Android.bp
@@ -0,0 +1,24 @@
+//
+// 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_sdk_library {
+ name: "com.android.media.tv.remoteprovider",
+ srcs: ["java/**/*.java"],
+ api_packages: ["com.android.media.tv.remoteprovider"],
+ dex_preopt: {
+ enabled: false,
+ }
+}
diff --git a/media/lib/tvremote/Android.mk b/media/lib/tvremote/Android.mk
deleted file mode 100644
index 06838c2..0000000
--- a/media/lib/tvremote/Android.mk
+++ /dev/null
@@ -1,48 +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)
-
-# the tvremoteprovider library
-# ============================================================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= com.android.media.tv.remoteprovider
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, java) \
- $(call all-aidl-files-under, java)
-
-LOCAL_DEX_PREOPT := false
-
-include $(BUILD_JAVA_LIBRARY)
-
-
-# ==== com.android.media.tvremote.xml lib def ========================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := com.android.media.tv.remoteprovider.xml
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE_CLASS := ETC
-
-# This will install the file in /system/etc/permissions
-#
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
-
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-
-include $(BUILD_PREBUILT)
\ No newline at end of file
diff --git a/media/lib/tvremote/api/current.txt b/media/lib/tvremote/api/current.txt
new file mode 100644
index 0000000..eea9e9c
--- /dev/null
+++ b/media/lib/tvremote/api/current.txt
@@ -0,0 +1,21 @@
+package com.android.media.tv.remoteprovider {
+
+ public abstract class TvRemoteProvider {
+ ctor public TvRemoteProvider(android.content.Context);
+ method public void clearInputBridge(android.os.IBinder) throws java.lang.RuntimeException;
+ method public void closeInputBridge(android.os.IBinder) throws java.lang.RuntimeException;
+ method public android.os.IBinder getBinder();
+ method public final android.content.Context getContext();
+ method public void onInputBridgeConnected(android.os.IBinder);
+ method public void openRemoteInputBridge(android.os.IBinder, java.lang.String, int, int, int) throws java.lang.RuntimeException;
+ method public void sendKeyDown(android.os.IBinder, int) throws java.lang.RuntimeException;
+ method public void sendKeyUp(android.os.IBinder, int) throws java.lang.RuntimeException;
+ method public void sendPointerDown(android.os.IBinder, int, int, int) throws java.lang.RuntimeException;
+ method public void sendPointerSync(android.os.IBinder) throws java.lang.RuntimeException;
+ method public void sendPointerUp(android.os.IBinder, int) throws java.lang.RuntimeException;
+ method public void sendTimestamp(android.os.IBinder, long) throws java.lang.RuntimeException;
+ field public static final java.lang.String SERVICE_INTERFACE = "com.android.media.tv.remoteprovider.TvRemoteProvider";
+ }
+
+}
+
diff --git a/media/lib/tvremote/api/removed.txt b/media/lib/tvremote/api/removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/tvremote/api/removed.txt
diff --git a/media/lib/tvremote/api/system-current.txt b/media/lib/tvremote/api/system-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/tvremote/api/system-current.txt
diff --git a/media/lib/tvremote/api/system-removed.txt b/media/lib/tvremote/api/system-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/tvremote/api/system-removed.txt
diff --git a/media/lib/tvremote/api/test-current.txt b/media/lib/tvremote/api/test-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/tvremote/api/test-current.txt
diff --git a/media/lib/tvremote/api/test-removed.txt b/media/lib/tvremote/api/test-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media/lib/tvremote/api/test-removed.txt
diff --git a/media/lib/tvremote/com.android.media.tv.remoteprovider.xml b/media/lib/tvremote/com.android.media.tv.remoteprovider.xml
deleted file mode 100644
index dcf479a..0000000
--- a/media/lib/tvremote/com.android.media.tv.remoteprovider.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<permissions>
- <library name="com.android.media.tv.remoteprovider"
- file="/system/framework/com.android.media.tv.remoteprovider.jar" />
-</permissions>
\ No newline at end of file
diff --git a/media/mca/filterfw/Android.bp b/media/mca/filterfw/Android.bp
new file mode 100644
index 0000000..71899cf
--- /dev/null
+++ b/media/mca/filterfw/Android.bp
@@ -0,0 +1,73 @@
+// Copyright (C) 2011 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.
+//
+
+cc_library_shared {
+ name: "libfilterfw",
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ whole_static_libs: [
+ "libfilterfw_jni",
+ "libfilterfw_native",
+ ],
+
+ shared_libs: [
+ "libGLESv2",
+ "libEGL",
+ "libgui",
+ "libdl",
+ "libcutils",
+ "libutils",
+ "liblog",
+ "libandroid",
+ "libjnigraphics",
+ "libmedia",
+ ],
+}
+
+cc_library_static {
+ name: "libfilterfw_jni",
+
+ srcs: [
+ "jni/jni_init.cpp",
+ "jni/jni_gl_environment.cpp",
+ "jni/jni_gl_frame.cpp",
+ "jni/jni_native_buffer.cpp",
+ "jni/jni_native_frame.cpp",
+ "jni/jni_native_program.cpp",
+ "jni/jni_shader_program.cpp",
+ "jni/jni_util.cpp",
+ "jni/jni_vertex_frame.cpp",
+ ],
+
+ local_include_dirs: ["native"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ "-Wno-unused-parameter",
+ ],
+
+ shared_libs: [
+ "libmedia",
+ "libgui",
+ "libandroid",
+ ],
+}
diff --git a/media/mca/filterfw/Android.mk b/media/mca/filterfw/Android.mk
deleted file mode 100644
index 37f1e13..0000000
--- a/media/mca/filterfw/Android.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (C) 2011 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.
-#
-
-#####################
-# Build native sublibraries
-
-include $(all-subdir-makefiles)
-
-#####################
-# Build main libfilterfw
-
-include $(CLEAR_VARS)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-
-LOCAL_MODULE := libfilterfw
-
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_WHOLE_STATIC_LIBRARIES := libfilterfw_jni \
- libfilterfw_native
-
-LOCAL_SHARED_LIBRARIES := \
- libGLESv2 \
- libEGL \
- libgui \
- libdl \
- libcutils \
- libutils \
- liblog \
- libandroid \
- libjnigraphics \
- libmedia
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/media/mca/filterfw/jni/Android.mk b/media/mca/filterfw/jni/Android.mk
deleted file mode 100644
index 9842e70..0000000
--- a/media/mca/filterfw/jni/Android.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (C) 2011 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)
-
-#####################
-# Build module libfilterfw_jni
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE = libfilterfw_jni
-
-LOCAL_SRC_FILES = jni_init.cpp \
- jni_gl_environment.cpp \
- jni_gl_frame.cpp \
- jni_native_buffer.cpp \
- jni_native_frame.cpp \
- jni_native_program.cpp \
- jni_shader_program.cpp \
- jni_util.cpp \
- jni_vertex_frame.cpp
-
-# Need FilterFW lib
-include $(LOCAL_PATH)/../native/libfilterfw.mk
-
-# Also need the JNI headers.
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE) \
- $(LOCAL_PATH)/..
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code -Wno-unused-parameter
-
-LOCAL_SHARED_LIBRARIES := libmedia libgui libandroid
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/media/mca/filterfw/native/Android.bp b/media/mca/filterfw/native/Android.bp
new file mode 100644
index 0000000..7a8a6a1
--- /dev/null
+++ b/media/mca/filterfw/native/Android.bp
@@ -0,0 +1,43 @@
+// Copyright (C) 2011 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.
+//
+
+//####################
+// Build module libfilterfw_static
+
+cc_library_static {
+ name: "libfilterfw_native",
+
+ srcs: [
+ "core/geometry.cpp",
+ "core/gl_env.cpp",
+ "core/gl_frame.cpp",
+ "core/native_frame.cpp",
+ "core/native_program.cpp",
+ "core/shader_program.cpp",
+ "core/vertex_frame.cpp",
+ "core/value.cpp",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+
+ static_libs: ["libarect"],
+
+ shared_libs: ["libgui"],
+}
diff --git a/media/mca/filterfw/native/Android.mk b/media/mca/filterfw/native/Android.mk
deleted file mode 100644
index feaefcb..0000000
--- a/media/mca/filterfw/native/Android.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 2011 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)
-
-#####################
-# Build module libfilterfw_static
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := libfilterfw_native
-
-LOCAL_SRC_FILES += core/geometry.cpp \
- core/gl_env.cpp \
- core/gl_frame.cpp \
- core/native_frame.cpp \
- core/native_program.cpp \
- core/shader_program.cpp \
- core/vertex_frame.cpp \
- core/value.cpp
-
-# add local includes
-include $(LOCAL_PATH)/libfilterfw.mk
-
-# gcc should always be placed at the end.
-LOCAL_EXPORT_LDLIBS := -llog -lgcc
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-LOCAL_STATIC_LIBRARIES := \
- libarect \
-
-LOCAL_SHARED_LIBRARIES += \
- libgui \
-
-# TODO: Build a shared library as well?
-include $(BUILD_STATIC_LIBRARY)
-
diff --git a/media/mca/filterfw/native/libfilterfw.mk b/media/mca/filterfw/native/libfilterfw.mk
deleted file mode 100644
index 69227ce2..0000000
--- a/media/mca/filterfw/native/libfilterfw.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2011 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.
-#
-
-# Add include paths for native code.
-FFW_PATH := $(call my-dir)
-
-# Uncomment the requirements below, once we need them:
-
-# Neven FaceDetect SDK
-#LOCAL_C_INCLUDES += external/neven/FaceRecEm/common/src/b_FDSDK \
-# external/neven/FaceRecEm/common/src \
-# external/neven/Embedded/common/conf \
-# external/neven/Embedded/common/src \
-# external/neven/unix/src
-
-# Finally, add this directory
-LOCAL_C_INCLUDES += $(FFW_PATH)
-
diff --git a/media/mca/filterpacks/Android.bp b/media/mca/filterpacks/Android.bp
new file mode 100644
index 0000000..34fb27d
--- /dev/null
+++ b/media/mca/filterpacks/Android.bp
@@ -0,0 +1,58 @@
+// Copyright (C) 2011 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.
+//
+
+cc_library_static {
+ name: "libfilterpack_base",
+ srcs: [
+ "native/base/geometry.cpp",
+ "native/base/time_util.cpp",
+ ],
+
+ cflags: [
+ "-DANDROID",
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+}
+
+cc_library_shared {
+ name: "libfilterpack_imageproc",
+
+ srcs: [
+ "native/imageproc/brightness.c",
+ "native/imageproc/contrast.c",
+ "native/imageproc/invert.c",
+ "native/imageproc/to_rgba.c",
+ ],
+
+ shared_libs: [
+ "liblog",
+ "libutils",
+ "libfilterfw",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+
+ // Bug: http://b/29823425 Disable constant-conversion warning triggered in
+ // native/imageproc/to_rgba.c
+ "-Wno-constant-conversion",
+ ],
+}
diff --git a/media/mca/filterpacks/Android.mk b/media/mca/filterpacks/Android.mk
deleted file mode 100644
index d89b1e9..0000000
--- a/media/mca/filterpacks/Android.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (C) 2011 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)
-
-##
-# base
-##
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := libfilterpack_base
-LOCAL_SRC_FILES := native/base/geometry.cpp \
- native/base/time_util.cpp
-
-LOCAL_CFLAGS := -DANDROID
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-include $(BUILD_STATIC_LIBRARY)
-
-##
-# filterpack_imageproc
-##
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := libfilterpack_imageproc
-
-LOCAL_SRC_FILES += native/imageproc/brightness.c \
- native/imageproc/contrast.c \
- native/imageproc/invert.c \
- native/imageproc/to_rgba.c
-
-LOCAL_SHARED_LIBRARIES := liblog libutils libfilterfw
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-# Bug: http://b/29823425 Disable constant-conversion warning triggered in
-# native/imageproc/to_rgba.c
-LOCAL_CFLAGS += -Wno-constant-conversion
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/media/mca/samples/CameraEffectsRecordingSample/Android.mk b/media/mca/samples/CameraEffectsRecordingSample/Android.mk
index d3c4336..c81f2fc 100644
--- a/media/mca/samples/CameraEffectsRecordingSample/Android.mk
+++ b/media/mca/samples/CameraEffectsRecordingSample/Android.mk
@@ -23,6 +23,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := CameraEffectsRecordingSample
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/media/mca/tests/Android.mk b/media/mca/tests/Android.mk
index eb451f7..5da07c6 100644
--- a/media/mca/tests/Android.mk
+++ b/media/mca/tests/Android.mk
@@ -11,6 +11,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CameraEffectsTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_INSTRUMENTATION_FOR := CameraEffectsRecordingSample
diff --git a/media/packages/BluetoothMidiService/Android.mk b/media/packages/BluetoothMidiService/Android.mk
index 0565925..6f262bf 100644
--- a/media/packages/BluetoothMidiService/Android.mk
+++ b/media/packages/BluetoothMidiService/Android.mk
@@ -7,6 +7,7 @@
$(call all-java-files-under,src)
LOCAL_PACKAGE_NAME := BluetoothMidiService
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/media/tests/EffectsTest/Android.mk b/media/tests/EffectsTest/Android.mk
index 25b4fe4..a066950 100644
--- a/media/tests/EffectsTest/Android.mk
+++ b/media/tests/EffectsTest/Android.mk
@@ -6,5 +6,6 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := EffectsTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/media/tests/MediaFrameworkTest/Android.mk b/media/tests/MediaFrameworkTest/Android.mk
index 0d9f42b..3c6119e 100644
--- a/media/tests/MediaFrameworkTest/Android.mk
+++ b/media/tests/MediaFrameworkTest/Android.mk
@@ -14,5 +14,6 @@
legacy-android-test
LOCAL_PACKAGE_NAME := mediaframeworktest
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/media/tests/NativeMidiDemo/Android.mk b/media/tests/NativeMidiDemo/Android.mk
index 6b08f6b..316858f 100644
--- a/media/tests/NativeMidiDemo/Android.mk
+++ b/media/tests/NativeMidiDemo/Android.mk
@@ -19,6 +19,7 @@
LOCAL_PACKAGE_NAME := NativeMidiDemo
#LOCAL_SDK_VERSION := current
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_SRC_FILES := $(call all-java-files-under, java)
diff --git a/media/tests/NativeMidiDemo/AndroidManifest.xml b/media/tests/NativeMidiDemo/AndroidManifest.xml
index 322873f..d083105 100644
--- a/media/tests/NativeMidiDemo/AndroidManifest.xml
+++ b/media/tests/NativeMidiDemo/AndroidManifest.xml
@@ -3,12 +3,12 @@
package="com.example.android.nativemididemo"
android:versionCode="1"
android:versionName="1.0">
+ <uses-feature android:name="android.software.midi" android:required="true"/>
<application
android:allowBackup="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
- <uses-feature android:name="android.software.midi" android:required="true"/>
<activity android:name=".NativeMidi"
android:label="@string/app_name">
<intent-filter>
diff --git a/media/tests/ScoAudioTest/Android.mk b/media/tests/ScoAudioTest/Android.mk
index ab12865..2ad91a4 100644
--- a/media/tests/ScoAudioTest/Android.mk
+++ b/media/tests/ScoAudioTest/Android.mk
@@ -2,6 +2,7 @@
include $(CLEAR_VARS)
#LOCAL_SDK_VERSION := current
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
diff --git a/media/tests/SoundPoolTest/Android.mk b/media/tests/SoundPoolTest/Android.mk
index 7f947c0..9ca33c8 100644
--- a/media/tests/SoundPoolTest/Android.mk
+++ b/media/tests/SoundPoolTest/Android.mk
@@ -6,5 +6,6 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := SoundPoolTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/media/tests/audiotests/Android.bp b/media/tests/audiotests/Android.bp
new file mode 100644
index 0000000..8ef7694
--- /dev/null
+++ b/media/tests/audiotests/Android.bp
@@ -0,0 +1,24 @@
+cc_test {
+ name: "shared_mem_test",
+ gtest: false,
+
+ srcs: ["shared_mem_test.cpp"],
+
+ shared_libs: [
+ "liblog",
+ "libcutils",
+ "libutils",
+ "libbinder",
+ "libhardware_legacy",
+ "libmedia",
+ "libaudioclient",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-error=deprecated-declarations",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+}
diff --git a/media/tests/audiotests/Android.mk b/media/tests/audiotests/Android.mk
deleted file mode 100644
index 01e42bd..0000000
--- a/media/tests/audiotests/Android.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= shared_mem_test
-
-LOCAL_SRC_FILES := \
- shared_mem_test.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libc \
- liblog \
- libcutils \
- libutils \
- libbinder \
- libhardware_legacy \
- libmedia \
- libaudioclient \
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_CFLAGS += -Wall -Werror -Wno-error=deprecated-declarations -Wunused -Wunreachable-code
-
-include $(BUILD_EXECUTABLE)
diff --git a/native/android/OWNERS b/native/android/OWNERS
new file mode 100644
index 0000000..11d4be4
--- /dev/null
+++ b/native/android/OWNERS
@@ -0,0 +1,11 @@
+set noparent
+
+per-file libandroid_net.map.txt=ek@google.com
+per-file libandroid_net.map.txt=jchalard@google.com
+per-file libandroid_net.map.txt=lorenzo@google.com
+per-file libandroid_net.map.txt=satk@google.com
+
+per-file net.c=ek@google.com
+per-file net.c=jchalard@google.com
+per-file net.c=lorenzo@google.com
+per-file net.c=satk@google.com
diff --git a/native/android/libandroid.map.txt b/native/android/libandroid.map.txt
index 3d5ee39..65352ed 100644
--- a/native/android/libandroid.map.txt
+++ b/native/android/libandroid.map.txt
@@ -152,7 +152,6 @@
AHardwareBuffer_unlock; # introduced=26
ANativeWindow_acquire;
ANativeWindow_fromSurface;
- ANativeWindow_fromSurfaceTexture; # introduced-arm=13 introduced-mips=13 introduced-x86=13
ANativeWindow_toSurface; # introduced=26
ANativeWindow_getFormat;
ANativeWindow_getHeight;
diff --git a/native/android/storage_manager.cpp b/native/android/storage_manager.cpp
index 137b72cf..bf15b8d 100644
--- a/native/android/storage_manager.cpp
+++ b/native/android/storage_manager.cpp
@@ -21,7 +21,7 @@
#include <binder/Binder.h>
#include <binder/IServiceManager.h>
-#include <utils/Atomic.h>
+#include <cutils/atomic.h>
#include <utils/Log.h>
#include <utils/RefBase.h>
#include <utils/String8.h>
diff --git a/native/graphics/jni/Android.bp b/native/graphics/jni/Android.bp
index d7695ef..ae141be 100644
--- a/native/graphics/jni/Android.bp
+++ b/native/graphics/jni/Android.bp
@@ -34,6 +34,7 @@
arch: {
arm: {
// TODO: This is to work around b/24465209. Remove after root cause is fixed
+ pack_relocations: false,
ldflags: ["-Wl,--hash-style=both"],
},
},
diff --git a/native/webview/loader/Android.bp b/native/webview/loader/Android.bp
new file mode 100644
index 0000000..0ba256f
--- /dev/null
+++ b/native/webview/loader/Android.bp
@@ -0,0 +1,32 @@
+//
+// 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.
+
+// This package provides the system interfaces required to load WebView.
+
+// Loader library which handles address space reservation and relro sharing.
+// Does NOT link any native chromium code.
+cc_library_shared {
+ name: "libwebviewchromium_loader",
+
+ srcs: ["loader.cpp"],
+
+ cflags: ["-Werror"],
+
+ shared_libs: [
+ "libdl",
+ "liblog",
+ "libnativeloader",
+ ],
+}
diff --git a/native/webview/loader/Android.mk b/native/webview/loader/Android.mk
deleted file mode 100644
index e8a7d97..0000000
--- a/native/webview/loader/Android.mk
+++ /dev/null
@@ -1,40 +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.
-
-# This package provides the system interfaces required to load WebView.
-
-LOCAL_PATH := $(call my-dir)
-
-# Loader library which handles address space reservation and relro sharing.
-# Does NOT link any native chromium code.
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= libwebviewchromium_loader
-
-LOCAL_SRC_FILES := \
- loader.cpp \
-
-LOCAL_CFLAGS := \
- -Werror \
-
-LOCAL_SHARED_LIBRARIES += \
- libdl \
- liblog \
- libnativeloader \
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_SHARED_LIBRARY)
-
diff --git a/nfc-extras/Android.bp b/nfc-extras/Android.bp
new file mode 100644
index 0000000..cbacd48
--- /dev/null
+++ b/nfc-extras/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.
+//
+
+java_sdk_library {
+ name: "com.android.nfc_extras",
+ srcs: ["java/**/*.java"],
+ api_packages: ["com.android.nfc_extras"],
+}
diff --git a/nfc-extras/Android.mk b/nfc-extras/Android.mk
deleted file mode 100644
index dc45a50..0000000
--- a/nfc-extras/Android.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-java-files-under, java)
-
-LOCAL_MODULE:= com.android.nfc_extras
-
-include $(BUILD_JAVA_LIBRARY)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/nfc-extras/api/current.txt b/nfc-extras/api/current.txt
new file mode 100644
index 0000000..066b7b5
--- /dev/null
+++ b/nfc-extras/api/current.txt
@@ -0,0 +1,60 @@
+package com.android.nfc_extras {
+
+ public class EeAlreadyOpenException extends com.android.nfc_extras.EeIOException {
+ ctor public EeAlreadyOpenException();
+ ctor public EeAlreadyOpenException(java.lang.String);
+ }
+
+ public class EeExternalFieldException extends com.android.nfc_extras.EeIOException {
+ ctor public EeExternalFieldException();
+ ctor public EeExternalFieldException(java.lang.String);
+ }
+
+ public class EeIOException extends java.io.IOException {
+ ctor public EeIOException();
+ ctor public EeIOException(java.lang.String);
+ }
+
+ public class EeInitializationException extends com.android.nfc_extras.EeIOException {
+ ctor public EeInitializationException();
+ ctor public EeInitializationException(java.lang.String);
+ }
+
+ public class EeListenModeException extends com.android.nfc_extras.EeIOException {
+ ctor public EeListenModeException();
+ ctor public EeListenModeException(java.lang.String);
+ }
+
+ public class EeNfcDisabledException extends com.android.nfc_extras.EeIOException {
+ ctor public EeNfcDisabledException();
+ ctor public EeNfcDisabledException(java.lang.String);
+ }
+
+ public final class NfcAdapterExtras {
+ method public void authenticate(byte[]);
+ method public static com.android.nfc_extras.NfcAdapterExtras get(android.nfc.NfcAdapter);
+ method public com.android.nfc_extras.NfcAdapterExtras.CardEmulationRoute getCardEmulationRoute();
+ method public java.lang.String getDriverName();
+ method public com.android.nfc_extras.NfcExecutionEnvironment getEmbeddedExecutionEnvironment();
+ method public void setCardEmulationRoute(com.android.nfc_extras.NfcAdapterExtras.CardEmulationRoute);
+ field public static final java.lang.String ACTION_RF_FIELD_OFF_DETECTED = "com.android.nfc_extras.action.RF_FIELD_OFF_DETECTED";
+ field public static final java.lang.String ACTION_RF_FIELD_ON_DETECTED = "com.android.nfc_extras.action.RF_FIELD_ON_DETECTED";
+ }
+
+ public static final class NfcAdapterExtras.CardEmulationRoute {
+ ctor public NfcAdapterExtras.CardEmulationRoute(int, com.android.nfc_extras.NfcExecutionEnvironment);
+ field public static final int ROUTE_OFF = 1; // 0x1
+ field public static final int ROUTE_ON_WHEN_SCREEN_ON = 2; // 0x2
+ field public final com.android.nfc_extras.NfcExecutionEnvironment nfcEe;
+ field public final int route;
+ }
+
+ public class NfcExecutionEnvironment {
+ method public void close() throws java.io.IOException;
+ method public void open() throws com.android.nfc_extras.EeIOException;
+ method public byte[] transceive(byte[]) throws java.io.IOException;
+ field public static final java.lang.String ACTION_AID_SELECTED = "com.android.nfc_extras.action.AID_SELECTED";
+ }
+
+}
+
diff --git a/nfc-extras/api/removed.txt b/nfc-extras/api/removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nfc-extras/api/removed.txt
diff --git a/nfc-extras/api/system-current.txt b/nfc-extras/api/system-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nfc-extras/api/system-current.txt
diff --git a/nfc-extras/api/system-removed.txt b/nfc-extras/api/system-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nfc-extras/api/system-removed.txt
diff --git a/nfc-extras/api/test-current.txt b/nfc-extras/api/test-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nfc-extras/api/test-current.txt
diff --git a/nfc-extras/api/test-removed.txt b/nfc-extras/api/test-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nfc-extras/api/test-removed.txt
diff --git a/nfc-extras/com.android.nfc_extras.xml b/nfc-extras/com.android.nfc_extras.xml
deleted file mode 100644
index 370145d..0000000
--- a/nfc-extras/com.android.nfc_extras.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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.
--->
-
-<permissions>
- <library name="com.android.nfc_extras"
- file="/system/framework/com.android.nfc_extras.jar" />
-</permissions>
diff --git a/nfc-extras/tests/Android.mk b/nfc-extras/tests/Android.mk
index d8fe5a6..8bba3ba 100644
--- a/nfc-extras/tests/Android.mk
+++ b/nfc-extras/tests/Android.mk
@@ -19,10 +19,11 @@
LOCAL_MODULE_TAGS := tests
LOCAL_JAVA_LIBRARIES := \
- android.test.runner \
- com.android.nfc_extras
+ android.test.runner.stubs \
+ com.android.nfc_extras.stubs \
+ android.test.base.stubs
-LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
+LOCAL_STATIC_JAVA_LIBRARIES := junit
# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/obex/Android.bp b/obex/Android.bp
new file mode 100644
index 0000000..6558eb3
--- /dev/null
+++ b/obex/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.
+//
+
+java_sdk_library {
+ name: "javax.obex",
+ srcs: ["javax/**/*.java"],
+ api_packages: ["javax.obex"],
+}
diff --git a/obex/Android.mk b/obex/Android.mk
deleted file mode 100644
index e7c1fd3..0000000
--- a/obex/Android.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_MODULE:= javax.obex
-
-include $(BUILD_JAVA_LIBRARY)
-
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_MODULE:= javax.obexstatic
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
\ No newline at end of file
diff --git a/native/webview/Android.mk b/obex/CleanSpec.mk
similarity index 72%
rename from native/webview/Android.mk
rename to obex/CleanSpec.mk
index a2a93d7..c104234 100644
--- a/native/webview/Android.mk
+++ b/obex/CleanSpec.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2017 The Android Open Source Project
+# 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.
@@ -14,6 +14,5 @@
# limitations under the License.
#
-# Include all the makefiles for subdirectories.
-include $(call all-subdir-makefiles)
-
+# runtime lib is renamed from javax.obex.jar to javax.obex.impl.jar
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/javax.obex.jar)
diff --git a/obex/api/current.txt b/obex/api/current.txt
new file mode 100644
index 0000000..1cd562f
--- /dev/null
+++ b/obex/api/current.txt
@@ -0,0 +1,12 @@
+package javax.obex {
+
+ public class ObexPacket {
+ method public static javax.obex.ObexPacket read(java.io.InputStream) throws java.io.IOException;
+ method public static javax.obex.ObexPacket read(int, java.io.InputStream) throws java.io.IOException;
+ field public int mHeaderId;
+ field public int mLength;
+ field public byte[] mPayload;
+ }
+
+}
+
diff --git a/obex/api/removed.txt b/obex/api/removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/obex/api/removed.txt
diff --git a/obex/api/system-current.txt b/obex/api/system-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/obex/api/system-current.txt
diff --git a/obex/api/system-removed.txt b/obex/api/system-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/obex/api/system-removed.txt
diff --git a/obex/api/test-current.txt b/obex/api/test-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/obex/api/test-current.txt
diff --git a/obex/api/test-removed.txt b/obex/api/test-removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/obex/api/test-removed.txt
diff --git a/packages/BackupRestoreConfirmation/Android.mk b/packages/BackupRestoreConfirmation/Android.mk
index b84c07f..532d272 100644
--- a/packages/BackupRestoreConfirmation/Android.mk
+++ b/packages/BackupRestoreConfirmation/Android.mk
@@ -22,6 +22,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := BackupRestoreConfirmation
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/CaptivePortalLogin/Android.mk b/packages/CaptivePortalLogin/Android.mk
index 576debc..8a96b16 100644
--- a/packages/CaptivePortalLogin/Android.mk
+++ b/packages/CaptivePortalLogin/Android.mk
@@ -2,10 +2,12 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
+LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 services.net
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CaptivePortalLogin
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/packages/CaptivePortalLogin/AndroidManifest.xml b/packages/CaptivePortalLogin/AndroidManifest.xml
index f21fd88..9ecaa03 100644
--- a/packages/CaptivePortalLogin/AndroidManifest.xml
+++ b/packages/CaptivePortalLogin/AndroidManifest.xml
@@ -22,8 +22,11 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
+ <uses-permission android:name="android.permission.NETWORK_BYPASS_PRIVATE_DNS" />
+ <uses-permission android:name="android.permission.NETWORK_SETTINGS" />
- <application android:label="@string/app_name" >
+ <application android:label="@string/app_name"
+ android:usesCleartextTraffic="true">
<activity
android:name="com.android.captiveportallogin.CaptivePortalLoginActivity"
android:label="@string/action_bar_label"
diff --git a/packages/CaptivePortalLogin/OWNERS b/packages/CaptivePortalLogin/OWNERS
index 6f77e04..ce50558 100644
--- a/packages/CaptivePortalLogin/OWNERS
+++ b/packages/CaptivePortalLogin/OWNERS
@@ -1,7 +1,6 @@
set noparent
ek@google.com
-hugobenichi@google.com
jchalard@google.com
lorenzo@google.com
satk@google.com
diff --git a/packages/CaptivePortalLogin/res/layout/activity_captive_portal_login.xml b/packages/CaptivePortalLogin/res/layout/activity_captive_portal_login.xml
index 2324593..c292323 100644
--- a/packages/CaptivePortalLogin/res/layout/activity_captive_portal_login.xml
+++ b/packages/CaptivePortalLogin/res/layout/activity_captive_portal_login.xml
@@ -27,12 +27,17 @@
android:layout_height="wrap_content" />
</FrameLayout>
- <WebView
- android:id="@+id/webview"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_alignParentBottom="false"
- android:layout_alignParentRight="false" />
+ <android.support.v4.widget.SwipeRefreshLayout
+ android:id="@+id/swipe_refresh"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <WebView
+ android:id="@+id/webview"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentBottom="false"
+ android:layout_alignParentRight="false" />
+ </android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</FrameLayout>
diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
index e13aba7..3630005 100644
--- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
+++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
@@ -16,6 +16,9 @@
package com.android.captiveportallogin;
+import static android.net.ConnectivityManager.EXTRA_CAPTIVE_PORTAL_PROBE_SPEC;
+import static android.net.captiveportal.CaptivePortalProbeSpec.HTTP_LOCATION_HEADER_NAME;
+
import android.app.Activity;
import android.app.LoadedApk;
import android.content.Context;
@@ -26,14 +29,18 @@
import android.net.ConnectivityManager.NetworkCallback;
import android.net.Network;
import android.net.NetworkCapabilities;
-import android.net.NetworkInfo;
import android.net.NetworkRequest;
import android.net.Proxy;
import android.net.Uri;
+import android.net.captiveportal.CaptivePortalProbeSpec;
+import android.net.dns.ResolvUtil;
import android.net.http.SslError;
+import android.net.wifi.WifiInfo;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
import android.util.TypedValue;
@@ -41,6 +48,7 @@
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
+import android.webkit.CookieManager;
import android.webkit.SslErrorHandler;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
@@ -81,6 +89,7 @@
};
private URL mUrl;
+ private CaptivePortalProbeSpec mProbeSpec;
private String mUserAgent;
private Network mNetwork;
private CaptivePortal mCaptivePortal;
@@ -88,6 +97,7 @@
private ConnectivityManager mCm;
private boolean mLaunchBrowser = false;
private MyWebViewClient mWebViewClient;
+ private SwipeRefreshLayout mSwipeRefreshLayout;
// Ensures that done() happens once exactly, handling concurrent callers with atomic operations.
private final AtomicBoolean isDone = new AtomicBoolean(false);
@@ -113,8 +123,18 @@
Log.d(TAG, String.format("onCreate for %s", mUrl.toString()));
}
+ final String spec = getIntent().getStringExtra(EXTRA_CAPTIVE_PORTAL_PROBE_SPEC);
+ try {
+ mProbeSpec = CaptivePortalProbeSpec.parseSpecOrNull(spec);
+ } catch (Exception e) {
+ // Make extra sure that invalid configurations do not cause crashes
+ mProbeSpec = null;
+ }
+
// Also initializes proxy system properties.
mCm.bindProcessToNetwork(mNetwork);
+ mCm.setProcessDefaultNetworkForHostResolution(
+ ResolvUtil.getNetworkWithUseLocalNameserversFlag(mNetwork));
// Proxy system properties must be initialized before setContentView is called because
// setContentView initializes the WebView logic which in turn reads the system properties.
@@ -145,6 +165,7 @@
final WebView webview = getWebview();
webview.clearCache(true);
+ CookieManager.getInstance().setAcceptThirdPartyCookies(webview, true);
WebSettings webSettings = webview.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
@@ -159,6 +180,13 @@
// Start initial page load so WebView finishes loading proxy settings.
// Actual load of mUrl is initiated by MyWebViewClient.
webview.loadData("", "text/html", null);
+
+ mSwipeRefreshLayout = findViewById(R.id.swipe_refresh);
+ mSwipeRefreshLayout.setOnRefreshListener(() -> {
+ webview.reload();
+ mSwipeRefreshLayout.setRefreshing(true);
+ });
+
}
// Find WebView's proxy BroadcastReceiver and prompt it to read proxy system properties.
@@ -306,6 +334,7 @@
// TODO: reuse NetworkMonitor facilities for consistent captive portal detection.
new Thread(new Runnable() {
public void run() {
+ final Network network = ResolvUtil.makeNetworkWithPrivateDnsBypass(mNetwork);
// Give time for captive portal to open.
try {
Thread.sleep(1000);
@@ -313,8 +342,9 @@
}
HttpURLConnection urlConnection = null;
int httpResponseCode = 500;
+ String locationHeader = null;
try {
- urlConnection = (HttpURLConnection) mNetwork.openConnection(mUrl);
+ urlConnection = (HttpURLConnection) network.openConnection(mUrl);
urlConnection.setInstanceFollowRedirects(false);
urlConnection.setConnectTimeout(SOCKET_TIMEOUT_MS);
urlConnection.setReadTimeout(SOCKET_TIMEOUT_MS);
@@ -327,6 +357,7 @@
urlConnection.getInputStream();
httpResponseCode = urlConnection.getResponseCode();
+ locationHeader = urlConnection.getHeaderField(HTTP_LOCATION_HEADER_NAME);
if (DBG) {
Log.d(TAG, "probe at " + mUrl +
" ret=" + httpResponseCode +
@@ -337,13 +368,20 @@
} finally {
if (urlConnection != null) urlConnection.disconnect();
}
- if (httpResponseCode == 204) {
+ if (isDismissed(httpResponseCode, locationHeader, mProbeSpec)) {
done(Result.DISMISSED);
}
}
}).start();
}
+ private static boolean isDismissed(
+ int httpResponseCode, String locationHeader, CaptivePortalProbeSpec probeSpec) {
+ return (probeSpec != null)
+ ? probeSpec.getResult(httpResponseCode, locationHeader).isSuccessful()
+ : (httpResponseCode == 204);
+ }
+
private class MyWebViewClient extends WebViewClient {
private static final String INTERNAL_ASSETS = "file:///android_asset/";
@@ -393,6 +431,7 @@
public void onPageFinished(WebView view, String url) {
mPagesLoaded++;
getProgressBar().setVisibility(View.INVISIBLE);
+ mSwipeRefreshLayout.setRefreshing(false);
if (mPagesLoaded == 1) {
// Now that WebView has loaded at least one page we know it has read in the proxy
// settings. Now prompt the WebView read the Network-specific proxy settings.
@@ -518,15 +557,12 @@
}
private String getHeaderTitle() {
- NetworkInfo info = mCm.getNetworkInfo(mNetwork);
- if (info == null) {
- return getString(R.string.action_bar_label);
- }
NetworkCapabilities nc = mCm.getNetworkCapabilities(mNetwork);
- if (!nc.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
+ if (nc == null || TextUtils.isEmpty(nc.getSSID())
+ || !nc.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
return getString(R.string.action_bar_label);
}
- return getString(R.string.action_bar_title, info.getExtraInfo().replaceAll("^\"|\"$", ""));
+ return getString(R.string.action_bar_title, WifiInfo.removeDoubleQuotes(nc.getSSID()));
}
private String getHeaderSubtitle(URL url) {
diff --git a/packages/CarrierDefaultApp/Android.mk b/packages/CarrierDefaultApp/Android.mk
index 82be132..5068b3b 100644
--- a/packages/CarrierDefaultApp/Android.mk
+++ b/packages/CarrierDefaultApp/Android.mk
@@ -6,8 +6,11 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CarrierDefaultApp
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
+LOCAL_STATIC_JAVA_LIBRARIES := services.net
+
include $(BUILD_PACKAGE)
# This finds and builds the test apk as well, so a single make does both.
diff --git a/packages/CarrierDefaultApp/AndroidManifest.xml b/packages/CarrierDefaultApp/AndroidManifest.xml
index 1cd7b61..4d9aaecb40 100644
--- a/packages/CarrierDefaultApp/AndroidManifest.xml
+++ b/packages/CarrierDefaultApp/AndroidManifest.xml
@@ -25,11 +25,13 @@
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS" />
+ <uses-permission android:name="android.permission.NETWORK_BYPASS_PRIVATE_DNS" />
<uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />
<application
android:label="@string/app_name"
- android:directBootAware="true">
+ android:directBootAware="true"
+ android:usesCleartextTraffic="true">
<receiver android:name="com.android.carrierdefaultapp.CarrierDefaultBroadcastReceiver">
<intent-filter>
<action android:name="com.android.internal.telephony.CARRIER_SIGNAL_REDIRECTED" />
diff --git a/packages/CarrierDefaultApp/OWNERS b/packages/CarrierDefaultApp/OWNERS
new file mode 100644
index 0000000..7057ce6
--- /dev/null
+++ b/packages/CarrierDefaultApp/OWNERS
@@ -0,0 +1,12 @@
+tgunn@google.com
+breadley@google.com
+hallliu@google.com
+rgreenwalt@google.com
+mpq@google.com
+amitmahajan@google.com
+fionaxu@google.com
+jackyu@google.com
+jminjie@google.com
+satk@google.com
+shuoq@google.com
+refuhoo@google.com
\ No newline at end of file
diff --git a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
index 95ec83d..b1933373 100644
--- a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
+++ b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
@@ -32,6 +32,7 @@
import android.net.Proxy;
import android.net.TrafficStats;
import android.net.Uri;
+import android.net.dns.ResolvUtil;
import android.net.http.SslError;
import android.os.Bundle;
import android.telephony.CarrierConfigManager;
@@ -110,11 +111,11 @@
mWebView.setWebViewClient(mWebViewClient);
mWebView.setWebChromeClient(new MyWebChromeClient());
- mNetwork = getNetworkForCaptivePortal();
- if (mNetwork == null) {
+ final Network network = getNetworkForCaptivePortal();
+ if (network == null) {
requestNetworkForCaptivePortal();
} else {
- mCm.bindProcessToNetwork(mNetwork);
+ setNetwork(network);
// Start initial page load so WebView finishes loading proxy settings.
// Actual load of mUrl is initiated by MyWebViewClient.
mWebView.loadData("", "text/html", null);
@@ -156,6 +157,15 @@
super.onDestroy();
}
+ private void setNetwork(Network network) {
+ if (network != null) {
+ mCm.bindProcessToNetwork(network);
+ mCm.setProcessDefaultNetworkForHostResolution(
+ ResolvUtil.getNetworkWithUseLocalNameserversFlag(network));
+ }
+ mNetwork = network;
+ }
+
// Find WebView's proxy BroadcastReceiver and prompt it to read proxy system properties.
private void setWebViewProxy() {
LoadedApk loadedApk = getApplication().mLoadedApk;
@@ -232,6 +242,7 @@
private void testForCaptivePortal() {
mTestingThread = new Thread(new Runnable() {
public void run() {
+ final Network network = ResolvUtil.makeNetworkWithPrivateDnsBypass(mNetwork);
// Give time for captive portal to open.
try {
Thread.sleep(1000);
@@ -242,7 +253,7 @@
int httpResponseCode = 500;
int oldTag = TrafficStats.getAndSetThreadStatsTag(TrafficStats.TAG_SYSTEM_PROBE);
try {
- urlConnection = (HttpURLConnection) mNetwork.openConnection(
+ urlConnection = (HttpURLConnection) network.openConnection(
new URL(mCm.getCaptivePortalServerUrl()));
urlConnection.setInstanceFollowRedirects(false);
urlConnection.setConnectTimeout(SOCKET_TIMEOUT_MS);
@@ -289,8 +300,7 @@
@Override
public void onAvailable(Network network) {
if (DBG) logd("Network available: " + network);
- mCm.bindProcessToNetwork(network);
- mNetwork = network;
+ setNetwork(network);
runOnUiThreadIfNotFinishing(() -> {
if (mReload) {
mWebView.reload();
diff --git a/packages/CarrierDefaultApp/tests/unit/Android.mk b/packages/CarrierDefaultApp/tests/unit/Android.mk
index 63bd0b1..a95ccfe 100644
--- a/packages/CarrierDefaultApp/tests/unit/Android.mk
+++ b/packages/CarrierDefaultApp/tests/unit/Android.mk
@@ -27,6 +27,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CarrierDefaultAppUnitTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_INSTRUMENTATION_FOR := CarrierDefaultApp
diff --git a/packages/CompanionDeviceManager/Android.mk b/packages/CompanionDeviceManager/Android.mk
index f730356..7ec6e11 100644
--- a/packages/CompanionDeviceManager/Android.mk
+++ b/packages/CompanionDeviceManager/Android.mk
@@ -21,6 +21,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CompanionDeviceManager
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/packages/CtsShim/Android.mk b/packages/CtsShim/Android.mk
index 88b85e0..12972f1 100644
--- a/packages/CtsShim/Android.mk
+++ b/packages/CtsShim/Android.mk
@@ -32,9 +32,10 @@
LOCAL_DEX_PREOPT := false
LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
-my_archs := arm x86
-my_src_arch := $(call get-prebuilt-src-arch, $(my_archs))
-LOCAL_SRC_FILES := apk/$(my_src_arch)/CtsShimPriv.apk
+LOCAL_SRC_FILES_arm := apk/arm/CtsShimPriv.apk
+LOCAL_SRC_FILES_arm64 := apk/arm/CtsShimPriv.apk
+LOCAL_SRC_FILES_x86 := apk/x86/CtsShimPriv.apk
+LOCAL_SRC_FILES_x86_64 := apk/x86/CtsShimPriv.apk
include $(BUILD_PREBUILT)
@@ -53,9 +54,10 @@
LOCAL_DEX_PREOPT := false
LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
-my_archs := arm x86
-my_src_arch := $(call get-prebuilt-src-arch, $(my_archs))
-LOCAL_SRC_FILES := apk/$(my_src_arch)/CtsShim.apk
+LOCAL_SRC_FILES_arm := apk/arm/CtsShim.apk
+LOCAL_SRC_FILES_arm64 := apk/arm/CtsShim.apk
+LOCAL_SRC_FILES_x86 := apk/x86/CtsShim.apk
+LOCAL_SRC_FILES_x86_64 := apk/x86/CtsShim.apk
include $(BUILD_PREBUILT)
diff --git a/packages/CtsShim/build/Android.mk b/packages/CtsShim/build/Android.mk
index ec14d50..e645adc 100644
--- a/packages/CtsShim/build/Android.mk
+++ b/packages/CtsShim/build/Android.mk
@@ -66,6 +66,12 @@
LOCAL_MULTILIB := both
LOCAL_JNI_SHARED_LIBRARIES := libshim_jni
+LOCAL_USE_AAPT2 := true
+# Disable AAPT2 manifest checks to fix:
+# out/target/common/obj/APPS/CtsShimPriv_intermediates/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
+# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
+LOCAL_AAPT_FLAGS += --warn-manifest-validation
+
include $(BUILD_PACKAGE)
###########################################################
@@ -106,6 +112,12 @@
LOCAL_MANIFEST_FILE := shim/AndroidManifest.xml
+LOCAL_USE_AAPT2 := true
+# Disable AAPT2 manifest checks to fix:
+# frameworks/base/packages/CtsShim/build/shim/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
+# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
+LOCAL_AAPT_FLAGS += --warn-manifest-validation
+
include $(BUILD_PACKAGE)
###########################################################
diff --git a/packages/CtsShim/build/jni/Android.bp b/packages/CtsShim/build/jni/Android.bp
new file mode 100644
index 0000000..ea15b43
--- /dev/null
+++ b/packages/CtsShim/build/jni/Android.bp
@@ -0,0 +1,21 @@
+//
+// 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.
+//
+
+cc_library_shared {
+ name: "libshim_jni",
+ srcs: ["Shim.c"],
+ sdk_version: "24",
+}
diff --git a/packages/CtsShim/build/jni/Android.mk b/packages/CtsShim/build/jni/Android.mk
deleted file mode 100644
index 968fc0b..0000000
--- a/packages/CtsShim/build/jni/Android.mk
+++ /dev/null
@@ -1,27 +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)
-
-LOCAL_MODULE := libshim_jni
-
-LOCAL_SRC_FILES := Shim.c
-
-LOCAL_SDK_VERSION := 24
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/packages/DefaultContainerService/Android.mk b/packages/DefaultContainerService/Android.mk
index 0de2c1f..10c35c0 100644
--- a/packages/DefaultContainerService/Android.mk
+++ b/packages/DefaultContainerService/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := DefaultContainerService
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_JNI_SHARED_LIBRARIES := libdefcontainer_jni
@@ -14,5 +15,3 @@
LOCAL_PRIVILEGED_MODULE := true
include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/DefaultContainerService/jni/Android.bp b/packages/DefaultContainerService/jni/Android.bp
new file mode 100644
index 0000000..7d7b095
--- /dev/null
+++ b/packages/DefaultContainerService/jni/Android.bp
@@ -0,0 +1,36 @@
+//
+// Copyright (C) 2010 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.
+//
+
+cc_library_shared {
+ name: "libdefcontainer_jni",
+
+ srcs: ["com_android_defcontainer_MeasurementUtils.cpp"],
+
+ shared_libs: [
+ "libnativehelper",
+ "libutils",
+ "liblog",
+ ],
+
+ static_libs: ["libdiskusage"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+}
diff --git a/packages/DefaultContainerService/jni/Android.mk b/packages/DefaultContainerService/jni/Android.mk
deleted file mode 100644
index 7808ae1..0000000
--- a/packages/DefaultContainerService/jni/Android.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (C) 2010 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 := \
- com_android_defcontainer_MeasurementUtils.cpp
-
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDES)
-
-LOCAL_SHARED_LIBRARIES := \
- libnativehelper \
- libutils \
- liblog
-
-LOCAL_STATIC_LIBRARIES := \
- libdiskusage
-
-LOCAL_MODULE := libdefcontainer_jni
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/packages/EasterEgg/Android.mk b/packages/EasterEgg/Android.mk
index d4c1e70..605a75d 100644
--- a/packages/EasterEgg/Android.mk
+++ b/packages/EasterEgg/Android.mk
@@ -2,19 +2,26 @@
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
+
LOCAL_STATIC_JAVA_LIBRARIES := \
+ jsr305
+
+LOCAL_STATIC_ANDROID_LIBRARIES := \
android-support-v4 \
android-support-v13 \
android-support-dynamic-animation \
android-support-v7-recyclerview \
android-support-v7-preference \
android-support-v7-appcompat \
- android-support-v14-preference \
- jsr305
+ android-support-v14-preference
+
+LOCAL_USE_AAPT2 := true
LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := EasterEgg
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/packages/ExtServices/Android.mk b/packages/ExtServices/Android.mk
index d0c2b9f..467d7ed 100644
--- a/packages/ExtServices/Android.mk
+++ b/packages/ExtServices/Android.mk
@@ -21,6 +21,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := ExtServices
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
diff --git a/packages/ExtServices/tests/Android.mk b/packages/ExtServices/tests/Android.mk
index cb3c352..f18904d 100644
--- a/packages/ExtServices/tests/Android.mk
+++ b/packages/ExtServices/tests/Android.mk
@@ -18,6 +18,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := ExtServicesUnitTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_INSTRUMENTATION_FOR := ExtServices
diff --git a/packages/ExtShared/Android.mk b/packages/ExtShared/Android.mk
index d8052df..7dbf79f 100644
--- a/packages/ExtShared/Android.mk
+++ b/packages/ExtShared/Android.mk
@@ -21,6 +21,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := ExtShared
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
diff --git a/packages/ExternalStorageProvider/Android.mk b/packages/ExternalStorageProvider/Android.mk
index db825ff4..9e99313 100644
--- a/packages/ExternalStorageProvider/Android.mk
+++ b/packages/ExternalStorageProvider/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := ExternalStorageProvider
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/FakeOemFeatures/Android.mk b/packages/FakeOemFeatures/Android.mk
index d96bb3d..43de8e5 100644
--- a/packages/FakeOemFeatures/Android.mk
+++ b/packages/FakeOemFeatures/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := FakeOemFeatures
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/packages/FusedLocation/Android.mk b/packages/FusedLocation/Android.mk
index 7406eaf4..d795870 100644
--- a/packages/FusedLocation/Android.mk
+++ b/packages/FusedLocation/Android.mk
@@ -22,6 +22,7 @@
LOCAL_JAVA_LIBRARIES := com.android.location.provider
LOCAL_PACKAGE_NAME := FusedLocation
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/InputDevices/Android.mk b/packages/InputDevices/Android.mk
index e7190dc..6de1f1d 100644
--- a/packages/InputDevices/Android.mk
+++ b/packages/InputDevices/Android.mk
@@ -22,6 +22,7 @@
LOCAL_JAVA_LIBRARIES :=
LOCAL_PACKAGE_NAME := InputDevices
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/InputDevices/res/raw/keyboard_layout_polish.kcm b/packages/InputDevices/res/raw/keyboard_layout_polish.kcm
new file mode 100644
index 0000000..559ec07
--- /dev/null
+++ b/packages/InputDevices/res/raw/keyboard_layout_polish.kcm
@@ -0,0 +1,327 @@
+# 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.
+
+#
+# Polish (qwerty) keyboard layout.
+#
+
+type OVERLAY
+
+### ROW 1
+
+key GRAVE {
+ label: '`'
+ base: '`'
+ shift: '~'
+}
+
+key 1 {
+ label: '1'
+ base: '1'
+ shift: '!'
+}
+
+key 2 {
+ label: '2'
+ base: '2'
+ shift: '@'
+}
+
+key 3 {
+ label: '3'
+ base: '3'
+ shift: '#'
+}
+
+key 4 {
+ label: '4'
+ base: '4'
+ shift: '$'
+}
+
+key 5 {
+ label: '5'
+ base: '5'
+ shift: '%'
+}
+
+key 6 {
+ label: '6'
+ base: '6'
+ shift: '^'
+}
+
+key 7 {
+ label: '7'
+ base: '7'
+ shift: '&'
+}
+
+key 8 {
+ label: '8'
+ base: '8'
+ shift: '*'
+}
+
+key 9 {
+ label: '9'
+ base: '9'
+ shift: '('
+}
+
+key 0 {
+ label: '0'
+ base: '0'
+ shift: ')'
+}
+
+key MINUS {
+ label: '-'
+ base: '-'
+ shift: '_'
+}
+
+key EQUALS {
+ label: '='
+ base: '='
+ shift: '+'
+}
+
+### ROW 2
+
+key Q {
+ label: 'Q'
+ base: 'q'
+ shift, capslock: 'Q'
+}
+
+key W {
+ label: 'W'
+ base: 'w'
+ shift, capslock: 'W'
+}
+
+key E {
+ label: 'E'
+ base: 'e'
+ shift, capslock: 'E'
+ ralt: '\u0119'
+ ralt+shift, ralt+capslock: '\u0118'
+}
+
+key R {
+ label: 'R'
+ base: 'r'
+ shift, capslock: 'R'
+}
+
+key T {
+ label: 'T'
+ base: 't'
+ shift, capslock: 'T'
+}
+
+key Y {
+ label: 'Y'
+ base: 'y'
+ shift, capslock: 'Y'
+}
+
+key U {
+ label: 'U'
+ base: 'u'
+ shift, capslock: 'U'
+}
+
+key I {
+ label: 'I'
+ base: 'i'
+ shift, capslock: 'I'
+}
+
+key O {
+ label: 'O'
+ base: 'o'
+ shift, capslock: 'O'
+ ralt: '\u00F3'
+ ralt+shift, ralt+capslock: '\u00D3'
+}
+
+key P {
+ label: 'P'
+ base: 'p'
+ shift, capslock: 'P'
+}
+
+key LEFT_BRACKET {
+ label: '['
+ base: '['
+ shift: '{'
+}
+
+key RIGHT_BRACKET {
+ label: ']'
+ base: ']'
+ shift: '}'
+}
+
+key BACKSLASH {
+ label: '\\'
+ base: '\\'
+ shift: '|'
+}
+
+### ROW 3
+
+key A {
+ label: 'A'
+ base: 'a'
+ shift, capslock: 'A'
+ ralt: '\u0105'
+ ralt+shift, ralt+capslock: '\u0104'
+}
+
+key S {
+ label: 'S'
+ base: 's'
+ shift, capslock: 'S'
+ ralt: '\u015b'
+ ralt+shift, ralt+capslock: '\u015a'
+}
+
+key D {
+ label: 'D'
+ base: 'd'
+ shift, capslock: 'D'
+}
+
+key F {
+ label: 'F'
+ base: 'f'
+ shift, capslock: 'F'
+}
+
+key G {
+ label: 'G'
+ base: 'g'
+ shift, capslock: 'G'
+}
+
+key H {
+ label: 'H'
+ base: 'h'
+ shift, capslock: 'H'
+}
+
+key J {
+ label: 'J'
+ base: 'j'
+ shift, capslock: 'J'
+}
+
+key K {
+ label: 'K'
+ base: 'k'
+ shift, capslock: 'K'
+}
+
+key L {
+ label: 'L'
+ base: 'l'
+ shift, capslock: 'L'
+ ralt: '\u0142'
+ ralt+shift, ralt+capslock: '\u0141'
+}
+
+key SEMICOLON {
+ label: ';'
+ base: ';'
+ shift: ':'
+}
+
+key APOSTROPHE {
+ label: '\''
+ base: '\''
+ shift: '"'
+}
+
+### ROW 4
+
+key Z {
+ label: 'Z'
+ base: 'z'
+ shift, capslock: 'Z'
+ ralt: '\u017c'
+ ralt+shift, ralt+capslock: '\u017b'
+}
+
+key X {
+ label: 'X'
+ base: 'x'
+ shift, capslock: 'X'
+ ralt: '\u017a'
+ ralt+shift, ralt+capslock: '\u0179'
+}
+
+key C {
+ label: 'C'
+ base: 'c'
+ shift, capslock: 'C'
+ ralt: '\u0107'
+ ralt+shift, ralt+capslock: '\u0106'
+}
+
+key V {
+ label: 'V'
+ base: 'v'
+ shift, capslock: 'V'
+}
+
+key B {
+ label: 'B'
+ base: 'b'
+ shift, capslock: 'B'
+}
+
+key N {
+ label: 'N'
+ base: 'n'
+ shift, capslock: 'N'
+ ralt: '\u0144'
+ ralt+shift, ralt+capslock: '\u0143'
+}
+
+key M {
+ label: 'M'
+ base: 'm'
+ shift, capslock: 'M'
+}
+
+key COMMA {
+ label: ','
+ base: ','
+ shift: '<'
+}
+
+key PERIOD {
+ label: '.'
+ base: '.'
+ shift: '>'
+}
+
+key SLASH {
+ label: '/'
+ base: '/'
+ shift: '?'
+}
diff --git a/packages/InputDevices/res/values/strings.xml b/packages/InputDevices/res/values/strings.xml
index 61d3234..5fdc4a6 100644
--- a/packages/InputDevices/res/values/strings.xml
+++ b/packages/InputDevices/res/values/strings.xml
@@ -125,4 +125,7 @@
<!-- Azerbaijani keyboard layout label. [CHAR LIMIT=35] -->
<string name="keyboard_layout_azerbaijani">Azerbaijani</string>
+
+ <!-- Polish keyboard layout label. [CHAR LIMIT=35] -->
+ <string name="keyboard_layout_polish">Polish</string>
</resources>
diff --git a/packages/InputDevices/res/xml/keyboard_layouts.xml b/packages/InputDevices/res/xml/keyboard_layouts.xml
index c6bfc1f..1807aea 100644
--- a/packages/InputDevices/res/xml/keyboard_layouts.xml
+++ b/packages/InputDevices/res/xml/keyboard_layouts.xml
@@ -159,4 +159,8 @@
<keyboard-layout android:name="keyboard_layout_azerbaijani"
android:label="@string/keyboard_layout_azerbaijani"
android:keyboardLayout="@raw/keyboard_layout_azerbaijani" />
+
+ <keyboard-layout android:name="keyboard_layout_polish"
+ android:label="@string/keyboard_layout_polish"
+ android:keyboardLayout="@raw/keyboard_layout_polish" />
</keyboard-layouts>
diff --git a/packages/MtpDocumentsProvider/Android.mk b/packages/MtpDocumentsProvider/Android.mk
index a9e9b2e..2d62a07 100644
--- a/packages/MtpDocumentsProvider/Android.mk
+++ b/packages/MtpDocumentsProvider/Android.mk
@@ -4,6 +4,7 @@
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := MtpDocumentsProvider
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := media
LOCAL_PRIVILEGED_MODULE := true
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
diff --git a/packages/MtpDocumentsProvider/perf_tests/Android.mk b/packages/MtpDocumentsProvider/perf_tests/Android.mk
index f0d4878..6504af1 100644
--- a/packages/MtpDocumentsProvider/perf_tests/Android.mk
+++ b/packages/MtpDocumentsProvider/perf_tests/Android.mk
@@ -5,6 +5,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
LOCAL_PACKAGE_NAME := MtpDocumentsProviderPerfTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_INSTRUMENTATION_FOR := MtpDocumentsProvider
LOCAL_CERTIFICATE := media
diff --git a/packages/MtpDocumentsProvider/tests/Android.mk b/packages/MtpDocumentsProvider/tests/Android.mk
index 148cd0d..25b585f 100644
--- a/packages/MtpDocumentsProvider/tests/Android.mk
+++ b/packages/MtpDocumentsProvider/tests/Android.mk
@@ -6,6 +6,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := MtpDocumentsProviderTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_INSTRUMENTATION_FOR := MtpDocumentsProvider
LOCAL_CERTIFICATE := media
LOCAL_COMPATIBILITY_SUITE := device-tests
diff --git a/packages/Osu/Android.mk b/packages/Osu/Android.mk
index 1d45aa9..63c7578 100644
--- a/packages/Osu/Android.mk
+++ b/packages/Osu/Android.mk
@@ -14,6 +14,7 @@
LOCAL_JAVA_LIBRARIES := telephony-common ims-common bouncycastle conscrypt
LOCAL_PACKAGE_NAME := Osu
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/Osu2/Android.mk b/packages/Osu2/Android.mk
index 05586f0..063ac7e 100644
--- a/packages/Osu2/Android.mk
+++ b/packages/Osu2/Android.mk
@@ -9,6 +9,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := Osu2
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/Osu2/tests/Android.mk b/packages/Osu2/tests/Android.mk
index 4b6e0e6..8d5a3995 100644
--- a/packages/Osu2/tests/Android.mk
+++ b/packages/Osu2/tests/Android.mk
@@ -25,6 +25,7 @@
LOCAL_JACK_FLAGS := --multi-dex native
LOCAL_PACKAGE_NAME := OsuTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_INSTRUMENTATION_FOR := Osu2
diff --git a/packages/PrintRecommendationService/Android.mk b/packages/PrintRecommendationService/Android.mk
index 66cb057..fa1eb0d 100644
--- a/packages/PrintRecommendationService/Android.mk
+++ b/packages/PrintRecommendationService/Android.mk
@@ -22,8 +22,8 @@
LOCAL_PACKAGE_NAME := PrintRecommendationService
-include $(BUILD_PACKAGE)
+LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_SDK_VERSION := system_current
+include $(BUILD_PACKAGE)
include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/packages/PrintSpooler/Android.mk b/packages/PrintSpooler/Android.mk
index 19e44e3..e356f38 100644
--- a/packages/PrintSpooler/Android.mk
+++ b/packages/PrintSpooler/Android.mk
@@ -18,17 +18,27 @@
LOCAL_MODULE_TAGS := optional
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res frameworks/support/v7/recyclerview/res
-LOCAL_AAPT_FLAGS := --auto-add-overlay --extra-packages android.support.v7.recyclerview
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+LOCAL_USE_AAPT2 := true
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += \
- src/com/android/printspooler/renderer/IPdfRenderer.aidl \
- src/com/android/printspooler/renderer/IPdfEditor.aidl
+ src/com/android/printspooler/renderer/IPdfRenderer.aidl \
+ src/com/android/printspooler/renderer/IPdfEditor.aidl
LOCAL_PACKAGE_NAME := PrintSpooler
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_JNI_SHARED_LIBRARIES := libprintspooler_jni
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v7-recyclerview
+LOCAL_STATIC_ANDROID_LIBRARIES := \
+ android-support-v7-recyclerview \
+ android-support-compat \
+ android-support-media-compat \
+ android-support-core-utils \
+ android-support-core-ui \
+ android-support-fragment
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ android-support-annotations
include $(BUILD_PACKAGE)
diff --git a/packages/PrintSpooler/jni/Android.bp b/packages/PrintSpooler/jni/Android.bp
new file mode 100644
index 0000000..789312e
--- /dev/null
+++ b/packages/PrintSpooler/jni/Android.bp
@@ -0,0 +1,18 @@
+cc_library_shared {
+ name: "libprintspooler_jni",
+
+ srcs: ["com_android_printspooler_util_BitmapSerializeUtils.cpp"],
+
+ shared_libs: [
+ "libnativehelper",
+ "libjnigraphics",
+ "liblog",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+}
diff --git a/packages/PrintSpooler/jni/Android.mk b/packages/PrintSpooler/jni/Android.mk
deleted file mode 100644
index 9fd4c84..0000000
--- a/packages/PrintSpooler/jni/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- com_android_printspooler_util_BitmapSerializeUtils.cpp \
-
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE)
-
-LOCAL_SHARED_LIBRARIES := \
- libnativehelper \
- libjnigraphics \
- liblog
-
-LOCAL_MODULE := libprintspooler_jni
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/packages/PrintSpooler/tests/outofprocess/Android.mk b/packages/PrintSpooler/tests/outofprocess/Android.mk
index 3c02453..56afd89 100644
--- a/packages/PrintSpooler/tests/outofprocess/Android.mk
+++ b/packages/PrintSpooler/tests/outofprocess/Android.mk
@@ -24,6 +24,7 @@
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ub-uiautomator mockito-target-minus-junit4
LOCAL_PACKAGE_NAME := PrintSpoolerOutOfProcessTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
include $(BUILD_PACKAGE)
diff --git a/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/WorkflowTest.java b/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/WorkflowTest.java
index 184e559..888fedb 100644
--- a/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/WorkflowTest.java
+++ b/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/WorkflowTest.java
@@ -154,16 +154,16 @@
@AfterClass
public static void enableAnimations() throws Exception {
- if (sWindowAnimationScaleBefore != Float.NaN) {
+ if (!Float.isNaN(sWindowAnimationScaleBefore)) {
runShellCommand(
"settings put global window_animation_scale " + sWindowAnimationScaleBefore);
}
- if (sTransitionAnimationScaleBefore != Float.NaN) {
+ if (!Float.isNaN(sTransitionAnimationScaleBefore)) {
runShellCommand(
"settings put global transition_animation_scale " +
sTransitionAnimationScaleBefore);
}
- if (sAnimatiorDurationScaleBefore != Float.NaN) {
+ if (!Float.isNaN(sAnimatiorDurationScaleBefore)) {
runShellCommand(
"settings put global animator_duration_scale " + sAnimatiorDurationScaleBefore);
}
diff --git a/packages/SettingsLib/Android.mk b/packages/SettingsLib/Android.mk
index 37cb721..c9f9972 100644
--- a/packages/SettingsLib/Android.mk
+++ b/packages/SettingsLib/Android.mk
@@ -3,6 +3,8 @@
LOCAL_USE_AAPT2 := true
+LOCAL_AAPT2_ONLY := true
+
LOCAL_MODULE := SettingsLib
LOCAL_SHARED_ANDROID_LIBRARIES := \
@@ -19,6 +21,8 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_MIN_SDK_VERSION := 21
+
include $(BUILD_STATIC_JAVA_LIBRARY)
# For the test package.
diff --git a/packages/SettingsLib/common.mk b/packages/SettingsLib/common.mk
index 46b66c4..ec7ca2e 100644
--- a/packages/SettingsLib/common.mk
+++ b/packages/SettingsLib/common.mk
@@ -13,49 +13,7 @@
# include frameworks/base/packages/SettingsLib/common.mk
#
-ifeq ($(LOCAL_USE_AAPT2),true)
LOCAL_STATIC_ANDROID_LIBRARIES += \
android-support-annotations \
android-support-v4 \
SettingsLib
-else
-LOCAL_RESOURCE_DIR += $(call my-dir)/res
-
-
-## Include transitive dependencies below
-
-# Include support-v7-appcompat, if not already included
-ifeq (,$(findstring android-support-v7-appcompat,$(LOCAL_STATIC_JAVA_LIBRARIES)))
-LOCAL_RESOURCE_DIR += frameworks/support/v7/appcompat/res
-LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat
-LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
-endif
-
-# Include support-v7-recyclerview, if not already included
-ifeq (,$(findstring android-support-v7-recyclerview,$(LOCAL_STATIC_JAVA_LIBRARIES)))
-LOCAL_RESOURCE_DIR += frameworks/support/v7/recyclerview/res
-LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.recyclerview
-LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-recyclerview
-endif
-
-# Include android-support-v7-preference, if not already included
-ifeq (,$(findstring android-support-v7-preference,$(LOCAL_STATIC_JAVA_LIBRARIES)))
-LOCAL_RESOURCE_DIR += frameworks/support/v7/preference/res
-LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.preference
-LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-preference
-endif
-
-# Include android-support-v14-preference, if not already included
-ifeq (,$(findstring android-support-v14-preference,$(LOCAL_STATIC_JAVA_LIBRARIES)))
-LOCAL_RESOURCE_DIR += frameworks/support/v14/preference/res
-LOCAL_AAPT_FLAGS += --extra-packages android.support.v14.preference
-LOCAL_STATIC_JAVA_LIBRARIES += android-support-v14-preference
-endif
-
-LOCAL_AAPT_FLAGS += --auto-add-overlay --extra-packages com.android.settingslib
-
-LOCAL_STATIC_JAVA_LIBRARIES += \
- android-support-annotations \
- android-support-v4 \
- SettingsLib
-endif
diff --git a/packages/SettingsLib/res/drawable/ic_bt_hearing_aid.xml b/packages/SettingsLib/res/drawable/ic_bt_hearing_aid.xml
new file mode 100644
index 0000000..e14c99b
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_bt_hearing_aid.xml
@@ -0,0 +1,24 @@
+<!--
+ 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M17,20c-0.29,0 -0.56,-0.06 -0.76,-0.15 -0.71,-0.37 -1.21,-0.88 -1.71,-2.38 -0.51,-1.56 -1.47,-2.29 -2.39,-3 -0.79,-0.61 -1.61,-1.24 -2.32,-2.53C9.29,10.98 9,9.93 9,9c0,-2.8 2.2,-5 5,-5s5,2.2 5,5h2c0,-3.93 -3.07,-7 -7,-7S7,5.07 7,9c0,1.26 0.38,2.65 1.07,3.9 0.91,1.65 1.98,2.48 2.85,3.15 0.81,0.62 1.39,1.07 1.71,2.05 0.6,1.82 1.37,2.84 2.73,3.55 0.51,0.23 1.07,0.35 1.64,0.35 2.21,0 4,-1.79 4,-4h-2c0,1.1 -0.9,2 -2,2zM7.64,2.64L6.22,1.22C4.23,3.21 3,5.96 3,9s1.23,5.79 3.22,7.78l1.41,-1.41C6.01,13.74 5,11.49 5,9s1.01,-4.74 2.64,-6.36zM11.5,9c0,1.38 1.12,2.5 2.5,2.5s2.5,-1.12 2.5,-2.5 -1.12,-2.5 -2.5,-2.5 -2.5,1.12 -2.5,2.5z"/>
+</vector>
diff --git a/packages/SettingsLib/res/values/arrays.xml b/packages/SettingsLib/res/values/arrays.xml
index 77df02b..3460ecd 100644
--- a/packages/SettingsLib/res/values/arrays.xml
+++ b/packages/SettingsLib/res/values/arrays.xml
@@ -250,6 +250,19 @@
<item>Best Effort (Adaptive Bit Rate)</item>
</string-array>
+ <!-- TODO: Enable for translation per b/73007419 -->
+ <!-- Summaries for Bluetooth Audio Active Device status. [CHAR LIMIT=50]-->
+ <string-array name="bluetooth_audio_active_device_summaries" translatable="false" >
+ <!-- Status message when the device is not Active. -->
+ <item></item>
+ <!-- Status message when the device is Active for Media and Phone. -->
+ <item>, active</item>
+ <!-- Status message when the device is Active for Media only. -->
+ <item>, active(media)</item>
+ <!-- Status message when the device is Active for Phone only. -->
+ <item>, active(phone)</item>
+ </string-array>
+
<!-- Titles for logd limit size selection preference. [CHAR LIMIT=14] -->
<string-array name="select_logd_size_titles">
<item>Off</item>
diff --git a/packages/SettingsLib/res/values/dimens.xml b/packages/SettingsLib/res/values/dimens.xml
index e261570..4000226 100644
--- a/packages/SettingsLib/res/values/dimens.xml
+++ b/packages/SettingsLib/res/values/dimens.xml
@@ -73,4 +73,9 @@
fraction of a pixel.-->
<fraction name="battery_subpixel_smoothing_left">0%</fraction>
<fraction name="battery_subpixel_smoothing_right">0%</fraction>
+
+ <!-- SignalDrawable -->
+ <dimen name="signal_icon_size">17dp</dimen>
+ <!-- How far to inset the rounded edges -->
+ <dimen name="stat_sys_mobile_signal_circle_inset">0.9dp</dimen>
</resources>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 6601451..61b88a5 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -128,27 +128,27 @@
<!-- Bluetooth settings. Message when connecting to a device -->
<string name="bluetooth_connecting">Connecting\u2026</string>
<!-- Bluetooth settings. Message when connected to a device. [CHAR LIMIT=40] -->
- <string name="bluetooth_connected">Connected</string>
+ <string name="bluetooth_connected">Connected<xliff:g id="active_device">%1$s</xliff:g></string>
<!--Bluetooth settings screen, summary text under individual Bluetooth devices when pairing -->
<string name="bluetooth_pairing">Pairing\u2026</string>
<!-- Bluetooth settings. Message when connected to a device, except for phone audio. [CHAR LIMIT=40] -->
- <string name="bluetooth_connected_no_headset">Connected (no phone)</string>
+ <string name="bluetooth_connected_no_headset">Connected (no phone)<xliff:g id="active_device">%1$s</xliff:g></string>
<!-- Bluetooth settings. Message when connected to a device, except for media audio. [CHAR LIMIT=40] -->
- <string name="bluetooth_connected_no_a2dp">Connected (no media)</string>
+ <string name="bluetooth_connected_no_a2dp">Connected (no media)<xliff:g id="active_device">%1$s</xliff:g></string>
<!-- Bluetooth settings. Message when connected to a device, except for map. [CHAR LIMIT=40] -->
- <string name="bluetooth_connected_no_map">Connected (no message access)</string>
+ <string name="bluetooth_connected_no_map">Connected (no message access)<xliff:g id="active_device">%1$s</xliff:g></string>
<!-- Bluetooth settings. Message when connected to a device, except for phone/media audio. [CHAR LIMIT=40] -->
- <string name="bluetooth_connected_no_headset_no_a2dp">Connected (no phone or media)</string>
+ <string name="bluetooth_connected_no_headset_no_a2dp">Connected (no phone or media)<xliff:g id="active_device">%1$s</xliff:g></string>
<!-- Bluetooth settings. Message when connected to a device, showing remote device battery level. [CHAR LIMIT=NONE] -->
- <string name="bluetooth_connected_battery_level">Connected, battery <xliff:g id="battery_level_as_percentage">%1$s</xliff:g></string>
+ <string name="bluetooth_connected_battery_level">Connected, battery <xliff:g id="battery_level_as_percentage">%1$s</xliff:g><xliff:g id="active_device">%2$s</xliff:g></string>
<!-- Bluetooth settings. Message when connected to a device, except for phone audio, showing remote device battery level. [CHAR LIMIT=NONE] -->
- <string name="bluetooth_connected_no_headset_battery_level">Connected (no phone), battery <xliff:g id="battery_level_as_percentage">%1$s</xliff:g></string>
+ <string name="bluetooth_connected_no_headset_battery_level">Connected (no phone), battery <xliff:g id="battery_level_as_percentage">%1$s</xliff:g><xliff:g id="active_device">%2$s</xliff:g></string>
<!-- Bluetooth settings. Message when connected to a device, except for media audio, showing remote device battery level. [CHAR LIMIT=NONE] -->
- <string name="bluetooth_connected_no_a2dp_battery_level">Connected (no media), battery <xliff:g id="battery_level_as_percentage">%1$s</xliff:g></string>
+ <string name="bluetooth_connected_no_a2dp_battery_level">Connected (no media), battery <xliff:g id="battery_level_as_percentage">%1$s</xliff:g><xliff:g id="active_device">%2$s</xliff:g></string>
<!-- Bluetooth settings. Message when connected to a device, except for phone/media audio, showing remote device battery level. [CHAR LIMIT=NONE] -->
- <string name="bluetooth_connected_no_headset_no_a2dp_battery_level">Connected (no phone or media), battery <xliff:g id="battery_level_as_percentage">%1$s</xliff:g></string>
+ <string name="bluetooth_connected_no_headset_no_a2dp_battery_level">Connected (no phone or media), battery <xliff:g id="battery_level_as_percentage">%1$s</xliff:g><xliff:g id="active_device">%2$s</xliff:g></string>
<!-- Bluetooth settings. The user-visible string that is used whenever referring to the A2DP profile. -->
<string name="bluetooth_profile_a2dp">Media audio</string>
@@ -177,6 +177,11 @@
<!-- Bluetooth settings. Similar to bluetooth_profile_a2dp_high_quality, but used when the device supports high quality audio but we don't know which codec that will be used. -->
<string name="bluetooth_profile_a2dp_high_quality_unknown_codec">HD audio</string>
+ <!-- Bluetooth settings. The user-visible string that is used whenever referring to the Hearing Aid profile. -->
+ <string name="bluetooth_profile_hearing_aid">Hearing Aid</string>
+ <!-- Bluetooth settings. Connection options screen. The summary for the Hearing Aid checkbox preference when Hearing Aid is connected. -->
+ <string name="bluetooth_hearing_aid_profile_summary_connected">Connected to Hearing Aid</string>
+
<!-- Bluetooth settings. Connection options screen. The summary for the A2DP checkbox preference when A2DP is connected. -->
<string name="bluetooth_a2dp_profile_summary_connected">Connected to media audio</string>
<!-- Bluetooth settings. Connection options screen. The summary for the headset checkbox preference when headset is connected. -->
@@ -214,6 +219,8 @@
for the HID checkbox preference that describes how checking it
will set the HID profile as preferred. -->
<string name="bluetooth_hid_profile_summary_use_for">Use for input</string>
+ <!-- Bluetooth settings. Connection options screen. The summary for the Hearing Aid checkbox preference that describes how checking it will set the Hearing Aid profile as preferred. -->
+ <string name="bluetooth_hearing_aid_profile_summary_use_for">Use for Hearing Aid</string>
<!-- Button text for accepting an incoming pairing request. [CHAR LIMIT=20] -->
<string name="bluetooth_pairing_accept">Pair</string>
@@ -449,10 +456,10 @@
<string name="keep_screen_on">Stay awake</string>
<!-- setting Checkbox summary whether to keep the screen on when plugged in -->
<string name="keep_screen_on_summary">Screen will never sleep while charging</string>
- <!-- Setting Checkbox title whether to enable bluetooth HCI snoop log -->
+ <!-- Setting Checkbox title whether to enable Bluetooth HCI snoop log -->
<string name="bt_hci_snoop_log">Enable Bluetooth HCI snoop log</string>
- <!-- setting Checkbox summary whether to capture all bluetooth HCI packets in a file -->
- <string name="bt_hci_snoop_log_summary">Capture all bluetooth HCI packets in a file</string>
+ <!-- setting Checkbox summary whether to capture all Bluetooth HCI packets in a file -->
+ <string name="bt_hci_snoop_log_summary">Capture all Bluetooth HCI packets in a file (Toggle Bluetooth after changing this setting)</string>
<!-- setting Checkbox title whether to enable OEM unlock [CHAR_LIMIT=35] -->
<string name="oem_unlock_enable">OEM unlocking</string>
<!-- setting Checkbox summary whether to enable OEM unlock [CHAR_LIMIT=50] -->
@@ -494,30 +501,30 @@
<!-- UI debug setting: Select Bluetooth AVRCP Version -->
<string name="bluetooth_select_avrcp_version_dialog_title">Select Bluetooth AVRCP Version</string>
- <!-- UI debug setting: Select Bluetooth Audio Codec -->
+ <!-- UI debug setting: Trigger Bluetooth Audio Codec Selection -->
<string name="bluetooth_select_a2dp_codec_type">Bluetooth Audio Codec</string>
- <!-- UI debug setting: Select Bluetooth Audio Codec -->
- <string name="bluetooth_select_a2dp_codec_type_dialog_title">Select Bluetooth Audio Codec</string>
+ <!-- UI debug setting: Trigger Bluetooth Audio Codec Selection -->
+ <string name="bluetooth_select_a2dp_codec_type_dialog_title">Trigger Bluetooth Audio Codec\u000ASelection</string>
- <!-- UI debug setting: Select Bluetooth Audio Sample Rate -->
+ <!-- UI debug setting: Trigger Bluetooth Audio Sample Rate Selection -->
<string name="bluetooth_select_a2dp_codec_sample_rate">Bluetooth Audio Sample Rate</string>
- <!-- UI debug setting: Select Bluetooth Audio Codec: Sample Rate -->
- <string name="bluetooth_select_a2dp_codec_sample_rate_dialog_title">Select Bluetooth Audio Codec:\u000ASample Rate</string>
+ <!-- UI debug setting: Trigger Bluetooth Audio Codec Selection: Sample Rate -->
+ <string name="bluetooth_select_a2dp_codec_sample_rate_dialog_title">Trigger Bluetooth Audio Codec\u000ASelection: Sample Rate</string>
- <!-- UI debug setting: Select Bluetooth Audio Bits Per Sample -->
+ <!-- UI debug setting: Trigger Bluetooth Audio Bits Per Sample Selection -->
<string name="bluetooth_select_a2dp_codec_bits_per_sample">Bluetooth Audio Bits Per Sample</string>
- <!-- UI debug setting: Select Bluetooth Audio Codec: Bits Per Sample -->
- <string name="bluetooth_select_a2dp_codec_bits_per_sample_dialog_title">Select Bluetooth Audio Codec:\u000ABits Per Sample</string>
+ <!-- UI debug setting: Trigger Bluetooth Audio Codec Selection: Bits Per Sample -->
+ <string name="bluetooth_select_a2dp_codec_bits_per_sample_dialog_title">Trigger Bluetooth Audio Codec\u000ASelection: Bits Per Sample</string>
- <!-- UI debug setting: Select Bluetooth Audio Channel Mode -->
+ <!-- UI debug setting: Trigger Bluetooth Audio Channel Mode Selection -->
<string name="bluetooth_select_a2dp_codec_channel_mode">Bluetooth Audio Channel Mode</string>
- <!-- UI debug setting: Select Bluetooth Audio Codec: Channel Mode -->
- <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title">Select Bluetooth Audio Codec:\u000AChannel Mode</string>
+ <!-- UI debug setting: Trigger Bluetooth Audio Codec Selection: Channel Mode -->
+ <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title">Trigger Bluetooth Audio Codec\u000ASelection: Channel Mode</string>
- <!-- UI debug setting: Select Bluetooth Audio LDAC Playback Quality -->
+ <!-- UI debug setting: Trigger Bluetooth Audio LDAC Playback Quality Selection -->
<string name="bluetooth_select_a2dp_codec_ldac_playback_quality">Bluetooth Audio LDAC Codec: Playback Quality</string>
<!-- UI debug setting: Select Bluetooth Audio LDAC Codec: LDAC Playback Quality -->
- <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title">Select Bluetooth Audio LDAC Codec:\u000APlayback Quality</string>
+ <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title">Trigger Bluetooth Audio LDAC Codec\u000ASelection: Playback Quality</string>
<!-- [CHAR LIMIT=NONE] Label for displaying Bluetooth Audio Codec Parameters while streaming -->
<string name="bluetooth_select_a2dp_codec_streaming_label">Streaming: <xliff:g id="streaming_parameter">%1$s</xliff:g></string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
old mode 100755
new mode 100644
index 0946181..853cbba
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
@@ -129,14 +129,18 @@
public boolean connect(BluetoothDevice device) {
if (mService == null) return false;
- List<BluetoothDevice> sinks = getConnectedDevices();
- if (sinks != null) {
- for (BluetoothDevice sink : sinks) {
- if (sink.equals(device)) {
- Log.w(TAG, "Connecting to device " + device + " : disconnect skipped");
- continue;
+ int max_connected_devices = mLocalAdapter.getMaxConnectedAudioDevices();
+ if (max_connected_devices == 1) {
+ // Original behavior: disconnect currently connected device
+ List<BluetoothDevice> sinks = getConnectedDevices();
+ if (sinks != null) {
+ for (BluetoothDevice sink : sinks) {
+ if (sink.equals(device)) {
+ Log.w(TAG, "Connecting to device " + device + " : disconnect skipped");
+ continue;
+ }
+ mService.disconnect(sink);
}
- mService.disconnect(sink);
}
}
return mService.connect(device);
@@ -158,6 +162,16 @@
return mService.getConnectionState(device);
}
+ public boolean setActiveDevice(BluetoothDevice device) {
+ if (mService == null) return false;
+ return mService.setActiveDevice(device);
+ }
+
+ public BluetoothDevice getActiveDevice() {
+ if (mService == null) return null;
+ return mService.getActiveDevice();
+ }
+
public boolean isPreferred(BluetoothDevice device) {
if (mService == null) return false;
return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF;
@@ -181,8 +195,8 @@
boolean isA2dpPlaying() {
if (mService == null) return false;
List<BluetoothDevice> sinks = mService.getConnectedDevices();
- if (!sinks.isEmpty()) {
- if (mService.isA2dpPlaying(sinks.get(0))) {
+ for (BluetoothDevice device : sinks) {
+ if (mService.isA2dpPlaying(device)) {
return true;
}
}
@@ -206,8 +220,8 @@
return true;
}
BluetoothCodecConfig codecConfig = null;
- if (mServiceWrapper.getCodecStatus() != null) {
- codecConfig = mServiceWrapper.getCodecStatus().getCodecConfig();
+ if (mServiceWrapper.getCodecStatus(device) != null) {
+ codecConfig = mServiceWrapper.getCodecStatus(device).getCodecConfig();
}
if (codecConfig != null) {
return !codecConfig.isMandatoryCodec();
@@ -225,9 +239,9 @@
return;
}
if (enabled) {
- mService.enableOptionalCodecs();
+ mService.enableOptionalCodecs(device);
} else {
- mService.disableOptionalCodecs();
+ mService.disableOptionalCodecs(device);
}
}
@@ -240,8 +254,8 @@
// We want to get the highest priority codec, since that's the one that will be used with
// this device, and see if it is high-quality (ie non-mandatory).
BluetoothCodecConfig[] selectable = null;
- if (mServiceWrapper.getCodecStatus() != null) {
- selectable = mServiceWrapper.getCodecStatus().getCodecsSelectableCapabilities();
+ if (mServiceWrapper.getCodecStatus(device) != null) {
+ selectable = mServiceWrapper.getCodecStatus(device).getCodecsSelectableCapabilities();
// To get the highest priority, we sort in reverse.
Arrays.sort(selectable,
(a, b) -> {
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java
old mode 100755
new mode 100644
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothA2dpWrapper.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothA2dpWrapper.java
index aa3e835..dace1bb 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothA2dpWrapper.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothA2dpWrapper.java
@@ -39,7 +39,7 @@
/**
* Wraps {@code BluetoothA2dp.getCodecStatus}
*/
- public BluetoothCodecStatus getCodecStatus();
+ public BluetoothCodecStatus getCodecStatus(BluetoothDevice device);
/**
* Wraps {@code BluetoothA2dp.supportsOptionalCodecs}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothA2dpWrapperImpl.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothA2dpWrapperImpl.java
index 14fa796..c49bb98 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothA2dpWrapperImpl.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothA2dpWrapperImpl.java
@@ -41,8 +41,8 @@
}
@Override
- public BluetoothCodecStatus getCodecStatus() {
- return mService.getCodecStatus();
+ public BluetoothCodecStatus getCodecStatus(BluetoothDevice device) {
+ return mService.getCodecStatus(device);
}
@Override
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java
index 4c41b49..ac3599c 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java
@@ -28,4 +28,5 @@
void onDeviceDeleted(CachedBluetoothDevice cachedDevice);
void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState);
void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state);
+ void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
old mode 100755
new mode 100644
index f57d02b..b74b2cd
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
@@ -16,9 +16,13 @@
package com.android.settingslib.bluetooth;
+import android.bluetooth.BluetoothA2dp;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothHeadset;
+import android.bluetooth.BluetoothHearingAid;
+import android.bluetooth.BluetoothProfile;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -31,6 +35,7 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
/**
@@ -106,6 +111,14 @@
// Dock event broadcasts
addHandler(Intent.ACTION_DOCK_EVENT, new DockEventHandler());
+ // Active device broadcasts
+ addHandler(BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED,
+ new ActiveDeviceChangedHandler());
+ addHandler(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED,
+ new ActiveDeviceChangedHandler());
+ addHandler(BluetoothHearingAid.ACTION_ACTIVE_DEVICE_CHANGED,
+ new ActiveDeviceChangedHandler());
+
mContext.registerReceiver(mBroadcastReceiver, mAdapterIntentFilter, null, mReceiverHandler);
mContext.registerReceiver(mProfileBroadcastReceiver, mProfileIntentFilter, null, mReceiverHandler);
}
@@ -409,4 +422,38 @@
return deviceAdded;
}
+
+ private class ActiveDeviceChangedHandler implements Handler {
+ @Override
+ public void onReceive(Context context, Intent intent, BluetoothDevice device) {
+ String action = intent.getAction();
+ if (action == null) {
+ Log.w(TAG, "ActiveDeviceChangedHandler: action is null");
+ return;
+ }
+ CachedBluetoothDevice activeDevice = mDeviceManager.findDevice(device);
+ int bluetoothProfile = 0;
+ if (Objects.equals(action, BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED)) {
+ bluetoothProfile = BluetoothProfile.A2DP;
+ } else if (Objects.equals(action, BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED)) {
+ bluetoothProfile = BluetoothProfile.HEADSET;
+ } else if (Objects.equals(action, BluetoothHearingAid.ACTION_ACTIVE_DEVICE_CHANGED)) {
+ bluetoothProfile = BluetoothProfile.HEARING_AID;
+ } else {
+ Log.w(TAG, "ActiveDeviceChangedHandler: unknown action " + action);
+ return;
+ }
+ dispatchActiveDeviceChanged(activeDevice, bluetoothProfile);
+ }
+ }
+
+ private void dispatchActiveDeviceChanged(CachedBluetoothDevice activeDevice,
+ int bluetoothProfile) {
+ mDeviceManager.onActiveDeviceChanged(activeDevice, bluetoothProfile);
+ synchronized (mCallbacks) {
+ for (BluetoothCallback callback : mCallbacks) {
+ callback.onActiveDeviceChanged(activeDevice, bluetoothProfile);
+ }
+ }
+ }
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index 9caff10..dc2ecea 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -27,6 +27,7 @@
import android.text.TextUtils;
import android.util.Log;
import android.bluetooth.BluetoothAdapter;
+import android.support.annotation.VisibleForTesting;
import com.android.settingslib.R;
@@ -105,6 +106,11 @@
private static final long MAX_UUID_DELAY_FOR_AUTO_CONNECT = 5000;
private static final long MAX_HOGP_DELAY_FOR_AUTO_CONNECT = 30000;
+ // Active device state
+ private boolean mIsActiveDeviceA2dp = false;
+ private boolean mIsActiveDeviceHeadset = false;
+ private boolean mIsActiveDeviceHearingAid = false;
+
/**
* Describes the current device and profile for logging.
*
@@ -156,6 +162,7 @@
mRemovedProfiles.add(profile);
mLocalNapRoleConnected = false;
}
+ fetchActiveDevices();
}
CachedBluetoothDevice(Context context,
@@ -359,6 +366,7 @@
fetchName();
fetchBtClass();
updateProfiles();
+ fetchActiveDevices();
migratePhonebookPermissionChoice();
migrateMessagePermissionChoice();
fetchMessageRejectionCount();
@@ -409,6 +417,36 @@
}
}
+ /**
+ * Set this device as active device
+ * @return true if at least one profile on this device is set to active, false otherwise
+ */
+ public boolean setActive() {
+ boolean result = false;
+ A2dpProfile a2dpProfile = mProfileManager.getA2dpProfile();
+ if (a2dpProfile != null && isConnectedProfile(a2dpProfile)) {
+ if (a2dpProfile.setActiveDevice(getDevice())) {
+ Log.i(TAG, "OnPreferenceClickListener: A2DP active device=" + this);
+ result = true;
+ }
+ }
+ HeadsetProfile headsetProfile = mProfileManager.getHeadsetProfile();
+ if ((headsetProfile != null) && isConnectedProfile(headsetProfile)) {
+ if (headsetProfile.setActiveDevice(getDevice())) {
+ Log.i(TAG, "OnPreferenceClickListener: Headset active device=" + this);
+ result = true;
+ }
+ }
+ HearingAidProfile hearingAidProfile = mProfileManager.getHearingAidProfile();
+ if ((hearingAidProfile != null) && isConnectedProfile(hearingAidProfile)) {
+ if (hearingAidProfile.setActiveDevice(getDevice())) {
+ Log.i(TAG, "OnPreferenceClickListener: Hearing Aid active device=" + this);
+ result = true;
+ }
+ }
+ return result;
+ }
+
void refreshName() {
fetchName();
dispatchAttributesChanged();
@@ -454,6 +492,59 @@
return mDevice.getBondState();
}
+ /**
+ * Update the device status as active or non-active per Bluetooth profile.
+ *
+ * @param isActive true if the device is active
+ * @param bluetoothProfile the Bluetooth profile
+ */
+ public void onActiveDeviceChanged(boolean isActive, int bluetoothProfile) {
+ boolean changed = false;
+ switch (bluetoothProfile) {
+ case BluetoothProfile.A2DP:
+ changed = (mIsActiveDeviceA2dp != isActive);
+ mIsActiveDeviceA2dp = isActive;
+ break;
+ case BluetoothProfile.HEADSET:
+ changed = (mIsActiveDeviceHeadset != isActive);
+ mIsActiveDeviceHeadset = isActive;
+ break;
+ case BluetoothProfile.HEARING_AID:
+ changed = (mIsActiveDeviceHearingAid != isActive);
+ mIsActiveDeviceHearingAid = isActive;
+ break;
+ default:
+ Log.w(TAG, "onActiveDeviceChanged: unknown profile " + bluetoothProfile +
+ " isActive " + isActive);
+ break;
+ }
+ if (changed) {
+ dispatchAttributesChanged();
+ }
+ }
+
+ /**
+ * Get the device status as active or non-active per Bluetooth profile.
+ *
+ * @param bluetoothProfile the Bluetooth profile
+ * @return true if the device is active
+ */
+ @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
+ public boolean isActiveDevice(int bluetoothProfile) {
+ switch (bluetoothProfile) {
+ case BluetoothProfile.A2DP:
+ return mIsActiveDeviceA2dp;
+ case BluetoothProfile.HEADSET:
+ return mIsActiveDeviceHeadset;
+ case BluetoothProfile.HEARING_AID:
+ return mIsActiveDeviceHearingAid;
+ default:
+ Log.w(TAG, "getActiveDevice: unknown profile " + bluetoothProfile);
+ break;
+ }
+ return false;
+ }
+
void setRssi(short rssi) {
if (mRssi != rssi) {
mRssi = rssi;
@@ -529,6 +620,21 @@
return true;
}
+ private void fetchActiveDevices() {
+ A2dpProfile a2dpProfile = mProfileManager.getA2dpProfile();
+ if (a2dpProfile != null) {
+ mIsActiveDeviceA2dp = mDevice.equals(a2dpProfile.getActiveDevice());
+ }
+ HeadsetProfile headsetProfile = mProfileManager.getHeadsetProfile();
+ if (headsetProfile != null) {
+ mIsActiveDeviceHeadset = mDevice.equals(headsetProfile.getActiveDevice());
+ }
+ HearingAidProfile hearingAidProfile = mProfileManager.getHearingAidProfile();
+ if (hearingAidProfile != null) {
+ mIsActiveDeviceHearingAid = hearingAidProfile.getActiveDevices().contains(mDevice);
+ }
+ }
+
/**
* Refreshes the UI for the BT class, including fetching the latest value
* for the class.
@@ -857,6 +963,7 @@
boolean profileConnected = false; // at least one profile is connected
boolean a2dpNotConnected = false; // A2DP is preferred but not connected
boolean hfpNotConnected = false; // HFP is preferred but not connected
+ boolean hearingAidNotConnected = false; // Hearing Aid is preferred but not connected
for (LocalBluetoothProfile profile : getProfiles()) {
int connectionStatus = getProfileConnectionState(profile);
@@ -878,6 +985,8 @@
} else if ((profile instanceof HeadsetProfile) ||
(profile instanceof HfpClientProfile)) {
hfpNotConnected = true;
+ } else if (profile instanceof HearingAidProfile) {
+ hearingAidNotConnected = true;
}
}
break;
@@ -896,37 +1005,59 @@
com.android.settingslib.Utils.formatPercentage(batteryLevel);
}
+ // Prepare the string for the Active Device summary
+ String[] activeDeviceStringsArray = mContext.getResources().getStringArray(
+ R.array.bluetooth_audio_active_device_summaries);
+ String activeDeviceString = activeDeviceStringsArray[0]; // Default value: not active
+ if (mIsActiveDeviceA2dp && mIsActiveDeviceHeadset) {
+ activeDeviceString = activeDeviceStringsArray[1]; // Active for Media and Phone
+ } else {
+ if (mIsActiveDeviceA2dp) {
+ activeDeviceString = activeDeviceStringsArray[2]; // Active for Media only
+ }
+ if (mIsActiveDeviceHeadset) {
+ activeDeviceString = activeDeviceStringsArray[3]; // Active for Phone only
+ }
+ }
+ if (!hearingAidNotConnected && mIsActiveDeviceHearingAid) {
+ activeDeviceString = activeDeviceStringsArray[1];
+ return mContext.getString(R.string.bluetooth_connected, activeDeviceString);
+ }
+
if (profileConnected) {
if (a2dpNotConnected && hfpNotConnected) {
if (batteryLevelPercentageString != null) {
return mContext.getString(
R.string.bluetooth_connected_no_headset_no_a2dp_battery_level,
- batteryLevelPercentageString);
+ batteryLevelPercentageString, activeDeviceString);
} else {
- return mContext.getString(R.string.bluetooth_connected_no_headset_no_a2dp);
+ return mContext.getString(R.string.bluetooth_connected_no_headset_no_a2dp,
+ activeDeviceString);
}
} else if (a2dpNotConnected) {
if (batteryLevelPercentageString != null) {
return mContext.getString(R.string.bluetooth_connected_no_a2dp_battery_level,
- batteryLevelPercentageString);
+ batteryLevelPercentageString, activeDeviceString);
} else {
- return mContext.getString(R.string.bluetooth_connected_no_a2dp);
+ return mContext.getString(R.string.bluetooth_connected_no_a2dp,
+ activeDeviceString);
}
} else if (hfpNotConnected) {
if (batteryLevelPercentageString != null) {
return mContext.getString(R.string.bluetooth_connected_no_headset_battery_level,
- batteryLevelPercentageString);
+ batteryLevelPercentageString, activeDeviceString);
} else {
- return mContext.getString(R.string.bluetooth_connected_no_headset);
+ return mContext.getString(R.string.bluetooth_connected_no_headset,
+ activeDeviceString);
}
} else {
if (batteryLevelPercentageString != null) {
return mContext.getString(R.string.bluetooth_connected_battery_level,
- batteryLevelPercentageString);
+ batteryLevelPercentageString, activeDeviceString);
} else {
- return mContext.getString(R.string.bluetooth_connected);
+ return mContext.getString(R.string.bluetooth_connected, activeDeviceString);
}
}
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
old mode 100755
new mode 100644
index c3ff617..a8e0039
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
@@ -24,6 +24,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Objects;
/**
* CachedBluetoothDeviceManager manages the set of remote Bluetooth devices.
@@ -167,6 +168,15 @@
}
}
}
+
+ public synchronized void onActiveDeviceChanged(CachedBluetoothDevice activeDevice,
+ int bluetoothProfile) {
+ for (CachedBluetoothDevice cachedDevice : mCachedDevices) {
+ boolean isActive = Objects.equals(cachedDevice, activeDevice);
+ cachedDevice.onActiveDeviceChanged(isActive, bluetoothProfile);
+ }
+ }
+
private void log(String msg) {
if (DEBUG) {
Log.d(TAG, msg);
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java
old mode 100755
new mode 100644
index d45fe1a..ee12191
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java
@@ -153,6 +153,16 @@
return BluetoothProfile.STATE_DISCONNECTED;
}
+ public boolean setActiveDevice(BluetoothDevice device) {
+ if (mService == null) return false;
+ return mService.setActiveDevice(device);
+ }
+
+ public BluetoothDevice getActiveDevice() {
+ if (mService == null) return null;
+ return mService.getActiveDevice();
+ }
+
public boolean isPreferred(BluetoothDevice device) {
if (mService == null) return false;
return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF;
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java
new file mode 100644
index 0000000..6c5ecbf
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java
@@ -0,0 +1,245 @@
+/*
+ * 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.
+ */
+
+package com.android.settingslib.bluetooth;
+
+import android.bluetooth.BluetoothHearingAid;
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothClass;
+import android.bluetooth.BluetoothCodecConfig;
+import android.bluetooth.BluetoothCodecStatus;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothProfile;
+import android.bluetooth.BluetoothUuid;
+import android.content.Context;
+import android.os.ParcelUuid;
+import android.util.Log;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.settingslib.R;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class HearingAidProfile implements LocalBluetoothProfile {
+ private static final String TAG = "HearingAidProfile";
+ private static boolean V = true;
+
+ private Context mContext;
+
+ private BluetoothHearingAid mService;
+ private boolean mIsProfileReady;
+
+ private final LocalBluetoothAdapter mLocalAdapter;
+ private final CachedBluetoothDeviceManager mDeviceManager;
+
+ static final String NAME = "HearingAid";
+ private final LocalBluetoothProfileManager mProfileManager;
+
+ // Order of this profile in device profiles list
+ private static final int ORDINAL = 1;
+
+ // These callbacks run on the main thread.
+ private final class HearingAidServiceListener
+ implements BluetoothProfile.ServiceListener {
+
+ public void onServiceConnected(int profile, BluetoothProfile proxy) {
+ if (V) Log.d(TAG,"Bluetooth service connected");
+ mService = (BluetoothHearingAid) proxy;
+ // We just bound to the service, so refresh the UI for any connected HearingAid devices.
+ List<BluetoothDevice> deviceList = mService.getConnectedDevices();
+ while (!deviceList.isEmpty()) {
+ BluetoothDevice nextDevice = deviceList.remove(0);
+ CachedBluetoothDevice device = mDeviceManager.findDevice(nextDevice);
+ // we may add a new device here, but generally this should not happen
+ if (device == null) {
+ Log.w(TAG, "HearingAidProfile found new device: " + nextDevice);
+ device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ }
+ device.onProfileStateChanged(HearingAidProfile.this, BluetoothProfile.STATE_CONNECTED);
+ device.refresh();
+ }
+ mIsProfileReady=true;
+ }
+
+ public void onServiceDisconnected(int profile) {
+ if (V) Log.d(TAG,"Bluetooth service disconnected");
+ mIsProfileReady=false;
+ }
+ }
+
+ public boolean isProfileReady() {
+ return mIsProfileReady;
+ }
+
+ HearingAidProfile(Context context, LocalBluetoothAdapter adapter,
+ CachedBluetoothDeviceManager deviceManager,
+ LocalBluetoothProfileManager profileManager) {
+ mContext = context;
+ mLocalAdapter = adapter;
+ mDeviceManager = deviceManager;
+ mProfileManager = profileManager;
+ mLocalAdapter.getProfileProxy(context, new HearingAidServiceListener(),
+ BluetoothProfile.HEARING_AID);
+ }
+
+ public boolean isConnectable() {
+ return true;
+ }
+
+ public boolean isAutoConnectable() {
+ return true;
+ }
+
+ public List<BluetoothDevice> getConnectedDevices() {
+ if (mService == null) return new ArrayList<BluetoothDevice>(0);
+ return mService.getDevicesMatchingConnectionStates(
+ new int[] {BluetoothProfile.STATE_CONNECTED,
+ BluetoothProfile.STATE_CONNECTING,
+ BluetoothProfile.STATE_DISCONNECTING});
+ }
+
+ public boolean connect(BluetoothDevice device) {
+ if (mService == null) return false;
+ return mService.connect(device);
+ }
+
+ public boolean disconnect(BluetoothDevice device) {
+ if (mService == null) return false;
+ // Downgrade priority as user is disconnecting the hearing aid.
+ if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON){
+ mService.setPriority(device, BluetoothProfile.PRIORITY_ON);
+ }
+ return mService.disconnect(device);
+ }
+
+ public int getConnectionStatus(BluetoothDevice device) {
+ if (mService == null) {
+ return BluetoothProfile.STATE_DISCONNECTED;
+ }
+ return mService.getConnectionState(device);
+ }
+
+ public boolean setActiveDevice(BluetoothDevice device) {
+ if (mService == null) return false;
+ return mService.setActiveDevice(device);
+ }
+
+ public List<BluetoothDevice> getActiveDevices() {
+ if (mService == null) return new ArrayList<>();
+ return mService.getActiveDevices();
+ }
+
+ public boolean isPreferred(BluetoothDevice device) {
+ if (mService == null) return false;
+ return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF;
+ }
+
+ public int getPreferred(BluetoothDevice device) {
+ if (mService == null) return BluetoothProfile.PRIORITY_OFF;
+ return mService.getPriority(device);
+ }
+
+ public void setPreferred(BluetoothDevice device, boolean preferred) {
+ if (mService == null) return;
+ if (preferred) {
+ if (mService.getPriority(device) < BluetoothProfile.PRIORITY_ON) {
+ mService.setPriority(device, BluetoothProfile.PRIORITY_ON);
+ }
+ } else {
+ mService.setPriority(device, BluetoothProfile.PRIORITY_OFF);
+ }
+ }
+
+ public int getVolume() {
+ if (mService == null) {
+ return 0;
+ }
+ return mService.getVolume();
+ }
+
+ public void setVolume(int volume) {
+ if (mService == null) {
+ return;
+ }
+ mService.setVolume(volume);
+ }
+
+ public long getHiSyncId(BluetoothDevice device) {
+ if (mService == null) {
+ return BluetoothHearingAid.HI_SYNC_ID_INVALID;
+ }
+ return mService.getHiSyncId(device);
+ }
+
+ public int getDeviceSide(BluetoothDevice device) {
+ if (mService == null) {
+ return BluetoothHearingAid.SIDE_LEFT;
+ }
+ return mService.getDeviceSide(device);
+ }
+
+ public int getDeviceMode(BluetoothDevice device) {
+ if (mService == null) {
+ return BluetoothHearingAid.MODE_MONAURAL;
+ }
+ return mService.getDeviceMode(device);
+ }
+
+ public String toString() {
+ return NAME;
+ }
+
+ public int getOrdinal() {
+ return ORDINAL;
+ }
+
+ public int getNameResource(BluetoothDevice device) {
+ return R.string.bluetooth_profile_hearing_aid;
+ }
+
+ public int getSummaryResourceForDevice(BluetoothDevice device) {
+ int state = getConnectionStatus(device);
+ switch (state) {
+ case BluetoothProfile.STATE_DISCONNECTED:
+ return R.string.bluetooth_hearing_aid_profile_summary_use_for;
+
+ case BluetoothProfile.STATE_CONNECTED:
+ return R.string.bluetooth_hearing_aid_profile_summary_connected;
+
+ default:
+ return Utils.getConnectionStateSummary(state);
+ }
+ }
+
+ public int getDrawableResource(BluetoothClass btClass) {
+ return R.drawable.ic_bt_hearing_aid;
+ }
+
+ protected void finalize() {
+ if (V) Log.d(TAG, "finalize()");
+ if (mService != null) {
+ try {
+ BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.HEARING_AID,
+ mService);
+ mService = null;
+ }catch (Throwable t) {
+ Log.w(TAG, "Error cleaning up Hearing Aid proxy", t);
+ }
+ }
+ }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java
old mode 100755
new mode 100644
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java
old mode 100755
new mode 100644
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
old mode 100755
new mode 100644
index 22674cb..38c8a88
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
@@ -24,6 +24,7 @@
import android.os.ParcelUuid;
import android.util.Log;
+import java.util.List;
import java.util.Set;
/**
@@ -194,8 +195,13 @@
return mState;
}
- synchronized void setBluetoothStateInt(int state) {
- mState = state;
+ void setBluetoothStateInt(int state) {
+ synchronized(this) {
+ if (mState == state) {
+ return;
+ }
+ mState = state;
+ }
if (state == BluetoothAdapter.STATE_ON) {
// if mProfileManager hasn't been constructed yet, it will
@@ -239,4 +245,12 @@
public BluetoothDevice getRemoteDevice(String address) {
return mAdapter.getRemoteDevice(address);
}
+
+ public int getMaxConnectedAudioDevices() {
+ return mAdapter.getMaxConnectedAudioDevices();
+ }
+
+ public List<Integer> getSupportedProfiles() {
+ return mAdapter.getSupportedProfiles();
+ }
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfile.java
old mode 100755
new mode 100644
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
index 991d922..ad58f47 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
@@ -21,6 +21,7 @@
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.bluetooth.BluetoothHeadsetClient;
+import android.bluetooth.BluetoothHearingAid;
import android.bluetooth.BluetoothHidHost;
import android.bluetooth.BluetoothMap;
import android.bluetooth.BluetoothMapClient;
@@ -37,6 +38,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -91,6 +93,7 @@
private final PbapServerProfile mPbapProfile;
private final boolean mUsePbapPce;
private final boolean mUseMapClient;
+ private HearingAidProfile mHearingAidProfile;
/**
* Mapping from profile name, e.g. "HEADSET" to profile object.
@@ -143,10 +146,18 @@
//Create PBAP server profile
if(DEBUG) Log.d(TAG, "Adding local PBAP profile");
+
mPbapProfile = new PbapServerProfile(context);
addProfile(mPbapProfile, PbapServerProfile.NAME,
BluetoothPbap.ACTION_CONNECTION_STATE_CHANGED);
+ List<Integer> supportedList = mLocalAdapter.getSupportedProfiles();
+ if (supportedList.contains(BluetoothProfile.HEARING_AID)) {
+ mHearingAidProfile = new HearingAidProfile(mContext, mLocalAdapter, mDeviceManager,
+ this);
+ addProfile(mHearingAidProfile, HearingAidProfile.NAME,
+ BluetoothHearingAid.ACTION_CONNECTION_STATE_CHANGED);
+ }
if (DEBUG) Log.d(TAG, "LocalBluetoothProfileManager construction complete");
}
@@ -254,6 +265,18 @@
"Warning: PBAP Client profile was previously added but the UUID is now missing.");
}
+ //Hearing Aid Client
+ if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.HearingAid)) {
+ if (mHearingAidProfile == null) {
+ if(DEBUG) Log.d(TAG, "Adding local Hearing Aid profile");
+ mHearingAidProfile = new HearingAidProfile(mContext, mLocalAdapter, mDeviceManager, this);
+ addProfile(mHearingAidProfile, HearingAidProfile.NAME,
+ BluetoothHearingAid.ACTION_CONNECTION_STATE_CHANGED);
+ }
+ } else if (mHearingAidProfile != null) {
+ Log.w(TAG, "Warning: Hearing Aid profile was previously added but the UUID is now missing.");
+ }
+
mEventManager.registerProfileIntentReceiver();
// There is no local SDP record for HID and Settings app doesn't control PBAP Server.
@@ -416,6 +439,10 @@
return mMapClientProfile;
}
+ public HearingAidProfile getHearingAidProfile() {
+ return mHearingAidProfile;
+ }
+
/**
* Fill in a list of LocalBluetoothProfile objects that are supported by
* the local device and the remote device.
@@ -515,6 +542,12 @@
removedProfiles.remove(mPbapClientProfile);
}
+ if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.HearingAid) &&
+ mHearingAidProfile != null) {
+ profiles.add(mHearingAidProfile);
+ removedProfiles.remove(mHearingAidProfile);
+ }
+
if (DEBUG) {
Log.d(TAG,"New Profiles" + profiles.toString());
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/OppProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/OppProfile.java
old mode 100755
new mode 100644
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PanProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PanProfile.java
old mode 100755
new mode 100644
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapClientProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapClientProfile.java
old mode 100755
new mode 100644
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java
old mode 100755
new mode 100644
diff --git a/packages/SettingsLib/src/com/android/settingslib/graph/BatteryMeterDrawableBase.java b/packages/SettingsLib/src/com/android/settingslib/graph/BatteryMeterDrawableBase.java
old mode 100755
new mode 100644
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java b/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java
similarity index 98%
rename from packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java
rename to packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java
index 15ef742..846e30d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java
+++ b/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java
@@ -12,7 +12,7 @@
* permissions and limitations under the License.
*/
-package com.android.systemui.statusbar.phone;
+package com.android.settingslib.graph;
import android.animation.ArgbEvaluator;
import android.annotation.IntRange;
@@ -36,7 +36,6 @@
import com.android.settingslib.R;
import com.android.settingslib.Utils;
-import com.android.systemui.qs.SlashDrawable;
public class SignalDrawable extends Drawable {
@@ -458,6 +457,7 @@
}
private final class SlashArtist {
+ private static final float CORNER_RADIUS = 1f;
// These values are derived in un-rotated (vertical) orientation
private static final float SLASH_WIDTH = 1.8384776f;
private static final float SLASH_HEIGHT = 22f;
@@ -478,7 +478,7 @@
void draw(int height, int width, @NonNull Canvas canvas, Paint paint) {
Matrix m = new Matrix();
- final float radius = scale(SlashDrawable.CORNER_RADIUS, width);
+ final float radius = scale(CORNER_RADIUS, width);
updateRect(
scale(LEFT, width),
scale(TOP, height),
diff --git a/packages/SettingsLib/src/com/android/settingslib/inputmethod/InputMethodPreference.java b/packages/SettingsLib/src/com/android/settingslib/inputmethod/InputMethodPreference.java
old mode 100755
new mode 100644
diff --git a/packages/SettingsLib/tests/integ/Android.mk b/packages/SettingsLib/tests/integ/Android.mk
index 7ace048..dd24be4 100644
--- a/packages/SettingsLib/tests/integ/Android.mk
+++ b/packages/SettingsLib/tests/integ/Android.mk
@@ -25,8 +25,11 @@
LOCAL_JACK_FLAGS := --multi-dex native
LOCAL_PACKAGE_NAME := SettingsLibTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
+LOCAL_USE_AAPT2 := true
+
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
espresso-core \
diff --git a/packages/SettingsLib/tests/robotests/Android.mk b/packages/SettingsLib/tests/robotests/Android.mk
index 55b635e..f4ea258 100644
--- a/packages/SettingsLib/tests/robotests/Android.mk
+++ b/packages/SettingsLib/tests/robotests/Android.mk
@@ -21,6 +21,7 @@
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := SettingsLibShell
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := optional
LOCAL_PRIVILEGED_MODULE := true
@@ -28,6 +29,8 @@
LOCAL_RESOURCE_DIR := \
$(LOCAL_PATH)/res
+LOCAL_USE_AAPT2 := true
+
include frameworks/base/packages/SettingsLib/common.mk
include $(BUILD_PACKAGE)
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java
index 4a73c1b..8761807 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java
@@ -122,7 +122,7 @@
when(mBluetoothA2dp.getConnectionState(any())).thenReturn(
BluetoothProfile.STATE_CONNECTED);
BluetoothCodecStatus status = mock(BluetoothCodecStatus.class);
- when(mBluetoothA2dpWrapper.getCodecStatus()).thenReturn(status);
+ when(mBluetoothA2dpWrapper.getCodecStatus(mDevice)).thenReturn(status);
BluetoothCodecConfig config = mock(BluetoothCodecConfig.class);
when(status.getCodecConfig()).thenReturn(config);
when(config.isMandatoryCodec()).thenReturn(false);
@@ -185,7 +185,7 @@
BluetoothCodecStatus status = mock(BluetoothCodecStatus.class);
BluetoothCodecConfig config = mock(BluetoothCodecConfig.class);
BluetoothCodecConfig[] configs = {config};
- when(mBluetoothA2dpWrapper.getCodecStatus()).thenReturn(status);
+ when(mBluetoothA2dpWrapper.getCodecStatus(mDevice)).thenReturn(status);
when(status.getCodecsSelectableCapabilities()).thenReturn(configs);
when(config.isMandatoryCodec()).thenReturn(true);
@@ -200,7 +200,7 @@
BluetoothCodecStatus status = mock(BluetoothCodecStatus.class);
BluetoothCodecConfig config = mock(BluetoothCodecConfig.class);
BluetoothCodecConfig[] configs = {config};
- when(mBluetoothA2dpWrapper.getCodecStatus()).thenReturn(status);
+ when(mBluetoothA2dpWrapper.getCodecStatus(mDevice)).thenReturn(status);
when(status.getCodecsSelectableCapabilities()).thenReturn(configs);
when(config.isMandatoryCodec()).thenReturn(false);
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManagerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManagerTest.java
new file mode 100644
index 0000000..2f5eead
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManagerTest.java
@@ -0,0 +1,345 @@
+/*
+ * 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.
+ */
+package com.android.settingslib.bluetooth;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothClass;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothProfile;
+import android.content.Context;
+
+import com.android.settingslib.R;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+
+import java.util.Collection;
+
+@RunWith(RobolectricTestRunner.class)
+public class CachedBluetoothDeviceManagerTest {
+ private final static String DEVICE_NAME_1 = "TestName_1";
+ private final static String DEVICE_NAME_2 = "TestName_2";
+ private final static String DEVICE_ALIAS_1 = "TestAlias_1";
+ private final static String DEVICE_ALIAS_2 = "TestAlias_2";
+ private final static String DEVICE_ADDRESS_1 = "AA:BB:CC:DD:EE:11";
+ private final static String DEVICE_ADDRESS_2 = "AA:BB:CC:DD:EE:22";
+ private final BluetoothClass DEVICE_CLASS_1 =
+ new BluetoothClass(BluetoothClass.Device.AUDIO_VIDEO_HEADPHONES);
+ private final BluetoothClass DEVICE_CLASS_2 =
+ new BluetoothClass(BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE);
+ @Mock
+ private LocalBluetoothAdapter mLocalAdapter;
+ @Mock
+ private LocalBluetoothProfileManager mLocalProfileManager;
+ @Mock
+ private LocalBluetoothManager mLocalBluetoothManager;
+ @Mock
+ private BluetoothEventManager mBluetoothEventManager;
+ @Mock
+ private HeadsetProfile mHfpProfile;
+ @Mock
+ private A2dpProfile mA2dpProfile;
+ @Mock
+ private PanProfile mPanProfile;
+ @Mock
+ private HearingAidProfile mHearingAidProfile;
+ @Mock
+ private BluetoothDevice mDevice1;
+ @Mock
+ private BluetoothDevice mDevice2;
+ private CachedBluetoothDeviceManager mCachedDeviceManager;
+ private Context mContext;
+ private String[] mActiveDeviceStringsArray;
+ private String mActiveDeviceStringNone;
+ private String mActiveDeviceStringAll;
+ private String mActiveDeviceStringMedia;
+ private String mActiveDeviceStringPhone;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mContext = RuntimeEnvironment.application;
+ when(mDevice1.getAddress()).thenReturn(DEVICE_ADDRESS_1);
+ when(mDevice2.getAddress()).thenReturn(DEVICE_ADDRESS_2);
+ when(mDevice1.getName()).thenReturn(DEVICE_NAME_1);
+ when(mDevice2.getName()).thenReturn(DEVICE_NAME_2);
+ when(mDevice1.getAliasName()).thenReturn(DEVICE_ALIAS_1);
+ when(mDevice2.getAliasName()).thenReturn(DEVICE_ALIAS_2);
+ when(mDevice1.getBluetoothClass()).thenReturn(DEVICE_CLASS_1);
+ when(mDevice2.getBluetoothClass()).thenReturn(DEVICE_CLASS_2);
+
+ when(mLocalBluetoothManager.getEventManager()).thenReturn(mBluetoothEventManager);
+ when(mLocalAdapter.getBluetoothState()).thenReturn(BluetoothAdapter.STATE_ON);
+ when(mHfpProfile.isProfileReady()).thenReturn(true);
+ when(mA2dpProfile.isProfileReady()).thenReturn(true);
+ when(mPanProfile.isProfileReady()).thenReturn(true);
+ when(mHearingAidProfile.isProfileReady()).thenReturn(true);
+ mCachedDeviceManager = new CachedBluetoothDeviceManager(mContext, mLocalBluetoothManager);
+ }
+
+ /**
+ * Test to verify addDevice().
+ */
+ @Test
+ public void testAddDevice_validCachedDevices_devicesAdded() {
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice1);
+ assertThat(cachedDevice1).isNotNull();
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice2);
+ assertThat(cachedDevice2).isNotNull();
+
+ Collection<CachedBluetoothDevice> devices = mCachedDeviceManager.getCachedDevicesCopy();
+ assertThat(devices).contains(cachedDevice1);
+ assertThat(devices).contains(cachedDevice2);
+
+ assertThat(mCachedDeviceManager.findDevice(mDevice1)).isEqualTo(cachedDevice1);
+ assertThat(mCachedDeviceManager.findDevice(mDevice2)).isEqualTo(cachedDevice2);
+ }
+
+ /**
+ * Test to verify getName().
+ */
+ @Test
+ public void testGetName_validCachedDevice_nameFound() {
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice1);
+ assertThat(cachedDevice1).isNotNull();
+ assertThat(mCachedDeviceManager.getName(mDevice1)).isEqualTo(DEVICE_ALIAS_1);
+ }
+
+ /**
+ * Test to verify onDeviceNameUpdated().
+ */
+ @Test
+ public void testOnDeviceNameUpdated_validName_nameUpdated() {
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice1);
+ assertThat(cachedDevice1).isNotNull();
+ assertThat(cachedDevice1.getName()).isEqualTo(DEVICE_ALIAS_1);
+
+ final String newAliasName = "NewAliasName";
+ when(mDevice1.getAliasName()).thenReturn(newAliasName);
+ mCachedDeviceManager.onDeviceNameUpdated(mDevice1);
+ assertThat(cachedDevice1.getName()).isEqualTo(newAliasName);
+ }
+
+ /**
+ * Test to verify clearNonBondedDevices().
+ */
+ @Test
+ public void testClearNonBondedDevices_bondedAndNonBondedDevices_nonBondedDevicesCleared() {
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice1);
+ assertThat(cachedDevice1).isNotNull();
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice2);
+ assertThat(cachedDevice2).isNotNull();
+
+ when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+ when(mDevice2.getBondState()).thenReturn(BluetoothDevice.BOND_BONDING);
+ mCachedDeviceManager.clearNonBondedDevices();
+ Collection<CachedBluetoothDevice> devices = mCachedDeviceManager.getCachedDevicesCopy();
+ assertThat(devices).contains(cachedDevice1);
+ assertThat(devices).contains(cachedDevice2);
+
+ when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+ when(mDevice2.getBondState()).thenReturn(BluetoothDevice.BOND_NONE);
+ mCachedDeviceManager.clearNonBondedDevices();
+ devices = mCachedDeviceManager.getCachedDevicesCopy();
+ assertThat(devices).contains(cachedDevice1);
+ assertThat(devices).doesNotContain(cachedDevice2);
+
+ when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_NONE);
+ when(mDevice2.getBondState()).thenReturn(BluetoothDevice.BOND_NONE);
+ mCachedDeviceManager.clearNonBondedDevices();
+ devices = mCachedDeviceManager.getCachedDevicesCopy();
+ assertThat(devices).doesNotContain(cachedDevice1);
+ assertThat(devices).doesNotContain(cachedDevice2);
+ }
+
+ /**
+ * Test to verify onBtClassChanged().
+ */
+ @Test
+ public void testOnBtClassChanged_validBtClass_classChanged() {
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice1);
+ assertThat(cachedDevice1).isNotNull();
+ assertThat(cachedDevice1.getBtClass()).isEqualTo(DEVICE_CLASS_1);
+
+ final BluetoothClass newBluetoothClass = DEVICE_CLASS_2;
+ when(mDevice1.getBluetoothClass()).thenReturn(newBluetoothClass);
+ mCachedDeviceManager.onBtClassChanged(mDevice1);
+ assertThat(cachedDevice1.getBtClass()).isEqualTo(newBluetoothClass);
+ }
+
+ /**
+ * Test to verify onDeviceDisappeared().
+ */
+ @Test
+ public void testOnDeviceDisappeared_deviceBondedUnbonded_unbondedDeviceDisappeared() {
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice1);
+ assertThat(cachedDevice1).isNotNull();
+
+ when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+ assertThat(mCachedDeviceManager.onDeviceDisappeared(cachedDevice1)).isFalse();
+
+ when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_NONE);
+ assertThat(mCachedDeviceManager.onDeviceDisappeared(cachedDevice1)).isTrue();
+ }
+
+ /**
+ * Test to verify onActiveDeviceChanged().
+ */
+ @Test
+ public void testOnActiveDeviceChanged_connectedDevices_activeDeviceChanged() {
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice1);
+ assertThat(cachedDevice1).isNotNull();
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice2);
+ assertThat(cachedDevice2).isNotNull();
+
+ when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+ when(mDevice2.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+
+ // Connect both devices for A2DP and HFP
+ cachedDevice1.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ cachedDevice2.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ cachedDevice1.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
+ cachedDevice2.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
+
+ // Verify that both devices are connected and none is Active
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+
+ // The first device is active for A2DP, the second device is active for HFP
+ mCachedDeviceManager.onActiveDeviceChanged(cachedDevice1, BluetoothProfile.A2DP);
+ mCachedDeviceManager.onActiveDeviceChanged(cachedDevice2, BluetoothProfile.HEADSET);
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isTrue();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isTrue();
+
+ // The first device is active for A2DP and HFP
+ mCachedDeviceManager.onActiveDeviceChanged(cachedDevice1, BluetoothProfile.HEADSET);
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isTrue();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isTrue();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+
+ // The second device is active for A2DP and HFP
+ mCachedDeviceManager.onActiveDeviceChanged(cachedDevice2, BluetoothProfile.A2DP);
+ mCachedDeviceManager.onActiveDeviceChanged(cachedDevice2, BluetoothProfile.HEADSET);
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isTrue();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isTrue();
+
+ // No active device for A2DP
+ mCachedDeviceManager.onActiveDeviceChanged(null, BluetoothProfile.A2DP);
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isTrue();
+
+ // No active device for HFP
+ mCachedDeviceManager.onActiveDeviceChanged(null, BluetoothProfile.HEADSET);
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ }
+
+ /**
+ * Test to verify onActiveDeviceChanged() with A2DP and Hearing Aid.
+ */
+ @Test
+ public void testOnActiveDeviceChanged_withA2dpAndHearingAid() {
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice1);
+ assertThat(cachedDevice1).isNotNull();
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
+ mLocalProfileManager, mDevice2);
+ assertThat(cachedDevice2).isNotNull();
+
+ when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+ when(mDevice2.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+
+ // Connect device1 for A2DP and HFP and device2 for Hearing Aid
+ cachedDevice1.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ cachedDevice1.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
+ cachedDevice2.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_CONNECTED);
+
+ // Verify that both devices are connected and none is Active
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse();
+
+ // The first device is active for A2DP and HFP
+ mCachedDeviceManager.onActiveDeviceChanged(cachedDevice1, BluetoothProfile.A2DP);
+ mCachedDeviceManager.onActiveDeviceChanged(cachedDevice1, BluetoothProfile.HEADSET);
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isTrue();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isTrue();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse();
+
+ // The second device is active for Hearing Aid and the first device is not active
+ mCachedDeviceManager.onActiveDeviceChanged(null, BluetoothProfile.A2DP);
+ mCachedDeviceManager.onActiveDeviceChanged(null, BluetoothProfile.HEADSET);
+ mCachedDeviceManager.onActiveDeviceChanged(cachedDevice2, BluetoothProfile.HEARING_AID);
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEARING_AID)).isTrue();
+
+ // No active device for Hearing Aid
+ mCachedDeviceManager.onActiveDeviceChanged(null, BluetoothProfile.HEARING_AID);
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice1.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.A2DP)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEADSET)).isFalse();
+ assertThat(cachedDevice2.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse();
+ }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
index 4091ce1..6593cbc 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
@@ -61,6 +61,8 @@
@Mock
private PanProfile mPanProfile;
@Mock
+ private HearingAidProfile mHearingAidProfile;
+ @Mock
private BluetoothDevice mDevice;
private CachedBluetoothDevice mCachedDevice;
private Context mContext;
@@ -75,27 +77,18 @@
when(mHfpProfile.isProfileReady()).thenReturn(true);
when(mA2dpProfile.isProfileReady()).thenReturn(true);
when(mPanProfile.isProfileReady()).thenReturn(true);
+ when(mHearingAidProfile.isProfileReady()).thenReturn(true);
mCachedDevice = spy(
new CachedBluetoothDevice(mContext, mAdapter, mProfileManager, mDevice));
doAnswer((invocation) -> mBatteryLevel).when(mCachedDevice).getBatteryLevel();
}
- /**
- * Test to verify the current test context object works so that we are not checking null
- * against null
- */
- @Test
- public void testContextMock() {
- assertThat(mContext.getString(R.string.bluetooth_connected)).isEqualTo("Connected");
- }
-
@Test
public void testGetConnectionSummary_testSingleProfileConnectDisconnect() {
// Test without battery level
// Set PAN profile to be connected and test connection state summary
mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_CONNECTED);
- assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(mContext.getString(
- R.string.bluetooth_connected));
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected");
// Set PAN profile to be disconnected and test connection state summary
mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_DISCONNECTED);
@@ -105,9 +98,7 @@
mBatteryLevel = 10;
// Set PAN profile to be connected and test connection state summary
mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_CONNECTED);
- assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(mContext.getString(
- R.string.bluetooth_connected_battery_level,
- com.android.settingslib.Utils.formatPercentage(mBatteryLevel)));
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected, battery 10%");
// Set PAN profile to be disconnected and test connection state summary
mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_DISCONNECTED);
@@ -118,8 +109,7 @@
// Set PAN profile to be connected and test connection state summary
mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_CONNECTED);
- assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(mContext.getString(
- R.string.bluetooth_connected));
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected");
// Set PAN profile to be disconnected and test connection state summary
mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_DISCONNECTED);
@@ -134,28 +124,23 @@
mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_CONNECTED);
- assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(mContext.getString(
- R.string.bluetooth_connected_battery_level,
- com.android.settingslib.Utils.formatPercentage(mBatteryLevel)));
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected, battery 10%");
// Disconnect HFP only and test connection state summary
mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_DISCONNECTED);
- assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(mContext.getString(
- R.string.bluetooth_connected_no_headset_battery_level,
- com.android.settingslib.Utils.formatPercentage(mBatteryLevel)));
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(
+ "Connected (no phone), battery 10%");
// Disconnect A2DP only and test connection state summary
mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_DISCONNECTED);
- assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(mContext.getString(
- R.string.bluetooth_connected_no_a2dp_battery_level,
- com.android.settingslib.Utils.formatPercentage(mBatteryLevel)));
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(
+ "Connected (no media), battery 10%");
// Disconnect both HFP and A2DP and test connection state summary
mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_DISCONNECTED);
- assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(mContext.getString(
- R.string.bluetooth_connected_no_headset_no_a2dp_battery_level,
- com.android.settingslib.Utils.formatPercentage(mBatteryLevel)));
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(
+ "Connected (no phone or media), battery 10%");
// Disconnect all profiles and test connection state summary
mCachedDevice.onProfileStateChanged(mPanProfile, BluetoothProfile.STATE_DISCONNECTED);
@@ -163,6 +148,134 @@
}
@Test
+ public void testGetConnectionSummary_testSingleProfileActiveDeviceA2dp() {
+ // Test without battery level
+ // Set A2DP profile to be connected and test connection state summary
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected");
+
+ // Set device as Active for A2DP and test connection state summary
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected, active(media)");
+
+ // Test with battery level
+ mBatteryLevel = 10;
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(
+ "Connected, battery 10%, active(media)");
+
+ // Set A2DP profile to be disconnected and test connection state summary
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isNull();
+
+ // Test with BluetoothDevice.BATTERY_LEVEL_UNKNOWN battery level
+ mBatteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN;
+ // Set A2DP profile to be connected, Active and test connection state summary
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected, active(media)");
+
+ // Set A2DP profile to be disconnected and test connection state summary
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isNull();
+ }
+
+ @Test
+ public void testGetConnectionSummary_testSingleProfileActiveDeviceHfp() {
+ // Test without battery level
+ // Set HFP profile to be connected and test connection state summary
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected");
+
+ // Set device as Active for HFP and test connection state summary
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.HEADSET);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected, active(phone)");
+
+ // Test with battery level
+ mBatteryLevel = 10;
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(
+ "Connected, battery 10%, active(phone)");
+
+ // Set HFP profile to be disconnected and test connection state summary
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isNull();
+
+ // Test with BluetoothDevice.BATTERY_LEVEL_UNKNOWN battery level
+ mBatteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN;
+ // Set HFP profile to be connected, Active and test connection state summary
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.HEADSET);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected, active(phone)");
+
+ // Set HFP profile to be disconnected and test connection state summary
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isNull();
+ }
+
+ @Test
+ public void testGetConnectionSummary_testSingleProfileActiveDeviceHearingAid() {
+ // Test without battery level
+ // Set Hearing Aid profile to be connected and test connection state summary
+ mCachedDevice.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_CONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected");
+
+ // Set device as Active for Hearing Aid and test connection state summary
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.HEARING_AID);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected, active");
+
+ // Set Hearing Aid profile to be disconnected and test connection state summary
+ mCachedDevice.onActiveDeviceChanged(false, BluetoothProfile.HEARING_AID);
+ mCachedDevice.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_DISCONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isNull();
+ }
+
+ @Test
+ public void testGetConnectionSummary_testMultipleProfilesActiveDevice() {
+ // Test without battery level
+ // Set A2DP and HFP profiles to be connected and test connection state summary
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected");
+
+ // Set device as Active for A2DP and HFP and test connection state summary
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.HEADSET);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected, active");
+
+ // Test with battery level
+ mBatteryLevel = 10;
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(
+ "Connected, battery 10%, active");
+
+ // Disconnect A2DP only and test connection state summary
+ mCachedDevice.onActiveDeviceChanged(false, BluetoothProfile.A2DP);
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(
+ "Connected (no media), battery 10%, active(phone)");
+
+ // Disconnect HFP only and test connection state summary
+ mCachedDevice.onActiveDeviceChanged(false, BluetoothProfile.HEADSET);
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(
+ "Connected (no phone), battery 10%, active(media)");
+
+ // Test with BluetoothDevice.BATTERY_LEVEL_UNKNOWN battery level
+ mBatteryLevel = BluetoothDevice.BATTERY_LEVEL_UNKNOWN;
+ // Set A2DP and HFP profiles to be connected, Active and test connection state summary
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+ mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.HEADSET);
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Connected, active");
+
+ // Set A2DP and HFP profiles to be disconnected and test connection state summary
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ assertThat(mCachedDevice.getConnectionSummary()).isNull();
+ }
+
+ @Test
public void testDeviceName_testAliasNameAvailable() {
when(mDevice.getAliasName()).thenReturn(DEVICE_ALIAS);
when(mDevice.getName()).thenReturn(DEVICE_NAME);
@@ -206,4 +319,24 @@
// Verify new alias is returned on getName
assertThat(cachedBluetoothDevice.getName()).isEqualTo(DEVICE_ALIAS_NEW);
}
+
+ @Test
+ public void testSetActive() {
+ when(mProfileManager.getA2dpProfile()).thenReturn(mA2dpProfile);
+ when(mProfileManager.getHeadsetProfile()).thenReturn(mHfpProfile);
+ when(mA2dpProfile.setActiveDevice(any(BluetoothDevice.class))).thenReturn(true);
+ when(mHfpProfile.setActiveDevice(any(BluetoothDevice.class))).thenReturn(true);
+
+ assertThat(mCachedDevice.setActive()).isFalse();
+
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+ assertThat(mCachedDevice.setActive()).isTrue();
+
+ mCachedDevice.onProfileStateChanged(mA2dpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_CONNECTED);
+ assertThat(mCachedDevice.setActive()).isTrue();
+
+ mCachedDevice.onProfileStateChanged(mHfpProfile, BluetoothProfile.STATE_DISCONNECTED);
+ assertThat(mCachedDevice.setActive()).isFalse();
+ }
}
diff --git a/packages/SettingsProvider/Android.mk b/packages/SettingsProvider/Android.mk
index 069e83a..74ce919 100644
--- a/packages/SettingsProvider/Android.mk
+++ b/packages/SettingsProvider/Android.mk
@@ -10,6 +10,7 @@
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := SettingsProvider
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 27d461b..1822db3 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -40,6 +40,7 @@
import android.provider.Settings;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
+import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
@@ -2601,15 +2602,26 @@
loadSetting(stmt, Settings.Global.CALL_AUTO_RETRY, 0);
// Set the preferred network mode to target desired value or Default
- // value defined in RILConstants
- int type;
- type = RILConstants.PREFERRED_NETWORK_MODE;
- loadSetting(stmt, Settings.Global.PREFERRED_NETWORK_MODE, type);
+ // value defined in system property
+ String val = "";
+ String mode;
+ for (int phoneId = 0;
+ phoneId < TelephonyManager.getDefault().getPhoneCount(); phoneId++) {
+ mode = TelephonyManager.getTelephonyProperty(phoneId,
+ "ro.telephony.default_network",
+ Integer.toString(RILConstants.PREFERRED_NETWORK_MODE));
+ if (phoneId == 0) {
+ val = mode;
+ } else {
+ val = val + "," + mode;
+ }
+ }
+ loadSetting(stmt, Settings.Global.PREFERRED_NETWORK_MODE, val);
// Set the preferred cdma subscription source to target desired value or default
// value defined in Phone
- type = SystemProperties.getInt("ro.telephony.default_cdma_sub",
- Phone.PREFERRED_CDMA_SUBSCRIPTION);
+ int type = SystemProperties.getInt("ro.telephony.default_cdma_sub",
+ Phone.PREFERRED_CDMA_SUBSCRIPTION);
loadSetting(stmt, Settings.Global.CDMA_SUBSCRIPTION_MODE, type);
loadIntegerSetting(stmt, Settings.Global.LOW_BATTERY_SOUND_TIMEOUT,
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index d256b12..d32db84 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -924,6 +924,9 @@
Settings.Global.CONTACTS_DATABASE_WAL_ENABLED,
GlobalSettingsProto.CONTACTS_DATABASE_WAL_ENABLED);
dumpSetting(s, p,
+ Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS,
+ GlobalSettingsProto.HIDDEN_API_BLACKLIST_EXEMPTIONS);
+ dumpSetting(s, p,
Settings.Global.MULTI_SIM_VOICE_CALL_SUBSCRIPTION,
GlobalSettingsProto.MULTI_SIM_VOICE_CALL_SUBSCRIPTION);
dumpSetting(s, p,
diff --git a/packages/SettingsProvider/test/Android.mk b/packages/SettingsProvider/test/Android.mk
index a9707d4..091ba90 100644
--- a/packages/SettingsProvider/test/Android.mk
+++ b/packages/SettingsProvider/test/Android.mk
@@ -15,6 +15,7 @@
LOCAL_JAVA_LIBRARIES := legacy-android-test
LOCAL_PACKAGE_NAME := SettingsProviderTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
diff --git a/packages/SharedStorageBackup/Android.mk b/packages/SharedStorageBackup/Android.mk
index a213965f..2e07ab1 100644
--- a/packages/SharedStorageBackup/Android.mk
+++ b/packages/SharedStorageBackup/Android.mk
@@ -24,6 +24,7 @@
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_PACKAGE_NAME := SharedStorageBackup
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/Shell/Android.mk b/packages/Shell/Android.mk
index 935d09b..5713dc6 100644
--- a/packages/Shell/Android.mk
+++ b/packages/Shell/Android.mk
@@ -15,6 +15,7 @@
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4
LOCAL_PACKAGE_NAME := Shell
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/Shell/tests/Android.mk b/packages/Shell/tests/Android.mk
index 48b757c..cf60fb4 100644
--- a/packages/Shell/tests/Android.mk
+++ b/packages/Shell/tests/Android.mk
@@ -16,6 +16,7 @@
legacy-android-test \
LOCAL_PACKAGE_NAME := ShellTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_INSTRUMENTATION_FOR := Shell
diff --git a/packages/StatementService/Android.mk b/packages/StatementService/Android.mk
index 470d824..b9b29e7 100644
--- a/packages/StatementService/Android.mk
+++ b/packages/StatementService/Android.mk
@@ -22,6 +22,7 @@
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_PACKAGE_NAME := StatementService
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_PRIVILEGED_MODULE := true
LOCAL_JAVA_LIBRARIES += org.apache.http.legacy
diff --git a/packages/StatementService/src/com/android/statementservice/DirectStatementService.java b/packages/StatementService/src/com/android/statementservice/DirectStatementService.java
index 449738e..659696e 100644
--- a/packages/StatementService/src/com/android/statementservice/DirectStatementService.java
+++ b/packages/StatementService/src/com/android/statementservice/DirectStatementService.java
@@ -155,17 +155,20 @@
@Override
public void onDestroy() {
super.onDestroy();
- if (mThread != null) {
- mThread.quit();
- }
-
- try {
- if (mHttpResponseCache != null) {
- mHttpResponseCache.delete();
+ final HttpResponseCache responseCache = mHttpResponseCache;
+ mHandler.post(new Runnable() {
+ public void run() {
+ try {
+ if (responseCache != null) {
+ responseCache.delete();
+ }
+ } catch (IOException e) {
+ Log.i(TAG, "HTTP(S) response cache deletion failed:" + e);
+ }
+ Looper.myLooper().quit();
}
- } catch (IOException e) {
- Log.i(TAG, "HTTP(S) response cache deletion failed:" + e);
- }
+ });
+ mHttpResponseCache = null;
}
@Override
diff --git a/packages/SystemUI/Android.mk b/packages/SystemUI/Android.mk
index 2fd7e87..2bfd3a5 100644
--- a/packages/SystemUI/Android.mk
+++ b/packages/SystemUI/Android.mk
@@ -48,6 +48,7 @@
LOCAL_JAVA_LIBRARIES += android.car
LOCAL_PACKAGE_NAME := SystemUI
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 87971cb..9268c8f 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -108,7 +108,7 @@
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
<!-- Keyguard -->
- <uses-permission android:name="com.android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS" />
+ <uses-permission android:name="android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS" />
<uses-permission android:name="android.permission.CONTROL_KEYGUARD" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
diff --git a/packages/SystemUI/plugin/Android.mk b/packages/SystemUI/plugin/Android.mk
index e22dddb..8634684 100644
--- a/packages/SystemUI/plugin/Android.mk
+++ b/packages/SystemUI/plugin/Android.mk
@@ -32,6 +32,7 @@
# Dummy to generate .toc files.
LOCAL_PACKAGE_NAME := PluginDummyLib
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_JAVA_LIBRARIES := SystemUIPluginLib
diff --git a/packages/SystemUI/res/layout/back.xml b/packages/SystemUI/res/layout/back.xml
index 43bec91..6843db9 100644
--- a/packages/SystemUI/res/layout/back.xml
+++ b/packages/SystemUI/res/layout/back.xml
@@ -24,8 +24,8 @@
systemui:keyCode="4"
android:scaleType="fitCenter"
android:contentDescription="@string/accessibility_back"
- android:paddingTop="15dp"
- android:paddingBottom="15dp"
+ android:paddingTop="@dimen/home_padding"
+ android:paddingBottom="@dimen/home_padding"
android:paddingStart="@dimen/navigation_key_padding"
android:paddingEnd="@dimen/navigation_key_padding"
/>
diff --git a/packages/SystemUI/res/layout/recent_apps.xml b/packages/SystemUI/res/layout/recent_apps.xml
index c84d280..6b08cea 100644
--- a/packages/SystemUI/res/layout/recent_apps.xml
+++ b/packages/SystemUI/res/layout/recent_apps.xml
@@ -23,8 +23,8 @@
android:layout_weight="0"
android:scaleType="fitCenter"
android:contentDescription="@string/accessibility_recent"
- android:paddingTop="15dp"
- android:paddingBottom="15dp"
+ android:paddingTop="@dimen/home_padding"
+ android:paddingBottom="@dimen/home_padding"
android:paddingStart="@dimen/navigation_key_padding"
android:paddingEnd="@dimen/navigation_key_padding"
/>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index c8ffe8f..a16ea70 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -98,4 +98,7 @@
<!-- The offsets the tasks animate from when recents is launched while docking -->
<dimen name="recents_task_stack_animation_launched_while_docking_offset">192dp</dimen>
+
+ <!-- Home button padding for sizing -->
+ <dimen name="home_padding">0dp</dimen>
</resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 8a1e0b9..bba9ed4 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -133,6 +133,9 @@
<!-- Should "4G" be shown instead of "LTE" when the network is NETWORK_TYPE_LTE? -->
<bool name="config_show4GForLTE">true</bool>
+ <!-- Show indicator for Wifi on but not connected. -->
+ <bool name="config_showWifiIndicatorWhenEnabled">false</bool>
+
<!-- Should "LTE"/"4G" be shown instead of "LTE+"/"4G+" when on NETWORK_TYPE_LTE_CA? -->
<bool name="config_hideLtePlus">false</bool>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 9901f6f..acc8b6d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -822,8 +822,6 @@
<dimen name="default_gear_space">18dp</dimen>
<dimen name="cell_overlay_padding">18dp</dimen>
- <dimen name="signal_icon_size">17dp</dimen>
-
<dimen name="hwui_edge_margin">16dp</dimen>
<dimen name="global_actions_panel_width">120dp</dimen>
@@ -850,11 +848,6 @@
<dimen name="rounded_corner_content_padding">0dp</dimen>
<dimen name="nav_content_padding">0dp</dimen>
- <!-- Intended corner radius when drawing the mobile signal -->
- <dimen name="stat_sys_mobile_signal_corner_radius">0.75dp</dimen>
- <!-- How far to inset the rounded edges -->
- <dimen name="stat_sys_mobile_signal_circle_inset">0.9dp</dimen>
-
<!-- Home button padding for sizing -->
<dimen name="home_padding">15dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java b/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java
index 4b775a5..b8411e2 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java
@@ -608,6 +608,9 @@
public void onScanningStateChanged(boolean started) { }
@Override
public void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { }
+ @Override
+ public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice,
+ int bluetoothProfile) { }
}
private final class BluetoothErrorListener implements Utils.ErrorListener {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java b/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java
index 5f260938..e7eefe8 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java
@@ -19,12 +19,12 @@
import android.service.quicksettings.Tile;
import android.widget.ImageView;
+import com.android.settingslib.graph.SignalDrawable;
import com.android.settingslib.Utils;
import com.android.systemui.R;
import com.android.systemui.plugins.qs.QSTile.Icon;
import com.android.systemui.plugins.qs.QSTile.State;
import com.android.systemui.qs.tileimpl.QSTileImpl;
-import com.android.systemui.statusbar.phone.SignalDrawable;
import java.util.Objects;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
index 81b8622..4320b6a 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
@@ -76,6 +76,7 @@
@Override
public void handleSetListening(boolean listening) {
+ if (mController == null) return;
if (listening) {
mController.addCallback(mCallback);
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
index 9e265e22..9845c51 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
@@ -174,6 +174,7 @@
@Override
protected void handleUpdateState(BooleanState state, Object arg) {
+ if (mController == null) return;
final int zen = arg instanceof Integer ? (Integer) arg : mController.getZen();
final boolean newValue = zen != ZEN_MODE_OFF;
final boolean valueChanged = state.value != newValue;
@@ -235,6 +236,7 @@
public void handleSetListening(boolean listening) {
if (mListening == listening) return;
mListening = listening;
+ if (mController == null) return;
if (mListening) {
mController.addCallback(mZenCallback);
Prefs.registerListener(mContext, mPrefListener);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java
index b3ff4e5b..12daff1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java
@@ -98,6 +98,8 @@
protected void handleUpdateState(BooleanState state, Object arg) {
final Drawable mEnable = mContext.getDrawable(R.drawable.ic_qs_nfc_enabled);
final Drawable mDisable = mContext.getDrawable(R.drawable.ic_qs_nfc_disabled);
+
+ if (getAdapter() == null) return;
state.value = getAdapter().isEnabled();
state.label = mContext.getString(R.string.quick_settings_nfc_label);
state.icon = new DrawableIcon(state.value ? mEnable : mDisable);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java
index 2370273..fdbb260 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java
@@ -76,6 +76,7 @@
@Override
public void handleSetListening(boolean listening) {
+ if (mController == null) return;
if (listening) {
mController.addCallback(mSignalCallback);
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 274244e..ad6261b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -35,9 +35,9 @@
import android.widget.ImageView;
import android.widget.LinearLayout;
+import com.android.settingslib.graph.SignalDrawable;
import com.android.systemui.Dependency;
import com.android.systemui.R;
-import com.android.systemui.statusbar.phone.SignalDrawable;
import com.android.systemui.statusbar.phone.StatusBarIconController;
import com.android.systemui.statusbar.policy.DarkIconDispatcher;
import com.android.systemui.statusbar.policy.DarkIconDispatcher.DarkReceiver;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/ConnectedDeviceSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/ConnectedDeviceSignalController.java
index 677fa81..0304086 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/ConnectedDeviceSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/ConnectedDeviceSignalController.java
@@ -16,10 +16,10 @@
import android.util.TypedValue;
import android.view.View;
import android.widget.ImageView;
+import com.android.settingslib.graph.SignalDrawable;
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.statusbar.ScalingDrawableWrapper;
-import com.android.systemui.statusbar.phone.SignalDrawable;
import com.android.systemui.statusbar.policy.BluetoothController;
import static com.android.systemui.statusbar.phone.StatusBar.DEBUG;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
index 4e79314b..9f89fe6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
@@ -219,6 +219,11 @@
newLayout = getDefaultLayout();
}
String[] sets = newLayout.split(GRAVITY_SEPARATOR, 3);
+ if (sets.length != 3) {
+ Log.d(TAG, "Invalid layout.");
+ newLayout = getDefaultLayout();
+ sets = newLayout.split(GRAVITY_SEPARATOR, 3);
+ }
String[] start = sets[0].split(BUTTON_SEPARATOR);
String[] center = sets[1].split(BUTTON_SEPARATOR);
String[] end = sets[2].split(BUTTON_SEPARATOR);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
index 3b15c2b..fcf084b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
@@ -276,6 +276,9 @@
mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED);
}
+ @Override
+ public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) {}
+
private ActuallyCachedState getCachedState(CachedBluetoothDevice device) {
ActuallyCachedState state = mCachedState.get(device);
if (state == null) {
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 8516278..f0854ed 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -35,8 +35,8 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.cdma.EriInfo;
+import com.android.settingslib.graph.SignalDrawable;
import com.android.systemui.R;
-import com.android.systemui.statusbar.phone.SignalDrawable;
import com.android.systemui.statusbar.policy.NetworkController.IconState;
import com.android.systemui.statusbar.policy.NetworkController.SignalCallback;
import com.android.systemui.statusbar.policy.NetworkControllerImpl.Config;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
index b22ce18..0adb439 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
@@ -64,6 +64,7 @@
.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)
.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)
.removeCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED)
+ .setUids(null)
.build();
private static final int NO_NETWORK = -1;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
index 2819624..36cfe57 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
@@ -78,8 +78,10 @@
@Override
public void notifyListeners(SignalCallback callback) {
// only show wifi in the cluster if connected or if wifi-only
+ boolean visibleWhenEnabled = mContext.getResources().getBoolean(
+ R.bool.config_showWifiIndicatorWhenEnabled);
boolean wifiVisible = mCurrentState.enabled
- && (mCurrentState.connected || !mHasMobileData);
+ && (mCurrentState.connected || !mHasMobileData || visibleWhenEnabled);
String wifiDesc = wifiVisible ? mCurrentState.ssid : null;
boolean ssidPresent = wifiVisible && mCurrentState.ssid != null;
String contentDescription = getStringIfExists(getContentDescription());
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
index b08b26d..e467903 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
@@ -49,7 +49,6 @@
import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.SysUiServiceProvider;
-import com.android.systemui.keyguard.ScreenLifecycle;
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.qs.tiles.DndTile;
@@ -340,11 +339,15 @@
private boolean shouldShowUI(int flags) {
updateStatusBar();
- return mStatusBar != null
- && mStatusBar.getWakefulnessState() != WakefulnessLifecycle.WAKEFULNESS_ASLEEP
- && mStatusBar.getWakefulnessState() != WakefulnessLifecycle.WAKEFULNESS_GOING_TO_SLEEP
+ // if status bar isn't null, check if phone is in AOD, else check flags
+ // since we could be using a different status bar
+ return mStatusBar != null ?
+ mStatusBar.getWakefulnessState() != WakefulnessLifecycle.WAKEFULNESS_ASLEEP
+ && mStatusBar.getWakefulnessState() !=
+ WakefulnessLifecycle.WAKEFULNESS_GOING_TO_SLEEP
&& mStatusBar.isDeviceInteractive()
- && (flags & AudioManager.FLAG_SHOW_UI) != 0;
+ && (flags & AudioManager.FLAG_SHOW_UI) != 0
+ : (flags & AudioManager.FLAG_SHOW_UI) != 0;
}
boolean onVolumeChangedW(int stream, int flags) {
diff --git a/packages/SystemUI/tests/Android.mk b/packages/SystemUI/tests/Android.mk
index 27c16d5..fce71b9 100644
--- a/packages/SystemUI/tests/Android.mk
+++ b/packages/SystemUI/tests/Android.mk
@@ -26,6 +26,7 @@
LOCAL_PROTO_JAVA_OUTPUT_PARAMS := optional_field_style=accessors
LOCAL_PACKAGE_NAME := SystemUITests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
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 d14b23e..96d623e 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
@@ -31,14 +31,15 @@
import android.telephony.TelephonyManager;
import android.util.Log;
import com.android.internal.telephony.cdma.EriInfo;
+import com.android.settingslib.graph.SignalDrawable;
import com.android.settingslib.net.DataUsageController;
-import com.android.systemui.statusbar.phone.SignalDrawable;
+import com.android.systemui.SysuiTestCase;
+
import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
import com.android.systemui.statusbar.policy.NetworkController.IconState;
import com.android.systemui.statusbar.policy.NetworkController.SignalCallback;
import com.android.systemui.statusbar.policy.NetworkControllerImpl.Config;
import com.android.systemui.statusbar.policy.NetworkControllerImpl.SubscriptionDefaults;
-import com.android.systemui.SysuiTestCase;
import org.junit.Before;
import org.junit.Rule;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java
index 173cc4c..d5294ee 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java
@@ -28,9 +28,9 @@
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyIntents;
+import com.android.settingslib.graph.SignalDrawable;
import com.android.settingslib.net.DataUsageController;
import com.android.systemui.R;
-import com.android.systemui.statusbar.phone.SignalDrawable;
import org.junit.Ignore;
import org.junit.Test;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SecurityControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SecurityControllerTest.java
index 7ca9d73..f76de5a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SecurityControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SecurityControllerTest.java
@@ -19,11 +19,15 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.argThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
@@ -32,6 +36,9 @@
import android.content.pm.StringParceledListSlice;
import android.content.pm.UserInfo;
import android.net.ConnectivityManager;
+import android.net.ConnectivityManager.NetworkCallback;
+import android.net.NetworkCapabilities;
+import android.net.NetworkRequest;
import android.os.UserManager;
import android.security.IKeyChainService;
import android.support.test.runner.AndroidJUnit4;
@@ -61,6 +68,7 @@
private final UserManager mUserManager = mock(UserManager.class);
private SecurityControllerImpl mSecurityController;
private CountDownLatch mStateChangedLatch;
+ private ConnectivityManager mConnectivityManager = mock(ConnectivityManager.class);
// implementing SecurityControllerCallback
@Override
@@ -72,7 +80,7 @@
public void setUp() throws Exception {
mContext.addMockSystemService(Context.DEVICE_POLICY_SERVICE, mDevicePolicyManager);
mContext.addMockSystemService(Context.USER_SERVICE, mUserManager);
- mContext.addMockSystemService(Context.CONNECTIVITY_SERVICE, mock(ConnectivityManager.class));
+ mContext.addMockSystemService(Context.CONNECTIVITY_SERVICE, mConnectivityManager);
Intent intent = new Intent(IKeyChainService.class.getName());
ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0);
@@ -176,4 +184,12 @@
//assertTrue(mStateChangedLatch.await(31, TimeUnit.SECONDS));
//assertFalse(mSecurityController.hasCACertInCurrentUser());
}
+
+ @Test
+ public void testNetworkRequest() {
+ verify(mConnectivityManager, times(1)).registerNetworkCallback(argThat(
+ (NetworkRequest request) -> request.networkCapabilities.getUids() == null
+ && request.networkCapabilities.getCapabilities().length == 0
+ ), any(NetworkCallback.class));
+ }
}
diff --git a/packages/VpnDialogs/Android.mk b/packages/VpnDialogs/Android.mk
index 4c80a26..8507646 100644
--- a/packages/VpnDialogs/Android.mk
+++ b/packages/VpnDialogs/Android.mk
@@ -27,5 +27,6 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := VpnDialogs
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/packages/WAPPushManager/Android.mk b/packages/WAPPushManager/Android.mk
index 60f093f..91526dd 100644
--- a/packages/WAPPushManager/Android.mk
+++ b/packages/WAPPushManager/Android.mk
@@ -9,6 +9,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := WAPPushManager
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_JAVA_LIBRARIES += telephony-common
LOCAL_STATIC_JAVA_LIBRARIES += android-common
diff --git a/packages/WAPPushManager/src/com/android/smspush/WapPushManager.java b/packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
old mode 100644
new mode 100755
index e970367..dc2707b
--- a/packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
+++ b/packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
@@ -22,11 +22,15 @@
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
import android.database.Cursor;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase;
+import android.os.Build;
import android.os.IBinder;
+import android.os.PowerManager;
import android.os.RemoteException;
import android.util.Log;
@@ -216,7 +220,27 @@
intent.setClassName(mContext, lastapp.className);
intent.setComponent(new ComponentName(lastapp.packageName,
lastapp.className));
- if (mContext.startService(intent) == null) {
+ PackageManager pm = mContext.getPackageManager();
+ PowerManager powerManager =
+ (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
+ try {
+ ApplicationInfo appInfo = pm.getApplicationInfo(lastapp.packageName, 0);
+ if (appInfo.targetSdkVersion < Build.VERSION_CODES.O ||
+ powerManager.isIgnoringBatteryOptimizations(lastapp.packageName)) {
+ if (mContext.startService(intent) == null) {
+ Log.w(LOG_TAG, "invalid name " +
+ lastapp.packageName + "/" + lastapp.className);
+ return WapPushManagerParams.INVALID_RECEIVER_NAME;
+ }
+ } else {
+ if (mContext.startForegroundService(intent) == null) {
+ Log.w(LOG_TAG, "invalid name " +
+ lastapp.packageName + "/" + lastapp.className);
+ return WapPushManagerParams.INVALID_RECEIVER_NAME;
+ }
+ }
+
+ } catch (NameNotFoundException e) {
Log.w(LOG_TAG, "invalid name " +
lastapp.packageName + "/" + lastapp.className);
return WapPushManagerParams.INVALID_RECEIVER_NAME;
diff --git a/packages/WAPPushManager/tests/Android.mk b/packages/WAPPushManager/tests/Android.mk
index 1dea798..8ad0018 100644
--- a/packages/WAPPushManager/tests/Android.mk
+++ b/packages/WAPPushManager/tests/Android.mk
@@ -32,6 +32,7 @@
# automatically get all of its classes loaded into our environment.
LOCAL_PACKAGE_NAME := WAPPushManagerTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_INSTRUMENTATION_FOR := WAPPushManager
diff --git a/packages/WallpaperBackup/Android.mk b/packages/WallpaperBackup/Android.mk
index cf04249..a6426a6 100644
--- a/packages/WallpaperBackup/Android.mk
+++ b/packages/WallpaperBackup/Android.mk
@@ -24,6 +24,7 @@
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_PACKAGE_NAME := WallpaperBackup
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := false
diff --git a/packages/WallpaperCropper/Android.mk b/packages/WallpaperCropper/Android.mk
index 0254673..e0a0ef41 100644
--- a/packages/WallpaperCropper/Android.mk
+++ b/packages/WallpaperCropper/Android.mk
@@ -8,6 +8,7 @@
LOCAL_JAVA_LIBRARIES := telephony-common
LOCAL_PACKAGE_NAME := WallpaperCropper
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/packages/overlays/SysuiDarkThemeOverlay/Android.mk b/packages/overlays/SysuiDarkThemeOverlay/Android.mk
index 4b83058..7b277bc 100644
--- a/packages/overlays/SysuiDarkThemeOverlay/Android.mk
+++ b/packages/overlays/SysuiDarkThemeOverlay/Android.mk
@@ -9,5 +9,6 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := SysuiDarkThemeOverlay
+LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/services/PacProcessor/Android.mk b/packages/services/PacProcessor/Android.mk
index 3c4e951..75d0363 100644
--- a/packages/services/PacProcessor/Android.mk
+++ b/packages/services/PacProcessor/Android.mk
@@ -23,9 +23,10 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := PacProcessor
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
-LOCAL_JNI_SHARED_LIBRARIES := libjni_pacprocessor
+LOCAL_JNI_SHARED_LIBRARIES := libjni_pacprocessor libpac
include $(BUILD_PACKAGE)
diff --git a/packages/services/Proxy/Android.mk b/packages/services/Proxy/Android.mk
index d5546b2..ce1715f 100644
--- a/packages/services/Proxy/Android.mk
+++ b/packages/services/Proxy/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := ProxyHandler
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
diff --git a/proto/Android.bp b/proto/Android.bp
index 95f453c..f3811bd 100644
--- a/proto/Android.bp
+++ b/proto/Android.bp
@@ -6,6 +6,8 @@
},
srcs: ["src/**/*.proto"],
no_framework_libs: true,
+ // Pin java_version until jarjar is certified to support later versions. http://b/72703434
+ java_version: "1.8",
target: {
android: {
jarjar_rules: "jarjar-rules.txt",
diff --git a/sax/tests/saxtests/Android.mk b/sax/tests/saxtests/Android.mk
index d3fbd05..f029498 100644
--- a/sax/tests/saxtests/Android.mk
+++ b/sax/tests/saxtests/Android.mk
@@ -10,6 +10,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := FrameworksSaxTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/services/art-profile b/services/art-profile
index ae5c909..57eee06 100644
--- a/services/art-profile
+++ b/services/art-profile
@@ -10706,7 +10706,6 @@
PLcom/android/server/location/CountryDetectorBase;-><init>(Landroid/content/Context;)V
PLcom/android/server/location/CountryDetectorBase;->notifyListener(Landroid/location/Country;)V
PLcom/android/server/location/CountryDetectorBase;->setCountryListener(Landroid/location/CountryListener;)V
-PLcom/android/server/location/FlpHardwareProvider;->isSupported()Z
PLcom/android/server/location/GeocoderProxy;-><init>(Landroid/content/Context;IIILandroid/os/Handler;)V
PLcom/android/server/location/GeocoderProxy;->bind()Z
PLcom/android/server/location/GeocoderProxy;->createAndBind(Landroid/content/Context;IIILandroid/os/Handler;)Lcom/android/server/location/GeocoderProxy;
diff --git a/services/autofill/java/com/android/server/autofill/RemoteFillService.java b/services/autofill/java/com/android/server/autofill/RemoteFillService.java
index af55807..93df507 100644
--- a/services/autofill/java/com/android/server/autofill/RemoteFillService.java
+++ b/services/autofill/java/com/android/server/autofill/RemoteFillService.java
@@ -342,7 +342,8 @@
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
if (mDestroyed || !mBinding) {
- mContext.unbindService(mServiceConnection);
+ // This is abnormal. Unbinding the connection has been requested already.
+ Slog.wtf(LOG_TAG, "onServiceConnected was dispatched after unbindService.");
return;
}
mBinding = false;
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 2077790..378357e 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -21,6 +21,7 @@
import android.app.AppGlobals;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothProfile;
+import android.bluetooth.BluetoothProtoEnums;
import android.bluetooth.IBluetooth;
import android.bluetooth.IBluetoothCallback;
import android.bluetooth.IBluetoothGatt;
@@ -59,6 +60,7 @@
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.util.Slog;
+import android.util.StatsLog;
import com.android.internal.R;
import com.android.internal.util.DumpUtils;
@@ -87,14 +89,6 @@
private static final int ACTIVE_LOG_MAX_SIZE = 20;
private static final int CRASH_LOG_MAX_SIZE = 100;
- private static final String REASON_AIRPLANE_MODE = "airplane mode";
- private static final String REASON_DISALLOWED = "disallowed by system";
- private static final String REASON_RESTARTED = "automatic restart";
- private static final String REASON_START_CRASH = "turn-on crash";
- private static final String REASON_SYSTEM_BOOT = "system boot";
- private static final String REASON_UNEXPECTED = "unexpected crash";
- private static final String REASON_USER_SWITCH = "user switch";
- private static final String REASON_RESTORE_USER_SETTING = "restore user setting";
private static final int TIMEOUT_BIND_MS = 3000; //Maximum msec to wait for a bind
//Maximum msec to wait for service restart
@@ -163,7 +157,7 @@
private boolean mQuietEnable = false;
private boolean mEnable;
- private CharSequence timeToLog(long timestamp) {
+ private static CharSequence timeToLog(long timestamp) {
return android.text.format.DateFormat.format("MM-dd HH:mm:ss", timestamp);
}
@@ -171,29 +165,27 @@
* Used for tracking apps that enabled / disabled Bluetooth.
*/
private class ActiveLog {
+ private int mReason;
private String mPackageName;
private boolean mEnable;
private long mTimestamp;
- ActiveLog(String packageName, boolean enable, long timestamp) {
+ ActiveLog(int reason, String packageName, boolean enable, long timestamp) {
+ mReason = reason;
mPackageName = packageName;
mEnable = enable;
mTimestamp = timestamp;
}
- public long getTime() {
- return mTimestamp;
- }
-
public String toString() {
- return timeToLog(mTimestamp) + (mEnable ? " Enabled " : " Disabled ") + " by "
- + mPackageName;
+ return timeToLog(mTimestamp) + (mEnable ? " Enabled " : " Disabled ")
+ + " due to " + getEnableDisableReasonString(mReason) + " by " + mPackageName;
}
}
- private LinkedList<ActiveLog> mActiveLogs;
- private LinkedList<Long> mCrashTimestamps;
+ private final LinkedList<ActiveLog> mActiveLogs = new LinkedList<>();
+ private final LinkedList<Long> mCrashTimestamps = new LinkedList<>();
private int mCrashes;
private long mLastEnabledTime;
@@ -213,8 +205,7 @@
// Save a ProfileServiceConnections object for each of the bound
// bluetooth profile services
- private final Map<Integer, ProfileServiceConnections> mProfileServices =
- new HashMap<Integer, ProfileServiceConnections>();
+ private final Map<Integer, ProfileServiceConnections> mProfileServices = new HashMap<>();
private final boolean mPermissionReviewRequired;
@@ -246,7 +237,8 @@
if (userId == UserHandle.USER_SYSTEM && newRestrictions.getBoolean(
UserManager.DISALLOW_BLUETOOTH)) {
updateOppLauncherComponentState(userId, true); // Sharing disallowed
- sendDisableMsg(REASON_DISALLOWED);
+ sendDisableMsg(BluetoothProtoEnums.ENABLE_DISABLE_REASON_DISALLOWED,
+ mContext.getPackageName());
} else {
updateOppLauncherComponentState(userId, newRestrictions.getBoolean(
UserManager.DISALLOW_BLUETOOTH_SHARING));
@@ -293,6 +285,9 @@
try {
mBluetoothLock.readLock().lock();
if (mBluetooth != null) {
+ addActiveLog(
+ BluetoothProtoEnums.ENABLE_DISABLE_REASON_AIRPLANE_MODE,
+ mContext.getPackageName(), false);
mBluetooth.onBrEdrDown();
mEnable = false;
mEnableExternal = false;
@@ -303,10 +298,13 @@
mBluetoothLock.readLock().unlock();
}
} else if (st == BluetoothAdapter.STATE_ON) {
- sendDisableMsg(REASON_AIRPLANE_MODE);
+ sendDisableMsg(BluetoothProtoEnums.ENABLE_DISABLE_REASON_AIRPLANE_MODE,
+ mContext.getPackageName());
}
} else if (mEnableExternal) {
- sendEnableMsg(mQuietEnableExternal, REASON_AIRPLANE_MODE);
+ sendEnableMsg(mQuietEnableExternal,
+ BluetoothProtoEnums.ENABLE_DISABLE_REASON_AIRPLANE_MODE,
+ mContext.getPackageName());
}
}
}
@@ -369,8 +367,6 @@
mPermissionReviewRequired = context.getResources()
.getBoolean(com.android.internal.R.bool.config_permissionReviewRequired);
- mActiveLogs = new LinkedList<ActiveLog>();
- mCrashTimestamps = new LinkedList<Long>();
mCrashes = 0;
mBluetooth = null;
mBluetoothBinder = null;
@@ -640,23 +636,14 @@
if (DBG) {
Slog.d(TAG, "Binder is dead - unregister " + mPackageName);
}
- if (isBleAppPresent()) {
- // Nothing to do, another app is here.
- return;
- }
- if (DBG) {
- Slog.d(TAG, "Disabling LE only mode after application crash");
- }
- try {
- mBluetoothLock.readLock().lock();
- if (mBluetooth != null && mBluetooth.getState() == BluetoothAdapter.STATE_BLE_ON) {
- mEnable = false;
- mBluetooth.onBrEdrDown();
+
+ for (Map.Entry<IBinder, ClientDeathRecipient> entry : mBleApps.entrySet()) {
+ IBinder token = entry.getKey();
+ ClientDeathRecipient deathRec = entry.getValue();
+ if (deathRec.equals(this)) {
+ updateBleAppCount(token, false, mPackageName);
+ break;
}
- } catch (RemoteException e) {
- Slog.e(TAG, "Unable to call onBrEdrDown", e);
- } finally {
- mBluetoothLock.readLock().unlock();
}
}
@@ -671,8 +658,8 @@
return false;
}
try {
- return (Settings.Global.getInt(mContentResolver,
- Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE)) != 0;
+ return Settings.Global.getInt(mContentResolver,
+ Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE) != 0;
} catch (SettingNotFoundException e) {
}
return false;
@@ -693,6 +680,8 @@
try {
mBluetoothLock.readLock().lock();
if (mBluetooth != null) {
+ addActiveLog(BluetoothProtoEnums.ENABLE_DISABLE_REASON_APPLICATION_REQUEST,
+ mContext.getPackageName(), false);
mBluetooth.onBrEdrDown();
}
} catch (RemoteException e) {
@@ -773,26 +762,16 @@
}
/**
- * Action taken when GattService is turned on
+ * Call IBluetooth.onLeServiceUp() to continue if Bluetooth should be on.
*/
- private void onBluetoothGattServiceUp() {
+ private void continueFromBleOnState() {
if (DBG) {
- Slog.d(TAG, "BluetoothGatt Service is Up");
+ Slog.d(TAG, "continueFromBleOnState()");
}
try {
mBluetoothLock.readLock().lock();
if (mBluetooth == null) {
- if (DBG) {
- Slog.w(TAG, "onBluetoothServiceUp: mBluetooth is null!");
- }
- return;
- }
- int st = mBluetooth.getState();
- if (st != BluetoothAdapter.STATE_BLE_ON) {
- if (DBG) {
- Slog.v(TAG, "onBluetoothServiceUp: state isn't BLE_ON: "
- + BluetoothAdapter.nameForState(st));
- }
+ Slog.e(TAG, "onBluetoothServiceUp: mBluetooth is null!");
return;
}
if (isBluetoothPersistedStateOnBluetooth() || !isBleAppPresent()) {
@@ -867,7 +846,8 @@
synchronized (mReceiver) {
mQuietEnableExternal = true;
mEnableExternal = true;
- sendEnableMsg(true, packageName);
+ sendEnableMsg(true,
+ BluetoothProtoEnums.ENABLE_DISABLE_REASON_APPLICATION_REQUEST, packageName);
}
return true;
}
@@ -907,7 +887,8 @@
mQuietEnableExternal = false;
mEnableExternal = true;
// waive WRITE_SECURE_SETTINGS permission check
- sendEnableMsg(false, packageName);
+ sendEnableMsg(false,
+ BluetoothProtoEnums.ENABLE_DISABLE_REASON_APPLICATION_REQUEST, packageName);
}
if (DBG) {
Slog.d(TAG, "enable returning");
@@ -943,7 +924,8 @@
persistBluetoothSetting(BLUETOOTH_OFF);
}
mEnableExternal = false;
- sendDisableMsg(packageName);
+ sendDisableMsg(BluetoothProtoEnums.ENABLE_DISABLE_REASON_APPLICATION_REQUEST,
+ packageName);
}
return true;
}
@@ -1103,7 +1085,9 @@
if (DBG) {
Slog.d(TAG, "Auto-enabling Bluetooth.");
}
- sendEnableMsg(mQuietEnableExternal, REASON_SYSTEM_BOOT);
+ sendEnableMsg(mQuietEnableExternal,
+ BluetoothProtoEnums.ENABLE_DISABLE_REASON_SYSTEM_BOOT,
+ mContext.getPackageName());
} else if (!isNameAndAddressSet()) {
if (DBG) {
Slog.d(TAG, "Getting adapter name and address");
@@ -1545,20 +1529,25 @@
break;
case MESSAGE_RESTORE_USER_SETTING:
- try {
- if ((msg.arg1 == RESTORE_SETTING_TO_OFF) && mEnable) {
- if (DBG) {
- Slog.d(TAG, "Restore Bluetooth state to disabled");
- }
- disable(REASON_RESTORE_USER_SETTING, true);
- } else if ((msg.arg1 == RESTORE_SETTING_TO_ON) && !mEnable) {
- if (DBG) {
- Slog.d(TAG, "Restore Bluetooth state to enabled");
- }
- enable(REASON_RESTORE_USER_SETTING);
+ if ((msg.arg1 == RESTORE_SETTING_TO_OFF) && mEnable) {
+ if (DBG) {
+ Slog.d(TAG, "Restore Bluetooth state to disabled");
}
- } catch (RemoteException e) {
- Slog.e(TAG, "Unable to change Bluetooth On setting", e);
+ persistBluetoothSetting(BLUETOOTH_OFF);
+ mEnableExternal = false;
+ sendDisableMsg(
+ BluetoothProtoEnums.ENABLE_DISABLE_REASON_RESTORE_USER_SETTING,
+ mContext.getPackageName());
+ } else if ((msg.arg1 == RESTORE_SETTING_TO_ON) && !mEnable) {
+ if (DBG) {
+ Slog.d(TAG, "Restore Bluetooth state to enabled");
+ }
+ mQuietEnableExternal = false;
+ mEnableExternal = true;
+ // waive WRITE_SECURE_SETTINGS permission check
+ sendEnableMsg(false,
+ BluetoothProtoEnums.ENABLE_DISABLE_REASON_RESTORE_USER_SETTING,
+ mContext.getPackageName());
}
break;
@@ -1585,7 +1574,7 @@
break;
}
case MESSAGE_ADD_PROXY_DELAYED: {
- ProfileServiceConnections psc = mProfileServices.get(new Integer(msg.arg1));
+ ProfileServiceConnections psc = mProfileServices.get(msg.arg1);
if (psc == null) {
break;
}
@@ -1614,7 +1603,7 @@
if (msg.arg1 == SERVICE_IBLUETOOTHGATT) {
mBluetoothGatt =
IBluetoothGatt.Stub.asInterface(Binder.allowBlocking(service));
- onBluetoothGattServiceUp();
+ continueFromBleOnState();
break;
} // else must be SERVICE_IBLUETOOTH
@@ -1734,7 +1723,8 @@
// log the unexpected crash
addCrashLog();
- addActiveLog(REASON_UNEXPECTED, false);
+ addActiveLog(BluetoothProtoEnums.ENABLE_DISABLE_REASON_CRASH,
+ mContext.getPackageName(), false);
if (mEnable) {
mEnable = false;
// Send a Bluetooth Restart message
@@ -1768,7 +1758,8 @@
it doesnt change when IBluetooth
service restarts */
mEnable = true;
- addActiveLog(REASON_RESTARTED, true);
+ addActiveLog(BluetoothProtoEnums.ENABLE_DISABLE_REASON_RESTARTED,
+ mContext.getPackageName(), true);
handleEnable(mQuietEnable);
break;
}
@@ -1824,7 +1815,8 @@
unbindAllBluetoothProfileServices();
// disable
- addActiveLog(REASON_USER_SWITCH, false);
+ addActiveLog(BluetoothProtoEnums.ENABLE_DISABLE_REASON_USER_SWITCH,
+ mContext.getPackageName(), false);
handleDisable();
// Pbap service need receive STATE_TURNING_OFF intent to close
bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
@@ -1862,7 +1854,8 @@
mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
mState = BluetoothAdapter.STATE_OFF;
// enable
- addActiveLog(REASON_USER_SWITCH, true);
+ addActiveLog(BluetoothProtoEnums.ENABLE_DISABLE_REASON_USER_SWITCH,
+ mContext.getPackageName(), true);
// mEnable flag could have been reset on disableBLE. Reenable it.
mEnable = true;
handleEnable(mQuietEnable);
@@ -2027,21 +2020,16 @@
if (DBG) {
Slog.d(TAG, "Bluetooth is in LE only mode");
}
- if (mBluetoothGatt != null) {
- if (DBG) {
- Slog.d(TAG, "Calling BluetoothGattServiceUp");
- }
- onBluetoothGattServiceUp();
+ if (mBluetoothGatt != null || !mContext.getPackageManager()
+ .hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
+ continueFromBleOnState();
} else {
if (DBG) {
Slog.d(TAG, "Binding Bluetooth GATT service");
}
- if (mContext.getPackageManager()
- .hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
- Intent i = new Intent(IBluetoothGatt.class.getName());
- doBind(i, mConnection, Context.BIND_AUTO_CREATE | Context.BIND_IMPORTANT,
- UserHandle.CURRENT);
- }
+ Intent i = new Intent(IBluetoothGatt.class.getName());
+ doBind(i, mConnection, Context.BIND_AUTO_CREATE | Context.BIND_IMPORTANT,
+ UserHandle.CURRENT);
}
sendBleStateChanged(prevState, newState);
//Don't broadcase this as std intent
@@ -2129,24 +2117,30 @@
return false;
}
- private void sendDisableMsg(String packageName) {
+ private void sendDisableMsg(int reason, String packageName) {
mHandler.sendMessage(mHandler.obtainMessage(MESSAGE_DISABLE));
- addActiveLog(packageName, false);
+ addActiveLog(reason, packageName, false);
}
- private void sendEnableMsg(boolean quietMode, String packageName) {
+ private void sendEnableMsg(boolean quietMode, int reason, String packageName) {
mHandler.sendMessage(mHandler.obtainMessage(MESSAGE_ENABLE, quietMode ? 1 : 0, 0));
- addActiveLog(packageName, true);
+ addActiveLog(reason, packageName, true);
mLastEnabledTime = SystemClock.elapsedRealtime();
}
- private void addActiveLog(String packageName, boolean enable) {
+ private void addActiveLog(int reason, String packageName, boolean enable) {
synchronized (mActiveLogs) {
if (mActiveLogs.size() > ACTIVE_LOG_MAX_SIZE) {
mActiveLogs.remove();
}
- mActiveLogs.add(new ActiveLog(packageName, enable, System.currentTimeMillis()));
+ mActiveLogs.add(
+ new ActiveLog(reason, packageName, enable, System.currentTimeMillis()));
}
+
+ int state = enable ? StatsLog.BLUETOOTH_ENABLED_STATE_CHANGED__STATE__ENABLED :
+ StatsLog.BLUETOOTH_ENABLED_STATE_CHANGED__STATE__DISABLED;
+ StatsLog.write_non_chained(StatsLog.BLUETOOTH_ENABLED_STATE_CHANGED,
+ Binder.getCallingUid(), null, state, reason, packageName);
}
private void addCrashLog() {
@@ -2176,7 +2170,8 @@
SystemClock.sleep(500);
// disable
- addActiveLog(REASON_START_CRASH, false);
+ addActiveLog(BluetoothProtoEnums.ENABLE_DISABLE_REASON_START_ERROR,
+ mContext.getPackageName(), false);
handleDisable();
waitForOnOff(false, true);
@@ -2320,4 +2315,29 @@
writer.println(errorMsg);
}
}
+
+ private static String getEnableDisableReasonString(int reason) {
+ switch (reason) {
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_APPLICATION_REQUEST:
+ return "APPLICATION_REQUEST";
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_AIRPLANE_MODE:
+ return "AIRPLANE_MODE";
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_DISALLOWED:
+ return "DISALLOWED";
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_RESTARTED:
+ return "RESTARTED";
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_START_ERROR:
+ return "START_ERROR";
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_SYSTEM_BOOT:
+ return "SYSTEM_BOOT";
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_CRASH:
+ return "CRASH";
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_USER_SWITCH:
+ return "USER_SWITCH";
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_RESTORE_USER_SETTING:
+ return "RESTORE_USER_SETTING";
+ case BluetoothProtoEnums.ENABLE_DISABLE_REASON_UNSPECIFIED:
+ default: return "UNKNOWN[" + reason + "]";
+ }
+ }
}
diff --git a/services/core/java/com/android/server/CommonTimeManagementService.java b/services/core/java/com/android/server/CommonTimeManagementService.java
deleted file mode 100644
index 5cebfa5..0000000
--- a/services/core/java/com/android/server/CommonTimeManagementService.java
+++ /dev/null
@@ -1,364 +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.
- */
-
-package com.android.server;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager;
-import android.net.ConnectivityManager;
-import android.net.INetworkManagementEventObserver;
-import android.net.InterfaceConfiguration;
-import android.os.Binder;
-import android.os.CommonTimeConfig;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.INetworkManagementService;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.SystemProperties;
-import android.util.Log;
-
-import com.android.internal.util.DumpUtils;
-import com.android.server.net.BaseNetworkObserver;
-
-/**
- * @hide
- * <p>CommonTimeManagementService manages the configuration of the native Common Time service,
- * reconfiguring the native service as appropriate in response to changes in network configuration.
- */
-class CommonTimeManagementService extends Binder {
- /*
- * Constants and globals.
- */
- private static final String TAG = CommonTimeManagementService.class.getSimpleName();
- private static final int NATIVE_SERVICE_RECONNECT_TIMEOUT = 5000;
- private static final String AUTO_DISABLE_PROP = "ro.common_time.auto_disable";
- private static final String ALLOW_WIFI_PROP = "ro.common_time.allow_wifi";
- private static final String SERVER_PRIO_PROP = "ro.common_time.server_prio";
- private static final String NO_INTERFACE_TIMEOUT_PROP = "ro.common_time.no_iface_timeout";
- private static final boolean AUTO_DISABLE;
- private static final boolean ALLOW_WIFI;
- private static final byte BASE_SERVER_PRIO;
- private static final int NO_INTERFACE_TIMEOUT;
- private static final InterfaceScoreRule[] IFACE_SCORE_RULES;
-
- static {
- int tmp;
- AUTO_DISABLE = (0 != SystemProperties.getInt(AUTO_DISABLE_PROP, 1));
- ALLOW_WIFI = (0 != SystemProperties.getInt(ALLOW_WIFI_PROP, 0));
- tmp = SystemProperties.getInt(SERVER_PRIO_PROP, 1);
- NO_INTERFACE_TIMEOUT = SystemProperties.getInt(NO_INTERFACE_TIMEOUT_PROP, 60000);
-
- if (tmp < 1)
- BASE_SERVER_PRIO = 1;
- else
- if (tmp > 30)
- BASE_SERVER_PRIO = 30;
- else
- BASE_SERVER_PRIO = (byte)tmp;
-
- if (ALLOW_WIFI) {
- IFACE_SCORE_RULES = new InterfaceScoreRule[] {
- new InterfaceScoreRule("wlan", (byte)1),
- new InterfaceScoreRule("eth", (byte)2),
- };
- } else {
- IFACE_SCORE_RULES = new InterfaceScoreRule[] {
- new InterfaceScoreRule("eth", (byte)2),
- };
- }
- };
-
- /*
- * Internal state
- */
- private final Context mContext;
- private final Object mLock = new Object();
- private INetworkManagementService mNetMgr;
- private CommonTimeConfig mCTConfig;
- private String mCurIface;
- private Handler mReconnectHandler = new Handler();
- private Handler mNoInterfaceHandler = new Handler();
- private boolean mDetectedAtStartup = false;
- private byte mEffectivePrio = BASE_SERVER_PRIO;
-
- /*
- * Callback handler implementations.
- */
- private INetworkManagementEventObserver mIfaceObserver = new BaseNetworkObserver() {
- @Override
- public void interfaceStatusChanged(String iface, boolean up) {
- reevaluateServiceState();
- }
- @Override
- public void interfaceLinkStateChanged(String iface, boolean up) {
- reevaluateServiceState();
- }
- @Override
- public void interfaceAdded(String iface) {
- reevaluateServiceState();
- }
- @Override
- public void interfaceRemoved(String iface) {
- reevaluateServiceState();
- }
- };
-
- private BroadcastReceiver mConnectivityMangerObserver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- reevaluateServiceState();
- }
- };
-
- private CommonTimeConfig.OnServerDiedListener mCTServerDiedListener =
- () -> scheduleTimeConfigReconnect();
-
- private Runnable mReconnectRunnable = () -> connectToTimeConfig();
-
- private Runnable mNoInterfaceRunnable = () -> handleNoInterfaceTimeout();
-
- /*
- * Public interface (constructor, systemReady and dump)
- */
- public CommonTimeManagementService(Context context) {
- mContext = context;
- }
-
- void systemRunning() {
- if (ServiceManager.checkService(CommonTimeConfig.SERVICE_NAME) == null) {
- Log.i(TAG, "No common time service detected on this platform. " +
- "Common time services will be unavailable.");
- return;
- }
-
- mDetectedAtStartup = true;
-
- IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
- mNetMgr = INetworkManagementService.Stub.asInterface(b);
-
- // Network manager is running along-side us, so we should never receiver a remote exception
- // while trying to register this observer.
- try {
- mNetMgr.registerObserver(mIfaceObserver);
- }
- catch (RemoteException e) { }
-
- // Register with the connectivity manager for connectivity changed intents.
- IntentFilter filter = new IntentFilter();
- filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
- mContext.registerReceiver(mConnectivityMangerObserver, filter);
-
- // Connect to the common time config service and apply the initial configuration.
- connectToTimeConfig();
- }
-
- @Override
- protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
- if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
-
- if (!mDetectedAtStartup) {
- pw.println("Native Common Time service was not detected at startup. " +
- "Service is unavailable");
- return;
- }
-
- synchronized (mLock) {
- pw.println("Current Common Time Management Service Config:");
- pw.println(String.format(" Native service : %s",
- (null == mCTConfig) ? "reconnecting"
- : "alive"));
- pw.println(String.format(" Bound interface : %s",
- (null == mCurIface ? "unbound" : mCurIface)));
- pw.println(String.format(" Allow WiFi : %s", ALLOW_WIFI ? "yes" : "no"));
- pw.println(String.format(" Allow Auto Disable : %s", AUTO_DISABLE ? "yes" : "no"));
- pw.println(String.format(" Server Priority : %d", mEffectivePrio));
- pw.println(String.format(" No iface timeout : %d", NO_INTERFACE_TIMEOUT));
- }
- }
-
- /*
- * Inner helper classes
- */
- private static class InterfaceScoreRule {
- public final String mPrefix;
- public final byte mScore;
- public InterfaceScoreRule(String prefix, byte score) {
- mPrefix = prefix;
- mScore = score;
- }
- };
-
- /*
- * Internal implementation
- */
- private void cleanupTimeConfig() {
- mReconnectHandler.removeCallbacks(mReconnectRunnable);
- mNoInterfaceHandler.removeCallbacks(mNoInterfaceRunnable);
- if (null != mCTConfig) {
- mCTConfig.release();
- mCTConfig = null;
- }
- }
-
- private void connectToTimeConfig() {
- // Get access to the common time service configuration interface. If we catch a remote
- // exception in the process (service crashed or no running for w/e reason), schedule an
- // attempt to reconnect in the future.
- cleanupTimeConfig();
- try {
- synchronized (mLock) {
- mCTConfig = new CommonTimeConfig();
- mCTConfig.setServerDiedListener(mCTServerDiedListener);
- mCurIface = mCTConfig.getInterfaceBinding();
- mCTConfig.setAutoDisable(AUTO_DISABLE);
- mCTConfig.setMasterElectionPriority(mEffectivePrio);
- }
-
- if (NO_INTERFACE_TIMEOUT >= 0)
- mNoInterfaceHandler.postDelayed(mNoInterfaceRunnable, NO_INTERFACE_TIMEOUT);
-
- reevaluateServiceState();
- }
- catch (RemoteException e) {
- scheduleTimeConfigReconnect();
- }
- }
-
- private void scheduleTimeConfigReconnect() {
- cleanupTimeConfig();
- Log.w(TAG, String.format("Native service died, will reconnect in %d mSec",
- NATIVE_SERVICE_RECONNECT_TIMEOUT));
- mReconnectHandler.postDelayed(mReconnectRunnable,
- NATIVE_SERVICE_RECONNECT_TIMEOUT);
- }
-
- private void handleNoInterfaceTimeout() {
- if (null != mCTConfig) {
- Log.i(TAG, "Timeout waiting for interface to come up. " +
- "Forcing networkless master mode.");
- if (CommonTimeConfig.ERROR_DEAD_OBJECT == mCTConfig.forceNetworklessMasterMode())
- scheduleTimeConfigReconnect();
- }
- }
-
- private void reevaluateServiceState() {
- String bindIface = null;
- byte bestScore = -1;
- try {
- // Check to see if this interface is suitable to use for time synchronization.
- //
- // TODO : This selection algorithm needs to be enhanced for use with mobile devices. In
- // particular, the choice of whether to a wireless interface or not should not be an all
- // or nothing thing controlled by properties. It would probably be better if the
- // platform had some concept of public wireless networks vs. home or friendly wireless
- // networks (something a user would configure in settings or when a new interface is
- // added). Then this algorithm could pick only wireless interfaces which were flagged
- // as friendly, and be dormant when on public wireless networks.
- //
- // Another issue which needs to be dealt with is the use of driver supplied interface
- // name to determine the network type. The fact that the wireless interface on a device
- // is named "wlan0" is just a matter of convention; its not a 100% rule. For example,
- // there are devices out there where the wireless is name "tiwlan0", not "wlan0". The
- // internal network management interfaces in Android have all of the information needed
- // to make a proper classification, there is just no way (currently) to fetch an
- // interface's type (available from the ConnectionManager) as well as its address
- // (available from either the java.net interfaces or from the NetworkManagment service).
- // Both can enumerate interfaces, but that is no way to correlate their results (no
- // common shared key; although using the interface name in the connection manager would
- // be a good start). Until this gets resolved, we resort to substring searching for
- // tags like wlan and eth.
- //
- String ifaceList[] = mNetMgr.listInterfaces();
- if (null != ifaceList) {
- for (String iface : ifaceList) {
-
- byte thisScore = -1;
- for (InterfaceScoreRule r : IFACE_SCORE_RULES) {
- if (iface.contains(r.mPrefix)) {
- thisScore = r.mScore;
- break;
- }
- }
-
- if (thisScore <= bestScore)
- continue;
-
- InterfaceConfiguration config = mNetMgr.getInterfaceConfig(iface);
- if (null == config)
- continue;
-
- if (config.isActive()) {
- bindIface = iface;
- bestScore = thisScore;
- }
- }
- }
- }
- catch (RemoteException e) {
- // Bad news; we should not be getting remote exceptions from the connectivity manager
- // since it is running in SystemServer along side of us. It probably does not matter
- // what we do here, but go ahead and unbind the common time service in this case, just
- // so we have some defined behavior.
- bindIface = null;
- }
-
- boolean doRebind = true;
- synchronized (mLock) {
- if ((null != bindIface) && (null == mCurIface)) {
- Log.e(TAG, String.format("Binding common time service to %s.", bindIface));
- mCurIface = bindIface;
- } else
- if ((null == bindIface) && (null != mCurIface)) {
- Log.e(TAG, "Unbinding common time service.");
- mCurIface = null;
- } else
- if ((null != bindIface) && (null != mCurIface) && !bindIface.equals(mCurIface)) {
- Log.e(TAG, String.format("Switching common time service binding from %s to %s.",
- mCurIface, bindIface));
- mCurIface = bindIface;
- } else {
- doRebind = false;
- }
- }
-
- if (doRebind && (null != mCTConfig)) {
- byte newPrio = (bestScore > 0)
- ? (byte)(bestScore * BASE_SERVER_PRIO)
- : BASE_SERVER_PRIO;
- if (newPrio != mEffectivePrio) {
- mEffectivePrio = newPrio;
- mCTConfig.setMasterElectionPriority(mEffectivePrio);
- }
-
- int res = mCTConfig.setNetworkBinding(mCurIface);
- if (res != CommonTimeConfig.SUCCESS)
- scheduleTimeConfigReconnect();
-
- else if (NO_INTERFACE_TIMEOUT >= 0) {
- mNoInterfaceHandler.removeCallbacks(mNoInterfaceRunnable);
- if (null == mCurIface)
- mNoInterfaceHandler.postDelayed(mNoInterfaceRunnable, NO_INTERFACE_TIMEOUT);
- }
- }
- }
-}
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index ea6bc17..69b2bbf 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -17,6 +17,7 @@
package com.android.server;
import static android.Manifest.permission.RECEIVE_DATA_ACTIVITY_CHANGE;
+import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.net.ConnectivityManager.CONNECTIVITY_ACTION;
import static android.net.ConnectivityManager.NETID_UNSET;
import static android.net.ConnectivityManager.TYPE_ETHERNET;
@@ -30,6 +31,8 @@
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN;
import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
import static android.net.NetworkCapabilities.TRANSPORT_VPN;
@@ -49,6 +52,8 @@
import android.net.ConnectivityManager;
import android.net.ConnectivityManager.PacketKeepalive;
import android.net.IConnectivityManager;
+import android.net.IIpConnectivityMetrics;
+import android.net.INetdEventCallback;
import android.net.INetworkManagementEventObserver;
import android.net.INetworkPolicyListener;
import android.net.INetworkPolicyManager;
@@ -97,6 +102,8 @@
import android.os.ResultReceiver;
import android.os.ServiceManager;
import android.os.ServiceSpecificException;
+import android.os.ShellCallback;
+import android.os.ShellCommand;
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
@@ -105,6 +112,7 @@
import android.security.KeyStore;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
+import android.util.ArraySet;
import android.util.LocalLog;
import android.util.LocalLog.ReadOnlyLocalLog;
import android.util.Log;
@@ -119,10 +127,10 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.IBatteryStats;
import com.android.internal.net.LegacyVpnInfo;
-import com.android.internal.net.NetworkStatsFactory;
import com.android.internal.net.VpnConfig;
import com.android.internal.net.VpnInfo;
import com.android.internal.net.VpnProfile;
+import com.android.internal.util.ArrayUtils;
import com.android.internal.util.AsyncChannel;
import com.android.internal.util.DumpUtils;
import com.android.internal.util.IndentingPrintWriter;
@@ -133,6 +141,7 @@
import com.android.server.connectivity.DataConnectionStats;
import com.android.server.connectivity.DnsManager;
import com.android.server.connectivity.DnsManager.PrivateDnsConfig;
+import com.android.server.connectivity.DnsManager.PrivateDnsValidationUpdate;
import com.android.server.connectivity.IpConnectivityMetrics;
import com.android.server.connectivity.KeepaliveTracker;
import com.android.server.connectivity.LingerMonitor;
@@ -144,9 +153,11 @@
import com.android.server.connectivity.NetworkNotificationManager.NotificationType;
import com.android.server.connectivity.PacManager;
import com.android.server.connectivity.PermissionMonitor;
+import com.android.server.connectivity.ProxyTracker;
import com.android.server.connectivity.Tethering;
import com.android.server.connectivity.Vpn;
import com.android.server.connectivity.tethering.TetheringDependencies;
+import com.android.server.net.BaseNetdEventCallback;
import com.android.server.net.BaseNetworkObserver;
import com.android.server.net.LockdownVpnTracker;
import com.android.server.net.NetworkPolicyManagerInternal;
@@ -174,6 +185,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
@@ -184,14 +196,13 @@
implements PendingIntent.OnFinished {
private static final String TAG = ConnectivityService.class.getSimpleName();
- public static final String DIAG_ARG = "--diag";
+ private static final String DIAG_ARG = "--diag";
public static final String SHORT_ARG = "--short";
- public static final String TETHERING_ARG = "tethering";
+ private static final String TETHERING_ARG = "tethering";
private static final boolean DBG = true;
private static final boolean VDBG = false;
- private static final boolean LOGD_RULES = false;
private static final boolean LOGD_BLOCKED_NETWORKINFO = true;
// TODO: create better separation between radio types and network types
@@ -224,8 +235,9 @@
private KeyStore mKeyStore;
+ @VisibleForTesting
@GuardedBy("mVpns")
- private final SparseArray<Vpn> mVpns = new SparseArray<Vpn>();
+ protected final SparseArray<Vpn> mVpns = new SparseArray<>();
// TODO: investigate if mLockdownEnabled can be removed and replaced everywhere by
// a direct call to LockdownVpnTracker.isEnabled().
@@ -235,13 +247,9 @@
private LockdownVpnTracker mLockdownTracker;
final private Context mContext;
- private int mNetworkPreference;
// 0 is full bad, 100 is full good
private int mDefaultInetConditionPublished = 0;
- private boolean mTestMode;
- private static ConnectivityService sServiceInstance;
-
private INetworkManagementService mNetd;
private INetworkStatsService mStatsService;
private INetworkPolicyManager mPolicyManager;
@@ -249,9 +257,6 @@
private String mCurrentTcpBufferSizes;
- private static final int ENABLED = 1;
- private static final int DISABLED = 0;
-
private static final SparseArray<String> sMagicDecoderRing = MessageUtils.findMessageNames(
new Class[] { AsyncChannel.class, ConnectivityService.class, NetworkAgent.class,
NetworkAgentInfo.class });
@@ -264,7 +269,7 @@
// Don't reap networks. This should be passed when some networks have not yet been
// rematched against all NetworkRequests.
DONT_REAP
- };
+ }
private enum UnneededFor {
LINGER, // Determine whether this network is unneeded and should be lingered.
@@ -272,11 +277,6 @@
}
/**
- * used internally to change our mobile data enabled flag
- */
- private static final int EVENT_CHANGE_MOBILE_DATA_ENABLED = 2;
-
- /**
* used internally to clear a wakelock when transitioning
* from one net to another. Clear happens when we get a new
* network - EVENT_EXPIRE_NET_TRANSITION_WAKELOCK happens
@@ -404,6 +404,9 @@
// Handle changes in Private DNS settings.
private static final int EVENT_PRIVATE_DNS_SETTINGS_CHANGED = 37;
+ // Handle private DNS validation status updates.
+ private static final int EVENT_PRIVATE_DNS_VALIDATION_UPDATE = 38;
+
private static String eventName(int what) {
return sMagicDecoderRing.get(what, Integer.toString(what));
}
@@ -424,37 +427,29 @@
private int mNetTransitionWakeLockTimeout;
private final PowerManager.WakeLock mPendingIntentWakeLock;
- // track the current default http proxy - tell the world if we get a new one (real change)
- private volatile ProxyInfo mDefaultProxy = null;
- private Object mProxyLock = new Object();
- private boolean mDefaultProxyDisabled = false;
-
- // track the global proxy.
- private ProxyInfo mGlobalProxy = null;
-
- private PacManager mPacManager = null;
+ // A helper object to track the current default HTTP proxy. ConnectivityService needs to tell
+ // the world when it changes.
+ private final ProxyTracker mProxyTracker;
final private SettingsObserver mSettingsObserver;
private UserManager mUserManager;
- NetworkConfig[] mNetConfigs;
- int mNetworksDefined;
+ private NetworkConfig[] mNetConfigs;
+ private int mNetworksDefined;
// the set of network types that can only be enabled by system/sig apps
- List mProtectedNetworks;
+ private List mProtectedNetworks;
- private DataConnectionStats mDataConnectionStats;
-
- TelephonyManager mTelephonyManager;
+ private TelephonyManager mTelephonyManager;
private KeepaliveTracker mKeepaliveTracker;
private NetworkNotificationManager mNotifier;
private LingerMonitor mLingerMonitor;
// sequence number for Networks; keep in sync with system/netd/NetworkController.cpp
- private final static int MIN_NET_ID = 100; // some reserved marks
- private final static int MAX_NET_ID = 65535;
+ private static final int MIN_NET_ID = 100; // some reserved marks
+ private static final int MAX_NET_ID = 65535 - 0x0400; // Top 1024 bits reserved by IpSecService
private int mNextNetId = MIN_NET_ID;
// sequence number of NetworkRequests
@@ -480,24 +475,23 @@
private static final int MAX_VALIDATION_LOGS = 10;
private static class ValidationLog {
final Network mNetwork;
- final String mNetworkExtraInfo;
+ final String mName;
final ReadOnlyLocalLog mLog;
- ValidationLog(Network network, String networkExtraInfo, ReadOnlyLocalLog log) {
+ ValidationLog(Network network, String name, ReadOnlyLocalLog log) {
mNetwork = network;
- mNetworkExtraInfo = networkExtraInfo;
+ mName = name;
mLog = log;
}
}
- private final ArrayDeque<ValidationLog> mValidationLogs =
- new ArrayDeque<ValidationLog>(MAX_VALIDATION_LOGS);
+ private final ArrayDeque<ValidationLog> mValidationLogs = new ArrayDeque<>(MAX_VALIDATION_LOGS);
- private void addValidationLogs(ReadOnlyLocalLog log, Network network, String networkExtraInfo) {
+ private void addValidationLogs(ReadOnlyLocalLog log, Network network, String name) {
synchronized (mValidationLogs) {
while (mValidationLogs.size() >= MAX_VALIDATION_LOGS) {
mValidationLogs.removeLast();
}
- mValidationLogs.addFirst(new ValidationLog(network, networkExtraInfo, log));
+ mValidationLogs.addFirst(new ValidationLog(network, name, log));
}
}
@@ -560,7 +554,7 @@
throw new IllegalStateException(
"legacy list for type " + type + "already initialized");
}
- mTypeLists[type] = new ArrayList<NetworkAgentInfo>();
+ mTypeLists[type] = new ArrayList<>();
}
public boolean isTypeSupported(int type) {
@@ -663,7 +657,7 @@
}
private String naiToString(NetworkAgentInfo nai) {
- String name = (nai != null) ? nai.name() : "null";
+ String name = nai.name();
String state = (nai.networkInfo != null) ?
nai.networkInfo.getState() + "/" + nai.networkInfo.getDetailedState() :
"???/???";
@@ -709,12 +703,12 @@
mSystemProperties = getSystemProperties();
mMetricsLog = logger;
- mDefaultRequest = createInternetRequestForTransport(-1, NetworkRequest.Type.REQUEST);
+ mDefaultRequest = createDefaultInternetRequestForTransport(-1, NetworkRequest.Type.REQUEST);
NetworkRequestInfo defaultNRI = new NetworkRequestInfo(null, mDefaultRequest, new Binder());
mNetworkRequests.put(mDefaultRequest, defaultNRI);
mNetworkRequestInfoLogs.log("REGISTER " + defaultNRI);
- mDefaultMobileDataRequest = createInternetRequestForTransport(
+ mDefaultMobileDataRequest = createDefaultInternetRequestForTransport(
NetworkCapabilities.TRANSPORT_CELLULAR, NetworkRequest.Type.BACKGROUND_REQUEST);
mHandlerThread = new HandlerThread("ConnectivityServiceThread");
@@ -734,6 +728,7 @@
mPolicyManagerInternal = checkNotNull(
LocalServices.getService(NetworkPolicyManagerInternal.class),
"missing NetworkPolicyManagerInternal");
+ mProxyTracker = new ProxyTracker(context, mHandler, EVENT_PROXY_HAS_CHANGED);
mKeyStore = KeyStore.getInstance();
mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
@@ -815,9 +810,6 @@
}
}
- mTestMode = mSystemProperties.get("cm.test.mode").equals("true")
- && mSystemProperties.get("ro.build.type").equals("eng");
-
mTethering = makeTethering();
mPermissionMonitor = new PermissionMonitor(mContext, mNetd);
@@ -844,10 +836,8 @@
mSettingsObserver = new SettingsObserver(mContext, mHandler);
registerSettingsCallbacks();
- mDataConnectionStats = new DataConnectionStats(mContext);
- mDataConnectionStats.startMonitoring();
-
- mPacManager = new PacManager(mContext, mHandler, EVENT_PROXY_HAS_CHANGED);
+ final DataConnectionStats dataConnectionStats = new DataConnectionStats(mContext);
+ dataConnectionStats.startMonitoring();
mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
@@ -873,13 +863,27 @@
private Tethering makeTethering() {
// TODO: Move other elements into @Overridden getters.
- final TetheringDependencies deps = new TetheringDependencies();
+ final TetheringDependencies deps = new TetheringDependencies() {
+ @Override
+ public boolean isTetheringSupported() {
+ return ConnectivityService.this.isTetheringSupported();
+ }
+ };
return new Tethering(mContext, mNetd, mStatsService, mPolicyManager,
IoThread.get().getLooper(), new MockableSystemProperties(),
deps);
}
- private NetworkRequest createInternetRequestForTransport(
+ private static NetworkCapabilities createDefaultNetworkCapabilitiesForUid(int uid) {
+ final NetworkCapabilities netCap = new NetworkCapabilities();
+ netCap.addCapability(NET_CAPABILITY_INTERNET);
+ netCap.addCapability(NET_CAPABILITY_NOT_RESTRICTED);
+ netCap.removeCapability(NET_CAPABILITY_NOT_VPN);
+ netCap.setSingleUid(uid);
+ return netCap;
+ }
+
+ private NetworkRequest createDefaultInternetRequestForTransport(
int transportType, NetworkRequest.Type type) {
NetworkCapabilities netCap = new NetworkCapabilities();
netCap.addCapability(NET_CAPABILITY_INTERNET);
@@ -892,7 +896,7 @@
// Used only for testing.
// TODO: Delete this and either:
- // 1. Give Fake SettingsProvider the ability to send settings change notifications (requires
+ // 1. Give FakeSettingsProvider the ability to send settings change notifications (requires
// changing ContentResolver to make registerContentObserver non-final).
// 2. Give FakeSettingsProvider an alternative notification mechanism and have the test use it
// by subclassing SettingsObserver.
@@ -901,6 +905,12 @@
mHandler.sendEmptyMessage(EVENT_CONFIGURE_MOBILE_DATA_ALWAYS_ON);
}
+ // See FakeSettingsProvider comment above.
+ @VisibleForTesting
+ void updatePrivateDnsSettings() {
+ mHandler.sendEmptyMessage(EVENT_PRIVATE_DNS_SETTINGS_CHANGED);
+ }
+
private void handleMobileDataAlwaysOn() {
final boolean enable = toBool(Settings.Global.getInt(
mContext.getContentResolver(), Settings.Global.MOBILE_DATA_ALWAYS_ON, 1));
@@ -930,8 +940,8 @@
}
private void registerPrivateDnsSettingsCallbacks() {
- for (Uri u : DnsManager.getPrivateDnsSettingsUris()) {
- mSettingsObserver.observe(u, EVENT_PRIVATE_DNS_SETTINGS_CHANGED);
+ for (Uri uri : DnsManager.getPrivateDnsSettingsUris()) {
+ mSettingsObserver.observe(uri, EVENT_PRIVATE_DNS_SETTINGS_CHANGED);
}
}
@@ -955,7 +965,7 @@
throw new IllegalStateException("No free netIds");
}
- private NetworkState getFilteredNetworkState(int networkType, int uid, boolean ignoreBlocked) {
+ private NetworkState getFilteredNetworkState(int networkType, int uid) {
if (mLegacyTypeTracker.isTypeSupported(networkType)) {
final NetworkAgentInfo nai = mLegacyTypeTracker.getNetworkForType(networkType);
final NetworkState state;
@@ -973,7 +983,7 @@
state = new NetworkState(info, new LinkProperties(), capabilities,
null, null, null);
}
- filterNetworkStateForUid(state, uid, ignoreBlocked);
+ filterNetworkStateForUid(state, uid, false);
return state;
} else {
return NetworkState.EMPTY;
@@ -984,8 +994,12 @@
if (network == null) {
return null;
}
+ return getNetworkAgentInfoForNetId(network.netId);
+ }
+
+ private NetworkAgentInfo getNetworkAgentInfoForNetId(int netId) {
synchronized (mNetworkForNetId) {
- return mNetworkForNetId.get(network.netId);
+ return mNetworkForNetId.get(netId);
}
}
@@ -1121,14 +1135,20 @@
int vpnNetId = NETID_UNSET;
synchronized (mVpns) {
final Vpn vpn = mVpns.get(user);
+ // TODO : now that capabilities contain the UID, the appliesToUid test should
+ // be removed as the satisfying test below should be enough.
if (vpn != null && vpn.appliesToUid(uid)) vpnNetId = vpn.getNetId();
}
NetworkAgentInfo nai;
if (vpnNetId != NETID_UNSET) {
- synchronized (mNetworkForNetId) {
- nai = mNetworkForNetId.get(vpnNetId);
+ nai = getNetworkAgentInfoForNetId(vpnNetId);
+ if (nai != null) {
+ final NetworkCapabilities requiredCaps =
+ createDefaultNetworkCapabilitiesForUid(uid);
+ if (requiredCaps.satisfiedByNetworkCapabilities(nai.networkCapabilities)) {
+ return nai.network;
+ }
}
- if (nai != null) return nai.network;
}
nai = getDefaultNetwork();
if (nai != null
@@ -1168,7 +1188,7 @@
return state.networkInfo;
}
}
- final NetworkState state = getFilteredNetworkState(networkType, uid, false);
+ final NetworkState state = getFilteredNetworkState(networkType, uid);
return state.networkInfo;
}
@@ -1203,7 +1223,7 @@
public Network getNetworkForType(int networkType) {
enforceAccessPermission();
final int uid = Binder.getCallingUid();
- NetworkState state = getFilteredNetworkState(networkType, uid, false);
+ NetworkState state = getFilteredNetworkState(networkType, uid);
if (!isNetworkWithLinkPropertiesBlocked(state.linkProperties, uid, false)) {
return state.network;
}
@@ -1240,7 +1260,7 @@
// default.
enforceAccessPermission();
- HashMap<Network, NetworkCapabilities> result = new HashMap<Network, NetworkCapabilities>();
+ HashMap<Network, NetworkCapabilities> result = new HashMap<>();
NetworkAgentInfo nai = getDefaultNetwork();
NetworkCapabilities nc = getNetworkCapabilitiesInternal(nai);
@@ -1325,7 +1345,9 @@
if (nai != null) {
synchronized (nai) {
if (nai.networkCapabilities != null) {
- return new NetworkCapabilities(nai.networkCapabilities);
+ return networkCapabilitiesRestrictedForCallerPermissions(
+ nai.networkCapabilities,
+ Binder.getCallingPid(), Binder.getCallingUid());
}
}
}
@@ -1338,6 +1360,28 @@
return getNetworkCapabilitiesInternal(getNetworkAgentInfoForNetwork(network));
}
+ private NetworkCapabilities networkCapabilitiesRestrictedForCallerPermissions(
+ NetworkCapabilities nc, int callerPid, int callerUid) {
+ final NetworkCapabilities newNc = new NetworkCapabilities(nc);
+ if (!checkSettingsPermission(callerPid, callerUid)) {
+ newNc.setUids(null);
+ newNc.setSSID(null);
+ }
+ return newNc;
+ }
+
+ private void restrictRequestUidsForCaller(NetworkCapabilities nc) {
+ if (!checkSettingsPermission()) {
+ nc.setSingleUid(Binder.getCallingUid());
+ }
+ }
+
+ private void restrictBackgroundRequestForCaller(NetworkCapabilities nc) {
+ if (!mPermissionMonitor.hasUseBackgroundNetworksPermission(Binder.getCallingUid())) {
+ nc.addCapability(NET_CAPABILITY_FOREGROUND);
+ }
+ }
+
@Override
public NetworkState[] getAllNetworkState() {
// Require internal since we're handing out IMSI details
@@ -1347,6 +1391,10 @@
for (Network network : getAllNetworks()) {
final NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
if (nai != null) {
+ // TODO (b/73321673) : NetworkState contains a copy of the
+ // NetworkCapabilities, which may contain UIDs of apps to which the
+ // network applies. Should the UIDs be cleared so as not to leak or
+ // interfere ?
result.add(nai.getNetworkState());
}
}
@@ -1365,7 +1413,8 @@
public boolean isActiveNetworkMetered() {
enforceAccessPermission();
- final NetworkCapabilities caps = getNetworkCapabilities(getActiveNetwork());
+ final int uid = Binder.getCallingUid();
+ final NetworkCapabilities caps = getUnfilteredActiveNetworkState(uid).networkCapabilities;
if (caps != null) {
return !caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED);
} else {
@@ -1479,6 +1528,42 @@
return true;
}
+ @VisibleForTesting
+ protected final INetdEventCallback mNetdEventCallback = new BaseNetdEventCallback() {
+ @Override
+ public void onPrivateDnsValidationEvent(int netId, String ipAddress,
+ String hostname, boolean validated) {
+ try {
+ mHandler.sendMessage(mHandler.obtainMessage(
+ EVENT_PRIVATE_DNS_VALIDATION_UPDATE,
+ new PrivateDnsValidationUpdate(netId,
+ InetAddress.parseNumericAddress(ipAddress),
+ hostname, validated)));
+ } catch (IllegalArgumentException e) {
+ loge("Error parsing ip address in validation event");
+ }
+ }
+ };
+
+ @VisibleForTesting
+ protected void registerNetdEventCallback() {
+ final IIpConnectivityMetrics ipConnectivityMetrics =
+ IIpConnectivityMetrics.Stub.asInterface(
+ ServiceManager.getService(IpConnectivityLog.SERVICE_NAME));
+ if (ipConnectivityMetrics == null) {
+ Slog.wtf(TAG, "Missing IIpConnectivityMetrics");
+ return;
+ }
+
+ try {
+ ipConnectivityMetrics.addNetdEventCallback(
+ INetdEventCallback.CALLBACK_CALLER_CONNECTIVITY_SERVICE,
+ mNetdEventCallback);
+ } catch (Exception e) {
+ loge("Error registering netd callback: " + e);
+ }
+ }
+
private final INetworkPolicyListener mPolicyListener = new NetworkPolicyManager.Listener() {
@Override
public void onUidRulesChanged(int uid, int uidRules) {
@@ -1532,6 +1617,16 @@
"ConnectivityService");
}
+ private boolean checkSettingsPermission() {
+ return PERMISSION_GRANTED == mContext.checkCallingOrSelfPermission(
+ android.Manifest.permission.NETWORK_SETTINGS);
+ }
+
+ private boolean checkSettingsPermission(int pid, int uid) {
+ return PERMISSION_GRANTED == mContext.checkPermission(
+ android.Manifest.permission.NETWORK_SETTINGS, pid, uid);
+ }
+
private void enforceTetherAccessPermission() {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.ACCESS_NETWORK_STATE,
@@ -1639,9 +1734,10 @@
try {
bs.noteConnectivityChanged(intent.getIntExtra(
ConnectivityManager.EXTRA_NETWORK_TYPE, ConnectivityManager.TYPE_NONE),
- ni != null ? ni.getState().toString() : "?");
+ ni.getState().toString());
} catch (RemoteException e) {
}
+ intent.addFlags(Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS);
}
try {
mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL, options);
@@ -1653,6 +1749,7 @@
void systemReady() {
loadGlobalProxy();
+ registerNetdEventCallback();
synchronized (this) {
mSystemReady = true;
@@ -1725,7 +1822,7 @@
if (iface != null && (caps.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) ||
caps.hasTransport(NetworkCapabilities.TRANSPORT_WIFI))) {
try {
- // the call fails silently if no idletimer setup for this interface
+ // the call fails silently if no idle timer setup for this interface
mNetd.removeIdleTimer(iface);
} catch (Exception e) {
loge("Exception in removeDataActivityTracking " + e);
@@ -1734,7 +1831,7 @@
}
/**
- * Reads the network specific MTU size from reources.
+ * Reads the network specific MTU size from resources.
* and set it on it's iface.
*/
private void updateMtu(LinkProperties newLp, LinkProperties oldLp) {
@@ -1840,13 +1937,6 @@
return ret;
}
- private boolean argsContain(String[] args, String target) {
- for (String arg : args) {
- if (target.equals(arg)) return true;
- }
- return false;
- }
-
private void dumpNetworkDiagnostics(IndentingPrintWriter pw) {
final List<NetworkDiagnostics> netDiags = new ArrayList<NetworkDiagnostics>();
final long DIAG_TIME_MS = 5000;
@@ -1870,10 +1960,10 @@
final IndentingPrintWriter pw = new IndentingPrintWriter(writer, " ");
if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
- if (argsContain(args, DIAG_ARG)) {
+ if (ArrayUtils.contains(args, DIAG_ARG)) {
dumpNetworkDiagnostics(pw);
return;
- } else if (argsContain(args, TETHERING_ARG)) {
+ } else if (ArrayUtils.contains(args, TETHERING_ARG)) {
mTethering.dump(fd, pw, args);
return;
}
@@ -1938,12 +2028,12 @@
pw.println();
dumpAvoidBadWifiSettings(pw);
- if (argsContain(args, SHORT_ARG) == false) {
+ if (ArrayUtils.contains(args, SHORT_ARG) == false) {
pw.println();
synchronized (mValidationLogs) {
pw.println("mValidationLogs (most recent first):");
for (ValidationLog p : mValidationLogs) {
- pw.println(p.mNetwork + " - " + p.mNetworkExtraInfo);
+ pw.println(p.mNetwork + " - " + p.mName);
pw.increaseIndent();
p.mLog.dump(fd, pw, args);
pw.decreaseIndent();
@@ -2050,24 +2140,6 @@
if (score != null) updateNetworkScore(nai, score.intValue());
break;
}
- case NetworkAgent.EVENT_UID_RANGES_ADDED: {
- try {
- mNetd.addVpnUidRanges(nai.network.netId, (UidRange[])msg.obj);
- } catch (Exception e) {
- // Never crash!
- loge("Exception in addVpnUidRanges: " + e);
- }
- break;
- }
- case NetworkAgent.EVENT_UID_RANGES_REMOVED: {
- try {
- mNetd.removeVpnUidRanges(nai.network.netId, (UidRange[])msg.obj);
- } catch (Exception e) {
- // Never crash!
- loge("Exception in removeVpnUidRanges: " + e);
- }
- break;
- }
case NetworkAgent.EVENT_SET_EXPLICITLY_SELECTED: {
if (nai.everConnected && !nai.networkMisc.explicitlySelected) {
loge("ERROR: already-connected network explicitly selected.");
@@ -2088,41 +2160,21 @@
default:
return false;
case NetworkMonitor.EVENT_NETWORK_TESTED: {
- final NetworkAgentInfo nai;
- synchronized (mNetworkForNetId) {
- nai = mNetworkForNetId.get(msg.arg2);
- }
+ final NetworkAgentInfo nai = getNetworkAgentInfoForNetId(msg.arg2);
if (nai == null) break;
final boolean valid = (msg.arg1 == NetworkMonitor.NETWORK_TEST_RESULT_VALID);
final boolean wasValidated = nai.lastValidated;
final boolean wasDefault = isDefaultNetwork(nai);
- final PrivateDnsConfig privateDnsCfg = (msg.obj instanceof PrivateDnsConfig)
- ? (PrivateDnsConfig) msg.obj : null;
final String redirectUrl = (msg.obj instanceof String) ? (String) msg.obj : "";
- final boolean reevaluationRequired;
- final String logMsg;
- if (valid) {
- reevaluationRequired = updatePrivateDns(nai, privateDnsCfg);
- logMsg = (DBG && (privateDnsCfg != null))
- ? " with " + privateDnsCfg.toString() : "";
- } else {
- reevaluationRequired = false;
- logMsg = (DBG && !TextUtils.isEmpty(redirectUrl))
- ? " with redirect to " + redirectUrl : "";
- }
if (DBG) {
+ final String logMsg = !TextUtils.isEmpty(redirectUrl)
+ ? " with redirect to " + redirectUrl
+ : "";
log(nai.name() + " validation " + (valid ? "passed" : "failed") + logMsg);
}
- // If there is a change in Private DNS configuration,
- // trigger reevaluation of the network to test it.
- if (reevaluationRequired) {
- nai.networkMonitor.sendMessage(
- NetworkMonitor.CMD_FORCE_REEVALUATION, Process.SYSTEM_UID);
- break;
- }
if (valid != nai.lastValidated) {
if (wasDefault) {
metricsLogger().defaultNetworkMetrics().logDefaultNetworkValidity(
@@ -2151,10 +2203,7 @@
case NetworkMonitor.EVENT_PROVISIONING_NOTIFICATION: {
final int netId = msg.arg2;
final boolean visible = toBool(msg.arg1);
- final NetworkAgentInfo nai;
- synchronized (mNetworkForNetId) {
- nai = mNetworkForNetId.get(netId);
- }
+ final NetworkAgentInfo nai = getNetworkAgentInfoForNetId(netId);
// If captive portal status has changed, update capabilities or disconnect.
if (nai != null && (visible != nai.lastCaptivePortalDetected)) {
final int oldScore = nai.getCurrentScore();
@@ -2185,18 +2234,10 @@
break;
}
case NetworkMonitor.EVENT_PRIVATE_DNS_CONFIG_RESOLVED: {
- final NetworkAgentInfo nai;
- synchronized (mNetworkForNetId) {
- nai = mNetworkForNetId.get(msg.arg2);
- }
+ final NetworkAgentInfo nai = getNetworkAgentInfoForNetId(msg.arg2);
if (nai == null) break;
- final PrivateDnsConfig cfg = (PrivateDnsConfig) msg.obj;
- final boolean reevaluationRequired = updatePrivateDns(nai, cfg);
- if (nai.lastValidated && reevaluationRequired) {
- nai.networkMonitor.sendMessage(
- NetworkMonitor.CMD_FORCE_REEVALUATION, Process.SYSTEM_UID);
- }
+ updatePrivateDns(nai, (PrivateDnsConfig) msg.obj);
break;
}
}
@@ -2234,61 +2275,50 @@
}
}
+ private boolean networkRequiresValidation(NetworkAgentInfo nai) {
+ return NetworkMonitor.isValidationRequired(
+ mDefaultRequest.networkCapabilities, nai.networkCapabilities);
+ }
+
private void handlePrivateDnsSettingsChanged() {
final PrivateDnsConfig cfg = mDnsManager.getPrivateDnsConfig();
for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
- // Private DNS only ever applies to networks that might provide
- // Internet access and therefore also require validation.
- if (!NetworkMonitor.isValidationRequired(
- mDefaultRequest.networkCapabilities, nai.networkCapabilities)) {
- continue;
- }
-
- // Notify the NetworkMonitor thread in case it needs to cancel or
- // schedule DNS resolutions. If a DNS resolution is required the
- // result will be sent back to us.
- nai.networkMonitor.notifyPrivateDnsSettingsChanged(cfg);
-
- if (!cfg.inStrictMode()) {
- // No strict mode hostname DNS resolution needed, so just update
- // DNS settings directly. In opportunistic and "off" modes this
- // just reprograms netd with the network-supplied DNS servers
- // (and of course the boolean of whether or not to attempt TLS).
- //
- // TODO: Consider code flow parity with strict mode, i.e. having
- // NetworkMonitor relay the PrivateDnsConfig back to us and then
- // performing this call at that time.
- updatePrivateDns(nai, cfg);
+ handlePerNetworkPrivateDnsConfig(nai, cfg);
+ if (networkRequiresValidation(nai)) {
+ handleUpdateLinkProperties(nai, new LinkProperties(nai.linkProperties));
}
}
}
- private boolean updatePrivateDns(NetworkAgentInfo nai, PrivateDnsConfig newCfg) {
- final boolean reevaluationRequired = true;
- final boolean dontReevaluate = false;
+ private void handlePerNetworkPrivateDnsConfig(NetworkAgentInfo nai, PrivateDnsConfig cfg) {
+ // Private DNS only ever applies to networks that might provide
+ // Internet access and therefore also require validation.
+ if (!networkRequiresValidation(nai)) return;
- final PrivateDnsConfig oldCfg = mDnsManager.updatePrivateDns(nai.network, newCfg);
+ // Notify the NetworkMonitor thread in case it needs to cancel or
+ // schedule DNS resolutions. If a DNS resolution is required the
+ // result will be sent back to us.
+ nai.networkMonitor.notifyPrivateDnsSettingsChanged(cfg);
+
+ // With Private DNS bypass support, we can proceed to update the
+ // Private DNS config immediately, even if we're in strict mode
+ // and have not yet resolved the provider name into a set of IPs.
+ updatePrivateDns(nai, cfg);
+ }
+
+ private void updatePrivateDns(NetworkAgentInfo nai, PrivateDnsConfig newCfg) {
+ mDnsManager.updatePrivateDns(nai.network, newCfg);
updateDnses(nai.linkProperties, null, nai.network.netId);
+ }
- if (newCfg == null) {
- if (oldCfg == null) return dontReevaluate;
- return oldCfg.useTls ? reevaluationRequired : dontReevaluate;
+ private void handlePrivateDnsValidationUpdate(PrivateDnsValidationUpdate update) {
+ NetworkAgentInfo nai = getNetworkAgentInfoForNetId(update.netId);
+ if (nai == null) {
+ return;
}
-
- if (oldCfg == null) {
- return newCfg.useTls ? reevaluationRequired : dontReevaluate;
- }
-
- if (oldCfg.useTls != newCfg.useTls) {
- return reevaluationRequired;
- }
-
- if (newCfg.inStrictMode() && !Objects.equals(oldCfg.hostname, newCfg.hostname)) {
- return reevaluationRequired;
- }
-
- return dontReevaluate;
+ mDnsManager.updatePrivateDnsValidation(update);
+ handleUpdateLinkProperties(nai, new LinkProperties(nai.linkProperties));
}
private void updateLingerState(NetworkAgentInfo nai, long now) {
@@ -2348,94 +2378,107 @@
}
}
+ // This is a no-op if it's called with a message designating a network that has
+ // already been destroyed, because its reference will not be found in the relevant
+ // maps.
private void handleAsyncChannelDisconnected(Message msg) {
NetworkAgentInfo nai = mNetworkAgentInfos.get(msg.replyTo);
if (nai != null) {
- if (DBG) {
- log(nai.name() + " got DISCONNECTED, was satisfying " + nai.numNetworkRequests());
- }
- // A network agent has disconnected.
- // TODO - if we move the logic to the network agent (have them disconnect
- // because they lost all their requests or because their score isn't good)
- // then they would disconnect organically, report their new state and then
- // disconnect the channel.
- if (nai.networkInfo.isConnected()) {
- nai.networkInfo.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED,
- null, null);
- }
- final boolean wasDefault = isDefaultNetwork(nai);
- if (wasDefault) {
- mDefaultInetConditionPublished = 0;
- // Log default network disconnection before required book-keeping.
- // Let rematchAllNetworksAndRequests() below record a new default network event
- // if there is a fallback. Taken together, the two form a X -> 0, 0 -> Y sequence
- // whose timestamps tell how long it takes to recover a default network.
- long now = SystemClock.elapsedRealtime();
- metricsLogger().defaultNetworkMetrics().logDefaultNetworkEvent(now, null, nai);
- }
- notifyIfacesChangedForNetworkStats();
- // TODO - we shouldn't send CALLBACK_LOST to requests that can be satisfied
- // by other networks that are already connected. Perhaps that can be done by
- // sending all CALLBACK_LOST messages (for requests, not listens) at the end
- // of rematchAllNetworksAndRequests
- notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_LOST);
- mKeepaliveTracker.handleStopAllKeepalives(nai,
- ConnectivityManager.PacketKeepalive.ERROR_INVALID_NETWORK);
- for (String iface : nai.linkProperties.getAllInterfaceNames()) {
- // Disable wakeup packet monitoring for each interface.
- wakeupModifyInterface(iface, nai.networkCapabilities, false);
- }
- nai.networkMonitor.sendMessage(NetworkMonitor.CMD_NETWORK_DISCONNECTED);
- mNetworkAgentInfos.remove(msg.replyTo);
- nai.maybeStopClat();
- synchronized (mNetworkForNetId) {
- // Remove the NetworkAgent, but don't mark the netId as
- // available until we've told netd to delete it below.
- mNetworkForNetId.remove(nai.network.netId);
- }
- // Remove all previously satisfied requests.
- for (int i = 0; i < nai.numNetworkRequests(); i++) {
- NetworkRequest request = nai.requestAt(i);
- NetworkAgentInfo currentNetwork = getNetworkForRequest(request.requestId);
- if (currentNetwork != null && currentNetwork.network.netId == nai.network.netId) {
- clearNetworkForRequest(request.requestId);
- sendUpdatedScoreToFactories(request, 0);
- }
- }
- nai.clearLingerState();
- if (nai.isSatisfyingRequest(mDefaultRequest.requestId)) {
- removeDataActivityTracking(nai);
- notifyLockdownVpn(nai);
- ensureNetworkTransitionWakelock(nai.name());
- }
- mLegacyTypeTracker.remove(nai, wasDefault);
- rematchAllNetworksAndRequests(null, 0);
- mLingerMonitor.noteDisconnect(nai);
- if (nai.created) {
- // Tell netd to clean up the configuration for this network
- // (routing rules, DNS, etc).
- // This may be slow as it requires a lot of netd shelling out to ip and
- // ip[6]tables to flush routes and remove the incoming packet mark rule, so do it
- // after we've rematched networks with requests which should make a potential
- // fallback network the default or requested a new network from the
- // NetworkFactories, so network traffic isn't interrupted for an unnecessarily
- // long time.
- try {
- mNetd.removeNetwork(nai.network.netId);
- } catch (Exception e) {
- loge("Exception removing network: " + e);
- }
- mDnsManager.removeNetwork(nai.network);
- }
- synchronized (mNetworkForNetId) {
- mNetIdInUse.delete(nai.network.netId);
- }
+ disconnectAndDestroyNetwork(nai);
} else {
NetworkFactoryInfo nfi = mNetworkFactoryInfos.remove(msg.replyTo);
if (DBG && nfi != null) log("unregisterNetworkFactory for " + nfi.name);
}
}
+ // Destroys a network, remove references to it from the internal state managed by
+ // ConnectivityService, free its interfaces and clean up.
+ // Must be called on the Handler thread.
+ private void disconnectAndDestroyNetwork(NetworkAgentInfo nai) {
+ if (DBG) {
+ log(nai.name() + " got DISCONNECTED, was satisfying " + nai.numNetworkRequests());
+ }
+ // A network agent has disconnected.
+ // TODO - if we move the logic to the network agent (have them disconnect
+ // because they lost all their requests or because their score isn't good)
+ // then they would disconnect organically, report their new state and then
+ // disconnect the channel.
+ if (nai.networkInfo.isConnected()) {
+ nai.networkInfo.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED,
+ null, null);
+ }
+ final boolean wasDefault = isDefaultNetwork(nai);
+ if (wasDefault) {
+ mDefaultInetConditionPublished = 0;
+ // Log default network disconnection before required book-keeping.
+ // Let rematchAllNetworksAndRequests() below record a new default network event
+ // if there is a fallback. Taken together, the two form a X -> 0, 0 -> Y sequence
+ // whose timestamps tell how long it takes to recover a default network.
+ long now = SystemClock.elapsedRealtime();
+ metricsLogger().defaultNetworkMetrics().logDefaultNetworkEvent(now, null, nai);
+ }
+ notifyIfacesChangedForNetworkStats();
+ // TODO - we shouldn't send CALLBACK_LOST to requests that can be satisfied
+ // by other networks that are already connected. Perhaps that can be done by
+ // sending all CALLBACK_LOST messages (for requests, not listens) at the end
+ // of rematchAllNetworksAndRequests
+ notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_LOST);
+ mKeepaliveTracker.handleStopAllKeepalives(nai,
+ ConnectivityManager.PacketKeepalive.ERROR_INVALID_NETWORK);
+ for (String iface : nai.linkProperties.getAllInterfaceNames()) {
+ // Disable wakeup packet monitoring for each interface.
+ wakeupModifyInterface(iface, nai.networkCapabilities, false);
+ }
+ nai.networkMonitor.sendMessage(NetworkMonitor.CMD_NETWORK_DISCONNECTED);
+ mNetworkAgentInfos.remove(nai.messenger);
+ nai.maybeStopClat();
+ synchronized (mNetworkForNetId) {
+ // Remove the NetworkAgent, but don't mark the netId as
+ // available until we've told netd to delete it below.
+ mNetworkForNetId.remove(nai.network.netId);
+ }
+ // Remove all previously satisfied requests.
+ for (int i = 0; i < nai.numNetworkRequests(); i++) {
+ NetworkRequest request = nai.requestAt(i);
+ NetworkAgentInfo currentNetwork = getNetworkForRequest(request.requestId);
+ if (currentNetwork != null && currentNetwork.network.netId == nai.network.netId) {
+ clearNetworkForRequest(request.requestId);
+ sendUpdatedScoreToFactories(request, 0);
+ }
+ }
+ nai.clearLingerState();
+ if (nai.isSatisfyingRequest(mDefaultRequest.requestId)) {
+ removeDataActivityTracking(nai);
+ notifyLockdownVpn(nai);
+ ensureNetworkTransitionWakelock(nai.name());
+ }
+ mLegacyTypeTracker.remove(nai, wasDefault);
+ if (!nai.networkCapabilities.hasTransport(TRANSPORT_VPN)) {
+ updateAllVpnsCapabilities();
+ }
+ rematchAllNetworksAndRequests(null, 0);
+ mLingerMonitor.noteDisconnect(nai);
+ if (nai.created) {
+ // Tell netd to clean up the configuration for this network
+ // (routing rules, DNS, etc).
+ // This may be slow as it requires a lot of netd shelling out to ip and
+ // ip[6]tables to flush routes and remove the incoming packet mark rule, so do it
+ // after we've rematched networks with requests which should make a potential
+ // fallback network the default or requested a new network from the
+ // NetworkFactories, so network traffic isn't interrupted for an unnecessarily
+ // long time.
+ try {
+ mNetd.removeNetwork(nai.network.netId);
+ } catch (Exception e) {
+ loge("Exception removing network: " + e);
+ }
+ mDnsManager.removeNetwork(nai.network);
+ }
+ synchronized (mNetworkForNetId) {
+ mNetIdInUse.delete(nai.network.netId);
+ }
+ }
+
// If this method proves to be too slow then we can maintain a separate
// pendingIntent => NetworkRequestInfo map.
// This method assumes that every non-null PendingIntent maps to exactly 1 NetworkRequestInfo.
@@ -2726,7 +2769,7 @@
if (!accept) {
// Tell the NetworkAgent to not automatically reconnect to the network.
nai.asyncChannel.sendMessage(NetworkAgent.CMD_PREVENT_AUTOMATIC_RECONNECT);
- // Teardown the nework.
+ // Teardown the network.
teardownUnneededNetwork(nai);
}
@@ -2975,6 +3018,10 @@
case EVENT_PRIVATE_DNS_SETTINGS_CHANGED:
handlePrivateDnsSettingsChanged();
break;
+ case EVENT_PRIVATE_DNS_VALIDATION_UPDATE:
+ handlePrivateDnsValidationUpdate(
+ (PrivateDnsValidationUpdate) msg.obj);
+ break;
}
}
}
@@ -2984,8 +3031,7 @@
public int tether(String iface, String callerPkg) {
ConnectivityManager.enforceTetherChangePermission(mContext, callerPkg);
if (isTetheringSupported()) {
- final int status = mTethering.tether(iface);
- return status;
+ return mTethering.tether(iface);
} else {
return ConnectivityManager.TETHER_ERROR_UNSUPPORTED;
}
@@ -2997,8 +3043,7 @@
ConnectivityManager.enforceTetherChangePermission(mContext, callerPkg);
if (isTetheringSupported()) {
- final int status = mTethering.untether(iface);
- return status;
+ return mTethering.untether(iface);
} else {
return ConnectivityManager.TETHER_ERROR_UNSUPPORTED;
}
@@ -3227,25 +3272,13 @@
if (isNetworkWithLinkPropertiesBlocked(lp, uid, false)) {
return;
}
- nai.networkMonitor.sendMessage(NetworkMonitor.CMD_FORCE_REEVALUATION, uid);
- }
-
- private ProxyInfo getDefaultProxy() {
- // this information is already available as a world read/writable jvm property
- // so this API change wouldn't have a benifit. It also breaks the passing
- // of proxy info to all the JVMs.
- // enforceAccessPermission();
- synchronized (mProxyLock) {
- ProxyInfo ret = mGlobalProxy;
- if ((ret == null) && !mDefaultProxyDisabled) ret = mDefaultProxy;
- return ret;
- }
+ nai.networkMonitor.forceReevaluation(uid);
}
@Override
public ProxyInfo getProxyForNetwork(Network network) {
- if (network == null) return getDefaultProxy();
- final ProxyInfo globalProxy = getGlobalProxy();
+ if (network == null) return mProxyTracker.getDefaultProxy();
+ final ProxyInfo globalProxy = mProxyTracker.getGlobalProxy();
if (globalProxy != null) return globalProxy;
if (!NetworkUtils.queryUserAccess(Binder.getCallingUid(), network.netId)) return null;
// Don't call getLinkProperties() as it requires ACCESS_NETWORK_STATE permission, which
@@ -3259,80 +3292,10 @@
}
}
- // Convert empty ProxyInfo's to null as null-checks are used to determine if proxies are present
- // (e.g. if mGlobalProxy==null fall back to network-specific proxy, if network-specific
- // proxy is null then there is no proxy in place).
- private ProxyInfo canonicalizeProxyInfo(ProxyInfo proxy) {
- if (proxy != null && TextUtils.isEmpty(proxy.getHost())
- && (proxy.getPacFileUrl() == null || Uri.EMPTY.equals(proxy.getPacFileUrl()))) {
- proxy = null;
- }
- return proxy;
- }
-
- // ProxyInfo equality function with a couple modifications over ProxyInfo.equals() to make it
- // better for determining if a new proxy broadcast is necessary:
- // 1. Canonicalize empty ProxyInfos to null so an empty proxy compares equal to null so as to
- // avoid unnecessary broadcasts.
- // 2. Make sure all parts of the ProxyInfo's compare true, including the host when a PAC URL
- // is in place. This is important so legacy PAC resolver (see com.android.proxyhandler)
- // changes aren't missed. The legacy PAC resolver pretends to be a simple HTTP proxy but
- // actually uses the PAC to resolve; this results in ProxyInfo's with PAC URL, host and port
- // all set.
- private boolean proxyInfoEqual(ProxyInfo a, ProxyInfo b) {
- a = canonicalizeProxyInfo(a);
- b = canonicalizeProxyInfo(b);
- // ProxyInfo.equals() doesn't check hosts when PAC URLs are present, but we need to check
- // hosts even when PAC URLs are present to account for the legacy PAC resolver.
- return Objects.equals(a, b) && (a == null || Objects.equals(a.getHost(), b.getHost()));
- }
-
- public void setGlobalProxy(ProxyInfo proxyProperties) {
+ @Override
+ public void setGlobalProxy(final ProxyInfo proxyProperties) {
enforceConnectivityInternalPermission();
-
- synchronized (mProxyLock) {
- if (proxyProperties == mGlobalProxy) return;
- if (proxyProperties != null && proxyProperties.equals(mGlobalProxy)) return;
- if (mGlobalProxy != null && mGlobalProxy.equals(proxyProperties)) return;
-
- String host = "";
- int port = 0;
- String exclList = "";
- String pacFileUrl = "";
- if (proxyProperties != null && (!TextUtils.isEmpty(proxyProperties.getHost()) ||
- !Uri.EMPTY.equals(proxyProperties.getPacFileUrl()))) {
- if (!proxyProperties.isValid()) {
- if (DBG)
- log("Invalid proxy properties, ignoring: " + proxyProperties.toString());
- return;
- }
- mGlobalProxy = new ProxyInfo(proxyProperties);
- host = mGlobalProxy.getHost();
- port = mGlobalProxy.getPort();
- exclList = mGlobalProxy.getExclusionListAsString();
- if (!Uri.EMPTY.equals(proxyProperties.getPacFileUrl())) {
- pacFileUrl = proxyProperties.getPacFileUrl().toString();
- }
- } else {
- mGlobalProxy = null;
- }
- ContentResolver res = mContext.getContentResolver();
- final long token = Binder.clearCallingIdentity();
- try {
- Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_HOST, host);
- Settings.Global.putInt(res, Settings.Global.GLOBAL_HTTP_PROXY_PORT, port);
- Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST,
- exclList);
- Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_PAC, pacFileUrl);
- } finally {
- Binder.restoreCallingIdentity(token);
- }
-
- if (mGlobalProxy == null) {
- proxyProperties = mDefaultProxy;
- }
- sendProxyBroadcast(proxyProperties);
- }
+ mProxyTracker.setGlobalProxy(proxyProperties);
}
private void loadGlobalProxy() {
@@ -3354,20 +3317,16 @@
return;
}
- synchronized (mProxyLock) {
- mGlobalProxy = proxyProperties;
+ synchronized (mProxyTracker.mProxyLock) {
+ mProxyTracker.mGlobalProxy = proxyProperties;
}
}
}
+ @Override
+ @Nullable
public ProxyInfo getGlobalProxy() {
- // this information is already available as a world read/writable jvm property
- // so this API change wouldn't have a benifit. It also breaks the passing
- // of proxy info to all the JVMs.
- // enforceAccessPermission();
- synchronized (mProxyLock) {
- return mGlobalProxy;
- }
+ return mProxyTracker.getGlobalProxy();
}
private void handleApplyDefaultProxy(ProxyInfo proxy) {
@@ -3375,33 +3334,7 @@
&& Uri.EMPTY.equals(proxy.getPacFileUrl())) {
proxy = null;
}
- synchronized (mProxyLock) {
- if (mDefaultProxy != null && mDefaultProxy.equals(proxy)) return;
- if (mDefaultProxy == proxy) return; // catches repeated nulls
- if (proxy != null && !proxy.isValid()) {
- if (DBG) log("Invalid proxy properties, ignoring: " + proxy.toString());
- return;
- }
-
- // This call could be coming from the PacManager, containing the port of the local
- // proxy. If this new proxy matches the global proxy then copy this proxy to the
- // global (to get the correct local port), and send a broadcast.
- // TODO: Switch PacManager to have its own message to send back rather than
- // reusing EVENT_HAS_CHANGED_PROXY and this call to handleApplyDefaultProxy.
- if ((mGlobalProxy != null) && (proxy != null)
- && (!Uri.EMPTY.equals(proxy.getPacFileUrl()))
- && proxy.getPacFileUrl().equals(mGlobalProxy.getPacFileUrl())) {
- mGlobalProxy = proxy;
- sendProxyBroadcast(mGlobalProxy);
- return;
- }
- mDefaultProxy = proxy;
-
- if (mGlobalProxy != null) return;
- if (!mDefaultProxyDisabled) {
- sendProxyBroadcast(proxy);
- }
- }
+ mProxyTracker.setDefaultProxy(proxy);
}
// If the proxy has changed from oldLp to newLp, resend proxy broadcast with default proxy.
@@ -3409,17 +3342,17 @@
// the default proxy (even if it hasn't changed).
// TODO: Deprecate the broadcast extras as they aren't necessarily applicable in a multi-network
// world where an app might be bound to a non-default network.
- private void updateProxy(LinkProperties newLp, LinkProperties oldLp, NetworkAgentInfo nai) {
+ private void updateProxy(LinkProperties newLp, LinkProperties oldLp) {
ProxyInfo newProxyInfo = newLp == null ? null : newLp.getHttpProxy();
ProxyInfo oldProxyInfo = oldLp == null ? null : oldLp.getHttpProxy();
- if (!proxyInfoEqual(newProxyInfo, oldProxyInfo)) {
- sendProxyBroadcast(getDefaultProxy());
+ if (!ProxyTracker.proxyInfoEqual(newProxyInfo, oldProxyInfo)) {
+ mProxyTracker.sendProxyBroadcast(mProxyTracker.getDefaultProxy());
}
}
private void handleDeprecatedGlobalHttpProxy() {
- String proxy = Settings.Global.getString(mContext.getContentResolver(),
+ final String proxy = Settings.Global.getString(mContext.getContentResolver(),
Settings.Global.HTTP_PROXY);
if (!TextUtils.isEmpty(proxy)) {
String data[] = proxy.split(":");
@@ -3427,7 +3360,7 @@
return;
}
- String proxyHost = data[0];
+ final String proxyHost = data[0];
int proxyPort = 8080;
if (data.length > 1) {
try {
@@ -3436,27 +3369,11 @@
return;
}
}
- ProxyInfo p = new ProxyInfo(data[0], proxyPort, "");
+ final ProxyInfo p = new ProxyInfo(proxyHost, proxyPort, "");
setGlobalProxy(p);
}
}
- private void sendProxyBroadcast(ProxyInfo proxy) {
- if (proxy == null) proxy = new ProxyInfo("", 0, "");
- if (mPacManager.setCurrentProxyScriptUrl(proxy)) return;
- if (DBG) log("sending Proxy Broadcast for " + proxy);
- Intent intent = new Intent(Proxy.PROXY_CHANGE_ACTION);
- intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING |
- Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
- intent.putExtra(Proxy.EXTRA_PROXY_INFO, proxy);
- final long ident = Binder.clearCallingIdentity();
- try {
- mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
- } finally {
- Binder.restoreCallingIdentity(ident);
- }
- }
-
private static class SettingsObserver extends ContentObserver {
final private HashMap<Uri, Integer> mUriEventMap;
final private Context mContext;
@@ -3464,7 +3381,7 @@
SettingsObserver(Context context, Handler handler) {
super(null);
- mUriEventMap = new HashMap<Uri, Integer>();
+ mUriEventMap = new HashMap<>();
mContext = context;
mHandler = handler;
}
@@ -3674,6 +3591,26 @@
}
}
+ /**
+ * Ask all VPN objects to recompute and update their capabilities.
+ *
+ * When underlying networks change, VPNs may have to update capabilities to reflect things
+ * like the metered bit, their transports, and so on. This asks the VPN objects to update
+ * their capabilities, and as this will cause them to send messages to the ConnectivityService
+ * handler thread through their agent, this is asynchronous. When the capabilities objects
+ * are computed they will be up-to-date as they are computed synchronously from here and
+ * this is running on the ConnectivityService thread.
+ * TODO : Fix this and call updateCapabilities inline to remove out-of-order events.
+ */
+ private void updateAllVpnsCapabilities() {
+ synchronized (mVpns) {
+ for (int i = 0; i < mVpns.size(); i++) {
+ final Vpn vpn = mVpns.valueAt(i);
+ vpn.updateCapabilities();
+ }
+ }
+ }
+
@Override
public boolean updateLockdownVpn() {
if (Binder.getCallingUid() != Process.SYSTEM_UID) {
@@ -3750,7 +3687,7 @@
synchronized (mVpns) {
Vpn vpn = mVpns.get(userId);
if (vpn == null) {
- // Shouldn't happen as all codepaths that point here should have checked the Vpn
+ // Shouldn't happen as all code paths that point here should have checked the Vpn
// exists already.
Slog.wtf(TAG, "User " + userId + " has no Vpn configuration");
return false;
@@ -3914,7 +3851,7 @@
url = String.format(url,
mTelephonyManager.getSimSerialNumber() /* ICCID */,
mTelephonyManager.getDeviceId() /* IMEI */,
- phoneNumber /* Phone numer */);
+ phoneNumber /* Phone number */);
}
return url;
@@ -4041,10 +3978,8 @@
}
};
- private final HashMap<Messenger, NetworkFactoryInfo> mNetworkFactoryInfos =
- new HashMap<Messenger, NetworkFactoryInfo>();
- private final HashMap<NetworkRequest, NetworkRequestInfo> mNetworkRequests =
- new HashMap<NetworkRequest, NetworkRequestInfo>();
+ private final HashMap<Messenger, NetworkFactoryInfo> mNetworkFactoryInfos = new HashMap<>();
+ private final HashMap<NetworkRequest, NetworkRequestInfo> mNetworkRequests = new HashMap<>();
private static final int MAX_NETWORK_REQUESTS_PER_UID = 100;
// Map from UID to number of NetworkRequests that UID has filed.
@@ -4148,8 +4083,17 @@
}
}
+ // This checks that the passed capabilities either do not request a specific SSID, or the
+ // calling app has permission to do so.
+ private void ensureSufficientPermissionsForRequest(NetworkCapabilities nc,
+ int callerPid, int callerUid) {
+ if (null != nc.getSSID() && !checkSettingsPermission(callerPid, callerUid)) {
+ throw new SecurityException("Insufficient permissions to request a specific SSID");
+ }
+ }
+
private ArrayList<Integer> getSignalStrengthThresholds(NetworkAgentInfo nai) {
- final SortedSet<Integer> thresholds = new TreeSet();
+ final SortedSet<Integer> thresholds = new TreeSet<>();
synchronized (nai) {
for (NetworkRequestInfo nri : mNetworkRequests.values()) {
if (nri.request.networkCapabilities.hasSignalStrength() &&
@@ -4158,7 +4102,7 @@
}
}
}
- return new ArrayList<Integer>(thresholds);
+ return new ArrayList<>(thresholds);
}
private void updateSignalStrengthThresholds(
@@ -4205,7 +4149,7 @@
// the default network request. This allows callers to keep track of
// the system default network.
if (type == NetworkRequest.Type.TRACK_DEFAULT) {
- networkCapabilities = new NetworkCapabilities(mDefaultRequest.networkCapabilities);
+ networkCapabilities = createDefaultNetworkCapabilitiesForUid(Binder.getCallingUid());
enforceAccessPermission();
} else {
networkCapabilities = new NetworkCapabilities(networkCapabilities);
@@ -4216,6 +4160,14 @@
enforceMeteredApnPolicy(networkCapabilities);
}
ensureRequestableCapabilities(networkCapabilities);
+ ensureSufficientPermissionsForRequest(networkCapabilities,
+ Binder.getCallingPid(), Binder.getCallingUid());
+ // Set the UID range for this request to the single UID of the requester, or to an empty
+ // set of UIDs if the caller has the appropriate permission and UIDs have not been set.
+ // This will overwrite any allowed UIDs in the requested capabilities. Though there
+ // are no visible methods to set the UIDs, an app could use reflection to try and get
+ // networks for other apps so it's essential that the UIDs are overwritten.
+ restrictRequestUidsForCaller(networkCapabilities);
if (timeoutMs < 0) {
throw new IllegalArgumentException("Bad timeout specified");
@@ -4288,7 +4240,10 @@
enforceNetworkRequestPermissions(networkCapabilities);
enforceMeteredApnPolicy(networkCapabilities);
ensureRequestableCapabilities(networkCapabilities);
+ ensureSufficientPermissionsForRequest(networkCapabilities,
+ Binder.getCallingPid(), Binder.getCallingUid());
ensureValidNetworkSpecifier(networkCapabilities);
+ restrictRequestUidsForCaller(networkCapabilities);
NetworkRequest networkRequest = new NetworkRequest(networkCapabilities, TYPE_NONE,
nextNetworkRequestId(), NetworkRequest.Type.REQUEST);
@@ -4342,15 +4297,16 @@
}
NetworkCapabilities nc = new NetworkCapabilities(networkCapabilities);
- if (!ConnectivityManager.checkChangePermission(mContext)) {
- // Apps without the CHANGE_NETWORK_STATE permission can't use background networks, so
- // make all their listens include NET_CAPABILITY_FOREGROUND. That way, they will get
- // onLost and onAvailable callbacks when networks move in and out of the background.
- // There is no need to do this for requests because an app without CHANGE_NETWORK_STATE
- // can't request networks.
- nc.addCapability(NET_CAPABILITY_FOREGROUND);
- }
- ensureValidNetworkSpecifier(networkCapabilities);
+ ensureSufficientPermissionsForRequest(networkCapabilities,
+ Binder.getCallingPid(), Binder.getCallingUid());
+ restrictRequestUidsForCaller(nc);
+ // Apps without the CHANGE_NETWORK_STATE permission can't use background networks, so
+ // make all their listens include NET_CAPABILITY_FOREGROUND. That way, they will get
+ // onLost and onAvailable callbacks when networks move in and out of the background.
+ // There is no need to do this for requests because an app without CHANGE_NETWORK_STATE
+ // can't request networks.
+ restrictBackgroundRequestForCaller(nc);
+ ensureValidNetworkSpecifier(nc);
NetworkRequest networkRequest = new NetworkRequest(nc, TYPE_NONE, nextNetworkRequestId(),
NetworkRequest.Type.LISTEN);
@@ -4369,9 +4325,13 @@
enforceAccessPermission();
}
ensureValidNetworkSpecifier(networkCapabilities);
+ ensureSufficientPermissionsForRequest(networkCapabilities,
+ Binder.getCallingPid(), Binder.getCallingUid());
- NetworkRequest networkRequest = new NetworkRequest(
- new NetworkCapabilities(networkCapabilities), TYPE_NONE, nextNetworkRequestId(),
+ final NetworkCapabilities nc = new NetworkCapabilities(networkCapabilities);
+ restrictRequestUidsForCaller(nc);
+
+ NetworkRequest networkRequest = new NetworkRequest(nc, TYPE_NONE, nextNetworkRequestId(),
NetworkRequest.Type.LISTEN);
NetworkRequestInfo nri = new NetworkRequestInfo(networkRequest, operation);
if (VDBG) log("pendingListenForNetwork for " + nri);
@@ -4422,13 +4382,11 @@
*/
// NOTE: Accessed on multiple threads, must be synchronized on itself.
@GuardedBy("mNetworkForRequestId")
- private final SparseArray<NetworkAgentInfo> mNetworkForRequestId =
- new SparseArray<NetworkAgentInfo>();
+ private final SparseArray<NetworkAgentInfo> mNetworkForRequestId = new SparseArray<>();
// NOTE: Accessed on multiple threads, must be synchronized on itself.
@GuardedBy("mNetworkForNetId")
- private final SparseArray<NetworkAgentInfo> mNetworkForNetId =
- new SparseArray<NetworkAgentInfo>();
+ private final SparseArray<NetworkAgentInfo> mNetworkForNetId = new SparseArray<>();
// NOTE: Accessed on multiple threads, synchronized with mNetworkForNetId.
// An entry is first added to mNetIdInUse, prior to mNetworkForNetId, so
// there may not be a strict 1:1 correlation between the two.
@@ -4438,11 +4396,10 @@
// NetworkAgentInfo keyed off its connecting messenger
// TODO - eval if we can reduce the number of lists/hashmaps/sparsearrays
// NOTE: Only should be accessed on ConnectivityServiceThread, except dump().
- private final HashMap<Messenger, NetworkAgentInfo> mNetworkAgentInfos =
- new HashMap<Messenger, NetworkAgentInfo>();
+ private final HashMap<Messenger, NetworkAgentInfo> mNetworkAgentInfos = new HashMap<>();
@GuardedBy("mBlockedAppUids")
- private final HashSet<Integer> mBlockedAppUids = new HashSet();
+ private final HashSet<Integer> mBlockedAppUids = new HashSet<>();
// Note: if mDefaultRequest is changed, NetworkMonitor needs to be updated.
private final NetworkRequest mDefaultRequest;
@@ -4490,40 +4447,45 @@
lp.ensureDirectlyConnectedRoutes();
// TODO: Instead of passing mDefaultRequest, provide an API to determine whether a Network
// satisfies mDefaultRequest.
+ final NetworkCapabilities nc = new NetworkCapabilities(networkCapabilities);
final NetworkAgentInfo nai = new NetworkAgentInfo(messenger, new AsyncChannel(),
- new Network(reserveNetId()), new NetworkInfo(networkInfo), lp,
- new NetworkCapabilities(networkCapabilities), currentScore,
+ new Network(reserveNetId()), new NetworkInfo(networkInfo), lp, nc, currentScore,
mContext, mTrackerHandler, new NetworkMisc(networkMisc), mDefaultRequest, this);
+ // Make sure the network capabilities reflect what the agent info says.
+ nai.networkCapabilities = mixInCapabilities(nai, nc);
synchronized (this) {
nai.networkMonitor.systemReady = mSystemReady;
}
- addValidationLogs(nai.networkMonitor.getValidationLogs(), nai.network,
- networkInfo.getExtraInfo());
+ final String extraInfo = networkInfo.getExtraInfo();
+ final String name = TextUtils.isEmpty(extraInfo)
+ ? nai.networkCapabilities.getSSID() : extraInfo;
+ addValidationLogs(nai.networkMonitor.getValidationLogs(), nai.network, name);
if (DBG) log("registerNetworkAgent " + nai);
mHandler.sendMessage(mHandler.obtainMessage(EVENT_REGISTER_NETWORK_AGENT, nai));
return nai.network.netId;
}
- private void handleRegisterNetworkAgent(NetworkAgentInfo na) {
+ private void handleRegisterNetworkAgent(NetworkAgentInfo nai) {
if (VDBG) log("Got NetworkAgent Messenger");
- mNetworkAgentInfos.put(na.messenger, na);
+ mNetworkAgentInfos.put(nai.messenger, nai);
synchronized (mNetworkForNetId) {
- mNetworkForNetId.put(na.network.netId, na);
+ mNetworkForNetId.put(nai.network.netId, nai);
}
- na.asyncChannel.connect(mContext, mTrackerHandler, na.messenger);
- NetworkInfo networkInfo = na.networkInfo;
- na.networkInfo = null;
- updateNetworkInfo(na, networkInfo);
+ nai.asyncChannel.connect(mContext, mTrackerHandler, nai.messenger);
+ NetworkInfo networkInfo = nai.networkInfo;
+ nai.networkInfo = null;
+ updateNetworkInfo(nai, networkInfo);
+ updateUids(nai, null, nai.networkCapabilities);
}
private void updateLinkProperties(NetworkAgentInfo networkAgent, LinkProperties oldLp) {
- LinkProperties newLp = networkAgent.linkProperties;
+ LinkProperties newLp = new LinkProperties(networkAgent.linkProperties);
int netId = networkAgent.network.netId;
// The NetworkAgentInfo does not know whether clatd is running on its network or not. Before
// we do anything else, make sure its LinkProperties are accurate.
if (networkAgent.clatd != null) {
- networkAgent.clatd.fixupLinkProperties(oldLp);
+ networkAgent.clatd.fixupLinkProperties(oldLp, newLp);
}
updateInterfaces(newLp, oldLp, netId, networkAgent.networkCapabilities);
@@ -4536,16 +4498,24 @@
updateRoutes(newLp, oldLp, netId);
updateDnses(newLp, oldLp, netId);
+ // Make sure LinkProperties represents the latest private DNS status.
+ // This does not need to be done before updateDnses because the
+ // LinkProperties are not the source of the private DNS configuration.
+ // updateDnses will fetch the private DNS configuration from DnsManager.
+ mDnsManager.updatePrivateDnsStatus(netId, newLp);
// Start or stop clat accordingly to network state.
networkAgent.updateClat(mNetd);
if (isDefaultNetwork(networkAgent)) {
handleApplyDefaultProxy(newLp.getHttpProxy());
} else {
- updateProxy(newLp, oldLp, networkAgent);
+ updateProxy(newLp, oldLp);
}
// TODO - move this check to cover the whole function
if (!Objects.equals(newLp, oldLp)) {
+ synchronized (networkAgent) {
+ networkAgent.linkProperties = newLp;
+ }
notifyIfacesChangedForNetworkStats();
notifyNetworkCallbacks(networkAgent, ConnectivityManager.CALLBACK_IP_CHANGED);
}
@@ -4554,7 +4524,7 @@
}
private void wakeupModifyInterface(String iface, NetworkCapabilities caps, boolean add) {
- // Marks are only available on WiFi interaces. Checking for
+ // Marks are only available on WiFi interfaces. Checking for
// marks on unsupported interfaces is harmless.
if (!caps.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
return;
@@ -4586,7 +4556,7 @@
private void updateInterfaces(LinkProperties newLp, LinkProperties oldLp, int netId,
NetworkCapabilities caps) {
- CompareResult<String> interfaceDiff = new CompareResult<String>(
+ CompareResult<String> interfaceDiff = new CompareResult<>(
oldLp != null ? oldLp.getAllInterfaceNames() : null,
newLp != null ? newLp.getAllInterfaceNames() : null);
for (String iface : interfaceDiff.added) {
@@ -4621,7 +4591,7 @@
// add routes before removing old in case it helps with continuous connectivity
- // do this twice, adding non-nexthop routes first, then routes they are dependent on
+ // do this twice, adding non-next-hop routes first, then routes they are dependent on
for (RouteInfo route : routeDiff.added) {
if (route.hasGateway()) continue;
if (VDBG) log("Adding Route [" + route + "] to network " + netId);
@@ -4721,6 +4691,11 @@
} else {
newNc.addCapability(NET_CAPABILITY_FOREGROUND);
}
+ if (nai.isSuspended()) {
+ newNc.removeCapability(NET_CAPABILITY_NOT_SUSPENDED);
+ } else {
+ newNc.addCapability(NET_CAPABILITY_NOT_SUSPENDED);
+ }
return newNc;
}
@@ -4762,6 +4737,8 @@
nai.networkCapabilities = newNc;
}
+ updateUids(nai, prevNc, newNc);
+
if (nai.getCurrentScore() == oldScore && newNc.equalRequestableCapabilities(prevNc)) {
// If the requestable capabilities haven't changed, and the score hasn't changed, then
// the change we're processing can't affect any requests, it can only affect the listens
@@ -4789,17 +4766,40 @@
if (!newNc.hasTransport(TRANSPORT_VPN)) {
// Tell VPNs about updated capabilities, since they may need to
// bubble those changes through.
- synchronized (mVpns) {
- for (int i = 0; i < mVpns.size(); i++) {
- final Vpn vpn = mVpns.valueAt(i);
- vpn.updateCapabilities();
- }
+ updateAllVpnsCapabilities();
+ }
+ }
+
+ private void updateUids(NetworkAgentInfo nai, NetworkCapabilities prevNc,
+ NetworkCapabilities newNc) {
+ Set<UidRange> prevRanges = null == prevNc ? null : prevNc.getUids();
+ Set<UidRange> newRanges = null == newNc ? null : newNc.getUids();
+ if (null == prevRanges) prevRanges = new ArraySet<>();
+ if (null == newRanges) newRanges = new ArraySet<>();
+ final Set<UidRange> prevRangesCopy = new ArraySet<>(prevRanges);
+
+ prevRanges.removeAll(newRanges);
+ newRanges.removeAll(prevRangesCopy);
+
+ try {
+ if (!newRanges.isEmpty()) {
+ final UidRange[] addedRangesArray = new UidRange[newRanges.size()];
+ newRanges.toArray(addedRangesArray);
+ mNetd.addVpnUidRanges(nai.network.netId, addedRangesArray);
}
+ if (!prevRanges.isEmpty()) {
+ final UidRange[] removedRangesArray = new UidRange[prevRanges.size()];
+ prevRanges.toArray(removedRangesArray);
+ mNetd.removeVpnUidRanges(nai.network.netId, removedRangesArray);
+ }
+ } catch (Exception e) {
+ // Never crash!
+ loge("Exception in updateUids: " + e);
}
}
public void handleUpdateLinkProperties(NetworkAgentInfo nai, LinkProperties newLp) {
- if (mNetworkForNetId.get(nai.network.netId) != nai) {
+ if (getNetworkAgentInfoForNetId(nai.network.netId) != nai) {
// Ignore updates for disconnected networks
return;
}
@@ -4871,7 +4871,7 @@
releasePendingNetworkRequestWithDelay(pendingIntent);
}
- private static void callCallbackForRequest(NetworkRequestInfo nri,
+ private void callCallbackForRequest(NetworkRequestInfo nri,
NetworkAgentInfo networkAgent, int notificationType, int arg1) {
if (nri.messenger == null) {
return; // Default request has no msgr
@@ -4884,12 +4884,20 @@
putParcelable(bundle, networkAgent.network);
}
switch (notificationType) {
+ case ConnectivityManager.CALLBACK_AVAILABLE: {
+ putParcelable(bundle, new NetworkCapabilities(networkAgent.networkCapabilities));
+ putParcelable(bundle, new LinkProperties(networkAgent.linkProperties));
+ break;
+ }
case ConnectivityManager.CALLBACK_LOSING: {
msg.arg1 = arg1;
break;
}
case ConnectivityManager.CALLBACK_CAP_CHANGED: {
- putParcelable(bundle, new NetworkCapabilities(networkAgent.networkCapabilities));
+ // networkAgent can't be null as it has been accessed a few lines above.
+ final NetworkCapabilities nc = networkCapabilitiesRestrictedForCallerPermissions(
+ networkAgent.networkCapabilities, nri.mPid, nri.mUid);
+ putParcelable(bundle, nc);
break;
}
case ConnectivityManager.CALLBACK_IP_CHANGED: {
@@ -5031,8 +5039,8 @@
// Find and migrate to this Network any NetworkRequests for
// which this network is now the best.
- ArrayList<NetworkAgentInfo> affectedNetworks = new ArrayList<NetworkAgentInfo>();
- ArrayList<NetworkRequestInfo> addedRequests = new ArrayList<NetworkRequestInfo>();
+ ArrayList<NetworkAgentInfo> affectedNetworks = new ArrayList<>();
+ ArrayList<NetworkRequestInfo> addedRequests = new ArrayList<>();
NetworkCapabilities nc = newNetwork.networkCapabilities;
if (VDBG) log(" network has: " + nc);
for (NetworkRequestInfo nri : mNetworkRequests.values()) {
@@ -5082,7 +5090,7 @@
keep = true;
// Tell NetworkFactories about the new score, so they can stop
// trying to connect if they know they cannot match it.
- // TODO - this could get expensive if we have alot of requests for this
+ // TODO - this could get expensive if we have a lot of requests for this
// network. Think about if there is a way to reduce this. Push
// netid->request mapping to each factory?
sendUpdatedScoreToFactories(nri.request, score);
@@ -5197,14 +5205,13 @@
for (LinkProperties stacked : newNetwork.linkProperties.getStackedLinks()) {
final String stackedIface = stacked.getInterfaceName();
bs.noteNetworkInterfaceType(stackedIface, type);
- NetworkStatsFactory.noteStackedIface(stackedIface, baseIface);
}
} catch (RemoteException ignored) {
}
// This has to happen after the notifyNetworkCallbacks as that tickles each
// ConnectivityManager instance so that legacy requests correctly bind dns
- // requests to this network. The legacy users are listening for this bcast
+ // requests to this network. The legacy users are listening for this broadcast
// and will generally do a dns request so they can ensureRouteToHost and if
// they do that before the callbacks happen they'll use the default network.
//
@@ -5269,7 +5276,7 @@
// TODO: This may get slow. The "changed" parameter is provided for future optimization
// to avoid the slowness. It is not simply enough to process just "changed", for
// example in the case where "changed"'s score decreases and another network should begin
- // satifying a NetworkRequest that "changed" currently satisfies.
+ // satisfying a NetworkRequest that "changed" currently satisfies.
// Optimization: Only reprocess "changed" if its score improved. This is safe because it
// can only add more NetworkRequests satisfied by "changed", and this is exactly what
@@ -5368,19 +5375,24 @@
if (!networkAgent.everConnected && state == NetworkInfo.State.CONNECTED) {
networkAgent.everConnected = true;
+ if (networkAgent.linkProperties == null) {
+ Slog.wtf(TAG, networkAgent.name() + " connected with null LinkProperties");
+ }
+
+ handlePerNetworkPrivateDnsConfig(networkAgent, mDnsManager.getPrivateDnsConfig());
updateLinkProperties(networkAgent, null);
- notifyIfacesChangedForNetworkStats();
networkAgent.networkMonitor.sendMessage(NetworkMonitor.CMD_NETWORK_CONNECTED);
scheduleUnvalidatedPrompt(networkAgent);
if (networkAgent.isVPN()) {
// Temporarily disable the default proxy (not global).
- synchronized (mProxyLock) {
- if (!mDefaultProxyDisabled) {
- mDefaultProxyDisabled = true;
- if (mGlobalProxy == null && mDefaultProxy != null) {
- sendProxyBroadcast(null);
+ synchronized (mProxyTracker.mProxyLock) {
+ if (!mProxyTracker.mDefaultProxyDisabled) {
+ mProxyTracker.mDefaultProxyDisabled = true;
+ if (mProxyTracker.mGlobalProxy == null
+ && mProxyTracker.mDefaultProxy != null) {
+ mProxyTracker.sendProxyBroadcast(null);
}
}
}
@@ -5405,21 +5417,28 @@
} else if (state == NetworkInfo.State.DISCONNECTED) {
networkAgent.asyncChannel.disconnect();
if (networkAgent.isVPN()) {
- synchronized (mProxyLock) {
- if (mDefaultProxyDisabled) {
- mDefaultProxyDisabled = false;
- if (mGlobalProxy == null && mDefaultProxy != null) {
- sendProxyBroadcast(mDefaultProxy);
+ synchronized (mProxyTracker.mProxyLock) {
+ if (mProxyTracker.mDefaultProxyDisabled) {
+ mProxyTracker.mDefaultProxyDisabled = false;
+ if (mProxyTracker.mGlobalProxy == null
+ && mProxyTracker.mDefaultProxy != null) {
+ mProxyTracker.sendProxyBroadcast(mProxyTracker.mDefaultProxy);
}
}
}
+ updateUids(networkAgent, networkAgent.networkCapabilities, null);
}
+ disconnectAndDestroyNetwork(networkAgent);
} else if ((oldInfo != null && oldInfo.getState() == NetworkInfo.State.SUSPENDED) ||
state == NetworkInfo.State.SUSPENDED) {
- // going into or coming out of SUSPEND: rescore and notify
+ // going into or coming out of SUSPEND: re-score and notify
if (networkAgent.getCurrentScore() != oldScore) {
rematchAllNetworksAndRequests(networkAgent, oldScore);
}
+ updateCapabilities(networkAgent.getCurrentScore(), networkAgent,
+ networkAgent.networkCapabilities);
+ // TODO (b/73132094) : remove this call once the few users of onSuspended and
+ // onResumed have been removed.
notifyNetworkCallbacks(networkAgent, (state == NetworkInfo.State.SUSPENDED ?
ConnectivityManager.CALLBACK_SUSPENDED :
ConnectivityManager.CALLBACK_RESUMED));
@@ -5456,14 +5475,6 @@
}
callCallbackForRequest(nri, nai, ConnectivityManager.CALLBACK_AVAILABLE, 0);
- // Whether a network is currently suspended is also an important
- // element of state to be transferred (it would not otherwise be
- // delivered by any currently available mechanism).
- if (nai.networkInfo.getState() == NetworkInfo.State.SUSPENDED) {
- callCallbackForRequest(nri, nai, ConnectivityManager.CALLBACK_SUSPENDED, 0);
- }
- callCallbackForRequest(nri, nai, ConnectivityManager.CALLBACK_CAP_CHANGED, 0);
- callCallbackForRequest(nri, nai, ConnectivityManager.CALLBACK_IP_CHANGED, 0);
}
private void sendLegacyNetworkBroadcast(NetworkAgentInfo nai, DetailedState state, int type) {
@@ -5719,4 +5730,61 @@
private static int encodeBool(boolean b) {
return b ? 1 : 0;
}
-}
+
+ @Override
+ public void onShellCommand(FileDescriptor in, FileDescriptor out,
+ FileDescriptor err, String[] args, ShellCallback callback,
+ ResultReceiver resultReceiver) {
+ (new ShellCmd()).exec(this, in, out, err, args, callback, resultReceiver);
+ }
+
+ private class ShellCmd extends ShellCommand {
+
+ @Override
+ public int onCommand(String cmd) {
+ if (cmd == null) {
+ return handleDefaultCommands(cmd);
+ }
+ final PrintWriter pw = getOutPrintWriter();
+ try {
+ switch (cmd) {
+ case "airplane-mode":
+ final String action = getNextArg();
+ if ("enable".equals(action)) {
+ setAirplaneMode(true);
+ return 0;
+ } else if ("disable".equals(action)) {
+ setAirplaneMode(false);
+ return 0;
+ } else if (action == null) {
+ final ContentResolver cr = mContext.getContentResolver();
+ final int enabled = Settings.Global.getInt(cr,
+ Settings.Global.AIRPLANE_MODE_ON);
+ pw.println(enabled == 0 ? "disabled" : "enabled");
+ return 0;
+ } else {
+ onHelp();
+ return -1;
+ }
+ default:
+ return handleDefaultCommands(cmd);
+ }
+ } catch (Exception e) {
+ pw.println(e);
+ }
+ return -1;
+ }
+
+ @Override
+ public void onHelp() {
+ PrintWriter pw = getOutPrintWriter();
+ pw.println("Connectivity service commands:");
+ pw.println(" help");
+ pw.println(" Print this help text.");
+ pw.println(" airplane-mode [enable|disable]");
+ pw.println(" Turn airplane mode on or off.");
+ pw.println(" airplane-mode");
+ pw.println(" Get airplane mode.");
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 3ee798b..0e3c5ea 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -1788,8 +1788,7 @@
// If the screen is on, inform the new client it is active
if (mIsInteractive) {
- executeOrSendMessage(cs.client, mCaller.obtainMessageIO(
- MSG_SET_ACTIVE, mIsInteractive ? 1 : 0, cs));
+ executeOrSendMessage(cs.client, mCaller.obtainMessageIO(MSG_SET_ACTIVE, 1, cs));
}
}
diff --git a/services/core/java/com/android/server/IpSecService.java b/services/core/java/com/android/server/IpSecService.java
index 24d493e..744ed25 100644
--- a/services/core/java/com/android/server/IpSecService.java
+++ b/services/core/java/com/android/server/IpSecService.java
@@ -24,6 +24,8 @@
import static android.system.OsConstants.SOCK_DGRAM;
import static com.android.internal.util.Preconditions.checkNotNull;
+import android.annotation.NonNull;
+import android.app.AppOpsManager;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.IIpSecService;
@@ -34,11 +36,15 @@
import android.net.IpSecSpiResponse;
import android.net.IpSecTransform;
import android.net.IpSecTransformResponse;
+import android.net.IpSecTunnelInterfaceResponse;
import android.net.IpSecUdpEncapResponse;
+import android.net.LinkAddress;
+import android.net.Network;
import android.net.NetworkUtils;
import android.net.TrafficStats;
import android.net.util.NetdService;
import android.os.Binder;
+import android.os.DeadSystemException;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
@@ -50,6 +56,7 @@
import android.util.Log;
import android.util.Slog;
import android.util.SparseArray;
+import android.util.SparseBooleanArray;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
@@ -84,6 +91,7 @@
private static final String NETD_SERVICE_NAME = "netd";
private static final int[] DIRECTIONS =
new int[] {IpSecManager.DIRECTION_OUT, IpSecManager.DIRECTION_IN};
+ private static final String[] WILDCARD_ADDRESSES = new String[]{"0.0.0.0", "::"};
private static final int NETD_FETCH_TIMEOUT_MS = 5000; // ms
private static final int MAX_PORT_BIND_ATTEMPTS = 10;
@@ -347,6 +355,7 @@
@VisibleForTesting
static final class UserRecord {
/* Maximum number of each type of resource that a single UID may possess */
+ public static final int MAX_NUM_TUNNEL_INTERFACES = 2;
public static final int MAX_NUM_ENCAP_SOCKETS = 2;
public static final int MAX_NUM_TRANSFORMS = 4;
public static final int MAX_NUM_SPIS = 8;
@@ -366,6 +375,8 @@
new RefcountedResourceArray<>(TransformRecord.class.getSimpleName());
final RefcountedResourceArray<EncapSocketRecord> mEncapSocketRecords =
new RefcountedResourceArray<>(EncapSocketRecord.class.getSimpleName());
+ final RefcountedResourceArray<TunnelInterfaceRecord> mTunnelInterfaceRecords =
+ new RefcountedResourceArray<>(TunnelInterfaceRecord.class.getSimpleName());
/**
* Trackers for quotas for each of the OwnedResource types.
@@ -379,6 +390,7 @@
final ResourceTracker mSpiQuotaTracker = new ResourceTracker(MAX_NUM_SPIS);
final ResourceTracker mTransformQuotaTracker = new ResourceTracker(MAX_NUM_TRANSFORMS);
final ResourceTracker mSocketQuotaTracker = new ResourceTracker(MAX_NUM_ENCAP_SOCKETS);
+ final ResourceTracker mTunnelQuotaTracker = new ResourceTracker(MAX_NUM_TUNNEL_INTERFACES);
void removeSpiRecord(int resourceId) {
mSpiRecords.remove(resourceId);
@@ -388,6 +400,10 @@
mTransformRecords.remove(resourceId);
}
+ void removeTunnelInterfaceRecord(int resourceId) {
+ mTunnelInterfaceRecords.remove(resourceId);
+ }
+
void removeEncapSocketRecord(int resourceId) {
mEncapSocketRecords.remove(resourceId);
}
@@ -401,12 +417,16 @@
.append(mTransformQuotaTracker)
.append(", mSocketQuotaTracker=")
.append(mSocketQuotaTracker)
+ .append(", mTunnelQuotaTracker=")
+ .append(mTunnelQuotaTracker)
.append(", mSpiRecords=")
.append(mSpiRecords)
.append(", mTransformRecords=")
.append(mTransformRecords)
.append(", mEncapSocketRecords=")
.append(mEncapSocketRecords)
+ .append(", mTunnelInterfaceRecords=")
+ .append(mTunnelInterfaceRecords)
.append("}")
.toString();
}
@@ -583,6 +603,10 @@
return mSpi;
}
+ public EncapSocketRecord getSocketRecord() {
+ return mSocket;
+ }
+
/** always guarded by IpSecService#this */
@Override
public void freeUnderlyingResources() {
@@ -594,11 +618,11 @@
mResourceId,
mConfig.getSourceAddress(),
mConfig.getDestinationAddress(),
- spi);
- } catch (ServiceSpecificException e) {
- // FIXME: get the error code and throw is at an IOException from Errno Exception
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to delete SA with ID: " + mResourceId);
+ spi,
+ mConfig.getMarkValue(),
+ mConfig.getMarkMask());
+ } catch (RemoteException | ServiceSpecificException e) {
+ Log.e(TAG, "Failed to delete SA with ID: " + mResourceId, e);
}
getResourceTracker().give();
@@ -654,14 +678,14 @@
@Override
public void freeUnderlyingResources() {
try {
- mSrvConfig
- .getNetdInstance()
- .ipSecDeleteSecurityAssociation(
- mResourceId, mSourceAddress, mDestinationAddress, mSpi);
- } catch (ServiceSpecificException e) {
- // FIXME: get the error code and throw is at an IOException from Errno Exception
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to delete SPI reservation with ID: " + mResourceId);
+ if (!mOwnedByTransform) {
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecDeleteSecurityAssociation(
+ mResourceId, mSourceAddress, mDestinationAddress, mSpi, 0, 0);
+ }
+ } catch (ServiceSpecificException | RemoteException e) {
+ Log.e(TAG, "Failed to delete SPI reservation with ID: " + mResourceId, e);
}
mSpi = IpSecManager.INVALID_SECURITY_PARAMETER_INDEX;
@@ -719,6 +743,165 @@
}
}
+ // These values have been reserved in ConnectivityService
+ @VisibleForTesting static final int TUN_INTF_NETID_START = 0xFC00;
+
+ @VisibleForTesting static final int TUN_INTF_NETID_RANGE = 0x0400;
+
+ private final SparseBooleanArray mTunnelNetIds = new SparseBooleanArray();
+ private int mNextTunnelNetIdIndex = 0;
+
+ /**
+ * Reserves a netId within the range of netIds allocated for IPsec tunnel interfaces
+ *
+ * <p>This method should only be called from Binder threads. Do not call this from within the
+ * system server as it will crash the system on failure.
+ *
+ * @return an integer key within the netId range, if successful
+ * @throws IllegalStateException if unsuccessful (all netId are currently reserved)
+ */
+ @VisibleForTesting
+ int reserveNetId() {
+ synchronized (mTunnelNetIds) {
+ for (int i = 0; i < TUN_INTF_NETID_RANGE; i++) {
+ int index = mNextTunnelNetIdIndex;
+ int netId = index + TUN_INTF_NETID_START;
+ if (++mNextTunnelNetIdIndex >= TUN_INTF_NETID_RANGE) mNextTunnelNetIdIndex = 0;
+ if (!mTunnelNetIds.get(netId)) {
+ mTunnelNetIds.put(netId, true);
+ return netId;
+ }
+ }
+ }
+ throw new IllegalStateException("No free netIds to allocate");
+ }
+
+ @VisibleForTesting
+ void releaseNetId(int netId) {
+ synchronized (mTunnelNetIds) {
+ mTunnelNetIds.delete(netId);
+ }
+ }
+
+ private final class TunnelInterfaceRecord extends OwnedResourceRecord {
+ private final String mInterfaceName;
+ private final Network mUnderlyingNetwork;
+
+ // outer addresses
+ private final String mLocalAddress;
+ private final String mRemoteAddress;
+
+ private final int mIkey;
+ private final int mOkey;
+
+ TunnelInterfaceRecord(
+ int resourceId,
+ String interfaceName,
+ Network underlyingNetwork,
+ String localAddr,
+ String remoteAddr,
+ int ikey,
+ int okey) {
+ super(resourceId);
+
+ mInterfaceName = interfaceName;
+ mUnderlyingNetwork = underlyingNetwork;
+ mLocalAddress = localAddr;
+ mRemoteAddress = remoteAddr;
+ mIkey = ikey;
+ mOkey = okey;
+ }
+
+ /** always guarded by IpSecService#this */
+ @Override
+ public void freeUnderlyingResources() {
+ // Calls to netd
+ // Teardown VTI
+ // Delete global policies
+ try {
+ mSrvConfig.getNetdInstance().removeVirtualTunnelInterface(mInterfaceName);
+
+ for(String wildcardAddr : WILDCARD_ADDRESSES) {
+ for (int direction : DIRECTIONS) {
+ int mark = (direction == IpSecManager.DIRECTION_IN) ? mIkey : mOkey;
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecDeleteSecurityPolicy(
+ 0, direction, wildcardAddr, wildcardAddr, mark, 0xffffffff);
+ }
+ }
+ } catch (ServiceSpecificException | RemoteException e) {
+ Log.e(
+ TAG,
+ "Failed to delete VTI with interface name: "
+ + mInterfaceName
+ + " and id: "
+ + mResourceId, e);
+ }
+
+ getResourceTracker().give();
+ releaseNetId(mIkey);
+ releaseNetId(mOkey);
+ }
+
+ public String getInterfaceName() {
+ return mInterfaceName;
+ }
+
+ public Network getUnderlyingNetwork() {
+ return mUnderlyingNetwork;
+ }
+
+ /** Returns the local, outer address for the tunnelInterface */
+ public String getLocalAddress() {
+ return mLocalAddress;
+ }
+
+ /** Returns the remote, outer address for the tunnelInterface */
+ public String getRemoteAddress() {
+ return mRemoteAddress;
+ }
+
+ public int getIkey() {
+ return mIkey;
+ }
+
+ public int getOkey() {
+ return mOkey;
+ }
+
+ @Override
+ protected ResourceTracker getResourceTracker() {
+ return getUserRecord().mTunnelQuotaTracker;
+ }
+
+ @Override
+ public void invalidate() {
+ getUserRecord().removeTunnelInterfaceRecord(mResourceId);
+ }
+
+ @Override
+ public String toString() {
+ return new StringBuilder()
+ .append("{super=")
+ .append(super.toString())
+ .append(", mInterfaceName=")
+ .append(mInterfaceName)
+ .append(", mUnderlyingNetwork=")
+ .append(mUnderlyingNetwork)
+ .append(", mLocalAddress=")
+ .append(mLocalAddress)
+ .append(", mRemoteAddress=")
+ .append(mRemoteAddress)
+ .append(", mIkey=")
+ .append(mIkey)
+ .append(", mOkey=")
+ .append(mOkey)
+ .append("}")
+ .toString();
+ }
+ }
+
/**
* Tracks a UDP encap socket, and manages cleanup paths
*
@@ -750,7 +933,7 @@
return mPort;
}
- public FileDescriptor getSocket() {
+ public FileDescriptor getFileDescriptor() {
return mSocket;
}
@@ -793,6 +976,13 @@
return service;
}
+ @NonNull
+ private AppOpsManager getAppOpsManager() {
+ AppOpsManager appOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
+ if(appOps == null) throw new RuntimeException("System Server couldn't get AppOps");
+ return appOps;
+ }
+
/** @hide */
@VisibleForTesting
public IpSecService(Context context, IpSecServiceConfiguration config) {
@@ -884,7 +1074,10 @@
public synchronized IpSecSpiResponse allocateSecurityParameterIndex(
String destinationAddress, int requestedSpi, IBinder binder) throws RemoteException {
checkInetAddress(destinationAddress);
- /* requestedSpi can be anything in the int range, so no check is needed. */
+ // RFC 4303 Section 2.1 - 0=local, 1-255=reserved.
+ if (requestedSpi > 0 && requestedSpi < 256) {
+ throw new IllegalArgumentException("ESP SPI must not be in the range of 0-255.");
+ }
checkNotNull(binder, "Null Binder passed to allocateSecurityParameterIndex");
UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
@@ -907,9 +1100,11 @@
new RefcountedResource<SpiRecord>(
new SpiRecord(resourceId, "", destinationAddress, spi), binder));
} catch (ServiceSpecificException e) {
- // TODO: Add appropriate checks when other ServiceSpecificException types are supported
- return new IpSecSpiResponse(
- IpSecManager.Status.SPI_UNAVAILABLE, INVALID_RESOURCE_ID, spi);
+ if (e.errorCode == OsConstants.ENOENT) {
+ return new IpSecSpiResponse(
+ IpSecManager.Status.SPI_UNAVAILABLE, INVALID_RESOURCE_ID, spi);
+ }
+ throw e;
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -921,7 +1116,6 @@
*/
private void releaseResource(RefcountedResourceArray resArray, int resourceId)
throws RemoteException {
-
resArray.getRefcountedResourceOrThrow(resourceId).userRelease();
}
@@ -1049,6 +1243,156 @@
releaseResource(userRecord.mEncapSocketRecords, resourceId);
}
+ /**
+ * Create a tunnel interface for use in IPSec tunnel mode. The system server will cache the
+ * tunnel interface and a record of its owner so that it can and must be freed when no longer
+ * needed.
+ */
+ @Override
+ public synchronized IpSecTunnelInterfaceResponse createTunnelInterface(
+ String localAddr, String remoteAddr, Network underlyingNetwork, IBinder binder,
+ String callingPackage) {
+ enforceTunnelPermissions(callingPackage);
+ checkNotNull(binder, "Null Binder passed to createTunnelInterface");
+ checkNotNull(underlyingNetwork, "No underlying network was specified");
+ checkInetAddress(localAddr);
+ checkInetAddress(remoteAddr);
+
+ // TODO: Check that underlying network exists, and IP addresses not assigned to a different
+ // network (b/72316676).
+
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+ if (!userRecord.mTunnelQuotaTracker.isAvailable()) {
+ return new IpSecTunnelInterfaceResponse(IpSecManager.Status.RESOURCE_UNAVAILABLE);
+ }
+
+ final int resourceId = mNextResourceId++;
+ final int ikey = reserveNetId();
+ final int okey = reserveNetId();
+ String intfName = String.format("%s%d", INetd.IPSEC_INTERFACE_PREFIX, resourceId);
+
+ try {
+ // Calls to netd:
+ // Create VTI
+ // Add inbound/outbound global policies
+ // (use reqid = 0)
+ mSrvConfig
+ .getNetdInstance()
+ .addVirtualTunnelInterface(intfName, localAddr, remoteAddr, ikey, okey);
+
+ for(String wildcardAddr : WILDCARD_ADDRESSES) {
+ for (int direction : DIRECTIONS) {
+ int mark = (direction == IpSecManager.DIRECTION_OUT) ? okey : ikey;
+
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecAddSecurityPolicy(
+ 0, // Use 0 for reqId
+ direction,
+ wildcardAddr,
+ wildcardAddr,
+ 0,
+ mark,
+ 0xffffffff);
+ }
+ }
+
+ userRecord.mTunnelInterfaceRecords.put(
+ resourceId,
+ new RefcountedResource<TunnelInterfaceRecord>(
+ new TunnelInterfaceRecord(
+ resourceId,
+ intfName,
+ underlyingNetwork,
+ localAddr,
+ remoteAddr,
+ ikey,
+ okey),
+ binder));
+ return new IpSecTunnelInterfaceResponse(IpSecManager.Status.OK, resourceId, intfName);
+ } catch (RemoteException e) {
+ // Release keys if we got an error.
+ releaseNetId(ikey);
+ releaseNetId(okey);
+ throw e.rethrowFromSystemServer();
+ } catch (Throwable t) {
+ // Release keys if we got an error.
+ releaseNetId(ikey);
+ releaseNetId(okey);
+ throw t;
+ }
+ }
+
+ /**
+ * Adds a new local address to the tunnel interface. This allows packets to be sent and received
+ * from multiple local IP addresses over the same tunnel.
+ */
+ @Override
+ public synchronized void addAddressToTunnelInterface(
+ int tunnelResourceId, LinkAddress localAddr, String callingPackage) {
+ enforceTunnelPermissions(callingPackage);
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+
+ // Get tunnelInterface record; if no such interface is found, will throw
+ // IllegalArgumentException
+ TunnelInterfaceRecord tunnelInterfaceInfo =
+ userRecord.mTunnelInterfaceRecords.getResourceOrThrow(tunnelResourceId);
+
+ try {
+ // We can assume general validity of the IP address, since we get them as a
+ // LinkAddress, which does some validation.
+ mSrvConfig
+ .getNetdInstance()
+ .interfaceAddAddress(
+ tunnelInterfaceInfo.mInterfaceName,
+ localAddr.getAddress().getHostAddress(),
+ localAddr.getPrefixLength());
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Remove a new local address from the tunnel interface. After removal, the address will no
+ * longer be available to send from, or receive on.
+ */
+ @Override
+ public synchronized void removeAddressFromTunnelInterface(
+ int tunnelResourceId, LinkAddress localAddr, String callingPackage) {
+ enforceTunnelPermissions(callingPackage);
+
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+ // Get tunnelInterface record; if no such interface is found, will throw
+ // IllegalArgumentException
+ TunnelInterfaceRecord tunnelInterfaceInfo =
+ userRecord.mTunnelInterfaceRecords.getResourceOrThrow(tunnelResourceId);
+
+ try {
+ // We can assume general validity of the IP address, since we get them as a
+ // LinkAddress, which does some validation.
+ mSrvConfig
+ .getNetdInstance()
+ .interfaceDelAddress(
+ tunnelInterfaceInfo.mInterfaceName,
+ localAddr.getAddress().getHostAddress(),
+ localAddr.getPrefixLength());
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Delete a TunnelInterface that has been been allocated by and registered with the system
+ * server
+ */
+ @Override
+ public synchronized void deleteTunnelInterface(
+ int resourceId, String callingPackage) throws RemoteException {
+ enforceTunnelPermissions(callingPackage);
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+ releaseResource(userRecord.mTunnelInterfaceRecords, resourceId);
+ }
+
@VisibleForTesting
void validateAlgorithms(IpSecConfig config) throws IllegalArgumentException {
IpSecAlgorithm auth = config.getAuthentication();
@@ -1128,6 +1472,7 @@
switch (config.getMode()) {
case IpSecTransform.MODE_TRANSPORT:
+ break;
case IpSecTransform.MODE_TUNNEL:
break;
default:
@@ -1136,16 +1481,85 @@
}
}
+ private static final String TUNNEL_OP = "STOPSHIP"; // = AppOpsManager.OP_MANAGE_IPSEC_TUNNELS;
+
+ private void enforceTunnelPermissions(String callingPackage) {
+ checkNotNull(callingPackage, "Null calling package cannot create IpSec tunnels");
+ if (false) { // STOPSHIP if this line is present
+ switch (getAppOpsManager().noteOp(
+ TUNNEL_OP,
+ Binder.getCallingUid(), callingPackage)) {
+ case AppOpsManager.MODE_DEFAULT:
+ mContext.enforceCallingOrSelfPermission(
+ android.Manifest.permission.MANAGE_IPSEC_TUNNELS, "IpSecService");
+ break;
+ case AppOpsManager.MODE_ALLOWED:
+ return;
+ default:
+ throw new SecurityException("Request to ignore AppOps for non-legacy API");
+ }
+ }
+ }
+
+ private void createOrUpdateTransform(
+ IpSecConfig c, int resourceId, SpiRecord spiRecord, EncapSocketRecord socketRecord)
+ throws RemoteException {
+
+ int encapType = c.getEncapType(), encapLocalPort = 0, encapRemotePort = 0;
+ if (encapType != IpSecTransform.ENCAP_NONE) {
+ encapLocalPort = socketRecord.getPort();
+ encapRemotePort = c.getEncapRemotePort();
+ }
+
+ IpSecAlgorithm auth = c.getAuthentication();
+ IpSecAlgorithm crypt = c.getEncryption();
+ IpSecAlgorithm authCrypt = c.getAuthenticatedEncryption();
+
+ String cryptName;
+ if (crypt == null) {
+ cryptName = (authCrypt == null) ? IpSecAlgorithm.CRYPT_NULL : "";
+ } else {
+ cryptName = crypt.getName();
+ }
+
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecAddSecurityAssociation(
+ resourceId,
+ c.getMode(),
+ c.getSourceAddress(),
+ c.getDestinationAddress(),
+ (c.getNetwork() != null) ? c.getNetwork().netId : 0,
+ spiRecord.getSpi(),
+ c.getMarkValue(),
+ c.getMarkMask(),
+ (auth != null) ? auth.getName() : "",
+ (auth != null) ? auth.getKey() : new byte[] {},
+ (auth != null) ? auth.getTruncationLengthBits() : 0,
+ cryptName,
+ (crypt != null) ? crypt.getKey() : new byte[] {},
+ (crypt != null) ? crypt.getTruncationLengthBits() : 0,
+ (authCrypt != null) ? authCrypt.getName() : "",
+ (authCrypt != null) ? authCrypt.getKey() : new byte[] {},
+ (authCrypt != null) ? authCrypt.getTruncationLengthBits() : 0,
+ encapType,
+ encapLocalPort,
+ encapRemotePort);
+ }
+
/**
- * Create a transport mode transform, which represent two security associations (one in each
- * direction) in the kernel. The transform will be cached by the system server and must be freed
- * when no longer needed. It is possible to free one, deleting the SA from underneath sockets
- * that are using it, which will result in all of those sockets becoming unable to send or
- * receive data.
+ * Create a IPsec transform, which represents a single security association in the kernel. The
+ * transform will be cached by the system server and must be freed when no longer needed. It is
+ * possible to free one, deleting the SA from underneath sockets that are using it, which will
+ * result in all of those sockets becoming unable to send or receive data.
*/
@Override
- public synchronized IpSecTransformResponse createTransform(IpSecConfig c, IBinder binder)
- throws RemoteException {
+ public synchronized IpSecTransformResponse createTransform(
+ IpSecConfig c, IBinder binder, String callingPackage) throws RemoteException {
+ checkNotNull(c);
+ if (c.getMode() == IpSecTransform.MODE_TUNNEL) {
+ enforceTunnelPermissions(callingPackage);
+ }
checkIpSecConfig(c);
checkNotNull(binder, "Null Binder passed to createTransform");
final int resourceId = mNextResourceId++;
@@ -1157,56 +1571,23 @@
return new IpSecTransformResponse(IpSecManager.Status.RESOURCE_UNAVAILABLE);
}
- int encapType, encapLocalPort = 0, encapRemotePort = 0;
EncapSocketRecord socketRecord = null;
- encapType = c.getEncapType();
- if (encapType != IpSecTransform.ENCAP_NONE) {
+ if (c.getEncapType() != IpSecTransform.ENCAP_NONE) {
RefcountedResource<EncapSocketRecord> refcountedSocketRecord =
userRecord.mEncapSocketRecords.getRefcountedResourceOrThrow(
c.getEncapSocketResourceId());
dependencies.add(refcountedSocketRecord);
-
socketRecord = refcountedSocketRecord.getResource();
- encapLocalPort = socketRecord.getPort();
- encapRemotePort = c.getEncapRemotePort();
}
- IpSecAlgorithm auth = c.getAuthentication();
- IpSecAlgorithm crypt = c.getEncryption();
- IpSecAlgorithm authCrypt = c.getAuthenticatedEncryption();
-
RefcountedResource<SpiRecord> refcountedSpiRecord =
userRecord.mSpiRecords.getRefcountedResourceOrThrow(c.getSpiResourceId());
dependencies.add(refcountedSpiRecord);
SpiRecord spiRecord = refcountedSpiRecord.getResource();
- try {
- mSrvConfig
- .getNetdInstance()
- .ipSecAddSecurityAssociation(
- resourceId,
- c.getMode(),
- c.getSourceAddress(),
- c.getDestinationAddress(),
- (c.getNetwork() != null) ? c.getNetwork().netId : 0,
- spiRecord.getSpi(),
- (auth != null) ? auth.getName() : "",
- (auth != null) ? auth.getKey() : new byte[] {},
- (auth != null) ? auth.getTruncationLengthBits() : 0,
- (crypt != null) ? crypt.getName() : "",
- (crypt != null) ? crypt.getKey() : new byte[] {},
- (crypt != null) ? crypt.getTruncationLengthBits() : 0,
- (authCrypt != null) ? authCrypt.getName() : "",
- (authCrypt != null) ? authCrypt.getKey() : new byte[] {},
- (authCrypt != null) ? authCrypt.getTruncationLengthBits() : 0,
- encapType,
- encapLocalPort,
- encapRemotePort);
- } catch (ServiceSpecificException e) {
- // FIXME: get the error code and throw is at an IOException from Errno Exception
- return new IpSecTransformResponse(IpSecManager.Status.RESOURCE_UNAVAILABLE);
- }
- // Both SAs were created successfully, time to construct a record and lock it away
+ createOrUpdateTransform(c, resourceId, spiRecord, socketRecord);
+
+ // SA was created successfully, time to construct a record and lock it away
userRecord.mTransformRecords.put(
resourceId,
new RefcountedResource<TransformRecord>(
@@ -1245,24 +1626,21 @@
throw new SecurityException("Only the owner of an IpSec Transform may apply it!");
}
+ // Get config and check that to-be-applied transform has the correct mode
IpSecConfig c = info.getConfig();
- try {
- mSrvConfig
- .getNetdInstance()
- .ipSecApplyTransportModeTransform(
- socket.getFileDescriptor(),
- resourceId,
- direction,
- c.getSourceAddress(),
- c.getDestinationAddress(),
- info.getSpiRecord().getSpi());
- } catch (ServiceSpecificException e) {
- if (e.errorCode == EINVAL) {
- throw new IllegalArgumentException(e.toString());
- } else {
- throw e;
- }
- }
+ Preconditions.checkArgument(
+ c.getMode() == IpSecTransform.MODE_TRANSPORT,
+ "Transform mode was not Transport mode; cannot be applied to a socket");
+
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecApplyTransportModeTransform(
+ socket.getFileDescriptor(),
+ resourceId,
+ direction,
+ c.getSourceAddress(),
+ c.getDestinationAddress(),
+ info.getSpiRecord().getSpi());
}
/**
@@ -1274,12 +1652,82 @@
@Override
public synchronized void removeTransportModeTransforms(ParcelFileDescriptor socket)
throws RemoteException {
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecRemoveTransportModeTransform(socket.getFileDescriptor());
+ }
+
+ /**
+ * Apply an active tunnel mode transform to a TunnelInterface, which will apply the IPsec
+ * security association as a correspondent policy to the provided interface
+ */
+ @Override
+ public synchronized void applyTunnelModeTransform(
+ int tunnelResourceId, int direction,
+ int transformResourceId, String callingPackage) throws RemoteException {
+ enforceTunnelPermissions(callingPackage);
+ checkDirection(direction);
+
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+
+ // Get transform record; if no transform is found, will throw IllegalArgumentException
+ TransformRecord transformInfo =
+ userRecord.mTransformRecords.getResourceOrThrow(transformResourceId);
+
+ // Get tunnelInterface record; if no such interface is found, will throw
+ // IllegalArgumentException
+ TunnelInterfaceRecord tunnelInterfaceInfo =
+ userRecord.mTunnelInterfaceRecords.getResourceOrThrow(tunnelResourceId);
+
+ // Get config and check that to-be-applied transform has the correct mode
+ IpSecConfig c = transformInfo.getConfig();
+ Preconditions.checkArgument(
+ c.getMode() == IpSecTransform.MODE_TUNNEL,
+ "Transform mode was not Tunnel mode; cannot be applied to a tunnel interface");
+
+ EncapSocketRecord socketRecord = null;
+ if (c.getEncapType() != IpSecTransform.ENCAP_NONE) {
+ socketRecord =
+ userRecord.mEncapSocketRecords.getResourceOrThrow(c.getEncapSocketResourceId());
+ }
+ SpiRecord spiRecord = userRecord.mSpiRecords.getResourceOrThrow(c.getSpiResourceId());
+
+ int mark =
+ (direction == IpSecManager.DIRECTION_IN)
+ ? tunnelInterfaceInfo.getIkey()
+ : tunnelInterfaceInfo.getOkey();
+
try {
- mSrvConfig
- .getNetdInstance()
- .ipSecRemoveTransportModeTransform(socket.getFileDescriptor());
+ c.setMarkValue(mark);
+ c.setMarkMask(0xffffffff);
+
+ if (direction == IpSecManager.DIRECTION_OUT) {
+ // Set output mark via underlying network (output only)
+ c.setNetwork(tunnelInterfaceInfo.getUnderlyingNetwork());
+
+ // If outbound, also add SPI to the policy.
+ for(String wildcardAddr : WILDCARD_ADDRESSES) {
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecUpdateSecurityPolicy(
+ 0, // Use 0 for reqId
+ direction,
+ wildcardAddr,
+ wildcardAddr,
+ transformInfo.getSpiRecord().getSpi(),
+ mark,
+ 0xffffffff);
+ }
+ }
+
+ // Update SA with tunnel mark (ikey or okey based on direction)
+ createOrUpdateTransform(c, transformResourceId, spiRecord, socketRecord);
} catch (ServiceSpecificException e) {
- // FIXME: get the error code and throw is at an IOException from Errno Exception
+ if (e.errorCode == EINVAL) {
+ throw new IllegalArgumentException(e.toString());
+ } else {
+ throw e;
+ }
}
}
diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java
index 966e553..c4155a3 100644
--- a/services/core/java/com/android/server/LocationManagerService.java
+++ b/services/core/java/com/android/server/LocationManagerService.java
@@ -28,8 +28,6 @@
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.DumpUtils;
import com.android.server.location.ActivityRecognitionProxy;
-import com.android.server.location.FlpHardwareProvider;
-import com.android.server.location.FusedProxy;
import com.android.server.location.GeocoderProxy;
import com.android.server.location.GeofenceManager;
import com.android.server.location.GeofenceProxy;
@@ -483,13 +481,6 @@
if (gpsProvider != null && gpsProvider.isEnabled()) {
gpsProvider.disable();
}
-
- // it is needed to check if FLP HW provider is supported before accessing the instance, this
- // avoids an exception to be thrown by the singleton factory method
- if (FlpHardwareProvider.isSupported()) {
- FlpHardwareProvider flpHardwareProvider = FlpHardwareProvider.getInstance(mContext);
- flpHardwareProvider.cleanup();
- }
}
/**
@@ -674,27 +665,6 @@
Slog.e(TAG, "no geocoder provider found");
}
- // bind to fused hardware provider if supported
- // in devices without support, requesting an instance of FlpHardwareProvider will raise an
- // exception, so make sure we only do that when supported
- FlpHardwareProvider flpHardwareProvider;
- if (FlpHardwareProvider.isSupported()) {
- flpHardwareProvider = FlpHardwareProvider.getInstance(mContext);
- FusedProxy fusedProxy = FusedProxy.createAndBind(
- mContext,
- mLocationHandler,
- flpHardwareProvider.getLocationHardware(),
- com.android.internal.R.bool.config_enableHardwareFlpOverlay,
- com.android.internal.R.string.config_hardwareFlpPackageName,
- com.android.internal.R.array.config_locationProviderPackageNames);
- if (fusedProxy == null) {
- Slog.d(TAG, "Unable to bind FusedProxy.");
- }
- } else {
- flpHardwareProvider = null;
- Slog.d(TAG, "FLP HAL not supported");
- }
-
// bind to geofence provider
GeofenceProxy provider = GeofenceProxy.createAndBind(
mContext,com.android.internal.R.bool.config_enableGeofenceOverlay,
@@ -702,7 +672,7 @@
com.android.internal.R.array.config_locationProviderPackageNames,
mLocationHandler,
mGpsGeofenceProxy,
- flpHardwareProvider != null ? flpHardwareProvider.getGeofenceHardware() : null);
+ null);
if (provider == null) {
Slog.d(TAG, "Unable to bind FLP Geofence proxy.");
}
diff --git a/services/core/java/com/android/server/NativeDaemonConnector.java b/services/core/java/com/android/server/NativeDaemonConnector.java
index b5a8332..ad02aad 100644
--- a/services/core/java/com/android/server/NativeDaemonConnector.java
+++ b/services/core/java/com/android/server/NativeDaemonConnector.java
@@ -134,21 +134,23 @@
mCallbackHandler = new Handler(mLooper, this);
while (true) {
+ if (isShuttingDown()) break;
try {
listenToSocket();
} catch (Exception e) {
loge("Error in NativeDaemonConnector: " + e);
- String shutdownAct = SystemProperties.get(
- ShutdownThread.SHUTDOWN_ACTION_PROPERTY, "");
- if (shutdownAct != null && shutdownAct.length() > 0) {
- // The device is in middle of shutdown.
- break;
- }
+ if (isShuttingDown()) break;
SystemClock.sleep(5000);
}
}
}
+ private static boolean isShuttingDown() {
+ String shutdownAct = SystemProperties.get(
+ ShutdownThread.SHUTDOWN_ACTION_PROPERTY, "");
+ return shutdownAct != null && shutdownAct.length() > 0;
+ }
+
@Override
public boolean handleMessage(Message msg) {
final String event = (String) msg.obj;
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index 88ae224..6d6fd84 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -1789,6 +1789,8 @@
@Override
public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges)
throws ServiceSpecificException {
+ mContext.enforceCallingOrSelfPermission(NETWORK_STACK, TAG);
+
try {
mNetdService.networkRejectNonSecureVpn(add, uidRanges);
} catch (ServiceSpecificException e) {
@@ -1867,10 +1869,10 @@
}
@Override
- public NetworkStats getNetworkStatsUidDetail(int uid) {
+ public NetworkStats getNetworkStatsUidDetail(int uid, String[] ifaces) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
- return mStatsFactory.readNetworkStatsDetail(uid, null, TAG_ALL, null);
+ return mStatsFactory.readNetworkStatsDetail(uid, ifaces, TAG_ALL, null);
} catch (IOException e) {
throw new IllegalStateException(e);
}
@@ -1942,13 +1944,13 @@
@Override
public void setDnsConfigurationForNetwork(int netId, String[] servers, String[] domains,
- int[] params, boolean useTls, String tlsHostname) {
+ int[] params, String tlsHostname, String[] tlsServers) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
final String[] tlsFingerprints = new String[0];
try {
mNetdService.setResolverConfiguration(
- netId, servers, domains, params, useTls, tlsHostname, tlsFingerprints);
+ netId, servers, domains, params, tlsHostname, tlsServers, tlsFingerprints);
} catch (RemoteException e) {
throw new RuntimeException(e);
}
diff --git a/services/core/java/com/android/server/OWNERS b/services/core/java/com/android/server/OWNERS
index 28481e2..81c905b 100644
--- a/services/core/java/com/android/server/OWNERS
+++ b/services/core/java/com/android/server/OWNERS
@@ -1,15 +1,12 @@
per-file ConnectivityService.java=ek@google.com
-per-file ConnectivityService.java=hugobenichi@google.com
per-file ConnectivityService.java=jchalard@google.com
per-file ConnectivityService.java=lorenzo@google.com
per-file ConnectivityService.java=satk@google.com
per-file NetworkManagementService.java=ek@google.com
-per-file NetworkManagementService.java=hugobenichi@google.com
per-file NetworkManagementService.java=jchalard@google.com
per-file NetworkManagementService.java=lorenzo@google.com
per-file NetworkManagementService.java=satk@google.com
per-file NsdService.java=ek@google.com
-per-file NsdService.java=hugobenichi@google.com
per-file NsdService.java=jchalard@google.com
per-file NsdService.java=lorenzo@google.com
per-file NsdService.java=satk@google.com
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index 6747be3..34d5b3f 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -35,7 +35,9 @@
import android.telephony.CellInfo;
import android.telephony.CellLocation;
import android.telephony.DisconnectCause;
+import android.telephony.LocationAccessPolicy;
import android.telephony.PhoneStateListener;
+import android.telephony.PhysicalChannelConfig;
import android.telephony.PreciseCallState;
import android.telephony.PreciseDataConnectionState;
import android.telephony.PreciseDisconnectCause;
@@ -55,6 +57,7 @@
import com.android.internal.telephony.PhoneConstantConversions;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyIntents;
+import com.android.internal.telephony.TelephonyPermissions;
import com.android.internal.util.DumpUtils;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.am.BatteryStatsService;
@@ -62,8 +65,8 @@
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
+import java.util.NoSuchElementException;
/**
* Since phone process can be restarted, this class provides a centralized place
@@ -86,14 +89,19 @@
private static final boolean VDBG = false; // STOPSHIP if true
private static class Record {
+ Context context;
+
String callingPackage;
IBinder binder;
+ TelephonyRegistryDeathRecipient deathRecipient;
+
IPhoneStateListener callback;
IOnSubscriptionsChangedListener onSubscriptionsChangedListenerCallback;
- int callerUserId;
+ int callerUid;
+ int callerPid;
int events;
@@ -101,8 +109,6 @@
int phoneId = SubscriptionManager.INVALID_PHONE_INDEX;
- boolean canReadPhoneState;
-
boolean matchPhoneStateListenerEvent(int events) {
return (callback != null) && ((events & this.events) != 0);
}
@@ -111,15 +117,23 @@
return (onSubscriptionsChangedListenerCallback != null);
}
+ boolean canReadCallLog() {
+ try {
+ return TelephonyPermissions.checkReadCallLog(
+ context, subId, callerPid, callerUid, callingPackage);
+ } catch (SecurityException e) {
+ return false;
+ }
+ }
+
@Override
public String toString() {
return "{callingPackage=" + callingPackage + " binder=" + binder
+ " callback=" + callback
+ " onSubscriptionsChangedListenererCallback="
+ onSubscriptionsChangedListenerCallback
- + " callerUserId=" + callerUserId + " subId=" + subId + " phoneId=" + phoneId
- + " events=" + Integer.toHexString(events)
- + " canReadPhoneState=" + canReadPhoneState + "}";
+ + " callerUid=" + callerUid + " subId=" + subId + " phoneId=" + phoneId
+ + " events=" + Integer.toHexString(events) + "}";
}
}
@@ -157,14 +171,9 @@
private int[] mDataActivity;
+ // Connection state of default APN type data (i.e. internet) of phones
private int[] mDataConnectionState;
- private ArrayList<String>[] mConnectedApns;
-
- private LinkProperties[] mDataConnectionLinkProperties;
-
- private NetworkCapabilities[] mDataConnectionNetworkCapabilities;
-
private Bundle[] mCellLocation;
private int[] mDataConnectionNetworkType;
@@ -173,6 +182,8 @@
private ArrayList<List<CellInfo>> mCellInfo = null;
+ private ArrayList<List<PhysicalChannelConfig>> mPhysicalChannelConfigs;
+
private VoLteServiceState mVoLteServiceState = new VoLteServiceState();
private int mDefaultSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
@@ -194,16 +205,15 @@
private PreciseDataConnectionState mPreciseDataConnectionState =
new PreciseDataConnectionState();
+ static final int ENFORCE_COARSE_LOCATION_PERMISSION_MASK =
+ PhoneStateListener.LISTEN_CELL_LOCATION
+ | PhoneStateListener.LISTEN_CELL_INFO;
+
static final int ENFORCE_PHONE_STATE_PERMISSION_MASK =
PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR |
PhoneStateListener.LISTEN_MESSAGE_WAITING_INDICATOR |
PhoneStateListener.LISTEN_VOLTE_STATE;
- static final int CHECK_PHONE_STATE_PERMISSION_MASK =
- PhoneStateListener.LISTEN_CALL_STATE |
- PhoneStateListener.LISTEN_DATA_ACTIVITY |
- PhoneStateListener.LISTEN_DATA_CONNECTION_STATE;
-
static final int PRECISE_PHONE_STATE_PERMISSION_MASK =
PhoneStateListener.LISTEN_PRECISE_CALL_STATE |
PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE;
@@ -251,6 +261,21 @@
}
};
+ private class TelephonyRegistryDeathRecipient implements IBinder.DeathRecipient {
+
+ private final IBinder binder;
+
+ TelephonyRegistryDeathRecipient(IBinder binder) {
+ this.binder = binder;
+ }
+
+ @Override
+ public void binderDied() {
+ if (DBG) log("binderDied " + binder);
+ remove(binder);
+ }
+ }
+
private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
@@ -295,9 +320,8 @@
mBatteryStats = BatteryStatsService.getService();
int numPhones = TelephonyManager.getDefault().getPhoneCount();
- if (DBG) log("TelephonyRegistor: ctor numPhones=" + numPhones);
+ if (DBG) log("TelephonyRegistry: ctor numPhones=" + numPhones);
mNumPhones = numPhones;
- mConnectedApns = new ArrayList[numPhones];
mCallState = new int[numPhones];
mDataActivity = new int[numPhones];
mDataConnectionState = new int[numPhones];
@@ -311,9 +335,8 @@
mMessageWaiting = new boolean[numPhones];
mCallForwarding = new boolean[numPhones];
mCellLocation = new Bundle[numPhones];
- mDataConnectionLinkProperties = new LinkProperties[numPhones];
- mDataConnectionNetworkCapabilities = new NetworkCapabilities[numPhones];
mCellInfo = new ArrayList<List<CellInfo>>();
+ mPhysicalChannelConfigs = new ArrayList<List<PhysicalChannelConfig>>();
for (int i = 0; i < numPhones; i++) {
mCallState[i] = TelephonyManager.CALL_STATE_IDLE;
mDataActivity[i] = TelephonyManager.DATA_ACTIVITY_NONE;
@@ -328,7 +351,7 @@
mCallForwarding[i] = false;
mCellLocation[i] = new Bundle();
mCellInfo.add(i, null);
- mConnectedApns[i] = new ArrayList<String>();
+ mPhysicalChannelConfigs.add(i, null);
}
// Note that location can be null for non-phone builds like
@@ -356,52 +379,28 @@
public void addOnSubscriptionsChangedListener(String callingPackage,
IOnSubscriptionsChangedListener callback) {
int callerUserId = UserHandle.getCallingUserId();
+ mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
if (VDBG) {
log("listen oscl: E pkg=" + callingPackage + " myUserId=" + UserHandle.myUserId()
+ " callerUserId=" + callerUserId + " callback=" + callback
+ " callback.asBinder=" + callback.asBinder());
}
- try {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
- "addOnSubscriptionsChangedListener");
- // SKIP checking for run-time permission since caller or self has PRIVILEGED permission
- } catch (SecurityException e) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.READ_PHONE_STATE,
- "addOnSubscriptionsChangedListener");
-
- if (mAppOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, Binder.getCallingUid(),
- callingPackage) != AppOpsManager.MODE_ALLOWED) {
- return;
- }
- }
-
- Record r;
-
synchronized (mRecords) {
// register
- find_and_add: {
- IBinder b = callback.asBinder();
- final int N = mRecords.size();
- for (int i = 0; i < N; i++) {
- r = mRecords.get(i);
- if (b == r.binder) {
- break find_and_add;
- }
- }
- r = new Record();
- r.binder = b;
- mRecords.add(r);
- if (DBG) log("listen oscl: add new record");
+ IBinder b = callback.asBinder();
+ Record r = add(b);
+
+ if (r == null) {
+ return;
}
+ r.context = mContext;
r.onSubscriptionsChangedListenerCallback = callback;
r.callingPackage = callingPackage;
- r.callerUserId = callerUserId;
+ r.callerUid = Binder.getCallingUid();
+ r.callerPid = Binder.getCallingPid();
r.events = 0;
- r.canReadPhoneState = true; // permission has been enforced above
if (DBG) {
log("listen oscl: Register r=" + r);
}
@@ -470,6 +469,7 @@
private void listen(String callingPackage, IPhoneStateListener callback, int events,
boolean notifyNow, int subId) {
int callerUserId = UserHandle.getCallingUserId();
+ mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
if (VDBG) {
log("listen: E pkg=" + callingPackage + " events=0x" + Integer.toHexString(events)
+ " notifyNow=" + notifyNow + " subId=" + subId + " myUserId="
@@ -477,47 +477,28 @@
}
if (events != PhoneStateListener.LISTEN_NONE) {
- /* Checks permission and throws Security exception */
- checkListenerPermission(events);
-
- if ((events & ENFORCE_PHONE_STATE_PERMISSION_MASK) != 0) {
- try {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, null);
- // SKIP checking for run-time permission since caller or self has PRIVILEGED
- // permission
- } catch (SecurityException e) {
- if (mAppOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, Binder.getCallingUid(),
- callingPackage) != AppOpsManager.MODE_ALLOWED) {
- return;
- }
- }
+ // Checks permission and throws SecurityException for disallowed operations. For pre-M
+ // apps whose runtime permission has been revoked, we return immediately to skip sending
+ // events to the app without crashing it.
+ if (!checkListenerPermission(events, subId, callingPackage, "listen")) {
+ return;
}
+ int phoneId = SubscriptionManager.getPhoneId(subId);
synchronized (mRecords) {
// register
- Record r;
- find_and_add: {
- IBinder b = callback.asBinder();
- final int N = mRecords.size();
- for (int i = 0; i < N; i++) {
- r = mRecords.get(i);
- if (b == r.binder) {
- break find_and_add;
- }
- }
- r = new Record();
- r.binder = b;
- mRecords.add(r);
- if (DBG) log("listen: add new record");
+ IBinder b = callback.asBinder();
+ Record r = add(b);
+
+ if (r == null) {
+ return;
}
+ r.context = mContext;
r.callback = callback;
r.callingPackage = callingPackage;
- r.callerUserId = callerUserId;
- boolean isPhoneStateEvent = (events & (CHECK_PHONE_STATE_PERMISSION_MASK
- | ENFORCE_PHONE_STATE_PERMISSION_MASK)) != 0;
- r.canReadPhoneState = isPhoneStateEvent && canReadPhoneState(callingPackage);
+ r.callerUid = Binder.getCallingUid();
+ r.callerPid = Binder.getCallingPid();
// Legacy applications pass SubscriptionManager.DEFAULT_SUB_ID,
// force all illegal subId to SubscriptionManager.DEFAULT_SUB_ID
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
@@ -525,9 +506,7 @@
} else {//APP specify subID
r.subId = subId;
}
- r.phoneId = SubscriptionManager.getPhoneId(r.subId);
-
- int phoneId = r.phoneId;
+ r.phoneId = phoneId;
r.events = events;
if (DBG) {
log("listen: Register r=" + r + " r.subId=" + r.subId + " phoneId=" + phoneId);
@@ -572,8 +551,10 @@
try {
if (DBG_LOC) log("listen: mCellLocation = "
+ mCellLocation[phoneId]);
- r.callback.onCellLocationChanged(
- new Bundle(mCellLocation[phoneId]));
+ if (checkLocationAccess(r)) {
+ r.callback.onCellLocationChanged(
+ new Bundle(mCellLocation[phoneId]));
+ }
} catch (RemoteException ex) {
remove(r.binder);
}
@@ -619,7 +600,9 @@
try {
if (DBG_LOC) log("listen: mCellInfo[" + phoneId + "] = "
+ mCellInfo.get(phoneId));
- r.callback.onCellInfoChanged(mCellInfo.get(phoneId));
+ if (checkLocationAccess(r)) {
+ r.callback.onCellInfoChanged(mCellInfo.get(phoneId));
+ }
} catch (RemoteException ex) {
remove(r.binder);
}
@@ -667,6 +650,14 @@
remove(r.binder);
}
}
+ if ((events & PhoneStateListener.LISTEN_PHYSICAL_CHANNEL_CONFIGURATION) != 0) {
+ try {
+ r.callback.onPhysicalChannelConfigurationChanged(
+ mPhysicalChannelConfigs.get(phoneId));
+ } catch (RemoteException ex) {
+ remove(r.binder);
+ }
+ }
}
}
} else {
@@ -675,38 +666,62 @@
}
}
- private boolean canReadPhoneState(String callingPackage) {
- if (mContext.checkCallingOrSelfPermission(
- android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) ==
- PackageManager.PERMISSION_GRANTED) {
- // SKIP checking for run-time permission since caller or self has PRIVILEGED permission
- return true;
- }
- boolean canReadPhoneState = mContext.checkCallingOrSelfPermission(
- android.Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_GRANTED;
- if (canReadPhoneState &&
- mAppOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, Binder.getCallingUid(),
- callingPackage) != AppOpsManager.MODE_ALLOWED) {
- return false;
- }
- return canReadPhoneState;
+ private String getCallIncomingNumber(Record record, int phoneId) {
+ // Only reveal the incoming number if the record has read call log permission.
+ return record.canReadCallLog() ? mCallIncomingNumber[phoneId] : "";
}
- private String getCallIncomingNumber(Record record, int phoneId) {
- // Hide the number if record's process has no READ_PHONE_STATE permission
- return record.canReadPhoneState ? mCallIncomingNumber[phoneId] : "";
+ private Record add(IBinder binder) {
+ Record r;
+
+ synchronized (mRecords) {
+ final int N = mRecords.size();
+ for (int i = 0; i < N; i++) {
+ r = mRecords.get(i);
+ if (binder == r.binder) {
+ // Already existed.
+ return r;
+ }
+ }
+ r = new Record();
+ r.binder = binder;
+ r.deathRecipient = new TelephonyRegistryDeathRecipient(binder);
+
+ try {
+ binder.linkToDeath(r.deathRecipient, 0);
+ } catch (RemoteException e) {
+ if (VDBG) log("LinkToDeath remote exception sending to r=" + r + " e=" + e);
+ // Binder already died. Return null.
+ return null;
+ }
+
+ mRecords.add(r);
+ if (DBG) log("add new record");
+ }
+
+ return r;
}
private void remove(IBinder binder) {
synchronized (mRecords) {
final int recordCount = mRecords.size();
for (int i = 0; i < recordCount; i++) {
- if (mRecords.get(i).binder == binder) {
+ Record r = mRecords.get(i);
+ if (r.binder == binder) {
if (DBG) {
- Record r = mRecords.get(i);
- log("remove: binder=" + binder + "r.callingPackage" + r.callingPackage
- + "r.callback" + r.callback);
+ log("remove: binder=" + binder + " r.callingPackage " + r.callingPackage
+ + " r.callback " + r.callback);
}
+
+ if (r.deathRecipient != null) {
+ try {
+ binder.unlinkToDeath(r.deathRecipient, 0);
+ } catch (NoSuchElementException e) {
+ if (VDBG) log("UnlinkToDeath NoSuchElementException sending to r="
+ + r + " e=" + e);
+ }
+ }
+
mRecords.remove(i);
return;
}
@@ -714,13 +729,13 @@
}
}
- public void notifyCallState(int state, String incomingNumber) {
+ public void notifyCallState(int state, String phoneNumber) {
if (!checkNotifyPermission("notifyCallState()")) {
return;
}
if (VDBG) {
- log("notifyCallState: state=" + state + " incomingNumber=" + incomingNumber);
+ log("notifyCallState: state=" + state + " phoneNumber=" + phoneNumber);
}
synchronized (mRecords) {
@@ -728,8 +743,10 @@
if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_CALL_STATE) &&
(r.subId == SubscriptionManager.DEFAULT_SUBSCRIPTION_ID)) {
try {
- String incomingNumberOrEmpty = r.canReadPhoneState ? incomingNumber : "";
- r.callback.onCallStateChanged(state, incomingNumberOrEmpty);
+ // Ensure the listener has read call log permission; if they do not return
+ // an empty phone number.
+ String phoneNumberOrEmpty = r.canReadCallLog() ? phoneNumber : "";
+ r.callback.onCallStateChanged(state, phoneNumberOrEmpty);
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
@@ -740,7 +757,7 @@
// Called only by Telecomm to communicate call state across different phone accounts. So
// there is no need to add a valid subId or slotId.
- broadcastCallStateChanged(state, incomingNumber,
+ broadcastCallStateChanged(state, phoneNumber,
SubscriptionManager.INVALID_PHONE_INDEX,
SubscriptionManager.INVALID_SUBSCRIPTION_ID);
}
@@ -972,14 +989,14 @@
log("notifyCellInfoForSubscriber: subId=" + subId
+ " cellInfo=" + cellInfo);
}
-
+ int phoneId = SubscriptionManager.getPhoneId(subId);
synchronized (mRecords) {
- int phoneId = SubscriptionManager.getPhoneId(subId);
if (validatePhoneId(phoneId)) {
mCellInfo.set(phoneId, cellInfo);
for (Record r : mRecords) {
if (validateEventsAndUserLocked(r, PhoneStateListener.LISTEN_CELL_INFO) &&
- idMatch(r.subId, subId, phoneId)) {
+ idMatch(r.subId, subId, phoneId) &&
+ checkLocationAccess(r)) {
try {
if (DBG_LOC) {
log("notifyCellInfo: mCellInfo=" + cellInfo + " r=" + r);
@@ -995,6 +1012,45 @@
}
}
+ public void notifyPhysicalChannelConfiguration(List<PhysicalChannelConfig> configs) {
+ notifyPhysicalChannelConfigurationForSubscriber(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID,
+ configs);
+ }
+
+ public void notifyPhysicalChannelConfigurationForSubscriber(int subId,
+ List<PhysicalChannelConfig> configs) {
+ if (!checkNotifyPermission("notifyPhysicalChannelConfiguration()")) {
+ return;
+ }
+
+ if (VDBG) {
+ log("notifyPhysicalChannelConfiguration: subId=" + subId + " configs=" + configs);
+ }
+
+ synchronized (mRecords) {
+ int phoneId = SubscriptionManager.getPhoneId(subId);
+ if (validatePhoneId(phoneId)) {
+ mPhysicalChannelConfigs.set(phoneId, configs);
+ for (Record r : mRecords) {
+ if (r.matchPhoneStateListenerEvent(
+ PhoneStateListener.LISTEN_PHYSICAL_CHANNEL_CONFIGURATION)
+ && idMatch(r.subId, subId, phoneId)) {
+ try {
+ if (DBG_LOC) {
+ log("notifyPhysicalChannelConfiguration: mPhysicalChannelConfigs="
+ + configs + " r=" + r);
+ }
+ r.callback.onPhysicalChannelConfigurationChanged(configs);
+ } catch (RemoteException ex) {
+ mRemoveList.add(r.binder);
+ }
+ }
+ }
+ }
+ handleRemoveListLocked();
+ }
+ }
+
@Override
public void notifyMessageWaitingChangedForPhoneId(int phoneId, int subId, boolean mwi) {
if (!checkNotifyPermission("notifyMessageWaitingChanged()")) {
@@ -1062,8 +1118,8 @@
log("notifyCallForwardingChangedForSubscriber: subId=" + subId
+ " cfi=" + cfi);
}
+ int phoneId = SubscriptionManager.getPhoneId(subId);
synchronized (mRecords) {
- int phoneId = SubscriptionManager.getPhoneId(subId);
if (validatePhoneId(phoneId)) {
mCallForwarding[phoneId] = cfi;
for (Record r : mRecords) {
@@ -1090,8 +1146,8 @@
if (!checkNotifyPermission("notifyDataActivity()" )) {
return;
}
+ int phoneId = SubscriptionManager.getPhoneId(subId);
synchronized (mRecords) {
- int phoneId = SubscriptionManager.getPhoneId(subId);
if (validatePhoneId(phoneId)) {
mDataActivity[phoneId] = state;
for (Record r : mRecords) {
@@ -1132,39 +1188,15 @@
+ "' apn='" + apn + "' apnType=" + apnType + " networkType=" + networkType
+ " mRecords.size()=" + mRecords.size());
}
+ int phoneId = SubscriptionManager.getPhoneId(subId);
synchronized (mRecords) {
- int phoneId = SubscriptionManager.getPhoneId(subId);
if (validatePhoneId(phoneId)) {
- boolean modified = false;
- if (state == TelephonyManager.DATA_CONNECTED) {
- if (!mConnectedApns[phoneId].contains(apnType)) {
- mConnectedApns[phoneId].add(apnType);
- if (mDataConnectionState[phoneId] != state) {
- mDataConnectionState[phoneId] = state;
- modified = true;
- }
- }
- } else {
- if (mConnectedApns[phoneId].remove(apnType)) {
- if (mConnectedApns[phoneId].isEmpty()) {
- mDataConnectionState[phoneId] = state;
- modified = true;
- } else {
- // leave mDataConnectionState as is and
- // send out the new status for the APN in question.
- }
- }
- }
- mDataConnectionLinkProperties[phoneId] = linkProperties;
- mDataConnectionNetworkCapabilities[phoneId] = networkCapabilities;
- if (mDataConnectionNetworkType[phoneId] != networkType) {
- mDataConnectionNetworkType[phoneId] = networkType;
- // need to tell registered listeners about the new network type
- modified = true;
- }
- if (modified) {
- String str = "onDataConnectionStateChanged(" + mDataConnectionState[phoneId]
- + ", " + mDataConnectionNetworkType[phoneId] + ")";
+ // We only call the callback when the change is for default APN type.
+ if (PhoneConstants.APN_TYPE_DEFAULT.equals(apnType)
+ && (mDataConnectionState[phoneId] != state
+ || mDataConnectionNetworkType[phoneId] != networkType)) {
+ String str = "onDataConnectionStateChanged(" + state
+ + ", " + networkType + ")";
log(str);
mLocalLog.log(str);
for (Record r : mRecords) {
@@ -1175,15 +1207,16 @@
if (DBG) {
log("Notify data connection state changed on sub: " + subId);
}
- r.callback.onDataConnectionStateChanged(
- mDataConnectionState[phoneId],
- mDataConnectionNetworkType[phoneId]);
+ r.callback.onDataConnectionStateChanged(state, networkType);
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
}
}
handleRemoveListLocked();
+
+ mDataConnectionState[phoneId] = state;
+ mDataConnectionNetworkType[phoneId] = networkType;
}
mPreciseDataConnectionState = new PreciseDataConnectionState(state, networkType,
apnType, apn, reason, linkProperties, "");
@@ -1256,13 +1289,14 @@
log("notifyCellLocationForSubscriber: subId=" + subId
+ " cellLocation=" + cellLocation);
}
+ int phoneId = SubscriptionManager.getPhoneId(subId);
synchronized (mRecords) {
- int phoneId = SubscriptionManager.getPhoneId(subId);
if (validatePhoneId(phoneId)) {
mCellLocation[phoneId] = cellLocation;
for (Record r : mRecords) {
if (validateEventsAndUserLocked(r, PhoneStateListener.LISTEN_CELL_LOCATION) &&
- idMatch(r.subId, subId, phoneId)) {
+ idMatch(r.subId, subId, phoneId) &&
+ checkLocationAccess(r)) {
try {
if (DBG_LOC) {
log("notifyCellLocation: cellLocation=" + cellLocation
@@ -1394,6 +1428,31 @@
}
}
+ public void notifyOemHookRawEventForSubscriber(int subId, byte[] rawData) {
+ if (!checkNotifyPermission("notifyOemHookRawEventForSubscriber")) {
+ return;
+ }
+
+ synchronized (mRecords) {
+ for (Record r : mRecords) {
+ if (VDBG) {
+ log("notifyOemHookRawEventForSubscriber: r=" + r + " subId=" + subId);
+ }
+ if ((r.matchPhoneStateListenerEvent(
+ PhoneStateListener.LISTEN_OEM_HOOK_RAW_EVENT)) &&
+ ((r.subId == subId) ||
+ (r.subId == SubscriptionManager.DEFAULT_SUBSCRIPTION_ID))) {
+ try {
+ r.callback.onOemHookRawEvent(rawData);
+ } catch (RemoteException ex) {
+ mRemoveList.add(r.binder);
+ }
+ }
+ }
+ handleRemoveListLocked();
+ }
+ }
+
@Override
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
final IndentingPrintWriter pw = new IndentingPrintWriter(writer, " ");
@@ -1418,14 +1477,10 @@
pw.println("mCallForwarding=" + mCallForwarding[i]);
pw.println("mDataActivity=" + mDataActivity[i]);
pw.println("mDataConnectionState=" + mDataConnectionState[i]);
- pw.println("mDataConnectionLinkProperties=" + mDataConnectionLinkProperties[i]);
- pw.println("mDataConnectionNetworkCapabilities=" +
- mDataConnectionNetworkCapabilities[i]);
pw.println("mCellLocation=" + mCellLocation[i]);
pw.println("mCellInfo=" + mCellInfo.get(i));
pw.decreaseIndent();
}
- pw.println("mConnectedApns=" + Arrays.toString(mConnectedApns));
pw.println("mPreciseDataConnectionState=" + mPreciseDataConnectionState);
pw.println("mPreciseCallState=" + mPreciseCallState);
pw.println("mCarrierNetworkChangeState=" + mCarrierNetworkChangeState);
@@ -1518,9 +1573,6 @@
Intent intent = new Intent(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
intent.putExtra(PhoneConstants.STATE_KEY,
PhoneConstantConversions.convertCallState(state).toString());
- if (!TextUtils.isEmpty(incomingNumber)) {
- intent.putExtra(TelephonyManager.EXTRA_INCOMING_NUMBER, incomingNumber);
- }
// If a valid subId was specified, we should fire off a subId-specific state
// change intent and include the subId.
@@ -1536,13 +1588,20 @@
// Wakeup apps for the (SUBSCRIPTION_)PHONE_STATE broadcast.
intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
+ Intent intentWithPhoneNumber = new Intent(intent);
+ if (!TextUtils.isEmpty(incomingNumber)) {
+ intentWithPhoneNumber.putExtra(TelephonyManager.EXTRA_INCOMING_NUMBER, incomingNumber);
+ }
// Send broadcast twice, once for apps that have PRIVILEGED permission and once for those
// that have the runtime one
- mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
+ mContext.sendBroadcastAsUser(intentWithPhoneNumber, UserHandle.ALL,
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE);
mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
android.Manifest.permission.READ_PHONE_STATE,
AppOpsManager.OP_READ_PHONE_STATE);
+ mContext.sendBroadcastAsUserMultiplePermissions(intentWithPhoneNumber, UserHandle.ALL,
+ new String[] { android.Manifest.permission.READ_PHONE_STATE,
+ android.Manifest.permission.READ_CALL_LOG});
}
private void broadcastDataConnectionStateChanged(int state,
@@ -1619,11 +1678,12 @@
}
private void enforceNotifyPermissionOrCarrierPrivilege(String method) {
- if (checkNotifyPermission()) {
+ if (checkNotifyPermission()) {
return;
}
- enforceCarrierPrivilege();
+ TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege(
+ SubscriptionManager.getDefaultSubscriptionId(), method);
}
private boolean checkNotifyPermission(String method) {
@@ -1641,52 +1701,35 @@
== PackageManager.PERMISSION_GRANTED;
}
- private void enforceCarrierPrivilege() {
- TelephonyManager tm = TelephonyManager.getDefault();
- String[] pkgs = mContext.getPackageManager().getPackagesForUid(Binder.getCallingUid());
- for (String pkg : pkgs) {
- if (tm.checkCarrierPrivilegesForPackage(pkg) ==
- TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) {
- return;
+ private boolean checkListenerPermission(
+ int events, int subId, String callingPackage, String message) {
+ if ((events & ENFORCE_COARSE_LOCATION_PERMISSION_MASK) != 0) {
+ mContext.enforceCallingOrSelfPermission(
+ android.Manifest.permission.ACCESS_COARSE_LOCATION, null);
+ if (mAppOps.noteOp(AppOpsManager.OP_COARSE_LOCATION, Binder.getCallingUid(),
+ callingPackage) != AppOpsManager.MODE_ALLOWED) {
+ return false;
}
}
- String msg = "Carrier Privilege Permission Denial: from pid=" + Binder.getCallingPid()
- + ", uid=" + Binder.getCallingUid();
- if (DBG) log(msg);
- throw new SecurityException(msg);
- }
-
- private void checkListenerPermission(int events) {
- if ((events & PhoneStateListener.LISTEN_CELL_LOCATION) != 0) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.ACCESS_COARSE_LOCATION, null);
-
- }
-
- if ((events & PhoneStateListener.LISTEN_CELL_INFO) != 0) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.ACCESS_COARSE_LOCATION, null);
-
- }
-
if ((events & ENFORCE_PHONE_STATE_PERMISSION_MASK) != 0) {
- try {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, null);
- // SKIP checking for run-time permission since caller or self has PRIVILEGED
- // permission
- } catch (SecurityException e) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.READ_PHONE_STATE, null);
+ if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
+ mContext, subId, callingPackage, message)) {
+ return false;
}
}
if ((events & PRECISE_PHONE_STATE_PERMISSION_MASK) != 0) {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.READ_PRECISE_PHONE_STATE, null);
-
}
+
+ if ((events & PhoneStateListener.LISTEN_OEM_HOOK_RAW_EVENT) != 0) {
+ mContext.enforceCallingOrSelfPermission(
+ android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, null);
+ }
+
+ return true;
}
private void handleRemoveListLocked() {
@@ -1706,10 +1749,11 @@
boolean valid = false;
try {
foregroundUser = ActivityManager.getCurrentUser();
- valid = r.callerUserId == foregroundUser && r.matchPhoneStateListenerEvent(events);
+ valid = UserHandle.getUserId(r.callerUid) == foregroundUser
+ && r.matchPhoneStateListenerEvent(events);
if (DBG | DBG_LOC) {
log("validateEventsAndUserLocked: valid=" + valid
- + " r.callerUserId=" + r.callerUserId + " foregroundUser=" + foregroundUser
+ + " r.callerUid=" + r.callerUid + " foregroundUser=" + foregroundUser
+ " r.events=" + r.events + " events=" + events);
}
} finally {
@@ -1741,6 +1785,16 @@
}
}
+ private boolean checkLocationAccess(Record r) {
+ long token = Binder.clearCallingIdentity();
+ try {
+ return LocationAccessPolicy.canAccessCellLocation(mContext,
+ r.callingPackage, r.callerUid, r.callerPid);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
private void checkPossibleMissNotify(Record r, int phoneId) {
int events = r.events;
@@ -1788,7 +1842,9 @@
log("checkPossibleMissNotify: onCellInfoChanged[" + phoneId + "] = "
+ mCellInfo.get(phoneId));
}
- r.callback.onCellInfoChanged(mCellInfo.get(phoneId));
+ if (checkLocationAccess(r)) {
+ r.callback.onCellInfoChanged(mCellInfo.get(phoneId));
+ }
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
@@ -1836,7 +1892,9 @@
try {
if (DBG_LOC) log("checkPossibleMissNotify: onCellLocationChanged mCellLocation = "
+ mCellLocation[phoneId]);
- r.callback.onCellLocationChanged(new Bundle(mCellLocation[phoneId]));
+ if (checkLocationAccess(r)) {
+ r.callback.onCellLocationChanged(new Bundle(mCellLocation[phoneId]));
+ }
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index 7ce0f43..155febd 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -90,6 +90,7 @@
"media.metrics", // system/bin/mediametrics
"media.codec", // vendor/bin/hw/android.hardware.media.omx@1.0-service
"com.android.bluetooth", // Bluetooth service
+ "statsd", // Stats daemon
};
public static final List<String> HAL_INTERFACES_OF_INTEREST = Arrays.asList(
@@ -565,14 +566,7 @@
Slog.w(TAG, "Restart not allowed: Watchdog is *not* killing the system process");
} else {
Slog.w(TAG, "*** WATCHDOG KILLING SYSTEM PROCESS: " + subject);
- for (int i=0; i<blockedCheckers.size(); i++) {
- Slog.w(TAG, blockedCheckers.get(i).getName() + " stack trace:");
- StackTraceElement[] stackTrace
- = blockedCheckers.get(i).getThread().getStackTrace();
- for (StackTraceElement element: stackTrace) {
- Slog.w(TAG, " at " + element);
- }
- }
+ WatchdogDiagnostics.diagnoseCheckers(blockedCheckers);
Slog.w(TAG, "*** GOODBYE!");
Process.killProcess(Process.myPid());
System.exit(10);
@@ -593,13 +587,8 @@
}
private File dumpKernelStackTraces() {
- String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
- if (tracesPath == null || tracesPath.length() == 0) {
- return null;
- }
-
- native_dumpKernelStacks(tracesPath);
- return new File(tracesPath);
+ native_dumpKernelStacks("/data/anr");
+ return new File("/data/anr");
}
private native void native_dumpKernelStacks(String tracesPath);
@@ -621,14 +610,6 @@
return null;
}
- // Don't run the FD monitor on builds that have a global ANR trace file. We're using
- // the ANR trace directory as a quick hack in order to get these traces in bugreports
- // and we wouldn't want to overwrite something important.
- final String dumpDirStr = SystemProperties.get("dalvik.vm.stack-trace-dir", "");
- if (dumpDirStr.isEmpty()) {
- return null;
- }
-
final StructRlimit rlimit;
try {
rlimit = android.system.Os.getrlimit(OsConstants.RLIMIT_NOFILE);
@@ -645,7 +626,7 @@
// We do this to avoid having to enumerate the contents of /proc/self/fd in order to
// count the number of descriptors open in the process.
final File fdThreshold = new File("/proc/self/fd/" + (rlimit.rlim_cur - FD_HIGH_WATER_MARK));
- return new OpenFdMonitor(new File(dumpDirStr), fdThreshold);
+ return new OpenFdMonitor(new File("/data/anr"), fdThreshold);
}
OpenFdMonitor(File dumpDir, File fdThreshold) {
diff --git a/services/core/java/com/android/server/WatchdogDiagnostics.java b/services/core/java/com/android/server/WatchdogDiagnostics.java
new file mode 100644
index 0000000..01db2d3
--- /dev/null
+++ b/services/core/java/com/android/server/WatchdogDiagnostics.java
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+
+package com.android.server;
+
+import android.util.Log;
+import android.util.LogWriter;
+import android.util.Slog;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.Watchdog.HandlerChecker;
+
+import dalvik.system.AnnotatedStackTraceElement;
+import dalvik.system.VMStack;
+
+import java.io.PrintWriter;
+import java.util.List;
+
+/**
+ * Class to give diagnostic messages for Watchdogs.
+ */
+class WatchdogDiagnostics {
+ private static String getBlockedOnString(Object blockedOn) {
+ return String.format("- waiting to lock <0x%08x> (a %s)",
+ System.identityHashCode(blockedOn), blockedOn.getClass().getName());
+ }
+
+ private static String getLockedString(Object heldLock) {
+ return String.format("- locked <0x%08x> (a %s)", System.identityHashCode(heldLock),
+ heldLock.getClass().getName());
+ }
+
+ /**
+ * Print the annotated stack for the given thread. If the annotated stack cannot be retrieved,
+ * returns false.
+ */
+ @VisibleForTesting
+ public static boolean printAnnotatedStack(Thread thread, PrintWriter out) {
+ AnnotatedStackTraceElement stack[] = VMStack.getAnnotatedThreadStackTrace(thread);
+ if (stack == null) {
+ return false;
+ }
+ out.println(thread.getName() + " annotated stack trace:");
+ for (AnnotatedStackTraceElement element : stack) {
+ out.println(" at " + element.getStackTraceElement());
+ if (element.getBlockedOn() != null) {
+ out.println(" " + getBlockedOnString(element.getBlockedOn()));
+ }
+ if (element.getHeldLocks() != null) {
+ for (Object held : element.getHeldLocks()) {
+ out.println(" " + getLockedString(held));
+ }
+ }
+ }
+ return true;
+ }
+
+ public static void diagnoseCheckers(final List<HandlerChecker> blockedCheckers) {
+ PrintWriter out = new PrintWriter(new LogWriter(Log.WARN, Watchdog.TAG, Log.LOG_ID_SYSTEM),
+ true);
+ for (int i=0; i<blockedCheckers.size(); i++) {
+ Thread blockedThread = blockedCheckers.get(i).getThread();
+ if (printAnnotatedStack(blockedThread, out)) {
+ continue;
+ }
+
+ // Fall back to "regular" stack trace, if necessary.
+ Slog.w(Watchdog.TAG, blockedThread.getName() + " stack trace:");
+ StackTraceElement[] stackTrace = blockedThread.getStackTrace();
+ for (StackTraceElement element : stackTrace) {
+ Slog.w(Watchdog.TAG, " at " + element);
+ }
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/accounts/TokenCache.java b/services/core/java/com/android/server/accounts/TokenCache.java
index be91f98..2af2f38 100644
--- a/services/core/java/com/android/server/accounts/TokenCache.java
+++ b/services/core/java/com/android/server/accounts/TokenCache.java
@@ -125,7 +125,7 @@
* This is recursive, but it won't spiral out of control because LruCache is
* thread safe and the Evictor can only be removed once.
*/
- Evictor evictor = mTokenEvictors.remove(oldVal.token);
+ Evictor evictor = mTokenEvictors.remove(new Pair<>(k.account.type, oldVal.token));
if (evictor != null) {
evictor.evict();
}
@@ -134,12 +134,13 @@
public void putToken(Key k, Value v) {
// Prepare for removal by token string.
- Evictor tokenEvictor = mTokenEvictors.get(v.token);
+ Pair<String, String> mapKey = new Pair<>(k.account.type, v.token);
+ Evictor tokenEvictor = mTokenEvictors.get(mapKey);
if (tokenEvictor == null) {
tokenEvictor = new Evictor();
}
tokenEvictor.add(k);
- mTokenEvictors.put(new Pair<>(k.account.type, v.token), tokenEvictor);
+ mTokenEvictors.put(mapKey, tokenEvictor);
// Prepare for removal by associated account.
Evictor accountEvictor = mAccountEvictors.get(k.account);
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 002381a..1546ec1 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -63,6 +63,7 @@
import static android.os.Process.SCHED_FIFO;
import static android.os.Process.SCHED_OTHER;
import static android.os.Process.SCHED_RESET_ON_FORK;
+import static android.os.Process.SE_UID;
import static android.os.Process.SHELL_UID;
import static android.os.Process.SIGNAL_QUIT;
import static android.os.Process.SIGNAL_USR1;
@@ -256,6 +257,7 @@
import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
+import android.content.pm.ApplicationInfo.HiddenApiEnforcementPolicy;
import android.content.pm.ConfigurationInfo;
import android.content.pm.IPackageDataObserver;
import android.content.pm.IPackageManager;
@@ -532,6 +534,10 @@
// How long we wait until we timeout on key dispatching during instrumentation.
static final int INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT = 60*1000;
+ // Disable hidden API checks for the newly started instrumentation.
+ // Must be kept in sync with Am.
+ private static final int INSTRUMENTATION_FLAG_DISABLE_HIDDEN_API_CHECKS = 1 << 0;
+
// How long to wait in getAssistContextExtras for the activity and foreground services
// to respond with the result.
static final int PENDING_ASSIST_EXTRAS_TIMEOUT = 500;
@@ -1493,6 +1499,14 @@
String mProfileApp = null;
ProcessRecord mProfileProc = null;
ProfilerInfo mProfilerInfo = null;
+
+ /**
+ * Stores a map of process name -> agent string. When a process is started and mAgentAppMap
+ * is not null, this map is checked and the mapped agent installed during bind-time. Note:
+ * A non-null agent in mProfileInfo overrides this.
+ */
+ private @Nullable Map<String, String> mAppAgentMap = null;
+
int mProfileType = 0;
final ProcessMap<Pair<Long, String>> mMemWatchProcesses = new ProcessMap<>();
String mMemWatchDumpProcName;
@@ -1729,6 +1743,9 @@
final ActivityManagerConstants mConstants;
+ // Encapsulates the global setting "hidden_api_blacklist_exemptions"
+ final HiddenApiBlacklist mHiddenApiBlacklist;
+
PackageManagerInternal mPackageManagerInt;
// VoiceInteraction session ID that changes for each new request except when
@@ -2678,6 +2695,58 @@
}
}
+ /**
+ * Encapsulates the global setting "hidden_api_blacklist_exemptions", including tracking the
+ * latest value via a content observer.
+ */
+ static class HiddenApiBlacklist extends ContentObserver {
+
+ private final Context mContext;
+ private boolean mBlacklistDisabled;
+ private String mExemptionsStr;
+ private List<String> mExemptions = Collections.emptyList();
+
+ public HiddenApiBlacklist(Handler handler, Context context) {
+ super(handler);
+ mContext = context;
+ }
+
+ public void registerObserver() {
+ mContext.getContentResolver().registerContentObserver(
+ Settings.Global.getUriFor(Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS),
+ false,
+ this);
+ update();
+ }
+
+ private void update() {
+ String exemptions = Settings.Global.getString(mContext.getContentResolver(),
+ Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS);
+ if (!TextUtils.equals(exemptions, mExemptionsStr)) {
+ mExemptionsStr = exemptions;
+ if ("*".equals(exemptions)) {
+ mBlacklistDisabled = true;
+ mExemptions = Collections.emptyList();
+ } else {
+ mBlacklistDisabled = false;
+ mExemptions = TextUtils.isEmpty(exemptions)
+ ? Collections.emptyList()
+ : Arrays.asList(exemptions.split(","));
+ }
+ zygoteProcess.setApiBlacklistExemptions(mExemptions);
+ }
+
+ }
+
+ boolean isDisabled() {
+ return mBlacklistDisabled;
+ }
+
+ public void onChange(boolean selfChange) {
+ update();
+ }
+ }
+
@VisibleForTesting
public ActivityManagerService(Injector injector) {
mInjector = injector;
@@ -2707,6 +2776,7 @@
mUiHandler = injector.getUiHandler(null);
mUserController = null;
mVrController = null;
+ mHiddenApiBlacklist = null;
}
// Note: This method is invoked on the main thread but may need to attach various
@@ -2839,6 +2909,8 @@
}
};
+ mHiddenApiBlacklist = new HiddenApiBlacklist(mHandler, mContext);
+
Watchdog.getInstance().addMonitor(this);
Watchdog.getInstance().addThread(mHandler);
}
@@ -3619,6 +3691,7 @@
info.className = entryPoint;
info.packageName = "android";
info.seInfoUser = SELinuxUtil.COMPLETE_STR;
+ info.targetSdkVersion = Build.VERSION.SDK_INT;
ProcessRecord proc = startProcessLocked(processName, info /* info */,
false /* knownToBeDead */, 0 /* intentFlags */, "" /* hostingType */,
null /* hostingName */, true /* allowWhileBooting */, true /* isolated */,
@@ -3761,6 +3834,13 @@
private final void startProcessLocked(ProcessRecord app, String hostingType,
String hostingNameStr, String abiOverride, String entryPoint, String[] entryPointArgs) {
+ startProcessLocked(app, hostingType, hostingNameStr, false /* disableHiddenApiChecks */,
+ null /* abiOverride */, null /* entryPoint */, null /* entryPointArgs */);
+ }
+
+ private final void startProcessLocked(ProcessRecord app, String hostingType,
+ String hostingNameStr, boolean disableHiddenApiChecks, String abiOverride,
+ String entryPoint, String[] entryPointArgs) {
long startTime = SystemClock.elapsedRealtime();
if (app.pid > 0 && app.pid != MY_PID) {
checkTime(startTime, "startProcess: removing from pids map");
@@ -3854,9 +3934,13 @@
runtimeFlags |= Zygote.DEBUG_ENABLE_CHECKJNI;
}
String genDebugInfoProperty = SystemProperties.get("debug.generate-debug-info");
- if ("true".equals(genDebugInfoProperty)) {
+ if ("1".equals(genDebugInfoProperty) || "true".equals(genDebugInfoProperty)) {
runtimeFlags |= Zygote.DEBUG_GENERATE_DEBUG_INFO;
}
+ String genMiniDebugInfoProperty = SystemProperties.get("dalvik.vm.minidebuginfo");
+ if ("1".equals(genMiniDebugInfoProperty) || "true".equals(genMiniDebugInfoProperty)) {
+ runtimeFlags |= Zygote.DEBUG_GENERATE_MINI_DEBUG_INFO;
+ }
if ("1".equals(SystemProperties.get("debug.jni.logging"))) {
runtimeFlags |= Zygote.DEBUG_ENABLE_JNI_LOGGING;
}
@@ -3877,6 +3961,16 @@
runtimeFlags |= Zygote.ONLY_USE_SYSTEM_OAT_FILES;
}
+ if (!disableHiddenApiChecks && !mHiddenApiBlacklist.isDisabled()) {
+ @HiddenApiEnforcementPolicy int policy =
+ app.info.getHiddenApiEnforcementPolicy();
+ int policyBits = (policy << Zygote.API_ENFORCEMENT_POLICY_SHIFT);
+ if ((policyBits & Zygote.API_ENFORCEMENT_POLICY_MASK) != policyBits) {
+ throw new IllegalStateException("Invalid API policy: " + policy);
+ }
+ runtimeFlags |= policyBits;
+ }
+
String invokeWith = null;
if ((app.info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
// Debuggable apps may include a wrapper script with their library directory.
@@ -5516,57 +5610,20 @@
}
}
- boolean useTombstonedForJavaTraces = false;
- File tracesFile;
+ final File tracesDir = new File("/data/anr");
+ // Each set of ANR traces is written to a separate file and dumpstate will process
+ // all such files and add them to a captured bug report if they're recent enough.
+ maybePruneOldTraces(tracesDir);
- final String tracesDirProp = SystemProperties.get("dalvik.vm.stack-trace-dir", "");
- if (tracesDirProp.isEmpty()) {
- // When dalvik.vm.stack-trace-dir is not set, we are using the "old" trace
- // dumping scheme. All traces are written to a global trace file (usually
- // "/data/anr/traces.txt") so the code below must take care to unlink and recreate
- // the file if requested.
- //
- // This mode of operation will be removed in the near future.
-
-
- String globalTracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
- if (globalTracesPath.isEmpty()) {
- Slog.w(TAG, "dumpStackTraces: no trace path configured");
- return null;
- }
-
- tracesFile = new File(globalTracesPath);
- try {
- if (clearTraces && tracesFile.exists()) {
- tracesFile.delete();
- }
-
- tracesFile.createNewFile();
- FileUtils.setPermissions(globalTracesPath, 0666, -1, -1); // -rw-rw-rw-
- } catch (IOException e) {
- Slog.w(TAG, "Unable to prepare ANR traces file: " + tracesFile, e);
- return null;
- }
- } else {
- File tracesDir = new File(tracesDirProp);
- // When dalvik.vm.stack-trace-dir is set, we use the "new" trace dumping scheme.
- // Each set of ANR traces is written to a separate file and dumpstate will process
- // all such files and add them to a captured bug report if they're recent enough.
- maybePruneOldTraces(tracesDir);
-
- // NOTE: We should consider creating the file in native code atomically once we've
- // gotten rid of the old scheme of dumping and lot of the code that deals with paths
- // can be removed.
- tracesFile = createAnrDumpFile(tracesDir);
- if (tracesFile == null) {
- return null;
- }
-
- useTombstonedForJavaTraces = true;
+ // NOTE: We should consider creating the file in native code atomically once we've
+ // gotten rid of the old scheme of dumping and lot of the code that deals with paths
+ // can be removed.
+ File tracesFile = createAnrDumpFile(tracesDir);
+ if (tracesFile == null) {
+ return null;
}
- dumpStackTraces(tracesFile.getAbsolutePath(), firstPids, nativePids, extraPids,
- useTombstonedForJavaTraces);
+ dumpStackTraces(tracesFile.getAbsolutePath(), firstPids, nativePids, extraPids);
return tracesFile;
}
@@ -5603,83 +5660,22 @@
* since it's the system_server that creates trace files for most ANRs.
*/
private static void maybePruneOldTraces(File tracesDir) {
+ final File[] files = tracesDir.listFiles();
+ if (files == null) return;
+
+ final int max = SystemProperties.getInt("tombstoned.max_anr_count", 64);
final long now = System.currentTimeMillis();
- final File[] traceFiles = tracesDir.listFiles();
-
- if (traceFiles != null) {
- for (File file : traceFiles) {
- if ((now - file.lastModified()) > DAY_IN_MILLIS) {
- if (!file.delete()) {
- Slog.w(TAG, "Unable to prune stale trace file: " + file);
- }
+ Arrays.sort(files, Comparator.comparingLong(File::lastModified).reversed());
+ for (int i = 0; i < files.length; ++i) {
+ if (i > max || (now - files[i].lastModified()) > DAY_IN_MILLIS) {
+ if (!files[i].delete()) {
+ Slog.w(TAG, "Unable to prune stale trace file: " + files[i]);
}
}
}
}
/**
- * Legacy code, do not use. Existing users will be deleted.
- *
- * @deprecated
- */
- @Deprecated
- public static class DumpStackFileObserver extends FileObserver {
- // Keep in sync with frameworks/native/cmds/dumpstate/utils.cpp
- private static final int TRACE_DUMP_TIMEOUT_MS = 10000; // 10 seconds
-
- private final String mTracesPath;
- private boolean mClosed;
-
- public DumpStackFileObserver(String tracesPath) {
- super(tracesPath, FileObserver.CLOSE_WRITE);
- mTracesPath = tracesPath;
- }
-
- @Override
- public synchronized void onEvent(int event, String path) {
- mClosed = true;
- notify();
- }
-
- public long dumpWithTimeout(int pid, long timeout) {
- sendSignal(pid, SIGNAL_QUIT);
- final long start = SystemClock.elapsedRealtime();
-
- final long waitTime = Math.min(timeout, TRACE_DUMP_TIMEOUT_MS);
- synchronized (this) {
- try {
- wait(waitTime); // Wait for traces file to be closed.
- } catch (InterruptedException e) {
- Slog.wtf(TAG, e);
- }
- }
-
- // This avoids a corner case of passing a negative time to the native
- // trace in case we've already hit the overall timeout.
- final long timeWaited = SystemClock.elapsedRealtime() - start;
- if (timeWaited >= timeout) {
- return timeWaited;
- }
-
- if (!mClosed) {
- Slog.w(TAG, "Didn't see close of " + mTracesPath + " for pid " + pid +
- ". Attempting native stack collection.");
-
- final long nativeDumpTimeoutMs = Math.min(
- NATIVE_DUMP_TIMEOUT_MS, timeout - timeWaited);
-
- Debug.dumpNativeBacktraceToFileTimeout(pid, mTracesPath,
- (int) (nativeDumpTimeoutMs / 1000));
- }
-
- final long end = SystemClock.elapsedRealtime();
- mClosed = false;
-
- return (end - start);
- }
- }
-
- /**
* Dump java traces for process {@code pid} to the specified file. If java trace dumping
* fails, a native backtrace is attempted. Note that the timeout {@code timeoutMs} only applies
* to the java section of the trace, a further {@code NATIVE_DUMP_TIMEOUT_MS} might be spent
@@ -5697,106 +5693,78 @@
}
private static void dumpStackTraces(String tracesFile, ArrayList<Integer> firstPids,
- ArrayList<Integer> nativePids, ArrayList<Integer> extraPids,
- boolean useTombstonedForJavaTraces) {
+ ArrayList<Integer> nativePids, ArrayList<Integer> extraPids) {
// We don't need any sort of inotify based monitoring when we're dumping traces via
// tombstoned. Data is piped to an "intercept" FD installed in tombstoned so we're in full
// control of all writes to the file in question.
- final DumpStackFileObserver observer;
- if (useTombstonedForJavaTraces) {
- observer = null;
- } else {
- // Use a FileObserver to detect when traces finish writing.
- // The order of traces is considered important to maintain for legibility.
- observer = new DumpStackFileObserver(tracesFile);
- }
// We must complete all stack dumps within 20 seconds.
long remainingTime = 20 * 1000;
- try {
- if (observer != null) {
- observer.startWatching();
+
+ // First collect all of the stacks of the most important pids.
+ if (firstPids != null) {
+ int num = firstPids.size();
+ for (int i = 0; i < num; i++) {
+ if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for pid " + firstPids.get(i));
+ final long timeTaken = dumpJavaTracesTombstoned(firstPids.get(i), tracesFile,
+ remainingTime);
+
+ remainingTime -= timeTaken;
+ if (remainingTime <= 0) {
+ Slog.e(TAG, "Aborting stack trace dump (current firstPid=" + firstPids.get(i) +
+ "); deadline exceeded.");
+ return;
+ }
+
+ if (DEBUG_ANR) {
+ Slog.d(TAG, "Done with pid " + firstPids.get(i) + " in " + timeTaken + "ms");
+ }
}
+ }
- // First collect all of the stacks of the most important pids.
- if (firstPids != null) {
- int num = firstPids.size();
- for (int i = 0; i < num; i++) {
- if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for pid "
- + firstPids.get(i));
- final long timeTaken;
- if (useTombstonedForJavaTraces) {
- timeTaken = dumpJavaTracesTombstoned(firstPids.get(i), tracesFile, remainingTime);
- } else {
- timeTaken = observer.dumpWithTimeout(firstPids.get(i), remainingTime);
- }
+ // Next collect the stacks of the native pids
+ if (nativePids != null) {
+ for (int pid : nativePids) {
+ if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for native pid " + pid);
+ final long nativeDumpTimeoutMs = Math.min(NATIVE_DUMP_TIMEOUT_MS, remainingTime);
- remainingTime -= timeTaken;
- if (remainingTime <= 0) {
- Slog.e(TAG, "Aborting stack trace dump (current firstPid=" + firstPids.get(i) +
+ final long start = SystemClock.elapsedRealtime();
+ Debug.dumpNativeBacktraceToFileTimeout(
+ pid, tracesFile, (int) (nativeDumpTimeoutMs / 1000));
+ final long timeTaken = SystemClock.elapsedRealtime() - start;
+
+ remainingTime -= timeTaken;
+ if (remainingTime <= 0) {
+ Slog.e(TAG, "Aborting stack trace dump (current native pid=" + pid +
+ "); deadline exceeded.");
+ return;
+ }
+
+ if (DEBUG_ANR) {
+ Slog.d(TAG, "Done with native pid " + pid + " in " + timeTaken + "ms");
+ }
+ }
+ }
+
+ // Lastly, dump stacks for all extra PIDs from the CPU tracker.
+ if (extraPids != null) {
+ for (int pid : extraPids) {
+ if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for extra pid " + pid);
+
+ final long timeTaken = dumpJavaTracesTombstoned(pid, tracesFile, remainingTime);
+
+ remainingTime -= timeTaken;
+ if (remainingTime <= 0) {
+ Slog.e(TAG, "Aborting stack trace dump (current extra pid=" + pid +
"); deadline exceeded.");
- return;
- }
-
- if (DEBUG_ANR) {
- Slog.d(TAG, "Done with pid " + firstPids.get(i) + " in " + timeTaken + "ms");
- }
+ return;
}
- }
- // Next collect the stacks of the native pids
- if (nativePids != null) {
- for (int pid : nativePids) {
- if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for native pid " + pid);
- final long nativeDumpTimeoutMs = Math.min(NATIVE_DUMP_TIMEOUT_MS, remainingTime);
-
- final long start = SystemClock.elapsedRealtime();
- Debug.dumpNativeBacktraceToFileTimeout(
- pid, tracesFile, (int) (nativeDumpTimeoutMs / 1000));
- final long timeTaken = SystemClock.elapsedRealtime() - start;
-
- remainingTime -= timeTaken;
- if (remainingTime <= 0) {
- Slog.e(TAG, "Aborting stack trace dump (current native pid=" + pid +
- "); deadline exceeded.");
- return;
- }
-
- if (DEBUG_ANR) {
- Slog.d(TAG, "Done with native pid " + pid + " in " + timeTaken + "ms");
- }
+ if (DEBUG_ANR) {
+ Slog.d(TAG, "Done with extra pid " + pid + " in " + timeTaken + "ms");
}
}
-
- // Lastly, dump stacks for all extra PIDs from the CPU tracker.
- if (extraPids != null) {
- for (int pid : extraPids) {
- if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for extra pid " + pid);
-
- final long timeTaken;
- if (useTombstonedForJavaTraces) {
- timeTaken = dumpJavaTracesTombstoned(pid, tracesFile, remainingTime);
- } else {
- timeTaken = observer.dumpWithTimeout(pid, remainingTime);
- }
-
- remainingTime -= timeTaken;
- if (remainingTime <= 0) {
- Slog.e(TAG, "Aborting stack trace dump (current extra pid=" + pid +
- "); deadline exceeded.");
- return;
- }
-
- if (DEBUG_ANR) {
- Slog.d(TAG, "Done with extra pid " + pid + " in " + timeTaken + "ms");
- }
- }
- }
- } finally {
- if (observer != null) {
- observer.stopWatching();
- }
}
}
@@ -5804,22 +5772,15 @@
if (true || Build.IS_USER) {
return;
}
- String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
- if (tracesPath == null || tracesPath.length() == 0) {
- return;
- }
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
StrictMode.allowThreadDiskWrites();
try {
- final File tracesFile = new File(tracesPath);
- final File tracesDir = tracesFile.getParentFile();
- final File tracesTmp = new File(tracesDir, "__tmp__");
+ File tracesDir = new File("/data/anr");
+ File tracesFile = null;
try {
- if (tracesFile.exists()) {
- tracesTmp.delete();
- tracesFile.renameTo(tracesTmp);
- }
+ tracesFile = File.createTempFile("app_slow", null, tracesDir);
+
StringBuilder sb = new StringBuilder();
Time tobj = new Time();
tobj.set(System.currentTimeMillis());
@@ -5836,14 +5797,14 @@
fos.close();
FileUtils.setPermissions(tracesFile.getPath(), 0666, -1, -1); // -rw-rw-rw-
} catch (IOException e) {
- Slog.w(TAG, "Unable to prepare slow app traces file: " + tracesPath, e);
+ Slog.w(TAG, "Unable to prepare slow app traces file: " + tracesFile, e);
return;
}
if (app != null) {
ArrayList<Integer> firstPids = new ArrayList<Integer>();
firstPids.add(app.pid);
- dumpStackTraces(tracesPath, firstPids, null, null, true /* useTombstoned */);
+ dumpStackTraces(tracesFile.getAbsolutePath(), firstPids, null, null);
}
File lastTracesFile = null;
@@ -5861,9 +5822,6 @@
lastTracesFile = curTracesFile;
}
tracesFile.renameTo(curTracesFile);
- if (tracesTmp.exists()) {
- tracesTmp.renameTo(tracesFile);
- }
} finally {
StrictMode.setThreadPolicy(oldPolicy);
}
@@ -7011,25 +6969,6 @@
}
}
- ProfilerInfo profilerInfo = null;
- String preBindAgent = null;
- if (mProfileApp != null && mProfileApp.equals(processName)) {
- mProfileProc = app;
- if (mProfilerInfo != null) {
- // Send a profiler info object to the app if either a file is given, or
- // an agent should be loaded at bind-time.
- boolean needsInfo = mProfilerInfo.profileFile != null
- || mProfilerInfo.attachAgentDuringBind;
- profilerInfo = needsInfo ? new ProfilerInfo(mProfilerInfo) : null;
- if (!mProfilerInfo.attachAgentDuringBind) {
- preBindAgent = mProfilerInfo.agent;
- }
- }
- } else if (app.instr != null && app.instr.mProfileFile != null) {
- profilerInfo = new ProfilerInfo(app.instr.mProfileFile, null, 0, false, false,
- null, false);
- }
-
boolean enableTrackAllocation = false;
if (mTrackAllocationApp != null && mTrackAllocationApp.equals(processName)) {
enableTrackAllocation = true;
@@ -7054,8 +6993,44 @@
ApplicationInfo appInfo = app.instr != null ? app.instr.mTargetInfo : app.info;
app.compat = compatibilityInfoForPackageLocked(appInfo);
+ ProfilerInfo profilerInfo = null;
+ String preBindAgent = null;
+ if (mProfileApp != null && mProfileApp.equals(processName)) {
+ mProfileProc = app;
+ if (mProfilerInfo != null) {
+ // Send a profiler info object to the app if either a file is given, or
+ // an agent should be loaded at bind-time.
+ boolean needsInfo = mProfilerInfo.profileFile != null
+ || mProfilerInfo.attachAgentDuringBind;
+ profilerInfo = needsInfo ? new ProfilerInfo(mProfilerInfo) : null;
+ if (mProfilerInfo.agent != null) {
+ preBindAgent = mProfilerInfo.agent;
+ }
+ }
+ } else if (app.instr != null && app.instr.mProfileFile != null) {
+ profilerInfo = new ProfilerInfo(app.instr.mProfileFile, null, 0, false, false,
+ null, false);
+ }
+ if (mAppAgentMap != null && mAppAgentMap.containsKey(processName)) {
+ // We need to do a debuggable check here. See setAgentApp for why the check is
+ // postponed to here.
+ if ((app.info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
+ String agent = mAppAgentMap.get(processName);
+ // Do not overwrite already requested agent.
+ if (profilerInfo == null) {
+ profilerInfo = new ProfilerInfo(null, null, 0, false, false,
+ mAppAgentMap.get(processName), true);
+ } else if (profilerInfo.agent == null) {
+ profilerInfo = profilerInfo.setAgent(mAppAgentMap.get(processName), true);
+ }
+ }
+ }
+
if (profilerInfo != null && profilerInfo.profileFd != null) {
profilerInfo.profileFd = profilerInfo.profileFd.dup();
+ if (TextUtils.equals(mProfileApp, processName) && mProfilerInfo != null) {
+ clearProfilerLocked();
+ }
}
// We deprecated Build.SERIAL and it is not accessible to
@@ -7122,7 +7097,10 @@
mCoreSettingsObserver.getCoreSettingsLocked(),
buildSerial);
}
-
+ if (profilerInfo != null) {
+ profilerInfo.closeFd();
+ profilerInfo = null;
+ }
checkTime(startTime, "attachApplicationLocked: immediately after bindApplication");
updateLruProcessLocked(app, false, null);
checkTime(startTime, "attachApplicationLocked: after updateLruProcessLocked");
@@ -7302,8 +7280,13 @@
try {
mInstaller.markBootComplete(VMRuntime.getInstructionSet(abi));
} catch (InstallerException e) {
- Slog.w(TAG, "Unable to mark boot complete for abi: " + abi + " (" +
- e.getMessage() +")");
+ if (!VMRuntime.didPruneDalvikCache()) {
+ // This is technically not the right filter, as different zygotes may
+ // have made different pruning decisions. But the log is best effort,
+ // anyways.
+ Slog.w(TAG, "Unable to mark boot complete for abi: " + abi + " (" +
+ e.getMessage() +")");
+ }
}
completedIsas.add(instructionSet);
}
@@ -12380,6 +12363,12 @@
final ProcessRecord addAppLocked(ApplicationInfo info, String customProcess, boolean isolated,
String abiOverride) {
+ return addAppLocked(info, customProcess, isolated, false /* disableHiddenApiChecks */,
+ abiOverride);
+ }
+
+ final ProcessRecord addAppLocked(ApplicationInfo info, String customProcess, boolean isolated,
+ boolean disableHiddenApiChecks, String abiOverride) {
ProcessRecord app;
if (!isolated) {
app = getProcessRecordLocked(customProcess != null ? customProcess : info.processName,
@@ -12411,8 +12400,8 @@
if (app.thread == null && mPersistentStartingProcesses.indexOf(app) < 0) {
mPersistentStartingProcesses.add(app);
startProcessLocked(app, "added application",
- customProcess != null ? customProcess : app.processName, abiOverride,
- null /* entryPoint */, null /* entryPointArgs */);
+ customProcess != null ? customProcess : app.processName, disableHiddenApiChecks,
+ abiOverride, null /* entryPoint */, null /* entryPointArgs */);
}
return app;
@@ -12787,6 +12776,52 @@
}
}
+ /**
+ * Set or remove an agent to be run whenever an app with the given process name starts.
+ *
+ * This method will not check whether the given process name matches a debuggable app. That
+ * would require scanning all current packages, and a rescan when new packages are installed
+ * or updated.
+ *
+ * Instead, do the check when an application is started and matched to a stored agent.
+ *
+ * @param packageName the process name of the app.
+ * @param agent the agent string to be used, or null to remove any previously set agent.
+ */
+ @Override
+ public void setAgentApp(@NonNull String packageName, @Nullable String agent) {
+ synchronized (this) {
+ // note: hijacking SET_ACTIVITY_WATCHER, but should be changed to
+ // its own permission.
+ if (checkCallingPermission(
+ android.Manifest.permission.SET_ACTIVITY_WATCHER) !=
+ PackageManager.PERMISSION_GRANTED) {
+ throw new SecurityException(
+ "Requires permission " + android.Manifest.permission.SET_ACTIVITY_WATCHER);
+ }
+
+ if (agent == null) {
+ if (mAppAgentMap != null) {
+ mAppAgentMap.remove(packageName);
+ if (mAppAgentMap.isEmpty()) {
+ mAppAgentMap = null;
+ }
+ }
+ } else {
+ if (mAppAgentMap == null) {
+ mAppAgentMap = new HashMap<>();
+ }
+ if (mAppAgentMap.size() >= 100) {
+ // Limit the size of the map, to avoid OOMEs.
+ Slog.e(TAG, "App agent map has too many entries, cannot add " + packageName
+ + "/" + agent);
+ return;
+ }
+ mAppAgentMap.put(packageName, agent);
+ }
+ }
+ }
+
void setTrackAllocationApp(ApplicationInfo app, String processName) {
synchronized (this) {
boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
@@ -14085,6 +14120,7 @@
NETWORK_ACCESS_TIMEOUT_MS, NETWORK_ACCESS_TIMEOUT_DEFAULT_MS);
final boolean supportsLeanbackOnly =
mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK_ONLY);
+ mHiddenApiBlacklist.registerObserver();
// Transfer any global setting for forcing RTL layout, into a System Property
SystemProperties.set(DEVELOPMENT_FORCE_RTL, forceRtl ? "1":"0");
@@ -17401,6 +17437,7 @@
final long myTotalPss = mi.getTotalPss();
final long myTotalSwapPss = mi.getTotalSwappedOutPss();
totalPss += myTotalPss;
+ totalSwapPss += myTotalSwapPss;
nativeProcTotalPss += myTotalPss;
MemItem pssItem = new MemItem(st.name + " (pid " + st.pid + ")",
@@ -19184,6 +19221,7 @@
case PHONE_UID:
case BLUETOOTH_UID:
case NFC_UID:
+ case SE_UID:
isCallerSystem = true;
break;
default:
@@ -20028,7 +20066,10 @@
// Instrumentation can kill and relaunch even persistent processes
forceStopPackageLocked(ii.targetPackage, -1, true, false, true, true, false, userId,
"start instr");
- ProcessRecord app = addAppLocked(ai, defProcess, false, abiOverride);
+ boolean disableHiddenApiChecks =
+ (flags & INSTRUMENTATION_FLAG_DISABLE_HIDDEN_API_CHECKS) != 0;
+ ProcessRecord app = addAppLocked(ai, defProcess, false, disableHiddenApiChecks,
+ abiOverride);
app.instr = activeInstr;
activeInstr.mFinished = false;
activeInstr.mRunningProcesses.add(app);
@@ -23456,6 +23497,14 @@
} catch (IOException e) {
}
mProfilerInfo.profileFd = null;
+
+ if (proc.pid == MY_PID) {
+ // When profiling the system server itself, avoid closing the file
+ // descriptor, as profilerControl will not create a copy.
+ // Note: it is also not correct to just set profileFd to null, as the
+ // whole ProfilerInfo instance is passed down!
+ profilerInfo = null;
+ }
} else {
stopProfilerLocked(proc, profileType);
if (profilerInfo != null && profilerInfo.profileFd != null) {
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
index a7ace21..254f403 100644
--- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
+++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
@@ -164,6 +164,8 @@
return runDumpHeap(pw);
case "set-debug-app":
return runSetDebugApp(pw);
+ case "set-agent-app":
+ return runSetAgentApp(pw);
case "clear-debug-app":
return runClearDebugApp(pw);
case "set-watch-heap":
@@ -862,6 +864,13 @@
return 0;
}
+ int runSetAgentApp(PrintWriter pw) throws RemoteException {
+ String pkg = getNextArgRequired();
+ String agent = getNextArg();
+ mInterface.setAgentApp(pkg, agent);
+ return 0;
+ }
+
int runClearDebugApp(PrintWriter pw) throws RemoteException {
mInterface.setDebugApp(null, false, true);
return 0;
@@ -2720,7 +2729,7 @@
pw.println(" specified then send to all users.");
pw.println(" --receiver-permission <PERMISSION>: Require receiver to hold permission.");
pw.println(" instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]");
- pw.println(" [--user <USER_ID> | current]");
+ pw.println(" [--user <USER_ID> | current] [--no-hidden-api-checks]");
pw.println(" [--no-window-animation] [--abi <ABI>] <COMPONENT>");
pw.println(" Start an Instrumentation. Typically this target <COMPONENT> is in the");
pw.println(" form <TEST_PACKAGE>/<RUNNER_CLASS> or only <TEST_PACKAGE> if there");
@@ -2735,6 +2744,7 @@
pw.println(" test runners.");
pw.println(" --user <USER_ID> | current: Specify user instrumentation runs in;");
pw.println(" current user if not specified.");
+ pw.println(" --no-hidden-api-checks: disable restrictions on use of hidden API.");
pw.println(" --no-window-animation: turn off window animations while running.");
pw.println(" --abi <ABI>: Launch the instrumented process with the selected ABI.");
pw.println(" This assumes that the process supports the selected ABI.");
diff --git a/services/core/java/com/android/server/am/BatteryStatsService.java b/services/core/java/com/android/server/am/BatteryStatsService.java
index fae215f..3b89097 100644
--- a/services/core/java/com/android/server/am/BatteryStatsService.java
+++ b/services/core/java/com/android/server/am/BatteryStatsService.java
@@ -36,6 +36,7 @@
import android.os.UserHandle;
import android.os.UserManagerInternal;
import android.os.WorkSource;
+import android.os.connectivity.CellularBatteryStats;
import android.os.health.HealthStatsParceler;
import android.os.health.HealthStatsWriter;
import android.os.health.UidHealthStats;
@@ -1335,6 +1336,16 @@
}
/**
+ * Gets a snapshot of cellular stats
+ * @hide
+ */
+ public CellularBatteryStats getCellularBatteryStats() {
+ synchronized (mStats) {
+ return mStats.getCellularBatteryStats();
+ }
+ }
+
+ /**
* Gets a snapshot of the system health for a particular uid.
*/
@Override
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index f54b243..5491f77 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -136,7 +136,6 @@
import java.io.PrintWriter;
import java.lang.reflect.Field;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -487,14 +486,13 @@
// SCO audio state is active or starting due to a request from AudioManager API
private static final int SCO_STATE_ACTIVE_INTERNAL = 3;
// SCO audio deactivation request waiting for headset service to connect
- private static final int SCO_STATE_DEACTIVATE_REQ = 5;
+ private static final int SCO_STATE_DEACTIVATE_REQ = 4;
+ // SCO audio deactivation in progress, waiting for Bluetooth audio intent
+ private static final int SCO_STATE_DEACTIVATING = 5;
// SCO audio state is active due to an action in BT handsfree (either voice recognition or
// in call audio)
private static final int SCO_STATE_ACTIVE_EXTERNAL = 2;
- // Deactivation request for all SCO connections (initiated by audio mode change)
- // waiting for headset service to connect
- private static final int SCO_STATE_DEACTIVATE_EXT_REQ = 4;
// Indicates the mode used for SCO audio connection. The mode is virtual call if the request
// originated from an app targeting an API version before JB MR2 and raw audio after that.
@@ -685,6 +683,14 @@
int maxCallVolume = SystemProperties.getInt("ro.config.vc_call_vol_steps", -1);
if (maxCallVolume != -1) {
MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = maxCallVolume;
+ }
+
+ int defaultCallVolume = SystemProperties.getInt("ro.config.vc_call_vol_default", -1);
+ if (defaultCallVolume != -1 &&
+ defaultCallVolume <= MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] &&
+ defaultCallVolume >= MIN_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]) {
+ AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = defaultCallVolume;
+ } else {
AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] =
(maxCallVolume * 3) / 4;
}
@@ -696,7 +702,8 @@
int defaultMusicVolume = SystemProperties.getInt("ro.config.media_vol_default", -1);
if (defaultMusicVolume != -1 &&
- defaultMusicVolume <= MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) {
+ defaultMusicVolume <= MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] &&
+ defaultMusicVolume >= MIN_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) {
AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = defaultMusicVolume;
} else {
if (isPlatformTelevision()) {
@@ -768,7 +775,7 @@
// Register for device connection intent broadcasts.
IntentFilter intentFilter =
new IntentFilter(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED);
- intentFilter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
+ intentFilter.addAction(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED);
intentFilter.addAction(Intent.ACTION_DOCK_EVENT);
intentFilter.addAction(Intent.ACTION_SCREEN_ON);
intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
@@ -1495,17 +1502,6 @@
if (adjustVolume && (direction != AudioManager.ADJUST_SAME)) {
mAudioHandler.removeMessages(MSG_UNMUTE_STREAM);
- // Check if volume update should be send to AVRCP
- if (streamTypeAlias == AudioSystem.STREAM_MUSIC &&
- (device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 &&
- (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
- synchronized (mA2dpAvrcpLock) {
- if (mA2dp != null && mAvrcpAbsVolSupported) {
- mA2dp.adjustAvrcpAbsoluteVolume(direction);
- }
- }
- }
-
if (isMuteAdjust) {
boolean state;
if (direction == AudioManager.ADJUST_TOGGLE_MUTE) {
@@ -1554,8 +1550,20 @@
0);
}
- // Check if volume update should be sent to Hdmi system audio.
int newIndex = mStreamStates[streamType].getIndex(device);
+
+ // Check if volume update should be send to AVRCP
+ if (streamTypeAlias == AudioSystem.STREAM_MUSIC &&
+ (device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 &&
+ (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
+ synchronized (mA2dpAvrcpLock) {
+ if (mA2dp != null && mAvrcpAbsVolSupported) {
+ mA2dp.setAvrcpAbsoluteVolume(newIndex / 10);
+ }
+ }
+ }
+
+ // Check if volume update should be sent to Hdmi system audio.
if (streamTypeAlias == AudioSystem.STREAM_MUSIC) {
setSystemAudioVolume(oldIndex, newIndex, getStreamMaxVolume(streamType), flags);
}
@@ -2240,12 +2248,15 @@
if (DEBUG_VOL) {
Log.d(TAG, String.format("Mic mute %s, user=%d", on, userId));
}
- // If mute is for current user actually mute, else just persist the setting
- // which will be loaded on user switch.
+ // only mute for the current user
if (getCurrentUserId() == userId) {
+ final boolean currentMute = AudioSystem.isMicrophoneMuted();
AudioSystem.muteMicrophone(on);
+ if (on != currentMute) {
+ mContext.sendBroadcast(new Intent(AudioManager.ACTION_MICROPHONE_MUTE_CHANGED)
+ .setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY));
+ }
}
- // Post a persist microphone msg.
}
@Override
@@ -2454,9 +2465,13 @@
}
public void binderDied() {
+ int oldModeOwnerPid = 0;
int newModeOwnerPid = 0;
synchronized(mSetModeDeathHandlers) {
Log.w(TAG, "setMode() client died");
+ if (!mSetModeDeathHandlers.isEmpty()) {
+ oldModeOwnerPid = mSetModeDeathHandlers.get(0).getPid();
+ }
int index = mSetModeDeathHandlers.indexOf(this);
if (index < 0) {
Log.w(TAG, "unregistered setMode() client died");
@@ -2465,8 +2480,8 @@
}
}
// when entering RINGTONE, IN_CALL or IN_COMMUNICATION mode, clear all
- // SCO connections not started by the application changing the mode
- if (newModeOwnerPid != 0) {
+ // SCO connections not started by the application changing the mode when pid changes
+ if ((newModeOwnerPid != oldModeOwnerPid) && (newModeOwnerPid != 0)) {
final long ident = Binder.clearCallingIdentity();
disconnectBluetoothSco(newModeOwnerPid);
Binder.restoreCallingIdentity(ident);
@@ -2510,17 +2525,21 @@
return;
}
+ int oldModeOwnerPid = 0;
int newModeOwnerPid = 0;
synchronized(mSetModeDeathHandlers) {
+ if (!mSetModeDeathHandlers.isEmpty()) {
+ oldModeOwnerPid = mSetModeDeathHandlers.get(0).getPid();
+ }
if (mode == AudioSystem.MODE_CURRENT) {
mode = mMode;
}
newModeOwnerPid = setModeInt(mode, cb, Binder.getCallingPid(), callingPackage);
}
// when entering RINGTONE, IN_CALL or IN_COMMUNICATION mode, clear all
- // SCO connections not started by the application changing the mode
- if (newModeOwnerPid != 0) {
- disconnectBluetoothSco(newModeOwnerPid);
+ // SCO connections not started by the application changing the mode when pid changes
+ if ((newModeOwnerPid != oldModeOwnerPid) && (newModeOwnerPid != 0)) {
+ disconnectBluetoothSco(newModeOwnerPid);
}
}
@@ -2916,7 +2935,7 @@
}
// Only enable calls from system components
- if (Binder.getCallingUid() >= FIRST_APPLICATION_UID) {
+ if (UserHandle.getCallingAppId() >= FIRST_APPLICATION_UID) {
mForcedUseForCommExt = on ? AudioSystem.FORCE_BT_SCO : AudioSystem.FORCE_NONE;
return;
}
@@ -2929,13 +2948,16 @@
}
public void setBluetoothScoOnInt(boolean on, String eventSource) {
+ Log.i(TAG, "setBluetoothScoOnInt: " + on + " " + eventSource);
if (on) {
// do not accept SCO ON if SCO audio is not connected
- synchronized(mScoClients) {
- if ((mBluetoothHeadset != null) &&
- (mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
- != BluetoothHeadset.STATE_AUDIO_CONNECTED)) {
+ synchronized (mScoClients) {
+ if ((mBluetoothHeadset != null)
+ && (mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
+ != BluetoothHeadset.STATE_AUDIO_CONNECTED)) {
mForcedUseForCommExt = AudioSystem.FORCE_BT_SCO;
+ Log.w(TAG, "setBluetoothScoOnInt(true) failed because "
+ + mBluetoothHeadsetDevice + " is not in audio connected mode");
return;
}
}
@@ -2964,6 +2986,9 @@
.append(Binder.getCallingPid()).toString();
synchronized (mBluetoothA2dpEnabledLock) {
+ if (mBluetoothA2dpEnabled == on) {
+ return;
+ }
mBluetoothA2dpEnabled = on;
sendMsg(mAudioHandler, MSG_SET_FORCE_BT_A2DP_USE, SENDMSG_QUEUE,
AudioSystem.FOR_MEDIA,
@@ -3114,9 +3139,8 @@
public int totalCount() {
synchronized(mScoClients) {
int count = 0;
- int size = mScoClients.size();
- for (int i = 0; i < size; i++) {
- count += mScoClients.get(i).getCount();
+ for (ScoClient mScoClient : mScoClients) {
+ count += mScoClient.getCount();
}
return count;
}
@@ -3124,128 +3148,161 @@
private void requestScoState(int state, int scoAudioMode) {
checkScoAudioState();
- if (totalCount() == 0) {
- if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) {
- // Make sure that the state transitions to CONNECTING even if we cannot initiate
- // the connection.
- broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTING);
- // Accept SCO audio activation only in NORMAL audio mode or if the mode is
- // currently controlled by the same client process.
- synchronized(mSetModeDeathHandlers) {
- if ((mSetModeDeathHandlers.isEmpty() ||
- mSetModeDeathHandlers.get(0).getPid() == mCreatorPid) &&
- (mScoAudioState == SCO_STATE_INACTIVE ||
- mScoAudioState == SCO_STATE_DEACTIVATE_REQ)) {
- if (mScoAudioState == SCO_STATE_INACTIVE) {
- mScoAudioMode = scoAudioMode;
- if (scoAudioMode == SCO_MODE_UNDEFINED) {
- if (mBluetoothHeadsetDevice != null) {
- mScoAudioMode = new Integer(Settings.Global.getInt(
- mContentResolver,
- "bluetooth_sco_channel_"+
- mBluetoothHeadsetDevice.getAddress(),
- SCO_MODE_VIRTUAL_CALL));
- if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
- mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
- }
- } else {
- mScoAudioMode = SCO_MODE_RAW;
- }
- }
- if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) {
- boolean status = false;
- if (mScoAudioMode == SCO_MODE_RAW) {
- status = mBluetoothHeadset.connectAudio();
- } else if (mScoAudioMode == SCO_MODE_VIRTUAL_CALL) {
- status = mBluetoothHeadset.startScoUsingVirtualVoiceCall(
- mBluetoothHeadsetDevice);
- } else if (mScoAudioMode == SCO_MODE_VR) {
- status = mBluetoothHeadset.startVoiceRecognition(
- mBluetoothHeadsetDevice);
- }
-
- if (status) {
- mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
- } else {
- broadcastScoConnectionState(
- AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
- }
- } else if (getBluetoothHeadset()) {
- mScoAudioState = SCO_STATE_ACTIVATE_REQ;
- }
- } else {
- mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
- broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTED);
- }
- } else {
- broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
- }
+ int clientCount = totalCount();
+ if (clientCount != 0) {
+ Log.i(TAG, "requestScoState: state=" + state + ", scoAudioMode=" + scoAudioMode
+ + ", clientCount=" + clientCount);
+ return;
+ }
+ if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) {
+ // Make sure that the state transitions to CONNECTING even if we cannot initiate
+ // the connection.
+ broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTING);
+ // Accept SCO audio activation only in NORMAL audio mode or if the mode is
+ // currently controlled by the same client process.
+ synchronized(mSetModeDeathHandlers) {
+ int modeOwnerPid = mSetModeDeathHandlers.isEmpty()
+ ? 0 : mSetModeDeathHandlers.get(0).getPid();
+ if (modeOwnerPid != 0 && (modeOwnerPid != mCreatorPid)) {
+ Log.w(TAG, "requestScoState: audio mode is not NORMAL and modeOwnerPid "
+ + modeOwnerPid + " != creatorPid " + mCreatorPid);
+ broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+ return;
}
- } else if (state == BluetoothHeadset.STATE_AUDIO_DISCONNECTED &&
- (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL ||
- mScoAudioState == SCO_STATE_ACTIVATE_REQ)) {
- if (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL) {
- if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) {
- boolean status = false;
- if (mScoAudioMode == SCO_MODE_RAW) {
- status = mBluetoothHeadset.disconnectAudio();
- } else if (mScoAudioMode == SCO_MODE_VIRTUAL_CALL) {
- status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall(
- mBluetoothHeadsetDevice);
- } else if (mScoAudioMode == SCO_MODE_VR) {
- status = mBluetoothHeadset.stopVoiceRecognition(
- mBluetoothHeadsetDevice);
+ switch (mScoAudioState) {
+ case SCO_STATE_INACTIVE:
+ mScoAudioMode = scoAudioMode;
+ if (scoAudioMode == SCO_MODE_UNDEFINED) {
+ mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
+ if (mBluetoothHeadsetDevice != null) {
+ mScoAudioMode = Settings.Global.getInt(mContentResolver,
+ "bluetooth_sco_channel_"
+ + mBluetoothHeadsetDevice.getAddress(),
+ SCO_MODE_VIRTUAL_CALL);
+ if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
+ mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
+ }
+ }
}
+ if (mBluetoothHeadset == null) {
+ if (getBluetoothHeadset()) {
+ mScoAudioState = SCO_STATE_ACTIVATE_REQ;
+ } else {
+ Log.w(TAG, "requestScoState: getBluetoothHeadset failed during"
+ + " connection, mScoAudioMode=" + mScoAudioMode);
+ broadcastScoConnectionState(
+ AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+ }
+ break;
+ }
+ if (mBluetoothHeadsetDevice == null) {
+ Log.w(TAG, "requestScoState: no active device while connecting,"
+ + " mScoAudioMode=" + mScoAudioMode);
+ broadcastScoConnectionState(
+ AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+ break;
+ }
+ if (connectBluetoothScoAudioHelper(mBluetoothHeadset,
+ mBluetoothHeadsetDevice, mScoAudioMode)) {
+ mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+ } else {
+ Log.w(TAG, "requestScoState: connect to " + mBluetoothHeadsetDevice
+ + " failed, mScoAudioMode=" + mScoAudioMode);
+ broadcastScoConnectionState(
+ AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+ }
+ break;
+ case SCO_STATE_DEACTIVATING:
+ mScoAudioState = SCO_STATE_ACTIVATE_REQ;
+ break;
+ case SCO_STATE_DEACTIVATE_REQ:
+ mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+ broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTED);
+ break;
+ default:
+ Log.w(TAG, "requestScoState: failed to connect in state "
+ + mScoAudioState + ", scoAudioMode=" + scoAudioMode);
+ broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+ break;
- if (!status) {
+ }
+ }
+ } else if (state == BluetoothHeadset.STATE_AUDIO_DISCONNECTED) {
+ switch (mScoAudioState) {
+ case SCO_STATE_ACTIVE_INTERNAL:
+ if (mBluetoothHeadset == null) {
+ if (getBluetoothHeadset()) {
+ mScoAudioState = SCO_STATE_DEACTIVATE_REQ;
+ } else {
+ Log.w(TAG, "requestScoState: getBluetoothHeadset failed during"
+ + " disconnection, mScoAudioMode=" + mScoAudioMode);
mScoAudioState = SCO_STATE_INACTIVE;
broadcastScoConnectionState(
AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
}
- } else if (getBluetoothHeadset()) {
- mScoAudioState = SCO_STATE_DEACTIVATE_REQ;
+ break;
}
- } else {
+ if (mBluetoothHeadsetDevice == null) {
+ mScoAudioState = SCO_STATE_INACTIVE;
+ broadcastScoConnectionState(
+ AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+ break;
+ }
+ if (disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+ mBluetoothHeadsetDevice, mScoAudioMode)) {
+ mScoAudioState = SCO_STATE_DEACTIVATING;
+ } else {
+ mScoAudioState = SCO_STATE_INACTIVE;
+ broadcastScoConnectionState(
+ AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+ }
+ break;
+ case SCO_STATE_ACTIVATE_REQ:
mScoAudioState = SCO_STATE_INACTIVE;
broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
- }
+ break;
+ default:
+ Log.w(TAG, "requestScoState: failed to disconnect in state "
+ + mScoAudioState + ", scoAudioMode=" + scoAudioMode);
+ broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+ break;
}
}
}
}
private void checkScoAudioState() {
- if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null &&
- mScoAudioState == SCO_STATE_INACTIVE &&
- mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
- != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) {
- mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+ synchronized (mScoClients) {
+ if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null &&
+ mScoAudioState == SCO_STATE_INACTIVE &&
+ mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
+ != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) {
+ mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+ }
}
}
+
private ScoClient getScoClient(IBinder cb, boolean create) {
synchronized(mScoClients) {
- ScoClient client = null;
- int size = mScoClients.size();
- for (int i = 0; i < size; i++) {
- client = mScoClients.get(i);
- if (client.getBinder() == cb)
- return client;
+ for (ScoClient existingClient : mScoClients) {
+ if (existingClient.getBinder() == cb) {
+ return existingClient;
+ }
}
if (create) {
- client = new ScoClient(cb);
- mScoClients.add(client);
+ ScoClient newClient = new ScoClient(cb);
+ mScoClients.add(newClient);
+ return newClient;
}
- return client;
+ return null;
}
}
public void clearAllScoClients(int exceptPid, boolean stopSco) {
synchronized(mScoClients) {
ScoClient savedClient = null;
- int size = mScoClients.size();
- for (int i = 0; i < size; i++) {
- ScoClient cl = mScoClients.get(i);
+ for (ScoClient cl : mScoClients) {
if (cl.getPid() != exceptPid) {
cl.clearCount(stopSco);
} else {
@@ -3275,26 +3332,47 @@
return result;
}
+ /**
+ * Disconnect all SCO connections started by {@link AudioManager} except those started by
+ * {@param exceptPid}
+ *
+ * @param exceptPid pid whose SCO connections through {@link AudioManager} should be kept
+ */
private void disconnectBluetoothSco(int exceptPid) {
synchronized(mScoClients) {
checkScoAudioState();
- if (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL ||
- mScoAudioState == SCO_STATE_DEACTIVATE_EXT_REQ) {
- if (mBluetoothHeadsetDevice != null) {
- if (mBluetoothHeadset != null) {
- if (!mBluetoothHeadset.stopVoiceRecognition(
- mBluetoothHeadsetDevice)) {
- sendMsg(mAudioHandler, MSG_BT_HEADSET_CNCT_FAILED,
- SENDMSG_REPLACE, 0, 0, null, 0);
- }
- } else if (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL &&
- getBluetoothHeadset()) {
- mScoAudioState = SCO_STATE_DEACTIVATE_EXT_REQ;
- }
- }
- } else {
- clearAllScoClients(exceptPid, true);
+ if (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL) {
+ return;
}
+ clearAllScoClients(exceptPid, true);
+ }
+ }
+
+ private static boolean disconnectBluetoothScoAudioHelper(BluetoothHeadset bluetoothHeadset,
+ BluetoothDevice device, int scoAudioMode) {
+ switch (scoAudioMode) {
+ case SCO_MODE_RAW:
+ return bluetoothHeadset.disconnectAudio();
+ case SCO_MODE_VIRTUAL_CALL:
+ return bluetoothHeadset.stopScoUsingVirtualVoiceCall();
+ case SCO_MODE_VR:
+ return bluetoothHeadset.stopVoiceRecognition(device);
+ default:
+ return false;
+ }
+ }
+
+ private static boolean connectBluetoothScoAudioHelper(BluetoothHeadset bluetoothHeadset,
+ BluetoothDevice device, int scoAudioMode) {
+ switch (scoAudioMode) {
+ case SCO_MODE_RAW:
+ return bluetoothHeadset.connectAudio();
+ case SCO_MODE_VIRTUAL_CALL:
+ return bluetoothHeadset.startScoUsingVirtualVoiceCall();
+ case SCO_MODE_VR:
+ return bluetoothHeadset.startVoiceRecognition(device);
+ default:
+ return false;
}
}
@@ -3324,24 +3402,23 @@
}
}
- void setBtScoDeviceConnectionState(BluetoothDevice btDevice, int state) {
+ private boolean handleBtScoActiveDeviceChange(BluetoothDevice btDevice, boolean isActive) {
if (btDevice == null) {
- return;
+ return true;
}
-
String address = btDevice.getAddress();
BluetoothClass btClass = btDevice.getBluetoothClass();
int outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO;
int inDevice = AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET;
if (btClass != null) {
switch (btClass.getDeviceClass()) {
- case BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET:
- case BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE:
- outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
- break;
- case BluetoothClass.Device.AUDIO_VIDEO_CAR_AUDIO:
- outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
- break;
+ case BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET:
+ case BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE:
+ outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
+ break;
+ case BluetoothClass.Device.AUDIO_VIDEO_CAR_AUDIO:
+ outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
+ break;
}
}
@@ -3349,34 +3426,31 @@
address = "";
}
- boolean connected = (state == BluetoothProfile.STATE_CONNECTED);
-
String btDeviceName = btDevice.getName();
- boolean success =
- handleDeviceConnection(connected, outDevice, address, btDeviceName) &&
- handleDeviceConnection(connected, inDevice, address, btDeviceName);
+ boolean result = handleDeviceConnection(isActive, outDevice, address, btDeviceName);
+ // handleDeviceConnection() && result to make sure the method get executed
+ result = handleDeviceConnection(isActive, inDevice, address, btDeviceName) && result;
+ return result;
+ }
- if (!success) {
- return;
- }
-
- /* When one BT headset is disconnected while another BT headset
- * is connected, don't mess with the headset device.
- */
- if ((state == BluetoothProfile.STATE_DISCONNECTED ||
- state == BluetoothProfile.STATE_DISCONNECTING) &&
- mBluetoothHeadset != null &&
- mBluetoothHeadset.getAudioState(btDevice) == BluetoothHeadset.STATE_AUDIO_CONNECTED) {
- Log.w(TAG, "SCO connected through another device, returning");
- return;
- }
-
+ private void setBtScoActiveDevice(BluetoothDevice btDevice) {
synchronized (mScoClients) {
- if (connected) {
+ Log.i(TAG, "setBtScoActiveDevice: " + mBluetoothHeadsetDevice + " -> " + btDevice);
+ final BluetoothDevice previousActiveDevice = mBluetoothHeadsetDevice;
+ if (!Objects.equals(btDevice, previousActiveDevice)) {
+ if (!handleBtScoActiveDeviceChange(previousActiveDevice, false)) {
+ Log.w(TAG, "setBtScoActiveDevice() failed to remove previous device "
+ + previousActiveDevice);
+ }
+ if (!handleBtScoActiveDeviceChange(btDevice, true)) {
+ Log.e(TAG, "setBtScoActiveDevice() failed to add new device " + btDevice);
+ // set mBluetoothHeadsetDevice to null when failing to add new device
+ btDevice = null;
+ }
mBluetoothHeadsetDevice = btDevice;
- } else {
- mBluetoothHeadsetDevice = null;
- resetBluetoothSco();
+ if (mBluetoothHeadsetDevice == null) {
+ resetBluetoothSco();
+ }
}
}
}
@@ -3402,7 +3476,7 @@
queueMsgUnderWakeLock(mAudioHandler,
MSG_SET_A2DP_SINK_CONNECTION_STATE,
state,
- 0 /* arg2 unused */,
+ -1,
btDevice,
delay);
}
@@ -3431,52 +3505,34 @@
// Discard timeout message
mAudioHandler.removeMessages(MSG_BT_HEADSET_CNCT_FAILED);
mBluetoothHeadset = (BluetoothHeadset) proxy;
- deviceList = mBluetoothHeadset.getConnectedDevices();
- if (deviceList.size() > 0) {
- mBluetoothHeadsetDevice = deviceList.get(0);
- } else {
- mBluetoothHeadsetDevice = null;
- }
+ setBtScoActiveDevice(mBluetoothHeadset.getActiveDevice());
// Refresh SCO audio state
checkScoAudioState();
// Continue pending action if any
if (mScoAudioState == SCO_STATE_ACTIVATE_REQ ||
- mScoAudioState == SCO_STATE_DEACTIVATE_REQ ||
- mScoAudioState == SCO_STATE_DEACTIVATE_EXT_REQ) {
+ mScoAudioState == SCO_STATE_DEACTIVATE_REQ) {
boolean status = false;
if (mBluetoothHeadsetDevice != null) {
switch (mScoAudioState) {
- case SCO_STATE_ACTIVATE_REQ:
- mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
- if (mScoAudioMode == SCO_MODE_RAW) {
- status = mBluetoothHeadset.connectAudio();
- } else if (mScoAudioMode == SCO_MODE_VIRTUAL_CALL) {
- status = mBluetoothHeadset.startScoUsingVirtualVoiceCall(
- mBluetoothHeadsetDevice);
- } else if (mScoAudioMode == SCO_MODE_VR) {
- status = mBluetoothHeadset.startVoiceRecognition(
- mBluetoothHeadsetDevice);
- }
- break;
- case SCO_STATE_DEACTIVATE_REQ:
- if (mScoAudioMode == SCO_MODE_RAW) {
- status = mBluetoothHeadset.disconnectAudio();
- } else if (mScoAudioMode == SCO_MODE_VIRTUAL_CALL) {
- status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall(
- mBluetoothHeadsetDevice);
- } else if (mScoAudioMode == SCO_MODE_VR) {
- status = mBluetoothHeadset.stopVoiceRecognition(
- mBluetoothHeadsetDevice);
- }
- break;
- case SCO_STATE_DEACTIVATE_EXT_REQ:
- status = mBluetoothHeadset.stopVoiceRecognition(
- mBluetoothHeadsetDevice);
+ case SCO_STATE_ACTIVATE_REQ:
+ status = connectBluetoothScoAudioHelper(mBluetoothHeadset,
+ mBluetoothHeadsetDevice, mScoAudioMode);
+ if (status) {
+ mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+ }
+ break;
+ case SCO_STATE_DEACTIVATE_REQ:
+ status = disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+ mBluetoothHeadsetDevice, mScoAudioMode);
+ if (status) {
+ mScoAudioState = SCO_STATE_DEACTIVATING;
+ }
+ break;
}
}
if (!status) {
- sendMsg(mAudioHandler, MSG_BT_HEADSET_CNCT_FAILED,
- SENDMSG_REPLACE, 0, 0, null, 0);
+ mScoAudioState = SCO_STATE_INACTIVE;
+ broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
}
}
}
@@ -3557,10 +3613,7 @@
void disconnectHeadset() {
synchronized (mScoClients) {
- if (mBluetoothHeadsetDevice != null) {
- setBtScoDeviceConnectionState(mBluetoothHeadsetDevice,
- BluetoothProfile.STATE_DISCONNECTED);
- }
+ setBtScoActiveDevice(null);
mBluetoothHeadset = null;
}
}
@@ -4101,25 +4154,30 @@
}
}
+ @Override
+ public void setHearingAidDeviceConnectionState(BluetoothDevice device, int state)
+ {
+ }
+
public int setBluetoothA2dpDeviceConnectionState(BluetoothDevice device, int state, int profile)
{
return setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(
- device, state, profile, false /* suppressNoisyIntent */);
+ device, state, profile, false /* suppressNoisyIntent */, -1 /* a2dpVolume */);
}
public int setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(BluetoothDevice device,
- int state, int profile, boolean suppressNoisyIntent)
+ int state, int profile, boolean suppressNoisyIntent, int a2dpVolume)
{
if (mAudioHandler.hasMessages(MSG_SET_A2DP_SINK_CONNECTION_STATE, device)) {
return 0;
}
return setBluetoothA2dpDeviceConnectionStateInt(
- device, state, profile, suppressNoisyIntent, AudioSystem.DEVICE_NONE);
+ device, state, profile, suppressNoisyIntent, AudioSystem.DEVICE_NONE, a2dpVolume);
}
public int setBluetoothA2dpDeviceConnectionStateInt(
BluetoothDevice device, int state, int profile, boolean suppressNoisyIntent,
- int musicDevice)
+ int musicDevice, int a2dpVolume)
{
int delay;
if (profile != BluetoothProfile.A2DP && profile != BluetoothProfile.A2DP_SINK) {
@@ -4137,7 +4195,7 @@
(profile == BluetoothProfile.A2DP ?
MSG_SET_A2DP_SINK_CONNECTION_STATE : MSG_SET_A2DP_SRC_CONNECTION_STATE),
state,
- 0 /* arg2 unused */,
+ a2dpVolume,
device,
delay);
}
@@ -4635,41 +4693,41 @@
}
}
- /** Handles internal volume messages in separate volume thread. */
- private class AudioHandler extends Handler {
+ private void setDeviceVolume(VolumeStreamState streamState, int device) {
- private void setDeviceVolume(VolumeStreamState streamState, int device) {
+ synchronized (VolumeStreamState.class) {
+ // Apply volume
+ streamState.applyDeviceVolume_syncVSS(device);
- synchronized (VolumeStreamState.class) {
- // Apply volume
- streamState.applyDeviceVolume_syncVSS(device);
-
- // Apply change to all streams using this one as alias
- int numStreamTypes = AudioSystem.getNumStreamTypes();
- for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
- if (streamType != streamState.mStreamType &&
- mStreamVolumeAlias[streamType] == streamState.mStreamType) {
- // Make sure volume is also maxed out on A2DP device for aliased stream
- // that may have a different device selected
- int streamDevice = getDeviceForStream(streamType);
- if ((device != streamDevice) && mAvrcpAbsVolSupported &&
- ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0)) {
- mStreamStates[streamType].applyDeviceVolume_syncVSS(device);
- }
- mStreamStates[streamType].applyDeviceVolume_syncVSS(streamDevice);
+ // Apply change to all streams using this one as alias
+ int numStreamTypes = AudioSystem.getNumStreamTypes();
+ for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
+ if (streamType != streamState.mStreamType &&
+ mStreamVolumeAlias[streamType] == streamState.mStreamType) {
+ // Make sure volume is also maxed out on A2DP device for aliased stream
+ // that may have a different device selected
+ int streamDevice = getDeviceForStream(streamType);
+ if ((device != streamDevice) && mAvrcpAbsVolSupported &&
+ ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0)) {
+ mStreamStates[streamType].applyDeviceVolume_syncVSS(device);
}
+ mStreamStates[streamType].applyDeviceVolume_syncVSS(streamDevice);
}
}
- // Post a persist volume msg
- sendMsg(mAudioHandler,
- MSG_PERSIST_VOLUME,
- SENDMSG_QUEUE,
- device,
- 0,
- streamState,
- PERSIST_DELAY);
-
}
+ // Post a persist volume msg
+ sendMsg(mAudioHandler,
+ MSG_PERSIST_VOLUME,
+ SENDMSG_QUEUE,
+ device,
+ 0,
+ streamState,
+ PERSIST_DELAY);
+
+ }
+
+ /** Handles internal volume messages in separate volume thread. */
+ private class AudioHandler extends Handler {
private void setAllVolumes(VolumeStreamState streamState) {
@@ -5016,7 +5074,7 @@
break;
case MSG_SET_A2DP_SINK_CONNECTION_STATE:
- onSetA2dpSinkConnectionState((BluetoothDevice)msg.obj, msg.arg1);
+ onSetA2dpSinkConnectionState((BluetoothDevice)msg.obj, msg.arg1, msg.arg2);
mAudioEventWakeLock.release();
break;
@@ -5176,8 +5234,6 @@
// enable A2DP before notifying A2DP connection to avoid unnecessary processing in
// audio policy manager
VolumeStreamState streamState = mStreamStates[AudioSystem.STREAM_MUSIC];
- sendMsg(mAudioHandler, MSG_SET_DEVICE_VOLUME, SENDMSG_QUEUE,
- AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, 0, streamState, 0);
setBluetoothA2dpOnInt(true, eventSource);
AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
AudioSystem.DEVICE_STATE_AVAILABLE, address, name);
@@ -5256,7 +5312,7 @@
return mAudioHandler.hasMessages(MSG_BTA2DP_DOCK_TIMEOUT);
}
- private void onSetA2dpSinkConnectionState(BluetoothDevice btDevice, int state)
+ private void onSetA2dpSinkConnectionState(BluetoothDevice btDevice, int state, int a2dpVolume)
{
if (DEBUG_DEVICES) {
Log.d(TAG, "onSetA2dpSinkConnectionState btDevice=" + btDevice+"state=" + state);
@@ -5307,6 +5363,14 @@
makeA2dpDeviceUnavailableNow(mDockAddress);
}
}
+ if (a2dpVolume != -1) {
+ VolumeStreamState streamState = mStreamStates[AudioSystem.STREAM_MUSIC];
+ // Convert index to internal representation in VolumeStreamState
+ a2dpVolume = a2dpVolume * 10;
+ streamState.setIndex(a2dpVolume, AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
+ "onSetA2dpSinkConnectionState");
+ setDeviceVolume(streamState, AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
+ }
makeA2dpDeviceAvailable(address, btDevice.getName(),
"onSetA2dpSinkConnectionState");
synchronized (mCurAudioRoutes) {
@@ -5376,7 +5440,7 @@
// consistent with audio policy manager state
setBluetoothA2dpDeviceConnectionStateInt(
btDevice, BluetoothA2dp.STATE_DISCONNECTED, BluetoothProfile.A2DP,
- false /* suppressNoisyIntent */, musicDevice);
+ false /* suppressNoisyIntent */, musicDevice, -1 /* a2dpVolume */);
}
}
}
@@ -5389,9 +5453,6 @@
sendMsg(mAudioHandler, MSG_SET_DEVICE_VOLUME, SENDMSG_QUEUE,
AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, 0,
mStreamStates[AudioSystem.STREAM_MUSIC], 0);
- sendMsg(mAudioHandler, MSG_SET_DEVICE_VOLUME, SENDMSG_QUEUE,
- AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, 0,
- mStreamStates[AudioSystem.STREAM_RING], 0);
}
}
@@ -5732,11 +5793,9 @@
AudioSystem.setForceUse(AudioSystem.FOR_DOCK, config);
}
mDockState = dockState;
- } else if (action.equals(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED)) {
- state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE,
- BluetoothProfile.STATE_DISCONNECTED);
+ } else if (action.equals(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED)) {
BluetoothDevice btDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
- setBtScoDeviceConnectionState(btDevice, state);
+ setBtScoActiveDevice(btDevice);
} else if (action.equals(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED)) {
boolean broadcast = false;
int scoAudioState = AudioManager.SCO_AUDIO_STATE_ERROR;
@@ -5746,33 +5805,45 @@
if (!mScoClients.isEmpty() &&
(mScoAudioState == SCO_STATE_ACTIVE_INTERNAL ||
mScoAudioState == SCO_STATE_ACTIVATE_REQ ||
- mScoAudioState == SCO_STATE_DEACTIVATE_REQ)) {
+ mScoAudioState == SCO_STATE_DEACTIVATE_REQ ||
+ mScoAudioState == SCO_STATE_DEACTIVATING)) {
broadcast = true;
}
switch (btState) {
- case BluetoothHeadset.STATE_AUDIO_CONNECTED:
- scoAudioState = AudioManager.SCO_AUDIO_STATE_CONNECTED;
- if (mScoAudioState != SCO_STATE_ACTIVE_INTERNAL &&
- mScoAudioState != SCO_STATE_DEACTIVATE_REQ &&
- mScoAudioState != SCO_STATE_DEACTIVATE_EXT_REQ) {
- mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
- }
- break;
- case BluetoothHeadset.STATE_AUDIO_DISCONNECTED:
- scoAudioState = AudioManager.SCO_AUDIO_STATE_DISCONNECTED;
- mScoAudioState = SCO_STATE_INACTIVE;
- clearAllScoClients(0, false);
- break;
- case BluetoothHeadset.STATE_AUDIO_CONNECTING:
- if (mScoAudioState != SCO_STATE_ACTIVE_INTERNAL &&
- mScoAudioState != SCO_STATE_DEACTIVATE_REQ &&
- mScoAudioState != SCO_STATE_DEACTIVATE_EXT_REQ) {
- mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
- }
- default:
- // do not broadcast CONNECTING or invalid state
- broadcast = false;
- break;
+ case BluetoothHeadset.STATE_AUDIO_CONNECTED:
+ scoAudioState = AudioManager.SCO_AUDIO_STATE_CONNECTED;
+ if (mScoAudioState != SCO_STATE_ACTIVE_INTERNAL &&
+ mScoAudioState != SCO_STATE_DEACTIVATE_REQ) {
+ mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+ }
+ setBluetoothScoOn(true);
+ break;
+ case BluetoothHeadset.STATE_AUDIO_DISCONNECTED:
+ setBluetoothScoOn(false);
+ scoAudioState = AudioManager.SCO_AUDIO_STATE_DISCONNECTED;
+ // startBluetoothSco called after stopBluetoothSco
+ if (mScoAudioState == SCO_STATE_ACTIVATE_REQ) {
+ if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null
+ && connectBluetoothScoAudioHelper(mBluetoothHeadset,
+ mBluetoothHeadsetDevice, mScoAudioMode)) {
+ mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+ broadcast = false;
+ break;
+ }
+ }
+ // Tear down SCO if disconnected from external
+ clearAllScoClients(0, mScoAudioState == SCO_STATE_ACTIVE_INTERNAL);
+ mScoAudioState = SCO_STATE_INACTIVE;
+ break;
+ case BluetoothHeadset.STATE_AUDIO_CONNECTING:
+ if (mScoAudioState != SCO_STATE_ACTIVE_INTERNAL &&
+ mScoAudioState != SCO_STATE_DEACTIVATE_REQ) {
+ mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+ }
+ default:
+ // do not broadcast CONNECTING or invalid state
+ broadcast = false;
+ break;
}
}
if (broadcast) {
diff --git a/services/core/java/com/android/server/connectivity/ConnectivityConstants.java b/services/core/java/com/android/server/connectivity/ConnectivityConstants.java
new file mode 100644
index 0000000..24865bc
--- /dev/null
+++ b/services/core/java/com/android/server/connectivity/ConnectivityConstants.java
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+package com.android.server.connectivity;
+
+/**
+ * A class encapsulating various constants used by Connectivity.
+ * @hide
+ */
+public class ConnectivityConstants {
+ // IPC constants
+ public static final String ACTION_NETWORK_CONDITIONS_MEASURED =
+ "android.net.conn.NETWORK_CONDITIONS_MEASURED";
+ public static final String EXTRA_CONNECTIVITY_TYPE = "extra_connectivity_type";
+ public static final String EXTRA_NETWORK_TYPE = "extra_network_type";
+ public static final String EXTRA_RESPONSE_RECEIVED = "extra_response_received";
+ public static final String EXTRA_IS_CAPTIVE_PORTAL = "extra_is_captive_portal";
+ public static final String EXTRA_CELL_ID = "extra_cellid";
+ public static final String EXTRA_SSID = "extra_ssid";
+ public static final String EXTRA_BSSID = "extra_bssid";
+ /** real time since boot */
+ public static final String EXTRA_REQUEST_TIMESTAMP_MS = "extra_request_timestamp_ms";
+ public static final String EXTRA_RESPONSE_TIMESTAMP_MS = "extra_response_timestamp_ms";
+
+ public static final String PERMISSION_ACCESS_NETWORK_CONDITIONS =
+ "android.permission.ACCESS_NETWORK_CONDITIONS";
+
+ // Penalty applied to scores of Networks that have not been validated.
+ public static final int UNVALIDATED_SCORE_PENALTY = 40;
+
+ // Score for explicitly connected network.
+ //
+ // This ensures that a) the explicitly selected network is never trumped by anything else, and
+ // b) the explicitly selected network is never torn down.
+ public static final int MAXIMUM_NETWORK_SCORE = 100;
+ // VPNs typically have priority over other networks. Give them a score that will
+ // let them win every single time.
+ public static final int VPN_DEFAULT_SCORE = 101;
+}
diff --git a/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java b/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
index bd2e96e..e43d152 100644
--- a/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
+++ b/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
@@ -150,7 +150,8 @@
fillLinkInfo(ev, newNai);
ev.initialScore = newNai.getCurrentScore();
if (newNai.lastValidated) {
- logDefaultNetworkValidity(timeMs, true);
+ mIsCurrentlyValid = true;
+ mLastValidationTimeMs = timeMs;
}
} else {
mIsCurrentlyValid = false;
diff --git a/services/core/java/com/android/server/connectivity/DnsManager.java b/services/core/java/com/android/server/connectivity/DnsManager.java
index a1c54bd..d51a196 100644
--- a/services/core/java/com/android/server/connectivity/DnsManager.java
+++ b/services/core/java/com/android/server/connectivity/DnsManager.java
@@ -34,27 +34,29 @@
import android.net.Network;
import android.net.NetworkUtils;
import android.net.Uri;
+import android.net.dns.ResolvUtil;
import android.os.Binder;
import android.os.INetworkManagementService;
-import android.os.Handler;
import android.os.UserHandle;
import android.provider.Settings;
-import android.system.GaiException;
-import android.system.OsConstants;
-import android.system.StructAddrinfo;
import android.text.TextUtils;
+import android.util.Pair;
import android.util.Slog;
import com.android.server.connectivity.MockableSystemProperties;
-import libcore.io.Libcore;
-
import java.net.InetAddress;
+import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
import java.util.Map;
+import java.util.Objects;
import java.util.stream.Collectors;
+import java.util.Set;
import java.util.StringJoiner;
@@ -64,10 +66,56 @@
* This class it NOT designed for concurrent access. Furthermore, all non-static
* methods MUST be called from ConnectivityService's thread.
*
+ * [ Private DNS ]
+ * The code handling Private DNS is spread across several components, but this
+ * seems like the least bad place to collect all the observations.
+ *
+ * Private DNS handling and updating occurs in response to several different
+ * events. Each is described here with its corresponding intended handling.
+ *
+ * [A] Event: A new network comes up.
+ * Mechanics:
+ * [1] ConnectivityService gets notifications from NetworkAgents.
+ * [2] in updateNetworkInfo(), the first time the NetworkAgent goes into
+ * into CONNECTED state, the Private DNS configuration is retrieved,
+ * programmed, and strict mode hostname resolution (if applicable) is
+ * enqueued in NetworkAgent's NetworkMonitor, via a call to
+ * handlePerNetworkPrivateDnsConfig().
+ * [3] Re-resolution of strict mode hostnames that fail to return any
+ * IP addresses happens inside NetworkMonitor; it sends itself a
+ * delayed CMD_EVALUATE_PRIVATE_DNS message in a simple backoff
+ * schedule.
+ * [4] Successfully resolved hostnames are sent to ConnectivityService
+ * inside an EVENT_PRIVATE_DNS_CONFIG_RESOLVED message. The resolved
+ * IP addresses are programmed into netd via:
+ *
+ * updatePrivateDns() -> updateDnses()
+ *
+ * both of which make calls into DnsManager.
+ * [5] Upon a successful hostname resolution NetworkMonitor initiates a
+ * validation attempt in the form of a lookup for a one-time hostname
+ * that uses Private DNS.
+ *
+ * [B] Event: Private DNS settings are changed.
+ * Mechanics:
+ * [1] ConnectivityService gets notifications from its SettingsObserver.
+ * [2] handlePrivateDnsSettingsChanged() is called, which calls
+ * handlePerNetworkPrivateDnsConfig() and the process proceeds
+ * as if from A.3 above.
+ *
+ * [C] Event: An application calls ConnectivityManager#reportBadNetwork().
+ * Mechanics:
+ * [1] NetworkMonitor is notified and initiates a reevaluation, which
+ * always bypasses Private DNS.
+ * [2] Once completed, NetworkMonitor checks if strict mode is in operation
+ * and if so enqueues another evaluation of Private DNS, as if from
+ * step A.5 above.
+ *
* @hide
*/
public class DnsManager {
private static final String TAG = DnsManager.class.getSimpleName();
+ private static final PrivateDnsConfig PRIVATE_DNS_OFF = new PrivateDnsConfig();
/* Defaults for resolver parameters. */
private static final int DNS_RESOLVER_DEFAULT_SAMPLE_VALIDITY_SECONDS = 1800;
@@ -126,35 +174,116 @@
}
public static PrivateDnsConfig tryBlockingResolveOf(Network network, String name) {
- final StructAddrinfo hints = new StructAddrinfo();
- // Unnecessary, but expressly no AI_ADDRCONFIG.
- hints.ai_flags = 0;
- // Fetch all IP addresses at once to minimize re-resolution.
- hints.ai_family = OsConstants.AF_UNSPEC;
- hints.ai_socktype = OsConstants.SOCK_DGRAM;
-
try {
- final InetAddress[] ips = Libcore.os.android_getaddrinfo(name, hints, network.netId);
- if (ips != null && ips.length > 0) {
- return new PrivateDnsConfig(name, ips);
- }
- } catch (GaiException ignored) {}
-
- return null;
+ final InetAddress[] ips = ResolvUtil.blockingResolveAllLocally(network, name);
+ return new PrivateDnsConfig(name, ips);
+ } catch (UnknownHostException uhe) {
+ return new PrivateDnsConfig(name, null);
+ }
}
public static Uri[] getPrivateDnsSettingsUris() {
- final Uri[] uris = new Uri[2];
- uris[0] = Settings.Global.getUriFor(PRIVATE_DNS_MODE);
- uris[1] = Settings.Global.getUriFor(PRIVATE_DNS_SPECIFIER);
- return uris;
+ return new Uri[]{
+ Settings.Global.getUriFor(PRIVATE_DNS_MODE),
+ Settings.Global.getUriFor(PRIVATE_DNS_SPECIFIER),
+ };
+ }
+
+ public static class PrivateDnsValidationUpdate {
+ final public int netId;
+ final public InetAddress ipAddress;
+ final public String hostname;
+ final public boolean validated;
+
+ public PrivateDnsValidationUpdate(int netId, InetAddress ipAddress,
+ String hostname, boolean validated) {
+ this.netId = netId;
+ this.ipAddress = ipAddress;
+ this.hostname = hostname;
+ this.validated = validated;
+ }
+ }
+
+ private static class PrivateDnsValidationStatuses {
+ enum ValidationStatus {
+ IN_PROGRESS,
+ FAILED,
+ SUCCEEDED
+ }
+
+ // Validation statuses of <hostname, ipAddress> pairs for a single netId
+ // Caution : not thread-safe. As mentioned in the top file comment, all
+ // methods of this class must only be called on ConnectivityService's thread.
+ private Map<Pair<String, InetAddress>, ValidationStatus> mValidationMap;
+
+ private PrivateDnsValidationStatuses() {
+ mValidationMap = new HashMap<>();
+ }
+
+ private boolean hasValidatedServer() {
+ for (ValidationStatus status : mValidationMap.values()) {
+ if (status == ValidationStatus.SUCCEEDED) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private void updateTrackedDnses(String[] ipAddresses, String hostname) {
+ Set<Pair<String, InetAddress>> latestDnses = new HashSet<>();
+ for (String ipAddress : ipAddresses) {
+ try {
+ latestDnses.add(new Pair(hostname,
+ InetAddress.parseNumericAddress(ipAddress)));
+ } catch (IllegalArgumentException e) {}
+ }
+ // Remove <hostname, ipAddress> pairs that should not be tracked.
+ for (Iterator<Map.Entry<Pair<String, InetAddress>, ValidationStatus>> it =
+ mValidationMap.entrySet().iterator(); it.hasNext(); ) {
+ Map.Entry<Pair<String, InetAddress>, ValidationStatus> entry = it.next();
+ if (!latestDnses.contains(entry.getKey())) {
+ it.remove();
+ }
+ }
+ // Add new <hostname, ipAddress> pairs that should be tracked.
+ for (Pair<String, InetAddress> p : latestDnses) {
+ if (!mValidationMap.containsKey(p)) {
+ mValidationMap.put(p, ValidationStatus.IN_PROGRESS);
+ }
+ }
+ }
+
+ private void updateStatus(PrivateDnsValidationUpdate update) {
+ Pair<String, InetAddress> p = new Pair(update.hostname,
+ update.ipAddress);
+ if (!mValidationMap.containsKey(p)) {
+ return;
+ }
+ if (update.validated) {
+ mValidationMap.put(p, ValidationStatus.SUCCEEDED);
+ } else {
+ mValidationMap.put(p, ValidationStatus.FAILED);
+ }
+ }
+
+ private LinkProperties fillInValidatedPrivateDns(LinkProperties lp) {
+ lp.setValidatedPrivateDnsServers(Collections.EMPTY_LIST);
+ mValidationMap.forEach((key, value) -> {
+ if (value == ValidationStatus.SUCCEEDED) {
+ lp.addValidatedPrivateDnsServer(key.second);
+ }
+ });
+ return lp;
+ }
}
private final Context mContext;
private final ContentResolver mContentResolver;
private final INetworkManagementService mNMS;
private final MockableSystemProperties mSystemProperties;
+ // TODO: Replace these Maps with SparseArrays.
private final Map<Integer, PrivateDnsConfig> mPrivateDnsMap;
+ private final Map<Integer, PrivateDnsValidationStatuses> mPrivateDnsValidationMap;
private int mNumDnsEntries;
private int mSampleValidity;
@@ -170,6 +299,7 @@
mNMS = nms;
mSystemProperties = sp;
mPrivateDnsMap = new HashMap<>();
+ mPrivateDnsValidationMap = new HashMap<>();
// TODO: Create and register ContentObservers to track every setting
// used herein, posting messages to respond to changes.
@@ -181,46 +311,92 @@
public void removeNetwork(Network network) {
mPrivateDnsMap.remove(network.netId);
+ mPrivateDnsValidationMap.remove(network.netId);
}
public PrivateDnsConfig updatePrivateDns(Network network, PrivateDnsConfig cfg) {
Slog.w(TAG, "updatePrivateDns(" + network + ", " + cfg + ")");
return (cfg != null)
? mPrivateDnsMap.put(network.netId, cfg)
- : mPrivateDnsMap.remove(network);
+ : mPrivateDnsMap.remove(network.netId);
+ }
+
+ public void updatePrivateDnsStatus(int netId, LinkProperties lp) {
+ // Use the PrivateDnsConfig data pushed to this class instance
+ // from ConnectivityService.
+ final PrivateDnsConfig privateDnsCfg = mPrivateDnsMap.getOrDefault(netId,
+ PRIVATE_DNS_OFF);
+
+ final boolean useTls = privateDnsCfg.useTls;
+ final PrivateDnsValidationStatuses statuses =
+ useTls ? mPrivateDnsValidationMap.get(netId) : null;
+ final boolean validated = (null != statuses) && statuses.hasValidatedServer();
+ final boolean strictMode = privateDnsCfg.inStrictMode();
+ final String tlsHostname = strictMode ? privateDnsCfg.hostname : null;
+ final boolean usingPrivateDns = strictMode || validated;
+
+ lp.setUsePrivateDns(usingPrivateDns);
+ lp.setPrivateDnsServerName(tlsHostname);
+ if (usingPrivateDns && null != statuses) {
+ statuses.fillInValidatedPrivateDns(lp);
+ } else {
+ lp.setValidatedPrivateDnsServers(Collections.EMPTY_LIST);
+ }
+ }
+
+ public void updatePrivateDnsValidation(PrivateDnsValidationUpdate update) {
+ final PrivateDnsValidationStatuses statuses =
+ mPrivateDnsValidationMap.get(update.netId);
+ if (statuses == null) return;
+ statuses.updateStatus(update);
}
public void setDnsConfigurationForNetwork(
int netId, LinkProperties lp, boolean isDefaultNetwork) {
- // We only use the PrivateDnsConfig data pushed to this class instance
- // from ConnectivityService because it works in coordination with
- // NetworkMonitor to decide which networks need validation and runs the
- // blocking calls to resolve Private DNS strict mode hostnames.
- //
- // At this time we do attempt to enable Private DNS on non-Internet
- // networks like IMS.
- final PrivateDnsConfig privateDnsCfg = mPrivateDnsMap.get(netId);
-
- final boolean useTls = (privateDnsCfg != null) && privateDnsCfg.useTls;
- final boolean strictMode = (privateDnsCfg != null) && privateDnsCfg.inStrictMode();
- final String tlsHostname = strictMode ? privateDnsCfg.hostname : "";
-
- final String[] serverStrs = NetworkUtils.makeStrings(
- strictMode ? Arrays.stream(privateDnsCfg.ips)
- .filter((ip) -> lp.isReachable(ip))
- .collect(Collectors.toList())
- : lp.getDnsServers());
+ final String[] assignedServers = NetworkUtils.makeStrings(lp.getDnsServers());
final String[] domainStrs = getDomainStrings(lp.getDomains());
updateParametersSettings();
final int[] params = { mSampleValidity, mSuccessThreshold, mMinSamples, mMaxSamples };
+ // We only use the PrivateDnsConfig data pushed to this class instance
+ // from ConnectivityService because it works in coordination with
+ // NetworkMonitor to decide which networks need validation and runs the
+ // blocking calls to resolve Private DNS strict mode hostnames.
+ //
+ // At this time we do not attempt to enable Private DNS on non-Internet
+ // networks like IMS.
+ final PrivateDnsConfig privateDnsCfg = mPrivateDnsMap.getOrDefault(netId,
+ PRIVATE_DNS_OFF);
+
+ final boolean useTls = privateDnsCfg.useTls;
+ final boolean strictMode = privateDnsCfg.inStrictMode();
+ final String tlsHostname = strictMode ? privateDnsCfg.hostname : "";
+ final String[] tlsServers =
+ strictMode ? NetworkUtils.makeStrings(
+ Arrays.stream(privateDnsCfg.ips)
+ .filter((ip) -> lp.isReachable(ip))
+ .collect(Collectors.toList()))
+ : useTls ? assignedServers // Opportunistic
+ : new String[0]; // Off
+
+ // Prepare to track the validation status of the DNS servers in the
+ // resolver config when private DNS is in opportunistic or strict mode.
+ if (useTls) {
+ if (!mPrivateDnsValidationMap.containsKey(netId)) {
+ mPrivateDnsValidationMap.put(netId, new PrivateDnsValidationStatuses());
+ }
+ mPrivateDnsValidationMap.get(netId).updateTrackedDnses(tlsServers, tlsHostname);
+ } else {
+ mPrivateDnsValidationMap.remove(netId);
+ }
+
Slog.d(TAG, String.format("setDnsConfigurationForNetwork(%d, %s, %s, %s, %s, %s)",
- netId, Arrays.toString(serverStrs), Arrays.toString(domainStrs),
- Arrays.toString(params), useTls, tlsHostname));
+ netId, Arrays.toString(assignedServers), Arrays.toString(domainStrs),
+ Arrays.toString(params), tlsHostname, Arrays.toString(tlsServers)));
try {
mNMS.setDnsConfigurationForNetwork(
- netId, serverStrs, domainStrs, params, useTls, tlsHostname);
+ netId, assignedServers, domainStrs, params, tlsHostname, tlsServers);
} catch (Exception e) {
Slog.e(TAG, "Error setting DNS configuration: " + e);
return;
diff --git a/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java b/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java
index f427819..ac74598 100644
--- a/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java
+++ b/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java
@@ -20,6 +20,7 @@
import android.net.ConnectivityMetricsEvent;
import android.net.IIpConnectivityMetrics;
import android.net.INetdEventCallback;
+import android.net.ip.IpClient;
import android.net.metrics.ApfProgramEvent;
import android.net.metrics.IpConnectivityLog;
import android.os.Binder;
@@ -269,10 +270,12 @@
// Dump the rolling buffer of metrics event and pretty print events using a human readable
// format. Also print network dns/connect statistics and default network event time series.
static final String CMD_LIST = "list";
- // By default any other argument will fall into the default case which is remapped to the
- // "list" command. This includes most notably bug reports collected by dumpsys.cpp with
- // the "-a" argument.
- static final String CMD_DEFAULT = CMD_LIST;
+ // Dump all IpClient logs ("ipclient").
+ static final String CMD_IPCLIENT = IpClient.DUMP_ARG;
+ // By default any other argument will fall into the default case which is the equivalent
+ // of calling both the "list" and "ipclient" commands. This includes most notably bug
+ // reports collected by dumpsys.cpp with the "-a" argument.
+ static final String CMD_DEFAULT = "";
@Override
public int logEvent(ConnectivityMetricsEvent event) {
@@ -292,9 +295,20 @@
case CMD_PROTO:
cmdListAsProto(pw);
return;
- case CMD_LIST: // fallthrough
+ case CMD_IPCLIENT: {
+ final String[] ipclientArgs = ((args != null) && (args.length > 1))
+ ? Arrays.copyOfRange(args, 1, args.length)
+ : null;
+ IpClient.dumpAllLogs(pw, ipclientArgs);
+ return;
+ }
+ case CMD_LIST:
+ cmdList(pw);
+ return;
default:
cmdList(pw);
+ pw.println("");
+ IpClient.dumpAllLogs(pw, null);
return;
}
}
diff --git a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
index 9e1f6b8..0f8fc17 100644
--- a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
+++ b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
@@ -18,10 +18,10 @@
import com.android.internal.util.HexDump;
import com.android.internal.util.IndentingPrintWriter;
-import com.android.server.connectivity.KeepalivePacketData;
import com.android.server.connectivity.NetworkAgentInfo;
import android.net.ConnectivityManager;
import android.net.ConnectivityManager.PacketKeepalive;
+import android.net.KeepalivePacketData;
import android.net.LinkAddress;
import android.net.NetworkAgent;
import android.net.NetworkUtils;
@@ -129,7 +129,7 @@
.append("->")
.append(IpUtils.addressAndPortToString(mPacket.dstAddress, mPacket.dstPort))
.append(" interval=" + mInterval)
- .append(" data=" + HexDump.toHexString(mPacket.data))
+ .append(" packetData=" + HexDump.toHexString(mPacket.getPacket()))
.append(" uid=").append(mUid).append(" pid=").append(mPid)
.append(" ]")
.toString();
@@ -172,7 +172,7 @@
}
private int checkInterval() {
- return mInterval >= 20 ? SUCCESS : ERROR_INVALID_INTERVAL;
+ return mInterval >= MIN_INTERVAL ? SUCCESS : ERROR_INVALID_INTERVAL;
}
private int isValid() {
diff --git a/services/core/java/com/android/server/connectivity/Nat464Xlat.java b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
index fceacba..f523d59 100644
--- a/services/core/java/com/android/server/connectivity/Nat464Xlat.java
+++ b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
@@ -224,15 +224,14 @@
}
/**
- * Copies the stacked clat link in oldLp, if any, to the LinkProperties in mNetwork.
+ * Copies the stacked clat link in oldLp, if any, to the passed LinkProperties.
* This is necessary because the LinkProperties in mNetwork come from the transport layer, which
* has no idea that 464xlat is running on top of it.
*/
- public void fixupLinkProperties(LinkProperties oldLp) {
+ public void fixupLinkProperties(LinkProperties oldLp, LinkProperties lp) {
if (!isRunning()) {
return;
}
- LinkProperties lp = mNetwork.linkProperties;
if (lp == null || lp.getAllInterfaceNames().contains(mIface)) {
return;
}
diff --git a/services/core/java/com/android/server/connectivity/NetdEventListenerService.java b/services/core/java/com/android/server/connectivity/NetdEventListenerService.java
index 25b52da..2d50dd5 100644
--- a/services/core/java/com/android/server/connectivity/NetdEventListenerService.java
+++ b/services/core/java/com/android/server/connectivity/NetdEventListenerService.java
@@ -101,9 +101,12 @@
/**
- * There are only 2 possible callbacks.
+ * There are only 3 possible callbacks.
*
- * mNetdEventCallbackList[CALLBACK_CALLER_DEVICE_POLICY].
+ * mNetdEventCallbackList[CALLBACK_CALLER_CONNECTIVITY_SERVICE]
+ * Callback registered/unregistered by ConnectivityService.
+ *
+ * mNetdEventCallbackList[CALLBACK_CALLER_DEVICE_POLICY]
* Callback registered/unregistered when logging is being enabled/disabled in DPM
* by the device owner. It's DevicePolicyManager's responsibility to ensure that.
*
@@ -112,6 +115,7 @@
*/
@GuardedBy("this")
private static final int[] ALLOWED_CALLBACK_TYPES = {
+ INetdEventCallback.CALLBACK_CALLER_CONNECTIVITY_SERVICE,
INetdEventCallback.CALLBACK_CALLER_DEVICE_POLICY,
INetdEventCallback.CALLBACK_CALLER_NETWORK_WATCHLIST
};
@@ -211,6 +215,19 @@
@Override
// Called concurrently by multiple binder threads.
// This method must not block or perform long-running operations.
+ public synchronized void onPrivateDnsValidationEvent(int netId,
+ String ipAddress, String hostname, boolean validated)
+ throws RemoteException {
+ for (INetdEventCallback callback : mNetdEventCallbackList) {
+ if (callback != null) {
+ callback.onPrivateDnsValidationEvent(netId, ipAddress, hostname, validated);
+ }
+ }
+ }
+
+ @Override
+ // Called concurrently by multiple binder threads.
+ // This method must not block or perform long-running operations.
public synchronized void onConnectEvent(int netId, int error, int latencyMs, String ipAddr,
int port, int uid) throws RemoteException {
long timestamp = System.currentTimeMillis();
@@ -252,6 +269,29 @@
addWakeupEvent(event);
}
+ @Override
+ public synchronized void onTcpSocketStatsEvent(int[] networkIds,
+ int[] sentPackets, int[] lostPackets, int[] rttsUs, int[] sentAckDiffsMs) {
+ if (networkIds.length != sentPackets.length
+ || networkIds.length != lostPackets.length
+ || networkIds.length != rttsUs.length
+ || networkIds.length != sentAckDiffsMs.length) {
+ Log.e(TAG, "Mismatched lengths of TCP socket stats data arrays");
+ return;
+ }
+
+ long timestamp = System.currentTimeMillis();
+ for (int i = 0; i < networkIds.length; i++) {
+ int netId = networkIds[i];
+ int sent = sentPackets[i];
+ int lost = lostPackets[i];
+ int rttUs = rttsUs[i];
+ int sentAckDiffMs = sentAckDiffsMs[i];
+ getMetricsForNetwork(timestamp, netId)
+ .addTcpStatsResult(sent, lost, rttUs, sentAckDiffMs);
+ }
+ }
+
private void addWakeupEvent(WakeupEvent event) {
String iface = event.iface;
mWakeupEvents.append(event);
diff --git a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
index a4d7242..505480e 100644
--- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
+++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
@@ -223,14 +223,6 @@
// This represents the last score received from the NetworkAgent.
private int currentScore;
- // Penalty applied to scores of Networks that have not been validated.
- private static final int UNVALIDATED_SCORE_PENALTY = 40;
-
- // Score for explicitly connected network.
- //
- // This ensures that a) the explicitly selected network is never trumped by anything else, and
- // b) the explicitly selected network is never torn down.
- private static final int MAXIMUM_NETWORK_SCORE = 100;
// The list of NetworkRequests being satisfied by this Network.
private final SparseArray<NetworkRequest> mNetworkRequests = new SparseArray<>();
@@ -293,7 +285,6 @@
int delta = add ? +1 : -1;
switch (request.type) {
case REQUEST:
- case TRACK_DEFAULT:
mNumRequestNetworkRequests += delta;
break;
@@ -302,6 +293,7 @@
mNumBackgroundNetworkRequests += delta;
break;
+ case TRACK_DEFAULT:
case LISTEN:
break;
@@ -392,12 +384,24 @@
/**
* Returns whether the network is a background network. A network is a background network if it
- * is satisfying no foreground requests and at least one background request. (If it did not have
- * a background request, it would be a speculative network that is only being kept up because
- * it might satisfy a request if it validated).
+ * does not have the NET_CAPABILITY_FOREGROUND capability, which implies it is satisfying no
+ * foreground request, is not lingering (i.e. kept for a while after being outscored), and is
+ * not a speculative network (i.e. kept pending validation when validation would have it
+ * outscore another foreground network). That implies it is being kept up by some background
+ * request (otherwise it would be torn down), maybe the mobile always-on request.
*/
public boolean isBackgroundNetwork() {
- return !isVPN() && numForegroundNetworkRequests() == 0 && mNumBackgroundNetworkRequests > 0;
+ return !isVPN() && numForegroundNetworkRequests() == 0 && mNumBackgroundNetworkRequests > 0
+ && !isLingering();
+ }
+
+ /**
+ * Returns whether this network is currently suspended. A network is suspended if it is still
+ * connected but data temporarily fails to transfer. See {@link NetworkInfo.State#SUSPENDED}
+ * and {@link NetworkCapabilities#NET_CAPABILITY_NOT_SUSPENDED}.
+ */
+ public boolean isSuspended() {
+ return networkInfo.getState() == NetworkInfo.State.SUSPENDED;
}
// Does this network satisfy request?
@@ -428,12 +432,12 @@
// down an explicitly selected network before the user gets a chance to prefer it when
// a higher-scoring network (e.g., Ethernet) is available.
if (networkMisc.explicitlySelected && (networkMisc.acceptUnvalidated || pretendValidated)) {
- return MAXIMUM_NETWORK_SCORE;
+ return ConnectivityConstants.MAXIMUM_NETWORK_SCORE;
}
int score = currentScore;
if (!lastValidated && !pretendValidated && !ignoreWifiUnvalidationPenalty()) {
- score -= UNVALIDATED_SCORE_PENALTY;
+ score -= ConnectivityConstants.UNVALIDATED_SCORE_PENALTY;
}
if (score < 0) score = 0;
return score;
@@ -466,7 +470,7 @@
public NetworkState getNetworkState() {
synchronized (this) {
- // Network objects are outwardly immutable so there is no point to duplicating.
+ // Network objects are outwardly immutable so there is no point in duplicating.
// Duplicating also precludes sharing socket factories and connection pools.
final String subscriberId = (networkMisc != null) ? networkMisc.subscriberId : null;
return new NetworkState(new NetworkInfo(networkInfo),
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
index 85d1d1e..c471f0c 100644
--- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
+++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
@@ -24,6 +24,7 @@
import android.net.NetworkUtils;
import android.net.RouteInfo;
import android.net.TrafficStats;
+import android.net.util.NetworkConstants;
import android.os.SystemClock;
import android.system.ErrnoException;
import android.system.Os;
@@ -421,8 +422,6 @@
private class IcmpCheck extends SimpleSocketCheck implements Runnable {
private static final int TIMEOUT_SEND = 100;
private static final int TIMEOUT_RECV = 300;
- private static final int ICMPV4_ECHO_REQUEST = 8;
- private static final int ICMPV6_ECHO_REQUEST = 128;
private static final int PACKET_BUFSIZE = 512;
private final int mProtocol;
private final int mIcmpType;
@@ -432,11 +431,11 @@
if (mAddressFamily == AF_INET6) {
mProtocol = IPPROTO_ICMPV6;
- mIcmpType = ICMPV6_ECHO_REQUEST;
+ mIcmpType = NetworkConstants.ICMPV6_ECHO_REQUEST_TYPE;
mMeasurement.description = "ICMPv6";
} else {
mProtocol = IPPROTO_ICMP;
- mIcmpType = ICMPV4_ECHO_REQUEST;
+ mIcmpType = NetworkConstants.ICMPV4_ECHO_REQUEST_TYPE;
mMeasurement.description = "ICMPv4";
}
@@ -504,7 +503,6 @@
private class DnsUdpCheck extends SimpleSocketCheck implements Runnable {
private static final int TIMEOUT_SEND = 100;
private static final int TIMEOUT_RECV = 500;
- private static final int DNS_SERVER_PORT = 53;
private static final int RR_TYPE_A = 1;
private static final int RR_TYPE_AAAA = 28;
private static final int PACKET_BUFSIZE = 512;
@@ -546,7 +544,8 @@
}
try {
- setupSocket(SOCK_DGRAM, IPPROTO_UDP, TIMEOUT_SEND, TIMEOUT_RECV, DNS_SERVER_PORT);
+ setupSocket(SOCK_DGRAM, IPPROTO_UDP, TIMEOUT_SEND, TIMEOUT_RECV,
+ NetworkConstants.DNS_SERVER_PORT);
} catch (ErrnoException | IOException e) {
mMeasurement.recordFailure(e.toString());
return;
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
index ed268581b..9b9a380 100644
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
@@ -19,7 +19,11 @@
import static android.net.CaptivePortal.APP_RETURN_DISMISSED;
import static android.net.CaptivePortal.APP_RETURN_UNWANTED;
import static android.net.CaptivePortal.APP_RETURN_WANTED_AS_IS;
+import static android.net.ConnectivityManager.EXTRA_CAPTIVE_PORTAL_PROBE_SPEC;
+import static android.net.ConnectivityManager.EXTRA_CAPTIVE_PORTAL_URL;
+import static android.net.metrics.ValidationProbeEvent.PROBE_FALLBACK;
+import android.annotation.Nullable;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -34,6 +38,9 @@
import android.net.ProxyInfo;
import android.net.TrafficStats;
import android.net.Uri;
+import android.net.captiveportal.CaptivePortalProbeResult;
+import android.net.captiveportal.CaptivePortalProbeSpec;
+import android.net.dns.ResolvUtil;
import android.net.metrics.IpConnectivityLog;
import android.net.metrics.NetworkEvent;
import android.net.metrics.ValidationProbeEvent;
@@ -61,9 +68,11 @@
import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.ArrayUtils;
import com.android.internal.util.Protocol;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
+import com.android.server.connectivity.DnsManager.PrivateDnsConfig;
import java.io.IOException;
import java.net.HttpURLConnection;
@@ -77,6 +86,7 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Random;
+import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -122,22 +132,6 @@
}
}
- public static final String ACTION_NETWORK_CONDITIONS_MEASURED =
- "android.net.conn.NETWORK_CONDITIONS_MEASURED";
- public static final String EXTRA_CONNECTIVITY_TYPE = "extra_connectivity_type";
- public static final String EXTRA_NETWORK_TYPE = "extra_network_type";
- public static final String EXTRA_RESPONSE_RECEIVED = "extra_response_received";
- public static final String EXTRA_IS_CAPTIVE_PORTAL = "extra_is_captive_portal";
- public static final String EXTRA_CELL_ID = "extra_cellid";
- public static final String EXTRA_SSID = "extra_ssid";
- public static final String EXTRA_BSSID = "extra_bssid";
- /** real time since boot */
- public static final String EXTRA_REQUEST_TIMESTAMP_MS = "extra_request_timestamp_ms";
- public static final String EXTRA_RESPONSE_TIMESTAMP_MS = "extra_response_timestamp_ms";
-
- private static final String PERMISSION_ACCESS_NETWORK_CONDITIONS =
- "android.permission.ACCESS_NETWORK_CONDITIONS";
-
// After a network has been tested this result can be sent with EVENT_NETWORK_TESTED.
// The network should be used as a default internet connection. It was found to be:
// 1. a functioning network providing internet access, or
@@ -181,7 +175,7 @@
* Force evaluation even if it has succeeded in the past.
* arg1 = UID responsible for requesting this reeval. Will be billed for data.
*/
- public static final int CMD_FORCE_REEVALUATION = BASE + 8;
+ private static final int CMD_FORCE_REEVALUATION = BASE + 8;
/**
* Message to self indicating captive portal app finished.
@@ -221,9 +215,15 @@
* Private DNS. If a DNS resolution is required, e.g. for DNS-over-TLS in
* strict mode, then an event is sent back to ConnectivityService with the
* result of the resolution attempt.
+ *
+ * A separate message is used to trigger (re)evaluation of the Private DNS
+ * configuration, so that the message can be handled as needed in different
+ * states, including being ignored until after an ongoing captive portal
+ * validation phase is completed.
*/
private static final int CMD_PRIVATE_DNS_SETTINGS_CHANGED = BASE + 13;
public static final int EVENT_PRIVATE_DNS_CONFIG_RESOLVED = BASE + 14;
+ private static final int CMD_EVALUATE_PRIVATE_DNS = BASE + 15;
// Start mReevaluateDelayMs at this value and double.
private static final int INITIAL_REEVALUATE_DELAY_MS = 1000;
@@ -231,6 +231,7 @@
// Before network has been evaluated this many times, ignore repeated reevaluate requests.
private static final int IGNORE_REEVALUATE_ATTEMPTS = 5;
private int mReevaluateToken = 0;
+ private static final int NO_UID = 0;
private static final int INVALID_UID = -1;
private int mUidResponsibleForReeval = INVALID_UID;
// Stop blaming UID that requested re-evaluation after this many attempts.
@@ -240,6 +241,8 @@
private static final int NUM_VALIDATION_LOG_LINES = 20;
+ private String mPrivateDnsProviderHostname = "";
+
public static boolean isValidationRequired(
NetworkCapabilities dfltNetCap, NetworkCapabilities nc) {
// TODO: Consider requiring validation for DUN networks.
@@ -262,6 +265,8 @@
private final URL mCaptivePortalHttpsUrl;
private final URL mCaptivePortalHttpUrl;
private final URL[] mCaptivePortalFallbackUrls;
+ @Nullable
+ private final CaptivePortalProbeSpec[] mCaptivePortalFallbackSpecs;
@VisibleForTesting
protected boolean mIsCaptivePortalCheckEnabled;
@@ -277,13 +282,12 @@
public boolean systemReady = false;
- private DnsManager.PrivateDnsConfig mPrivateDnsCfg = null;
-
private final State mDefaultState = new DefaultState();
private final State mValidatedState = new ValidatedState();
private final State mMaybeNotifyState = new MaybeNotifyState();
private final State mEvaluatingState = new EvaluatingState();
private final State mCaptivePortalState = new CaptivePortalState();
+ private final State mEvaluatingPrivateDnsState = new EvaluatingPrivateDnsState();
private CustomIntentReceiver mLaunchCaptivePortalAppBroadcastReceiver = null;
@@ -309,6 +313,10 @@
// Add suffix indicating which NetworkMonitor we're talking about.
super(TAG + networkAgentInfo.name());
+ // Logs with a tag of the form given just above, e.g.
+ // <timestamp> 862 2402 D NetworkMonitor/NetworkAgentInfo [WIFI () - 100]: ...
+ setDbg(VDBG);
+
mContext = context;
mMetricsLog = logger;
mConnectivityServiceHandler = handler;
@@ -321,10 +329,11 @@
mDefaultRequest = defaultRequest;
addState(mDefaultState);
- addState(mValidatedState, mDefaultState);
addState(mMaybeNotifyState, mDefaultState);
addState(mEvaluatingState, mMaybeNotifyState);
addState(mCaptivePortalState, mMaybeNotifyState);
+ addState(mEvaluatingPrivateDnsState, mDefaultState);
+ addState(mValidatedState, mDefaultState);
setInitialState(mDefaultState);
mIsCaptivePortalCheckEnabled = getIsCaptivePortalCheckEnabled();
@@ -333,10 +342,22 @@
mCaptivePortalHttpsUrl = makeURL(getCaptivePortalServerHttpsUrl());
mCaptivePortalHttpUrl = makeURL(getCaptivePortalServerHttpUrl(settings, context));
mCaptivePortalFallbackUrls = makeCaptivePortalFallbackUrls();
+ mCaptivePortalFallbackSpecs = makeCaptivePortalFallbackProbeSpecs();
start();
}
+ public void forceReevaluation(int responsibleUid) {
+ sendMessage(CMD_FORCE_REEVALUATION, responsibleUid, 0);
+ }
+
+ public void notifyPrivateDnsSettingsChanged(PrivateDnsConfig newCfg) {
+ // Cancel any outstanding resolutions.
+ removeMessages(CMD_PRIVATE_DNS_SETTINGS_CHANGED);
+ // Send the update to the proper thread.
+ sendMessage(CMD_PRIVATE_DNS_SETTINGS_CHANGED, newCfg);
+ }
+
@Override
protected void log(String s) {
if (DBG) Log.d(TAG + "/" + mNetworkAgentInfo.name(), s);
@@ -365,6 +386,12 @@
mDefaultRequest.networkCapabilities, mNetworkAgentInfo.networkCapabilities);
}
+
+ private void notifyNetworkTestResultInvalid(Object obj) {
+ mConnectivityServiceHandler.sendMessage(obtainMessage(
+ EVENT_NETWORK_TESTED, NETWORK_TEST_RESULT_INVALID, mNetId, obj));
+ }
+
// DefaultState is the parent of all States. It exists only to handle CMD_* messages but
// does not entail any real state (hence no enter() or exit() routines).
private class DefaultState extends State {
@@ -408,41 +435,66 @@
switch (message.arg1) {
case APP_RETURN_DISMISSED:
- sendMessage(CMD_FORCE_REEVALUATION, 0 /* no UID */, 0);
+ sendMessage(CMD_FORCE_REEVALUATION, NO_UID, 0);
break;
case APP_RETURN_WANTED_AS_IS:
mDontDisplaySigninNotification = true;
// TODO: Distinguish this from a network that actually validates.
- // Displaying the "!" on the system UI icon may still be a good idea.
- transitionTo(mValidatedState);
+ // Displaying the "x" on the system UI icon may still be a good idea.
+ transitionTo(mEvaluatingPrivateDnsState);
break;
case APP_RETURN_UNWANTED:
mDontDisplaySigninNotification = true;
mUserDoesNotWant = true;
- mConnectivityServiceHandler.sendMessage(obtainMessage(
- EVENT_NETWORK_TESTED, NETWORK_TEST_RESULT_INVALID,
- mNetId, null));
+ notifyNetworkTestResultInvalid(null);
// TODO: Should teardown network.
mUidResponsibleForReeval = 0;
transitionTo(mEvaluatingState);
break;
}
return HANDLED;
- case CMD_PRIVATE_DNS_SETTINGS_CHANGED:
- if (isValidationRequired()) {
- // This performs a blocking DNS resolution of the
- // strict mode hostname, if required.
- resolvePrivateDnsConfig((DnsManager.PrivateDnsConfig) message.obj);
- if ((mPrivateDnsCfg != null) && mPrivateDnsCfg.inStrictMode()) {
- mConnectivityServiceHandler.sendMessage(obtainMessage(
- EVENT_PRIVATE_DNS_CONFIG_RESOLVED, 0, mNetId,
- new DnsManager.PrivateDnsConfig(mPrivateDnsCfg)));
- }
+ case CMD_PRIVATE_DNS_SETTINGS_CHANGED: {
+ final PrivateDnsConfig cfg = (PrivateDnsConfig) message.obj;
+ if (!isValidationRequired() || cfg == null || !cfg.inStrictMode()) {
+ // No DNS resolution required.
+ //
+ // We don't force any validation in opportunistic mode
+ // here. Opportunistic mode nameservers are validated
+ // separately within netd.
+ //
+ // Reset Private DNS settings state.
+ mPrivateDnsProviderHostname = "";
+ break;
}
- return HANDLED;
+
+ mPrivateDnsProviderHostname = cfg.hostname;
+
+ // DNS resolutions via Private DNS strict mode block for a
+ // few seconds (~4.2) checking for any IP addresses to
+ // arrive and validate. Initiating a (re)evaluation now
+ // should not significantly alter the validation outcome.
+ //
+ // No matter what: enqueue a validation request; one of
+ // three things can happen with this request:
+ // [1] ignored (EvaluatingState or CaptivePortalState)
+ // [2] transition to EvaluatingPrivateDnsState
+ // (DefaultState and ValidatedState)
+ // [3] handled (EvaluatingPrivateDnsState)
+ //
+ // The Private DNS configuration to be evaluated will:
+ // [1] be skipped (not in strict mode), or
+ // [2] validate (huzzah), or
+ // [3] encounter some problem (invalid hostname,
+ // no resolved IP addresses, IPs unreachable,
+ // port 853 unreachable, port 853 is not running a
+ // DNS-over-TLS server, et cetera).
+ sendMessage(CMD_EVALUATE_PRIVATE_DNS);
+ break;
+ }
default:
- return HANDLED;
+ break;
}
+ return HANDLED;
}
}
@@ -456,7 +508,7 @@
maybeLogEvaluationResult(
networkEventType(validationStage(), EvaluationResult.VALIDATED));
mConnectivityServiceHandler.sendMessage(obtainMessage(EVENT_NETWORK_TESTED,
- NETWORK_TEST_RESULT_VALID, mNetId, mPrivateDnsCfg));
+ NETWORK_TEST_RESULT_VALID, mNetId, null));
mValidations++;
}
@@ -465,10 +517,14 @@
switch (message.what) {
case CMD_NETWORK_CONNECTED:
transitionTo(mValidatedState);
- return HANDLED;
+ break;
+ case CMD_EVALUATE_PRIVATE_DNS:
+ transitionTo(mEvaluatingPrivateDnsState);
+ break;
default:
return NOT_HANDLED;
}
+ return HANDLED;
}
}
@@ -495,8 +551,12 @@
sendMessage(CMD_CAPTIVE_PORTAL_APP_FINISHED, response);
}
}));
- intent.putExtra(ConnectivityManager.EXTRA_CAPTIVE_PORTAL_URL,
- mLastPortalProbeResult.detectUrl);
+ final CaptivePortalProbeResult probeRes = mLastPortalProbeResult;
+ intent.putExtra(EXTRA_CAPTIVE_PORTAL_URL, probeRes.detectUrl);
+ if (probeRes.probeSpec != null) {
+ final String encodedSpec = probeRes.probeSpec.getEncodedSpec();
+ intent.putExtra(EXTRA_CAPTIVE_PORTAL_PROBE_SPEC, encodedSpec);
+ }
intent.putExtra(ConnectivityManager.EXTRA_CAPTIVE_PORTAL_USER_AGENT,
mCaptivePortalUserAgent);
intent.setFlags(
@@ -515,47 +575,6 @@
}
}
- /**
- * Result of calling isCaptivePortal().
- * @hide
- */
- @VisibleForTesting
- public static final class CaptivePortalProbeResult {
- static final int SUCCESS_CODE = 204;
- static final int FAILED_CODE = 599;
-
- static final CaptivePortalProbeResult FAILED = new CaptivePortalProbeResult(FAILED_CODE);
- static final CaptivePortalProbeResult SUCCESS = new CaptivePortalProbeResult(SUCCESS_CODE);
-
- private final int mHttpResponseCode; // HTTP response code returned from Internet probe.
- final String redirectUrl; // Redirect destination returned from Internet probe.
- final String detectUrl; // URL where a 204 response code indicates
- // captive portal has been appeased.
-
- public CaptivePortalProbeResult(
- int httpResponseCode, String redirectUrl, String detectUrl) {
- mHttpResponseCode = httpResponseCode;
- this.redirectUrl = redirectUrl;
- this.detectUrl = detectUrl;
- }
-
- public CaptivePortalProbeResult(int httpResponseCode) {
- this(httpResponseCode, null, null);
- }
-
- boolean isSuccessful() {
- return mHttpResponseCode == SUCCESS_CODE;
- }
-
- boolean isPortal() {
- return !isSuccessful() && (mHttpResponseCode >= 200) && (mHttpResponseCode <= 399);
- }
-
- boolean isFailed() {
- return !isSuccessful() && !isPortal();
- }
- }
-
// Being in the EvaluatingState State indicates the Network is being evaluated for internet
// connectivity, or that the user has indicated that this network is unwanted.
private class EvaluatingState extends State {
@@ -585,11 +604,11 @@
case CMD_REEVALUATE:
if (message.arg1 != mReevaluateToken || mUserDoesNotWant)
return HANDLED;
- // Don't bother validating networks that don't satisify the default request.
+ // Don't bother validating networks that don't satisfy the default request.
// This includes:
// - VPNs which can be considered explicitly desired by the user and the
// user's desire trumps whether the network validates.
- // - Networks that don't provide internet access. It's unclear how to
+ // - Networks that don't provide Internet access. It's unclear how to
// validate such networks.
// - Untrusted networks. It's unsafe to prompt the user to sign-in to
// such networks and the user didn't express interest in connecting to
@@ -604,7 +623,6 @@
// expensive metered network, or unwanted leaking of the User Agent string.
if (!isValidationRequired()) {
validationLog("Network would not satisfy default request, not validating");
- mPrivateDnsCfg = null;
transitionTo(mValidatedState);
return HANDLED;
}
@@ -617,20 +635,18 @@
// if this is found to cause problems.
CaptivePortalProbeResult probeResult = isCaptivePortal();
if (probeResult.isSuccessful()) {
- resolvePrivateDnsConfig();
- transitionTo(mValidatedState);
+ // Transit EvaluatingPrivateDnsState to get to Validated
+ // state (even if no Private DNS validation required).
+ transitionTo(mEvaluatingPrivateDnsState);
} else if (probeResult.isPortal()) {
- mConnectivityServiceHandler.sendMessage(obtainMessage(EVENT_NETWORK_TESTED,
- NETWORK_TEST_RESULT_INVALID, mNetId, probeResult.redirectUrl));
+ notifyNetworkTestResultInvalid(probeResult.redirectUrl);
mLastPortalProbeResult = probeResult;
transitionTo(mCaptivePortalState);
} else {
final Message msg = obtainMessage(CMD_REEVALUATE, ++mReevaluateToken, 0);
sendMessageDelayed(msg, mReevaluateDelayMs);
logNetworkEvent(NetworkEvent.NETWORK_VALIDATION_FAILED);
- mConnectivityServiceHandler.sendMessage(obtainMessage(
- EVENT_NETWORK_TESTED, NETWORK_TEST_RESULT_INVALID, mNetId,
- probeResult.redirectUrl));
+ notifyNetworkTestResultInvalid(probeResult.redirectUrl);
if (mAttempts >= BLAME_FOR_EVALUATION_ATTEMPTS) {
// Don't continue to blame UID forever.
TrafficStats.clearThreadStatsUid();
@@ -716,6 +732,111 @@
}
}
+ private class EvaluatingPrivateDnsState extends State {
+ private int mPrivateDnsReevalDelayMs;
+ private PrivateDnsConfig mPrivateDnsConfig;
+
+ @Override
+ public void enter() {
+ mPrivateDnsReevalDelayMs = INITIAL_REEVALUATE_DELAY_MS;
+ mPrivateDnsConfig = null;
+ sendMessage(CMD_EVALUATE_PRIVATE_DNS);
+ }
+
+ @Override
+ public boolean processMessage(Message msg) {
+ switch (msg.what) {
+ case CMD_EVALUATE_PRIVATE_DNS:
+ if (inStrictMode()) {
+ if (!isStrictModeHostnameResolved()) {
+ resolveStrictModeHostname();
+
+ if (isStrictModeHostnameResolved()) {
+ notifyPrivateDnsConfigResolved();
+ } else {
+ handlePrivateDnsEvaluationFailure();
+ break;
+ }
+ }
+
+ // Look up a one-time hostname, to bypass caching.
+ //
+ // Note that this will race with ConnectivityService
+ // code programming the DNS-over-TLS server IP addresses
+ // into netd (if invoked, above). If netd doesn't know
+ // the IP addresses yet, or if the connections to the IP
+ // addresses haven't yet been validated, netd will block
+ // for up to a few seconds before failing the lookup.
+ if (!sendPrivateDnsProbe()) {
+ handlePrivateDnsEvaluationFailure();
+ break;
+ }
+ }
+
+ // All good!
+ transitionTo(mValidatedState);
+ break;
+ default:
+ return NOT_HANDLED;
+ }
+ return HANDLED;
+ }
+
+ private boolean inStrictMode() {
+ return !TextUtils.isEmpty(mPrivateDnsProviderHostname);
+ }
+
+ private boolean isStrictModeHostnameResolved() {
+ return (mPrivateDnsConfig != null) &&
+ mPrivateDnsConfig.hostname.equals(mPrivateDnsProviderHostname) &&
+ (mPrivateDnsConfig.ips.length > 0);
+ }
+
+ private void resolveStrictModeHostname() {
+ try {
+ // Do a blocking DNS resolution using the network-assigned nameservers.
+ // Do not set AI_ADDRCONFIG in ai_flags so we get all address families in advance.
+ final InetAddress[] ips = ResolvUtil.blockingResolveAllLocally(
+ mNetwork, mPrivateDnsProviderHostname, 0 /* aiFlags */);
+ mPrivateDnsConfig = new PrivateDnsConfig(mPrivateDnsProviderHostname, ips);
+ } catch (UnknownHostException uhe) {
+ mPrivateDnsConfig = null;
+ }
+ }
+
+ private void notifyPrivateDnsConfigResolved() {
+ mConnectivityServiceHandler.sendMessage(obtainMessage(
+ EVENT_PRIVATE_DNS_CONFIG_RESOLVED, 0, mNetId, mPrivateDnsConfig));
+ }
+
+ private void handlePrivateDnsEvaluationFailure() {
+ notifyNetworkTestResultInvalid(null);
+
+ // Queue up a re-evaluation with backoff.
+ //
+ // TODO: Consider abandoning this state after a few attempts and
+ // transitioning back to EvaluatingState, to perhaps give ourselves
+ // the opportunity to (re)detect a captive portal or something.
+ sendMessageDelayed(CMD_EVALUATE_PRIVATE_DNS, mPrivateDnsReevalDelayMs);
+ mPrivateDnsReevalDelayMs *= 2;
+ if (mPrivateDnsReevalDelayMs > MAX_REEVALUATE_DELAY_MS) {
+ mPrivateDnsReevalDelayMs = MAX_REEVALUATE_DELAY_MS;
+ }
+ }
+
+ private boolean sendPrivateDnsProbe() {
+ // q.v. system/netd/server/dns/DnsTlsTransport.cpp
+ final String ONE_TIME_HOSTNAME_SUFFIX = "-dnsotls-ds.metric.gstatic.com";
+ final String host = UUID.randomUUID().toString().substring(0, 8) +
+ ONE_TIME_HOSTNAME_SUFFIX;
+ try {
+ final InetAddress[] ips = mNetworkAgentInfo.network().getAllByName(host);
+ return (ips != null && ips.length > 0);
+ } catch (UnknownHostException uhe) {}
+ return false;
+ }
+ }
+
// Limits the list of IP addresses returned by getAllByName or tried by openConnection to at
// most one per address family. This ensures we only wait up to 20 seconds for TCP connections
// to complete, regardless of how many IP addresses a host has.
@@ -726,7 +847,9 @@
@Override
public InetAddress[] getAllByName(String host) throws UnknownHostException {
- List<InetAddress> addrs = Arrays.asList(super.getAllByName(host));
+ // Always bypass Private DNS.
+ final List<InetAddress> addrs = Arrays.asList(
+ ResolvUtil.blockingResolveAllLocally(this, host));
// Ensure the address family of the first address is tried first.
LinkedHashMap<Class, InetAddress> addressByFamily = new LinkedHashMap<>();
@@ -773,23 +896,47 @@
}
private URL[] makeCaptivePortalFallbackUrls() {
- String separator = ",";
- String firstUrl = mSettings.getSetting(mContext,
- Settings.Global.CAPTIVE_PORTAL_FALLBACK_URL, DEFAULT_FALLBACK_URL);
- String joinedUrls = firstUrl + separator + mSettings.getSetting(mContext,
- Settings.Global.CAPTIVE_PORTAL_OTHER_FALLBACK_URLS, DEFAULT_OTHER_FALLBACK_URLS);
- List<URL> urls = new ArrayList<>();
- for (String s : joinedUrls.split(separator)) {
- URL u = makeURL(s);
- if (u == null) {
- continue;
+ try {
+ String separator = ",";
+ String firstUrl = mSettings.getSetting(mContext,
+ Settings.Global.CAPTIVE_PORTAL_FALLBACK_URL, DEFAULT_FALLBACK_URL);
+ String joinedUrls = firstUrl + separator + mSettings.getSetting(mContext,
+ Settings.Global.CAPTIVE_PORTAL_OTHER_FALLBACK_URLS,
+ DEFAULT_OTHER_FALLBACK_URLS);
+ List<URL> urls = new ArrayList<>();
+ for (String s : joinedUrls.split(separator)) {
+ URL u = makeURL(s);
+ if (u == null) {
+ continue;
+ }
+ urls.add(u);
}
- urls.add(u);
+ if (urls.isEmpty()) {
+ Log.e(TAG, String.format("could not create any url from %s", joinedUrls));
+ }
+ return urls.toArray(new URL[urls.size()]);
+ } catch (Exception e) {
+ // Don't let a misconfiguration bootloop the system.
+ Log.e(TAG, "Error parsing configured fallback URLs", e);
+ return new URL[0];
}
- if (urls.isEmpty()) {
- Log.e(TAG, String.format("could not create any url from %s", joinedUrls));
+ }
+
+ private CaptivePortalProbeSpec[] makeCaptivePortalFallbackProbeSpecs() {
+ try {
+ final String settingsValue = mSettings.getSetting(
+ mContext, Settings.Global.CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS, null);
+ // Probe specs only used if configured in settings
+ if (TextUtils.isEmpty(settingsValue)) {
+ return null;
+ }
+
+ return CaptivePortalProbeSpec.parseCaptivePortalProbeSpecs(settingsValue);
+ } catch (Exception e) {
+ // Don't let a misconfiguration bootloop the system.
+ Log.e(TAG, "Error parsing configured fallback probe specs", e);
+ return null;
}
- return urls.toArray(new URL[urls.size()]);
}
private String getCaptivePortalUserAgent() {
@@ -806,6 +953,15 @@
return mCaptivePortalFallbackUrls[idx];
}
+ private CaptivePortalProbeSpec nextFallbackSpec() {
+ if (ArrayUtils.isEmpty(mCaptivePortalFallbackSpecs)) {
+ return null;
+ }
+ // Randomly change spec without memory. Also randomize the first attempt.
+ final int idx = Math.abs(new Random().nextInt()) % mCaptivePortalFallbackSpecs.length;
+ return mCaptivePortalFallbackSpecs[idx];
+ }
+
@VisibleForTesting
protected CaptivePortalProbeResult isCaptivePortal() {
if (!mIsCaptivePortalCheckEnabled) {
@@ -876,7 +1032,7 @@
// unnecessary resolution.
final String host = (proxy != null) ? proxy.getHost() : url.getHost();
sendDnsProbe(host);
- return sendHttpProbe(url, probeType);
+ return sendHttpProbe(url, probeType, null);
}
/** Do a DNS resolution of the given server. */
@@ -912,7 +1068,8 @@
* @return a CaptivePortalProbeResult inferred from the HTTP response.
*/
@VisibleForTesting
- protected CaptivePortalProbeResult sendHttpProbe(URL url, int probeType) {
+ protected CaptivePortalProbeResult sendHttpProbe(URL url, int probeType,
+ @Nullable CaptivePortalProbeSpec probeSpec) {
HttpURLConnection urlConnection = null;
int httpResponseCode = CaptivePortalProbeResult.FAILED_CODE;
String redirectUrl = null;
@@ -984,7 +1141,12 @@
TrafficStats.setThreadStatsTag(oldTag);
}
logValidationProbe(probeTimer.stop(), probeType, httpResponseCode);
- return new CaptivePortalProbeResult(httpResponseCode, redirectUrl, url.toString());
+
+ if (probeSpec == null) {
+ return new CaptivePortalProbeResult(httpResponseCode, redirectUrl, url.toString());
+ } else {
+ return probeSpec.getResult(httpResponseCode, redirectUrl);
+ }
}
private CaptivePortalProbeResult sendParallelHttpProbes(
@@ -1047,11 +1209,12 @@
if (httpsResult.isPortal() || httpsResult.isSuccessful()) {
return httpsResult;
}
- // If a fallback url exists, use a fallback probe to try again portal detection.
- URL fallbackUrl = nextFallbackUrl();
+ // If a fallback method exists, use it to retry portal detection.
+ // If we have new-style probe specs, use those. Otherwise, use the fallback URLs.
+ final CaptivePortalProbeSpec probeSpec = nextFallbackSpec();
+ final URL fallbackUrl = (probeSpec != null) ? probeSpec.getUrl() : nextFallbackUrl();
if (fallbackUrl != null) {
- CaptivePortalProbeResult result =
- sendHttpProbe(fallbackUrl, ValidationProbeEvent.PROBE_FALLBACK);
+ CaptivePortalProbeResult result = sendHttpProbe(fallbackUrl, PROBE_FALLBACK, probeSpec);
if (result.isPortal()) {
return result;
}
@@ -1081,44 +1244,6 @@
return null;
}
- public void notifyPrivateDnsSettingsChanged(DnsManager.PrivateDnsConfig newCfg) {
- // Cancel any outstanding resolutions.
- removeMessages(CMD_PRIVATE_DNS_SETTINGS_CHANGED);
- // Send the update to the proper thread.
- sendMessage(CMD_PRIVATE_DNS_SETTINGS_CHANGED, newCfg);
- }
-
- private void resolvePrivateDnsConfig() {
- resolvePrivateDnsConfig(DnsManager.getPrivateDnsConfig(mContext.getContentResolver()));
- }
-
- private void resolvePrivateDnsConfig(DnsManager.PrivateDnsConfig cfg) {
- // Nothing to do.
- if (cfg == null) {
- mPrivateDnsCfg = null;
- return;
- }
-
- // No DNS resolution required.
- if (!cfg.inStrictMode()) {
- mPrivateDnsCfg = cfg;
- return;
- }
-
- if ((mPrivateDnsCfg != null) && mPrivateDnsCfg.inStrictMode() &&
- (mPrivateDnsCfg.ips.length > 0) && mPrivateDnsCfg.hostname.equals(cfg.hostname)) {
- // We have already resolved this strict mode hostname. Assume that
- // Private DNS services won't be changing serving IP addresses very
- // frequently and save ourselves one re-resolve.
- return;
- }
-
- mPrivateDnsCfg = cfg;
- final DnsManager.PrivateDnsConfig resolvedCfg = DnsManager.tryBlockingResolveOf(
- mNetwork, mPrivateDnsCfg.hostname);
- if (resolvedCfg != null) mPrivateDnsCfg = resolvedCfg;
- }
-
/**
* @param responseReceived - whether or not we received a valid HTTP response to our request.
* If false, isCaptivePortal and responseTimestampMs are ignored
@@ -1136,7 +1261,8 @@
return;
}
- Intent latencyBroadcast = new Intent(ACTION_NETWORK_CONDITIONS_MEASURED);
+ Intent latencyBroadcast =
+ new Intent(ConnectivityConstants.ACTION_NETWORK_CONDITIONS_MEASURED);
switch (mNetworkAgentInfo.networkInfo.getType()) {
case ConnectivityManager.TYPE_WIFI:
WifiInfo currentWifiInfo = mWifiManager.getConnectionInfo();
@@ -1148,15 +1274,18 @@
// not change it here as it would become impossible to tell whether the SSID is
// simply being surrounded by quotes due to the API, or whether those quotes
// are actually part of the SSID.
- latencyBroadcast.putExtra(EXTRA_SSID, currentWifiInfo.getSSID());
- latencyBroadcast.putExtra(EXTRA_BSSID, currentWifiInfo.getBSSID());
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_SSID,
+ currentWifiInfo.getSSID());
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_BSSID,
+ currentWifiInfo.getBSSID());
} else {
if (VDBG) logw("network info is TYPE_WIFI but no ConnectionInfo found");
return;
}
break;
case ConnectivityManager.TYPE_MOBILE:
- latencyBroadcast.putExtra(EXTRA_NETWORK_TYPE, mTelephonyManager.getNetworkType());
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_NETWORK_TYPE,
+ mTelephonyManager.getNetworkType());
List<CellInfo> info = mTelephonyManager.getAllCellInfo();
if (info == null) return;
int numRegisteredCellInfo = 0;
@@ -1170,16 +1299,16 @@
}
if (cellInfo instanceof CellInfoCdma) {
CellIdentityCdma cellId = ((CellInfoCdma) cellInfo).getCellIdentity();
- latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CELL_ID, cellId);
} else if (cellInfo instanceof CellInfoGsm) {
CellIdentityGsm cellId = ((CellInfoGsm) cellInfo).getCellIdentity();
- latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CELL_ID, cellId);
} else if (cellInfo instanceof CellInfoLte) {
CellIdentityLte cellId = ((CellInfoLte) cellInfo).getCellIdentity();
- latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CELL_ID, cellId);
} else if (cellInfo instanceof CellInfoWcdma) {
CellIdentityWcdma cellId = ((CellInfoWcdma) cellInfo).getCellIdentity();
- latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CELL_ID, cellId);
} else {
if (VDBG) logw("Registered cellinfo is unrecognized");
return;
@@ -1190,16 +1319,21 @@
default:
return;
}
- latencyBroadcast.putExtra(EXTRA_CONNECTIVITY_TYPE, mNetworkAgentInfo.networkInfo.getType());
- latencyBroadcast.putExtra(EXTRA_RESPONSE_RECEIVED, responseReceived);
- latencyBroadcast.putExtra(EXTRA_REQUEST_TIMESTAMP_MS, requestTimestampMs);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CONNECTIVITY_TYPE,
+ mNetworkAgentInfo.networkInfo.getType());
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_RESPONSE_RECEIVED,
+ responseReceived);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_REQUEST_TIMESTAMP_MS,
+ requestTimestampMs);
if (responseReceived) {
- latencyBroadcast.putExtra(EXTRA_IS_CAPTIVE_PORTAL, isCaptivePortal);
- latencyBroadcast.putExtra(EXTRA_RESPONSE_TIMESTAMP_MS, responseTimestampMs);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_IS_CAPTIVE_PORTAL,
+ isCaptivePortal);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_RESPONSE_TIMESTAMP_MS,
+ responseTimestampMs);
}
mContext.sendBroadcastAsUser(latencyBroadcast, UserHandle.CURRENT,
- PERMISSION_ACCESS_NETWORK_CONDITIONS);
+ ConnectivityConstants.PERMISSION_ACCESS_NETWORK_CONDITIONS);
}
private void logNetworkEvent(int evtype) {
diff --git a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java
index 0d935db..36a2476 100644
--- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java
+++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java
@@ -23,8 +23,10 @@
import android.content.Intent;
import android.content.res.Resources;
import android.net.NetworkCapabilities;
+import android.net.wifi.WifiInfo;
import android.os.UserHandle;
import android.telephony.TelephonyManager;
+import android.text.TextUtils;
import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseIntArray;
@@ -130,16 +132,17 @@
final String tag = tagFor(id);
final int eventId = notifyType.eventId;
final int transportType;
- final String extraInfo;
+ final String name;
if (nai != null) {
transportType = getFirstTransportType(nai);
- extraInfo = nai.networkInfo.getExtraInfo();
+ final String extraInfo = nai.networkInfo.getExtraInfo();
+ name = TextUtils.isEmpty(extraInfo) ? nai.networkCapabilities.getSSID() : extraInfo;
// Only notify for Internet-capable networks.
if (!nai.networkCapabilities.hasCapability(NET_CAPABILITY_INTERNET)) return;
} else {
// Legacy notifications.
transportType = TRANSPORT_CELLULAR;
- extraInfo = null;
+ name = null;
}
// Clear any previous notification with lower priority, otherwise return. http://b/63676954.
@@ -156,9 +159,8 @@
if (DBG) {
Slog.d(TAG, String.format(
- "showNotification tag=%s event=%s transport=%s extraInfo=%s highPrioriy=%s",
- tag, nameOf(eventId), getTransportName(transportType), extraInfo,
- highPriority));
+ "showNotification tag=%s event=%s transport=%s name=%s highPriority=%s",
+ tag, nameOf(eventId), getTransportName(transportType), name, highPriority));
}
Resources r = Resources.getSystem();
@@ -176,7 +178,8 @@
switch (transportType) {
case TRANSPORT_WIFI:
title = r.getString(R.string.wifi_available_sign_in, 0);
- details = r.getString(R.string.network_available_sign_in_detailed, extraInfo);
+ details = r.getString(R.string.network_available_sign_in_detailed,
+ WifiInfo.removeDoubleQuotes(nai.networkCapabilities.getSSID()));
break;
case TRANSPORT_CELLULAR:
title = r.getString(R.string.network_available_sign_in, 0);
@@ -186,7 +189,7 @@
break;
default:
title = r.getString(R.string.network_available_sign_in, 0);
- details = r.getString(R.string.network_available_sign_in_detailed, extraInfo);
+ details = r.getString(R.string.network_available_sign_in_detailed, name);
break;
}
} else if (notifyType == NotificationType.NETWORK_SWITCH) {
diff --git a/services/core/java/com/android/server/connectivity/OWNERS b/services/core/java/com/android/server/connectivity/OWNERS
index 6f77e04..ce50558 100644
--- a/services/core/java/com/android/server/connectivity/OWNERS
+++ b/services/core/java/com/android/server/connectivity/OWNERS
@@ -1,7 +1,6 @@
set noparent
ek@google.com
-hugobenichi@google.com
jchalard@google.com
lorenzo@google.com
satk@google.com
diff --git a/services/core/java/com/android/server/connectivity/PacManager.java b/services/core/java/com/android/server/connectivity/PacManager.java
index d56fb1a..c370959 100644
--- a/services/core/java/com/android/server/connectivity/PacManager.java
+++ b/services/core/java/com/android/server/connectivity/PacManager.java
@@ -54,12 +54,12 @@
* @hide
*/
public class PacManager {
- public static final String PAC_PACKAGE = "com.android.pacprocessor";
- public static final String PAC_SERVICE = "com.android.pacprocessor.PacService";
- public static final String PAC_SERVICE_NAME = "com.android.net.IProxyService";
+ private static final String PAC_PACKAGE = "com.android.pacprocessor";
+ private static final String PAC_SERVICE = "com.android.pacprocessor.PacService";
+ private static final String PAC_SERVICE_NAME = "com.android.net.IProxyService";
- public static final String PROXY_PACKAGE = "com.android.proxyhandler";
- public static final String PROXY_SERVICE = "com.android.proxyhandler.ProxyService";
+ private static final String PROXY_PACKAGE = "com.android.proxyhandler";
+ private static final String PROXY_SERVICE = "com.android.proxyhandler.ProxyService";
private static final String TAG = "PacManager";
@@ -71,8 +71,6 @@
private static final int DELAY_LONG = 4;
private static final long MAX_PAC_SIZE = 20 * 1000 * 1000;
- /** Keep these values up-to-date with ProxyService.java */
- public static final String KEY_PROXY = "keyProxy";
private String mCurrentPac;
@GuardedBy("mProxyLock")
private volatile Uri mPacUrl = Uri.EMPTY;
@@ -92,7 +90,7 @@
private volatile boolean mHasDownloaded;
private Handler mConnectivityHandler;
- private int mProxyMessage;
+ private final int mProxyMessage;
/**
* Used for locking when setting mProxyService and all references to mCurrentPac.
@@ -101,7 +99,7 @@
/**
* Runnable to download PAC script.
- * The behavior relies on the assamption it always run on mNetThread to guarantee that the
+ * The behavior relies on the assumption it always runs on mNetThread to guarantee that the
* latest data fetched from mPacUrl is stored in mProxyService.
*/
private Runnable mPacDownloader = new Runnable() {
@@ -135,8 +133,6 @@
}
};
- private final HandlerThread mNetThread = new HandlerThread("android.pacmanager",
- android.os.Process.THREAD_PRIORITY_DEFAULT);
private final Handler mNetThreadHandler;
class PacRefreshIntentReceiver extends BroadcastReceiver {
@@ -148,8 +144,10 @@
public PacManager(Context context, Handler handler, int proxyMessage) {
mContext = context;
mLastPort = -1;
- mNetThread.start();
- mNetThreadHandler = new Handler(mNetThread.getLooper());
+ final HandlerThread netThread = new HandlerThread("android.pacmanager",
+ android.os.Process.THREAD_PRIORITY_DEFAULT);
+ netThread.start();
+ mNetThreadHandler = new Handler(netThread.getLooper());
mPacRefreshIntent = PendingIntent.getBroadcast(
context, 0, new Intent(ACTION_PAC_REFRESH), 0);
@@ -168,14 +166,14 @@
/**
* Updates the PAC Manager with current Proxy information. This is called by
- * the ConnectivityService directly before a broadcast takes place to allow
+ * the ProxyTracker directly before a broadcast takes place to allow
* the PacManager to indicate that the broadcast should not be sent and the
* PacManager will trigger a new broadcast when it is ready.
*
* @param proxy Proxy information that is about to be broadcast.
* @return Returns true when the broadcast should not be sent
*/
- public synchronized boolean setCurrentProxyScriptUrl(ProxyInfo proxy) {
+ synchronized boolean setCurrentProxyScriptUrl(ProxyInfo proxy) {
if (!Uri.EMPTY.equals(proxy.getPacFileUrl())) {
if (proxy.getPacFileUrl().equals(mPacUrl) && (proxy.getPort() > 0)) {
// Allow to send broadcast, nothing to do.
@@ -210,7 +208,7 @@
/**
* Does a post and reports back the status code.
*
- * @throws IOException
+ * @throws IOException if the URL is malformed, or the PAC file is too big.
*/
private static String get(Uri pacUri) throws IOException {
URL url = new URL(pacUri.toString());
@@ -256,7 +254,7 @@
private String getPacChangeDelay() {
final ContentResolver cr = mContext.getContentResolver();
- /** Check system properties for the default value then use secure settings value, if any. */
+ // Check system properties for the default value then use secure settings value, if any.
String defaultDelay = SystemProperties.get(
"conn." + Settings.Global.PAC_CHANGE_DELAY,
DEFAULT_DELAYS);
@@ -278,10 +276,9 @@
getAlarmManager().set(AlarmManager.ELAPSED_REALTIME, timeTillTrigger, mPacRefreshIntent);
}
- private boolean setCurrentProxyScript(String script) {
+ private void setCurrentProxyScript(String script) {
if (mProxyService == null) {
Log.e(TAG, "setCurrentProxyScript: no proxy service");
- return false;
}
try {
mProxyService.setPacFile(script);
@@ -289,7 +286,6 @@
} catch (RemoteException e) {
Log.e(TAG, "Unable to set PAC file", e);
}
- return true;
}
private void bind() {
@@ -353,7 +349,7 @@
try {
callbackService.getProxyPort(new IProxyPortListener.Stub() {
@Override
- public void setProxyPort(int port) throws RemoteException {
+ public void setProxyPort(int port) {
if (mLastPort != -1) {
// Always need to send if port changed
mHasSentBroadcast = false;
diff --git a/services/core/java/com/android/server/connectivity/PermissionMonitor.java b/services/core/java/com/android/server/connectivity/PermissionMonitor.java
index e084ff8..d578e95 100644
--- a/services/core/java/com/android/server/connectivity/PermissionMonitor.java
+++ b/services/core/java/com/android/server/connectivity/PermissionMonitor.java
@@ -19,6 +19,7 @@
import static android.Manifest.permission.CHANGE_NETWORK_STATE;
import static android.Manifest.permission.CONNECTIVITY_INTERNAL;
import static android.Manifest.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS;
+import static android.Manifest.permission.NETWORK_STACK;
import static android.content.pm.ApplicationInfo.FLAG_SYSTEM;
import static android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
import static android.content.pm.PackageManager.GET_PERMISSIONS;
@@ -27,6 +28,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -39,6 +41,8 @@
import android.text.TextUtils;
import android.util.Log;
+import com.android.internal.annotations.VisibleForTesting;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -150,7 +154,14 @@
update(mUsers, mApps, true);
}
- private boolean hasPermission(PackageInfo app, String permission) {
+ @VisibleForTesting
+ boolean isPreinstalledSystemApp(PackageInfo app) {
+ int flags = app.applicationInfo != null ? app.applicationInfo.flags : 0;
+ return (flags & (FLAG_SYSTEM | FLAG_UPDATED_SYSTEM_APP)) != 0;
+ }
+
+ @VisibleForTesting
+ boolean hasPermission(PackageInfo app, String permission) {
if (app.requestedPermissions != null) {
for (String p : app.requestedPermissions) {
if (permission.equals(p)) {
@@ -166,14 +177,40 @@
}
private boolean hasRestrictedNetworkPermission(PackageInfo app) {
- int flags = app.applicationInfo != null ? app.applicationInfo.flags : 0;
- if ((flags & FLAG_SYSTEM) != 0 || (flags & FLAG_UPDATED_SYSTEM_APP) != 0) {
- return true;
- }
+ if (isPreinstalledSystemApp(app)) return true;
return hasPermission(app, CONNECTIVITY_INTERNAL)
|| hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS);
}
+ private boolean hasUseBackgroundNetworksPermission(PackageInfo app) {
+ // This function defines what it means to hold the permission to use
+ // background networks.
+ return hasPermission(app, CHANGE_NETWORK_STATE)
+ || hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS)
+ || hasPermission(app, CONNECTIVITY_INTERNAL)
+ || hasPermission(app, NETWORK_STACK)
+ // TODO : remove this check (b/31479477). Not all preinstalled apps should
+ // have access to background networks, they should just request the appropriate
+ // permission for their use case from the list above.
+ || isPreinstalledSystemApp(app);
+ }
+
+ public boolean hasUseBackgroundNetworksPermission(int uid) {
+ final String[] names = mPackageManager.getPackagesForUid(uid);
+ if (null == names || names.length == 0) return false;
+ try {
+ // Only using the first package name. There may be multiple names if multiple
+ // apps share the same UID, but in that case they also share permissions so
+ // querying with any of the names will return the same results.
+ final PackageInfo app = mPackageManager.getPackageInfo(names[0], GET_PERMISSIONS);
+ return hasUseBackgroundNetworksPermission(app);
+ } catch (NameNotFoundException e) {
+ // App not found.
+ loge("NameNotFoundException " + names[0], e);
+ return false;
+ }
+ }
+
private int[] toIntArray(List<Integer> list) {
int[] array = new int[list.size()];
for (int i = 0; i < list.size(); i++) {
@@ -308,4 +345,8 @@
private static void loge(String s) {
Log.e(TAG, s);
}
+
+ private static void loge(String s, Throwable e) {
+ Log.e(TAG, s, e);
+ }
}
diff --git a/services/core/java/com/android/server/connectivity/ProxyTracker.java b/services/core/java/com/android/server/connectivity/ProxyTracker.java
new file mode 100644
index 0000000..dc65e1e
--- /dev/null
+++ b/services/core/java/com/android/server/connectivity/ProxyTracker.java
@@ -0,0 +1,256 @@
+/**
+ * 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.
+ */
+
+package com.android.server.connectivity;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Proxy;
+import android.net.ProxyInfo;
+import android.net.Uri;
+import android.os.Binder;
+import android.os.Handler;
+import android.os.UserHandle;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.util.Slog;
+
+import com.android.internal.annotations.GuardedBy;
+
+import java.util.Objects;
+
+/**
+ * A class to handle proxy for ConnectivityService.
+ *
+ * @hide
+ */
+public class ProxyTracker {
+ private static final String TAG = ProxyTracker.class.getSimpleName();
+ private static final boolean DBG = true;
+
+ @NonNull
+ private final Context mContext;
+
+ // TODO : make this private and import as much managing logic from ConnectivityService as
+ // possible
+ @NonNull
+ public final Object mProxyLock = new Object();
+ // The global proxy is the proxy that is set device-wide, overriding any network-specific
+ // proxy. Note however that proxies are hints ; the system does not enforce their use. Hence
+ // this value is only for querying.
+ @Nullable
+ @GuardedBy("mProxyLock")
+ public ProxyInfo mGlobalProxy = null;
+ // The default proxy is the proxy that applies to no particular network if the global proxy
+ // is not set. Individual networks have their own settings that override this. This member
+ // is set through setDefaultProxy, which is called when the default network changes proxies
+ // in its LinkProperties, or when ConnectivityService switches to a new default network, or
+ // when PacManager resolves the proxy.
+ @Nullable
+ @GuardedBy("mProxyLock")
+ public volatile ProxyInfo mDefaultProxy = null;
+ // Whether the default proxy is disabled. TODO : make this mDefaultProxyEnabled
+ @GuardedBy("mProxyLock")
+ public boolean mDefaultProxyDisabled = false;
+
+ // The object responsible for Proxy Auto Configuration (PAC).
+ @NonNull
+ private final PacManager mPacManager;
+
+ public ProxyTracker(@NonNull final Context context,
+ @NonNull final Handler connectivityServiceInternalHandler, final int pacChangedEvent) {
+ mContext = context;
+ mPacManager = new PacManager(context, connectivityServiceInternalHandler, pacChangedEvent);
+ }
+
+ // Convert empty ProxyInfo's to null as null-checks are used to determine if proxies are present
+ // (e.g. if mGlobalProxy==null fall back to network-specific proxy, if network-specific
+ // proxy is null then there is no proxy in place).
+ @Nullable
+ private static ProxyInfo canonicalizeProxyInfo(@Nullable final ProxyInfo proxy) {
+ if (proxy != null && TextUtils.isEmpty(proxy.getHost())
+ && (proxy.getPacFileUrl() == null || Uri.EMPTY.equals(proxy.getPacFileUrl()))) {
+ return null;
+ }
+ return proxy;
+ }
+
+ // ProxyInfo equality functions with a couple modifications over ProxyInfo.equals() to make it
+ // better for determining if a new proxy broadcast is necessary:
+ // 1. Canonicalize empty ProxyInfos to null so an empty proxy compares equal to null so as to
+ // avoid unnecessary broadcasts.
+ // 2. Make sure all parts of the ProxyInfo's compare true, including the host when a PAC URL
+ // is in place. This is important so legacy PAC resolver (see com.android.proxyhandler)
+ // changes aren't missed. The legacy PAC resolver pretends to be a simple HTTP proxy but
+ // actually uses the PAC to resolve; this results in ProxyInfo's with PAC URL, host and port
+ // all set.
+ public static boolean proxyInfoEqual(@Nullable final ProxyInfo a, @Nullable final ProxyInfo b) {
+ final ProxyInfo pa = canonicalizeProxyInfo(a);
+ final ProxyInfo pb = canonicalizeProxyInfo(b);
+ // ProxyInfo.equals() doesn't check hosts when PAC URLs are present, but we need to check
+ // hosts even when PAC URLs are present to account for the legacy PAC resolver.
+ return Objects.equals(pa, pb) && (pa == null || Objects.equals(pa.getHost(), pb.getHost()));
+ }
+
+ /**
+ * Gets the default system-wide proxy.
+ *
+ * This will return the global proxy if set, otherwise the default proxy if in use. Note
+ * that this is not necessarily the proxy that any given process should use, as the right
+ * proxy for a process is the proxy for the network this process will use, which may be
+ * different from this value. This value is simply the default in case there is no proxy set
+ * in the network that will be used by a specific process.
+ * @return The default system-wide proxy or null if none.
+ */
+ @Nullable
+ public ProxyInfo getDefaultProxy() {
+ // This information is already available as a world read/writable jvm property.
+ synchronized (mProxyLock) {
+ final ProxyInfo ret = mGlobalProxy;
+ if ((ret == null) && !mDefaultProxyDisabled) return mDefaultProxy;
+ return ret;
+ }
+ }
+
+ /**
+ * Gets the global proxy.
+ *
+ * @return The global proxy or null if none.
+ */
+ @Nullable
+ public ProxyInfo getGlobalProxy() {
+ // This information is already available as a world read/writable jvm property.
+ synchronized (mProxyLock) {
+ return mGlobalProxy;
+ }
+ }
+
+ /**
+ * Sends the system broadcast informing apps about a new proxy configuration.
+ *
+ * Confusingly this method also sets the PAC file URL. TODO : separate this, it has nothing
+ * to do in a "sendProxyBroadcast" method.
+ * @param proxyInfo the proxy spec, or null for no proxy.
+ */
+ // TODO : make the argument NonNull final and the method private
+ public void sendProxyBroadcast(@Nullable ProxyInfo proxyInfo) {
+ if (proxyInfo == null) proxyInfo = new ProxyInfo("", 0, "");
+ if (mPacManager.setCurrentProxyScriptUrl(proxyInfo)) return;
+ if (DBG) Slog.d(TAG, "sending Proxy Broadcast for " + proxyInfo);
+ Intent intent = new Intent(Proxy.PROXY_CHANGE_ACTION);
+ intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING |
+ Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
+ intent.putExtra(Proxy.EXTRA_PROXY_INFO, proxyInfo);
+ final long ident = Binder.clearCallingIdentity();
+ try {
+ mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
+ } finally {
+ Binder.restoreCallingIdentity(ident);
+ }
+ }
+
+ /**
+ * Sets the global proxy in memory. Also writes the values to the global settings of the device.
+ *
+ * @param proxyInfo the proxy spec, or null for no proxy.
+ */
+ public void setGlobalProxy(@Nullable ProxyInfo proxyInfo) {
+ synchronized (mProxyLock) {
+ // ProxyInfo#equals is not commutative :( and is public API, so it can't be fixed.
+ if (proxyInfo == mGlobalProxy) return;
+ if (proxyInfo != null && proxyInfo.equals(mGlobalProxy)) return;
+ if (mGlobalProxy != null && mGlobalProxy.equals(proxyInfo)) return;
+
+ final String host;
+ final int port;
+ final String exclList;
+ final String pacFileUrl;
+ if (proxyInfo != null && (!TextUtils.isEmpty(proxyInfo.getHost()) ||
+ !Uri.EMPTY.equals(proxyInfo.getPacFileUrl()))) {
+ if (!proxyInfo.isValid()) {
+ if (DBG) Slog.d(TAG, "Invalid proxy properties, ignoring: " + proxyInfo);
+ return;
+ }
+ mGlobalProxy = new ProxyInfo(proxyInfo);
+ host = mGlobalProxy.getHost();
+ port = mGlobalProxy.getPort();
+ exclList = mGlobalProxy.getExclusionListAsString();
+ pacFileUrl = Uri.EMPTY.equals(proxyInfo.getPacFileUrl())
+ ? "" : proxyInfo.getPacFileUrl().toString();
+ } else {
+ host = "";
+ port = 0;
+ exclList = "";
+ pacFileUrl = "";
+ mGlobalProxy = null;
+ }
+ final ContentResolver res = mContext.getContentResolver();
+ final long token = Binder.clearCallingIdentity();
+ try {
+ Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_HOST, host);
+ Settings.Global.putInt(res, Settings.Global.GLOBAL_HTTP_PROXY_PORT, port);
+ Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST,
+ exclList);
+ Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_PAC, pacFileUrl);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+
+ sendProxyBroadcast(mGlobalProxy == null ? mDefaultProxy : proxyInfo);
+ }
+ }
+
+ /**
+ * Sets the default proxy for the device.
+ *
+ * The default proxy is the proxy used for networks that do not have a specific proxy.
+ * @param proxyInfo the proxy spec, or null for no proxy.
+ */
+ public void setDefaultProxy(@Nullable ProxyInfo proxyInfo) {
+ synchronized (mProxyLock) {
+ if (mDefaultProxy != null && mDefaultProxy.equals(proxyInfo)) {
+ return;
+ }
+ if (mDefaultProxy == proxyInfo) return; // catches repeated nulls
+ if (proxyInfo != null && !proxyInfo.isValid()) {
+ if (DBG) Slog.d(TAG, "Invalid proxy properties, ignoring: " + proxyInfo);
+ return;
+ }
+
+ // This call could be coming from the PacManager, containing the port of the local
+ // proxy. If this new proxy matches the global proxy then copy this proxy to the
+ // global (to get the correct local port), and send a broadcast.
+ // TODO: Switch PacManager to have its own message to send back rather than
+ // reusing EVENT_HAS_CHANGED_PROXY and this call to handleApplyDefaultProxy.
+ if ((mGlobalProxy != null) && (proxyInfo != null)
+ && (!Uri.EMPTY.equals(proxyInfo.getPacFileUrl()))
+ && proxyInfo.getPacFileUrl().equals(mGlobalProxy.getPacFileUrl())) {
+ mGlobalProxy = proxyInfo;
+ sendProxyBroadcast(mGlobalProxy);
+ return;
+ }
+ mDefaultProxy = proxyInfo;
+
+ if (mGlobalProxy != null) return;
+ if (!mDefaultProxyDisabled) {
+ sendProxyBroadcast(proxyInfo);
+ }
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index 7b171b3..62fe218 100644
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -19,6 +19,28 @@
import static android.hardware.usb.UsbManager.USB_CONFIGURED;
import static android.hardware.usb.UsbManager.USB_CONNECTED;
import static android.hardware.usb.UsbManager.USB_FUNCTION_RNDIS;
+import static android.net.ConnectivityManager.ACTION_TETHER_STATE_CHANGED;
+import static android.net.ConnectivityManager.CONNECTIVITY_ACTION;
+import static android.net.ConnectivityManager.EXTRA_ACTIVE_LOCAL_ONLY;
+import static android.net.ConnectivityManager.EXTRA_ACTIVE_TETHER;
+import static android.net.ConnectivityManager.EXTRA_ADD_TETHER_TYPE;
+import static android.net.ConnectivityManager.EXTRA_AVAILABLE_TETHER;
+import static android.net.ConnectivityManager.EXTRA_ERRORED_TETHER;
+import static android.net.ConnectivityManager.EXTRA_NETWORK_INFO;
+import static android.net.ConnectivityManager.EXTRA_PROVISION_CALLBACK;
+import static android.net.ConnectivityManager.EXTRA_REM_TETHER_TYPE;
+import static android.net.ConnectivityManager.EXTRA_RUN_PROVISION;
+import static android.net.ConnectivityManager.EXTRA_SET_ALARM;
+import static android.net.ConnectivityManager.TETHER_ERROR_MASTER_ERROR;
+import static android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR;
+import static android.net.ConnectivityManager.TETHER_ERROR_SERVICE_UNAVAIL;
+import static android.net.ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
+import static android.net.ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE;
+import static android.net.ConnectivityManager.TETHERING_BLUETOOTH;
+import static android.net.ConnectivityManager.TETHERING_INVALID;
+import static android.net.ConnectivityManager.TETHERING_USB;
+import static android.net.ConnectivityManager.TETHERING_WIFI;
+import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_INTERFACE_NAME;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_MODE;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_STATE;
@@ -44,7 +66,6 @@
import android.content.IntentFilter;
import android.content.res.Resources;
import android.hardware.usb.UsbManager;
-import android.net.ConnectivityManager;
import android.net.INetworkPolicyManager;
import android.net.INetworkStatsService;
import android.net.IpPrefix;
@@ -55,6 +76,7 @@
import android.net.NetworkState;
import android.net.NetworkUtils;
import android.net.RouteInfo;
+import android.net.util.InterfaceSet;
import android.net.util.PrefixUtils;
import android.net.util.SharedLog;
import android.net.util.VersionedBroadcastListener;
@@ -70,6 +92,9 @@
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.UserHandle;
+import android.os.UserManager;
+import android.os.UserManagerInternal;
+import android.os.UserManagerInternal.UserRestrictionsListener;
import android.provider.Settings;
import android.telephony.CarrierConfigManager;
import android.text.TextUtils;
@@ -86,6 +111,7 @@
import com.android.internal.util.Protocol;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
+import com.android.server.LocalServices;
import com.android.server.connectivity.tethering.IControlsTethering;
import com.android.server.connectivity.tethering.IPv6TetheringCoordinator;
import com.android.server.connectivity.tethering.OffloadController;
@@ -93,12 +119,14 @@
import com.android.server.connectivity.tethering.TetherInterfaceStateMachine;
import com.android.server.connectivity.tethering.TetheringConfiguration;
import com.android.server.connectivity.tethering.TetheringDependencies;
+import com.android.server.connectivity.tethering.TetheringInterfaceUtils;
import com.android.server.connectivity.tethering.UpstreamNetworkMonitor;
import com.android.server.net.BaseNetworkObserver;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.net.Inet4Address;
+import java.net.Inet6Address;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.Arrays;
@@ -140,7 +168,7 @@
stateMachine = sm;
// Assume all state machines start out available and with no errors.
lastState = IControlsTethering.STATE_AVAILABLE;
- lastError = ConnectivityManager.TETHER_ERROR_NO_ERROR;
+ lastError = TETHER_ERROR_NO_ERROR;
}
public boolean isCurrentlyServing() {
@@ -175,9 +203,10 @@
private final VersionedBroadcastListener mCarrierConfigChange;
// TODO: Delete SimChangeListener; it's obsolete.
private final SimChangeListener mSimChange;
+ private final TetheringDependencies mDeps;
private volatile TetheringConfiguration mConfig;
- private String mCurrentUpstreamIface;
+ private InterfaceSet mCurrentUpstreamIfaceSet;
private Notification.Builder mTetheredNotificationBuilder;
private int mLastNotificationId;
@@ -196,21 +225,22 @@
mPolicyManager = policyManager;
mLooper = looper;
mSystemProperties = systemProperties;
+ mDeps = deps;
mPublicSync = new Object();
mTetherStates = new ArrayMap<>();
- mTetherMasterSM = new TetherMasterSM("TetherMaster", mLooper);
+ mTetherMasterSM = new TetherMasterSM("TetherMaster", mLooper, deps);
mTetherMasterSM.start();
final Handler smHandler = mTetherMasterSM.getHandler();
mOffloadController = new OffloadController(smHandler,
- deps.getOffloadHardwareInterface(smHandler, mLog),
+ mDeps.getOffloadHardwareInterface(smHandler, mLog),
mContext.getContentResolver(), mNMService,
mLog);
- mUpstreamNetworkMonitor = new UpstreamNetworkMonitor(
- mContext, mTetherMasterSM, mLog, TetherMasterSM.EVENT_UPSTREAM_CALLBACK);
+ mUpstreamNetworkMonitor = deps.getUpstreamNetworkMonitor(mContext, mTetherMasterSM, mLog,
+ TetherMasterSM.EVENT_UPSTREAM_CALLBACK);
mForwardedDownstreams = new HashSet<>();
IntentFilter filter = new IntentFilter();
@@ -219,6 +249,7 @@
"CarrierConfigChangeListener", mContext, smHandler, filter,
(Intent ignored) -> {
mLog.log("OBSERVED carrier config change");
+ updateConfiguration();
reevaluateSimCardProvisioning();
});
// TODO: Remove SimChangeListener altogether. For now, we retain it
@@ -231,27 +262,35 @@
});
mStateReceiver = new StateReceiver();
- filter = new IntentFilter();
+
+ // Load tethering configuration.
+ updateConfiguration();
+
+ startStateMachineUpdaters();
+ }
+
+ private void startStateMachineUpdaters() {
+ mCarrierConfigChange.startListening();
+
+ final Handler handler = mTetherMasterSM.getHandler();
+ IntentFilter filter = new IntentFilter();
filter.addAction(UsbManager.ACTION_USB_STATE);
- filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
+ filter.addAction(CONNECTIVITY_ACTION);
filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION);
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
- mContext.registerReceiver(mStateReceiver, filter, null, smHandler);
+ mContext.registerReceiver(mStateReceiver, filter, null, handler);
filter = new IntentFilter();
filter.addAction(Intent.ACTION_MEDIA_SHARED);
filter.addAction(Intent.ACTION_MEDIA_UNSHARED);
filter.addDataScheme("file");
- mContext.registerReceiver(mStateReceiver, filter, null, smHandler);
+ mContext.registerReceiver(mStateReceiver, filter, null, handler);
- // load device config info
- updateConfiguration();
- }
-
- // We can't do this once in the Tethering() constructor and cache the value, because the
- // CONNECTIVITY_SERVICE is registered only after the Tethering() constructor has completed.
- private ConnectivityManager getConnectivityManager() {
- return (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
+ final UserManagerInternal umi = LocalServices.getService(UserManagerInternal.class);
+ // This check is useful only for some unit tests; example: ConnectivityServiceTest.
+ if (umi != null) {
+ umi.addUserRestrictionsListener(new TetheringUserRestrictionListener(this));
+ }
}
private WifiManager getWifiManager() {
@@ -279,7 +318,7 @@
if (up) {
maybeTrackNewInterfaceLocked(iface);
} else {
- if (ifaceNameToType(iface) == ConnectivityManager.TETHERING_BLUETOOTH) {
+ if (ifaceNameToType(iface) == TETHERING_BLUETOOTH) {
stopTrackingInterfaceLocked(iface);
} else {
// Ignore usb0 down after enabling RNDIS.
@@ -301,13 +340,13 @@
final TetheringConfiguration cfg = mConfig;
if (cfg.isWifi(iface)) {
- return ConnectivityManager.TETHERING_WIFI;
+ return TETHERING_WIFI;
} else if (cfg.isUsb(iface)) {
- return ConnectivityManager.TETHERING_USB;
+ return TETHERING_USB;
} else if (cfg.isBluetooth(iface)) {
- return ConnectivityManager.TETHERING_BLUETOOTH;
+ return TETHERING_BLUETOOTH;
}
- return ConnectivityManager.TETHERING_INVALID;
+ return TETHERING_INVALID;
}
@Override
@@ -353,17 +392,15 @@
*/
@VisibleForTesting
protected boolean isTetherProvisioningRequired() {
- String[] provisionApp = mContext.getResources().getStringArray(
- com.android.internal.R.array.config_mobile_hotspot_provision_app);
+ final TetheringConfiguration cfg = mConfig;
if (mSystemProperties.getBoolean(DISABLE_PROVISIONING_SYSPROP_KEY, false)
- || provisionApp == null) {
+ || cfg.provisioningApp.length == 0) {
return false;
}
-
if (carrierConfigAffirmsEntitlementCheckNotRequired()) {
return false;
}
- return (provisionApp.length == 2);
+ return (cfg.provisioningApp.length == 2);
}
// The logic here is aimed solely at confirming that a CarrierConfig exists
@@ -386,20 +423,6 @@
return !isEntitlementCheckRequired;
}
- // Used by the SIM card change observation code.
- // TODO: De-duplicate above code.
- private boolean hasMobileHotspotProvisionApp() {
- try {
- if (!mContext.getResources().getString(com.android.internal.R.string.
- config_mobile_hotspot_provision_app_no_ui).isEmpty()) {
- Log.d(TAG, "re-evaluate provisioning");
- return true;
- }
- } catch (Resources.NotFoundException e) {}
- Log.d(TAG, "no prov-check needed for new SIM");
- return false;
- }
-
/**
* Enables or disables tethering for the given type. This should only be called once
* provisioning has succeeded or is not necessary. It will also schedule provisioning rechecks
@@ -409,26 +432,26 @@
boolean isProvisioningRequired = enable && isTetherProvisioningRequired();
int result;
switch (type) {
- case ConnectivityManager.TETHERING_WIFI:
+ case TETHERING_WIFI:
result = setWifiTethering(enable);
- if (isProvisioningRequired && result == ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+ if (isProvisioningRequired && result == TETHER_ERROR_NO_ERROR) {
scheduleProvisioningRechecks(type);
}
sendTetherResult(receiver, result);
break;
- case ConnectivityManager.TETHERING_USB:
+ case TETHERING_USB:
result = setUsbTethering(enable);
- if (isProvisioningRequired && result == ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+ if (isProvisioningRequired && result == TETHER_ERROR_NO_ERROR) {
scheduleProvisioningRechecks(type);
}
sendTetherResult(receiver, result);
break;
- case ConnectivityManager.TETHERING_BLUETOOTH:
+ case TETHERING_BLUETOOTH:
setBluetoothTethering(enable, receiver);
break;
default:
Log.w(TAG, "Invalid tether type.");
- sendTetherResult(receiver, ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE);
+ sendTetherResult(receiver, TETHER_ERROR_UNKNOWN_IFACE);
}
}
@@ -439,7 +462,7 @@
}
private int setWifiTethering(final boolean enable) {
- int rval = ConnectivityManager.TETHER_ERROR_MASTER_ERROR;
+ int rval = TETHER_ERROR_MASTER_ERROR;
final long ident = Binder.clearCallingIdentity();
try {
synchronized (mPublicSync) {
@@ -447,7 +470,7 @@
final WifiManager mgr = getWifiManager();
if ((enable && mgr.startSoftAp(null /* use existing wifi config */)) ||
(!enable && mgr.stopSoftAp())) {
- rval = ConnectivityManager.TETHER_ERROR_NO_ERROR;
+ rval = TETHER_ERROR_NO_ERROR;
}
}
} finally {
@@ -461,7 +484,7 @@
if (adapter == null || !adapter.isEnabled()) {
Log.w(TAG, "Tried to enable bluetooth tethering with null or disabled adapter. null: " +
(adapter == null));
- sendTetherResult(receiver, ConnectivityManager.TETHER_ERROR_SERVICE_UNAVAIL);
+ sendTetherResult(receiver, TETHER_ERROR_SERVICE_UNAVAIL);
return;
}
@@ -474,12 +497,12 @@
((BluetoothPan) proxy).setBluetoothTethering(enable);
// TODO: Enabling bluetooth tethering can fail asynchronously here.
// We should figure out a way to bubble up that failure instead of sending success.
- int result = ((BluetoothPan) proxy).isTetheringOn() == enable ?
- ConnectivityManager.TETHER_ERROR_NO_ERROR :
- ConnectivityManager.TETHER_ERROR_MASTER_ERROR;
+ final int result = (((BluetoothPan) proxy).isTetheringOn() == enable)
+ ? TETHER_ERROR_NO_ERROR
+ : TETHER_ERROR_MASTER_ERROR;
sendTetherResult(receiver, result);
if (enable && isTetherProvisioningRequired()) {
- scheduleProvisioningRechecks(ConnectivityManager.TETHERING_BLUETOOTH);
+ scheduleProvisioningRechecks(TETHERING_BLUETOOTH);
}
adapter.closeProfileProxy(BluetoothProfile.PAN, proxy);
}
@@ -493,8 +516,9 @@
private void sendUiTetherProvisionIntent(int type, ResultReceiver receiver) {
Intent intent = new Intent(Settings.ACTION_TETHER_PROVISIONING);
- intent.putExtra(ConnectivityManager.EXTRA_ADD_TETHER_TYPE, type);
- intent.putExtra(ConnectivityManager.EXTRA_PROVISION_CALLBACK, receiver);
+ intent.putExtra(EXTRA_ADD_TETHER_TYPE, type);
+ intent.putExtra(EXTRA_PROVISION_CALLBACK, receiver);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final long ident = Binder.clearCallingIdentity();
try {
mContext.startActivityAsUser(intent, UserHandle.CURRENT);
@@ -516,7 +540,7 @@
@Override
protected void onReceiveResult(int resultCode, Bundle resultData) {
// If provisioning is successful, enable tethering, otherwise just send the error.
- if (resultCode == ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+ if (resultCode == TETHER_ERROR_NO_ERROR) {
enableTetheringInternal(type, true, receiver);
} else {
sendTetherResult(receiver, resultCode);
@@ -536,8 +560,8 @@
private void scheduleProvisioningRechecks(int type) {
Intent intent = new Intent();
- intent.putExtra(ConnectivityManager.EXTRA_ADD_TETHER_TYPE, type);
- intent.putExtra(ConnectivityManager.EXTRA_SET_ALARM, true);
+ intent.putExtra(EXTRA_ADD_TETHER_TYPE, type);
+ intent.putExtra(EXTRA_SET_ALARM, true);
intent.setComponent(TETHER_SERVICE);
final long ident = Binder.clearCallingIdentity();
try {
@@ -554,9 +578,9 @@
private void sendSilentTetherProvisionIntent(int type, ResultReceiver receiver) {
Intent intent = new Intent();
- intent.putExtra(ConnectivityManager.EXTRA_ADD_TETHER_TYPE, type);
- intent.putExtra(ConnectivityManager.EXTRA_RUN_PROVISION, true);
- intent.putExtra(ConnectivityManager.EXTRA_PROVISION_CALLBACK, receiver);
+ intent.putExtra(EXTRA_ADD_TETHER_TYPE, type);
+ intent.putExtra(EXTRA_RUN_PROVISION, true);
+ intent.putExtra(EXTRA_PROVISION_CALLBACK, receiver);
intent.setComponent(TETHER_SERVICE);
final long ident = Binder.clearCallingIdentity();
try {
@@ -567,9 +591,9 @@
}
private void cancelTetherProvisioningRechecks(int type) {
- if (getConnectivityManager().isTetheringSupported()) {
+ if (mDeps.isTetheringSupported()) {
Intent intent = new Intent();
- intent.putExtra(ConnectivityManager.EXTRA_REM_TETHER_TYPE, type);
+ intent.putExtra(EXTRA_REM_TETHER_TYPE, type);
intent.setComponent(TETHER_SERVICE);
final long ident = Binder.clearCallingIdentity();
try {
@@ -584,8 +608,8 @@
// TODO: De-duplicate with above code, where possible.
private void startProvisionIntent(int tetherType) {
final Intent startProvIntent = new Intent();
- startProvIntent.putExtra(ConnectivityManager.EXTRA_ADD_TETHER_TYPE, tetherType);
- startProvIntent.putExtra(ConnectivityManager.EXTRA_RUN_PROVISION, true);
+ startProvIntent.putExtra(EXTRA_ADD_TETHER_TYPE, tetherType);
+ startProvIntent.putExtra(EXTRA_RUN_PROVISION, true);
startProvIntent.setComponent(TETHER_SERVICE);
mContext.startServiceAsUser(startProvIntent, UserHandle.CURRENT);
}
@@ -600,13 +624,13 @@
TetherState tetherState = mTetherStates.get(iface);
if (tetherState == null) {
Log.e(TAG, "Tried to Tether an unknown iface: " + iface + ", ignoring");
- return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
+ return TETHER_ERROR_UNKNOWN_IFACE;
}
// Ignore the error status of the interface. If the interface is available,
// the errors are referring to past tethering attempts anyway.
if (tetherState.lastState != IControlsTethering.STATE_AVAILABLE) {
Log.e(TAG, "Tried to Tether an unavailable iface: " + iface + ", ignoring");
- return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE;
+ return TETHER_ERROR_UNAVAIL_IFACE;
}
// NOTE: If a CMD_TETHER_REQUESTED message is already in the TISM's
// queue but not yet processed, this will be a no-op and it will not
@@ -615,7 +639,7 @@
// TODO: reexamine the threading and messaging model.
tetherState.stateMachine.sendMessage(
TetherInterfaceStateMachine.CMD_TETHER_REQUESTED, requestedState);
- return ConnectivityManager.TETHER_ERROR_NO_ERROR;
+ return TETHER_ERROR_NO_ERROR;
}
}
@@ -625,22 +649,22 @@
TetherState tetherState = mTetherStates.get(iface);
if (tetherState == null) {
Log.e(TAG, "Tried to Untether an unknown iface :" + iface + ", ignoring");
- return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
+ return TETHER_ERROR_UNKNOWN_IFACE;
}
if (!tetherState.isCurrentlyServing()) {
Log.e(TAG, "Tried to untether an inactive iface :" + iface + ", ignoring");
- return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE;
+ return TETHER_ERROR_UNAVAIL_IFACE;
}
tetherState.stateMachine.sendMessage(
TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED);
- return ConnectivityManager.TETHER_ERROR_NO_ERROR;
+ return TETHER_ERROR_NO_ERROR;
}
}
public void untetherAll() {
- stopTethering(ConnectivityManager.TETHERING_WIFI);
- stopTethering(ConnectivityManager.TETHERING_USB);
- stopTethering(ConnectivityManager.TETHERING_BLUETOOTH);
+ stopTethering(TETHERING_WIFI);
+ stopTethering(TETHERING_USB);
+ stopTethering(TETHERING_BLUETOOTH);
}
public int getLastTetherError(String iface) {
@@ -649,7 +673,7 @@
if (tetherState == null) {
Log.e(TAG, "Tried to getLastTetherError on an unknown iface :" + iface +
", ignoring");
- return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
+ return TETHER_ERROR_UNKNOWN_IFACE;
}
return tetherState.lastError;
}
@@ -657,7 +681,7 @@
// TODO: Figure out how to update for local hotspot mode interfaces.
private void sendTetherStateChangedBroadcast() {
- if (!getConnectivityManager().isTetheringSupported()) return;
+ if (!mDeps.isTetheringSupported()) return;
final ArrayList<String> availableList = new ArrayList<>();
final ArrayList<String> tetherList = new ArrayList<>();
@@ -674,7 +698,7 @@
for (int i = 0; i < mTetherStates.size(); i++) {
TetherState tetherState = mTetherStates.valueAt(i);
String iface = mTetherStates.keyAt(i);
- if (tetherState.lastError != ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+ if (tetherState.lastError != TETHER_ERROR_NO_ERROR) {
erroredList.add(iface);
} else if (tetherState.lastState == IControlsTethering.STATE_AVAILABLE) {
availableList.add(iface);
@@ -692,13 +716,13 @@
}
}
}
- final Intent bcast = new Intent(ConnectivityManager.ACTION_TETHER_STATE_CHANGED);
+ final Intent bcast = new Intent(ACTION_TETHER_STATE_CHANGED);
bcast.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING |
Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
- bcast.putStringArrayListExtra(ConnectivityManager.EXTRA_AVAILABLE_TETHER, availableList);
- bcast.putStringArrayListExtra(ConnectivityManager.EXTRA_ACTIVE_LOCAL_ONLY, localOnlyList);
- bcast.putStringArrayListExtra(ConnectivityManager.EXTRA_ACTIVE_TETHER, tetherList);
- bcast.putStringArrayListExtra(ConnectivityManager.EXTRA_ERRORED_TETHER, erroredList);
+ bcast.putStringArrayListExtra(EXTRA_AVAILABLE_TETHER, availableList);
+ bcast.putStringArrayListExtra(EXTRA_ACTIVE_LOCAL_ONLY, localOnlyList);
+ bcast.putStringArrayListExtra(EXTRA_ACTIVE_TETHER, tetherList);
+ bcast.putStringArrayListExtra(EXTRA_ERRORED_TETHER, erroredList);
mContext.sendStickyBroadcastAsUser(bcast, UserHandle.ALL);
if (DBG) {
Log.d(TAG, String.format(
@@ -730,6 +754,11 @@
}
private void showTetheredNotification(int id) {
+ showTetheredNotification(id, true);
+ }
+
+ @VisibleForTesting
+ protected void showTetheredNotification(int id, boolean tetheringOn) {
NotificationManager notificationManager =
(NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
if (notificationManager == null) {
@@ -766,9 +795,16 @@
null, UserHandle.CURRENT);
Resources r = Resources.getSystem();
- CharSequence title = r.getText(com.android.internal.R.string.tethered_notification_title);
- CharSequence message = r.getText(com.android.internal.R.string.
- tethered_notification_message);
+ final CharSequence title;
+ final CharSequence message;
+
+ if (tetheringOn) {
+ title = r.getText(com.android.internal.R.string.tethered_notification_title);
+ message = r.getText(com.android.internal.R.string.tethered_notification_message);
+ } else {
+ title = r.getText(com.android.internal.R.string.disable_tether_notification_title);
+ message = r.getText(com.android.internal.R.string.disable_tether_notification_message);
+ }
if (mTetheredNotificationBuilder == null) {
mTetheredNotificationBuilder =
@@ -790,7 +826,8 @@
mTetheredNotificationBuilder.buildInto(new Notification()), UserHandle.ALL);
}
- private void clearTetheredNotification() {
+ @VisibleForTesting
+ protected void clearTetheredNotification() {
NotificationManager notificationManager =
(NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
if (notificationManager != null && mLastNotificationId != 0) {
@@ -808,7 +845,7 @@
if (action.equals(UsbManager.ACTION_USB_STATE)) {
handleUsbAction(intent);
- } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
+ } else if (action.equals(CONNECTIVITY_ACTION)) {
handleConnectivityAction(intent);
} else if (action.equals(WifiManager.WIFI_AP_STATE_CHANGED_ACTION)) {
handleWifiApAction(intent);
@@ -819,8 +856,8 @@
}
private void handleConnectivityAction(Intent intent) {
- final NetworkInfo networkInfo = (NetworkInfo)intent.getParcelableExtra(
- ConnectivityManager.EXTRA_NETWORK_INFO);
+ final NetworkInfo networkInfo =
+ (NetworkInfo) intent.getParcelableExtra(EXTRA_NETWORK_INFO);
if (networkInfo == null ||
networkInfo.getDetailedState() == NetworkInfo.DetailedState.FAILED) {
return;
@@ -856,14 +893,10 @@
synchronized (Tethering.this.mPublicSync) {
if (!usbConnected && mRndisEnabled) {
// Turn off tethering if it was enabled and there is a disconnect.
- tetherMatchingInterfaces(
- IControlsTethering.STATE_AVAILABLE,
- ConnectivityManager.TETHERING_USB);
+ tetherMatchingInterfaces(IControlsTethering.STATE_AVAILABLE, TETHERING_USB);
} else if (usbConfigured && rndisEnabled) {
// Tether if rndis is enabled and usb is configured.
- tetherMatchingInterfaces(
- IControlsTethering.STATE_TETHERED,
- ConnectivityManager.TETHERING_USB);
+ tetherMatchingInterfaces(IControlsTethering.STATE_TETHERED, TETHERING_USB);
}
mRndisEnabled = usbConfigured && rndisEnabled;
}
@@ -893,6 +926,38 @@
}
}
+ @VisibleForTesting
+ protected static class TetheringUserRestrictionListener implements UserRestrictionsListener {
+ private final Tethering mWrapper;
+
+ public TetheringUserRestrictionListener(Tethering wrapper) {
+ mWrapper = wrapper;
+ }
+
+ public void onUserRestrictionsChanged(int userId,
+ Bundle newRestrictions,
+ Bundle prevRestrictions) {
+ final boolean newlyDisallowed =
+ newRestrictions.getBoolean(UserManager.DISALLOW_CONFIG_TETHERING);
+ final boolean previouslyDisallowed =
+ prevRestrictions.getBoolean(UserManager.DISALLOW_CONFIG_TETHERING);
+ final boolean tetheringDisallowedChanged = (newlyDisallowed != previouslyDisallowed);
+
+ if (!tetheringDisallowedChanged) {
+ return;
+ }
+
+ mWrapper.clearTetheredNotification();
+ final boolean isTetheringActiveOnDevice = (mWrapper.getTetheredIfaces().length != 0);
+
+ if (newlyDisallowed && isTetheringActiveOnDevice) {
+ mWrapper.showTetheredNotification(
+ com.android.internal.R.drawable.stat_sys_tether_general, false);
+ mWrapper.untetherAll();
+ }
+ }
+ }
+
private void disableWifiIpServingLocked(String ifname, int apState) {
mLog.log("Canceling WiFi tethering request - AP_STATE=" + apState);
@@ -912,7 +977,7 @@
for (int i = 0; i < mTetherStates.size(); i++) {
TetherInterfaceStateMachine tism = mTetherStates.valueAt(i).stateMachine;
- if (tism.interfaceType() == ConnectivityManager.TETHERING_WIFI) {
+ if (tism.interfaceType() == TETHERING_WIFI) {
tism.unwanted();
return;
}
@@ -940,7 +1005,7 @@
}
if (!TextUtils.isEmpty(ifname)) {
- maybeTrackNewInterfaceLocked(ifname, ConnectivityManager.TETHERING_WIFI);
+ maybeTrackNewInterfaceLocked(ifname, TETHERING_WIFI);
changeInterfaceState(ifname, ipServingMode);
} else {
mLog.e(String.format(
@@ -999,7 +1064,7 @@
Log.wtf(TAG, "Unknown interface state: " + requestedState);
return;
}
- if (result != ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+ if (result != TETHER_ERROR_NO_ERROR) {
Log.e(TAG, "unable start or stop tethering on iface " + ifname);
return;
}
@@ -1040,7 +1105,7 @@
synchronized (mPublicSync) {
usbManager.setCurrentFunction(enable ? UsbManager.USB_FUNCTION_RNDIS : null, false);
}
- return ConnectivityManager.TETHER_ERROR_NO_ERROR;
+ return TETHER_ERROR_NO_ERROR;
}
// TODO review API - figure out how to delete these entirely.
@@ -1079,7 +1144,7 @@
synchronized (mPublicSync) {
for (int i = 0; i < mTetherStates.size(); i++) {
TetherState tetherState = mTetherStates.valueAt(i);
- if (tetherState.lastError != ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+ if (tetherState.lastError != TETHER_ERROR_NO_ERROR) {
list.add(mTetherStates.keyAt(i));
}
}
@@ -1100,12 +1165,11 @@
}
// Needed because the canonical source of upstream truth is just the
- // upstream interface name, |mCurrentUpstreamIface|. This is ripe for
- // future simplification, once the upstream Network is canonical.
+ // upstream interface set, |mCurrentUpstreamIfaceSet|.
private boolean pertainsToCurrentUpstream(NetworkState ns) {
- if (ns != null && ns.linkProperties != null && mCurrentUpstreamIface != null) {
+ if (ns != null && ns.linkProperties != null && mCurrentUpstreamIfaceSet != null) {
for (String ifname : ns.linkProperties.getAllInterfaceNames()) {
- if (mCurrentUpstreamIface.equals(ifname)) {
+ if (mCurrentUpstreamIfaceSet.ifnames.contains(ifname)) {
return true;
}
}
@@ -1114,7 +1178,7 @@
}
private void reevaluateSimCardProvisioning() {
- if (!hasMobileHotspotProvisionApp()) return;
+ if (!mConfig.hasMobileHotspotProvisionApp()) return;
if (carrierConfigAffirmsEntitlementCheckNotRequired()) return;
ArrayList<Integer> tethered = new ArrayList<>();
@@ -1126,7 +1190,7 @@
}
String iface = mTetherStates.keyAt(i);
int interfaceType = ifaceNameToType(iface);
- if (interfaceType != ConnectivityManager.TETHERING_INVALID) {
+ if (interfaceType != TETHERING_INVALID) {
tethered.add(interfaceType);
}
}
@@ -1181,7 +1245,7 @@
private static final int UPSTREAM_SETTLE_TIME_MS = 10000;
- TetherMasterSM(String name, Looper looper) {
+ TetherMasterSM(String name, Looper looper, TetheringDependencies deps) {
super(name, looper);
mInitialState = new InitialState();
@@ -1201,7 +1265,7 @@
addState(mSetDnsForwardersErrorState);
mNotifyList = new ArrayList<>();
- mIPv6TetheringCoordinator = new IPv6TetheringCoordinator(mNotifyList, mLog);
+ mIPv6TetheringCoordinator = deps.getIPv6TetheringCoordinator(mNotifyList, mLog);
mOffload = new OffloadWrapper();
setInitialState(mInitialState);
@@ -1300,34 +1364,27 @@
}
protected void setUpstreamNetwork(NetworkState ns) {
- String iface = null;
- if (ns != null && ns.linkProperties != null) {
+ InterfaceSet ifaces = null;
+ if (ns != null) {
// Find the interface with the default IPv4 route. It may be the
// interface described by linkProperties, or one of the interfaces
// stacked on top of it.
- mLog.i("Finding IPv4 upstream interface on: " + ns.linkProperties);
- RouteInfo ipv4Default = RouteInfo.selectBestRoute(
- ns.linkProperties.getAllRoutes(), Inet4Address.ANY);
- if (ipv4Default != null) {
- iface = ipv4Default.getInterface();
- mLog.i("Found interface " + ipv4Default.getInterface());
- } else {
- mLog.i("No IPv4 upstream interface, giving up.");
- }
+ mLog.i("Looking for default routes on: " + ns.linkProperties);
+ ifaces = TetheringInterfaceUtils.getTetheringInterfaces(ns);
+ mLog.i("Found upstream interface(s): " + ifaces);
}
- if (iface != null) {
+ if (ifaces != null) {
setDnsForwarders(ns.network, ns.linkProperties);
}
- notifyDownstreamsOfNewUpstreamIface(iface);
+ notifyDownstreamsOfNewUpstreamIface(ifaces);
if (ns != null && pertainsToCurrentUpstream(ns)) {
// If we already have NetworkState for this network examine
// it immediately, because there likely will be no second
// EVENT_ON_AVAILABLE (it was already received).
handleNewUpstreamNetworkState(ns);
- } else if (mCurrentUpstreamIface == null) {
- // There are no available upstream networks, or none that
- // have an IPv4 default route (current metric for success).
+ } else if (mCurrentUpstreamIfaceSet == null) {
+ // There are no available upstream networks.
handleNewUpstreamNetworkState(null);
}
}
@@ -1354,12 +1411,10 @@
}
}
- protected void notifyDownstreamsOfNewUpstreamIface(String ifaceName) {
- mLog.log("Notifying downstreams of upstream=" + ifaceName);
- mCurrentUpstreamIface = ifaceName;
+ protected void notifyDownstreamsOfNewUpstreamIface(InterfaceSet ifaces) {
+ mCurrentUpstreamIfaceSet = ifaces;
for (TetherInterfaceStateMachine sm : mNotifyList) {
- sm.sendMessage(TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED,
- ifaceName);
+ sm.sendMessage(TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED, ifaces);
}
}
@@ -1385,7 +1440,7 @@
}
// If this is a Wi-Fi interface, notify WifiManager of the active serving state.
- if (who.interfaceType() == ConnectivityManager.TETHERING_WIFI) {
+ if (who.interfaceType() == TETHERING_WIFI) {
final WifiManager mgr = getWifiManager();
final String iface = who.interfaceName();
switch (mode) {
@@ -1409,8 +1464,8 @@
mForwardedDownstreams.remove(who);
// If this is a Wi-Fi interface, tell WifiManager of any errors.
- if (who.interfaceType() == ConnectivityManager.TETHERING_WIFI) {
- if (who.lastError() != ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+ if (who.interfaceType() == TETHERING_WIFI) {
+ if (who.lastError() != TETHER_ERROR_NO_ERROR) {
getWifiManager().updateInterfaceIpState(
who.interfaceName(), IFACE_IP_MODE_CONFIGURATION_ERROR);
}
@@ -1431,7 +1486,7 @@
// For example, after CONNECTIVITY_ACTION listening is removed, here
// is where we could observe a Wi-Fi network becoming available and
// passing validation.
- if (mCurrentUpstreamIface == null) {
+ if (mCurrentUpstreamIfaceSet == null) {
// If we have no upstream interface, try to run through upstream
// selection again. If, for example, IPv4 connectivity has shown up
// after IPv6 (e.g., 464xlat became available) we want the chance to
@@ -1455,8 +1510,7 @@
handleNewUpstreamNetworkState(ns);
break;
case UpstreamNetworkMonitor.EVENT_ON_LINKPROPERTIES:
- setDnsForwarders(ns.network, ns.linkProperties);
- handleNewUpstreamNetworkState(ns);
+ chooseUpstreamType(false);
break;
case UpstreamNetworkMonitor.EVENT_ON_LOST:
// TODO: Re-evaluate possible upstreams. Currently upstream
@@ -1483,7 +1537,6 @@
return;
}
- mCarrierConfigChange.startListening();
mSimChange.startListening();
mUpstreamNetworkMonitor.start();
@@ -1501,7 +1554,6 @@
mOffload.stop();
mUpstreamNetworkMonitor.stop();
mSimChange.stopListening();
- mCarrierConfigChange.stopListening();
notifyDownstreamsOfNewUpstreamIface(null);
handleNewUpstreamNetworkState(null);
}
@@ -1529,7 +1581,7 @@
if (VDBG) Log.d(TAG, "Tether Mode requested by " + who);
handleInterfaceServingStateActive(message.arg1, who);
who.sendMessage(TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED,
- mCurrentUpstreamIface);
+ mCurrentUpstreamIfaceSet);
// If there has been a change and an upstream is now
// desired, kick off the selection process.
final boolean previousUpstreamWanted = updateUpstreamWanted();
@@ -1616,7 +1668,7 @@
who.sendMessage(mErrorNotification);
break;
case CMD_CLEAR_ERROR:
- mErrorNotification = ConnectivityManager.TETHER_ERROR_NO_ERROR;
+ mErrorNotification = TETHER_ERROR_NO_ERROR;
transitionTo(mInitialState);
break;
default:
@@ -1807,7 +1859,7 @@
pw.println(" - lastError = " + tetherState.lastError);
}
pw.println("Upstream wanted: " + upstreamWanted());
- pw.println("Current upstream interface: " + mCurrentUpstreamIface);
+ pw.println("Current upstream interface(s): " + mCurrentUpstreamIfaceSet);
pw.decreaseIndent();
}
@@ -1878,7 +1930,7 @@
// If TetherMasterSM is in ErrorState, TetherMasterSM stays there.
// Thus we give a chance for TetherMasterSM to recover to InitialState
// by sending CMD_CLEAR_ERROR
- if (error == ConnectivityManager.TETHER_ERROR_MASTER_ERROR) {
+ if (error == TETHER_ERROR_MASTER_ERROR) {
mTetherMasterSM.sendMessage(TetherMasterSM.CMD_CLEAR_ERROR, who);
}
int which;
@@ -1922,7 +1974,7 @@
private void maybeTrackNewInterfaceLocked(final String iface) {
// If we don't care about this type of interface, ignore.
final int interfaceType = ifaceNameToType(iface);
- if (interfaceType == ConnectivityManager.TETHERING_INVALID) {
+ if (interfaceType == TETHERING_INVALID) {
mLog.log(iface + " is not a tetherable iface, ignoring");
return;
}
@@ -1940,7 +1992,7 @@
final TetherState tetherState = new TetherState(
new TetherInterfaceStateMachine(
iface, mLooper, interfaceType, mLog, mNMService, mStatsService,
- makeControlCallback(iface)));
+ makeControlCallback(iface), mDeps));
mTetherStates.put(iface, tetherState);
tetherState.stateMachine.start();
}
@@ -1956,6 +2008,31 @@
mTetherStates.remove(iface);
}
+ private static String getIPv4DefaultRouteInterface(NetworkState ns) {
+ if (ns == null) return null;
+ return getInterfaceForDestination(ns.linkProperties, Inet4Address.ANY);
+ }
+
+ private static String getIPv6DefaultRouteInterface(NetworkState ns) {
+ if (ns == null) return null;
+ // An upstream network's IPv6 capability is currently only useful if it
+ // can be 64share'd downstream (RFC 7278). For now, that means mobile
+ // upstream networks only.
+ if (ns.networkCapabilities == null ||
+ !ns.networkCapabilities.hasTransport(TRANSPORT_CELLULAR)) {
+ return null;
+ }
+
+ return getInterfaceForDestination(ns.linkProperties, Inet6Address.ANY);
+ }
+
+ private static String getInterfaceForDestination(LinkProperties lp, InetAddress dst) {
+ final RouteInfo ri = (lp != null)
+ ? RouteInfo.selectBestRoute(lp.getAllRoutes(), dst)
+ : null;
+ return (ri != null) ? ri.getInterface() : null;
+ }
+
private static String[] copy(String[] strarray) {
return Arrays.copyOf(strarray, strarray.length);
}
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index aa174e3..bce735b 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -57,6 +57,7 @@
import android.net.NetworkInfo;
import android.net.NetworkInfo.DetailedState;
import android.net.NetworkMisc;
+import android.net.NetworkUtils;
import android.net.RouteInfo;
import android.net.UidRange;
import android.net.Uri;
@@ -99,12 +100,11 @@
import com.android.server.LocalServices;
import com.android.server.net.BaseNetworkObserver;
-import libcore.io.IoUtils;
-
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.math.BigInteger;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
@@ -113,12 +113,15 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.concurrent.atomic.AtomicInteger;
+import libcore.io.IoUtils;
+
/**
* @hide
*/
@@ -131,6 +134,31 @@
// the device idle whitelist during service launch and VPN bootstrap.
private static final long VPN_LAUNCH_IDLE_WHITELIST_DURATION_MS = 60 * 1000;
+ // Settings for how much of the address space should be routed so that Vpn considers
+ // "most" of the address space is routed. This is used to determine whether this Vpn
+ // should be marked with the INTERNET capability.
+ private static final long MOST_IPV4_ADDRESSES_COUNT;
+ private static final BigInteger MOST_IPV6_ADDRESSES_COUNT;
+ static {
+ // 85% of the address space must be routed for Vpn to consider this VPN to provide
+ // INTERNET access.
+ final int howManyPercentIsMost = 85;
+
+ final long twoPower32 = 1L << 32;
+ MOST_IPV4_ADDRESSES_COUNT = twoPower32 * howManyPercentIsMost / 100;
+ final BigInteger twoPower128 = BigInteger.ONE.shiftLeft(128);
+ MOST_IPV6_ADDRESSES_COUNT = twoPower128
+ .multiply(BigInteger.valueOf(howManyPercentIsMost))
+ .divide(BigInteger.valueOf(100));
+ }
+ // How many routes to evaluate before bailing and declaring this Vpn should provide
+ // the INTERNET capability. This is necessary because computing the adress space is
+ // O(n²) and this is running in the system service, so a limit is needed to alleviate
+ // the risk of attack.
+ // This is taken as a total of IPv4 + IPV6 routes for simplicity, but the algorithm
+ // is actually O(n²)+O(n²).
+ private static final int MAX_ROUTES_TO_EVALUATE = 150;
+
// TODO: create separate trackers for each unique VPN to support
// automated reconnection
@@ -144,10 +172,13 @@
private PendingIntent mStatusIntent;
private volatile boolean mEnableTeardown = true;
private final INetworkManagementService mNetd;
- private VpnConfig mConfig;
- private NetworkAgent mNetworkAgent;
+ @VisibleForTesting
+ protected VpnConfig mConfig;
+ @VisibleForTesting
+ protected NetworkAgent mNetworkAgent;
private final Looper mLooper;
- private final NetworkCapabilities mNetworkCapabilities;
+ @VisibleForTesting
+ protected final NetworkCapabilities mNetworkCapabilities;
private final SystemServices mSystemServices;
/**
@@ -164,19 +195,6 @@
private boolean mLockdown = false;
/**
- * List of UIDs that are set to use this VPN by default. Normally, every UID in the user is
- * added to this set but that can be changed by adding allowed or disallowed applications. It
- * is non-null iff the VPN is connected.
- *
- * Unless the VPN has set allowBypass=true, these UIDs are forced into the VPN.
- *
- * @see VpnService.Builder#addAllowedApplication(String)
- * @see VpnService.Builder#addDisallowedApplication(String)
- */
- @GuardedBy("this")
- private Set<UidRange> mVpnUsers = null;
-
- /**
* List of UIDs for which networking should be blocked until VPN is ready, during brief periods
* when VPN is not running. For example, during system startup or after a crash.
* @see mLockdown
@@ -301,15 +319,12 @@
boolean roaming = false;
boolean congested = false;
- if (ArrayUtils.isEmpty(underlyingNetworks)) {
- // No idea what the underlying networks are; assume sane defaults
- metered = true;
- roaming = false;
- congested = false;
- } else {
+ boolean hadUnderlyingNetworks = false;
+ if (null != underlyingNetworks) {
for (Network underlying : underlyingNetworks) {
final NetworkCapabilities underlyingCaps = cm.getNetworkCapabilities(underlying);
if (underlyingCaps == null) continue;
+ hadUnderlyingNetworks = true;
for (int underlyingType : underlyingCaps.getTransportTypes()) {
transportTypes = ArrayUtils.appendInt(transportTypes, underlyingType);
}
@@ -325,6 +340,12 @@
congested |= !underlyingCaps.hasCapability(NET_CAPABILITY_NOT_CONGESTED);
}
}
+ if (!hadUnderlyingNetworks) {
+ // No idea what the underlying networks are; assume sane defaults
+ metered = true;
+ roaming = false;
+ congested = false;
+ }
caps.setTransportTypes(transportTypes);
caps.setLinkDownstreamBandwidthKbps(downKbps);
@@ -688,7 +709,7 @@
agentDisconnect();
jniReset(mInterface);
mInterface = null;
- mVpnUsers = null;
+ mNetworkCapabilities.setUids(null);
}
// Revoke the connection or stop LegacyVpnRunner.
@@ -843,10 +864,41 @@
return lp;
}
+ /**
+ * Analyzes the passed LinkedProperties to figure out whether it routes to most of the IP space.
+ *
+ * This returns true if the passed LinkedProperties contains routes to either most of the IPv4
+ * space or to most of the IPv6 address space, where "most" is defined by the value of the
+ * MOST_IPV{4,6}_ADDRESSES_COUNT constants : if more than this number of addresses are matched
+ * by any of the routes, then it's decided that most of the space is routed.
+ * @hide
+ */
+ @VisibleForTesting
+ static boolean providesRoutesToMostDestinations(LinkProperties lp) {
+ final List<RouteInfo> routes = lp.getAllRoutes();
+ if (routes.size() > MAX_ROUTES_TO_EVALUATE) return true;
+ final Comparator<IpPrefix> prefixLengthComparator = IpPrefix.lengthComparator();
+ TreeSet<IpPrefix> ipv4Prefixes = new TreeSet<>(prefixLengthComparator);
+ TreeSet<IpPrefix> ipv6Prefixes = new TreeSet<>(prefixLengthComparator);
+ for (final RouteInfo route : routes) {
+ IpPrefix destination = route.getDestination();
+ if (destination.isIPv4()) {
+ ipv4Prefixes.add(destination);
+ } else {
+ ipv6Prefixes.add(destination);
+ }
+ }
+ if (NetworkUtils.routedIPv4AddressCount(ipv4Prefixes) > MOST_IPV4_ADDRESSES_COUNT) {
+ return true;
+ }
+ return NetworkUtils.routedIPv6AddressCount(ipv6Prefixes)
+ .compareTo(MOST_IPV6_ADDRESSES_COUNT) >= 0;
+ }
+
private void agentConnect() {
LinkProperties lp = makeLinkProperties();
- if (lp.hasIPv4DefaultRoute() || lp.hasIPv6DefaultRoute()) {
+ if (providesRoutesToMostDestinations(lp)) {
mNetworkCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
} else {
mNetworkCapabilities.removeCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
@@ -857,10 +909,14 @@
NetworkMisc networkMisc = new NetworkMisc();
networkMisc.allowBypass = mConfig.allowBypass && !mLockdown;
+ mNetworkCapabilities.setEstablishingVpnAppUid(Binder.getCallingUid());
+ mNetworkCapabilities.setUids(createUserAndRestrictedProfilesRanges(mUserHandle,
+ mConfig.allowedApplications, mConfig.disallowedApplications));
long token = Binder.clearCallingIdentity();
try {
mNetworkAgent = new NetworkAgent(mLooper, mContext, NETWORKTYPE /* logtag */,
- mNetworkInfo, mNetworkCapabilities, lp, 0 /* score */, networkMisc) {
+ mNetworkInfo, mNetworkCapabilities, lp,
+ ConnectivityConstants.VPN_DEFAULT_SCORE, networkMisc) {
@Override
public void unwanted() {
// We are user controlled, not driven by NetworkRequest.
@@ -869,11 +925,6 @@
} finally {
Binder.restoreCallingIdentity(token);
}
-
- mVpnUsers = createUserAndRestrictedProfilesRanges(mUserHandle,
- mConfig.allowedApplications, mConfig.disallowedApplications);
- mNetworkAgent.addUidRanges(mVpnUsers.toArray(new UidRange[mVpnUsers.size()]));
-
mNetworkInfo.setIsAvailable(true);
updateState(DetailedState.CONNECTED, "agentConnect");
}
@@ -953,7 +1004,7 @@
Connection oldConnection = mConnection;
NetworkAgent oldNetworkAgent = mNetworkAgent;
mNetworkAgent = null;
- Set<UidRange> oldUsers = mVpnUsers;
+ Set<UidRange> oldUsers = mNetworkCapabilities.getUids();
// Configure the interface. Abort if any of these steps fails.
ParcelFileDescriptor tun = ParcelFileDescriptor.adoptFd(jniCreate(config.mtu));
@@ -1011,7 +1062,7 @@
// restore old state
mConfig = oldConfig;
mConnection = oldConnection;
- mVpnUsers = oldUsers;
+ mNetworkCapabilities.setUids(oldUsers);
mNetworkAgent = oldNetworkAgent;
mInterface = oldInterface;
throw e;
@@ -1026,7 +1077,8 @@
// Returns true if the VPN has been established and the calling UID is its owner. Used to check
// that a call to mutate VPN state is admissible.
- private boolean isCallerEstablishedOwnerLocked() {
+ @VisibleForTesting
+ protected boolean isCallerEstablishedOwnerLocked() {
return isRunningLocked() && Binder.getCallingUid() == mOwnerUID;
}
@@ -1131,10 +1183,12 @@
// Returns the subset of the full list of active UID ranges the VPN applies to (mVpnUsers) that
// apply to userHandle.
- private List<UidRange> uidRangesForUser(int userHandle) {
+ static private List<UidRange> uidRangesForUser(int userHandle, Set<UidRange> existingRanges) {
+ // UidRange#createForUser returns the entire range of UIDs available to a macro-user.
+ // This is something like 0-99999 ; {@see UserHandle#PER_USER_RANGE}
final UidRange userRange = UidRange.createForUser(userHandle);
final List<UidRange> ranges = new ArrayList<UidRange>();
- for (UidRange range : mVpnUsers) {
+ for (UidRange range : existingRanges) {
if (userRange.containsRange(range)) {
ranges.add(range);
}
@@ -1142,30 +1196,18 @@
return ranges;
}
- private void removeVpnUserLocked(int userHandle) {
- if (mVpnUsers == null) {
- throw new IllegalStateException("VPN is not active");
- }
- final List<UidRange> ranges = uidRangesForUser(userHandle);
- if (mNetworkAgent != null) {
- mNetworkAgent.removeUidRanges(ranges.toArray(new UidRange[ranges.size()]));
- }
- mVpnUsers.removeAll(ranges);
- }
-
public void onUserAdded(int userHandle) {
// If the user is restricted tie them to the parent user's VPN
UserInfo user = UserManager.get(mContext).getUserInfo(userHandle);
if (user.isRestricted() && user.restrictedProfileParentId == mUserHandle) {
synchronized(Vpn.this) {
- if (mVpnUsers != null) {
+ final Set<UidRange> existingRanges = mNetworkCapabilities.getUids();
+ if (existingRanges != null) {
try {
- addUserToRanges(mVpnUsers, userHandle, mConfig.allowedApplications,
+ addUserToRanges(existingRanges, userHandle, mConfig.allowedApplications,
mConfig.disallowedApplications);
- if (mNetworkAgent != null) {
- final List<UidRange> ranges = uidRangesForUser(userHandle);
- mNetworkAgent.addUidRanges(ranges.toArray(new UidRange[ranges.size()]));
- }
+ mNetworkCapabilities.setUids(existingRanges);
+ updateCapabilities();
} catch (Exception e) {
Log.wtf(TAG, "Failed to add restricted user to owner", e);
}
@@ -1180,9 +1222,14 @@
UserInfo user = UserManager.get(mContext).getUserInfo(userHandle);
if (user.isRestricted() && user.restrictedProfileParentId == mUserHandle) {
synchronized(Vpn.this) {
- if (mVpnUsers != null) {
+ final Set<UidRange> existingRanges = mNetworkCapabilities.getUids();
+ if (existingRanges != null) {
try {
- removeVpnUserLocked(userHandle);
+ final List<UidRange> removedRanges =
+ uidRangesForUser(userHandle, existingRanges);
+ existingRanges.removeAll(removedRanges);
+ mNetworkCapabilities.setUids(existingRanges);
+ updateCapabilities();
} catch (Exception e) {
Log.wtf(TAG, "Failed to remove restricted user to owner", e);
}
@@ -1226,15 +1273,6 @@
private void setVpnForcedLocked(boolean enforce) {
final List<String> exemptedPackages =
isNullOrLegacyVpn(mPackage) ? null : Collections.singletonList(mPackage);
- setVpnForcedWithExemptionsLocked(enforce, exemptedPackages);
- }
-
- /**
- * @see #setVpnForcedLocked
- */
- @GuardedBy("this")
- private void setVpnForcedWithExemptionsLocked(boolean enforce,
- @Nullable List<String> exemptedPackages) {
final Set<UidRange> removedRanges = new ArraySet<>(mBlockedUsers);
Set<UidRange> addedRanges = Collections.emptySet();
@@ -1243,6 +1281,18 @@
/* allowedApplications */ null,
/* disallowedApplications */ exemptedPackages);
+ // The UID range of the first user (0-99999) would block the IPSec traffic, which comes
+ // directly from the kernel and is marked as uid=0. So we adjust the range to allow
+ // it through (b/69873852).
+ for (UidRange range : addedRanges) {
+ if (range.start == 0) {
+ addedRanges.remove(range);
+ if (range.stop != 0) {
+ addedRanges.add(new UidRange(1, range.stop));
+ }
+ }
+ }
+
removedRanges.removeAll(addedRanges);
addedRanges.removeAll(mBlockedUsers);
}
@@ -1314,7 +1364,7 @@
synchronized (Vpn.this) {
if (interfaze.equals(mInterface) && jniCheck(interfaze) == 0) {
mStatusIntent = null;
- mVpnUsers = null;
+ mNetworkCapabilities.setUids(null);
mConfig = null;
mInterface = null;
if (mConnection != null) {
@@ -1433,12 +1483,7 @@
if (!isRunningLocked()) {
return false;
}
- for (UidRange uidRange : mVpnUsers) {
- if (uidRange.contains(uid)) {
- return true;
- }
- }
- return false;
+ return mNetworkCapabilities.appliesToUid(uid);
}
/**
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 518f6c1..ba67c94 100644
--- a/services/core/java/com/android/server/connectivity/tethering/IPv6TetheringCoordinator.java
+++ b/services/core/java/com/android/server/connectivity/tethering/IPv6TetheringCoordinator.java
@@ -30,10 +30,8 @@
import java.net.Inet6Address;
import java.net.InetAddress;
-import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
import java.util.LinkedList;
import java.util.Random;
@@ -119,7 +117,7 @@
if (VDBG) {
Log.d(TAG, "updateUpstreamNetworkState: " + toDebugString(ns));
}
- if (!canTetherIPv6(ns, mLog)) {
+ if (TetheringInterfaceUtils.getIPv6Interface(ns) == null) {
stopIPv6TetheringOnAllInterfaces();
setUpstreamNetworkState(null);
return;
@@ -208,70 +206,6 @@
return null;
}
- private static boolean canTetherIPv6(NetworkState ns, SharedLog sharedLog) {
- // Broadly speaking:
- //
- // [1] does the upstream have an IPv6 default route?
- //
- // and
- //
- // [2] does the upstream have one or more global IPv6 /64s
- // dedicated to this device?
- //
- // In lieu of Prefix Delegation and other evaluation of whether a
- // prefix may or may not be dedicated to this device, for now just
- // check whether the upstream is TRANSPORT_CELLULAR. This works
- // 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) &&
- // At least one upstream DNS server:
- ns.linkProperties.isProvisioned() &&
- // Minimal amount of IPv6 provisioning:
- ns.linkProperties.hasIPv6DefaultRoute() &&
- ns.linkProperties.hasGlobalIPv6Address() &&
- // Temporary approximation of "dedicated prefix":
- ns.networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR);
-
- // For now, we do not support separate IPv4 and IPv6 upstreams (e.g.
- // tethering with 464xlat involved). TODO: Rectify this shortcoming,
- // likely by calling NetworkManagementService#startInterfaceForwarding()
- // for all upstream interfaces.
- RouteInfo v4default = null;
- RouteInfo v6default = null;
- if (canTether) {
- for (RouteInfo r : ns.linkProperties.getAllRoutes()) {
- if (r.isIPv4Default()) {
- v4default = r;
- } else if (r.isIPv6Default()) {
- v6default = r;
- }
-
- if (v4default != null && v6default != null) {
- break;
- }
- }
- }
-
- final boolean supportedConfiguration =
- (v4default != null) && (v6default != null) &&
- (v4default.getInterface() != null) &&
- v4default.getInterface().equals(v6default.getInterface());
-
- final boolean outcome = canTether && supportedConfiguration;
-
- if (ns == null) {
- sharedLog.log("No available upstream.");
- } else {
- sharedLog.log(String.format("IPv6 tethering is %s for upstream: %s",
- (outcome ? "available" : "not available"), toDebugString(ns)));
- }
-
- return outcome;
- }
-
private static LinkProperties getIPv6OnlyLinkProperties(LinkProperties lp) {
final LinkProperties v6only = new LinkProperties();
if (lp == null) {
diff --git a/services/core/java/com/android/server/connectivity/tethering/OffloadController.java b/services/core/java/com/android/server/connectivity/tethering/OffloadController.java
index cff216c..a3c2998 100644
--- a/services/core/java/com/android/server/connectivity/tethering/OffloadController.java
+++ b/services/core/java/com/android/server/connectivity/tethering/OffloadController.java
@@ -282,6 +282,7 @@
return stats;
}
+ @Override
public void setInterfaceQuota(String iface, long quotaBytes) {
mHandler.post(() -> {
if (quotaBytes == ITetheringStatsProvider.QUOTA_UNLIMITED) {
diff --git a/services/core/java/com/android/server/connectivity/tethering/OffloadHardwareInterface.java b/services/core/java/com/android/server/connectivity/tethering/OffloadHardwareInterface.java
index 76195c4..207f867 100644
--- a/services/core/java/com/android/server/connectivity/tethering/OffloadHardwareInterface.java
+++ b/services/core/java/com/android/server/connectivity/tethering/OffloadHardwareInterface.java
@@ -355,6 +355,7 @@
boolean success;
String errMsg;
+ @Override
public String toString() {
if (success) {
return "ok";
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
index 2224913..fbee86a 100644
--- a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
+++ b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
@@ -16,6 +16,8 @@
package com.android.server.connectivity.tethering;
+import static android.net.util.NetworkConstants.asByte;
+import static android.net.util.NetworkConstants.FF;
import static android.net.util.NetworkConstants.RFC7421_PREFIX_LENGTH;
import android.net.ConnectivityManager;
@@ -31,7 +33,7 @@
import android.net.ip.RouterAdvertisementDaemon;
import android.net.ip.RouterAdvertisementDaemon.RaParams;
import android.net.util.InterfaceParams;
-import android.net.util.NetdService;
+import android.net.util.InterfaceSet;
import android.net.util.SharedLog;
import android.os.INetworkManagementService;
import android.os.Looper;
@@ -49,12 +51,12 @@
import java.net.Inet6Address;
import java.net.InetAddress;
-import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Objects;
import java.util.Random;
+import java.util.Set;
/**
* Provides the interface to IP-layer serving functionality for a given network
@@ -64,6 +66,7 @@
*/
public class TetherInterfaceStateMachine extends StateMachine {
private static final IpPrefix LINK_LOCAL_PREFIX = new IpPrefix("fe80::/64");
+ private static final byte DOUG_ADAMS = (byte) 42;
private static final String USB_NEAR_IFACE_ADDR = "192.168.42.129";
private static final int USB_PREFIX_LENGTH = 24;
@@ -117,9 +120,11 @@
private final int mInterfaceType;
private final LinkProperties mLinkProperties;
+ private final TetheringDependencies mDeps;
+
private int mLastError;
private int mServingMode;
- private String mMyUpstreamIfaceName; // may change over time
+ private InterfaceSet mUpstreamIfaceSet; // may change over time
private InterfaceParams mInterfaceParams;
// TODO: De-duplicate this with mLinkProperties above. Currently, these link
// properties are those selected by the IPv6TetheringCoordinator and relayed
@@ -134,18 +139,19 @@
public TetherInterfaceStateMachine(
String ifaceName, Looper looper, int interfaceType, SharedLog log,
INetworkManagementService nMService, INetworkStatsService statsService,
- IControlsTethering tetherController) {
+ IControlsTethering tetherController,
+ TetheringDependencies deps) {
super(ifaceName, looper);
mLog = log.forSubComponent(ifaceName);
mNMService = nMService;
- // TODO: This should be passed in for testability.
- mNetd = NetdService.getInstance();
+ mNetd = deps.getNetdService();
mStatsService = statsService;
mTetherController = tetherController;
mInterfaceCtrl = new InterfaceController(ifaceName, nMService, mNetd, mLog);
mIfaceName = ifaceName;
mInterfaceType = interfaceType;
mLinkProperties = new LinkProperties();
+ mDeps = deps;
resetLinkProperties();
mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR;
mServingMode = IControlsTethering.STATE_AVAILABLE;
@@ -182,7 +188,12 @@
private boolean startIPv4() { return configureIPv4(true); }
- private void stopIPv4() { configureIPv4(false); }
+ private void stopIPv4() {
+ configureIPv4(false);
+ // NOTE: All of configureIPv4() will be refactored out of existence
+ // into calls to InterfaceController, shared with startIPv4().
+ mInterfaceCtrl.clearIPv4Address();
+ }
// TODO: Refactor this in terms of calls to InterfaceController.
private boolean configureIPv4(boolean enabled) {
@@ -196,7 +207,7 @@
ipAsString = USB_NEAR_IFACE_ADDR;
prefixLen = USB_PREFIX_LENGTH;
} else if (mInterfaceType == ConnectivityManager.TETHERING_WIFI) {
- ipAsString = WIFI_HOST_IFACE_ADDR;
+ ipAsString = getRandomWifiIPv4Address();
prefixLen = WIFI_HOST_IFACE_PREFIX_LENGTH;
} else {
// Nothing to do, BT does this elsewhere.
@@ -245,17 +256,25 @@
return true;
}
+ private String getRandomWifiIPv4Address() {
+ try {
+ byte[] bytes = NetworkUtils.numericToInetAddress(WIFI_HOST_IFACE_ADDR).getAddress();
+ bytes[3] = getRandomSanitizedByte(DOUG_ADAMS, asByte(0), asByte(1), FF);
+ return InetAddress.getByAddress(bytes).getHostAddress();
+ } catch (Exception e) {
+ return WIFI_HOST_IFACE_ADDR;
+ }
+ }
+
private boolean startIPv6() {
- // TODO: Refactor for better testability. This is one of the things
- // that prohibits unittesting IPv6 tethering setup.
- mInterfaceParams = InterfaceParams.getByName(mIfaceName);
+ mInterfaceParams = mDeps.getInterfaceParams(mIfaceName);
if (mInterfaceParams == null) {
mLog.e("Failed to find InterfaceParams");
stopIPv6();
return false;
}
- mRaDaemon = new RouterAdvertisementDaemon(mInterfaceParams);
+ mRaDaemon = mDeps.getRouterAdvertisementDaemon(mInterfaceParams);
if (!mRaDaemon.start()) {
stopIPv6();
return false;
@@ -621,10 +640,10 @@
}
private void cleanupUpstream() {
- if (mMyUpstreamIfaceName == null) return;
+ if (mUpstreamIfaceSet == null) return;
- cleanupUpstreamInterface(mMyUpstreamIfaceName);
- mMyUpstreamIfaceName = null;
+ for (String ifname : mUpstreamIfaceSet.ifnames) cleanupUpstreamInterface(ifname);
+ mUpstreamIfaceSet = null;
}
private void cleanupUpstreamInterface(String upstreamIface) {
@@ -660,34 +679,66 @@
mLog.e("CMD_TETHER_REQUESTED while already tethering.");
break;
case CMD_TETHER_CONNECTION_CHANGED:
- String newUpstreamIfaceName = (String)(message.obj);
- if ((mMyUpstreamIfaceName == null && newUpstreamIfaceName == null) ||
- (mMyUpstreamIfaceName != null &&
- mMyUpstreamIfaceName.equals(newUpstreamIfaceName))) {
+ final InterfaceSet newUpstreamIfaceSet = (InterfaceSet) message.obj;
+ if (noChangeInUpstreamIfaceSet(newUpstreamIfaceSet)) {
if (VDBG) Log.d(TAG, "Connection changed noop - dropping");
break;
}
- cleanupUpstream();
- if (newUpstreamIfaceName != null) {
+
+ if (newUpstreamIfaceSet == null) {
+ cleanupUpstream();
+ break;
+ }
+
+ for (String removed : upstreamInterfacesRemoved(newUpstreamIfaceSet)) {
+ cleanupUpstreamInterface(removed);
+ }
+
+ final Set<String> added = upstreamInterfacesAdd(newUpstreamIfaceSet);
+ // This makes the call to cleanupUpstream() in the error
+ // path for any interface neatly cleanup all the interfaces.
+ mUpstreamIfaceSet = newUpstreamIfaceSet;
+
+ for (String ifname : added) {
try {
- mNMService.enableNat(mIfaceName, newUpstreamIfaceName);
- mNMService.startInterfaceForwarding(mIfaceName,
- newUpstreamIfaceName);
+ mNMService.enableNat(mIfaceName, ifname);
+ mNMService.startInterfaceForwarding(mIfaceName, ifname);
} catch (Exception e) {
mLog.e("Exception enabling NAT: " + e);
- cleanupUpstreamInterface(newUpstreamIfaceName);
+ cleanupUpstream();
mLastError = ConnectivityManager.TETHER_ERROR_ENABLE_NAT_ERROR;
transitionTo(mInitialState);
return true;
}
}
- mMyUpstreamIfaceName = newUpstreamIfaceName;
break;
default:
return false;
}
return true;
}
+
+ private boolean noChangeInUpstreamIfaceSet(InterfaceSet newIfaces) {
+ if (mUpstreamIfaceSet == null && newIfaces == null) return true;
+ if (mUpstreamIfaceSet != null && newIfaces != null) {
+ return mUpstreamIfaceSet.equals(newIfaces);
+ }
+ return false;
+ }
+
+ private Set<String> upstreamInterfacesRemoved(InterfaceSet newIfaces) {
+ if (mUpstreamIfaceSet == null) return new HashSet<>();
+
+ final HashSet<String> removed = new HashSet<>(mUpstreamIfaceSet.ifnames);
+ removed.removeAll(newIfaces.ifnames);
+ return removed;
+ }
+
+ private Set<String> upstreamInterfacesAdd(InterfaceSet newIfaces) {
+ final HashSet<String> added = new HashSet<>(newIfaces.ifnames);
+ if (mUpstreamIfaceSet != null) added.removeAll(mUpstreamIfaceSet.ifnames);
+ return added;
+ }
}
/**
@@ -719,7 +770,7 @@
// Given a prefix like 2001:db8::/64 return an address like 2001:db8::1.
private static Inet6Address getLocalDnsIpFor(IpPrefix localPrefix) {
final byte[] dnsBytes = localPrefix.getRawAddress();
- dnsBytes[dnsBytes.length - 1] = getRandomNonZeroByte();
+ dnsBytes[dnsBytes.length - 1] = getRandomSanitizedByte(DOUG_ADAMS, asByte(0), asByte(1));
try {
return Inet6Address.getByAddress(null, dnsBytes, 0);
} catch (UnknownHostException e) {
@@ -728,10 +779,11 @@
}
}
- private static byte getRandomNonZeroByte() {
+ private static byte getRandomSanitizedByte(byte dflt, byte... excluded) {
final byte random = (byte) (new Random()).nextInt();
- // Don't pick the subnet-router anycast address, since that might be
- // in use on the upstream already.
- return (random != 0) ? random : 0x1;
+ for (int value : excluded) {
+ if (random == value) return dflt;
+ }
+ return random;
}
}
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
index acbc10b..454c579 100644
--- a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
+++ b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
@@ -21,12 +21,23 @@
import static android.net.ConnectivityManager.TYPE_MOBILE;
import static android.net.ConnectivityManager.TYPE_MOBILE_DUN;
import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI;
+import static com.android.internal.R.array.config_mobile_hotspot_provision_app;
+import static com.android.internal.R.array.config_tether_bluetooth_regexs;
+import static com.android.internal.R.array.config_tether_dhcp_range;
+import static com.android.internal.R.array.config_tether_usb_regexs;
+import static com.android.internal.R.array.config_tether_upstream_types;
+import static com.android.internal.R.array.config_tether_wifi_regexs;
+import static com.android.internal.R.string.config_mobile_hotspot_provision_app_no_ui;
import android.content.Context;
import android.content.res.Resources;
import android.net.ConnectivityManager;
-import android.telephony.TelephonyManager;
import android.net.util.SharedLog;
+import android.telephony.TelephonyManager;
+import android.text.TextUtils;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.R;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -49,6 +60,9 @@
public class TetheringConfiguration {
private static final String TAG = TetheringConfiguration.class.getSimpleName();
+ private static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+ @VisibleForTesting
public static final int DUN_NOT_REQUIRED = 0;
public static final int DUN_REQUIRED = 1;
public static final int DUN_UNSPECIFIED = 2;
@@ -76,18 +90,18 @@
public final String[] dhcpRanges;
public final String[] defaultIPv4DNS;
+ public final String[] provisioningApp;
+ public final String provisioningAppNoUi;
+
public TetheringConfiguration(Context ctx, SharedLog log) {
final SharedLog configLog = log.forSubComponent("config");
- tetherableUsbRegexs = ctx.getResources().getStringArray(
- com.android.internal.R.array.config_tether_usb_regexs);
+ tetherableUsbRegexs = getResourceStringArray(ctx, config_tether_usb_regexs);
// TODO: Evaluate deleting this altogether now that Wi-Fi always passes
// us an interface name. Careful consideration needs to be given to
// implications for Settings and for provisioning checks.
- tetherableWifiRegexs = ctx.getResources().getStringArray(
- com.android.internal.R.array.config_tether_wifi_regexs);
- tetherableBluetoothRegexs = ctx.getResources().getStringArray(
- com.android.internal.R.array.config_tether_bluetooth_regexs);
+ tetherableWifiRegexs = getResourceStringArray(ctx, config_tether_wifi_regexs);
+ tetherableBluetoothRegexs = getResourceStringArray(ctx, config_tether_bluetooth_regexs);
dunCheck = checkDunRequired(ctx);
configLog.log("DUN check returned: " + dunCheckString(dunCheck));
@@ -98,6 +112,9 @@
dhcpRanges = getDhcpRanges(ctx);
defaultIPv4DNS = copy(DEFAULT_IPV4_DNS);
+ provisioningApp = getResourceStringArray(ctx, config_mobile_hotspot_provision_app);
+ provisioningAppNoUi = getProvisioningAppNoUi(ctx);
+
configLog.log(toString());
}
@@ -113,6 +130,10 @@
return matchesDownstreamRegexs(iface, tetherableBluetoothRegexs);
}
+ public boolean hasMobileHotspotProvisionApp() {
+ return !TextUtils.isEmpty(provisioningAppNoUi);
+ }
+
public void dump(PrintWriter pw) {
dumpStringArray(pw, "tetherableUsbRegexs", tetherableUsbRegexs);
dumpStringArray(pw, "tetherableWifiRegexs", tetherableWifiRegexs);
@@ -126,6 +147,10 @@
dumpStringArray(pw, "dhcpRanges", dhcpRanges);
dumpStringArray(pw, "defaultIPv4DNS", defaultIPv4DNS);
+
+ dumpStringArray(pw, "provisioningApp", provisioningApp);
+ pw.print("provisioningAppNoUi: ");
+ pw.println(provisioningAppNoUi);
}
public String toString() {
@@ -137,6 +162,8 @@
sj.add(String.format("isDunRequired:%s", isDunRequired));
sj.add(String.format("preferredUpstreamIfaceTypes:%s",
makeString(preferredUpstreamNames(preferredUpstreamIfaceTypes))));
+ sj.add(String.format("provisioningApp:%s", makeString(provisioningApp)));
+ sj.add(String.format("provisioningAppNoUi:%s", provisioningAppNoUi));
return String.format("TetheringConfiguration{%s}", sj.toString());
}
@@ -156,6 +183,7 @@
}
private static String makeString(String[] strings) {
+ if (strings == null) return "null";
final StringJoiner sj = new StringJoiner(",", "[", "]");
for (String s : strings) sj.add(s);
return sj.toString();
@@ -192,8 +220,7 @@
}
private static Collection<Integer> getUpstreamIfaceTypes(Context ctx, int dunCheck) {
- final int ifaceTypes[] = ctx.getResources().getIntArray(
- com.android.internal.R.array.config_tether_upstream_types);
+ final int ifaceTypes[] = ctx.getResources().getIntArray(config_tether_upstream_types);
final ArrayList<Integer> upstreamIfaceTypes = new ArrayList<>(ifaceTypes.length);
for (int i : ifaceTypes) {
switch (i) {
@@ -244,14 +271,30 @@
}
private static String[] getDhcpRanges(Context ctx) {
- final String[] fromResource = ctx.getResources().getStringArray(
- com.android.internal.R.array.config_tether_dhcp_range);
+ final String[] fromResource = getResourceStringArray(ctx, config_tether_dhcp_range);
if ((fromResource.length > 0) && (fromResource.length % 2 == 0)) {
return fromResource;
}
return copy(DHCP_DEFAULT_RANGE);
}
+ private static String getProvisioningAppNoUi(Context ctx) {
+ try {
+ return ctx.getResources().getString(config_mobile_hotspot_provision_app_no_ui);
+ } catch (Resources.NotFoundException e) {
+ return "";
+ }
+ }
+
+ private static String[] getResourceStringArray(Context ctx, int resId) {
+ try {
+ final String[] strArray = ctx.getResources().getStringArray(resId);
+ return (strArray != null) ? strArray : EMPTY_STRING_ARRAY;
+ } catch (Resources.NotFoundException e404) {
+ return EMPTY_STRING_ARRAY;
+ }
+ }
+
private static String[] copy(String[] strarray) {
return Arrays.copyOf(strarray, strarray.length);
}
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetheringDependencies.java b/services/core/java/com/android/server/connectivity/tethering/TetheringDependencies.java
index b8174b6..0ac7a36 100644
--- a/services/core/java/com/android/server/connectivity/tethering/TetheringDependencies.java
+++ b/services/core/java/com/android/server/connectivity/tethering/TetheringDependencies.java
@@ -16,9 +16,18 @@
package com.android.server.connectivity.tethering;
+import android.content.Context;
+import android.net.INetd;
+import android.net.ip.RouterAdvertisementDaemon;
+import android.net.util.InterfaceParams;
+import android.net.util.NetdService;
import android.os.Handler;
import android.net.util.SharedLog;
+import com.android.internal.util.StateMachine;
+
+import java.util.ArrayList;
+
/**
* Capture tethering dependencies, for injection.
@@ -29,4 +38,30 @@
public OffloadHardwareInterface getOffloadHardwareInterface(Handler h, SharedLog log) {
return new OffloadHardwareInterface(h, log);
}
+
+ public UpstreamNetworkMonitor getUpstreamNetworkMonitor(Context ctx, StateMachine target,
+ SharedLog log, int what) {
+ return new UpstreamNetworkMonitor(ctx, target, log, what);
+ }
+
+ public IPv6TetheringCoordinator getIPv6TetheringCoordinator(
+ ArrayList<TetherInterfaceStateMachine> notifyList, SharedLog log) {
+ return new IPv6TetheringCoordinator(notifyList, log);
+ }
+
+ public RouterAdvertisementDaemon getRouterAdvertisementDaemon(InterfaceParams ifParams) {
+ return new RouterAdvertisementDaemon(ifParams);
+ }
+
+ public InterfaceParams getInterfaceParams(String ifName) {
+ return InterfaceParams.getByName(ifName);
+ }
+
+ public INetd getNetdService() {
+ return NetdService.getInstance();
+ }
+
+ public boolean isTetheringSupported() {
+ return true;
+ }
}
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java b/services/core/java/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java
new file mode 100644
index 0000000..6c7ff91
--- /dev/null
+++ b/services/core/java/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java
@@ -0,0 +1,90 @@
+/*
+ * 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.
+ */
+
+package com.android.server.connectivity.tethering;
+
+import android.annotation.Nullable;
+import android.net.LinkProperties;
+import android.net.NetworkCapabilities;
+import android.net.NetworkState;
+import android.net.RouteInfo;
+import android.net.util.InterfaceSet;
+
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+
+/**
+ * @hide
+ */
+public final class TetheringInterfaceUtils {
+ /**
+ * Get upstream interfaces for tethering based on default routes for IPv4/IPv6.
+ * @return null if there is no usable interface, or a set of at least one interface otherwise.
+ */
+ public static @Nullable InterfaceSet getTetheringInterfaces(NetworkState ns) {
+ if (ns == null) {
+ return null;
+ }
+
+ final LinkProperties lp = ns.linkProperties;
+ final String if4 = getInterfaceForDestination(lp, Inet4Address.ANY);
+ final String if6 = getIPv6Interface(ns);
+
+ return (if4 == null && if6 == null) ? null : new InterfaceSet(if4, if6);
+ }
+
+ /**
+ * Get the upstream interface for IPv6 tethering.
+ * @return null if there is no usable interface, or the interface name otherwise.
+ */
+ public static @Nullable String getIPv6Interface(NetworkState ns) {
+ // Broadly speaking:
+ //
+ // [1] does the upstream have an IPv6 default route?
+ //
+ // and
+ //
+ // [2] does the upstream have one or more global IPv6 /64s
+ // dedicated to this device?
+ //
+ // In lieu of Prefix Delegation and other evaluation of whether a
+ // prefix may or may not be dedicated to this device, for now just
+ // check whether the upstream is TRANSPORT_CELLULAR. This works
+ // 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) &&
+ // At least one upstream DNS server:
+ ns.linkProperties.hasIPv6DnsServer() &&
+ // Minimal amount of IPv6 provisioning:
+ ns.linkProperties.hasGlobalIPv6Address() &&
+ // Temporary approximation of "dedicated prefix":
+ ns.networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR);
+
+ return canTether
+ ? getInterfaceForDestination(ns.linkProperties, Inet6Address.ANY)
+ : null;
+ }
+
+ private static String getInterfaceForDestination(LinkProperties lp, InetAddress dst) {
+ final RouteInfo ri = (lp != null)
+ ? RouteInfo.selectBestRoute(lp.getAllRoutes(), dst)
+ : null;
+ return (ri != null) ? ri.getInterface() : null;
+ }
+}
diff --git a/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java b/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java
index b35ed75..3413291 100644
--- a/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java
@@ -24,6 +24,7 @@
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
+import android.os.Process;
import android.net.ConnectivityManager;
import android.net.ConnectivityManager.NetworkCallback;
import android.net.IpPrefix;
@@ -476,6 +477,7 @@
ConnectivityManager.getNetworkTypeName(type));
continue;
}
+ nc.setSingleUid(Process.myUid());
for (NetworkState value : netStates) {
if (!nc.satisfiedByNetworkCapabilities(value.networkCapabilities)) {
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
old mode 100644
new mode 100755
index fb8f694..f6b032e
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
@@ -659,7 +659,8 @@
@ServiceThreadOnly
void startQueuedActions() {
assertRunOnServiceThread();
- for (HdmiCecFeatureAction action : mActions) {
+ // Use copied action list in that start() may remove itself.
+ for (HdmiCecFeatureAction action : new ArrayList<>(mActions)) {
if (!action.started()) {
Slog.i(TAG, "Starting queued action:" + action);
action.start();
diff --git a/services/core/java/com/android/server/location/FlpHardwareProvider.java b/services/core/java/com/android/server/location/FlpHardwareProvider.java
deleted file mode 100644
index 5c9b0ea..0000000
--- a/services/core/java/com/android/server/location/FlpHardwareProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2013 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 com.android.server.location;
-
-import android.content.Context;
-import android.hardware.location.IFusedLocationHardware;
-import android.location.IFusedGeofenceHardware;
-import android.util.Log;
-
-/**
- * This class was an interop layer for JVM types and the JNI code that interacted
- * with the FLP HAL implementation.
- *
- * Now, after Treble FLP & GNSS HAL simplification, it is a thin shell that acts like the
- * pre-existing cases where there was no FLP Hardware support, to keep legacy users of this
- * class operating.
- *
- * {@hide}
- * {@Deprecated}
- */
-public class FlpHardwareProvider {
- private static FlpHardwareProvider sSingletonInstance = null;
-
- private final static String TAG = "FlpHardwareProvider";
-
- private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
-
- public static FlpHardwareProvider getInstance(Context context) {
- if (sSingletonInstance == null) {
- sSingletonInstance = new FlpHardwareProvider();
- if (DEBUG) Log.d(TAG, "getInstance() created empty provider");
- }
- return sSingletonInstance;
- }
-
- private FlpHardwareProvider() {
- }
-
- public static boolean isSupported() {
- if (DEBUG) Log.d(TAG, "isSupported() returning false");
- return false;
- }
-
- /**
- * Interface implementations for services built on top of this functionality.
- */
- public static final String LOCATION = "Location";
-
- public IFusedLocationHardware getLocationHardware() {
- return null;
- }
-
- public IFusedGeofenceHardware getGeofenceHardware() {
- return null;
- }
-
- public void cleanup() {
- if (DEBUG) Log.d(TAG, "empty cleanup()");
- }
-}
diff --git a/services/core/java/com/android/server/location/FusedLocationHardwareSecure.java b/services/core/java/com/android/server/location/FusedLocationHardwareSecure.java
deleted file mode 100644
index a08d326..0000000
--- a/services/core/java/com/android/server/location/FusedLocationHardwareSecure.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2013 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 com.android.server.location;
-
-import android.content.Context;
-import android.hardware.location.IFusedLocationHardware;
-import android.hardware.location.IFusedLocationHardwareSink;
-import android.location.FusedBatchOptions;
-import android.os.RemoteException;
-
-/**
- * FusedLocationHardware decorator that adds permission checking.
- * @hide
- */
-public class FusedLocationHardwareSecure extends IFusedLocationHardware.Stub {
- private final IFusedLocationHardware mLocationHardware;
- private final Context mContext;
- private final String mPermissionId;
-
- public FusedLocationHardwareSecure(
- IFusedLocationHardware locationHardware,
- Context context,
- String permissionId) {
- mLocationHardware = locationHardware;
- mContext = context;
- mPermissionId = permissionId;
- }
-
- private void checkPermissions() {
- mContext.enforceCallingPermission(
- mPermissionId,
- String.format(
- "Permission '%s' not granted to access FusedLocationHardware",
- mPermissionId));
- }
-
- @Override
- public void registerSink(IFusedLocationHardwareSink eventSink) throws RemoteException {
- checkPermissions();
- mLocationHardware.registerSink(eventSink);
- }
-
- @Override
- public void unregisterSink(IFusedLocationHardwareSink eventSink) throws RemoteException {
- checkPermissions();
- mLocationHardware.unregisterSink(eventSink);
- }
-
- @Override
- public int getSupportedBatchSize() throws RemoteException {
- checkPermissions();
- return mLocationHardware.getSupportedBatchSize();
- }
-
- @Override
- public void startBatching(int id, FusedBatchOptions batchOptions) throws RemoteException {
- checkPermissions();
- mLocationHardware.startBatching(id, batchOptions);
- }
-
- @Override
- public void stopBatching(int id) throws RemoteException {
- checkPermissions();
- mLocationHardware.stopBatching(id);
- }
-
- @Override
- public void updateBatchingOptions(
- int id,
- FusedBatchOptions batchoOptions
- ) throws RemoteException {
- checkPermissions();
- mLocationHardware.updateBatchingOptions(id, batchoOptions);
- }
-
- @Override
- public void requestBatchOfLocations(int batchSizeRequested) throws RemoteException {
- checkPermissions();
- mLocationHardware.requestBatchOfLocations(batchSizeRequested);
- }
-
- @Override
- public boolean supportsDiagnosticDataInjection() throws RemoteException {
- checkPermissions();
- return mLocationHardware.supportsDiagnosticDataInjection();
- }
-
- @Override
- public void injectDiagnosticData(String data) throws RemoteException {
- checkPermissions();
- mLocationHardware.injectDiagnosticData(data);
- }
-
- @Override
- public boolean supportsDeviceContextInjection() throws RemoteException {
- checkPermissions();
- return mLocationHardware.supportsDeviceContextInjection();
- }
-
- @Override
- public void injectDeviceContext(int deviceEnabledContext) throws RemoteException {
- checkPermissions();
- mLocationHardware.injectDeviceContext(deviceEnabledContext);
- }
-
- @Override
- public void flushBatchedLocations() throws RemoteException {
- checkPermissions();
- mLocationHardware.flushBatchedLocations();
- }
-
- @Override
- public int getVersion() throws RemoteException {
- checkPermissions();
- return mLocationHardware.getVersion();
- }
-}
diff --git a/services/core/java/com/android/server/location/FusedProxy.java b/services/core/java/com/android/server/location/FusedProxy.java
deleted file mode 100644
index f7fac77..0000000
--- a/services/core/java/com/android/server/location/FusedProxy.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2013 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 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 com.android.server.location;
-
-import com.android.server.ServiceWatcher;
-
-import android.Manifest;
-import android.content.Context;
-import android.hardware.location.IFusedLocationHardware;
-import android.location.IFusedProvider;
-import android.os.Handler;
-import android.os.RemoteException;
-import android.util.Log;
-
-/**
- * Proxy that helps bind GCore FusedProvider implementations to the Fused Hardware instances.
- *
- * @hide
- */
-public final class FusedProxy {
- private final String TAG = "FusedProxy";
- private final ServiceWatcher mServiceWatcher;
- private final FusedLocationHardwareSecure mLocationHardware;
-
- /**
- * Constructor of the class.
- * This is private as the class follows a factory pattern for construction.
- *
- * @param context The context needed for construction.
- * @param handler The handler needed for construction.
- * @param locationHardware The instance of the Fused location hardware assigned to the proxy.
- */
- private FusedProxy(
- Context context,
- Handler handler,
- IFusedLocationHardware locationHardware,
- int overlaySwitchResId,
- int defaultServicePackageNameResId,
- int initialPackageNameResId) {
- mLocationHardware = new FusedLocationHardwareSecure(
- locationHardware,
- context,
- Manifest.permission.LOCATION_HARDWARE);
- Runnable newServiceWork = new Runnable() {
- @Override
- public void run() {
- bindProvider(mLocationHardware);
- }
- };
-
- // prepare the connection to the provider
- mServiceWatcher = new ServiceWatcher(
- context,
- TAG,
- "com.android.location.service.FusedProvider",
- overlaySwitchResId,
- defaultServicePackageNameResId,
- initialPackageNameResId,
- newServiceWork,
- handler);
- }
-
- /**
- * Creates an instance of the proxy and binds it to the appropriate FusedProvider.
- *
- * @param context The context needed for construction.
- * @param handler The handler needed for construction.
- * @param locationHardware The instance of the Fused location hardware assigned to the proxy.
- *
- * @return An instance of the proxy if it could be bound, null otherwise.
- */
- public static FusedProxy createAndBind(
- Context context,
- Handler handler,
- IFusedLocationHardware locationHardware,
- int overlaySwitchResId,
- int defaultServicePackageNameResId,
- int initialPackageNameResId) {
- FusedProxy fusedProxy = new FusedProxy(
- context,
- handler,
- locationHardware,
- overlaySwitchResId,
- defaultServicePackageNameResId,
- initialPackageNameResId);
-
- // try to bind the Fused provider
- if (!fusedProxy.mServiceWatcher.start()) {
- return null;
- }
-
- return fusedProxy;
- }
-
- /**
- * Helper function to bind the FusedLocationHardware to the appropriate FusedProvider instance.
- *
- * @param locationHardware The FusedLocationHardware instance to use for the binding operation.
- */
- private void bindProvider(IFusedLocationHardware locationHardware) {
- IFusedProvider provider = IFusedProvider.Stub.asInterface(mServiceWatcher.getBinder());
-
- if (provider == null) {
- Log.e(TAG, "No instance of FusedProvider found on FusedLocationHardware connected.");
- return;
- }
-
- try {
- provider.onFusedLocationHardwareChange(locationHardware);
- } catch (RemoteException e) {
- Log.e(TAG, e.toString());
- }
- }
-}
diff --git a/services/core/java/com/android/server/net/IpConfigStore.java b/services/core/java/com/android/server/net/IpConfigStore.java
index 4d56468..e3e02e3 100644
--- a/services/core/java/com/android/server/net/IpConfigStore.java
+++ b/services/core/java/com/android/server/net/IpConfigStore.java
@@ -24,11 +24,11 @@
import android.net.ProxyInfo;
import android.net.RouteInfo;
import android.net.StaticIpConfiguration;
+import android.util.ArrayMap;
import android.util.Log;
import android.util.SparseArray;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.net.DelayedDiskWrite;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
@@ -38,8 +38,8 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
-import java.net.InetAddress;
import java.net.Inet4Address;
+import java.net.InetAddress;
public class IpConfigStore {
private static final String TAG = "IpConfigStore";
@@ -60,7 +60,7 @@
protected static final String EXCLUSION_LIST_KEY = "exclusionList";
protected static final String EOS = "eos";
- protected static final int IPCONFIG_FILE_VERSION = 2;
+ protected static final int IPCONFIG_FILE_VERSION = 3;
public IpConfigStore(DelayedDiskWrite writer) {
mWriter = writer;
@@ -70,9 +70,14 @@
this(new DelayedDiskWrite());
}
+ private static boolean writeConfig(DataOutputStream out, String configKey,
+ IpConfiguration config) throws IOException {
+ return writeConfig(out, configKey, config, IPCONFIG_FILE_VERSION);
+ }
+
@VisibleForTesting
- public static boolean writeConfig(DataOutputStream out, int configKey,
- IpConfiguration config) throws IOException {
+ public static boolean writeConfig(DataOutputStream out, String configKey,
+ IpConfiguration config, int version) throws IOException {
boolean written = false;
try {
@@ -153,7 +158,11 @@
if (written) {
out.writeUTF(ID_KEY);
- out.writeInt(configKey);
+ if (version < 3) {
+ out.writeInt(Integer.valueOf(configKey));
+ } else {
+ out.writeUTF(configKey);
+ }
}
} catch (NullPointerException e) {
loge("Failure in writing " + config + e);
@@ -163,18 +172,47 @@
return written;
}
- public void writeIpAndProxyConfigurations(String filePath,
+ /**
+ * @Deprecated use {@link #writeIpConfigurations(String, ArrayMap)} instead.
+ * New method uses string as network identifier which could be interface name or MAC address or
+ * other token.
+ */
+ @Deprecated
+ public void writeIpAndProxyConfigurationsToFile(String filePath,
final SparseArray<IpConfiguration> networks) {
- mWriter.write(filePath, new DelayedDiskWrite.Writer() {
- public void onWriteCalled(DataOutputStream out) throws IOException{
- out.writeInt(IPCONFIG_FILE_VERSION);
- for(int i = 0; i < networks.size(); i++) {
- writeConfig(out, networks.keyAt(i), networks.valueAt(i));
- }
+ mWriter.write(filePath, out -> {
+ out.writeInt(IPCONFIG_FILE_VERSION);
+ for(int i = 0; i < networks.size(); i++) {
+ writeConfig(out, String.valueOf(networks.keyAt(i)), networks.valueAt(i));
}
});
}
+ public void writeIpConfigurations(String filePath,
+ ArrayMap<String, IpConfiguration> networks) {
+ mWriter.write(filePath, out -> {
+ out.writeInt(IPCONFIG_FILE_VERSION);
+ for(int i = 0; i < networks.size(); i++) {
+ writeConfig(out, networks.keyAt(i), networks.valueAt(i));
+ }
+ });
+ }
+
+ public static ArrayMap<String, IpConfiguration> readIpConfigurations(String filePath) {
+ BufferedInputStream bufferedInputStream;
+ try {
+ bufferedInputStream = new BufferedInputStream(new FileInputStream(filePath));
+ } catch (FileNotFoundException e) {
+ // Return an empty array here because callers expect an empty array when the file is
+ // not present.
+ loge("Error opening configuration file: " + e);
+ return new ArrayMap<>(0);
+ }
+ return readIpConfigurations(bufferedInputStream);
+ }
+
+ /** @Deprecated use {@link #readIpConfigurations(String)} */
+ @Deprecated
public static SparseArray<IpConfiguration> readIpAndProxyConfigurations(String filePath) {
BufferedInputStream bufferedInputStream;
try {
@@ -188,21 +226,40 @@
return readIpAndProxyConfigurations(bufferedInputStream);
}
+ /** @Deprecated use {@link #readIpConfigurations(InputStream)} */
+ @Deprecated
public static SparseArray<IpConfiguration> readIpAndProxyConfigurations(
InputStream inputStream) {
- SparseArray<IpConfiguration> networks = new SparseArray<IpConfiguration>();
+ ArrayMap<String, IpConfiguration> networks = readIpConfigurations(inputStream);
+ if (networks == null) {
+ return null;
+ }
+
+ SparseArray<IpConfiguration> networksById = new SparseArray<>();
+ for (int i = 0; i < networks.size(); i++) {
+ int id = Integer.valueOf(networks.keyAt(i));
+ networksById.put(id, networks.valueAt(i));
+ }
+
+ return networksById;
+ }
+
+ /** Returns a map of network identity token and {@link IpConfiguration}. */
+ public static ArrayMap<String, IpConfiguration> readIpConfigurations(
+ InputStream inputStream) {
+ ArrayMap<String, IpConfiguration> networks = new ArrayMap<>();
DataInputStream in = null;
try {
in = new DataInputStream(inputStream);
int version = in.readInt();
- if (version != 2 && version != 1) {
+ if (version != 3 && version != 2 && version != 1) {
loge("Bad version on IP configuration file, ignore read");
return null;
}
while (true) {
- int id = -1;
+ String uniqueToken = null;
// Default is DHCP with no proxy
IpAssignment ipAssignment = IpAssignment.DHCP;
ProxySettings proxySettings = ProxySettings.NONE;
@@ -217,7 +274,12 @@
key = in.readUTF();
try {
if (key.equals(ID_KEY)) {
- id = in.readInt();
+ if (version < 3) {
+ int id = in.readInt();
+ uniqueToken = String.valueOf(id);
+ } else {
+ uniqueToken = in.readUTF();
+ }
} else if (key.equals(IP_ASSIGNMENT_KEY)) {
ipAssignment = IpAssignment.valueOf(in.readUTF());
} else if (key.equals(LINK_ADDRESS_KEY)) {
@@ -280,9 +342,9 @@
}
} while (true);
- if (id != -1) {
+ if (uniqueToken != null) {
IpConfiguration config = new IpConfiguration();
- networks.put(id, config);
+ networks.put(uniqueToken, config);
switch (ipAssignment) {
case STATIC:
diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java
index 78fd4b4..e5cf394 100644
--- a/services/core/java/com/android/server/net/NetworkStatsService.java
+++ b/services/core/java/com/android/server/net/NetworkStatsService.java
@@ -27,6 +27,7 @@
import static android.net.ConnectivityManager.isNetworkTypeMobile;
import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
import static android.net.NetworkStats.IFACE_ALL;
+import static android.net.NetworkStats.INTERFACES_ALL;
import static android.net.NetworkStats.METERED_ALL;
import static android.net.NetworkStats.ROAMING_ALL;
import static android.net.NetworkStats.SET_ALL;
@@ -34,6 +35,7 @@
import static android.net.NetworkStats.SET_FOREGROUND;
import static android.net.NetworkStats.STATS_PER_IFACE;
import static android.net.NetworkStats.STATS_PER_UID;
+import static android.net.NetworkStats.TAG_ALL;
import static android.net.NetworkStats.TAG_NONE;
import static android.net.NetworkStats.UID_ALL;
import static android.net.NetworkStatsHistory.FIELD_ALL;
@@ -128,6 +130,7 @@
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.net.NetworkStatsFactory;
import com.android.internal.net.VpnInfo;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.DumpUtils;
@@ -153,8 +156,7 @@
static final boolean LOGV = false;
private static final int MSG_PERFORM_POLL = 1;
- private static final int MSG_UPDATE_IFACES = 2;
- private static final int MSG_REGISTER_GLOBAL_ALERT = 3;
+ private static final int MSG_REGISTER_GLOBAL_ALERT = 2;
/** Flags to control detail level of poll event. */
private static final int FLAG_PERSIST_NETWORK = 0x1;
@@ -177,6 +179,8 @@
private final PowerManager.WakeLock mWakeLock;
+ private final boolean mUseBpfTrafficStats;
+
private IConnectivityManager mConnManager;
@VisibleForTesting
@@ -326,6 +330,7 @@
mStatsObservers = checkNotNull(statsObservers, "missing NetworkStatsObservers");
mSystemDir = checkNotNull(systemDir, "missing systemDir");
mBaseDir = checkNotNull(baseDir, "missing baseDir");
+ mUseBpfTrafficStats = new File("/sys/fs/bpf/traffic_uid_stats_map").exists();
}
@VisibleForTesting
@@ -727,7 +732,8 @@
final long token = Binder.clearCallingIdentity();
final NetworkStats networkLayer;
try {
- networkLayer = mNetworkManager.getNetworkStatsUidDetail(uid);
+ networkLayer = mNetworkManager.getNetworkStatsUidDetail(uid,
+ NetworkStats.INTERFACES_ALL);
} finally {
Binder.restoreCallingIdentity(token);
}
@@ -749,6 +755,18 @@
}
@Override
+ public NetworkStats getDetailedUidStats(String[] requiredIfaces) {
+ try {
+ final String[] ifacesToQuery =
+ NetworkStatsFactory.augmentWithStackedInterfaces(requiredIfaces);
+ return getNetworkStatsUidDetail(ifacesToQuery);
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Error compiling UID stats", e);
+ return new NetworkStats(0L, 0);
+ }
+ }
+
+ @Override
public String[] getMobileIfaces() {
return mMobileIfaces;
}
@@ -887,17 +905,21 @@
@Override
public long getUidStats(int uid, int type) {
- return nativeGetUidStat(uid, type);
+ return nativeGetUidStat(uid, type, checkBpfStatsEnable());
}
@Override
public long getIfaceStats(String iface, int type) {
- return nativeGetIfaceStat(iface, type);
+ return nativeGetIfaceStat(iface, type, checkBpfStatsEnable());
}
@Override
public long getTotalStats(int type) {
- return nativeGetTotalStat(type);
+ return nativeGetTotalStat(type, checkBpfStatsEnable());
+ }
+
+ private boolean checkBpfStatsEnable() {
+ return mUseBpfTrafficStats;
}
/**
@@ -1106,6 +1128,8 @@
if (isMobile) {
mobileIfaces.add(stackedIface);
}
+
+ NetworkStatsFactory.noteStackedIface(stackedIface, baseIface);
}
}
}
@@ -1127,7 +1151,7 @@
private void recordSnapshotLocked(long currentTime) throws RemoteException {
// snapshot and record current counters; read UID stats first to
// avoid over counting dev stats.
- final NetworkStats uidSnapshot = getNetworkStatsUidDetail();
+ final NetworkStats uidSnapshot = getNetworkStatsUidDetail(INTERFACES_ALL);
final NetworkStats xtSnapshot = getNetworkStatsXt();
final NetworkStats devSnapshot = mNetworkManager.getNetworkStatsSummaryDev();
@@ -1461,12 +1485,21 @@
* Return snapshot of current UID statistics, including any
* {@link TrafficStats#UID_TETHERING}, video calling data usage, and {@link #mUidOperations}
* values.
+ *
+ * @param ifaces A list of interfaces the stats should be restricted to, or
+ * {@link NetworkStats#INTERFACES_ALL}.
*/
- private NetworkStats getNetworkStatsUidDetail() throws RemoteException {
- final NetworkStats uidSnapshot = mNetworkManager.getNetworkStatsUidDetail(UID_ALL);
+ private NetworkStats getNetworkStatsUidDetail(String[] ifaces)
+ throws RemoteException {
+
+ // TODO: remove 464xlat adjustments from NetworkStatsFactory and apply all at once here.
+ final NetworkStats uidSnapshot = mNetworkManager.getNetworkStatsUidDetail(UID_ALL,
+ ifaces);
// fold tethering stats and operations into uid snapshot
final NetworkStats tetherSnapshot = getNetworkStatsTethering(STATS_PER_UID);
+ tetherSnapshot.filter(UID_ALL, ifaces, TAG_ALL);
+ NetworkStatsFactory.apply464xlatAdjustments(uidSnapshot, tetherSnapshot);
uidSnapshot.combineAllValues(tetherSnapshot);
final TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService(
@@ -1475,8 +1508,11 @@
// fold video calling data usage stats into uid snapshot
final NetworkStats vtStats = telephonyManager.getVtDataUsage(STATS_PER_UID);
if (vtStats != null) {
+ vtStats.filter(UID_ALL, ifaces, TAG_ALL);
+ NetworkStatsFactory.apply464xlatAdjustments(uidSnapshot, vtStats);
uidSnapshot.combineAllValues(vtStats);
}
+
uidSnapshot.combineAllValues(mUidOperations);
return uidSnapshot;
@@ -1529,10 +1565,6 @@
mService.performPoll(flags);
return true;
}
- case MSG_UPDATE_IFACES: {
- mService.updateIfaces(null);
- return true;
- }
case MSG_REGISTER_GLOBAL_ALERT: {
mService.registerGlobalAlert();
return true;
@@ -1668,7 +1700,7 @@
private static int TYPE_TCP_RX_PACKETS;
private static int TYPE_TCP_TX_PACKETS;
- private static native long nativeGetTotalStat(int type);
- private static native long nativeGetIfaceStat(String iface, int type);
- private static native long nativeGetUidStat(int uid, int type);
+ private static native long nativeGetTotalStat(int type, boolean useBpfStats);
+ private static native long nativeGetIfaceStat(String iface, int type, boolean useBpfStats);
+ private static native long nativeGetUidStat(int uid, int type, boolean useBpfStats);
}
diff --git a/services/core/java/com/android/server/net/OWNERS b/services/core/java/com/android/server/net/OWNERS
index 5d4287b..64dc98e 100644
--- a/services/core/java/com/android/server/net/OWNERS
+++ b/services/core/java/com/android/server/net/OWNERS
@@ -1,7 +1,6 @@
set noparent
ek@google.com
-hugobenichi@google.com
jchalard@google.com
jsharkey@android.com
lorenzo@google.com
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index 625764c..9f6a0d30 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -844,7 +844,11 @@
Slog.v(TAG, " disconnecting old " + getCaption() + ": " + info.service);
removeServiceLocked(i);
if (info.connection != null) {
- mContext.unbindService(info.connection);
+ try {
+ mContext.unbindService(info.connection);
+ } catch (IllegalArgumentException e) {
+ Slog.e(TAG, "failed to unbind " + name, e);
+ }
}
}
}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 842ee91..5b2bc9e 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -314,6 +314,7 @@
private Uri mInCallNotificationUri;
private AudioAttributes mInCallNotificationAudioAttributes;
private float mInCallNotificationVolume;
+ private Binder mCallNotificationToken = null;
// used as a mutex for access to all active notifications & listeners
final Object mNotificationLock = new Object();
@@ -558,7 +559,7 @@
{
final int pid;
final String pkg;
- ITransientNotification callback;
+ final ITransientNotification callback;
int duration;
Binder token;
@@ -575,10 +576,6 @@
this.duration = duration;
}
- void update(ITransientNotification callback) {
- this.callback = callback;
- }
-
void dump(PrintWriter pw, String prefix, DumpFilter filter) {
if (filter != null && !filter.matches(pkg)) return;
pw.println(prefix + this);
@@ -1647,28 +1644,38 @@
long callingId = Binder.clearCallingIdentity();
try {
ToastRecord record;
- int index;
- // All packages aside from the android package can enqueue one toast at a time
- if (!isSystemToast) {
- index = indexOfToastPackageLocked(pkg);
- } else {
- index = indexOfToastLocked(pkg, callback);
- }
-
- // If the package already has a toast, we update its toast
- // in the queue, we don't move it to the end of the queue.
+ int index = indexOfToastLocked(pkg, callback);
+ // If it's already in the queue, we update it in place, we don't
+ // move it to the end of the queue.
if (index >= 0) {
record = mToastQueue.get(index);
record.update(duration);
- record.update(callback);
} else {
+ // Limit the number of toasts that any given package except the android
+ // package can enqueue. Prevents DOS attacks and deals with leaks.
+ if (!isSystemToast) {
+ int count = 0;
+ final int N = mToastQueue.size();
+ for (int i=0; i<N; i++) {
+ final ToastRecord r = mToastQueue.get(i);
+ if (r.pkg.equals(pkg)) {
+ count++;
+ if (count >= MAX_PACKAGE_NOTIFICATIONS) {
+ Slog.e(TAG, "Package has already posted " + count
+ + " toasts. Not showing more. Package=" + pkg);
+ return;
+ }
+ }
+ }
+ }
+
Binder token = new Binder();
mWindowManagerInternal.addWindowToken(token, TYPE_TOAST, DEFAULT_DISPLAY);
record = new ToastRecord(callingPid, pkg, callback, duration, token);
mToastQueue.add(record);
index = mToastQueue.size() - 1;
+ keepProcessAliveIfNeededLocked(callingPid);
}
- keepProcessAliveIfNeededLocked(callingPid);
// If it's at index 0, it's the current toast. It doesn't matter if it's
// new or just been updated. Call back and tell it to show itself.
// If the callback fails, this will remove it from the list, so don't
@@ -4232,7 +4239,11 @@
try {
final IRingtonePlayer player = mAudioManager.getRingtonePlayer();
if (player != null) {
- player.play(new Binder(), mInCallNotificationUri,
+ if (mCallNotificationToken != null) {
+ player.stop(mCallNotificationToken);
+ }
+ mCallNotificationToken = new Binder();
+ player.play(mCallNotificationToken, mInCallNotificationUri,
mInCallNotificationAudioAttributes,
mInCallNotificationVolume, false);
}
@@ -4323,21 +4334,7 @@
int len = list.size();
for (int i=0; i<len; i++) {
ToastRecord r = list.get(i);
- if (r.pkg.equals(pkg) && r.callback.asBinder().equals(cbak)) {
- return i;
- }
- }
- return -1;
- }
-
- @GuardedBy("mToastQueue")
- int indexOfToastPackageLocked(String pkg)
- {
- ArrayList<ToastRecord> list = mToastQueue;
- int len = list.size();
- for (int i=0; i<len; i++) {
- ToastRecord r = list.get(i);
- if (r.pkg.equals(pkg)) {
+ if (r.pkg.equals(pkg) && r.callback.asBinder() == cbak) {
return i;
}
}
diff --git a/services/core/java/com/android/server/pm/BackgroundDexOptService.java b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
index 423201a..46f39f2 100644
--- a/services/core/java/com/android/server/pm/BackgroundDexOptService.java
+++ b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
@@ -144,6 +144,12 @@
Intent intent = registerReceiver(null, filter);
int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
int scale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
+ boolean present = intent.getBooleanExtra(BatteryManager.EXTRA_PRESENT, true);
+
+ if (!present) {
+ // No battery, treat as if 100%, no possibility of draining battery.
+ return 100;
+ }
if (level < 0 || scale <= 0) {
// Battery data unavailable. This should never happen, so assume the worst.
@@ -457,10 +463,17 @@
if (params.getJobId() == JOB_POST_BOOT_UPDATE) {
mAbortPostBootUpdate.set(true);
+
+ // Do not reschedule.
+ // TODO: We should reschedule if we didn't process all apps, yet.
+ return false;
} else {
mAbortIdleOptimization.set(true);
+
+ // Reschedule the run.
+ // TODO: Should this be dependent on the stop reason?
+ return true;
}
- return false;
}
private void notifyPinService(ArraySet<String> updatedPackages) {
diff --git a/services/core/java/com/android/server/pm/Installer.java b/services/core/java/com/android/server/pm/Installer.java
index 41cfcbe..73f4274 100644
--- a/services/core/java/com/android/server/pm/Installer.java
+++ b/services/core/java/com/android/server/pm/Installer.java
@@ -16,7 +16,9 @@
package com.android.server.pm;
+import android.annotation.AppIdInt;
import android.annotation.Nullable;
+import android.annotation.UserIdInt;
import android.content.Context;
import android.content.pm.PackageStats;
import android.os.Build;
@@ -38,7 +40,7 @@
/* ***************************************************************************
* IMPORTANT: These values are passed to native code. Keep them in sync with
- * frameworks/native/cmds/installd/installd.h
+ * frameworks/native/cmds/installd/installd_constants.h
* **************************************************************************/
/** Application should be visible to everyone */
public static final int DEXOPT_PUBLIC = 1 << 1;
@@ -58,6 +60,12 @@
public static final int DEXOPT_STORAGE_DE = 1 << 8;
/** Indicates that dexopt is invoked from the background service. */
public static final int DEXOPT_IDLE_BACKGROUND_JOB = 1 << 9;
+ /** Indicates that dexopt should restrict access to private APIs. */
+ public static final int DEXOPT_ENABLE_HIDDEN_API_CHECKS = 1 << 10;
+ /** Indicates that dexopt should convert to CompactDex. */
+ public static final int DEXOPT_GENERATE_COMPACT_DEX = 1 << 11;
+ /** Indicates that dexopt should generate an app image */
+ public static final int DEXOPT_GENERATE_APP_IMAGE = 1 << 12;
// NOTE: keep in sync with installd
public static final int FLAG_CLEAR_CACHE_ONLY = 1 << 8;
@@ -281,43 +289,45 @@
public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet,
int dexoptNeeded, @Nullable String outputPath, int dexFlags,
String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries,
- @Nullable String seInfo, boolean downgrade, int targetSdkVersion)
- throws InstallerException {
+ @Nullable String seInfo, boolean downgrade, int targetSdkVersion,
+ @Nullable String profileName, @Nullable String dexMetadataPath,
+ @Nullable String compilationReason) throws InstallerException {
assertValidInstructionSet(instructionSet);
if (!checkBeforeRemote()) return;
try {
mInstalld.dexopt(apkPath, uid, pkgName, instructionSet, dexoptNeeded, outputPath,
dexFlags, compilerFilter, volumeUuid, sharedLibraries, seInfo, downgrade,
- targetSdkVersion);
+ targetSdkVersion, profileName, dexMetadataPath, compilationReason);
} catch (Exception e) {
throw InstallerException.from(e);
}
}
- public boolean mergeProfiles(int uid, String packageName) throws InstallerException {
- if (!checkBeforeRemote()) return false;
- try {
- return mInstalld.mergeProfiles(uid, packageName);
- } catch (Exception e) {
- throw InstallerException.from(e);
- }
- }
-
- public boolean dumpProfiles(int uid, String packageName, String codePaths)
+ public boolean mergeProfiles(int uid, String packageName, String profileName)
throws InstallerException {
if (!checkBeforeRemote()) return false;
try {
- return mInstalld.dumpProfiles(uid, packageName, codePaths);
+ return mInstalld.mergeProfiles(uid, packageName, profileName);
} catch (Exception e) {
throw InstallerException.from(e);
}
}
- public boolean copySystemProfile(String systemProfile, int uid, String packageName)
+ public boolean dumpProfiles(int uid, String packageName, String profileName, String codePath)
throws InstallerException {
if (!checkBeforeRemote()) return false;
try {
- return mInstalld.copySystemProfile(systemProfile, uid, packageName);
+ return mInstalld.dumpProfiles(uid, packageName, profileName, codePath);
+ } catch (Exception e) {
+ throw InstallerException.from(e);
+ }
+ }
+
+ public boolean copySystemProfile(String systemProfile, int uid, String packageName,
+ String profileName) throws InstallerException {
+ if (!checkBeforeRemote()) return false;
+ try {
+ return mInstalld.copySystemProfile(systemProfile, uid, packageName, profileName);
} catch (Exception e) {
throw InstallerException.from(e);
}
@@ -361,10 +371,10 @@
}
}
- public void clearAppProfiles(String packageName) throws InstallerException {
+ public void clearAppProfiles(String packageName, String profileName) throws InstallerException {
if (!checkBeforeRemote()) return;
try {
- mInstalld.clearAppProfiles(packageName);
+ mInstalld.clearAppProfiles(packageName, profileName);
} catch (Exception e) {
throw InstallerException.from(e);
}
@@ -487,6 +497,36 @@
}
}
+ public byte[] hashSecondaryDexFile(String dexPath, String packageName, int uid,
+ @Nullable String volumeUuid, int flags) throws InstallerException {
+ if (!checkBeforeRemote()) return new byte[0];
+ try {
+ return mInstalld.hashSecondaryDexFile(dexPath, packageName, uid, volumeUuid, flags);
+ } catch (Exception e) {
+ throw InstallerException.from(e);
+ }
+ }
+
+ public boolean createProfileSnapshot(int appId, String packageName, String profileName,
+ String classpath) throws InstallerException {
+ if (!checkBeforeRemote()) return false;
+ try {
+ return mInstalld.createProfileSnapshot(appId, packageName, profileName, classpath);
+ } catch (Exception e) {
+ throw InstallerException.from(e);
+ }
+ }
+
+ public void destroyProfileSnapshot(String packageName, String profileName)
+ throws InstallerException {
+ if (!checkBeforeRemote()) return;
+ try {
+ mInstalld.destroyProfileSnapshot(packageName, profileName);
+ } catch (Exception e) {
+ throw InstallerException.from(e);
+ }
+ }
+
public void invalidateMounts() throws InstallerException {
if (!checkBeforeRemote()) return;
try {
@@ -505,6 +545,17 @@
}
}
+ public boolean prepareAppProfile(String pkg, @UserIdInt int userId, @AppIdInt int appId,
+ String profileName, String codePath, String dexMetadataPath) throws InstallerException {
+ if (!checkBeforeRemote()) return false;
+ try {
+ return mInstalld.prepareAppProfile(pkg, userId, appId, profileName, codePath,
+ dexMetadataPath);
+ } catch (Exception e) {
+ throw InstallerException.from(e);
+ }
+ }
+
private static void assertValidInstructionSet(String instructionSet)
throws InstallerException {
for (String abi : Build.SUPPORTED_ABIS) {
diff --git a/services/core/java/com/android/server/pm/OtaDexoptService.java b/services/core/java/com/android/server/pm/OtaDexoptService.java
index 5dbd3ca..88caf32 100644
--- a/services/core/java/com/android/server/pm/OtaDexoptService.java
+++ b/services/core/java/com/android/server/pm/OtaDexoptService.java
@@ -261,12 +261,13 @@
String instructionSet, int dexoptNeeded, @Nullable String outputPath,
int dexFlags, String compilerFilter, @Nullable String volumeUuid,
@Nullable String sharedLibraries, @Nullable String seInfo, boolean downgrade,
- int targetSdkVersion)
+ int targetSdkVersion, @Nullable String profileName,
+ @Nullable String dexMetadataPath, @Nullable String dexoptCompilationReason)
throws InstallerException {
final StringBuilder builder = new StringBuilder();
- // The version. Right now it's 4.
- builder.append("4 ");
+ // The current version.
+ builder.append("9 ");
builder.append("dexopt");
@@ -283,6 +284,9 @@
encodeParameter(builder, seInfo);
encodeParameter(builder, downgrade);
encodeParameter(builder, targetSdkVersion);
+ encodeParameter(builder, profileName);
+ encodeParameter(builder, dexMetadataPath);
+ encodeParameter(builder, dexoptCompilationReason);
commands.add(builder.toString());
}
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index 2cc5159..f9e11f9 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -20,6 +20,8 @@
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageParser;
+import android.content.pm.dex.ArtManager;
+import android.content.pm.dex.DexMetadataHelper;
import android.os.FileUtils;
import android.os.PowerManager;
import android.os.SystemClock;
@@ -32,7 +34,6 @@
import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.pm.Installer.InstallerException;
-import com.android.server.pm.dex.DexManager;
import com.android.server.pm.dex.DexoptOptions;
import com.android.server.pm.dex.DexoptUtils;
import com.android.server.pm.dex.PackageDexUsage;
@@ -46,6 +47,8 @@
import dalvik.system.DexFile;
+import static android.content.pm.ApplicationInfo.HIDDEN_API_ENFORCEMENT_NONE;
+
import static com.android.server.pm.Installer.DEXOPT_BOOTCOMPLETE;
import static com.android.server.pm.Installer.DEXOPT_DEBUGGABLE;
import static com.android.server.pm.Installer.DEXOPT_PROFILE_GUIDED;
@@ -55,12 +58,16 @@
import static com.android.server.pm.Installer.DEXOPT_STORAGE_CE;
import static com.android.server.pm.Installer.DEXOPT_STORAGE_DE;
import static com.android.server.pm.Installer.DEXOPT_IDLE_BACKGROUND_JOB;
+import static com.android.server.pm.Installer.DEXOPT_ENABLE_HIDDEN_API_CHECKS;
+import static com.android.server.pm.Installer.DEXOPT_GENERATE_COMPACT_DEX;
+import static com.android.server.pm.Installer.DEXOPT_GENERATE_APP_IMAGE;
import static com.android.server.pm.InstructionSets.getAppDexInstructionSets;
import static com.android.server.pm.InstructionSets.getDexCodeInstructionSets;
import static com.android.server.pm.PackageManagerService.WATCHDOG_TIMEOUT;
-import static dalvik.system.DexFile.getNonProfileGuidedCompilerFilter;
+import static com.android.server.pm.PackageManagerServiceCompilerMapping.getReasonName;
+
import static dalvik.system.DexFile.getSafeModeCompilerFilter;
import static dalvik.system.DexFile.isProfileGuidedCompilerFilter;
@@ -210,12 +217,21 @@
}
}
+ String profileName = ArtManager.getProfileName(i == 0 ? null : pkg.splitNames[i - 1]);
+
+ String dexMetadataPath = null;
+ if (options.isDexoptInstallWithDexMetadata()) {
+ File dexMetadataFile = DexMetadataHelper.findDexMetadataForFile(new File(path));
+ dexMetadataPath = dexMetadataFile == null
+ ? null : dexMetadataFile.getAbsolutePath();
+ }
+
final boolean isUsedByOtherApps = options.isDexoptAsSharedLibrary()
|| packageUseInfo.isUsedByOtherApps(path);
final String compilerFilter = getRealCompilerFilter(pkg.applicationInfo,
options.getCompilerFilter(), isUsedByOtherApps);
final boolean profileUpdated = options.isCheckForProfileUpdates() &&
- isProfileUpdated(pkg, sharedGid, compilerFilter);
+ isProfileUpdated(pkg, sharedGid, profileName, compilerFilter);
// Get the dexopt flags after getRealCompilerFilter to make sure we get the correct
// flags.
@@ -224,7 +240,8 @@
for (String dexCodeIsa : dexCodeInstructionSets) {
int newResult = dexOptPath(pkg, path, dexCodeIsa, compilerFilter,
profileUpdated, classLoaderContexts[i], dexoptFlags, sharedGid,
- packageStats, options.isDowngrade());
+ packageStats, options.isDowngrade(), profileName, dexMetadataPath,
+ options.getCompilationReason());
// The end result is:
// - FAILED if any path failed,
// - PERFORMED if at least one path needed compilation,
@@ -248,7 +265,8 @@
@GuardedBy("mInstallLock")
private int dexOptPath(PackageParser.Package pkg, String path, String isa,
String compilerFilter, boolean profileUpdated, String classLoaderContext,
- int dexoptFlags, int uid, CompilerStats.PackageStats packageStats, boolean downgrade) {
+ int dexoptFlags, int uid, CompilerStats.PackageStats packageStats, boolean downgrade,
+ String profileName, String dexMetadataPath, int compilationReason) {
int dexoptNeeded = getDexoptNeeded(path, isa, compilerFilter, classLoaderContext,
profileUpdated, downgrade);
if (Math.abs(dexoptNeeded) == DexFile.NO_DEXOPT_NEEDED) {
@@ -274,7 +292,8 @@
// primary dex files.
mInstaller.dexopt(path, uid, pkg.packageName, isa, dexoptNeeded, oatDir, dexoptFlags,
compilerFilter, pkg.volumeUuid, classLoaderContext, pkg.applicationInfo.seInfo,
- false /* downgrade*/, pkg.applicationInfo.targetSdkVersion);
+ false /* downgrade*/, pkg.applicationInfo.targetSdkVersion,
+ profileName, dexMetadataPath, getReasonName(compilationReason));
if (packageStats != null) {
long endTime = System.currentTimeMillis();
@@ -385,7 +404,7 @@
// Note this trades correctness for performance since the resulting slow down is
// unacceptable in some cases until b/64530081 is fixed.
String classLoaderContext = SKIP_SHARED_LIBRARY_CHECK;
-
+ int reason = options.getCompilationReason();
try {
for (String isa : dexUseInfo.getLoaderIsas()) {
// Reuse the same dexopt path as for the primary apks. We don't need all the
@@ -395,7 +414,8 @@
mInstaller.dexopt(path, info.uid, info.packageName, isa, /*dexoptNeeded*/ 0,
/*oatDir*/ null, dexoptFlags,
compilerFilter, info.volumeUuid, classLoaderContext, info.seInfoUser,
- options.isDowngrade(), info.targetSdkVersion);
+ options.isDowngrade(), info.targetSdkVersion, /*profileName*/ null,
+ /*dexMetadataPath*/ null, getReasonName(reason));
}
return DEX_OPT_PERFORMED;
@@ -435,13 +455,15 @@
pw.increaseIndent();
for (String isa : dexCodeInstructionSets) {
- String status = null;
try {
- status = DexFile.getDexFileStatus(path, isa);
+ String[] status = DexFile.getDexFileOptimizationStatus(path, isa);
+ String compilationStatus = status[0];
+ String compilationReason = status[1];
+ pw.println(isa + ": [status=" + compilationStatus
+ +"] reason=[" + compilationReason + "]");
} catch (IOException ioe) {
- status = "[Exception]: " + ioe.getMessage();
+ pw.println(isa + ": [Exception]: " + ioe.getMessage());
}
- pw.println(isa + ": " + status);
}
if (useInfo.isUsedByOtherApps(path)) {
@@ -502,19 +524,53 @@
return getDexFlags(pkg.applicationInfo, compilerFilter, options);
}
+ private boolean isAppImageEnabled() {
+ return SystemProperties.get("dalvik.vm.appimageformat", "").length() > 0;
+ }
+
private int getDexFlags(ApplicationInfo info, String compilerFilter, DexoptOptions options) {
int flags = info.flags;
boolean debuggable = (flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
- // Profile guide compiled oat files should not be public.
+ // Profile guide compiled oat files should not be public unles they are based
+ // on profiles from dex metadata archives.
+ // The flag isDexoptInstallWithDexMetadata applies only on installs when we know that
+ // the user does not have an existing profile.
boolean isProfileGuidedFilter = isProfileGuidedCompilerFilter(compilerFilter);
- boolean isPublic = !info.isForwardLocked() && !isProfileGuidedFilter;
+ boolean isPublic = !info.isForwardLocked() &&
+ (!isProfileGuidedFilter || options.isDexoptInstallWithDexMetadata());
int profileFlag = isProfileGuidedFilter ? DEXOPT_PROFILE_GUIDED : 0;
+ // Some apps are executed with restrictions on hidden API usage. If this app is one
+ // of them, pass a flag to dexopt to enable the same restrictions during compilation.
+ // TODO we should pass the actual flag value to dexopt, rather than assuming blacklist
+ int hiddenApiFlag = info.getHiddenApiEnforcementPolicy() == HIDDEN_API_ENFORCEMENT_NONE
+ ? 0
+ : DEXOPT_ENABLE_HIDDEN_API_CHECKS;
+ // Avoid generating CompactDex for modes that are latency critical.
+ final int compilationReason = options.getCompilationReason();
+ boolean generateCompactDex = true;
+ switch (compilationReason) {
+ case PackageManagerService.REASON_FIRST_BOOT:
+ case PackageManagerService.REASON_BOOT:
+ case PackageManagerService.REASON_INSTALL:
+ generateCompactDex = false;
+ }
+ // Use app images only if it is enabled and we are compiling
+ // profile-guided (so the app image doesn't conservatively contain all classes).
+ // If the app didn't request for the splits to be loaded in isolation or if it does not
+ // declare inter-split dependencies, then all the splits will be loaded in the base
+ // apk class loader (in the order of their definition, otherwise disable app images
+ // because they are unsupported for multiple class loaders. b/7269679
+ boolean generateAppImage = isProfileGuidedFilter && (info.splitDependencies == null ||
+ !info.requestsIsolatedSplitLoading()) && isAppImageEnabled();
int dexFlags =
(isPublic ? DEXOPT_PUBLIC : 0)
| (debuggable ? DEXOPT_DEBUGGABLE : 0)
| profileFlag
| (options.isBootComplete() ? DEXOPT_BOOTCOMPLETE : 0)
- | (options.isDexoptIdleBackgroundJob() ? DEXOPT_IDLE_BACKGROUND_JOB : 0);
+ | (options.isDexoptIdleBackgroundJob() ? DEXOPT_IDLE_BACKGROUND_JOB : 0)
+ | (generateCompactDex ? DEXOPT_GENERATE_COMPACT_DEX : 0)
+ | (generateAppImage ? DEXOPT_GENERATE_APP_IMAGE : 0)
+ | hiddenApiFlag;
return adjustDexoptFlags(dexFlags);
}
@@ -543,14 +599,15 @@
* current profile and the reference profile will be merged and subsequent calls
* may return a different result.
*/
- private boolean isProfileUpdated(PackageParser.Package pkg, int uid, String compilerFilter) {
+ private boolean isProfileUpdated(PackageParser.Package pkg, int uid, String profileName,
+ String compilerFilter) {
// Check if we are allowed to merge and if the compiler filter is profile guided.
if (!isProfileGuidedCompilerFilter(compilerFilter)) {
return false;
}
// Merge profiles. It returns whether or not there was an updated in the profile info.
try {
- return mInstaller.mergeProfiles(uid, pkg.packageName);
+ return mInstaller.mergeProfiles(uid, pkg.packageName, profileName);
} catch (InstallerException e) {
Slog.w(TAG, "Failed to merge profiles", e);
}
@@ -629,6 +686,9 @@
if ((flags & DEXOPT_IDLE_BACKGROUND_JOB) == DEXOPT_IDLE_BACKGROUND_JOB) {
flagsList.add("idle_background_job");
}
+ if ((flags & DEXOPT_ENABLE_HIDDEN_API_CHECKS) == DEXOPT_ENABLE_HIDDEN_API_CHECKS) {
+ flagsList.add("enable_hidden_api_checks");
+ }
return String.join(",", flagsList);
}
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index bf86300..7204aa1 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -17,10 +17,12 @@
package com.android.server.pm;
import static android.content.pm.PackageManager.INSTALL_FAILED_ABORTED;
+import static android.content.pm.PackageManager.INSTALL_FAILED_BAD_DEX_METADATA;
import static android.content.pm.PackageManager.INSTALL_FAILED_CONTAINER_ERROR;
import static android.content.pm.PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE;
import static android.content.pm.PackageManager.INSTALL_FAILED_INTERNAL_ERROR;
import static android.content.pm.PackageManager.INSTALL_FAILED_INVALID_APK;
+import static android.content.pm.PackageParser.APK_FILE_EXTENSION;
import static android.system.OsConstants.O_CREAT;
import static android.system.OsConstants.O_RDONLY;
import static android.system.OsConstants.O_WRONLY;
@@ -94,6 +96,7 @@
import com.android.server.pm.Installer.InstallerException;
import com.android.server.pm.PackageInstallerService.PackageInstallObserverAdapter;
+import android.content.pm.dex.DexMetadataHelper;
import libcore.io.IoUtils;
import org.xmlpull.v1.XmlPullParser;
@@ -259,6 +262,7 @@
// entries like "lost+found".
if (file.isDirectory()) return false;
if (file.getName().endsWith(REMOVE_SPLIT_MARKER_EXTENSION)) return false;
+ if (DexMetadataHelper.isDexMetadataFile(file)) return false;
return true;
}
};
@@ -944,6 +948,15 @@
mInstallerPackageName, mInstallerUid, user, mCertificates);
}
+ private static void maybeRenameFile(File from, File to) throws PackageManagerException {
+ if (!from.equals(to)) {
+ if (!from.renameTo(to)) {
+ throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR,
+ "Could not rename file " + from + " to " + to);
+ }
+ }
+ }
+
/**
* Validate install by confirming that all application packages are have
* consistent package name, version code, and signing certificates.
@@ -988,6 +1001,7 @@
if (ArrayUtils.isEmpty(addedFiles) && removeSplitList.size() == 0) {
throw new PackageManagerException(INSTALL_FAILED_INVALID_APK, "No packages staged");
}
+
// Verify that all staged packages are internally consistent
final ArraySet<String> stagedSplits = new ArraySet<>();
for (File addedFile : addedFiles) {
@@ -1022,9 +1036,9 @@
// Take this opportunity to enforce uniform naming
final String targetName;
if (apk.splitName == null) {
- targetName = "base.apk";
+ targetName = "base" + APK_FILE_EXTENSION;
} else {
- targetName = "split_" + apk.splitName + ".apk";
+ targetName = "split_" + apk.splitName + APK_FILE_EXTENSION;
}
if (!FileUtils.isValidExtFilename(targetName)) {
throw new PackageManagerException(INSTALL_FAILED_INVALID_APK,
@@ -1032,9 +1046,7 @@
}
final File targetFile = new File(mResolvedStageDir, targetName);
- if (!addedFile.equals(targetFile)) {
- addedFile.renameTo(targetFile);
- }
+ maybeRenameFile(addedFile, targetFile);
// Base is coming from session
if (apk.splitName == null) {
@@ -1042,6 +1054,18 @@
}
mResolvedStagedFiles.add(targetFile);
+
+ final File dexMetadataFile = DexMetadataHelper.findDexMetadataForFile(addedFile);
+ if (dexMetadataFile != null) {
+ if (!FileUtils.isValidExtFilename(dexMetadataFile.getName())) {
+ throw new PackageManagerException(INSTALL_FAILED_INVALID_APK,
+ "Invalid filename: " + dexMetadataFile);
+ }
+ final File targetDexMetadataFile = new File(mResolvedStageDir,
+ DexMetadataHelper.buildDexMetadataPathForApk(targetName));
+ mResolvedStagedFiles.add(targetDexMetadataFile);
+ maybeRenameFile(dexMetadataFile, targetDexMetadataFile);
+ }
}
if (removeSplitList.size() > 0) {
@@ -1099,6 +1123,12 @@
if (mResolvedBaseFile == null) {
mResolvedBaseFile = new File(appInfo.getBaseCodePath());
mResolvedInheritedFiles.add(mResolvedBaseFile);
+ // Inherit the dex metadata if present.
+ final File baseDexMetadataFile =
+ DexMetadataHelper.findDexMetadataForFile(mResolvedBaseFile);
+ if (baseDexMetadataFile != null) {
+ mResolvedInheritedFiles.add(baseDexMetadataFile);
+ }
}
// Inherit splits if not overridden
@@ -1109,6 +1139,12 @@
final boolean splitRemoved = removeSplitList.contains(splitName);
if (!stagedSplits.contains(splitName) && !splitRemoved) {
mResolvedInheritedFiles.add(splitFile);
+ // Inherit the dex metadata if present.
+ final File splitDexMetadataFile =
+ DexMetadataHelper.findDexMetadataForFile(splitFile);
+ if (splitDexMetadataFile != null) {
+ mResolvedInheritedFiles.add(splitDexMetadataFile);
+ }
}
}
}
@@ -1167,7 +1203,7 @@
/**
* Calculate the final install footprint size, combining both staged and
* existing APKs together and including unpacked native code from both.
- */
+ */
private long calculateInstalledSize() throws PackageManagerException {
Preconditions.checkNotNull(mResolvedBaseFile);
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index f182c05cb..864c965 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -106,8 +106,6 @@
import static com.android.server.pm.PermissionsState.PERMISSION_OPERATION_SUCCESS;
import static com.android.server.pm.PermissionsState.PERMISSION_OPERATION_SUCCESS_GIDS_CHANGED;
-import static dalvik.system.DexFile.getNonProfileGuidedCompilerFilter;
-
import android.Manifest;
import android.annotation.IntDef;
import android.annotation.NonNull;
@@ -179,6 +177,9 @@
import android.content.pm.VerifierDeviceIdentity;
import android.content.pm.VerifierInfo;
import android.content.pm.VersionedPackage;
+import android.content.pm.dex.ArtManager;
+import android.content.pm.dex.DexMetadataHelper;
+import android.content.pm.dex.IArtManager;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.graphics.Bitmap;
@@ -285,13 +286,14 @@
import com.android.server.pm.PermissionsState.PermissionState;
import com.android.server.pm.Settings.DatabaseVersion;
import com.android.server.pm.Settings.VersionInfo;
+import com.android.server.pm.dex.ArtManagerService;
+import com.android.server.pm.dex.DexLogger;
import com.android.server.pm.dex.DexManager;
import com.android.server.pm.dex.DexoptOptions;
import com.android.server.pm.dex.PackageDexUsage;
import com.android.server.storage.DeviceStorageMonitorInternal;
import dalvik.system.CloseGuard;
-import dalvik.system.DexFile;
import dalvik.system.VMRuntime;
import libcore.io.IoUtils;
@@ -426,6 +428,7 @@
private static final int NFC_UID = Process.NFC_UID;
private static final int BLUETOOTH_UID = Process.BLUETOOTH_UID;
private static final int SHELL_UID = Process.SHELL_UID;
+ private static final int SE_UID = Process.SE_UID;
// Cap the size of permission trees that 3rd party apps can define
private static final int MAX_PERMISSION_TREE_FOOTPRINT = 32768; // characters of text
@@ -572,6 +575,7 @@
}
// Compilation reasons.
+ public static final int REASON_UNKNOWN = -1;
public static final int REASON_FIRST_BOOT = 0;
public static final int REASON_BOOT = 1;
public static final int REASON_INSTALL = 2;
@@ -610,7 +614,8 @@
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_PHONE_NUMBERS,
- Manifest.permission.ANSWER_PHONE_CALLS);
+ Manifest.permission.ANSWER_PHONE_CALLS,
+ Manifest.permission.ACCEPT_HANDOVER);
/**
@@ -958,6 +963,8 @@
final PackageInstallerService mInstallerService;
+ final ArtManagerService mArtManagerService;
+
private final PackageDexOptimizer mPackageDexOptimizer;
// DexManager handles the usage of dex files (e.g. secondary files, whether or not a package
// is used by other apps).
@@ -2436,6 +2443,8 @@
ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
mSettings.addSharedUserLPw("android.uid.shell", SHELL_UID,
ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
+ mSettings.addSharedUserLPw("android.uid.se", SE_UID,
+ ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
String separateProcesses = SystemProperties.get("debug.separate_processes");
if (separateProcesses != null && separateProcesses.length() > 0) {
@@ -2457,7 +2466,11 @@
mInstaller = installer;
mPackageDexOptimizer = new PackageDexOptimizer(installer, mInstallLock, context,
"*dexopt*");
- mDexManager = new DexManager(this, mPackageDexOptimizer, installer, mInstallLock);
+ DexManager.Listener dexManagerListener = DexLogger.getListener(this,
+ installer, mInstallLock);
+ mDexManager = new DexManager(this, mPackageDexOptimizer, installer, mInstallLock,
+ dexManagerListener);
+ mArtManagerService = new ArtManagerService(this, installer, mInstallLock);
mMoveCallbacks = new MoveCallbacks(FgThread.get().getLooper());
mOnPermissionChangeListeners = new OnPermissionChangeListeners(
@@ -3362,6 +3375,13 @@
// "/data/system/package_cache/1"
File cacheDir = FileUtils.createDir(cacheBaseDir, PACKAGE_PARSER_CACHE_VERSION);
+ if (cacheDir == null) {
+ // Something went wrong. Attempt to delete everything and return.
+ Slog.wtf(TAG, "Cache directory cannot be created - wiping base dir " + cacheBaseDir);
+ FileUtils.deleteContentsAndDir(cacheBaseDir);
+ return null;
+ }
+
// The following is a workaround to aid development on non-numbered userdebug
// builds or cases where "adb sync" is used on userdebug builds. If we detect that
// the system partition is newer.
@@ -9187,6 +9207,29 @@
}
/**
+ * Clear the package profile if this was an upgrade and the package
+ * version was updated.
+ */
+ private void maybeClearProfilesForUpgradesLI(
+ @Nullable PackageSetting originalPkgSetting,
+ @NonNull PackageParser.Package currentPkg) {
+ if (originalPkgSetting == null || !isUpgrade()) {
+ return;
+ }
+ if (originalPkgSetting.versionCode == currentPkg.mVersionCode) {
+ return;
+ }
+
+ clearAppProfilesLIF(currentPkg, UserHandle.USER_ALL);
+ if (DEBUG_INSTALL) {
+ Slog.d(TAG, originalPkgSetting.name
+ + " clear profile due to version change "
+ + originalPkgSetting.versionCode + " != "
+ + currentPkg.mVersionCode);
+ }
+ }
+
+ /**
* Traces a package scan.
* @see #scanPackageLI(File, int, int, long, UserHandle)
*/
@@ -9471,6 +9514,9 @@
// Verify certificates against what was last scanned
collectCertificatesLI(ps, pkg, scanFile, policyFlags);
+ // Reset profile if the application version is changed
+ maybeClearProfilesForUpgradesLI(ps, pkg);
+
/*
* A new system app appeared, but we already had a non-system one of the
* same name installed earlier.
@@ -9698,7 +9744,7 @@
final long startTime = System.nanoTime();
final int[] stats = performDexOptUpgrade(pkgs, mIsPreNUpgrade /* showDialog */,
- getCompilerFilterForReason(causeFirstBoot ? REASON_FIRST_BOOT : REASON_BOOT),
+ causeFirstBoot ? REASON_FIRST_BOOT : REASON_BOOT,
false /* bootComplete */);
final int elapsedTimeSeconds =
@@ -9725,7 +9771,7 @@
* and {@code numberOfPackagesFailed}.
*/
private int[] performDexOptUpgrade(List<PackageParser.Package> pkgs, boolean showDialog,
- final String compilerFilter, boolean bootComplete) {
+ final int compilationReason, boolean bootComplete) {
int numberOfPackagesVisited = 0;
int numberOfPackagesOptimized = 0;
@@ -9749,7 +9795,8 @@
// PackageDexOptimizer to prevent this happening on first boot. The issue
// is that we don't have a good way to say "do this only once".
if (!mInstaller.copySystemProfile(profileFile.getAbsolutePath(),
- pkg.applicationInfo.uid, pkg.packageName)) {
+ pkg.applicationInfo.uid, pkg.packageName,
+ ArtManager.getProfileName(null))) {
Log.e(TAG, "Installer failed to copy system profile!");
} else {
// Disabled as this causes speed-profile compilation during first boot
@@ -9784,7 +9831,8 @@
// issue is that we don't have a good way to say "do this only
// once".
if (!mInstaller.copySystemProfile(profileFile.getAbsolutePath(),
- pkg.applicationInfo.uid, pkg.packageName)) {
+ pkg.applicationInfo.uid, pkg.packageName,
+ ArtManager.getProfileName(null))) {
Log.e(TAG, "Failed to copy system profile for stub package!");
} else {
useProfileForDexopt = true;
@@ -9823,13 +9871,11 @@
}
}
- String pkgCompilerFilter = compilerFilter;
+ int pkgCompilationReason = compilationReason;
if (useProfileForDexopt) {
// Use background dexopt mode to try and use the profile. Note that this does not
// guarantee usage of the profile.
- pkgCompilerFilter =
- PackageManagerServiceCompilerMapping.getCompilerFilterForReason(
- PackageManagerService.REASON_BACKGROUND_DEXOPT);
+ pkgCompilationReason = PackageManagerService.REASON_BACKGROUND_DEXOPT;
}
// checkProfiles is false to avoid merging profiles during boot which
@@ -9838,9 +9884,13 @@
// behave differently than "pm.dexopt.bg-dexopt=speed-profile" but that's a
// trade-off worth doing to save boot time work.
int dexoptFlags = bootComplete ? DexoptOptions.DEXOPT_BOOT_COMPLETE : 0;
+ if (compilationReason == REASON_FIRST_BOOT) {
+ // TODO: This doesn't cover the upgrade case, we should check for this too.
+ dexoptFlags |= DexoptOptions.DEXOPT_INSTALL_WITH_DEX_METADATA_FILE;
+ }
int primaryDexOptStaus = performDexOptTraced(new DexoptOptions(
pkg.packageName,
- pkgCompilerFilter,
+ pkgCompilationReason,
dexoptFlags));
switch (primaryDexOptStaus) {
@@ -9940,8 +9990,8 @@
int flags = (checkProfiles ? DexoptOptions.DEXOPT_CHECK_FOR_PROFILES_UPDATES : 0) |
(force ? DexoptOptions.DEXOPT_FORCE : 0) |
(bootComplete ? DexoptOptions.DEXOPT_BOOT_COMPLETE : 0);
- return performDexOpt(new DexoptOptions(packageName, targetCompilerFilter,
- splitName, flags));
+ return performDexOpt(new DexoptOptions(packageName, REASON_UNKNOWN,
+ targetCompilerFilter, splitName, flags));
}
/**
@@ -10050,7 +10100,8 @@
final String[] instructionSets = getAppDexInstructionSets(p.applicationInfo);
if (!deps.isEmpty()) {
DexoptOptions libraryOptions = new DexoptOptions(options.getPackageName(),
- options.getCompilerFilter(), options.getSplitName(),
+ options.getCompilationReason(), options.getCompilerFilter(),
+ options.getSplitName(),
options.getFlags() | DexoptOptions.DEXOPT_AS_SHARED_LIBRARY);
for (PackageParser.Package depPackage : deps) {
// TODO: Analyze and investigate if we (should) profile libraries.
@@ -10188,6 +10239,17 @@
mPackageUsage.writeNow(mPackages);
mCompilerStats.writeNow();
mDexManager.writePackageDexUsageNow();
+
+ // This is the last chance to write out pending restriction settings
+ synchronized (mPackages) {
+ if (mHandler.hasMessages(WRITE_PACKAGE_RESTRICTIONS)) {
+ mHandler.removeMessages(WRITE_PACKAGE_RESTRICTIONS);
+ for (int userId : mDirtyUsers) {
+ mSettings.writePackageRestrictionsLPr(userId);
+ }
+ mDirtyUsers.clear();
+ }
+ }
}
@Override
@@ -10209,14 +10271,7 @@
synchronized (mInstallLock) {
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dump profiles");
- final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
- try {
- List<String> allCodePaths = pkg.getAllCodePathsExcludingResourceOnly();
- String codePaths = TextUtils.join(";", allCodePaths);
- mInstaller.dumpProfiles(sharedGid, packageName, codePaths);
- } catch (InstallerException e) {
- Slog.w(TAG, "Failed to dump profiles", e);
- }
+ mArtManagerService.dumpProfiles(pkg);
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
}
}
@@ -10292,6 +10347,8 @@
for (int i = 0; i < childCount; i++) {
clearAppDataLeafLIF(pkg.childPackages.get(i), userId, flags);
}
+
+ clearAppProfilesLIF(pkg, UserHandle.USER_ALL);
}
private void clearAppDataLeafLIF(PackageParser.Package pkg, int userId, int flags) {
@@ -10364,18 +10421,10 @@
Slog.wtf(TAG, "Package was null!", new Throwable());
return;
}
- clearAppProfilesLeafLIF(pkg);
+ mArtManagerService.clearAppProfiles(pkg);
final int childCount = (pkg.childPackages != null) ? pkg.childPackages.size() : 0;
for (int i = 0; i < childCount; i++) {
- clearAppProfilesLeafLIF(pkg.childPackages.get(i));
- }
- }
-
- private void clearAppProfilesLeafLIF(PackageParser.Package pkg) {
- try {
- mInstaller.clearAppProfiles(pkg.packageName);
- } catch (InstallerException e) {
- Slog.w(TAG, String.valueOf(e));
+ mArtManagerService.clearAppProfiles(pkg.childPackages.get(i));
}
}
@@ -10977,6 +11026,12 @@
// We just determined the app is signed correctly, so bring
// over the latest parsed certs.
pkgSetting.signatures.mSignatures = pkg.mSignatures;
+
+ if (signatureCheckPs.sharedUser != null) {
+ if (signatureCheckPs.sharedUser.signaturesChanged == null) {
+ signatureCheckPs.sharedUser.signaturesChanged = Boolean.FALSE;
+ }
+ }
} catch (PackageManagerException e) {
if ((policyFlags & PackageParser.PARSE_IS_SYSTEM_DIR) == 0) {
throw e;
@@ -10984,19 +11039,25 @@
// The signature has changed, but this package is in the system
// image... let's recover!
pkgSetting.signatures.mSignatures = pkg.mSignatures;
- // However... if this package is part of a shared user, but it
- // doesn't match the signature of the shared user, let's fail.
- // What this means is that you can't change the signatures
- // associated with an overall shared user, which doesn't seem all
- // that unreasonable.
+
+ // If the system app is part of a shared user we allow that shared user to
+ // change signatures as well as part of an OTA. We still need to verify that the
+ // signatures are consistent within the shared user for a given boot, so only
+ // allow updating the signatures on the first package scanned for the shared
+ // user (i.e. if the signaturesChanged state hasn't been initialized yet in
+ // SharedUserSetting).
if (signatureCheckPs.sharedUser != null) {
- if (compareSignatures(signatureCheckPs.sharedUser.signatures.mSignatures,
+ if (signatureCheckPs.sharedUser.signaturesChanged != null &&
+ compareSignatures(signatureCheckPs.sharedUser.signatures.mSignatures,
pkg.mSignatures) != PackageManager.SIGNATURE_MATCH) {
throw new PackageManagerException(
INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES,
"Signature mismatch for shared user: "
+ pkgSetting.sharedUser);
}
+
+ signatureCheckPs.sharedUser.signatures.mSignatures = pkg.mSignatures;
+ signatureCheckPs.sharedUser.signaturesChanged = Boolean.TRUE;
}
// File a report about this.
String msg = "System package " + pkg.packageName
@@ -17897,7 +17958,6 @@
clearAppDataLIF(pkg, UserHandle.USER_ALL, StorageManager.FLAG_STORAGE_DE
| StorageManager.FLAG_STORAGE_CE | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
- clearAppProfilesLIF(deletedPackage, UserHandle.USER_ALL);
try {
final PackageParser.Package newPackage = scanPackageTracedLI(pkg, policyFlags,
@@ -18033,7 +18093,6 @@
// Successfully disabled the old package. Now proceed with re-installation
clearAppDataLIF(pkg, UserHandle.USER_ALL, StorageManager.FLAG_STORAGE_DE
| StorageManager.FLAG_STORAGE_CE | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
- clearAppProfilesLIF(deletedPackage, UserHandle.USER_ALL);
res.setReturnCode(PackageManager.INSTALL_SUCCEEDED);
pkg.setApplicationInfoFlags(ApplicationInfo.FLAG_UPDATED_SYSTEM_APP,
@@ -18459,6 +18518,7 @@
final PackageParser.Package pkg;
try {
pkg = pp.parsePackage(tmpPackageFile, parseFlags);
+ DexMetadataHelper.validatePackageDexMetadata(pkg);
} catch (PackageParserException e) {
res.setError("Failed parse during installPackageLI", e);
return;
@@ -18833,6 +18893,11 @@
}
}
+ // Prepare the application profiles for the new code paths.
+ // This needs to be done before invoking dexopt so that any install-time profile
+ // can be used for optimizations.
+ mArtManagerService.prepareAppProfiles(pkg, resolveUserIds(args.user.getIdentifier()));
+
// Check whether we need to dexopt the app.
//
// NOTE: it is IMPORTANT to call dexopt:
@@ -18846,6 +18911,7 @@
// 1) it is not forward locked.
// 2) it is not on on an external ASEC container.
// 3) it is not an instant app or if it is then dexopt is enabled via gservices.
+ // 4) it is not debuggable.
//
// Note that we do not dexopt instant apps by default. dexopt can take some time to
// complete, so we skip this step during installation. Instead, we'll take extra time
@@ -18857,7 +18923,8 @@
&& !forwardLocked
&& !pkg.applicationInfo.isExternalAsec()
&& (!instantApp || Global.getInt(mContext.getContentResolver(),
- Global.INSTANT_APP_DEXOPT_ENABLED, 0) != 0);
+ Global.INSTANT_APP_DEXOPT_ENABLED, 0) != 0)
+ && ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) == 0);
if (performDexopt) {
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dexopt");
@@ -18867,7 +18934,8 @@
// Also, don't fail application installs if the dexopt step fails.
DexoptOptions dexoptOptions = new DexoptOptions(pkg.packageName,
REASON_INSTALL,
- DexoptOptions.DEXOPT_BOOT_COMPLETE);
+ DexoptOptions.DEXOPT_BOOT_COMPLETE |
+ DexoptOptions.DEXOPT_INSTALL_WITH_DEX_METADATA_FILE);
mPackageDexOptimizer.performDexOpt(pkg, pkg.usesLibraryFiles,
null /* instructionSets */,
getOrCreateCompilerPackageStats(pkg),
@@ -22047,7 +22115,6 @@
}
clearAppDataLIF(newPkg, UserHandle.USER_ALL, FLAG_STORAGE_DE
| FLAG_STORAGE_CE | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
- clearAppProfilesLIF(newPkg, UserHandle.USER_ALL);
mDexManager.notifyPackageUpdated(newPkg.packageName,
newPkg.baseCodePath, newPkg.splitCodePaths);
}
@@ -24207,6 +24274,8 @@
Slog.e(TAG, "Failed to create app data for " + packageName + ": " + e);
}
}
+ // Prepare the application profiles.
+ mArtManagerService.prepareAppProfiles(pkg, userId);
if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 && ceDataInode != -1) {
// TODO: mark this structure as dirty so we persist it!
@@ -24903,6 +24972,11 @@
return mInstallerService;
}
+ @Override
+ public IArtManager getArtManager() {
+ return mArtManagerService;
+ }
+
private boolean userNeedsBadging(int userId) {
int index = mUserNeedsBadging.indexOfKey(userId);
if (index < 0) {
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceCompilerMapping.java b/services/core/java/com/android/server/pm/PackageManagerServiceCompilerMapping.java
index 19b0d9b..fce8285 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceCompilerMapping.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceCompilerMapping.java
@@ -123,4 +123,14 @@
return value;
}
+
+ public static String getReasonName(int reason) {
+ if (reason == PackageManagerService.REASON_UNKNOWN) {
+ return "unknown";
+ }
+ if (reason < 0 || reason >= REASON_STRINGS.length) {
+ throw new IllegalArgumentException("reason " + reason + " invalid");
+ }
+ return REASON_STRINGS[reason];
+ }
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index 806abec..6369b4d 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -42,6 +42,7 @@
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.pm.VersionedPackage;
+import android.content.pm.dex.DexMetadataHelper;
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.net.Uri;
@@ -76,7 +77,7 @@
import java.util.Comparator;
import java.util.List;
import java.util.WeakHashMap;
-import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
class PackageManagerShellCommand extends ShellCommand {
@@ -1480,6 +1481,14 @@
session = new PackageInstaller.Session(
mInterface.getPackageInstaller().openSession(sessionId));
+ // Sanity check that all .dm files match an apk.
+ // (The installer does not support standalone .dm files and will not process them.)
+ try {
+ DexMetadataHelper.validateDexPaths(session.getNames());
+ } catch (IllegalStateException | IOException e) {
+ pw.println("Warning [Could not validate the dex paths: " + e.getMessage() + "]");
+ }
+
final LocalIntentReceiver receiver = new LocalIntentReceiver();
session.commit(receiver.getIntentSender());
@@ -1741,7 +1750,7 @@
}
private static class LocalIntentReceiver {
- private final SynchronousQueue<Intent> mResult = new SynchronousQueue<>();
+ private final LinkedBlockingQueue<Intent> mResult = new LinkedBlockingQueue<>();
private IIntentSender.Stub mLocalSender = new IIntentSender.Stub() {
@Override
diff --git a/services/core/java/com/android/server/pm/SELinuxMMAC.java b/services/core/java/com/android/server/pm/SELinuxMMAC.java
index f0ce3c9..1268464 100644
--- a/services/core/java/com/android/server/pm/SELinuxMMAC.java
+++ b/services/core/java/com/android/server/pm/SELinuxMMAC.java
@@ -60,10 +60,8 @@
// to synchronize access during policy load and access attempts.
private static List<Policy> sPolicies = new ArrayList<>();
- /** Path to MAC permissions on system image */
- private static final File[] MAC_PERMISSIONS =
- { new File(Environment.getRootDirectory(), "/etc/selinux/plat_mac_permissions.xml"),
- new File(Environment.getVendorDirectory(), "/etc/selinux/nonplat_mac_permissions.xml") };
+ /** Required MAC permissions files */
+ private static List<File> sMacPermissions = new ArrayList<>();
// Append privapp to existing seinfo label
private static final String PRIVILEGED_APP_STR = ":privapp";
@@ -74,13 +72,40 @@
// Append targetSdkVersion=n to existing seinfo label where n is the app's targetSdkVersion
private static final String TARGETSDKVERSION_STR = ":targetSdkVersion=";
+ // Only initialize sMacPermissions once.
+ static {
+ // Platform mac permissions.
+ sMacPermissions.add(new File(
+ Environment.getRootDirectory(), "/etc/selinux/plat_mac_permissions.xml"));
+
+ // Vendor mac permissions.
+ // The filename has been renamed from nonplat_mac_permissions to
+ // vendor_mac_permissions. Either of them should exist.
+ final File vendorMacPermission = new File(
+ Environment.getVendorDirectory(), "/etc/selinux/vendor_mac_permissions.xml");
+ if (vendorMacPermission.exists()) {
+ sMacPermissions.add(vendorMacPermission);
+ } else {
+ // For backward compatibility.
+ sMacPermissions.add(new File(Environment.getVendorDirectory(),
+ "/etc/selinux/nonplat_mac_permissions.xml"));
+ }
+
+ // ODM mac permissions (optional).
+ final File odmMacPermission = new File(
+ Environment.getOdmDirectory(), "/etc/selinux/odm_mac_permissions.xml");
+ if (odmMacPermission.exists()) {
+ sMacPermissions.add(odmMacPermission);
+ }
+ }
+
/**
* Load the mac_permissions.xml file containing all seinfo assignments used to
- * label apps. The loaded mac_permissions.xml file is determined by the
- * MAC_PERMISSIONS class variable which is set at class load time which itself
- * is based on the USE_OVERRIDE_POLICY class variable. For further guidance on
+ * label apps. The loaded mac_permissions.xml files are plat_mac_permissions.xml and
+ * vendor_mac_permissions.xml, on /system and /vendor partitions, respectively.
+ * odm_mac_permissions.xml on /odm partition is optional. For further guidance on
* the proper structure of a mac_permissions.xml file consult the source code
- * located at system/sepolicy/mac_permissions.xml.
+ * located at system/sepolicy/private/mac_permissions.xml.
*
* @return boolean indicating if policy was correctly loaded. A value of false
* typically indicates a structural problem with the xml or incorrectly
@@ -93,10 +118,13 @@
FileReader policyFile = null;
XmlPullParser parser = Xml.newPullParser();
- for (int i = 0; i < MAC_PERMISSIONS.length; i++) {
+
+ final int count = sMacPermissions.size();
+ for (int i = 0; i < count; ++i) {
+ final File macPermission = sMacPermissions.get(i);
try {
- policyFile = new FileReader(MAC_PERMISSIONS[i]);
- Slog.d(TAG, "Using policy file " + MAC_PERMISSIONS[i]);
+ policyFile = new FileReader(macPermission);
+ Slog.d(TAG, "Using policy file " + macPermission);
parser.setInput(policyFile);
parser.nextTag();
@@ -120,13 +148,13 @@
StringBuilder sb = new StringBuilder("Exception @");
sb.append(parser.getPositionDescription());
sb.append(" while parsing ");
- sb.append(MAC_PERMISSIONS[i]);
+ sb.append(macPermission);
sb.append(":");
sb.append(ex);
Slog.w(TAG, sb.toString());
return false;
} catch (IOException ioe) {
- Slog.w(TAG, "Exception parsing " + MAC_PERMISSIONS[i], ioe);
+ Slog.w(TAG, "Exception parsing " + macPermission, ioe);
return false;
} finally {
IoUtils.closeQuietly(policyFile);
diff --git a/services/core/java/com/android/server/pm/SharedUserSetting.java b/services/core/java/com/android/server/pm/SharedUserSetting.java
index 06e020a..74294ea 100644
--- a/services/core/java/com/android/server/pm/SharedUserSetting.java
+++ b/services/core/java/com/android/server/pm/SharedUserSetting.java
@@ -33,6 +33,7 @@
final ArraySet<PackageSetting> packages = new ArraySet<PackageSetting>();
final PackageSignatures signatures = new PackageSignatures();
+ Boolean signaturesChanged;
SharedUserSetting(String _name, int _pkgFlags, int _pkgPrivateFlags) {
super(_pkgFlags, _pkgPrivateFlags);
diff --git a/services/core/java/com/android/server/pm/dex/ArtManagerService.java b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
new file mode 100644
index 0000000..e290272
--- /dev/null
+++ b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
@@ -0,0 +1,400 @@
+/*
+ * 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
+ */
+
+package com.android.server.pm.dex;
+
+import android.Manifest;
+import android.annotation.UserIdInt;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageParser;
+import android.content.pm.dex.ArtManager;
+import android.content.pm.dex.ArtManager.ProfileType;
+import android.content.pm.dex.DexMetadataHelper;
+import android.os.Binder;
+import android.os.Build;
+import android.os.Handler;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.content.pm.IPackageManager;
+import android.content.pm.dex.ISnapshotRuntimeProfileCallback;
+import android.os.SystemProperties;
+import android.os.UserHandle;
+import android.system.Os;
+import android.util.ArrayMap;
+import android.util.Slog;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.os.BackgroundThread;
+import com.android.internal.util.ArrayUtils;
+import com.android.internal.util.Preconditions;
+import com.android.server.pm.Installer;
+import com.android.server.pm.Installer.InstallerException;
+import java.io.File;
+import java.io.FileNotFoundException;
+import libcore.io.IoUtils;
+import libcore.util.NonNull;
+import libcore.util.Nullable;
+
+/**
+ * A system service that provides access to runtime and compiler artifacts.
+ *
+ * This service is not accessed by users directly, instead one uses an instance of
+ * {@link ArtManager}, which can be accessed via {@link PackageManager} as follows:
+ * <p/>
+ * {@code context().getPackageManager().getArtManager();}
+ * <p class="note">
+ * Note: Accessing runtime artifacts may require extra permissions. For example querying the
+ * runtime profiles of apps requires {@link android.Manifest.permission#READ_RUNTIME_PROFILES}
+ * which is a system-level permission that will not be granted to normal apps.
+ */
+public class ArtManagerService extends android.content.pm.dex.IArtManager.Stub {
+ private static final String TAG = "ArtManagerService";
+
+ private static boolean DEBUG = false;
+ private static boolean DEBUG_IGNORE_PERMISSIONS = false;
+
+ // Package name used to create the profile directory layout when
+ // taking a snapshot of the boot image profile.
+ private static final String BOOT_IMAGE_ANDROID_PACKAGE = "android";
+ // Profile name used for the boot image profile.
+ private static final String BOOT_IMAGE_PROFILE_NAME = "android.prof";
+
+ private final IPackageManager mPackageManager;
+ private final Object mInstallLock;
+ @GuardedBy("mInstallLock")
+ private final Installer mInstaller;
+
+ private final Handler mHandler;
+
+ public ArtManagerService(IPackageManager pm, Installer installer, Object installLock) {
+ mPackageManager = pm;
+ mInstaller = installer;
+ mInstallLock = installLock;
+ mHandler = new Handler(BackgroundThread.getHandler().getLooper());
+ }
+
+ @Override
+ public void snapshotRuntimeProfile(@ProfileType int profileType, @Nullable String packageName,
+ @Nullable String codePath, @NonNull ISnapshotRuntimeProfileCallback callback) {
+ // Sanity checks on the arguments.
+ Preconditions.checkNotNull(callback);
+
+ boolean bootImageProfile = profileType == ArtManager.PROFILE_BOOT_IMAGE;
+ if (!bootImageProfile) {
+ Preconditions.checkStringNotEmpty(codePath);
+ Preconditions.checkStringNotEmpty(packageName);
+ }
+
+ // Verify that the caller has the right permissions and that the runtime profiling is
+ // enabled. The call to isRuntimePermissions will checkReadRuntimeProfilePermission.
+ if (!isRuntimeProfilingEnabled(profileType)) {
+ throw new IllegalStateException("Runtime profiling is not enabled for " + profileType);
+ }
+
+ if (DEBUG) {
+ Slog.d(TAG, "Requested snapshot for " + packageName + ":" + codePath);
+ }
+
+ if (bootImageProfile) {
+ snapshotBootImageProfile(callback);
+ } else {
+ snapshotAppProfile(packageName, codePath, callback);
+ }
+ }
+
+ private void snapshotAppProfile(String packageName, String codePath,
+ ISnapshotRuntimeProfileCallback callback) {
+ PackageInfo info = null;
+ try {
+ // Note that we use the default user 0 to retrieve the package info.
+ // This doesn't really matter because for user 0 we always get a package back (even if
+ // it's not installed for the user 0). It is ok because we only care about the code
+ // paths and not if the package is enabled or not for the user.
+
+ // TODO(calin): consider adding an API to PMS which can retrieve the
+ // PackageParser.Package.
+ info = mPackageManager.getPackageInfo(packageName, /*flags*/ 0, /*userId*/ 0);
+ } catch (RemoteException ignored) {
+ // Should not happen.
+ }
+ if (info == null) {
+ postError(callback, packageName, ArtManager.SNAPSHOT_FAILED_PACKAGE_NOT_FOUND);
+ return;
+ }
+
+ boolean pathFound = info.applicationInfo.getBaseCodePath().equals(codePath);
+ String splitName = null;
+ String[] splitCodePaths = info.applicationInfo.getSplitCodePaths();
+ if (!pathFound && (splitCodePaths != null)) {
+ for (int i = splitCodePaths.length - 1; i >= 0; i--) {
+ if (splitCodePaths[i].equals(codePath)) {
+ pathFound = true;
+ splitName = info.applicationInfo.splitNames[i];
+ break;
+ }
+ }
+ }
+ if (!pathFound) {
+ postError(callback, packageName, ArtManager.SNAPSHOT_FAILED_CODE_PATH_NOT_FOUND);
+ return;
+ }
+
+ // All good, create the profile snapshot.
+ int appId = UserHandle.getAppId(info.applicationInfo.uid);
+ if (appId < 0) {
+ postError(callback, packageName, ArtManager.SNAPSHOT_FAILED_INTERNAL_ERROR);
+ Slog.wtf(TAG, "AppId is -1 for package: " + packageName);
+ return;
+ }
+
+ createProfileSnapshot(packageName, ArtManager.getProfileName(splitName), codePath,
+ appId, callback);
+ // Destroy the snapshot, we no longer need it.
+ destroyProfileSnapshot(packageName, ArtManager.getProfileName(splitName));
+ }
+
+ private void createProfileSnapshot(String packageName, String profileName, String classpath,
+ int appId, ISnapshotRuntimeProfileCallback callback) {
+ // Ask the installer to snapshot the profile.
+ synchronized (mInstallLock) {
+ try {
+ if (!mInstaller.createProfileSnapshot(appId, packageName, profileName, classpath)) {
+ postError(callback, packageName, ArtManager.SNAPSHOT_FAILED_INTERNAL_ERROR);
+ return;
+ }
+ } catch (InstallerException e) {
+ postError(callback, packageName, ArtManager.SNAPSHOT_FAILED_INTERNAL_ERROR);
+ return;
+ }
+ }
+
+ // Open the snapshot and invoke the callback.
+ File snapshotProfile = ArtManager.getProfileSnapshotFileForName(packageName, profileName);
+
+ ParcelFileDescriptor fd = null;
+ try {
+ fd = ParcelFileDescriptor.open(snapshotProfile, ParcelFileDescriptor.MODE_READ_ONLY);
+ postSuccess(packageName, fd, callback);
+ } catch (FileNotFoundException e) {
+ Slog.w(TAG, "Could not open snapshot profile for " + packageName + ":"
+ + snapshotProfile, e);
+ postError(callback, packageName, ArtManager.SNAPSHOT_FAILED_INTERNAL_ERROR);
+ } finally {
+ IoUtils.closeQuietly(fd);
+ }
+ }
+
+ private void destroyProfileSnapshot(String packageName, String profileName) {
+ if (DEBUG) {
+ Slog.d(TAG, "Destroying profile snapshot for" + packageName + ":" + profileName);
+ }
+
+ synchronized (mInstallLock) {
+ try {
+ mInstaller.destroyProfileSnapshot(packageName, profileName);
+ } catch (InstallerException e) {
+ Slog.e(TAG, "Failed to destroy profile snapshot for " +
+ packageName + ":" + profileName, e);
+ }
+ }
+ }
+
+ @Override
+ public boolean isRuntimeProfilingEnabled(@ProfileType int profileType) {
+ // Verify that the caller has the right permissions.
+ checkReadRuntimeProfilePermission();
+
+ switch (profileType) {
+ case ArtManager.PROFILE_APPS :
+ return SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false);
+ case ArtManager.PROFILE_BOOT_IMAGE:
+ return (Build.IS_USERDEBUG || Build.IS_ENG) &&
+ SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false) &&
+ SystemProperties.getBoolean("dalvik.vm.profilebootimage", false);
+ default:
+ throw new IllegalArgumentException("Invalid profile type:" + profileType);
+ }
+ }
+
+ private void snapshotBootImageProfile(ISnapshotRuntimeProfileCallback callback) {
+ // Combine the profiles for boot classpath and system server classpath.
+ // This avoids having yet another type of profiles and simplifies the processing.
+ String classpath = String.join(":", Os.getenv("BOOTCLASSPATH"),
+ Os.getenv("SYSTEMSERVERCLASSPATH"));
+
+ // Create the snapshot.
+ createProfileSnapshot(BOOT_IMAGE_ANDROID_PACKAGE, BOOT_IMAGE_PROFILE_NAME, classpath,
+ /*appId*/ -1, callback);
+ // Destroy the snapshot, we no longer need it.
+ destroyProfileSnapshot(BOOT_IMAGE_ANDROID_PACKAGE, BOOT_IMAGE_PROFILE_NAME);
+ }
+
+ /**
+ * Post {@link ISnapshotRuntimeProfileCallback#onError(int)} with the given error message
+ * on the internal {@code mHandler}.
+ */
+ private void postError(ISnapshotRuntimeProfileCallback callback, String packageName,
+ int errCode) {
+ if (DEBUG) {
+ Slog.d(TAG, "Failed to snapshot profile for " + packageName + " with error: " +
+ errCode);
+ }
+ mHandler.post(() -> {
+ try {
+ callback.onError(errCode);
+ } catch (RemoteException e) {
+ Slog.w(TAG, "Failed to callback after profile snapshot for " + packageName, e);
+ }
+ });
+ }
+
+ private void postSuccess(String packageName, ParcelFileDescriptor fd,
+ ISnapshotRuntimeProfileCallback callback) {
+ if (DEBUG) {
+ Slog.d(TAG, "Successfully snapshot profile for " + packageName);
+ }
+ mHandler.post(() -> {
+ try {
+ callback.onSuccess(fd);
+ } catch (RemoteException e) {
+ Slog.w(TAG,
+ "Failed to call onSuccess after profile snapshot for " + packageName, e);
+ }
+ });
+ }
+
+ /**
+ * Verify that the binder calling uid has {@code android.permission.READ_RUNTIME_PROFILE}.
+ * If not, it throws a {@link SecurityException}.
+ */
+ private void checkReadRuntimeProfilePermission() {
+ if (DEBUG_IGNORE_PERMISSIONS) {
+ return;
+ }
+ try {
+ int result = mPackageManager.checkUidPermission(
+ Manifest.permission.READ_RUNTIME_PROFILES, Binder.getCallingUid());
+ if (result != PackageManager.PERMISSION_GRANTED) {
+ throw new SecurityException("You need "
+ + Manifest.permission.READ_RUNTIME_PROFILES
+ + " permission to snapshot profiles.");
+ }
+ } catch (RemoteException e) {
+ // Should not happen.
+ }
+ }
+
+ /**
+ * Prepare the application profiles.
+ * For all code paths:
+ * - create the current primary profile to save time at app startup time.
+ * - copy the profiles from the associated dex metadata file to the reference profile.
+ */
+ public void prepareAppProfiles(PackageParser.Package pkg, @UserIdInt int user) {
+ final int appId = UserHandle.getAppId(pkg.applicationInfo.uid);
+ if (user < 0) {
+ Slog.wtf(TAG, "Invalid user id: " + user);
+ return;
+ }
+ if (appId < 0) {
+ Slog.wtf(TAG, "Invalid app id: " + appId);
+ return;
+ }
+ try {
+ ArrayMap<String, String> codePathsProfileNames = getPackageProfileNames(pkg);
+ for (int i = codePathsProfileNames.size() - 1; i >= 0; i--) {
+ String codePath = codePathsProfileNames.keyAt(i);
+ String profileName = codePathsProfileNames.valueAt(i);
+ File dexMetadata = DexMetadataHelper.findDexMetadataForFile(new File(codePath));
+ String dexMetadataPath = dexMetadata == null ? null : dexMetadata.getAbsolutePath();
+ synchronized (mInstaller) {
+ boolean result = mInstaller.prepareAppProfile(pkg.packageName, user, appId,
+ profileName, codePath, dexMetadataPath);
+ if (!result) {
+ Slog.e(TAG, "Failed to prepare profile for " +
+ pkg.packageName + ":" + codePath);
+ }
+ }
+ }
+ } catch (InstallerException e) {
+ Slog.e(TAG, "Failed to prepare profile for " + pkg.packageName, e);
+ }
+ }
+
+ /**
+ * Prepares the app profiles for a set of users. {@see ArtManagerService#prepareAppProfiles}.
+ */
+ public void prepareAppProfiles(PackageParser.Package pkg, int[] user) {
+ for (int i = 0; i < user.length; i++) {
+ prepareAppProfiles(pkg, user[i]);
+ }
+ }
+
+ /**
+ * Clear the profiles for the given package.
+ */
+ public void clearAppProfiles(PackageParser.Package pkg) {
+ try {
+ ArrayMap<String, String> packageProfileNames = getPackageProfileNames(pkg);
+ for (int i = packageProfileNames.size() - 1; i >= 0; i--) {
+ String profileName = packageProfileNames.valueAt(i);
+ mInstaller.clearAppProfiles(pkg.packageName, profileName);
+ }
+ } catch (InstallerException e) {
+ Slog.w(TAG, String.valueOf(e));
+ }
+ }
+
+ /**
+ * Dumps the profiles for the given package.
+ */
+ public void dumpProfiles(PackageParser.Package pkg) {
+ final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
+ try {
+ ArrayMap<String, String> packageProfileNames = getPackageProfileNames(pkg);
+ for (int i = packageProfileNames.size() - 1; i >= 0; i--) {
+ String codePath = packageProfileNames.keyAt(i);
+ String profileName = packageProfileNames.valueAt(i);
+ synchronized (mInstallLock) {
+ mInstaller.dumpProfiles(sharedGid, pkg.packageName, profileName, codePath);
+ }
+ }
+ } catch (InstallerException e) {
+ Slog.w(TAG, "Failed to dump profiles", e);
+ }
+ }
+
+ /**
+ * Build the profiles names for all the package code paths (excluding resource only paths).
+ * Return the map [code path -> profile name].
+ */
+ private ArrayMap<String, String> getPackageProfileNames(PackageParser.Package pkg) {
+ ArrayMap<String, String> result = new ArrayMap<>();
+ if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_HAS_CODE) != 0) {
+ result.put(pkg.baseCodePath, ArtManager.getProfileName(null));
+ }
+ if (!ArrayUtils.isEmpty(pkg.splitCodePaths)) {
+ for (int i = 0; i < pkg.splitCodePaths.length; i++) {
+ if ((pkg.splitFlags[i] & ApplicationInfo.FLAG_HAS_CODE) != 0) {
+ result.put(pkg.splitCodePaths[i], ArtManager.getProfileName(pkg.splitNames[i]));
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/services/core/java/com/android/server/pm/dex/DexLogger.java b/services/core/java/com/android/server/pm/dex/DexLogger.java
new file mode 100644
index 0000000..c7bbf1c
--- /dev/null
+++ b/services/core/java/com/android/server/pm/dex/DexLogger.java
@@ -0,0 +1,116 @@
+/*
+ * 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
+ */
+
+package com.android.server.pm.dex;
+
+import android.content.pm.ApplicationInfo;
+import android.content.pm.IPackageManager;
+import android.os.RemoteException;
+
+import android.util.ArraySet;
+import android.util.ByteStringUtils;
+import android.util.EventLog;
+import android.util.PackageUtils;
+import android.util.Slog;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.server.pm.Installer;
+import com.android.server.pm.Installer.InstallerException;
+
+import java.io.File;
+import java.util.Set;
+
+import static com.android.server.pm.dex.PackageDexUsage.DexUseInfo;
+
+/**
+ * This class is responsible for logging data about secondary dex files.
+ * The data logged includes hashes of the name and content of each file.
+ */
+public class DexLogger implements DexManager.Listener {
+ private static final String TAG = "DexLogger";
+
+ // Event log tag & subtag used for SafetyNet logging of dynamic
+ // code loading (DCL) - see b/63927552.
+ private static final int SNET_TAG = 0x534e4554;
+ private static final String DCL_SUBTAG = "dcl";
+
+ private final IPackageManager mPackageManager;
+ private final Object mInstallLock;
+ @GuardedBy("mInstallLock")
+ private final Installer mInstaller;
+
+ public static DexManager.Listener getListener(IPackageManager pms,
+ Installer installer, Object installLock) {
+ return new DexLogger(pms, installer, installLock);
+ }
+
+ private DexLogger(IPackageManager pms, Installer installer, Object installLock) {
+ mPackageManager = pms;
+ mInstaller = installer;
+ mInstallLock = installLock;
+ }
+
+ /**
+ * Compute and log hashes of the name and content of a secondary dex file.
+ */
+ @Override
+ public void onReconcileSecondaryDexFile(ApplicationInfo appInfo, DexUseInfo dexUseInfo,
+ String dexPath, int storageFlags) {
+ int ownerUid = appInfo.uid;
+
+ byte[] hash = null;
+ synchronized(mInstallLock) {
+ try {
+ hash = mInstaller.hashSecondaryDexFile(dexPath, appInfo.packageName,
+ ownerUid, appInfo.volumeUuid, storageFlags);
+ } catch (InstallerException e) {
+ Slog.e(TAG, "Got InstallerException when hashing dex " + dexPath +
+ " : " + e.getMessage());
+ }
+ }
+ if (hash == null) {
+ return;
+ }
+
+ String dexFileName = new File(dexPath).getName();
+ String message = PackageUtils.computeSha256Digest(dexFileName.getBytes());
+ // Valid SHA256 will be 256 bits, 32 bytes.
+ if (hash.length == 32) {
+ message = message + ' ' + ByteStringUtils.toHexString(hash);
+ }
+
+ EventLog.writeEvent(SNET_TAG, DCL_SUBTAG, ownerUid, message);
+
+ if (dexUseInfo.isUsedByOtherApps()) {
+ Set<String> otherPackages = dexUseInfo.getLoadingPackages();
+ Set<Integer> otherUids = new ArraySet<>(otherPackages.size());
+ for (String otherPackageName : otherPackages) {
+ try {
+ int otherUid = mPackageManager.getPackageUid(
+ otherPackageName, /*flags*/0, dexUseInfo.getOwnerUserId());
+ if (otherUid != -1 && otherUid != ownerUid) {
+ otherUids.add(otherUid);
+ }
+ } catch (RemoteException ignore) {
+ // Can't happen, we're local.
+ }
+ }
+ for (int otherUid : otherUids) {
+ EventLog.writeEvent(SNET_TAG, DCL_SUBTAG, otherUid, message);
+ }
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/pm/dex/DexManager.java b/services/core/java/com/android/server/pm/dex/DexManager.java
index 6274754..3e63fb4 100644
--- a/services/core/java/com/android/server/pm/dex/DexManager.java
+++ b/services/core/java/com/android/server/pm/dex/DexManager.java
@@ -76,6 +76,7 @@
private final Object mInstallLock;
@GuardedBy("mInstallLock")
private final Installer mInstaller;
+ private final Listener mListener;
// Possible outcomes of a dex search.
private static int DEX_SEARCH_NOT_FOUND = 0; // dex file not found
@@ -96,14 +97,24 @@
*/
private final static PackageUseInfo DEFAULT_USE_INFO = new PackageUseInfo();
+ public interface Listener {
+ /**
+ * Invoked just before the secondary dex file {@code dexPath} for the specified application
+ * is reconciled.
+ */
+ void onReconcileSecondaryDexFile(ApplicationInfo appInfo, DexUseInfo dexUseInfo,
+ String dexPath, int storageFlags);
+ }
+
public DexManager(IPackageManager pms, PackageDexOptimizer pdo,
- Installer installer, Object installLock) {
+ Installer installer, Object installLock, Listener listener) {
mPackageCodeLocationsCache = new HashMap<>();
mPackageDexUsage = new PackageDexUsage();
mPackageManager = pms;
mPackageDexOptimizer = pdo;
mInstaller = installer;
mInstallLock = installLock;
+ mListener = listener;
}
/**
@@ -389,7 +400,7 @@
: mPackageDexOptimizer;
String packageName = options.getPackageName();
PackageUseInfo useInfo = getPackageUseInfoOrDefault(packageName);
- if (useInfo == null || useInfo.getDexUseInfoMap().isEmpty()) {
+ if (useInfo.getDexUseInfoMap().isEmpty()) {
if (DEBUG) {
Slog.d(TAG, "No secondary dex use for package:" + packageName);
}
@@ -433,7 +444,7 @@
*/
public void reconcileSecondaryDexFiles(String packageName) {
PackageUseInfo useInfo = getPackageUseInfoOrDefault(packageName);
- if (useInfo == null || useInfo.getDexUseInfoMap().isEmpty()) {
+ if (useInfo.getDexUseInfoMap().isEmpty()) {
if (DEBUG) {
Slog.d(TAG, "No secondary dex use for package:" + packageName);
}
@@ -481,12 +492,16 @@
continue;
}
+ if (mListener != null) {
+ mListener.onReconcileSecondaryDexFile(info, dexUseInfo, dexPath, flags);
+ }
+
boolean dexStillExists = true;
synchronized(mInstallLock) {
try {
String[] isas = dexUseInfo.getLoaderIsas().toArray(new String[0]);
dexStillExists = mInstaller.reconcileSecondaryDexFile(dexPath, packageName,
- pkg.applicationInfo.uid, isas, pkg.applicationInfo.volumeUuid, flags);
+ info.uid, isas, info.volumeUuid, flags);
} catch (InstallerException e) {
Slog.e(TAG, "Got InstallerException when reconciling dex " + dexPath +
" : " + e.getMessage());
@@ -534,13 +549,12 @@
mPackageDexUsage.maybeWriteAsync();
}
- // Try to optimize the package according to the install reason.
- String compilerFilter = PackageManagerServiceCompilerMapping.getCompilerFilterForReason(
- PackageManagerService.REASON_INSTALL);
DexUseInfo dexUseInfo = mPackageDexUsage.getPackageUseInfo(searchResult.mOwningPackageName)
.getDexUseInfoMap().get(dexPath);
- DexoptOptions options = new DexoptOptions(info.packageName, compilerFilter, /*flags*/0);
+ // Try to optimize the package according to the install reason.
+ DexoptOptions options = new DexoptOptions(info.packageName,
+ PackageManagerService.REASON_INSTALL, /*flags*/0);
int result = mPackageDexOptimizer.dexOptSecondaryDexPath(info, dexPath, dexUseInfo,
options);
diff --git a/services/core/java/com/android/server/pm/dex/DexoptOptions.java b/services/core/java/com/android/server/pm/dex/DexoptOptions.java
index 0966770..a7a7686 100644
--- a/services/core/java/com/android/server/pm/dex/DexoptOptions.java
+++ b/services/core/java/com/android/server/pm/dex/DexoptOptions.java
@@ -59,6 +59,10 @@
// When set, indicates that dexopt is invoked from the background service.
public static final int DEXOPT_IDLE_BACKGROUND_JOB = 1 << 9;
+ // When set, indicates that dexopt is invoked from the install time flow and
+ // should get the dex metdata file if present.
+ public static final int DEXOPT_INSTALL_WITH_DEX_METADATA_FILE = 1 << 10;
+
// The name of package to optimize.
private final String mPackageName;
@@ -73,15 +77,21 @@
// It only applies for primary apk and it's always null if mOnlySecondaryDex is true.
private final String mSplitName;
+ // The reason for invoking dexopt (see PackageManagerService.REASON_* constants).
+ // A -1 value denotes an unknown reason.
+ private final int mCompilationReason;
+
public DexoptOptions(String packageName, String compilerFilter, int flags) {
- this(packageName, compilerFilter, /*splitName*/ null, flags);
+ this(packageName, /*compilationReason*/ -1, compilerFilter, /*splitName*/ null, flags);
}
- public DexoptOptions(String packageName, int compilerReason, int flags) {
- this(packageName, getCompilerFilterForReason(compilerReason), flags);
+ public DexoptOptions(String packageName, int compilationReason, int flags) {
+ this(packageName, compilationReason, getCompilerFilterForReason(compilationReason),
+ /*splitName*/ null, flags);
}
- public DexoptOptions(String packageName, String compilerFilter, String splitName, int flags) {
+ public DexoptOptions(String packageName, int compilationReason, String compilerFilter,
+ String splitName, int flags) {
int validityMask =
DEXOPT_CHECK_FOR_PROFILES_UPDATES |
DEXOPT_FORCE |
@@ -90,7 +100,8 @@
DEXOPT_ONLY_SHARED_DEX |
DEXOPT_DOWNGRADE |
DEXOPT_AS_SHARED_LIBRARY |
- DEXOPT_IDLE_BACKGROUND_JOB;
+ DEXOPT_IDLE_BACKGROUND_JOB |
+ DEXOPT_INSTALL_WITH_DEX_METADATA_FILE;
if ((flags & (~validityMask)) != 0) {
throw new IllegalArgumentException("Invalid flags : " + Integer.toHexString(flags));
}
@@ -99,6 +110,7 @@
mCompilerFilter = compilerFilter;
mFlags = flags;
mSplitName = splitName;
+ mCompilationReason = compilationReason;
}
public String getPackageName() {
@@ -141,6 +153,10 @@
return (mFlags & DEXOPT_IDLE_BACKGROUND_JOB) != 0;
}
+ public boolean isDexoptInstallWithDexMetadata() {
+ return (mFlags & DEXOPT_INSTALL_WITH_DEX_METADATA_FILE) != 0;
+ }
+
public String getSplitName() {
return mSplitName;
}
@@ -148,4 +164,8 @@
public int getFlags() {
return mFlags;
}
+
+ public int getCompilationReason() {
+ return mCompilationReason;
+ }
}
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index da14c36..521d558 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -392,6 +392,8 @@
KeyEvent.KEYCODE_CALCULATOR, Intent.CATEGORY_APP_CALCULATOR);
}
+ private static final int USER_ACTIVITY_NOTIFICATION_DELAY = 200;
+
/** Amount of time (in milliseconds) to wait for windows drawn before powering on. */
static final int WAITING_FOR_DRAWN_TIMEOUT = 1000;
@@ -677,6 +679,7 @@
private boolean mPendingKeyguardOccluded;
private boolean mKeyguardOccludedChanged;
+ private boolean mNotifyUserActivity;
boolean mShowingDream;
private boolean mLastShowingDream;
@@ -722,6 +725,9 @@
// Behavior of Back button while in-call and screen on
int mIncallBackBehavior;
+ // Whether system navigation keys are enabled
+ boolean mSystemNavigationKeysEnabled;
+
Display mDisplay;
private int mDisplayRotation;
@@ -831,6 +837,7 @@
private static final int MSG_DISPATCH_BACK_KEY_TO_AUTOFILL = 24;
private static final int MSG_SYSTEM_KEY_PRESS = 25;
private static final int MSG_HANDLE_ALL_APPS = 26;
+ private static final int MSG_NOTIFY_USER_ACTIVITY = 27;
private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_STATUS = 0;
private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_NAVIGATION = 1;
@@ -926,6 +933,13 @@
case MSG_HANDLE_ALL_APPS:
launchAllAppsAction();
break;
+ case MSG_NOTIFY_USER_ACTIVITY:
+ removeMessages(MSG_NOTIFY_USER_ACTIVITY);
+ Intent intent = new Intent(ACTION_USER_ACTIVITY_NOTIFICATION);
+ intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
+ mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
+ android.Manifest.permission.USER_ACTIVITY);
+ break;
}
}
}
@@ -978,6 +992,9 @@
resolver.registerContentObserver(Settings.Global.getUriFor(
Settings.Global.POLICY_CONTROL), false, this,
UserHandle.USER_ALL);
+ resolver.registerContentObserver(Settings.Secure.getUriFor(
+ Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED), false, this,
+ UserHandle.USER_ALL);
updateSettings();
}
@@ -2309,6 +2326,9 @@
Settings.Secure.INCALL_BACK_BUTTON_BEHAVIOR,
Settings.Secure.INCALL_BACK_BUTTON_BEHAVIOR_DEFAULT,
UserHandle.USER_CURRENT);
+ mSystemNavigationKeysEnabled = Settings.Secure.getIntForUser(resolver,
+ Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED,
+ 0, UserHandle.USER_CURRENT) == 1;
// Configure wake gesture.
boolean wakeGestureEnabledSetting = Settings.Secure.getIntForUser(resolver,
@@ -6298,7 +6318,7 @@
if (event.getAction() == KeyEvent.ACTION_UP) {
if (!mAccessibilityManager.isEnabled()
|| !mAccessibilityManager.sendFingerprintGesture(event.getKeyCode())) {
- if (areSystemNavigationKeysEnabled()) {
+ if (mSystemNavigationKeysEnabled) {
sendSystemKeyToStatusBarAsync(event.getKeyCode());
}
}
@@ -6791,7 +6811,7 @@
mWindowManagerDrawComplete = false;
mScreenOnListener = screenOnListener;
- if (mKeyguardDelegate != null) {
+ if (mKeyguardDelegate != null && mKeyguardDelegate.hasKeyguard()) {
mHandler.removeMessages(MSG_KEYGUARD_DRAWN_TIMEOUT);
mHandler.sendEmptyMessageDelayed(MSG_KEYGUARD_DRAWN_TIMEOUT,
getKeyguardDrawnTimeout());
@@ -6799,7 +6819,7 @@
} else {
if (DEBUG_WAKEUP) Slog.d(TAG,
"null mKeyguardDelegate: setting mKeyguardDrawComplete.");
- finishKeyguardDrawn();
+ mHandler.sendEmptyMessage(MSG_KEYGUARD_DRAWN_COMPLETE);
}
}
}
@@ -7466,6 +7486,13 @@
mHandler.sendEmptyMessage(MSG_HIDE_BOOT_MESSAGE);
}
+ @Override
+ public void requestUserActivityNotification() {
+ if (!mNotifyUserActivity && !mHandler.hasMessages(MSG_NOTIFY_USER_ACTIVITY)) {
+ mNotifyUserActivity = true;
+ }
+ }
+
/** {@inheritDoc} */
@Override
public void userActivity() {
@@ -7487,6 +7514,12 @@
mHandler.postDelayed(mScreenLockTimeout, mLockScreenTimeout);
}
}
+
+ if (mAwake && mNotifyUserActivity) {
+ mHandler.sendEmptyMessageDelayed(MSG_NOTIFY_USER_ACTIVITY,
+ USER_ACTIVITY_NOTIFICATION_DELAY);
+ mNotifyUserActivity = false;
+ }
}
class ScreenLockTimeout implements Runnable {
@@ -7783,11 +7816,6 @@
Settings.Global.THEATER_MODE_ON, 0) == 1;
}
- private boolean areSystemNavigationKeysEnabled() {
- return Settings.Secure.getIntForUser(mContext.getContentResolver(),
- Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 0, UserHandle.USER_CURRENT) == 1;
- }
-
@Override
public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always) {
if (!mVibrator.hasVibrator()) {
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
index 5a5471b..3345649 100644
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
@@ -235,6 +235,10 @@
return false;
}
+ public boolean hasKeyguard() {
+ return mKeyguardState.deviceHasKeyguard;
+ }
+
public boolean isInputRestricted() {
if (mKeyguardService != null) {
mKeyguardState.inputRestricted = mKeyguardService.isInputRestricted();
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 338ad2a..f2a7d42 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -220,8 +220,8 @@
private static final int HALT_MODE_REBOOT = 1;
private static final int HALT_MODE_REBOOT_SAFE_MODE = 2;
- // Persistent property for last reboot reason
- private static final String LAST_REBOOT_PROPERTY = "persist.sys.boot.reason";
+ // property for last reboot reason
+ private static final String REBOOT_PROPERTY = "sys.boot.reason";
private final Context mContext;
private final ServiceThread mHandlerThread;
@@ -4402,7 +4402,7 @@
final long ident = Binder.clearCallingIdentity();
try {
- return getLastShutdownReasonInternal(LAST_REBOOT_PROPERTY);
+ return getLastShutdownReasonInternal(REBOOT_PROPERTY);
} finally {
Binder.restoreCallingIdentity(ident);
}
diff --git a/services/core/java/com/android/server/timedetector/SimpleTimeDetectorStrategy.java b/services/core/java/com/android/server/timedetector/SimpleTimeDetectorStrategy.java
new file mode 100644
index 0000000..e5207cb
--- /dev/null
+++ b/services/core/java/com/android/server/timedetector/SimpleTimeDetectorStrategy.java
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+package com.android.server.timedetector;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.AlarmManager;
+import android.app.timedetector.TimeSignal;
+import android.util.Slog;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+
+/**
+ * A placeholder implementation of TimeDetectorStrategy that passes NITZ suggestions immediately
+ * to {@link AlarmManager}.
+ */
+public final class SimpleTimeDetectorStrategy implements TimeDetectorStrategy {
+
+ private final static String TAG = "timedetector.SimpleTimeDetectorStrategy";
+
+ private Callback mHelper;
+
+ @Override
+ public void initialize(@NonNull Callback callback) {
+ mHelper = callback;
+ }
+
+ @Override
+ public void suggestTime(@NonNull TimeSignal timeSignal) {
+ if (!TimeSignal.SOURCE_ID_NITZ.equals(timeSignal.getSourceId())) {
+ Slog.w(TAG, "Ignoring signal from unknown source: " + timeSignal);
+ return;
+ }
+
+ mHelper.setTime(timeSignal.getUtcTime());
+ }
+
+ @Override
+ public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @Nullable String[] args) {
+ // No state to dump.
+ }
+}
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorService.java b/services/core/java/com/android/server/timedetector/TimeDetectorService.java
new file mode 100644
index 0000000..0ec24d8
--- /dev/null
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorService.java
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+package com.android.server.timedetector;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.timedetector.ITimeDetectorService;
+import android.app.timedetector.TimeSignal;
+import android.content.Context;
+import android.os.Binder;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.DumpUtils;
+import com.android.server.SystemService;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.util.Objects;
+
+public final class TimeDetectorService extends ITimeDetectorService.Stub {
+
+ private static final String TAG = "timedetector.TimeDetectorService";
+
+ public static class Lifecycle extends SystemService {
+
+ public Lifecycle(Context context) {
+ super(context);
+ }
+
+ @Override
+ public void onStart() {
+ TimeDetectorService service = TimeDetectorService.create(getContext());
+
+ // Publish the binder service so it can be accessed from other (appropriately
+ // permissioned) processes.
+ publishBinderService(Context.TIME_DETECTOR_SERVICE, service);
+ }
+ }
+
+ private final Context mContext;
+ private final TimeDetectorStrategy mTimeDetectorStrategy;
+
+ private static TimeDetectorService create(Context context) {
+ TimeDetectorStrategy timeDetector = new SimpleTimeDetectorStrategy();
+ timeDetector.initialize(new TimeDetectorStrategyCallbackImpl(context));
+ return new TimeDetectorService(context, timeDetector);
+ }
+
+ @VisibleForTesting
+ public TimeDetectorService(@NonNull Context context,
+ @NonNull TimeDetectorStrategy timeDetectorStrategy) {
+ mContext = Objects.requireNonNull(context);
+ mTimeDetectorStrategy = Objects.requireNonNull(timeDetectorStrategy);
+ }
+
+ @Override
+ public void suggestTime(@NonNull TimeSignal timeSignal) {
+ enforceSetTimePermission();
+
+ long callerIdToken = Binder.clearCallingIdentity();
+ try {
+ mTimeDetectorStrategy.suggestTime(timeSignal);
+ } finally {
+ Binder.restoreCallingIdentity(callerIdToken);
+ }
+ }
+
+ @Override
+ protected void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw,
+ @Nullable String[] args) {
+ if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
+
+ mTimeDetectorStrategy.dump(fd, pw, args);
+ }
+
+ private void enforceSetTimePermission() {
+ mContext.enforceCallingPermission(android.Manifest.permission.SET_TIME, "set time");
+ }
+}
\ No newline at end of file
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
new file mode 100644
index 0000000..5cb2eed
--- /dev/null
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+package com.android.server.timedetector;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.timedetector.TimeSignal;
+import android.util.TimestampedValue;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+
+/**
+ * The interface for classes that implement the time detection algorithm used by the
+ * TimeDetectorService.
+ *
+ * @hide
+ */
+public interface TimeDetectorStrategy {
+
+ interface Callback {
+ void setTime(TimestampedValue<Long> time);
+ }
+
+ void initialize(@NonNull Callback callback);
+ void suggestTime(@NonNull TimeSignal timeSignal);
+ void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @Nullable String[] args);
+
+ // Utility methods below are to be moved to a better home when one becomes more obvious.
+
+ /**
+ * Adjusts the supplied time value by applying the difference between the reference time
+ * supplied and the reference time associated with the time.
+ */
+ static long getTimeAt(@NonNull TimestampedValue<Long> timeValue, long referenceClockMillisNow) {
+ return (referenceClockMillisNow - timeValue.getReferenceTimeMillis())
+ + timeValue.getValue();
+ }
+}
diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java
new file mode 100644
index 0000000..568d73a
--- /dev/null
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyCallbackImpl.java
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+package com.android.server.timedetector;
+
+import android.annotation.NonNull;
+import android.app.AlarmManager;
+import android.content.Context;
+import android.os.PowerManager;
+import android.os.SystemClock;
+import android.util.Slog;
+import android.util.TimestampedValue;
+
+/**
+ * The real implementation of {@link TimeDetectorStrategy.Callback} used on device.
+ */
+public class TimeDetectorStrategyCallbackImpl implements TimeDetectorStrategy.Callback {
+
+ private final static String TAG = "timedetector.TimeDetectorStrategyCallbackImpl";
+
+ @NonNull private PowerManager.WakeLock mWakeLock;
+ @NonNull private AlarmManager mAlarmManager;
+
+ public TimeDetectorStrategyCallbackImpl(Context context) {
+ PowerManager powerManager = context.getSystemService(PowerManager.class);
+
+ mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
+
+ mAlarmManager = context.getSystemService(AlarmManager.class);
+ }
+
+ @Override
+ public void setTime(TimestampedValue<Long> time) {
+ mWakeLock.acquire();
+ try {
+ long elapsedRealtimeMillis = SystemClock.elapsedRealtime();
+ long currentTimeMillis = TimeDetectorStrategy.getTimeAt(time, elapsedRealtimeMillis);
+ Slog.d(TAG, "Setting system clock using time=" + time
+ + ", elapsedRealtimeMillis=" + elapsedRealtimeMillis);
+ mAlarmManager.setTime(currentTimeMillis);
+ } finally {
+ mWakeLock.release();
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/updates/ApnDbInstallReceiver.java b/services/core/java/com/android/server/updates/ApnDbInstallReceiver.java
index 3b6f9d6..8d53143 100644
--- a/services/core/java/com/android/server/updates/ApnDbInstallReceiver.java
+++ b/services/core/java/com/android/server/updates/ApnDbInstallReceiver.java
@@ -29,7 +29,7 @@
"update_db");
public ApnDbInstallReceiver() {
- super("/data/misc/", "apns-conf.xml", "metadata/", "version");
+ super("/data/misc/apns/", "apns-conf.xml", "metadata/", "version");
}
@Override
diff --git a/services/core/java/com/android/server/updates/CarrierIdInstallReceiver.java b/services/core/java/com/android/server/updates/CarrierIdInstallReceiver.java
new file mode 100644
index 0000000..a123304
--- /dev/null
+++ b/services/core/java/com/android/server/updates/CarrierIdInstallReceiver.java
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+package com.android.server.updates;
+
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.provider.Telephony;
+
+public class CarrierIdInstallReceiver extends ConfigUpdateInstallReceiver {
+
+ public CarrierIdInstallReceiver() {
+ super("/data/misc/carrierid", "carrier_list.pb", "metadata/", "version");
+ }
+
+ @Override
+ protected void postInstall(Context context, Intent intent) {
+ ContentResolver resolver = context.getContentResolver();
+ resolver.update(Uri.withAppendedPath(Telephony.CarrierId.All.CONTENT_URI,
+ "update_db"), new ContentValues(), null, null);
+ }
+}
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index b888ec2..f6e863b 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -847,6 +847,17 @@
}
}
+ public void scheduleTimeoutLocked() {
+ // If we didn't reset it right away, do so after we couldn't connect to
+ // it for an extended amount of time to avoid having a black wallpaper.
+ final Handler fgHandler = FgThread.getHandler();
+ fgHandler.removeCallbacks(mResetRunnable);
+ fgHandler.postDelayed(mResetRunnable, WALLPAPER_RECONNECT_TIMEOUT_MS);
+ if (DEBUG_LIVE) {
+ Slog.i(TAG, "Started wallpaper reconnect timeout for " + mWallpaper.wallpaperComponent);
+ }
+ }
+
private void processDisconnect(final ServiceConnection connection) {
synchronized (mLock) {
// The wallpaper disappeared. If this isn't a system-default one, track
@@ -871,13 +882,13 @@
} else {
mWallpaper.lastDiedTime = SystemClock.uptimeMillis();
- // If we didn't reset it right away, do so after we couldn't connect to
- // it for an extended amount of time to avoid having a black wallpaper.
- final Handler fgHandler = FgThread.getHandler();
- fgHandler.removeCallbacks(mResetRunnable);
- fgHandler.postDelayed(mResetRunnable, WALLPAPER_RECONNECT_TIMEOUT_MS);
- if (DEBUG_LIVE) {
- Slog.i(TAG, "Started wallpaper reconnect timeout for " + wpService);
+ clearWallpaperComponentLocked(mWallpaper);
+ if (bindWallpaperComponentLocked(
+ wpService, false, false, mWallpaper, null)) {
+ mWallpaper.connection.scheduleTimeoutLocked();
+ } else {
+ Slog.w(TAG, "Reverting to built-in wallpaper!");
+ clearWallpaperLocked(true, FLAG_SYSTEM, mWallpaper.userId, null);
}
}
final String flattened = wpService.flattenToString();
diff --git a/services/core/java/com/android/server/webkit/SystemImpl.java b/services/core/java/com/android/server/webkit/SystemImpl.java
index bf769ed..1e334b8 100644
--- a/services/core/java/com/android/server/webkit/SystemImpl.java
+++ b/services/core/java/com/android/server/webkit/SystemImpl.java
@@ -304,6 +304,6 @@
// flags declaring we want extra info from the package manager for webview providers
private final static int PACKAGE_FLAGS = PackageManager.GET_META_DATA
- | PackageManager.GET_SIGNATURES | PackageManager.MATCH_DEBUG_TRIAGED_MISSING
- | PackageManager.MATCH_ANY_USER;
+ | PackageManager.GET_SIGNATURES | PackageManager.GET_SHARED_LIBRARY_FILES
+ | PackageManager.MATCH_DEBUG_TRIAGED_MISSING | PackageManager.MATCH_ANY_USER;
}
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
index 4698d72..4303352 100644
--- a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
+++ b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
@@ -301,6 +301,9 @@
}
private void drawSizeMismatchSnapshot(GraphicBuffer buffer) {
+ if (!mSurface.isValid()) {
+ throw new IllegalStateException("mSurface does not hold a valid surface.");
+ }
final SurfaceSession session = new SurfaceSession(mSurface);
// Keep a reference to it such that it doesn't get destroyed when finalized.
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 0abc847..671b00b 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -7301,6 +7301,15 @@
mPolicy.registerShortcutKey(shortcutCode, shortcutKeyReceiver);
}
+ @Override
+ public void requestUserActivityNotification() {
+ if (!checkCallingPermission(android.Manifest.permission.USER_ACTIVITY,
+ "requestUserActivityNotification()")) {
+ throw new SecurityException("Requires USER_ACTIVITY permission");
+ }
+ mPolicy.requestUserActivityNotification();
+ }
+
void markForSeamlessRotation(WindowState w, boolean seamlesslyRotated) {
if (seamlesslyRotated == w.mSeamlesslyRotated) {
return;
diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp
index 04fd3e3..fc2ea60 100644
--- a/services/core/jni/Android.bp
+++ b/services/core/jni/Android.bp
@@ -95,6 +95,8 @@
"libhwbinder",
"libutils",
"libhwui",
+ "libbpf",
+ "libnetdutils",
"android.hardware.audio.common@2.0",
"android.hardware.broadcastradio@1.0",
"android.hardware.broadcastradio@1.1",
diff --git a/services/core/jni/com_android_server_net_NetworkStatsService.cpp b/services/core/jni/com_android_server_net_NetworkStatsService.cpp
index 8de24e5..3302dea 100644
--- a/services/core/jni/com_android_server_net_NetworkStatsService.cpp
+++ b/services/core/jni/com_android_server_net_NetworkStatsService.cpp
@@ -29,6 +29,15 @@
#include <utils/misc.h>
#include <utils/Log.h>
+#include "android-base/unique_fd.h"
+#include "bpf/BpfNetworkStats.h"
+#include "bpf/BpfUtils.h"
+
+using android::bpf::Stats;
+using android::bpf::hasBpfSupport;
+using android::bpf::bpfGetUidStats;
+using android::bpf::bpfGetIfaceStats;
+
namespace android {
static const char* QTAGUID_IFACE_STATS = "/proc/net/xt_qtaguid/iface_stat_fmt";
@@ -46,15 +55,6 @@
TCP_TX_PACKETS = 5
};
-struct Stats {
- uint64_t rxBytes;
- uint64_t rxPackets;
- uint64_t txBytes;
- uint64_t txPackets;
- uint64_t tcpRxPackets;
- uint64_t tcpTxPackets;
-};
-
static uint64_t getStatsType(struct Stats* stats, StatsType type) {
switch (type) {
case RX_BYTES:
@@ -150,9 +150,18 @@
return 0;
}
-static jlong getTotalStat(JNIEnv* env, jclass clazz, jint type) {
+static jlong getTotalStat(JNIEnv* env, jclass clazz, jint type, jboolean useBpfStats) {
struct Stats stats;
memset(&stats, 0, sizeof(Stats));
+
+ if (useBpfStats) {
+ if (bpfGetIfaceStats(NULL, &stats) == 0) {
+ return getStatsType(&stats, (StatsType) type);
+ } else {
+ return UNKNOWN;
+ }
+ }
+
if (parseIfaceStats(NULL, &stats) == 0) {
return getStatsType(&stats, (StatsType) type);
} else {
@@ -160,7 +169,8 @@
}
}
-static jlong getIfaceStat(JNIEnv* env, jclass clazz, jstring iface, jint type) {
+static jlong getIfaceStat(JNIEnv* env, jclass clazz, jstring iface, jint type,
+ jboolean useBpfStats) {
ScopedUtfChars iface8(env, iface);
if (iface8.c_str() == NULL) {
return UNKNOWN;
@@ -168,6 +178,15 @@
struct Stats stats;
memset(&stats, 0, sizeof(Stats));
+
+ if (useBpfStats) {
+ if (bpfGetIfaceStats(iface8.c_str(), &stats) == 0) {
+ return getStatsType(&stats, (StatsType) type);
+ } else {
+ return UNKNOWN;
+ }
+ }
+
if (parseIfaceStats(iface8.c_str(), &stats) == 0) {
return getStatsType(&stats, (StatsType) type);
} else {
@@ -175,9 +194,18 @@
}
}
-static jlong getUidStat(JNIEnv* env, jclass clazz, jint uid, jint type) {
+static jlong getUidStat(JNIEnv* env, jclass clazz, jint uid, jint type, jboolean useBpfStats) {
struct Stats stats;
memset(&stats, 0, sizeof(Stats));
+
+ if (useBpfStats) {
+ if (bpfGetUidStats(uid, &stats) == 0) {
+ return getStatsType(&stats, (StatsType) type);
+ } else {
+ return UNKNOWN;
+ }
+ }
+
if (parseUidStats(uid, &stats) == 0) {
return getStatsType(&stats, (StatsType) type);
} else {
@@ -186,9 +214,9 @@
}
static const JNINativeMethod gMethods[] = {
- {"nativeGetTotalStat", "(I)J", (void*) getTotalStat},
- {"nativeGetIfaceStat", "(Ljava/lang/String;I)J", (void*) getIfaceStat},
- {"nativeGetUidStat", "(II)J", (void*) getUidStat},
+ {"nativeGetTotalStat", "(IZ)J", (void*) getTotalStat},
+ {"nativeGetIfaceStat", "(Ljava/lang/String;IZ)J", (void*) getIfaceStat},
+ {"nativeGetUidStat", "(IIZ)J", (void*) getUidStat},
};
int register_android_server_net_NetworkStatsService(JNIEnv* env) {
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java b/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
index e097fac..14a9163 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
@@ -30,6 +30,7 @@
import android.util.Slog;
import com.android.server.ServiceThread;
+import com.android.server.net.BaseNetdEventCallback;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -50,7 +51,7 @@
private ServiceThread mHandlerThread;
private NetworkLoggingHandler mNetworkLoggingHandler;
- private final INetdEventCallback mNetdEventCallback = new INetdEventCallback.Stub() {
+ private final INetdEventCallback mNetdEventCallback = new BaseNetdEventCallback() {
@Override
public void onDnsEvent(String hostname, String[] ipAddresses, int ipAddressesCount,
long timestamp, int uid) {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 60f201f..58e77e8 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -204,6 +204,8 @@
"com.android.server.autofill.AutofillManagerService";
private static final String TIME_ZONE_RULES_MANAGER_SERVICE_CLASS =
"com.android.server.timezone.RulesManagerService$Lifecycle";
+ private static final String TIME_DETECTOR_SERVICE_CLASS =
+ "com.android.server.timedetector.TimeDetectorService$Lifecycle";
private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst";
@@ -690,7 +692,6 @@
WindowManagerService wm = null;
SerialService serial = null;
NetworkTimeUpdateService networkTimeUpdater = null;
- CommonTimeManagementService commonTimeMgmtService = null;
InputManagerService inputManager = null;
TelephonyRegistry telephonyRegistry = null;
ConsumerIrService consumerIr = null;
@@ -1202,6 +1203,14 @@
traceEnd();
}
+ traceBeginAndSlog("StartTimeDetectorService");
+ try {
+ mSystemServiceManager.startService(TIME_DETECTOR_SERVICE_CLASS);
+ } catch (Throwable e) {
+ reportWtf("starting StartTimeDetectorService service", e);
+ }
+ traceEnd();
+
if (!disableNonCoreServices && !disableSearchManager) {
traceBeginAndSlog("StartSearchManagerService");
try {
@@ -1383,15 +1392,6 @@
traceEnd();
}
- traceBeginAndSlog("StartCommonTimeManagementService");
- try {
- commonTimeMgmtService = new CommonTimeManagementService(context);
- ServiceManager.addService("commontime_management", commonTimeMgmtService);
- } catch (Throwable e) {
- reportWtf("starting CommonTimeManagementService service", e);
- }
- traceEnd();
-
if (!disableNetwork) {
traceBeginAndSlog("CertBlacklister");
try {
@@ -1667,7 +1667,6 @@
final LocationManagerService locationF = location;
final CountryDetectorService countryDetectorF = countryDetector;
final NetworkTimeUpdateService networkTimeUpdaterF = networkTimeUpdater;
- final CommonTimeManagementService commonTimeMgmtServiceF = commonTimeMgmtService;
final InputManagerService inputManagerF = inputManager;
final TelephonyRegistry telephonyRegistryF = telephonyRegistry;
final MediaRouterService mediaRouterF = mediaRouter;
@@ -1813,15 +1812,6 @@
reportWtf("Notifying NetworkTimeService running", e);
}
traceEnd();
- traceBeginAndSlog("MakeCommonTimeManagementServiceReady");
- try {
- if (commonTimeMgmtServiceF != null) {
- commonTimeMgmtServiceF.systemRunning();
- }
- } catch (Throwable e) {
- reportWtf("Notifying CommonTimeManagementService running", e);
- }
- traceEnd();
traceBeginAndSlog("MakeInputManagerServiceReady");
try {
// TODO(BT) Pass parameter to input manager
diff --git a/services/net/OWNERS b/services/net/OWNERS
index 6f77e04..ce50558 100644
--- a/services/net/OWNERS
+++ b/services/net/OWNERS
@@ -1,7 +1,6 @@
set noparent
ek@google.com
-hugobenichi@google.com
jchalard@google.com
lorenzo@google.com
satk@google.com
diff --git a/services/net/java/android/net/apf/ApfCapabilities.java b/services/net/java/android/net/apf/ApfCapabilities.java
index 703b415..dec8ca2 100644
--- a/services/net/java/android/net/apf/ApfCapabilities.java
+++ b/services/net/java/android/net/apf/ApfCapabilities.java
@@ -49,4 +49,14 @@
return String.format("%s{version: %d, maxSize: %d, format: %d}", getClass().getSimpleName(),
apfVersionSupported, maximumApfProgramSize, apfPacketFormat);
}
+
+ /**
+ * Returns true if the APF interpreter advertises support for the data buffer access opcodes
+ * LDDW and STDW.
+ *
+ * Full LDDW and STDW support is present from APFv4 on.
+ */
+ public boolean hasDataAccess() {
+ return apfVersionSupported >= 4;
+ }
}
diff --git a/services/net/java/android/net/apf/ApfFilter.java b/services/net/java/android/net/apf/ApfFilter.java
index 7d9736e..8ac6ede 100644
--- a/services/net/java/android/net/apf/ApfFilter.java
+++ b/services/net/java/android/net/apf/ApfFilter.java
@@ -16,21 +16,22 @@
package android.net.apf;
+import static android.net.util.NetworkConstants.*;
import static android.system.OsConstants.*;
-
import static com.android.internal.util.BitUtils.bytesToBEInt;
import static com.android.internal.util.BitUtils.getUint16;
import static com.android.internal.util.BitUtils.getUint32;
import static com.android.internal.util.BitUtils.getUint8;
-import static com.android.internal.util.BitUtils.uint16;
import static com.android.internal.util.BitUtils.uint32;
-import static com.android.internal.util.BitUtils.uint8;
-import android.os.SystemClock;
+import android.annotation.Nullable;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
import android.net.LinkAddress;
import android.net.LinkProperties;
import android.net.NetworkUtils;
-import android.net.apf.ApfGenerator;
import android.net.apf.ApfGenerator.IllegalInstructionException;
import android.net.apf.ApfGenerator.Register;
import android.net.ip.IpClient;
@@ -39,31 +40,29 @@
import android.net.metrics.IpConnectivityLog;
import android.net.metrics.RaEvent;
import android.net.util.InterfaceParams;
+import android.os.PowerManager;
+import android.os.SystemClock;
import android.system.ErrnoException;
import android.system.Os;
import android.system.PacketSocketAddress;
import android.text.format.DateUtils;
import android.util.Log;
import android.util.Pair;
-
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.HexDump;
import com.android.internal.util.IndentingPrintWriter;
-
import java.io.FileDescriptor;
import java.io.IOException;
-import java.lang.Thread;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.SocketException;
import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
import java.nio.BufferUnderflowException;
+import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
-
import libcore.io.IoBridge;
/**
@@ -104,6 +103,70 @@
UPDATE_EXPIRY // APF program updated for expiry
}
+ /**
+ * APF packet counters.
+ *
+ * Packet counters are 32bit big-endian values, and allocated near the end of the APF data
+ * buffer, using negative byte offsets, where -4 is equivalent to maximumApfProgramSize - 4,
+ * the last writable 32bit word.
+ */
+ @VisibleForTesting
+ private static enum Counter {
+ RESERVED_OOB, // Points to offset 0 from the end of the buffer (out-of-bounds)
+ TOTAL_PACKETS,
+ PASSED_ARP,
+ PASSED_DHCP,
+ PASSED_IPV4,
+ PASSED_IPV6_NON_ICMP,
+ PASSED_IPV4_UNICAST,
+ PASSED_IPV6_ICMP,
+ PASSED_IPV6_UNICAST_NON_ICMP,
+ PASSED_ARP_NON_IPV4,
+ PASSED_ARP_UNKNOWN,
+ PASSED_ARP_UNICAST_REPLY,
+ PASSED_NON_IP_UNICAST,
+ DROPPED_ETH_BROADCAST,
+ DROPPED_RA,
+ DROPPED_GARP_REPLY,
+ DROPPED_ARP_OTHER_HOST,
+ DROPPED_IPV4_L2_BROADCAST,
+ DROPPED_IPV4_BROADCAST_ADDR,
+ DROPPED_IPV4_BROADCAST_NET,
+ DROPPED_IPV4_MULTICAST,
+ DROPPED_IPV6_ROUTER_SOLICITATION,
+ DROPPED_IPV6_MULTICAST_NA,
+ DROPPED_IPV6_MULTICAST,
+ DROPPED_IPV6_MULTICAST_PING,
+ DROPPED_IPV6_NON_ICMP_MULTICAST,
+ DROPPED_802_3_FRAME,
+ DROPPED_ETHERTYPE_BLACKLISTED;
+
+ // Returns the negative byte offset from the end of the APF data segment for
+ // a given counter.
+ public int offset() {
+ return - this.ordinal() * 4; // Currently, all counters are 32bit long.
+ }
+
+ // Returns the total size of the data segment in bytes.
+ public static int totalSize() {
+ return (Counter.class.getEnumConstants().length - 1) * 4;
+ }
+ }
+
+ /**
+ * When APFv4 is supported, loads R1 with the offset of the specified counter.
+ */
+ private void maybeSetCounter(ApfGenerator gen, Counter c) {
+ if (mApfCapabilities.hasDataAccess()) {
+ gen.addLoadImmediate(Register.R1, c.offset());
+ }
+ }
+
+ // When APFv4 is supported, these point to the trampolines generated by emitEpilogue().
+ // Otherwise, they're just aliases for PASS_LABEL and DROP_LABEL.
+ private final String mCountAndPassLabel;
+ private final String mCountAndDropLabel;
+
// Thread to listen for RAs.
@VisibleForTesting
class ReceiveThread extends Thread {
@@ -215,10 +278,6 @@
{ (byte) 0xff, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
private static final int ICMP6_TYPE_OFFSET = ETH_HEADER_LEN + IPV6_HEADER_LEN;
- private static final int ICMP6_ROUTER_SOLICITATION = 133;
- private static final int ICMP6_ROUTER_ADVERTISEMENT = 134;
- private static final int ICMP6_NEIGHBOR_SOLICITATION = 135;
- private static final int ICMP6_NEIGHBOR_ANNOUNCEMENT = 136;
// NOTE: this must be added to the IPv4 header length in IPV4_HEADER_SIZE_MEMORY_SLOT
private static final int UDP_DESTINATION_PORT_OFFSET = ETH_HEADER_LEN + 2;
@@ -258,9 +317,26 @@
private long mUniqueCounter;
@GuardedBy("this")
private boolean mMulticastFilter;
+ @GuardedBy("this")
+ private boolean mInDozeMode;
private final boolean mDrop802_3Frames;
private final int[] mEthTypeBlackList;
+ // Detects doze mode state transitions.
+ private final BroadcastReceiver mDeviceIdleReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ if (action.equals(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED)) {
+ PowerManager powerManager =
+ (PowerManager) context.getSystemService(Context.POWER_SERVICE);
+ final boolean deviceIdle = powerManager.isDeviceIdleMode();
+ setDozeMode(deviceIdle);
+ }
+ }
+ };
+ private final Context mContext;
+
// Our IPv4 address, if we have just one, otherwise null.
@GuardedBy("this")
private byte[] mIPv4Address;
@@ -269,13 +345,24 @@
private int mIPv4PrefixLength;
@VisibleForTesting
- ApfFilter(ApfConfiguration config, InterfaceParams ifParams,
+ ApfFilter(Context context, ApfConfiguration config, InterfaceParams ifParams,
IpClient.Callback ipClientCallback, IpConnectivityLog log) {
mApfCapabilities = config.apfCapabilities;
mIpClientCallback = ipClientCallback;
mInterfaceParams = ifParams;
mMulticastFilter = config.multicastFilter;
mDrop802_3Frames = config.ieee802_3Filter;
+ mContext = context;
+
+ if (mApfCapabilities.hasDataAccess()) {
+ mCountAndPassLabel = "countAndPass";
+ mCountAndDropLabel = "countAndDrop";
+ } else {
+ // APFv4 unsupported: turn jumps to the counter trampolines to immediately PASS or DROP,
+ // preserving the original pre-APFv4 behavior.
+ mCountAndPassLabel = ApfGenerator.PASS_LABEL;
+ mCountAndDropLabel = ApfGenerator.DROP_LABEL;
+ }
// Now fill the black list from the passed array
mEthTypeBlackList = filterEthTypeBlackList(config.ethTypeBlackList);
@@ -284,6 +371,14 @@
// TODO: ApfFilter should not generate programs until IpClient sends provisioning success.
maybeStartFilter();
+
+ // Listen for doze-mode transition changes to enable/disable the IPv6 multicast filter.
+ mContext.registerReceiver(mDeviceIdleReceiver,
+ new IntentFilter(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED));
+ }
+
+ public synchronized void setDataSnapshot(byte[] data) {
+ mDataSnapshot = data;
}
private void log(String s) {
@@ -334,6 +429,10 @@
try {
mHardwareAddress = mInterfaceParams.macAddr.toByteArray();
synchronized(this) {
+ // Clear APF memory.
+ byte[] zeroes = new byte[mApfCapabilities.maximumApfProgramSize];
+ mIpClientCallback.installPacketFilter(zeroes);
+
// Install basic filters
installNewProgramLocked();
}
@@ -506,7 +605,7 @@
ICMP6_4_BYTE_LIFETIME_OFFSET, ICMP6_4_BYTE_LIFETIME_LEN);
}
- // Note that this parses RA and may throw IllegalArgumentException (from
+ // Note that this parses RA and may throw InvalidRaException (from
// Buffer.position(int) or due to an invalid-length option) or IndexOutOfBoundsException
// (from ByteBuffer.get(int) ) if parsing encounters something non-compliant with
// specifications.
@@ -522,7 +621,7 @@
// to our packet socket. b/29586253
if (getUint16(mPacket, ETH_ETHERTYPE_OFFSET) != ETH_P_IPV6 ||
getUint8(mPacket, IPV6_NEXT_HEADER_OFFSET) != IPPROTO_ICMPV6 ||
- getUint8(mPacket, ICMP6_TYPE_OFFSET) != ICMP6_ROUTER_ADVERTISEMENT) {
+ getUint8(mPacket, ICMP6_TYPE_OFFSET) != ICMPV6_ROUTER_ADVERTISEMENT) {
throw new InvalidRaException("Not an ICMP6 router advertisement");
}
@@ -713,7 +812,8 @@
gen.addJumpIfR0LessThan(filterLifetime, nextFilterLabel);
}
}
- gen.addJump(gen.DROP_LABEL);
+ maybeSetCounter(gen, Counter.DROPPED_RA);
+ gen.addJump(mCountAndDropLabel);
gen.defineLabel(nextFilterLabel);
return filterLifetime;
}
@@ -748,6 +848,16 @@
@GuardedBy("this")
private byte[] mLastInstalledProgram;
+ /**
+ * For debugging only. Contains the latest APF buffer snapshot captured from the firmware.
+ *
+ * A typical size for this buffer is 4KB. It is present only if the WiFi HAL supports
+ * IWifiStaIface#readApfPacketFilterData(), and the APF interpreter advertised support for
+ * the opcodes to access the data buffer (LDDW and STDW).
+ */
+ @GuardedBy("this") @Nullable
+ private byte[] mDataSnapshot;
+
// How many times the program was updated since we started.
@GuardedBy("this")
private int mNumProgramUpdates = 0;
@@ -783,31 +893,37 @@
// Pass if not ARP IPv4.
gen.addLoadImmediate(Register.R0, ARP_HEADER_OFFSET);
- gen.addJumpIfBytesNotEqual(Register.R0, ARP_IPV4_HEADER, gen.PASS_LABEL);
+ maybeSetCounter(gen, Counter.PASSED_ARP_NON_IPV4);
+ gen.addJumpIfBytesNotEqual(Register.R0, ARP_IPV4_HEADER, mCountAndPassLabel);
// Pass if unknown ARP opcode.
gen.addLoad16(Register.R0, ARP_OPCODE_OFFSET);
gen.addJumpIfR0Equals(ARP_OPCODE_REQUEST, checkTargetIPv4); // Skip to unicast check
- gen.addJumpIfR0NotEquals(ARP_OPCODE_REPLY, gen.PASS_LABEL);
+ maybeSetCounter(gen, Counter.PASSED_ARP_UNKNOWN);
+ gen.addJumpIfR0NotEquals(ARP_OPCODE_REPLY, mCountAndPassLabel);
// Pass if unicast reply.
gen.addLoadImmediate(Register.R0, ETH_DEST_ADDR_OFFSET);
- gen.addJumpIfBytesNotEqual(Register.R0, ETH_BROADCAST_MAC_ADDRESS, gen.PASS_LABEL);
+ maybeSetCounter(gen, Counter.PASSED_ARP_UNICAST_REPLY);
+ gen.addJumpIfBytesNotEqual(Register.R0, ETH_BROADCAST_MAC_ADDRESS, mCountAndPassLabel);
// Either a unicast request, a unicast reply, or a broadcast reply.
gen.defineLabel(checkTargetIPv4);
if (mIPv4Address == null) {
// When there is no IPv4 address, drop GARP replies (b/29404209).
gen.addLoad32(Register.R0, ARP_TARGET_IP_ADDRESS_OFFSET);
- gen.addJumpIfR0Equals(IPV4_ANY_HOST_ADDRESS, gen.DROP_LABEL);
+ maybeSetCounter(gen, Counter.DROPPED_GARP_REPLY);
+ gen.addJumpIfR0Equals(IPV4_ANY_HOST_ADDRESS, mCountAndDropLabel);
} else {
// When there is an IPv4 address, drop unicast/broadcast requests
// and broadcast replies with a different target IPv4 address.
gen.addLoadImmediate(Register.R0, ARP_TARGET_IP_ADDRESS_OFFSET);
- gen.addJumpIfBytesNotEqual(Register.R0, mIPv4Address, gen.DROP_LABEL);
+ maybeSetCounter(gen, Counter.DROPPED_ARP_OTHER_HOST);
+ gen.addJumpIfBytesNotEqual(Register.R0, mIPv4Address, mCountAndDropLabel);
}
- gen.addJump(gen.PASS_LABEL);
+ maybeSetCounter(gen, Counter.PASSED_ARP);
+ gen.addJump(mCountAndPassLabel);
}
/**
@@ -850,7 +966,8 @@
// NOTE: Relies on R1 containing IPv4 header offset.
gen.addAddR1();
gen.addJumpIfBytesNotEqual(Register.R0, mHardwareAddress, skipDhcpv4Filter);
- gen.addJump(gen.PASS_LABEL);
+ maybeSetCounter(gen, Counter.PASSED_DHCP);
+ gen.addJump(mCountAndPassLabel);
// Drop all multicasts/broadcasts.
gen.defineLabel(skipDhcpv4Filter);
@@ -858,24 +975,31 @@
// If IPv4 destination address is in multicast range, drop.
gen.addLoad8(Register.R0, IPV4_DEST_ADDR_OFFSET);
gen.addAnd(0xf0);
- gen.addJumpIfR0Equals(0xe0, gen.DROP_LABEL);
+ maybeSetCounter(gen, Counter.DROPPED_IPV4_MULTICAST);
+ gen.addJumpIfR0Equals(0xe0, mCountAndDropLabel);
// If IPv4 broadcast packet, drop regardless of L2 (b/30231088).
+ maybeSetCounter(gen, Counter.DROPPED_IPV4_BROADCAST_ADDR);
gen.addLoad32(Register.R0, IPV4_DEST_ADDR_OFFSET);
- gen.addJumpIfR0Equals(IPV4_BROADCAST_ADDRESS, gen.DROP_LABEL);
+ gen.addJumpIfR0Equals(IPV4_BROADCAST_ADDRESS, mCountAndDropLabel);
if (mIPv4Address != null && mIPv4PrefixLength < 31) {
+ maybeSetCounter(gen, Counter.DROPPED_IPV4_BROADCAST_NET);
int broadcastAddr = ipv4BroadcastAddress(mIPv4Address, mIPv4PrefixLength);
- gen.addJumpIfR0Equals(broadcastAddr, gen.DROP_LABEL);
+ gen.addJumpIfR0Equals(broadcastAddr, mCountAndDropLabel);
}
// If L2 broadcast packet, drop.
+ // TODO: can we invert this condition to fall through to the common pass case below?
+ maybeSetCounter(gen, Counter.PASSED_IPV4_UNICAST);
gen.addLoadImmediate(Register.R0, ETH_DEST_ADDR_OFFSET);
- gen.addJumpIfBytesNotEqual(Register.R0, ETH_BROADCAST_MAC_ADDRESS, gen.PASS_LABEL);
- gen.addJump(gen.DROP_LABEL);
+ gen.addJumpIfBytesNotEqual(Register.R0, ETH_BROADCAST_MAC_ADDRESS, mCountAndPassLabel);
+ maybeSetCounter(gen, Counter.DROPPED_IPV4_L2_BROADCAST);
+ gen.addJump(mCountAndDropLabel);
}
// Otherwise, pass
- gen.addJump(gen.PASS_LABEL);
+ maybeSetCounter(gen, Counter.PASSED_IPV4);
+ gen.addJump(mCountAndPassLabel);
}
@@ -889,10 +1013,11 @@
private void generateIPv6FilterLocked(ApfGenerator gen) throws IllegalInstructionException {
// Here's a basic summary of what the IPv6 filter program does:
//
- // if it's not ICMPv6:
- // if it's multicast and we're dropping multicast:
- // drop
- // pass
+ // if we're dropping multicast
+ // if it's not IPCMv6 or it's ICMPv6 but we're in doze mode:
+ // if it's multicast:
+ // drop
+ // pass
// if it's ICMPv6 RS to any:
// drop
// if it's ICMPv6 NA to ff02::1:
@@ -902,34 +1027,55 @@
// Drop multicast if the multicast filter is enabled.
if (mMulticastFilter) {
- // Don't touch ICMPv6 multicast here, we deal with it in more detail later.
- String skipIpv6MulticastFilterLabel = "skipIPv6MulticastFilter";
- gen.addJumpIfR0Equals(IPPROTO_ICMPV6, skipIpv6MulticastFilterLabel);
+ final String skipIPv6MulticastFilterLabel = "skipIPv6MulticastFilter";
+ final String dropAllIPv6MulticastsLabel = "dropAllIPv6Multicast";
- // Drop all other packets sent to ff00::/8.
+ // While in doze mode, drop ICMPv6 multicast pings, let the others pass.
+ // While awake, let all ICMPv6 multicasts through.
+ if (mInDozeMode) {
+ // Not ICMPv6? -> Proceed to multicast filtering
+ gen.addJumpIfR0NotEquals(IPPROTO_ICMPV6, dropAllIPv6MulticastsLabel);
+
+ // ICMPv6 but not ECHO? -> Skip the multicast filter.
+ // (ICMPv6 ECHO requests will go through the multicast filter below).
+ gen.addLoad8(Register.R0, ICMP6_TYPE_OFFSET);
+ gen.addJumpIfR0NotEquals(ICMPV6_ECHO_REQUEST_TYPE, skipIPv6MulticastFilterLabel);
+ } else {
+ gen.addJumpIfR0Equals(IPPROTO_ICMPV6, skipIPv6MulticastFilterLabel);
+ }
+
+ // Drop all other packets sent to ff00::/8 (multicast prefix).
+ gen.defineLabel(dropAllIPv6MulticastsLabel);
+ maybeSetCounter(gen, Counter.DROPPED_IPV6_NON_ICMP_MULTICAST);
gen.addLoad8(Register.R0, IPV6_DEST_ADDR_OFFSET);
- gen.addJumpIfR0Equals(0xff, gen.DROP_LABEL);
- // Not multicast and not ICMPv6. Pass.
- gen.addJump(gen.PASS_LABEL);
- gen.defineLabel(skipIpv6MulticastFilterLabel);
+ gen.addJumpIfR0Equals(0xff, mCountAndDropLabel);
+ // Not multicast. Pass.
+ maybeSetCounter(gen, Counter.PASSED_IPV6_UNICAST_NON_ICMP);
+ gen.addJump(mCountAndPassLabel);
+ gen.defineLabel(skipIPv6MulticastFilterLabel);
} else {
// If not ICMPv6, pass.
- gen.addJumpIfR0NotEquals(IPPROTO_ICMPV6, gen.PASS_LABEL);
+ maybeSetCounter(gen, Counter.PASSED_IPV6_NON_ICMP);
+ gen.addJumpIfR0NotEquals(IPPROTO_ICMPV6, mCountAndPassLabel);
}
+ // If we got this far, the packet is ICMPv6. Drop some specific types.
+
// Add unsolicited multicast neighbor announcements filter
String skipUnsolicitedMulticastNALabel = "skipUnsolicitedMulticastNA";
gen.addLoad8(Register.R0, ICMP6_TYPE_OFFSET);
// Drop all router solicitations (b/32833400)
- gen.addJumpIfR0Equals(ICMP6_ROUTER_SOLICITATION, gen.DROP_LABEL);
+ maybeSetCounter(gen, Counter.DROPPED_IPV6_ROUTER_SOLICITATION);
+ gen.addJumpIfR0Equals(ICMPV6_ROUTER_SOLICITATION, mCountAndDropLabel);
// If not neighbor announcements, skip filter.
- gen.addJumpIfR0NotEquals(ICMP6_NEIGHBOR_ANNOUNCEMENT, skipUnsolicitedMulticastNALabel);
+ gen.addJumpIfR0NotEquals(ICMPV6_NEIGHBOR_ADVERTISEMENT, skipUnsolicitedMulticastNALabel);
// If to ff02::1, drop.
// TODO: Drop only if they don't contain the address of on-link neighbours.
gen.addLoadImmediate(Register.R0, IPV6_DEST_ADDR_OFFSET);
gen.addJumpIfBytesNotEqual(Register.R0, IPV6_ALL_NODES_ADDRESS,
skipUnsolicitedMulticastNALabel);
- gen.addJump(gen.DROP_LABEL);
+ maybeSetCounter(gen, Counter.DROPPED_IPV6_MULTICAST_NA);
+ gen.addJump(mCountAndDropLabel);
gen.defineLabel(skipUnsolicitedMulticastNALabel);
}
@@ -952,10 +1098,17 @@
* </ul>
*/
@GuardedBy("this")
- private ApfGenerator beginProgramLocked() throws IllegalInstructionException {
- ApfGenerator gen = new ApfGenerator();
- // This is guaranteed to return true because of the check in maybeCreate.
- gen.setApfVersion(mApfCapabilities.apfVersionSupported);
+ private ApfGenerator emitPrologueLocked() throws IllegalInstructionException {
+ // This is guaranteed to succeed because of the check in maybeCreate.
+ ApfGenerator gen = new ApfGenerator(mApfCapabilities.apfVersionSupported);
+
+ if (mApfCapabilities.hasDataAccess()) {
+ // Increment TOTAL_PACKETS
+ maybeSetCounter(gen, Counter.TOTAL_PACKETS);
+ gen.addLoadData(Register.R0, 0); // load counter
+ gen.addAdd(1);
+ gen.addStoreData(Register.R0, 0); // write-back counter
+ }
// Here's a basic summary of what the initial program does:
//
@@ -977,12 +1130,14 @@
if (mDrop802_3Frames) {
// drop 802.3 frames (ethtype < 0x0600)
- gen.addJumpIfR0LessThan(ETH_TYPE_MIN, gen.DROP_LABEL);
+ maybeSetCounter(gen, Counter.DROPPED_802_3_FRAME);
+ gen.addJumpIfR0LessThan(ETH_TYPE_MIN, mCountAndDropLabel);
}
// Handle ether-type black list
+ maybeSetCounter(gen, Counter.DROPPED_ETHERTYPE_BLACKLISTED);
for (int p : mEthTypeBlackList) {
- gen.addJumpIfR0Equals(p, gen.DROP_LABEL);
+ gen.addJumpIfR0Equals(p, mCountAndDropLabel);
}
// Add ARP filters:
@@ -1009,8 +1164,10 @@
// Drop non-IP non-ARP broadcasts, pass the rest
gen.addLoadImmediate(Register.R0, ETH_DEST_ADDR_OFFSET);
- gen.addJumpIfBytesNotEqual(Register.R0, ETH_BROADCAST_MAC_ADDRESS, gen.PASS_LABEL);
- gen.addJump(gen.DROP_LABEL);
+ maybeSetCounter(gen, Counter.PASSED_NON_IP_UNICAST);
+ gen.addJumpIfBytesNotEqual(Register.R0, ETH_BROADCAST_MAC_ADDRESS, mCountAndPassLabel);
+ maybeSetCounter(gen, Counter.DROPPED_ETH_BROADCAST);
+ gen.addJump(mCountAndDropLabel);
// Add IPv6 filters:
gen.defineLabel(ipv6FilterLabel);
@@ -1019,6 +1176,39 @@
}
/**
+ * Append packet counting epilogue to the APF program.
+ *
+ * Currently, the epilogue consists of two trampolines which count passed and dropped packets
+ * before jumping to the actual PASS and DROP labels.
+ */
+ @GuardedBy("this")
+ private void emitEpilogue(ApfGenerator gen) throws IllegalInstructionException {
+ // If APFv4 is unsupported, no epilogue is necessary: if execution reached this far, it
+ // will just fall-through to the PASS label.
+ if (!mApfCapabilities.hasDataAccess()) return;
+
+ // Execution will reach the bottom of the program if none of the filters match,
+ // which will pass the packet to the application processor.
+ maybeSetCounter(gen, Counter.PASSED_IPV6_ICMP);
+
+ // Append the count & pass trampoline, which increments the counter at the data address
+ // pointed to by R1, then jumps to the pass label. This saves a few bytes over inserting
+ // the entire sequence inline for every counter.
+ gen.defineLabel(mCountAndPassLabel);
+ gen.addLoadData(Register.R0, 0); // R0 = *(R1 + 0)
+ gen.addAdd(1); // R0++
+ gen.addStoreData(Register.R0, 0); // *(R1 + 0) = R0
+ gen.addJump(gen.PASS_LABEL);
+
+ // Same as above for the count & drop trampoline.
+ gen.defineLabel(mCountAndDropLabel);
+ gen.addLoadData(Register.R0, 0); // R0 = *(R1 + 0)
+ gen.addAdd(1); // R0++
+ gen.addStoreData(Register.R0, 0); // *(R1 + 0) = R0
+ gen.addJump(gen.DROP_LABEL);
+ }
+
+ /**
* Generate and install a new filter program.
*/
@GuardedBy("this")
@@ -1028,22 +1218,39 @@
ArrayList<Ra> rasToFilter = new ArrayList<>();
final byte[] program;
long programMinLifetime = Long.MAX_VALUE;
+ long maximumApfProgramSize = mApfCapabilities.maximumApfProgramSize;
+ if (mApfCapabilities.hasDataAccess()) {
+ // Reserve space for the counters.
+ maximumApfProgramSize -= Counter.totalSize();
+ }
+
try {
// Step 1: Determine how many RA filters we can fit in the program.
- ApfGenerator gen = beginProgramLocked();
+ ApfGenerator gen = emitPrologueLocked();
+
+ // The epilogue normally goes after the RA filters, but add it early to include its
+ // length when estimating the total.
+ emitEpilogue(gen);
+
+ // Can't fit the program even without any RA filters?
+ if (gen.programLengthOverEstimate() > maximumApfProgramSize) {
+ Log.e(TAG, "Program exceeds maximum size " + maximumApfProgramSize);
+ return;
+ }
+
for (Ra ra : mRas) {
ra.generateFilterLocked(gen);
// Stop if we get too big.
- if (gen.programLengthOverEstimate() > mApfCapabilities.maximumApfProgramSize) break;
+ if (gen.programLengthOverEstimate() > maximumApfProgramSize) break;
rasToFilter.add(ra);
}
+
// Step 2: Actually generate the program
- gen = beginProgramLocked();
+ gen = emitPrologueLocked();
for (Ra ra : rasToFilter) {
programMinLifetime = Math.min(programMinLifetime, ra.generateFilterLocked(gen));
}
- // Execution will reach the end of the program if no filters match, which will pass the
- // packet to the AP.
+ emitEpilogue(gen);
program = gen.generate();
} catch (IllegalInstructionException|IllegalStateException e) {
Log.e(TAG, "Failed to generate APF program.", e);
@@ -1167,9 +1374,9 @@
* Create an {@link ApfFilter} if {@code apfCapabilities} indicates support for packet
* filtering using APF programs.
*/
- public static ApfFilter maybeCreate(ApfConfiguration config,
+ public static ApfFilter maybeCreate(Context context, ApfConfiguration config,
InterfaceParams ifParams, IpClient.Callback ipClientCallback) {
- if (config == null || ifParams == null) return null;
+ if (context == null || config == null || ifParams == null) return null;
ApfCapabilities apfCapabilities = config.apfCapabilities;
if (apfCapabilities == null) return null;
if (apfCapabilities.apfVersionSupported == 0) return null;
@@ -1182,11 +1389,12 @@
// 1. the program generator will need its offsets adjusted.
// 2. the packet filter attached to our packet socket will need its offset adjusted.
if (apfCapabilities.apfPacketFormat != ARPHRD_ETHER) return null;
- if (!new ApfGenerator().setApfVersion(apfCapabilities.apfVersionSupported)) {
+ if (!ApfGenerator.supportsVersion(apfCapabilities.apfVersionSupported)) {
Log.e(TAG, "Unsupported APF version: " + apfCapabilities.apfVersionSupported);
return null;
}
- return new ApfFilter(config, ifParams, ipClientCallback, new IpConnectivityLog());
+
+ return new ApfFilter(context, config, ifParams, ipClientCallback, new IpConnectivityLog());
}
public synchronized void shutdown() {
@@ -1196,12 +1404,11 @@
mReceiveThread = null;
}
mRas.clear();
+ mContext.unregisterReceiver(mDeviceIdleReceiver);
}
public synchronized void setMulticastFilter(boolean isEnabled) {
- if (mMulticastFilter == isEnabled) {
- return;
- }
+ if (mMulticastFilter == isEnabled) return;
mMulticastFilter = isEnabled;
if (!isEnabled) {
mNumProgramUpdatesAllowingMulticast++;
@@ -1209,6 +1416,13 @@
installNewProgramLocked();
}
+ @VisibleForTesting
+ public synchronized void setDozeMode(boolean isEnabled) {
+ if (mInDozeMode == isEnabled) return;
+ mInDozeMode = isEnabled;
+ installNewProgramLocked();
+ }
+
/** Find the single IPv4 LinkAddress if there is one, otherwise return null. */
private static LinkAddress findIPv4LinkAddress(LinkProperties lp) {
LinkAddress ipv4Address = null;
@@ -1238,6 +1452,23 @@
installNewProgramLocked();
}
+ static public long counterValue(byte[] data, Counter counter)
+ throws ArrayIndexOutOfBoundsException {
+ // Follow the same wrap-around addressing scheme of the interpreter.
+ int offset = counter.offset();
+ if (offset < 0) {
+ offset = data.length + offset;
+ }
+
+ // Decode 32bit big-endian integer into a long so we can count up beyond 2^31.
+ long value = 0;
+ for (int i = 0; i < 4; i++) {
+ value = value << 8 | (data[offset] & 0xFF);
+ offset++;
+ }
+ return value;
+ }
+
public synchronized void dump(IndentingPrintWriter pw) {
pw.println("Capabilities: " + mApfCapabilities);
pw.println("Receive thread: " + (mReceiveThread != null ? "RUNNING" : "STOPPED"));
@@ -1279,6 +1510,32 @@
pw.println(HexDump.toHexString(mLastInstalledProgram, false /* lowercase */));
pw.decreaseIndent();
}
+
+ pw.println("APF packet counters: ");
+ pw.increaseIndent();
+ if (!mApfCapabilities.hasDataAccess()) {
+ pw.println("APF counters not supported");
+ } else if (mDataSnapshot == null) {
+ pw.println("No last snapshot.");
+ } else {
+ try {
+ Counter[] counters = Counter.class.getEnumConstants();
+ for (Counter c : Arrays.asList(counters).subList(1, counters.length)) {
+ long value = counterValue(mDataSnapshot, c);
+ // Only print non-zero counters
+ if (value != 0) {
+ pw.println(c.toString() + ": " + value);
+ }
+ }
+ } catch (ArrayIndexOutOfBoundsException e) {
+ pw.println("Uh-oh: " + e);
+ }
+ if (VDBG) {
+ pw.println("Raw data dump: ");
+ pw.println(HexDump.dumpHexString(mDataSnapshot));
+ }
+ }
+ pw.decreaseIndent();
}
// TODO: move to android.net.NetworkUtils
diff --git a/services/net/java/android/net/apf/ApfGenerator.java b/services/net/java/android/net/apf/ApfGenerator.java
index d41fbce..87a1b5e 100644
--- a/services/net/java/android/net/apf/ApfGenerator.java
+++ b/services/net/java/android/net/apf/ApfGenerator.java
@@ -58,7 +58,9 @@
JLT(18), // Compare less than and branch, e.g. "jlt R0,5,label"
JSET(19), // Compare any bits set and branch, e.g. "jset R0,5,label"
JNEBS(20), // Compare not equal byte sequence, e.g. "jnebs R0,5,label,0x1122334455"
- EXT(21); // Followed by immediate indicating ExtendedOpcodes.
+ EXT(21), // Followed by immediate indicating ExtendedOpcodes.
+ LDDW(22), // Load 4 bytes from data memory address (register + immediate): "lddw R0, [5]R1"
+ STDW(23); // Store 4 bytes to data memory address (register + immediate): "stdw R0, [5]R1"
final int value;
@@ -355,19 +357,37 @@
*/
public static final int LAST_PREFILLED_MEMORY_SLOT = FILTER_AGE_MEMORY_SLOT;
+ // This version number syncs up with APF_VERSION in hardware/google/apf/apf_interpreter.h
+ private static final int MIN_APF_VERSION = 2;
+
private final ArrayList<Instruction> mInstructions = new ArrayList<Instruction>();
private final HashMap<String, Instruction> mLabels = new HashMap<String, Instruction>();
private final Instruction mDropLabel = new Instruction(Opcodes.LABEL);
private final Instruction mPassLabel = new Instruction(Opcodes.LABEL);
+ private final int mVersion;
private boolean mGenerated;
/**
- * Set version of APF instruction set to generate instructions for. Returns {@code true}
- * if generating for this version is supported, {@code false} otherwise.
+ * Creates an ApfGenerator instance which is able to emit instructions for the specified
+ * {@code version} of the APF interpreter. Throws {@code IllegalInstructionException} if
+ * the requested version is unsupported.
*/
- public boolean setApfVersion(int version) {
- // This version number syncs up with APF_VERSION in hardware/google/apf/apf_interpreter.h
- return version == 2;
+ ApfGenerator(int version) throws IllegalInstructionException {
+ mVersion = version;
+ requireApfVersion(MIN_APF_VERSION);
+ }
+
+ /**
+ * Returns true if the ApfGenerator supports the specified {@code version}, otherwise false.
+ */
+ public static boolean supportsVersion(int version) {
+ return version >= MIN_APF_VERSION;
+ }
+
+ private void requireApfVersion(int minimumVersion) throws IllegalInstructionException {
+ if (mVersion < minimumVersion) {
+ throw new IllegalInstructionException("Requires APF >= " + minimumVersion);
+ }
}
private void addInstruction(Instruction instruction) {
@@ -732,7 +752,7 @@
/**
* Add an instruction to the end of the program to jump to {@code target} if the bytes of the
- * packet at, an offset specified by {@code register}, match {@code bytes}.
+ * packet at an offset specified by {@code register} match {@code bytes}.
*/
public ApfGenerator addJumpIfBytesNotEqual(Register register, byte[] bytes, String target)
throws IllegalInstructionException {
@@ -819,6 +839,36 @@
}
/**
+ * Add an instruction to the end of the program to load 32 bits from the data memory into
+ * {@code register}. The source address is computed by adding the signed immediate
+ * @{code offset} to the other register.
+ * Requires APF v3 or greater.
+ */
+ public ApfGenerator addLoadData(Register destinationRegister, int offset)
+ throws IllegalInstructionException {
+ requireApfVersion(3);
+ Instruction instruction = new Instruction(Opcodes.LDDW, destinationRegister);
+ instruction.setSignedImm(offset);
+ addInstruction(instruction);
+ return this;
+ }
+
+ /**
+ * Add an instruction to the end of the program to store 32 bits from {@code register} into the
+ * data memory. The destination address is computed by adding the signed immediate
+ * @{code offset} to the other register.
+ * Requires APF v3 or greater.
+ */
+ public ApfGenerator addStoreData(Register sourceRegister, int offset)
+ throws IllegalInstructionException {
+ requireApfVersion(3);
+ Instruction instruction = new Instruction(Opcodes.STDW, sourceRegister);
+ instruction.setSignedImm(offset);
+ addInstruction(instruction);
+ return this;
+ }
+
+ /**
* Updates instruction offset fields using latest instruction sizes.
* @return current program length in bytes.
*/
diff --git a/services/net/java/android/net/dns/ResolvUtil.java b/services/net/java/android/net/dns/ResolvUtil.java
new file mode 100644
index 0000000..d9d4b96f
--- /dev/null
+++ b/services/net/java/android/net/dns/ResolvUtil.java
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+package android.net.dns;
+
+import static android.system.OsConstants.AI_ADDRCONFIG;
+
+import android.net.Network;
+import android.net.NetworkUtils;
+import android.system.GaiException;
+import android.system.OsConstants;
+import android.system.StructAddrinfo;
+
+import libcore.io.Libcore;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+
+/**
+ * DNS resolution utility class.
+ *
+ * @hide
+ */
+public class ResolvUtil {
+ // Non-portable DNS resolution flag.
+ private static final long NETID_USE_LOCAL_NAMESERVERS = 0x80000000L;
+
+ private ResolvUtil() {}
+
+ public static InetAddress[] blockingResolveAllLocally(Network network, String name)
+ throws UnknownHostException {
+ // Use AI_ADDRCONFIG by default
+ return blockingResolveAllLocally(network, name, AI_ADDRCONFIG);
+ }
+
+ public static InetAddress[] blockingResolveAllLocally(
+ Network network, String name, int aiFlags) throws UnknownHostException {
+ final StructAddrinfo hints = new StructAddrinfo();
+ hints.ai_flags = aiFlags;
+ // Other hints identical to the default Inet6AddressImpl implementation
+ hints.ai_family = OsConstants.AF_UNSPEC;
+ hints.ai_socktype = OsConstants.SOCK_STREAM;
+
+ final Network networkForResolv = getNetworkWithUseLocalNameserversFlag(network);
+
+ try {
+ return Libcore.os.android_getaddrinfo(name, hints, (int) networkForResolv.netId);
+ } catch (GaiException gai) {
+ gai.rethrowAsUnknownHostException(name + ": TLS-bypass resolution failed");
+ return null; // keep compiler quiet
+ }
+ }
+
+ public static Network getNetworkWithUseLocalNameserversFlag(Network network) {
+ final long netidForResolv = NETID_USE_LOCAL_NAMESERVERS | (long) network.netId;
+ return new Network((int) netidForResolv);
+ }
+
+ public static Network makeNetworkWithPrivateDnsBypass(Network network) {
+ return new Network(network) {
+ @Override
+ public InetAddress[] getAllByName(String host) throws UnknownHostException {
+ return blockingResolveAllLocally(network, host);
+ }
+ };
+ }
+}
diff --git a/services/net/java/android/net/ip/IpClient.java b/services/net/java/android/net/ip/IpClient.java
index d3a97b3..7f821ff 100644
--- a/services/net/java/android/net/ip/IpClient.java
+++ b/services/net/java/android/net/ip/IpClient.java
@@ -16,6 +16,7 @@
package android.net.ip;
+import com.android.internal.util.HexDump;
import com.android.internal.util.MessageUtils;
import com.android.internal.util.WakeupMessage;
@@ -40,6 +41,7 @@
import android.net.util.NetdService;
import android.net.util.NetworkConstants;
import android.net.util.SharedLog;
+import android.os.ConditionVariable;
import android.os.INetworkManagementService;
import android.os.Message;
import android.os.RemoteException;
@@ -52,6 +54,7 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.R;
+import com.android.internal.util.ArrayUtils;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.IState;
import com.android.internal.util.Preconditions;
@@ -72,6 +75,8 @@
import java.util.List;
import java.util.Set;
import java.util.StringJoiner;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
import java.util.function.Predicate;
import java.util.stream.Collectors;
@@ -97,9 +102,44 @@
private static final Class[] sMessageClasses = { IpClient.class, DhcpClient.class };
private static final SparseArray<String> sWhatToString =
MessageUtils.findMessageNames(sMessageClasses);
+ // Two static concurrent hashmaps of interface name to logging classes.
+ // 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<>();
+
+ // If |args| is non-empty, assume it's a list of interface names for which
+ // we should print IpClient logs (filter out all others).
+ public static void dumpAllLogs(PrintWriter writer, String[] args) {
+ for (String ifname : sSmLogs.keySet()) {
+ if (!ArrayUtils.isEmpty(args) && !ArrayUtils.contains(args, ifname)) continue;
+
+ writer.println(String.format("--- BEGIN %s ---", ifname));
+
+ final SharedLog smLog = sSmLogs.get(ifname);
+ if (smLog != null) {
+ writer.println("State machine log:");
+ smLog.dump(null, writer, null);
+ }
+
+ writer.println("");
+
+ final LocalLog pktLog = sPktLogs.get(ifname);
+ if (pktLog != null) {
+ writer.println("Connectivity packet log:");
+ pktLog.readOnlyLocalLog().dump(null, writer, null);
+ }
+
+ writer.println(String.format("--- END %s ---", ifname));
+ }
+ }
/**
* Callbacks for handling IpClient events.
+ *
+ * These methods are called by IpClient on its own thread. Implementations
+ * of this class MUST NOT carry out long-running computations or hold locks
+ * for which there might be contention with other code calling public
+ * methods of the same IpClient instance.
*/
public static class Callback {
// In order to receive onPreDhcpAction(), call #withPreDhcpAction()
@@ -135,6 +175,12 @@
// Install an APF program to filter incoming packets.
public void installPacketFilter(byte[] filter) {}
+ // Asynchronously read back the APF program & data buffer from the wifi driver.
+ // Due to Wifi HAL limitations, the current implementation only supports dumping the entire
+ // buffer. In response to this request, the driver returns the data buffer asynchronously
+ // by sending an IpClient#EVENT_READ_PACKET_FILTER_COMPLETE message.
+ public void startReadPacketFilter() {}
+
// If multicast filtering cannot be accomplished with APF, this function will be called to
// actuate multicast filtering using another means.
public void setFallbackMulticastFilter(boolean enabled) {}
@@ -144,6 +190,28 @@
public void setNeighborDiscoveryOffload(boolean enable) {}
}
+ public static class WaitForProvisioningCallback extends Callback {
+ private final ConditionVariable mCV = new ConditionVariable();
+ private LinkProperties mCallbackLinkProperties;
+
+ public LinkProperties waitForProvisioning() {
+ mCV.block();
+ return mCallbackLinkProperties;
+ }
+
+ @Override
+ public void onProvisioningSuccess(LinkProperties newLp) {
+ mCallbackLinkProperties = newLp;
+ mCV.open();
+ }
+
+ @Override
+ public void onProvisioningFailure(LinkProperties newLp) {
+ mCallbackLinkProperties = null;
+ mCV.open();
+ }
+ }
+
// Use a wrapper class to log in order to ensure complete and detailed
// logging. This method is lighter weight than annotations/reflection
// and has the following benefits:
@@ -163,10 +231,10 @@
// TODO: Find an lighter weight approach.
private class LoggingCallbackWrapper extends Callback {
private static final String PREFIX = "INVOKE ";
- private Callback mCallback;
+ private final Callback mCallback;
public LoggingCallbackWrapper(Callback callback) {
- mCallback = callback;
+ mCallback = (callback != null) ? callback : new Callback();
}
private void log(String msg) {
@@ -219,6 +287,11 @@
log("installPacketFilter(byte[" + filter.length + "])");
}
@Override
+ public void startReadPacketFilter() {
+ mCallback.startReadPacketFilter();
+ log("startReadPacketFilter()");
+ }
+ @Override
public void setFallbackMulticastFilter(boolean enabled) {
mCallback.setFallbackMulticastFilter(enabled);
log("setFallbackMulticastFilter(" + enabled + ")");
@@ -275,6 +348,11 @@
return this;
}
+ public Builder withoutMultinetworkPolicyTracker() {
+ mConfig.mUsingMultinetworkPolicyTracker = false;
+ return this;
+ }
+
public Builder withoutIpReachabilityMonitor() {
mConfig.mUsingIpReachabilityMonitor = false;
return this;
@@ -337,6 +415,7 @@
/* package */ boolean mEnableIPv4 = true;
/* package */ boolean mEnableIPv6 = true;
+ /* package */ boolean mUsingMultinetworkPolicyTracker = true;
/* package */ boolean mUsingIpReachabilityMonitor = true;
/* package */ int mRequestedPreDhcpActionMs;
/* package */ InitialConfiguration mInitialConfig;
@@ -368,6 +447,7 @@
return new StringJoiner(", ", getClass().getSimpleName() + "{", "}")
.add("mEnableIPv4: " + mEnableIPv4)
.add("mEnableIPv6: " + mEnableIPv6)
+ .add("mUsingMultinetworkPolicyTracker: " + mUsingMultinetworkPolicyTracker)
.add("mUsingIpReachabilityMonitor: " + mUsingIpReachabilityMonitor)
.add("mRequestedPreDhcpActionMs: " + mRequestedPreDhcpActionMs)
.add("mInitialConfig: " + mInitialConfig)
@@ -523,6 +603,14 @@
private static final int CMD_SET_MULTICAST_FILTER = 9;
private static final int EVENT_PROVISIONING_TIMEOUT = 10;
private static final int EVENT_DHCPACTION_TIMEOUT = 11;
+ private static final int EVENT_READ_PACKET_FILTER_COMPLETE = 12;
+
+ // Internal commands to use instead of trying to call transitionTo() inside
+ // a given State's enter() method. Calling transitionTo() from enter/exit
+ // encounters a Log.wtf() that can cause trouble on eng builds.
+ private static final int CMD_JUMP_STARTED_TO_RUNNING = 100;
+ private static final int CMD_JUMP_RUNNING_TO_STOPPING = 101;
+ private static final int CMD_JUMP_STOPPING_TO_STOPPED = 102;
private static final int MAX_LOG_RECORDS = 500;
private static final int MAX_PACKET_RECORDS = 100;
@@ -534,6 +622,8 @@
// TODO: Revert this hack once IpClient and Nat464Xlat work in concert.
private static final String CLAT_PREFIX = "v4-";
+ private static final int IMMEDIATE_FAILURE_DURATION = 0;
+
private final State mStoppedState = new StoppedState();
private final State mStoppingState = new StoppingState();
private final State mStartedState = new StartedState();
@@ -545,11 +635,12 @@
private final String mClatInterfaceName;
@VisibleForTesting
protected final Callback mCallback;
+ private final Dependencies mDependencies;
+ private final CountDownLatch mShutdownLatch;
private final INetworkManagementService mNwService;
private final NetlinkTracker mNetlinkTracker;
private final WakeupMessage mProvisioningTimeoutAlarm;
private final WakeupMessage mDhcpActionTimeoutAlarm;
- private final MultinetworkPolicyTracker mMultinetworkPolicyTracker;
private final SharedLog mLog;
private final LocalLog mConnectivityPacketLog;
private final MessageHandlingLogger mMsgStateLogger;
@@ -563,6 +654,7 @@
*/
private LinkProperties mLinkProperties;
private ProvisioningConfiguration mConfiguration;
+ private MultinetworkPolicyTracker mMultinetworkPolicyTracker;
private IpReachabilityMonitor mIpReachabilityMonitor;
private DhcpClient mDhcpClient;
private DhcpResults mDhcpResults;
@@ -572,10 +664,31 @@
private boolean mMulticastFiltering;
private long mStartTimeMillis;
+ /**
+ * Reading the snapshot is an asynchronous operation initiated by invoking
+ * Callback.startReadPacketFilter() and completed when the WiFi Service responds with an
+ * EVENT_READ_PACKET_FILTER_COMPLETE message. The mApfDataSnapshotComplete condition variable
+ * signals when a new snapshot is ready.
+ */
+ private final ConditionVariable mApfDataSnapshotComplete = new ConditionVariable();
+
+ public static class Dependencies {
+ public INetworkManagementService getNMS() {
+ return INetworkManagementService.Stub.asInterface(
+ ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE));
+ }
+
+ public INetd getNetd() {
+ return NetdService.getInstance();
+ }
+
+ public InterfaceParams getInterfaceParams(String ifname) {
+ return InterfaceParams.getByName(ifname);
+ }
+ }
+
public IpClient(Context context, String ifName, Callback callback) {
- this(context, ifName, callback, INetworkManagementService.Stub.asInterface(
- ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE)),
- NetdService.getInstance());
+ this(context, ifName, callback, new Dependencies());
}
/**
@@ -584,26 +697,37 @@
*/
public IpClient(Context context, String ifName, Callback callback,
INetworkManagementService nwService) {
- this(context, ifName, callback, nwService, NetdService.getInstance());
+ this(context, ifName, callback, new Dependencies() {
+ @Override
+ public INetworkManagementService getNMS() { return nwService; }
+ });
}
@VisibleForTesting
- IpClient(Context context, String ifName, Callback callback,
- INetworkManagementService nwService, INetd netd) {
+ IpClient(Context context, String ifName, Callback callback, Dependencies deps) {
super(IpClient.class.getSimpleName() + "." + ifName);
+ Preconditions.checkNotNull(ifName);
+ Preconditions.checkNotNull(callback);
+
mTag = getName();
mContext = context;
mInterfaceName = ifName;
mClatInterfaceName = CLAT_PREFIX + ifName;
mCallback = new LoggingCallbackWrapper(callback);
- mNwService = nwService;
+ mDependencies = deps;
+ mShutdownLatch = new CountDownLatch(1);
+ mNwService = deps.getNMS();
- mLog = new SharedLog(MAX_LOG_RECORDS, mTag);
- mConnectivityPacketLog = new LocalLog(MAX_PACKET_RECORDS);
+ sSmLogs.putIfAbsent(mInterfaceName, new SharedLog(MAX_LOG_RECORDS, mTag));
+ mLog = sSmLogs.get(mInterfaceName);
+ sPktLogs.putIfAbsent(mInterfaceName, new LocalLog(MAX_PACKET_RECORDS));
+ mConnectivityPacketLog = sPktLogs.get(mInterfaceName);
mMsgStateLogger = new MessageHandlingLogger();
- mInterfaceCtrl = new InterfaceController(mInterfaceName, mNwService, netd, mLog);
+ // TODO: Consider creating, constructing, and passing in some kind of
+ // InterfaceController.Dependencies class.
+ mInterfaceCtrl = new InterfaceController(mInterfaceName, mNwService, deps.getNetd(), mLog);
mNetlinkTracker = new NetlinkTracker(
mInterfaceName,
@@ -653,9 +777,6 @@
mLinkProperties = new LinkProperties();
mLinkProperties.setInterfaceName(mInterfaceName);
- mMultinetworkPolicyTracker = new MultinetworkPolicyTracker(mContext, getHandler(),
- () -> { mLog.log("OBSERVED AvoidBadWifi changed"); });
-
mProvisioningTimeoutAlarm = new WakeupMessage(mContext, getHandler(),
mTag + ".EVENT_PROVISIONING_TIMEOUT", EVENT_PROVISIONING_TIMEOUT);
mDhcpActionTimeoutAlarm = new WakeupMessage(mContext, getHandler(),
@@ -687,8 +808,6 @@
} catch (RemoteException e) {
logError("Couldn't register NetlinkTracker: %s", e);
}
-
- mMultinetworkPolicyTracker.start();
}
private void stopStateMachineUpdaters() {
@@ -697,13 +816,12 @@
} catch (RemoteException e) {
logError("Couldn't unregister NetlinkTracker: %s", e);
}
-
- mMultinetworkPolicyTracker.shutdown();
}
@Override
protected void onQuitting() {
mCallback.onQuit();
+ mShutdownLatch.countDown();
}
// Shut down this IpClient instance altogether.
@@ -712,6 +830,17 @@
sendMessage(CMD_TERMINATE_AFTER_STOP);
}
+ // In order to avoid deadlock, this method MUST NOT be called on the
+ // IpClient instance's thread. This prohibition includes code executed by
+ // when methods on the passed-in IpClient.Callback instance are called.
+ public void awaitShutdown() {
+ try {
+ mShutdownLatch.await();
+ } catch (InterruptedException e) {
+ mLog.e("Interrupted while awaiting shutdown: " + e);
+ }
+ }
+
public static ProvisioningConfiguration.Builder buildProvisioningConfiguration() {
return new ProvisioningConfiguration.Builder();
}
@@ -722,11 +851,11 @@
return;
}
- mInterfaceParams = InterfaceParams.getByName(mInterfaceName);
+ mInterfaceParams = mDependencies.getInterfaceParams(mInterfaceName);
if (mInterfaceParams == null) {
logError("Failed to find InterfaceParams for " + mInterfaceName);
- // TODO: call doImmediateProvisioningFailure() with an error code
- // indicating something like "interface not ready".
+ doImmediateProvisioningFailure(IpManagerEvent.ERROR_INTERFACE_NOT_FOUND);
+ return;
}
mCallback.setNeighborDiscoveryOffload(true);
@@ -756,6 +885,10 @@
sendMessage(EVENT_PRE_DHCP_ACTION_COMPLETE);
}
+ public void readPacketFilterComplete(byte[] data) {
+ sendMessage(EVENT_READ_PACKET_FILTER_COMPLETE, data);
+ }
+
/**
* Set the TCP buffer sizes to use.
*
@@ -801,7 +934,16 @@
pw.println(mTag + " APF dump:");
pw.increaseIndent();
if (apfFilter != null) {
+ if (apfCapabilities.hasDataAccess()) {
+ // Request a new snapshot, then wait for it.
+ mApfDataSnapshotComplete.close();
+ mCallback.startReadPacketFilter();
+ if (!mApfDataSnapshotComplete.block(1000)) {
+ pw.print("TIMEOUT: DUMPING STALE APF SNAPSHOT");
+ }
+ }
apfFilter.dump(pw);
+
} else {
pw.print("No active ApfFilter; ");
if (provisioningConfig == null) {
@@ -813,7 +955,6 @@
}
}
pw.decreaseIndent();
-
pw.println();
pw.println(mTag + " current ProvisioningConfiguration:");
pw.increaseIndent();
@@ -910,8 +1051,11 @@
}
private void recordMetric(final int type) {
- if (mStartTimeMillis <= 0) { Log.wtf(mTag, "Start time undefined!"); }
- final long duration = SystemClock.elapsedRealtime() - mStartTimeMillis;
+ // We may record error metrics prior to starting.
+ // Map this to IMMEDIATE_FAILURE_DURATION.
+ final long duration = (mStartTimeMillis > 0)
+ ? (SystemClock.elapsedRealtime() - mStartTimeMillis)
+ : IMMEDIATE_FAILURE_DURATION;
mMetricsLog.log(mInterfaceName, new IpManagerEvent(type, duration));
}
@@ -981,7 +1125,8 @@
// Note that we can still be disconnected by IpReachabilityMonitor
// if the IPv6 default gateway (but not the IPv6 DNS servers; see
// accompanying code in IpReachabilityMonitor) is unreachable.
- final boolean ignoreIPv6ProvisioningLoss = !mMultinetworkPolicyTracker.getAvoidBadWifi();
+ final boolean ignoreIPv6ProvisioningLoss = (mMultinetworkPolicyTracker != null)
+ && !mMultinetworkPolicyTracker.getAvoidBadWifi();
// Additionally:
//
@@ -1280,6 +1425,9 @@
resetLinkProperties();
if (mStartTimeMillis > 0) {
+ // Completed a life-cycle; send a final empty LinkProperties
+ // (cleared in resetLinkProperties() above) and record an event.
+ mCallback.onLinkPropertiesChange(new LinkProperties(mLinkProperties));
recordMetric(IpManagerEvent.COMPLETE_LIFECYCLE);
mStartTimeMillis = 0;
}
@@ -1338,13 +1486,17 @@
public void enter() {
if (mDhcpClient == null) {
// There's no DHCPv4 for which to wait; proceed to stopped.
- transitionTo(mStoppedState);
+ deferMessage(obtainMessage(CMD_JUMP_STOPPING_TO_STOPPED));
}
}
@Override
public boolean processMessage(Message msg) {
switch (msg.what) {
+ case CMD_JUMP_STOPPING_TO_STOPPED:
+ transitionTo(mStoppedState);
+ break;
+
case CMD_STOP:
break;
@@ -1378,7 +1530,7 @@
}
if (readyToProceed()) {
- transitionTo(mRunningState);
+ deferMessage(obtainMessage(CMD_JUMP_STARTED_TO_RUNNING));
} else {
// Clear all IPv4 and IPv6 before proceeding to RunningState.
// Clean up any leftover state from an abnormal exit from
@@ -1395,6 +1547,10 @@
@Override
public boolean processMessage(Message msg) {
switch (msg.what) {
+ case CMD_JUMP_STARTED_TO_RUNNING:
+ transitionTo(mRunningState);
+ break;
+
case CMD_STOP:
transitionTo(mStoppingState);
break;
@@ -1423,7 +1579,7 @@
return HANDLED;
}
- boolean readyToProceed() {
+ private boolean readyToProceed() {
return (!mLinkProperties.hasIPv4Address() &&
!mLinkProperties.hasGlobalIPv6Address());
}
@@ -1443,7 +1599,7 @@
mContext.getResources().getBoolean(R.bool.config_apfDrop802_3Frames);
apfConfig.ethTypeBlackList =
mContext.getResources().getIntArray(R.array.config_apfEthTypeBlackList);
- mApfFilter = ApfFilter.maybeCreate(apfConfig, mInterfaceParams, mCallback);
+ mApfFilter = ApfFilter.maybeCreate(mContext, apfConfig, mInterfaceParams, mCallback);
// TODO: investigate the effects of any multicast filtering racing/interfering with the
// rest of this IP configuration startup.
if (mApfFilter == null) {
@@ -1455,13 +1611,13 @@
if (mConfiguration.mEnableIPv6 && !startIPv6()) {
doImmediateProvisioningFailure(IpManagerEvent.ERROR_STARTING_IPV6);
- transitionTo(mStoppingState);
+ enqueueJumpToStoppingState();
return;
}
if (mConfiguration.mEnableIPv4 && !startIPv4()) {
doImmediateProvisioningFailure(IpManagerEvent.ERROR_STARTING_IPV4);
- transitionTo(mStoppingState);
+ enqueueJumpToStoppingState();
return;
}
@@ -1469,14 +1625,21 @@
if ((config != null) && !applyInitialConfig(config)) {
// TODO introduce a new IpManagerEvent constant to distinguish this error case.
doImmediateProvisioningFailure(IpManagerEvent.ERROR_INVALID_PROVISIONING);
- transitionTo(mStoppingState);
+ enqueueJumpToStoppingState();
return;
}
+ if (mConfiguration.mUsingMultinetworkPolicyTracker) {
+ mMultinetworkPolicyTracker = new MultinetworkPolicyTracker(
+ mContext, getHandler(),
+ () -> { mLog.log("OBSERVED AvoidBadWifi changed"); });
+ mMultinetworkPolicyTracker.start();
+ }
+
if (mConfiguration.mUsingIpReachabilityMonitor && !startIpReachabilityMonitor()) {
doImmediateProvisioningFailure(
IpManagerEvent.ERROR_STARTING_IPREACHABILITYMONITOR);
- transitionTo(mStoppingState);
+ enqueueJumpToStoppingState();
return;
}
}
@@ -1490,6 +1653,11 @@
mIpReachabilityMonitor = null;
}
+ if (mMultinetworkPolicyTracker != null) {
+ mMultinetworkPolicyTracker.shutdown();
+ mMultinetworkPolicyTracker = null;
+ }
+
if (mDhcpClient != null) {
mDhcpClient.sendMessage(DhcpClient.CMD_STOP_DHCP);
mDhcpClient.doQuit();
@@ -1508,6 +1676,10 @@
resetLinkProperties();
}
+ private void enqueueJumpToStoppingState() {
+ deferMessage(obtainMessage(CMD_JUMP_RUNNING_TO_STOPPING));
+ }
+
private ConnectivityPacketTracker createPacketTracker() {
try {
return new ConnectivityPacketTracker(
@@ -1538,6 +1710,7 @@
@Override
public boolean processMessage(Message msg) {
switch (msg.what) {
+ case CMD_JUMP_RUNNING_TO_STOPPING:
case CMD_STOP:
transitionTo(mStoppingState);
break;
@@ -1593,6 +1766,14 @@
break;
}
+ case EVENT_READ_PACKET_FILTER_COMPLETE: {
+ if (mApfFilter != null) {
+ mApfFilter.setDataSnapshot((byte[]) msg.obj);
+ }
+ mApfDataSnapshotComplete.open();
+ break;
+ }
+
case EVENT_DHCPACTION_TIMEOUT:
stopDhcpAction();
break;
diff --git a/services/net/java/android/net/ip/IpManager.java b/services/net/java/android/net/ip/IpManager.java
index 3898145..2eb36a2 100644
--- a/services/net/java/android/net/ip/IpManager.java
+++ b/services/net/java/android/net/ip/IpManager.java
@@ -114,50 +114,8 @@
public static class Callback extends IpClient.Callback {
}
- public static class WaitForProvisioningCallback extends Callback {
- private LinkProperties mCallbackLinkProperties;
-
- public LinkProperties waitForProvisioning() {
- synchronized (this) {
- try {
- wait();
- } catch (InterruptedException e) {}
- return mCallbackLinkProperties;
- }
- }
-
- @Override
- public void onProvisioningSuccess(LinkProperties newLp) {
- synchronized (this) {
- mCallbackLinkProperties = newLp;
- notify();
- }
- }
-
- @Override
- public void onProvisioningFailure(LinkProperties newLp) {
- synchronized (this) {
- mCallbackLinkProperties = null;
- notify();
- }
- }
- }
-
public IpManager(Context context, String ifName, Callback callback) {
- this(context, ifName, callback, INetworkManagementService.Stub.asInterface(
- ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE)),
- NetdService.getInstance());
- }
-
- public IpManager(Context context, String ifName, Callback callback,
- INetworkManagementService nwService) {
- this(context, ifName, callback, nwService, NetdService.getInstance());
- }
-
- @VisibleForTesting
- public IpManager(Context context, String ifName, Callback callback,
- INetworkManagementService nwService, INetd netd) {
- super(context, ifName, callback, nwService, netd);
+ super(context, ifName, callback);
}
public void startProvisioning(ProvisioningConfiguration req) {
diff --git a/services/net/java/android/net/util/InterfaceSet.java b/services/net/java/android/net/util/InterfaceSet.java
new file mode 100644
index 0000000..9f26fa1
--- /dev/null
+++ b/services/net/java/android/net/util/InterfaceSet.java
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+package android.net.util;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.StringJoiner;
+
+
+/**
+ * @hide
+ */
+public class InterfaceSet {
+ public final Set<String> ifnames;
+
+ public InterfaceSet(String... names) {
+ final Set<String> nameSet = new HashSet<>();
+ for (String name : names) {
+ if (name != null) nameSet.add(name);
+ }
+ ifnames = Collections.unmodifiableSet(nameSet);
+ }
+
+ @Override
+ public String toString() {
+ final StringJoiner sj = new StringJoiner(",", "[", "]");
+ for (String ifname : ifnames) sj.add(ifname);
+ return sj.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return obj != null
+ && obj instanceof InterfaceSet
+ && ifnames.equals(((InterfaceSet)obj).ifnames);
+ }
+}
diff --git a/services/net/java/android/net/util/NetworkConstants.java b/services/net/java/android/net/util/NetworkConstants.java
index 5a3a8be..de04fd0 100644
--- a/services/net/java/android/net/util/NetworkConstants.java
+++ b/services/net/java/android/net/util/NetworkConstants.java
@@ -53,7 +53,7 @@
public static final int ETHER_HEADER_LEN = 14;
- private static final byte FF = asByte(0xff);
+ public static final byte FF = asByte(0xff);
public static final byte[] ETHER_ADDR_BROADCAST = {
FF, FF, FF, FF, FF, FF
};
@@ -121,6 +121,14 @@
public static final int ICMP_ECHO_DATA_OFFSET = 8;
/**
+ * ICMPv4 constants.
+ *
+ * See also:
+ * - https://tools.ietf.org/html/rfc792
+ */
+ public static final int ICMPV4_ECHO_REQUEST_TYPE = 8;
+
+ /**
* ICMPv6 constants.
*
* See also:
@@ -128,6 +136,8 @@
* - https://tools.ietf.org/html/rfc4861
*/
public static final int ICMPV6_HEADER_MIN_LEN = 4;
+ public static final int ICMPV6_ECHO_REQUEST_TYPE = 128;
+ public static final int ICMPV6_ECHO_REPLY_TYPE = 129;
public static final int ICMPV6_ROUTER_SOLICITATION = 133;
public static final int ICMPV6_ROUTER_ADVERTISEMENT = 134;
public static final int ICMPV6_NEIGHBOR_SOLICITATION = 135;
@@ -139,6 +149,7 @@
public static final int ICMPV6_ND_OPTION_TLLA = 2;
public static final int ICMPV6_ND_OPTION_MTU = 5;
+
/**
* UDP constants.
*
@@ -157,6 +168,14 @@
public static final int DHCP4_CLIENT_PORT = 68;
/**
+ * DNS constants.
+ *
+ * See also:
+ * - https://tools.ietf.org/html/rfc1035
+ */
+ public static final int DNS_SERVER_PORT = 53;
+
+ /**
* Utility functions.
*/
public static byte asByte(int i) { return (byte) i; }
diff --git a/services/tests/notification/Android.mk b/services/tests/notification/Android.mk
index 597a584..1ccb872 100644
--- a/services/tests/notification/Android.mk
+++ b/services/tests/notification/Android.mk
@@ -31,6 +31,7 @@
LOCAL_DX_FLAGS := --multi-dex
LOCAL_PACKAGE_NAME := FrameworksNotificationTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
diff --git a/services/tests/servicestests/Android.mk b/services/tests/servicestests/Android.mk
index 19396d4..9af0978 100644
--- a/services/tests/servicestests/Android.mk
+++ b/services/tests/servicestests/Android.mk
@@ -35,6 +35,7 @@
LOCAL_JAVA_LIBRARIES := android.test.mock legacy-android-test
LOCAL_PACKAGE_NAME := FrameworksServicesTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
diff --git a/services/tests/servicestests/src/com/android/server/WatchdogDiagnosticsTest.java b/services/tests/servicestests/src/com/android/server/WatchdogDiagnosticsTest.java
new file mode 100644
index 0000000..6e76b67
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/WatchdogDiagnosticsTest.java
@@ -0,0 +1,189 @@
+/*
+ * 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.
+ */
+
+package com.android.server;
+
+import static org.junit.Assert.assertEquals;
+
+import android.support.test.runner.AndroidJUnit4;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Unit tests for {@link WatchdogDiagnostics}
+ */
+@RunWith(AndroidJUnit4.class)
+public class WatchdogDiagnosticsTest {
+
+ private static class TestThread1 extends Thread {
+ Object lock1;
+ Object lock2;
+ volatile boolean inB = false;
+
+ public TestThread1(Object lock1, Object lock2) {
+ super("TestThread1");
+ this.lock1 = lock1;
+ this.lock2 = lock2;
+ }
+
+ @Override
+ public void run() {
+ a();
+ }
+
+ private void a() {
+ synchronized(lock1) {
+ b();
+ }
+ }
+
+ private void b() {
+ inB = true;
+ synchronized(lock2) {
+ // Nothing.
+ }
+ }
+ }
+
+ private static class TestThread2 extends Thread {
+ Object lock1;
+ Object lock2;
+ volatile boolean inY = false;
+
+ public TestThread2(Object lock1, Object lock2) {
+ super("TestThread2");
+ this.lock1 = lock1;
+ this.lock2 = lock2;
+ }
+
+ @Override
+ public void run() {
+ x();
+ }
+
+ private void x() {
+ synchronized(lock1) {
+ y();
+ }
+ }
+
+ private void y() {
+ synchronized(lock2) {
+ inY = true;
+ try {
+ lock2.wait();
+ } catch (Exception exc) {
+ throw new RuntimeException(exc);
+ }
+ }
+ }
+ }
+
+ @Test
+ public void printAnnotatedStack() throws Exception {
+ // Preparation.
+
+ Object heldLock1 = new Object();
+ Object heldLock2 = 0;
+ Object waitLock = "123";
+
+ TestThread1 thread1 = new TestThread1(heldLock1, heldLock2);
+ TestThread2 thread2 = new TestThread2(heldLock2, waitLock);
+
+ // Start the second thread, ensure it grabs heldLock2.
+ thread2.start();
+ while(!thread2.inY) {
+ Thread.yield();
+ }
+
+ // Start the first thread, ensure it made progress.
+ thread1.start();
+ while(!thread1.inB) {
+ Thread.yield();
+ }
+
+ // Now wait till both are no longer in runnable state.
+ while (thread1.getState() == Thread.State.RUNNABLE) {
+ Thread.yield();
+ }
+ while (thread2.getState() == Thread.State.RUNNABLE) {
+ Thread.yield();
+ }
+
+ // Now do the test.
+ StringWriter stringBuffer = new StringWriter();
+ PrintWriter print = new PrintWriter(stringBuffer, true);
+
+ {
+ WatchdogDiagnostics.printAnnotatedStack(thread1, print);
+
+ String output = stringBuffer.toString();
+ String expected =
+ "TestThread1 annotated stack trace:\n" +
+ " at com.android.server.WatchdogDiagnosticsTest$TestThread1.b(" +
+ "WatchdogDiagnosticsTest.java:59)\n" +
+ " - waiting to lock <HASH> (a java.lang.Integer)\n" +
+ " at com.android.server.WatchdogDiagnosticsTest$TestThread1.a(" +
+ "WatchdogDiagnosticsTest.java:53)\n" +
+ " - locked <HASH> (a java.lang.Object)\n" +
+ " at com.android.server.WatchdogDiagnosticsTest$TestThread1.run(" +
+ "WatchdogDiagnosticsTest.java:48)\n";
+ assertEquals(expected, filterHashes(output));
+ }
+
+ stringBuffer.getBuffer().setLength(0);
+
+ {
+ WatchdogDiagnostics.printAnnotatedStack(thread2, print);
+
+ String output = stringBuffer.toString();
+ String expected =
+ "TestThread2 annotated stack trace:\n" +
+ " at java.lang.Object.wait(Native Method)\n" +
+ " at com.android.server.WatchdogDiagnosticsTest$TestThread2.y(" +
+ "WatchdogDiagnosticsTest.java:91)\n" +
+ " - locked <HASH> (a java.lang.String)\n" +
+ " at com.android.server.WatchdogDiagnosticsTest$TestThread2.x(" +
+ "WatchdogDiagnosticsTest.java:83)\n" +
+ " - locked <HASH> (a java.lang.Integer)\n" +
+ " at com.android.server.WatchdogDiagnosticsTest$TestThread2.run(" +
+ "WatchdogDiagnosticsTest.java:78)\n";
+ assertEquals(expected, filterHashes(output));
+ }
+
+ // Let the threads finish.
+ synchronized (waitLock) {
+ waitLock.notifyAll();
+ }
+
+ thread1.join();
+ thread2.join();
+ }
+
+ /**
+ * A filter function that removes hash codes (which will change between tests and cannot be
+ * controlled.)
+ * <p>
+ * Note: leaves "<HASH>" to indicate that something was replaced.
+ */
+ private static String filterHashes(String t) {
+ return t.replaceAll("<0x[0-9a-f]{8}>", "<HASH>");
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java
index 9702118..cb5f0a7 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java
@@ -235,6 +235,12 @@
}
@Override
+ public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+ String[] receiverPermissions) {
+ spiedContext.sendBroadcastAsUserMultiplePermissions(intent, user, receiverPermissions);
+ }
+
+ @Override
public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
spiedContext.sendBroadcast(intent, receiverPermission, options);
}
diff --git a/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java b/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java
new file mode 100644
index 0000000..9f4b754
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ */
+
+package com.android.server.net;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import android.net.IpConfiguration;
+import android.net.IpConfiguration.IpAssignment;
+import android.net.IpConfiguration.ProxySettings;
+import android.net.LinkAddress;
+import android.net.NetworkUtils;
+import android.net.ProxyInfo;
+import android.net.StaticIpConfiguration;
+import android.support.test.runner.AndroidJUnit4;
+import android.util.ArrayMap;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Unit tests for {@link IpConfigStore}
+ */
+@RunWith(AndroidJUnit4.class)
+public class IpConfigStoreTest {
+
+ @Test
+ public void backwardCompatibility2to3() throws IOException {
+ final int KEY_CONFIG = 17;
+ ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
+ DataOutputStream outputStream = new DataOutputStream(byteStream);
+
+ IpConfiguration expectedConfig = new IpConfiguration(IpAssignment.DHCP,
+ ProxySettings.NONE, null, null);
+
+ // Emulate writing to old format.
+ writeDhcpConfigV2(outputStream, KEY_CONFIG, expectedConfig);
+
+ InputStream in = new ByteArrayInputStream(byteStream.toByteArray());
+ ArrayMap<String, IpConfiguration> configurations = IpConfigStore.readIpConfigurations(in);
+
+ assertNotNull(configurations);
+ assertEquals(1, configurations.size());
+ IpConfiguration actualConfig = configurations.get(String.valueOf(KEY_CONFIG));
+ assertNotNull(actualConfig);
+ assertEquals(expectedConfig, actualConfig);
+ }
+
+ @Test
+ public void staticIpMultiNetworks() throws Exception {
+ final String IFACE_1 = "eth0";
+ final String IFACE_2 = "eth1";
+ final String IP_ADDR_1 = "192.168.1.10/24";
+ final String IP_ADDR_2 = "192.168.1.20/24";
+ final String DNS_IP_ADDR_1 = "1.2.3.4";
+ final String DNS_IP_ADDR_2 = "5.6.7.8";
+
+ StaticIpConfiguration staticIpConfiguration = new StaticIpConfiguration();
+ staticIpConfiguration.ipAddress = new LinkAddress(IP_ADDR_1);
+ staticIpConfiguration.dnsServers.add(NetworkUtils.numericToInetAddress(DNS_IP_ADDR_1));
+ staticIpConfiguration.dnsServers.add(NetworkUtils.numericToInetAddress(DNS_IP_ADDR_2));
+
+ ProxyInfo proxyInfo = new ProxyInfo("10.10.10.10", 88, "host1,host2");
+
+ IpConfiguration expectedConfig1 = new IpConfiguration(IpAssignment.STATIC,
+ ProxySettings.STATIC, staticIpConfiguration, proxyInfo);
+ IpConfiguration expectedConfig2 = new IpConfiguration(expectedConfig1);
+ expectedConfig2.getStaticIpConfiguration().ipAddress = new LinkAddress(IP_ADDR_2);
+
+ ArrayMap<String, IpConfiguration> expectedNetworks = new ArrayMap<>();
+ expectedNetworks.put(IFACE_1, expectedConfig1);
+ expectedNetworks.put(IFACE_2, expectedConfig2);
+
+ MockedDelayedDiskWrite writer = new MockedDelayedDiskWrite();
+ IpConfigStore store = new IpConfigStore(writer);
+ store.writeIpConfigurations("file/path/not/used/", expectedNetworks);
+
+ InputStream in = new ByteArrayInputStream(writer.byteStream.toByteArray());
+ ArrayMap<String, IpConfiguration> actualNetworks = IpConfigStore.readIpConfigurations(in);
+ assertNotNull(actualNetworks);
+ assertEquals(2, actualNetworks.size());
+ assertEquals(expectedNetworks.get(IFACE_1), actualNetworks.get(IFACE_1));
+ assertEquals(expectedNetworks.get(IFACE_2), actualNetworks.get(IFACE_2));
+ }
+
+ // This is simplified snapshot of code that was used to store values in V2 format (key as int).
+ private static void writeDhcpConfigV2(DataOutputStream out, int configKey,
+ IpConfiguration config) throws IOException {
+ out.writeInt(2); // VERSION 2
+ switch (config.ipAssignment) {
+ case DHCP:
+ out.writeUTF("ipAssignment");
+ out.writeUTF(config.ipAssignment.toString());
+ break;
+ default:
+ fail("Not supported in test environment");
+ }
+
+ out.writeUTF("id");
+ out.writeInt(configKey);
+ out.writeUTF("eos");
+ }
+
+ /** Synchronously writes into given byte steam */
+ private static class MockedDelayedDiskWrite extends DelayedDiskWrite {
+ final ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
+
+ @Override
+ public void write(String filePath, Writer w) {
+ DataOutputStream outputStream = new DataOutputStream(byteStream);
+
+ try {
+ w.onWriteCalled(outputStream);
+ } catch (IOException e) {
+ fail();
+ }
+ }
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java b/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
index 4db9a30..36d0c8b 100644
--- a/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
+++ b/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
@@ -17,12 +17,15 @@
package com.android.server.pm.dex;
import android.content.pm.ApplicationInfo;
+import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
import android.os.Build;
import android.os.UserHandle;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+import com.android.server.pm.Installer;
+
import dalvik.system.DelegateLastClassLoader;
import dalvik.system.PathClassLoader;
import dalvik.system.VMRuntime;
@@ -36,8 +39,13 @@
import java.util.Map;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+import org.mockito.quality.Strictness;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -45,6 +53,12 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import static com.android.server.pm.dex.PackageDexUsage.PackageUseInfo;
import static com.android.server.pm.dex.PackageDexUsage.DexUseInfo;
@@ -56,6 +70,12 @@
private static final String DELEGATE_LAST_CLASS_LOADER_NAME =
DelegateLastClassLoader.class.getName();
+ @Rule public MockitoRule mockito = MockitoJUnit.rule().strictness(Strictness.STRICT_STUBS);
+ @Mock Installer mInstaller;
+ @Mock IPackageManager mPM;
+ private final Object mInstallLock = new Object();
+ @Mock DexManager.Listener mListener;
+
private DexManager mDexManager;
private TestData mFooUser0;
@@ -90,7 +110,8 @@
mBarUser0DelegateLastClassLoader = new TestData(bar, isa, mUser0,
DELEGATE_LAST_CLASS_LOADER_NAME);
- mDexManager = new DexManager(null, null, null, null);
+ mDexManager = new DexManager(
+ mPM, /*PackageDexOptimizer*/ null, mInstaller, mInstallLock, mListener);
// Foo and Bar are available to user0.
// Only Bar is available to user1;
@@ -440,6 +461,20 @@
}
+ @Test
+ public void testReconcileSecondaryDexFiles_invokesListener() throws Exception {
+ List<String> fooSecondaries = mFooUser0.getSecondaryDexPathsFromProtectedDirs();
+ notifyDexLoad(mFooUser0, fooSecondaries, mUser0);
+
+ when(mPM.getPackageInfo(mFooUser0.getPackageName(), 0, 0))
+ .thenReturn(mFooUser0.mPackageInfo);
+
+ mDexManager.reconcileSecondaryDexFiles(mFooUser0.getPackageName());
+
+ verify(mListener, times(fooSecondaries.size()))
+ .onReconcileSecondaryDexFile(any(ApplicationInfo.class),
+ any(DexUseInfo.class), anyString(), anyInt());
+ }
private void assertSecondaryUse(TestData testData, PackageUseInfo pui,
List<String> secondaries, boolean isUsedByOtherApps, int ownerUserId,
@@ -492,12 +527,12 @@
}
private PackageUseInfo getPackageUseInfo(TestData testData) {
- assertTrue(mDexManager.hasInfoOnPackage(testData.mPackageInfo.packageName));
- return mDexManager.getPackageUseInfoOrDefault(testData.mPackageInfo.packageName);
+ assertTrue(mDexManager.hasInfoOnPackage(testData.getPackageName()));
+ return mDexManager.getPackageUseInfoOrDefault(testData.getPackageName());
}
private void assertNoUseInfo(TestData testData) {
- assertFalse(mDexManager.hasInfoOnPackage(testData.mPackageInfo.packageName));
+ assertFalse(mDexManager.hasInfoOnPackage(testData.getPackageName()));
}
private static PackageInfo getMockPackageInfo(String packageName, int userId) {
@@ -555,8 +590,8 @@
List<String> getSecondaryDexPathsFromProtectedDirs() {
List<String> paths = new ArrayList<>();
- paths.add(mPackageInfo.applicationInfo.dataDir + "/secondary6.dex");
- paths.add(mPackageInfo.applicationInfo.dataDir + "/secondary7.dex");
+ paths.add(mPackageInfo.applicationInfo.deviceProtectedDataDir + "/secondary6.dex");
+ paths.add(mPackageInfo.applicationInfo.credentialProtectedDataDir + "/secondary7.dex");
return paths;
}
diff --git a/services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java b/services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java
index c2072df..93064bc 100644
--- a/services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java
+++ b/services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java
@@ -53,6 +53,7 @@
assertFalse(opt.isDowngrade());
assertFalse(opt.isForce());
assertFalse(opt.isDexoptIdleBackgroundJob());
+ assertFalse(opt.isDexoptInstallWithDexMetadata());
}
@Test
@@ -65,7 +66,8 @@
DexoptOptions.DEXOPT_ONLY_SHARED_DEX |
DexoptOptions.DEXOPT_DOWNGRADE |
DexoptOptions.DEXOPT_AS_SHARED_LIBRARY |
- DexoptOptions.DEXOPT_IDLE_BACKGROUND_JOB;
+ DexoptOptions.DEXOPT_IDLE_BACKGROUND_JOB |
+ DexoptOptions.DEXOPT_INSTALL_WITH_DEX_METADATA_FILE;
DexoptOptions opt = new DexoptOptions(mPackageName, mCompilerFilter, flags);
assertEquals(mPackageName, opt.getPackageName());
@@ -79,6 +81,7 @@
assertTrue(opt.isForce());
assertTrue(opt.isDexoptAsSharedLibrary());
assertTrue(opt.isDexoptIdleBackgroundJob());
+ assertTrue(opt.isDexoptInstallWithDexMetadata());
}
@Test
@@ -115,7 +118,7 @@
public void testCreateDexoptOptionsSplit() {
int flags = DexoptOptions.DEXOPT_FORCE | DexoptOptions.DEXOPT_BOOT_COMPLETE;
- DexoptOptions opt = new DexoptOptions(mPackageName, mCompilerFilter, mSplitName, flags);
+ DexoptOptions opt = new DexoptOptions(mPackageName, -1, mCompilerFilter, mSplitName, flags);
assertEquals(mPackageName, opt.getPackageName());
assertEquals(mCompilerFilter, opt.getCompilerFilter());
assertEquals(mSplitName, opt.getSplitName());
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeZoneDetectorStrategyTest.java b/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeZoneDetectorStrategyTest.java
new file mode 100644
index 0000000..e4b3b13
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeZoneDetectorStrategyTest.java
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+package com.android.server.timedetector;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+
+import android.app.timedetector.TimeSignal;
+import android.support.test.runner.AndroidJUnit4;
+import android.util.TimestampedValue;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class SimpleTimeZoneDetectorStrategyTest {
+
+ private TimeDetectorStrategy.Callback mMockCallback;
+
+ private SimpleTimeDetectorStrategy mSimpleTimeZoneDetectorStrategy;
+
+ @Before
+ public void setUp() {
+ mMockCallback = mock(TimeDetectorStrategy.Callback.class);
+ mSimpleTimeZoneDetectorStrategy = new SimpleTimeDetectorStrategy();
+ mSimpleTimeZoneDetectorStrategy.initialize(mMockCallback);
+ }
+
+ @Test
+ public void testSuggestTime_nitz() {
+ TimestampedValue<Long> utcTime = createUtcTime();
+ TimeSignal timeSignal = new TimeSignal(TimeSignal.SOURCE_ID_NITZ, utcTime);
+
+ mSimpleTimeZoneDetectorStrategy.suggestTime(timeSignal);
+
+ verify(mMockCallback).setTime(utcTime);
+ }
+
+ @Test
+ public void testSuggestTime_unknownSource() {
+ TimestampedValue<Long> utcTime = createUtcTime();
+ TimeSignal timeSignal = new TimeSignal("unknown", utcTime);
+ mSimpleTimeZoneDetectorStrategy.suggestTime(timeSignal);
+
+ verify(mMockCallback, never()).setTime(any());
+ }
+
+ private static TimestampedValue<Long> createUtcTime() {
+ return new TimestampedValue<>(321L, 123456L);
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
new file mode 100644
index 0000000..22dea92
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+
+package com.android.server.timedetector;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
+
+import android.app.timedetector.TimeSignal;
+import android.content.Context;
+import android.support.test.runner.AndroidJUnit4;
+import android.util.TimestampedValue;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class TimeDetectorServiceTest {
+
+ private TimeDetectorService mTimeDetectorService;
+
+ private Context mMockContext;
+ private TimeDetectorStrategy mMockTimeDetectorStrategy;
+
+ @Before
+ public void setUp() {
+ mMockContext = mock(Context.class);
+ mMockTimeDetectorStrategy = mock(TimeDetectorStrategy.class);
+ mTimeDetectorService = new TimeDetectorService(mMockContext, mMockTimeDetectorStrategy);
+ }
+
+ @After
+ public void tearDown() {
+ verifyNoMoreInteractions(mMockContext, mMockTimeDetectorStrategy);
+ }
+
+ @Test(expected=SecurityException.class)
+ public void testStubbedCall_withoutPermission() {
+ doThrow(new SecurityException("Mock"))
+ .when(mMockContext).enforceCallingPermission(anyString(), any());
+ TimeSignal timeSignal = createNitzTimeSignal();
+
+ try {
+ mTimeDetectorService.suggestTime(timeSignal);
+ } finally {
+ verify(mMockContext).enforceCallingPermission(
+ eq(android.Manifest.permission.SET_TIME), anyString());
+ }
+ }
+
+ @Test
+ public void testSuggestTime() {
+ doNothing().when(mMockContext).enforceCallingPermission(anyString(), any());
+
+ TimeSignal timeSignal = createNitzTimeSignal();
+ mTimeDetectorService.suggestTime(timeSignal);
+
+ verify(mMockContext)
+ .enforceCallingPermission(eq(android.Manifest.permission.SET_TIME), anyString());
+ verify(mMockTimeDetectorStrategy).suggestTime(timeSignal);
+ }
+
+ private static TimeSignal createNitzTimeSignal() {
+ TimestampedValue<Long> timeValue = new TimestampedValue<>(100L, 1_000_000L);
+ return new TimeSignal(TimeSignal.SOURCE_ID_NITZ, timeValue);
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyTest.java b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyTest.java
new file mode 100644
index 0000000..301ded4
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyTest.java
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+package com.android.server.timedetector;
+
+import static org.junit.Assert.assertEquals;
+
+import android.support.test.runner.AndroidJUnit4;
+import android.util.TimestampedValue;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class TimeDetectorStrategyTest {
+
+ @Test
+ public void testGetTimeAt() {
+ long timeMillis = 1000L;
+ int referenceTimeMillis = 100;
+ TimestampedValue<Long> timestampedValue =
+ new TimestampedValue<>(referenceTimeMillis, timeMillis);
+ // Reference time is after the timestamp.
+ assertEquals(
+ timeMillis + (125 - referenceTimeMillis),
+ TimeDetectorStrategy.getTimeAt(timestampedValue, 125));
+
+ // Reference time is before the timestamp.
+ assertEquals(
+ timeMillis + (75 - referenceTimeMillis),
+ TimeDetectorStrategy.getTimeAt(timestampedValue, 75));
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
index eca27ee..108d2ea 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -670,4 +670,8 @@
public boolean canDismissBootAnimation() {
return true;
}
+
+ @Override
+ public void requestUserActivityNotification() {
+ }
}
diff --git a/services/tests/servicestests/test-apps/ConnTestApp/Android.mk b/services/tests/servicestests/test-apps/ConnTestApp/Android.mk
index fbfa28a..18b8c2d 100644
--- a/services/tests/servicestests/test-apps/ConnTestApp/Android.mk
+++ b/services/tests/servicestests/test-apps/ConnTestApp/Android.mk
@@ -24,6 +24,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := ConnTestApp
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java
index f53eb15..763dffb 100644
--- a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java
+++ b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java
@@ -34,6 +34,7 @@
import android.hardware.soundtrigger.SoundTrigger.SoundModel;
import android.hardware.soundtrigger.SoundTrigger.SoundModelEvent;
import android.hardware.soundtrigger.SoundTriggerModule;
+import android.os.Binder;
import android.os.DeadObjectException;
import android.os.PowerManager;
import android.os.RemoteException;
@@ -880,21 +881,26 @@
}
private void initializeTelephonyAndPowerStateListeners() {
- // Get the current call state synchronously for the first recognition.
- mCallActive = mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE;
+ long token = Binder.clearCallingIdentity();
+ try {
+ // Get the current call state synchronously for the first recognition.
+ mCallActive = mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE;
- // Register for call state changes when the first call to start recognition occurs.
- mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
+ // Register for call state changes when the first call to start recognition occurs.
+ mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
- // Register for power saver mode changes when the first call to start recognition
- // occurs.
- if (mPowerSaveModeListener == null) {
- mPowerSaveModeListener = new PowerSaveModeListener();
- mContext.registerReceiver(mPowerSaveModeListener,
- new IntentFilter(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED));
+ // Register for power saver mode changes when the first call to start recognition
+ // occurs.
+ if (mPowerSaveModeListener == null) {
+ mPowerSaveModeListener = new PowerSaveModeListener();
+ mContext.registerReceiver(mPowerSaveModeListener,
+ new IntentFilter(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED));
+ }
+ mIsPowerSaveMode = mPowerManager.getPowerSaveState(ServiceType.SOUND)
+ .batterySaverEnabled;
+ } finally {
+ Binder.restoreCallingIdentity(token);
}
- mIsPowerSaveMode = mPowerManager.getPowerSaveState(ServiceType.SOUND)
- .batterySaverEnabled;
}
// Sends an error callback to all models with a valid registered callback.
diff --git a/telecomm/OWNERS b/telecomm/OWNERS
new file mode 100644
index 0000000..a3bcfb2
--- /dev/null
+++ b/telecomm/OWNERS
@@ -0,0 +1,6 @@
+set noparent
+
+tgunn@google.com
+breadley@google.com
+hallliu@google.com
+rgreenwalt@google.com
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index 8c7d6b3..1c0e260 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -352,8 +352,11 @@
*/
public static final int CAPABILITY_CAN_PULL_CALL = 0x00800000;
+ /** Call supports the deflect feature. */
+ public static final int CAPABILITY_SUPPORT_DEFLECT = 0x01000000;
+
//******************************************************************************************
- // Next CAPABILITY value: 0x01000000
+ // Next CAPABILITY value: 0x02000000
//******************************************************************************************
/**
@@ -423,8 +426,14 @@
*/
public static final int PROPERTY_ASSISTED_DIALING_USED = 0x00000200;
+ /**
+ * Indicates that the call is an RTT call. Use {@link #getRttCall()} to get the
+ * {@link RttCall} object that is used to send and receive text.
+ */
+ public static final int PROPERTY_RTT = 0x00000400;
+
//******************************************************************************************
- // Next PROPERTY value: 0x00000400
+ // Next PROPERTY value: 0x00000800
//******************************************************************************************
private final String mTelecomCallId;
@@ -529,6 +538,9 @@
if (can(capabilities, CAPABILITY_CAN_PULL_CALL)) {
builder.append(" CAPABILITY_CAN_PULL_CALL");
}
+ if (can(capabilities, CAPABILITY_SUPPORT_DEFLECT)) {
+ builder.append(" CAPABILITY_SUPPORT_DEFLECT");
+ }
builder.append("]");
return builder.toString();
}
@@ -867,42 +879,76 @@
/**
* @hide
*/
- @IntDef({HANDOVER_FAILURE_DEST_APP_REJECTED, HANDOVER_FAILURE_DEST_NOT_SUPPORTED,
- HANDOVER_FAILURE_DEST_INVALID_PERM, HANDOVER_FAILURE_DEST_USER_REJECTED,
- HANDOVER_FAILURE_ONGOING_EMERG_CALL})
+ @IntDef(prefix = { "HANDOVER_" },
+ value = {HANDOVER_FAILURE_DEST_APP_REJECTED, HANDOVER_FAILURE_NOT_SUPPORTED,
+ HANDOVER_FAILURE_USER_REJECTED, HANDOVER_FAILURE_ONGOING_EMERGENCY_CALL,
+ HANDOVER_FAILURE_UNKNOWN})
@Retention(RetentionPolicy.SOURCE)
public @interface HandoverFailureErrors {}
/**
* Handover failure reason returned via {@link #onHandoverFailed(Call, int)} when the app
- * to handover the call rejects handover.
+ * to handover the call to rejects the handover request.
+ * <p>
+ * Will be returned when {@link Call#handoverTo(PhoneAccountHandle, int, Bundle)} is called
+ * and the destination {@link PhoneAccountHandle}'s {@link ConnectionService} returns a
+ * {@code null} {@link Connection} from
+ * {@link ConnectionService#onCreateOutgoingHandoverConnection(PhoneAccountHandle,
+ * ConnectionRequest)}.
+ * <p>
+ * For more information on call handovers, see
+ * {@link #handoverTo(PhoneAccountHandle, int, Bundle)}.
*/
public static final int HANDOVER_FAILURE_DEST_APP_REJECTED = 1;
/**
- * Handover failure reason returned via {@link #onHandoverFailed(Call, int)} when there is
- * an error associated with unsupported handover.
+ * Handover failure reason returned via {@link #onHandoverFailed(Call, int)} when a handover
+ * is initiated but the source or destination app does not support handover.
+ * <p>
+ * Will be returned when a handover is requested via
+ * {@link #handoverTo(PhoneAccountHandle, int, Bundle)} and the destination
+ * {@link PhoneAccountHandle} does not declare
+ * {@link PhoneAccount#EXTRA_SUPPORTS_HANDOVER_TO}. May also be returned when a handover is
+ * requested at the {@link PhoneAccountHandle} for the current call (i.e. the source call's
+ * {@link Details#getAccountHandle()}) does not declare
+ * {@link PhoneAccount#EXTRA_SUPPORTS_HANDOVER_FROM}.
+ * <p>
+ * For more information on call handovers, see
+ * {@link #handoverTo(PhoneAccountHandle, int, Bundle)}.
*/
- public static final int HANDOVER_FAILURE_DEST_NOT_SUPPORTED = 2;
+ public static final int HANDOVER_FAILURE_NOT_SUPPORTED = 2;
/**
- * Handover failure reason returned via {@link #onHandoverFailed(Call, int)} when there
- * are some permission errors associated with APIs doing handover.
+ * Handover failure reason returned via {@link #onHandoverFailed(Call, int)} when the remote
+ * user rejects the handover request.
+ * <p>
+ * For more information on call handovers, see
+ * {@link #handoverTo(PhoneAccountHandle, int, Bundle)}.
*/
- public static final int HANDOVER_FAILURE_DEST_INVALID_PERM = 3;
-
- /**
- * Handover failure reason returned via {@link #onHandoverFailed(Call, int)} when user
- * rejects handover.
- */
- public static final int HANDOVER_FAILURE_DEST_USER_REJECTED = 4;
+ public static final int HANDOVER_FAILURE_USER_REJECTED = 3;
/**
* Handover failure reason returned via {@link #onHandoverFailed(Call, int)} when there
* is ongoing emergency call.
+ * <p>
+ * This error code is returned when {@link #handoverTo(PhoneAccountHandle, int, Bundle)} is
+ * called on an emergency call, or if any other call is an emergency call.
+ * <p>
+ * Handovers are not permitted while there are ongoing emergency calls.
+ * <p>
+ * For more information on call handovers, see
+ * {@link #handoverTo(PhoneAccountHandle, int, Bundle)}.
*/
- public static final int HANDOVER_FAILURE_ONGOING_EMERG_CALL = 5;
+ public static final int HANDOVER_FAILURE_ONGOING_EMERGENCY_CALL = 4;
+ /**
+ * Handover failure reason returned via {@link #onHandoverFailed(Call, int)} when a handover
+ * fails for an unknown reason.
+ * <p>
+ * For more information on call handovers, see
+ * {@link #handoverTo(PhoneAccountHandle, int, Bundle)}.
+ */
+ public static final int HANDOVER_FAILURE_UNKNOWN = 5;
/**
* Invoked when the state of this {@code Call} has changed. See {@link #getState()}.
@@ -1043,6 +1089,10 @@
/**
* Invoked when Call handover from one {@link PhoneAccount} to other {@link PhoneAccount}
* has completed successfully.
+ * <p>
+ * For a full discussion of the handover process and the APIs involved, see
+ * {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle)}.
+ *
* @param call The call which had initiated handover.
*/
public void onHandoverComplete(Call call) {}
@@ -1050,8 +1100,12 @@
/**
* Invoked when Call handover from one {@link PhoneAccount} to other {@link PhoneAccount}
* has failed.
+ * <p>
+ * For a full discussion of the handover process and the APIs involved, see
+ * {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle)}.
+ *
* @param call The call which had initiated handover.
- * @param failureReason Error reason for failure
+ * @param failureReason Error reason for failure.
*/
public void onHandoverFailed(Call call, @HandoverFailureErrors int failureReason) {}
}
@@ -1184,6 +1238,23 @@
return null;
}
}
+
+ /**
+ * Closes the underlying file descriptors
+ * @hide
+ */
+ public void close() {
+ try {
+ mReceiveStream.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ try {
+ mTransmitStream.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
}
/**
@@ -1231,11 +1302,20 @@
* Instructs this {@link #STATE_RINGING} {@code Call} to answer.
* @param videoState The video state in which to answer the call.
*/
- public void answer(int videoState) {
+ public void answer(@VideoProfile.VideoState int videoState) {
mInCallAdapter.answerCall(mTelecomCallId, videoState);
}
/**
+ * Instructs this {@link #STATE_RINGING} {@code Call} to deflect.
+ *
+ * @param address The address to which the call will be deflected.
+ */
+ public void deflect(Uri address) {
+ mInCallAdapter.deflectCall(mTelecomCallId, address);
+ }
+
+ /**
* Instructs this {@link #STATE_RINGING} {@code Call} to reject.
*
* @param rejectWithMessage Whether to reject with a text message.
@@ -1436,16 +1516,65 @@
* by {@code toHandle}. The videoState specified indicates the desired video state after the
* handover.
* <p>
- * A handover request is initiated by the user from one app to indicate a desire
- * to handover a call to another.
+ * A call handover is the process where an ongoing call is transferred from one app (i.e.
+ * {@link ConnectionService} to another app. The user could, for example, choose to continue a
+ * mobile network call in a video calling app. The mobile network call via the Telephony stack
+ * is referred to as the source of the handover, and the video calling app is referred to as the
+ * destination.
+ * <p>
+ * When considering a handover scenario the device this method is called on is considered the
+ * <em>initiating</em> device (since the user initiates the handover from this device), and the
+ * other device is considered the <em>receiving</em> device.
+ * <p>
+ * When this method is called on the <em>initiating</em> device, the Telecom framework will bind
+ * to the {@link ConnectionService} defined by the {@code toHandle} {@link PhoneAccountHandle}
+ * and invoke
+ * {@link ConnectionService#onCreateOutgoingHandoverConnection(PhoneAccountHandle,
+ * ConnectionRequest)} to inform the destination app that a request has been made to handover a
+ * call to it. The app returns an instance of {@link Connection} to represent the handover call
+ * At this point the app should display UI to indicate to the user that a call
+ * handover is in process.
+ * <p>
+ * The destination app is responsible for communicating the handover request from the
+ * <em>initiating</em> device to the <em>receiving</em> device.
+ * <p>
+ * When the app on the <em>receiving</em> device receives the handover request, it calls
+ * {@link TelecomManager#acceptHandover(Uri, int, PhoneAccountHandle)} to continue the handover
+ * process from the <em>initiating</em> device to the <em>receiving</em> device. At this point
+ * the destination app on the <em>receiving</em> device should show UI to allow the user to
+ * choose whether they want to continue their call in the destination app.
+ * <p>
+ * When the destination app on the <em>receiving</em> device calls
+ * {@link TelecomManager#acceptHandover(Uri, int, PhoneAccountHandle)}, Telecom will bind to its
+ * {@link ConnectionService} and call
+ * {@link ConnectionService#onCreateIncomingHandoverConnection(PhoneAccountHandle,
+ * ConnectionRequest)} to inform it of the handover request. The app returns an instance of
+ * {@link Connection} to represent the handover call.
+ * <p>
+ * If the user of the <em>receiving</em> device accepts the handover, the app calls
+ * {@link Connection#setActive()} to complete the handover process; Telecom will disconnect the
+ * original call. If the user rejects the handover, the app calls
+ * {@link Connection#setDisconnected(DisconnectCause)} and specifies a {@link DisconnectCause}
+ * of {@link DisconnectCause#CANCELED} to indicate that the handover has been cancelled.
+ * <p>
+ * Telecom will only allow handovers from {@link PhoneAccount}s which declare
+ * {@link PhoneAccount#EXTRA_SUPPORTS_HANDOVER_FROM}. Similarly, the {@link PhoneAccount}
+ * specified by {@code toHandle} must declare {@link PhoneAccount#EXTRA_SUPPORTS_HANDOVER_TO}.
+ * <p>
+ * Errors in the handover process are reported to the {@link InCallService} via
+ * {@link Callback#onHandoverFailed(Call, int)}. Errors in the handover process are reported to
+ * the involved {@link ConnectionService}s via
+ * {@link ConnectionService#onHandoverFailed(ConnectionRequest, int)}.
*
* @param toHandle {@link PhoneAccountHandle} of the {@link ConnectionService} to handover
* this call to.
- * @param videoState Indicates the video state desired after the handover.
+ * @param videoState Indicates the video state desired after the handover (see the
+ * {@code STATE_*} constants defined in {@link VideoProfile}).
* @param extras Bundle containing extra information to be passed to the
* {@link ConnectionService}
*/
- public void handoverTo(PhoneAccountHandle toHandle, int videoState, Bundle extras) {
+ public void handoverTo(PhoneAccountHandle toHandle, @VideoProfile.VideoState int videoState,
+ Bundle extras) {
mInCallAdapter.handoverTo(mTelecomCallId, toHandle, videoState, extras);
}
@@ -1650,7 +1779,7 @@
* @return true if there is a connection, false otherwise.
*/
public boolean isRttActive() {
- return mRttCall != null;
+ return mRttCall != null && mDetails.hasProperty(Details.PROPERTY_RTT);
}
/**
@@ -1853,7 +1982,8 @@
boolean isRttChanged = false;
boolean rttModeChanged = false;
- if (parcelableCall.getParcelableRttCall() != null && parcelableCall.getIsRttCallChanged()) {
+ if (parcelableCall.getIsRttCallChanged()
+ && mDetails.hasProperty(Details.PROPERTY_RTT)) {
ParcelableRttCall parcelableRttCall = parcelableCall.getParcelableRttCall();
InputStreamReader receiveStream = new InputStreamReader(
new ParcelFileDescriptor.AutoCloseInputStream(
@@ -1961,6 +2091,15 @@
}
}
+ /** {@hide} */
+ final void internalOnHandoverComplete() {
+ for (CallbackRecord<Callback> record : mCallbackRecords) {
+ final Call call = this;
+ final Callback callback = record.getCallback();
+ record.getHandler().post(() -> callback.onHandoverComplete(call));
+ }
+ }
+
private void fireStateChanged(final int newState) {
for (CallbackRecord<Callback> record : mCallbackRecords) {
final Call call = this;
diff --git a/telecomm/java/android/telecom/CallAudioState.java b/telecomm/java/android/telecom/CallAudioState.java
index 4b827d2..e33ba7e 100644
--- a/telecomm/java/android/telecom/CallAudioState.java
+++ b/telecomm/java/android/telecom/CallAudioState.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.TestApi;
import android.bluetooth.BluetoothDevice;
import android.os.Parcel;
import android.os.Parcelable;
@@ -100,6 +101,7 @@
}
/** @hide */
+ @TestApi
public CallAudioState(boolean isMuted, @CallAudioRoute int route,
@CallAudioRoute int supportedRouteMask,
@Nullable BluetoothDevice activeBluetoothDevice,
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java
index 5fcff18..024bd30 100644
--- a/telecomm/java/android/telecom/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -29,7 +29,6 @@
import java.util.Collections;
import java.util.List;
import java.util.Locale;
-import java.util.Objects;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
@@ -82,7 +81,7 @@
private int mConnectionProperties;
private String mDisconnectMessage;
private long mConnectTimeMillis = CONNECT_TIME_NOT_SPECIFIED;
- private long mConnectElapsedTimeMillis = CONNECT_TIME_NOT_SPECIFIED;
+ private long mConnectionStartElapsedRealTime = CONNECT_TIME_NOT_SPECIFIED;
private StatusHints mStatusHints;
private Bundle mExtras;
private Set<String> mPreviousExtraKeys;
@@ -584,30 +583,36 @@
}
/**
- * Sets the connection start time of the {@code Conference}. Should be specified in wall-clock
- * time returned by {@link System#currentTimeMillis()}.
+ * Sets the connection start time of the {@code Conference}. This is used in the call log to
+ * indicate the date and time when the conference took place.
+ * <p>
+ * Should be specified in wall-clock time returned by {@link System#currentTimeMillis()}.
* <p>
* When setting the connection time, you should always set the connection elapsed time via
- * {@link #setConnectionElapsedTime(long)}.
+ * {@link #setConnectionStartElapsedRealTime(long)} to ensure the duration is reflected.
*
- * @param connectionTimeMillis The connection time, in milliseconds.
+ * @param connectionTimeMillis The connection time, in milliseconds, as returned by
+ * {@link System#currentTimeMillis()}.
*/
public final void setConnectionTime(long connectionTimeMillis) {
mConnectTimeMillis = connectionTimeMillis;
}
/**
- * Sets the elapsed time since system boot when the {@link Conference} was connected.
- * This is used to determine the duration of the {@link Conference}.
+ * Sets the start time of the {@link Conference} which is the basis for the determining the
+ * duration of the {@link Conference}.
* <p>
- * When setting the connection elapsed time, you should always set the connection time via
+ * You should use a value returned by {@link SystemClock#elapsedRealtime()} to ensure that time
+ * zone changes do not impact the conference duration.
+ * <p>
+ * When setting this, you should also set the connection time via
* {@link #setConnectionTime(long)}.
*
- * @param connectionElapsedTime The connection time, as measured by
+ * @param connectionStartElapsedRealTime The connection time, as measured by
* {@link SystemClock#elapsedRealtime()}.
*/
- public final void setConnectionElapsedTime(long connectionElapsedTime) {
- mConnectElapsedTimeMillis = connectionElapsedTime;
+ public final void setConnectionStartElapsedRealTime(long connectionStartElapsedRealTime) {
+ mConnectionStartElapsedRealTime = connectionStartElapsedRealTime;
}
/**
@@ -642,8 +647,8 @@
* @return The elapsed time at which the {@link Conference} was connected.
* @hide
*/
- public final long getConnectElapsedTime() {
- return mConnectElapsedTimeMillis;
+ public final long getConnectionStartElapsedRealTime() {
+ return mConnectionStartElapsedRealTime;
}
/**
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index d71fde2..ca444d4 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -23,7 +23,6 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
-import android.annotation.TestApi;
import android.app.Notification;
import android.bluetooth.BluetoothDevice;
import android.content.Intent;
@@ -41,6 +40,8 @@
import android.util.ArraySet;
import android.view.Surface;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
@@ -328,8 +329,11 @@
*/
public static final int CAPABILITY_CAN_PULL_CALL = 0x01000000;
+ /** Call supports the deflect feature. */
+ public static final int CAPABILITY_SUPPORT_DEFLECT = 0x02000000;
+
//**********************************************************************************************
- // Next CAPABILITY value: 0x02000000
+ // Next CAPABILITY value: 0x04000000
//**********************************************************************************************
/**
@@ -397,9 +401,7 @@
/**
* Set by the framework to indicate that a connection has an active RTT session associated with
* it.
- * @hide
*/
- @TestApi
public static final int PROPERTY_IS_RTT = 1 << 8;
/**
@@ -729,6 +731,9 @@
if (can(capabilities, CAPABILITY_CAN_PULL_CALL)) {
builder.append(isLong ? " CAPABILITY_CAN_PULL_CALL" : " pull");
}
+ if (can(capabilities, CAPABILITY_SUPPORT_DEFLECT)) {
+ builder.append(isLong ? " CAPABILITY_SUPPORT_DEFLECT" : " sup_def");
+ }
builder.append("]");
return builder.toString();
@@ -790,6 +795,10 @@
builder.append(isLong ? " PROPERTY_HAS_CDMA_VOICE_PRIVACY" : " priv");
}
+ if (can(properties, PROPERTY_IS_RTT)) {
+ builder.append(isLong ? " PROPERTY_IS_RTT" : " rtt");
+ }
+
builder.append("]");
return builder.toString();
}
@@ -837,9 +846,7 @@
/**
* Provides methods to read and write RTT data to/from the in-call app.
- * @hide
*/
- @TestApi
public static final class RttTextStream {
private static final int READ_BUFFER_SIZE = 1000;
private final InputStreamReader mPipeFromInCall;
@@ -855,18 +862,19 @@
mFdFromInCall = fromInCall;
mFdToInCall = toInCall;
mPipeFromInCall = new InputStreamReader(
- new ParcelFileDescriptor.AutoCloseInputStream(fromInCall));
+ new FileInputStream(fromInCall.getFileDescriptor()));
mPipeToInCall = new OutputStreamWriter(
- new ParcelFileDescriptor.AutoCloseOutputStream(toInCall));
+ new FileOutputStream(toInCall.getFileDescriptor()));
}
/**
* Writes the string {@param input} into the text stream to the UI for this RTT call. Since
* RTT transmits text in real-time, this method should be called as often as text snippets
* are received from the remote user, even if it is only one character.
- *
+ * <p>
* This method is not thread-safe -- calling it from multiple threads simultaneously may
* lead to interleaved text.
+ *
* @param input The message to send to the in-call app.
*/
public void write(String input) throws IOException {
@@ -879,9 +887,10 @@
* Reads a string from the in-call app, blocking if there is no data available. Returns
* {@code null} if the RTT conversation has been terminated and there is no further data
* to read.
- *
+ * <p>
* This method is not thread-safe -- calling it from multiple threads simultaneously may
* lead to interleaved text.
+ *
* @return A string containing text entered by the user, or {@code null} if the
* conversation has been terminated or if there was an error while reading.
*/
@@ -896,6 +905,7 @@
/**
* Non-blocking version of {@link #read()}. Returns {@code null} if there is nothing to
* be read.
+ *
* @return A string containing text entered by the user, or {@code null} if the user has
* not entered any new text yet.
*/
@@ -2292,7 +2302,7 @@
*
* @hide
*/
- public final void setConnectElapsedTimeMillis(long connectElapsedTimeMillis) {
+ public final void setConnectionStartElapsedRealTime(long connectElapsedTimeMillis) {
mConnectElapsedTimeMillis = connectElapsedTimeMillis;
}
@@ -2588,7 +2598,6 @@
}
/**
- *
* Request audio routing to a specific bluetooth device. Calling this method may result in
* the device routing audio to a different bluetooth device than the one specified if the
* bluetooth stack is unable to route audio to the requested device.
@@ -2599,49 +2608,40 @@
* Used by self-managed {@link ConnectionService}s which wish to use bluetooth audio for a
* self-managed {@link Connection} (see {@link PhoneAccount#CAPABILITY_SELF_MANAGED}.)
* <p>
- * See also {@link InCallService#requestBluetoothAudio(String)}
- * @param bluetoothAddress The address of the bluetooth device to connect to, as returned by
- * {@link BluetoothDevice#getAddress()}.
+ * See also {@link InCallService#requestBluetoothAudio(BluetoothDevice)}
+ * @param bluetoothDevice The bluetooth device to connect to.
*/
- public void requestBluetoothAudio(@NonNull String bluetoothAddress) {
+ public void requestBluetoothAudio(@NonNull BluetoothDevice bluetoothDevice) {
for (Listener l : mListeners) {
- l.onAudioRouteChanged(this, CallAudioState.ROUTE_BLUETOOTH, bluetoothAddress);
+ l.onAudioRouteChanged(this, CallAudioState.ROUTE_BLUETOOTH,
+ bluetoothDevice.getAddress());
}
}
/**
* Informs listeners that a previously requested RTT session via
* {@link ConnectionRequest#isRequestingRtt()} or
- * {@link #onStartRtt(ParcelFileDescriptor, ParcelFileDescriptor)} has succeeded.
- * @hide
+ * {@link #onStartRtt(RttTextStream)} has succeeded.
*/
- @TestApi
public final void sendRttInitiationSuccess() {
- setRttProperty();
mListeners.forEach((l) -> l.onRttInitiationSuccess(Connection.this));
}
/**
* Informs listeners that a previously requested RTT session via
- * {@link ConnectionRequest#isRequestingRtt()} or
- * {@link #onStartRtt(ParcelFileDescriptor, ParcelFileDescriptor)}
+ * {@link ConnectionRequest#isRequestingRtt()} or {@link #onStartRtt(RttTextStream)}
* has failed.
* @param reason One of the reason codes defined in {@link RttModifyStatus}, with the
* exception of {@link RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS}.
- * @hide
*/
- @TestApi
public final void sendRttInitiationFailure(int reason) {
- unsetRttProperty();
mListeners.forEach((l) -> l.onRttInitiationFailure(Connection.this, reason));
}
/**
* Informs listeners that a currently active RTT session has been terminated by the remote
* side of the coll.
- * @hide
*/
- @TestApi
public final void sendRttSessionRemotelyTerminated() {
mListeners.forEach((l) -> l.onRttSessionRemotelyTerminated(Connection.this));
}
@@ -2649,9 +2649,7 @@
/**
* Informs listeners that the remote side of the call has requested an upgrade to include an
* RTT session in the call.
- * @hide
*/
- @TestApi
public final void sendRemoteRttRequest() {
mListeners.forEach((l) -> l.onRemoteRttRequest(Connection.this));
}
@@ -2731,7 +2729,20 @@
/**
* Notifies this Connection, which is in {@link #STATE_RINGING}, of
* a request to accept.
- *
+ * <p>
+ * For managed {@link ConnectionService}s, this will be called when the user answers a call via
+ * the default dialer's {@link InCallService}.
+ * <p>
+ * Although a self-managed {@link ConnectionService} provides its own incoming call UI, the
+ * Telecom framework may request that the call is answered in the following circumstances:
+ * <ul>
+ * <li>The user chooses to answer an incoming call via a Bluetooth device.</li>
+ * <li>A car mode {@link InCallService} is in use which has declared
+ * {@link TelecomManager#METADATA_INCLUDE_SELF_MANAGED_CALLS} in its manifest. Such an
+ * {@link InCallService} will be able to see calls from self-managed
+ * {@link ConnectionService}s, and will be able to display an incoming call UI on their
+ * behalf.</li>
+ * </ul>
* @param videoState The video state in which to answer the connection.
*/
public void onAnswer(int videoState) {}
@@ -2739,6 +2750,20 @@
/**
* Notifies this Connection, which is in {@link #STATE_RINGING}, of
* a request to accept.
+ * <p>
+ * For managed {@link ConnectionService}s, this will be called when the user answers a call via
+ * the default dialer's {@link InCallService}.
+ * <p>
+ * Although a self-managed {@link ConnectionService} provides its own incoming call UI, the
+ * Telecom framework may request that the call is answered in the following circumstances:
+ * <ul>
+ * <li>The user chooses to answer an incoming call via a Bluetooth device.</li>
+ * <li>A car mode {@link InCallService} is in use which has declared
+ * {@link TelecomManager#METADATA_INCLUDE_SELF_MANAGED_CALLS} in its manifest. Such an
+ * {@link InCallService} will be able to see calls from self-managed
+ * {@link ConnectionService}s, and will be able to display an incoming call UI on their
+ * behalf.</li>
+ * </ul>
*/
public void onAnswer() {
onAnswer(VideoProfile.STATE_AUDIO_ONLY);
@@ -2746,7 +2771,27 @@
/**
* Notifies this Connection, which is in {@link #STATE_RINGING}, of
+ * a request to deflect.
+ */
+ public void onDeflect(Uri address) {}
+
+ /**
+ * Notifies this Connection, which is in {@link #STATE_RINGING}, of
* a request to reject.
+ * <p>
+ * For managed {@link ConnectionService}s, this will be called when the user rejects a call via
+ * the default dialer's {@link InCallService}.
+ * <p>
+ * Although a self-managed {@link ConnectionService} provides its own incoming call UI, the
+ * Telecom framework may request that the call is rejected in the following circumstances:
+ * <ul>
+ * <li>The user chooses to reject an incoming call via a Bluetooth device.</li>
+ * <li>A car mode {@link InCallService} is in use which has declared
+ * {@link TelecomManager#METADATA_INCLUDE_SELF_MANAGED_CALLS} in its manifest. Such an
+ * {@link InCallService} will be able to see calls from self-managed
+ * {@link ConnectionService}s, and will be able to display an incoming call UI on their
+ * behalf.</li>
+ * </ul>
*/
public void onReject() {}
@@ -2800,6 +2845,15 @@
public void onCallEvent(String event, Bundle extras) {}
/**
+ * Notifies this {@link Connection} that a handover has completed.
+ * <p>
+ * A handover is initiated with {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int,
+ * Bundle)} on the initiating side of the handover, and on the receiving side with
+ * {@link TelecomManager#acceptHandover(Uri, int, PhoneAccountHandle)}.
+ */
+ public void onHandoverComplete() {}
+
+ /**
* Notifies this {@link Connection} of a change to the extras made outside the
* {@link ConnectionService}.
* <p>
@@ -2820,9 +2874,10 @@
* should show its own incoming call user interface.
* <p>
* Where there are ongoing calls in other self-managed {@link ConnectionService}s, or in a
- * regular {@link ConnectionService}, the Telecom framework will display its own incoming call
- * user interface to allow the user to choose whether to answer the new incoming call and
- * disconnect other ongoing calls, or to reject the new incoming call.
+ * regular {@link ConnectionService}, and it is not possible to hold these other calls, the
+ * Telecom framework will display its own incoming call user interface to allow the user to
+ * choose whether to answer the new incoming call and disconnect other ongoing calls, or to
+ * reject the new incoming call.
* <p>
* You should trigger the display of the incoming call user interface for your application by
* showing a {@link Notification} with a full-screen {@link Intent} specified.
@@ -2868,17 +2923,13 @@
* request, respectively.
* @param rttTextStream The object that should be used to send text to or receive text from
* the in-call app.
- * @hide
*/
- @TestApi
public void onStartRtt(@NonNull RttTextStream rttTextStream) {}
/**
* Notifies this {@link Connection} that it should terminate any existing RTT communication
* channel. No response to Telecom is needed for this method.
- * @hide
*/
- @TestApi
public void onStopRtt() {}
/**
@@ -2886,29 +2937,11 @@
* request sent via {@link #sendRemoteRttRequest}. Acceptance of the request is
* indicated by the supplied {@link RttTextStream} being non-null, and rejection is
* indicated by {@code rttTextStream} being {@code null}
- * @hide
* @param rttTextStream The object that should be used to send text to or receive text from
* the in-call app.
*/
- @TestApi
public void handleRttUpgradeResponse(@Nullable RttTextStream rttTextStream) {}
- /**
- * Internal method to set {@link #PROPERTY_IS_RTT}.
- * @hide
- */
- void setRttProperty() {
- setConnectionProperties(getConnectionProperties() | PROPERTY_IS_RTT);
- }
-
- /**
- * Internal method to un-set {@link #PROPERTY_IS_RTT}.
- * @hide
- */
- void unsetRttProperty() {
- setConnectionProperties(getConnectionProperties() & (~PROPERTY_IS_RTT));
- }
-
static String toLogSafePhoneNumber(String number) {
// For unknown number, log empty string.
if (number == null) {
diff --git a/telecomm/java/android/telecom/ConnectionRequest.java b/telecomm/java/android/telecom/ConnectionRequest.java
index e169e5f..b6e6b0e 100644
--- a/telecomm/java/android/telecom/ConnectionRequest.java
+++ b/telecomm/java/android/telecom/ConnectionRequest.java
@@ -16,7 +16,6 @@
package android.telecom;
-import android.annotation.TestApi;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcel;
@@ -144,6 +143,8 @@
private final boolean mShouldShowIncomingCallUi;
private final ParcelFileDescriptor mRttPipeToInCall;
private final ParcelFileDescriptor mRttPipeFromInCall;
+ // Cached return value of getRttTextStream -- we don't want to wrap it more than once.
+ private Connection.RttTextStream mRttTextStream;
/**
* @param accountHandle The accountHandle which should be used to place the call.
@@ -310,12 +311,13 @@
* send and receive RTT text to/from the in-call app.
* @return An instance of {@link android.telecom.Connection.RttTextStream}, or {@code null}
* if this connection request is not requesting an RTT session upon connection establishment.
- * @hide
*/
- @TestApi
public Connection.RttTextStream getRttTextStream() {
if (isRequestingRtt()) {
- return new Connection.RttTextStream(mRttPipeToInCall, mRttPipeFromInCall);
+ if (mRttTextStream == null) {
+ mRttTextStream = new Connection.RttTextStream(mRttPipeToInCall, mRttPipeFromInCall);
+ }
+ return mRttTextStream;
} else {
return null;
}
@@ -324,9 +326,7 @@
/**
* Convenience method for determining whether the ConnectionRequest is requesting an RTT session
* @return {@code true} if RTT is requested, {@code false} otherwise.
- * @hide
*/
- @TestApi
public boolean isRequestingRtt() {
return mRttPipeFromInCall != null && mRttPipeToInCall != null;
}
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index e37aeb4..4045eea 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -21,7 +21,6 @@
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
-import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
@@ -124,6 +123,7 @@
private static final String SESSION_ABORT = "CS.ab";
private static final String SESSION_ANSWER = "CS.an";
private static final String SESSION_ANSWER_VIDEO = "CS.anV";
+ private static final String SESSION_DEFLECT = "CS.def";
private static final String SESSION_REJECT = "CS.r";
private static final String SESSION_REJECT_MESSAGE = "CS.rWM";
private static final String SESSION_SILENCE = "CS.s";
@@ -140,8 +140,10 @@
private static final String SESSION_POST_DIAL_CONT = "CS.oPDC";
private static final String SESSION_PULL_EXTERNAL_CALL = "CS.pEC";
private static final String SESSION_SEND_CALL_EVENT = "CS.sCE";
+ private static final String SESSION_HANDOVER_COMPLETE = "CS.hC";
private static final String SESSION_EXTRAS_CHANGED = "CS.oEC";
private static final String SESSION_START_RTT = "CS.+RTT";
+ private static final String SESSION_UPDATE_RTT_PIPES = "CS.uRTT";
private static final String SESSION_STOP_RTT = "CS.-RTT";
private static final String SESSION_RTT_UPGRADE_RESPONSE = "CS.rTRUR";
private static final String SESSION_HANDOVER_FAILED = "CS.haF";
@@ -179,6 +181,8 @@
private static final int MSG_CONNECTION_SERVICE_FOCUS_LOST = 30;
private static final int MSG_CONNECTION_SERVICE_FOCUS_GAINED = 31;
private static final int MSG_HANDOVER_FAILED = 32;
+ private static final int MSG_HANDOVER_COMPLETE = 33;
+ private static final int MSG_DEFLECT = 34;
private static Connection sNullConnection;
@@ -298,6 +302,19 @@
}
@Override
+ public void handoverComplete(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_HANDOVER_COMPLETE);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_HANDOVER_COMPLETE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
+ }
+
+ @Override
public void abort(String callId, Session.Info sessionInfo) {
Log.startSession(sessionInfo, SESSION_ABORT);
try {
@@ -338,6 +355,20 @@
}
@Override
+ public void deflect(String callId, Uri address, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_DEFLECT);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = address;
+ args.arg3 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_DEFLECT, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
+ }
+
+ @Override
public void reject(String callId, Session.Info sessionInfo) {
Log.startSession(sessionInfo, SESSION_REJECT);
try {
@@ -832,6 +863,17 @@
}
break;
}
+ case MSG_DEFLECT: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg3, SESSION_HANDLER + SESSION_DEFLECT);
+ try {
+ deflect((String) args.arg1, (Uri) args.arg2);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
+ break;
+ }
case MSG_REJECT: {
SomeArgs args = (SomeArgs) msg.obj;
Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_REJECT);
@@ -1028,6 +1070,19 @@
}
break;
}
+ case MSG_HANDOVER_COMPLETE: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_HANDOVER_COMPLETE);
+ String callId = (String) args.arg1;
+ notifyHandoverComplete(callId);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
+ break;
+ }
case MSG_ON_EXTRAS_CHANGED: {
SomeArgs args = (SomeArgs) msg.obj;
try {
@@ -1445,19 +1500,24 @@
final ConnectionRequest request,
boolean isIncoming,
boolean isUnknown) {
+ boolean isLegacyHandover = request.getExtras() != null &&
+ request.getExtras().getBoolean(TelecomManager.EXTRA_IS_HANDOVER, false);
+ boolean isHandover = request.getExtras() != null && request.getExtras().getBoolean(
+ TelecomManager.EXTRA_IS_HANDOVER_CONNECTION, false);
Log.d(this, "createConnection, callManagerAccount: %s, callId: %s, request: %s, " +
- "isIncoming: %b, isUnknown: %b", callManagerAccount, callId, request,
- isIncoming,
- isUnknown);
+ "isIncoming: %b, isUnknown: %b, isLegacyHandover: %b, isHandover: %b",
+ callManagerAccount, callId, request, isIncoming, isUnknown, isLegacyHandover,
+ isHandover);
Connection connection = null;
- if (getApplicationContext().getApplicationInfo().targetSdkVersion >
- Build.VERSION_CODES.O_MR1 && request.getExtras() != null &&
- request.getExtras().getBoolean(TelecomManager.EXTRA_IS_HANDOVER,false)) {
+ if (isHandover) {
+ PhoneAccountHandle fromPhoneAccountHandle = request.getExtras() != null
+ ? (PhoneAccountHandle) request.getExtras().getParcelable(
+ TelecomManager.EXTRA_HANDOVER_FROM_PHONE_ACCOUNT) : null;
if (!isIncoming) {
- connection = onCreateOutgoingHandoverConnection(callManagerAccount, request);
+ connection = onCreateOutgoingHandoverConnection(fromPhoneAccountHandle, request);
} else {
- connection = onCreateIncomingHandoverConnection(callManagerAccount, request);
+ connection = onCreateIncomingHandoverConnection(fromPhoneAccountHandle, request);
}
} else {
connection = isUnknown ? onCreateUnknownConnection(callManagerAccount, request)
@@ -1471,6 +1531,14 @@
new DisconnectCause(DisconnectCause.ERROR, "IMPL_RETURNED_NULL_CONNECTION"));
}
+ boolean isSelfManaged =
+ (connection.getConnectionProperties() & Connection.PROPERTY_SELF_MANAGED)
+ == Connection.PROPERTY_SELF_MANAGED;
+ // Self-managed Connections should always use voip audio mode; we default here so that the
+ // local state within the ConnectionService matches the default we assume in Telecom.
+ if (isSelfManaged) {
+ connection.setAudioModeIsVoip(true);
+ }
connection.setTelecomCallId(callId);
if (connection.getState() != Connection.STATE_DISCONNECTED) {
addConnection(callId, connection);
@@ -1510,9 +1578,7 @@
createIdList(connection.getConferenceables()),
connection.getExtras()));
- if (isIncoming && request.shouldShowIncomingCallUi() &&
- (connection.getConnectionProperties() & Connection.PROPERTY_SELF_MANAGED) ==
- Connection.PROPERTY_SELF_MANAGED) {
+ if (isIncoming && request.shouldShowIncomingCallUi() && isSelfManaged) {
// Tell ConnectionService to show its incoming call UX.
connection.onShowIncomingCallUi();
}
@@ -1572,6 +1638,11 @@
findConnectionForAction(callId, "answer").onAnswer();
}
+ private void deflect(String callId, Uri address) {
+ Log.d(this, "deflect %s", callId);
+ findConnectionForAction(callId, "deflect").onDeflect(address);
+ }
+
private void reject(String callId) {
Log.d(this, "reject %s", callId);
findConnectionForAction(callId, "reject").onReject();
@@ -1754,6 +1825,19 @@
}
/**
+ * Notifies a {@link Connection} that a handover has completed.
+ *
+ * @param callId The ID of the call which completed handover.
+ */
+ private void notifyHandoverComplete(String callId) {
+ Log.d(this, "notifyHandoverComplete(%s)", callId);
+ Connection connection = findConnectionForAction(callId, "notifyHandoverComplete");
+ if (connection != null) {
+ connection.onHandoverComplete();
+ }
+ }
+
+ /**
* Notifies a {@link Connection} or {@link Conference} of a change to the extras from Telecom.
* <p>
* These extra changes can originate from Telecom itself, or from an {@link InCallService} via
@@ -1787,7 +1871,6 @@
Log.d(this, "stopRtt(%s)", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "stopRtt").onStopRtt();
- findConnectionForAction(callId, "stopRtt").unsetRttProperty();
} else if (mConferenceById.containsKey(callId)) {
Log.w(this, "stopRtt called on a conference.");
}
@@ -1929,7 +2012,7 @@
null : conference.getVideoProvider().getInterface(),
conference.getVideoState(),
conference.getConnectTimeMillis(),
- conference.getConnectElapsedTime(),
+ conference.getConnectionStartElapsedRealTime(),
conference.getStatusHints(),
conference.getExtras());
@@ -2141,12 +2224,50 @@
}
/**
- * Called by Telecom on the initiating side of the handover to create an instance of a
- * handover connection.
+ * Called by Telecom to request that a {@link ConnectionService} creates an instance of an
+ * outgoing handover {@link Connection}.
+ * <p>
+ * A call handover is the process where an ongoing call is transferred from one app (i.e.
+ * {@link ConnectionService} to another app. The user could, for example, choose to continue a
+ * mobile network call in a video calling app. The mobile network call via the Telephony stack
+ * is referred to as the source of the handover, and the video calling app is referred to as the
+ * destination.
+ * <p>
+ * When considering a handover scenario the <em>initiating</em> device is where a user initiated
+ * the handover process (e.g. by calling {@link android.telecom.Call#handoverTo(
+ * PhoneAccountHandle, int, Bundle)}, and the other device is considered the <em>receiving</em>
+ * device.
+ * <p>
+ * This method is called on the destination {@link ConnectionService} on <em>initiating</em>
+ * device when the user initiates a handover request from one app to another. The user request
+ * originates in the {@link InCallService} via
+ * {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle)}.
+ * <p>
+ * For a full discussion of the handover process and the APIs involved, see
+ * {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle)}.
+ * <p>
+ * Implementations of this method should return an instance of {@link Connection} which
+ * represents the handover. If your app does not wish to accept a handover to it at this time,
+ * you can return {@code null}. The code below shows an example of how this is done.
+ * <pre>
+ * {@code
+ * public Connection onCreateIncomingHandoverConnection(PhoneAccountHandle
+ * fromPhoneAccountHandle, ConnectionRequest request) {
+ * if (!isHandoverAvailable()) {
+ * return null;
+ * }
+ * MyConnection connection = new MyConnection();
+ * connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED);
+ * connection.setVideoState(request.getVideoState());
+ * return connection;
+ * }
+ * }
+ * </pre>
+ *
* @param fromPhoneAccountHandle {@link PhoneAccountHandle} associated with the
* ConnectionService which needs to handover the call.
- * @param request Details about the call which needs to be handover.
- * @return Connection object corresponding to the handover call.
+ * @param request Details about the call to handover.
+ * @return {@link Connection} instance corresponding to the handover call.
*/
public Connection onCreateOutgoingHandoverConnection(PhoneAccountHandle fromPhoneAccountHandle,
ConnectionRequest request) {
@@ -2154,12 +2275,46 @@
}
/**
- * Called by Telecom on the receiving side of the handover to request the
- * {@link ConnectionService} to create an instance of a handover connection.
+ * Called by Telecom to request that a {@link ConnectionService} creates an instance of an
+ * incoming handover {@link Connection}.
+ * <p>
+ * A call handover is the process where an ongoing call is transferred from one app (i.e.
+ * {@link ConnectionService} to another app. The user could, for example, choose to continue a
+ * mobile network call in a video calling app. The mobile network call via the Telephony stack
+ * is referred to as the source of the handover, and the video calling app is referred to as the
+ * destination.
+ * <p>
+ * When considering a handover scenario the <em>initiating</em> device is where a user initiated
+ * the handover process (e.g. by calling {@link android.telecom.Call#handoverTo(
+ * PhoneAccountHandle, int, Bundle)}, and the other device is considered the <em>receiving</em>
+ * device.
+ * <p>
+ * This method is called on the destination app on the <em>receiving</em> device when the
+ * destination app calls {@link TelecomManager#acceptHandover(Uri, int, PhoneAccountHandle)} to
+ * accept an incoming handover from the <em>initiating</em> device.
+ * <p>
+ * For a full discussion of the handover process and the APIs involved, see
+ * {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle)}.
+ * <p>
+ * Implementations of this method should return an instance of {@link Connection} which
+ * represents the handover. The code below shows an example of how this is done.
+ * <pre>
+ * {@code
+ * public Connection onCreateIncomingHandoverConnection(PhoneAccountHandle
+ * fromPhoneAccountHandle, ConnectionRequest request) {
+ * // Given that your app requested to accept the handover, you should not return null here.
+ * MyConnection connection = new MyConnection();
+ * connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED);
+ * connection.setVideoState(request.getVideoState());
+ * return connection;
+ * }
+ * }
+ * </pre>
+ *
* @param fromPhoneAccountHandle {@link PhoneAccountHandle} associated with the
* ConnectionService which needs to handover the call.
* @param request Details about the call which needs to be handover.
- * @return {@link Connection} object corresponding to the handover call.
+ * @return {@link Connection} instance corresponding to the handover call.
*/
public Connection onCreateIncomingHandoverConnection(PhoneAccountHandle fromPhoneAccountHandle,
ConnectionRequest request) {
@@ -2169,11 +2324,15 @@
/**
* Called by Telecom in response to a {@code TelecomManager#acceptHandover()}
* invocation which failed.
- * @param request Details about the call which needs to be handover.
- * @param error Reason for handover failure as defined in
- * {@link android.telecom.Call.Callback#HANDOVER_FAILURE_DEST_INVALID_PERM}
+ * <p>
+ * For a full discussion of the handover process and the APIs involved, see
+ * {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle)}
+ *
+ * @param request Details about the call which failed to handover.
+ * @param error Reason for handover failure. Will be one of the
*/
- public void onHandoverFailed(ConnectionRequest request, int error) {
+ public void onHandoverFailed(ConnectionRequest request,
+ @Call.Callback.HandoverFailureErrors int error) {
return;
}
diff --git a/telecomm/java/android/telecom/InCallAdapter.java b/telecomm/java/android/telecom/InCallAdapter.java
index 658685f..8678e33 100644
--- a/telecomm/java/android/telecom/InCallAdapter.java
+++ b/telecomm/java/android/telecom/InCallAdapter.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.net.Uri;
import android.bluetooth.BluetoothDevice;
import android.os.Bundle;
import android.os.RemoteException;
@@ -61,6 +62,19 @@
}
/**
+ * Instructs Telecom to deflect the specified call.
+ *
+ * @param callId The identifier of the call to deflect.
+ * @param address The address to deflect.
+ */
+ public void deflectCall(String callId, Uri address) {
+ try {
+ mAdapter.deflectCall(callId, address);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
* Instructs Telecom to reject the specified call.
*
* @param callId The identifier of the call to reject.
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index 74fa62d..bd25ab2 100644
--- a/telecomm/java/android/telecom/InCallService.java
+++ b/telecomm/java/android/telecom/InCallService.java
@@ -60,6 +60,26 @@
* </service>
* }
* </pre>
+ * <p>
+ * In addition to implementing the {@link InCallService} API, you must also declare an activity in
+ * your manifest which handles the {@link Intent#ACTION_DIAL} intent. The example below illustrates
+ * how this is done:
+ * <pre>
+ * {@code
+ * <activity android:name="your.package.YourDialerActivity"
+ * android:label="@string/yourDialerActivityLabel">
+ * <intent-filter>
+ * <action android:name="android.intent.action.DIAL" />
+ * <category android:name="android.intent.category.DEFAULT" />
+ * </intent-filter>
+ * </activity>
+ * }
+ * </pre>
+ * <p>
+ * When a user installs your application and runs it for the first time, you should prompt the user
+ * to see if they would like your application to be the new default phone app. See the
+ * {@link TelecomManager#ACTION_CHANGE_DEFAULT_DIALER} intent documentation for more information on
+ * how to do this.
*/
public abstract class InCallService extends Service {
@@ -81,6 +101,7 @@
private static final int MSG_ON_RTT_UPGRADE_REQUEST = 10;
private static final int MSG_ON_RTT_INITIATION_FAILURE = 11;
private static final int MSG_ON_HANDOVER_FAILED = 12;
+ private static final int MSG_ON_HANDOVER_COMPLETE = 13;
/** Default Handler used to consolidate binder method calls onto a single thread. */
private final Handler mHandler = new Handler(Looper.getMainLooper()) {
@@ -157,6 +178,11 @@
mPhone.internalOnHandoverFailed(callId, error);
break;
}
+ case MSG_ON_HANDOVER_COMPLETE: {
+ String callId = (String) msg.obj;
+ mPhone.internalOnHandoverComplete(callId);
+ break;
+ }
default:
break;
}
@@ -237,6 +263,11 @@
public void onHandoverFailed(String callId, int error) {
mHandler.obtainMessage(MSG_ON_HANDOVER_FAILED, error, 0, callId).sendToTarget();
}
+
+ @Override
+ public void onHandoverComplete(String callId) {
+ mHandler.obtainMessage(MSG_ON_HANDOVER_COMPLETE, callId).sendToTarget();
+ }
}
private Phone.Listener mPhoneListener = new Phone.Listener() {
@@ -397,12 +428,11 @@
* A list of available devices can be obtained via
* {@link CallAudioState#getSupportedBluetoothDevices()}
*
- * @param bluetoothAddress The address of the bluetooth device to connect to, as returned by
- * {@link BluetoothDevice#getAddress()}.
+ * @param bluetoothDevice The bluetooth device to connect to.
*/
- public final void requestBluetoothAudio(@NonNull String bluetoothAddress) {
+ public final void requestBluetoothAudio(@NonNull BluetoothDevice bluetoothDevice) {
if (mPhone != null) {
- mPhone.requestBluetoothAudio(bluetoothAddress);
+ mPhone.requestBluetoothAudio(bluetoothDevice.getAddress());
}
}
diff --git a/telecomm/java/android/telecom/Log.java b/telecomm/java/android/telecom/Log.java
index 83ca470..0eb9917 100644
--- a/telecomm/java/android/telecom/Log.java
+++ b/telecomm/java/android/telecom/Log.java
@@ -46,6 +46,11 @@
private static final int EVENTS_TO_CACHE = 10;
private static final int EVENTS_TO_CACHE_DEBUG = 20;
+ /**
+ * When generating a bug report, include the last X dialable digits when logging phone numbers.
+ */
+ private static final int NUM_DIALABLE_DIGITS_TO_LOG = Build.IS_USER ? 0 : 2;
+
// Generic tag for all Telecom logging
@VisibleForTesting
public static String TAG = "TelecomFramework";
@@ -384,9 +389,15 @@
String textToObfuscate = uri.getSchemeSpecificPart();
if (PhoneAccount.SCHEME_TEL.equals(scheme)) {
+ int numDigitsToObfuscate = getDialableCount(textToObfuscate)
+ - NUM_DIALABLE_DIGITS_TO_LOG;
for (int i = 0; i < textToObfuscate.length(); i++) {
char c = textToObfuscate.charAt(i);
- sb.append(PhoneNumberUtils.isDialable(c) ? "*" : c);
+ boolean isDialable = PhoneNumberUtils.isDialable(c);
+ if (isDialable) {
+ numDigitsToObfuscate--;
+ }
+ sb.append(isDialable && numDigitsToObfuscate >= 0 ? "*" : c);
}
} else if (PhoneAccount.SCHEME_SIP.equals(scheme)) {
for (int i = 0; i < textToObfuscate.length(); i++) {
@@ -405,6 +416,21 @@
}
/**
+ * Determines the number of dialable characters in a string.
+ * @param toCount The string to count dialable characters in.
+ * @return The count of dialable characters.
+ */
+ private static int getDialableCount(String toCount) {
+ int numDialable = 0;
+ for (char c : toCount.toCharArray()) {
+ if (PhoneNumberUtils.isDialable(c)) {
+ numDialable++;
+ }
+ }
+ return numDialable;
+ }
+
+ /**
* Redact personally identifiable information for production users.
* If we are running in verbose mode, return the original string,
* and return "***" otherwise.
diff --git a/telecomm/java/android/telecom/Logging/EventManager.java b/telecomm/java/android/telecom/Logging/EventManager.java
index 4fc3385..2bda648 100644
--- a/telecomm/java/android/telecom/Logging/EventManager.java
+++ b/telecomm/java/android/telecom/Logging/EventManager.java
@@ -24,21 +24,20 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.IndentingPrintWriter;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
-import java.util.Date;
import java.util.HashMap;
import java.util.IllegalFormatException;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.TimeZone;
import java.util.concurrent.LinkedBlockingQueue;
-import java.util.stream.Collectors;
/**
* A utility class that provides the ability to define Events that a subsystem deems important, and
@@ -53,7 +52,8 @@
public static final String TAG = "Logging.Events";
@VisibleForTesting
public static final int DEFAULT_EVENTS_TO_CACHE = 10; // Arbitrarily chosen.
- private final DateFormat sDateFormat = new SimpleDateFormat("HH:mm:ss.SSS");
+ public static final DateTimeFormatter DATE_TIME_FORMATTER =
+ DateTimeFormatter.ofPattern("HH:mm:ss.SSS");
public interface Loggable {
/**
@@ -131,11 +131,17 @@
public String sessionId;
public long time;
public Object data;
+ // String storing the date for display. This will be computed at the time/timezone when
+ // the event is recorded.
+ public final String timestampString;
public Event(String eventId, String sessionId, long time, Object data) {
this.eventId = eventId;
this.sessionId = sessionId;
this.time = time;
+ timestampString =
+ ZonedDateTime.ofInstant(Instant.ofEpochMilli(time), ZoneId.systemDefault())
+ .format(DATE_TIME_FORMATTER);
this.data = data;
}
}
@@ -228,7 +234,7 @@
pw.increaseIndent();
for (Event event : mEvents) {
- pw.print(sDateFormat.format(new Date(event.time)));
+ pw.print(event.timestampString);
pw.print(" - ");
pw.print(event.eventId);
if (event.data != null) {
@@ -269,7 +275,6 @@
public EventManager(@NonNull SessionManager.ISessionIdQueryHandler l) {
mSessionIdHandler = l;
- sDateFormat.setTimeZone(TimeZone.getDefault());
}
public void event(Loggable recordEntry, String event, Object data) {
@@ -329,15 +334,15 @@
}
}
- // Sort by event time.
- Comparator<Pair<Loggable, Event>> byEventTime = (e1, e2) -> {
- return Long.compare(e1.second.time, e2.second.time);
- };
+ // Sort by event time. This might result in out-of-order seeming events if the timezone
+ // changes somewhere in the middle.
+ Comparator<Pair<Loggable, Event>> byEventTime =
+ Comparator.comparingLong(e -> e.second.time);
events.sort(byEventTime);
pw.increaseIndent();
for (Pair<Loggable, Event> event : events) {
- pw.print(sDateFormat.format(new Date(event.second.time)));
+ pw.print(event.second.timestampString);
pw.print(",");
pw.print(event.first.getId());
pw.print(",");
diff --git a/telecomm/java/android/telecom/Phone.java b/telecomm/java/android/telecom/Phone.java
index b5394b9..99f94f2 100644
--- a/telecomm/java/android/telecom/Phone.java
+++ b/telecomm/java/android/telecom/Phone.java
@@ -230,6 +230,13 @@
}
}
+ final void internalOnHandoverComplete(String callId) {
+ Call call = mCallByTelecomCallId.get(callId);
+ if (call != null) {
+ call.internalOnHandoverComplete();
+ }
+ }
+
/**
* Called to destroy the phone and cleanup any lingering calls.
*/
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java
index fcfc593..95eb14a 100644
--- a/telecomm/java/android/telecom/PhoneAccount.java
+++ b/telecomm/java/android/telecom/PhoneAccount.java
@@ -134,6 +134,25 @@
"android.telecom.extra.LOG_SELF_MANAGED_CALLS";
/**
+ * Boolean {@link PhoneAccount} extras key (see {@link PhoneAccount#getExtras()}) which
+ * indicates whether calls for a {@link PhoneAccount} should generate a "call recording tone"
+ * when the user is recording audio on the device.
+ * <p>
+ * The call recording tone is played over the telephony audio stream so that the remote party
+ * has an audible indication that it is possible their call is being recorded using a call
+ * recording app on the device.
+ * <p>
+ * This extra only has an effect for calls placed via Telephony (e.g.
+ * {@link #CAPABILITY_SIM_SUBSCRIPTION}).
+ * <p>
+ * The call recording tone is a 1400 hz tone which repeats every 15 seconds while recording is
+ * in progress.
+ * @hide
+ */
+ public static final String EXTRA_PLAY_CALL_RECORDING_TONE =
+ "android.telecom.extra.PLAY_CALL_RECORDING_TONE";
+
+ /**
* Flag indicating that this {@code PhoneAccount} can act as a connection manager for
* other connections. The {@link ConnectionService} associated with this {@code PhoneAccount}
* will be allowed to manage phone calls including using its own proprietary phone-call
diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java
index 59ce590..bb4b483 100644
--- a/telecomm/java/android/telecom/RemoteConnectionService.java
+++ b/telecomm/java/android/telecom/RemoteConnectionService.java
@@ -93,6 +93,10 @@
// failure on the providing end, so immediately mark it destroyed
connection.setDestroyed();
}
+ connection.setStatusHints(parcel.getStatusHints());
+ connection.setIsVoipAudioMode(parcel.getIsVoipAudioMode());
+ connection.setRingbackRequested(parcel.isRingbackRequested());
+ connection.putExtras(parcel.getExtras());
}
}
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 96c6e0a..99d47aa 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -379,6 +379,17 @@
public static final String EXTRA_IS_HANDOVER = "android.telecom.extra.IS_HANDOVER";
/**
+ * When {@code true} indicates that a request to create a new connection is for the purpose of
+ * a handover. Note: This is used with the
+ * {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle)} API as part of the
+ * internal communication mechanism with the {@link android.telecom.ConnectionService}. It is
+ * not the same as the legacy {@link #EXTRA_IS_HANDOVER} extra.
+ * @hide
+ */
+ public static final String EXTRA_IS_HANDOVER_CONNECTION =
+ "android.telecom.extra.IS_HANDOVER_CONNECTION";
+
+ /**
* Parcelable extra used with {@link #EXTRA_IS_HANDOVER} to indicate the source
* {@link PhoneAccountHandle} when initiating a handover which {@link ConnectionService}
* the handover is from.
@@ -1246,7 +1257,7 @@
* @hide
*/
@SystemApi
- public int getCallState() {
+ public @TelephonyManager.CallState int getCallState() {
try {
if (isServiceConnected()) {
return getTelecomService().getCallState();
@@ -1280,17 +1291,22 @@
}
/**
- * Ends an ongoing call.
- * TODO: L-release - need to convert all invocations of ITelecomService#endCall to use this
- * method (clockwork & gearhead).
- * @hide
+ * Ends the foreground call on the device.
+ * <p>
+ * If there is a ringing call, calling this method rejects the ringing call. Otherwise the
+ * foreground call is ended.
+ * <p>
+ * Requires permission {@link android.Manifest.permission#ANSWER_PHONE_CALLS}.
+ *
+ * @return {@code true} if there is a call which will be rejected or terminated, {@code false}
+ * otherwise.
*/
+ @RequiresPermission(Manifest.permission.ANSWER_PHONE_CALLS)
@SystemApi
- @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public boolean endCall() {
try {
if (isServiceConnected()) {
- return getTelecomService().endCall();
+ return getTelecomService().endCall(mContext.getPackageName());
}
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelecomService#endCall", e);
@@ -1775,8 +1791,25 @@
}
/**
- * Called from the recipient side of a handover to indicate a desire to accept the handover
- * of an ongoing call to another {@link ConnectionService} identified by
+ * Called by an app to indicate that it wishes to accept the handover of an ongoing call to a
+ * {@link PhoneAccountHandle} it defines.
+ * <p>
+ * A call handover is the process where an ongoing call is transferred from one app (i.e.
+ * {@link ConnectionService} to another app. The user could, for example, choose to continue a
+ * mobile network call in a video calling app. The mobile network call via the Telephony stack
+ * is referred to as the source of the handover, and the video calling app is referred to as the
+ * destination.
+ * <p>
+ * When considering a handover scenario the <em>initiating</em> device is where a user initiated
+ * the handover process (e.g. by calling {@link android.telecom.Call#handoverTo(
+ * PhoneAccountHandle, int, Bundle)}, and the other device is considered the <em>receiving</em>
+ * device.
+ * <p>
+ * For a full discussion of the handover process and the APIs involved, see
+ * {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle)}.
+ * <p>
+ * This method is called from the <em>receiving</em> side of a handover to indicate a desire to
+ * accept the handover of an ongoing call to another {@link ConnectionService} identified by
* {@link PhoneAccountHandle} destAcct. For managed {@link ConnectionService}s, the specified
* {@link PhoneAccountHandle} must have been registered with {@link #registerPhoneAccount} and
* the user must have enabled the corresponding {@link PhoneAccount}. This can be checked using
@@ -1800,7 +1833,8 @@
* @param videoState Video state after the handover.
* @param destAcct The {@link PhoneAccountHandle} registered to the calling package.
*/
- public void acceptHandover(Uri srcAddr, int videoState, PhoneAccountHandle destAcct) {
+ public void acceptHandover(Uri srcAddr, @VideoProfile.VideoState int videoState,
+ PhoneAccountHandle destAcct) {
try {
if (isServiceConnected()) {
getTelecomService().acceptHandover(srcAddr, videoState, destAcct);
diff --git a/telecomm/java/android/telecom/VideoProfile.java b/telecomm/java/android/telecom/VideoProfile.java
index e0e3a08..90ed36f 100644
--- a/telecomm/java/android/telecom/VideoProfile.java
+++ b/telecomm/java/android/telecom/VideoProfile.java
@@ -62,6 +62,7 @@
@Retention(RetentionPolicy.SOURCE)
@IntDef(
flag = true,
+ prefix = { "STATE_" },
value = {STATE_AUDIO_ONLY, STATE_TX_ENABLED, STATE_RX_ENABLED, STATE_BIDIRECTIONAL,
STATE_PAUSED})
public @interface VideoState {}
diff --git a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
index 02e1ff8..04f057d 100644
--- a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
@@ -16,6 +16,7 @@
package com.android.internal.telecom;
+import android.net.Uri;
import android.os.Bundle;
import android.os.ParcelFileDescriptor;
import android.telecom.CallAudioState;
@@ -58,6 +59,8 @@
void answer(String callId, in Session.Info sessionInfo);
+ void deflect(String callId, in Uri address, in Session.Info sessionInfo);
+
void reject(String callId, in Session.Info sessionInfo);
void rejectWithMessage(String callId, String message, in Session.Info sessionInfo);
@@ -104,6 +107,8 @@
void handoverFailed(String callId, in ConnectionRequest request,
int error, in Session.Info sessionInfo);
+ void handoverComplete(String callId, in Session.Info sessionInfo);
+
void connectionServiceFocusLost(in Session.Info sessionInfo);
void connectionServiceFocusGained(in Session.Info sessionInfo);
diff --git a/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl b/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl
index 87ccd3e..57df5c1 100644
--- a/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl
@@ -16,6 +16,7 @@
package com.android.internal.telecom;
+import android.net.Uri;
import android.os.Bundle;
import android.telecom.PhoneAccountHandle;
@@ -29,6 +30,8 @@
oneway interface IInCallAdapter {
void answerCall(String callId, int videoState);
+ void deflectCall(String callId, in Uri address);
+
void rejectCall(String callId, boolean rejectWithMessage, String textMessage);
void disconnectCall(String callId);
diff --git a/telecomm/java/com/android/internal/telecom/IInCallService.aidl b/telecomm/java/com/android/internal/telecom/IInCallService.aidl
index 110109e..b9563fa 100644
--- a/telecomm/java/com/android/internal/telecom/IInCallService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IInCallService.aidl
@@ -56,4 +56,6 @@
void onRttInitiationFailure(String callId, int reason);
void onHandoverFailed(String callId, int error);
+
+ void onHandoverComplete(String callId);
}
diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
index 3460754f..b4e7d56 100644
--- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
+++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
@@ -187,7 +187,7 @@
/**
* @see TelecomServiceImpl#endCall
*/
- boolean endCall();
+ boolean endCall(String callingPackage);
/**
* @see TelecomServiceImpl#acceptRingingCall
diff --git a/telephony/OWNERS b/telephony/OWNERS
new file mode 100644
index 0000000..6f67bc2
--- /dev/null
+++ b/telephony/OWNERS
@@ -0,0 +1,14 @@
+set noparent
+
+tgunn@google.com
+breadley@google.com
+hallliu@google.com
+rgreenwalt@google.com
+mpq@google.com
+amitmahajan@google.com
+fionaxu@google.com
+jackyu@google.com
+jminjie@google.com
+satk@google.com
+shuoq@google.com
+refuhoo@google.com
diff --git a/telephony/java/android/telephony/AccessNetworkConstants.java b/telephony/java/android/telephony/AccessNetworkConstants.java
index 703f96d..cac9f2b 100644
--- a/telephony/java/android/telephony/AccessNetworkConstants.java
+++ b/telephony/java/android/telephony/AccessNetworkConstants.java
@@ -24,11 +24,15 @@
public final class AccessNetworkConstants {
public static final class AccessNetworkType {
+ public static final int UNKNOWN = 0;
public static final int GERAN = 1;
public static final int UTRAN = 2;
public static final int EUTRAN = 3;
public static final int CDMA2000 = 4;
public static final int IWLAN = 5;
+
+ /** @hide */
+ private AccessNetworkType() {};
}
/**
@@ -41,6 +45,9 @@
public static final int WWAN = 1;
/** Wireless Local Area Networks (i.e. Wifi) */
public static final int WLAN = 2;
+
+ /** @hide */
+ private TransportType() {};
}
/**
@@ -62,6 +69,9 @@
public static final int BAND_DCS1800 = 12;
public static final int BAND_PCS1900 = 13;
public static final int BAND_ER900 = 14;
+
+ /** @hide */
+ private GeranBand() {};
}
/**
@@ -91,6 +101,9 @@
/** band 23, 24 are reserved */
public static final int BAND_25 = 25;
public static final int BAND_26 = 26;
+
+ /** @hide */
+ private UtranBand() {};
}
/**
@@ -146,6 +159,9 @@
public static final int BAND_66 = 66;
public static final int BAND_68 = 68;
public static final int BAND_70 = 70;
+
+ /** @hide */
+ private EutranBand() {};
}
/**
@@ -178,5 +194,11 @@
public static final int BAND_19 = 20;
public static final int BAND_20 = 21;
public static final int BAND_21 = 22;
+
+ /** @hide */
+ private CdmaBands() {};
}
+
+ /** @hide */
+ private AccessNetworkConstants() {};
}
diff --git a/telephony/java/android/telephony/AccessNetworkUtils.java b/telephony/java/android/telephony/AccessNetworkUtils.java
new file mode 100644
index 0000000..5d2c225
--- /dev/null
+++ b/telephony/java/android/telephony/AccessNetworkUtils.java
@@ -0,0 +1,167 @@
+package android.telephony;
+
+import static android.telephony.ServiceState.DUPLEX_MODE_FDD;
+import static android.telephony.ServiceState.DUPLEX_MODE_TDD;
+import static android.telephony.ServiceState.DUPLEX_MODE_UNKNOWN;
+
+import android.telephony.AccessNetworkConstants.EutranBand;
+import android.telephony.ServiceState.DuplexMode;
+
+
+/**
+ * Utilities to map between radio constants.
+ *
+ * @hide
+ */
+public class AccessNetworkUtils {
+
+ // do not instantiate
+ private AccessNetworkUtils() {}
+
+ public static final int INVALID_BAND = -1;
+
+ /**
+ * Gets the duplex mode for the given EUTRAN operating band.
+ *
+ * <p>See 3GPP 36.101 sec 5.5-1 for calculation
+ *
+ * @param band The EUTRAN band number
+ * @return The duplex mode of the given EUTRAN band
+ */
+ @DuplexMode
+ public static int getDuplexModeForEutranBand(int band) {
+ if (band == INVALID_BAND) {
+ return DUPLEX_MODE_UNKNOWN;
+ }
+
+ if (band >= EutranBand.BAND_68) {
+ return DUPLEX_MODE_UNKNOWN;
+ } else if (band >= EutranBand.BAND_65) {
+ return DUPLEX_MODE_FDD;
+ } else if (band >= EutranBand.BAND_47) {
+ return DUPLEX_MODE_UNKNOWN;
+ } else if (band >= EutranBand.BAND_33) {
+ return DUPLEX_MODE_TDD;
+ } else if (band >= EutranBand.BAND_1) {
+ return DUPLEX_MODE_FDD;
+ }
+
+ return DUPLEX_MODE_UNKNOWN;
+ }
+
+ /**
+ * Gets the EUTRAN Operating band for a given downlink EARFCN.
+ *
+ * <p>See 3GPP 36.101 sec 5.7.3-1 for calculation.
+ *
+ * @param earfcn The downlink EARFCN
+ * @return Operating band number, or {@link #INVALID_BAND} if no corresponding band exists
+ */
+ public static int getOperatingBandForEarfcn(int earfcn) {
+ if (earfcn > 67535) {
+ return INVALID_BAND;
+ } else if (earfcn >= 67366) {
+ return INVALID_BAND; // band 67 only for CarrierAgg
+ } else if (earfcn >= 66436) {
+ return EutranBand.BAND_66;
+ } else if (earfcn >= 65536) {
+ return EutranBand.BAND_65;
+ } else if (earfcn > 54339) {
+ return INVALID_BAND;
+ } else if (earfcn >= 46790 /* inferred from the end range of BAND_45 */) {
+ return EutranBand.BAND_46;
+ } else if (earfcn >= 46590) {
+ return EutranBand.BAND_45;
+ } else if (earfcn >= 45590) {
+ return EutranBand.BAND_44;
+ } else if (earfcn >= 43590) {
+ return EutranBand.BAND_43;
+ } else if (earfcn >= 41590) {
+ return EutranBand.BAND_42;
+ } else if (earfcn >= 39650) {
+ return EutranBand.BAND_41;
+ } else if (earfcn >= 38650) {
+ return EutranBand.BAND_40;
+ } else if (earfcn >= 38250) {
+ return EutranBand.BAND_39;
+ } else if (earfcn >= 37750) {
+ return EutranBand.BAND_38;
+ } else if (earfcn >= 37550) {
+ return EutranBand.BAND_37;
+ } else if (earfcn >= 36950) {
+ return EutranBand.BAND_36;
+ } else if (earfcn >= 36350) {
+ return EutranBand.BAND_35;
+ } else if (earfcn >= 36200) {
+ return EutranBand.BAND_34;
+ } else if (earfcn >= 36000) {
+ return EutranBand.BAND_33;
+ } else if (earfcn > 10359) {
+ return INVALID_BAND;
+ } else if (earfcn >= 9920) {
+ return INVALID_BAND; // band 32 only for CarrierAgg
+ } else if (earfcn >= 9870) {
+ return EutranBand.BAND_31;
+ } else if (earfcn >= 9770) {
+ return EutranBand.BAND_30;
+ } else if (earfcn >= 9660) {
+ return INVALID_BAND; // band 29 only for CarrierAgg
+ } else if (earfcn >= 9210) {
+ return EutranBand.BAND_28;
+ } else if (earfcn >= 9040) {
+ return EutranBand.BAND_27;
+ } else if (earfcn >= 8690) {
+ return EutranBand.BAND_26;
+ } else if (earfcn >= 8040) {
+ return EutranBand.BAND_25;
+ } else if (earfcn >= 7700) {
+ return EutranBand.BAND_24;
+ } else if (earfcn >= 7500) {
+ return EutranBand.BAND_23;
+ } else if (earfcn >= 6600) {
+ return EutranBand.BAND_22;
+ } else if (earfcn >= 6450) {
+ return EutranBand.BAND_21;
+ } else if (earfcn >= 6150) {
+ return EutranBand.BAND_20;
+ } else if (earfcn >= 6000) {
+ return EutranBand.BAND_19;
+ } else if (earfcn >= 5850) {
+ return EutranBand.BAND_18;
+ } else if (earfcn >= 5730) {
+ return EutranBand.BAND_17;
+ } else if (earfcn > 5379) {
+ return INVALID_BAND;
+ } else if (earfcn >= 5280) {
+ return EutranBand.BAND_14;
+ } else if (earfcn >= 5180) {
+ return EutranBand.BAND_13;
+ } else if (earfcn >= 5010) {
+ return EutranBand.BAND_12;
+ } else if (earfcn >= 4750) {
+ return EutranBand.BAND_11;
+ } else if (earfcn >= 4150) {
+ return EutranBand.BAND_10;
+ } else if (earfcn >= 3800) {
+ return EutranBand.BAND_9;
+ } else if (earfcn >= 3450) {
+ return EutranBand.BAND_8;
+ } else if (earfcn >= 2750) {
+ return EutranBand.BAND_7;
+ } else if (earfcn >= 2650) {
+ return EutranBand.BAND_6;
+ } else if (earfcn >= 2400) {
+ return EutranBand.BAND_5;
+ } else if (earfcn >= 1950) {
+ return EutranBand.BAND_4;
+ } else if (earfcn >= 1200) {
+ return EutranBand.BAND_3;
+ } else if (earfcn >= 600) {
+ return EutranBand.BAND_2;
+ } else if (earfcn >= 0) {
+ return EutranBand.BAND_1;
+ }
+
+ return INVALID_BAND;
+ }
+}
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index f59871b..b672e69 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -27,8 +27,8 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.service.carrier.CarrierService;
+import android.telephony.ims.ImsReasonInfo;
-import com.android.ims.ImsReasonInfo;
import com.android.internal.telephony.ICarrierConfigLoader;
/**
@@ -39,13 +39,29 @@
private final static String TAG = "CarrierConfigManager";
/**
+ * Extra included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate the slot index that the
+ * broadcast is for.
+ */
+ public static final String EXTRA_SLOT_INDEX = "android.telephony.extra.SLOT_INDEX";
+
+ /**
+ * Optional extra included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate the
+ * subscription index that the broadcast is for, if a valid one is available.
+ */
+ public static final String EXTRA_SUBSCRIPTION_INDEX =
+ SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX;
+
+ /**
* @hide
*/
public CarrierConfigManager() {
}
/**
- * This intent is broadcast by the system when carrier config changes.
+ * This intent is broadcast by the system when carrier config changes. An int is specified in
+ * {@link #EXTRA_SLOT_INDEX} to indicate the slot index that this is for. An optional int extra
+ * {@link #EXTRA_SUBSCRIPTION_INDEX} is included to indicate the subscription index if a valid
+ * one is available for the slot index.
*/
public static final String
ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
@@ -61,6 +77,14 @@
public static final String
KEY_CARRIER_VOLTE_PROVISIONED_BOOL = "carrier_volte_provisioned_bool";
+ /**
+ * Boolean indicating if the "Call barring" item is visible in the Call Settings menu.
+ * true means visible. false means gone.
+ * @hide
+ */
+ public static final String KEY_CALL_BARRING_VISIBILITY_BOOL =
+ "call_barring_visibility_bool";
+
/**
* Flag indicating whether the Phone app should ignore EVENT_SIM_NETWORK_LOCKED
* events from the Sim.
@@ -130,6 +154,15 @@
public static final String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_bool";
/**
+ * Determines if the carrier requires that a tone be played to the remote party when an app is
+ * recording audio during a call (e.g. using a call recording app).
+ * <p>
+ * Note: This requires the Telephony config_supports_telephony_audio_device overlay to be true
+ * in order to work.
+ * @hide
+ */
+ public static final String KEY_PLAY_CALL_RECORDING_TONE_BOOL = "play_call_recording_tone_bool";
+ /**
* Determines if the carrier requires converting the destination number before sending out an
* SMS. Certain networks and numbering plans require different formats.
*/
@@ -475,6 +508,20 @@
public static final String KEY_CARRIER_VOLTE_OVERRIDE_WFC_PROVISIONING_BOOL
= "carrier_volte_override_wfc_provisioning_bool";
+ /**
+ * Override the device's configuration for the cellular data service to use for this SIM card.
+ * @hide
+ */
+ public static final String KEY_CARRIER_DATA_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING
+ = "carrier_data_service_wwan_package_override_string";
+
+ /**
+ * Override the device's configuration for the IWLAN data service to use for this SIM card.
+ * @hide
+ */
+ public static final String KEY_CARRIER_DATA_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING
+ = "carrier_data_service_wlan_package_override_string";
+
/** Flag specifying whether VoLTE TTY is supported. */
public static final String KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL
= "carrier_volte_tty_supported_bool";
@@ -944,8 +991,15 @@
"wfc_emergency_address_carrier_app_string";
/**
- * Boolean to decide whether to use #KEY_CARRIER_NAME_STRING from CarrierConfig app.
- * @hide
+ * Unconditionally override the carrier name string using #KEY_CARRIER_NAME_STRING.
+ *
+ * If true, then the carrier name string will be #KEY_CARRIER_NAME_STRING, unconditionally.
+ *
+ * <p>If false, then the override will be performed conditionally and the
+ * #KEY_CARRIER_NAME_STRING will have the lowest-precedence; it will only be used in the event
+ * that the name string would otherwise be empty, allowing it to serve as a last-resort. If
+ * used, this value functions in place of the SPN on any/all ICC records for the corresponding
+ * subscription.
*/
public static final String KEY_CARRIER_NAME_OVERRIDE_BOOL = "carrier_name_override_bool";
@@ -953,7 +1007,6 @@
* String to identify carrier name in CarrierConfig app. This string overrides SPN if
* #KEY_CARRIER_NAME_OVERRIDE_BOOL is true; otherwise, it will be used if its value is provided
* and SPN is unavailable
- * @hide
*/
public static final String KEY_CARRIER_NAME_STRING = "carrier_name_string";
@@ -1225,13 +1278,38 @@
/**
* The duration in seconds that platform call and message blocking is disabled after the user
- * contacts emergency services. Platform considers values in the range 0 to 604800 (one week) as
- * valid. See {@link android.provider.BlockedNumberContract#isBlocked(Context, String)}).
+ * contacts emergency services. Platform considers values for below cases:
+ * 1) 0 <= VALUE <= 604800(one week): the value will be used as the duration directly.
+ * 2) VALUE > 604800(one week): will use the default value as duration instead.
+ * 3) VALUE < 0: block will be disabled forever until user re-eanble block manually,
+ * the suggested value to disable forever is -1.
+ * See {@code android.provider.BlockedNumberContract#notifyEmergencyContact(Context)}
+ * See {@code android.provider.BlockedNumberContract#isBlocked(Context, String)}.
*/
public static final String KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT =
"duration_blocking_disabled_after_emergency_int";
/**
+ * Determines whether to enable enhanced call blocking feature on the device.
+ * @see SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNREGISTERED
+ * @see SystemContract#ENHANCED_SETTING_KEY_BLOCK_PRIVATE
+ * @see SystemContract#ENHANCED_SETTING_KEY_BLOCK_PAYPHONE
+ * @see SystemContract#ENHANCED_SETTING_KEY_BLOCK_UNKNOWN
+ *
+ * <p>
+ * 1. For Single SIM(SS) device, it can be customized in both carrier_config_mccmnc.xml
+ * and vendor.xml.
+ * <p>
+ * 2. For Dual SIM(DS) device, it should be customized in vendor.xml, since call blocking
+ * function is used regardless of SIM.
+ * <p>
+ * If {@code true} enable enhanced call blocking feature on the device, {@code false} otherwise.
+ * @hide
+ */
+ public static final String KEY_SUPPORT_ENHANCED_CALL_BLOCKING_BOOL =
+ "support_enhanced_call_blocking_bool";
+
+ /**
* For carriers which require an empty flash to be sent before sending the normal 3-way calling
* flash, the duration in milliseconds of the empty flash to send. When {@code 0}, no empty
* flash is sent.
@@ -1323,6 +1401,12 @@
*/
public static final String KEY_ALLOW_HOLD_IN_IMS_CALL_BOOL = "allow_hold_in_ims_call";
+ /**
+ * Flag indicating whether the carrier supports call deflection for an incoming IMS call.
+ * @hide
+ */
+ public static final String KEY_CARRIER_ALLOW_DEFLECT_IMS_CALL_BOOL =
+ "carrier_allow_deflect_ims_call_bool";
/**
* Flag indicating whether the carrier always wants to play an "on-hold" tone when a call has
@@ -1359,6 +1443,14 @@
public static final String KEY_VIDEO_CALLS_CAN_BE_HD_AUDIO = "video_calls_can_be_hd_audio";
/**
+ * When true, indicates that the HD audio icon in the in-call screen should be shown for
+ * GSM/CDMA calls.
+ * @hide
+ */
+ public static final String KEY_GSM_CDMA_CALLS_CAN_BE_HD_AUDIO =
+ "gsm_cdma_calls_can_be_hd_audio";
+
+ /**
* Whether system apps are allowed to use fallback if carrier video call is not available.
* Defaults to {@code true}.
*
@@ -1368,7 +1460,7 @@
"allow_video_calling_fallback_bool";
/**
- * Defines operator-specific {@link com.android.ims.ImsReasonInfo} mappings.
+ * Defines operator-specific {@link ImsReasonInfo} mappings.
*
* Format: "ORIGINAL_CODE|MESSAGE|NEW_CODE"
* Where {@code ORIGINAL_CODE} corresponds to a {@link ImsReasonInfo#getCode()} code,
@@ -1508,6 +1600,14 @@
"notify_international_call_on_wfc_bool";
/**
+ * Flag specifying whether to show an alert dialog for video call charges.
+ * By default this value is {@code false}.
+ * @hide
+ */
+ public static final String KEY_SHOW_VIDEO_CALL_CHARGES_ALERT_DIALOG_BOOL =
+ "show_video_call_charges_alert_dialog_bool";
+
+ /**
* An array containing custom call forwarding number prefixes that will be blocked while the
* device is reporting that it is roaming. By default, there are no custom call
* forwarding prefixes and none of these numbers will be filtered. If one or more entries are
@@ -1739,22 +1839,83 @@
public static final String KEY_CARRIER_CONFIG_APPLIED_BOOL = "carrier_config_applied_bool";
/**
- * List of thresholds of RSRP for determining the display level of LTE signal bar.
+ * A list of 4 LTE RSRP thresholds above which a signal level is considered POOR,
+ * MODERATE, GOOD, or EXCELLENT, to be used in SignalStrength reporting.
+ *
+ * Note that the min and max thresholds are fixed at -140 and -44, as explained in
+ * TS 36.133 9.1.4 - RSRP Measurement Report Mapping.
+ * <p>
+ * See SignalStrength#MAX_LTE_RSRP and SignalStrength#MIN_LTE_RSRP. Any signal level outside
+ * these boundaries is considered invalid.
* @hide
*/
public static final String KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY =
"lte_rsrp_thresholds_int_array";
+ /**
+ * Decides when clients try to bind to iwlan network service, which package name will
+ * the binding intent go to.
+ * @hide
+ */
+ public static final String KEY_CARRIER_NETWORK_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING
+ = "carrier_network_service_wlan_package_override_string";
+
+ /**
+ * Decides when clients try to bind to wwan (cellular) network service, which package name will
+ * the binding intent go to.
+ * @hide
+ */
+ public static final String KEY_CARRIER_NETWORK_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING
+ = "carrier_network_service_wwan_package_override_string";
+
+ /**
+ * A list of 4 LTE RSCP thresholds above which a signal level is considered POOR,
+ * MODERATE, GOOD, or EXCELLENT, to be used in SignalStrength reporting.
+ *
+ * Note that the min and max thresholds are fixed at -120 and -24, as set in 3GPP TS 27.007
+ * section 8.69.
+ * <p>
+ * See SignalStrength#MAX_WCDMA_RSCP and SignalStrength#MIN_WDCMA_RSCP. Any signal level outside
+ * these boundaries is considered invalid.
+ * @hide
+ */
+ public static final String KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY =
+ "wcdma_rscp_thresholds_int_array";
+
+ /**
+ * The default measurement to use for signal strength reporting. If this is not specified, the
+ * RSSI is used.
+ * <p>
+ * e.g.) To use RSCP by default, set the value to "rscp". The signal strength level will
+ * then be determined by #KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY
+ * <p>
+ * Currently this only supports the value "rscp"
+ * @hide
+ */
+ public static final String KEY_WCDMA_DEFAULT_SIGNAL_STRENGTH_MEASUREMENT_STRING =
+ "wcdma_default_signal_strength_measurement_string";
+
+ /**
+ * When a partial sms / mms message stay in raw table for too long without being completed,
+ * we expire them and delete them from the raw table. This carrier config defines the
+ * expiration time.
+ * @hide
+ */
+ public static final String KEY_UNDELIVERED_SMS_MESSAGE_EXPIRATION_TIME =
+ "undelivered_sms_message_expiration_time";
+
/** The default value for every variable. */
private final static PersistableBundle sDefaults;
static {
sDefaults = new PersistableBundle();
sDefaults.putBoolean(KEY_ALLOW_HOLD_IN_IMS_CALL_BOOL, true);
+ sDefaults.putBoolean(KEY_CARRIER_ALLOW_DEFLECT_IMS_CALL_BOOL, false);
sDefaults.putBoolean(KEY_ALWAYS_PLAY_REMOTE_HOLD_TONE_BOOL, false);
sDefaults.putBoolean(KEY_ADDITIONAL_CALL_SETTING_BOOL, true);
sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL, false);
sDefaults.putBoolean(KEY_ALLOW_LOCAL_DTMF_TONES_BOOL, true);
+ sDefaults.putBoolean(KEY_PLAY_CALL_RECORDING_TONE_BOOL, false);
sDefaults.putBoolean(KEY_APN_EXPAND_BOOL, true);
sDefaults.putBoolean(KEY_AUTO_RETRY_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_SETTINGS_ENABLE_BOOL, false);
@@ -1781,6 +1942,10 @@
sDefaults.putBoolean(KEY_CARRIER_IMS_GBA_REQUIRED_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_USE_IMS_FIRST_FOR_EMERGENCY_BOOL, true);
+ sDefaults.putString(KEY_CARRIER_DATA_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING, "");
+ sDefaults.putString(KEY_CARRIER_DATA_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING, "");
+ sDefaults.putString(KEY_CARRIER_NETWORK_SERVICE_WWAN_PACKAGE_OVERRIDE_STRING, "");
+ sDefaults.putString(KEY_CARRIER_NETWORK_SERVICE_WLAN_PACKAGE_OVERRIDE_STRING, "");
sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_INVALID_CHARS_STRING, "");
sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_ESCAPED_CHARS_STRING, "");
sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_ENCODING_STRING, "");
@@ -1794,6 +1959,7 @@
sDefaults.putBoolean(KEY_HIDE_SIM_LOCK_SETTINGS_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_VOLTE_PROVISIONED_BOOL, false);
+ sDefaults.putBoolean(KEY_CALL_BARRING_VISIBILITY_BOOL, false);
sDefaults.putBoolean(KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL, false);
sDefaults.putBoolean(KEY_MDN_IS_ADDITIONAL_VOICEMAIL_NUMBER_BOOL, false);
sDefaults.putBoolean(KEY_OPERATOR_SELECTION_EXPAND_BOOL, true);
@@ -1906,6 +2072,7 @@
sDefaults.putBoolean(KEY_SUPPORT_DIRECT_FDN_DIALING_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_DEFAULT_DATA_ROAMING_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_SKIP_CF_FAIL_TO_DISABLE_DIALOG_BOOL, false);
+ sDefaults.putBoolean(KEY_SUPPORT_ENHANCED_CALL_BLOCKING_BOOL, false);
// MMS defaults
sDefaults.putBoolean(KEY_MMS_ALIAS_ENABLED_BOOL, false);
@@ -1993,6 +2160,7 @@
sDefaults.putBoolean(KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL, true);
sDefaults.putBoolean(KEY_WIFI_CALLS_CAN_BE_HD_AUDIO, true);
sDefaults.putBoolean(KEY_VIDEO_CALLS_CAN_BE_HD_AUDIO, true);
+ sDefaults.putBoolean(KEY_GSM_CDMA_CALLS_CAN_BE_HD_AUDIO, false);
sDefaults.putBoolean(KEY_ALLOW_VIDEO_CALLING_FALLBACK_BOOL, true);
sDefaults.putStringArray(KEY_IMS_REASONINFO_MAPPING_STRING_ARRAY, null);
@@ -2010,6 +2178,7 @@
sDefaults.putBoolean(KEY_DISPLAY_VOICEMAIL_NUMBER_AS_DEFAULT_CALL_FORWARDING_NUMBER_BOOL,
false);
sDefaults.putBoolean(KEY_NOTIFY_INTERNATIONAL_CALL_ON_WFC_BOOL, false);
+ sDefaults.putBoolean(KEY_SHOW_VIDEO_CALL_CHARGES_ALERT_DIALOG_BOOL, false);
sDefaults.putStringArray(KEY_CALL_FORWARDING_BLOCKS_WHILE_ROAMING_STRING_ARRAY,
null);
sDefaults.putInt(KEY_LTE_EARFCNS_RSRP_BOOST_INT, 0);
@@ -2033,19 +2202,27 @@
sDefaults.putBoolean(KEY_CARRIER_CONFIG_APPLIED_BOOL, false);
sDefaults.putIntArray(KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY,
new int[] {
- -140, /* SIGNAL_STRENGTH_NONE_OR_UNKNOWN */
-128, /* SIGNAL_STRENGTH_POOR */
-118, /* SIGNAL_STRENGTH_MODERATE */
-108, /* SIGNAL_STRENGTH_GOOD */
-98, /* SIGNAL_STRENGTH_GREAT */
- -44
});
+ sDefaults.putIntArray(KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY,
+ new int[] {
+ -115, /* SIGNAL_STRENGTH_POOR */
+ -105, /* SIGNAL_STRENGTH_MODERATE */
+ -95, /* SIGNAL_STRENGTH_GOOD */
+ -85 /* SIGNAL_STRENGTH_GREAT */
+ });
+ sDefaults.putString(KEY_WCDMA_DEFAULT_SIGNAL_STRENGTH_MEASUREMENT_STRING, "");
}
/**
* Gets the configuration values for a particular subscription, which is associated with a
* specific SIM card. If an invalid subId is used, the returned config will contain default
- * values.
+ * values. After using this method to get the configuration bundle,
+ * {@link #isConfigForIdentifiedCarrier(PersistableBundle)} should be called to confirm whether
+ * any carrier specific configuration has been applied.
*
* <p>Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
@@ -2072,7 +2249,9 @@
}
/**
- * Gets the configuration values for the default subscription.
+ * Gets the configuration values for the default subscription. After using this method to get
+ * the configuration bundle, {@link #isConfigForIdentifiedCarrier(PersistableBundle)} should be
+ * called to confirm whether any carrier specific configuration has been applied.
*
* <p>Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
@@ -2101,6 +2280,9 @@
* <p>
* After using {@link #getConfig()} or {@link #getConfigForSubId(int)} an app should always
* use this method to confirm whether any carrier specific configuration has been applied.
+ * Especially when an app misses the broadcast {@link #ACTION_CARRIER_CONFIG_CHANGED} but it
+ * still needs to get the current configuration, it must use this method to verify whether the
+ * configuration is default or carrier overridden.
* </p>
*
* @param bundle the configuration bundle to be checked.
diff --git a/telephony/java/android/telephony/CellIdentity.java b/telephony/java/android/telephony/CellIdentity.java
index e092d52..890a6ea 100644
--- a/telephony/java/android/telephony/CellIdentity.java
+++ b/telephony/java/android/telephony/CellIdentity.java
@@ -18,11 +18,14 @@
import android.annotation.CallSuper;
import android.annotation.IntDef;
+import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcelable;
+import android.text.TextUtils;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.Objects;
/**
* CellIdentity represents the identity of a unique cell. This is the base class for
@@ -68,6 +71,9 @@
*/
public static final int TYPE_TDSCDMA = 5;
+ /** @hide */
+ public static final int INVALID_CHANNEL_NUMBER = -1;
+
// Log tag
/** @hide */
protected final String mTag;
@@ -81,8 +87,16 @@
/** @hide */
protected final String mMncStr;
+ // long alpha Operator Name String or Enhanced Operator Name String
/** @hide */
- protected CellIdentity(String tag, int type, String mcc, String mnc) {
+ protected final String mAlphaLong;
+ // short alpha Operator Name String or Enhanced Operator Name String
+ /** @hide */
+ protected final String mAlphaShort;
+
+ /** @hide */
+ protected CellIdentity(String tag, int type, String mcc, String mnc, String alphal,
+ String alphas) {
mTag = tag;
mType = type;
@@ -110,6 +124,8 @@
mMncStr = null;
log("invalid MNC format: " + mnc);
}
+ mAlphaLong = alphal;
+ mAlphaShort = alphas;
}
/** Implement the Parcelable interface */
@@ -125,6 +141,50 @@
public @Type int getType() { return mType; }
/**
+ * Returns the channel number of the cell identity.
+ *
+ * @hide
+ * @return The channel number, or {@link #INVALID_CHANNEL_NUMBER} if not implemented
+ */
+ public int getChannelNumber() {
+ return INVALID_CHANNEL_NUMBER;
+ }
+
+ /**
+ * @return The long alpha tag associated with the current scan result (may be the operator
+ * name string or extended operator name string). May be null if unknown.
+ */
+ @Nullable
+ public CharSequence getOperatorAlphaLong() {
+ return mAlphaLong;
+ }
+
+ /**
+ * @return The short alpha tag associated with the current scan result (may be the operator
+ * name string or extended operator name string). May be null if unknown.
+ */
+ @Nullable
+ public CharSequence getOperatorAlphaShort() {
+ return mAlphaShort;
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (!(other instanceof CellIdentity)) {
+ return false;
+ }
+
+ CellIdentity o = (CellIdentity) other;
+ return TextUtils.equals(mAlphaLong, o.mAlphaLong)
+ && TextUtils.equals(mAlphaShort, o.mAlphaShort);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mAlphaLong, mAlphaShort, mMccStr, mMncStr, mType);
+ }
+
+ /**
* Used by child classes for parceling.
*
* @hide
@@ -134,6 +194,8 @@
dest.writeInt(type);
dest.writeString(mMccStr);
dest.writeString(mMncStr);
+ dest.writeString(mAlphaLong);
+ dest.writeString(mAlphaShort);
}
/**
@@ -141,7 +203,8 @@
* @hide
*/
protected CellIdentity(String tag, int type, Parcel source) {
- this(tag, type, source.readString(), source.readString());
+ this(tag, type, source.readString(), source.readString(),
+ source.readString(), source.readString());
}
/** Implement the Parcelable interface */
diff --git a/telephony/java/android/telephony/CellIdentityCdma.java b/telephony/java/android/telephony/CellIdentityCdma.java
index 2e1d1dc..9a18c30 100644
--- a/telephony/java/android/telephony/CellIdentityCdma.java
+++ b/telephony/java/android/telephony/CellIdentityCdma.java
@@ -17,7 +17,6 @@
package android.telephony;
import android.os.Parcel;
-import android.text.TextUtils;
import java.util.Objects;
@@ -48,23 +47,17 @@
* to +90 degrees).
*/
private final int mLatitude;
- // long alpha Operator Name String or Enhanced Operator Name String
- private final String mAlphaLong;
- // short alpha Operator Name String or Enhanced Operator Name String
- private final String mAlphaShort;
/**
* @hide
*/
public CellIdentityCdma() {
- super(TAG, TYPE_CDMA, null, null);
+ super(TAG, TYPE_CDMA, null, null, null, null);
mNetworkId = Integer.MAX_VALUE;
mSystemId = Integer.MAX_VALUE;
mBasestationId = Integer.MAX_VALUE;
mLongitude = Integer.MAX_VALUE;
mLatitude = Integer.MAX_VALUE;
- mAlphaLong = null;
- mAlphaShort = null;
}
/**
@@ -99,14 +92,16 @@
*/
public CellIdentityCdma(int nid, int sid, int bid, int lon, int lat, String alphal,
String alphas) {
- super(TAG, TYPE_CDMA, null, null);
+ super(TAG, TYPE_CDMA, null, null, alphal, alphas);
mNetworkId = nid;
mSystemId = sid;
mBasestationId = bid;
- mLongitude = lon;
- mLatitude = lat;
- mAlphaLong = alphal;
- mAlphaShort = alphas;
+ if (!isNullIsland(lat, lon)) {
+ mLongitude = lon;
+ mLatitude = lat;
+ } else {
+ mLongitude = mLatitude = Integer.MAX_VALUE;
+ }
}
private CellIdentityCdma(CellIdentityCdma cid) {
@@ -119,6 +114,18 @@
}
/**
+ * Take the latitude and longitude in 1/4 seconds and see if
+ * the reported location is on Null Island.
+ *
+ * @return whether the reported Lat/Long are for Null Island
+ *
+ * @hide
+ */
+ private boolean isNullIsland(int lat, int lon) {
+ return Math.abs(lat) <= 1 && Math.abs(lon) <= 1;
+ }
+
+ /**
* @return Network Id 0..65535, Integer.MAX_VALUE if unknown
*/
public int getNetworkId() {
@@ -161,26 +168,10 @@
return mLatitude;
}
- /**
- * @return The long alpha tag associated with the current scan result (may be the operator
- * name string or extended operator name string). May be null if unknown.
- */
- public CharSequence getOperatorAlphaLong() {
- return mAlphaLong;
- }
-
- /**
- * @return The short alpha tag associated with the current scan result (may be the operator
- * name string or extended operator name string). May be null if unknown.
- */
- public CharSequence getOperatorAlphaShort() {
- return mAlphaShort;
- }
-
@Override
public int hashCode() {
return Objects.hash(mNetworkId, mSystemId, mBasestationId, mLatitude, mLongitude,
- mAlphaLong, mAlphaShort);
+ super.hashCode());
}
@Override
@@ -200,8 +191,7 @@
&& mBasestationId == o.mBasestationId
&& mLatitude == o.mLatitude
&& mLongitude == o.mLongitude
- && TextUtils.equals(mAlphaLong, o.mAlphaLong)
- && TextUtils.equals(mAlphaShort, o.mAlphaShort);
+ && super.equals(other);
}
@Override
@@ -227,8 +217,6 @@
dest.writeInt(mBasestationId);
dest.writeInt(mLongitude);
dest.writeInt(mLatitude);
- dest.writeString(mAlphaLong);
- dest.writeString(mAlphaShort);
}
/** Construct from Parcel, type has already been processed */
@@ -239,8 +227,6 @@
mBasestationId = in.readInt();
mLongitude = in.readInt();
mLatitude = in.readInt();
- mAlphaLong = in.readString();
- mAlphaShort = in.readString();
if (DBG) log(toString());
}
diff --git a/telephony/java/android/telephony/CellIdentityGsm.java b/telephony/java/android/telephony/CellIdentityGsm.java
index f948f81..b167850 100644
--- a/telephony/java/android/telephony/CellIdentityGsm.java
+++ b/telephony/java/android/telephony/CellIdentityGsm.java
@@ -36,22 +36,16 @@
private final int mArfcn;
// 6-bit Base Station Identity Code
private final int mBsic;
- // long alpha Operator Name String or Enhanced Operator Name String
- private final String mAlphaLong;
- // short alpha Operator Name String or Enhanced Operator Name String
- private final String mAlphaShort;
/**
* @hide
*/
public CellIdentityGsm() {
- super(TAG, TYPE_GSM, null, null);
+ super(TAG, TYPE_GSM, null, null, null, null);
mLac = Integer.MAX_VALUE;
mCid = Integer.MAX_VALUE;
mArfcn = Integer.MAX_VALUE;
mBsic = Integer.MAX_VALUE;
- mAlphaLong = null;
- mAlphaShort = null;
}
/**
* public constructor
@@ -97,16 +91,13 @@
*/
public CellIdentityGsm(int lac, int cid, int arfcn, int bsic, String mccStr,
String mncStr, String alphal, String alphas) {
- super(TAG, TYPE_GSM, mccStr, mncStr);
+ super(TAG, TYPE_GSM, mccStr, mncStr, alphal, alphas);
mLac = lac;
mCid = cid;
mArfcn = arfcn;
// In RIL BSIC is a UINT8, so 0xFF is the 'INVALID' designator
// for inbound parcels
mBsic = (bsic == 0xFF) ? Integer.MAX_VALUE : bsic;
-
- mAlphaLong = alphal;
- mAlphaShort = alphas;
}
private CellIdentityGsm(CellIdentityGsm cid) {
@@ -120,7 +111,7 @@
/**
* @return 3-digit Mobile Country Code, 0..999, Integer.MAX_VALUE if unknown
- * @deprecated Use {@link #getMccStr} instead.
+ * @deprecated Use {@link #getMccString} instead.
*/
@Deprecated
public int getMcc() {
@@ -129,7 +120,7 @@
/**
* @return 2 or 3-digit Mobile Network Code, 0..999, Integer.MAX_VALUE if unknown
- * @deprecated Use {@link #getMncStr} instead.
+ * @deprecated Use {@link #getMncString} instead.
*/
@Deprecated
public int getMnc() {
@@ -176,35 +167,24 @@
/**
* @return Mobile Country Code in string format, null if unknown
*/
- public String getMccStr() {
+ public String getMccString() {
return mMccStr;
}
/**
* @return Mobile Network Code in string format, null if unknown
*/
- public String getMncStr() {
+ public String getMncString() {
return mMncStr;
}
- /**
- * @return The long alpha tag associated with the current scan result (may be the operator
- * name string or extended operator name string). May be null if unknown.
- */
- public CharSequence getOperatorAlphaLong() {
- return mAlphaLong;
+ /** @hide */
+ @Override
+ public int getChannelNumber() {
+ return mArfcn;
}
/**
- * @return The short alpha tag associated with the current scan result (may be the operator
- * name string or extended operator name string). May be null if unknown.
- */
- public CharSequence getOperatorAlphaShort() {
- return mAlphaShort;
- }
-
-
- /**
* @deprecated Primary Scrambling Code is not applicable to GSM.
* @return Integer.MAX_VALUE, undefined for GSM
*/
@@ -215,7 +195,7 @@
@Override
public int hashCode() {
- return Objects.hash(mMccStr, mMncStr, mLac, mCid, mAlphaLong, mAlphaShort);
+ return Objects.hash(mLac, mCid, super.hashCode());
}
@Override
@@ -235,8 +215,7 @@
&& mBsic == o.mBsic
&& TextUtils.equals(mMccStr, o.mMccStr)
&& TextUtils.equals(mMncStr, o.mMncStr)
- && TextUtils.equals(mAlphaLong, o.mAlphaLong)
- && TextUtils.equals(mAlphaShort, o.mAlphaShort);
+ && super.equals(other);
}
@Override
@@ -262,8 +241,6 @@
dest.writeInt(mCid);
dest.writeInt(mArfcn);
dest.writeInt(mBsic);
- dest.writeString(mAlphaLong);
- dest.writeString(mAlphaShort);
}
/** Construct from Parcel, type has already been processed */
@@ -273,8 +250,6 @@
mCid = in.readInt();
mArfcn = in.readInt();
mBsic = in.readInt();
- mAlphaLong = in.readString();
- mAlphaShort = in.readString();
if (DBG) log(toString());
}
diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java
index 7f20c8a..d421cbd 100644
--- a/telephony/java/android/telephony/CellIdentityLte.java
+++ b/telephony/java/android/telephony/CellIdentityLte.java
@@ -36,22 +36,19 @@
private final int mTac;
// 18-bit Absolute RF Channel Number
private final int mEarfcn;
- // long alpha Operator Name String or Enhanced Operator Name String
- private final String mAlphaLong;
- // short alpha Operator Name String or Enhanced Operator Name String
- private final String mAlphaShort;
+ // cell bandwidth, in kHz
+ private final int mBandwidth;
/**
* @hide
*/
public CellIdentityLte() {
- super(TAG, TYPE_LTE, null, null);
+ super(TAG, TYPE_LTE, null, null, null, null);
mCi = Integer.MAX_VALUE;
mPci = Integer.MAX_VALUE;
mTac = Integer.MAX_VALUE;
mEarfcn = Integer.MAX_VALUE;
- mAlphaLong = null;
- mAlphaShort = null;
+ mBandwidth = Integer.MAX_VALUE;
}
/**
@@ -65,7 +62,8 @@
* @hide
*/
public CellIdentityLte(int mcc, int mnc, int ci, int pci, int tac) {
- this(ci, pci, tac, Integer.MAX_VALUE, String.valueOf(mcc), String.valueOf(mnc), null, null);
+ this(ci, pci, tac, Integer.MAX_VALUE, Integer.MAX_VALUE, String.valueOf(mcc),
+ String.valueOf(mnc), null, null);
}
/**
@@ -80,7 +78,8 @@
* @hide
*/
public CellIdentityLte(int mcc, int mnc, int ci, int pci, int tac, int earfcn) {
- this(ci, pci, tac, earfcn, String.valueOf(mcc), String.valueOf(mnc), null, null);
+ this(ci, pci, tac, earfcn, Integer.MAX_VALUE, String.valueOf(mcc), String.valueOf(mnc),
+ null, null);
}
/**
@@ -89,6 +88,7 @@
* @param pci Physical Cell Id 0..503
* @param tac 16-bit Tracking Area Code
* @param earfcn 18-bit LTE Absolute RF Channel Number
+ * @param bandwidth cell bandwidth in kHz
* @param mccStr 3-digit Mobile Country Code in string format
* @param mncStr 2 or 3-digit Mobile Network Code in string format
* @param alphal long alpha Operator Name String or Enhanced Operator Name String
@@ -96,19 +96,18 @@
*
* @hide
*/
- public CellIdentityLte(int ci, int pci, int tac, int earfcn, String mccStr,
- String mncStr, String alphal, String alphas) {
- super(TAG, TYPE_LTE, mccStr, mncStr);
+ public CellIdentityLte(int ci, int pci, int tac, int earfcn, int bandwidth, String mccStr,
+ String mncStr, String alphal, String alphas) {
+ super(TAG, TYPE_LTE, mccStr, mncStr, alphal, alphas);
mCi = ci;
mPci = pci;
mTac = tac;
mEarfcn = earfcn;
- mAlphaLong = alphal;
- mAlphaShort = alphas;
+ mBandwidth = bandwidth;
}
private CellIdentityLte(CellIdentityLte cid) {
- this(cid.mCi, cid.mPci, cid.mTac, cid.mEarfcn, cid.mMccStr,
+ this(cid.mCi, cid.mPci, cid.mTac, cid.mEarfcn, cid.mBandwidth, cid.mMccStr,
cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort);
}
@@ -118,7 +117,7 @@
/**
* @return 3-digit Mobile Country Code, 0..999, Integer.MAX_VALUE if unknown
- * @deprecated Use {@link #getMccStr} instead.
+ * @deprecated Use {@link #getMccString} instead.
*/
@Deprecated
public int getMcc() {
@@ -127,7 +126,7 @@
/**
* @return 2 or 3-digit Mobile Network Code, 0..999, Integer.MAX_VALUE if unknown
- * @deprecated Use {@link #getMncStr} instead.
+ * @deprecated Use {@link #getMncString} instead.
*/
@Deprecated
public int getMnc() {
@@ -163,16 +162,23 @@
}
/**
+ * @return Cell bandwidth in kHz, Integer.MAX_VALUE if unknown
+ */
+ public int getBandwidth() {
+ return mBandwidth;
+ }
+
+ /**
* @return Mobile Country Code in string format, null if unknown
*/
- public String getMccStr() {
+ public String getMccString() {
return mMccStr;
}
/**
* @return Mobile Network Code in string format, null if unknown
*/
- public String getMncStr() {
+ public String getMncString() {
return mMncStr;
}
@@ -183,25 +189,15 @@
return (mMccStr == null || mMncStr == null) ? null : mMccStr + mMncStr;
}
- /**
- * @return The long alpha tag associated with the current scan result (may be the operator
- * name string or extended operator name string). May be null if unknown.
- */
- public CharSequence getOperatorAlphaLong() {
- return mAlphaLong;
- }
-
- /**
- * @return The short alpha tag associated with the current scan result (may be the operator
- * name string or extended operator name string). May be null if unknown.
- */
- public CharSequence getOperatorAlphaShort() {
- return mAlphaShort;
+ /** @hide */
+ @Override
+ public int getChannelNumber() {
+ return mEarfcn;
}
@Override
public int hashCode() {
- return Objects.hash(mMccStr, mMncStr, mCi, mPci, mTac, mAlphaLong, mAlphaShort);
+ return Objects.hash(mCi, mPci, mTac, super.hashCode());
}
@Override
@@ -219,10 +215,10 @@
&& mPci == o.mPci
&& mTac == o.mTac
&& mEarfcn == o.mEarfcn
+ && mBandwidth == o.mBandwidth
&& TextUtils.equals(mMccStr, o.mMccStr)
&& TextUtils.equals(mMncStr, o.mMncStr)
- && TextUtils.equals(mAlphaLong, o.mAlphaLong)
- && TextUtils.equals(mAlphaShort, o.mAlphaShort);
+ && super.equals(other);
}
@Override
@@ -232,6 +228,7 @@
.append(" mPci=").append(mPci)
.append(" mTac=").append(mTac)
.append(" mEarfcn=").append(mEarfcn)
+ .append(" mBandwidth=").append(mBandwidth)
.append(" mMcc=").append(mMccStr)
.append(" mMnc=").append(mMncStr)
.append(" mAlphaLong=").append(mAlphaLong)
@@ -248,8 +245,7 @@
dest.writeInt(mPci);
dest.writeInt(mTac);
dest.writeInt(mEarfcn);
- dest.writeString(mAlphaLong);
- dest.writeString(mAlphaShort);
+ dest.writeInt(mBandwidth);
}
/** Construct from Parcel, type has already been processed */
@@ -259,8 +255,7 @@
mPci = in.readInt();
mTac = in.readInt();
mEarfcn = in.readInt();
- mAlphaLong = in.readString();
- mAlphaShort = in.readString();
+ mBandwidth = in.readInt();
if (DBG) log(toString());
}
diff --git a/telephony/java/android/telephony/CellIdentityTdscdma.java b/telephony/java/android/telephony/CellIdentityTdscdma.java
index 001d19f..3070bd1 100644
--- a/telephony/java/android/telephony/CellIdentityTdscdma.java
+++ b/telephony/java/android/telephony/CellIdentityTdscdma.java
@@ -39,7 +39,7 @@
* @hide
*/
public CellIdentityTdscdma() {
- super(TAG, TYPE_TDSCDMA, null, null);
+ super(TAG, TYPE_TDSCDMA, null, null, null, null);
mLac = Integer.MAX_VALUE;
mCid = Integer.MAX_VALUE;
mCpid = Integer.MAX_VALUE;
@@ -55,7 +55,7 @@
* @hide
*/
public CellIdentityTdscdma(int mcc, int mnc, int lac, int cid, int cpid) {
- this(String.valueOf(mcc), String.valueOf(mnc), lac, cid, cpid);
+ this(String.valueOf(mcc), String.valueOf(mnc), lac, cid, cpid, null, null);
}
/**
@@ -65,17 +65,38 @@
* @param cid 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown
* @param cpid 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown
*
+ * FIXME: This is a temporary constructor to facilitate migration.
* @hide
*/
public CellIdentityTdscdma(String mcc, String mnc, int lac, int cid, int cpid) {
- super(TAG, TYPE_TDSCDMA, mcc, mnc);
+ super(TAG, TYPE_TDSCDMA, mcc, mnc, null, null);
+ mLac = lac;
+ mCid = cid;
+ mCpid = cpid;
+ }
+
+ /**
+ * @param mcc 3-digit Mobile Country Code in string format
+ * @param mnc 2 or 3-digit Mobile Network Code in string format
+ * @param lac 16-bit Location Area Code, 0..65535, INT_MAX if unknown
+ * @param cid 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown
+ * @param cpid 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown
+ * @param alphal long alpha Operator Name String or Enhanced Operator Name String
+ * @param alphas short alpha Operator Name String or Enhanced Operator Name String
+ *
+ * @hide
+ */
+ public CellIdentityTdscdma(String mcc, String mnc, int lac, int cid, int cpid,
+ String alphal, String alphas) {
+ super(TAG, TYPE_TDSCDMA, mcc, mnc, alphal, alphas);
mLac = lac;
mCid = cid;
mCpid = cpid;
}
private CellIdentityTdscdma(CellIdentityTdscdma cid) {
- this(cid.mMccStr, cid.mMncStr, cid.mLac, cid.mCid, cid.mCpid);
+ this(cid.mMccStr, cid.mMncStr, cid.mLac, cid.mCid,
+ cid.mCpid, cid.mAlphaLong, cid.mAlphaShort);
}
CellIdentityTdscdma copy() {
@@ -86,7 +107,7 @@
* Get Mobile Country Code in string format
* @return Mobile Country Code in string format, null if unknown
*/
- public String getMccStr() {
+ public String getMccString() {
return mMccStr;
}
@@ -94,7 +115,7 @@
* Get Mobile Network Code in string format
* @return Mobile Network Code in string format, null if unknown
*/
- public String getMncStr() {
+ public String getMncString() {
return mMncStr;
}
@@ -121,7 +142,7 @@
@Override
public int hashCode() {
- return Objects.hash(mMccStr, mMncStr, mLac, mCid, mCpid);
+ return Objects.hash(mLac, mCid, mCpid, super.hashCode());
}
@Override
@@ -139,7 +160,8 @@
&& TextUtils.equals(mMncStr, o.mMncStr)
&& mLac == o.mLac
&& mCid == o.mCid
- && mCpid == o.mCpid;
+ && mCpid == o.mCpid
+ && super.equals(other);
}
@Override
@@ -150,6 +172,8 @@
.append(" mLac=").append(mLac)
.append(" mCid=").append(mCid)
.append(" mCpid=").append(mCpid)
+ .append(" mAlphaLong=").append(mAlphaLong)
+ .append(" mAlphaShort=").append(mAlphaShort)
.append("}").toString();
}
diff --git a/telephony/java/android/telephony/CellIdentityWcdma.java b/telephony/java/android/telephony/CellIdentityWcdma.java
index 1aa1715..f1167a6 100644
--- a/telephony/java/android/telephony/CellIdentityWcdma.java
+++ b/telephony/java/android/telephony/CellIdentityWcdma.java
@@ -36,22 +36,16 @@
private final int mPsc;
// 16-bit UMTS Absolute RF Channel Number
private final int mUarfcn;
- // long alpha Operator Name String or Enhanced Operator Name String
- private final String mAlphaLong;
- // short alpha Operator Name String or Enhanced Operator Name String
- private final String mAlphaShort;
/**
* @hide
*/
public CellIdentityWcdma() {
- super(TAG, TYPE_TDSCDMA, null, null);
+ super(TAG, TYPE_TDSCDMA, null, null, null, null);
mLac = Integer.MAX_VALUE;
mCid = Integer.MAX_VALUE;
mPsc = Integer.MAX_VALUE;
mUarfcn = Integer.MAX_VALUE;
- mAlphaLong = null;
- mAlphaShort = null;
}
/**
* public constructor
@@ -98,13 +92,11 @@
*/
public CellIdentityWcdma (int lac, int cid, int psc, int uarfcn,
String mccStr, String mncStr, String alphal, String alphas) {
- super(TAG, TYPE_WCDMA, mccStr, mncStr);
+ super(TAG, TYPE_WCDMA, mccStr, mncStr, alphal, alphas);
mLac = lac;
mCid = cid;
mPsc = psc;
mUarfcn = uarfcn;
- mAlphaLong = alphal;
- mAlphaShort = alphas;
}
private CellIdentityWcdma(CellIdentityWcdma cid) {
@@ -118,7 +110,7 @@
/**
* @return 3-digit Mobile Country Code, 0..999, Integer.MAX_VALUE if unknown
- * @deprecated Use {@link #getMccStr} instead.
+ * @deprecated Use {@link #getMccString} instead.
*/
@Deprecated
public int getMcc() {
@@ -127,7 +119,7 @@
/**
* @return 2 or 3-digit Mobile Network Code, 0..999, Integer.MAX_VALUE if unknown
- * @deprecated Use {@link #getMncStr} instead.
+ * @deprecated Use {@link #getMncString} instead.
*/
@Deprecated
public int getMnc() {
@@ -160,14 +152,14 @@
/**
* @return Mobile Country Code in string version, null if unknown
*/
- public String getMccStr() {
+ public String getMccString() {
return mMccStr;
}
/**
* @return Mobile Network Code in string version, null if unknown
*/
- public String getMncStr() {
+ public String getMncString() {
return mMncStr;
}
@@ -178,25 +170,9 @@
return (mMccStr == null || mMncStr == null) ? null : mMccStr + mMncStr;
}
- /**
- * @return The long alpha tag associated with the current scan result (may be the operator
- * name string or extended operator name string). May be null if unknown.
- */
- public CharSequence getOperatorAlphaLong() {
- return mAlphaLong;
- }
-
- /**
- * @return The short alpha tag associated with the current scan result (may be the operator
- * name string or extended operator name string). May be null if unknown.
- */
- public CharSequence getOperatorAlphaShort() {
- return mAlphaShort;
- }
-
@Override
public int hashCode() {
- return Objects.hash(mMccStr, mMncStr, mLac, mCid, mPsc, mAlphaLong, mAlphaShort);
+ return Objects.hash(mLac, mCid, mPsc, super.hashCode());
}
/**
@@ -206,6 +182,12 @@
return mUarfcn;
}
+ /** @hide */
+ @Override
+ public int getChannelNumber() {
+ return mUarfcn;
+ }
+
@Override
public boolean equals(Object other) {
if (this == other) {
@@ -223,8 +205,7 @@
&& mUarfcn == o.mUarfcn
&& TextUtils.equals(mMccStr, o.mMccStr)
&& TextUtils.equals(mMncStr, o.mMncStr)
- && TextUtils.equals(mAlphaLong, o.mAlphaLong)
- && TextUtils.equals(mAlphaShort, o.mAlphaShort);
+ && super.equals(other);
}
@Override
@@ -250,8 +231,6 @@
dest.writeInt(mCid);
dest.writeInt(mPsc);
dest.writeInt(mUarfcn);
- dest.writeString(mAlphaLong);
- dest.writeString(mAlphaShort);
}
/** Construct from Parcel, type has already been processed */
@@ -261,8 +240,6 @@
mCid = in.readInt();
mPsc = in.readInt();
mUarfcn = in.readInt();
- mAlphaLong = in.readString();
- mAlphaShort = in.readString();
if (DBG) log(toString());
}
@@ -286,4 +263,4 @@
protected static CellIdentityWcdma createFromParcelBody(Parcel in) {
return new CellIdentityWcdma(in);
}
-}
\ No newline at end of file
+}
diff --git a/telephony/java/android/telephony/CellInfo.java b/telephony/java/android/telephony/CellInfo.java
index b5e4eef..9232ed7 100644
--- a/telephony/java/android/telephony/CellInfo.java
+++ b/telephony/java/android/telephony/CellInfo.java
@@ -16,8 +16,11 @@
package android.telephony;
+import android.annotation.IntDef;
import android.os.Parcel;
import android.os.Parcelable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
/**
* Immutable cell information from a point in time.
@@ -47,6 +50,34 @@
/** @hide */
public static final int TIMESTAMP_TYPE_JAVA_RIL = 4;
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({
+ CONNECTION_NONE,
+ CONNECTION_PRIMARY_SERVING,
+ CONNECTION_SECONDARY_SERVING,
+ CONNECTION_UNKNOWN
+ })
+ public @interface CellConnectionStatus {}
+
+ /**
+ * Cell is not a serving cell.
+ *
+ * <p>The cell has been measured but is neither a camped nor serving cell (3GPP 36.304).
+ */
+ public static final int CONNECTION_NONE = 0;
+
+ /** UE is connected to cell for signalling and possibly data (3GPP 36.331, 25.331). */
+ public static final int CONNECTION_PRIMARY_SERVING = 1;
+
+ /** UE is connected to cell for data (3GPP 36.331, 25.331). */
+ public static final int CONNECTION_SECONDARY_SERVING = 2;
+
+ /** Connection status is unknown. */
+ public static final int CONNECTION_UNKNOWN = Integer.MAX_VALUE;
+
+ private int mCellConnectionStatus = CONNECTION_NONE;
+
// True if device is mRegistered to the mobile network
private boolean mRegistered;
@@ -69,6 +100,7 @@
this.mRegistered = ci.mRegistered;
this.mTimeStampType = ci.mTimeStampType;
this.mTimeStamp = ci.mTimeStamp;
+ this.mCellConnectionStatus = ci.mCellConnectionStatus;
}
/** True if this cell is registered to the mobile network */
@@ -90,6 +122,25 @@
}
/**
+ * Gets the connection status of this cell.
+ *
+ * @see #CONNECTION_NONE
+ * @see #CONNECTION_PRIMARY_SERVING
+ * @see #CONNECTION_SECONDARY_SERVING
+ * @see #CONNECTION_UNKNOWN
+ *
+ * @return The connection status of the cell.
+ */
+ @CellConnectionStatus
+ public int getCellConnectionStatus() {
+ return mCellConnectionStatus;
+ }
+ /** @hide */
+ public void setCellConnectionStatus(@CellConnectionStatus int cellConnectionStatus) {
+ mCellConnectionStatus = cellConnectionStatus;
+ }
+
+ /**
* Where time stamp gets recorded.
* @return one of TIMESTAMP_TYPE_XXXX
*
@@ -111,7 +162,7 @@
public int hashCode() {
int primeNum = 31;
return ((mRegistered ? 0 : 1) * primeNum) + ((int)(mTimeStamp / 1000) * primeNum)
- + (mTimeStampType * primeNum);
+ + (mTimeStampType * primeNum) + (mCellConnectionStatus * primeNum);
}
@Override
@@ -125,7 +176,9 @@
try {
CellInfo o = (CellInfo) other;
return mRegistered == o.mRegistered
- && mTimeStamp == o.mTimeStamp && mTimeStampType == o.mTimeStampType;
+ && mTimeStamp == o.mTimeStamp
+ && mTimeStampType == o.mTimeStampType
+ && mCellConnectionStatus == o.mCellConnectionStatus;
} catch (ClassCastException e) {
return false;
}
@@ -155,6 +208,7 @@
timeStampType = timeStampTypeToString(mTimeStampType);
sb.append(" mTimeStampType=").append(timeStampType);
sb.append(" mTimeStamp=").append(mTimeStamp).append("ns");
+ sb.append(" mCellConnectionStatus=").append(mCellConnectionStatus);
return sb.toString();
}
@@ -181,6 +235,7 @@
dest.writeInt(mRegistered ? 1 : 0);
dest.writeInt(mTimeStampType);
dest.writeLong(mTimeStamp);
+ dest.writeInt(mCellConnectionStatus);
}
/**
@@ -192,6 +247,7 @@
mRegistered = (in.readInt() == 1) ? true : false;
mTimeStampType = in.readInt();
mTimeStamp = in.readLong();
+ mCellConnectionStatus = in.readInt();
}
/** Implement the Parcelable interface */
diff --git a/telephony/java/android/telephony/CellSignalStrengthCdma.java b/telephony/java/android/telephony/CellSignalStrengthCdma.java
index 0474362..183f96d 100644
--- a/telephony/java/android/telephony/CellSignalStrengthCdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthCdma.java
@@ -20,6 +20,8 @@
import android.os.Parcelable;
import android.telephony.Rlog;
+import java.util.Objects;
+
/**
* Signal strength related information.
*/
@@ -34,58 +36,49 @@
private int mEvdoEcio; // This value is the EVDO Ec/Io
private int mEvdoSnr; // Valid values are 0-8. 8 is the highest signal to noise ratio
- /**
- * Empty constructor
- *
- * @hide
- */
+ /** @hide */
public CellSignalStrengthCdma() {
setDefaultValues();
}
/**
- * Constructor
+ * SignalStrength constructor for input from the HAL.
*
+ * Note that values received from the HAL require coersion to be compatible here. All values
+ * reported through IRadio are the negative of the actual values (which results in a positive
+ * input to this method.
+ *
+ * <p>Note that this HAL is inconsistent with UMTS-based radio techs as the value indicating
+ * that a field is unreported is negative, rather than a large(r) positive number.
+ * <p>Also note that to keep the public-facing methods of this class consistent with others,
+ * unreported values are coerced to Integer.MAX_VALUE rather than left as -1, which is
+ * a departure from SignalStrength, which is stuck with the values it currently reports.
+ *
+ * @param cdmaDbm negative of the CDMA signal strength value or -1 if invalid.
+ * @param cdmaEcio negative of the CDMA pilot/noise ratio or -1 if invalid.
+ * @param evdoDbm negative of the EvDO signal strength value or -1 if invalid.
+ * @param evdoEcio negative of the EvDO pilot/noise ratio or -1 if invalid.
+ * @param evdoSnr an SNR value 0..8 or -1 if invalid.
* @hide
*/
public CellSignalStrengthCdma(int cdmaDbm, int cdmaEcio, int evdoDbm, int evdoEcio,
int evdoSnr) {
- initialize(cdmaDbm, cdmaEcio, evdoDbm, evdoEcio, evdoSnr);
+ // The values here were lifted from SignalStrength.validateInput()
+ // FIXME: Combine all checking and setting logic between this and SignalStrength.
+ mCdmaDbm = ((cdmaDbm > 0) && (cdmaDbm < 120)) ? -cdmaDbm : Integer.MAX_VALUE;
+ mCdmaEcio = ((cdmaEcio > 0) && (cdmaEcio < 160)) ? -cdmaEcio : Integer.MAX_VALUE;
+
+ mEvdoDbm = ((evdoDbm > 0) && (evdoDbm < 120)) ? -evdoDbm : Integer.MAX_VALUE;
+ mEvdoEcio = ((evdoEcio > 0) && (evdoEcio < 160)) ? -evdoEcio : Integer.MAX_VALUE;
+ mEvdoSnr = ((evdoSnr > 0) && (evdoSnr <= 8)) ? evdoSnr : Integer.MAX_VALUE;
}
- /**
- * Copy constructors
- *
- * @param s Source SignalStrength
- *
- * @hide
- */
+ /** @hide */
public CellSignalStrengthCdma(CellSignalStrengthCdma s) {
copyFrom(s);
}
- /**
- * Initialize all the values
- *
- * @param cdmaDbm
- * @param cdmaEcio
- * @param evdoDbm
- * @param evdoEcio
- * @param evdoSnr
- *
- * @hide
- */
- public void initialize(int cdmaDbm, int cdmaEcio, int evdoDbm, int evdoEcio, int evdoSnr) {
- mCdmaDbm = cdmaDbm;
- mCdmaEcio = cdmaEcio;
- mEvdoDbm = evdoDbm;
- mEvdoEcio = evdoEcio;
- mEvdoSnr = evdoSnr;
- }
-
- /**
- * @hide
- */
+ /** @hide */
protected void copyFrom(CellSignalStrengthCdma s) {
mCdmaDbm = s.mCdmaDbm;
mCdmaEcio = s.mCdmaEcio;
@@ -94,9 +87,7 @@
mEvdoSnr = s.mEvdoSnr;
}
- /**
- * @hide
- */
+ /** @hide */
@Override
public CellSignalStrengthCdma copy() {
return new CellSignalStrengthCdma(this);
@@ -293,9 +284,7 @@
@Override
public int hashCode() {
- int primeNum = 31;
- return ((mCdmaDbm * primeNum) + (mCdmaEcio * primeNum)
- + (mEvdoDbm * primeNum) + (mEvdoEcio * primeNum) + (mEvdoSnr * primeNum));
+ return Objects.hash(mCdmaDbm, mCdmaEcio, mEvdoDbm, mEvdoEcio, mEvdoSnr);
}
@Override
@@ -336,13 +325,10 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
if (DBG) log("writeToParcel(Parcel, int): " + toString());
- // Need to multiply CdmaDbm, CdmaEcio, EvdoDbm and EvdoEcio by -1
- // to ensure consistency when reading values written here
- // unless the value is invalid
- dest.writeInt(mCdmaDbm * (mCdmaDbm != Integer.MAX_VALUE ? -1 : 1));
- dest.writeInt(mCdmaEcio * (mCdmaEcio != Integer.MAX_VALUE ? -1 : 1));
- dest.writeInt(mEvdoDbm * (mEvdoDbm != Integer.MAX_VALUE ? -1 : 1));
- dest.writeInt(mEvdoEcio * (mEvdoEcio != Integer.MAX_VALUE ? -1 : 1));
+ dest.writeInt(mCdmaDbm);
+ dest.writeInt(mCdmaEcio);
+ dest.writeInt(mEvdoDbm);
+ dest.writeInt(mEvdoEcio);
dest.writeInt(mEvdoSnr);
}
@@ -355,13 +341,9 @@
// the parcel as positive values.
// Need to convert into negative values unless the value is invalid
mCdmaDbm = in.readInt();
- if (mCdmaDbm != Integer.MAX_VALUE) mCdmaDbm *= -1;
mCdmaEcio = in.readInt();
- if (mCdmaEcio != Integer.MAX_VALUE) mCdmaEcio *= -1;
mEvdoDbm = in.readInt();
- if (mEvdoDbm != Integer.MAX_VALUE) mEvdoDbm *= -1;
mEvdoEcio = in.readInt();
- if (mEvdoEcio != Integer.MAX_VALUE) mEvdoEcio *= -1;
mEvdoSnr = in.readInt();
if (DBG) log("CellSignalStrengthCdma(Parcel): " + toString());
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthGsm.java b/telephony/java/android/telephony/CellSignalStrengthGsm.java
index 4137853..8687cd1 100644
--- a/telephony/java/android/telephony/CellSignalStrengthGsm.java
+++ b/telephony/java/android/telephony/CellSignalStrengthGsm.java
@@ -20,6 +20,8 @@
import android.os.Parcelable;
import android.telephony.Rlog;
+import java.util.Objects;
+
/**
* GSM signal strength related information.
*/
@@ -32,80 +34,40 @@
private static final int GSM_SIGNAL_STRENGTH_GOOD = 8;
private static final int GSM_SIGNAL_STRENGTH_MODERATE = 5;
- private int mSignalStrength; // Valid values are (0-31, 99) as defined in TS 27.007 8.5
+ private int mSignalStrength; // in ASU; Valid values are (0-31, 99) as defined in TS 27.007 8.5
private int mBitErrorRate; // bit error rate (0-7, 99) as defined in TS 27.007 8.5
- private int mTimingAdvance;
+ private int mTimingAdvance; // range from 0-219 or Integer.MAX_VALUE if unknown
- /**
- * Empty constructor
- *
- * @hide
- */
+ /** @hide */
public CellSignalStrengthGsm() {
setDefaultValues();
}
- /**
- * Constructor
- *
- * @hide
- */
+ /** @hide */
public CellSignalStrengthGsm(int ss, int ber) {
- initialize(ss, ber);
+ this(ss, ber, Integer.MAX_VALUE);
}
- /**
- * Copy constructors
- *
- * @param s Source SignalStrength
- *
- * @hide
- */
- public CellSignalStrengthGsm(CellSignalStrengthGsm s) {
- copyFrom(s);
- }
-
- /**
- * Initialize all the values
- *
- * @param ss SignalStrength as ASU value
- * @param ber is Bit Error Rate
- *
- * @hide
- */
- public void initialize(int ss, int ber) {
- mSignalStrength = ss;
- mBitErrorRate = ber;
- mTimingAdvance = Integer.MAX_VALUE;
- }
-
- /**
- * Initialize all the values
- *
- * @param ss SignalStrength as ASU value
- * @param ber is Bit Error Rate
- * @param ta timing advance
- *
- * @hide
- */
- public void initialize(int ss, int ber, int ta) {
+ /** @hide */
+ public CellSignalStrengthGsm(int ss, int ber, int ta) {
mSignalStrength = ss;
mBitErrorRate = ber;
mTimingAdvance = ta;
}
- /**
- * @hide
- */
+ /** @hide */
+ public CellSignalStrengthGsm(CellSignalStrengthGsm s) {
+ copyFrom(s);
+ }
+
+ /** @hide */
protected void copyFrom(CellSignalStrengthGsm s) {
mSignalStrength = s.mSignalStrength;
mBitErrorRate = s.mBitErrorRate;
mTimingAdvance = s.mTimingAdvance;
}
- /**
- * @hide
- */
+ /** @hide */
@Override
public CellSignalStrengthGsm copy() {
return new CellSignalStrengthGsm(this);
@@ -185,8 +147,7 @@
@Override
public int hashCode() {
- int primeNum = 31;
- return (mSignalStrength * primeNum) + (mBitErrorRate * primeNum);
+ return Objects.hash(mSignalStrength, mBitErrorRate, mTimingAdvance);
}
@Override
diff --git a/telephony/java/android/telephony/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java
index 0d07a40..7e86966 100644
--- a/telephony/java/android/telephony/CellSignalStrengthLte.java
+++ b/telephony/java/android/telephony/CellSignalStrengthLte.java
@@ -20,6 +20,8 @@
import android.os.Parcelable;
import android.telephony.Rlog;
+import java.util.Objects;
+
/**
* LTE signal strength related information.
*/
@@ -35,50 +37,15 @@
private int mCqi;
private int mTimingAdvance;
- /**
- * Empty constructor
- *
- * @hide
- */
+ /** @hide */
public CellSignalStrengthLte() {
setDefaultValues();
}
- /**
- * Constructor
- *
- * @hide
- */
+ /** @hide */
public CellSignalStrengthLte(int signalStrength, int rsrp, int rsrq, int rssnr, int cqi,
int timingAdvance) {
- initialize(signalStrength, rsrp, rsrq, rssnr, cqi, timingAdvance);
- }
-
- /**
- * Copy constructors
- *
- * @param s Source SignalStrength
- *
- * @hide
- */
- public CellSignalStrengthLte(CellSignalStrengthLte s) {
- copyFrom(s);
- }
-
- /**
- * Initialize all the values
- *
- * @param lteSignalStrength
- * @param rsrp
- * @param rsrq
- * @param rssnr
- * @param cqi
- *
- * @hide
- */
- public void initialize(int lteSignalStrength, int rsrp, int rsrq, int rssnr, int cqi,
- int timingAdvance) {
- mSignalStrength = lteSignalStrength;
+ mSignalStrength = signalStrength;
mRsrp = rsrp;
mRsrq = rsrq;
mRssnr = rssnr;
@@ -86,25 +53,12 @@
mTimingAdvance = timingAdvance;
}
- /**
- * Initialize from the SignalStrength structure.
- *
- * @param ss
- *
- * @hide
- */
- public void initialize(SignalStrength ss, int timingAdvance) {
- mSignalStrength = ss.getLteSignalStrength();
- mRsrp = ss.getLteRsrp();
- mRsrq = ss.getLteRsrq();
- mRssnr = ss.getLteRssnr();
- mCqi = ss.getLteCqi();
- mTimingAdvance = timingAdvance;
+ /** @hide */
+ public CellSignalStrengthLte(CellSignalStrengthLte s) {
+ copyFrom(s);
}
- /**
- * @hide
- */
+ /** @hide */
protected void copyFrom(CellSignalStrengthLte s) {
mSignalStrength = s.mSignalStrength;
mRsrp = s.mRsrp;
@@ -114,9 +68,7 @@
mTimingAdvance = s.mTimingAdvance;
}
- /**
- * @hide
- */
+ /** @hide */
@Override
public CellSignalStrengthLte copy() {
return new CellSignalStrengthLte(this);
@@ -220,7 +172,7 @@
}
/**
- * Get the timing advance value for LTE, as a value between 0..63.
+ * Get the timing advance value for LTE, as a value in range of 0..1282.
* Integer.MAX_VALUE is reported when there is no active RRC
* connection. Refer to 3GPP 36.213 Sec 4.2.3
* @return the LTE timing advance, if available.
@@ -231,10 +183,7 @@
@Override
public int hashCode() {
- int primeNum = 31;
- return (mSignalStrength * primeNum) + (mRsrp * primeNum)
- + (mRsrq * primeNum) + (mRssnr * primeNum) + (mCqi * primeNum)
- + (mTimingAdvance * primeNum);
+ return Objects.hash(mSignalStrength, mRsrp, mRsrq, mRssnr, mCqi, mTimingAdvance);
}
@Override
diff --git a/telephony/java/android/telephony/CellSignalStrengthWcdma.java b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
index b94b01d..dd32a96 100644
--- a/telephony/java/android/telephony/CellSignalStrengthWcdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
@@ -20,6 +20,8 @@
import android.os.Parcelable;
import android.telephony.Rlog;
+import java.util.Objects;
+
/**
* Wcdma signal strength related information.
*/
@@ -32,62 +34,32 @@
private static final int WCDMA_SIGNAL_STRENGTH_GOOD = 8;
private static final int WCDMA_SIGNAL_STRENGTH_MODERATE = 5;
- private int mSignalStrength; // Valid values are (0-31, 99) as defined in TS 27.007 8.5
- private int mBitErrorRate; // bit error rate (0-7, 99) as defined in TS 27.007 8.5
+ private int mSignalStrength; // in ASU; Valid values are (0-31, 99) as defined in TS 27.007 8.5
+ private int mBitErrorRate; // bit error rate (0-7, 99) as defined in TS 27.007 8.5
- /**
- * Empty constructor
- *
- * @hide
- */
+ /** @hide */
public CellSignalStrengthWcdma() {
setDefaultValues();
}
- /**
- * Constructor
- *
- * @hide
- */
+ /** @hide */
public CellSignalStrengthWcdma(int ss, int ber) {
- initialize(ss, ber);
- }
-
- /**
- * Copy constructors
- *
- * @param s Source SignalStrength
- *
- * @hide
- */
- public CellSignalStrengthWcdma(CellSignalStrengthWcdma s) {
- copyFrom(s);
- }
-
- /**
- * Initialize all the values
- *
- * @param ss SignalStrength as ASU value
- * @param ber is Bit Error Rate
- *
- * @hide
- */
- public void initialize(int ss, int ber) {
mSignalStrength = ss;
mBitErrorRate = ber;
}
- /**
- * @hide
- */
+ /** @hide */
+ public CellSignalStrengthWcdma(CellSignalStrengthWcdma s) {
+ copyFrom(s);
+ }
+
+ /** @hide */
protected void copyFrom(CellSignalStrengthWcdma s) {
mSignalStrength = s.mSignalStrength;
mBitErrorRate = s.mBitErrorRate;
}
- /**
- * @hide
- */
+ /** @hide */
@Override
public CellSignalStrengthWcdma copy() {
return new CellSignalStrengthWcdma(this);
@@ -156,8 +128,7 @@
@Override
public int hashCode() {
- int primeNum = 31;
- return (mSignalStrength * primeNum) + (mBitErrorRate * primeNum);
+ return Objects.hash(mSignalStrength, mBitErrorRate);
}
@Override
diff --git a/telephony/java/android/telephony/DataSpecificRegistrationStates.java b/telephony/java/android/telephony/DataSpecificRegistrationStates.java
new file mode 100644
index 0000000..97e3037
--- /dev/null
+++ b/telephony/java/android/telephony/DataSpecificRegistrationStates.java
@@ -0,0 +1,72 @@
+package android.telephony;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Objects;
+
+
+/**
+ * Class that stores information specific to data network registration.
+ * @hide
+ */
+public class DataSpecificRegistrationStates implements Parcelable{
+ /**
+ * The maximum number of simultaneous Data Calls that
+ * must be established using setupDataCall().
+ */
+ public final int maxDataCalls;
+
+ DataSpecificRegistrationStates(int maxDataCalls) {
+ this.maxDataCalls = maxDataCalls;
+ }
+
+ private DataSpecificRegistrationStates(Parcel source) {
+ maxDataCalls = source.readInt();
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(maxDataCalls);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public String toString() {
+ return "DataSpecificRegistrationStates {" + " mMaxDataCalls=" + maxDataCalls + "}";
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(maxDataCalls);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+
+ if (o == null || !(o instanceof DataSpecificRegistrationStates)) {
+ return false;
+ }
+
+ DataSpecificRegistrationStates other = (DataSpecificRegistrationStates) o;
+ return this.maxDataCalls == other.maxDataCalls;
+ }
+
+ public static final Parcelable.Creator<DataSpecificRegistrationStates> CREATOR =
+ new Parcelable.Creator<DataSpecificRegistrationStates>() {
+ @Override
+ public DataSpecificRegistrationStates createFromParcel(Parcel source) {
+ return new DataSpecificRegistrationStates(source);
+ }
+
+ @Override
+ public DataSpecificRegistrationStates[] newArray(int size) {
+ return new DataSpecificRegistrationStates[size];
+ }
+ };
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index 56e1e64..4fa304a 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -310,6 +310,13 @@
* {@hide}
*/
public static final int DIAL_VIDEO_MODIFIED_TO_DIAL_VIDEO = 70;
+
+ /**
+ * The network has reported that an alternative emergency number has been dialed, but the user
+ * must exit airplane mode to place the call.
+ */
+ public static final int IMS_SIP_ALTERNATE_EMERGENCY_CALL = 71;
+
//*********************************************************************************************
// When adding a disconnect type:
// 1) Update toString() with the newly added disconnect type.
@@ -462,6 +469,8 @@
return "EMERGENCY_PERM_FAILURE";
case NORMAL_UNSPECIFIED:
return "NORMAL_UNSPECIFIED";
+ case IMS_SIP_ALTERNATE_EMERGENCY_CALL:
+ return "IMS_SIP_ALTERNATE_EMERGENCY_CALL";
default:
return "INVALID: " + cause;
}
diff --git a/telephony/java/android/telephony/INetworkService.aidl b/telephony/java/android/telephony/INetworkService.aidl
new file mode 100644
index 0000000..9ef7186
--- /dev/null
+++ b/telephony/java/android/telephony/INetworkService.aidl
@@ -0,0 +1,31 @@
+/*
+ * Copyright 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.
+ */
+
+package android.telephony;
+
+import android.telephony.INetworkServiceCallback;
+
+/**
+ * {@hide}
+ */
+oneway interface INetworkService
+{
+ 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);
+}
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl b/telephony/java/android/telephony/INetworkServiceCallback.aidl
similarity index 62%
copy from telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl
copy to telephony/java/android/telephony/INetworkServiceCallback.aidl
index 01cca2db..520598f 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl
+++ b/telephony/java/android/telephony/INetworkServiceCallback.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 The Android Open Source Project
+ * Copyright 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.
@@ -14,14 +14,16 @@
* limitations under the License.
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony;
-import android.telephony.ims.internal.stub.ImsFeatureConfiguration;
+import android.telephony.NetworkRegistrationState;
/**
- * See ImsService#Listener for more information.
- * {@hide}
+ * Network service call back interface
+ * @hide
*/
-oneway interface IImsServiceControllerListener {
- void onUpdateSupportedImsFeatures(in ImsFeatureConfiguration c);
+oneway interface INetworkServiceCallback
+{
+ void onGetNetworkRegistrationStateComplete(int result, in NetworkRegistrationState state);
+ void onNetworkStateChanged();
}
diff --git a/telephony/java/android/telephony/LocationAccessPolicy.java b/telephony/java/android/telephony/LocationAccessPolicy.java
new file mode 100644
index 0000000..26ffe32
--- /dev/null
+++ b/telephony/java/android/telephony/LocationAccessPolicy.java
@@ -0,0 +1,130 @@
+/*
+ * 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
+ */
+
+package android.telephony;
+
+import android.Manifest;
+import android.annotation.NonNull;
+import android.annotation.UserIdInt;
+import android.app.ActivityManager;
+import android.app.AppOpsManager;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
+import android.content.pm.UserInfo;
+import android.location.LocationManager;
+import android.os.Binder;
+import android.os.Build;
+import android.os.Process;
+import android.os.Trace;
+import android.os.UserHandle;
+import android.os.UserManager;
+import android.provider.Settings;
+import android.util.SparseBooleanArray;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Helper for performing location access checks.
+ * @hide
+ */
+public final class LocationAccessPolicy {
+ /**
+ * API to determine if the caller has permissions to get cell location.
+ *
+ * @param pkgName Package name of the application requesting access
+ * @param uid The uid of the package
+ * @param pid The pid of the package
+ * @return boolean true or false if permissions is granted
+ */
+ public static boolean canAccessCellLocation(@NonNull Context context, @NonNull String pkgName,
+ int uid, int pid) throws SecurityException {
+ Trace.beginSection("TelephonyLocationCheck");
+ try {
+ // Always allow the phone process to access location. This avoid breaking legacy code
+ // that rely on public-facing APIs to access cell location, and it doesn't create a
+ // info leak risk because the cell location is stored in the phone process anyway.
+ if (uid == Process.PHONE_UID) {
+ return true;
+ }
+
+ // We always require the location permission and also require the
+ // location mode to be on for non-legacy apps. Legacy apps are
+ // required to be in the foreground to at least mitigate the case
+ // where a legacy app the user is not using tracks their location.
+ // Granting ACCESS_FINE_LOCATION to an app automatically grants it
+ // ACCESS_COARSE_LOCATION.
+
+ if (context.checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, pid, uid) ==
+ PackageManager.PERMISSION_DENIED) {
+ return false;
+ }
+ final int opCode = AppOpsManager.permissionToOpCode(
+ Manifest.permission.ACCESS_COARSE_LOCATION);
+ if (opCode != AppOpsManager.OP_NONE && context.getSystemService(AppOpsManager.class)
+ .noteOpNoThrow(opCode, uid, pkgName) != AppOpsManager.MODE_ALLOWED) {
+ return false;
+ }
+ if (!isLocationModeEnabled(context, UserHandle.getUserId(uid))) {
+ return false;
+ }
+ // If the user or profile is current, permission is granted.
+ // Otherwise, uid must have INTERACT_ACROSS_USERS_FULL permission.
+ return isCurrentProfile(context, uid) || checkInteractAcrossUsersFull(context);
+ } finally {
+ Trace.endSection();
+ }
+ }
+
+ private static boolean isLocationModeEnabled(@NonNull Context context, @UserIdInt int userId) {
+ int locationMode = Settings.Secure.getIntForUser(context.getContentResolver(),
+ Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF, userId);
+ return locationMode != Settings.Secure.LOCATION_MODE_OFF
+ && locationMode != Settings.Secure.LOCATION_MODE_SENSORS_ONLY;
+ }
+
+ private static boolean checkInteractAcrossUsersFull(@NonNull Context context) {
+ return context.checkCallingOrSelfPermission(
+ android.Manifest.permission.INTERACT_ACROSS_USERS_FULL)
+ == PackageManager.PERMISSION_GRANTED;
+ }
+
+ private static boolean isCurrentProfile(@NonNull Context context, int uid) {
+ long token = Binder.clearCallingIdentity();
+ try {
+ final int currentUser = ActivityManager.getCurrentUser();
+ final int callingUserId = UserHandle.getUserId(uid);
+ if (callingUserId == currentUser) {
+ return true;
+ } else {
+ List<UserInfo> userProfiles = context.getSystemService(
+ UserManager.class).getProfiles(currentUser);
+ for (UserInfo user : userProfiles) {
+ if (user.id == callingUserId) {
+ return true;
+ }
+ }
+ }
+ return false;
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+}
diff --git a/telephony/java/android/telephony/MbmsDownloadSession.java b/telephony/java/android/telephony/MbmsDownloadSession.java
index 059a2d0..af4d8d7 100644
--- a/telephony/java/android/telephony/MbmsDownloadSession.java
+++ b/telephony/java/android/telephony/MbmsDownloadSession.java
@@ -16,6 +16,8 @@
package android.telephony;
+import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
+
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -30,15 +32,16 @@
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
-import android.os.Looper;
import android.os.RemoteException;
-import android.telephony.mbms.DownloadStateCallback;
-import android.telephony.mbms.FileInfo;
+import android.telephony.mbms.DownloadProgressListener;
import android.telephony.mbms.DownloadRequest;
+import android.telephony.mbms.DownloadStatusListener;
+import android.telephony.mbms.FileInfo;
+import android.telephony.mbms.InternalDownloadProgressListener;
import android.telephony.mbms.InternalDownloadSessionCallback;
-import android.telephony.mbms.InternalDownloadStateCallback;
-import android.telephony.mbms.MbmsDownloadSessionCallback;
+import android.telephony.mbms.InternalDownloadStatusListener;
import android.telephony.mbms.MbmsDownloadReceiver;
+import android.telephony.mbms.MbmsDownloadSessionCallback;
import android.telephony.mbms.MbmsErrors;
import android.telephony.mbms.MbmsTempFileProvider;
import android.telephony.mbms.MbmsUtils;
@@ -53,11 +56,10 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
-import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
-
/**
* This class provides functionality for file download over MBMS.
*/
@@ -107,11 +109,8 @@
/**
* {@link Uri} extra that Android will attach to the intent supplied via
* {@link android.telephony.mbms.DownloadRequest.Builder#setAppIntent(Intent)}
- * Indicates the location of the successfully downloaded file within the temp file root set
- * via {@link #setTempFileRootDirectory(File)}.
- * While you may use this file in-place, it is highly encouraged that you move
- * this file to a different location after receiving the download completion intent, as this
- * file resides within the temp file directory.
+ * Indicates the location of the successfully downloaded file within the directory that the
+ * app provided via the builder.
*
* Will always be set to a non-null value if
* {@link #EXTRA_MBMS_DOWNLOAD_RESULT} is set to {@link #RESULT_SUCCESSFUL}.
@@ -134,6 +133,14 @@
*/
public static final String DEFAULT_TOP_LEVEL_TEMP_DIRECTORY = "androidMbmsTempFileRoot";
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(value = {RESULT_SUCCESSFUL, RESULT_CANCELLED, RESULT_EXPIRED, RESULT_IO_ERROR,
+ RESULT_SERVICE_ID_NOT_DEFINED, RESULT_DOWNLOAD_FAILURE, RESULT_OUT_OF_STORAGE,
+ RESULT_FILE_ROOT_UNREACHABLE}, prefix = { "RESULT_" })
+ public @interface DownloadResultCode{}
+
/**
* Indicates that the download was successful.
*/
@@ -200,26 +207,30 @@
public static final int STATUS_UNKNOWN = 0;
/**
- * Indicates that the file is actively downloading.
+ * Indicates that the file is actively being downloaded.
*/
public static final int STATUS_ACTIVELY_DOWNLOADING = 1;
/**
- * TODO: I don't know...
+ * Indicates that the file is awaiting the next download or repair operations. When a more
+ * precise status is known, the status will change to either {@link #STATUS_PENDING_REPAIR} or
+ * {@link #STATUS_PENDING_DOWNLOAD_WINDOW}.
*/
public static final int STATUS_PENDING_DOWNLOAD = 2;
/**
- * Indicates that the file is being repaired after the download being interrupted.
+ * Indicates that the file is awaiting file repair after the download has ended.
*/
public static final int STATUS_PENDING_REPAIR = 3;
/**
* Indicates that the file is waiting to download because its download window has not yet
- * started.
+ * started and is scheduled for a future time.
*/
public static final int STATUS_PENDING_DOWNLOAD_WINDOW = 4;
+ private static final String DESTINATION_SANITY_CHECK_FILE_NAME = "destinationSanityCheckFile";
+
private static AtomicBoolean sIsInitialized = new AtomicBoolean(false);
private final Context mContext;
@@ -233,26 +244,25 @@
private AtomicReference<IMbmsDownloadService> mService = new AtomicReference<>(null);
private final InternalDownloadSessionCallback mInternalCallback;
- private final Map<DownloadStateCallback, InternalDownloadStateCallback>
- mInternalDownloadCallbacks = new HashMap<>();
+ private final Map<DownloadStatusListener, InternalDownloadStatusListener>
+ mInternalDownloadStatusListeners = new HashMap<>();
+ private final Map<DownloadProgressListener, InternalDownloadProgressListener>
+ mInternalDownloadProgressListeners = new HashMap<>();
- private MbmsDownloadSession(Context context, MbmsDownloadSessionCallback callback,
- int subscriptionId, Handler handler) {
+ private MbmsDownloadSession(Context context, Executor executor, int subscriptionId,
+ MbmsDownloadSessionCallback callback) {
mContext = context;
mSubscriptionId = subscriptionId;
- if (handler == null) {
- handler = new Handler(Looper.getMainLooper());
- }
- mInternalCallback = new InternalDownloadSessionCallback(callback, handler);
+ mInternalCallback = new InternalDownloadSessionCallback(callback, executor);
}
/**
* Create a new {@link MbmsDownloadSession} using the system default data subscription ID.
- * See {@link #create(Context, MbmsDownloadSessionCallback, int, Handler)}
+ * See {@link #create(Context, Executor, int, MbmsDownloadSessionCallback)}
*/
public static MbmsDownloadSession create(@NonNull Context context,
- @NonNull MbmsDownloadSessionCallback callback, @NonNull Handler handler) {
- return create(context, callback, SubscriptionManager.getDefaultSubscriptionId(), handler);
+ @NonNull Executor executor, @NonNull MbmsDownloadSessionCallback callback) {
+ return create(context, executor, SubscriptionManager.getDefaultSubscriptionId(), callback);
}
/**
@@ -279,24 +289,24 @@
* {@link MbmsDownloadSession} that you received before calling this method again.
*
* @param context The instance of {@link Context} to use
- * @param callback A callback to get asynchronous error messages and file service updates.
+ * @param executor The executor on which you wish to execute callbacks.
* @param subscriptionId The data subscription ID to use
- * @param handler The {@link Handler} on which callbacks should be enqueued.
+ * @param callback A callback to get asynchronous error messages and file service updates.
* @return A new instance of {@link MbmsDownloadSession}, or null if an error occurred during
* setup.
*/
public static @Nullable MbmsDownloadSession create(@NonNull Context context,
- final @NonNull MbmsDownloadSessionCallback callback,
- int subscriptionId, @NonNull Handler handler) {
+ @NonNull Executor executor, int subscriptionId,
+ final @NonNull MbmsDownloadSessionCallback callback) {
if (!sIsInitialized.compareAndSet(false, true)) {
throw new IllegalStateException("Cannot have two active instances");
}
MbmsDownloadSession session =
- new MbmsDownloadSession(context, callback, subscriptionId, handler);
+ new MbmsDownloadSession(context, executor, subscriptionId, callback);
final int result = session.bindAndInitialize();
if (result != MbmsErrors.SUCCESS) {
sIsInitialized.set(false);
- handler.post(new Runnable() {
+ executor.execute(new Runnable() {
@Override
public void run() {
callback.onError(result, null);
@@ -329,6 +339,12 @@
sIsInitialized.set(false);
return;
}
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an"
+ + " unknown error code");
+ }
if (result != MbmsErrors.SUCCESS) {
sendErrorToApp(result, "Error returned during initialization");
sIsInitialized.set(false);
@@ -380,6 +396,11 @@
}
try {
int returnCode = downloadService.requestUpdateFileServices(mSubscriptionId, classList);
+ if (returnCode == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown error code");
+ }
if (returnCode != MbmsErrors.SUCCESS) {
sendErrorToApp(returnCode, null);
}
@@ -435,8 +456,14 @@
try {
int result = downloadService.setTempFileRootDirectory(mSubscriptionId, filePath);
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown error code");
+ }
if (result != MbmsErrors.SUCCESS) {
sendErrorToApp(result, null);
+ return;
}
} catch (RemoteException e) {
mService.set(null);
@@ -499,13 +526,19 @@
* {@link MbmsDownloadSession#DEFAULT_TOP_LEVEL_TEMP_DIRECTORY} and store that as the temp
* file root directory.
*
+ * If the {@link DownloadRequest} has a destination that is not on the same filesystem as the
+ * temp file directory provided via {@link #getTempFileRootDirectory()}, an
+ * {@link IllegalArgumentException} will be thrown.
+ *
* Asynchronous errors through the callback may include any error not specific to the
* streaming use-case.
+ *
+ * If no error is delivered via the callback after calling this method, that means that the
+ * middleware has successfully started the download or scheduled the download, if the download
+ * is at a future time.
* @param request The request that specifies what should be downloaded.
- * @return {@link MbmsErrors#SUCCESS} if the operation did not encounter a synchronous error,
- * and some other error code otherwise.
*/
- public int download(@NonNull DownloadRequest request) {
+ public void download(@NonNull DownloadRequest request) {
IMbmsDownloadService downloadService = mService.get();
if (downloadService == null) {
throw new IllegalStateException("Middleware not yet bound");
@@ -521,16 +554,25 @@
setTempFileRootDirectory(tempRootDirectory);
}
+ checkDownloadRequestDestination(request);
+
try {
int result = downloadService.download(request);
if (result == MbmsErrors.SUCCESS) {
writeDownloadRequestToken(request);
+ } else {
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown"
+ + " error code");
+ }
+ sendErrorToApp(result, null);
}
- return result;
} catch (RemoteException e) {
mService.set(null);
sIsInitialized.set(false);
- return MbmsErrors.ERROR_MIDDLEWARE_LOST;
+ sendErrorToApp(MbmsErrors.ERROR_MIDDLEWARE_LOST, null);
}
}
@@ -558,111 +600,238 @@
}
/**
- * Registers a callback for a {@link DownloadRequest} previously requested via
+ * Registers a listener download status for a {@link DownloadRequest} previously requested via
* {@link #download(DownloadRequest)}. This callback will only be called as long as both this
* app and the middleware are both running -- if either one stops, no further calls on the
- * provided {@link DownloadStateCallback} will be enqueued.
+ * provided {@link DownloadStatusListener} will be enqueued.
*
* If the middleware is not aware of the specified download request,
* this method will throw an {@link IllegalArgumentException}.
*
+ * If the operation encountered an error, the error code will be delivered via
+ * {@link MbmsDownloadSessionCallback#onError}.
+ *
+ * Repeated calls to this method for the same {@link DownloadRequest} will replace the
+ * previously registered listener.
+ *
* @param request The {@link DownloadRequest} that you want updates on.
- * @param callback The callback that should be called when the middleware has information to
- * share on the download.
- * @param handler The {@link Handler} on which calls to {@code callback} should be enqueued on.
- * @return {@link MbmsErrors#SUCCESS} if the operation did not encounter a synchronous error,
- * and some other error code otherwise.
+ * @param executor The {@link Executor} on which calls to {@code listener } should be executed.
+ * @param listener The listener that should be called when the middleware has information to
+ * share on the status download.
*/
- public int registerStateCallback(@NonNull DownloadRequest request,
- @NonNull DownloadStateCallback callback, @NonNull Handler handler) {
+ public void addStatusListener(@NonNull DownloadRequest request,
+ @NonNull Executor executor, @NonNull DownloadStatusListener listener) {
IMbmsDownloadService downloadService = mService.get();
if (downloadService == null) {
throw new IllegalStateException("Middleware not yet bound");
}
- InternalDownloadStateCallback internalCallback =
- new InternalDownloadStateCallback(callback, handler);
+ InternalDownloadStatusListener internalListener =
+ new InternalDownloadStatusListener(listener, executor);
try {
- int result = downloadService.registerStateCallback(request, internalCallback,
- callback.getCallbackFilterFlags());
+ int result = downloadService.addStatusListener(request, internalListener);
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown error code");
+ }
if (result != MbmsErrors.SUCCESS) {
if (result == MbmsErrors.DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST) {
throw new IllegalArgumentException("Unknown download request.");
}
- return result;
+ sendErrorToApp(result, null);
+ return;
}
} catch (RemoteException e) {
mService.set(null);
sIsInitialized.set(false);
- return MbmsErrors.ERROR_MIDDLEWARE_LOST;
+ sendErrorToApp(MbmsErrors.ERROR_MIDDLEWARE_LOST, null);
+ return;
}
- mInternalDownloadCallbacks.put(callback, internalCallback);
- return MbmsErrors.SUCCESS;
+ mInternalDownloadStatusListeners.put(listener, internalListener);
}
/**
- * Un-register a callback previously registered via
- * {@link #registerStateCallback(DownloadRequest, DownloadStateCallback, Handler)}. After
- * this method is called, no further callbacks will be enqueued on the {@link Handler}
+ * Un-register a listener previously registered via
+ * {@link #addStatusListener(DownloadRequest, Executor, DownloadStatusListener)}. After
+ * this method is called, no further calls will be enqueued on the {@link Executor}
* provided upon registration, even if this method throws an exception.
*
* If the middleware is not aware of the specified download request,
* this method will throw an {@link IllegalArgumentException}.
*
+ * If the operation encountered an error, the error code will be delivered via
+ * {@link MbmsDownloadSessionCallback#onError}.
+ *
+ * Repeated calls to this method for the same {@link DownloadRequest} will replace the
+ * previously registered listener.
+ *
* @param request The {@link DownloadRequest} provided during registration
- * @param callback The callback provided during registration.
- * @return {@link MbmsErrors#SUCCESS} if the operation did not encounter a synchronous error,
- * and some other error code otherwise.
+ * @param listener The listener provided during registration.
*/
- public int unregisterStateCallback(@NonNull DownloadRequest request,
- @NonNull DownloadStateCallback callback) {
+ public void removeStatusListener(@NonNull DownloadRequest request,
+ @NonNull DownloadStatusListener listener) {
try {
IMbmsDownloadService downloadService = mService.get();
if (downloadService == null) {
throw new IllegalStateException("Middleware not yet bound");
}
- InternalDownloadStateCallback internalCallback =
- mInternalDownloadCallbacks.get(callback);
- if (internalCallback == null) {
- throw new IllegalArgumentException("Provided callback was never registered");
+ InternalDownloadStatusListener internalListener =
+ mInternalDownloadStatusListeners.get(listener);
+ if (internalListener == null) {
+ throw new IllegalArgumentException("Provided listener was never registered");
}
try {
- int result = downloadService.unregisterStateCallback(request, internalCallback);
+ int result = downloadService.removeStatusListener(request, internalListener);
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an"
+ + " unknown error code");
+ }
if (result != MbmsErrors.SUCCESS) {
if (result == MbmsErrors.DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST) {
throw new IllegalArgumentException("Unknown download request.");
}
- return result;
+ sendErrorToApp(result, null);
+ return;
}
} catch (RemoteException e) {
mService.set(null);
sIsInitialized.set(false);
- return MbmsErrors.ERROR_MIDDLEWARE_LOST;
+ sendErrorToApp(MbmsErrors.ERROR_MIDDLEWARE_LOST, null);
+ return;
}
} finally {
- InternalDownloadStateCallback internalCallback =
- mInternalDownloadCallbacks.remove(callback);
+ InternalDownloadStatusListener internalCallback =
+ mInternalDownloadStatusListeners.remove(listener);
if (internalCallback != null) {
internalCallback.stop();
}
}
- return MbmsErrors.SUCCESS;
+ }
+
+ /**
+ * Registers a listener for progress for a {@link DownloadRequest} previously requested via
+ * {@link #download(DownloadRequest)}. This listener will only be called as long as both this
+ * app and the middleware are both running -- if either one stops, no further calls on the
+ * provided {@link DownloadProgressListener} will be enqueued.
+ *
+ * If the middleware is not aware of the specified download request,
+ * this method will throw an {@link IllegalArgumentException}.
+ *
+ * If the operation encountered an error, the error code will be delivered via
+ * {@link MbmsDownloadSessionCallback#onError}.
+ *
+ * @param request The {@link DownloadRequest} that you want updates on.
+ * @param executor The {@link Executor} on which calls to {@code listener} should be executed.
+ * @param listener The listener that should be called when the middleware has information to
+ * share on the progress of the download.
+ */
+ public void addProgressListener(@NonNull DownloadRequest request,
+ @NonNull Executor executor, @NonNull DownloadProgressListener listener) {
+ IMbmsDownloadService downloadService = mService.get();
+ if (downloadService == null) {
+ throw new IllegalStateException("Middleware not yet bound");
+ }
+
+ InternalDownloadProgressListener internalListener =
+ new InternalDownloadProgressListener(listener, executor);
+
+ try {
+ int result = downloadService.addProgressListener(request, internalListener);
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown error code");
+ }
+ if (result != MbmsErrors.SUCCESS) {
+ if (result == MbmsErrors.DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST) {
+ throw new IllegalArgumentException("Unknown download request.");
+ }
+ sendErrorToApp(result, null);
+ return;
+ }
+ } catch (RemoteException e) {
+ mService.set(null);
+ sIsInitialized.set(false);
+ sendErrorToApp(MbmsErrors.ERROR_MIDDLEWARE_LOST, null);
+ return;
+ }
+ mInternalDownloadProgressListeners.put(listener, internalListener);
+ }
+
+ /**
+ * Un-register a listener previously registered via
+ * {@link #addProgressListener(DownloadRequest, Executor, DownloadProgressListener)}. After
+ * this method is called, no further callbacks will be enqueued on the {@link Handler}
+ * provided upon registration, even if this method throws an exception.
+ *
+ * If the middleware is not aware of the specified download request,
+ * this method will throw an {@link IllegalArgumentException}.
+ *
+ * If the operation encountered an error, the error code will be delivered via
+ * {@link MbmsDownloadSessionCallback#onError}.
+ *
+ * @param request The {@link DownloadRequest} provided during registration
+ * @param listener The listener provided during registration.
+ */
+ public void removeProgressListener(@NonNull DownloadRequest request,
+ @NonNull DownloadProgressListener listener) {
+ try {
+ IMbmsDownloadService downloadService = mService.get();
+ if (downloadService == null) {
+ throw new IllegalStateException("Middleware not yet bound");
+ }
+
+ InternalDownloadProgressListener internalListener =
+ mInternalDownloadProgressListeners.get(listener);
+ if (internalListener == null) {
+ throw new IllegalArgumentException("Provided listener was never registered");
+ }
+
+ try {
+ int result = downloadService.removeProgressListener(request, internalListener);
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not"
+ + " return an unknown error code");
+ }
+ if (result != MbmsErrors.SUCCESS) {
+ if (result == MbmsErrors.DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST) {
+ throw new IllegalArgumentException("Unknown download request.");
+ }
+ sendErrorToApp(result, null);
+ return;
+ }
+ } catch (RemoteException e) {
+ mService.set(null);
+ sIsInitialized.set(false);
+ sendErrorToApp(MbmsErrors.ERROR_MIDDLEWARE_LOST, null);
+ return;
+ }
+ } finally {
+ InternalDownloadProgressListener internalCallback =
+ mInternalDownloadProgressListeners.remove(listener);
+ if (internalCallback != null) {
+ internalCallback.stop();
+ }
+ }
}
/**
* Attempts to cancel the specified {@link DownloadRequest}.
*
- * If the middleware is not aware of the specified download request,
- * this method will throw an {@link IllegalArgumentException}.
+ * If the operation encountered an error, the error code will be delivered via
+ * {@link MbmsDownloadSessionCallback#onError}.
*
* @param downloadRequest The download request that you wish to cancel.
- * @return {@link MbmsErrors#SUCCESS} if the operation did not encounter a synchronous error,
- * and some other error code otherwise.
*/
- public int cancelDownload(@NonNull DownloadRequest downloadRequest) {
+ public void cancelDownload(@NonNull DownloadRequest downloadRequest) {
IMbmsDownloadService downloadService = mService.get();
if (downloadService == null) {
throw new IllegalStateException("Middleware not yet bound");
@@ -670,46 +839,65 @@
try {
int result = downloadService.cancelDownload(downloadRequest);
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown error code");
+ }
if (result != MbmsErrors.SUCCESS) {
- if (result == MbmsErrors.DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST) {
- throw new IllegalArgumentException("Unknown download request.");
- }
+ sendErrorToApp(result, null);
} else {
deleteDownloadRequestToken(downloadRequest);
}
- return result;
} catch (RemoteException e) {
mService.set(null);
sIsInitialized.set(false);
- return MbmsErrors.ERROR_MIDDLEWARE_LOST;
+ sendErrorToApp(MbmsErrors.ERROR_MIDDLEWARE_LOST, null);
}
}
/**
- * Gets information about the status of a file pending download.
+ * Requests information about the state of a file pending download.
*
- * If there was a problem communicating with the middleware or if it has no records of the
+ * The state will be delivered as a callback via
+ * {@link DownloadStatusListener#onStatusUpdated(DownloadRequest, FileInfo, int)}. If no such
+ * callback has been registered via
+ * {@link #addProgressListener(DownloadRequest, Executor, DownloadProgressListener)}, this
+ * method will be a no-op.
+ *
+ * If the middleware has no record of the
* file indicated by {@code fileInfo} being associated with {@code downloadRequest},
- * {@link #STATUS_UNKNOWN} will be returned.
+ * an {@link IllegalArgumentException} will be thrown.
*
* @param downloadRequest The download request to query.
* @param fileInfo The particular file within the request to get information on.
- * @return The status of the download.
*/
- @DownloadStatus
- public int getDownloadStatus(DownloadRequest downloadRequest, FileInfo fileInfo) {
+ public void requestDownloadState(DownloadRequest downloadRequest, FileInfo fileInfo) {
IMbmsDownloadService downloadService = mService.get();
if (downloadService == null) {
throw new IllegalStateException("Middleware not yet bound");
}
try {
- return downloadService.getDownloadStatus(downloadRequest, fileInfo);
+ int result = downloadService.requestDownloadState(downloadRequest, fileInfo);
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown error code");
+ }
+ if (result != MbmsErrors.SUCCESS) {
+ if (result == MbmsErrors.DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST) {
+ throw new IllegalArgumentException("Unknown download request.");
+ }
+ if (result == MbmsErrors.DownloadErrors.ERROR_UNKNOWN_FILE_INFO) {
+ throw new IllegalArgumentException("Unknown file.");
+ }
+ sendErrorToApp(result, null);
+ }
} catch (RemoteException e) {
mService.set(null);
sIsInitialized.set(false);
sendErrorToApp(MbmsErrors.ERROR_MIDDLEWARE_LOST, null);
- return STATUS_UNKNOWN;
}
}
@@ -741,6 +929,11 @@
try {
int result = downloadService.resetDownloadKnowledge(downloadRequest);
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown error code");
+ }
if (result != MbmsErrors.SUCCESS) {
if (result == MbmsErrors.DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST) {
throw new IllegalArgumentException("Unknown download request.");
@@ -762,7 +955,7 @@
* instance of {@link MbmsDownloadSessionCallback}, but callbacks that have already been
* enqueued will still be delivered.
*
- * It is safe to call {@link #create(Context, MbmsDownloadSessionCallback, int, Handler)} to
+ * It is safe to call {@link #create(Context, Executor, int, MbmsDownloadSessionCallback)} to
* obtain another instance of {@link MbmsDownloadSession} immediately after this method
* returns.
*
@@ -799,11 +992,11 @@
try {
if (!token.createNewFile()) {
throw new RuntimeException("Failed to create download token for request "
- + request);
+ + request + ". Token location is " + token.getPath());
}
} catch (IOException e) {
throw new RuntimeException("Failed to create download token for request " + request
- + " due to IOException " + e);
+ + " due to IOException " + e + ". Attempted to write to " + token.getPath());
}
}
@@ -818,6 +1011,36 @@
}
}
+ private void checkDownloadRequestDestination(DownloadRequest request) {
+ File downloadRequestDestination = new File(request.getDestinationUri().getPath());
+ if (!downloadRequestDestination.isDirectory()) {
+ throw new IllegalArgumentException("The destination path must be a directory");
+ }
+ // Check if the request destination is okay to use by attempting to rename an empty
+ // file to there.
+ File testFile = new File(MbmsTempFileProvider.getEmbmsTempFileDir(mContext),
+ DESTINATION_SANITY_CHECK_FILE_NAME);
+ File testFileDestination = new File(downloadRequestDestination,
+ DESTINATION_SANITY_CHECK_FILE_NAME);
+
+ try {
+ if (!testFile.exists()) {
+ testFile.createNewFile();
+ }
+ if (!testFile.renameTo(testFileDestination)) {
+ throw new IllegalArgumentException("Destination provided in the download request " +
+ "is invalid -- files in the temp file directory cannot be directly moved " +
+ "there.");
+ }
+ } catch (IOException e) {
+ throw new IllegalStateException("Got IOException while testing out the destination: "
+ + e);
+ } finally {
+ testFile.delete();
+ testFileDestination.delete();
+ }
+ }
+
private File getDownloadRequestTokenPath(DownloadRequest request) {
File tempFileLocation = MbmsUtils.getEmbmsTempFileDirForService(mContext,
request.getFileServiceId());
@@ -827,10 +1050,6 @@
}
private void sendErrorToApp(int errorCode, String message) {
- try {
- mInternalCallback.onError(errorCode, message);
- } catch (RemoteException e) {
- // Ignore, should not happen locally.
- }
+ mInternalCallback.onError(errorCode, message);
}
}
diff --git a/telephony/java/android/telephony/MbmsStreamingSession.java b/telephony/java/android/telephony/MbmsStreamingSession.java
index fb2ff7b..cd465d2 100644
--- a/telephony/java/android/telephony/MbmsStreamingSession.java
+++ b/telephony/java/android/telephony/MbmsStreamingSession.java
@@ -16,6 +16,8 @@
package android.telephony;
+import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SdkConstant;
@@ -24,12 +26,10 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.ServiceConnection;
-import android.os.Handler;
import android.os.IBinder;
-import android.os.Looper;
import android.os.RemoteException;
-import android.telephony.mbms.InternalStreamingSessionCallback;
import android.telephony.mbms.InternalStreamingServiceCallback;
+import android.telephony.mbms.InternalStreamingSessionCallback;
import android.telephony.mbms.MbmsErrors;
import android.telephony.mbms.MbmsStreamingSessionCallback;
import android.telephony.mbms.MbmsUtils;
@@ -42,11 +42,10 @@
import java.util.List;
import java.util.Set;
+import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
-import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
-
/**
* This class provides functionality for streaming media over MBMS.
*/
@@ -89,14 +88,11 @@
private int mSubscriptionId = INVALID_SUBSCRIPTION_ID;
/** @hide */
- private MbmsStreamingSession(Context context, MbmsStreamingSessionCallback callback,
- int subscriptionId, Handler handler) {
+ private MbmsStreamingSession(Context context, Executor executor, int subscriptionId,
+ MbmsStreamingSessionCallback callback) {
mContext = context;
mSubscriptionId = subscriptionId;
- if (handler == null) {
- handler = new Handler(Looper.getMainLooper());
- }
- mInternalCallback = new InternalStreamingSessionCallback(callback, handler);
+ mInternalCallback = new InternalStreamingSessionCallback(callback, executor);
}
/**
@@ -117,25 +113,25 @@
* {@link MbmsStreamingSession} that you received before calling this method again.
*
* @param context The {@link Context} to use.
+ * @param executor The executor on which you wish to execute callbacks.
+ * @param subscriptionId The subscription ID to use.
* @param callback A callback object on which you wish to receive results of asynchronous
* operations.
- * @param subscriptionId The subscription ID to use.
- * @param handler The handler you wish to receive callbacks on.
* @return An instance of {@link MbmsStreamingSession}, or null if an error occurred.
*/
public static @Nullable MbmsStreamingSession create(@NonNull Context context,
- final @NonNull MbmsStreamingSessionCallback callback, int subscriptionId,
- @NonNull Handler handler) {
+ @NonNull Executor executor, int subscriptionId,
+ final @NonNull MbmsStreamingSessionCallback callback) {
if (!sIsInitialized.compareAndSet(false, true)) {
throw new IllegalStateException("Cannot create two instances of MbmsStreamingSession");
}
- MbmsStreamingSession session = new MbmsStreamingSession(context, callback,
- subscriptionId, handler);
+ MbmsStreamingSession session = new MbmsStreamingSession(context, executor,
+ subscriptionId, callback);
final int result = session.bindAndInitialize();
if (result != MbmsErrors.SUCCESS) {
sIsInitialized.set(false);
- handler.post(new Runnable() {
+ executor.execute(new Runnable() {
@Override
public void run() {
callback.onError(result, null);
@@ -148,22 +144,22 @@
/**
* Create a new {@link MbmsStreamingSession} using the system default data subscription ID.
- * See {@link #create(Context, MbmsStreamingSessionCallback, int, Handler)}.
+ * See {@link #create(Context, Executor, int, MbmsStreamingSessionCallback)}.
*/
public static MbmsStreamingSession create(@NonNull Context context,
- @NonNull MbmsStreamingSessionCallback callback, @NonNull Handler handler) {
- return create(context, callback, SubscriptionManager.getDefaultSubscriptionId(), handler);
+ @NonNull Executor executor, @NonNull MbmsStreamingSessionCallback callback) {
+ return create(context, executor, SubscriptionManager.getDefaultSubscriptionId(), callback);
}
/**
* Terminates this instance. Also terminates
* any streaming services spawned from this instance as if
- * {@link StreamingService#stopStreaming()} had been called on them. After this method returns,
+ * {@link StreamingService#close()} had been called on them. After this method returns,
* no further callbacks originating from the middleware will be enqueued on the provided
* instance of {@link MbmsStreamingSessionCallback}, but callbacks that have already been
* enqueued will still be delivered.
*
- * It is safe to call {@link #create(Context, MbmsStreamingSessionCallback, int, Handler)} to
+ * It is safe to call {@link #create(Context, Executor, int, MbmsStreamingSessionCallback)} to
* obtain another instance of {@link MbmsStreamingSession} immediately after this method
* returns.
*
@@ -212,6 +208,11 @@
try {
int returnCode = streamingService.requestUpdateStreamingServices(
mSubscriptionId, serviceClassList);
+ if (returnCode == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown error code");
+ }
if (returnCode != MbmsErrors.SUCCESS) {
sendErrorToApp(returnCode, null);
}
@@ -237,20 +238,20 @@
* {@link MbmsErrors.StreamingErrors}.
*
* @param serviceInfo The information about the service to stream.
+ * @param executor The executor on which you wish to execute callbacks for this stream.
* @param callback A callback that'll be called when something about the stream changes.
- * @param handler A handler that calls to {@code callback} should be called on.
* @return An instance of {@link StreamingService} through which the stream can be controlled.
* May be {@code null} if an error occurred.
*/
public @Nullable StreamingService startStreaming(StreamingServiceInfo serviceInfo,
- StreamingServiceCallback callback, @NonNull Handler handler) {
+ @NonNull Executor executor, StreamingServiceCallback callback) {
IMbmsStreamingService streamingService = mService.get();
if (streamingService == null) {
throw new IllegalStateException("Middleware not yet bound");
}
InternalStreamingServiceCallback serviceCallback = new InternalStreamingServiceCallback(
- callback, handler);
+ callback, executor);
StreamingService serviceForApp = new StreamingService(
mSubscriptionId, streamingService, this, serviceInfo, serviceCallback);
@@ -259,6 +260,11 @@
try {
int returnCode = streamingService.startStreaming(
mSubscriptionId, serviceInfo.getServiceId(), serviceCallback);
+ if (returnCode == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return an unknown error code");
+ }
if (returnCode != MbmsErrors.SUCCESS) {
sendErrorToApp(returnCode, null);
return null;
@@ -305,6 +311,12 @@
sIsInitialized.set(false);
return;
}
+ if (result == MbmsErrors.UNKNOWN) {
+ // Unbind and throw an obvious error
+ close();
+ throw new IllegalStateException("Middleware must not return"
+ + " an unknown error code");
+ }
if (result != MbmsErrors.SUCCESS) {
sendErrorToApp(result, "Error returned during initialization");
sIsInitialized.set(false);
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl b/telephony/java/android/telephony/NetworkRegistrationState.aidl
similarity index 82%
copy from telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
copy to telephony/java/android/telephony/NetworkRegistrationState.aidl
index d648a35..98cba77 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
+++ b/telephony/java/android/telephony/NetworkRegistrationState.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * Copyright 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.
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony;
-parcelable ImsStreamMediaProfile;
+parcelable NetworkRegistrationState;
diff --git a/telephony/java/android/telephony/NetworkRegistrationState.java b/telephony/java/android/telephony/NetworkRegistrationState.java
new file mode 100644
index 0000000..bba779d
--- /dev/null
+++ b/telephony/java/android/telephony/NetworkRegistrationState.java
@@ -0,0 +1,342 @@
+/*
+ * Copyright 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.
+ */
+
+package android.telephony;
+
+import android.annotation.IntDef;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Arrays;
+import java.util.Objects;
+
+/**
+ * Description of a mobile network registration state
+ * @hide
+ */
+@SystemApi
+public class NetworkRegistrationState implements Parcelable {
+ /**
+ * Network domain
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = "DOMAIN_", value = {DOMAIN_CS, DOMAIN_PS})
+ public @interface Domain {}
+
+ /** Circuit switching domain */
+ public static final int DOMAIN_CS = 1;
+ /** Packet switching domain */
+ public static final int DOMAIN_PS = 2;
+
+ /**
+ * 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 {}
+
+ /** 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;
+
+ /**
+ * Supported service type
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = "SERVICE_TYPE_",
+ value = {SERVICE_TYPE_VOICE, SERVICE_TYPE_DATA, SERVICE_TYPE_SMS, SERVICE_TYPE_VIDEO,
+ SERVICE_TYPE_EMERGENCY})
+ public @interface ServiceType {}
+
+ public static final int SERVICE_TYPE_VOICE = 1;
+ public static final int SERVICE_TYPE_DATA = 2;
+ public static final int SERVICE_TYPE_SMS = 3;
+ public static final int SERVICE_TYPE_VIDEO = 4;
+ public static final int SERVICE_TYPE_EMERGENCY = 5;
+
+ /** {@link AccessNetworkConstants.TransportType}*/
+ private final int mTransportType;
+
+ @Domain
+ private final int mDomain;
+
+ @RegState
+ private final int mRegState;
+
+ private final int mAccessNetworkTechnology;
+
+ private final int mReasonForDenial;
+
+ private final boolean mEmergencyOnly;
+
+ private final int[] mAvailableServices;
+
+ @Nullable
+ private final CellIdentity mCellIdentity;
+
+ @Nullable
+ private VoiceSpecificRegistrationStates mVoiceSpecificStates;
+
+ @Nullable
+ private DataSpecificRegistrationStates mDataSpecificStates;
+
+ /**
+ * @param transportType Transport type. Must be {@link AccessNetworkConstants.TransportType}
+ * @param domain Network domain. Must be DOMAIN_CS or DOMAIN_PS.
+ * @param regState Network registration state.
+ * @param accessNetworkTechnology See TelephonyManager NETWORK_TYPE_XXXX.
+ * @param reasonForDenial Reason for denial if the registration state is DENIED.
+ * @param availableServices The supported service.
+ * @param cellIdentity The identity representing a unique cell
+ */
+ public NetworkRegistrationState(int transportType, int domain, int regState,
+ int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
+ int[] availableServices, @Nullable CellIdentity cellIdentity) {
+ mTransportType = transportType;
+ mDomain = domain;
+ mRegState = regState;
+ mAccessNetworkTechnology = accessNetworkTechnology;
+ mReasonForDenial = reasonForDenial;
+ mAvailableServices = availableServices;
+ mCellIdentity = cellIdentity;
+ mEmergencyOnly = emergencyOnly;
+ }
+
+ /**
+ * Constructor for voice network registration states.
+ * @hide
+ */
+ public NetworkRegistrationState(int transportType, int domain, int regState,
+ int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
+ int[] availableServices, @Nullable CellIdentity cellIdentity, boolean cssSupported,
+ int roamingIndicator, int systemIsInPrl, int defaultRoamingIndicator) {
+ this(transportType, domain, regState, accessNetworkTechnology,
+ reasonForDenial, emergencyOnly, availableServices, cellIdentity);
+
+ mVoiceSpecificStates = new VoiceSpecificRegistrationStates(cssSupported, roamingIndicator,
+ systemIsInPrl, defaultRoamingIndicator);
+ }
+
+ /**
+ * Constructor for data network registration states.
+ * @hide
+ */
+ public NetworkRegistrationState(int transportType, int domain, int regState,
+ int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
+ int[] availableServices, @Nullable CellIdentity cellIdentity, int maxDataCalls) {
+ this(transportType, domain, regState, accessNetworkTechnology,
+ reasonForDenial, emergencyOnly, availableServices, cellIdentity);
+
+ mDataSpecificStates = new DataSpecificRegistrationStates(maxDataCalls);
+ }
+
+ protected NetworkRegistrationState(Parcel source) {
+ mTransportType = source.readInt();
+ mDomain = source.readInt();
+ mRegState = source.readInt();
+ mAccessNetworkTechnology = source.readInt();
+ mReasonForDenial = source.readInt();
+ mEmergencyOnly = source.readBoolean();
+ mAvailableServices = source.createIntArray();
+ mCellIdentity = source.readParcelable(CellIdentity.class.getClassLoader());
+ mVoiceSpecificStates = source.readParcelable(
+ VoiceSpecificRegistrationStates.class.getClassLoader());
+ mDataSpecificStates = source.readParcelable(
+ DataSpecificRegistrationStates.class.getClassLoader());
+ }
+
+ /**
+ * @return The transport type.
+ */
+ public int getTransportType() { return mTransportType; }
+
+ /**
+ * @return The network domain.
+ */
+ public @Domain int getDomain() { return mDomain; }
+
+ /**
+ * @return The registration state.
+ */
+ public @RegState int getRegState() {
+ return mRegState;
+ }
+
+ /**
+ * @return Whether emergency is enabled.
+ */
+ public boolean isEmergencyEnabled() { return mEmergencyOnly; }
+
+ /**
+ * @return List of available service types.
+ */
+ public int[] getAvailableServices() { return mAvailableServices; }
+
+ /**
+ * @return The access network technology. Must be one of TelephonyManager.NETWORK_TYPE_XXXX.
+ */
+ public int getAccessNetworkTechnology() {
+ return mAccessNetworkTechnology;
+ }
+
+ /**
+ * @return Reason for denial from network.
+ */
+ public int getReasonForDenial() {
+ return mReasonForDenial;
+ }
+
+ /**
+ * @return The cell information.
+ */
+ public CellIdentity getCellIdentity() {
+ return mCellIdentity;
+ }
+
+ /**
+ * @hide
+ */
+ @Nullable
+ public VoiceSpecificRegistrationStates getVoiceSpecificStates() {
+ return mVoiceSpecificStates;
+ }
+
+ /**
+ * @hide
+ */
+ @Nullable
+ public DataSpecificRegistrationStates getDataSpecificStates() {
+ return mDataSpecificStates;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ private static String regStateToString(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";
+ }
+ return "Unknown reg state " + regState;
+ }
+
+ @Override
+ public String toString() {
+ return new StringBuilder("NetworkRegistrationState{")
+ .append("transportType=").append(mTransportType)
+ .append(" domain=").append((mDomain == DOMAIN_CS) ? "CS" : "PS")
+ .append(" regState=").append(regStateToString(mRegState))
+ .append(" accessNetworkTechnology=")
+ .append(TelephonyManager.getNetworkTypeName(mAccessNetworkTechnology))
+ .append(" reasonForDenial=").append(mReasonForDenial)
+ .append(" emergencyEnabled=").append(mEmergencyOnly)
+ .append(" supportedServices=").append(mAvailableServices)
+ .append(" cellIdentity=").append(mCellIdentity)
+ .append(" voiceSpecificStates=").append(mVoiceSpecificStates)
+ .append(" dataSpecificStates=").append(mDataSpecificStates)
+ .append("}").toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mTransportType, mDomain, mRegState, mAccessNetworkTechnology,
+ mReasonForDenial, mEmergencyOnly, mAvailableServices, mCellIdentity,
+ mVoiceSpecificStates, mDataSpecificStates);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+
+ if (o == null || !(o instanceof NetworkRegistrationState)) {
+ return false;
+ }
+
+ NetworkRegistrationState other = (NetworkRegistrationState) o;
+ return mTransportType == other.mTransportType
+ && mDomain == other.mDomain
+ && mRegState == other.mRegState
+ && mAccessNetworkTechnology == other.mAccessNetworkTechnology
+ && mReasonForDenial == other.mReasonForDenial
+ && mEmergencyOnly == other.mEmergencyOnly
+ && (mAvailableServices == other.mAvailableServices
+ || Arrays.equals(mAvailableServices, other.mAvailableServices))
+ && equals(mCellIdentity, other.mCellIdentity)
+ && equals(mVoiceSpecificStates, other.mVoiceSpecificStates)
+ && equals(mDataSpecificStates, other.mDataSpecificStates);
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(mTransportType);
+ dest.writeInt(mDomain);
+ dest.writeInt(mRegState);
+ dest.writeInt(mAccessNetworkTechnology);
+ dest.writeInt(mReasonForDenial);
+ dest.writeBoolean(mEmergencyOnly);
+ dest.writeIntArray(mAvailableServices);
+ dest.writeParcelable(mCellIdentity, 0);
+ dest.writeParcelable(mVoiceSpecificStates, 0);
+ dest.writeParcelable(mDataSpecificStates, 0);
+ }
+
+ public static final Parcelable.Creator<NetworkRegistrationState> CREATOR =
+ new Parcelable.Creator<NetworkRegistrationState>() {
+ @Override
+ public NetworkRegistrationState createFromParcel(Parcel source) {
+ return new NetworkRegistrationState(source);
+ }
+
+ @Override
+ public NetworkRegistrationState[] newArray(int size) {
+ return new NetworkRegistrationState[size];
+ }
+ };
+
+ private static boolean equals(Object o1, Object o2) {
+ if (o1 == o2) {
+ return true;
+ } else if (o1 == null) {
+ return false;
+ } else {
+ return o1.equals(o2);
+ }
+ }
+}
diff --git a/telephony/java/android/telephony/NetworkScan.java b/telephony/java/android/telephony/NetworkScan.java
index a277212..073c313 100644
--- a/telephony/java/android/telephony/NetworkScan.java
+++ b/telephony/java/android/telephony/NetworkScan.java
@@ -29,9 +29,9 @@
/**
* The caller of
- * {@link TelephonyManager#requestNetworkScan(NetworkScanRequest, NetworkScanCallback)}
+ * {@link TelephonyManager#requestNetworkScan(NetworkScanRequest, Executor, NetworkScanCallback)}
* will receive an instance of {@link NetworkScan}, which contains a callback method
- * {@link #stop()} for stopping the in-progress scan.
+ * {@link #stopScan()} for stopping the in-progress scan.
*/
public class NetworkScan {
@@ -106,16 +106,26 @@
* Use this method to stop an ongoing scan. When user requests a new scan, a {@link NetworkScan}
* object will be returned, and the user can stop the scan by calling this method.
*/
- public void stop() throws RemoteException {
+ public void stopScan() {
+ ITelephony telephony = getITelephony();
+ if (telephony == null) {
+ Rlog.e(TAG, "Failed to get the ITelephony instance.");
+ }
try {
- ITelephony telephony = getITelephony();
- if (telephony != null) {
- telephony.stopNetworkScan(mSubId, mScanId);
- } else {
- throw new RemoteException("Failed to get the ITelephony instance.");
- }
+ telephony.stopNetworkScan(mSubId, mScanId);
} catch (RemoteException ex) {
Rlog.e(TAG, "stopNetworkScan RemoteException", ex);
+ } catch (RuntimeException ex) {
+ Rlog.e(TAG, "stopNetworkScan RuntimeException", ex);
+ }
+ }
+
+ /** @deprecated Use {@link #stopScan()} */
+ @Deprecated
+ public void stop() throws RemoteException {
+ try {
+ stopScan();
+ } catch (RuntimeException ex) {
throw new RemoteException("Failed to stop the network scan with id " + mScanId);
}
}
diff --git a/telephony/java/android/telephony/NetworkScanRequest.java b/telephony/java/android/telephony/NetworkScanRequest.java
index 9726569..8705fa3 100644
--- a/telephony/java/android/telephony/NetworkScanRequest.java
+++ b/telephony/java/android/telephony/NetworkScanRequest.java
@@ -20,11 +20,10 @@
import android.os.Parcel;
import android.os.Parcelable;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-
+import java.util.ArrayList;
+import java.util.Arrays;
/**
* Defines a request to peform a network scan.
*
@@ -152,7 +151,7 @@
this.mMaxSearchTime = maxSearchTime;
this.mIncrementalResults = incrementalResults;
this.mIncrementalResultsPeriodicity = incrementalResultsPeriodicity;
- if (mMccMncs != null) {
+ if (mccMncs != null) {
this.mMccMncs = (ArrayList<String>) mccMncs.clone();
} else {
this.mMccMncs = new ArrayList<>();
diff --git a/telephony/java/android/telephony/NetworkService.java b/telephony/java/android/telephony/NetworkService.java
new file mode 100644
index 0000000..4354314
--- /dev/null
+++ b/telephony/java/android/telephony/NetworkService.java
@@ -0,0 +1,303 @@
+/*
+ * Copyright 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.
+ */
+
+package android.telephony;
+
+import android.annotation.CallSuper;
+import android.annotation.SystemApi;
+import android.app.Service;
+import android.content.Intent;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.RemoteException;
+import android.util.SparseArray;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Base class of network service. Services that extend NetworkService must register the service in
+ * their AndroidManifest to be detected by the framework. They must be protected by the permission
+ * "android.permission.BIND_TELEPHONY_NETWORK_SERVICE". The network service definition in the
+ * manifest must follow the following format:
+ * ...
+ * <service android:name=".xxxNetworkService"
+ * android:permission="android.permission.BIND_TELEPHONY_NETWORK_SERVICE" >
+ * <intent-filter>
+ * <action android:name="android.telephony.NetworkService" />
+ * </intent-filter>
+ * </service>
+ * @hide
+ */
+@SystemApi
+public abstract class NetworkService extends Service {
+
+ private final String TAG = NetworkService.class.getSimpleName();
+
+ public static final String NETWORK_SERVICE_INTERFACE = "android.telephony.NetworkService";
+ public static final String NETWORK_SERVICE_EXTRA_SLOT_ID = "android.telephony.extra.SLOT_ID";
+
+ 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 final HandlerThread mHandlerThread;
+
+ private final NetworkServiceHandler mHandler;
+
+ private final SparseArray<NetworkServiceProvider> mServiceMap = new SparseArray<>();
+
+ /**
+ * @hide
+ */
+ @VisibleForTesting
+ public final INetworkServiceWrapper mBinder = new INetworkServiceWrapper();
+
+ /**
+ * The abstract class of the actual network service implementation. The network service provider
+ * must extend this class to support network connection. Note that each instance of network
+ * service is associated with one physical SIM slot.
+ */
+ public class NetworkServiceProvider {
+ private final int mSlotId;
+
+ private final List<INetworkServiceCallback>
+ mNetworkRegistrationStateChangedCallbacks = new ArrayList<>();
+
+ public NetworkServiceProvider(int slotId) {
+ mSlotId = slotId;
+ }
+
+ /**
+ * @return SIM slot id the network service associated with.
+ */
+ public final int getSlotId() {
+ return mSlotId;
+ }
+
+ /**
+ * API to get network registration state. The result will be passed to the callback.
+ * @param domain
+ * @param callback
+ * @return SIM slot id the network service associated with.
+ */
+ public void getNetworkRegistrationState(int domain, NetworkServiceCallback callback) {
+ callback.onGetNetworkRegistrationStateComplete(
+ NetworkServiceCallback.RESULT_ERROR_UNSUPPORTED, null);
+ }
+
+ public final void notifyNetworkRegistrationStateChanged() {
+ mHandler.obtainMessage(NETWORK_SERVICE_INDICATION_NETWORK_STATE_CHANGED,
+ mSlotId, 0, null).sendToTarget();
+ }
+
+ private void registerForStateChanged(INetworkServiceCallback callback) {
+ synchronized (mNetworkRegistrationStateChangedCallbacks) {
+ mNetworkRegistrationStateChangedCallbacks.add(callback);
+ }
+ }
+
+ private void unregisterForStateChanged(INetworkServiceCallback callback) {
+ synchronized (mNetworkRegistrationStateChangedCallbacks) {
+ mNetworkRegistrationStateChangedCallbacks.remove(callback);
+ }
+ }
+
+ private void notifyStateChangedToCallbacks() {
+ for (INetworkServiceCallback callback : mNetworkRegistrationStateChangedCallbacks) {
+ try {
+ callback.onNetworkStateChanged();
+ } catch (RemoteException exception) {
+ // Doing nothing.
+ }
+ }
+ }
+
+ /**
+ * Called when the instance of network service is destroyed (e.g. got unbind or binder died).
+ */
+ @CallSuper
+ protected void onDestroy() {
+ mNetworkRegistrationStateChangedCallbacks.clear();
+ }
+ }
+
+ private class NetworkServiceHandler extends Handler {
+
+ NetworkServiceHandler(Looper looper) {
+ super(looper);
+ }
+
+ @Override
+ public void handleMessage(Message message) {
+ final int slotId = message.arg1;
+ final INetworkServiceCallback callback = (INetworkServiceCallback) message.obj;
+
+ NetworkServiceProvider serviceProvider = mServiceMap.get(slotId);
+
+ switch (message.what) {
+ case NETWORK_SERVICE_CREATE_NETWORK_SERVICE_PROVIDER:
+ // If the service provider doesn't exist yet, we try to create it.
+ if (serviceProvider == null) {
+ mServiceMap.put(slotId, createNetworkServiceProvider(slotId));
+ }
+ break;
+ case NETWORK_SERVICE_REMOVE_NETWORK_SERVICE_PROVIDER:
+ // If the service provider doesn't exist yet, we try to create it.
+ if (serviceProvider != null) {
+ serviceProvider.onDestroy();
+ mServiceMap.remove(slotId);
+ }
+ break;
+ case NETWORK_SERVICE_REMOVE_ALL_NETWORK_SERVICE_PROVIDERS:
+ for (int i = 0; i < mServiceMap.size(); i++) {
+ serviceProvider = mServiceMap.get(i);
+ if (serviceProvider != null) {
+ serviceProvider.onDestroy();
+ }
+ }
+ mServiceMap.clear();
+ break;
+ case NETWORK_SERVICE_GET_REGISTRATION_STATE:
+ if (serviceProvider == null) break;
+ int domainId = message.arg2;
+ serviceProvider.getNetworkRegistrationState(domainId,
+ new NetworkServiceCallback(callback));
+
+ break;
+ case NETWORK_SERVICE_REGISTER_FOR_STATE_CHANGE:
+ if (serviceProvider == null) break;
+ serviceProvider.registerForStateChanged(callback);
+ break;
+ case NETWORK_SERVICE_UNREGISTER_FOR_STATE_CHANGE:
+ if (serviceProvider == null) break;
+ serviceProvider.unregisterForStateChanged(callback);
+ break;
+ case NETWORK_SERVICE_INDICATION_NETWORK_STATE_CHANGED:
+ if (serviceProvider == null) break;
+ serviceProvider.notifyStateChangedToCallbacks();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ /**
+ * Default constructor.
+ */
+ public NetworkService() {
+ mHandlerThread = new HandlerThread(TAG);
+ mHandlerThread.start();
+
+ mHandler = new NetworkServiceHandler(mHandlerThread.getLooper());
+ log("network service created");
+ }
+
+ /**
+ * Create the instance of {@link NetworkServiceProvider}. Network service provider must override
+ * this method to facilitate the creation of {@link NetworkServiceProvider} instances. The system
+ * will call this method after binding the network service for each active SIM slot id.
+ *
+ * @param slotId SIM slot id the network service associated with.
+ * @return Network service object
+ */
+ protected abstract NetworkServiceProvider createNetworkServiceProvider(int slotId);
+
+ /** @hide */
+ @Override
+ public IBinder onBind(Intent intent) {
+ if (intent == null || !NETWORK_SERVICE_INTERFACE.equals(intent.getAction())) {
+ loge("Unexpected intent " + intent);
+ return null;
+ }
+
+ return mBinder;
+ }
+
+ /** @hide */
+ @Override
+ public boolean onUnbind(Intent intent) {
+ mHandler.obtainMessage(NETWORK_SERVICE_REMOVE_ALL_NETWORK_SERVICE_PROVIDERS, 0,
+ 0, null).sendToTarget();
+
+ return false;
+ }
+
+ /** @hide */
+ @Override
+ public void onDestroy() {
+ mHandlerThread.quit();
+ }
+
+ /**
+ * A wrapper around INetworkService that forwards calls to implementations of
+ * {@link NetworkService}.
+ */
+ private class INetworkServiceWrapper extends INetworkService.Stub {
+
+ @Override
+ public void createNetworkServiceProvider(int slotId) {
+ mHandler.obtainMessage(NETWORK_SERVICE_CREATE_NETWORK_SERVICE_PROVIDER, slotId,
+ 0, null).sendToTarget();
+ }
+
+ @Override
+ public void removeNetworkServiceProvider(int slotId) {
+ mHandler.obtainMessage(NETWORK_SERVICE_REMOVE_NETWORK_SERVICE_PROVIDER, slotId,
+ 0, null).sendToTarget();
+ }
+
+ @Override
+ public void getNetworkRegistrationState(
+ int slotId, int domain, INetworkServiceCallback callback) {
+ mHandler.obtainMessage(NETWORK_SERVICE_GET_REGISTRATION_STATE, slotId,
+ domain, callback).sendToTarget();
+ }
+
+ @Override
+ public void registerForNetworkRegistrationStateChanged(
+ int slotId, INetworkServiceCallback callback) {
+ mHandler.obtainMessage(NETWORK_SERVICE_REGISTER_FOR_STATE_CHANGE, slotId,
+ 0, callback).sendToTarget();
+ }
+
+ @Override
+ public void unregisterForNetworkRegistrationStateChanged(
+ int slotId,INetworkServiceCallback callback) {
+ mHandler.obtainMessage(NETWORK_SERVICE_UNREGISTER_FOR_STATE_CHANGE, slotId,
+ 0, callback).sendToTarget();
+ }
+ }
+
+ private final void log(String s) {
+ Rlog.d(TAG, s);
+ }
+
+ private final void loge(String s) {
+ Rlog.e(TAG, s);
+ }
+}
diff --git a/telephony/java/android/telephony/NetworkServiceCallback.java b/telephony/java/android/telephony/NetworkServiceCallback.java
new file mode 100644
index 0000000..dbad02f
--- /dev/null
+++ b/telephony/java/android/telephony/NetworkServiceCallback.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright 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.
+ */
+
+package android.telephony;
+
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
+import android.os.RemoteException;
+import android.telephony.NetworkService.NetworkServiceProvider;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.ref.WeakReference;
+
+/**
+ * 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.
+ *
+ * @hide
+ */
+@SystemApi
+public class NetworkServiceCallback {
+
+ private static final String mTag = NetworkServiceCallback.class.getSimpleName();
+
+ /**
+ * Result of network requests
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({RESULT_SUCCESS, RESULT_ERROR_UNSUPPORTED, RESULT_ERROR_INVALID_ARG, RESULT_ERROR_BUSY,
+ RESULT_ERROR_ILLEGAL_STATE, RESULT_ERROR_FAILED})
+ public @interface Result {}
+
+ /** Request is completed successfully */
+ public static final int RESULT_SUCCESS = 0;
+ /** Request is not support */
+ public static final int RESULT_ERROR_UNSUPPORTED = 1;
+ /** Request contains invalid arguments */
+ public static final int RESULT_ERROR_INVALID_ARG = 2;
+ /** Service is busy */
+ public static final int RESULT_ERROR_BUSY = 3;
+ /** Request sent in illegal state */
+ public static final int RESULT_ERROR_ILLEGAL_STATE = 4;
+ /** Request failed */
+ public static final int RESULT_ERROR_FAILED = 5;
+
+ private final WeakReference<INetworkServiceCallback> mCallback;
+
+ /** @hide */
+ public NetworkServiceCallback(INetworkServiceCallback callback) {
+ mCallback = new WeakReference<>(callback);
+ }
+
+ /**
+ * Called to indicate result of
+ * {@link NetworkServiceProvider#getNetworkRegistrationState(int, NetworkServiceCallback)}
+ *
+ * @param result Result status like {@link NetworkServiceCallback#RESULT_SUCCESS} or
+ * {@link NetworkServiceCallback#RESULT_ERROR_UNSUPPORTED}
+ * @param state The state information to be returned to callback.
+ */
+ public void onGetNetworkRegistrationStateComplete(int result, NetworkRegistrationState state) {
+ INetworkServiceCallback callback = mCallback.get();
+ if (callback != null) {
+ try {
+ callback.onGetNetworkRegistrationStateComplete(result, state);
+ } catch (RemoteException e) {
+ Rlog.e(mTag, "Failed to onGetNetworkRegistrationStateComplete on the remote");
+ }
+ } else {
+ Rlog.e(mTag, "Weak reference of callback is null.");
+ }
+ }
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index ff67116..fadfc91 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -22,6 +22,7 @@
import com.android.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.android.i18n.phonenumbers.ShortNumberInfo;
+import android.annotation.IntDef;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
@@ -42,6 +43,8 @@
import static com.android.internal.telephony.TelephonyProperties.PROPERTY_OPERATOR_IDP_STRING;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,8 +52,31 @@
/**
* Various utilities for dealing with phone number strings.
*/
-public class PhoneNumberUtils
-{
+public class PhoneNumberUtils {
+ /** {@hide} */
+ @IntDef(prefix = "BCD_EXTENDED_TYPE_", value = {
+ BCD_EXTENDED_TYPE_EF_ADN,
+ BCD_EXTENDED_TYPE_CALLED_PARTY,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface BcdExtendType {}
+
+ /*
+ * The BCD extended type used to determine the extended char for the digit which is greater than
+ * 9.
+ *
+ * see TS 51.011 section 10.5.1 EF_ADN(Abbreviated dialling numbers)
+ */
+ public static final int BCD_EXTENDED_TYPE_EF_ADN = 1;
+
+ /*
+ * The BCD extended type used to determine the extended char for the digit which is greater than
+ * 9.
+ *
+ * see TS 24.008 section 10.5.4.7 Called party BCD number
+ */
+ public static final int BCD_EXTENDED_TYPE_CALLED_PARTY = 2;
+
/*
* Special characters
*
@@ -77,22 +103,6 @@
public static final int TOA_International = 0x91;
public static final int TOA_Unknown = 0x81;
- /*
- * The BCD extended type used to determine the extended char for the digit which is greater than
- * 9.
- *
- * see TS 51.011 section 10.5.1 EF_ADN(Abbreviated dialling numbers)
- */
- public static final int BCD_EXTENDED_TYPE_EF_ADN = 1;
-
- /*
- * The BCD extended type used to determine the extended char for the digit which is greater than
- * 9.
- *
- * see TS 24.008 section 10.5.4.7 Called party BCD number
- */
- public static final int BCD_EXTENDED_TYPE_CALLED_PARTY = 2;
-
static final String LOG_TAG = "PhoneNumberUtils";
private static final boolean DBG = false;
@@ -844,7 +854,7 @@
*
*/
public static String calledPartyBCDToString(
- byte[] bytes, int offset, int length, int bcdExtType) {
+ byte[] bytes, int offset, int length, @BcdExtendType int bcdExtType) {
boolean prependPlus = false;
StringBuilder ret = new StringBuilder(1 + length * 2);
@@ -944,7 +954,8 @@
}
private static void internalCalledPartyBCDFragmentToString(
- StringBuilder sb, byte [] bytes, int offset, int length, int bcdExtType) {
+ StringBuilder sb, byte [] bytes, int offset, int length,
+ @BcdExtendType int bcdExtType) {
for (int i = offset ; i < length + offset ; i++) {
byte b;
char c;
@@ -999,7 +1010,7 @@
* TOA byte. For example: SIM ADN extension fields
*/
public static String calledPartyBCDFragmentToString(
- byte[] bytes, int offset, int length, int bcdExtType) {
+ byte[] bytes, int offset, int length, @BcdExtendType int bcdExtType) {
StringBuilder ret = new StringBuilder(length * 2);
internalCalledPartyBCDFragmentToString(ret, bytes, offset, length, bcdExtType);
return ret.toString();
@@ -1009,7 +1020,7 @@
* Returns the correspond character for given {@code b} based on {@code bcdExtType}, or 0 on
* invalid code.
*/
- private static char bcdToChar(byte b, int bcdExtType) {
+ private static char bcdToChar(byte b, @BcdExtendType int bcdExtType) {
if (b < 0xa) {
return (char) ('0' + b);
}
@@ -1027,7 +1038,7 @@
return extended.charAt(b - 0xa);
}
- private static int charToBCD(char c, int bcdExtType) {
+ private static int charToBCD(char c, @BcdExtendType int bcdExtType) {
if ('0' <= c && c <= '9') {
return c - '0';
}
@@ -1134,7 +1145,7 @@
*
* @return BCD byte array
*/
- public static byte[] numberToCalledPartyBCD(String number, int bcdExtType) {
+ public static byte[] numberToCalledPartyBCD(String number, @BcdExtendType int bcdExtType) {
return numberToCalledPartyBCDHelper(number, false, bcdExtType);
}
@@ -1143,7 +1154,7 @@
* the return array.
*/
private static byte[] numberToCalledPartyBCDHelper(
- String number, boolean includeLength, int bcdExtType) {
+ String number, boolean includeLength, @BcdExtendType int bcdExtType) {
int numberLenReal = number.length();
int numberLenEffective = numberLenReal;
boolean hasPlus = number.indexOf('+') != -1;
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 98ea451..f93653e 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -20,6 +20,7 @@
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
+import android.telecom.TelecomManager;
import com.android.internal.telephony.IPhoneStateListener;
@@ -61,9 +62,6 @@
/**
* Listen for changes to the network signal strength (cellular).
* {@more}
- * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE
- * READ_PHONE_STATE}
- * <p>
*
* @see #onSignalStrengthChanged
*
@@ -76,7 +74,8 @@
* Listen for changes to the message-waiting indicator.
* {@more}
* Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE
- * READ_PHONE_STATE}
+ * READ_PHONE_STATE} or that the calling app has carrier privileges (see
+ * {@link TelephonyManager#hasCarrierPrivileges}).
* <p>
* Example: The status bar uses this to determine when to display the
* voicemail icon.
@@ -89,7 +88,9 @@
* Listen for changes to the call-forwarding indicator.
* {@more}
* Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE
- * READ_PHONE_STATE}
+ * READ_PHONE_STATE} or that the calling app has carrier privileges (see
+ * {@link TelephonyManager#hasCarrierPrivileges}).
+ *
* @see #onCallForwardingIndicatorChanged
*/
public static final int LISTEN_CALL_FORWARDING_INDICATOR = 0x00000008;
@@ -204,6 +205,16 @@
public static final int LISTEN_VOLTE_STATE = 0x00004000;
/**
+ * Listen for OEM hook raw event
+ *
+ * @see #onOemHookRawEvent
+ * @hide
+ * @deprecated OEM needs a vendor-extension hal and their apps should use that instead
+ */
+ @Deprecated
+ public static final int LISTEN_OEM_HOOK_RAW_EVENT = 0x00008000;
+
+ /**
* Listen for carrier network changes indicated by a carrier app.
*
* @see #onCarrierNetworkRequest
@@ -251,7 +262,15 @@
*/
public static final int LISTEN_USER_MOBILE_DATA_STATE = 0x00080000;
- /*
+ /**
+ * Listen for changes to the physical channel configuration.
+ *
+ * @see #onPhysicalChannelConfigurationChanged
+ * @hide
+ */
+ public static final int LISTEN_PHYSICAL_CHANNEL_CONFIGURATION = 0x00100000;
+
+ /*
* Subscription used to listen to the phone state changes
* @hide
*/
@@ -359,10 +378,16 @@
case LISTEN_USER_MOBILE_DATA_STATE:
PhoneStateListener.this.onUserMobileDataStateChanged((boolean)msg.obj);
break;
+ case LISTEN_OEM_HOOK_RAW_EVENT:
+ PhoneStateListener.this.onOemHookRawEvent((byte[])msg.obj);
+ break;
case LISTEN_CARRIER_NETWORK_CHANGE:
PhoneStateListener.this.onCarrierNetworkChange((boolean)msg.obj);
break;
-
+ case LISTEN_PHYSICAL_CHANNEL_CONFIGURATION:
+ PhoneStateListener.this.onPhysicalChannelConfigurationChanged(
+ (List<PhysicalChannelConfig>)msg.obj);
+ break;
}
}
};
@@ -417,16 +442,21 @@
/**
* Callback invoked when device call state changes.
+ * <p>
+ * Reports the state of Telephony (mobile) calls on the device.
+ * <p>
+ * Note: The state returned here may differ from that returned by
+ * {@link TelephonyManager#getCallState()}. Receivers of this callback should be aware that
+ * calling {@link TelephonyManager#getCallState()} from within this callback may return a
+ * different state than the callback reports.
+ *
* @param state call state
* @param phoneNumber call phone number. If application does not have
- * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} permission, an empty
- * string will be passed as an argument.
- *
- * @see TelephonyManager#CALL_STATE_IDLE
- * @see TelephonyManager#CALL_STATE_RINGING
- * @see TelephonyManager#CALL_STATE_OFFHOOK
+ * {@link android.Manifest.permission#READ_CALL_LOG READ_CALL_LOG} permission or carrier
+ * privileges (see {@link TelephonyManager#hasCarrierPrivileges}), an empty string will be
+ * passed as an argument.
*/
- public void onCallStateChanged(int state, String phoneNumber) {
+ public void onCallStateChanged(@TelephonyManager.CallState int state, String phoneNumber) {
// default implementation empty
}
@@ -561,6 +591,26 @@
}
/**
+ * Callback invoked when the current physical channel configuration has changed
+ *
+ * @param configs List of the current {@link PhysicalChannelConfig}s
+ * @hide
+ */
+ public void onPhysicalChannelConfigurationChanged(List<PhysicalChannelConfig> configs) {
+ // default implementation empty
+ }
+
+ /**
+ * Callback invoked when OEM hook raw event is received. Requires
+ * the READ_PRIVILEGED_PHONE_STATE permission.
+ * @param rawData is the byte array of the OEM hook raw data.
+ * @hide
+ */
+ public void onOemHookRawEvent(byte[] rawData) {
+ // default implementation empty
+ }
+
+ /**
* Callback invoked when telephony has received notice from a carrier
* app that a network action that could result in connectivity loss
* has been requested by an app using
@@ -676,9 +726,17 @@
send(LISTEN_USER_MOBILE_DATA_STATE, 0, 0, enabled);
}
+ public void onOemHookRawEvent(byte[] rawData) {
+ send(LISTEN_OEM_HOOK_RAW_EVENT, 0, 0, rawData);
+ }
+
public void onCarrierNetworkChange(boolean active) {
send(LISTEN_CARRIER_NETWORK_CHANGE, 0, 0, active);
}
+
+ public void onPhysicalChannelConfigurationChanged(List<PhysicalChannelConfig> configs) {
+ send(LISTEN_PHYSICAL_CHANNEL_CONFIGURATION, 0, 0, configs);
+ }
}
IPhoneStateListener callback = new IPhoneStateListenerStub(this);
diff --git a/telephony/java/android/telephony/PhysicalChannelConfig.aidl b/telephony/java/android/telephony/PhysicalChannelConfig.aidl
new file mode 100644
index 0000000..651c103
--- /dev/null
+++ b/telephony/java/android/telephony/PhysicalChannelConfig.aidl
@@ -0,0 +1,20 @@
+/*
+**
+** Copyright 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.
+*/
+
+package android.telephony;
+
+parcelable PhysicalChannelConfig;
\ No newline at end of file
diff --git a/telephony/java/android/telephony/PhysicalChannelConfig.java b/telephony/java/android/telephony/PhysicalChannelConfig.java
new file mode 100644
index 0000000..d2001ae
--- /dev/null
+++ b/telephony/java/android/telephony/PhysicalChannelConfig.java
@@ -0,0 +1,157 @@
+/*
+ * 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.
+ */
+
+package android.telephony;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.annotation.IntDef;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * @hide
+ */
+public final class PhysicalChannelConfig implements Parcelable {
+
+ // TODO(b/72993578) consolidate these enums in a central location.
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({CONNECTION_PRIMARY_SERVING, CONNECTION_SECONDARY_SERVING, CONNECTION_UNKNOWN})
+ public @interface ConnectionStatus {}
+
+ /**
+ * UE has connection to cell for signalling and possibly data (3GPP 36.331, 25.331).
+ */
+ public static final int CONNECTION_PRIMARY_SERVING = 1;
+
+ /**
+ * UE has connection to cell for data (3GPP 36.331, 25.331).
+ */
+ public static final int CONNECTION_SECONDARY_SERVING = 2;
+
+ /** Connection status is unknown. */
+ public static final int CONNECTION_UNKNOWN = Integer.MAX_VALUE;
+
+ /**
+ * Connection status of the cell.
+ *
+ * <p>One of {@link #CONNECTION_PRIMARY_SERVING}, {@link #CONNECTION_SECONDARY_SERVING}.
+ */
+ private int mCellConnectionStatus;
+
+ /**
+ * Cell bandwidth, in kHz.
+ */
+ private int mCellBandwidthDownlinkKhz;
+
+ public PhysicalChannelConfig(int status, int bandwidth) {
+ mCellConnectionStatus = status;
+ mCellBandwidthDownlinkKhz = bandwidth;
+ }
+
+ public PhysicalChannelConfig(Parcel in) {
+ mCellConnectionStatus = in.readInt();
+ mCellBandwidthDownlinkKhz = in.readInt();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(mCellConnectionStatus);
+ dest.writeInt(mCellBandwidthDownlinkKhz);
+ }
+
+ /**
+ * @return Cell bandwidth, in kHz
+ */
+ public int getCellBandwidthDownlink() {
+ return mCellBandwidthDownlinkKhz;
+ }
+
+ /**
+ * Gets the connection status of the cell.
+ *
+ * @see #CONNECTION_PRIMARY_SERVING
+ * @see #CONNECTION_SECONDARY_SERVING
+ * @see #CONNECTION_UNKNOWN
+ *
+ * @return Connection status of the cell
+ */
+ @ConnectionStatus
+ public int getConnectionStatus() {
+ return mCellConnectionStatus;
+ }
+
+ /** @return String representation of the connection status */
+ private String getConnectionStatusString() {
+ switch(mCellConnectionStatus) {
+ case CONNECTION_PRIMARY_SERVING:
+ return "PrimaryServing";
+ case CONNECTION_SECONDARY_SERVING:
+ return "SecondaryServing";
+ case CONNECTION_UNKNOWN:
+ return "Unknown";
+ default:
+ return "Invalid(" + mCellConnectionStatus + ")";
+ }
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (!(o instanceof PhysicalChannelConfig)) {
+ return false;
+ }
+
+ PhysicalChannelConfig config = (PhysicalChannelConfig) o;
+ return mCellConnectionStatus == config.mCellConnectionStatus
+ && mCellBandwidthDownlinkKhz == config.mCellBandwidthDownlinkKhz;
+ }
+
+ @Override
+ public int hashCode() {
+ return (mCellBandwidthDownlinkKhz * 29) + (mCellConnectionStatus * 31);
+ }
+
+ public static final Parcelable.Creator<PhysicalChannelConfig> CREATOR =
+ new Parcelable.Creator<PhysicalChannelConfig>() {
+ public PhysicalChannelConfig createFromParcel(Parcel in) {
+ return new PhysicalChannelConfig(in);
+ }
+
+ public PhysicalChannelConfig[] newArray(int size) {
+ return new PhysicalChannelConfig[size];
+ }
+ };
+
+ @Override
+ public String toString() {
+ return new StringBuilder()
+ .append("{mConnectionStatus=")
+ .append(getConnectionStatusString())
+ .append(",mCellBandwidthDownlinkKhz=")
+ .append(mCellBandwidthDownlinkKhz)
+ .append("}")
+ .toString();
+ }
+}
diff --git a/telephony/java/android/telephony/PreciseDisconnectCause.java b/telephony/java/android/telephony/PreciseDisconnectCause.java
index 2516d51..46e2adb 100644
--- a/telephony/java/android/telephony/PreciseDisconnectCause.java
+++ b/telephony/java/android/telephony/PreciseDisconnectCause.java
@@ -97,7 +97,7 @@
/** This cause is used to report a resource unavailable event only when no other
* cause in the resource unavailable class applies
*/
- public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 44;
+ public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47;
/** The requested quality of service (ITU-T X.213) cannot be provided */
public static final int QOS_NOT_AVAIL = 49;
/** The facility could not be provided by the network because the user has no
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index d4b4b88..e971d08 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -17,13 +17,19 @@
package android.telephony;
import android.annotation.IntDef;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
+import android.telephony.AccessNetworkConstants.AccessNetworkType;
import android.text.TextUtils;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
/**
* Contains phone state and service related information.
@@ -32,6 +38,7 @@
*
* <ul>
* <li>Service state: IN_SERVICE, OUT_OF_SERVICE, EMERGENCY_ONLY, POWER_OFF
+ * <li>Duplex mode: UNKNOWN, FDD, TDD
* <li>Roaming indicator
* <li>Operator name, short name and numeric id
* <li>Network selection mode
@@ -67,46 +74,25 @@
*/
public static final int STATE_POWER_OFF = 3;
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({DUPLEX_MODE_UNKNOWN, DUPLEX_MODE_FDD, DUPLEX_MODE_TDD})
+ public @interface DuplexMode {}
+
/**
- * RIL level registration state values from ril.h
- * ((const char **)response)[0] is registration state 0-6,
- * 0 - Not registered, MT is not currently searching
- * a new operator to register
- * 1 - Registered, home network
- * 2 - Not registered, but MT is currently searching
- * a new operator to register
- * 3 - Registration denied
- * 4 - Unknown
- * 5 - Registered, roaming
- * 10 - Same as 0, but indicates that emergency calls
- * are enabled.
- * 12 - Same as 2, but indicates that emergency calls
- * are enabled.
- * 13 - Same as 3, but indicates that emergency calls
- * are enabled.
- * 14 - Same as 4, but indicates that emergency calls
- * are enabled.
- * @hide
+ * Duplex mode for the phone is unknown.
*/
- public static final int RIL_REG_STATE_NOT_REG = 0;
- /** @hide */
- public static final int RIL_REG_STATE_HOME = 1;
- /** @hide */
- public static final int RIL_REG_STATE_SEARCHING = 2;
- /** @hide */
- public static final int RIL_REG_STATE_DENIED = 3;
- /** @hide */
- public static final int RIL_REG_STATE_UNKNOWN = 4;
- /** @hide */
- public static final int RIL_REG_STATE_ROAMING = 5;
- /** @hide */
- public static final int RIL_REG_STATE_NOT_REG_EMERGENCY_CALL_ENABLED = 10;
- /** @hide */
- public static final int RIL_REG_STATE_SEARCHING_EMERGENCY_CALL_ENABLED = 12;
- /** @hide */
- public static final int RIL_REG_STATE_DENIED_EMERGENCY_CALL_ENABLED = 13;
- /** @hide */
- public static final int RIL_REG_STATE_UNKNOWN_EMERGENCY_CALL_ENABLED = 14;
+ public static final int DUPLEX_MODE_UNKNOWN = 0;
+
+ /**
+ * Duplex mode for the phone is frequency-division duplexing.
+ */
+ public static final int DUPLEX_MODE_FDD = 1;
+
+ /**
+ * Duplex mode for the phone is time-division duplexing.
+ */
+ public static final int DUPLEX_MODE_TDD = 2;
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@@ -192,7 +178,6 @@
/**
* Number of radio technologies for GSM, UMTS and CDMA.
- * @hide
*/
private static final int NEXT_RIL_RADIO_TECHNOLOGY = 20;
@@ -206,22 +191,6 @@
| (1 << (RIL_RADIO_TECHNOLOGY_EVDO_B - 1))
| (1 << (RIL_RADIO_TECHNOLOGY_EHRPD - 1));
- /**
- * Available registration states for GSM, UMTS and CDMA.
- */
- /** @hide */
- public static final int REGISTRATION_STATE_NOT_REGISTERED_AND_NOT_SEARCHING = 0;
- /** @hide */
- public static final int REGISTRATION_STATE_HOME_NETWORK = 1;
- /** @hide */
- public static final int REGISTRATION_STATE_NOT_REGISTERED_AND_SEARCHING = 2;
- /** @hide */
- public static final int REGISTRATION_STATE_REGISTRATION_DENIED = 3;
- /** @hide */
- public static final int REGISTRATION_STATE_UNKNOWN = 4;
- /** @hide */
- public static final int REGISTRATION_STATE_ROAMING = 5;
-
private int mVoiceRegState = STATE_OUT_OF_SERVICE;
private int mDataRegState = STATE_OUT_OF_SERVICE;
@@ -251,7 +220,7 @@
public static final int ROAMING_TYPE_INTERNATIONAL = 3;
/**
- * Unknown ID. Could be returned by {@link #getNetworkId()} or {@link #getSystemId()}
+ * Unknown ID. Could be returned by {@link #getCdmaNetworkId()} or {@link #getCdmaSystemId()}
*/
public static final int UNKNOWN_ID = -1;
@@ -282,10 +251,15 @@
private boolean mIsUsingCarrierAggregation;
+ private int mChannelNumber;
+ private int[] mCellBandwidths = new int[0];
+
/* EARFCN stands for E-UTRA Absolute Radio Frequency Channel Number,
* Reference: 3GPP TS 36.104 5.4.3 */
private int mLteEarfcnRsrpBoost = 0;
+ private List<NetworkRegistrationState> mNetworkRegistrationStates = new ArrayList<>();
+
/**
* get String description of roaming type
* @hide
@@ -365,7 +339,10 @@
mIsEmergencyOnly = s.mIsEmergencyOnly;
mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration;
mIsUsingCarrierAggregation = s.mIsUsingCarrierAggregation;
+ mChannelNumber = s.mChannelNumber;
+ mCellBandwidths = Arrays.copyOf(s.mCellBandwidths, s.mCellBandwidths.length);
mLteEarfcnRsrpBoost = s.mLteEarfcnRsrpBoost;
+ mNetworkRegistrationStates = new ArrayList<>(s.mNetworkRegistrationStates);
}
/**
@@ -396,6 +373,10 @@
mIsDataRoamingFromRegistration = in.readInt() != 0;
mIsUsingCarrierAggregation = in.readInt() != 0;
mLteEarfcnRsrpBoost = in.readInt();
+ mNetworkRegistrationStates = new ArrayList<>();
+ in.readList(mNetworkRegistrationStates, NetworkRegistrationState.class.getClassLoader());
+ mChannelNumber = in.readInt();
+ mCellBandwidths = in.createIntArray();
}
public void writeToParcel(Parcel out, int flags) {
@@ -423,6 +404,9 @@
out.writeInt(mIsDataRoamingFromRegistration ? 1 : 0);
out.writeInt(mIsUsingCarrierAggregation ? 1 : 0);
out.writeInt(mLteEarfcnRsrpBoost);
+ out.writeList(mNetworkRegistrationStates);
+ out.writeInt(mChannelNumber);
+ out.writeIntArray(mCellBandwidths);
}
public int describeContents() {
@@ -476,6 +460,46 @@
}
/**
+ * Get the current duplex mode
+ *
+ * @see #DUPLEX_MODE_UNKNOWN
+ * @see #DUPLEX_MODE_FDD
+ * @see #DUPLEX_MODE_TDD
+ *
+ * @return Current {@code DuplexMode} for the phone
+ */
+ @DuplexMode
+ public int getDuplexMode() {
+ // only support LTE duplex mode
+ if (!isLte(mRilDataRadioTechnology)) {
+ return DUPLEX_MODE_UNKNOWN;
+ }
+
+ int band = AccessNetworkUtils.getOperatingBandForEarfcn(mChannelNumber);
+ return AccessNetworkUtils.getDuplexModeForEutranBand(band);
+ }
+
+ /**
+ * Get the channel number of the current primary serving cell, or -1 if unknown
+ *
+ * <p>This is EARFCN for LTE, UARFCN for UMTS, and ARFCN for GSM.
+ *
+ * @return Channel number of primary serving cell
+ */
+ public int getChannelNumber() {
+ return mChannelNumber;
+ }
+
+ /**
+ * Get an array of cell bandwidths (kHz) for the current serving cells
+ *
+ * @return Current serving cell bandwidths
+ */
+ public int[] getCellBandwidths() {
+ return mCellBandwidths == null ? new int[0] : mCellBandwidths;
+ }
+
+ /**
* Get current roaming indicator of phone
* (note: not just decoding from TS 27.007 7.2)
*
@@ -703,6 +727,8 @@
+ (mDataRegState * 37)
+ mVoiceRoamingType
+ mDataRoamingType
+ + mChannelNumber
+ + Arrays.hashCode(mCellBandwidths)
+ (mIsManualNetworkSelection ? 1 : 0)
+ ((null == mVoiceOperatorAlphaLong) ? 0 : mVoiceOperatorAlphaLong.hashCode())
+ ((null == mVoiceOperatorAlphaShort) ? 0 : mVoiceOperatorAlphaShort.hashCode())
@@ -735,6 +761,8 @@
&& mIsManualNetworkSelection == s.mIsManualNetworkSelection
&& mVoiceRoamingType == s.mVoiceRoamingType
&& mDataRoamingType == s.mDataRoamingType
+ && mChannelNumber == s.mChannelNumber
+ && Arrays.equals(mCellBandwidths, s.mCellBandwidths)
&& equalsHandlesNulls(mVoiceOperatorAlphaLong, s.mVoiceOperatorAlphaLong)
&& equalsHandlesNulls(mVoiceOperatorAlphaShort, s.mVoiceOperatorAlphaShort)
&& equalsHandlesNulls(mVoiceOperatorNumeric, s.mVoiceOperatorNumeric)
@@ -751,13 +779,14 @@
s.mCdmaDefaultRoamingIndicator)
&& mIsEmergencyOnly == s.mIsEmergencyOnly
&& mIsDataRoamingFromRegistration == s.mIsDataRoamingFromRegistration
- && mIsUsingCarrierAggregation == s.mIsUsingCarrierAggregation);
+ && mIsUsingCarrierAggregation == s.mIsUsingCarrierAggregation)
+ && mNetworkRegistrationStates.containsAll(s.mNetworkRegistrationStates);
}
/**
* Convert radio technology to String
*
- * @param radioTechnology
+ * @param rt radioTechnology
* @return String representation of the RAT
*
* @hide
@@ -863,6 +892,9 @@
.append("(" + rilServiceStateToString(mVoiceRegState) + ")")
.append(", mDataRegState=").append(mDataRegState)
.append("(" + rilServiceStateToString(mDataRegState) + ")")
+ .append(", mChannelNumber=").append(mChannelNumber)
+ .append(", duplexMode()=").append(getDuplexMode())
+ .append(", mCellBandwidths=").append(Arrays.toString(mCellBandwidths))
.append(", mVoiceRoamingType=").append(getRoamingLogString(mVoiceRoamingType))
.append(", mDataRoamingType=").append(getRoamingLogString(mDataRoamingType))
.append(", mVoiceOperatorAlphaLong=").append(mVoiceOperatorAlphaLong)
@@ -884,6 +916,7 @@
.append(", mIsDataRoamingFromRegistration=").append(mIsDataRoamingFromRegistration)
.append(", mIsUsingCarrierAggregation=").append(mIsUsingCarrierAggregation)
.append(", mLteEarfcnRsrpBoost=").append(mLteEarfcnRsrpBoost)
+ .append(", mNetworkRegistrationStates=").append(mNetworkRegistrationStates)
.append("}").toString();
}
@@ -893,6 +926,8 @@
mDataRegState = state;
mVoiceRoamingType = ROAMING_TYPE_NOT_ROAMING;
mDataRoamingType = ROAMING_TYPE_NOT_ROAMING;
+ mChannelNumber = -1;
+ mCellBandwidths = new int[0];
mVoiceOperatorAlphaLong = null;
mVoiceOperatorAlphaShort = null;
mVoiceOperatorNumeric = null;
@@ -913,6 +948,7 @@
mIsDataRoamingFromRegistration = false;
mIsUsingCarrierAggregation = false;
mLteEarfcnRsrpBoost = 0;
+ mNetworkRegistrationStates = new ArrayList<>();
}
public void setStateOutOfService() {
@@ -940,6 +976,16 @@
if (VDBG) Rlog.d(LOG_TAG, "[ServiceState] setDataRegState=" + mDataRegState);
}
+ /** @hide */
+ public void setCellBandwidths(int[] bandwidths) {
+ mCellBandwidths = bandwidths;
+ }
+
+ /** @hide */
+ public void setChannelNumber(int channelNumber) {
+ mChannelNumber = channelNumber;
+ }
+
public void setRoaming(boolean roaming) {
mVoiceRoamingType = (roaming ? ROAMING_TYPE_UNKNOWN : ROAMING_TYPE_NOT_ROAMING);
mDataRoamingType = mVoiceRoamingType;
@@ -1088,6 +1134,8 @@
mIsDataRoamingFromRegistration = m.getBoolean("isDataRoamingFromRegistration");
mIsUsingCarrierAggregation = m.getBoolean("isUsingCarrierAggregation");
mLteEarfcnRsrpBoost = m.getInt("LteEarfcnRsrpBoost");
+ mChannelNumber = m.getInt("ChannelNumber");
+ mCellBandwidths = m.getIntArray("CellBandwidths");
}
/**
@@ -1119,6 +1167,8 @@
m.putBoolean("isDataRoamingFromRegistration", mIsDataRoamingFromRegistration);
m.putBoolean("isUsingCarrierAggregation", mIsUsingCarrierAggregation);
m.putInt("LteEarfcnRsrpBoost", mLteEarfcnRsrpBoost);
+ m.putInt("ChannelNumber", mChannelNumber);
+ m.putIntArray("CellBandwidths", mCellBandwidths);
}
/** @hide */
@@ -1169,7 +1219,8 @@
}
/** @hide */
- public void setSystemAndNetworkId(int systemId, int networkId) {
+ @TestApi
+ public void setCdmaSystemAndNetworkId(int systemId, int networkId) {
this.mSystemId = systemId;
this.mNetworkId = networkId;
}
@@ -1238,6 +1289,84 @@
}
/** @hide */
+ public static int rilRadioTechnologyToAccessNetworkType(@RilRadioTechnology int rt) {
+ switch(rt) {
+ case RIL_RADIO_TECHNOLOGY_GPRS:
+ case RIL_RADIO_TECHNOLOGY_EDGE:
+ case RIL_RADIO_TECHNOLOGY_GSM:
+ return AccessNetworkType.GERAN;
+ case RIL_RADIO_TECHNOLOGY_UMTS:
+ case RIL_RADIO_TECHNOLOGY_HSDPA:
+ case RIL_RADIO_TECHNOLOGY_HSPAP:
+ case RIL_RADIO_TECHNOLOGY_HSUPA:
+ case RIL_RADIO_TECHNOLOGY_HSPA:
+ case RIL_RADIO_TECHNOLOGY_TD_SCDMA:
+ return AccessNetworkType.UTRAN;
+ case RIL_RADIO_TECHNOLOGY_IS95A:
+ case RIL_RADIO_TECHNOLOGY_IS95B:
+ case RIL_RADIO_TECHNOLOGY_1xRTT:
+ case RIL_RADIO_TECHNOLOGY_EVDO_0:
+ case RIL_RADIO_TECHNOLOGY_EVDO_A:
+ case RIL_RADIO_TECHNOLOGY_EVDO_B:
+ case RIL_RADIO_TECHNOLOGY_EHRPD:
+ return AccessNetworkType.CDMA2000;
+ case RIL_RADIO_TECHNOLOGY_LTE:
+ case RIL_RADIO_TECHNOLOGY_LTE_CA:
+ return AccessNetworkType.EUTRAN;
+ case RIL_RADIO_TECHNOLOGY_IWLAN:
+ return AccessNetworkType.IWLAN;
+ case RIL_RADIO_TECHNOLOGY_UNKNOWN:
+ default:
+ return AccessNetworkType.UNKNOWN;
+ }
+ }
+
+ /** @hide */
+ public static int networkTypeToRilRadioTechnology(int networkType) {
+ switch(networkType) {
+ case TelephonyManager.NETWORK_TYPE_GPRS:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_GPRS;
+ case TelephonyManager.NETWORK_TYPE_EDGE:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_EDGE;
+ case TelephonyManager.NETWORK_TYPE_UMTS:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_UMTS;
+ case TelephonyManager.NETWORK_TYPE_HSDPA:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_HSDPA;
+ case TelephonyManager.NETWORK_TYPE_HSUPA:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_HSUPA;
+ case TelephonyManager.NETWORK_TYPE_HSPA:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_HSPA;
+ case TelephonyManager.NETWORK_TYPE_CDMA:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_IS95A;
+ case TelephonyManager.NETWORK_TYPE_1xRTT:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT;
+ case TelephonyManager.NETWORK_TYPE_EVDO_0:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_0;
+ case TelephonyManager.NETWORK_TYPE_EVDO_A:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_A;
+ case TelephonyManager.NETWORK_TYPE_EVDO_B:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_B;
+ case TelephonyManager.NETWORK_TYPE_EHRPD:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD;
+ case TelephonyManager.NETWORK_TYPE_LTE:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_LTE;
+ case TelephonyManager.NETWORK_TYPE_HSPAP:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP;
+ case TelephonyManager.NETWORK_TYPE_GSM:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_GSM;
+ case TelephonyManager.NETWORK_TYPE_TD_SCDMA:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_TD_SCDMA;
+ case TelephonyManager.NETWORK_TYPE_IWLAN:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN;
+ case TelephonyManager.NETWORK_TYPE_LTE_CA:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA;
+ default:
+ return ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN;
+ }
+ }
+
+
+ /** @hide */
public int getDataNetworkType() {
return rilRadioTechnologyToNetworkType(mRilDataRadioTechnology);
}
@@ -1257,7 +1386,7 @@
* within a wireless system. (Defined in 3GPP2 C.S0023 3.4.8)
* @return The CDMA NID or {@link #UNKNOWN_ID} if not available.
*/
- public int getNetworkId() {
+ public int getCdmaNetworkId() {
return this.mNetworkId;
}
@@ -1266,7 +1395,7 @@
* system. (Defined in 3GPP2 C.S0023 3.4.8)
* @return The CDMA SID or {@link #UNKNOWN_ID} if not available.
*/
- public int getSystemId() {
+ public int getCdmaSystemId() {
return this.mSystemId;
}
@@ -1394,4 +1523,82 @@
return newSs;
}
+
+ /**
+ * Get all of the available network registration states.
+ *
+ * @return List of registration states
+ * @hide
+ */
+ @SystemApi
+ public List<NetworkRegistrationState> getNetworkRegistrationStates() {
+ synchronized (mNetworkRegistrationStates) {
+ return new ArrayList<>(mNetworkRegistrationStates);
+ }
+ }
+
+ /**
+ * Get the network registration states with given transport type.
+ *
+ * @param transportType The transport type. See {@link AccessNetworkConstants.TransportType}
+ * @return List of registration states.
+ * @hide
+ */
+ @SystemApi
+ public List<NetworkRegistrationState> getNetworkRegistrationStates(int transportType) {
+ List<NetworkRegistrationState> list = new ArrayList<>();
+
+ synchronized (mNetworkRegistrationStates) {
+ for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) {
+ if (networkRegistrationState.getTransportType() == transportType) {
+ list.add(networkRegistrationState);
+ }
+ }
+ }
+
+ return list;
+ }
+
+ /**
+ * Get the network registration states with given transport type and domain.
+ *
+ * @param transportType The transport type. See {@link AccessNetworkConstants.TransportType}
+ * @param domain The network domain. Must be DOMAIN_CS or DOMAIN_PS.
+ * @return The matching NetworkRegistrationState.
+ * @hide
+ */
+ @SystemApi
+ public NetworkRegistrationState getNetworkRegistrationStates(int transportType, int domain) {
+ synchronized (mNetworkRegistrationStates) {
+ for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) {
+ if (networkRegistrationState.getTransportType() == transportType
+ && networkRegistrationState.getDomain() == domain) {
+ return networkRegistrationState;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @hide
+ */
+ public void addNetworkRegistrationState(NetworkRegistrationState regState) {
+ if (regState == null) return;
+
+ synchronized (mNetworkRegistrationStates) {
+ for (int i = 0; i < mNetworkRegistrationStates.size(); i++) {
+ NetworkRegistrationState curRegState = mNetworkRegistrationStates.get(i);
+ if (curRegState.getTransportType() == regState.getTransportType()
+ && curRegState.getDomain() == regState.getDomain()) {
+ mNetworkRegistrationStates.remove(i);
+ break;
+ }
+ }
+
+ mNetworkRegistrationStates.add(regState);
+ }
+ }
+
}
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index fc2ef27..3feec992 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -25,6 +25,7 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Objects;
/**
* Contains phone signal strength related information.
@@ -57,7 +58,16 @@
*/
public static final int INVALID = Integer.MAX_VALUE;
- private static final int LTE_RSRP_THRESHOLDS_NUM = 6;
+ private static final int LTE_RSRP_THRESHOLDS_NUM = 4;
+ private static final int MAX_LTE_RSRP = -44;
+ private static final int MIN_LTE_RSRP = -140;
+
+ private static final int WCDMA_RSCP_THRESHOLDS_NUM = 4;
+ private static final int MAX_WCDMA_RSCP = -24;
+ private static final int MIN_WCDMA_RSCP = -120;
+
+ /* The type of signal measurement */
+ private static final String MEASUMENT_TYPE_RSCP = "rscp";
/** Parameters reported by the Radio */
private int mGsmSignalStrength; // Valid values are (0-31, 99) as defined in TS 27.007 8.5
@@ -72,7 +82,10 @@
private int mLteRsrq;
private int mLteRssnr;
private int mLteCqi;
- private int mTdScdmaRscp;
+ private int mTdScdmaRscp; // Valid values are -24...-120dBm or INVALID if unknown
+ private int mWcdmaSignalStrength;
+ private int mWcdmaRscpAsu; // the WCDMA RSCP in ASU as reported from the HAL
+ private int mWcdmaRscp; // the WCDMA RSCP in dBm
/** Parameters from the framework */
private int mLteRsrpBoost; // offset to be reduced from the rsrp threshold while calculating
@@ -81,9 +94,17 @@
// onSignalStrengthResult.
private boolean mUseOnlyRsrpForLteLevel; // Use only RSRP for the number of LTE signal bar.
- // The threshold of LTE RSRP for determining the display level of LTE signal bar.
+ // The threshold of LTE RSRP for determining the display level of LTE signal bar. Note that the
+ // min and max are fixed at MIN_LTE_RSRP (-140) and MAX_LTE_RSRP (-44).
private int mLteRsrpThresholds[] = new int[LTE_RSRP_THRESHOLDS_NUM];
+ // The type of default measurement for determining the display level of WCDMA signal bar.
+ private String mWcdmaDefaultSignalMeasurement;
+
+ // The threshold of WCDMA RSCP for determining the display level of WCDMA signal bar. Note that
+ // the min and max are fixed at MIN_WCDMA_RSCP (-120) and MAX_WCDMA_RSCP (-24).
+ private int mWcdmaRscpThresholds[] = new int[WCDMA_RSCP_THRESHOLDS_NUM];
+
/**
* Create a new SignalStrength from a intent notifier Bundle
*
@@ -133,10 +154,15 @@
mLteRssnr = INVALID;
mLteCqi = INVALID;
mTdScdmaRscp = INVALID;
+ mWcdmaSignalStrength = 99;
+ mWcdmaRscp = INVALID;
+ mWcdmaRscpAsu = 255;
mLteRsrpBoost = 0;
mIsGsm = gsmFlag;
mUseOnlyRsrpForLteLevel = false;
+ mWcdmaDefaultSignalMeasurement = "";
setLteRsrpThresholds(getDefaultLteRsrpThresholds());
+ setWcdmaRscpThresholds(getDefaultWcdmaRscpThresholds());
}
/**
@@ -149,9 +175,10 @@
int cdmaDbm, int cdmaEcio,
int evdoDbm, int evdoEcio, int evdoSnr,
int lteSignalStrength, int lteRsrp, int lteRsrq, int lteRssnr, int lteCqi,
- int tdScdmaRscp,
+ int tdScdmaRscp, int wcdmaSignalStrength, int wcdmaRscpAsu,
// values Added by config
- int lteRsrpBoost, boolean gsmFlag, boolean lteLevelBaseOnRsrp) {
+ int lteRsrpBoost, boolean gsmFlag, boolean lteLevelBaseOnRsrp,
+ String wcdmaDefaultMeasurement) {
mGsmSignalStrength = gsmSignalStrength;
mGsmBitErrorRate = gsmBitErrorRate;
mCdmaDbm = cdmaDbm;
@@ -165,15 +192,20 @@
mLteRssnr = lteRssnr;
mLteCqi = lteCqi;
mTdScdmaRscp = INVALID;
+ mWcdmaSignalStrength = wcdmaSignalStrength;
+ mWcdmaRscpAsu = wcdmaRscpAsu;
+ mWcdmaRscp = wcdmaRscpAsu - 120;
mLteRsrpBoost = lteRsrpBoost;
mIsGsm = gsmFlag;
mUseOnlyRsrpForLteLevel = lteLevelBaseOnRsrp;
+ mWcdmaDefaultSignalMeasurement = wcdmaDefaultMeasurement;
setLteRsrpThresholds(getDefaultLteRsrpThresholds());
+ setWcdmaRscpThresholds(getDefaultWcdmaRscpThresholds());
if (DBG) log("initialize: " + toString());
}
/**
- * Constructor for only values provided by Radio HAL
+ * Constructor for only values provided by Radio HAL V1.0
*
* @hide
*/
@@ -184,7 +216,23 @@
int tdScdmaRscp) {
this(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
evdoDbm, evdoEcio, evdoSnr, lteSignalStrength, lteRsrp,
- lteRsrq, lteRssnr, lteCqi, tdScdmaRscp, 0, true, false);
+ lteRsrq, lteRssnr, lteCqi, tdScdmaRscp, 99, INVALID, 0, true, false, "");
+ }
+
+ /**
+ * Constructor for only values provided by Radio HAL V1.2
+ *
+ * @hide
+ */
+ public SignalStrength(int gsmSignalStrength, int gsmBitErrorRate,
+ int cdmaDbm, int cdmaEcio,
+ int evdoDbm, int evdoEcio, int evdoSnr,
+ int lteSignalStrength, int lteRsrp, int lteRsrq, int lteRssnr, int lteCqi,
+ int tdScdmaRscp, int wcdmaSignalStrength, int wcdmaRscp) {
+ this(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
+ evdoDbm, evdoEcio, evdoSnr, lteSignalStrength, lteRsrp,
+ lteRsrq, lteRssnr, lteCqi, tdScdmaRscp, wcdmaSignalStrength, wcdmaRscp, 0, true,
+ false, "");
}
/**
@@ -215,10 +263,15 @@
mLteRssnr = s.mLteRssnr;
mLteCqi = s.mLteCqi;
mTdScdmaRscp = s.mTdScdmaRscp;
+ mWcdmaSignalStrength = s.mWcdmaSignalStrength;
+ mWcdmaRscpAsu = s.mWcdmaRscpAsu;
+ mWcdmaRscp = s.mWcdmaRscp;
mLteRsrpBoost = s.mLteRsrpBoost;
mIsGsm = s.mIsGsm;
mUseOnlyRsrpForLteLevel = s.mUseOnlyRsrpForLteLevel;
+ mWcdmaDefaultSignalMeasurement = s.mWcdmaDefaultSignalMeasurement;
setLteRsrpThresholds(s.mLteRsrpThresholds);
+ setWcdmaRscpThresholds(s.mWcdmaRscpThresholds);
}
/**
@@ -242,10 +295,15 @@
mLteRssnr = in.readInt();
mLteCqi = in.readInt();
mTdScdmaRscp = in.readInt();
+ mWcdmaSignalStrength = in.readInt();
+ mWcdmaRscpAsu = in.readInt();
+ mWcdmaRscp = in.readInt();
mLteRsrpBoost = in.readInt();
mIsGsm = in.readBoolean();
mUseOnlyRsrpForLteLevel = in.readBoolean();
+ mWcdmaDefaultSignalMeasurement = in.readString();
in.readIntArray(mLteRsrpThresholds);
+ in.readIntArray(mWcdmaRscpThresholds);
}
/**
@@ -265,10 +323,15 @@
out.writeInt(mLteRssnr);
out.writeInt(mLteCqi);
out.writeInt(mTdScdmaRscp);
+ out.writeInt(mWcdmaSignalStrength);
+ out.writeInt(mWcdmaRscpAsu);
+ out.writeInt(mWcdmaRscp);
out.writeInt(mLteRsrpBoost);
out.writeBoolean(mIsGsm);
out.writeBoolean(mUseOnlyRsrpForLteLevel);
+ out.writeString(mWcdmaDefaultSignalMeasurement);
out.writeIntArray(mLteRsrpThresholds);
+ out.writeIntArray(mWcdmaRscpThresholds);
}
/**
@@ -308,24 +371,34 @@
if (DBG) log("Signal before validate=" + this);
// TS 27.007 8.5
mGsmSignalStrength = mGsmSignalStrength >= 0 ? mGsmSignalStrength : 99;
+ mWcdmaSignalStrength = (mWcdmaSignalStrength >= 0) ? mWcdmaSignalStrength : 99;
+ mLteSignalStrength = (mLteSignalStrength >= 0) ? mLteSignalStrength : 99;
// BER no change;
+ // WCDMA RSCP valid values are -120 through -24 as defined in TS 27.007 8.69
+ // but are reported in ASU which is 0 through 96, so we do the conversion here
+ mWcdmaRscpAsu =
+ ((mWcdmaRscpAsu - 120 >= MIN_WCDMA_RSCP) && (mWcdmaRscpAsu - 120 <= MAX_WCDMA_RSCP))
+ ? mWcdmaRscpAsu : 255;
+ mWcdmaRscp = ((mWcdmaRscp >= MIN_WCDMA_RSCP) && (mWcdmaRscp <= MAX_WCDMA_RSCP))
+ ? mWcdmaRscp : INVALID;
+
mCdmaDbm = mCdmaDbm > 0 ? -mCdmaDbm : -120;
- mCdmaEcio = (mCdmaEcio > 0) ? -mCdmaEcio : -160;
+ mCdmaEcio = (mCdmaEcio >= 0) ? -mCdmaEcio : -160;
mEvdoDbm = (mEvdoDbm > 0) ? -mEvdoDbm : -120;
- mEvdoEcio = (mEvdoEcio >= 0) ? -mEvdoEcio : -1;
- mEvdoSnr = ((mEvdoSnr > 0) && (mEvdoSnr <= 8)) ? mEvdoSnr : -1;
+ mEvdoEcio = (mEvdoEcio >= 0) ? -mEvdoEcio : -160;
+ mEvdoSnr = ((mEvdoSnr >= 0) && (mEvdoSnr <= 8)) ? mEvdoSnr : -1;
// TS 36.214 Physical Layer Section 5.1.3, TS 36.331 RRC
- mLteSignalStrength = (mLteSignalStrength >= 0) ? mLteSignalStrength : 99;
- mLteRsrp = ((mLteRsrp >= 44) && (mLteRsrp <= 140)) ? -mLteRsrp : SignalStrength.INVALID;
+ mLteRsrp = ((-mLteRsrp >= MIN_LTE_RSRP) && (-mLteRsrp <= MAX_LTE_RSRP)) ? -mLteRsrp
+ : SignalStrength.INVALID;
mLteRsrq = ((mLteRsrq >= 3) && (mLteRsrq <= 20)) ? -mLteRsrq : SignalStrength.INVALID;
mLteRssnr = ((mLteRssnr >= -200) && (mLteRssnr <= 300)) ? mLteRssnr
: SignalStrength.INVALID;
- mTdScdmaRscp = ((mTdScdmaRscp >= 25) && (mTdScdmaRscp <= 120))
- ? -mTdScdmaRscp : SignalStrength.INVALID;
+ mTdScdmaRscp = ((mTdScdmaRscp >= 0) && (mTdScdmaRscp <= 96))
+ ? (mTdScdmaRscp - 120) : SignalStrength.INVALID;
// Cqi no change
if (DBG) log("Signal after validate=" + this);
}
@@ -363,6 +436,16 @@
}
/**
+ * @param defaultMeasurement sets the type of WCDMA default signal measurement
+ *
+ * Used by phone to determine default measurement type for calculation WCDMA signal level.
+ * @hide
+ */
+ public void setWcdmaDefaultSignalMeasurement(String defaultMeasurement) {
+ mWcdmaDefaultSignalMeasurement = defaultMeasurement;
+ }
+
+ /**
* @param lteRsrpBoost - signal strength offset
*
* Used by phone to set the lte signal strength offset which will be
@@ -406,6 +489,23 @@
}
/**
+ * Sets the threshold array for determining the display level of WCDMA signal bar.
+ *
+ * @param wcdmaRscpThresholds int array for determining the display level.
+ *
+ * @hide
+ */
+ public void setWcdmaRscpThresholds(int[] wcdmaRscpThresholds) {
+ if ((wcdmaRscpThresholds == null)
+ || (wcdmaRscpThresholds.length != WCDMA_RSCP_THRESHOLDS_NUM)) {
+ Log.wtf(LOG_TAG, "setWcdmaRscpThresholds - wcdmaRscpThresholds is invalid.");
+ return;
+ }
+ System.arraycopy(wcdmaRscpThresholds, 0, mWcdmaRscpThresholds, 0,
+ WCDMA_RSCP_THRESHOLDS_NUM);
+ }
+
+ /**
* Get the CDMA RSSI value in dBm
*/
public int getCdmaDbm() {
@@ -496,6 +596,8 @@
asuLevel = getLteAsuLevel();
} else if (mTdScdmaRscp != SignalStrength.INVALID) {
asuLevel = getTdScdmaAsuLevel();
+ } else if (mWcdmaRscp != SignalStrength.INVALID) {
+ asuLevel = getWcdmaAsuLevel();
} else {
asuLevel = getGsmAsuLevel();
}
@@ -529,7 +631,11 @@
dBm = getLteDbm();
if (dBm == INVALID) {
if (getTdScdmaLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) {
- dBm = getGsmDbm();
+ if (getWcdmaDbm() == INVALID) {
+ dBm = getGsmDbm();
+ } else {
+ dBm = getWcdmaDbm();
+ }
} else {
dBm = getTdScdmaDbm();
}
@@ -735,24 +841,29 @@
*/
public int getLteLevel() {
/*
- * TS 36.214 Physical Layer Section 5.1.3 TS 36.331 RRC RSSI = received
- * signal + noise RSRP = reference signal dBm RSRQ = quality of signal
- * dB= Number of Resource blocksxRSRP/RSSI SNR = gain=signal/noise ratio
- * = -10log P1/P2 dB
+ * TS 36.214 Physical Layer Section 5.1.3
+ * TS 36.331 RRC
+ *
+ * RSSI = received signal + noise
+ * RSRP = reference signal dBm
+ * RSRQ = quality of signal dB = Number of Resource blocks*RSRP/RSSI
+ * SNR = gain = signal/noise ratio = -10log P1/P2 dB
*/
int rssiIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN, rsrpIconLevel = -1, snrIconLevel = -1;
- if (mLteRsrp > mLteRsrpThresholds[5]) {
- rsrpIconLevel = -1;
- } else if (mLteRsrp >= (mLteRsrpThresholds[4] - mLteRsrpBoost)) {
- rsrpIconLevel = SIGNAL_STRENGTH_GREAT;
+ if (mLteRsrp > MAX_LTE_RSRP || mLteRsrp < MIN_LTE_RSRP) {
+ if (mLteRsrp != INVALID) {
+ Log.wtf(LOG_TAG, "getLteLevel - invalid lte rsrp: mLteRsrp=" + mLteRsrp);
+ }
} else if (mLteRsrp >= (mLteRsrpThresholds[3] - mLteRsrpBoost)) {
- rsrpIconLevel = SIGNAL_STRENGTH_GOOD;
+ rsrpIconLevel = SIGNAL_STRENGTH_GREAT;
} else if (mLteRsrp >= (mLteRsrpThresholds[2] - mLteRsrpBoost)) {
- rsrpIconLevel = SIGNAL_STRENGTH_MODERATE;
+ rsrpIconLevel = SIGNAL_STRENGTH_GOOD;
} else if (mLteRsrp >= (mLteRsrpThresholds[1] - mLteRsrpBoost)) {
+ rsrpIconLevel = SIGNAL_STRENGTH_MODERATE;
+ } else if (mLteRsrp >= (mLteRsrpThresholds[0] - mLteRsrpBoost)) {
rsrpIconLevel = SIGNAL_STRENGTH_POOR;
- } else if (mLteRsrp >= mLteRsrpThresholds[0]) {
+ } else {
rsrpIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
}
@@ -795,18 +906,19 @@
if (rsrpIconLevel != -1) return rsrpIconLevel;
- /* Valid values are (0-63, 99) as defined in TS 36.331 */
- if (mLteSignalStrength > 63) rssiIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
+ if (mLteSignalStrength > 31) rssiIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
else if (mLteSignalStrength >= 12) rssiIconLevel = SIGNAL_STRENGTH_GREAT;
else if (mLteSignalStrength >= 8) rssiIconLevel = SIGNAL_STRENGTH_GOOD;
else if (mLteSignalStrength >= 5) rssiIconLevel = SIGNAL_STRENGTH_MODERATE;
else if (mLteSignalStrength >= 0) rssiIconLevel = SIGNAL_STRENGTH_POOR;
- if (DBG) log("getLTELevel - rssi:" + mLteSignalStrength + " rssiIconLevel:"
+ if (DBG) log("getLteLevel - rssi:" + mLteSignalStrength + " rssiIconLevel:"
+ rssiIconLevel);
return rssiIconLevel;
}
+
/**
* Get the LTE signal level as an asu value between 0..97, 99 is unknown
* Asu is calculated based on 3GPP RSRP. Refer to 3GPP 27.007 (Ver 10.3.0) Sec 8.69
@@ -899,6 +1011,105 @@
return tdScdmaAsuLevel;
}
+ /**
+ * Gets WCDMA RSCP as a dbm value between -120 and -24, as defined in TS 27.007 8.69.
+ *
+ * @hide
+ */
+ public int getWcdmaRscp() {
+ return mWcdmaRscp;
+ }
+
+ /**
+ * Get the WCDMA signal level as an ASU value between 0-96, 255 is unknown
+ *
+ * @hide
+ */
+ public int getWcdmaAsuLevel() {
+ /*
+ * 3GPP 27.007 (Ver 10.3.0) Sec 8.69
+ * 0 -120 dBm or less
+ * 1 -119 dBm
+ * 2...95 -118... -25 dBm
+ * 96 -24 dBm or greater
+ * 255 not known or not detectable
+ */
+ final int wcdmaDbm = getWcdmaDbm();
+ int wcdmaAsuLevel = 255;
+ // validateInput will always give a valid range between -120 to -24 as per ril.h. so RSCP
+ // outside range is already set to INVALID
+ if (wcdmaDbm == SignalStrength.INVALID) wcdmaAsuLevel = 255;
+ else wcdmaAsuLevel = wcdmaDbm + 120;
+ if (DBG) log("Wcdma Asu level: " + wcdmaAsuLevel);
+ return wcdmaAsuLevel;
+ }
+
+ /**
+ * Gets WCDMA signal strength as a dbm value between -120 and -24, as defined in TS 27.007 8.69.
+ *
+ * @hide
+ */
+ public int getWcdmaDbm() {
+ return mWcdmaRscp;
+ }
+
+ /**
+ * Get WCDMA as level 0..4
+ *
+ * @hide
+ */
+ public int getWcdmaLevel() {
+ int level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+
+ if (mWcdmaDefaultSignalMeasurement == null) {
+ Log.wtf(LOG_TAG, "getWcdmaLevel - WCDMA default signal measurement is invalid.");
+ return level;
+ }
+
+ switch (mWcdmaDefaultSignalMeasurement) {
+ case MEASUMENT_TYPE_RSCP:
+ // RSCP valid values are (-120 through -24) as defined in TS 27.007 8.69
+ if (mWcdmaRscp < MIN_WCDMA_RSCP || mWcdmaRscp > MAX_WCDMA_RSCP) {
+ if (mWcdmaRscp != INVALID) {
+ Log.wtf(LOG_TAG, "getWcdmaLevel - invalid WCDMA RSCP: mWcdmaRscp="
+ + mWcdmaRscp);
+ }
+ } else if (mWcdmaRscp >= mWcdmaRscpThresholds[3]) {
+ level = SIGNAL_STRENGTH_GREAT;
+ } else if (mWcdmaRscp >= mWcdmaRscpThresholds[2]) {
+ level = SIGNAL_STRENGTH_GOOD;
+ } else if (mWcdmaRscp >= mWcdmaRscpThresholds[1]) {
+ level = SIGNAL_STRENGTH_MODERATE;
+ } else if (mWcdmaRscp >= mWcdmaRscpThresholds[0]) {
+ level = SIGNAL_STRENGTH_POOR;
+ }
+ if (DBG) log("getWcdmaLevel=" + level + " WcdmaRscp=" + mWcdmaRscp);
+ break;
+
+ default:
+ // RSSI valid values are (0..31) as defined in TS 27.007 8.5
+ if (mWcdmaSignalStrength < 0 || mWcdmaSignalStrength > 31) {
+ if (mWcdmaSignalStrength != 99) {
+ Log.wtf(LOG_TAG, "getWcdmaLevel - invalid WCDMA RSSI: mWcdmaSignalStrength="
+ + mWcdmaSignalStrength);
+ }
+ } else if (mWcdmaSignalStrength >= 18) {
+ level = SIGNAL_STRENGTH_GREAT;
+ } else if (mWcdmaSignalStrength >= 13) {
+ level = SIGNAL_STRENGTH_GOOD;
+ } else if (mWcdmaSignalStrength >= 8) {
+ level = SIGNAL_STRENGTH_MODERATE;
+ } else if (mWcdmaSignalStrength >= 3) {
+ level = SIGNAL_STRENGTH_POOR;
+ }
+ if (DBG) log("getWcdmaLevel=" + level + " WcdmaSignalStrength=" +
+ mWcdmaSignalStrength);
+ break;
+
+ }
+ return level;
+ }
+
/**
* @return hash code
*/
@@ -911,8 +1122,11 @@
+ (mEvdoDbm * primeNum) + (mEvdoEcio * primeNum) + (mEvdoSnr * primeNum)
+ (mLteSignalStrength * primeNum) + (mLteRsrp * primeNum)
+ (mLteRsrq * primeNum) + (mLteRssnr * primeNum) + (mLteCqi * primeNum)
- + (mLteRsrpBoost * primeNum) + (mTdScdmaRscp * primeNum) + (mIsGsm ? 1 : 0)
- + (mUseOnlyRsrpForLteLevel ? 1 : 0) + (Arrays.hashCode(mLteRsrpThresholds)));
+ + (mLteRsrpBoost * primeNum) + (mTdScdmaRscp * primeNum)
+ + (mWcdmaSignalStrength * primeNum) + (mWcdmaRscpAsu * primeNum)
+ + (mWcdmaRscp * primeNum) + (mIsGsm ? 1 : 0) + (mUseOnlyRsrpForLteLevel ? 1 : 0)
+ + (Objects.hashCode(mWcdmaDefaultSignalMeasurement))
+ + (Arrays.hashCode(mLteRsrpThresholds)) + (Arrays.hashCode(mWcdmaRscpThresholds)));
}
/**
@@ -946,9 +1160,14 @@
&& mLteCqi == s.mLteCqi
&& mLteRsrpBoost == s.mLteRsrpBoost
&& mTdScdmaRscp == s.mTdScdmaRscp
+ && mWcdmaSignalStrength == s.mWcdmaSignalStrength
+ && mWcdmaRscpAsu == s.mWcdmaRscpAsu
+ && mWcdmaRscp == s.mWcdmaRscp
&& mIsGsm == s.mIsGsm
&& mUseOnlyRsrpForLteLevel == s.mUseOnlyRsrpForLteLevel
- && Arrays.equals(mLteRsrpThresholds, s.mLteRsrpThresholds));
+ && Objects.equals(mWcdmaDefaultSignalMeasurement, s.mWcdmaDefaultSignalMeasurement)
+ && Arrays.equals(mLteRsrpThresholds, s.mLteRsrpThresholds)
+ && Arrays.equals(mWcdmaRscpThresholds, s.mWcdmaRscpThresholds));
}
/**
@@ -971,10 +1190,15 @@
+ " " + mLteCqi
+ " " + mLteRsrpBoost
+ " " + mTdScdmaRscp
+ + " " + mWcdmaSignalStrength
+ + " " + mWcdmaRscpAsu
+ + " " + mWcdmaRscp
+ " " + (mIsGsm ? "gsm|lte" : "cdma")
+ " " + (mUseOnlyRsrpForLteLevel ? "use_only_rsrp_for_lte_level" :
"use_rsrp_and_rssnr_for_lte_level")
- + " " + (Arrays.toString(mLteRsrpThresholds)));
+ + " " + mWcdmaDefaultSignalMeasurement
+ + " " + (Arrays.toString(mLteRsrpThresholds))
+ + " " + (Arrays.toString(mWcdmaRscpThresholds)));
}
/** Returns the signal strength related to GSM. */
@@ -983,7 +1207,10 @@
if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) {
level = getTdScdmaLevel();
if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) {
- level = getGsmLevel();
+ level = getWcdmaLevel();
+ if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) {
+ level = getGsmLevel();
+ }
}
}
return level;
@@ -1028,12 +1255,20 @@
mLteCqi = m.getInt("LteCqi");
mLteRsrpBoost = m.getInt("LteRsrpBoost");
mTdScdmaRscp = m.getInt("TdScdma");
+ mWcdmaSignalStrength = m.getInt("WcdmaSignalStrength");
+ mWcdmaRscpAsu = m.getInt("WcdmaRscpAsu");
+ mWcdmaRscp = m.getInt("WcdmaRscp");
mIsGsm = m.getBoolean("IsGsm");
mUseOnlyRsrpForLteLevel = m.getBoolean("UseOnlyRsrpForLteLevel");
+ mWcdmaDefaultSignalMeasurement = m.getString("WcdmaDefaultSignalMeasurement");
ArrayList<Integer> lteRsrpThresholds = m.getIntegerArrayList("lteRsrpThresholds");
for (int i = 0; i < lteRsrpThresholds.size(); i++) {
mLteRsrpThresholds[i] = lteRsrpThresholds.get(i);
}
+ ArrayList<Integer> wcdmaRscpThresholds = m.getIntegerArrayList("wcdmaRscpThresholds");
+ for (int i = 0; i < wcdmaRscpThresholds.size(); i++) {
+ mWcdmaRscpThresholds[i] = wcdmaRscpThresholds.get(i);
+ }
}
/**
@@ -1057,13 +1292,22 @@
m.putInt("LteCqi", mLteCqi);
m.putInt("LteRsrpBoost", mLteRsrpBoost);
m.putInt("TdScdma", mTdScdmaRscp);
+ m.putInt("WcdmaSignalStrength", mWcdmaSignalStrength);
+ m.putInt("WcdmaRscpAsu", mWcdmaRscpAsu);
+ m.putInt("WcdmaRscp", mWcdmaRscp);
m.putBoolean("IsGsm", mIsGsm);
m.putBoolean("UseOnlyRsrpForLteLevel", mUseOnlyRsrpForLteLevel);
+ m.putString("WcdmaDefaultSignalMeasurement", mWcdmaDefaultSignalMeasurement);
ArrayList<Integer> lteRsrpThresholds = new ArrayList<Integer>();
for (int value : mLteRsrpThresholds) {
lteRsrpThresholds.add(value);
}
m.putIntegerArrayList("lteRsrpThresholds", lteRsrpThresholds);
+ ArrayList<Integer> wcdmaRscpThresholds = new ArrayList<Integer>();
+ for (int value : mWcdmaRscpThresholds) {
+ wcdmaRscpThresholds.add(value);
+ }
+ m.putIntegerArrayList("wcdmaRscpThresholds", wcdmaRscpThresholds);
}
/**
@@ -1077,6 +1321,16 @@
}
/**
+ * Gets the default threshold array for determining the display level of WCDMA signal bar.
+ *
+ * @return int array for determining the display level.
+ */
+ private int[] getDefaultWcdmaRscpThresholds() {
+ return CarrierConfigManager.getDefaultConfig().getIntArray(
+ CarrierConfigManager.KEY_WCDMA_RSCP_THRESHOLDS_INT_ARRAY);
+ }
+
+ /**
* log
*/
private static void log(String s) {
diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java
index 78a4c65..7506f4a 100644
--- a/telephony/java/android/telephony/SmsManager.java
+++ b/telephony/java/android/telephony/SmsManager.java
@@ -17,6 +17,7 @@
package android.telephony;
import android.annotation.RequiresPermission;
+import android.annotation.SuppressAutoDoc;
import android.annotation.SystemApi;
import android.app.ActivityThread;
import android.app.PendingIntent;
@@ -338,16 +339,17 @@
/**
* Send a text based SMS without writing it into the SMS Provider.
*
- * <p>Requires Permission:
- * {@link android.Manifest.permission#SEND_SMS} and
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or the calling app has carrier
- * privileges.
- * </p>
+ * <p>Requires Permission: Both {@link android.Manifest.permission#SEND_SMS} and
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE}, or that the calling app has carrier
+ * privileges (see {@link TelephonyManager#hasCarrierPrivileges}), or that the calling app is
+ * the default IMS app (see
+ * {@link CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING}).
*
* @see #sendTextMessage(String, String, String, PendingIntent, PendingIntent)
* @hide
*/
@SystemApi
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(allOf = {
android.Manifest.permission.MODIFY_PHONE_STATE,
android.Manifest.permission.SEND_SMS
@@ -391,6 +393,112 @@
}
/**
+ * Send a text based SMS with messaging options.
+ *
+ * @param destinationAddress the address to send the message to
+ * @param scAddress is the service center address or null to use
+ * the current default SMSC
+ * @param text the body of the message to send
+ * @param sentIntent if not NULL this <code>PendingIntent</code> is
+ * broadcast when the message is successfully sent, or failed.
+ * The result code will be <code>Activity.RESULT_OK</code> for success,
+ * or one of these errors:<br>
+ * <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
+ * <code>RESULT_ERROR_RADIO_OFF</code><br>
+ * <code>RESULT_ERROR_NULL_PDU</code><br>
+ * For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include
+ * the extra "errorCode" containing a radio technology specific value,
+ * generally only useful for troubleshooting.<br>
+ * The per-application based SMS control checks sentIntent. If sentIntent
+ * is NULL the caller will be checked against all unknown applications,
+ * which cause smaller number of SMS to be sent in checking period.
+ * @param deliveryIntent if not NULL this <code>PendingIntent</code> is
+ * broadcast when the message is delivered to the recipient. The
+ * raw pdu of the status report is in the extended data ("pdu").
+ * @param priority Priority level of the message
+ * Refer specification See 3GPP2 C.S0015-B, v2.0, table 4.5.9-1
+ * ---------------------------------
+ * PRIORITY | Level of Priority
+ * ---------------------------------
+ * '00' | Normal
+ * '01' | Interactive
+ * '10' | Urgent
+ * '11' | Emergency
+ * ----------------------------------
+ * Any Other values included Negative considered as Invalid Priority Indicator of the message.
+ * @param expectMore is a boolean to indicate the sending messages through same link or not.
+ * @param validityPeriod Validity Period of the message in mins.
+ * Refer specification 3GPP TS 23.040 V6.8.1 section 9.2.3.12.1.
+ * Validity Period(Minimum) -> 5 mins
+ * Validity Period(Maximum) -> 635040 mins(i.e.63 weeks).
+ * Any Other values included Negative considered as Invalid Validity Period of the message.
+ *
+ * @throws IllegalArgumentException if destinationAddress or text are empty
+ * {@hide}
+ */
+ public void sendTextMessage(
+ String destinationAddress, String scAddress, String text,
+ PendingIntent sentIntent, PendingIntent deliveryIntent,
+ int priority, boolean expectMore, int validityPeriod) {
+ sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent,
+ true /* persistMessage*/, priority, expectMore, validityPeriod);
+ }
+
+ private void sendTextMessageInternal(
+ String destinationAddress, String scAddress, String text,
+ PendingIntent sentIntent, PendingIntent deliveryIntent, boolean persistMessage,
+ int priority, boolean expectMore, int validityPeriod) {
+ if (TextUtils.isEmpty(destinationAddress)) {
+ throw new IllegalArgumentException("Invalid destinationAddress");
+ }
+
+ if (TextUtils.isEmpty(text)) {
+ throw new IllegalArgumentException("Invalid message body");
+ }
+
+ if (priority < 0x00 || priority > 0x03) {
+ throw new IllegalArgumentException("Invalid priority");
+ }
+
+ if (validityPeriod < 0x05 || validityPeriod > 0x09b0a0) {
+ throw new IllegalArgumentException("Invalid validity period");
+ }
+
+ try {
+ ISms iccISms = getISmsServiceOrThrow();
+ if (iccISms != null) {
+ iccISms.sendTextForSubscriberWithOptions(getSubscriptionId(),
+ ActivityThread.currentPackageName(), destinationAddress, scAddress, text,
+ sentIntent, deliveryIntent, persistMessage, priority, expectMore,
+ validityPeriod);
+ }
+ } catch (RemoteException ex) {
+ // ignore it
+ }
+ }
+
+ /**
+ * Send a text based SMS without writing it into the SMS Provider.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or the calling app has carrier
+ * privileges.
+ * </p>
+ *
+ * @see #sendTextMessage(String, String, String, PendingIntent,
+ * PendingIntent, int, boolean, int)
+ * @hide
+ */
+ public void sendTextMessageWithoutPersisting(
+ String destinationAddress, String scAddress, String text,
+ PendingIntent sentIntent, PendingIntent deliveryIntent, int priority,
+ boolean expectMore, int validityPeriod) {
+ sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent,
+ false /* persistMessage */, priority, expectMore, validityPeriod);
+ }
+
+ /**
+ *
* Inject an SMS PDU into the android application framework.
*
* <p>Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE} or carrier
@@ -545,6 +653,140 @@
}
/**
+ * Send a multi-part text based SMS with messaging options. The callee should have already
+ * divided the message into correctly sized parts by calling
+ * <code>divideMessage</code>.
+ *
+ * <p class="note"><strong>Note:</strong> Using this method requires that your app has the
+ * {@link android.Manifest.permission#SEND_SMS} permission.</p>
+ *
+ * <p class="note"><strong>Note:</strong> Beginning with Android 4.4 (API level 19), if
+ * <em>and only if</em> an app is not selected as the default SMS app, the system automatically
+ * writes messages sent using this method to the SMS Provider (the default SMS app is always
+ * responsible for writing its sent messages to the SMS Provider). For information about
+ * how to behave as the default SMS app, see {@link android.provider.Telephony}.</p>
+ *
+ * @param destinationAddress the address to send the message to
+ * @param scAddress is the service center address or null to use
+ * the current default SMSC
+ * @param parts an <code>ArrayList</code> of strings that, in order,
+ * comprise the original message
+ * @param sentIntents if not null, an <code>ArrayList</code> of
+ * <code>PendingIntent</code>s (one for each message part) that is
+ * broadcast when the corresponding message part has been sent.
+ * The result code will be <code>Activity.RESULT_OK</code> for success,
+ * or one of these errors:<br>
+ * <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
+ * <code>RESULT_ERROR_RADIO_OFF</code><br>
+ * <code>RESULT_ERROR_NULL_PDU</code><br>
+ * For <code>RESULT_ERROR_GENERIC_FAILURE</code> each sentIntent may include
+ * the extra "errorCode" containing a radio technology specific value,
+ * generally only useful for troubleshooting.<br>
+ * The per-application based SMS control checks sentIntent. If sentIntent
+ * is NULL the caller will be checked against all unknown applications,
+ * which cause smaller number of SMS to be sent in checking period.
+ * @param deliveryIntents if not null, an <code>ArrayList</code> of
+ * <code>PendingIntent</code>s (one for each message part) that is
+ * broadcast when the corresponding message part has been delivered
+ * to the recipient. The raw pdu of the status report is in the
+ * extended data ("pdu").
+ * @param priority Priority level of the message
+ * Refer specification See 3GPP2 C.S0015-B, v2.0, table 4.5.9-1
+ * ---------------------------------
+ * PRIORITY | Level of Priority
+ * ---------------------------------
+ * '00' | Normal
+ * '01' | Interactive
+ * '10' | Urgent
+ * '11' | Emergency
+ * ----------------------------------
+ * Any Other values included Negative considered as Invalid Priority Indicator of the message.
+ * @param expectMore is a boolean to indicate the sending messages through same link or not.
+ * @param validityPeriod Validity Period of the message in mins.
+ * Refer specification 3GPP TS 23.040 V6.8.1 section 9.2.3.12.1.
+ * Validity Period(Minimum) -> 5 mins
+ * Validity Period(Maximum) -> 635040 mins(i.e.63 weeks).
+ * Any Other values included Negative considered as Invalid Validity Period of the message.
+ *
+ * @throws IllegalArgumentException if destinationAddress or data are empty
+ * {@hide}
+ */
+ public void sendMultipartTextMessage(
+ String destinationAddress, String scAddress, ArrayList<String> parts,
+ ArrayList<PendingIntent> sentIntents, ArrayList<PendingIntent> deliveryIntents,
+ int priority, boolean expectMore, int validityPeriod) {
+ sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents,
+ deliveryIntents, true /* persistMessage*/);
+ }
+
+ private void sendMultipartTextMessageInternal(
+ String destinationAddress, String scAddress, List<String> parts,
+ List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents,
+ boolean persistMessage, int priority, boolean expectMore, int validityPeriod) {
+ if (TextUtils.isEmpty(destinationAddress)) {
+ throw new IllegalArgumentException("Invalid destinationAddress");
+ }
+ if (parts == null || parts.size() < 1) {
+ throw new IllegalArgumentException("Invalid message body");
+ }
+
+ if (priority < 0x00 || priority > 0x03) {
+ throw new IllegalArgumentException("Invalid priority");
+ }
+
+ if (validityPeriod < 0x05 || validityPeriod > 0x09b0a0) {
+ throw new IllegalArgumentException("Invalid validity period");
+ }
+
+ if (parts.size() > 1) {
+ try {
+ ISms iccISms = getISmsServiceOrThrow();
+ if (iccISms != null) {
+ iccISms.sendMultipartTextForSubscriberWithOptions(getSubscriptionId(),
+ ActivityThread.currentPackageName(), destinationAddress, scAddress,
+ parts, sentIntents, deliveryIntents, persistMessage, priority,
+ expectMore, validityPeriod);
+ }
+ } catch (RemoteException ex) {
+ // ignore it
+ }
+ } else {
+ PendingIntent sentIntent = null;
+ PendingIntent deliveryIntent = null;
+ if (sentIntents != null && sentIntents.size() > 0) {
+ sentIntent = sentIntents.get(0);
+ }
+ if (deliveryIntents != null && deliveryIntents.size() > 0) {
+ deliveryIntent = deliveryIntents.get(0);
+ }
+ sendTextMessageInternal(destinationAddress, scAddress, parts.get(0),
+ sentIntent, deliveryIntent, persistMessage, priority, expectMore,
+ validityPeriod);
+ }
+ }
+
+ /**
+ * Send a multi-part text based SMS without writing it into the SMS Provider.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or the calling app has carrier
+ * privileges.
+ * </p>
+ *
+ * @see #sendMultipartTextMessage(String, String, ArrayList, ArrayList,
+ * ArrayList, int, boolean, int)
+ * @hide
+ **/
+ public void sendMultipartTextMessageWithoutPersisting(
+ String destinationAddress, String scAddress, List<String> parts,
+ List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents,
+ int priority, boolean expectMore, int validityPeriod) {
+ sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents,
+ deliveryIntents, false /* persistMessage*/, priority, expectMore,
+ validityPeriod);
+ }
+
+ /**
* Send a data based SMS to a specific application port.
*
* <p class="note"><strong>Note:</strong> Using this method requires that your app has the
@@ -1007,7 +1249,7 @@
* <code>getAllMessagesFromIcc</code>
* @return <code>ArrayList</code> of <code>SmsMessage</code> objects.
*/
- private static ArrayList<SmsMessage> createMessageListFromRawRecords(List<SmsRawData> records) {
+ private ArrayList<SmsMessage> createMessageListFromRawRecords(List<SmsRawData> records) {
ArrayList<SmsMessage> messages = new ArrayList<SmsMessage>();
if (records != null) {
int count = records.size();
@@ -1015,7 +1257,8 @@
SmsRawData data = records.get(i);
// List contains all records, including "free" records (null)
if (data != null) {
- SmsMessage sms = SmsMessage.createFromEfRecord(i+1, data.getBytes());
+ SmsMessage sms = SmsMessage.createFromEfRecord(i+1, data.getBytes(),
+ getSubscriptionId());
if (sms != null) {
messages.add(sms);
}
@@ -1127,7 +1370,11 @@
// SMS send failure result codes
- /** No error. {@hide}*/
+ /**
+ * No error.
+ * @hide
+ */
+ @SystemApi
static public final int RESULT_ERROR_NONE = 0;
/** Generic failure cause */
static public final int RESULT_ERROR_GENERIC_FAILURE = 1;
@@ -1139,12 +1386,113 @@
static public final int RESULT_ERROR_NO_SERVICE = 4;
/** Failed because we reached the sending queue limit. */
static public final int RESULT_ERROR_LIMIT_EXCEEDED = 5;
- /** Failed because FDN is enabled. {@hide} */
+ /**
+ * Failed because FDN is enabled.
+ * @hide
+ */
+ @SystemApi
static public final int RESULT_ERROR_FDN_CHECK_FAILURE = 6;
/** Failed because user denied the sending of this short code. */
static public final int RESULT_ERROR_SHORT_CODE_NOT_ALLOWED = 7;
/** Failed because the user has denied this app ever send premium short codes. */
static public final int RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED = 8;
+ /**
+ * Failed because the radio was not available
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_RADIO_NOT_AVAILABLE = 9;
+ /**
+ * Failed because of network rejection
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_NETWORK_REJECT = 10;
+ /**
+ * Failed because of invalid arguments
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INVALID_ARGUMENTS = 11;
+ /**
+ * Failed because of an invalid state
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INVALID_STATE = 12;
+ /**
+ * Failed because there is no memory
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_NO_MEMORY = 13;
+ /**
+ * Failed because the sms format is not valid
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INVALID_SMS_FORMAT = 14;
+ /**
+ * Failed because of a system error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_SYSTEM_ERROR = 15;
+ /**
+ * Failed because of a modem error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_MODEM_ERROR = 16;
+ /**
+ * Failed because of a network error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_NETWORK_ERROR = 17;
+ /**
+ * Failed because of an encoding error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_ENCODING_ERROR = 18;
+ /**
+ * Failed because of an invalid smsc address
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INVALID_SMSC_ADDRESS = 19;
+ /**
+ * Failed because the operation is not allowed
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_OPERATION_NOT_ALLOWED = 20;
+ /**
+ * Failed because of an internal error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INTERNAL_ERROR = 21;
+ /**
+ * Failed because there are no resources
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_NO_RESOURCES = 22;
+ /**
+ * Failed because the operation was cancelled
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_CANCELLED = 23;
+ /**
+ * Failed because the request is not supported
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_REQUEST_NOT_SUPPORTED = 24;
+
static private final String PHONE_PACKAGE_NAME = "com.android.phone";
diff --git a/telephony/java/android/telephony/SmsMessage.java b/telephony/java/android/telephony/SmsMessage.java
index dcdda86..f336af1 100644
--- a/telephony/java/android/telephony/SmsMessage.java
+++ b/telephony/java/android/telephony/SmsMessage.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.Nullable;
import android.os.Binder;
import android.os.Parcel;
import android.content.res.Resources;
@@ -197,7 +198,10 @@
*/
public static SmsMessage createFromPdu(byte[] pdu, String format) {
SmsMessageBase wrappedMessage;
-
+ if (pdu == null) {
+ Rlog.i(LOG_TAG, "createFromPdu(): pdu is null");
+ return null;
+ }
if (SmsConstants.FORMAT_3GPP2.equals(format)) {
wrappedMessage = com.android.internal.telephony.cdma.SmsMessage.createFromPdu(pdu);
} else if (SmsConstants.FORMAT_3GPP.equals(format)) {
@@ -267,6 +271,31 @@
}
/**
+ * Create an SmsMessage from an SMS EF record.
+ *
+ * @param index Index of SMS record. This should be index in ArrayList
+ * returned by SmsManager.getAllMessagesFromSim + 1.
+ * @param data Record data.
+ * @param subId Subscription Id of the SMS
+ * @return An SmsMessage representing the record.
+ *
+ * @hide
+ */
+ public static SmsMessage createFromEfRecord(int index, byte[] data, int subId) {
+ SmsMessageBase wrappedMessage;
+
+ if (isCdmaVoice(subId)) {
+ wrappedMessage = com.android.internal.telephony.cdma.SmsMessage.createFromEfRecord(
+ index, data);
+ } else {
+ wrappedMessage = com.android.internal.telephony.gsm.SmsMessage.createFromEfRecord(
+ index, data);
+ }
+
+ return wrappedMessage != null ? new SmsMessage(wrappedMessage) : null;
+ }
+
+ /**
* Get the TP-Layer-Length for the given SMS-SUBMIT PDU Basically, the
* length in bytes (not hex chars) less the SMSC header
*
@@ -534,8 +563,16 @@
/**
* Returns the originating address (sender) of this SMS message in String
- * form or null if unavailable
+ * form or null if unavailable.
+ *
+ * <p>If the address is a GSM-formatted address, it will be in a format specified by 3GPP
+ * 23.040 Sec 9.1.2.5. If it is a CDMA address, it will be a format specified by 3GPP2
+ * C.S005-D Table 2.7.1.3.2.4-2. The choice of format is carrier-specific, so callers of the
+ * should be careful to avoid assumptions about the returned content.
+ *
+ * @return a String representation of the address; null if unavailable.
*/
+ @Nullable
public String getOriginatingAddress() {
return mWrappedSmsMessage.getOriginatingAddress();
}
@@ -818,6 +855,7 @@
int activePhone = TelephonyManager.getDefault().getCurrentPhoneType(subId);
return (PHONE_TYPE_CDMA == activePhone);
}
+
/**
* Decide if the carrier supports long SMS.
* {@hide}
diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java
index 38408fe..936505c 100644
--- a/telephony/java/android/telephony/SubscriptionInfo.java
+++ b/telephony/java/android/telephony/SubscriptionInfo.java
@@ -17,6 +17,7 @@
package android.telephony;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
@@ -34,6 +35,8 @@
import android.util.DisplayMetrics;
import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.List;
/**
* A Parcelable class for Subscription Information.
@@ -332,12 +335,7 @@
return this.mCountryIso;
}
- /**
- * @return whether the subscription is an embedded one.
- * @hide
- *
- * TODO(b/35851809): Make this public.
- */
+ /** @return whether the subscription is an eUICC one. */
public boolean isEmbedded() {
return this.mIsEmbedded;
}
@@ -351,9 +349,9 @@
* @return whether the app is authorized to manage this subscription per its metadata.
* @throws UnsupportedOperationException if this subscription is not embedded.
* @hide
- *
- * TODO(b/35851809): Make this public.
+ * @deprecated - Do not use.
*/
+ @Deprecated
public boolean canManageSubscription(Context context) {
return canManageSubscription(context, context.getPackageName());
}
@@ -367,7 +365,9 @@
* @return whether the app is authorized to manage this subscription per its metadata.
* @throws UnsupportedOperationException if this subscription is not embedded.
* @hide
+ * @deprecated - Do not use.
*/
+ @Deprecated
public boolean canManageSubscription(Context context, String packageName) {
if (!isEmbedded()) {
throw new UnsupportedOperationException("Not an embedded subscription");
@@ -395,14 +395,14 @@
* @return the {@link UiccAccessRule}s dictating who is authorized to manage this subscription.
* @throws UnsupportedOperationException if this subscription is not embedded.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
- public @Nullable UiccAccessRule[] getAccessRules() {
+ @SystemApi
+ public @Nullable List<UiccAccessRule> getAccessRules() {
if (!isEmbedded()) {
throw new UnsupportedOperationException("Not an embedded subscription");
}
- return mAccessRules;
+ if (mAccessRules == null) return null;
+ return Arrays.asList(mAccessRules);
}
/**
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 1fae04b..5a60aa6 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -17,12 +17,16 @@
package android.telephony;
import android.annotation.NonNull;
+import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
-import android.annotation.SystemApi;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.SuppressAutoDoc;
+import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.net.INetworkPolicyManager;
@@ -45,9 +49,6 @@
/**
* SubscriptionManager is the application interface to SubscriptionController
* and provides information about the current Telephony Subscriptions.
- * <p>
- * All SDK public methods require android.Manifest.permission.READ_PHONE_STATE unless otherwise
- * specified.
*/
@SystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)
public class SubscriptionManager {
@@ -541,9 +542,9 @@
* onSubscriptionsChanged overridden.
*/
public void addOnSubscriptionsChangedListener(OnSubscriptionsChangedListener listener) {
- String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
+ String pkgName = mContext != null ? mContext.getOpPackageName() : "<unknown>";
if (DBG) {
- logd("register OnSubscriptionsChangedListener pkgForDebug=" + pkgForDebug
+ logd("register OnSubscriptionsChangedListener pkgName=" + pkgName
+ " listener=" + listener);
}
try {
@@ -552,7 +553,7 @@
ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService(
"telephony.registry"));
if (tr != null) {
- tr.addOnSubscriptionsChangedListener(pkgForDebug, listener.callback);
+ tr.addOnSubscriptionsChangedListener(pkgName, listener.callback);
}
} catch (RemoteException ex) {
// Should not happen
@@ -588,9 +589,15 @@
/**
* Get the active SubscriptionInfo with the input subId.
*
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see
+ * {@link TelephonyManager#hasCarrierPrivileges}).
+ *
* @param subId The unique SubscriptionInfo key in database.
* @return SubscriptionInfo, maybe null if its not active.
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
+ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public SubscriptionInfo getActiveSubscriptionInfo(int subId) {
if (VDBG) logd("[getActiveSubscriptionInfo]+ subId=" + subId);
if (!isValidSubscriptionId(subId)) {
@@ -644,9 +651,16 @@
/**
* Get the active SubscriptionInfo associated with the slotIndex
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see
+ * {@link TelephonyManager#hasCarrierPrivileges}).
+ *
* @param slotIndex the slot which the subscription is inserted
* @return SubscriptionInfo, maybe null if its not active
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
+ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public SubscriptionInfo getActiveSubscriptionInfoForSimSlotIndex(int slotIndex) {
if (VDBG) logd("[getActiveSubscriptionInfoForSimSlotIndex]+ slotIndex=" + slotIndex);
if (!isValidSlotIndex(slotIndex)) {
@@ -698,6 +712,11 @@
* Get the SubscriptionInfo(s) of the currently inserted SIM(s). The records will be sorted
* by {@link SubscriptionInfo#getSimSlotIndex} then by {@link SubscriptionInfo#getSubscriptionId}.
*
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see
+ * {@link TelephonyManager#hasCarrierPrivileges}). In the latter case, only records accessible
+ * to the calling app are returned.
+ *
* @return Sorted list of the currently {@link SubscriptionInfo} records available on the device.
* <ul>
* <li>
@@ -714,6 +733,8 @@
* </li>
* </ul>
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
+ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public List<SubscriptionInfo> getActiveSubscriptionInfoList() {
List<SubscriptionInfo> result = null;
@@ -751,10 +772,13 @@
* if the list is non-empty the list is sorted by {@link SubscriptionInfo#getSimSlotIndex}
* then by {@link SubscriptionInfo#getSubscriptionId}.
* </ul>
- * @hide
*
- * TODO(b/35851809): Make this a SystemApi.
+ * <p>
+ * Permissions android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE is required
+ * for #getAvailableSubscriptionInfoList to be invoked.
+ * @hide
*/
+ @SystemApi
public List<SubscriptionInfo> getAvailableSubscriptionInfoList() {
List<SubscriptionInfo> result = null;
@@ -792,9 +816,6 @@
* if the list is non-empty the list is sorted by {@link SubscriptionInfo#getSimSlotIndex}
* then by {@link SubscriptionInfo#getSubscriptionId}.
* </ul>
- * @hide
- *
- * TODO(b/35851809): Make this public.
*/
public List<SubscriptionInfo> getAccessibleSubscriptionInfoList() {
List<SubscriptionInfo> result = null;
@@ -820,9 +841,8 @@
*
* <p>Requires the {@link android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+ @SystemApi
public void requestEmbeddedSubscriptionInfoListRefresh() {
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -857,10 +877,18 @@
}
/**
+ *
+ * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see
+ * {@link TelephonyManager#hasCarrierPrivileges}). In the latter case, the count will include
+ * only those subscriptions accessible to the caller.
+ *
* @return the current number of active subscriptions. There is no guarantee the value
* returned by this method will be the same as the length of the list returned by
* {@link #getActiveSubscriptionInfoList}.
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
+ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public int getActiveSubscriptionInfoCount() {
int result = 0;
@@ -917,6 +945,8 @@
if (iSub != null) {
// FIXME: This returns 1 on success, 0 on error should should we return it?
iSub.addSubInfoRecord(iccId, slotIndex);
+ } else {
+ logd("[addSubscriptionInfoRecord]- ISub service is null");
}
} catch (RemoteException ex) {
// ignore it
@@ -1668,4 +1698,53 @@
throw e.rethrowFromSystemServer();
}
}
+
+ /**
+ * Checks whether the app with the given context is authorized to manage the given subscription
+ * according to its metadata. Only supported for embedded subscriptions (if
+ * {@code SubscriptionInfo#isEmbedded} returns true).
+ *
+ * @param info The subscription to check.
+ * @return whether the app is authorized to manage this subscription per its metadata.
+ * @throws IllegalArgumentException if this subscription is not embedded.
+ */
+ public boolean canManageSubscription(SubscriptionInfo info) {
+ return canManageSubscription(info, mContext.getPackageName());
+ }
+
+ /**
+ * Checks whether the given app is authorized to manage the given subscription. An app can only
+ * be authorized if it is included in the {@link android.telephony.UiccAccessRule} of the
+ * {@link android.telephony.SubscriptionInfo} with the access status.
+ * Only supported for embedded subscriptions (if {@link SubscriptionInfo#isEmbedded}
+ * returns true).
+ *
+ * @param info The subscription to check.
+ * @param packageName Package name of the app to check.
+ * @return whether the app is authorized to manage this subscription per its access rules.
+ * @throws IllegalArgumentException if this subscription is not embedded.
+ * @hide
+ */
+ public boolean canManageSubscription(SubscriptionInfo info, String packageName) {
+ if (!info.isEmbedded()) {
+ throw new IllegalArgumentException("Not an embedded subscription");
+ }
+ if (info.getAccessRules() == null) {
+ return false;
+ }
+ PackageManager packageManager = mContext.getPackageManager();
+ PackageInfo packageInfo;
+ try {
+ packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES);
+ } catch (PackageManager.NameNotFoundException e) {
+ throw new IllegalArgumentException("Unknown package: " + packageName, e);
+ }
+ for (UiccAccessRule rule : info.getAccessRules()) {
+ if (rule.getCarrierPrivilegeStatus(packageInfo)
+ == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) {
+ return true;
+ }
+ }
+ return false;
+ }
}
diff --git a/telephony/java/android/telephony/Telephony.java b/telephony/java/android/telephony/Telephony.java
index e633053..f2438b8 100644
--- a/telephony/java/android/telephony/Telephony.java
+++ b/telephony/java/android/telephony/Telephony.java
@@ -33,6 +33,7 @@
import android.telephony.ServiceState;
import android.telephony.SmsMessage;
import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Patterns;
@@ -1102,6 +1103,21 @@
"android.provider.Telephony.MMS_DOWNLOADED";
/**
+ * Broadcast Action: A debug code has been entered in the dialer. This intent is
+ * broadcast by the system and OEM telephony apps may need to receive these broadcasts.
+ * These "secret codes" are used to activate developer menus by dialing certain codes.
+ * And they are of the form {@code *#*#<code>#*#*}. The intent will have the data
+ * URI: {@code android_secret_code://<code>}. It is possible that a manifest
+ * receiver would be woken up even if it is not currently running.
+ *
+ * <p>Requires {@code android.Manifest.permission#CONTROL_INCALL_EXPERIENCE} to
+ * send and receive.</p>
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String SECRET_CODE_ACTION =
+ "android.provider.Telephony.SECRET_CODE";
+
+ /**
* Broadcast action: When the default SMS package changes,
* the previous default SMS package and the new default SMS
* package are sent this broadcast to notify them of the change.
@@ -2721,6 +2737,7 @@
* This should be spread to other technologies,
* but is currently only used for LTE (14) and eHRPD (13).
* <P>Type: INTEGER</P>
+ * @deprecated this column is no longer supported, use {@link #NETWORK_TYPE_BITMASK} instead
*/
@Deprecated
public static final String BEARER = "bearer";
@@ -2733,13 +2750,14 @@
* Bitmask for a radio tech R is (1 << (R - 1))
* <P>Type: INTEGER</P>
* @hide
+ * @deprecated this column is no longer supported, use {@link #NETWORK_TYPE_BITMASK} instead
*/
@Deprecated
public static final String BEARER_BITMASK = "bearer_bitmask";
/**
* Radio technology (network type) bitmask.
- * To check what values can be contained, refer to
+ * To check what values can be contained, refer to the NETWORK_TYPE_ constants in
* {@link android.telephony.TelephonyManager}.
* Bitmask for a radio tech R is (1 << (R - 1))
* <P>Type: INTEGER</P>
@@ -2882,12 +2900,30 @@
* @hide
*/
public static final int OWNED_BY_DPC = 0;
+
/**
* Possible value for the OWNED_BY field.
* APN is owned by other sources.
* @hide
*/
public static final int OWNED_BY_OTHERS = 1;
+
+ /**
+ * The APN set id. When the user manually selects an APN or the framework sets an APN as
+ * preferred, all APNs with the same set id as the selected APN should be prioritized over
+ * APNs in other sets.
+ * @hide
+ */
+ public static final String APN_SET_ID = "apn_set_id";
+
+ /**
+ * Possible value for the APN_SET_ID field. By default APNs will not belong to a set. If the
+ * user manually selects an APN with no set set, there is no need to prioritize any specific
+ * APN set ids.
+ * @hide
+ */
+ public static final int NO_SET_SET = 0;
+
}
/**
@@ -3147,8 +3183,8 @@
values.put(RIL_VOICE_RADIO_TECHNOLOGY, state.getRilVoiceRadioTechnology());
values.put(RIL_DATA_RADIO_TECHNOLOGY, state.getRilDataRadioTechnology());
values.put(CSS_INDICATOR, state.getCssIndicator());
- values.put(NETWORK_ID, state.getNetworkId());
- values.put(SYSTEM_ID, state.getSystemId());
+ values.put(NETWORK_ID, state.getCdmaNetworkId());
+ values.put(SYSTEM_ID, state.getCdmaSystemId());
values.put(CDMA_ROAMING_INDICATOR, state.getCdmaRoamingIndicator());
values.put(CDMA_DEFAULT_ROAMING_INDICATOR, state.getCdmaDefaultRoamingIndicator());
values.put(CDMA_ERI_ICON_INDEX, state.getCdmaEriIconIndex());
@@ -3278,13 +3314,13 @@
public static final String CSS_INDICATOR = "css_indicator";
/**
- * This is the same as {@link ServiceState#getNetworkId()}.
+ * This is the same as {@link ServiceState#getCdmaNetworkId()}.
* @hide
*/
public static final String NETWORK_ID = "network_id";
/**
- * This is the same as {@link ServiceState#getSystemId()}.
+ * This is the same as {@link ServiceState#getCdmaSystemId()}.
* @hide
*/
public static final String SYSTEM_ID = "system_id";
@@ -3335,73 +3371,118 @@
}
/**
- * Contains carrier identification information.
- * @hide
+ * Contains carrier identification information for the current subscriptions.
+ * @see SubscriptionManager#getActiveSubscriptionIdList()
*/
- public static final class CarrierIdentification implements BaseColumns {
+ public static final class CarrierId implements BaseColumns {
/**
- * Numeric operator ID (as String). {@code MCC + MNC}
- * <P>Type: TEXT </P>
+ * Not instantiable.
+ * @hide
*/
- public static final String MCCMNC = "mccmnc";
+ private CarrierId() {}
/**
- * Group id level 1 (as String).
- * <P>Type: TEXT </P>
+ * The {@code content://} style URI for this provider.
*/
- public static final String GID1 = "gid1";
+ public static final Uri CONTENT_URI = Uri.parse("content://carrier_id");
/**
- * Group id level 2 (as String).
- * <P>Type: TEXT </P>
+ * The authority string for the CarrierId Provider
+ * @hide
*/
- public static final String GID2 = "gid2";
+ public static final String AUTHORITY = "carrier_id";
+
/**
- * Public Land Mobile Network name.
- * <P>Type: TEXT </P>
+ * Generates a content {@link Uri} used to receive updates on carrier identity change
+ * on the given subscriptionId
+ * <p>
+ * Use this {@link Uri} with a {@link ContentObserver} to be notified of changes to the
+ * carrier identity {@link TelephonyManager#getSimCarrierId()}
+ * while your app is running. You can also use a {@link JobService} to ensure your app
+ * is notified of changes to the {@link Uri} even when it is not running.
+ * Note, however, that using a {@link JobService} does not guarantee timely delivery of
+ * updates to the {@link Uri}.
+ *
+ * @param subscriptionId the subscriptionId to receive updates on
+ * @return the Uri used to observe carrier identity changes
*/
- public static final String PLMN = "plmn";
+ public static Uri getUriForSubscriptionId(int subscriptionId) {
+ return CONTENT_URI.buildUpon().appendEncodedPath(
+ String.valueOf(subscriptionId)).build();
+ }
/**
- * Prefix xpattern of IMSI (International Mobile Subscriber Identity).
+ * A user facing carrier name.
+ * @see TelephonyManager#getSimCarrierIdName()
* <P>Type: TEXT </P>
*/
- public static final String IMSI_PREFIX_XPATTERN = "imsi_prefix_xpattern";
-
- /**
- * Service Provider Name.
- * <P>Type: TEXT </P>
- */
- public static final String SPN = "spn";
-
- /**
- * Prefer APN name.
- * <P>Type: TEXT </P>
- */
- public static final String APN = "apn";
-
- /**
- * Prefix of Integrated Circuit Card Identifier.
- * <P>Type: TEXT </P>
- */
- public static final String ICCID_PREFIX = "iccid_prefix";
-
- /**
- * User facing carrier name.
- * <P>Type: TEXT </P>
- */
- public static final String NAME = "carrier_name";
+ public static final String CARRIER_NAME = "carrier_name";
/**
* A unique carrier id
+ * @see TelephonyManager#getSimCarrierId()
* <P>Type: INTEGER </P>
*/
- public static final String CID = "carrier_id";
+ public static final String CARRIER_ID = "carrier_id";
/**
- * The {@code content://} URI for this table.
+ * Contains mappings between matching rules with carrier id for all carriers.
+ * @hide
*/
- public static final Uri CONTENT_URI = Uri.parse("content://carrier_identification");
+ public static final class All implements BaseColumns {
+ /**
+ * Numeric operator ID (as String). {@code MCC + MNC}
+ * <P>Type: TEXT </P>
+ */
+ public static final String MCCMNC = "mccmnc";
+
+ /**
+ * Group id level 1 (as String).
+ * <P>Type: TEXT </P>
+ */
+ public static final String GID1 = "gid1";
+
+ /**
+ * Group id level 2 (as String).
+ * <P>Type: TEXT </P>
+ */
+ public static final String GID2 = "gid2";
+
+ /**
+ * Public Land Mobile Network name.
+ * <P>Type: TEXT </P>
+ */
+ public static final String PLMN = "plmn";
+
+ /**
+ * Prefix xpattern of IMSI (International Mobile Subscriber Identity).
+ * <P>Type: TEXT </P>
+ */
+ public static final String IMSI_PREFIX_XPATTERN = "imsi_prefix_xpattern";
+
+ /**
+ * Service Provider Name.
+ * <P>Type: TEXT </P>
+ */
+ public static final String SPN = "spn";
+
+ /**
+ * Prefer APN name.
+ * <P>Type: TEXT </P>
+ */
+ public static final String APN = "apn";
+
+ /**
+ * Prefix of Integrated Circuit Card Identifier.
+ * <P>Type: TEXT </P>
+ */
+ public static final String ICCID_PREFIX = "iccid_prefix";
+
+ /**
+ * The {@code content://} URI for this table.
+ */
+ public static final Uri CONTENT_URI = Uri.parse("content://carrier_id/all");
+ }
}
}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 04cbbd8..9de1355 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -22,39 +22,43 @@
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
-import android.annotation.SuppressLint;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.SuppressAutoDoc;
+import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.TestApi;
import android.annotation.WorkerThread;
import android.app.ActivityThread;
import android.app.PendingIntent;
-import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkStats;
import android.net.Uri;
+import android.os.AsyncTask;
import android.os.BatteryStats;
import android.os.Bundle;
import android.os.Handler;
import android.os.PersistableBundle;
+import android.os.Process;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ServiceManager;
import android.os.SystemProperties;
-import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.service.carrier.CarrierIdentifier;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
import android.telephony.VisualVoicemailService.VisualVoicemailTask;
-import android.telephony.ims.feature.ImsFeature;
+import android.telephony.ims.aidl.IImsConfig;
+import android.telephony.ims.aidl.IImsMmTelFeature;
+import android.telephony.ims.aidl.IImsRcsFeature;
+import android.telephony.ims.aidl.IImsRegistration;
+import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.util.Log;
-import com.android.ims.internal.IImsMMTelFeature;
-import com.android.ims.internal.IImsRcsFeature;
-import com.android.ims.internal.IImsRegistration;
import com.android.ims.internal.IImsServiceFeatureCallback;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telecom.ITelecomService;
@@ -62,7 +66,6 @@
import com.android.internal.telephony.IPhoneSubInfo;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.ITelephonyRegistry;
-import com.android.internal.telephony.OperatorInfo;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.TelephonyProperties;
@@ -74,6 +77,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.concurrent.Executor;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -109,6 +113,13 @@
BatteryStats.RESULT_RECEIVER_CONTROLLER_KEY;
/**
+ * The process name of the Phone app as well as many other apps that use this process name, such
+ * as settings and vendor components.
+ * @hide
+ */
+ public static final String PHONE_PROCESS_NAME = "com.android.phone";
+
+ /**
* The allowed states of Wi-Fi calling.
*
* @hide
@@ -205,6 +216,10 @@
return ActivityThread.currentOpPackageName();
}
+ private boolean isSystemProcess() {
+ return Process.myUid() == Process.SYSTEM_UID;
+ }
+
/**
* Returns the multi SIM variant
* Returns DSDS for Dual SIM Dual Standby
@@ -319,10 +334,12 @@
*
* <p>
* The {@link #EXTRA_STATE} extra indicates the new call state.
- * If the new state is RINGING, a second extra
- * {@link #EXTRA_INCOMING_NUMBER} provides the incoming phone number as
- * a String.
- *
+ * If a receiving app has {@link android.Manifest.permission#READ_CALL_LOG} permission, a second
+ * extra {@link #EXTRA_INCOMING_NUMBER} provides the phone number for incoming and outoing calls
+ * as a String. Note: If the receiving app has
+ * {@link android.Manifest.permission#READ_CALL_LOG} and
+ * {@link android.Manifest.permission#READ_PHONE_STATE} permission, it will receive the
+ * broadcast twice; one with the phone number and another without it.
* <p class="note">
* This was a {@link android.content.Context#sendStickyBroadcast sticky}
* broadcast in version 1.0, but it is no longer sticky.
@@ -894,6 +911,61 @@
public static final String EVENT_CALL_FORWARDED =
"android.telephony.event.EVENT_CALL_FORWARDED";
+ /**
+ * {@link android.telecom.Connection} event used to indicate that a supplementary service
+ * notification has been received.
+ * <p>
+ * Sent via {@link android.telecom.Connection#sendConnectionEvent(String, Bundle)}.
+ * The {@link Bundle} parameter is expected to include the following extras:
+ * <ul>
+ * <li>{@link #EXTRA_NOTIFICATION_TYPE} - the notification type.</li>
+ * <li>{@link #EXTRA_NOTIFICATION_CODE} - the notification code.</li>
+ * <li>{@link #EXTRA_NOTIFICATION_MESSAGE} - human-readable message associated with the
+ * supplementary service notification.</li>
+ * </ul>
+ * @hide
+ */
+ public static final String EVENT_SUPPLEMENTARY_SERVICE_NOTIFICATION =
+ "android.telephony.event.EVENT_SUPPLEMENTARY_SERVICE_NOTIFICATION";
+
+ /**
+ * Integer extra key used with {@link #EVENT_SUPPLEMENTARY_SERVICE_NOTIFICATION} which indicates
+ * the type of supplementary service notification which occurred.
+ * Will be either
+ * {@link com.android.internal.telephony.gsm.SuppServiceNotification#NOTIFICATION_TYPE_CODE_1}
+ * or
+ * {@link com.android.internal.telephony.gsm.SuppServiceNotification#NOTIFICATION_TYPE_CODE_2}
+ * <p>
+ * Set in the extras for the {@link #EVENT_SUPPLEMENTARY_SERVICE_NOTIFICATION} connection event.
+ * @hide
+ */
+ public static final String EXTRA_NOTIFICATION_TYPE =
+ "android.telephony.extra.NOTIFICATION_TYPE";
+
+ /**
+ * Integer extra key used with {@link #EVENT_SUPPLEMENTARY_SERVICE_NOTIFICATION} which indicates
+ * the supplementary service notification which occurred.
+ * <p>
+ * Depending on the {@link #EXTRA_NOTIFICATION_TYPE}, the code will be one of the {@code CODE_*}
+ * codes defined in {@link com.android.internal.telephony.gsm.SuppServiceNotification}.
+ * <p>
+ * Set in the extras for the {@link #EVENT_SUPPLEMENTARY_SERVICE_NOTIFICATION} connection event.
+ * @hide
+ */
+ public static final String EXTRA_NOTIFICATION_CODE =
+ "android.telephony.extra.NOTIFICATION_CODE";
+
+ /**
+ * {@link CharSequence} extra key used with {@link #EVENT_SUPPLEMENTARY_SERVICE_NOTIFICATION}
+ * which contains a human-readable message which can be displayed to the user for the
+ * supplementary service notification.
+ * <p>
+ * Set in the extras for the {@link #EVENT_SUPPLEMENTARY_SERVICE_NOTIFICATION} connection event.
+ * @hide
+ */
+ public static final String EXTRA_NOTIFICATION_MESSAGE =
+ "android.telephony.extra.NOTIFICATION_MESSAGE";
+
/* Visual voicemail protocols */
/**
@@ -966,6 +1038,13 @@
public static final int UNKNOWN_CARRIER_ID = -1;
/**
+ * An unknown carrier id list version.
+ * @hide
+ */
+ @TestApi
+ public static final int UNKNOWN_CARRIER_ID_LIST_VERSION = -1;
+
+ /**
* Broadcast Action: The subscription carrier identity has changed.
* This intent could be sent on the following events:
* <ul>
@@ -993,7 +1072,7 @@
/**
* An int extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which indicates
- * the updated carrier id {@link TelephonyManager#getAndroidCarrierIdForSubscription()} of
+ * the updated carrier id {@link TelephonyManager#getSimCarrierId()} of
* the current subscription.
* <p>Will be {@link TelephonyManager#UNKNOWN_CARRIER_ID} if the subscription is unavailable or
* the carrier cannot be identified.
@@ -1003,7 +1082,7 @@
/**
* An string extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which
* indicates the updated carrier name of the current subscription.
- * {@see TelephonyManager#getSubscriptionCarrierName()}
+ * {@see TelephonyManager#getSimCarrierIdName()}
* <p>Carrier name is a user-facing name of the carrier id {@link #EXTRA_CARRIER_ID},
* usually the brand name of the subsidiary (e.g. T-Mobile).
*/
@@ -1026,7 +1105,11 @@
* Returns the software version number for the device, for example,
* the IMEI/SV for GSM phones. Return null if the software version is
* not available.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getDeviceSoftwareVersion() {
return getDeviceSoftwareVersion(getSlotIndex());
@@ -1058,10 +1141,14 @@
* Returns the unique device ID, for example, the IMEI for GSM and the MEID
* or ESN for CDMA phones. Return null if device ID is not available.
*
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
* @deprecated Use (@link getImei} which returns IMEI for GSM or (@link getMeid} which returns
* MEID for CDMA.
*/
@Deprecated
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getDeviceId() {
try {
@@ -1080,12 +1167,16 @@
* Returns the unique device ID of a subscription, for example, the IMEI for
* GSM and the MEID for CDMA phones. Return null if device ID is not available.
*
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
* @param slotIndex of which deviceID is returned
*
* @deprecated Use (@link getImei} which returns IMEI for GSM or (@link getMeid} which returns
* MEID for CDMA.
*/
@Deprecated
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getDeviceId(int slotIndex) {
// FIXME this assumes phoneId == slotIndex
@@ -1104,7 +1195,11 @@
/**
* Returns the IMEI (International Mobile Equipment Identity). Return null if IMEI is not
* available.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getImei() {
return getImei(getSlotIndex());
@@ -1114,8 +1209,12 @@
* Returns the IMEI (International Mobile Equipment Identity). Return null if IMEI is not
* available.
*
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
* @param slotIndex of which IMEI is returned
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getImei(int slotIndex) {
ITelephony telephony = getITelephony();
@@ -1132,7 +1231,11 @@
/**
* Returns the MEID (Mobile Equipment Identifier). Return null if MEID is not available.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getMeid() {
return getMeid(getSlotIndex());
@@ -1141,8 +1244,12 @@
/**
* Returns the MEID (Mobile Equipment Identifier). Return null if MEID is not available.
*
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
* @param slotIndex of which MEID is returned
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getMeid(int slotIndex) {
ITelephony telephony = getITelephony();
@@ -1158,12 +1265,15 @@
}
/**
- * Returns the NAI. Return null if NAI is not available.
+ * Returns the Network Access Identifier (NAI). Return null if NAI is not available.
*
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
- /** {@hide}*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
+ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getNai() {
- return getNai(getSlotIndex());
+ return getNaiBySubscriberId(getSubId());
}
/**
@@ -1174,11 +1284,18 @@
/** {@hide}*/
public String getNai(int slotIndex) {
int[] subId = SubscriptionManager.getSubId(slotIndex);
+ if (subId == null) {
+ return null;
+ }
+ return getNaiBySubscriberId(subId[0]);
+ }
+
+ private String getNaiBySubscriberId(int subId) {
try {
IPhoneSubInfo info = getSubscriberInfo();
if (info == null)
return null;
- String nai = info.getNaiForSubscriber(subId[0], mContext.getOpPackageName());
+ String nai = info.getNaiForSubscriber(subId, mContext.getOpPackageName());
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Rlog.v(TAG, "Nai = " + nai);
}
@@ -1650,10 +1767,17 @@
* invalid subscription ID is pinned to the TelephonyManager, the returned config will contain
* default values.
*
+ * <p>This method may take several seconds to complete, so it should only be called from a
+ * worker thread.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
* @see CarrierConfigManager#getConfigForSubId(int)
* @see #createForSubscriptionId(int)
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@WorkerThread
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public PersistableBundle getCarrierConfig() {
@@ -1688,24 +1812,23 @@
}
/**
- * Returns the ISO country code equivalent of the current registered
- * operator's MCC (Mobile Country Code).
+ * Returns the ISO country code equivalent of the MCC (Mobile Country Code) of the current
+ * registered operator or the cell nearby, if available.
+ * .
* <p>
- * Availability: Only when user is registered to a network. Result may be
- * unreliable on CDMA networks (use {@link #getPhoneType()} to determine if
- * on a CDMA network).
+ * Note: Result may be unreliable on CDMA networks (use {@link #getPhoneType()} to determine
+ * if on a CDMA network).
*/
public String getNetworkCountryIso() {
return getNetworkCountryIsoForPhone(getPhoneId());
}
/**
- * Returns the ISO country code equivalent of the current registered
- * operator's MCC (Mobile Country Code) of a subscription.
+ * Returns the ISO country code equivalent of the MCC (Mobile Country Code) of the current
+ * registered operator or the cell nearby, if available.
* <p>
- * Availability: Only when user is registered to a network. Result may be
- * unreliable on CDMA networks (use {@link #getPhoneType()} to determine if
- * on a CDMA network).
+ * Note: Result may be unreliable on CDMA networks (use {@link #getPhoneType()} to determine
+ * if on a CDMA network).
*
* @param subId for which Network CountryIso is returned
* @hide
@@ -1853,6 +1976,9 @@
* If this object has been created with {@link #createForSubscriptionId}, applies to the given
* subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
*
+ * <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 the network type
*
* @see #NETWORK_TYPE_UNKNOWN
@@ -1872,6 +1998,7 @@
* @see #NETWORK_TYPE_EHRPD
* @see #NETWORK_TYPE_HSPAP
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public int getDataNetworkType() {
return getDataNetworkType(getSubId(SubscriptionManager.getDefaultDataSubscriptionId()));
@@ -1906,7 +2033,11 @@
/**
* Returns the NETWORK_TYPE_xxxx for voice
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public int getVoiceNetworkType() {
return getVoiceNetworkType(getSubId());
@@ -2492,7 +2623,11 @@
/**
* Returns the serial number of the SIM, if applicable. Return null if it is
* unavailable.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getSimSerialNumber() {
return getSimSerialNumber(getSubId());
@@ -2561,6 +2696,53 @@
}
}
+ /**
+ * Gets all the UICC slots.
+ *
+ * @return UiccSlotInfo array.
+ *
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ public UiccSlotInfo[] getUiccSlotsInfo() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony == null) {
+ return null;
+ }
+ return telephony.getUiccSlotsInfo();
+ } catch (RemoteException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Map logicalSlot to physicalSlot, and activate the physicalSlot if it is inactive. For
+ * example, passing the physicalSlots array [1, 0] means mapping the first item 1, which is
+ * physical slot index 1, to the logical slot 0; and mapping the second item 0, which is
+ * physical slot index 0, to the logical slot 1. The index of the array means the index of the
+ * logical slots.
+ *
+ * @param physicalSlots Index i in the array representing physical slot for phone i. The array
+ * size should be same as {@link #getPhoneCount()}.
+ * @return boolean Return true if the switch succeeds, false if the switch fails.
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public boolean switchSlots(int[] physicalSlots) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony == null) {
+ return false;
+ }
+ return telephony.switchSlots(physicalSlots);
+ } catch (RemoteException e) {
+ return false;
+ }
+ }
+
//
//
// Subscriber Info
@@ -2570,7 +2752,11 @@
/**
* Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
* Return null if it is unavailable.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getSubscriberId() {
return getSubscriberId(getSubId());
@@ -2613,18 +2799,17 @@
* @return ImsiEncryptionInfo Carrier specific information that will be used to encrypt the
* IMSI and IMPI. This includes the public key and the key identifier. This information
* will be stored in the device keystore. The system will return a null when no key was
- * found, and the carrier does not require a key. The system will throw the following
- * exceptions:
- * 1. IllegalArgumentException when an invalid key is sent.
- * 2. RuntimeException if the key is required but not found; and also if there was an
- * internal exception.
+ * found, and the carrier does not require a key. The system will throw
+ * IllegalArgumentException when an invalid key is sent or when key is required but
+ * not found.
* @hide
*/
public ImsiEncryptionInfo getCarrierInfoForImsiEncryption(int keyType) {
try {
IPhoneSubInfo info = getSubscriberInfo();
if (info == null) {
- throw new RuntimeException("IMSI error: Subscriber Info is null");
+ Rlog.e(TAG,"IMSI error: Subscriber Info is null");
+ return null;
}
int subId = getSubId(SubscriptionManager.getDefaultDataSubscriptionId());
if (keyType != KEY_TYPE_EPDG && keyType != KEY_TYPE_WLAN) {
@@ -2632,19 +2817,46 @@
}
ImsiEncryptionInfo imsiEncryptionInfo = info.getCarrierInfoForImsiEncryption(
subId, keyType, mContext.getOpPackageName());
- if (imsiEncryptionInfo == null
- && isImsiEncryptionRequired(subId, keyType)) {
+ if (imsiEncryptionInfo == null && isImsiEncryptionRequired(subId, keyType)) {
Rlog.e(TAG, "IMSI error: key is required but not found");
- throw new RuntimeException("IMSI error: key is required but not found");
+ throw new IllegalArgumentException("IMSI error: key is required but not found");
}
return imsiEncryptionInfo;
} catch (RemoteException ex) {
Rlog.e(TAG, "getCarrierInfoForImsiEncryption RemoteException" + ex);
- throw new RuntimeException("IMSI error: Remote Exception");
} catch (NullPointerException ex) {
// This could happen before phone restarts due to crashing
Rlog.e(TAG, "getCarrierInfoForImsiEncryption NullPointerException" + ex);
- throw new RuntimeException("IMSI error: Null Pointer exception");
+ }
+ return null;
+ }
+
+ /**
+ * Resets the Carrier Keys in the database. This involves 2 steps:
+ * 1. Delete the keys from the database.
+ * 2. Send an intent to download new Certificates.
+ * <p>
+ * Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ * @hide
+ */
+ public void resetCarrierKeysForImsiEncryption() {
+ try {
+ IPhoneSubInfo info = getSubscriberInfo();
+ if (info == null) {
+ Rlog.e(TAG, "IMSI error: Subscriber Info is null");
+ if (!isSystemProcess()) {
+ throw new RuntimeException("IMSI error: Subscriber Info is null");
+ }
+ return;
+ }
+ int subId = getSubId(SubscriptionManager.getDefaultDataSubscriptionId());
+ info.resetCarrierKeysForImsiEncryption(subId, mContext.getOpPackageName());
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "getCarrierInfoForImsiEncryption RemoteException" + ex);
+ if (!isSystemProcess()) {
+ ex.rethrowAsRuntimeException();
+ }
}
}
@@ -2683,7 +2895,7 @@
* device keystore.
* <p>
* Requires Permission:
- * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
* @param imsiEncryptionInfo which includes the Key Type, the Public Key
* (java.security.PublicKey) and the Key Identifier.and the Key Identifier.
* The keyIdentifier Attribute value pair that helps a server locate
@@ -2711,14 +2923,18 @@
/**
* Returns the Group Identifier Level1 for a GSM phone.
* Return null if it is unavailable.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getGroupIdLevel1() {
try {
IPhoneSubInfo info = getSubscriberInfo();
if (info == null)
return null;
- return info.getGroupIdLevel1(mContext.getOpPackageName());
+ return info.getGroupIdLevel1ForSubscriber(getSubId(), mContext.getOpPackageName());
} catch (RemoteException ex) {
return null;
} catch (NullPointerException ex) {
@@ -2752,9 +2968,15 @@
/**
* Returns the phone number string for line 1, for example, the MSISDN
* for a GSM phone. Return null if it is unavailable.
- * <p>
- * The default SMS app can also use this.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE},
+ * {@link android.Manifest.permission#READ_SMS READ_SMS},
+ * {@link android.Manifest.permission#READ_PHONE_NUMBERS READ_PHONE_NUMBERS},
+ * that the caller is the default SMS app,
+ * or that the caller has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges or default SMS app
@RequiresPermission(anyOf = {
android.Manifest.permission.READ_PHONE_STATE,
android.Manifest.permission.READ_SMS,
@@ -2809,8 +3031,7 @@
* change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
* value.
*
- * <p>Requires that the calling app has carrier privileges.
- * @see #hasCarrierPrivileges
+ * <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param alphaTag alpha-tagging of the dailing nubmer
* @param number The dialing number
@@ -2826,8 +3047,7 @@
* change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
* value.
*
- * <p>Requires that the calling app has carrier privileges.
- * @see #hasCarrierPrivileges
+ * <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId the subscriber that the alphatag and dialing number belongs to.
* @param alphaTag alpha-tagging of the dailing nubmer
@@ -2946,7 +3166,11 @@
/**
* Returns the voice mail number. Return null if it is unavailable.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getVoiceMailNumber() {
return getVoiceMailNumber(getSubId());
@@ -3007,8 +3231,7 @@
/**
* Sets the voice mail number.
*
- * <p>Requires that the calling app has carrier privileges.
- * @see #hasCarrierPrivileges
+ * <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param alphaTag The alpha tag to display.
* @param number The voicemail number.
@@ -3020,8 +3243,7 @@
/**
* Sets the voicemail number for the given subscriber.
*
- * <p>Requires that the calling app has carrier privileges.
- * @see #hasCarrierPrivileges
+ * <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription id.
* @param alphaTag The alpha tag to display.
@@ -3042,9 +3264,9 @@
/**
* Enables or disables the visual voicemail client for a phone account.
*
- * <p>Requires that the calling app is the default dialer, or has carrier privileges, or
- * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
- * @see #hasCarrierPrivileges
+ * <p>Requires that the calling app is the default dialer, or has carrier privileges (see
+ * {@link #hasCarrierPrivileges}), or has permission
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
*
* @param phoneAccountHandle the phone account to change the client state
* @param enabled the new state of the client
@@ -3107,11 +3329,15 @@
* to the TelephonyManager. Returns {@code null} when there is no package responsible for
* processing visual voicemail for the subscription.
*
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
* @see #createForSubscriptionId(int)
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
* @see VisualVoicemailService
*/
@Nullable
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getVisualVoicemailPackageName() {
try {
@@ -3300,6 +3526,7 @@
* Initial SIM activation state, unknown. Not set by any carrier apps.
* @hide
*/
+ @SystemApi
public static final int SIM_ACTIVATION_STATE_UNKNOWN = 0;
/**
@@ -3310,12 +3537,14 @@
* @see #SIM_ACTIVATION_STATE_RESTRICTED
* @hide
*/
+ @SystemApi
public static final int SIM_ACTIVATION_STATE_ACTIVATING = 1;
/**
* Indicate SIM has been successfully activated with full service
* @hide
*/
+ @SystemApi
public static final int SIM_ACTIVATION_STATE_ACTIVATED = 2;
/**
@@ -3325,6 +3554,7 @@
* deactivated sim state and set it back to activated after successfully run activation service.
* @hide
*/
+ @SystemApi
public static final int SIM_ACTIVATION_STATE_DEACTIVATED = 3;
/**
@@ -3332,14 +3562,46 @@
* note this is currently available for data activation state. For example out of byte sim.
* @hide
*/
+ @SystemApi
public static final int SIM_ACTIVATION_STATE_RESTRICTED = 4;
+ /** @hide */
+ @IntDef({
+ SIM_ACTIVATION_STATE_UNKNOWN,
+ SIM_ACTIVATION_STATE_ACTIVATING,
+ SIM_ACTIVATION_STATE_ACTIVATED,
+ SIM_ACTIVATION_STATE_DEACTIVATED,
+ SIM_ACTIVATION_STATE_RESTRICTED
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface SimActivationState{}
+
+ /**
+ * Sets the voice activation state
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
+ * calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
+ * @param activationState The voice activation state
+ * @see #SIM_ACTIVATION_STATE_UNKNOWN
+ * @see #SIM_ACTIVATION_STATE_ACTIVATING
+ * @see #SIM_ACTIVATION_STATE_ACTIVATED
+ * @see #SIM_ACTIVATION_STATE_DEACTIVATED
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public void setVoiceActivationState(@SimActivationState int activationState) {
+ setVoiceActivationState(getSubId(), activationState);
+ }
+
/**
* Sets the voice activation state for the given subscriber.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
+ * calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription id.
* @param activationState The voice activation state of the given subscriber.
@@ -3349,22 +3611,44 @@
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
* @hide
*/
- public void setVoiceActivationState(int subId, int activationState) {
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public void setVoiceActivationState(int subId, @SimActivationState int activationState) {
try {
- ITelephony telephony = getITelephony();
- if (telephony != null)
- telephony.setVoiceActivationState(subId, activationState);
- } catch (RemoteException ex) {
- } catch (NullPointerException ex) {
- }
+ ITelephony telephony = getITelephony();
+ if (telephony != null)
+ telephony.setVoiceActivationState(subId, activationState);
+ } catch (RemoteException ex) {
+ } catch (NullPointerException ex) {
+ }
+ }
+
+ /**
+ * Sets the data activation state
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
+ * calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
+ * @param activationState The data activation state
+ * @see #SIM_ACTIVATION_STATE_UNKNOWN
+ * @see #SIM_ACTIVATION_STATE_ACTIVATING
+ * @see #SIM_ACTIVATION_STATE_ACTIVATED
+ * @see #SIM_ACTIVATION_STATE_DEACTIVATED
+ * @see #SIM_ACTIVATION_STATE_RESTRICTED
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public void setDataActivationState(@SimActivationState int activationState) {
+ setDataActivationState(getSubId(), activationState);
}
/**
* Sets the data activation state for the given subscriber.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
+ * calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription id.
* @param activationState The data activation state of the given subscriber.
@@ -3375,7 +3659,8 @@
* @see #SIM_ACTIVATION_STATE_RESTRICTED
* @hide
*/
- public void setDataActivationState(int subId, int activationState) {
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public void setDataActivationState(int subId, @SimActivationState int activationState) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
@@ -3386,8 +3671,32 @@
}
/**
+ * Returns the voice activation state
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
+ * @return voiceActivationState
+ * @see #SIM_ACTIVATION_STATE_UNKNOWN
+ * @see #SIM_ACTIVATION_STATE_ACTIVATING
+ * @see #SIM_ACTIVATION_STATE_ACTIVATED
+ * @see #SIM_ACTIVATION_STATE_DEACTIVATED
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ public @SimActivationState int getVoiceActivationState() {
+ return getVoiceActivationState(getSubId());
+ }
+
+ /**
* Returns the voice activation state for the given subscriber.
*
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
* @param subId The subscription id.
*
* @return voiceActivationState for the given subscriber
@@ -3397,8 +3706,8 @@
* @see #SIM_ACTIVATION_STATE_DEACTIVATED
* @hide
*/
- @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
- public int getVoiceActivationState(int subId) {
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ public @SimActivationState int getVoiceActivationState(int subId) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
@@ -3410,8 +3719,33 @@
}
/**
+ * Returns the data activation state
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
+ * @return dataActivationState for the given subscriber
+ * @see #SIM_ACTIVATION_STATE_UNKNOWN
+ * @see #SIM_ACTIVATION_STATE_ACTIVATING
+ * @see #SIM_ACTIVATION_STATE_ACTIVATED
+ * @see #SIM_ACTIVATION_STATE_DEACTIVATED
+ * @see #SIM_ACTIVATION_STATE_RESTRICTED
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ public @SimActivationState int getDataActivationState() {
+ return getDataActivationState(getSubId());
+ }
+
+ /**
* Returns the data activation state for the given subscriber.
*
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
+ *
* @param subId The subscription id.
*
* @return dataActivationState for the given subscriber
@@ -3422,8 +3756,8 @@
* @see #SIM_ACTIVATION_STATE_RESTRICTED
* @hide
*/
- @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
- public int getDataActivationState(int subId) {
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ public @SimActivationState int getDataActivationState(int subId) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
@@ -3467,7 +3801,11 @@
/**
* Retrieves the alphabetic identifier associated with the voice
* mail number.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getVoiceMailAlphaTag() {
return getVoiceMailAlphaTag(getSubId());
@@ -3496,27 +3834,29 @@
}
/**
- * Send the special dialer code. The IPC caller must be the current default dialer or has
- * carrier privileges.
- * @see #hasCarrierPrivileges
+ * Send the special dialer code. The IPC caller must be the current default dialer or have
+ * carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param inputCode The special dialer code to send
*
* @throws SecurityException if the caller does not have carrier privileges or is not the
* current default dialer
- *
- * @throws IllegalStateException if telephony service is unavailable.
*/
public void sendDialerSpecialCode(String inputCode) {
try {
final ITelephony telephony = getITelephony();
+ if (telephony == null) {
+ if (!isSystemProcess()) {
+ throw new RuntimeException("Telephony service unavailable");
+ }
+ return;
+ }
telephony.sendDialerSpecialCode(mContext.getOpPackageName(), inputCode);
} catch (RemoteException ex) {
// This could happen if binder process crashes.
- ex.rethrowFromSystemServer();
- } catch (NullPointerException ex) {
- // This could happen before phone restarts due to crashing
- throw new IllegalStateException("Telephony service unavailable");
+ if (!isSystemProcess()) {
+ ex.rethrowAsRuntimeException();
+ }
}
}
@@ -3589,26 +3929,45 @@
return IPhoneSubInfo.Stub.asInterface(ServiceManager.getService("iphonesubinfo"));
}
- /** Device call state: No activity. */
+ /**
+ * Device call state: No activity.
+ */
public static final int CALL_STATE_IDLE = 0;
- /** Device call state: Ringing. A new call arrived and is
+ /**
+ * Device call state: Ringing. A new call arrived and is
* ringing or waiting. In the latter case, another call is
- * already active. */
+ * already active.
+ */
public static final int CALL_STATE_RINGING = 1;
- /** Device call state: Off-hook. At least one call exists
- * that is dialing, active, or on hold, and no calls are ringing
- * or waiting. */
+ /**
+ * Device call state: Off-hook. At least one call exists
+ * that is dialing, active, or on hold, and no calls are ringing
+ * or waiting.
+ */
public static final int CALL_STATE_OFFHOOK = 2;
+ /** @hide */
+ @IntDef(prefix = { "CALL_STATE_" }, value = {
+ CALL_STATE_IDLE,
+ CALL_STATE_RINGING,
+ CALL_STATE_OFFHOOK
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface CallState{}
+
/**
- * Returns one of the following constants that represents the current state of all
- * phone calls.
+ * Returns the state of all calls on the device.
+ * <p>
+ * This method considers not only calls in the Telephony stack, but also calls via other
+ * {@link android.telecom.ConnectionService} implementations.
+ * <p>
+ * Note: The call state returned via this method may differ from what is reported by
+ * {@link PhoneStateListener#onCallStateChanged(int, String)}, as that callback only considers
+ * Telephony (mobile) calls.
*
- * {@link TelephonyManager#CALL_STATE_RINGING}
- * {@link TelephonyManager#CALL_STATE_OFFHOOK}
- * {@link TelephonyManager#CALL_STATE_IDLE}
+ * @return the current call state.
*/
- public int getCallState() {
+ public @CallState int getCallState() {
try {
ITelecomService telecom = getTelecomService();
if (telecom != null) {
@@ -3621,23 +3980,31 @@
}
/**
- * Returns a constant indicating the call state (cellular) on the device
- * for a subscription.
+ * Returns the Telephony call state for calls on a specific subscription.
+ * <p>
+ * Note: This method considers ONLY telephony/mobile calls, where {@link #getCallState()}
+ * considers the state of calls from other {@link android.telecom.ConnectionService}
+ * implementations.
*
- * @param subId whose call state is returned
+ * @param subId the subscription to check call state for.
* @hide
*/
- public int getCallState(int subId) {
+ public @CallState int getCallState(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
return getCallStateForSlot(phoneId);
}
/**
- * See getCallState.
+ * Returns the Telephony call state for calls on a specific SIM slot.
+ * <p>
+ * Note: This method considers ONLY telephony/mobile calls, where {@link #getCallState()}
+ * considers the state of calls from other {@link android.telecom.ConnectionService}
+ * implementations.
*
+ * @param slotIndex the SIM slot index to check call state for.
* @hide
*/
- public int getCallStateForSlot(int slotIndex) {
+ public @CallState int getCallStateForSlot(int slotIndex) {
try {
ITelephony telephony = getITelephony();
if (telephony == null)
@@ -3770,6 +4137,9 @@
* To unregister a listener, pass the listener object and set the
* events argument to
* {@link PhoneStateListener#LISTEN_NONE LISTEN_NONE} (0).
+ * 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.
*
* @param listener The {@link PhoneStateListener} object to register
* (or unregister)
@@ -4023,8 +4393,8 @@
* Input parameters equivalent to TS 27.007 AT+CCHO command.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param AID Application id. See ETSI 102.221 and 101.220.
* @return an IccOpenLogicalChannelResponse object.
@@ -4041,8 +4411,8 @@
* Input parameters equivalent to TS 27.007 AT+CCHO command.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param AID Application id. See ETSI 102.221 and 101.220.
* @param p2 P2 parameter (described in ISO 7816-4).
@@ -4058,8 +4428,8 @@
* Input parameters equivalent to TS 27.007 AT+CCHO command.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription to use.
* @param AID Application id. See ETSI 102.221 and 101.220.
@@ -4084,8 +4454,8 @@
* Input parameters equivalent to TS 27.007 AT+CCHC command.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@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
* iccOpenLogicalChannel.
@@ -4101,8 +4471,8 @@
* Input parameters equivalent to TS 27.007 AT+CCHC command.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * 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
@@ -4127,8 +4497,8 @@
* Input parameters equivalent to TS 27.007 AT+CGLA command.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@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 returned by a successful
* iccOpenLogicalChannel.
@@ -4154,8 +4524,8 @@
* Input parameters equivalent to TS 27.007 AT+CGLA command.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription to use.
* @param channel is the channel id to be closed as returned by a successful
@@ -4190,8 +4560,8 @@
* Input parameters equivalent to TS 27.007 AT+CSIM command.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param cla Class of the APDU command.
* @param instruction Instruction of the APDU command.
@@ -4215,8 +4585,8 @@
* Input parameters equivalent to TS 27.007 AT+CSIM command.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription to use.
* @param cla Class of the APDU command.
@@ -4235,7 +4605,7 @@
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.iccTransmitApduBasicChannel(subId, cla,
+ return telephony.iccTransmitApduBasicChannel(subId, getOpPackageName(), cla,
instruction, p1, p2, p3, data);
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
@@ -4247,8 +4617,8 @@
* Returns the response APDU for a command APDU sent through SIM_IO.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param fileID
* @param command
@@ -4267,8 +4637,8 @@
* Returns the response APDU for a command APDU sent through SIM_IO.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription to use.
* @param fileID
@@ -4296,8 +4666,8 @@
* Send ENVELOPE to the SIM and return the response.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param content String containing SAT/USAT response in hexadecimal
* format starting with command tag. See TS 102 223 for
@@ -4314,8 +4684,8 @@
* Send ENVELOPE to the SIM and return the response.
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription to use.
* @param content String containing SAT/USAT response in hexadecimal
@@ -4340,10 +4710,10 @@
/**
* Read one of the NV items defined in com.android.internal.telephony.RadioNVItems.
* Used for device configuration by some CDMA operators.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param itemID the ID of the item to read.
* @return the NV item as a String, or null on any failure.
@@ -4366,10 +4736,10 @@
/**
* Write one of the NV items defined in com.android.internal.telephony.RadioNVItems.
* Used for device configuration by some CDMA operators.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param itemID the ID of the item to read.
* @param itemValue the value to write, as a String.
@@ -4393,10 +4763,10 @@
/**
* Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
* Used for device configuration by some CDMA operators.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param preferredRoamingList byte array containing the new PRL.
* @return true on success; false on any failure.
@@ -4420,10 +4790,10 @@
* Perform the specified type of NV config reset. The radio will be taken offline
* and the device must be rebooted after the operation. Used for device
* configuration by some CDMA operators.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset
* @return true on success; false on any failure.
@@ -4518,7 +4888,7 @@
}
/**
- * Sets the telephony property with the value specified.
+ * Sets a per-phone telephony property with the value specified.
*
* @hide
*/
@@ -4562,12 +4932,24 @@
return;
}
- Rlog.d(TAG, "setTelephonyProperty: success phoneId=" + phoneId +
- " property=" + property + " value: " + value + " propVal=" + propVal);
SystemProperties.set(property, propVal);
}
/**
+ * Sets a global telephony property with the value specified.
+ *
+ * @hide
+ */
+ public static void setTelephonyProperty(String property, String value) {
+ if (value == null) {
+ value = "";
+ }
+ Rlog.d(TAG, "setTelephonyProperty: success" + " property=" +
+ property + " value: " + value);
+ SystemProperties.set(property, value);
+ }
+
+ /**
* Convenience function for retrieving a value from the secure settings
* value list as an integer. Note that internally setting values are
* always stored as strings; this function converts the string to an
@@ -4626,10 +5008,10 @@
String v = android.provider.Settings.Global.getString(cr, name);
if (index == Integer.MAX_VALUE) {
- throw new RuntimeException("putIntAtIndex index == MAX_VALUE index=" + index);
+ throw new IllegalArgumentException("putIntAtIndex index == MAX_VALUE index=" + index);
}
if (index < 0) {
- throw new RuntimeException("putIntAtIndex index < 0 index=" + index);
+ throw new IllegalArgumentException("putIntAtIndex index < 0 index=" + index);
}
if (v != null) {
valArray = v.split(",");
@@ -4656,7 +5038,7 @@
}
/**
- * Gets the telephony property.
+ * Gets a per-phone telephony property.
*
* @hide
*/
@@ -4672,6 +5054,19 @@
return propVal == null ? defaultVal : propVal;
}
+ /**
+ * Gets a global telephony property.
+ *
+ * See also getTelephonyProperty(phoneId, property, defaultVal). Most telephony properties are
+ * per-phone.
+ *
+ * @hide
+ */
+ public static String getTelephonyProperty(String property, String defaultVal) {
+ String propVal = SystemProperties.get(property);
+ return propVal == null ? defaultVal : propVal;
+ }
+
/** @hide */
public int getSimCount() {
// FIXME Need to get it from Telephony Dev Controller when that gets implemented!
@@ -4724,28 +5119,6 @@
}
}
- /**
- * Returns the response of ISIM Authetification through RIL.
- * Returns null if the Authentification hasn't been successed or isn't present iphonesubinfo.
- * @return the response of ISIM Authetification, or null if not available
- * @hide
- * @deprecated
- * @see getIccAuthentication with appType=PhoneConstants.APPTYPE_ISIM
- */
- public String getIsimChallengeResponse(String nonce){
- try {
- IPhoneSubInfo info = getSubscriberInfo();
- if (info == null)
- return null;
- return info.getIsimChallengeResponse(nonce);
- } catch (RemoteException ex) {
- return null;
- } catch (NullPointerException ex) {
- // This could happen before phone restarts due to crashing
- return null;
- }
- }
-
// ICC SIM Application Types
/** UICC application type is SIM */
public static final int APPTYPE_SIM = PhoneConstants.APPTYPE_SIM;
@@ -4768,18 +5141,24 @@
* Returns the response of authentication for the default subscription.
* Returns null if the authentication hasn't been successful
*
- * <p>Requires that the calling app has carrier privileges or READ_PRIVILEGED_PHONE_STATE
- * permission.
+ * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param appType the icc application type, like {@link #APPTYPE_USIM}
* @param authType the authentication type, {@link #AUTHTYPE_EAP_AKA} or
* {@link #AUTHTYPE_EAP_SIM}
* @param data authentication challenge data, base64 encoded.
* See 3GPP TS 31.102 7.1.2 for more details.
- * @return the response of authentication, or null if not available
- *
- * @see #hasCarrierPrivileges
+ * @return the response of authentication. This value will be null in the following cases:
+ * Authentication error, incorrect MAC
+ * Authentication error, security context not supported
+ * Key freshness failure
+ * Authentication error, no memory space available
+ * Authentication error, no memory space available in EFMUK
*/
+ // TODO(b/73660190): This should probably require MODIFY_PHONE_STATE, not
+ // READ_PRIVILEGED_PHONE_STATE. It certainly shouldn't reference the permission in Javadoc since
+ // it's not public API.
public String getIccAuthentication(int appType, int authType, String data) {
return getIccAuthentication(getSubId(), appType, authType, data);
}
@@ -4788,7 +5167,7 @@
* Returns the response of USIM Authentication for specified subId.
* Returns null if the authentication hasn't been successful
*
- * <p>Requires that the calling app has carrier privileges.
+ * <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId subscription ID used for authentication
* @param appType the icc application type, like {@link #APPTYPE_USIM}
@@ -4796,9 +5175,13 @@
* {@link #AUTHTYPE_EAP_SIM}
* @param data authentication challenge data, base64 encoded.
* See 3GPP TS 31.102 7.1.2 for more details.
- * @return the response of authentication, or null if not available
- *
- * @see #hasCarrierPrivileges
+ * @return the response of authentication. This value will be null in the following cases only
+ * (see 3GPP TS 31.102 7.3.1):
+ * Authentication error, incorrect MAC
+ * Authentication error, security context not supported
+ * Key freshness failure
+ * Authentication error, no memory space available
+ * Authentication error, no memory space available in EFMUK
* @hide
*/
public String getIccAuthentication(int subId, int appType, int authType, String data) {
@@ -4819,8 +5202,12 @@
* Returns an array of Forbidden PLMNs from the USIM App
* Returns null if the query fails.
*
+ * <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 an array of forbidden PLMNs or null if not available
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String[] getForbiddenPlmns() {
return getForbiddenPlmns(getSubId(), APPTYPE_USIM);
@@ -4867,57 +5254,60 @@
}
}
- /** @hide */
- @IntDef({ImsFeature.EMERGENCY_MMTEL, ImsFeature.MMTEL, ImsFeature.RCS})
- @Retention(RetentionPolicy.SOURCE)
- public @interface Feature {}
-
/**
- * Returns the {@link IImsMMTelFeature} that corresponds to the given slot Id and MMTel
- * feature or {@link null} if the service is not available. If an MMTelFeature is available, the
- * {@link IImsServiceFeatureCallback} callback is registered as a listener for feature updates.
- * @param slotIndex The SIM slot that we are requesting the {@link IImsMMTelFeature} for.
- * @param callback Listener that will send updates to ImsManager when there are updates to
- * ImsServiceController.
- * @return {@link IImsMMTelFeature} interface for the feature specified or {@code null} if
- * it is unavailable.
+ * Enables IMS for the framework. This will trigger IMS registration and ImsFeature capability
+ * status updates, if not already enabled.
* @hide
*/
- public @Nullable IImsMMTelFeature getImsMMTelFeatureAndListen(int slotIndex,
- IImsServiceFeatureCallback callback) {
+ public void enableIms(int slotId) {
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
- return telephony.getMMTelFeatureAndListen(slotIndex, callback);
+ telephony.enableIms(slotId);
}
} catch (RemoteException e) {
- Rlog.e(TAG, "getImsMMTelFeatureAndListen, RemoteException: "
+ Rlog.e(TAG, "enableIms, RemoteException: "
+ e.getMessage());
}
- return null;
}
/**
- * Returns the {@link IImsMMTelFeature} that corresponds to the given slot Id and MMTel
- * feature for emergency calling or {@link null} if the service is not available. If an
- * MMTelFeature is available, the {@link IImsServiceFeatureCallback} callback is registered as a
- * listener for feature updates.
- * @param slotIndex The SIM slot that we are requesting the {@link IImsMMTelFeature} for.
+ * Disables IMS for the framework. This will trigger IMS de-registration and trigger ImsFeature
+ * status updates to disabled.
+ * @hide
+ */
+ public void disableIms(int slotId) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ telephony.disableIms(slotId);
+ }
+ } catch (RemoteException e) {
+ Rlog.e(TAG, "disableIms, RemoteException: "
+ + e.getMessage());
+ }
+ }
+
+ /**
+ * Returns the {@link IImsMmTelFeature} that corresponds to the given slot Id and MMTel
+ * feature or {@link null} if the service is not available. If an MMTelFeature is available, the
+ * {@link IImsServiceFeatureCallback} callback is registered as a listener for feature updates.
+ * @param slotIndex The SIM slot that we are requesting the {@link IImsMmTelFeature} for.
* @param callback Listener that will send updates to ImsManager when there are updates to
* ImsServiceController.
- * @return {@link IImsMMTelFeature} interface for the feature specified or {@code null} if
+ * @return {@link IImsMmTelFeature} interface for the feature specified or {@code null} if
* it is unavailable.
* @hide
*/
- public @Nullable IImsMMTelFeature getImsEmergencyMMTelFeatureAndListen(int slotIndex,
+ public @Nullable IImsMmTelFeature getImsMmTelFeatureAndListen(int slotIndex,
IImsServiceFeatureCallback callback) {
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
- return telephony.getEmergencyMMTelFeatureAndListen(slotIndex, callback);
+ return telephony.getMmTelFeatureAndListen(slotIndex, callback);
}
} catch (RemoteException e) {
- Rlog.e(TAG, "getImsEmergencyMMTelFeatureAndListen, RemoteException: "
+ Rlog.e(TAG, "getImsMmTelFeatureAndListen, RemoteException: "
+ e.getMessage());
}
return null;
@@ -4969,6 +5359,42 @@
}
/**
+ * @return the {@IImsConfig} interface that corresponds with the slot index and feature.
+ * @param slotIndex The SIM slot corresponding to the ImsService ImsConfig is active for.
+ * @param feature An integer indicating the feature that we wish to get the ImsConfig for.
+ * Corresponds to features defined in ImsFeature.
+ * @hide
+ */
+ public @Nullable IImsConfig getImsConfig(int slotIndex, int feature) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.getImsConfig(slotIndex, feature);
+ }
+ } catch (RemoteException e) {
+ Rlog.e(TAG, "getImsRegistration, RemoteException: " + e.getMessage());
+ }
+ return null;
+ }
+
+ /**
+ * @return true if the IMS resolver is busy resolving a binding and should not be considered
+ * available, false if the IMS resolver is idle.
+ * @hide
+ */
+ public boolean isResolvingImsBinding() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.isResolvingImsBinding();
+ }
+ } catch (RemoteException e) {
+ Rlog.e(TAG, "isResolvingImsBinding, RemoteException: " + e.getMessage());
+ }
+ return false;
+ }
+
+ /**
* Set IMS registration state
*
* @param Registration state
@@ -4986,10 +5412,10 @@
/**
* Get the preferred network type.
* Used for device configuration by some CDMA operators.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @return the preferred network type, defined in RILConstants.java.
* @hide
@@ -5009,11 +5435,12 @@
/**
* Sets the network selection mode to automatic.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public void setNetworkSelectionModeAutomatic() {
try {
@@ -5029,15 +5456,14 @@
}
/**
- * Perform a radio scan and return the list of avialble networks.
+ * Perform a radio scan and return the list of available networks.
*
* The return value is a list of the OperatorInfo of the networks found. Note that this
* scan can take a long time (sometimes minutes) to happen.
*
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @hide
* TODO: Add an overload that takes no args.
@@ -5061,33 +5487,49 @@
* This method is asynchronous, so the network scan results will be returned by callback.
* The returned NetworkScan will contain a callback method which can be used to stop the scan.
*
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param request Contains all the RAT with bands/channels that need to be scanned.
+ * @param executor The executor through which the callback should be invoked. Since the scan
+ * request may trigger multiple callbacks and they must be invoked in the same order as
+ * they are received by the platform, the user should provide an executor which executes
+ * tasks one at a time in serial order. For example AsyncTask.SERIAL_EXECUTOR.
* @param callback Returns network scan results or errors.
* @return A NetworkScan obj which contains a callback which can be used to stop the scan.
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public NetworkScan requestNetworkScan(
- NetworkScanRequest request, TelephonyScanManager.NetworkScanCallback callback) {
+ NetworkScanRequest request, Executor executor,
+ TelephonyScanManager.NetworkScanCallback callback) {
synchronized (this) {
if (mTelephonyScanManager == null) {
mTelephonyScanManager = new TelephonyScanManager();
}
}
- return mTelephonyScanManager.requestNetworkScan(getSubId(), request, callback);
+ return mTelephonyScanManager.requestNetworkScan(getSubId(), request, executor, callback);
+ }
+
+ /**
+ * @deprecated
+ * Use {@link
+ * #requestNetworkScan(NetworkScanRequest, Executor, TelephonyScanManager.NetworkScanCallback)}
+ */
+ @Deprecated
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public NetworkScan requestNetworkScan(
+ NetworkScanRequest request, TelephonyScanManager.NetworkScanCallback callback) {
+ return requestNetworkScan(request, AsyncTask.SERIAL_EXECUTOR, callback);
}
/**
* Ask the radio to connect to the input network and change selection mode to manual.
*
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param operatorNumeric the PLMN ID of the network to select.
* @param persistSelection whether the selection will persist until reboot. If true, only allows
@@ -5095,6 +5537,7 @@
* normal network selection next time.
* @return true on success; false on any failure.
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public boolean setNetworkSelectionModeManual(String operatorNumeric, boolean persistSelection) {
try {
@@ -5114,10 +5557,10 @@
/**
* Set the preferred network type.
* Used for device configuration by some CDMA operators.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId the id of the subscription to set the preferred network type for.
* @param networkType the preferred network type, defined in RILConstants.java.
@@ -5141,9 +5584,7 @@
/**
* Set the preferred network type to global mode which includes LTE, CDMA, EvDo and GSM/WCDMA.
*
- * <p>
- * Requires that the calling app has carrier privileges.
- * @see #hasCarrierPrivileges
+ * <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @return true on success; false on any failure.
*/
@@ -5154,9 +5595,7 @@
/**
* Set the preferred network type to global mode which includes LTE, CDMA, EvDo and GSM/WCDMA.
*
- * <p>
- * Requires that the calling app has carrier privileges.
- * @see #hasCarrierPrivileges
+ * <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @return true on success; false on any failure.
* @hide
@@ -5246,8 +5685,7 @@
* brand value input. To unset the value, the same function should be
* called with a null brand value.
*
- * <p>Requires that the calling app has carrier privileges.
- * @see #hasCarrierPrivileges
+ * <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param brand The brand name to display/set.
* @return true if the operation was executed correctly.
@@ -5264,8 +5702,7 @@
* brand value input. To unset the value, the same function should be
* called with a null brand value.
*
- * <p>Requires that the calling app has carrier privileges.
- * @see #hasCarrierPrivileges
+ * <p>Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param subId The subscription to use.
* @param brand The brand name to display/set.
@@ -5919,39 +6356,44 @@
* subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
*
* <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
- * calling app has carrier privileges.
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling
+ * app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param enable Whether to enable mobile data.
*
- * @see #hasCarrierPrivileges
- * @deprecated use {@link #setUserMobileDataEnabled(boolean)} instead.
*/
- @Deprecated
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public void setDataEnabled(boolean enable) {
- setUserMobileDataEnabled(enable);
+ setDataEnabled(getSubId(SubscriptionManager.getDefaultDataSubscriptionId()), enable);
}
/**
* @hide
- * @deprecated use {@link #setUserMobileDataEnabled(boolean)} instead.
+ * @deprecated use {@link #setDataEnabled(boolean)} instead.
*/
@SystemApi
@Deprecated
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public void setDataEnabled(int subId, boolean enable) {
- setUserMobileDataEnabled(subId, enable);
+ try {
+ Log.d(TAG, "setDataEnabled: enabled=" + enable);
+ ITelephony telephony = getITelephony();
+ if (telephony != null)
+ telephony.setUserDataEnabled(subId, enable);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#setUserDataEnabled", e);
+ }
}
/**
- * @deprecated use {@link #isUserMobileDataEnabled()} instead.
+ * @deprecated use {@link #isDataEnabled()} instead.
* @hide
*/
@SystemApi
@Deprecated
public boolean getDataEnabled() {
- return isUserMobileDataEnabled();
+ return isDataEnabled();
}
/**
@@ -5964,30 +6406,58 @@
* <p>Requires one of the following permissions:
* {@link android.Manifest.permission#ACCESS_NETWORK_STATE ACCESS_NETWORK_STATE},
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}, or that the
- * calling app has carrier privileges.
+ * calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* <p>Note that this does not take into account any data restrictions that may be present on the
* calling app. Such restrictions may be inspected with
* {@link ConnectivityManager#getRestrictBackgroundStatus}.
*
* @return true if mobile data is enabled.
- *
- * @see #hasCarrierPrivileges
- * @deprecated use {@link #isUserMobileDataEnabled()} instead.
*/
- @Deprecated
public boolean isDataEnabled() {
- return isUserMobileDataEnabled();
+ return getDataEnabled(getSubId(SubscriptionManager.getDefaultDataSubscriptionId()));
}
/**
- * @deprecated use {@link #isUserMobileDataEnabled()} instead.
+ * @deprecated use {@link #isDataEnabled()} instead.
* @hide
*/
@Deprecated
@SystemApi
public boolean getDataEnabled(int subId) {
- return isUserMobileDataEnabled(subId);
+ boolean retVal = false;
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null)
+ retVal = telephony.isUserDataEnabled(subId);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#isUserDataEnabled", e);
+ } catch (NullPointerException e) {
+ }
+ return retVal;
+ }
+
+ /**
+ * Returns the result and response from RIL for oem request
+ *
+ * @param oemReq the data is sent to ril.
+ * @param oemResp the respose data from RIL.
+ * @return negative value request was not handled or get error
+ * 0 request was handled succesfully, but no response data
+ * positive value success, data length of response
+ * @hide
+ * @deprecated OEM needs a vendor-extension hal and their apps should use that instead
+ */
+ @Deprecated
+ public int invokeOemRilRequestRaw(byte[] oemReq, byte[] oemResp) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null)
+ return telephony.invokeOemRilRequestRaw(oemReq, oemResp);
+ } catch (RemoteException ex) {
+ } catch (NullPointerException ex) {
+ }
+ return -1;
}
/** @hide */
@@ -6100,84 +6570,106 @@
return false;
}
- /**
- * Returns the IMS Registration Status
- * @hide
- */
- public boolean isImsRegistered() {
- try {
- ITelephony telephony = getITelephony();
- if (telephony == null)
- return false;
- return telephony.isImsRegistered();
- } catch (RemoteException ex) {
- return false;
- } catch (NullPointerException ex) {
- return false;
- }
- }
-
/**
- * Returns the IMS Registration Status for a particular Subscription ID
+ * Returns the IMS Registration Status for a particular Subscription ID.
*
* @param subId Subscription ID
* @return true if IMS status is registered, false if the IMS status is not registered or a
* RemoteException occurred.
- *
* @hide
*/
public boolean isImsRegistered(int subId) {
- try {
- return getITelephony().isImsRegisteredForSubscriber(subId);
- } catch (RemoteException ex) {
- return false;
- } catch (NullPointerException ex) {
- return false;
- }
- }
-
- /**
- * Returns the Status of Volte
- * @hide
- */
- public boolean isVolteAvailable() {
- try {
- return getITelephony().isVolteAvailable();
- } catch (RemoteException ex) {
- return false;
- } catch (NullPointerException ex) {
- return false;
- }
- }
-
- /**
- * Returns the Status of video telephony (VT)
- * @hide
- */
- public boolean isVideoTelephonyAvailable() {
try {
- return getITelephony().isVideoTelephonyAvailable();
- } catch (RemoteException ex) {
- return false;
- } catch (NullPointerException ex) {
+ return getITelephony().isImsRegistered(subId);
+ } catch (RemoteException | NullPointerException ex) {
return false;
}
}
/**
- * Returns the Status of Wi-Fi Calling
+ * Returns the IMS Registration Status for a particular Subscription ID, which is determined
+ * when the TelephonyManager is created using {@link #createForSubscriptionId(int)}. If an
+ * invalid subscription ID is used during creation, will the default subscription ID will be
+ * used.
+ *
+ * @return true if IMS status is registered, false if the IMS status is not registered or a
+ * RemoteException occurred.
+ * @see SubscriptionManager#getDefaultSubscriptionId()
+ * @hide
+ */
+ public boolean isImsRegistered() {
+ try {
+ return getITelephony().isImsRegistered(getSubId());
+ } catch (RemoteException | NullPointerException ex) {
+ return false;
+ }
+ }
+
+ /**
+ * The current status of Voice over LTE for the subscription associated with this instance when
+ * it was created using {@link #createForSubscriptionId(int)}. If an invalid subscription ID was
+ * used during creation, the default subscription ID will be used.
+ * @return true if Voice over LTE is available or false if it is unavailable or unknown.
+ * @see SubscriptionManager#getDefaultSubscriptionId()
+ * @hide
+ */
+ public boolean isVolteAvailable() {
+ try {
+ return getITelephony().isVolteAvailable(getSubId());
+ } catch (RemoteException | NullPointerException ex) {
+ return false;
+ }
+ }
+
+ /**
+ * The availability of Video Telephony (VT) for the subscription ID specified when this instance
+ * was created using {@link #createForSubscriptionId(int)}. If an invalid subscription ID was
+ * used during creation, the default subscription ID will be used. To query the
+ * underlying technology that VT is available on, use {@link #getImsRegTechnologyForMmTel}.
+ * @return true if VT is available, or false if it is unavailable or unknown.
+ * @hide
+ */
+ public boolean isVideoTelephonyAvailable() {
+ try {
+ return getITelephony().isVideoTelephonyAvailable(getSubId());
+ } catch (RemoteException | NullPointerException ex) {
+ return false;
+ }
+ }
+
+ /**
+ * Returns the Status of Wi-Fi calling (Voice over WiFi) for the subscription ID specified.
+ * @param subId the subscription ID.
+ * @return true if VoWiFi is available, or false if it is unavailable or unknown.
* @hide
*/
public boolean isWifiCallingAvailable() {
try {
- return getITelephony().isWifiCallingAvailable();
- } catch (RemoteException ex) {
- return false;
- } catch (NullPointerException ex) {
+ return getITelephony().isWifiCallingAvailable(getSubId());
+ } catch (RemoteException | NullPointerException ex) {
return false;
}
}
+ /**
+ * The technology that IMS is registered for for the MMTEL feature.
+ * @param subId subscription ID to get IMS registration technology for.
+ * @return The IMS registration technology that IMS is registered to for the MMTEL feature.
+ * Valid return results are:
+ * - {@link ImsRegistrationImplBase#REGISTRATION_TECH_LTE} for LTE registration,
+ * - {@link ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN} for IWLAN registration, or
+ * - {@link ImsRegistrationImplBase#REGISTRATION_TECH_NONE} if we are not registered or the
+ * result is unavailable.
+ * @hide
+ */
+ public @ImsRegistrationImplBase.ImsRegistrationTech int getImsRegTechnologyForMmTel() {
+ try {
+ return getITelephony().getImsRegTechnologyForMmTel(getSubId());
+ } catch (RemoteException ex) {
+ return ImsRegistrationImplBase.REGISTRATION_TECH_NONE;
+ }
+ }
+
/**
* Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the default phone.
*
@@ -6548,31 +7040,6 @@
}
/**
- * Set the ISO country code equivalent of the current registered
- * operator's MCC (Mobile Country Code).
- * @param iso the ISO country code equivalent of the current registered
- * @hide
- */
- public void setNetworkCountryIso(String iso) {
- int phoneId = getPhoneId();
- setNetworkCountryIsoForPhone(phoneId, iso);
- }
-
- /**
- * Set the ISO country code equivalent of the current registered
- * operator's MCC (Mobile Country Code).
- * @param phoneId which phone you want to set
- * @param iso the ISO country code equivalent of the current registered
- * @hide
- */
- public void setNetworkCountryIsoForPhone(int phoneId, String iso) {
- if (SubscriptionManager.isValidPhoneId(phoneId)) {
- setTelephonyProperty(phoneId,
- TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, iso);
- }
- }
-
- /**
* Set the network type currently in use on the device for data transmission.
*
* If this object has been created with {@link #createForSubscriptionId}, applies to the
@@ -6680,7 +7147,11 @@
/**
* Returns the current {@link ServiceState} information.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*/
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public ServiceState getServiceState() {
return getServiceStateForSubscriber(getSubId());
@@ -6726,14 +7197,14 @@
/**
* Sets the per-account voicemail ringtone.
*
- * <p>Requires that the calling app is the default dialer, or has carrier privileges, or has
- * permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+ * <p>Requires that the calling app is the default dialer, or has carrier privileges (see
+ * {@link #hasCarrierPrivileges}, or has permission
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
*
* @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
* voicemail ringtone.
* @param uri The URI for the ringtone to play when receiving a voicemail from a specific
* PhoneAccount.
- * @see #hasCarrierPrivileges
*
* @deprecated Use {@link android.provider.Settings#ACTION_CHANNEL_NOTIFICATION_SETTINGS}
* instead.
@@ -6771,14 +7242,14 @@
/**
* Sets the per-account preference whether vibration is enabled for voicemail notifications.
*
- * <p>Requires that the calling app is the default dialer, or has carrier privileges, or has
- * permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+ * <p>Requires that the calling app is the default dialer, or has carrier privileges (see
+ * {@link #hasCarrierPrivileges}, or has permission
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
*
* @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
* voicemail vibration setting.
* @param enabled Whether to enable or disable vibration for voicemail notifications from a
* specific PhoneAccount.
- * @see #hasCarrierPrivileges
*
* @deprecated Use {@link android.provider.Settings#ACTION_CHANNEL_NOTIFICATION_SETTINGS}
* instead.
@@ -6799,8 +7270,8 @@
/**
* Returns carrier id of the current subscription.
* <p>To recognize a carrier (including MVNO) as a first-class identity, Android assigns each
- * carrier with a canonical integer a.k.a. android carrier id. The Android carrier ID is an
- * Android platform-wide identifier for a carrier. AOSP maintains carrier ID assignments in
+ * carrier with a canonical integer a.k.a. carrier id. The carrier ID is an Android
+ * platform-wide identifier for a carrier. AOSP maintains carrier ID assignments in
* <a href="https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/carrier_list.textpb">here</a>
*
* <p>Apps which have carrier-specific configurations or business logic can use the carrier id
@@ -6808,45 +7279,39 @@
*
* @return Carrier id of the current subscription. Return {@link #UNKNOWN_CARRIER_ID} if the
* subscription is unavailable or the carrier cannot be identified.
- * @throws IllegalStateException if telephony service is unavailable.
*/
- public int getAndroidCarrierIdForSubscription() {
+ public int getSimCarrierId() {
try {
ITelephony service = getITelephony();
- return service.getSubscriptionCarrierId(getSubId());
+ if (service != null) {
+ return service.getSubscriptionCarrierId(getSubId());
+ }
} catch (RemoteException ex) {
// This could happen if binder process crashes.
- ex.rethrowAsRuntimeException();
- } catch (NullPointerException ex) {
- // This could happen before phone restarts due to crashing.
- throw new IllegalStateException("Telephony service unavailable");
}
return UNKNOWN_CARRIER_ID;
}
/**
- * Returns carrier name of the current subscription.
- * <p>Carrier name is a user-facing name of carrier id
- * {@link #getAndroidCarrierIdForSubscription()}, usually the brand name of the subsidiary
+ * Returns carrier id name of the current subscription.
+ * <p>Carrier id name is a user-facing name of carrier id
+ * {@link #getSimCarrierId()}, usually the brand name of the subsidiary
* (e.g. T-Mobile). Each carrier could configure multiple {@link #getSimOperatorName() SPN} but
* should have a single carrier name. Carrier name is not a canonical identity,
- * use {@link #getAndroidCarrierIdForSubscription()} instead.
+ * use {@link #getSimCarrierId()} instead.
* <p>The returned carrier name is unlocalized.
*
* @return Carrier name of the current subscription. Return {@code null} if the subscription is
* unavailable or the carrier cannot be identified.
- * @throws IllegalStateException if telephony service is unavailable.
*/
- public CharSequence getAndroidCarrierNameForSubscription() {
+ public CharSequence getSimCarrierIdName() {
try {
ITelephony service = getITelephony();
- return service.getSubscriptionCarrierName(getSubId());
+ if (service != null) {
+ return service.getSubscriptionCarrierName(getSubId());
+ }
} catch (RemoteException ex) {
// This could happen if binder process crashes.
- ex.rethrowAsRuntimeException();
- } catch (NullPointerException ex) {
- // This could happen before phone restarts due to crashing.
- throw new IllegalStateException("Telephony service unavailable");
}
return null;
}
@@ -7196,60 +7661,12 @@
}
/**
- * Turns mobile data on or off.
- * If the {@link TelephonyManager} object has been created with
- * {@link #createForSubscriptionId}, this API applies to the given subId.
- * Otherwise, it applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
- *
- * <p>Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the
- * calling app has carrier privileges.
- *
- * @param enable Whether to enable mobile data.
- *
- * @see #hasCarrierPrivileges
- */
- @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
- public void setUserMobileDataEnabled(boolean enable) {
- setUserMobileDataEnabled(
- getSubId(SubscriptionManager.getDefaultDataSubscriptionId()), enable);
- }
-
- /**
- * Returns whether mobile data is enabled or not per user setting. There are other factors
- * that could disable mobile data, but they are not considered here.
- *
- * If this object has been created with {@link #createForSubscriptionId}, applies to the given
- * subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
- *
- * <p>Requires one of the following permissions:
- * {@link android.Manifest.permission#ACCESS_NETWORK_STATE ACCESS_NETWORK_STATE},
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}, or that the
- * calling app has carrier privileges.
- *
- * <p>Note that this does not take into account any data restrictions that may be present on the
- * calling app. Such restrictions may be inspected with
- * {@link ConnectivityManager#getRestrictBackgroundStatus}.
- *
- * @return true if mobile data is enabled.
- *
- * @see #hasCarrierPrivileges
- */
- @RequiresPermission(anyOf = {
- android.Manifest.permission.ACCESS_NETWORK_STATE,
- android.Manifest.permission.MODIFY_PHONE_STATE
- })
- public boolean isUserMobileDataEnabled() {
- return isUserMobileDataEnabled(
- getSubId(SubscriptionManager.getDefaultDataSubscriptionId()));
- }
-
- /**
* @hide
- * Unlike isUserMobileDataEnabled, this API also evaluates carrierDataEnabled,
- * policyDataEnabled etc to give a final decision.
+ * It's similar to isDataEnabled, but unlike isDataEnabled, this API also evaluates
+ * carrierDataEnabled, policyDataEnabled etc to give a final decision of whether mobile data is
+ * capable of using.
*/
- public boolean isMobileDataEnabled() {
+ public boolean isDataCapable() {
boolean retVal = false;
try {
int subId = getSubId(SubscriptionManager.getDefaultDataSubscriptionId());
@@ -7264,31 +7681,142 @@
}
/**
- * Utility class of {@link #isUserMobileDataEnabled()};
+ * In this mode, modem will not send specified indications when screen is off.
+ * @hide
*/
- private boolean isUserMobileDataEnabled(int subId) {
- boolean retVal = false;
+ public static final int INDICATION_UPDATE_MODE_NORMAL = 1;
+
+ /**
+ * In this mode, modem will still send specified indications when screen is off.
+ * @hide
+ */
+ public static final int INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF = 2;
+
+ /** @hide */
+ @IntDef(prefix = { "INDICATION_UPDATE_MODE_" }, value = {
+ INDICATION_UPDATE_MODE_NORMAL,
+ INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface IndicationUpdateMode{}
+
+ /**
+ * The indication for signal strength update.
+ * @hide
+ */
+ public static final int INDICATION_FILTER_SIGNAL_STRENGTH = 0x1;
+
+ /**
+ * The indication for full network state update.
+ * @hide
+ */
+ public static final int INDICATION_FILTER_FULL_NETWORK_STATE = 0x2;
+
+ /**
+ * The indication for data call dormancy changed update.
+ * @hide
+ */
+ public static final int INDICATION_FILTER_DATA_CALL_DORMANCY_CHANGED = 0x4;
+
+ /**
+ * The indication for link capacity estimate update.
+ * @hide
+ */
+ public static final int INDICATION_FILTER_LINK_CAPACITY_ESTIMATE = 0x8;
+
+ /**
+ * The indication for physical channel config update.
+ * @hide
+ */
+ public static final int INDICATION_FILTER_PHYSICAL_CHANNEL_CONFIG = 0x10;
+
+ /** @hide */
+ @IntDef(flag = true, prefix = { "INDICATION_FILTER_" }, value = {
+ INDICATION_FILTER_SIGNAL_STRENGTH,
+ INDICATION_FILTER_FULL_NETWORK_STATE,
+ INDICATION_FILTER_DATA_CALL_DORMANCY_CHANGED,
+ INDICATION_FILTER_LINK_CAPACITY_ESTIMATE,
+ INDICATION_FILTER_PHYSICAL_CHANNEL_CONFIG
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface IndicationFilters{}
+
+ /**
+ * Sets radio indication update mode. This can be used to control the behavior of indication
+ * update from modem to Android frameworks. For example, by default several indication updates
+ * are turned off when screen is off, but in some special cases (e.g. carkit is connected but
+ * screen is off) we want to turn on those indications even when the screen is off.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ *
+ * @param filters Indication filters. Should be a bitmask of INDICATION_FILTER_XXX.
+ * @see #INDICATION_FILTER_SIGNAL_STRENGTH
+ * @see #INDICATION_FILTER_FULL_NETWORK_STATE
+ * @see #INDICATION_FILTER_DATA_CALL_DORMANCY_CHANGED
+ * @param updateMode The voice activation state
+ * @see #INDICATION_UPDATE_MODE_NORMAL
+ * @see #INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF
+ * @hide
+ */
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public void setRadioIndicationUpdateMode(@IndicationFilters int filters,
+ @IndicationUpdateMode int updateMode) {
try {
ITelephony telephony = getITelephony();
- if (telephony != null)
- retVal = telephony.isUserDataEnabled(subId);
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#isUserDataEnabled", e);
- } catch (NullPointerException e) {
+ if (telephony != null) {
+ telephony.setRadioIndicationUpdateMode(getSubId(), filters, updateMode);
+ }
+ } catch (RemoteException ex) {
+ // This could happen if binder process crashes.
+ if (!isSystemProcess()) {
+ ex.rethrowAsRuntimeException();
+ }
}
- return retVal;
}
- /** Utility method of {@link #setUserMobileDataEnabled(boolean)} */
- @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
- private void setUserMobileDataEnabled(int subId, boolean enable) {
+ /**
+ * A test API to override carrier information including mccmnc, imsi, iccid, gid1, gid2,
+ * plmn and spn. This would be handy for, eg, forcing a particular carrier id, carrier's config
+ * (also any country or carrier overlays) to be loaded when using a test SIM with a call box.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ *
+ * @hide
+ */
+ @TestApi
+ public void setCarrierTestOverride(String mccmnc, String imsi, String iccid, String gid1,
+ String gid2, String plmn, String spn) {
try {
- Log.d(TAG, "setUserMobileDataEnabled: enabled=" + enable);
ITelephony telephony = getITelephony();
- if (telephony != null)
- telephony.setUserDataEnabled(subId, enable);
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#setUserDataEnabled", e);
+ if (telephony != null) {
+ telephony.setCarrierTestOverride(
+ getSubId(), mccmnc, imsi, iccid, gid1, gid2, plmn, spn);
+ }
+ } catch (RemoteException ex) {
+ // This could happen if binder process crashes.
}
}
+
+ /**
+ * A test API to return installed carrier id list version
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
+ *
+ * @hide
+ */
+ @TestApi
+ public int getCarrierIdListVersion() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.getCarrierIdListVersion(getSubId());
+ }
+ } catch (RemoteException ex) {
+ // This could happen if binder process crashes.
+ }
+ return UNKNOWN_CARRIER_ID_LIST_VERSION;
+ }
}
diff --git a/telephony/java/android/telephony/TelephonyScanManager.java b/telephony/java/android/telephony/TelephonyScanManager.java
index c182e34..96ff332 100644
--- a/telephony/java/android/telephony/TelephonyScanManager.java
+++ b/telephony/java/android/telephony/TelephonyScanManager.java
@@ -33,6 +33,7 @@
import android.util.SparseArray;
import java.util.Arrays;
import java.util.List;
+import java.util.concurrent.Executor;
import com.android.internal.telephony.ITelephony;
@@ -55,8 +56,10 @@
/**
* The caller of
- * {@link TelephonyManager#requestNetworkScan(NetworkScanRequest, NetworkScanCallback)} should
- * implement and provide this callback so that the scan results or errors can be returned.
+ * {@link
+ * TelephonyManager#requestNetworkScan(NetworkScanRequest, Executor, NetworkScanCallback)}
+ * should implement and provide this callback so that the scan results or errors can be
+ * returned.
*/
public static abstract class NetworkScanCallback {
/** Returns the scan results to the user, this callback will be called multiple times. */
@@ -83,10 +86,13 @@
private static class NetworkScanInfo {
private final NetworkScanRequest mRequest;
+ private final Executor mExecutor;
private final NetworkScanCallback mCallback;
- NetworkScanInfo(NetworkScanRequest request, NetworkScanCallback callback) {
+ NetworkScanInfo(
+ NetworkScanRequest request, Executor executor, NetworkScanCallback callback) {
mRequest = request;
+ mExecutor = executor;
mCallback = callback;
}
}
@@ -112,10 +118,15 @@
"Failed to find NetworkScanInfo with id " + message.arg2);
}
NetworkScanCallback callback = nsi.mCallback;
+ Executor executor = nsi.mExecutor;
if (callback == null) {
throw new RuntimeException(
"Failed to find NetworkScanCallback with id " + message.arg2);
}
+ if (executor == null) {
+ throw new RuntimeException(
+ "Failed to find Executor with id " + message.arg2);
+ }
switch (message.what) {
case CALLBACK_SCAN_RESULTS:
@@ -126,21 +137,31 @@
for (int i = 0; i < parcelables.length; i++) {
ci[i] = (CellInfo) parcelables[i];
}
- callback.onResults((List<CellInfo>) Arrays.asList(ci));
+ executor.execute(() ->{
+ Rlog.d(TAG, "onResults: " + ci.toString());
+ callback.onResults((List<CellInfo>) Arrays.asList(ci));
+ });
} catch (Exception e) {
Rlog.e(TAG, "Exception in networkscan callback onResults", e);
}
break;
case CALLBACK_SCAN_ERROR:
try {
- callback.onError(message.arg1);
+ final int errorCode = message.arg1;
+ executor.execute(() -> {
+ Rlog.d(TAG, "onError: " + errorCode);
+ callback.onError(errorCode);
+ });
} catch (Exception e) {
Rlog.e(TAG, "Exception in networkscan callback onError", e);
}
break;
case CALLBACK_SCAN_COMPLETE:
try {
- callback.onComplete();
+ executor.execute(() -> {
+ Rlog.d(TAG, "onComplete");
+ callback.onComplete();
+ });
mScanInfo.remove(message.arg2);
} catch (Exception e) {
Rlog.e(TAG, "Exception in networkscan callback onComplete", e);
@@ -171,12 +192,12 @@
* @hide
*/
public NetworkScan requestNetworkScan(int subId,
- NetworkScanRequest request, NetworkScanCallback callback) {
+ NetworkScanRequest request, Executor executor, NetworkScanCallback callback) {
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
int scanId = telephony.requestNetworkScan(subId, request, mMessenger, new Binder());
- saveScanInfo(scanId, request, callback);
+ saveScanInfo(scanId, request, executor, callback);
return new NetworkScan(scanId, subId);
}
} catch (RemoteException ex) {
@@ -187,9 +208,10 @@
return null;
}
- private void saveScanInfo(int id, NetworkScanRequest request, NetworkScanCallback callback) {
+ private void saveScanInfo(
+ int id, NetworkScanRequest request, Executor executor, NetworkScanCallback callback) {
synchronized (mScanInfo) {
- mScanInfo.put(id, new NetworkScanInfo(request, callback));
+ mScanInfo.put(id, new NetworkScanInfo(request, executor, callback));
}
}
diff --git a/telephony/java/android/telephony/UiccAccessRule.java b/telephony/java/android/telephony/UiccAccessRule.java
index 3937201..21bc9d0 100644
--- a/telephony/java/android/telephony/UiccAccessRule.java
+++ b/telephony/java/android/telephony/UiccAccessRule.java
@@ -16,6 +16,7 @@
package android.telephony;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.content.pm.PackageInfo;
import android.content.pm.Signature;
import android.os.Parcel;
@@ -39,9 +40,8 @@
* specification.
*
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+@SystemApi
public final class UiccAccessRule implements Parcelable {
private static final String TAG = "UiccAccessRule";
@@ -221,6 +221,15 @@
}
@Override
+ public int hashCode() {
+ int result = 1;
+ result = 31 * result + Arrays.hashCode(mCertificateHash);
+ result = 31 * result + Objects.hashCode(mPackageName);
+ result = 31 * result + Objects.hashCode(mAccessType);
+ return result;
+ }
+
+ @Override
public String toString() {
return "cert: " + IccUtils.bytesToHexString(mCertificateHash) + " pkg: " +
mPackageName + " access: " + mAccessType;
diff --git a/telephony/java/com/android/ims/ImsConferenceState.aidl b/telephony/java/android/telephony/UiccSlotInfo.aidl
similarity index 83%
copy from telephony/java/com/android/ims/ImsConferenceState.aidl
copy to telephony/java/android/telephony/UiccSlotInfo.aidl
index 2fc029f..5571a6c 100644
--- a/telephony/java/com/android/ims/ImsConferenceState.aidl
+++ b/telephony/java/android/telephony/UiccSlotInfo.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony;
-parcelable ImsConferenceState;
+parcelable UiccSlotInfo;
diff --git a/telephony/java/android/telephony/UiccSlotInfo.java b/telephony/java/android/telephony/UiccSlotInfo.java
new file mode 100644
index 0000000..a39992b
--- /dev/null
+++ b/telephony/java/android/telephony/UiccSlotInfo.java
@@ -0,0 +1,185 @@
+/*
+ * 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.
+ */
+package android.telephony;
+
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Objects;
+
+import android.annotation.IntDef;
+
+/**
+ * Class for the information of a UICC slot.
+ * @hide
+ */
+@SystemApi
+public class UiccSlotInfo implements Parcelable {
+ /**
+ * Card state.
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = { "CARD_STATE_INFO_" }, value = {
+ CARD_STATE_INFO_ABSENT,
+ CARD_STATE_INFO_PRESENT,
+ CARD_STATE_INFO_ERROR,
+ CARD_STATE_INFO_RESTRICTED
+ })
+ public @interface CardStateInfo {}
+
+ /** Card state absent. */
+ public static final int CARD_STATE_INFO_ABSENT = 1;
+
+ /** Card state present. */
+ public static final int CARD_STATE_INFO_PRESENT = 2;
+
+ /** Card state error. */
+ public static final int CARD_STATE_INFO_ERROR = 3;
+
+ /** Card state restricted. */
+ public static final int CARD_STATE_INFO_RESTRICTED = 4;
+
+ private final boolean mIsActive;
+ private final boolean mIsEuicc;
+ private final String mCardId;
+ private final @CardStateInfo int mCardStateInfo;
+ private final int mLogicalSlotIdx;
+ private final boolean mIsExtendedApduSupported;
+
+ public static final Creator<UiccSlotInfo> CREATOR = new Creator<UiccSlotInfo>() {
+ @Override
+ public UiccSlotInfo createFromParcel(Parcel in) {
+ return new UiccSlotInfo(in);
+ }
+
+ @Override
+ public UiccSlotInfo[] newArray(int size) {
+ return new UiccSlotInfo[size];
+ }
+ };
+
+ private UiccSlotInfo(Parcel in) {
+ mIsActive = in.readByte() != 0;
+ mIsEuicc = in.readByte() != 0;
+ mCardId = in.readString();
+ mCardStateInfo = in.readInt();
+ mLogicalSlotIdx = in.readInt();
+ mIsExtendedApduSupported = in.readByte() != 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeByte((byte) (mIsActive ? 1 : 0));
+ dest.writeByte((byte) (mIsEuicc ? 1 : 0));
+ dest.writeString(mCardId);
+ dest.writeInt(mCardStateInfo);
+ dest.writeInt(mLogicalSlotIdx);
+ dest.writeByte((byte) (mIsExtendedApduSupported ? 1 : 0));
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public UiccSlotInfo(boolean isActive, boolean isEuicc, String cardId,
+ @CardStateInfo int cardStateInfo, int logicalSlotIdx, boolean isExtendedApduSupported) {
+ this.mIsActive = isActive;
+ this.mIsEuicc = isEuicc;
+ this.mCardId = cardId;
+ this.mCardStateInfo = cardStateInfo;
+ this.mLogicalSlotIdx = logicalSlotIdx;
+ this.mIsExtendedApduSupported = isExtendedApduSupported;
+ }
+
+ public boolean getIsActive() {
+ return mIsActive;
+ }
+
+ public boolean getIsEuicc() {
+ return mIsEuicc;
+ }
+
+ public String getCardId() {
+ return mCardId;
+ }
+
+ @CardStateInfo
+ public int getCardStateInfo() {
+ return mCardStateInfo;
+ }
+
+ public int getLogicalSlotIdx() {
+ return mLogicalSlotIdx;
+ }
+
+ /**
+ * @return {@code true} if this slot supports extended APDU from ATR, {@code false} otherwise.
+ */
+ public boolean getIsExtendedApduSupported() {
+ return mIsExtendedApduSupported;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ UiccSlotInfo that = (UiccSlotInfo) obj;
+ return (mIsActive == that.mIsActive)
+ && (mIsEuicc == that.mIsEuicc)
+ && (Objects.equals(mCardId, that.mCardId))
+ && (mCardStateInfo == that.mCardStateInfo)
+ && (mLogicalSlotIdx == that.mLogicalSlotIdx)
+ && (mIsExtendedApduSupported == that.mIsExtendedApduSupported);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+ result = 31 * result + (mIsActive ? 1 : 0);
+ result = 31 * result + (mIsEuicc ? 1 : 0);
+ result = 31 * result + Objects.hashCode(mCardId);
+ result = 31 * result + mCardStateInfo;
+ result = 31 * result + mLogicalSlotIdx;
+ result = 31 * result + (mIsExtendedApduSupported ? 1 : 0);
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "UiccSlotInfo (mIsActive="
+ + mIsActive
+ + ", mIsEuicc="
+ + mIsEuicc
+ + ", mCardId="
+ + mCardId
+ + ", cardState="
+ + mCardStateInfo
+ + ", phoneId="
+ + mLogicalSlotIdx
+ + ", mIsExtendedApduSupported="
+ + mIsExtendedApduSupported
+ + ")";
+ }
+}
diff --git a/telephony/java/android/telephony/VoiceSpecificRegistrationStates.java b/telephony/java/android/telephony/VoiceSpecificRegistrationStates.java
new file mode 100644
index 0000000..871ee4d
--- /dev/null
+++ b/telephony/java/android/telephony/VoiceSpecificRegistrationStates.java
@@ -0,0 +1,114 @@
+package android.telephony;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Objects;
+
+
+/**
+ * Class that stores information specific to voice network registration.
+ * @hide
+ */
+public class VoiceSpecificRegistrationStates implements Parcelable{
+ /**
+ * oncurrent services support indicator. if
+ * registered on a CDMA system.
+ * false - Concurrent services not supported,
+ * true - Concurrent services supported
+ */
+ public final boolean cssSupported;
+
+ /**
+ * TSB-58 Roaming Indicator if registered
+ * on a CDMA or EVDO system or -1 if not.
+ * Valid values are 0-255.
+ */
+ public final int roamingIndicator;
+
+ /**
+ * indicates whether the current system is in the
+ * PRL if registered on a CDMA or EVDO system or -1 if
+ * not. 0=not in the PRL, 1=in the PRL
+ */
+ public final int systemIsInPrl;
+
+ /**
+ * default Roaming Indicator from the PRL,
+ * if registered on a CDMA or EVDO system or -1 if not.
+ * Valid values are 0-255.
+ */
+ public final int defaultRoamingIndicator;
+
+ VoiceSpecificRegistrationStates(boolean cssSupported, int roamingIndicator, int systemIsInPrl,
+ int defaultRoamingIndicator) {
+ this.cssSupported = cssSupported;
+ this.roamingIndicator = roamingIndicator;
+ this.systemIsInPrl = systemIsInPrl;
+ this.defaultRoamingIndicator = defaultRoamingIndicator;
+ }
+
+ private VoiceSpecificRegistrationStates(Parcel source) {
+ this.cssSupported = source.readBoolean();
+ this.roamingIndicator = source.readInt();
+ this.systemIsInPrl = source.readInt();
+ this.defaultRoamingIndicator = source.readInt();
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeBoolean(cssSupported);
+ dest.writeInt(roamingIndicator);
+ dest.writeInt(systemIsInPrl);
+ dest.writeInt(defaultRoamingIndicator);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public String toString() {
+ return "VoiceSpecificRegistrationStates {"
+ + " mCssSupported=" + cssSupported
+ + " mRoamingIndicator=" + roamingIndicator
+ + " mSystemIsInPrl=" + systemIsInPrl
+ + " mDefaultRoamingIndicator=" + defaultRoamingIndicator + "}";
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(cssSupported, roamingIndicator, systemIsInPrl,
+ defaultRoamingIndicator);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+
+ if (o == null || !(o instanceof VoiceSpecificRegistrationStates)) {
+ return false;
+ }
+
+ VoiceSpecificRegistrationStates other = (VoiceSpecificRegistrationStates) o;
+ return this.cssSupported == other.cssSupported
+ && this.roamingIndicator == other.roamingIndicator
+ && this.systemIsInPrl == other.systemIsInPrl
+ && this.defaultRoamingIndicator == other.defaultRoamingIndicator;
+ }
+
+
+ public static final Parcelable.Creator<VoiceSpecificRegistrationStates> CREATOR =
+ new Parcelable.Creator<VoiceSpecificRegistrationStates>() {
+ @Override
+ public VoiceSpecificRegistrationStates createFromParcel(Parcel source) {
+ return new VoiceSpecificRegistrationStates(source);
+ }
+
+ @Override
+ public VoiceSpecificRegistrationStates[] newArray(int size) {
+ return new VoiceSpecificRegistrationStates[size];
+ }
+ };
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/data/ApnSetting.java b/telephony/java/android/telephony/data/ApnSetting.java
index 73a05af..bb181e6 100644
--- a/telephony/java/android/telephony/data/ApnSetting.java
+++ b/telephony/java/android/telephony/data/ApnSetting.java
@@ -17,54 +17,233 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
-import android.annotation.StringDef;
import android.content.ContentValues;
import android.database.Cursor;
import android.hardware.radio.V1_0.ApnTypes;
+import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import android.provider.Telephony;
+import android.provider.Telephony.Carriers;
import android.telephony.Rlog;
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
+import android.util.ArrayMap;
import android.util.Log;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
/**
- * A class representing an APN configuration.
+ * An Access Point Name (APN) configuration for a carrier data connection.
+ *
+ * <p>The APN provides configuration to connect a cellular network device to an IP data network. A
+ * carrier uses the name, type and other configuration in an {@code APNSetting} to decide which IP
+ * address to assign, any security methods to apply, and how the device might be connected to
+ * private networks.
+ *
+ * <p>Use {@link ApnSetting.Builder} to create new instances.
*/
public class ApnSetting implements Parcelable {
- static final String LOG_TAG = "ApnSetting";
+ private static final String LOG_TAG = "ApnSetting";
private static final boolean VDBG = false;
+ private static final String V2_FORMAT_REGEX = "^\\[ApnSettingV2\\]\\s*";
+ private static final String V3_FORMAT_REGEX = "^\\[ApnSettingV3\\]\\s*";
+ private static final String V4_FORMAT_REGEX = "^\\[ApnSettingV4\\]\\s*";
+ private static final String V5_FORMAT_REGEX = "^\\[ApnSettingV5\\]\\s*";
+
+ /**
+ * Default value for mtu if it's not set. Moved from PhoneConstants.
+ * @hide
+ */
+ public static final int UNSET_MTU = 0;
+ private static final int UNSPECIFIED_INT = -1;
+ private static final String UNSPECIFIED_STRING = "";
+
+ /**
+ * All APN types.
+ * @hide
+ */
+ public static final int TYPE_ALL = ApnTypes.ALL;
+ /** APN type for default data traffic. */
+ public static final int TYPE_DEFAULT = ApnTypes.DEFAULT;
+ /** APN type for MMS traffic. */
+ public static final int TYPE_MMS = ApnTypes.MMS;
+ /** APN type for SUPL assisted GPS. */
+ public static final int TYPE_SUPL = ApnTypes.SUPL;
+ /** APN type for DUN traffic. */
+ public static final int TYPE_DUN = ApnTypes.DUN;
+ /** APN type for HiPri traffic. */
+ public static final int TYPE_HIPRI = ApnTypes.HIPRI;
+ /** APN type for accessing the carrier's FOTA portal, used for over the air updates. */
+ public static final int TYPE_FOTA = ApnTypes.FOTA;
+ /** APN type for IMS. */
+ public static final int TYPE_IMS = ApnTypes.IMS;
+ /** APN type for CBS. */
+ public static final int TYPE_CBS = ApnTypes.CBS;
+ /** APN type for IA Initial Attach APN. */
+ public static final int TYPE_IA = ApnTypes.IA;
+ /**
+ * APN type for Emergency PDN. This is not an IA apn, but is used
+ * for access to carrier services in an emergency call situation.
+ */
+ public static final int TYPE_EMERGENCY = ApnTypes.EMERGENCY;
+
+ /** @hide */
+ @IntDef(flag = true, prefix = { "TYPE_" }, value = {
+ TYPE_DEFAULT,
+ TYPE_MMS,
+ TYPE_SUPL,
+ TYPE_DUN,
+ TYPE_HIPRI,
+ TYPE_FOTA,
+ TYPE_IMS,
+ TYPE_CBS,
+ TYPE_IA,
+ TYPE_EMERGENCY
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ApnType {}
+
+ // Possible values for authentication types.
+ /** No authentication type. */
+ public static final int AUTH_TYPE_NONE = 0;
+ /** Authentication type for PAP. */
+ public static final int AUTH_TYPE_PAP = 1;
+ /** Authentication type for CHAP. */
+ public static final int AUTH_TYPE_CHAP = 2;
+ /** Authentication type for PAP or CHAP. */
+ public static final int AUTH_TYPE_PAP_OR_CHAP = 3;
+
+ /** @hide */
+ @IntDef(prefix = { "AUTH_TYPE_" }, value = {
+ AUTH_TYPE_NONE,
+ AUTH_TYPE_PAP,
+ AUTH_TYPE_CHAP,
+ AUTH_TYPE_PAP_OR_CHAP,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface AuthType {}
+
+ // Possible values for protocol.
+ /** Protocol type for IP. */
+ public static final int PROTOCOL_IP = 0;
+ /** Protocol type for IPV6. */
+ public static final int PROTOCOL_IPV6 = 1;
+ /** Protocol type for IPV4V6. */
+ public static final int PROTOCOL_IPV4V6 = 2;
+ /** Protocol type for PPP. */
+ public static final int PROTOCOL_PPP = 3;
+
+ /** @hide */
+ @IntDef(prefix = { "PROTOCOL_" }, value = {
+ PROTOCOL_IP,
+ PROTOCOL_IPV6,
+ PROTOCOL_IPV4V6,
+ PROTOCOL_PPP,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ProtocolType {}
+
+ // Possible values for MVNO type.
+ /** MVNO type for service provider name. */
+ public static final int MVNO_TYPE_SPN = 0;
+ /** MVNO type for IMSI. */
+ public static final int MVNO_TYPE_IMSI = 1;
+ /** MVNO type for group identifier level 1. */
+ public static final int MVNO_TYPE_GID = 2;
+ /** MVNO type for ICCID. */
+ public static final int MVNO_TYPE_ICCID = 3;
+
+ /** @hide */
+ @IntDef(prefix = { "MVNO_TYPE_" }, value = {
+ MVNO_TYPE_SPN,
+ MVNO_TYPE_IMSI,
+ MVNO_TYPE_GID,
+ MVNO_TYPE_ICCID,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface MvnoType {}
+
+ private static final Map<String, Integer> APN_TYPE_STRING_MAP;
+ private static final Map<Integer, String> APN_TYPE_INT_MAP;
+ private static final Map<String, Integer> PROTOCOL_STRING_MAP;
+ private static final Map<Integer, String> PROTOCOL_INT_MAP;
+ private static final Map<String, Integer> MVNO_TYPE_STRING_MAP;
+ private static final Map<Integer, String> MVNO_TYPE_INT_MAP;
+
+ static {
+ APN_TYPE_STRING_MAP = new ArrayMap<String, Integer>();
+ APN_TYPE_STRING_MAP.put("*", TYPE_ALL);
+ APN_TYPE_STRING_MAP.put("default", TYPE_DEFAULT);
+ APN_TYPE_STRING_MAP.put("mms", TYPE_MMS);
+ APN_TYPE_STRING_MAP.put("supl", TYPE_SUPL);
+ APN_TYPE_STRING_MAP.put("dun", TYPE_DUN);
+ APN_TYPE_STRING_MAP.put("hipri", TYPE_HIPRI);
+ APN_TYPE_STRING_MAP.put("fota", TYPE_FOTA);
+ APN_TYPE_STRING_MAP.put("ims", TYPE_IMS);
+ APN_TYPE_STRING_MAP.put("cbs", TYPE_CBS);
+ APN_TYPE_STRING_MAP.put("ia", TYPE_IA);
+ APN_TYPE_STRING_MAP.put("emergency", TYPE_EMERGENCY);
+ APN_TYPE_INT_MAP = new ArrayMap<Integer, String>();
+ APN_TYPE_INT_MAP.put(TYPE_DEFAULT, "default");
+ APN_TYPE_INT_MAP.put(TYPE_MMS, "mms");
+ APN_TYPE_INT_MAP.put(TYPE_SUPL, "supl");
+ APN_TYPE_INT_MAP.put(TYPE_DUN, "dun");
+ APN_TYPE_INT_MAP.put(TYPE_HIPRI, "hipri");
+ APN_TYPE_INT_MAP.put(TYPE_FOTA, "fota");
+ APN_TYPE_INT_MAP.put(TYPE_IMS, "ims");
+ APN_TYPE_INT_MAP.put(TYPE_CBS, "cbs");
+ APN_TYPE_INT_MAP.put(TYPE_IA, "ia");
+ APN_TYPE_INT_MAP.put(TYPE_EMERGENCY, "emergency");
+
+ PROTOCOL_STRING_MAP = new ArrayMap<String, Integer>();
+ PROTOCOL_STRING_MAP.put("IP", PROTOCOL_IP);
+ PROTOCOL_STRING_MAP.put("IPV6", PROTOCOL_IPV6);
+ PROTOCOL_STRING_MAP.put("IPV4V6", PROTOCOL_IPV4V6);
+ PROTOCOL_STRING_MAP.put("PPP", PROTOCOL_PPP);
+ PROTOCOL_INT_MAP = new ArrayMap<Integer, String>();
+ PROTOCOL_INT_MAP.put(PROTOCOL_IP, "IP");
+ PROTOCOL_INT_MAP.put(PROTOCOL_IPV6, "IPV6");
+ PROTOCOL_INT_MAP.put(PROTOCOL_IPV4V6, "IPV4V6");
+ PROTOCOL_INT_MAP.put(PROTOCOL_PPP, "PPP");
+
+ MVNO_TYPE_STRING_MAP = new ArrayMap<String, Integer>();
+ MVNO_TYPE_STRING_MAP.put("spn", MVNO_TYPE_SPN);
+ MVNO_TYPE_STRING_MAP.put("imsi", MVNO_TYPE_IMSI);
+ MVNO_TYPE_STRING_MAP.put("gid", MVNO_TYPE_GID);
+ MVNO_TYPE_STRING_MAP.put("iccid", MVNO_TYPE_ICCID);
+ MVNO_TYPE_INT_MAP = new ArrayMap<Integer, String>();
+ MVNO_TYPE_INT_MAP.put(MVNO_TYPE_SPN, "spn");
+ MVNO_TYPE_INT_MAP.put(MVNO_TYPE_IMSI, "imsi");
+ MVNO_TYPE_INT_MAP.put(MVNO_TYPE_GID, "gid");
+ MVNO_TYPE_INT_MAP.put(MVNO_TYPE_ICCID, "iccid");
+ }
+
private final String mEntryName;
private final String mApnName;
- private final InetAddress mProxy;
- private final int mPort;
- private final URL mMmsc;
- private final InetAddress mMmsProxy;
- private final int mMmsPort;
+ private final String mProxyAddress;
+ private final int mProxyPort;
+ private final Uri mMmsc;
+ private final String mMmsProxyAddress;
+ private final int mMmsProxyPort;
private final String mUser;
private final String mPassword;
private final int mAuthType;
- private final List<String> mTypes;
- private final int mTypesBitmap;
+ private final int mApnTypeBitmask;
private final int mId;
private final String mOperatorNumeric;
- private final String mProtocol;
- private final String mRoamingProtocol;
+ private final int mProtocol;
+ private final int mRoamingProtocol;
private final int mMtu;
private final boolean mCarrierEnabled;
@@ -78,20 +257,12 @@
private final int mWaitTime;
private final int mMaxConnsTime;
- private final String mMvnoType;
+ private final int mMvnoType;
private final String mMvnoMatchData;
- private boolean mPermanentFailed = false;
+ private final int mApnSetId;
- /**
- * Returns the types bitmap of the APN.
- *
- * @return types bitmap of the APN
- * @hide
- */
- public int getTypesBitmap() {
- return mTypesBitmap;
- }
+ private boolean mPermanentFailed = false;
/**
* Returns the MTU size of the mobile interface to which the APN connected.
@@ -168,6 +339,21 @@
}
/**
+ * Returns the APN set id.
+ *
+ * APNs that are part of the same set should be preferred together, e.g. if the
+ * user selects a default APN with apnSetId=1, then we will prefer all APNs with apnSetId = 1.
+ *
+ * If the apnSetId = Carriers.NO_SET_SET(=0) then the APN is not part of a set.
+ *
+ * @return the APN set id
+ * @hide
+ */
+ public int getApnSetId() {
+ return mApnSetId;
+ }
+
+ /**
* Indicates this APN setting is permanently failed and cannot be
* retried by the retry manager anymore.
*
@@ -189,7 +375,7 @@
}
/**
- * Returns the entry name of the APN.
+ * Gets the human-readable name that describes the APN.
*
* @return the entry name for the APN
*/
@@ -207,38 +393,66 @@
}
/**
+ * Gets the HTTP proxy address configured for the APN. The proxy address might be an IP address
+ * or hostname. This method returns {@code null} if system networking (typically DNS) isn’t
+ * available to resolve a hostname value—values set as IP addresses don’t have this restriction.
+ * This is a known problem and will be addressed in a future release.
+ *
+ * @return the HTTP proxy address or {@code null} if DNS isn’t available to resolve a hostname
+ * @deprecated use {@link #getProxyAddressAsString()} instead.
+ */
+ @Deprecated
+ public InetAddress getProxyAddress() {
+ return inetAddressFromString(mProxyAddress);
+ }
+
+ /**
* Returns the proxy address of the APN.
*
* @return proxy address.
*/
- public InetAddress getProxy() {
- return mProxy;
+ public String getProxyAddressAsString() {
+ return mProxyAddress;
}
/**
- * Returns the proxy port of the APN.
+ * Returns the proxy address of the APN.
*
- * @return proxy port
+ * @return proxy address.
*/
- public int getPort() {
- return mPort;
+ public int getProxyPort() {
+ return mProxyPort;
}
/**
- * Returns the MMSC URL of the APN.
+ * Returns the MMSC Uri of the APN.
*
- * @return MMSC URL.
+ * @return MMSC Uri.
*/
- public URL getMmsc() {
+ public Uri getMmsc() {
return mMmsc;
}
/**
+ * Gets the MMS proxy address configured for the APN. The MMS proxy address might be an IP
+ * address or hostname. This method returns {@code null} if system networking (typically DNS)
+ * isn’t available to resolve a hostname value—values set as IP addresses don’t have this
+ * restriction. This is a known problem and will be addressed in a future release.
+ *
+ * @return the MMS proxy address or {@code null} if DNS isn’t available to resolve a hostname
+ * @deprecated use {@link #getMmsProxyAddressAsString()} instead.
+ */
+ @Deprecated
+ public InetAddress getMmsProxyAddress() {
+ return inetAddressFromString(mMmsProxyAddress);
+ }
+
+ /**
* Returns the MMS proxy address of the APN.
*
* @return MMS proxy address.
*/
- public InetAddress getMmsProxy() {
- return mMmsProxy;
+ public String getMmsProxyAddressAsString() {
+ return mMmsProxyAddress;
}
/**
@@ -246,8 +460,8 @@
*
* @return MMS proxy port
*/
- public int getMmsPort() {
- return mMmsPort;
+ public int getMmsProxyPort() {
+ return mMmsProxyPort;
}
/**
@@ -268,21 +482,9 @@
return mPassword;
}
- /** @hide */
- @IntDef({
- AUTH_TYPE_NONE,
- AUTH_TYPE_PAP,
- AUTH_TYPE_CHAP,
- AUTH_TYPE_PAP_OR_CHAP,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface AuthType {}
-
/**
* Returns the authentication type of the APN.
*
- * Example of possible values: {@link #AUTH_TYPE_NONE}, {@link #AUTH_TYPE_PAP}.
- *
* @return authentication type
*/
@AuthType
@@ -290,32 +492,20 @@
return mAuthType;
}
- /** @hide */
- @StringDef({
- TYPE_DEFAULT,
- TYPE_MMS,
- TYPE_SUPL,
- TYPE_DUN,
- TYPE_HIPRI,
- TYPE_FOTA,
- TYPE_IMS,
- TYPE_CBS,
- TYPE_IA,
- TYPE_EMERGENCY
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface ApnType {}
-
/**
- * Returns the list of APN types of the APN.
+ * Returns the bitmask of APN types.
*
- * Example of possible values: {@link #TYPE_DEFAULT}, {@link #TYPE_MMS}.
+ * <p>Apn types are usage categories for an APN entry. One APN entry may support multiple
+ * APN types, eg, a single APN may service regular internet traffic ("default") as well as
+ * MMS-specific connections.
*
- * @return the list of APN types
+ * <p>The bitmask of APN types is calculated from APN types defined in {@link ApnSetting}.
+ *
+ * @see Builder#setApnTypeBitmask(int)
+ * @return a bitmask describing the types of the APN
*/
- @ApnType
- public List<String> getTypes() {
- return mTypes;
+ public @ApnType int getApnTypeBitmask() {
+ return mApnTypeBitmask;
}
/**
@@ -328,7 +518,7 @@
}
/**
- * Returns the numeric operator ID for the APN. Usually
+ * Returns the numeric operator ID for the APN. Numeric operator ID is defined as
* {@link android.provider.Telephony.Carriers#MCC} +
* {@link android.provider.Telephony.Carriers#MNC}.
*
@@ -338,37 +528,29 @@
return mOperatorNumeric;
}
- /** @hide */
- @StringDef({
- PROTOCOL_IP,
- PROTOCOL_IPV6,
- PROTOCOL_IPV4V6,
- PROTOCOL_PPP,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface ProtocolType {}
-
/**
* Returns the protocol to use to connect to this APN.
*
- * One of the {@code PDP_type} values in TS 27.007 section 10.1.1.
- * Example of possible values: {@link #PROTOCOL_IP}, {@link #PROTOCOL_IPV6}.
+ * <p>Protocol is one of the {@code PDP_type} values in TS 27.007 section 10.1.1.
*
+ * @see Builder#setProtocol(int)
* @return the protocol
*/
@ProtocolType
- public String getProtocol() {
+ public int getProtocol() {
return mProtocol;
}
/**
- * Returns the protocol to use to connect to this APN when roaming.
+ * Returns the protocol to use to connect to this APN while the device is roaming.
*
- * The syntax is the same as {@link android.provider.Telephony.Carriers#PROTOCOL}.
+ * <p>Roaming protocol is one of the {@code PDP_type} values in TS 27.007 section 10.1.1.
*
+ * @see Builder#setRoamingProtocol(int)
* @return the roaming protocol
*/
- public String getRoamingProtocol() {
+ @ProtocolType
+ public int getRoamingProtocol() {
return mRoamingProtocol;
}
@@ -398,41 +580,29 @@
return mNetworkTypeBitmask;
}
- /** @hide */
- @StringDef({
- MVNO_TYPE_SPN,
- MVNO_TYPE_IMSI,
- MVNO_TYPE_GID,
- MVNO_TYPE_ICCID,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface MvnoType {}
-
/**
* Returns the MVNO match type for this APN.
*
- * Example of possible values: {@link #MVNO_TYPE_SPN}, {@link #MVNO_TYPE_IMSI}.
- *
+ * @see Builder#setMvnoType(int)
* @return the MVNO match type
*/
@MvnoType
- public String getMvnoType() {
+ public int getMvnoType() {
return mMvnoType;
}
private ApnSetting(Builder builder) {
this.mEntryName = builder.mEntryName;
this.mApnName = builder.mApnName;
- this.mProxy = builder.mProxy;
- this.mPort = builder.mPort;
+ this.mProxyAddress = builder.mProxyAddress;
+ this.mProxyPort = builder.mProxyPort;
this.mMmsc = builder.mMmsc;
- this.mMmsProxy = builder.mMmsProxy;
- this.mMmsPort = builder.mMmsPort;
+ this.mMmsProxyAddress = builder.mMmsProxyAddress;
+ this.mMmsProxyPort = builder.mMmsProxyPort;
this.mUser = builder.mUser;
this.mPassword = builder.mPassword;
this.mAuthType = builder.mAuthType;
- this.mTypes = (builder.mTypes == null ? new ArrayList<String>() : builder.mTypes);
- this.mTypesBitmap = builder.mTypesBitmap;
+ this.mApnTypeBitmask = builder.mApnTypeBitmask;
this.mId = builder.mId;
this.mOperatorNumeric = builder.mOperatorNumeric;
this.mProtocol = builder.mProtocol;
@@ -447,47 +617,65 @@
this.mMaxConnsTime = builder.mMaxConnsTime;
this.mMvnoType = builder.mMvnoType;
this.mMvnoMatchData = builder.mMvnoMatchData;
+ this.mApnSetId = builder.mApnSetId;
}
/** @hide */
public static ApnSetting makeApnSetting(int id, String operatorNumeric, String entryName,
- String apnName, InetAddress proxy, int port, URL mmsc, InetAddress mmsProxy,
- int mmsPort, String user, String password, int authType, List<String> types,
- String protocol, String roamingProtocol, boolean carrierEnabled,
- int networkTypeBitmask, int profileId, boolean modemCognitive, int maxConns,
- int waitTime, int maxConnsTime, int mtu, String mvnoType, String mvnoMatchData) {
+ String apnName, String proxyAddress, int proxyPort, Uri mmsc,
+ String mmsProxyAddress, int mmsProxyPort, String user, String password,
+ int authType, int mApnTypeBitmask, int protocol, int roamingProtocol,
+ boolean carrierEnabled, int networkTypeBitmask, int profileId, boolean modemCognitive,
+ int maxConns, int waitTime, int maxConnsTime, int mtu, int mvnoType,
+ String mvnoMatchData, int apnSetId) {
return new Builder()
- .setId(id)
- .setOperatorNumeric(operatorNumeric)
- .setEntryName(entryName)
- .setApnName(apnName)
- .setProxy(proxy)
- .setPort(port)
- .setMmsc(mmsc)
- .setMmsProxy(mmsProxy)
- .setMmsPort(mmsPort)
- .setUser(user)
- .setPassword(password)
- .setAuthType(authType)
- .setTypes(types)
- .setProtocol(protocol)
- .setRoamingProtocol(roamingProtocol)
- .setCarrierEnabled(carrierEnabled)
- .setNetworkTypeBitmask(networkTypeBitmask)
- .setProfileId(profileId)
- .setModemCognitive(modemCognitive)
- .setMaxConns(maxConns)
- .setWaitTime(waitTime)
- .setMaxConnsTime(maxConnsTime)
- .setMtu(mtu)
- .setMvnoType(mvnoType)
- .setMvnoMatchData(mvnoMatchData)
- .build();
+ .setId(id)
+ .setOperatorNumeric(operatorNumeric)
+ .setEntryName(entryName)
+ .setApnName(apnName)
+ .setProxyAddress(proxyAddress)
+ .setProxyPort(proxyPort)
+ .setMmsc(mmsc)
+ .setMmsProxyAddress(mmsProxyAddress)
+ .setMmsProxyPort(mmsProxyPort)
+ .setUser(user)
+ .setPassword(password)
+ .setAuthType(authType)
+ .setApnTypeBitmask(mApnTypeBitmask)
+ .setProtocol(protocol)
+ .setRoamingProtocol(roamingProtocol)
+ .setCarrierEnabled(carrierEnabled)
+ .setNetworkTypeBitmask(networkTypeBitmask)
+ .setProfileId(profileId)
+ .setModemCognitive(modemCognitive)
+ .setMaxConns(maxConns)
+ .setWaitTime(waitTime)
+ .setMaxConnsTime(maxConnsTime)
+ .setMtu(mtu)
+ .setMvnoType(mvnoType)
+ .setMvnoMatchData(mvnoMatchData)
+ .setApnSetId(apnSetId)
+ .buildWithoutCheck();
+ }
+
+ /** @hide */
+ public static ApnSetting makeApnSetting(int id, String operatorNumeric, String entryName,
+ String apnName, String proxyAddress, int proxyPort, Uri mmsc,
+ String mmsProxyAddress, int mmsProxyPort, String user, String password,
+ int authType, int mApnTypeBitmask, int protocol, int roamingProtocol,
+ boolean carrierEnabled, int networkTypeBitmask, int profileId, boolean modemCognitive,
+ int maxConns, int waitTime, int maxConnsTime, int mtu, int mvnoType,
+ String mvnoMatchData) {
+ return makeApnSetting(id, operatorNumeric, entryName, apnName, proxyAddress, proxyPort,
+ mmsc, mmsProxyAddress, mmsProxyPort, user, password, authType, mApnTypeBitmask,
+ protocol, roamingProtocol, carrierEnabled, networkTypeBitmask, profileId,
+ modemCognitive, maxConns, waitTime, maxConnsTime, mtu, mvnoType, mvnoMatchData,
+ Carriers.NO_SET_SET);
}
/** @hide */
public static ApnSetting makeApnSetting(Cursor cursor) {
- String[] types = parseTypes(
+ final int apnTypesBitmask = getApnTypesBitmaskFromString(
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.TYPE)));
int networkTypeBitmask = cursor.getInt(
cursor.getColumnIndexOrThrow(Telephony.Carriers.NETWORK_TYPE_BITMASK));
@@ -499,76 +687,259 @@
}
return makeApnSetting(
- cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers._ID)),
- cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.NUMERIC)),
- cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.NAME)),
- cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.APN)),
- inetAddressFromString(cursor.getString(
- cursor.getColumnIndexOrThrow(Telephony.Carriers.PROXY))),
- portFromString(cursor.getString(
- cursor.getColumnIndexOrThrow(Telephony.Carriers.PORT))),
- URLFromString(cursor.getString(
- cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSC))),
- inetAddressFromString(cursor.getString(
- cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPROXY))),
- portFromString(cursor.getString(
- cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPORT))),
- cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.USER)),
- cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PASSWORD)),
- cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.AUTH_TYPE)),
- Arrays.asList(types),
- cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PROTOCOL)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers._ID)),
+ cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.NUMERIC)),
+ cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.NAME)),
+ cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.APN)),
+ cursor.getString(
+ cursor.getColumnIndexOrThrow(Telephony.Carriers.PROXY)),
+ portFromString(cursor.getString(
+ cursor.getColumnIndexOrThrow(Telephony.Carriers.PORT))),
+ UriFromString(cursor.getString(
+ cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSC))),
+ cursor.getString(
+ cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPROXY)),
+ portFromString(cursor.getString(
+ cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPORT))),
+ cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.USER)),
+ cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PASSWORD)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.AUTH_TYPE)),
+ apnTypesBitmask,
+ getProtocolIntFromString(
+ cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PROTOCOL))),
+ getProtocolIntFromString(
cursor.getString(cursor.getColumnIndexOrThrow(
- Telephony.Carriers.ROAMING_PROTOCOL)),
- cursor.getInt(cursor.getColumnIndexOrThrow(
- Telephony.Carriers.CARRIER_ENABLED)) == 1,
- networkTypeBitmask,
- cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.PROFILE_ID)),
- cursor.getInt(cursor.getColumnIndexOrThrow(
- Telephony.Carriers.MODEM_COGNITIVE)) == 1,
- cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.MAX_CONNS)),
- cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.WAIT_TIME)),
- cursor.getInt(cursor.getColumnIndexOrThrow(
- Telephony.Carriers.MAX_CONNS_TIME)),
- cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.MTU)),
+ Telephony.Carriers.ROAMING_PROTOCOL))),
+ cursor.getInt(cursor.getColumnIndexOrThrow(
+ Telephony.Carriers.CARRIER_ENABLED)) == 1,
+ networkTypeBitmask,
+ cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.PROFILE_ID)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(
+ Telephony.Carriers.MODEM_COGNITIVE)) == 1,
+ cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.MAX_CONNS)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.WAIT_TIME)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(
+ Telephony.Carriers.MAX_CONNS_TIME)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.MTU)),
+ getMvnoTypeIntFromString(
cursor.getString(cursor.getColumnIndexOrThrow(
- Telephony.Carriers.MVNO_TYPE)),
- cursor.getString(cursor.getColumnIndexOrThrow(
- Telephony.Carriers.MVNO_MATCH_DATA)));
+ Telephony.Carriers.MVNO_TYPE))),
+ cursor.getString(cursor.getColumnIndexOrThrow(
+ Telephony.Carriers.MVNO_MATCH_DATA)),
+ cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.APN_SET_ID)));
}
/** @hide */
public static ApnSetting makeApnSetting(ApnSetting apn) {
return makeApnSetting(apn.mId, apn.mOperatorNumeric, apn.mEntryName, apn.mApnName,
- apn.mProxy, apn.mPort, apn.mMmsc, apn.mMmsProxy, apn.mMmsPort, apn.mUser,
- apn.mPassword, apn.mAuthType, apn.mTypes, apn.mProtocol, apn.mRoamingProtocol,
- apn.mCarrierEnabled, apn.mNetworkTypeBitmask, apn.mProfileId,
- apn.mModemCognitive, apn.mMaxConns, apn.mWaitTime, apn.mMaxConnsTime, apn.mMtu,
- apn.mMvnoType, apn.mMvnoMatchData);
+ apn.mProxyAddress, apn.mProxyPort, apn.mMmsc, apn.mMmsProxyAddress,
+ apn.mMmsProxyPort, apn.mUser, apn.mPassword, apn.mAuthType, apn.mApnTypeBitmask,
+ apn.mProtocol, apn.mRoamingProtocol, apn.mCarrierEnabled, apn.mNetworkTypeBitmask,
+ apn.mProfileId, apn.mModemCognitive, apn.mMaxConns, apn.mWaitTime,
+ apn.mMaxConnsTime, apn.mMtu, apn.mMvnoType, apn.mMvnoMatchData, apn.mApnSetId);
}
- /** @hide */
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("[ApnSettingV4] ")
- .append(mEntryName)
- .append(", ").append(mId)
- .append(", ").append(mOperatorNumeric)
- .append(", ").append(mApnName)
- .append(", ").append(inetAddressToString(mProxy))
- .append(", ").append(URLToString(mMmsc))
- .append(", ").append(inetAddressToString(mMmsProxy))
- .append(", ").append(portToString(mMmsPort))
- .append(", ").append(portToString(mPort))
- .append(", ").append(mAuthType).append(", ");
- for (int i = 0; i < mTypes.size(); i++) {
- sb.append(mTypes.get(i));
- if (i < mTypes.size() - 1) {
- sb.append(" | ");
+ /**
+ * Creates an ApnSetting object from a string.
+ *
+ * @param data the string to read.
+ *
+ * The string must be in one of two formats (newlines added for clarity,
+ * spaces are optional):
+ *
+ * v1 format:
+ * <carrier>, <apn>, <proxy>, <port>, <user>, <password>, <server>,
+ * <mmsc>, <mmsproxy>, <mmsport>, <mcc>, <mnc>, <authtype>,
+ * <type>[| <type>...],
+ *
+ * v2 format:
+ * [ApnSettingV2] <carrier>, <apn>, <proxy>, <port>, <user>, <password>, <server>,
+ * <mmsc>, <mmsproxy>, <mmsport>, <mcc>, <mnc>, <authtype>,
+ * <type>[| <type>...], <protocol>, <roaming_protocol>, <carrierEnabled>, <bearerBitmask>,
+ *
+ * v3 format:
+ * [ApnSettingV3] <carrier>, <apn>, <proxy>, <port>, <user>, <password>, <server>,
+ * <mmsc>, <mmsproxy>, <mmsport>, <mcc>, <mnc>, <authtype>,
+ * <type>[| <type>...], <protocol>, <roaming_protocol>, <carrierEnabled>, <bearerBitmask>,
+ * <profileId>, <modemCognitive>, <maxConns>, <waitTime>, <maxConnsTime>, <mtu>,
+ * <mvnoType>, <mvnoMatchData>
+ *
+ * v4 format:
+ * [ApnSettingV4] <carrier>, <apn>, <proxy>, <port>, <user>, <password>, <server>,
+ * <mmsc>, <mmsproxy>, <mmsport>, <mcc>, <mnc>, <authtype>,
+ * <type>[| <type>...], <protocol>, <roaming_protocol>, <carrierEnabled>, <bearerBitmask>,
+ * <profileId>, <modemCognitive>, <maxConns>, <waitTime>, <maxConnsTime>, <mtu>,
+ * <mvnoType>, <mvnoMatchData>, <networkTypeBitmask>
+ *
+ * v5 format:
+ * [ApnSettingV5] <carrier>, <apn>, <proxy>, <port>, <user>, <password>, <server>,
+ * <mmsc>, <mmsproxy>, <mmsport>, <mcc>, <mnc>, <authtype>,
+ * <type>[| <type>...], <protocol>, <roaming_protocol>, <carrierEnabled>, <bearerBitmask>,
+ * <profileId>, <modemCognitive>, <maxConns>, <waitTime>, <maxConnsTime>, <mtu>,
+ * <mvnoType>, <mvnoMatchData>, <networkTypeBitmask>, <apnSetId>
+ *
+ * Note that the strings generated by {@link #toString()} do not contain the username
+ * and password and thus cannot be read by this method.
+ *
+ * This method may return {@code null} if the input string is invalid.
+ *
+ * @hide
+ */
+ public static ApnSetting fromString(String data) {
+ if (data == null) return null;
+
+ int version;
+ // matches() operates on the whole string, so append .* to the regex.
+ if (data.matches(V5_FORMAT_REGEX + ".*")) {
+ version = 5;
+ data = data.replaceFirst(V5_FORMAT_REGEX, "");
+ } else if (data.matches(V4_FORMAT_REGEX + ".*")) {
+ version = 4;
+ data = data.replaceFirst(V4_FORMAT_REGEX, "");
+ } else if (data.matches(V3_FORMAT_REGEX + ".*")) {
+ version = 3;
+ data = data.replaceFirst(V3_FORMAT_REGEX, "");
+ } else if (data.matches(V2_FORMAT_REGEX + ".*")) {
+ version = 2;
+ data = data.replaceFirst(V2_FORMAT_REGEX, "");
+ } else {
+ version = 1;
+ }
+
+ String[] a = data.split("\\s*,\\s*");
+ if (a.length < 14) {
+ return null;
+ }
+
+ int authType;
+ try {
+ authType = Integer.parseInt(a[12]);
+ } catch (NumberFormatException e) {
+ authType = 0;
+ }
+
+ String[] typeArray;
+ String protocol, roamingProtocol;
+ boolean carrierEnabled;
+ int bearerBitmask = 0;
+ int networkTypeBitmask = 0;
+ int profileId = 0;
+ boolean modemCognitive = false;
+ int maxConns = 0;
+ int waitTime = 0;
+ int maxConnsTime = 0;
+ int mtu = UNSET_MTU;
+ String mvnoType = "";
+ String mvnoMatchData = "";
+ int apnSetId = Carriers.NO_SET_SET;
+ if (version == 1) {
+ typeArray = new String[a.length - 13];
+ System.arraycopy(a, 13, typeArray, 0, a.length - 13);
+ protocol = PROTOCOL_INT_MAP.get(PROTOCOL_IP);
+ roamingProtocol = PROTOCOL_INT_MAP.get(PROTOCOL_IP);
+ carrierEnabled = true;
+ } else {
+ if (a.length < 18) {
+ return null;
+ }
+ typeArray = a[13].split("\\s*\\|\\s*");
+ protocol = a[14];
+ roamingProtocol = a[15];
+ carrierEnabled = Boolean.parseBoolean(a[16]);
+
+ bearerBitmask = ServiceState.getBitmaskFromString(a[17]);
+
+ if (a.length > 22) {
+ modemCognitive = Boolean.parseBoolean(a[19]);
+ try {
+ profileId = Integer.parseInt(a[18]);
+ maxConns = Integer.parseInt(a[20]);
+ waitTime = Integer.parseInt(a[21]);
+ maxConnsTime = Integer.parseInt(a[22]);
+ } catch (NumberFormatException e) {
+ }
+ }
+ if (a.length > 23) {
+ try {
+ mtu = Integer.parseInt(a[23]);
+ } catch (NumberFormatException e) {
+ }
+ }
+ if (a.length > 25) {
+ mvnoType = a[24];
+ mvnoMatchData = a[25];
+ }
+ if (a.length > 26) {
+ networkTypeBitmask = ServiceState.getBitmaskFromString(a[26]);
+ }
+ if (a.length > 27) {
+ apnSetId = Integer.parseInt(a[27]);
}
}
- sb.append(", ").append(mProtocol);
- sb.append(", ").append(mRoamingProtocol);
+
+ // If both bearerBitmask and networkTypeBitmask were specified, bearerBitmask would be
+ // ignored.
+ if (networkTypeBitmask == 0) {
+ networkTypeBitmask =
+ ServiceState.convertBearerBitmaskToNetworkTypeBitmask(bearerBitmask);
+ }
+ return makeApnSetting(-1, a[10] + a[11], a[0], a[1], a[2],
+ portFromString(a[3]), UriFromString(a[7]), a[8],
+ portFromString(a[9]), a[4], a[5], authType,
+ getApnTypesBitmaskFromString(TextUtils.join(",", typeArray)),
+ getProtocolIntFromString(protocol), getProtocolIntFromString(roamingProtocol),
+ carrierEnabled, networkTypeBitmask, profileId, modemCognitive, maxConns, waitTime,
+ maxConnsTime, mtu, getMvnoTypeIntFromString(mvnoType), mvnoMatchData, apnSetId);
+ }
+
+ /**
+ * Creates an array of ApnSetting objects from a string.
+ *
+ * @param data the string to read.
+ *
+ * Builds on top of the same format used by fromString, but allows for multiple entries
+ * separated by ";".
+ *
+ * @hide
+ */
+ public static List<ApnSetting> arrayFromString(String data) {
+ List<ApnSetting> retVal = new ArrayList<ApnSetting>();
+ if (TextUtils.isEmpty(data)) {
+ return retVal;
+ }
+ String[] apnStrings = data.split("\\s*;\\s*");
+ for (String apnString : apnStrings) {
+ ApnSetting apn = fromString(apnString);
+ if (apn != null) {
+ retVal.add(apn);
+ }
+ }
+ return retVal;
+ }
+
+ /**
+ * Returns the string representation of ApnSetting.
+ *
+ * This method prints null for unset elements. The output doesn't contain password or user.
+ * @hide
+ */
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("[ApnSettingV5] ")
+ .append(mEntryName)
+ .append(", ").append(mId)
+ .append(", ").append(mOperatorNumeric)
+ .append(", ").append(mApnName)
+ .append(", ").append(mProxyAddress)
+ .append(", ").append(UriToString(mMmsc))
+ .append(", ").append(mMmsProxyAddress)
+ .append(", ").append(portToString(mMmsProxyPort))
+ .append(", ").append(portToString(mProxyPort))
+ .append(", ").append(mAuthType).append(", ");
+ final String[] types = getApnTypesStringFromBitmask(mApnTypeBitmask).split(",");
+ sb.append(TextUtils.join(" | ", types));
+ sb.append(", ").append(PROTOCOL_INT_MAP.get(mProtocol));
+ sb.append(", ").append(PROTOCOL_INT_MAP.get(mRoamingProtocol));
sb.append(", ").append(mCarrierEnabled);
sb.append(", ").append(mProfileId);
sb.append(", ").append(mModemCognitive);
@@ -576,10 +947,11 @@
sb.append(", ").append(mWaitTime);
sb.append(", ").append(mMaxConnsTime);
sb.append(", ").append(mMtu);
- sb.append(", ").append(mMvnoType);
+ sb.append(", ").append(MVNO_TYPE_INT_MAP.get(mMvnoType));
sb.append(", ").append(mMvnoMatchData);
sb.append(", ").append(mPermanentFailed);
sb.append(", ").append(mNetworkTypeBitmask);
+ sb.append(", ").append(mApnSetId);
return sb.toString();
}
@@ -588,61 +960,54 @@
* @hide
*/
public boolean hasMvnoParams() {
- return !TextUtils.isEmpty(mMvnoType) && !TextUtils.isEmpty(mMvnoMatchData);
+ return !TextUtils.isEmpty(getMvnoTypeStringFromInt(mMvnoType))
+ && !TextUtils.isEmpty(mMvnoMatchData);
+ }
+
+ private boolean hasApnType(int type) {
+ return (mApnTypeBitmask & type) == type;
}
/** @hide */
- public boolean canHandleType(String type) {
- if (!mCarrierEnabled) return false;
- boolean wildcardable = true;
- if (TYPE_IA.equalsIgnoreCase(type)) wildcardable = false;
- for (String t : mTypes) {
- // DEFAULT handles all, and HIPRI is handled by DEFAULT
- if (t.equalsIgnoreCase(type)
- || (wildcardable && t.equalsIgnoreCase(TYPE_ALL))
- || (t.equalsIgnoreCase(TYPE_DEFAULT)
- && type.equalsIgnoreCase(TYPE_HIPRI))) {
- return true;
- }
+ public boolean canHandleType(@ApnType int type) {
+ if (!mCarrierEnabled) {
+ return false;
+ }
+ // DEFAULT can handle HIPRI.
+ if (hasApnType(type) || (type == TYPE_HIPRI && hasApnType(TYPE_DEFAULT))) {
+ return true;
}
return false;
}
- // check whether the types of two APN same (even only one type of each APN is same)
+ // Check whether the types of two APN same (even only one type of each APN is same).
private boolean typeSameAny(ApnSetting first, ApnSetting second) {
if (VDBG) {
StringBuilder apnType1 = new StringBuilder(first.mApnName + ": ");
- for (int index1 = 0; index1 < first.mTypes.size(); index1++) {
- apnType1.append(first.mTypes.get(index1));
- apnType1.append(",");
- }
+ apnType1.append(getApnTypesStringFromBitmask(first.mApnTypeBitmask));
StringBuilder apnType2 = new StringBuilder(second.mApnName + ": ");
- for (int index1 = 0; index1 < second.mTypes.size(); index1++) {
- apnType2.append(second.mTypes.get(index1));
- apnType2.append(",");
- }
+ apnType2.append(getApnTypesStringFromBitmask(second.mApnTypeBitmask));
+
Rlog.d(LOG_TAG, "APN1: is " + apnType1);
Rlog.d(LOG_TAG, "APN2: is " + apnType2);
}
- for (int index1 = 0; index1 < first.mTypes.size(); index1++) {
- for (int index2 = 0; index2 < second.mTypes.size(); index2++) {
- if (first.mTypes.get(index1).equals(ApnSetting.TYPE_ALL)
- || second.mTypes.get(index2).equals(ApnSetting.TYPE_ALL)
- || first.mTypes.get(index1).equals(second.mTypes.get(index2))) {
- if (VDBG) Rlog.d(LOG_TAG, "typeSameAny: return true");
- return true;
- }
+ if ((first.mApnTypeBitmask & second.mApnTypeBitmask) != 0) {
+ if (VDBG) {
+ Rlog.d(LOG_TAG, "typeSameAny: return true");
}
+ return true;
}
- if (VDBG) Rlog.d(LOG_TAG, "typeSameAny: return false");
+ if (VDBG) {
+ Rlog.d(LOG_TAG, "typeSameAny: return false");
+ }
return false;
}
// TODO - if we have this function we should also have hashCode.
- // Also should handle changes in type order and perhaps case-insensitivity
+ // Also should handle changes in type order and perhaps case-insensitivity.
/** @hide */
public boolean equals(Object o) {
if (o instanceof ApnSetting == false) {
@@ -652,31 +1017,31 @@
ApnSetting other = (ApnSetting) o;
return mEntryName.equals(other.mEntryName)
- && Objects.equals(mId, other.mId)
- && Objects.equals(mOperatorNumeric, other.mOperatorNumeric)
- && Objects.equals(mApnName, other.mApnName)
- && Objects.equals(mProxy, other.mProxy)
- && Objects.equals(mMmsc, other.mMmsc)
- && Objects.equals(mMmsProxy, other.mMmsProxy)
- && Objects.equals(mMmsPort, other.mMmsPort)
- && Objects.equals(mPort,other.mPort)
- && Objects.equals(mUser, other.mUser)
- && Objects.equals(mPassword, other.mPassword)
- && Objects.equals(mAuthType, other.mAuthType)
- && Objects.equals(mTypes, other.mTypes)
- && Objects.equals(mTypesBitmap, other.mTypesBitmap)
- && Objects.equals(mProtocol, other.mProtocol)
- && Objects.equals(mRoamingProtocol, other.mRoamingProtocol)
- && Objects.equals(mCarrierEnabled, other.mCarrierEnabled)
- && Objects.equals(mProfileId, other.mProfileId)
- && Objects.equals(mModemCognitive, other.mModemCognitive)
- && Objects.equals(mMaxConns, other.mMaxConns)
- && Objects.equals(mWaitTime, other.mWaitTime)
- && Objects.equals(mMaxConnsTime, other.mMaxConnsTime)
- && Objects.equals(mMtu, other.mMtu)
- && Objects.equals(mMvnoType, other.mMvnoType)
- && Objects.equals(mMvnoMatchData, other.mMvnoMatchData)
- && Objects.equals(mNetworkTypeBitmask, other.mNetworkTypeBitmask);
+ && Objects.equals(mId, other.mId)
+ && Objects.equals(mOperatorNumeric, other.mOperatorNumeric)
+ && Objects.equals(mApnName, other.mApnName)
+ && Objects.equals(mProxyAddress, other.mProxyAddress)
+ && Objects.equals(mMmsc, other.mMmsc)
+ && Objects.equals(mMmsProxyAddress, other.mMmsProxyAddress)
+ && Objects.equals(mMmsProxyPort, other.mMmsProxyPort)
+ && Objects.equals(mProxyPort, other.mProxyPort)
+ && Objects.equals(mUser, other.mUser)
+ && Objects.equals(mPassword, other.mPassword)
+ && Objects.equals(mAuthType, other.mAuthType)
+ && Objects.equals(mApnTypeBitmask, other.mApnTypeBitmask)
+ && Objects.equals(mProtocol, other.mProtocol)
+ && Objects.equals(mRoamingProtocol, other.mRoamingProtocol)
+ && Objects.equals(mCarrierEnabled, other.mCarrierEnabled)
+ && Objects.equals(mProfileId, other.mProfileId)
+ && Objects.equals(mModemCognitive, other.mModemCognitive)
+ && Objects.equals(mMaxConns, other.mMaxConns)
+ && Objects.equals(mWaitTime, other.mWaitTime)
+ && Objects.equals(mMaxConnsTime, other.mMaxConnsTime)
+ && Objects.equals(mMtu, other.mMtu)
+ && Objects.equals(mMvnoType, other.mMvnoType)
+ && Objects.equals(mMvnoMatchData, other.mMvnoMatchData)
+ && Objects.equals(mNetworkTypeBitmask, other.mNetworkTypeBitmask)
+ && Objects.equals(mApnSetId, other.mApnSetId);
}
/**
@@ -699,29 +1064,29 @@
ApnSetting other = (ApnSetting) o;
return mEntryName.equals(other.mEntryName)
- && Objects.equals(mOperatorNumeric, other.mOperatorNumeric)
- && Objects.equals(mApnName, other.mApnName)
- && Objects.equals(mProxy, other.mProxy)
- && Objects.equals(mMmsc, other.mMmsc)
- && Objects.equals(mMmsProxy, other.mMmsProxy)
- && Objects.equals(mMmsPort, other.mMmsPort)
- && Objects.equals(mPort, other.mPort)
- && Objects.equals(mUser, other.mUser)
- && Objects.equals(mPassword, other.mPassword)
- && Objects.equals(mAuthType, other.mAuthType)
- && Objects.equals(mTypes, other.mTypes)
- && Objects.equals(mTypesBitmap, other.mTypesBitmap)
- && (isDataRoaming || Objects.equals(mProtocol,other.mProtocol))
- && (!isDataRoaming || Objects.equals(mRoamingProtocol, other.mRoamingProtocol))
- && Objects.equals(mCarrierEnabled, other.mCarrierEnabled)
- && Objects.equals(mProfileId, other.mProfileId)
- && Objects.equals(mModemCognitive, other.mModemCognitive)
- && Objects.equals(mMaxConns, other.mMaxConns)
- && Objects.equals(mWaitTime, other.mWaitTime)
- && Objects.equals(mMaxConnsTime, other.mMaxConnsTime)
- && Objects.equals(mMtu, other.mMtu)
- && Objects.equals(mMvnoType, other.mMvnoType)
- && Objects.equals(mMvnoMatchData, other.mMvnoMatchData);
+ && Objects.equals(mOperatorNumeric, other.mOperatorNumeric)
+ && Objects.equals(mApnName, other.mApnName)
+ && Objects.equals(mProxyAddress, other.mProxyAddress)
+ && Objects.equals(mMmsc, other.mMmsc)
+ && Objects.equals(mMmsProxyAddress, other.mMmsProxyAddress)
+ && Objects.equals(mMmsProxyPort, other.mMmsProxyPort)
+ && Objects.equals(mProxyPort, other.mProxyPort)
+ && Objects.equals(mUser, other.mUser)
+ && Objects.equals(mPassword, other.mPassword)
+ && Objects.equals(mAuthType, other.mAuthType)
+ && Objects.equals(mApnTypeBitmask, other.mApnTypeBitmask)
+ && (isDataRoaming || Objects.equals(mProtocol, other.mProtocol))
+ && (!isDataRoaming || Objects.equals(mRoamingProtocol, other.mRoamingProtocol))
+ && Objects.equals(mCarrierEnabled, other.mCarrierEnabled)
+ && Objects.equals(mProfileId, other.mProfileId)
+ && Objects.equals(mModemCognitive, other.mModemCognitive)
+ && Objects.equals(mMaxConns, other.mMaxConns)
+ && Objects.equals(mWaitTime, other.mWaitTime)
+ && Objects.equals(mMaxConnsTime, other.mMaxConnsTime)
+ && Objects.equals(mMtu, other.mMtu)
+ && Objects.equals(mMvnoType, other.mMvnoType)
+ && Objects.equals(mMvnoMatchData, other.mMvnoMatchData)
+ && Objects.equals(mApnSetId, other.mApnSetId);
}
/**
@@ -733,132 +1098,141 @@
*/
public boolean similar(ApnSetting other) {
return (!this.canHandleType(TYPE_DUN)
- && !other.canHandleType(TYPE_DUN)
- && Objects.equals(this.mApnName, other.mApnName)
- && !typeSameAny(this, other)
- && xorEqualsInetAddress(this.mProxy, other.mProxy)
- && xorEqualsPort(this.mPort, other.mPort)
- && xorEquals(this.mProtocol, other.mProtocol)
- && xorEquals(this.mRoamingProtocol, other.mRoamingProtocol)
- && Objects.equals(this.mCarrierEnabled, other.mCarrierEnabled)
- && Objects.equals(this.mProfileId, other.mProfileId)
- && Objects.equals(this.mMvnoType, other.mMvnoType)
- && Objects.equals(this.mMvnoMatchData, other.mMvnoMatchData)
- && xorEqualsURL(this.mMmsc, other.mMmsc)
- && xorEqualsInetAddress(this.mMmsProxy, other.mMmsProxy)
- && xorEqualsPort(this.mMmsPort, other.mMmsPort))
- && Objects.equals(this.mNetworkTypeBitmask, other.mNetworkTypeBitmask);
+ && !other.canHandleType(TYPE_DUN)
+ && Objects.equals(this.mApnName, other.mApnName)
+ && !typeSameAny(this, other)
+ && xorEquals(this.mProxyAddress, other.mProxyAddress)
+ && xorEqualsInt(this.mProxyPort, other.mProxyPort)
+ && xorEquals(this.mProtocol, other.mProtocol)
+ && xorEquals(this.mRoamingProtocol, other.mRoamingProtocol)
+ && Objects.equals(this.mCarrierEnabled, other.mCarrierEnabled)
+ && Objects.equals(this.mProfileId, other.mProfileId)
+ && Objects.equals(this.mMvnoType, other.mMvnoType)
+ && Objects.equals(this.mMvnoMatchData, other.mMvnoMatchData)
+ && xorEquals(this.mMmsc, other.mMmsc)
+ && xorEquals(this.mMmsProxyAddress, other.mMmsProxyAddress)
+ && xorEqualsInt(this.mMmsProxyPort, other.mMmsProxyPort))
+ && Objects.equals(this.mNetworkTypeBitmask, other.mNetworkTypeBitmask)
+ && Objects.equals(mApnSetId, other.mApnSetId);
}
- // Equal or one is not specified.
- private boolean xorEquals(String first, String second) {
- return (Objects.equals(first, second)
- || TextUtils.isEmpty(first)
- || TextUtils.isEmpty(second));
- }
-
- // Equal or one is not specified.
- private boolean xorEqualsInetAddress(InetAddress first, InetAddress second) {
+ // Equal or one is null.
+ private boolean xorEquals(Object first, Object second) {
return first == null || second == null || first.equals(second);
}
// Equal or one is not specified.
- private boolean xorEqualsURL(URL first, URL second) {
- return first == null || second == null || first.equals(second);
- }
-
- // Equal or one is not specified.
- private boolean xorEqualsPort(int first, int second) {
- return first == -1 || second == -1 || Objects.equals(first, second);
- }
-
- // Helper function to convert APN string into a 32-bit bitmask.
- private static int getApnBitmask(String apn) {
- switch (apn) {
- case TYPE_DEFAULT: return ApnTypes.DEFAULT;
- case TYPE_MMS: return ApnTypes.MMS;
- case TYPE_SUPL: return ApnTypes.SUPL;
- case TYPE_DUN: return ApnTypes.DUN;
- case TYPE_HIPRI: return ApnTypes.HIPRI;
- case TYPE_FOTA: return ApnTypes.FOTA;
- case TYPE_IMS: return ApnTypes.IMS;
- case TYPE_CBS: return ApnTypes.CBS;
- case TYPE_IA: return ApnTypes.IA;
- case TYPE_EMERGENCY: return ApnTypes.EMERGENCY;
- case TYPE_ALL: return ApnTypes.ALL;
- default: return ApnTypes.NONE;
- }
- }
-
- private String deParseTypes(List<String> types) {
- if (types == null) {
- return null;
- }
- return TextUtils.join(",", types);
+ private boolean xorEqualsInt(int first, int second) {
+ return first == UNSPECIFIED_INT || second == UNSPECIFIED_INT
+ || Objects.equals(first, second);
}
private String nullToEmpty(String stringValue) {
- return stringValue == null ? "" : stringValue;
+ return stringValue == null ? UNSPECIFIED_STRING : stringValue;
}
- /** @hide */
- // Called by DPM.
+ /**
+ * @hide
+ * Called by {@link android.app.admin.DevicePolicyManager} to convert this APN into
+ * ContentValue. If a field is not specified then we put "" instead of null.
+ */
public ContentValues toContentValues() {
ContentValues apnValue = new ContentValues();
apnValue.put(Telephony.Carriers.NUMERIC, nullToEmpty(mOperatorNumeric));
apnValue.put(Telephony.Carriers.NAME, nullToEmpty(mEntryName));
apnValue.put(Telephony.Carriers.APN, nullToEmpty(mApnName));
- apnValue.put(Telephony.Carriers.PROXY, mProxy == null ? "" : inetAddressToString(mProxy));
- apnValue.put(Telephony.Carriers.PORT, portToString(mPort));
- apnValue.put(Telephony.Carriers.MMSC, mMmsc == null ? "" : URLToString(mMmsc));
- apnValue.put(Telephony.Carriers.MMSPORT, portToString(mMmsPort));
- apnValue.put(Telephony.Carriers.MMSPROXY, mMmsProxy == null
- ? "" : inetAddressToString(mMmsProxy));
+ apnValue.put(Telephony.Carriers.PROXY, nullToEmpty(mProxyAddress));
+ apnValue.put(Telephony.Carriers.PORT, nullToEmpty(portToString(mProxyPort)));
+ apnValue.put(Telephony.Carriers.MMSC, nullToEmpty(UriToString(mMmsc)));
+ apnValue.put(Telephony.Carriers.MMSPORT, nullToEmpty(portToString(mMmsProxyPort)));
+ apnValue.put(Telephony.Carriers.MMSPROXY, nullToEmpty(
+ mMmsProxyAddress));
apnValue.put(Telephony.Carriers.USER, nullToEmpty(mUser));
apnValue.put(Telephony.Carriers.PASSWORD, nullToEmpty(mPassword));
apnValue.put(Telephony.Carriers.AUTH_TYPE, mAuthType);
- String apnType = deParseTypes(mTypes);
+ String apnType = getApnTypesStringFromBitmask(mApnTypeBitmask);
apnValue.put(Telephony.Carriers.TYPE, nullToEmpty(apnType));
- apnValue.put(Telephony.Carriers.PROTOCOL, nullToEmpty(mProtocol));
- apnValue.put(Telephony.Carriers.ROAMING_PROTOCOL, nullToEmpty(mRoamingProtocol));
+ apnValue.put(Telephony.Carriers.PROTOCOL,
+ getProtocolStringFromInt(mProtocol));
+ apnValue.put(Telephony.Carriers.ROAMING_PROTOCOL,
+ getProtocolStringFromInt(mRoamingProtocol));
apnValue.put(Telephony.Carriers.CARRIER_ENABLED, mCarrierEnabled);
- apnValue.put(Telephony.Carriers.MVNO_TYPE, nullToEmpty(mMvnoType));
+ apnValue.put(Telephony.Carriers.MVNO_TYPE, getMvnoTypeStringFromInt(mMvnoType));
apnValue.put(Telephony.Carriers.NETWORK_TYPE_BITMASK, mNetworkTypeBitmask);
return apnValue;
}
/**
- * @param types comma delimited list of APN types
- * @return array of APN types
+ * @param apnTypeBitmask bitmask of APN types.
+ * @return comma delimited list of APN types.
* @hide
*/
- public static String[] parseTypes(String types) {
- String[] result;
- // If unset, set to DEFAULT.
+ public static String getApnTypesStringFromBitmask(int apnTypeBitmask) {
+ List<String> types = new ArrayList<>();
+ for (Integer type : APN_TYPE_INT_MAP.keySet()) {
+ if ((apnTypeBitmask & type) == type) {
+ types.add(APN_TYPE_INT_MAP.get(type));
+ }
+ }
+ return TextUtils.join(",", types);
+ }
+
+ /**
+ * @param types comma delimited list of APN types.
+ * @return bitmask of APN types.
+ * @hide
+ */
+ public static int getApnTypesBitmaskFromString(String types) {
+ // If unset, set to ALL.
if (TextUtils.isEmpty(types)) {
- result = new String[1];
- result[0] = TYPE_ALL;
+ return TYPE_ALL;
} else {
- result = types.split(",");
- }
- return result;
- }
-
- private static URL URLFromString(String url) {
- try {
- return TextUtils.isEmpty(url) ? null : new URL(url);
- } catch (MalformedURLException e) {
- Log.e(LOG_TAG, "Can't parse URL from string.");
- return null;
+ int result = 0;
+ for (String str : types.split(",")) {
+ Integer type = APN_TYPE_STRING_MAP.get(str.toLowerCase());
+ if (type != null) {
+ result |= type;
+ }
+ }
+ return result;
}
}
- private static String URLToString(URL url) {
- return url == null ? "" : url.toString();
+ /** @hide */
+ public static int getMvnoTypeIntFromString(String mvnoType) {
+ Integer mvnoTypeInt = MVNO_TYPE_STRING_MAP.get(mvnoType);
+ return mvnoTypeInt == null ? UNSPECIFIED_INT : mvnoTypeInt;
}
- private static InetAddress inetAddressFromString(String inetAddress) {
+ /** @hide */
+ public static String getMvnoTypeStringFromInt(int mvnoType) {
+ String mvnoTypeString = MVNO_TYPE_INT_MAP.get(mvnoType);
+ return mvnoTypeString == null ? UNSPECIFIED_STRING : mvnoTypeString;
+ }
+
+ /** @hide */
+ public static int getProtocolIntFromString(String protocol) {
+ Integer protocolInt = PROTOCOL_STRING_MAP.get(protocol);
+ return protocolInt == null ? UNSPECIFIED_INT : protocolInt;
+ }
+
+ /** @hide */
+ public static String getProtocolStringFromInt(int protocol) {
+ String protocolString = PROTOCOL_INT_MAP.get(protocol);
+ return protocolString == null ? UNSPECIFIED_STRING : protocolString;
+ }
+
+ private static Uri UriFromString(String uri) {
+ return TextUtils.isEmpty(uri) ? null : Uri.parse(uri);
+ }
+
+ private static String UriToString(Uri uri) {
+ return uri == null ? null : uri.toString();
+ }
+
+ /** @hide */
+ public static InetAddress inetAddressFromString(String inetAddress) {
if (TextUtils.isEmpty(inetAddress)) {
return null;
}
@@ -870,7 +1244,8 @@
}
}
- private static String inetAddressToString(InetAddress inetAddress) {
+ /** @hide */
+ public static String inetAddressToString(InetAddress inetAddress) {
if (inetAddress == null) {
return null;
}
@@ -887,7 +1262,7 @@
}
private static int portFromString(String strPort) {
- int port = -1;
+ int port = UNSPECIFIED_INT;
if (!TextUtils.isEmpty(strPort)) {
try {
port = Integer.parseInt(strPort);
@@ -899,7 +1274,7 @@
}
private static String portToString(int port) {
- return port == -1 ? "" : Integer.toString(port);
+ return port == UNSPECIFIED_INT ? null : Integer.toString(port);
}
// Implement Parcelable.
@@ -916,19 +1291,19 @@
dest.writeString(mOperatorNumeric);
dest.writeString(mEntryName);
dest.writeString(mApnName);
- dest.writeValue(mProxy);
- dest.writeInt(mPort);
+ dest.writeString(mProxyAddress);
+ dest.writeInt(mProxyPort);
dest.writeValue(mMmsc);
- dest.writeValue(mMmsProxy);
- dest.writeInt(mMmsPort);
+ dest.writeString(mMmsProxyAddress);
+ dest.writeInt(mMmsProxyPort);
dest.writeString(mUser);
dest.writeString(mPassword);
dest.writeInt(mAuthType);
- dest.writeStringArray(mTypes.toArray(new String[0]));
- dest.writeString(mProtocol);
- dest.writeString(mRoamingProtocol);
- dest.writeInt(mCarrierEnabled ? 1: 0);
- dest.writeString(mMvnoType);
+ dest.writeInt(mApnTypeBitmask);
+ dest.writeInt(mProtocol);
+ dest.writeInt(mRoamingProtocol);
+ dest.writeBoolean(mCarrierEnabled);
+ dest.writeInt(mMvnoType);
dest.writeInt(mNetworkTypeBitmask);
}
@@ -937,123 +1312,89 @@
final String operatorNumeric = in.readString();
final String entryName = in.readString();
final String apnName = in.readString();
- final InetAddress proxy = (InetAddress)in.readValue(InetAddress.class.getClassLoader());
+ final String proxy = in.readString();
final int port = in.readInt();
- final URL mmsc = (URL)in.readValue(URL.class.getClassLoader());
- final InetAddress mmsProxy = (InetAddress)in.readValue(InetAddress.class.getClassLoader());
+ final Uri mmsc = (Uri)in.readValue(Uri.class.getClassLoader());
+ final String mmsProxy = in.readString();
final int mmsPort = in.readInt();
final String user = in.readString();
final String password = in.readString();
final int authType = in.readInt();
- final List<String> types = Arrays.asList(in.readStringArray());
- final String protocol = in.readString();
- final String roamingProtocol = in.readString();
- final boolean carrierEnabled = in.readInt() > 0;
- final String mvnoType = in.readString();
+ final int apnTypesBitmask = in.readInt();
+ final int protocol = in.readInt();
+ final int roamingProtocol = in.readInt();
+ final boolean carrierEnabled = in.readBoolean();
+ final int mvnoType = in.readInt();
final int networkTypeBitmask = in.readInt();
return makeApnSetting(id, operatorNumeric, entryName, apnName,
- proxy, port, mmsc, mmsProxy, mmsPort, user, password, authType, types, protocol,
- roamingProtocol, carrierEnabled, networkTypeBitmask, 0, false,
- 0, 0, 0, 0, mvnoType, null);
+ proxy, port, mmsc, mmsProxy, mmsPort, user, password, authType, apnTypesBitmask,
+ protocol, roamingProtocol, carrierEnabled, networkTypeBitmask, 0, false,
+ 0, 0, 0, 0, mvnoType, null);
}
public static final Parcelable.Creator<ApnSetting> CREATOR =
new Parcelable.Creator<ApnSetting>() {
@Override
public ApnSetting createFromParcel(Parcel in) {
- return readFromParcel(in);
- }
+ return readFromParcel(in);
+ }
@Override
public ApnSetting[] newArray(int size) {
- return new ApnSetting[size];
- }
+ return new ApnSetting[size];
+ }
};
/**
- * APN types for data connections. These are usage categories for an APN
- * entry. One APN entry may support multiple APN types, eg, a single APN
- * may service regular internet traffic ("default") as well as MMS-specific
- * connections.<br/>
- * ALL is a special type to indicate that this APN entry can
- * service all data connections.
- */
- public static final String TYPE_ALL = "*";
- /** APN type for default data traffic */
- public static final String TYPE_DEFAULT = "default";
- /** APN type for MMS traffic */
- public static final String TYPE_MMS = "mms";
- /** APN type for SUPL assisted GPS */
- public static final String TYPE_SUPL = "supl";
- /** APN type for DUN traffic */
- public static final String TYPE_DUN = "dun";
- /** APN type for HiPri traffic */
- public static final String TYPE_HIPRI = "hipri";
- /** APN type for FOTA */
- public static final String TYPE_FOTA = "fota";
- /** APN type for IMS */
- public static final String TYPE_IMS = "ims";
- /** APN type for CBS */
- public static final String TYPE_CBS = "cbs";
- /** APN type for IA Initial Attach APN */
- public static final String TYPE_IA = "ia";
- /** APN type for Emergency PDN. This is not an IA apn, but is used
- * for access to carrier services in an emergency call situation. */
- public static final String TYPE_EMERGENCY = "emergency";
- /**
- * Array of all APN types
+ * Provides a convenient way to set the fields of a {@link ApnSetting} when creating a new
+ * instance. The following settings are required to build an {@code ApnSetting}:
*
- * @hide
+ * <ul><li>apnTypeBitmask</li>
+ * <li>apnName</li>
+ * <li>entryName</li></ul>
+ *
+ * <p>The example below shows how you might create a new {@code ApnSetting}:
+ *
+ * <pre><code>
+ * // Create an MMS proxy address with a hostname. A network might not be
+ * // available, so supply a dummy (0.0.0.0) IPv4 address to avoid DNS lookup.
+ * String host = "mms.example.com";
+ * byte[] ipAddress = new byte[4];
+ * InetAddress mmsProxy;
+ * try {
+ * mmsProxy = InetAddress.getByAddress(host, ipAddress);
+ * } catch (UnknownHostException e) {
+ * e.printStackTrace();
+ * return;
+ * }
+ *
+ * ApnSetting apn = new ApnSetting.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)
+ * .build();
+ * </code></pre>
*/
- public static final String[] ALL_TYPES = {
- TYPE_DEFAULT,
- TYPE_MMS,
- TYPE_SUPL,
- TYPE_DUN,
- TYPE_HIPRI,
- TYPE_FOTA,
- TYPE_IMS,
- TYPE_CBS,
- TYPE_IA,
- TYPE_EMERGENCY
- };
-
- // Possible values for authentication types.
- public static final int AUTH_TYPE_NONE = 0;
- public static final int AUTH_TYPE_PAP = 1;
- public static final int AUTH_TYPE_CHAP = 2;
- public static final int AUTH_TYPE_PAP_OR_CHAP = 3;
-
- // Possible values for protocol.
- public static final String PROTOCOL_IP = "IP";
- public static final String PROTOCOL_IPV6 = "IPV6";
- public static final String PROTOCOL_IPV4V6 = "IPV4V6";
- public static final String PROTOCOL_PPP = "PPP";
-
- // Possible values for MVNO type.
- public static final String MVNO_TYPE_SPN = "spn";
- public static final String MVNO_TYPE_IMSI = "imsi";
- public static final String MVNO_TYPE_GID = "gid";
- public static final String MVNO_TYPE_ICCID = "iccid";
-
public static class Builder{
private String mEntryName;
private String mApnName;
- private InetAddress mProxy;
- private int mPort = -1;
- private URL mMmsc;
- private InetAddress mMmsProxy;
- private int mMmsPort = -1;
+ private String mProxyAddress;
+ private int mProxyPort = UNSPECIFIED_INT;
+ private Uri mMmsc;
+ private String mMmsProxyAddress;
+ private int mMmsProxyPort = UNSPECIFIED_INT;
private String mUser;
private String mPassword;
private int mAuthType;
- private List<String> mTypes;
- private int mTypesBitmap;
+ private int mApnTypeBitmask;
private int mId;
private String mOperatorNumeric;
- private String mProtocol;
- private String mRoamingProtocol;
+ private int mProtocol = UNSPECIFIED_INT;
+ private int mRoamingProtocol = UNSPECIFIED_INT;
private int mMtu;
private int mNetworkTypeBitmask;
private boolean mCarrierEnabled;
@@ -1062,8 +1403,9 @@
private int mMaxConns;
private int mWaitTime;
private int mMaxConnsTime;
- private String mMvnoType;
+ private int mMvnoType = UNSPECIFIED_INT;
private String mMvnoMatchData;
+ private int mApnSetId;
/**
* Default constructor for Builder.
@@ -1158,7 +1500,18 @@
}
/**
- * Sets the entry name of the APN.
+ * Sets the APN set id for the APN.
+ *
+ * @param apnSetId the set id for the APN
+ * @hide
+ */
+ public Builder setApnSetId(int apnSetId) {
+ this.mApnSetId = apnSetId;
+ return this;
+ }
+
+ /**
+ * Sets a human-readable name that describes the APN.
*
* @param entryName the entry name to set for the APN
*/
@@ -1178,12 +1531,32 @@
}
/**
+ * Sets the address of an HTTP proxy for the APN. The proxy address can be an IP address or
+ * hostname. If {@code proxy} contains both an IP address and hostname, this method ignores
+ * the IP address.
+ *
+ * <p>The {@link java.net.InetAddress} methods
+ * {@link java.net.InetAddress#getAllByName getAllByName()} require DNS for hostname
+ * resolution. To avoid this requirement when setting a hostname, call
+ * {@link java.net.InetAddress#getByAddress(java.lang.String, byte[])} with both the
+ * hostname and a dummy IP address. See {@link ApnSetting.Builder above} for an example.
+ *
+ * @param proxy the proxy address to set for the APN
+ * @deprecated use {@link #setProxyAddress(String)} instead.
+ */
+ @Deprecated
+ public Builder setProxyAddress(InetAddress proxy) {
+ this.mProxyAddress = inetAddressToString(proxy);
+ return this;
+ }
+
+ /**
* Sets the proxy address of the APN.
*
* @param proxy the proxy address to set for the APN
*/
- public Builder setProxy(InetAddress proxy) {
- this.mProxy = proxy;
+ public Builder setProxyAddress(String proxy) {
+ this.mProxyAddress = proxy;
return this;
}
@@ -1192,28 +1565,49 @@
*
* @param port the proxy port to set for the APN
*/
- public Builder setPort(int port) {
- this.mPort = port;
+ public Builder setProxyPort(int port) {
+ this.mProxyPort = port;
return this;
}
/**
- * Sets the MMSC URL of the APN.
+ * Sets the MMSC Uri of the APN.
*
- * @param mmsc the MMSC URL to set for the APN
+ * @param mmsc the MMSC Uri to set for the APN
*/
- public Builder setMmsc(URL mmsc) {
+ public Builder setMmsc(Uri mmsc) {
this.mMmsc = mmsc;
return this;
}
/**
+ * Sets the address of an MMS proxy for the APN. The MMS proxy address can be an IP address
+ * or hostname. If {@code mmsProxy} contains both an IP address and hostname, this method
+ * ignores the IP address.
+ *
+ * <p>The {@link java.net.InetAddress} methods
+ * {@link java.net.InetAddress#getByName getByName()} and
+ * {@link java.net.InetAddress#getAllByName getAllByName()} require DNS for hostname
+ * resolution. To avoid this requirement when setting a hostname, call
+ * {@link java.net.InetAddress#getByAddress(java.lang.String, byte[])} with both the
+ * hostname and a dummy IP address. See {@link ApnSetting.Builder above} for an example.
+ *
+ * @param mmsProxy the MMS proxy address to set for the APN
+ * @deprecated use {@link #setMmsProxyAddress(String)} instead.
+ */
+ @Deprecated
+ public Builder setMmsProxyAddress(InetAddress mmsProxy) {
+ this.mMmsProxyAddress = inetAddressToString(mmsProxy);
+ return this;
+ }
+
+ /**
* Sets the MMS proxy address of the APN.
*
* @param mmsProxy the MMS proxy address to set for the APN
*/
- public Builder setMmsProxy(InetAddress mmsProxy) {
- this.mMmsProxy = mmsProxy;
+ public Builder setMmsProxyAddress(String mmsProxy) {
+ this.mMmsProxyAddress = mmsProxy;
return this;
}
@@ -1222,8 +1616,8 @@
*
* @param mmsPort the MMS proxy port to set for the APN
*/
- public Builder setMmsPort(int mmsPort) {
- this.mMmsPort = mmsPort;
+ public Builder setMmsProxyPort(int mmsPort) {
+ this.mMmsProxyPort = mmsPort;
return this;
}
@@ -1251,8 +1645,6 @@
/**
* Sets the authentication type of the APN.
*
- * Example of possible values: {@link #AUTH_TYPE_NONE}, {@link #AUTH_TYPE_PAP}.
- *
* @param authType the authentication type to set for the APN
*/
public Builder setAuthType(@AuthType int authType) {
@@ -1261,25 +1653,25 @@
}
/**
- * Sets the list of APN types of the APN.
+ * Sets the bitmask of APN types.
*
- * Example of possible values: {@link #TYPE_DEFAULT}, {@link #TYPE_MMS}.
+ * <p>Apn types are usage categories for an APN entry. One APN entry may support multiple
+ * APN types, eg, a single APN may service regular internet traffic ("default") as well as
+ * MMS-specific connections.
*
- * @param types the list of APN types to set for the APN
+ * <p>The bitmask of APN types is calculated from APN types defined in {@link ApnSetting}.
+ *
+ * @param apnTypeBitmask a bitmask describing the types of the APN
*/
- public Builder setTypes(@ApnType List<String> types) {
- this.mTypes = types;
- int apnBitmap = 0;
- for (int i = 0; i < mTypes.size(); i++) {
- mTypes.set(i, mTypes.get(i).toLowerCase());
- apnBitmap |= getApnBitmask(mTypes.get(i));
- }
- this.mTypesBitmap = apnBitmap;
+ public Builder setApnTypeBitmask(@ApnType int apnTypeBitmask) {
+ this.mApnTypeBitmask = apnTypeBitmask;
return this;
}
/**
- * Set the numeric operator ID for the APN.
+ * Sets the numeric operator ID for the APN. Numeric operator ID is defined as
+ * {@link android.provider.Telephony.Carriers#MCC} +
+ * {@link android.provider.Telephony.Carriers#MNC}.
*
* @param operatorNumeric the numeric operator ID to set for this entry
*/
@@ -1291,22 +1683,23 @@
/**
* Sets the protocol to use to connect to this APN.
*
- * One of the {@code PDP_type} values in TS 27.007 section 10.1.1.
- * Example of possible values: {@link #PROTOCOL_IP}, {@link #PROTOCOL_IPV6}.
+ * <p>Protocol is one of the {@code PDP_type} values in TS 27.007 section 10.1.1.
*
* @param protocol the protocol to set to use to connect to this APN
*/
- public Builder setProtocol(@ProtocolType String protocol) {
+ public Builder setProtocol(@ProtocolType int protocol) {
this.mProtocol = protocol;
return this;
}
/**
- * Sets the protocol to use to connect to this APN when roaming.
+ * Sets the protocol to use to connect to this APN when the device is roaming.
+ *
+ * <p>Roaming protocol is one of the {@code PDP_type} values in TS 27.007 section 10.1.1.
*
* @param roamingProtocol the protocol to set to use to connect to this APN when roaming
*/
- public Builder setRoamingProtocol(String roamingProtocol) {
+ public Builder setRoamingProtocol(@ProtocolType int roamingProtocol) {
this.mRoamingProtocol = roamingProtocol;
return this;
}
@@ -1334,18 +1727,36 @@
/**
* Sets the MVNO match type for this APN.
*
- * Example of possible values: {@link #MVNO_TYPE_SPN}, {@link #MVNO_TYPE_IMSI}.
- *
* @param mvnoType the MVNO match type to set for this APN
*/
- public Builder setMvnoType(@MvnoType String mvnoType) {
+ public Builder setMvnoType(@MvnoType int mvnoType) {
this.mMvnoType = mvnoType;
return this;
}
+ /**
+ * Builds {@link ApnSetting} from this builder.
+ *
+ * @return {@code null} if {@link #setApnName(String)} or {@link #setEntryName(String)}
+ * is empty, or {@link #setApnTypeBitmask(int)} doesn't contain a valid bit,
+ * {@link ApnSetting} built from this builder otherwise.
+ */
public ApnSetting build() {
+ if ((mApnTypeBitmask & ApnTypes.ALL) == 0 || TextUtils.isEmpty(mApnName)
+ || TextUtils.isEmpty(mEntryName)) {
+ return null;
+ }
+ return new ApnSetting(this);
+ }
+
+ /**
+ * Builds {@link ApnSetting} from this builder. This function doesn't check if
+ * {@link #setApnName(String)} or {@link #setEntryName(String)}, or
+ * {@link #setApnTypeBitmask(int)} is empty.
+ * @hide
+ */
+ public ApnSetting buildWithoutCheck() {
return new ApnSetting(this);
}
}
}
-
diff --git a/telephony/java/android/telephony/data/DataCallResponse.java b/telephony/java/android/telephony/data/DataCallResponse.java
index ef3a183..25f5133 100644
--- a/telephony/java/android/telephony/data/DataCallResponse.java
+++ b/telephony/java/android/telephony/data/DataCallResponse.java
@@ -27,6 +27,7 @@
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
/**
* Description of the response of a setup data call connection request.
@@ -220,17 +221,8 @@
@Override
public int hashCode() {
- return mStatus * 31
- + mSuggestedRetryTime * 37
- + mCid * 41
- + mActive * 43
- + mType.hashCode() * 47
- + mIfname.hashCode() * 53
- + mAddresses.hashCode() * 59
- + mDnses.hashCode() * 61
- + mGateways.hashCode() * 67
- + mPcscfs.hashCode() * 71
- + mMtu * 73;
+ return Objects.hash(mStatus, mSuggestedRetryTime, mCid, mActive, mType, mIfname, mAddresses,
+ mDnses, mGateways, mPcscfs, mMtu);
}
@Override
diff --git a/telephony/java/android/telephony/data/DataProfile.java b/telephony/java/android/telephony/data/DataProfile.java
index 41c1430..e8597b2 100644
--- a/telephony/java/android/telephony/data/DataProfile.java
+++ b/telephony/java/android/telephony/data/DataProfile.java
@@ -17,6 +17,7 @@
package android.telephony.data;
import android.annotation.SystemApi;
+import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -230,8 +231,10 @@
@Override
public String toString() {
- return "DataProfile=" + mProfileId + "/" + mApn + "/" + mProtocol + "/" + mAuthType
- + "/" + mUserName + "/" + mPassword + "/" + mType + "/" + mMaxConnsTime
+ return "DataProfile=" + mProfileId + "/" + mProtocol + "/" + mAuthType
+ + "/" + (Build.IS_USER ? "***/***/***" :
+ (mApn + "/" + mUserName + "/" + mPassword))
+ + "/" + mType + "/" + mMaxConnsTime
+ "/" + mMaxConns + "/" + mWaitTime + "/" + mEnabled + "/"
+ mSupportedApnTypesBitmap + "/" + mRoamingProtocol + "/" + mBearerBitmap + "/"
+ mMtu + "/" + mMvnoType + "/" + mMvnoMatchData + "/" + mModemCognitive;
diff --git a/telephony/java/android/telephony/data/DataService.java b/telephony/java/android/telephony/data/DataService.java
index fa19ea0..1db5850 100644
--- a/telephony/java/android/telephony/data/DataService.java
+++ b/telephony/java/android/telephony/data/DataService.java
@@ -18,6 +18,8 @@
import android.annotation.CallSuper;
import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
@@ -30,9 +32,10 @@
import android.os.RemoteException;
import android.telephony.AccessNetworkConstants;
import android.telephony.Rlog;
-import android.telephony.SubscriptionManager;
import android.util.SparseArray;
+import com.android.internal.annotations.VisibleForTesting;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
@@ -41,11 +44,11 @@
/**
* Base class of data service. Services that extend DataService must register the service in
* their AndroidManifest to be detected by the framework. They must be protected by the permission
- * "android.permission.BIND_DATA_SERVICE". The data service definition in the manifest must follow
- * the following format:
+ * "android.permission.BIND_TELEPHONY_DATA_SERVICE". The data service definition in the manifest
+ * must follow the following format:
* ...
* <service android:name=".xxxDataService"
- * android:permission="android.permission.BIND_DATA_SERVICE" >
+ * android:permission="android.permission.BIND_TELEPHONY_DATA_SERVICE" >
* <intent-filter>
* <action android:name="android.telephony.data.DataService" />
* </intent-filter>
@@ -86,15 +89,17 @@
/** The reason of the data request is IWLAN handover */
public static final int REQUEST_REASON_HANDOVER = 3;
- private static final int DATA_SERVICE_INTERNAL_REQUEST_INITIALIZE_SERVICE = 1;
- private static final int DATA_SERVICE_REQUEST_SETUP_DATA_CALL = 2;
- private static final int DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL = 3;
- private static final int DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN = 4;
- private static final int DATA_SERVICE_REQUEST_SET_DATA_PROFILE = 5;
- private static final int DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST = 6;
- private static final int DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED = 7;
- private static final int DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED = 8;
- private static final int DATA_SERVICE_INDICATION_DATA_CALL_LIST_CHANGED = 9;
+ private static final int DATA_SERVICE_CREATE_DATA_SERVICE_PROVIDER = 1;
+ private static final int DATA_SERVICE_REMOVE_DATA_SERVICE_PROVIDER = 2;
+ private static final int DATA_SERVICE_REMOVE_ALL_DATA_SERVICE_PROVIDERS = 3;
+ private static final int DATA_SERVICE_REQUEST_SETUP_DATA_CALL = 4;
+ 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_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;
private final HandlerThread mHandlerThread;
@@ -102,7 +107,9 @@
private final SparseArray<DataServiceProvider> mServiceMap = new SparseArray<>();
- private final SparseArray<IDataServiceWrapper> mBinderMap = new SparseArray<>();
+ /** @hide */
+ @VisibleForTesting
+ public final IDataServiceWrapper mBinder = new IDataServiceWrapper();
/**
* The abstract class of the actual data service implementation. The data service provider
@@ -136,19 +143,21 @@
* the provided callback to notify the platform.
*
* @param accessNetworkType Access network type that the data call will be established on.
- * Must be one of {@link AccessNetworkConstants.AccessNetworkType}.
+ * Must be one of {@link AccessNetworkConstants.AccessNetworkType}.
* @param dataProfile Data profile used for data call setup. See {@link DataProfile}
* @param isRoaming True if the device is data roaming.
* @param allowRoaming True if data roaming is allowed by the user.
* @param reason The reason for data setup. Must be {@link #REQUEST_REASON_NORMAL} or
- * {@link #REQUEST_REASON_HANDOVER}.
+ * {@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.
+ * 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.
*/
public void setupDataCall(int accessNetworkType, DataProfile dataProfile, boolean isRoaming,
boolean allowRoaming, @SetupDataReason int reason,
- LinkProperties linkProperties, DataServiceCallback callback) {
+ @Nullable LinkProperties linkProperties,
+ @Nullable DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onSetupDataCallComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED, null);
}
@@ -159,13 +168,15 @@
* provided callback to notify the platform.
*
* @param cid Call id returned in the callback of {@link DataServiceProvider#setupDataCall(
- * int, DataProfile, boolean, boolean, int, LinkProperties, DataServiceCallback)}.
+ * int, DataProfile, boolean, boolean, int, LinkProperties, DataServiceCallback)}.
* @param reason The reason for data deactivation. Must be {@link #REQUEST_REASON_NORMAL},
- * {@link #REQUEST_REASON_SHUTDOWN} or {@link #REQUEST_REASON_HANDOVER}.
- * @param callback The result callback for this request.
+ * {@link #REQUEST_REASON_SHUTDOWN} or {@link #REQUEST_REASON_HANDOVER}.
+ * @param callback The result callback for this request. Null if the client does not care
+ * about the result.
+ *
*/
public void deactivateDataCall(int cid, @DeactivateDataReason int reason,
- DataServiceCallback callback) {
+ @Nullable DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onDeactivateDataCallComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED);
}
@@ -175,10 +186,11 @@
*
* @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.
+ * @param callback The result callback for this request. Null if the client does not care
+ * about the result.
*/
public void setInitialAttachApn(DataProfile dataProfile, boolean isRoaming,
- DataServiceCallback callback) {
+ @Nullable DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onSetInitialAttachApnComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED);
}
@@ -190,10 +202,11 @@
*
* @param dps A list of data profiles.
* @param isRoaming True if the device is data roaming.
- * @param callback The result callback for this request.
+ * @param callback The result callback for this request. Null if the client does not care
+ * about the result.
*/
public void setDataProfile(List<DataProfile> dps, boolean isRoaming,
- DataServiceCallback callback) {
+ @Nullable DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onSetDataProfileComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED);
}
@@ -203,7 +216,7 @@
*
* @param callback The result callback for this request.
*/
- public void getDataCallList(DataServiceCallback callback) {
+ public void getDataCallList(@NonNull DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onGetDataCallListComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED, null);
}
@@ -321,70 +334,89 @@
public void handleMessage(Message message) {
IDataServiceCallback callback;
final int slotId = message.arg1;
- DataServiceProvider service;
-
- synchronized (mServiceMap) {
- service = mServiceMap.get(slotId);
- }
+ DataServiceProvider serviceProvider = mServiceMap.get(slotId);
switch (message.what) {
- case DATA_SERVICE_INTERNAL_REQUEST_INITIALIZE_SERVICE:
- service = createDataServiceProvider(message.arg1);
- if (service != null) {
- mServiceMap.put(slotId, service);
+ case DATA_SERVICE_CREATE_DATA_SERVICE_PROVIDER:
+ serviceProvider = createDataServiceProvider(message.arg1);
+ if (serviceProvider != null) {
+ mServiceMap.put(slotId, serviceProvider);
}
break;
+ case DATA_SERVICE_REMOVE_DATA_SERVICE_PROVIDER:
+ if (serviceProvider != null) {
+ serviceProvider.onDestroy();
+ mServiceMap.remove(slotId);
+ }
+ break;
+ case DATA_SERVICE_REMOVE_ALL_DATA_SERVICE_PROVIDERS:
+ for (int i = 0; i < mServiceMap.size(); i++) {
+ serviceProvider = mServiceMap.get(i);
+ if (serviceProvider != null) {
+ serviceProvider.onDestroy();
+ }
+ }
+ mServiceMap.clear();
+ break;
case DATA_SERVICE_REQUEST_SETUP_DATA_CALL:
- if (service == null) break;
+ if (serviceProvider == null) break;
SetupDataCallRequest setupDataCallRequest = (SetupDataCallRequest) message.obj;
- service.setupDataCall(setupDataCallRequest.accessNetworkType,
+ serviceProvider.setupDataCall(setupDataCallRequest.accessNetworkType,
setupDataCallRequest.dataProfile, setupDataCallRequest.isRoaming,
setupDataCallRequest.allowRoaming, setupDataCallRequest.reason,
setupDataCallRequest.linkProperties,
- new DataServiceCallback(setupDataCallRequest.callback));
+ (setupDataCallRequest.callback != null)
+ ? new DataServiceCallback(setupDataCallRequest.callback)
+ : null);
break;
case DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL:
- if (service == null) break;
+ if (serviceProvider == null) break;
DeactivateDataCallRequest deactivateDataCallRequest =
(DeactivateDataCallRequest) message.obj;
- service.deactivateDataCall(deactivateDataCallRequest.cid,
+ serviceProvider.deactivateDataCall(deactivateDataCallRequest.cid,
deactivateDataCallRequest.reason,
- new DataServiceCallback(deactivateDataCallRequest.callback));
+ (deactivateDataCallRequest.callback != null)
+ ? new DataServiceCallback(deactivateDataCallRequest.callback)
+ : null);
break;
case DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN:
- if (service == null) break;
+ if (serviceProvider == null) break;
SetInitialAttachApnRequest setInitialAttachApnRequest =
(SetInitialAttachApnRequest) message.obj;
- service.setInitialAttachApn(setInitialAttachApnRequest.dataProfile,
+ serviceProvider.setInitialAttachApn(setInitialAttachApnRequest.dataProfile,
setInitialAttachApnRequest.isRoaming,
- new DataServiceCallback(setInitialAttachApnRequest.callback));
+ (setInitialAttachApnRequest.callback != null)
+ ? new DataServiceCallback(setInitialAttachApnRequest.callback)
+ : null);
break;
case DATA_SERVICE_REQUEST_SET_DATA_PROFILE:
- if (service == null) break;
+ if (serviceProvider == null) break;
SetDataProfileRequest setDataProfileRequest =
(SetDataProfileRequest) message.obj;
- service.setDataProfile(setDataProfileRequest.dps,
+ serviceProvider.setDataProfile(setDataProfileRequest.dps,
setDataProfileRequest.isRoaming,
- new DataServiceCallback(setDataProfileRequest.callback));
+ (setDataProfileRequest.callback != null)
+ ? new DataServiceCallback(setDataProfileRequest.callback)
+ : null);
break;
case DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST:
- if (service == null) break;
+ if (serviceProvider == null) break;
- service.getDataCallList(new DataServiceCallback(
+ serviceProvider.getDataCallList(new DataServiceCallback(
(IDataServiceCallback) message.obj));
break;
case DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED:
- if (service == null) break;
- service.registerForDataCallListChanged((IDataServiceCallback) message.obj);
+ if (serviceProvider == null) break;
+ serviceProvider.registerForDataCallListChanged((IDataServiceCallback) message.obj);
break;
case DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED:
- if (service == null) break;
+ if (serviceProvider == null) break;
callback = (IDataServiceCallback) message.obj;
- service.unregisterForDataCallListChanged(callback);
+ serviceProvider.unregisterForDataCallListChanged(callback);
break;
case DATA_SERVICE_INDICATION_DATA_CALL_LIST_CHANGED:
- if (service == null) break;
+ if (serviceProvider == null) break;
DataCallListChangedIndication indication =
(DataCallListChangedIndication) message.obj;
try {
@@ -397,8 +429,10 @@
}
}
- /** @hide */
- protected DataService() {
+ /**
+ * Default constructor.
+ */
+ public DataService() {
mHandlerThread = new HandlerThread(TAG);
mHandlerThread.start();
@@ -423,67 +457,19 @@
loge("Unexpected intent " + intent);
return null;
}
-
- int slotId = intent.getIntExtra(
- DATA_SERVICE_EXTRA_SLOT_ID, SubscriptionManager.INVALID_SIM_SLOT_INDEX);
-
- if (!SubscriptionManager.isValidSlotIndex(slotId)) {
- loge("Invalid slot id " + slotId);
- return null;
- }
-
- log("onBind: slot id=" + slotId);
-
- IDataServiceWrapper binder = mBinderMap.get(slotId);
- if (binder == null) {
- Message msg = mHandler.obtainMessage(DATA_SERVICE_INTERNAL_REQUEST_INITIALIZE_SERVICE);
- msg.arg1 = slotId;
- msg.sendToTarget();
-
- binder = new IDataServiceWrapper(slotId);
- mBinderMap.put(slotId, binder);
- }
-
- return binder;
+ return mBinder;
}
/** @hide */
@Override
public boolean onUnbind(Intent intent) {
- int slotId = intent.getIntExtra(DATA_SERVICE_EXTRA_SLOT_ID,
- SubscriptionManager.INVALID_SIM_SLOT_INDEX);
- if (mBinderMap.get(slotId) != null) {
- DataServiceProvider serviceImpl;
- synchronized (mServiceMap) {
- serviceImpl = mServiceMap.get(slotId);
- }
- if (serviceImpl != null) {
- serviceImpl.onDestroy();
- }
- mBinderMap.remove(slotId);
- }
-
- // If all clients unbinds, quit the handler thread
- if (mBinderMap.size() == 0) {
- mHandlerThread.quit();
- }
-
+ mHandler.obtainMessage(DATA_SERVICE_REMOVE_ALL_DATA_SERVICE_PROVIDERS).sendToTarget();
return false;
}
/** @hide */
@Override
public void onDestroy() {
- synchronized (mServiceMap) {
- for (int i = 0; i < mServiceMap.size(); i++) {
- DataServiceProvider serviceImpl = mServiceMap.get(i);
- if (serviceImpl != null) {
- serviceImpl.onDestroy();
- }
- }
- mServiceMap.clear();
- }
-
mHandlerThread.quit();
}
@@ -491,68 +477,78 @@
* A wrapper around IDataService that forwards calls to implementations of {@link DataService}.
*/
private class IDataServiceWrapper extends IDataService.Stub {
-
- private final int mSlotId;
-
- IDataServiceWrapper(int slotId) {
- mSlotId = slotId;
+ @Override
+ public void createDataServiceProvider(int slotId) {
+ mHandler.obtainMessage(DATA_SERVICE_CREATE_DATA_SERVICE_PROVIDER, slotId, 0)
+ .sendToTarget();
}
@Override
- public void setupDataCall(int accessNetworkType, DataProfile dataProfile,
+ public void removeDataServiceProvider(int slotId) {
+ mHandler.obtainMessage(DATA_SERVICE_REMOVE_DATA_SERVICE_PROVIDER, slotId, 0)
+ .sendToTarget();
+ }
+
+ @Override
+ public void setupDataCall(int slotId, int accessNetworkType, DataProfile dataProfile,
boolean isRoaming, boolean allowRoaming, int reason,
LinkProperties linkProperties, IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_SETUP_DATA_CALL, mSlotId, 0,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_SETUP_DATA_CALL, slotId, 0,
new SetupDataCallRequest(accessNetworkType, dataProfile, isRoaming,
allowRoaming, reason, linkProperties, callback))
.sendToTarget();
}
@Override
- public void deactivateDataCall(int cid, int reason, IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL, mSlotId, 0,
+ public void deactivateDataCall(int slotId, int cid, int reason,
+ IDataServiceCallback callback) {
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL, slotId, 0,
new DeactivateDataCallRequest(cid, reason, callback))
.sendToTarget();
}
@Override
- public void setInitialAttachApn(DataProfile dataProfile, boolean isRoaming,
+ public void setInitialAttachApn(int slotId, DataProfile dataProfile, boolean isRoaming,
IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN, mSlotId, 0,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN, slotId, 0,
new SetInitialAttachApnRequest(dataProfile, isRoaming, callback))
.sendToTarget();
}
@Override
- public void setDataProfile(List<DataProfile> dps, boolean isRoaming,
+ public void setDataProfile(int slotId, List<DataProfile> dps, boolean isRoaming,
IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_SET_DATA_PROFILE, mSlotId, 0,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_SET_DATA_PROFILE, slotId, 0,
new SetDataProfileRequest(dps, isRoaming, callback)).sendToTarget();
}
@Override
- public void getDataCallList(IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST, mSlotId, 0,
+ public void getDataCallList(int slotId, IDataServiceCallback callback) {
+ if (callback == null) {
+ loge("getDataCallList: callback is null");
+ return;
+ }
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST, slotId, 0,
callback).sendToTarget();
}
@Override
- public void registerForDataCallListChanged(IDataServiceCallback callback) {
+ public void registerForDataCallListChanged(int slotId, IDataServiceCallback callback) {
if (callback == null) {
- loge("Callback is null");
+ loge("registerForDataCallListChanged: callback is null");
return;
}
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED, mSlotId,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED, slotId,
0, callback).sendToTarget();
}
@Override
- public void unregisterForDataCallListChanged(IDataServiceCallback callback) {
+ public void unregisterForDataCallListChanged(int slotId, IDataServiceCallback callback) {
if (callback == null) {
- loge("Callback is null");
+ loge("unregisterForDataCallListChanged: callback is null");
return;
}
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED, mSlotId,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED, slotId,
0, callback).sendToTarget();
}
}
diff --git a/telephony/java/android/telephony/data/DataServiceCallback.java b/telephony/java/android/telephony/data/DataServiceCallback.java
index b6a81f9..4af31b5 100644
--- a/telephony/java/android/telephony/data/DataServiceCallback.java
+++ b/telephony/java/android/telephony/data/DataServiceCallback.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.SystemApi;
+import android.net.LinkProperties;
import android.os.RemoteException;
import android.telephony.Rlog;
import android.telephony.data.DataService.DataServiceProvider;
@@ -37,7 +38,7 @@
@SystemApi
public class DataServiceCallback {
- private static final String mTag = DataServiceCallback.class.getSimpleName();
+ private static final String TAG = DataServiceCallback.class.getSimpleName();
/**
* Result of data requests
@@ -46,7 +47,7 @@
@Retention(RetentionPolicy.SOURCE)
@IntDef({RESULT_SUCCESS, RESULT_ERROR_UNSUPPORTED, RESULT_ERROR_INVALID_ARG, RESULT_ERROR_BUSY,
RESULT_ERROR_ILLEGAL_STATE})
- public @interface Result {}
+ public @interface ResultCode {}
/** Request is completed successfully */
public static final int RESULT_SUCCESS = 0;
@@ -68,35 +69,35 @@
/**
* Called to indicate result for the request {@link DataServiceProvider#setupDataCall(int,
- * DataProfile, boolean, boolean, boolean, DataServiceCallback)}.
+ * DataProfile, boolean, boolean, int, LinkProperties, DataServiceCallback)} .
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
* @param response Setup data call response.
*/
- public void onSetupDataCallComplete(@Result int result, DataCallResponse response) {
+ public void onSetupDataCallComplete(@ResultCode int result, DataCallResponse response) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onSetupDataCallComplete(result, response);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onSetupDataCallComplete on the remote");
+ Rlog.e(TAG, "Failed to onSetupDataCallComplete on the remote");
}
}
}
/**
* Called to indicate result for the request {@link DataServiceProvider#deactivateDataCall(int,
- * boolean, boolean, DataServiceCallback)}.
+ * int, DataServiceCallback)}
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
*/
- public void onDeactivateDataCallComplete(@Result int result) {
+ public void onDeactivateDataCallComplete(@ResultCode int result) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onDeactivateDataCallComplete(result);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onDeactivateDataCallComplete on the remote");
+ Rlog.e(TAG, "Failed to onDeactivateDataCallComplete on the remote");
}
}
}
@@ -105,15 +106,15 @@
* Called to indicate result for the request {@link DataServiceProvider#setInitialAttachApn(
* DataProfile, boolean, DataServiceCallback)}.
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
*/
- public void onSetInitialAttachApnComplete(@Result int result) {
+ public void onSetInitialAttachApnComplete(@ResultCode int result) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onSetInitialAttachApnComplete(result);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onSetInitialAttachApnComplete on the remote");
+ Rlog.e(TAG, "Failed to onSetInitialAttachApnComplete on the remote");
}
}
}
@@ -122,16 +123,16 @@
* Called to indicate result for the request {@link DataServiceProvider#setDataProfile(List,
* boolean, DataServiceCallback)}.
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
*/
@SystemApi
- public void onSetDataProfileComplete(@Result int result) {
+ public void onSetDataProfileComplete(@ResultCode int result) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onSetDataProfileComplete(result);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onSetDataProfileComplete on the remote");
+ Rlog.e(TAG, "Failed to onSetDataProfileComplete on the remote");
}
}
}
@@ -140,16 +141,17 @@
* Called to indicate result for the request {@link DataServiceProvider#getDataCallList(
* DataServiceCallback)}.
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
* @param dataCallList List of the current active data connection.
*/
- public void onGetDataCallListComplete(@Result int result, List<DataCallResponse> dataCallList) {
+ public void onGetDataCallListComplete(@ResultCode int result,
+ List<DataCallResponse> dataCallList) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onGetDataCallListComplete(result, dataCallList);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onGetDataCallListComplete on the remote");
+ Rlog.e(TAG, "Failed to onGetDataCallListComplete on the remote");
}
}
}
@@ -165,7 +167,7 @@
try {
callback.onDataCallListChanged(dataCallList);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onDataCallListChanged on the remote");
+ Rlog.e(TAG, "Failed to onDataCallListChanged on the remote");
}
}
}
diff --git a/telephony/java/android/telephony/data/IDataService.aidl b/telephony/java/android/telephony/data/IDataService.aidl
index 07720b6..d4d9be8 100644
--- a/telephony/java/android/telephony/data/IDataService.aidl
+++ b/telephony/java/android/telephony/data/IDataService.aidl
@@ -25,14 +25,17 @@
*/
oneway interface IDataService
{
- void setupDataCall(int accessNetwork, in DataProfile dataProfile, boolean isRoaming,
+ void createDataServiceProvider(int slotId);
+ void removeDataServiceProvider(int slotId);
+ void setupDataCall(int slotId, int accessNetwork, in DataProfile dataProfile, boolean isRoaming,
boolean allowRoaming, int reason, in LinkProperties linkProperties,
IDataServiceCallback callback);
- void deactivateDataCall(int cid, int reason, IDataServiceCallback callback);
- void setInitialAttachApn(in DataProfile dataProfile, boolean isRoaming,
+ void deactivateDataCall(int slotId, int cid, int reason, IDataServiceCallback callback);
+ void setInitialAttachApn(int slotId, in DataProfile dataProfile, boolean isRoaming,
IDataServiceCallback callback);
- void setDataProfile(in List<DataProfile> dps, boolean isRoaming, IDataServiceCallback callback);
- void getDataCallList(IDataServiceCallback callback);
- void registerForDataCallListChanged(IDataServiceCallback callback);
- void unregisterForDataCallListChanged(IDataServiceCallback callback);
+ void setDataProfile(int slotId, in List<DataProfile> dps, boolean isRoaming,
+ IDataServiceCallback callback);
+ void getDataCallList(int slotId, IDataServiceCallback callback);
+ void registerForDataCallListChanged(int slotId, IDataServiceCallback callback);
+ void unregisterForDataCallListChanged(int slotId, IDataServiceCallback callback);
}
diff --git a/telephony/java/android/telephony/euicc/DownloadableSubscription.java b/telephony/java/android/telephony/euicc/DownloadableSubscription.java
index 01041c8..edf3b08 100644
--- a/telephony/java/android/telephony/euicc/DownloadableSubscription.java
+++ b/telephony/java/android/telephony/euicc/DownloadableSubscription.java
@@ -16,17 +16,24 @@
package android.telephony.euicc;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.app.PendingIntent;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.UiccAccessRule;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import com.android.internal.util.Preconditions;
/**
- * Information about a subscription which is available for download.
+ * Information about a subscription which is downloadable to an eUICC using
+ * {@link EuiccManager#downloadSubscription(DownloadableSubscription, boolean, PendingIntent).
*
- * TODO(b/35851809): Make this public.
- * @hide
+ * <p>For example, a DownloadableSubscription can be created through an activation code parsed from
+ * a QR code. A server address can be parsed from the activation code to download more information
+ * about the profile, such as carrier name, access rules, etc.
*/
public final class DownloadableSubscription implements Parcelable {
@@ -46,11 +53,12 @@
/**
* Activation code. May be null for subscriptions which are not based on activation codes, e.g.
* to download a default subscription assigned to this device.
+ * Should use getEncodedActivationCode() instead.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
+ * @deprecated - Do not use. This will be private. Use getEncodedActivationCode() instead.
*/
@Nullable
+ @Deprecated
public final String encodedActivationCode;
@Nullable private String confirmationCode;
@@ -58,8 +66,16 @@
// see getCarrierName and setCarrierName
@Nullable
private String carrierName;
+
// see getAccessRules and setAccessRules
- private UiccAccessRule[] accessRules;
+ @Nullable
+ private List<UiccAccessRule> accessRules;
+
+ /** Gets the activation code. */
+ @Nullable
+ public String getEncodedActivationCode() {
+ return encodedActivationCode;
+ }
/** @hide */
private DownloadableSubscription(String encodedActivationCode) {
@@ -70,13 +86,73 @@
encodedActivationCode = in.readString();
confirmationCode = in.readString();
carrierName = in.readString();
- accessRules = in.createTypedArray(UiccAccessRule.CREATOR);
+ accessRules = new ArrayList<UiccAccessRule>();
+ in.readTypedList(accessRules, UiccAccessRule.CREATOR);
+ }
+
+ private DownloadableSubscription(String encodedActivationCode, String confirmationCode,
+ String carrierName, List<UiccAccessRule> accessRules) {
+ this.encodedActivationCode = encodedActivationCode;
+ this.confirmationCode = confirmationCode;
+ this.carrierName = carrierName;
+ this.accessRules = accessRules;
+ }
+
+ /** @hide */
+ @SystemApi
+ public static final class Builder {
+ @Nullable private String encodedActivationCode;
+ @Nullable private String confirmationCode;
+ @Nullable private String carrierName;
+ List<UiccAccessRule> accessRules;
+
+ public Builder() {}
+
+ public Builder(DownloadableSubscription baseSubscription) {
+ encodedActivationCode = baseSubscription.getEncodedActivationCode();
+ confirmationCode = baseSubscription.getConfirmationCode();
+ carrierName = baseSubscription.getCarrierName();
+ accessRules = baseSubscription.getAccessRules();
+ }
+
+ public DownloadableSubscription build() {
+ return new DownloadableSubscription(encodedActivationCode, confirmationCode,
+ carrierName, accessRules);
+ }
+
+ public Builder setEncodedActivationCode(String value) {
+ encodedActivationCode = value;
+ return this;
+ }
+
+ public Builder setConfirmationCode(String value) {
+ confirmationCode = value;
+ return this;
+ }
+
+ public Builder setCarrierName(String value) {
+ carrierName = value;
+ return this;
+ }
+
+ public Builder setAccessRules(List<UiccAccessRule> value) {
+ accessRules = value;
+ return this;
+ }
}
/**
* Create a DownloadableSubscription for the given activation code.
*
- * @param encodedActivationCode the activation code to use. Must not be null.
+ * <p>This fills the encodedActivationCode field. Other fields like confirmationCode,
+ * carrierName and accessRules may be filled in the implementation of
+ * {@code android.service.euicc.EuiccService} if exists.
+ *
+ * @param encodedActivationCode the activation code to use. An activation code can be parsed
+ * from a user scanned QR code. The format of activation code is defined in SGP.22. For
+ * example, "1$SMDP.GSMA.COM$04386-AGYFT-A74Y8-3F815$1.3.6.1.4.1.31746". For detail, see
+ * {@code com.android.euicc.data.ActivationCode}. Must not be null.
+ *
* @return the {@link DownloadableSubscription} which may be passed to
* {@link EuiccManager#downloadSubscription}.
*/
@@ -87,13 +163,19 @@
/**
* Sets the confirmation code.
+ * @hide
+ * @deprecated - Do not use.
*/
+ @Deprecated
public void setConfirmationCode(String confirmationCode) {
this.confirmationCode = confirmationCode;
}
/**
* Returns the confirmation code.
+ *
+ * <p>As an example, the confirmation code can be input by the user through a carrier app or the
+ * UI component of the eUICC local profile assistant (LPA) application.
*/
@Nullable
public String getConfirmationCode() {
@@ -103,9 +185,9 @@
/**
* Set the user-visible carrier name.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
+ * @deprecated - Do not use.
*/
+ @Deprecated
public void setCarrierName(String carrierName) {
this.carrierName = carrierName;
}
@@ -117,44 +199,51 @@
* those created with {@link #forActivationCode}). May be populated with
* {@link EuiccManager#getDownloadableSubscriptionMetadata}.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+ @SystemApi
@Nullable
public String getCarrierName() {
return carrierName;
}
/**
- * Returns the {@link UiccAccessRule}s dictating access to this subscription.
+ * Returns the {@link UiccAccessRule}s in list dictating access to this subscription.
*
* <p>Only present for downloadable subscriptions that were queried from a server (as opposed to
* those created with {@link #forActivationCode}). May be populated with
* {@link EuiccManager#getDownloadableSubscriptionMetadata}.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
- public UiccAccessRule[] getAccessRules() {
+ @SystemApi
+ public List<UiccAccessRule> getAccessRules() {
return accessRules;
}
/**
* Set the {@link UiccAccessRule}s dictating access to this subscription.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
+ * @deprecated - Do not use.
*/
- public void setAccessRules(UiccAccessRule[] accessRules) {
+ @Deprecated
+ public void setAccessRules(List<UiccAccessRule> accessRules) {
this.accessRules = accessRules;
}
+ /**
+ * @hide
+ * @deprecated - Do not use.
+ */
+ @Deprecated
+ public void setAccessRules(UiccAccessRule[] accessRules) {
+ this.accessRules = Arrays.asList(accessRules);
+ }
+
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(encodedActivationCode);
dest.writeString(confirmationCode);
dest.writeString(carrierName);
- dest.writeTypedArray(accessRules, flags);
+ dest.writeTypedList(accessRules);
}
@Override
diff --git a/telephony/java/android/telephony/euicc/EuiccCardManager.java b/telephony/java/android/telephony/euicc/EuiccCardManager.java
index b9ed005..cc0d1c6 100644
--- a/telephony/java/android/telephony/euicc/EuiccCardManager.java
+++ b/telephony/java/android/telephony/euicc/EuiccCardManager.java
@@ -17,6 +17,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.content.Context;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -49,14 +50,13 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.concurrent.Executor;
/**
* EuiccCardManager is the application interface to an eSIM card.
- *
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+@SystemApi
public class EuiccCardManager {
private static final String TAG = "EuiccCardManager";
@@ -68,6 +68,7 @@
CANCEL_REASON_TIMEOUT,
CANCEL_REASON_PPR_NOT_ALLOWED
})
+ /** @hide */
public @interface CancelReason {}
/**
@@ -96,6 +97,7 @@
RESET_OPTION_DELETE_FIELD_LOADED_TEST_PROFILES,
RESET_OPTION_RESET_DEFAULT_SMDP_ADDRESS
})
+ /** @hide */
public @interface ResetOption {}
/** Deletes all operational profiles. */
@@ -110,6 +112,12 @@
/** Result code of execution with no error. */
public static final int RESULT_OK = 0;
+ /** Result code of an unknown error. */
+ public static final int RESULT_UNKNOWN_ERROR = -1;
+
+ /** Result code when the eUICC card with the given card Id is not found. */
+ public static final int RESULT_EUICC_NOT_FOUND = -2;
+
/**
* Callback to receive the result of an eUICC card API.
*
@@ -140,17 +148,20 @@
}
/**
- * Gets all the profiles on eUicc.
+ * Requests all the profiles on eUicc.
*
+ * @param cardId The Id of the eUICC.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code and all the profiles.
*/
- public void getAllProfiles(ResultCallback<EuiccProfileInfo[]> callback) {
+ public void requestAllProfiles(String cardId, Executor executor,
+ ResultCallback<EuiccProfileInfo[]> callback) {
try {
- getIEuiccCardController().getAllProfiles(mContext.getOpPackageName(),
+ getIEuiccCardController().getAllProfiles(mContext.getOpPackageName(), cardId,
new IGetAllProfilesCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccProfileInfo[] profiles) {
- callback.onComplete(resultCode, profiles);
+ executor.execute(() -> callback.onComplete(resultCode, profiles));
}
});
} catch (RemoteException e) {
@@ -160,18 +171,21 @@
}
/**
- * Gets the profile of the given iccid.
+ * Requests the profile of the given iccid.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code and profile.
*/
- public void getProfile(String iccid, ResultCallback<EuiccProfileInfo> callback) {
+ public void requestProfile(String cardId, String iccid, Executor executor,
+ ResultCallback<EuiccProfileInfo> callback) {
try {
- getIEuiccCardController().getProfile(mContext.getOpPackageName(), iccid,
+ getIEuiccCardController().getProfile(mContext.getOpPackageName(), cardId, iccid,
new IGetProfileCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccProfileInfo profile) {
- callback.onComplete(resultCode, profile);
+ executor.execute(() -> callback.onComplete(resultCode, profile));
}
});
} catch (RemoteException e) {
@@ -183,17 +197,20 @@
/**
* Disables the profile of the given iccid.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile.
* @param refresh Whether sending the REFRESH command to modem.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code.
*/
- public void disableProfile(String iccid, boolean refresh, ResultCallback<Void> callback) {
+ public void disableProfile(String cardId, String iccid, boolean refresh, Executor executor,
+ ResultCallback<Void> callback) {
try {
- getIEuiccCardController().disableProfile(mContext.getOpPackageName(), iccid, refresh,
- new IDisableProfileCallback.Stub() {
+ getIEuiccCardController().disableProfile(mContext.getOpPackageName(), cardId, iccid,
+ refresh, new IDisableProfileCallback.Stub() {
@Override
public void onComplete(int resultCode) {
- callback.onComplete(resultCode, null);
+ executor.execute(() -> callback.onComplete(resultCode, null));
}
});
} catch (RemoteException e) {
@@ -206,18 +223,20 @@
* Switches from the current profile to another profile. The current profile will be disabled
* and the specified profile will be enabled.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile to switch to.
* @param refresh Whether sending the REFRESH command to modem.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code and the EuiccProfileInfo enabled.
*/
- public void switchToProfile(String iccid, boolean refresh,
+ public void switchToProfile(String cardId, String iccid, boolean refresh, Executor executor,
ResultCallback<EuiccProfileInfo> callback) {
try {
- getIEuiccCardController().switchToProfile(mContext.getOpPackageName(), iccid, refresh,
- new ISwitchToProfileCallback.Stub() {
+ getIEuiccCardController().switchToProfile(mContext.getOpPackageName(), cardId, iccid,
+ refresh, new ISwitchToProfileCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccProfileInfo profile) {
- callback.onComplete(resultCode, profile);
+ executor.execute(() -> callback.onComplete(resultCode, profile));
}
});
} catch (RemoteException e) {
@@ -227,33 +246,22 @@
}
/**
- * Gets the EID of the eUICC.
- *
- * @return The EID.
- */
- public String getEid() {
- try {
- return getIEuiccCardController().getEid();
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling getEid", e);
- throw e.rethrowFromSystemServer();
- }
- }
-
- /**
* Sets the nickname of the profile of the given iccid.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile.
* @param nickname The nickname of the profile.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code.
*/
- public void setNickname(String iccid, String nickname, ResultCallback<Void> callback) {
+ public void setNickname(String cardId, String iccid, String nickname, Executor executor,
+ ResultCallback<Void> callback) {
try {
- getIEuiccCardController().setNickname(mContext.getOpPackageName(), iccid, nickname,
- new ISetNicknameCallback.Stub() {
+ getIEuiccCardController().setNickname(mContext.getOpPackageName(), cardId, iccid,
+ nickname, new ISetNicknameCallback.Stub() {
@Override
public void onComplete(int resultCode) {
- callback.onComplete(resultCode, null);
+ executor.execute(() -> callback.onComplete(resultCode, null));
}
});
} catch (RemoteException e) {
@@ -265,16 +273,19 @@
/**
* Deletes the profile of the given iccid from eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code.
*/
- public void deleteProfile(String iccid, ResultCallback<Void> callback) {
+ public void deleteProfile(String cardId, String iccid, Executor executor,
+ ResultCallback<Void> callback) {
try {
- getIEuiccCardController().deleteProfile(mContext.getOpPackageName(), iccid,
+ getIEuiccCardController().deleteProfile(mContext.getOpPackageName(), cardId, iccid,
new IDeleteProfileCallback.Stub() {
@Override
public void onComplete(int resultCode) {
- callback.onComplete(resultCode, null);
+ executor.execute(() -> callback.onComplete(resultCode, null));
}
});
} catch (RemoteException e) {
@@ -286,17 +297,20 @@
/**
* Resets the eUICC memory.
*
+ * @param cardId The Id of the eUICC.
* @param options Bits of the options of resetting which parts of the eUICC memory. See
* EuiccCard for details.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code.
*/
- public void resetMemory(@ResetOption int options, ResultCallback<Void> callback) {
+ public void resetMemory(String cardId, @ResetOption int options, Executor executor,
+ ResultCallback<Void> callback) {
try {
- getIEuiccCardController().resetMemory(mContext.getOpPackageName(), options,
+ getIEuiccCardController().resetMemory(mContext.getOpPackageName(), cardId, options,
new IResetMemoryCallback.Stub() {
@Override
public void onComplete(int resultCode) {
- callback.onComplete(resultCode, null);
+ executor.execute(() -> callback.onComplete(resultCode, null));
}
});
} catch (RemoteException e) {
@@ -306,17 +320,20 @@
}
/**
- * Gets the default SM-DP+ address from eUICC.
+ * Requests the default SM-DP+ address from eUICC.
*
+ * @param cardId The Id of the eUICC.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code and the default SM-DP+ address.
*/
- public void getDefaultSmdpAddress(ResultCallback<String> callback) {
+ public void requestDefaultSmdpAddress(String cardId, Executor executor,
+ ResultCallback<String> callback) {
try {
- getIEuiccCardController().getDefaultSmdpAddress(mContext.getOpPackageName(),
+ getIEuiccCardController().getDefaultSmdpAddress(mContext.getOpPackageName(), cardId,
new IGetDefaultSmdpAddressCallback.Stub() {
@Override
public void onComplete(int resultCode, String address) {
- callback.onComplete(resultCode, address);
+ executor.execute(() -> callback.onComplete(resultCode, address));
}
});
} catch (RemoteException e) {
@@ -326,17 +343,20 @@
}
/**
- * Gets the SM-DS address from eUICC.
+ * Requests the SM-DS address from eUICC.
*
+ * @param cardId The Id of the eUICC.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code and the SM-DS address.
*/
- public void getSmdsAddress(ResultCallback<String> callback) {
+ public void requestSmdsAddress(String cardId, Executor executor,
+ ResultCallback<String> callback) {
try {
- getIEuiccCardController().getSmdsAddress(mContext.getOpPackageName(),
+ getIEuiccCardController().getSmdsAddress(mContext.getOpPackageName(), cardId,
new IGetSmdsAddressCallback.Stub() {
@Override
public void onComplete(int resultCode, String address) {
- callback.onComplete(resultCode, address);
+ executor.execute(() -> callback.onComplete(resultCode, address));
}
});
} catch (RemoteException e) {
@@ -348,17 +368,20 @@
/**
* Sets the default SM-DP+ address of eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param defaultSmdpAddress The default SM-DP+ address to set.
+ * @param executor The executor through which the callback should be invode.
* @param callback The callback to get the result code.
*/
- public void setDefaultSmdpAddress(String defaultSmdpAddress, ResultCallback<Void> callback) {
+ public void setDefaultSmdpAddress(String cardId, String defaultSmdpAddress, Executor executor,
+ ResultCallback<Void> callback) {
try {
- getIEuiccCardController().setDefaultSmdpAddress(mContext.getOpPackageName(),
+ getIEuiccCardController().setDefaultSmdpAddress(mContext.getOpPackageName(), cardId,
defaultSmdpAddress,
new ISetDefaultSmdpAddressCallback.Stub() {
@Override
public void onComplete(int resultCode) {
- callback.onComplete(resultCode, null);
+ executor.execute(() -> callback.onComplete(resultCode, null));
}
});
} catch (RemoteException e) {
@@ -368,17 +391,20 @@
}
/**
- * Gets Rules Authorisation Table.
+ * Requests Rules Authorisation Table.
*
+ * @param cardId The Id of the eUICC.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and the rule authorisation table.
*/
- public void getRulesAuthTable(ResultCallback<EuiccRulesAuthTable> callback) {
+ public void requestRulesAuthTable(String cardId, Executor executor,
+ ResultCallback<EuiccRulesAuthTable> callback) {
try {
- getIEuiccCardController().getRulesAuthTable(mContext.getOpPackageName(),
+ getIEuiccCardController().getRulesAuthTable(mContext.getOpPackageName(), cardId,
new IGetRulesAuthTableCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccRulesAuthTable rat) {
- callback.onComplete(resultCode, rat);
+ executor.execute(() -> callback.onComplete(resultCode, rat));
}
});
} catch (RemoteException e) {
@@ -388,17 +414,20 @@
}
/**
- * Gets the eUICC challenge for new profile downloading.
+ * Requests the eUICC challenge for new profile downloading.
*
+ * @param cardId The Id of the eUICC.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and the challenge.
*/
- public void getEuiccChallenge(ResultCallback<byte[]> callback) {
+ public void requestEuiccChallenge(String cardId, Executor executor,
+ ResultCallback<byte[]> callback) {
try {
- getIEuiccCardController().getEuiccChallenge(mContext.getOpPackageName(),
+ getIEuiccCardController().getEuiccChallenge(mContext.getOpPackageName(), cardId,
new IGetEuiccChallengeCallback.Stub() {
@Override
public void onComplete(int resultCode, byte[] challenge) {
- callback.onComplete(resultCode, challenge);
+ executor.execute(() -> callback.onComplete(resultCode, challenge));
}
});
} catch (RemoteException e) {
@@ -408,17 +437,20 @@
}
/**
- * Gets the eUICC info1 defined in GSMA RSP v2.0+ for new profile downloading.
+ * Requests the eUICC info1 defined in GSMA RSP v2.0+ for new profile downloading.
*
+ * @param cardId The Id of the eUICC.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and the info1.
*/
- public void getEuiccInfo1(ResultCallback<byte[]> callback) {
+ public void requestEuiccInfo1(String cardId, Executor executor,
+ ResultCallback<byte[]> callback) {
try {
- getIEuiccCardController().getEuiccInfo1(mContext.getOpPackageName(),
+ getIEuiccCardController().getEuiccInfo1(mContext.getOpPackageName(), cardId,
new IGetEuiccInfo1Callback.Stub() {
@Override
public void onComplete(int resultCode, byte[] info) {
- callback.onComplete(resultCode, info);
+ executor.execute(() -> callback.onComplete(resultCode, info));
}
});
} catch (RemoteException e) {
@@ -430,15 +462,18 @@
/**
* Gets the eUICC info2 defined in GSMA RSP v2.0+ for new profile downloading.
*
+ * @param cardId The Id of the eUICC.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and the info2.
*/
- public void getEuiccInfo2(ResultCallback<byte[]> callback) {
+ public void requestEuiccInfo2(String cardId, Executor executor,
+ ResultCallback<byte[]> callback) {
try {
- getIEuiccCardController().getEuiccInfo2(mContext.getOpPackageName(),
+ getIEuiccCardController().getEuiccInfo2(mContext.getOpPackageName(), cardId,
new IGetEuiccInfo2Callback.Stub() {
@Override
public void onComplete(int resultCode, byte[] info) {
- callback.onComplete(resultCode, info);
+ executor.execute(() -> callback.onComplete(resultCode, info));
}
});
} catch (RemoteException e) {
@@ -450,6 +485,7 @@
/**
* Authenticates the SM-DP+ server by the eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param matchingId the activation code token defined in GSMA RSP v2.0+ or empty when it is not
* required.
* @param serverSigned1 ASN.1 data in byte array signed and returned by the SM-DP+ server.
@@ -460,15 +496,17 @@
* GSMA RSP v2.0+.
* @param serverCertificate ASN.1 data in byte array indicating SM-DP+ Certificate returned by
* SM-DP+ server.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and a byte array which represents a
* {@code AuthenticateServerResponse} defined in GSMA RSP v2.0+.
*/
- public void authenticateServer(String matchingId, byte[] serverSigned1,
+ public void authenticateServer(String cardId, String matchingId, byte[] serverSigned1,
byte[] serverSignature1, byte[] euiccCiPkIdToBeUsed, byte[] serverCertificate,
- ResultCallback<byte[]> callback) {
+ Executor executor, ResultCallback<byte[]> callback) {
try {
getIEuiccCardController().authenticateServer(
mContext.getOpPackageName(),
+ cardId,
matchingId,
serverSigned1,
serverSignature1,
@@ -477,7 +515,7 @@
new IAuthenticateServerCallback.Stub() {
@Override
public void onComplete(int resultCode, byte[] response) {
- callback.onComplete(resultCode, response);
+ executor.execute(() -> callback.onComplete(resultCode, response));
}
});
} catch (RemoteException e) {
@@ -489,6 +527,7 @@
/**
* Prepares the profile download request sent to SM-DP+.
*
+ * @param cardId The Id of the eUICC.
* @param hashCc the hash of confirmation code. It can be null if there is no confirmation code
* required.
* @param smdpSigned2 ASN.1 data in byte array indicating the data to be signed by the SM-DP+
@@ -497,14 +536,17 @@
* SM-DP+ server.
* @param smdpCertificate ASN.1 data in byte array indicating the SM-DP+ Certificate returned
* by SM-DP+ server.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and a byte array which represents a
* {@code PrepareDownloadResponse} defined in GSMA RSP v2.0+
*/
- public void prepareDownload(@Nullable byte[] hashCc, byte[] smdpSigned2,
- byte[] smdpSignature2, byte[] smdpCertificate, ResultCallback<byte[]> callback) {
+ public void prepareDownload(String cardId, @Nullable byte[] hashCc, byte[] smdpSigned2,
+ byte[] smdpSignature2, byte[] smdpCertificate, Executor executor,
+ ResultCallback<byte[]> callback) {
try {
getIEuiccCardController().prepareDownload(
mContext.getOpPackageName(),
+ cardId,
hashCc,
smdpSigned2,
smdpSignature2,
@@ -512,7 +554,7 @@
new IPrepareDownloadCallback.Stub() {
@Override
public void onComplete(int resultCode, byte[] response) {
- callback.onComplete(resultCode, response);
+ executor.execute(() -> callback.onComplete(resultCode, response));
}
});
} catch (RemoteException e) {
@@ -524,20 +566,23 @@
/**
* Loads a downloaded bound profile package onto the eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param boundProfilePackage the Bound Profile Package data returned by SM-DP+ server.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and a byte array which represents a
* {@code LoadBoundProfilePackageResponse} defined in GSMA RSP v2.0+.
*/
- public void loadBoundProfilePackage(byte[] boundProfilePackage,
- ResultCallback<byte[]> callback) {
+ public void loadBoundProfilePackage(String cardId, byte[] boundProfilePackage,
+ Executor executor, ResultCallback<byte[]> callback) {
try {
getIEuiccCardController().loadBoundProfilePackage(
mContext.getOpPackageName(),
+ cardId,
boundProfilePackage,
new ILoadBoundProfilePackageCallback.Stub() {
@Override
public void onComplete(int resultCode, byte[] response) {
- callback.onComplete(resultCode, response);
+ executor.execute(() -> callback.onComplete(resultCode, response));
}
});
} catch (RemoteException e) {
@@ -549,22 +594,25 @@
/**
* Cancels the current profile download session.
*
+ * @param cardId The Id of the eUICC.
* @param transactionId the transaction ID returned by SM-DP+ server.
* @param reason the cancel reason.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and an byte[] which represents a
* {@code CancelSessionResponse} defined in GSMA RSP v2.0+.
*/
- public void cancelSession(byte[] transactionId, @CancelReason int reason,
- ResultCallback<byte[]> callback) {
+ public void cancelSession(String cardId, byte[] transactionId, @CancelReason int reason,
+ Executor executor, ResultCallback<byte[]> callback) {
try {
getIEuiccCardController().cancelSession(
mContext.getOpPackageName(),
+ cardId,
transactionId,
reason,
new ICancelSessionCallback.Stub() {
@Override
public void onComplete(int resultCode, byte[] response) {
- callback.onComplete(resultCode, response);
+ executor.execute(() -> callback.onComplete(resultCode, response));
}
});
} catch (RemoteException e) {
@@ -576,17 +624,19 @@
/**
* Lists all notifications of the given {@code notificationEvents}.
*
+ * @param cardId The Id of the eUICC.
* @param events bits of the event types ({@link EuiccNotification.Event}) to list.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and the list of notifications.
*/
- public void listNotifications(@EuiccNotification.Event int events,
- ResultCallback<EuiccNotification[]> callback) {
+ public void listNotifications(String cardId, @EuiccNotification.Event int events,
+ Executor executor, ResultCallback<EuiccNotification[]> callback) {
try {
- getIEuiccCardController().listNotifications(mContext.getOpPackageName(), events,
+ getIEuiccCardController().listNotifications(mContext.getOpPackageName(), cardId, events,
new IListNotificationsCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccNotification[] notifications) {
- callback.onComplete(resultCode, notifications);
+ executor.execute(() -> callback.onComplete(resultCode, notifications));
}
});
} catch (RemoteException e) {
@@ -598,17 +648,19 @@
/**
* Retrieves contents of all notification of the given {@code events}.
*
+ * @param cardId The Id of the eUICC.
* @param events bits of the event types ({@link EuiccNotification.Event}) to list.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and the list of notifications.
*/
- public void retrieveNotificationList(@EuiccNotification.Event int events,
- ResultCallback<EuiccNotification[]> callback) {
+ public void retrieveNotificationList(String cardId, @EuiccNotification.Event int events,
+ Executor executor, ResultCallback<EuiccNotification[]> callback) {
try {
- getIEuiccCardController().retrieveNotificationList(mContext.getOpPackageName(), events,
- new IRetrieveNotificationListCallback.Stub() {
+ getIEuiccCardController().retrieveNotificationList(mContext.getOpPackageName(), cardId,
+ events, new IRetrieveNotificationListCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccNotification[] notifications) {
- callback.onComplete(resultCode, notifications);
+ executor.execute(() -> callback.onComplete(resultCode, notifications));
}
});
} catch (RemoteException e) {
@@ -620,16 +672,19 @@
/**
* Retrieves the content of a notification of the given {@code seqNumber}.
*
+ * @param cardId The Id of the eUICC.
* @param seqNumber the sequence number of the notification.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code and the notification.
*/
- public void retrieveNotification(int seqNumber, ResultCallback<EuiccNotification> callback) {
+ public void retrieveNotification(String cardId, int seqNumber, Executor executor,
+ ResultCallback<EuiccNotification> callback) {
try {
- getIEuiccCardController().retrieveNotification(mContext.getOpPackageName(), seqNumber,
- new IRetrieveNotificationCallback.Stub() {
+ getIEuiccCardController().retrieveNotification(mContext.getOpPackageName(), cardId,
+ seqNumber, new IRetrieveNotificationCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccNotification notification) {
- callback.onComplete(resultCode, notification);
+ executor.execute(() -> callback.onComplete(resultCode, notification));
}
});
} catch (RemoteException e) {
@@ -641,18 +696,22 @@
/**
* Removes a notification from eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param seqNumber the sequence number of the notification.
+ * @param executor The executor through which the callback should be invode.
* @param callback the callback to get the result code.
*/
- public void removeNotificationFromList(int seqNumber, ResultCallback<Void> callback) {
+ public void removeNotificationFromList(String cardId, int seqNumber, Executor executor,
+ ResultCallback<Void> callback) {
try {
getIEuiccCardController().removeNotificationFromList(
mContext.getOpPackageName(),
+ cardId,
seqNumber,
new IRemoveNotificationFromListCallback.Stub() {
@Override
public void onComplete(int resultCode) {
- callback.onComplete(resultCode, null);
+ executor.execute(() -> callback.onComplete(resultCode, null));
}
});
} catch (RemoteException e) {
diff --git a/telephony/java/android/telephony/euicc/EuiccInfo.java b/telephony/java/android/telephony/euicc/EuiccInfo.java
index 5bfff08..a4adf05 100644
--- a/telephony/java/android/telephony/euicc/EuiccInfo.java
+++ b/telephony/java/android/telephony/euicc/EuiccInfo.java
@@ -23,9 +23,6 @@
* Information about an eUICC chip/device.
*
* @see EuiccManager#getEuiccInfo
- * @hide
- *
- * TODO(b/35851809): Make this public.
*/
// WARNING: Do not add any privacy-sensitive fields to this class (such as an eUICC identifier)!
// This API is accessible to all applications. Privacy-sensitive fields should be returned in their
@@ -45,12 +42,17 @@
}
};
+ @Nullable
+ private final String osVersion;
+
/**
- * Version of the operating system running on the eUICC. This field is hardware-specific and is
- * not guaranteed to match any particular format.
+ * Gets the version of the operating system running on the eUICC. This field is
+ * hardware-specific and is not guaranteed to match any particular format.
*/
@Nullable
- public final String osVersion;
+ public String getOsVersion() {
+ return osVersion;
+ }
public EuiccInfo(@Nullable String osVersion) {
this.osVersion = osVersion;
diff --git a/telephony/java/android/telephony/euicc/EuiccManager.java b/telephony/java/android/telephony/euicc/EuiccManager.java
index 8bb709f..d6f94da 100644
--- a/telephony/java/android/telephony/euicc/EuiccManager.java
+++ b/telephony/java/android/telephony/euicc/EuiccManager.java
@@ -15,11 +15,12 @@
*/
package android.telephony.euicc;
+import android.Manifest;
import android.annotation.IntDef;
import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SystemApi;
-import android.annotation.TestApi;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Context;
@@ -42,9 +43,6 @@
* {@link Context#getSystemService(String)} and {@link Context#EUICC_SERVICE}.
*
* <p>See {@link #isEnabled} before attempting to use these APIs.
- *
- * TODO(b/35851809): Make this public.
- * @hide
*/
public class EuiccManager {
@@ -56,6 +54,8 @@
*
* <p>The activity will immediately finish with {@link android.app.Activity#RESULT_CANCELED} if
* {@link #isEnabled} is false.
+ *
+ * This is ued by non-LPA app to bring up LUI.
*/
@SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS =
@@ -69,21 +69,22 @@
*
* <p class="note">This is a protected intent that can only be sent
* by the system.
- * TODO(b/35851809): Make this a SystemApi.
+ *
+ * @hide
*/
+ @SystemApi
@SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION)
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public static final String ACTION_OTA_STATUS_CHANGED =
"android.telephony.euicc.action.OTA_STATUS_CHANGED";
/**
* Broadcast Action: The action sent to carrier app so it knows the carrier setup is not
* completed.
- *
- * TODO(b/35851809): Make this a public API.
*/
@SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String ACTION_NOTIFY_CARRIER_SETUP =
- "android.telephony.euicc.action.NOTIFY_CARRIER_SETUP";
+ public static final String ACTION_NOTIFY_CARRIER_SETUP_INCOMPLETE =
+ "android.telephony.euicc.action.NOTIFY_CARRIER_SETUP_INCOMPLETE";
/**
* Intent action to provision an embedded subscription.
@@ -95,8 +96,9 @@
* <p>The activity will immediately finish with {@link android.app.Activity#RESULT_CANCELED} if
* {@link #isEnabled} is false or if the device is already provisioned.
*
- * TODO(b/35851809): Make this a SystemApi.
+ * @hide
*/
+ @SystemApi
@SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION =
"android.telephony.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION";
@@ -140,11 +142,8 @@
"android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DETAILED_CODE";
/**
- * Key for an extra set on {@link #getDownloadableSubscriptionMetadata} PendingIntent result
+ * Key for an extra set on {@code #getDownloadableSubscriptionMetadata} PendingIntent result
* callbacks providing the downloadable subscription metadata.
- * @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTION =
"android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTION";
@@ -153,9 +152,8 @@
* Key for an extra set on {@link #getDefaultDownloadableSubscriptionList} PendingIntent result
* callbacks providing the list of available downloadable subscriptions.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+ @SystemApi
public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS =
"android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS";
@@ -201,6 +199,7 @@
* Euicc OTA update status which can be got by {@link #getOtaStatus}
* @hide
*/
+ @SystemApi
@Retention(RetentionPolicy.SOURCE)
@IntDef(prefix = {"EUICC_OTA_"}, value = {
EUICC_OTA_IN_PROGRESS,
@@ -215,15 +214,37 @@
/**
* An OTA is in progress. During this time, the eUICC is not available and the user may lose
* network access.
+ * @hide
*/
+ @SystemApi
public static final int EUICC_OTA_IN_PROGRESS = 1;
- /** The OTA update failed. */
+
+ /**
+ * The OTA update failed.
+ * @hide
+ */
+ @SystemApi
public static final int EUICC_OTA_FAILED = 2;
- /** The OTA update finished successfully. */
+
+ /**
+ * The OTA update finished successfully.
+ * @hide
+ */
+ @SystemApi
public static final int EUICC_OTA_SUCCEEDED = 3;
- /** The OTA update not needed since current eUICC OS is latest. */
+
+ /**
+ * The OTA update not needed since current eUICC OS is latest.
+ * @hide
+ */
+ @SystemApi
public static final int EUICC_OTA_NOT_NEEDED = 4;
- /** The OTA status is unavailable since eUICC service is unavailable. */
+
+ /**
+ * The OTA status is unavailable since eUICC service is unavailable.
+ * @hide
+ */
+ @SystemApi
public static final int EUICC_OTA_STATUS_UNAVAILABLE = 5;
private final Context mContext;
@@ -276,8 +297,11 @@
*
* @return the status of eUICC OTA. If {@link #isEnabled()} is false or the eUICC is not ready,
* {@link OtaStatus#EUICC_OTA_STATUS_UNAVAILABLE} will be returned.
+ *
+ * @hide
*/
@SystemApi
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public int getOtaStatus() {
if (!isEnabled()) {
return EUICC_OTA_STATUS_UNAVAILABLE;
@@ -292,7 +316,7 @@
/**
* Attempt to download the given {@link DownloadableSubscription}.
*
- * <p>Requires the {@link android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission,
+ * <p>Requires the {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission,
* or the calling app must be authorized to manage both the currently-active subscription and
* the subscription to be downloaded according to the subscription metadata. Without the former,
* an {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} will be returned in the callback
@@ -302,6 +326,7 @@
* @param switchAfterDownload if true, the profile will be activated upon successful download.
* @param callbackIntent a PendingIntent to launch when the operation completes.
*/
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public void downloadSubscription(DownloadableSubscription subscription,
boolean switchAfterDownload, PendingIntent callbackIntent) {
if (!isEnabled()) {
@@ -354,14 +379,17 @@
*
* <p>To be called by the LUI upon completion of a resolvable error flow.
*
+ * <p>Requires that the calling app has the
+ * {@link android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission.
+ *
* @param resolutionIntent The original intent used to start the LUI.
* @param resolutionExtras Resolution-specific extras depending on the result of the resolution.
* For example, this may indicate whether the user has consented or may include the input
* they provided.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+ @SystemApi
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public void continueOperation(Intent resolutionIntent, Bundle resolutionExtras) {
if (!isEnabled()) {
PendingIntent callbackIntent =
@@ -395,9 +423,9 @@
* @param subscription the subscription which needs metadata filled in
* @param callbackIntent a PendingIntent to launch when the operation completes.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+ @SystemApi
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public void getDownloadableSubscriptionMetadata(
DownloadableSubscription subscription, PendingIntent callbackIntent) {
if (!isEnabled()) {
@@ -426,9 +454,9 @@
*
* @param callbackIntent a PendingIntent to launch when the operation completes.
* @hide
- *
- * TODO(b/35851809): Make this a SystemApi.
*/
+ @SystemApi
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public void getDefaultDownloadableSubscriptionList(PendingIntent callbackIntent) {
if (!isEnabled()) {
sendUnavailableError(callbackIntent);
@@ -468,11 +496,12 @@
*
* <p>Requires that the calling app has carrier privileges according to the metadata of the
* profile to be deleted, or the
- * {@link android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission.
+ * {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission.
*
* @param subscriptionId the ID of the subscription to delete.
* @param callbackIntent a PendingIntent to launch when the operation completes.
*/
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public void deleteSubscription(int subscriptionId, PendingIntent callbackIntent) {
if (!isEnabled()) {
sendUnavailableError(callbackIntent);
@@ -489,7 +518,7 @@
/**
* Switch to (enable) the given subscription.
*
- * <p>Requires the {@link android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission,
+ * <p>Requires the {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission,
* or the calling app must be authorized to manage both the currently-active subscription and
* the subscription to be enabled according to the subscription metadata. Without the former,
* an {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} will be returned in the callback
@@ -500,6 +529,7 @@
* current profile without activating another profile to replace it.
* @param callbackIntent a PendingIntent to launch when the operation completes.
*/
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public void switchToSubscription(int subscriptionId, PendingIntent callbackIntent) {
if (!isEnabled()) {
sendUnavailableError(callbackIntent);
@@ -525,6 +555,7 @@
* @param callbackIntent a PendingIntent to launch when the operation completes.
* @hide
*/
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public void updateSubscriptionNickname(
int subscriptionId, String nickname, PendingIntent callbackIntent) {
if (!isEnabled()) {
@@ -543,12 +574,13 @@
* Erase all subscriptions and reset the eUICC.
*
* <p>Requires that the calling app has the
- * {@link android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission. This is for
- * internal system use only.
+ * {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission.
*
* @param callbackIntent a PendingIntent to launch when the operation completes.
* @hide
*/
+ @SystemApi
+ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
public void eraseSubscriptions(PendingIntent callbackIntent) {
if (!isEnabled()) {
sendUnavailableError(callbackIntent);
@@ -599,11 +631,7 @@
}
}
- /**
- * @hide
- */
- @TestApi
- protected IEuiccController getIEuiccController() {
+ private static IEuiccController getIEuiccController() {
return IEuiccController.Stub.asInterface(ServiceManager.getService("econtroller"));
}
}
diff --git a/telephony/java/android/telephony/euicc/EuiccNotification.java b/telephony/java/android/telephony/euicc/EuiccNotification.java
index ef3c1ce..43a7707 100644
--- a/telephony/java/android/telephony/euicc/EuiccNotification.java
+++ b/telephony/java/android/telephony/euicc/EuiccNotification.java
@@ -17,6 +17,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -31,10 +32,9 @@
* disabling, or deleting).
*
* @hide
- *
- * TODO(b/35851809): Make this a @SystemApi.
*/
-public class EuiccNotification implements Parcelable {
+@SystemApi
+public final class EuiccNotification implements Parcelable {
/** Event */
@Retention(RetentionPolicy.SOURCE)
@IntDef(flag = true, prefix = { "EVENT_" }, value = {
@@ -43,6 +43,7 @@
EVENT_DISABLE,
EVENT_DELETE
})
+ /** @hide */
public @interface Event {}
/** A profile is downloaded and installed. */
@@ -57,7 +58,7 @@
/** A profile is deleted. */
public static final int EVENT_DELETE = 1 << 3;
- /** Value of the bits of all above events */
+ /** Value of the bits of all the events including install, enable, disable and delete. */
@Event
public static final int ALL_EVENTS =
EVENT_INSTALL | EVENT_ENABLE | EVENT_DISABLE | EVENT_DELETE;
diff --git a/telephony/java/android/telephony/euicc/EuiccRulesAuthTable.java b/telephony/java/android/telephony/euicc/EuiccRulesAuthTable.java
index 7efe043..67ae983 100644
--- a/telephony/java/android/telephony/euicc/EuiccRulesAuthTable.java
+++ b/telephony/java/android/telephony/euicc/EuiccRulesAuthTable.java
@@ -16,6 +16,7 @@
package android.telephony.euicc;
import android.annotation.IntDef;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.service.carrier.CarrierIdentifier;
@@ -27,20 +28,21 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.List;
/**
* This represents the RAT (Rules Authorisation Table) stored on eUICC.
- *
* @hide
- *
- * TODO(b/35851809): Make this a @SystemApi.
*/
+@SystemApi
public final class EuiccRulesAuthTable implements Parcelable {
/** Profile policy rule flags */
@Retention(RetentionPolicy.SOURCE)
@IntDef(flag = true, prefix = { "POLICY_RULE_FLAG_" }, value = {
POLICY_RULE_FLAG_CONSENT_REQUIRED
})
+ /** @hide */
public @interface PolicyRuleFlag {}
/** User consent is required to install the profile. */
@@ -89,12 +91,14 @@
* @throws ArrayIndexOutOfBoundsException If the {@code mPosition} is larger than the size
* this table.
*/
- public Builder add(int policyRules, CarrierIdentifier[] carrierId, int policyRuleFlags) {
+ public Builder add(int policyRules, List<CarrierIdentifier> carrierId, int policyRuleFlags) {
if (mPosition >= mPolicyRules.length) {
throw new ArrayIndexOutOfBoundsException(mPosition);
}
mPolicyRules[mPosition] = policyRules;
- mCarrierIds[mPosition] = carrierId;
+ if (carrierId != null && carrierId.size() > 0) {
+ mCarrierIds[mPosition] = carrierId.toArray(new CarrierIdentifier[carrierId.size()]);
+ }
mPolicyRuleFlags[mPosition] = policyRuleFlags;
mPosition++;
return this;
diff --git a/telephony/java/com/android/ims/ImsCallForwardInfo.aidl b/telephony/java/android/telephony/ims/ImsCallForwardInfo.aidl
similarity index 95%
rename from telephony/java/com/android/ims/ImsCallForwardInfo.aidl
rename to telephony/java/android/telephony/ims/ImsCallForwardInfo.aidl
index a7c3f9a5..b322b39 100644
--- a/telephony/java/com/android/ims/ImsCallForwardInfo.aidl
+++ b/telephony/java/android/telephony/ims/ImsCallForwardInfo.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsCallForwardInfo;
diff --git a/telephony/java/com/android/ims/ImsCallForwardInfo.java b/telephony/java/android/telephony/ims/ImsCallForwardInfo.java
similarity index 60%
rename from telephony/java/com/android/ims/ImsCallForwardInfo.java
rename to telephony/java/android/telephony/ims/ImsCallForwardInfo.java
index eeee0fc..2831127 100644
--- a/telephony/java/com/android/ims/ImsCallForwardInfo.java
+++ b/telephony/java/android/telephony/ims/ImsCallForwardInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -11,11 +11,12 @@
* 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.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,23 +25,52 @@
*
* @hide
*/
-public class ImsCallForwardInfo implements Parcelable {
+@SystemApi
+public final class ImsCallForwardInfo implements Parcelable {
// Refer to ImsUtInterface#CDIV_CF_XXX
+ /** @hide */
+ // TODO: Make private, do not modify this field directly, use getter.
public int mCondition;
// 0: disabled, 1: enabled
+ /** @hide */
+ // TODO: Make private, do not modify this field directly, use getter.
public int mStatus;
// 0x91: International, 0x81: Unknown
+ /** @hide */
+ // TODO: Make private, do not modify this field directly, use getter.
public int mToA;
// Service class
+ /** @hide */
+ // TODO: Make private, do not modify this field directly, use getter.
public int mServiceClass;
// Number (it will not include the "sip" or "tel" URI scheme)
+ /** @hide */
+ // TODO: Make private, do not modify this field directly, use getter.
public String mNumber;
// No reply timer for CF
+ /** @hide */
+ // TODO: Make private, do not modify this field directly, use getter.
public int mTimeSeconds;
+ /** @hide */
+ // TODO: Will be removed in the future, use public constructor instead.
public ImsCallForwardInfo() {
}
+ /**
+ * IMS Call Forward Information.
+ */
+ public ImsCallForwardInfo(int condition, int status, int toA, int serviceClass, String number,
+ int replyTimerSec) {
+ mCondition = condition;
+ mStatus = status;
+ mToA = toA;
+ mServiceClass = serviceClass;
+ mNumber = number;
+ mTimeSeconds = replyTimerSec;
+ }
+
+ /** @hide */
public ImsCallForwardInfo(Parcel in) {
readFromParcel(in);
}
@@ -91,4 +121,28 @@
return new ImsCallForwardInfo[size];
}
};
+
+ public int getCondition() {
+ return mCondition;
+ }
+
+ public int getStatus() {
+ return mStatus;
+ }
+
+ public int getToA() {
+ return mToA;
+ }
+
+ public int getServiceClass() {
+ return mServiceClass;
+ }
+
+ public String getNumber() {
+ return mNumber;
+ }
+
+ public int getTimeSeconds() {
+ return mTimeSeconds;
+ }
}
diff --git a/telephony/java/com/android/ims/ImsCallProfile.aidl b/telephony/java/android/telephony/ims/ImsCallProfile.aidl
similarity index 95%
rename from telephony/java/com/android/ims/ImsCallProfile.aidl
rename to telephony/java/android/telephony/ims/ImsCallProfile.aidl
index a356d13..e24e145 100644
--- a/telephony/java/com/android/ims/ImsCallProfile.aidl
+++ b/telephony/java/android/telephony/ims/ImsCallProfile.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsCallProfile;
diff --git a/telephony/java/com/android/ims/ImsCallProfile.java b/telephony/java/android/telephony/ims/ImsCallProfile.java
similarity index 89%
rename from telephony/java/com/android/ims/ImsCallProfile.java
rename to telephony/java/android/telephony/ims/ImsCallProfile.java
index 693aaff..27e5f94 100644
--- a/telephony/java/com/android/ims/ImsCallProfile.java
+++ b/telephony/java/android/telephony/ims/ImsCallProfile.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -11,11 +11,12 @@
* 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.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -32,7 +33,8 @@
*
* @hide
*/
-public class ImsCallProfile implements Parcelable {
+@SystemApi
+public final class ImsCallProfile implements Parcelable {
private static final String TAG = "ImsCallProfile";
/**
@@ -110,52 +112,92 @@
* the video during voice call.
* conference_avail : Indicates if the session can be extended to the conference.
*/
+ /**
+ * @hide
+ */
public static final String EXTRA_CONFERENCE = "conference";
+ /**
+ * @hide
+ */
public static final String EXTRA_E_CALL = "e_call";
+ /**
+ * @hide
+ */
public static final String EXTRA_VMS = "vms";
+ /**
+ * @hide
+ */
public static final String EXTRA_CALL_MODE_CHANGEABLE = "call_mode_changeable";
+ /**
+ * @hide
+ */
public static final String EXTRA_CONFERENCE_AVAIL = "conference_avail";
// Extra string for internal use only. OEMs should not use
// this for packing extras.
+ /**
+ * @hide
+ */
public static final String EXTRA_OEM_EXTRAS = "OemCallExtras";
/**
- * Integer extra properties
- * oir : Rule for originating identity (number) presentation, MO/MT.
+ * Rule for originating identity (number) presentation, MO/MT.
* {@link ImsCallProfile#OIR_DEFAULT}
* {@link ImsCallProfile#OIR_PRESENTATION_RESTRICTED}
* {@link ImsCallProfile#OIR_PRESENTATION_NOT_RESTRICTED}
- * cnap : Rule for calling name presentation
+ */
+ public static final String EXTRA_OIR = "oir";
+ /**
+ * Rule for calling name presentation
* {@link ImsCallProfile#OIR_DEFAULT}
* {@link ImsCallProfile#OIR_PRESENTATION_RESTRICTED}
* {@link ImsCallProfile#OIR_PRESENTATION_NOT_RESTRICTED}
- * dialstring : To identify the Ims call type, MO
- * {@link ImsCallProfile#DIALSTRING_NORMAL_CALL}
+ */
+ public static final String EXTRA_CNAP = "cnap";
+ /**
+ * To identify the Ims call type, MO
+ * {@link ImsCallProfile#DIALSTRING_NORMAL}
* {@link ImsCallProfile#DIALSTRING_SS_CONF}
* {@link ImsCallProfile#DIALSTRING_USSD}
*/
- public static final String EXTRA_OIR = "oir";
- public static final String EXTRA_CNAP = "cnap";
public static final String EXTRA_DIALSTRING = "dialstring";
/**
* Values for EXTRA_OIR / EXTRA_CNAP
*/
+ /**
+ * Default presentation for Originating Identity.
+ */
public static final int OIR_DEFAULT = 0; // "user subscription default value"
+ /**
+ * Restricted presentation for Originating Identity.
+ */
public static final int OIR_PRESENTATION_RESTRICTED = 1;
+ /**
+ * Not restricted presentation for Originating Identity.
+ */
public static final int OIR_PRESENTATION_NOT_RESTRICTED = 2;
+ /**
+ * Presentation unknown for Originating Identity.
+ */
public static final int OIR_PRESENTATION_UNKNOWN = 3;
+ /**
+ * Payphone presentation for Originating Identity.
+ */
public static final int OIR_PRESENTATION_PAYPHONE = 4;
+ //Values for EXTRA_DIALSTRING
/**
- * Values for EXTRA_DIALSTRING
+ * A default or normal normal call.
*/
- // default (normal call)
public static final int DIALSTRING_NORMAL = 0;
- // Call for SIP-based user configuration
+ /**
+ * Call for SIP-based user configuration
+ */
public static final int DIALSTRING_SS_CONF = 1;
- // Call for USSD message
+ /**
+ * Call for USSD message
+ */
public static final int DIALSTRING_USSD = 2;
/**
@@ -215,8 +257,11 @@
*/
public static final String EXTRA_CALL_RAT_TYPE_ALT = "callRadioTech";
+ /** @hide */
public int mServiceType;
+ /** @hide */
public int mCallType;
+ /** @hide */
public int mRestrictCause = CALL_RESTRICT_CAUSE_NONE;
/**
@@ -241,13 +286,17 @@
* Invalid types will be removed when the {@link ImsCallProfile} is parceled for transmit across
* a {@link android.os.Binder}.
*/
+ /** @hide */
public Bundle mCallExtras;
+ /** @hide */
public ImsStreamMediaProfile mMediaProfile;
+ /** @hide */
public ImsCallProfile(Parcel in) {
readFromParcel(in);
}
+ /** @hide */
public ImsCallProfile() {
mServiceType = SERVICE_TYPE_NORMAL;
mCallType = CALL_TYPE_VOICE_N_VIDEO;
@@ -255,6 +304,7 @@
mMediaProfile = new ImsStreamMediaProfile();
}
+ /** @hide */
public ImsCallProfile(int serviceType, int callType) {
mServiceType = serviceType;
mCallType = callType;
@@ -366,8 +416,28 @@
}
};
+ public int getServiceType() {
+ return mServiceType;
+ }
+
+ public int getCallType() {
+ return mCallType;
+ }
+
+ public int getRestrictCause() {
+ return mRestrictCause;
+ }
+
+ public Bundle getCallExtras() {
+ return mCallExtras;
+ }
+
+ public ImsStreamMediaProfile getMediaProfile() {
+ return mMediaProfile;
+ }
+
/**
- * Converts from the call types defined in {@link com.android.ims.ImsCallProfile} to the
+ * Converts from the call types defined in {@link ImsCallProfile} to the
* video state values defined in {@link VideoProfile}.
*
* @param callProfile The call profile.
@@ -434,9 +504,9 @@
}
/**
- * Translate presentation value to OIR value
- * @param presentation
- * @return OIR valuse
+ * Badly named old method, kept for compatibility.
+ * See {@link #presentationToOir(int)}.
+ * @hide
*/
public static int presentationToOIR(int presentation) {
switch (presentation) {
@@ -454,9 +524,19 @@
}
/**
+ * Translate presentation value to OIR value
+ * @param presentation
+ * @return OIR values
+ */
+ public static int presentationToOir(int presentation) {
+ return presentationToOIR(presentation);
+ }
+
+ /**
* Translate OIR value to presentation value
* @param oir value
* @return presentation value
+ * @hide
*/
public static int OIRToPresentation(int oir) {
switch(oir) {
diff --git a/telephony/java/com/android/ims/internal/ImsCallSession.java b/telephony/java/android/telephony/ims/ImsCallSession.java
similarity index 90%
rename from telephony/java/com/android/ims/internal/ImsCallSession.java
rename to telephony/java/android/telephony/ims/ImsCallSession.java
index 1736b80..da32211 100644
--- a/telephony/java/com/android/ims/internal/ImsCallSession.java
+++ b/telephony/java/android/telephony/ims/ImsCallSession.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -11,23 +11,25 @@
* 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.
+ * limitations under the License
*/
-package com.android.ims.internal;
+package android.telephony.ims;
+import android.annotation.NonNull;
+import android.annotation.SystemApi;
import android.os.Message;
import android.os.RemoteException;
+import android.telephony.ims.aidl.IImsCallSessionListener;
import java.util.Objects;
+import java.util.concurrent.Executor;
-import android.telephony.ims.stub.ImsCallSessionListenerImplBase;
+import android.telephony.ims.stub.ImsCallSessionImplBase;
import android.util.Log;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsConferenceState;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsSuppServiceNotification;
+
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsVideoCallProvider;
/**
* Provides the call initiation/termination, and media exchange between two IMS endpoints.
@@ -39,7 +41,8 @@
private static final String TAG = "ImsCallSession";
/**
- * Defines IMS call session state.
+ * Defines IMS call session state. Please use {@link ImsCallSessionImplBase.State} definition.
+ * This is kept around for capability reasons.
*/
public static class State {
public static final int IDLE = 0;
@@ -92,6 +95,7 @@
* Listener for events relating to an IMS session, such as when a session is being
* recieved ("on ringing") or a call is outgoing ("on calling").
* <p>Many of these events are also received by {@link ImsCall.Listener}.</p>
+ * @hide
*/
public static class Listener {
/**
@@ -449,6 +453,7 @@
private boolean mClosed = false;
private Listener mListener;
+ /** @hide */
public ImsCallSession(IImsCallSession iSession) {
miSession = iSession;
@@ -462,6 +467,7 @@
}
}
+ /** @hide */
public ImsCallSession(IImsCallSession iSession, Listener listener) {
this(iSession);
setListener(listener);
@@ -470,15 +476,17 @@
/**
* Closes this object. This object is not usable after being closed.
*/
- public synchronized void close() {
- if (mClosed) {
- return;
- }
+ public void close() {
+ synchronized (this) {
+ if (mClosed) {
+ return;
+ }
- try {
- miSession.close();
- mClosed = true;
- } catch (RemoteException e) {
+ try {
+ miSession.close();
+ mClosed = true;
+ } catch (RemoteException e) {
+ }
}
}
@@ -554,6 +562,7 @@
* Gets the video call provider for the session.
*
* @return The video call provider.
+ * @hide
*/
public IImsVideoCallProvider getVideoCallProvider() {
if (mClosed) {
@@ -659,6 +668,7 @@
* override the previous listener.
*
* @param listener to listen to the session events of this object
+ * @hide
*/
public void setListener(Listener listener) {
mListener = listener;
@@ -743,6 +753,22 @@
}
/**
+ * Deflects an incoming call.
+ *
+ * @param number number to be deflected to
+ */
+ public void deflect(String number) {
+ if (mClosed) {
+ return;
+ }
+
+ try {
+ miSession.deflect(number);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
* Rejects an incoming call or session update.
*
* @param reason reason code to reject an incoming call
@@ -987,7 +1013,6 @@
* Sends Rtt Message
*
* @param rttMessage rtt text to be sent
- * @throws ImsException if call is absent
*/
public void sendRttMessage(String rttMessage) {
if (mClosed) {
@@ -1004,7 +1029,6 @@
* Sends RTT Upgrade request
*
* @param to : expected profile
- * @throws CallStateException
*/
public void sendRttModifyRequest(ImsCallProfile to) {
if (mClosed) {
@@ -1021,7 +1045,6 @@
* Sends RTT Upgrade response
*
* @param response : response for upgrade
- * @throws CallStateException
*/
public void sendRttModifyResponse(boolean response) {
if (mClosed) {
@@ -1040,37 +1063,33 @@
* the application is notified by having one of the methods called on
* the {@link IImsCallSessionListener}.
*/
- private class IImsCallSessionListenerProxy extends ImsCallSessionListenerImplBase {
+ private class IImsCallSessionListenerProxy extends IImsCallSessionListener.Stub {
/**
* Notifies the result of the basic session operation (setup / terminate).
*/
@Override
- public void callSessionProgressing(IImsCallSession session,
- ImsStreamMediaProfile profile) {
+ public void callSessionProgressing(ImsStreamMediaProfile profile) {
if (mListener != null) {
mListener.callSessionProgressing(ImsCallSession.this, profile);
}
}
@Override
- public void callSessionStarted(IImsCallSession session,
- ImsCallProfile profile) {
+ public void callSessionInitiated(ImsCallProfile profile) {
if (mListener != null) {
mListener.callSessionStarted(ImsCallSession.this, profile);
}
}
@Override
- public void callSessionStartFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
+ public void callSessionInitiatedFailed(ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionStartFailed(ImsCallSession.this, reasonInfo);
}
}
@Override
- public void callSessionTerminated(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
+ public void callSessionTerminated(ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionTerminated(ImsCallSession.this, reasonInfo);
}
@@ -1080,48 +1099,42 @@
* Notifies the result of the call hold/resume operation.
*/
@Override
- public void callSessionHeld(IImsCallSession session,
- ImsCallProfile profile) {
+ public void callSessionHeld(ImsCallProfile profile) {
if (mListener != null) {
mListener.callSessionHeld(ImsCallSession.this, profile);
}
}
@Override
- public void callSessionHoldFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
+ public void callSessionHoldFailed(ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionHoldFailed(ImsCallSession.this, reasonInfo);
}
}
@Override
- public void callSessionHoldReceived(IImsCallSession session,
- ImsCallProfile profile) {
+ public void callSessionHoldReceived(ImsCallProfile profile) {
if (mListener != null) {
mListener.callSessionHoldReceived(ImsCallSession.this, profile);
}
}
@Override
- public void callSessionResumed(IImsCallSession session,
- ImsCallProfile profile) {
+ public void callSessionResumed(ImsCallProfile profile) {
if (mListener != null) {
mListener.callSessionResumed(ImsCallSession.this, profile);
}
}
@Override
- public void callSessionResumeFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
+ public void callSessionResumeFailed(ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionResumeFailed(ImsCallSession.this, reasonInfo);
}
}
@Override
- public void callSessionResumeReceived(IImsCallSession session,
- ImsCallProfile profile) {
+ public void callSessionResumeReceived(ImsCallProfile profile) {
if (mListener != null) {
mListener.callSessionResumeReceived(ImsCallSession.this, profile);
}
@@ -1130,13 +1143,11 @@
/**
* Notifies the start of a call merge operation.
*
- * @param session The call session.
* @param newSession The merged call session.
* @param profile The call profile.
*/
@Override
- public void callSessionMergeStarted(IImsCallSession session,
- IImsCallSession newSession, ImsCallProfile profile) {
+ public void callSessionMergeStarted(IImsCallSession newSession, ImsCallProfile profile) {
// This callback can be used for future use to add additional
// functionality that may be needed between conference start and complete
Log.d(TAG, "callSessionMergeStarted");
@@ -1173,12 +1184,10 @@
/**
* Notifies of a failure to perform a call merge operation.
*
- * @param session The call session.
* @param reasonInfo The merge failure reason.
*/
@Override
- public void callSessionMergeFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
+ public void callSessionMergeFailed(ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionMergeFailed(ImsCallSession.this, reasonInfo);
}
@@ -1188,24 +1197,21 @@
* Notifies the result of call upgrade / downgrade or any other call updates.
*/
@Override
- public void callSessionUpdated(IImsCallSession session,
- ImsCallProfile profile) {
+ public void callSessionUpdated(ImsCallProfile profile) {
if (mListener != null) {
mListener.callSessionUpdated(ImsCallSession.this, profile);
}
}
@Override
- public void callSessionUpdateFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
+ public void callSessionUpdateFailed(ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionUpdateFailed(ImsCallSession.this, reasonInfo);
}
}
@Override
- public void callSessionUpdateReceived(IImsCallSession session,
- ImsCallProfile profile) {
+ public void callSessionUpdateReceived(ImsCallProfile profile) {
if (mListener != null) {
mListener.callSessionUpdateReceived(ImsCallSession.this, profile);
}
@@ -1215,8 +1221,8 @@
* Notifies the result of conference extension.
*/
@Override
- public void callSessionConferenceExtended(IImsCallSession session,
- IImsCallSession newSession, ImsCallProfile profile) {
+ public void callSessionConferenceExtended(IImsCallSession newSession,
+ ImsCallProfile profile) {
if (mListener != null) {
mListener.callSessionConferenceExtended(ImsCallSession.this,
new ImsCallSession(newSession), profile);
@@ -1224,16 +1230,15 @@
}
@Override
- public void callSessionConferenceExtendFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
+ public void callSessionConferenceExtendFailed(ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionConferenceExtendFailed(ImsCallSession.this, reasonInfo);
}
}
@Override
- public void callSessionConferenceExtendReceived(IImsCallSession session,
- IImsCallSession newSession, ImsCallProfile profile) {
+ public void callSessionConferenceExtendReceived(IImsCallSession newSession,
+ ImsCallProfile profile) {
if (mListener != null) {
mListener.callSessionConferenceExtendReceived(ImsCallSession.this,
new ImsCallSession(newSession), profile);
@@ -1245,15 +1250,14 @@
* the conference session.
*/
@Override
- public void callSessionInviteParticipantsRequestDelivered(IImsCallSession session) {
+ public void callSessionInviteParticipantsRequestDelivered() {
if (mListener != null) {
mListener.callSessionInviteParticipantsRequestDelivered(ImsCallSession.this);
}
}
@Override
- public void callSessionInviteParticipantsRequestFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
+ public void callSessionInviteParticipantsRequestFailed(ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionInviteParticipantsRequestFailed(ImsCallSession.this,
reasonInfo);
@@ -1261,15 +1265,14 @@
}
@Override
- public void callSessionRemoveParticipantsRequestDelivered(IImsCallSession session) {
+ public void callSessionRemoveParticipantsRequestDelivered() {
if (mListener != null) {
mListener.callSessionRemoveParticipantsRequestDelivered(ImsCallSession.this);
}
}
@Override
- public void callSessionRemoveParticipantsRequestFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
+ public void callSessionRemoveParticipantsRequestFailed(ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionRemoveParticipantsRequestFailed(ImsCallSession.this,
reasonInfo);
@@ -1280,8 +1283,7 @@
* Notifies the changes of the conference info. in the conference session.
*/
@Override
- public void callSessionConferenceStateUpdated(IImsCallSession session,
- ImsConferenceState state) {
+ public void callSessionConferenceStateUpdated(ImsConferenceState state) {
if (mListener != null) {
mListener.callSessionConferenceStateUpdated(ImsCallSession.this, state);
}
@@ -1291,17 +1293,15 @@
* Notifies the incoming USSD message.
*/
@Override
- public void callSessionUssdMessageReceived(IImsCallSession session,
- int mode, String ussdMessage) {
+ public void callSessionUssdMessageReceived(int mode, String ussdMessage) {
if (mListener != null) {
mListener.callSessionUssdMessageReceived(ImsCallSession.this, mode, ussdMessage);
}
}
/**
- * Notifies of a case where a {@link com.android.ims.internal.ImsCallSession} may
+ * Notifies of a case where a {@link ImsCallSession} may
* potentially handover from one radio technology to another.
- * @param session
* @param srcAccessTech The source radio access technology; one of the access technology
* constants defined in {@link android.telephony.ServiceState}. For
* example
@@ -1312,8 +1312,7 @@
* {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
*/
@Override
- public void callSessionMayHandover(IImsCallSession session,
- int srcAccessTech, int targetAccessTech) {
+ public void callSessionMayHandover(int srcAccessTech, int targetAccessTech) {
if (mListener != null) {
mListener.callSessionMayHandover(ImsCallSession.this, srcAccessTech,
targetAccessTech);
@@ -1324,9 +1323,8 @@
* Notifies of handover information for this call
*/
@Override
- public void callSessionHandover(IImsCallSession session,
- int srcAccessTech, int targetAccessTech,
- ImsReasonInfo reasonInfo) {
+ public void callSessionHandover(int srcAccessTech, int targetAccessTech,
+ ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionHandover(ImsCallSession.this, srcAccessTech,
targetAccessTech, reasonInfo);
@@ -1337,9 +1335,8 @@
* Notifies of handover failure info for this call
*/
@Override
- public void callSessionHandoverFailed(IImsCallSession session,
- int srcAccessTech, int targetAccessTech,
- ImsReasonInfo reasonInfo) {
+ public void callSessionHandoverFailed(int srcAccessTech, int targetAccessTech,
+ ImsReasonInfo reasonInfo) {
if (mListener != null) {
mListener.callSessionHandoverFailed(ImsCallSession.this, srcAccessTech,
targetAccessTech, reasonInfo);
@@ -1350,8 +1347,7 @@
* Notifies the TTY mode received from remote party.
*/
@Override
- public void callSessionTtyModeReceived(IImsCallSession session,
- int mode) {
+ public void callSessionTtyModeReceived(int mode) {
if (mListener != null) {
mListener.callSessionTtyModeReceived(ImsCallSession.this, mode);
}
@@ -1360,21 +1356,17 @@
/**
* Notifies of a change to the multiparty state for this {@code ImsCallSession}.
*
- * @param session The call session.
* @param isMultiParty {@code true} if the session became multiparty, {@code false}
* otherwise.
*/
- public void callSessionMultipartyStateChanged(IImsCallSession session,
- boolean isMultiParty) {
-
+ public void callSessionMultipartyStateChanged(boolean isMultiParty) {
if (mListener != null) {
mListener.callSessionMultipartyStateChanged(ImsCallSession.this, isMultiParty);
}
}
@Override
- public void callSessionSuppServiceReceived(IImsCallSession session,
- ImsSuppServiceNotification suppServiceInfo ) {
+ public void callSessionSuppServiceReceived(ImsSuppServiceNotification suppServiceInfo ) {
if (mListener != null) {
mListener.callSessionSuppServiceReceived(ImsCallSession.this, suppServiceInfo);
}
@@ -1384,8 +1376,7 @@
* Received RTT modify request from remote party
*/
@Override
- public void callSessionRttModifyRequestReceived(IImsCallSession session,
- ImsCallProfile callProfile) {
+ public void callSessionRttModifyRequestReceived(ImsCallProfile callProfile) {
if (mListener != null) {
mListener.callSessionRttModifyRequestReceived(ImsCallSession.this, callProfile);
}
diff --git a/telephony/java/android/telephony/ims/ImsCallSessionListener.java b/telephony/java/android/telephony/ims/ImsCallSessionListener.java
new file mode 100644
index 0000000..a7f124a
--- /dev/null
+++ b/telephony/java/android/telephony/ims/ImsCallSessionListener.java
@@ -0,0 +1,603 @@
+/*
+ * 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
+ */
+
+package android.telephony.ims;
+
+import android.annotation.SystemApi;
+import android.os.RemoteException;
+import android.telephony.ims.aidl.IImsCallSessionListener;
+import android.telephony.ims.stub.ImsCallSessionImplBase;
+
+import com.android.ims.internal.IImsCallSession;
+
+/**
+ * Listener interface for notifying the Framework's {@link ImsCallSession} for updates to an ongoing
+ * IMS call.
+ *
+ * @hide
+ */
+// DO NOT remove or change the existing APIs, only add new ones to this implementation or you
+// will break other implementations of ImsCallSessionListener maintained by other ImsServices.
+// TODO: APIs in here do not conform to API guidelines yet. This can be changed if
+// ImsCallSessionListenerConverter is also changed.
+@SystemApi
+public class ImsCallSessionListener {
+
+ private final IImsCallSessionListener mListener;
+
+ /** @hide */
+ public ImsCallSessionListener(IImsCallSessionListener l) {
+ mListener = l;
+ }
+
+ /**
+ * A request has been sent out to initiate a new IMS call session and a 1xx response has been
+ * received from the network.
+ */
+ public void callSessionProgressing(ImsStreamMediaProfile profile) {
+ try {
+ mListener.callSessionProgressing(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session has been initiated.
+ *
+ * @param profile the associated {@link ImsCallProfile}.
+ */
+ public void callSessionInitiated(ImsCallProfile profile) {
+ try {
+ mListener.callSessionInitiated(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session establishment has failed.
+ *
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason of the IMS call session
+ * establishment failure.
+ */
+ public void callSessionInitiatedFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionInitiatedFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session has been terminated.
+ *
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason of the session termination.
+ */
+ public void callSessionTerminated(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionTerminated(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session has started the process of holding the call. If it fails,
+ * {@link #callSessionHoldFailed(ImsReasonInfo)} should be called.
+ *
+ * If the IMS call session is resumed, call {@link #callSessionResumed(ImsCallProfile)}.
+ *
+ * @param profile The associated {@link ImsCallProfile} of the call session that has been put
+ * on hold.
+ */
+ public void callSessionHeld(ImsCallProfile profile) {
+ try {
+ mListener.callSessionHeld(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session has failed to be held.
+ *
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason of the session hold failure.
+ */
+ public void callSessionHoldFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionHoldFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * This IMS Call session has been put on hold by the remote party.
+ *
+ * @param profile The {@link ImsCallProfile} associated with this IMS call session.
+ */
+ public void callSessionHoldReceived(ImsCallProfile profile) {
+ try {
+ mListener.callSessionHoldReceived(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session has started the process of resuming the call. If the process of resuming
+ * the call fails, call {@link #callSessionResumeFailed(ImsReasonInfo)}.
+ *
+ * @param profile The {@link ImsCallProfile} associated with this IMS call session.
+ */
+ public void callSessionResumed(ImsCallProfile profile) {
+ try {
+ mListener.callSessionResumed(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session resume has failed.
+ *
+ * @param reasonInfo {@link ImsReasonInfo} containing the detailed reason of the session resume
+ * failure.
+ */
+ public void callSessionResumeFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionResumeFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The remote party has resumed this IMS call session.
+ *
+ * @param profile {@link ImsCallProfile} associated with the IMS call session.
+ */
+ public void callSessionResumeReceived(ImsCallProfile profile) {
+ try {
+ mListener.callSessionResumeReceived(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session merge has been started. At this point, the {@code newSession}
+ * represents the IMS call session which represents the new merged conference and has been
+ * initiated to the IMS conference server.
+ *
+ * @param newSession the {@link ImsCallSessionImplBase} that represents the merged active & held
+ * sessions.
+ * @param profile The {@link ImsCallProfile} associated with this IMS call session.
+ */
+ public void callSessionMergeStarted(ImsCallSessionImplBase newSession, ImsCallProfile profile)
+ {
+ try {
+ mListener.callSessionMergeStarted(newSession != null ?
+ newSession.getServiceImpl() : null, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Compatibility method for older implementations.
+ * See {@link #callSessionMergeStarted(ImsCallSessionImplBase, ImsCallProfile)}.
+ *
+ * @hide
+ */
+ public void callSessionMergeStarted(IImsCallSession newSession, ImsCallProfile profile)
+ {
+ try {
+ mListener.callSessionMergeStarted(newSession, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The session merge is successful and the merged {@link ImsCallSession} is active.
+ *
+ * @param newSession the new {@link ImsCallSessionImplBase}
+ * that represents the conference IMS call
+ * session.
+ */
+ public void callSessionMergeComplete(ImsCallSessionImplBase newSession) {
+ try {
+ mListener.callSessionMergeComplete(newSession != null ?
+ newSession.getServiceImpl() : null);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Compatibility method for older implementations of ImsService.
+ *
+ * See {@link #callSessionMergeComplete(ImsCallSessionImplBase)}}.
+ *
+ * @hide
+ */
+ public void callSessionMergeComplete(IImsCallSession newSession) {
+ try {
+ mListener.callSessionMergeComplete(newSession);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session merge has failed.
+ *
+ * @param reasonInfo {@link ImsReasonInfo} contining the reason for the call merge failure.
+ */
+ public void callSessionMergeFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionMergeFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session profile has been updated. Does not include holding or resuming a call.
+ *
+ * @param profile The {@link ImsCallProfile} associated with the updated IMS call session.
+ */
+ public void callSessionUpdated(ImsCallProfile profile) {
+ try {
+ mListener.callSessionUpdated(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session profile update has failed.
+ *
+ * @param reasonInfo {@link ImsReasonInfo} containing a reason for the session update failure.
+ */
+ public void callSessionUpdateFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionUpdateFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session profile has received an update from the remote user.
+ *
+ * @param profile The new {@link ImsCallProfile} associated with the update.
+ */
+ public void callSessionUpdateReceived(ImsCallProfile profile) {
+ try {
+ mListener.callSessionUpdateReceived(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Called when the session has been extended to a conference session.
+ *
+ * If the conference extension fails, call
+ * {@link #callSessionConferenceExtendFailed(ImsReasonInfo)}.
+ *
+ * @param newSession the session object that is extended to the conference from the active
+ * IMS Call session.
+ * @param profile The {@link ImsCallProfile} associated with the IMS call session.
+ */
+ public void callSessionConferenceExtended(ImsCallSessionImplBase newSession,
+ ImsCallProfile profile) {
+ try {
+ mListener.callSessionConferenceExtended(
+ newSession != null ? newSession.getServiceImpl() : null, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Compatibility method to interface with older versions of ImsService.
+ * See {@link #callSessionConferenceExtended(ImsCallSessionImplBase, ImsCallProfile)}.
+ *
+ * @hide
+ */
+ public void callSessionConferenceExtended(IImsCallSession newSession, ImsCallProfile profile) {
+ try {
+ mListener.callSessionConferenceExtended(newSession, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The previous conference extension has failed.
+ *
+ * @param reasonInfo {@link ImsReasonInfo} containing the detailed reason of the conference
+ * extension failure.
+ */
+ public void callSessionConferenceExtendFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionConferenceExtendFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * A conference extension has been received received from the remote party.
+ *
+ * @param newSession An {@link ImsCallSessionImplBase}
+ * representing the extended IMS call session.
+ * @param profile The {@link ImsCallProfile} associated with the new IMS call session.
+ */
+ public void callSessionConferenceExtendReceived(ImsCallSessionImplBase newSession,
+ ImsCallProfile profile) {
+ try {
+ mListener.callSessionConferenceExtendReceived(newSession != null
+ ? newSession.getServiceImpl() : null, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Compatibility method to interface with older versions of ImsService.
+ * See {@link #callSessionConferenceExtendReceived(ImsCallSessionImplBase, ImsCallProfile)}.
+ *
+ * @hide
+ */
+ public void callSessionConferenceExtendReceived(IImsCallSession newSession,
+ ImsCallProfile profile) {
+ try {
+ mListener.callSessionConferenceExtendReceived(newSession, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The request to invite participants to the conference has been delivered to the conference
+ * server.
+ */
+ public void callSessionInviteParticipantsRequestDelivered() {
+ try {
+ mListener.callSessionInviteParticipantsRequestDelivered();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The previous request to invite participants to the conference (see
+ * {@link #callSessionInviteParticipantsRequestDelivered()}) has failed.
+ *
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason forthe conference invitation
+ * failure.
+ */
+ public void callSessionInviteParticipantsRequestFailed(ImsReasonInfo reasonInfo)
+ {
+ try {
+ mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The request to remove participants from the conference has been delivered to the conference
+ * server.
+ */
+ public void callSessionRemoveParticipantsRequestDelivered() {
+ try {
+ mListener.callSessionRemoveParticipantsRequestDelivered();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The previous request to remove participants from the conference (see
+ * {@link #callSessionRemoveParticipantsRequestDelivered()}) has failed.
+ *
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason for the conference removal
+ * failure.
+ */
+ public void callSessionRemoveParticipantsRequestFailed(ImsReasonInfo reasonInfo)
+ {
+ try {
+ mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session's conference state has changed.
+ *
+ * @param state The new {@link ImsConferenceState} associated with the conference.
+ */
+ public void callSessionConferenceStateUpdated(ImsConferenceState state) {
+ try {
+ mListener.callSessionConferenceStateUpdated(state);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session has received a Ussd message.
+ *
+ * @param mode The mode of the USSD message, either
+ * {@link ImsCallSessionImplBase#USSD_MODE_NOTIFY} or
+ * {@link ImsCallSessionImplBase#USSD_MODE_REQUEST}.
+ * @param ussdMessage The USSD message.
+ */
+ public void callSessionUssdMessageReceived(int mode, String ussdMessage)
+ {
+ try {
+ mListener.callSessionUssdMessageReceived(mode, ussdMessage);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * An {@link ImsCallSession} may potentially handover from one radio
+ * technology to another.
+ *
+ * @param srcAccessTech The source radio access technology; one of the access technology
+ * constants defined in {@link android.telephony.ServiceState}. For example
+ * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
+ * @param targetAccessTech The target radio access technology; one of the access technology
+ * constants defined in {@link android.telephony.ServiceState}. For example
+ * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
+ */
+ public void callSessionMayHandover(int srcAccessTech, int targetAccessTech)
+ {
+ try {
+ mListener.callSessionMayHandover(srcAccessTech, targetAccessTech);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session's access technology has changed.
+ *
+ * @param srcAccessTech original access technology, defined in
+ * {@link android.telephony.ServiceState}.
+ * @param targetAccessTech new access technology, defined in
+ * {@link android.telephony.ServiceState}.
+ * @param reasonInfo The {@link ImsReasonInfo} associated with this handover.
+ */
+ public void callSessionHandover(int srcAccessTech, int targetAccessTech,
+ ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionHandover(srcAccessTech, targetAccessTech, reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The IMS call session's access technology change has failed..
+ *
+ * @param srcAccessTech original access technology
+ * @param targetAccessTech new access technology
+ * @param reasonInfo An {@link ImsReasonInfo} detailing the reason for the failure.
+ */
+ public void callSessionHandoverFailed(int srcAccessTech, int targetAccessTech,
+ ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionHandoverFailed(srcAccessTech, targetAccessTech, reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The TTY mode has been changed by the remote party.
+ *
+ * @param mode one of the following: -
+ * {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} -
+ * {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} -
+ * {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} -
+ * {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
+ */
+ public void callSessionTtyModeReceived(int mode) {
+ try {
+ mListener.callSessionTtyModeReceived(mode);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * The multiparty state has been changed for this {@code ImsCallSession}.
+ *
+ * @param isMultiParty {@code true} if the session became multiparty, {@code false} otherwise.
+ */
+ public void callSessionMultipartyStateChanged(boolean isMultiParty) {
+ try {
+ mListener.callSessionMultipartyStateChanged(isMultiParty);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Supplementary service information has been received for the current IMS call session.
+ *
+ * @param suppSrvNotification The {@link ImsSuppServiceNotification} containing the change.
+ */
+ public void callSessionSuppServiceReceived(ImsSuppServiceNotification suppSrvNotification)
+ {
+ try {
+ mListener.callSessionSuppServiceReceived(suppSrvNotification);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * An RTT modify request has been received from the remote party.
+ *
+ * @param callProfile An {@link ImsCallProfile} with the updated attributes
+ */
+ public void callSessionRttModifyRequestReceived(ImsCallProfile callProfile)
+ {
+ try {
+ mListener.callSessionRttModifyRequestReceived(callProfile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * An RTT modify response has been received.
+ *
+ * @param status the received response for RTT modify request.
+ */
+ public void callSessionRttModifyResponseReceived(int status) {
+ try {
+ mListener.callSessionRttModifyResponseReceived(status);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * An RTT message has been received from the remote party.
+ *
+ * @param rttMessage The RTT message that has been received.
+ */
+ public void callSessionRttMessageReceived(String rttMessage) {
+ try {
+ mListener.callSessionRttMessageReceived(rttMessage);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
+
diff --git a/telephony/java/com/android/ims/ImsConferenceState.aidl b/telephony/java/android/telephony/ims/ImsConferenceState.aidl
similarity index 95%
rename from telephony/java/com/android/ims/ImsConferenceState.aidl
rename to telephony/java/android/telephony/ims/ImsConferenceState.aidl
index 2fc029f..e2b371c 100644
--- a/telephony/java/com/android/ims/ImsConferenceState.aidl
+++ b/telephony/java/android/telephony/ims/ImsConferenceState.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsConferenceState;
diff --git a/telephony/java/com/android/ims/ImsConferenceState.java b/telephony/java/android/telephony/ims/ImsConferenceState.java
similarity index 95%
rename from telephony/java/com/android/ims/ImsConferenceState.java
rename to telephony/java/android/telephony/ims/ImsConferenceState.java
index 0afde88..66d2f8d 100644
--- a/telephony/java/com/android/ims/ImsConferenceState.java
+++ b/telephony/java/android/telephony/ims/ImsConferenceState.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -11,16 +11,17 @@
* 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.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Set;
+import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -32,7 +33,8 @@
*
* @hide
*/
-public class ImsConferenceState implements Parcelable {
+@SystemApi
+public final class ImsConferenceState implements Parcelable {
/**
* conference-info : user
*/
@@ -87,12 +89,13 @@
*/
public static final String SIP_STATUS_CODE = "sipstatuscode";
- public HashMap<String, Bundle> mParticipants = new HashMap<String, Bundle>();
+ public final HashMap<String, Bundle> mParticipants = new HashMap<String, Bundle>();
+ /** @hide */
public ImsConferenceState() {
}
- public ImsConferenceState(Parcel in) {
+ private ImsConferenceState(Parcel in) {
readFromParcel(in);
}
diff --git a/telephony/java/com/android/ims/ImsExternalCallState.aidl b/telephony/java/android/telephony/ims/ImsExternalCallState.aidl
similarity index 95%
rename from telephony/java/com/android/ims/ImsExternalCallState.aidl
rename to telephony/java/android/telephony/ims/ImsExternalCallState.aidl
index c208702..99d29356 100644
--- a/telephony/java/com/android/ims/ImsExternalCallState.aidl
+++ b/telephony/java/android/telephony/ims/ImsExternalCallState.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsExternalCallState;
diff --git a/telephony/java/com/android/ims/ImsExternalCallState.java b/telephony/java/android/telephony/ims/ImsExternalCallState.java
similarity index 92%
rename from telephony/java/com/android/ims/ImsExternalCallState.java
rename to telephony/java/android/telephony/ims/ImsExternalCallState.java
index da26073..e82c115 100644
--- a/telephony/java/com/android/ims/ImsExternalCallState.java
+++ b/telephony/java/android/telephony/ims/ImsExternalCallState.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 The Android Open Source Project
+ * 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.
@@ -11,11 +11,12 @@
* 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.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -32,7 +33,8 @@
* Parcelable object to handle MultiEndpoint Dialog Information
* @hide
*/
-public class ImsExternalCallState implements Parcelable {
+@SystemApi
+public final class ImsExternalCallState implements Parcelable {
private static final String TAG = "ImsExternalCallState";
@@ -50,9 +52,11 @@
private int mCallType;
private boolean mIsHeld;
+ /** @hide */
public ImsExternalCallState() {
}
+ /** @hide */
public ImsExternalCallState(int callId, Uri address, boolean isPullable, int callState,
int callType, boolean isCallheld) {
mCallId = callId;
@@ -64,6 +68,7 @@
Rlog.d(TAG, "ImsExternalCallState = " + this);
}
+ /** @hide */
public ImsExternalCallState(Parcel in) {
mCallId = in.readInt();
ClassLoader classLoader = ImsExternalCallState.class.getClassLoader();
diff --git a/telephony/java/com/android/ims/ImsReasonInfo.aidl b/telephony/java/android/telephony/ims/ImsReasonInfo.aidl
similarity index 95%
rename from telephony/java/com/android/ims/ImsReasonInfo.aidl
rename to telephony/java/android/telephony/ims/ImsReasonInfo.aidl
index 17e6d3a..604b323 100644
--- a/telephony/java/com/android/ims/ImsReasonInfo.aidl
+++ b/telephony/java/android/telephony/ims/ImsReasonInfo.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsReasonInfo;
diff --git a/telephony/java/com/android/ims/ImsReasonInfo.java b/telephony/java/android/telephony/ims/ImsReasonInfo.java
similarity index 78%
rename from telephony/java/com/android/ims/ImsReasonInfo.java
rename to telephony/java/android/telephony/ims/ImsReasonInfo.java
index 4f6f68c..e70e633 100644
--- a/telephony/java/com/android/ims/ImsReasonInfo.java
+++ b/telephony/java/android/telephony/ims/ImsReasonInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -11,11 +11,12 @@
* 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.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,7 +25,8 @@
*
* @hide
*/
-public class ImsReasonInfo implements Parcelable {
+@SystemApi
+public final class ImsReasonInfo implements Parcelable {
/**
* Specific code of each types
@@ -384,6 +386,173 @@
/** Call/IMS registration is failed/dropped because of a network detach */
public static final int CODE_NETWORK_DETACH = 1513;
+ /**
+ * Call failed due to SIP code 380 (Alternative Service response) while dialing an "undetected
+ * emergency number". This scenario is important in some regions where the carrier network will
+ * identify other non-emergency help numbers (e.g. mountain rescue) when attempting to dial.
+ */
+ public static final int CODE_SIP_ALTERNATE_EMERGENCY_CALL = 1514;
+
+ /**
+ * Call failed because of unobtainable number
+ * @hide
+ */
+ public static final int CODE_UNOBTAINABLE_NUMBER = 1515;
+
+ /**
+ * The rejection cause is not known.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_UNKNOWN = 1600;
+
+ /**
+ * Ongoing call, and call waiting is disabled.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_ONGOING_CALL_WAITING_DISABLED = 1601;
+
+ /**
+ * A call is ongoing on another sub.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_CALL_ON_OTHER_SUB = 1602;
+
+ /**
+ * CDMA call collision.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_1X_COLLISION = 1603;
+
+ /**
+ * IMS is not registered for service yet.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_SERVICE_NOT_REGISTERED = 1604;
+
+ /**
+ * The call type is not allowed on the current RAT.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_CALL_TYPE_NOT_ALLOWED = 1605;
+
+ /**
+ * And emergency call is ongoing.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_ONGOING_E911_CALL = 1606;
+
+ /**
+ * Another call is in the process of being establilshed.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_ONGOING_CALL_SETUP = 1607;
+
+ /**
+ * Maximum number of allowed calls are already in progress.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_MAX_CALL_LIMIT_REACHED = 1608;
+
+ /**
+ * Invalid/unsupported SIP headers received.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_UNSUPPORTED_SIP_HEADERS = 1609;
+
+ /**
+ * Invalid/unsupported SDP headers received.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_UNSUPPORTED_SDP_HEADERS = 1610;
+
+ /**
+ * A call transfer is in progress.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_ONGOING_CALL_TRANSFER = 1611;
+
+ /**
+ * An internal error occured while processing the call.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_INTERNAL_ERROR = 1612;
+
+ /**
+ * Call failure due to lack of dedicated bearer.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_QOS_FAILURE = 1613;
+
+ /**
+ * A call handover is in progress.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_ONGOING_HANDOVER = 1614;
+
+ /**
+ * Video calling not supported with TTY.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_VT_TTY_NOT_ALLOWED = 1615;
+
+ /**
+ * A call upgrade is in progress.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_ONGOING_CALL_UPGRADE = 1616;
+
+ /**
+ * Call from conference server, when TTY mode is ON.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_CONFERENCE_TTY_NOT_ALLOWED = 1617;
+
+ /**
+ * A conference call is ongoing.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_ONGOING_CONFERENCE_CALL = 1618;
+
+ /**
+ * A video call with AVPF is not supported.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_VT_AVPF_NOT_ALLOWED = 1619;
+
+ /**
+ * And encrypted call is ongoing; other calls not supported.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_ONGOING_ENCRYPTED_CALL = 1620;
+
+ /**
+ * A CS call is ongoing.
+ * <p>
+ * Used with implicit call rejection.
+ */
+ public static final int CODE_REJECT_ONGOING_CS_CALL = 1621;
+
/* OEM specific error codes. To be used by OEMs when they don't want to
reveal error code which would be replaced by ERROR_UNSPECIFIED */
public static final int CODE_OEM_CAUSE_1 = 0xf001;
@@ -411,27 +580,36 @@
// For main reason code
+ /** @hide */
public int mCode;
// For the extra code value; it depends on the code value.
+ /** @hide */
public int mExtraCode;
// For the additional message of the reason info.
+ /** @hide */
public String mExtraMessage;
+
+ /** @hide */
public ImsReasonInfo() {
mCode = CODE_UNSPECIFIED;
mExtraCode = CODE_UNSPECIFIED;
mExtraMessage = null;
}
- public ImsReasonInfo(Parcel in) {
- readFromParcel(in);
+ private ImsReasonInfo(Parcel in) {
+ mCode = in.readInt();
+ mExtraCode = in.readInt();
+ mExtraMessage = in.readString();
}
+ /** @hide */
public ImsReasonInfo(int code, int extraCode) {
mCode = code;
mExtraCode = extraCode;
mExtraMessage = null;
}
+ /** @hide */
public ImsReasonInfo(int code, int extraCode, String extraMessage) {
mCode = code;
mExtraCode = extraCode;
@@ -480,12 +658,6 @@
out.writeString(mExtraMessage);
}
- private void readFromParcel(Parcel in) {
- mCode = in.readInt();
- mExtraCode = in.readInt();
- mExtraMessage = in.readString();
- }
-
public static final Creator<ImsReasonInfo> CREATOR = new Creator<ImsReasonInfo>() {
@Override
public ImsReasonInfo createFromParcel(Parcel in) {
diff --git a/telephony/java/android/telephony/ims/ImsService.java b/telephony/java/android/telephony/ims/ImsService.java
index aaa0f08..c008711 100644
--- a/telephony/java/android/telephony/ims/ImsService.java
+++ b/telephony/java/android/telephony/ims/ImsService.java
@@ -16,25 +16,28 @@
package android.telephony.ims;
-import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.telephony.CarrierConfigManager;
+import android.telephony.ims.aidl.IImsConfig;
+import android.telephony.ims.aidl.IImsMmTelFeature;
+import android.telephony.ims.aidl.IImsRcsFeature;
+import android.telephony.ims.aidl.IImsRegistration;
+import android.telephony.ims.aidl.IImsServiceController;
+import android.telephony.ims.aidl.IImsServiceControllerListener;
import android.telephony.ims.feature.ImsFeature;
-import android.telephony.ims.feature.MMTelFeature;
+import android.telephony.ims.feature.MmTelFeature;
import android.telephony.ims.feature.RcsFeature;
+import android.telephony.ims.stub.ImsConfigImplBase;
+import android.telephony.ims.stub.ImsFeatureConfiguration;
import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.util.Log;
import android.util.SparseArray;
import com.android.ims.internal.IImsFeatureStatusCallback;
-import com.android.ims.internal.IImsMMTelFeature;
-import com.android.ims.internal.IImsRcsFeature;
-import com.android.ims.internal.IImsRegistration;
-import com.android.ims.internal.IImsServiceController;
import com.android.internal.annotations.VisibleForTesting;
import static android.Manifest.permission.MODIFY_PHONE_STATE;
@@ -48,9 +51,7 @@
* ...
* <service android:name=".EgImsService"
* android:permission="android.permission.BIND_IMS_SERVICE" >
- * <!-- Apps must declare which features they support as metadata. The different categories are
- * defined below. In this example, the RCS_FEATURE feature is supported. -->
- * <meta-data android:name="android.telephony.ims.RCS_FEATURE" android:value="true" />
+ * ...
* <intent-filter>
* <action android:name="android.telephony.ims.ImsService" />
* </intent-filter>
@@ -64,13 +65,31 @@
* 2) Defined as a Carrier Provided ImsService in the Carrier Configuration using
* {@link CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING}.
*
+ * There are two ways to define to the platform which {@link ImsFeature}s this {@link ImsService}
+ * supports, dynamic or static definitions.
+ *
+ * In the static definition, the {@link ImsFeature}s that are supported are defined in the service
+ * definition of the AndroidManifest.xml file as metadata:
+ * <!-- Apps must declare which features they support as metadata. The different categories are
+ * defined below. In this example, the MMTEL_FEATURE feature is supported. -->
+ * <meta-data android:name="android.telephony.ims.MMTEL_FEATURE" android:value="true" />
+ *
* The features that are currently supported in an ImsService are:
* - RCS_FEATURE: This ImsService implements the RcsFeature class.
- * - MMTEL_FEATURE: This ImsService implements the MMTelFeature class.
- * - EMERGENCY_MMTEL_FEATURE: This ImsService implements the MMTelFeature class and will be
- * available to place emergency calls at all times. This MUST be implemented by the default
- * ImsService provided in the device overlay.
- * @hide
+ * - MMTEL_FEATURE: This ImsService implements the MmTelFeature class.
+ * - EMERGENCY_MMTEL_FEATURE: This ImsService supports Emergency Calling for MMTEL, must be
+ * declared along with the MMTEL_FEATURE. If this is not specified, the framework will use
+ * circuit switch for emergency calling.
+ *
+ * In the dynamic definition, the supported features are not specified in the service definition
+ * of the AndroidManifest. Instead, the framework binds to this service and calls
+ * {@link #querySupportedImsFeatures()}. The {@link ImsService} then returns an
+ * {@link ImsFeatureConfiguration}, which the framework uses to initialize the supported
+ * {@link ImsFeature}s. If at any time, the list of supported {@link ImsFeature}s changes,
+ * {@link #onUpdateSupportedImsFeatures(ImsFeatureConfiguration)} can be called to tell the
+ * framework of the changes.
+ *
+ * @hide
*/
@SystemApi
public class ImsService extends Service {
@@ -89,20 +108,36 @@
// call ImsFeature#onFeatureRemoved.
private final SparseArray<SparseArray<ImsFeature>> mFeaturesBySlot = new SparseArray<>();
+ private IImsServiceControllerListener mListener;
+
+
+ /**
+ * Listener that notifies the framework of ImsService changes.
+ * @hide
+ */
+ public static class Listener extends IImsServiceControllerListener.Stub {
+ /**
+ * The IMS features that this ImsService supports has changed.
+ * @param c a new {@link ImsFeatureConfiguration} containing {@link ImsFeature.FeatureType}s
+ * that this ImsService supports. This may trigger the addition/removal of feature
+ * in this service.
+ */
+ public void onUpdateSupportedImsFeatures(ImsFeatureConfiguration c) {
+ }
+ }
+
/**
* @hide
*/
protected final IBinder mImsServiceController = new IImsServiceController.Stub() {
-
@Override
- public IImsMMTelFeature createEmergencyMMTelFeature(int slotId,
- IImsFeatureStatusCallback c) {
- return createEmergencyMMTelFeatureInternal(slotId, c);
+ public void setListener(IImsServiceControllerListener l) {
+ mListener = l;
}
@Override
- public IImsMMTelFeature createMMTelFeature(int slotId, IImsFeatureStatusCallback c) {
- return createMMTelFeatureInternal(slotId, c);
+ public IImsMmTelFeature createMmTelFeature(int slotId, IImsFeatureStatusCallback c) {
+ return createMmTelFeatureInternal(slotId, c);
}
@Override
@@ -111,16 +146,41 @@
}
@Override
- public void removeImsFeature(int slotId, int featureType, IImsFeatureStatusCallback c)
- throws RemoteException {
+ public void removeImsFeature(int slotId, int featureType, IImsFeatureStatusCallback c) {
ImsService.this.removeImsFeature(slotId, featureType, c);
}
@Override
- public IImsRegistration getRegistration(int slotId) throws RemoteException {
+ public ImsFeatureConfiguration querySupportedImsFeatures() {
+ return ImsService.this.querySupportedImsFeatures();
+ }
+
+ @Override
+ public void notifyImsServiceReadyForFeatureCreation() {
+ ImsService.this.readyForFeatureCreation();
+ }
+
+ @Override
+ public IImsConfig getConfig(int slotId) {
+ ImsConfigImplBase c = ImsService.this.getConfig(slotId);
+ return c != null ? c.getIImsConfig() : null;
+ }
+
+ @Override
+ public IImsRegistration getRegistration(int slotId) {
ImsRegistrationImplBase r = ImsService.this.getRegistration(slotId);
return r != null ? r.getBinder() : null;
}
+
+ @Override
+ public void enableIms(int slotId) {
+ ImsService.this.enableIms(slotId);
+ }
+
+ @Override
+ public void disableIms(int slotId) {
+ ImsService.this.disableIms(slotId);
+ }
};
/**
@@ -143,47 +203,35 @@
return mFeaturesBySlot.get(slotId);
}
- private IImsMMTelFeature createEmergencyMMTelFeatureInternal(int slotId,
+ private IImsMmTelFeature createMmTelFeatureInternal(int slotId,
IImsFeatureStatusCallback c) {
- MMTelFeature f = onCreateEmergencyMMTelImsFeature(slotId);
+ MmTelFeature f = createMmTelFeature(slotId);
if (f != null) {
- setupFeature(f, slotId, ImsFeature.EMERGENCY_MMTEL, c);
+ setupFeature(f, slotId, ImsFeature.FEATURE_MMTEL, c);
return f.getBinder();
} else {
- return null;
- }
- }
-
- private IImsMMTelFeature createMMTelFeatureInternal(int slotId,
- IImsFeatureStatusCallback c) {
- MMTelFeature f = onCreateMMTelImsFeature(slotId);
- if (f != null) {
- setupFeature(f, slotId, ImsFeature.MMTEL, c);
- return f.getBinder();
- } else {
+ Log.e(LOG_TAG, "createMmTelFeatureInternal: null feature returned.");
return null;
}
}
private IImsRcsFeature createRcsFeatureInternal(int slotId,
IImsFeatureStatusCallback c) {
- RcsFeature f = onCreateRcsFeature(slotId);
+ RcsFeature f = createRcsFeature(slotId);
if (f != null) {
- setupFeature(f, slotId, ImsFeature.RCS, c);
+ setupFeature(f, slotId, ImsFeature.FEATURE_RCS, c);
return f.getBinder();
} else {
+ Log.e(LOG_TAG, "createRcsFeatureInternal: null feature returned.");
return null;
}
}
private void setupFeature(ImsFeature f, int slotId, int featureType,
IImsFeatureStatusCallback c) {
- f.setContext(this);
- f.setSlotId(slotId);
f.addImsFeatureStatusCallback(c);
+ f.initialize(this, slotId);
addImsFeature(slotId, featureType, f);
- // TODO: Remove once new onFeatureReady AIDL is merged in.
- f.onFeatureReady();
}
private void addImsFeature(int slotId, int featureType, ImsFeature f) {
@@ -222,37 +270,102 @@
}
/**
- * @return An implementation of MMTelFeature that will be used by the system for MMTel
- * functionality. Must be able to handle emergency calls at any time as well.
- * @hide
+ * When called, provide the {@link ImsFeatureConfiguration} that this {@link ImsService}
+ * currently supports. This will trigger the framework to set up the {@link ImsFeature}s that
+ * correspond to the {@link ImsFeature}s configured here.
+ *
+ * Use {@link #onUpdateSupportedImsFeatures(ImsFeatureConfiguration)} to change the supported
+ * {@link ImsFeature}s.
+ *
+ * @return an {@link ImsFeatureConfiguration} containing Features this ImsService supports.
*/
- public @Nullable MMTelFeature onCreateEmergencyMMTelImsFeature(int slotId) {
+ public ImsFeatureConfiguration querySupportedImsFeatures() {
+ // Return empty for base implementation
+ return new ImsFeatureConfiguration();
+ }
+
+ /**
+ * Updates the framework with a new {@link ImsFeatureConfiguration} containing the updated
+ * features, that this {@link ImsService} supports. This may trigger the framework to add/remove
+ * new ImsFeatures, depending on the configuration.
+ */
+ public final void onUpdateSupportedImsFeatures(ImsFeatureConfiguration c)
+ throws RemoteException {
+ if (mListener == null) {
+ throw new IllegalStateException("Framework is not ready");
+ }
+ mListener.onUpdateSupportedImsFeatures(c);
+ }
+
+ /**
+ * The ImsService has been bound and is ready for ImsFeature creation based on the Features that
+ * the ImsService has registered for with the framework, either in the manifest or via
+ * {@link #querySupportedImsFeatures()}.
+ *
+ * The ImsService should use this signal instead of onCreate/onBind or similar to perform
+ * feature initialization because the framework may bind to this service multiple times to
+ * query the ImsService's {@link ImsFeatureConfiguration} via
+ * {@link #querySupportedImsFeatures()}before creating features.
+ */
+ public void readyForFeatureCreation() {
+ }
+
+ /**
+ * The framework has enabled IMS for the slot specified, the ImsService should register for IMS
+ * and perform all appropriate initialization to bring up all ImsFeatures.
+ */
+ public void enableIms(int slotId) {
+ }
+
+ /**
+ * The framework has disabled IMS for the slot specified. The ImsService must deregister for IMS
+ * and set capability status to false for all ImsFeatures.
+ */
+ public void disableIms(int slotId) {
+ }
+
+ /**
+ * When called, the framework is requesting that a new {@link MmTelFeature} is created for the
+ * specified slot.
+ *
+ * @param slotId The slot ID that the MMTEL Feature is being created for.
+ * @return The newly created {@link MmTelFeature} associated with the slot or null if the
+ * feature is not supported.
+ */
+ public MmTelFeature createMmTelFeature(int slotId) {
return null;
}
/**
- * @return An implementation of MMTelFeature that will be used by the system for MMTel
- * functionality.
- * @hide
+ * When called, the framework is requesting that a new {@link RcsFeature} is created for the
+ * specified slot.
+ *
+ * @param slotId The slot ID that the RCS Feature is being created for.
+ * @return The newly created {@link RcsFeature} associated with the slot or null if the feature
+ * is not supported.
*/
- public @Nullable MMTelFeature onCreateMMTelImsFeature(int slotId) {
+ public RcsFeature createRcsFeature(int slotId) {
return null;
}
/**
- * @return An implementation of RcsFeature that will be used by the system for RCS.
- * @hide
+ * Return the {@link ImsConfigImplBase} implementation associated with the provided slot. This
+ * will be used by the platform to get/set specific IMS related configurations.
+ *
+ * @param slotId The slot that the IMS configuration is associated with.
+ * @return ImsConfig implementation that is associated with the specified slot.
*/
- public @Nullable RcsFeature onCreateRcsFeature(int slotId) {
- return null;
+ public ImsConfigImplBase getConfig(int slotId) {
+ return new ImsConfigImplBase();
}
/**
+ * Return the {@link ImsRegistrationImplBase} implementation associated with the provided slot.
+ *
* @param slotId The slot that is associated with the IMS Registration.
* @return the ImsRegistration implementation associated with the slot.
- * @hide
*/
public ImsRegistrationImplBase getRegistration(int slotId) {
return new ImsRegistrationImplBase();
}
-}
+}
\ No newline at end of file
diff --git a/telephony/java/com/android/ims/ImsSsData.aidl b/telephony/java/android/telephony/ims/ImsSsData.aidl
similarity index 95%
rename from telephony/java/com/android/ims/ImsSsData.aidl
rename to telephony/java/android/telephony/ims/ImsSsData.aidl
index 33f8306..eff3a6b 100644
--- a/telephony/java/com/android/ims/ImsSsData.aidl
+++ b/telephony/java/android/telephony/ims/ImsSsData.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsSsData;
diff --git a/telephony/java/android/telephony/ims/ImsSsData.java b/telephony/java/android/telephony/ims/ImsSsData.java
new file mode 100644
index 0000000..b68055e
--- /dev/null
+++ b/telephony/java/android/telephony/ims/ImsSsData.java
@@ -0,0 +1,448 @@
+/*
+ * 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
+ */
+package android.telephony.ims;
+
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Provides STK Call Control Supplementary Service information.
+ *
+ * {@hide}
+ */
+@SystemApi
+public final class ImsSsData implements Parcelable {
+
+ // Supplementary Service Type
+ // Call Forwarding
+ public static final int SS_CFU = 0;
+ public static final int SS_CF_BUSY = 1;
+ public static final int SS_CF_NO_REPLY = 2;
+ public static final int SS_CF_NOT_REACHABLE = 3;
+ public static final int SS_CF_ALL = 4;
+ public static final int SS_CF_ALL_CONDITIONAL = 5;
+ public static final int SS_CFUT = 6;
+ // Called Line Presentation
+ public static final int SS_CLIP = 7;
+ public static final int SS_CLIR = 8;
+ public static final int SS_COLP = 9;
+ public static final int SS_COLR = 10;
+ // Calling Name Presentation
+ public static final int SS_CNAP = 11;
+ // Call Waiting
+ public static final int SS_WAIT = 12;
+ // Call Barring
+ public static final int SS_BAOC = 13;
+ public static final int SS_BAOIC = 14;
+ public static final int SS_BAOIC_EXC_HOME = 15;
+ public static final int SS_BAIC = 16;
+ public static final int SS_BAIC_ROAMING = 17;
+ public static final int SS_ALL_BARRING = 18;
+ public static final int SS_OUTGOING_BARRING = 19;
+ public static final int SS_INCOMING_BARRING = 20;
+ public static final int SS_INCOMING_BARRING_DN = 21;
+ public static final int SS_INCOMING_BARRING_ANONYMOUS = 22;
+
+ //Supplementary Service Request Types
+ public static final int SS_ACTIVATION = 0;
+ public static final int SS_DEACTIVATION = 1;
+ public static final int SS_INTERROGATION = 2;
+ public static final int SS_REGISTRATION = 3;
+ public static final int SS_ERASURE = 4;
+
+ // Supplementary Service Teleservice Type
+ public static final int SS_ALL_TELE_AND_BEARER_SERVICES = 0;
+ public static final int SS_ALL_TELESEVICES = 1;
+ public static final int SS_TELEPHONY = 2;
+ public static final int SS_ALL_DATA_TELESERVICES = 3;
+ public static final int SS_SMS_SERVICES = 4;
+ public static final int SS_ALL_TELESERVICES_EXCEPT_SMS = 5;
+
+ // Service Class of Supplementary Service
+ // See 27.007 +CCFC or +CLCK
+ /** @hide */
+ public static final int SERVICE_CLASS_NONE = 0; // no user input
+ /** @hide */
+ public static final int SERVICE_CLASS_VOICE = 1;
+ /** @hide */
+ public static final int SERVICE_CLASS_DATA = (1 << 1);
+ /** @hide */
+ public static final int SERVICE_CLASS_FAX = (1 << 2);
+ /** @hide */
+ public static final int SERVICE_CLASS_SMS = (1 << 3);
+ /** @hide */
+ public static final int SERVICE_CLASS_DATA_SYNC = (1 << 4);
+ /** @hide */
+ public static final int SERVICE_CLASS_DATA_ASYNC = (1 << 5);
+ /** @hide */
+ public static final int SERVICE_CLASS_PACKET = (1 << 6);
+ /** @hide */
+ public static final int SERVICE_CLASS_PAD = (1 << 7);
+
+ /**
+ * Result code used if the operation was successful. See {@link #result}.
+ * @hide
+ */
+ public static final int RESULT_SUCCESS = 0;
+
+ /** @hide */
+ @IntDef(flag = true, prefix = { "SS_" }, value = {
+ SS_CFU,
+ SS_CF_BUSY,
+ SS_CF_NO_REPLY,
+ SS_CF_NOT_REACHABLE,
+ SS_CF_ALL,
+ SS_CF_ALL_CONDITIONAL,
+ SS_CFUT,
+ SS_CLIP,
+ SS_CLIR,
+ SS_COLP,
+ SS_COLR,
+ SS_CNAP,
+ SS_WAIT,
+ SS_BAOC,
+ SS_BAOIC,
+ SS_BAOIC_EXC_HOME,
+ SS_BAIC,
+ SS_BAIC_ROAMING,
+ SS_ALL_BARRING,
+ SS_OUTGOING_BARRING,
+ SS_INCOMING_BARRING,
+ SS_INCOMING_BARRING_DN,
+ SS_INCOMING_BARRING_ANONYMOUS
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ServiceType{}
+
+ /** @hide */
+ @IntDef(flag = true, prefix = { "SERVICE_CLASS" }, value = {
+ SERVICE_CLASS_NONE,
+ SERVICE_CLASS_VOICE,
+ SERVICE_CLASS_DATA,
+ SERVICE_CLASS_FAX,
+ SERVICE_CLASS_SMS,
+ SERVICE_CLASS_DATA_SYNC,
+ SERVICE_CLASS_DATA_ASYNC,
+ SERVICE_CLASS_PACKET,
+ SERVICE_CLASS_PAD
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ServiceClass{}
+
+ /**
+ * The Service type of this Supplementary service. Valid values include:
+ * SS_CFU,
+ * SS_CF_BUSY,
+ * SS_CF_NO_REPLY,
+ * SS_CF_NOT_REACHABLE,
+ * SS_CF_ALL,
+ * SS_CF_ALL_CONDITIONAL,
+ * SS_CFUT,
+ * SS_CLIP,
+ * SS_CLIR,
+ * SS_COLP,
+ * SS_COLR,
+ * SS_CNAP,
+ * SS_WAIT,
+ * SS_BAOC,
+ * SS_BAOIC,
+ * SS_BAOIC_EXC_HOME,
+ * SS_BAIC,
+ * SS_BAIC_ROAMING,
+ * SS_ALL_BARRING,
+ * SS_OUTGOING_BARRING,
+ * SS_INCOMING_BARRING,
+ * SS_INCOMING_BARRING_DN,
+ * SS_INCOMING_BARRING_ANONYMOUS
+ *
+ * @hide
+ */
+ // TODO: Make final, do not modify this field directly!
+ public int serviceType;
+
+ /**
+ * Supplementary Service request Type. Valid values are:
+ * SS_ACTIVATION,
+ * SS_DEACTIVATION,
+ * SS_INTERROGATION,
+ * SS_REGISTRATION,
+ * SS_ERASURE
+ *
+ * @hide
+ */
+ // TODO: Make final, do not modify this field directly!
+ public int requestType;
+
+ /**
+ * Supplementary Service teleservice type:
+ * SS_TELESERVICE_ALL_TELE_AND_BEARER,
+ * SS_TELESERVICE_ALL_TELESEVICES,
+ * SS_TELESERVICE_TELEPHONY,
+ * SS_TELESERVICE_ALL_DATA,
+ * SS_TELESERVICE_SMS,
+ * SS_TELESERVICE_ALL_TELESERVICES_EXCEPT_SMS
+ *
+ * @hide
+ */
+ // TODO: Make this param final! Do not try to modify this param directly.
+ public int teleserviceType;
+
+ /**
+ * Supplementary Service service class. Valid values are:
+ * SERVICE_CLASS_NONE,
+ * SERVICE_CLASS_VOICE,
+ * SERVICE_CLASS_DATA,
+ * SERVICE_CLASS_FAX,
+ * SERVICE_CLASS_SMS,
+ * SERVICE_CLASS_DATA_SYNC,
+ * SERVICE_CLASS_DATA_ASYNC,
+ * SERVICE_CLASS_PACKET,
+ * SERVICE_CLASS_PAD
+ *
+ * @hide
+ */
+ // TODO: Make this param final! Do not try to modify this param directly.
+ public int serviceClass;
+
+ /**
+ * Result of Supplementary Service operation. Valid values are:
+ * RESULT_SUCCESS if the result is success, or
+ * ImsReasonInfo code if the result is a failure.
+ *
+ * @hide
+ */
+ // TODO: Make this param final! Do not try to modify this param directly.
+ public final int result;
+
+ private int[] mSsInfo;
+ private ImsCallForwardInfo[] mCfInfo;
+ private ImsSsInfo[] mImsSsInfo;
+
+ /**
+ * Generate IMS Supplementary Service information.
+ * @param serviceType The Supplementary Service type. Valid entries:
+ * SS_CFU,
+ * SS_CF_BUSY,
+ * SS_CF_NO_REPLY,
+ * SS_CF_NOT_REACHABLE,
+ * SS_CF_ALL,
+ * SS_CF_ALL_CONDITIONAL,
+ * SS_CFUT,
+ * SS_CLIP,
+ * SS_CLIR,
+ * SS_COLP,
+ * SS_COLR,
+ * SS_CNAP,
+ * SS_WAIT,
+ * SS_BAOC,
+ * SS_BAOIC,
+ * SS_BAOIC_EXC_HOME,
+ * SS_BAIC,
+ * SS_BAIC_ROAMING,
+ * SS_ALL_BARRING,
+ * SS_OUTGOING_BARRING,
+ * SS_INCOMING_BARRING,
+ * SS_INCOMING_BARRING_DN,
+ * SS_INCOMING_BARRING_ANONYMOUS
+ * @param requestType Supplementary Service request Type. Valid values are:
+ * SS_ACTIVATION,
+ * SS_DEACTIVATION,
+ * SS_INTERROGATION,
+ * SS_REGISTRATION,
+ * SS_ERASURE
+ * @param teleserviceType Supplementary Service teleservice type:
+ * SS_TELESERVICE_ALL_TELE_AND_BEARER,
+ * SS_TELESERVICE_ALL_TELESEVICES,
+ * SS_TELESERVICE_TELEPHONY,
+ * SS_TELESERVICE_ALL_DATA,
+ * SS_TELESERVICE_SMS,
+ * SS_TELESERVICE_ALL_TELESERVICES_EXCEPT_SMS
+ * @param serviceClass Supplementary Service service class. See See 27.007 +CCFC or +CLCK.
+ * @param result Result of Supplementary Service operation. Valid values are 0 if the result is
+ * success, or ImsReasonInfo code if the result is a failure.
+ */
+ public ImsSsData(@ServiceType int serviceType, int requestType, int teleserviceType,
+ @ServiceClass int serviceClass, int result) {
+ this.serviceType = serviceType;
+ this.requestType = requestType;
+ this.teleserviceType = teleserviceType;
+ this.serviceClass = serviceClass;
+ this.result = result;
+ }
+
+ private ImsSsData(Parcel in) {
+ serviceType = in.readInt();
+ requestType = in.readInt();
+ teleserviceType = in.readInt();
+ serviceClass = in.readInt();
+ result = in.readInt();
+ mSsInfo = in.createIntArray();
+ mCfInfo = (ImsCallForwardInfo[])in.readParcelableArray(this.getClass().getClassLoader());
+ mImsSsInfo = (ImsSsInfo[])in.readParcelableArray(this.getClass().getClassLoader());
+ }
+
+ public static final Creator<ImsSsData> CREATOR = new Creator<ImsSsData>() {
+ @Override
+ public ImsSsData createFromParcel(Parcel in) {
+ return new ImsSsData(in);
+ }
+
+ @Override
+ public ImsSsData[] newArray(int size) {
+ return new ImsSsData[size];
+ }
+ };
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(serviceType);
+ out.writeInt(requestType);
+ out.writeInt(teleserviceType);
+ out.writeInt(serviceClass);
+ out.writeInt(result);
+ out.writeIntArray(mSsInfo);
+ out.writeParcelableArray(mCfInfo, 0);
+ out.writeParcelableArray(mImsSsInfo, 0);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ /**
+ * Old method, kept for compatibility. See {@link #isTypeCf()}
+ * @hide
+ */
+ public boolean isTypeCF() {
+ return (serviceType == SS_CFU || serviceType == SS_CF_BUSY ||
+ serviceType == SS_CF_NO_REPLY || serviceType == SS_CF_NOT_REACHABLE ||
+ serviceType == SS_CF_ALL || serviceType == SS_CF_ALL_CONDITIONAL);
+ }
+
+ public boolean isTypeCf() {
+ return isTypeCF();
+ }
+
+ public boolean isTypeUnConditional() {
+ return (serviceType == SS_CFU || serviceType == SS_CF_ALL);
+ }
+
+ /**
+ * Old method, kept for compatibility. See {@link #isTypeCf()}
+ * @hide
+ */
+ public boolean isTypeCW() {
+ return (serviceType == SS_WAIT);
+ }
+
+ public boolean isTypeCw() {
+ return isTypeCW();
+ }
+
+ public boolean isTypeClip() {
+ return (serviceType == SS_CLIP);
+ }
+
+ public boolean isTypeColr() {
+ return (serviceType == SS_COLR);
+ }
+
+ public boolean isTypeColp() {
+ return (serviceType == SS_COLP);
+ }
+
+ public boolean isTypeClir() {
+ return (serviceType == SS_CLIR);
+ }
+
+ public boolean isTypeIcb() {
+ return (serviceType == SS_INCOMING_BARRING_DN ||
+ serviceType == SS_INCOMING_BARRING_ANONYMOUS);
+ }
+
+ public boolean isTypeBarring() {
+ return (serviceType == SS_BAOC || serviceType == SS_BAOIC ||
+ serviceType == SS_BAOIC_EXC_HOME || serviceType == SS_BAIC ||
+ serviceType == SS_BAIC_ROAMING || serviceType == SS_ALL_BARRING ||
+ serviceType == SS_OUTGOING_BARRING || serviceType == SS_INCOMING_BARRING);
+ }
+
+ public boolean isTypeInterrogation() {
+ return (serviceType == SS_INTERROGATION);
+ }
+
+ /** @hide */
+ public void setSuppServiceInfo(int[] ssInfo) {
+ mSsInfo = ssInfo;
+ }
+
+ /** @hide */
+ public void setImsSpecificSuppServiceInfo(ImsSsInfo[] imsSsInfo) {
+ mImsSsInfo = imsSsInfo;
+ }
+
+ /** @hide */
+ public void setCallForwardingInfo(ImsCallForwardInfo[] cfInfo) {
+ mCfInfo = cfInfo;
+ }
+
+ /**
+ * This field will be null for RequestType SS_INTERROGATION
+ * and ServiceType SS_CF_*, SS_INCOMING_BARRING_DN,
+ * SS_INCOMING_BARRING_ANONYMOUS.
+ *
+ * @hide
+ */
+ public int[] getSuppServiceInfo() {
+ return mSsInfo;
+ }
+
+ /**
+ * Valid only for ServiceTypes
+ * - SS_INCOMING_BARRING_DN and
+ * - ServiceType SS_INCOMING_BARRING_ANONYMOUS.
+ * Will be null otherwise.
+ * @hide
+ */
+ public ImsSsInfo[] getImsSpecificSuppServiceInfo() {
+ return mImsSsInfo;
+ }
+
+ /**
+ * Valid only for supplementary services
+ * - ServiceType SS_CF_* and
+ * - RequestType SS_INTERROGATION.
+ * Will be null otherwise.
+ * @hide
+ **/
+ public ImsCallForwardInfo[] getCallForwardInfo() {
+ return mCfInfo;
+ }
+
+ public String toString() {
+ return "[ImsSsData] " + "ServiceType: " + serviceType
+ + " RequestType: " + requestType
+ + " TeleserviceType: " + teleserviceType
+ + " ServiceClass: " + serviceClass
+ + " Result: " + result;
+ }
+}
diff --git a/telephony/java/com/android/ims/ImsSsInfo.aidl b/telephony/java/android/telephony/ims/ImsSsInfo.aidl
similarity index 95%
rename from telephony/java/com/android/ims/ImsSsInfo.aidl
rename to telephony/java/android/telephony/ims/ImsSsInfo.aidl
index 0ac598b..66d4950 100644
--- a/telephony/java/com/android/ims/ImsSsInfo.aidl
+++ b/telephony/java/android/telephony/ims/ImsSsInfo.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsSsInfo;
diff --git a/telephony/java/com/android/ims/ImsSsInfo.java b/telephony/java/android/telephony/ims/ImsSsInfo.java
similarity index 60%
rename from telephony/java/com/android/ims/ImsSsInfo.java
rename to telephony/java/android/telephony/ims/ImsSsInfo.java
index 7acc3bf..c6f8622 100644
--- a/telephony/java/com/android/ims/ImsSsInfo.java
+++ b/telephony/java/android/telephony/ims/ImsSsInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -11,11 +11,12 @@
* 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.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,7 +25,8 @@
*
* @hide
*/
-public class ImsSsInfo implements Parcelable {
+@SystemApi
+public final class ImsSsInfo implements Parcelable {
/**
* For the status of service registration or activation/deactivation.
*/
@@ -33,13 +35,33 @@
public static final int ENABLED = 1;
// 0: disabled, 1: enabled
+ /** @hide */
+ // TODO: Make private, do not modify this field directly, use getter!
public int mStatus;
+ /** @hide */
+ // TODO: Make private, do not modify this field directly, use getter!
public String mIcbNum;
+ /**@hide*/
+ // TODO: Remove! Do not use this constructor, instead use public version.
public ImsSsInfo() {
}
- public ImsSsInfo(Parcel in) {
+ /**
+ *
+ * @param status The status of the service registration of activation/deactiviation. Valid
+ * entries include:
+ * {@link #NOT_REGISTERED},
+ * {@link #DISABLED},
+ * {@link #ENABLED}
+ * @param icbNum The Incoming barring number.
+ */
+ public ImsSsInfo(int status, String icbNum) {
+ mStatus = status;
+ mIcbNum = icbNum;
+ }
+
+ private ImsSsInfo(Parcel in) {
readFromParcel(in);
}
@@ -76,4 +98,18 @@
return new ImsSsInfo[size];
}
};
+
+ /**
+ * @return Supplementary Service Configuration status. Valid Values are:
+ * {@link #NOT_REGISTERED},
+ * {@link #DISABLED},
+ * {@link #ENABLED}
+ */
+ public int getStatus() {
+ return mStatus;
+ }
+
+ public String getIcbNum() {
+ return mIcbNum;
+ }
}
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.aidl
similarity index 95%
rename from telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
rename to telephony/java/android/telephony/ims/ImsStreamMediaProfile.aidl
index d648a35..ee321ae 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
+++ b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsStreamMediaProfile;
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.java b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java
similarity index 88%
rename from telephony/java/com/android/ims/ImsStreamMediaProfile.java
rename to telephony/java/android/telephony/ims/ImsStreamMediaProfile.java
index cfe37b5..243352b 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.java
+++ b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * 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.
@@ -11,11 +11,12 @@
* 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.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -25,7 +26,8 @@
*
* @hide
*/
-public class ImsStreamMediaProfile implements Parcelable {
+@SystemApi
+public final class ImsStreamMediaProfile implements Parcelable {
private static final String TAG = "ImsStreamMediaProfile";
/**
@@ -79,18 +81,25 @@
public static final int RTT_MODE_FULL = 1;
// Audio related information
+ /** @hide */
public int mAudioQuality;
+ /** @hide */
public int mAudioDirection;
// Video related information
+ /** @hide */
public int mVideoQuality;
+ /** @hide */
public int mVideoDirection;
// Rtt related information
+ /** @hide */
public int mRttMode;
+ /** @hide */
public ImsStreamMediaProfile(Parcel in) {
readFromParcel(in);
}
+ /** @hide */
public ImsStreamMediaProfile() {
mAudioQuality = AUDIO_QUALITY_NONE;
mAudioDirection = DIRECTION_SEND_RECEIVE;
@@ -99,6 +108,7 @@
mRttMode = RTT_MODE_DISABLED;
}
+ /** @hide */
public ImsStreamMediaProfile(int audioQuality, int audioDirection,
int videoQuality, int videoDirection) {
mAudioQuality = audioQuality;
@@ -107,6 +117,7 @@
mVideoDirection = videoDirection;
}
+ /** @hide */
public ImsStreamMediaProfile(int rttMode) {
mRttMode = rttMode;
}
@@ -178,4 +189,23 @@
mRttMode = rttMode;
}
+ public int getAudioQuality() {
+ return mAudioQuality;
+ }
+
+ public int getAudioDirection() {
+ return mAudioDirection;
+ }
+
+ public int getVideoQuality() {
+ return mVideoQuality;
+ }
+
+ public int getVideoDirection() {
+ return mVideoDirection;
+ }
+
+ public int getRttMode() {
+ return mRttMode;
+ }
}
diff --git a/telephony/java/com/android/ims/ImsSuppServiceNotification.aidl b/telephony/java/android/telephony/ims/ImsSuppServiceNotification.aidl
similarity index 95%
rename from telephony/java/com/android/ims/ImsSuppServiceNotification.aidl
rename to telephony/java/android/telephony/ims/ImsSuppServiceNotification.aidl
index 6b4479f..0552780 100644
--- a/telephony/java/com/android/ims/ImsSuppServiceNotification.aidl
+++ b/telephony/java/android/telephony/ims/ImsSuppServiceNotification.aidl
@@ -15,6 +15,6 @@
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsSuppServiceNotification;
diff --git a/telephony/java/com/android/ims/ImsSuppServiceNotification.java b/telephony/java/android/telephony/ims/ImsSuppServiceNotification.java
similarity index 76%
rename from telephony/java/com/android/ims/ImsSuppServiceNotification.java
rename to telephony/java/android/telephony/ims/ImsSuppServiceNotification.java
index faf7499..efaade8 100644
--- a/telephony/java/com/android/ims/ImsSuppServiceNotification.java
+++ b/telephony/java/android/telephony/ims/ImsSuppServiceNotification.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 The Android Open Source Project
+ * 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.
@@ -11,12 +11,13 @@
* 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.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -28,27 +29,42 @@
*
* @hide
*/
-public class ImsSuppServiceNotification implements Parcelable {
+@SystemApi
+public final class ImsSuppServiceNotification implements Parcelable {
private static final String TAG = "ImsSuppServiceNotification";
/** Type of notification: 0 = MO; 1 = MT */
- public int notificationType;
+ public final int notificationType;
/** TS 27.007 7.17 "code1" or "code2" */
- public int code;
+ public final int code;
/** TS 27.007 7.17 "index" - Not used currently*/
- public int index;
+ public final int index;
/** TS 27.007 7.17 "type" (MT only) - Not used currently */
- public int type;
+ public final int type;
/** TS 27.007 7.17 "number" (MT only) */
- public String number;
+ public final String number;
/** List of forwarded numbers, if any */
- public String[] history;
+ public final String[] history;
- public ImsSuppServiceNotification() {
+
+ public ImsSuppServiceNotification(int notificationType, int code, int index, int type,
+ String number, String[] history) {
+ this.notificationType = notificationType;
+ this.code = code;
+ this.index = index;
+ this.type = type;
+ this.number = number;
+ this.history = history;
}
+ /** @hide */
public ImsSuppServiceNotification(Parcel in) {
- readFromParcel(in);
+ notificationType = in.readInt();
+ code = in.readInt();
+ index = in.readInt();
+ type = in.readInt();
+ number = in.readString();
+ history = in.createStringArray();
}
@Override
@@ -77,15 +93,6 @@
out.writeStringArray(history);
}
- private void readFromParcel(Parcel in) {
- notificationType = in.readInt();
- code = in.readInt();
- index = in.readInt();
- type = in.readInt();
- number = in.readString();
- history = in.createStringArray();
- }
-
public static final Creator<ImsSuppServiceNotification> CREATOR =
new Creator<ImsSuppServiceNotification>() {
@Override
diff --git a/telephony/java/android/telephony/ims/ImsUtListener.java b/telephony/java/android/telephony/ims/ImsUtListener.java
new file mode 100644
index 0000000..d50a0f7
--- /dev/null
+++ b/telephony/java/android/telephony/ims/ImsUtListener.java
@@ -0,0 +1,108 @@
+/*
+ * 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
+ */
+
+package android.telephony.ims;
+
+import android.annotation.SystemApi;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.android.ims.internal.IImsUtListener;
+
+/**
+ * Base implementation of the IMS UT listener interface, which implements stubs.
+ * Override these methods to implement functionality.
+ * @hide
+ */
+// DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
+// will break other implementations of ImsUt maintained by other ImsServices.
+@SystemApi
+public class ImsUtListener {
+ private IImsUtListener mServiceInterface;
+ private static final String LOG_TAG = "ImsUtListener";
+
+ public void onUtConfigurationUpdated(int id) {
+ try {
+ mServiceInterface.utConfigurationUpdated(null, id);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationUpdated: remote exception");
+ }
+ }
+
+ public void onUtConfigurationUpdateFailed(int id, ImsReasonInfo error) {
+ try {
+ mServiceInterface.utConfigurationUpdateFailed(null, id, error);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationUpdateFailed: remote exception");
+ }
+ }
+
+ public void onUtConfigurationQueried(int id, Bundle ssInfo) {
+ try {
+ mServiceInterface.utConfigurationQueried(null, id, ssInfo);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationQueried: remote exception");
+ }
+ }
+
+ public void onUtConfigurationQueryFailed(int id, ImsReasonInfo error) {
+ try {
+ mServiceInterface.utConfigurationQueryFailed(null, id, error);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationQueryFailed: remote exception");
+ }
+ }
+
+ public void onUtConfigurationCallBarringQueried(int id, ImsSsInfo[] cbInfo) {
+ try {
+ mServiceInterface.utConfigurationCallBarringQueried(null, id, cbInfo);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationCallBarringQueried: remote exception");
+ }
+ }
+
+ public void onUtConfigurationCallForwardQueried(int id, ImsCallForwardInfo[] cfInfo) {
+ try {
+ mServiceInterface.utConfigurationCallForwardQueried(null, id, cfInfo);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationCallForwardQueried: remote exception");
+ }
+ }
+
+ public void onUtConfigurationCallWaitingQueried(int id, ImsSsInfo[] cwInfo) {
+ try {
+ mServiceInterface.utConfigurationCallWaitingQueried(null, id, cwInfo);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationCallWaitingQueried: remote exception");
+ }
+ }
+
+ public void onSupplementaryServiceIndication(ImsSsData ssData) {
+ try {
+ mServiceInterface.onSupplementaryServiceIndication(ssData);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "onSupplementaryServiceIndication: remote exception");
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public ImsUtListener(IImsUtListener serviceInterface) {
+ mServiceInterface = serviceInterface;
+ }
+}
diff --git a/telephony/java/com/android/ims/internal/ImsVideoCallProvider.java b/telephony/java/android/telephony/ims/ImsVideoCallProvider.java
similarity index 97%
rename from telephony/java/com/android/ims/internal/ImsVideoCallProvider.java
rename to telephony/java/android/telephony/ims/ImsVideoCallProvider.java
index 432dc39..b4f60b9 100644
--- a/telephony/java/com/android/ims/internal/ImsVideoCallProvider.java
+++ b/telephony/java/android/telephony/ims/ImsVideoCallProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -14,8 +14,9 @@
* limitations under the License
*/
-package com.android.ims.internal;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
@@ -26,11 +27,14 @@
import android.telecom.VideoProfile.CameraCapabilities;
import android.view.Surface;
+import com.android.ims.internal.IImsVideoCallCallback;
+import com.android.ims.internal.IImsVideoCallProvider;
import com.android.internal.os.SomeArgs;
/**
* @hide
*/
+@SystemApi
public abstract class ImsVideoCallProvider {
private static final int MSG_SET_CALLBACK = 1;
private static final int MSG_SET_CAMERA = 2;
@@ -173,6 +177,7 @@
/**
* Returns binder object which can be used across IPC methods.
+ * @hide
*/
public final IImsVideoCallProvider getInterface() {
return mBinder;
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsCallSessionListener.aidl b/telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl
similarity index 94%
rename from telephony/java/android/telephony/ims/internal/aidl/IImsCallSessionListener.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl
index 2fb6744..f25b4b1 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsCallSessionListener.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony.ims.aidl;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsConferenceState;
+import android.telephony.ims.ImsStreamMediaProfile;
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsConferenceState;
import com.android.ims.internal.IImsCallSession;
-import com.android.ims.ImsSuppServiceNotification;
+import android.telephony.ims.ImsSuppServiceNotification;
/**
* A listener type for receiving notification on IMS call session events.
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsCapabilityCallback.aidl b/telephony/java/android/telephony/ims/aidl/IImsCapabilityCallback.aidl
similarity index 95%
rename from telephony/java/android/telephony/ims/internal/aidl/IImsCapabilityCallback.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsCapabilityCallback.aidl
index fd2eb24..c755703 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsCapabilityCallback.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsCapabilityCallback.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony.ims.aidl;
/**
* See ImsFeature#CapabilityCallback for more information.
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsConfig.aidl b/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl
similarity index 91%
rename from telephony/java/android/telephony/ims/internal/aidl/IImsConfig.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsConfig.aidl
index 3d424a3..4433c1c 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsConfig.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl
@@ -15,9 +15,9 @@
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony.ims.aidl;
-import android.telephony.ims.internal.aidl.IImsConfigCallback;
+import android.telephony.ims.aidl.IImsConfigCallback;
import com.android.ims.ImsConfigListener;
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsConfigCallback.aidl b/telephony/java/android/telephony/ims/aidl/IImsConfigCallback.aidl
similarity index 94%
rename from telephony/java/android/telephony/ims/internal/aidl/IImsConfigCallback.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsConfigCallback.aidl
index 52efd23..2b3f1ca 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsConfigCallback.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsConfigCallback.aidl
@@ -15,7 +15,7 @@
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony.ims.aidl;
/**
* Provides callback interface for ImsConfig when a value has changed.
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl b/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl
similarity index 69%
rename from telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl
index d976686..b9a6b3c 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl
@@ -14,16 +14,15 @@
* limitations under the License.
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony.ims.aidl;
import android.os.Message;
-import android.telephony.ims.internal.aidl.IImsMmTelListener;
-import android.telephony.ims.internal.aidl.IImsSmsListener;
-import android.telephony.ims.internal.aidl.IImsCapabilityCallback;
-import android.telephony.ims.internal.aidl.IImsCallSessionListener;
-import android.telephony.ims.internal.feature.CapabilityChangeRequest;
+import android.telephony.ims.aidl.IImsMmTelListener;
+import android.telephony.ims.aidl.IImsSmsListener;
+import android.telephony.ims.aidl.IImsCapabilityCallback;
+import android.telephony.ims.feature.CapabilityChangeRequest;
-import com.android.ims.ImsCallProfile;
+import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsEcbm;
import com.android.ims.internal.IImsMultiEndpoint;
@@ -31,14 +30,15 @@
import com.android.ims.internal.IImsUt;
/**
- * See SmsImplBase for more information.
+ * See MmTelFeature for more information.
* {@hide}
*/
interface IImsMmTelFeature {
void setListener(IImsMmTelListener l);
int getFeatureState();
ImsCallProfile createCallProfile(int callSessionType, int callType);
- IImsCallSession createCallSession(in ImsCallProfile profile, IImsCallSessionListener listener);
+ IImsCallSession createCallSession(in ImsCallProfile profile);
+ int shouldProcessCall(in String[] uris);
IImsUt getUtInterface();
IImsEcbm getEcbmInterface();
void setUiTtyMode(int uiTtyMode, in Message onCompleteMessage);
@@ -52,8 +52,10 @@
IImsCapabilityCallback c);
// SMS APIs
void setSmsListener(IImsSmsListener l);
- oneway void sendSms(int messageRef, String format, String smsc, boolean retry, in byte[] pdu);
- oneway void acknowledgeSms(int messageRef, int result);
- oneway void acknowledgeSmsReport(int messageRef, int result);
+ oneway void sendSms(in int token, int messageRef, String format, String smsc, boolean retry,
+ in byte[] pdu);
+ oneway void acknowledgeSms(int token, int messageRef, int result);
+ oneway void acknowledgeSmsReport(int token, int messageRef, int result);
String getSmsFormat();
+ oneway void onSmsReady();
}
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsMmTelListener.aidl b/telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl
similarity index 73%
rename from telephony/java/android/telephony/ims/internal/aidl/IImsMmTelListener.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl
index 43f5098..7bbe30a 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsMmTelListener.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl
@@ -14,7 +14,12 @@
* limitations under the License.
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony.ims.aidl;
+
+import android.os.Bundle;
+
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsReasonInfo;
import com.android.ims.internal.IImsCallSession;
@@ -23,6 +28,7 @@
* {@hide}
*/
oneway interface IImsMmTelListener {
- void onIncomingCall(IImsCallSession c);
+ void onIncomingCall(IImsCallSession c, in Bundle extras);
+ void onRejectedCall(in ImsCallProfile callProfile, in ImsReasonInfo reason);
void onVoiceMessageCountUpdate(int count);
-}
\ No newline at end of file
+}
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl b/telephony/java/android/telephony/ims/aidl/IImsRcsFeature.aidl
similarity index 94%
rename from telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsRcsFeature.aidl
index f6005b6..691cfba 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsRcsFeature.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony.ims.aidl;
/**
* See RcsFeature for more information.
diff --git a/telephony/java/com/android/ims/internal/IImsRegistration.aidl b/telephony/java/android/telephony/ims/aidl/IImsRegistration.aidl
similarity index 90%
rename from telephony/java/com/android/ims/internal/IImsRegistration.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsRegistration.aidl
index 6de264e..4ae0a75 100644
--- a/telephony/java/com/android/ims/internal/IImsRegistration.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsRegistration.aidl
@@ -15,9 +15,9 @@
*/
-package com.android.ims.internal;
+package android.telephony.ims.aidl;
-import com.android.ims.internal.IImsRegistrationCallback;
+import android.telephony.ims.aidl.IImsRegistrationCallback;
/**
* See ImsRegistration for more information.
diff --git a/telephony/java/com/android/ims/internal/IImsRegistrationCallback.aidl b/telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl
similarity index 87%
rename from telephony/java/com/android/ims/internal/IImsRegistrationCallback.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl
index 5f21167..4f37caa 100644
--- a/telephony/java/com/android/ims/internal/IImsRegistrationCallback.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl
@@ -15,12 +15,12 @@
*/
-package com.android.ims.internal;
+package android.telephony.ims.aidl;
import android.net.Uri;
-import android.telephony.ims.internal.stub.ImsFeatureConfiguration;
+import android.telephony.ims.stub.ImsFeatureConfiguration;
-import com.android.ims.ImsReasonInfo;
+import android.telephony.ims.ImsReasonInfo;
/**
* See ImsRegistrationImplBase.Callback for more information.
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsServiceController.aidl b/telephony/java/android/telephony/ims/aidl/IImsServiceController.aidl
similarity index 71%
rename from telephony/java/android/telephony/ims/internal/aidl/IImsServiceController.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsServiceController.aidl
index 82a8525..c7da681 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsServiceController.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsServiceController.aidl
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony.ims.aidl;
-import android.telephony.ims.internal.aidl.IImsMmTelFeature;
-import android.telephony.ims.internal.aidl.IImsRcsFeature;
-import android.telephony.ims.internal.aidl.IImsConfig;
-import android.telephony.ims.internal.aidl.IImsServiceControllerListener;
-import android.telephony.ims.internal.stub.ImsFeatureConfiguration;
+import android.telephony.ims.aidl.IImsMmTelFeature;
+import android.telephony.ims.aidl.IImsRcsFeature;
+import android.telephony.ims.aidl.IImsConfig;
+import android.telephony.ims.aidl.IImsRegistration;
+import android.telephony.ims.aidl.IImsServiceControllerListener;
+import android.telephony.ims.stub.ImsFeatureConfiguration;
import com.android.ims.internal.IImsFeatureStatusCallback;
-import com.android.ims.internal.IImsRegistration;
/**
* See ImsService and MmTelFeature for more information.
@@ -36,9 +36,9 @@
ImsFeatureConfiguration querySupportedImsFeatures();
// Synchronous call to ensure the ImsService is ready before continuing with feature creation.
void notifyImsServiceReadyForFeatureCreation();
- // Synchronous call to ensure the new ImsFeature is ready before using the Feature.
- void notifyImsFeatureReady(int slotId, int featureType);
void removeImsFeature(int slotId, int featureType, in IImsFeatureStatusCallback c);
IImsConfig getConfig(int slotId);
IImsRegistration getRegistration(int slotId);
+ oneway void enableIms(int slotId);
+ oneway void disableIms(int slotId);
}
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl b/telephony/java/android/telephony/ims/aidl/IImsServiceControllerListener.aidl
similarity index 87%
rename from telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl
rename to telephony/java/android/telephony/ims/aidl/IImsServiceControllerListener.aidl
index 01cca2db..54f6120 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsServiceControllerListener.aidl
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package android.telephony.ims.internal.aidl;
+package android.telephony.ims.aidl;
-import android.telephony.ims.internal.stub.ImsFeatureConfiguration;
+import android.telephony.ims.stub.ImsFeatureConfiguration;
/**
* See ImsService#Listener for more information.
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl b/telephony/java/android/telephony/ims/aidl/IImsSmsListener.aidl
similarity index 63%
copy from telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl
copy to telephony/java/android/telephony/ims/aidl/IImsSmsListener.aidl
index 01cca2db..606df15 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsSmsListener.aidl
@@ -14,14 +14,15 @@
* limitations under the License.
*/
-package android.telephony.ims.internal.aidl;
-
-import android.telephony.ims.internal.stub.ImsFeatureConfiguration;
+package android.telephony.ims.aidl;
/**
- * See ImsService#Listener for more information.
+ * See SmsImplBase for more information.
* {@hide}
*/
-oneway interface IImsServiceControllerListener {
- void onUpdateSupportedImsFeatures(in ImsFeatureConfiguration c);
-}
+oneway interface IImsSmsListener {
+ void onSendSmsResult(int token, int messageRef, int status, int reason);
+ void onSmsStatusReportReceived(int token, int messageRef, in String format,
+ in byte[] pdu);
+ void onSmsReceived(int token, in String format, in byte[] pdu);
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/ims/compat/ImsService.java b/telephony/java/android/telephony/ims/compat/ImsService.java
new file mode 100644
index 0000000..cf1efb3
--- /dev/null
+++ b/telephony/java/android/telephony/ims/compat/ImsService.java
@@ -0,0 +1,237 @@
+/*
+ * 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
+ */
+
+package android.telephony.ims.compat;
+
+import android.annotation.Nullable;
+import android.app.Service;
+import android.content.Intent;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.telephony.CarrierConfigManager;
+import android.telephony.ims.compat.feature.ImsFeature;
+import android.telephony.ims.compat.feature.MMTelFeature;
+import android.telephony.ims.compat.feature.RcsFeature;
+import android.util.Log;
+import android.util.SparseArray;
+
+import com.android.ims.internal.IImsFeatureStatusCallback;
+import com.android.ims.internal.IImsMMTelFeature;
+import com.android.ims.internal.IImsRcsFeature;
+import com.android.ims.internal.IImsServiceController;
+import com.android.internal.annotations.VisibleForTesting;
+
+/**
+ * Main ImsService implementation, which binds via the Telephony ImsResolver. Services that extend
+ * ImsService must register the service in their AndroidManifest to be detected by the framework.
+ * First, the application must declare that they use the "android.permission.BIND_IMS_SERVICE"
+ * permission. Then, the ImsService definition in the manifest must follow the following format:
+ *
+ * ...
+ * <service android:name=".EgImsService"
+ * android:permission="android.permission.BIND_IMS_SERVICE" >
+ * <!-- Apps must declare which features they support as metadata. The different categories are
+ * defined below. In this example, the RCS_FEATURE feature is supported. -->
+ * <meta-data android:name="android.telephony.ims.RCS_FEATURE" android:value="true" />
+ * <intent-filter>
+ * <action android:name="android.telephony.ims.compat.ImsService" />
+ * </intent-filter>
+ * </service>
+ * ...
+ *
+ * The telephony framework will then bind to the ImsService you have defined in your manifest
+ * if you are either:
+ * 1) Defined as the default ImsService for the device in the device overlay using
+ * "config_ims_package".
+ * 2) Defined as a Carrier Provided ImsService in the Carrier Configuration using
+ * {@link CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING}.
+ *
+ * The features that are currently supported in an ImsService are:
+ * - RCS_FEATURE: This ImsService implements the RcsFeature class.
+ * - MMTEL_FEATURE: This ImsService implements the MMTelFeature class.
+ * - EMERGENCY_MMTEL_FEATURE: This ImsService implements the MMTelFeature class and will be
+ * available to place emergency calls at all times. This MUST be implemented by the default
+ * ImsService provided in the device overlay.
+ * @hide
+ */
+public class ImsService extends Service {
+
+ private static final String LOG_TAG = "ImsService(Compat)";
+
+ /**
+ * The intent that must be defined as an intent-filter in the AndroidManifest of the ImsService.
+ * @hide
+ */
+ public static final String SERVICE_INTERFACE = "android.telephony.ims.compat.ImsService";
+
+ // A map of slot Id -> map of features (indexed by ImsFeature feature id) corresponding to that
+ // slot.
+ // We keep track of this to facilitate cleanup of the IImsFeatureStatusCallback and
+ // call ImsFeature#onFeatureRemoved.
+ private final SparseArray<SparseArray<ImsFeature>> mFeaturesBySlot = new SparseArray<>();
+
+ /**
+ * @hide
+ */
+ protected final IBinder mImsServiceController = new IImsServiceController.Stub() {
+
+ @Override
+ public IImsMMTelFeature createEmergencyMMTelFeature(int slotId,
+ IImsFeatureStatusCallback c) {
+ return createEmergencyMMTelFeatureInternal(slotId, c);
+ }
+
+ @Override
+ public IImsMMTelFeature createMMTelFeature(int slotId, IImsFeatureStatusCallback c) {
+ return createMMTelFeatureInternal(slotId, c);
+ }
+
+ @Override
+ public IImsRcsFeature createRcsFeature(int slotId, IImsFeatureStatusCallback c) {
+ return createRcsFeatureInternal(slotId, c);
+ }
+
+ @Override
+ public void removeImsFeature(int slotId, int featureType, IImsFeatureStatusCallback c)
+ throws RemoteException {
+ ImsService.this.removeImsFeature(slotId, featureType, c);
+ }
+ };
+
+ /**
+ * @hide
+ */
+ @Override
+ public IBinder onBind(Intent intent) {
+ if(SERVICE_INTERFACE.equals(intent.getAction())) {
+ Log.i(LOG_TAG, "ImsService(Compat) Bound.");
+ return mImsServiceController;
+ }
+ return null;
+ }
+
+ /**
+ * @hide
+ */
+ @VisibleForTesting
+ public SparseArray<ImsFeature> getFeatures(int slotId) {
+ return mFeaturesBySlot.get(slotId);
+ }
+
+ private IImsMMTelFeature createEmergencyMMTelFeatureInternal(int slotId,
+ IImsFeatureStatusCallback c) {
+ MMTelFeature f = onCreateEmergencyMMTelImsFeature(slotId);
+ if (f != null) {
+ setupFeature(f, slotId, ImsFeature.EMERGENCY_MMTEL, c);
+ return f.getBinder();
+ } else {
+ return null;
+ }
+ }
+
+ private IImsMMTelFeature createMMTelFeatureInternal(int slotId,
+ IImsFeatureStatusCallback c) {
+ MMTelFeature f = onCreateMMTelImsFeature(slotId);
+ if (f != null) {
+ setupFeature(f, slotId, ImsFeature.MMTEL, c);
+ return f.getBinder();
+ } else {
+ return null;
+ }
+ }
+
+ private IImsRcsFeature createRcsFeatureInternal(int slotId,
+ IImsFeatureStatusCallback c) {
+ RcsFeature f = onCreateRcsFeature(slotId);
+ if (f != null) {
+ setupFeature(f, slotId, ImsFeature.RCS, c);
+ return f.getBinder();
+ } else {
+ return null;
+ }
+ }
+
+ private void setupFeature(ImsFeature f, int slotId, int featureType,
+ IImsFeatureStatusCallback c) {
+ f.setContext(this);
+ f.setSlotId(slotId);
+ f.addImsFeatureStatusCallback(c);
+ addImsFeature(slotId, featureType, f);
+ // TODO: Remove once new onFeatureReady AIDL is merged in.
+ f.onFeatureReady();
+ }
+
+ private void addImsFeature(int slotId, int featureType, ImsFeature f) {
+ synchronized (mFeaturesBySlot) {
+ // Get SparseArray for Features, by querying slot Id
+ SparseArray<ImsFeature> features = mFeaturesBySlot.get(slotId);
+ if (features == null) {
+ // Populate new SparseArray of features if it doesn't exist for this slot yet.
+ features = new SparseArray<>();
+ mFeaturesBySlot.put(slotId, features);
+ }
+ features.put(featureType, f);
+ }
+ }
+
+ private void removeImsFeature(int slotId, int featureType,
+ IImsFeatureStatusCallback c) {
+ synchronized (mFeaturesBySlot) {
+ // get ImsFeature associated with the slot/feature
+ SparseArray<ImsFeature> features = mFeaturesBySlot.get(slotId);
+ if (features == null) {
+ Log.w(LOG_TAG, "Can not remove ImsFeature. No ImsFeatures exist on slot "
+ + slotId);
+ return;
+ }
+ ImsFeature f = features.get(featureType);
+ if (f == null) {
+ Log.w(LOG_TAG, "Can not remove ImsFeature. No feature with type "
+ + featureType + " exists on slot " + slotId);
+ return;
+ }
+ f.removeImsFeatureStatusCallback(c);
+ f.onFeatureRemoved();
+ features.remove(featureType);
+ }
+ }
+
+ /**
+ * @return An implementation of MMTelFeature that will be used by the system for MMTel
+ * functionality. Must be able to handle emergency calls at any time as well.
+ * @hide
+ */
+ public @Nullable MMTelFeature onCreateEmergencyMMTelImsFeature(int slotId) {
+ return null;
+ }
+
+ /**
+ * @return An implementation of MMTelFeature that will be used by the system for MMTel
+ * functionality.
+ * @hide
+ */
+ public @Nullable MMTelFeature onCreateMMTelImsFeature(int slotId) {
+ return null;
+ }
+
+ /**
+ * @return An implementation of RcsFeature that will be used by the system for RCS.
+ * @hide
+ */
+ public @Nullable RcsFeature onCreateRcsFeature(int slotId) {
+ return null;
+ }
+}
diff --git a/telephony/java/android/telephony/ims/compat/feature/ImsFeature.java b/telephony/java/android/telephony/ims/compat/feature/ImsFeature.java
new file mode 100644
index 0000000..0a12cae
--- /dev/null
+++ b/telephony/java/android/telephony/ims/compat/feature/ImsFeature.java
@@ -0,0 +1,202 @@
+/*
+ * 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
+ */
+
+package android.telephony.ims.compat.feature;
+
+import android.annotation.IntDef;
+import android.content.Context;
+import android.content.Intent;
+import android.os.IInterface;
+import android.os.RemoteException;
+import android.telephony.SubscriptionManager;
+import android.util.Log;
+
+import com.android.ims.internal.IImsFeatureStatusCallback;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.WeakHashMap;
+
+/**
+ * Base class for all IMS features that are supported by the framework.
+ * @hide
+ */
+public abstract class ImsFeature {
+
+ private static final String LOG_TAG = "ImsFeature";
+
+ /**
+ * Action to broadcast when ImsService is up.
+ * Internal use only.
+ * Only defined here separately compatibility purposes with the old ImsService.
+ * @hide
+ */
+ public static final String ACTION_IMS_SERVICE_UP =
+ "com.android.ims.IMS_SERVICE_UP";
+
+ /**
+ * Action to broadcast when ImsService is down.
+ * Internal use only.
+ * Only defined here separately for compatibility purposes with the old ImsService.
+ * @hide
+ */
+ public static final String ACTION_IMS_SERVICE_DOWN =
+ "com.android.ims.IMS_SERVICE_DOWN";
+
+ /**
+ * Part of the ACTION_IMS_SERVICE_UP or _DOWN intents.
+ * A long value; the phone ID corresponding to the IMS service coming up or down.
+ * Only defined here separately for compatibility purposes with the old ImsService.
+ * @hide
+ */
+ public static final String EXTRA_PHONE_ID = "android:phone_id";
+
+ // Invalid feature value
+ public static final int INVALID = -1;
+ // ImsFeatures that are defined in the Manifests. Ensure that these values match the previously
+ // defined values in ImsServiceClass for compatibility purposes.
+ public static final int EMERGENCY_MMTEL = 0;
+ public static final int MMTEL = 1;
+ public static final int RCS = 2;
+ // Total number of features defined
+ public static final int MAX = 3;
+
+ // Integer values defining the state of the ImsFeature at any time.
+ @IntDef(flag = true,
+ value = {
+ STATE_NOT_AVAILABLE,
+ STATE_INITIALIZING,
+ STATE_READY,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ImsState {}
+ public static final int STATE_NOT_AVAILABLE = 0;
+ public static final int STATE_INITIALIZING = 1;
+ public static final int STATE_READY = 2;
+
+ private final Set<IImsFeatureStatusCallback> mStatusCallbacks = Collections.newSetFromMap(
+ new WeakHashMap<IImsFeatureStatusCallback, Boolean>());
+ private @ImsState int mState = STATE_NOT_AVAILABLE;
+ private int mSlotId = SubscriptionManager.INVALID_SIM_SLOT_INDEX;
+ protected Context mContext;
+
+ public void setContext(Context context) {
+ mContext = context;
+ }
+
+ public void setSlotId(int slotId) {
+ mSlotId = slotId;
+ }
+
+ public int getFeatureState() {
+ return mState;
+ }
+
+ protected final void setFeatureState(@ImsState int state) {
+ if (mState != state) {
+ mState = state;
+ notifyFeatureState(state);
+ }
+ }
+
+ public void addImsFeatureStatusCallback(IImsFeatureStatusCallback c) {
+ if (c == null) {
+ return;
+ }
+ try {
+ // If we have just connected, send queued status.
+ c.notifyImsFeatureStatus(mState);
+ // Add the callback if the callback completes successfully without a RemoteException.
+ synchronized (mStatusCallbacks) {
+ mStatusCallbacks.add(c);
+ }
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "Couldn't notify feature state: " + e.getMessage());
+ }
+ }
+
+ public void removeImsFeatureStatusCallback(IImsFeatureStatusCallback c) {
+ if (c == null) {
+ return;
+ }
+ synchronized (mStatusCallbacks) {
+ mStatusCallbacks.remove(c);
+ }
+ }
+
+ /**
+ * Internal method called by ImsFeature when setFeatureState has changed.
+ * @param state
+ */
+ private void notifyFeatureState(@ImsState int state) {
+ synchronized (mStatusCallbacks) {
+ for (Iterator<IImsFeatureStatusCallback> iter = mStatusCallbacks.iterator();
+ iter.hasNext(); ) {
+ IImsFeatureStatusCallback callback = iter.next();
+ try {
+ Log.i(LOG_TAG, "notifying ImsFeatureState=" + state);
+ callback.notifyImsFeatureStatus(state);
+ } catch (RemoteException e) {
+ // remove if the callback is no longer alive.
+ iter.remove();
+ Log.w(LOG_TAG, "Couldn't notify feature state: " + e.getMessage());
+ }
+ }
+ }
+ sendImsServiceIntent(state);
+ }
+
+ /**
+ * Provide backwards compatibility using deprecated service UP/DOWN intents.
+ */
+ private void sendImsServiceIntent(@ImsState int state) {
+ if(mContext == null || mSlotId == SubscriptionManager.INVALID_SIM_SLOT_INDEX) {
+ return;
+ }
+ Intent intent;
+ switch (state) {
+ case ImsFeature.STATE_NOT_AVAILABLE:
+ case ImsFeature.STATE_INITIALIZING:
+ intent = new Intent(ACTION_IMS_SERVICE_DOWN);
+ break;
+ case ImsFeature.STATE_READY:
+ intent = new Intent(ACTION_IMS_SERVICE_UP);
+ break;
+ default:
+ intent = new Intent(ACTION_IMS_SERVICE_DOWN);
+ }
+ intent.putExtra(EXTRA_PHONE_ID, mSlotId);
+ mContext.sendBroadcast(intent);
+ }
+
+ /**
+ * Called when the feature is ready to use.
+ */
+ public abstract void onFeatureReady();
+
+ /**
+ * Called when the feature is being removed and must be cleaned up.
+ */
+ public abstract void onFeatureRemoved();
+
+ /**
+ * @return Binder instance
+ */
+ public abstract IInterface getBinder();
+}
diff --git a/telephony/java/android/telephony/ims/feature/MMTelFeature.java b/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java
similarity index 90%
rename from telephony/java/android/telephony/ims/feature/MMTelFeature.java
rename to telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java
index 4e095e3a..d3d17f4 100644
--- a/telephony/java/android/telephony/ims/feature/MMTelFeature.java
+++ b/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -14,13 +14,13 @@
* limitations under the License
*/
-package android.telephony.ims.feature;
+package android.telephony.ims.compat.feature;
import android.app.PendingIntent;
import android.os.Message;
import android.os.RemoteException;
-import com.android.ims.ImsCallProfile;
+import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsCallSessionListener;
import com.android.ims.internal.IImsConfig;
@@ -29,7 +29,11 @@
import com.android.ims.internal.IImsMultiEndpoint;
import com.android.ims.internal.IImsRegistrationListener;
import com.android.ims.internal.IImsUt;
-import com.android.ims.internal.ImsCallSession;
+import android.telephony.ims.ImsCallSession;
+import android.telephony.ims.compat.stub.ImsCallSessionImplBase;
+import android.telephony.ims.stub.ImsEcbmImplBase;
+import android.telephony.ims.stub.ImsMultiEndpointImplBase;
+import android.telephony.ims.stub.ImsUtImplBase;
/**
* Base implementation for MMTel.
@@ -108,10 +112,10 @@
}
@Override
- public IImsCallSession createCallSession(int sessionId, ImsCallProfile profile,
- IImsCallSessionListener listener) throws RemoteException {
+ public IImsCallSession createCallSession(int sessionId, ImsCallProfile profile)
+ throws RemoteException {
synchronized (mLock) {
- return MMTelFeature.this.createCallSession(sessionId, profile, listener);
+ return MMTelFeature.this.createCallSession(sessionId, profile, null);
}
}
@@ -126,7 +130,8 @@
@Override
public IImsUt getUtInterface() throws RemoteException {
synchronized (mLock) {
- return MMTelFeature.this.getUtInterface();
+ ImsUtImplBase implBase = MMTelFeature.this.getUtInterface();
+ return implBase != null ? implBase.getInterface() : null;
}
}
@@ -154,7 +159,8 @@
@Override
public IImsEcbm getEcbmInterface() throws RemoteException {
synchronized (mLock) {
- return MMTelFeature.this.getEcbmInterface();
+ ImsEcbmImplBase implBase = MMTelFeature.this.getEcbmInterface();
+ return implBase != null ? implBase.getImsEcbm() : null;
}
}
@@ -168,7 +174,8 @@
@Override
public IImsMultiEndpoint getMultiEndpointInterface() throws RemoteException {
synchronized (mLock) {
- return MMTelFeature.this.getMultiEndpointInterface();
+ ImsMultiEndpointImplBase implBase = MMTelFeature.this.getMultiEndpointInterface();
+ return implBase != null ? implBase.getIImsMultiEndpoint() : null;
}
}
};
@@ -281,7 +288,6 @@
*
* @param sessionId a session id which is obtained from {@link #startSession}
* @param profile a call profile to make the call
- * @param listener An implementation of IImsCallSessionListener.
*/
public IImsCallSession createCallSession(int sessionId, ImsCallProfile profile,
IImsCallSessionListener listener) {
@@ -301,7 +307,7 @@
/**
* @return The Ut interface for the supplementary service configuration.
*/
- public IImsUt getUtInterface() {
+ public ImsUtImplBase getUtInterface() {
return null;
}
@@ -327,7 +333,7 @@
/**
* @return The Emergency call-back mode interface for emergency VoLTE calls that support it.
*/
- public IImsEcbm getEcbmInterface() {
+ public ImsEcbmImplBase getEcbmInterface() {
return null;
}
@@ -342,7 +348,7 @@
/**
* @return MultiEndpoint interface for DEP notifications
*/
- public IImsMultiEndpoint getMultiEndpointInterface() {
+ public ImsMultiEndpointImplBase getMultiEndpointInterface() {
return null;
}
diff --git a/telephony/java/android/telephony/ims/internal/feature/RcsFeature.java b/telephony/java/android/telephony/ims/compat/feature/RcsFeature.java
similarity index 76%
rename from telephony/java/android/telephony/ims/internal/feature/RcsFeature.java
rename to telephony/java/android/telephony/ims/compat/feature/RcsFeature.java
index 8d1bd9d..228b330 100644
--- a/telephony/java/android/telephony/ims/internal/feature/RcsFeature.java
+++ b/telephony/java/android/telephony/ims/compat/feature/RcsFeature.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -14,9 +14,10 @@
* limitations under the License
*/
-package android.telephony.ims.internal.feature;
+package android.telephony.ims.compat.feature;
-import android.telephony.ims.internal.aidl.IImsRcsFeature;
+
+import com.android.ims.internal.IImsRcsFeature;
/**
* Base implementation of the RcsFeature APIs. Any ImsService wishing to support RCS should extend
@@ -36,9 +37,8 @@
}
@Override
- public void changeEnabledCapabilities(CapabilityChangeRequest request,
- CapabilityCallbackProxy c) {
- // Do nothing for base implementation.
+ public void onFeatureReady() {
+
}
@Override
@@ -46,12 +46,6 @@
}
- /**{@inheritDoc}*/
- @Override
- public void onFeatureReady() {
-
- }
-
@Override
public final IImsRcsFeature getBinder() {
return mImsRcsBinder;
diff --git a/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java b/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java
new file mode 100644
index 0000000..e5ed825
--- /dev/null
+++ b/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java
@@ -0,0 +1,594 @@
+/*
+ * 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
+ */
+
+package android.telephony.ims.compat.stub;
+
+import android.os.Message;
+import android.os.RemoteException;
+
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsConferenceState;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsStreamMediaProfile;
+import android.telephony.ims.ImsSuppServiceNotification;
+import android.telephony.ims.aidl.IImsCallSessionListener;
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsVideoCallProvider;
+
+import android.telephony.ims.ImsCallSession;
+
+/**
+ * Compat implementation of ImsCallSessionImplBase for older implementations.
+ *
+ * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
+ * will break other implementations of ImsCallSession maintained by other ImsServices.
+ *
+ * @hide
+ */
+
+public class ImsCallSessionImplBase extends IImsCallSession.Stub {
+
+ @Override
+ // convert to old implementation of listener
+ public final void setListener(IImsCallSessionListener listener)
+ throws RemoteException {
+ setListener(new ImsCallSessionListenerConverter(listener));
+ }
+
+ /**
+ * Sets the listener to listen to the session events. An {@link ImsCallSession}
+ * can only hold one listener at a time. Subsequent calls to this method
+ * override the previous listener.
+ *
+ * @param listener to listen to the session events of this object
+ */
+ public void setListener(com.android.ims.internal.IImsCallSessionListener listener) {
+
+ }
+
+ /**
+ * Closes the object. This {@link ImsCallSessionImplBase} is not usable after being closed.
+ */
+ @Override
+ public void close() {
+
+ }
+
+ /**
+ * @return A String containing the unique call ID of this {@link ImsCallSessionImplBase}.
+ */
+ @Override
+ public String getCallId() {
+ return null;
+ }
+
+ /**
+ * @return The {@link ImsCallProfile} that this {@link ImsCallSessionImplBase} is associated
+ * with.
+ */
+ @Override
+ public ImsCallProfile getCallProfile() {
+ return null;
+ }
+
+ /**
+ * @return The local {@link ImsCallProfile} that this {@link ImsCallSessionImplBase} is
+ * associated with.
+ */
+ @Override
+ public ImsCallProfile getLocalCallProfile() {
+ return null;
+ }
+
+ /**
+ * @return The remote {@link ImsCallProfile} that this {@link ImsCallSessionImplBase} is
+ * associated with.
+ */
+ @Override
+ public ImsCallProfile getRemoteCallProfile() {
+ return null;
+ }
+
+ /**
+ * @param name The String extra key.
+ * @return The string extra value associated with the specified property.
+ */
+ @Override
+ public String getProperty(String name) {
+ return null;
+ }
+
+ /**
+ * @return The {@link ImsCallSessionImplBase} state.
+ */
+ @Override
+ public int getState() {
+ return -1;
+ }
+
+ /**
+ * @return true if the {@link ImsCallSessionImplBase} is in a call, false otherwise.
+ */
+ @Override
+ public boolean isInCall() {
+ return false;
+ }
+
+ /**
+ * Mutes or unmutes the mic for the active call.
+ *
+ * @param muted true if the call should be muted, false otherwise.
+ */
+ @Override
+ public void setMute(boolean muted) {
+ }
+
+ /**
+ * Initiates an IMS call with the specified number and call profile.
+ * The session listener set in {@link #setListener(IImsCallSessionListener)} is called back upon
+ * defined session events.
+ * Only valid to call when the session state is in
+ * {@link ImsCallSession.State#IDLE}.
+ *
+ * @param callee dialed string to make the call to
+ * @param profile call profile to make the call with the specified service type,
+ * call type and media information
+ * @see {@link ImsCallSession.Listener#callSessionStarted},
+ * {@link ImsCallSession.Listener#callSessionStartFailed}
+ */
+ @Override
+ public void start(String callee, ImsCallProfile profile) {
+ }
+
+ /**
+ * Initiates an IMS call with the specified participants and call profile.
+ * The session listener set in {@link #setListener(IImsCallSessionListener)} is called back upon
+ * defined session events.
+ * The method is only valid to call when the session state is in
+ * {@link ImsCallSession.State#IDLE}.
+ *
+ * @param participants participant list to initiate an IMS conference call
+ * @param profile call profile to make the call with the specified service type,
+ * call type and media information
+ * @see {@link ImsCallSession.Listener#callSessionStarted},
+ * {@link ImsCallSession.Listener#callSessionStartFailed}
+ */
+ @Override
+ public void startConference(String[] participants, ImsCallProfile profile) {
+ }
+
+ /**
+ * Accepts an incoming call or session update.
+ *
+ * @param callType call type specified in {@link ImsCallProfile} to be answered
+ * @param profile stream media profile {@link ImsStreamMediaProfile} to be answered
+ * @see {@link ImsCallSession.Listener#callSessionStarted}
+ */
+ @Override
+ public void accept(int callType, ImsStreamMediaProfile profile) {
+ }
+
+ /**
+ * Deflects an incoming call.
+ *
+ * @param deflectNumber number to deflect the call
+ */
+ @Override
+ public void deflect(String deflectNumber) {
+ }
+
+ /**
+ * Rejects an incoming call or session update.
+ *
+ * @param reason reason code to reject an incoming call, defined in {@link ImsReasonInfo}.
+ * {@link ImsCallSession.Listener#callSessionStartFailed}
+ */
+ @Override
+ public void reject(int reason) {
+ }
+
+ /**
+ * Terminates a call.
+ *
+ * @param reason reason code to terminate a call, defined in {@link ImsReasonInfo}.
+ *
+ * @see {@link ImsCallSession.Listener#callSessionTerminated}
+ */
+ @Override
+ public void terminate(int reason) {
+ }
+
+ /**
+ * Puts a call on hold. When it succeeds, {@link ImsCallSession.Listener#callSessionHeld} is
+ * called.
+ *
+ * @param profile stream media profile {@link ImsStreamMediaProfile} to hold the call
+ * @see {@link ImsCallSession.Listener#callSessionHeld},
+ * {@link ImsCallSession.Listener#callSessionHoldFailed}
+ */
+ @Override
+ public void hold(ImsStreamMediaProfile profile) {
+ }
+
+ /**
+ * Continues a call that's on hold. When it succeeds,
+ * {@link ImsCallSession.Listener#callSessionResumed} is called.
+ *
+ * @param profile stream media profile with {@link ImsStreamMediaProfile} to resume the call
+ * @see {@link ImsCallSession.Listener#callSessionResumed},
+ * {@link ImsCallSession.Listener#callSessionResumeFailed}
+ */
+ @Override
+ public void resume(ImsStreamMediaProfile profile) {
+ }
+
+ /**
+ * Merges the active and held call. When the merge starts,
+ * {@link ImsCallSession.Listener#callSessionMergeStarted} is called.
+ * {@link ImsCallSession.Listener#callSessionMergeComplete} is called if the merge is
+ * successful, and {@link ImsCallSession.Listener#callSessionMergeFailed} is called if the merge
+ * fails.
+ *
+ * @see {@link ImsCallSession.Listener#callSessionMergeStarted},
+ * {@link ImsCallSession.Listener#callSessionMergeComplete},
+ * {@link ImsCallSession.Listener#callSessionMergeFailed}
+ */
+ @Override
+ public void merge() {
+ }
+
+ /**
+ * Updates the current call's properties (ex. call mode change: video upgrade / downgrade).
+ *
+ * @param callType call type specified in {@link ImsCallProfile} to be updated
+ * @param profile stream media profile {@link ImsStreamMediaProfile} to be updated
+ * @see {@link ImsCallSession.Listener#callSessionUpdated},
+ * {@link ImsCallSession.Listener#callSessionUpdateFailed}
+ */
+ @Override
+ public void update(int callType, ImsStreamMediaProfile profile) {
+ }
+
+ /**
+ * Extends this call to the conference call with the specified recipients.
+ *
+ * @param participants participant list to be invited to the conference call after extending the
+ * call
+ * @see {@link ImsCallSession.Listener#callSessionConferenceExtended},
+ * {@link ImsCallSession.Listener#callSessionConferenceExtendFailed}
+ */
+ @Override
+ public void extendToConference(String[] participants) {
+ }
+
+ /**
+ * Requests the conference server to invite an additional participants to the conference.
+ *
+ * @param participants participant list to be invited to the conference call
+ * @see {@link ImsCallSession.Listener#callSessionInviteParticipantsRequestDelivered},
+ * {@link ImsCallSession.Listener#callSessionInviteParticipantsRequestFailed}
+ */
+ @Override
+ public void inviteParticipants(String[] participants) {
+ }
+
+ /**
+ * Requests the conference server to remove the specified participants from the conference.
+ *
+ * @param participants participant list to be removed from the conference call
+ * @see {@link ImsCallSession.Listener#callSessionRemoveParticipantsRequestDelivered},
+ * {@link ImsCallSession.Listener#callSessionRemoveParticipantsRequestFailed}
+ */
+ @Override
+ public void removeParticipants(String[] participants) {
+ }
+
+ /**
+ * Sends a DTMF code. According to <a href="http://tools.ietf.org/html/rfc2833">RFC 2833</a>,
+ * event 0 ~ 9 maps to decimal value 0 ~ 9, '*' to 10, '#' to 11, event 'A' ~ 'D' to 12 ~ 15,
+ * and event flash to 16. Currently, event flash is not supported.
+ *
+ * @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
+ */
+ @Override
+ public void sendDtmf(char c, Message result) {
+ }
+
+ /**
+ * Start a DTMF code. According to <a href="http://tools.ietf.org/html/rfc2833">RFC 2833</a>,
+ * event 0 ~ 9 maps to decimal value 0 ~ 9, '*' to 10, '#' to 11, event 'A' ~ 'D' to 12 ~ 15,
+ * and event flash to 16. Currently, event flash is not supported.
+ *
+ * @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
+ */
+ @Override
+ public void startDtmf(char c) {
+ }
+
+ /**
+ * Stop a DTMF code.
+ */
+ @Override
+ public void stopDtmf() {
+ }
+
+ /**
+ * Sends an USSD message.
+ *
+ * @param ussdMessage USSD message to send
+ */
+ @Override
+ public void sendUssd(String ussdMessage) {
+ }
+
+ @Override
+ public IImsVideoCallProvider getVideoCallProvider() {
+ return null;
+ }
+
+ /**
+ * Determines if the current session is multiparty.
+ * @return {@code True} if the session is multiparty.
+ */
+ @Override
+ public boolean isMultiparty() {
+ return false;
+ }
+
+ /**
+ * Device issues RTT modify request
+ * @param toProfile The profile with requested changes made
+ */
+ @Override
+ public void sendRttModifyRequest(ImsCallProfile toProfile) {
+ }
+
+ /**
+ * Device responds to Remote RTT modify request
+ * @param status true if the the request was accepted or false of the request is defined.
+ */
+ @Override
+ public void sendRttModifyResponse(boolean status) {
+ }
+
+ /**
+ * Device sends RTT message
+ * @param rttMessage RTT message to be sent
+ */
+ @Override
+ public void sendRttMessage(String rttMessage) {
+ }
+
+ /**
+ * There are two different ImsCallSessionListeners that need to reconciled here, we need to
+ * convert the "old" version of the com.android.ims.internal.IImsCallSessionListener to the
+ * "new" version of the Listener android.telephony.ims.ImsCallSessionListener when calling
+ * back to the framework.
+ */
+ private class ImsCallSessionListenerConverter
+ extends com.android.ims.internal.IImsCallSessionListener.Stub {
+
+ private final IImsCallSessionListener mNewListener;
+
+ public ImsCallSessionListenerConverter(IImsCallSessionListener listener) {
+ mNewListener = listener;
+ }
+
+ @Override
+ public void callSessionProgressing(IImsCallSession i,
+ ImsStreamMediaProfile imsStreamMediaProfile) throws RemoteException {
+ mNewListener.callSessionProgressing(imsStreamMediaProfile);
+ }
+
+ @Override
+ public void callSessionStarted(IImsCallSession i, ImsCallProfile imsCallProfile)
+ throws RemoteException {
+ mNewListener.callSessionInitiated(imsCallProfile);
+ }
+
+ @Override
+ public void callSessionStartFailed(IImsCallSession i, ImsReasonInfo imsReasonInfo)
+ throws RemoteException {
+ mNewListener.callSessionInitiatedFailed(imsReasonInfo);
+ }
+
+ @Override
+ public void callSessionTerminated(IImsCallSession i, ImsReasonInfo imsReasonInfo)
+ throws RemoteException {
+ mNewListener.callSessionTerminated(imsReasonInfo);
+ }
+
+ @Override
+ public void callSessionHeld(IImsCallSession i, ImsCallProfile imsCallProfile)
+ throws RemoteException {
+ mNewListener.callSessionHeld(imsCallProfile);
+ }
+
+ @Override
+ public void callSessionHoldFailed(IImsCallSession i, ImsReasonInfo imsReasonInfo)
+ throws RemoteException {
+ mNewListener.callSessionHoldFailed(imsReasonInfo);
+ }
+
+ @Override
+ public void callSessionHoldReceived(IImsCallSession i, ImsCallProfile imsCallProfile)
+ throws RemoteException {
+ mNewListener.callSessionHoldReceived(imsCallProfile);
+ }
+
+ @Override
+ public void callSessionResumed(IImsCallSession i, ImsCallProfile imsCallProfile)
+ throws RemoteException {
+ mNewListener.callSessionResumed(imsCallProfile);
+ }
+
+ @Override
+ public void callSessionResumeFailed(IImsCallSession i, ImsReasonInfo imsReasonInfo)
+ throws RemoteException {
+ mNewListener.callSessionResumeFailed(imsReasonInfo);
+ }
+
+ @Override
+ public void callSessionResumeReceived(IImsCallSession i, ImsCallProfile imsCallProfile)
+ throws RemoteException {
+ mNewListener.callSessionResumeReceived(imsCallProfile);
+ }
+
+ @Override
+ public void callSessionMergeStarted(IImsCallSession i, IImsCallSession newSession,
+ ImsCallProfile profile)
+ throws RemoteException {
+ mNewListener.callSessionMergeStarted(newSession, profile);
+ }
+
+ @Override
+ public void callSessionMergeComplete(IImsCallSession iImsCallSession)
+ throws RemoteException {
+ mNewListener.callSessionMergeComplete(iImsCallSession);
+ }
+
+ @Override
+ public void callSessionMergeFailed(IImsCallSession i, ImsReasonInfo imsReasonInfo)
+ throws RemoteException {
+ mNewListener.callSessionMergeFailed(imsReasonInfo);
+ }
+
+ @Override
+ public void callSessionUpdated(IImsCallSession i, ImsCallProfile imsCallProfile)
+ throws RemoteException {
+ mNewListener.callSessionUpdated(imsCallProfile);
+ }
+
+ @Override
+ public void callSessionUpdateFailed(IImsCallSession i, ImsReasonInfo imsReasonInfo)
+ throws RemoteException {
+ mNewListener.callSessionUpdateFailed(imsReasonInfo);
+ }
+
+ @Override
+ public void callSessionUpdateReceived(IImsCallSession i, ImsCallProfile imsCallProfile)
+ throws RemoteException {
+ mNewListener.callSessionUpdateReceived(imsCallProfile);
+ }
+
+ @Override
+ public void callSessionConferenceExtended(IImsCallSession i, IImsCallSession newSession,
+ ImsCallProfile imsCallProfile) throws RemoteException {
+ mNewListener.callSessionConferenceExtended(newSession, imsCallProfile);
+ }
+
+ @Override
+ public void callSessionConferenceExtendFailed(IImsCallSession i,
+ ImsReasonInfo imsReasonInfo) throws RemoteException {
+ mNewListener.callSessionConferenceExtendFailed(imsReasonInfo);
+ }
+
+ @Override
+ public void callSessionConferenceExtendReceived(IImsCallSession i,
+ IImsCallSession newSession, ImsCallProfile imsCallProfile)
+ throws RemoteException {
+ mNewListener.callSessionConferenceExtendReceived(newSession, imsCallProfile);
+ }
+
+ @Override
+ public void callSessionInviteParticipantsRequestDelivered(IImsCallSession i)
+ throws RemoteException {
+ mNewListener.callSessionInviteParticipantsRequestDelivered();
+ }
+
+ @Override
+ public void callSessionInviteParticipantsRequestFailed(IImsCallSession i,
+ ImsReasonInfo imsReasonInfo) throws RemoteException {
+ mNewListener.callSessionInviteParticipantsRequestFailed(imsReasonInfo);
+ }
+
+ @Override
+ public void callSessionRemoveParticipantsRequestDelivered(IImsCallSession i)
+ throws RemoteException {
+ mNewListener.callSessionRemoveParticipantsRequestDelivered();
+ }
+
+ @Override
+ public void callSessionRemoveParticipantsRequestFailed(IImsCallSession i,
+ ImsReasonInfo imsReasonInfo) throws RemoteException {
+ mNewListener.callSessionRemoveParticipantsRequestFailed(imsReasonInfo);
+ }
+
+ @Override
+ public void callSessionConferenceStateUpdated(IImsCallSession i,
+ ImsConferenceState imsConferenceState) throws RemoteException {
+ mNewListener.callSessionConferenceStateUpdated(imsConferenceState);
+ }
+
+ @Override
+ public void callSessionUssdMessageReceived(IImsCallSession i, int mode, String message)
+ throws RemoteException {
+ mNewListener.callSessionUssdMessageReceived(mode, message);
+ }
+
+ @Override
+ public void callSessionHandover(IImsCallSession i, int srcAccessTech, int targetAccessTech,
+ ImsReasonInfo reasonInfo) throws RemoteException {
+ mNewListener.callSessionHandover(srcAccessTech, targetAccessTech, reasonInfo);
+ }
+
+ @Override
+ public void callSessionHandoverFailed(IImsCallSession i, int srcAccessTech,
+ int targetAccessTech, ImsReasonInfo reasonInfo) throws RemoteException {
+ mNewListener.callSessionHandoverFailed(srcAccessTech, targetAccessTech, reasonInfo);
+ }
+
+ @Override
+ public void callSessionMayHandover(IImsCallSession i, int srcAccessTech, int targetAccessTech)
+ throws RemoteException {
+ mNewListener.callSessionMayHandover(srcAccessTech, targetAccessTech);
+ }
+
+ @Override
+ public void callSessionTtyModeReceived(IImsCallSession iImsCallSession, int mode)
+ throws RemoteException {
+ mNewListener.callSessionTtyModeReceived(mode);
+ }
+
+ @Override
+ public void callSessionMultipartyStateChanged(IImsCallSession i, boolean isMultiparty)
+ throws RemoteException {
+ mNewListener.callSessionMultipartyStateChanged(isMultiparty);
+ }
+
+ @Override
+ public void callSessionSuppServiceReceived(IImsCallSession i,
+ ImsSuppServiceNotification imsSuppServiceNotification) throws RemoteException {
+ mNewListener.callSessionSuppServiceReceived(imsSuppServiceNotification);
+ }
+
+ @Override
+ public void callSessionRttModifyRequestReceived(IImsCallSession i,
+ ImsCallProfile imsCallProfile) throws RemoteException {
+ mNewListener.callSessionRttModifyRequestReceived(imsCallProfile);
+ }
+
+ @Override
+ public void callSessionRttModifyResponseReceived(int status) throws RemoteException {
+ mNewListener.callSessionRttModifyResponseReceived(status);
+ }
+
+ @Override
+ public void callSessionRttMessageReceived(String rttMessage) throws RemoteException {
+ mNewListener.callSessionRttMessageReceived(rttMessage);
+ }
+ }
+}
diff --git a/telephony/java/android/telephony/ims/compat/stub/ImsConfigImplBase.java b/telephony/java/android/telephony/ims/compat/stub/ImsConfigImplBase.java
new file mode 100644
index 0000000..2c325ba8
--- /dev/null
+++ b/telephony/java/android/telephony/ims/compat/stub/ImsConfigImplBase.java
@@ -0,0 +1,391 @@
+/*
+ * 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
+ */
+
+package android.telephony.ims.compat.stub;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.android.ims.ImsConfig;
+import com.android.ims.ImsConfigListener;
+import com.android.ims.internal.IImsConfig;
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.lang.ref.WeakReference;
+import java.util.HashMap;
+
+
+/**
+ * Base implementation of ImsConfig.
+ * Override the methods that your implementation of ImsConfig supports.
+ *
+ * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
+ * will break other implementations of ImsConfig maintained by other ImsServices.
+ *
+ * Provides APIs to get/set the IMS service feature/capability/parameters.
+ * The config items include:
+ * 1) Items provisioned by the operator.
+ * 2) Items configured by user. Mainly service feature class.
+ *
+ * The inner class {@link ImsConfigStub} implements methods of IImsConfig AIDL interface.
+ * The IImsConfig AIDL interface is called by ImsConfig, which may exist in many other processes.
+ * ImsConfigImpl access to the configuration parameters may be arbitrarily slow, especially in
+ * during initialization, or times when a lot of configuration parameters are being set/get
+ * (such as during boot up or SIM card change). By providing a cache in ImsConfigStub, we can speed
+ * up access to these configuration parameters, so a query to the ImsConfigImpl does not have to be
+ * performed every time.
+ * @hide
+ */
+
+public class ImsConfigImplBase {
+
+ static final private String TAG = "ImsConfigImplBase";
+
+ ImsConfigStub mImsConfigStub;
+
+ public ImsConfigImplBase(Context context) {
+ mImsConfigStub = new ImsConfigStub(this, context);
+ }
+
+ /**
+ * Gets the value for ims service/capabilities parameters from the provisioned
+ * value storage. Synchronous blocking call.
+ *
+ * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @return value in Integer format.
+ */
+ public int getProvisionedValue(int item) throws RemoteException {
+ return -1;
+ }
+
+ /**
+ * Gets the value for ims service/capabilities parameters from the provisioned
+ * value storage. Synchronous blocking call.
+ *
+ * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @return value in String format.
+ */
+ public String getProvisionedStringValue(int item) throws RemoteException {
+ return null;
+ }
+
+ /**
+ * Sets the value for IMS service/capabilities parameters by the operator device
+ * management entity. It sets the config item value in the provisioned storage
+ * from which the master value is derived. Synchronous blocking call.
+ *
+ * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param value in Integer format.
+ * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
+ */
+ public int setProvisionedValue(int item, int value) throws RemoteException {
+ return ImsConfig.OperationStatusConstants.FAILED;
+ }
+
+ /**
+ * Sets the value for IMS service/capabilities parameters by the operator device
+ * management entity. It sets the config item value in the provisioned storage
+ * from which the master value is derived. Synchronous blocking call.
+ *
+ * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param value in String format.
+ * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
+ */
+ public int setProvisionedStringValue(int item, String value) throws RemoteException {
+ return ImsConfig.OperationStatusConstants.FAILED;
+ }
+
+ /**
+ * Gets the value of the specified IMS feature item for specified network type.
+ * This operation gets the feature config value from the master storage (i.e. final
+ * value). Asynchronous non-blocking call.
+ *
+ * @param feature as defined in com.android.ims.ImsConfig#FeatureConstants.
+ * @param network as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
+ * @param listener feature value returned asynchronously through listener.
+ */
+ public void getFeatureValue(int feature, int network, ImsConfigListener listener)
+ throws RemoteException {
+ }
+
+ /**
+ * Sets the value for IMS feature item for specified network type.
+ * This operation stores the user setting in setting db from which master db
+ * is derived.
+ *
+ * @param feature as defined in com.android.ims.ImsConfig#FeatureConstants.
+ * @param network as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
+ * @param value as defined in com.android.ims.ImsConfig#FeatureValueConstants.
+ * @param listener, provided if caller needs to be notified for set result.
+ */
+ public void setFeatureValue(int feature, int network, int value, ImsConfigListener listener)
+ throws RemoteException {
+ }
+
+ /**
+ * Gets the value for IMS VoLTE provisioned.
+ * This should be the same as the operator provisioned value if applies.
+ */
+ public boolean getVolteProvisioned() throws RemoteException {
+ return false;
+ }
+
+ /**
+ * Gets the value for IMS feature item video quality.
+ *
+ * @param listener Video quality value returned asynchronously through listener.
+ */
+ public void getVideoQuality(ImsConfigListener listener) throws RemoteException {
+ }
+
+ /**
+ * Sets the value for IMS feature item video quality.
+ *
+ * @param quality, defines the value of video quality.
+ * @param listener, provided if caller needs to be notified for set result.
+ */
+ public void setVideoQuality(int quality, ImsConfigListener listener) throws RemoteException {
+ }
+
+ public IImsConfig getIImsConfig() { return mImsConfigStub; }
+
+ /**
+ * Updates provisioning value and notifies the framework of the change.
+ * Doesn't call #setProvisionedValue and assumes the result succeeded.
+ * This should only be used by modem when they implicitly changed provisioned values.
+ *
+ * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param value in Integer format.
+ */
+ public final void notifyProvisionedValueChanged(int item, int value) {
+ mImsConfigStub.updateCachedValue(item, value, true);
+ }
+
+ /**
+ * Updates provisioning value and notifies the framework of the change.
+ * Doesn't call #setProvisionedValue and assumes the result succeeded.
+ * This should only be used by modem when they implicitly changed provisioned values.
+ *
+ * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param value in String format.
+ */
+ public final void notifyProvisionedValueChanged(int item, String value) {
+ mImsConfigStub.updateCachedValue(item, value, true);
+ }
+
+ /**
+ * Implements the IImsConfig AIDL interface, which is called by potentially many processes
+ * in order to get/set configuration parameters.
+ *
+ * It holds an object of ImsConfigImplBase class which is usually extended by ImsConfigImpl
+ * with actual implementations from vendors. This class caches provisioned values from
+ * ImsConfigImpl layer because queries through ImsConfigImpl can be slow. When query goes in,
+ * it first checks cache layer. If missed, it will call the vendor implementation of
+ * ImsConfigImplBase API.
+ * and cache the return value if the set succeeds.
+ *
+ * Provides APIs to get/set the IMS service feature/capability/parameters.
+ * The config items include:
+ * 1) Items provisioned by the operator.
+ * 2) Items configured by user. Mainly service feature class.
+ *
+ * @hide
+ */
+ @VisibleForTesting
+ static public class ImsConfigStub extends IImsConfig.Stub {
+ Context mContext;
+ WeakReference<ImsConfigImplBase> mImsConfigImplBaseWeakReference;
+ private HashMap<Integer, Integer> mProvisionedIntValue = new HashMap<>();
+ private HashMap<Integer, String> mProvisionedStringValue = new HashMap<>();
+
+ @VisibleForTesting
+ public ImsConfigStub(ImsConfigImplBase imsConfigImplBase, Context context) {
+ mContext = context;
+ mImsConfigImplBaseWeakReference =
+ new WeakReference<ImsConfigImplBase>(imsConfigImplBase);
+ }
+
+ /**
+ * Gets the value for ims service/capabilities parameters. It first checks its local cache,
+ * if missed, it will call ImsConfigImplBase.getProvisionedValue.
+ * Synchronous blocking call.
+ *
+ * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @return value in Integer format.
+ */
+ @Override
+ public synchronized int getProvisionedValue(int item) throws RemoteException {
+ if (mProvisionedIntValue.containsKey(item)) {
+ return mProvisionedIntValue.get(item);
+ } else {
+ int retVal = getImsConfigImpl().getProvisionedValue(item);
+ if (retVal != ImsConfig.OperationStatusConstants.UNKNOWN) {
+ updateCachedValue(item, retVal, false);
+ }
+ return retVal;
+ }
+ }
+
+ /**
+ * Gets the value for ims service/capabilities parameters. It first checks its local cache,
+ * if missed, it will call #ImsConfigImplBase.getProvisionedValue.
+ * Synchronous blocking call.
+ *
+ * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @return value in String format.
+ */
+ @Override
+ public synchronized String getProvisionedStringValue(int item) throws RemoteException {
+ if (mProvisionedIntValue.containsKey(item)) {
+ return mProvisionedStringValue.get(item);
+ } else {
+ String retVal = getImsConfigImpl().getProvisionedStringValue(item);
+ if (retVal != null) {
+ updateCachedValue(item, retVal, false);
+ }
+ return retVal;
+ }
+ }
+
+ /**
+ * Sets the value for IMS service/capabilities parameters by the operator device
+ * management entity. It sets the config item value in the provisioned storage
+ * from which the master value is derived, and write it into local cache.
+ * Synchronous blocking call.
+ *
+ * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param value in Integer format.
+ * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
+ */
+ @Override
+ public synchronized int setProvisionedValue(int item, int value) throws RemoteException {
+ mProvisionedIntValue.remove(item);
+ int retVal = getImsConfigImpl().setProvisionedValue(item, value);
+ if (retVal == ImsConfig.OperationStatusConstants.SUCCESS) {
+ updateCachedValue(item, value, true);
+ } else {
+ Log.d(TAG, "Set provision value of " + item +
+ " to " + value + " failed with error code " + retVal);
+ }
+
+ return retVal;
+ }
+
+ /**
+ * Sets the value for IMS service/capabilities parameters by the operator device
+ * management entity. It sets the config item value in the provisioned storage
+ * from which the master value is derived, and write it into local cache.
+ * Synchronous blocking call.
+ *
+ * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param value in String format.
+ * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
+ */
+ @Override
+ public synchronized int setProvisionedStringValue(int item, String value)
+ throws RemoteException {
+ mProvisionedStringValue.remove(item);
+ int retVal = getImsConfigImpl().setProvisionedStringValue(item, value);
+ if (retVal == ImsConfig.OperationStatusConstants.SUCCESS) {
+ updateCachedValue(item, value, true);
+ }
+
+ return retVal;
+ }
+
+ /**
+ * Wrapper function to call ImsConfigImplBase.getFeatureValue.
+ */
+ @Override
+ public void getFeatureValue(int feature, int network, ImsConfigListener listener)
+ throws RemoteException {
+ getImsConfigImpl().getFeatureValue(feature, network, listener);
+ }
+
+ /**
+ * Wrapper function to call ImsConfigImplBase.setFeatureValue.
+ */
+ @Override
+ public void setFeatureValue(int feature, int network, int value, ImsConfigListener listener)
+ throws RemoteException {
+ getImsConfigImpl().setFeatureValue(feature, network, value, listener);
+ }
+
+ /**
+ * Wrapper function to call ImsConfigImplBase.getVolteProvisioned.
+ */
+ @Override
+ public boolean getVolteProvisioned() throws RemoteException {
+ return getImsConfigImpl().getVolteProvisioned();
+ }
+
+ /**
+ * Wrapper function to call ImsConfigImplBase.getVideoQuality.
+ */
+ @Override
+ public void getVideoQuality(ImsConfigListener listener) throws RemoteException {
+ getImsConfigImpl().getVideoQuality(listener);
+ }
+
+ /**
+ * Wrapper function to call ImsConfigImplBase.setVideoQuality.
+ */
+ @Override
+ public void setVideoQuality(int quality, ImsConfigListener listener)
+ throws RemoteException {
+ getImsConfigImpl().setVideoQuality(quality, listener);
+ }
+
+ private ImsConfigImplBase getImsConfigImpl() throws RemoteException {
+ ImsConfigImplBase ref = mImsConfigImplBaseWeakReference.get();
+ if (ref == null) {
+ throw new RemoteException("Fail to get ImsConfigImpl");
+ } else {
+ return ref;
+ }
+ }
+
+ private void sendImsConfigChangedIntent(int item, int value) {
+ sendImsConfigChangedIntent(item, Integer.toString(value));
+ }
+
+ private void sendImsConfigChangedIntent(int item, String value) {
+ Intent configChangedIntent = new Intent(ImsConfig.ACTION_IMS_CONFIG_CHANGED);
+ configChangedIntent.putExtra(ImsConfig.EXTRA_CHANGED_ITEM, item);
+ configChangedIntent.putExtra(ImsConfig.EXTRA_NEW_VALUE, value);
+ if (mContext != null) {
+ mContext.sendBroadcast(configChangedIntent);
+ }
+ }
+
+ protected synchronized void updateCachedValue(int item, int value, boolean notifyChange) {
+ mProvisionedIntValue.put(item, value);
+ if (notifyChange) {
+ sendImsConfigChangedIntent(item, value);
+ }
+ }
+
+ protected synchronized void updateCachedValue(
+ int item, String value, boolean notifyChange) {
+ mProvisionedStringValue.put(item, value);
+ if (notifyChange) {
+ sendImsConfigChangedIntent(item, value);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/ims/stub/ImsUtListenerImplBase.java b/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
similarity index 90%
rename from telephony/java/android/telephony/ims/stub/ImsUtListenerImplBase.java
rename to telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
index daa74c8..b2aa080 100644
--- a/telephony/java/android/telephony/ims/stub/ImsUtListenerImplBase.java
+++ b/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -14,15 +14,15 @@
* limitations under the License
*/
-package android.telephony.ims.stub;
+package android.telephony.ims.compat.stub;
import android.os.Bundle;
import android.os.RemoteException;
-import com.android.ims.ImsCallForwardInfo;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsSsData;
-import com.android.ims.ImsSsInfo;
+import android.telephony.ims.ImsCallForwardInfo;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsSsData;
+import android.telephony.ims.ImsSsInfo;
import com.android.ims.internal.IImsUt;
import com.android.ims.internal.IImsUtListener;
diff --git a/telephony/java/android/telephony/ims/internal/feature/CapabilityChangeRequest.aidl b/telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.aidl
similarity index 92%
rename from telephony/java/android/telephony/ims/internal/feature/CapabilityChangeRequest.aidl
rename to telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.aidl
index f4ec0eb..e789bd5 100644
--- a/telephony/java/android/telephony/ims/internal/feature/CapabilityChangeRequest.aidl
+++ b/telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.aidl
@@ -14,6 +14,6 @@
* limitations under the License
*/
-package android.telephony.ims.internal.feature;
+package android.telephony.ims.feature;
parcelable CapabilityChangeRequest;
diff --git a/telephony/java/android/telephony/ims/internal/feature/CapabilityChangeRequest.java b/telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.java
similarity index 79%
rename from telephony/java/android/telephony/ims/internal/feature/CapabilityChangeRequest.java
rename to telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.java
index 5dbf077..7c793a5 100644
--- a/telephony/java/android/telephony/ims/internal/feature/CapabilityChangeRequest.java
+++ b/telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -14,8 +14,9 @@
* limitations under the License
*/
-package android.telephony.ims.internal.feature;
+package android.telephony.ims.feature;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.ims.stub.ImsRegistrationImplBase;
@@ -30,17 +31,32 @@
* the request.
* {@hide}
*/
-public class CapabilityChangeRequest implements Parcelable {
+@SystemApi
+public final class CapabilityChangeRequest implements Parcelable {
+ /**
+ * Contains a feature capability, defined as
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT}, or
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS},
+ * along with an associated technology, defined as
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_LTE} or
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN}
+ */
public static class CapabilityPair {
private final int mCapability;
private final int radioTech;
- public CapabilityPair(int capability, int radioTech) {
+ public CapabilityPair(@MmTelFeature.MmTelCapabilities.MmTelCapability int capability,
+ @ImsRegistrationImplBase.ImsRegistrationTech int radioTech) {
this.mCapability = capability;
this.radioTech = radioTech;
}
+ /**
+ * @hide
+ */
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -52,6 +68,9 @@
return getRadioTech() == that.getRadioTech();
}
+ /**
+ * @hide
+ */
@Override
public int hashCode() {
int result = getCapability();
@@ -59,10 +78,22 @@
return result;
}
+ /**
+ * @return The stored capability, defined as
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT}, or
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS}
+ */
public @MmTelFeature.MmTelCapabilities.MmTelCapability int getCapability() {
return mCapability;
}
+ /**
+ * @return the stored radio technology, defined as
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_LTE} or
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN}
+ */
public @ImsRegistrationImplBase.ImsRegistrationTech int getRadioTech() {
return radioTech;
}
@@ -73,6 +104,7 @@
// Pair contains <radio tech, mCapability>
private final Set<CapabilityPair> mCapabilitiesToDisable;
+ /** @hide */
public CapabilityChangeRequest() {
mCapabilitiesToEnable = new ArraySet<>();
mCapabilitiesToDisable = new ArraySet<>();
@@ -130,6 +162,9 @@
}
}
+ /**
+ * @hide
+ */
protected CapabilityChangeRequest(Parcel in) {
int enableSize = in.readInt();
mCapabilitiesToEnable = new ArraySet<>(enableSize);
@@ -177,17 +212,24 @@
}
}
+ /**
+ * @hide
+ */
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof CapabilityChangeRequest)) return false;
- CapabilityChangeRequest that = (CapabilityChangeRequest) o;
+ CapabilityChangeRequest
+ that = (CapabilityChangeRequest) o;
if (!mCapabilitiesToEnable.equals(that.mCapabilitiesToEnable)) return false;
return mCapabilitiesToDisable.equals(that.mCapabilitiesToDisable);
}
+ /**
+ * @hide
+ */
@Override
public int hashCode() {
int result = mCapabilitiesToEnable.hashCode();
diff --git a/telephony/java/android/telephony/ims/feature/ImsFeature.java b/telephony/java/android/telephony/ims/feature/ImsFeature.java
index d47cea30..d537699 100644
--- a/telephony/java/android/telephony/ims/feature/ImsFeature.java
+++ b/telephony/java/android/telephony/ims/feature/ImsFeature.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -17,28 +17,35 @@
package android.telephony.ims.feature;
import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.SystemApi;
import android.content.Context;
import android.content.Intent;
import android.os.IInterface;
+import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.telephony.SubscriptionManager;
+import android.telephony.ims.aidl.IImsCapabilityCallback;
+import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.util.Log;
import com.android.ims.internal.IImsFeatureStatusCallback;
+import com.android.internal.annotations.VisibleForTesting;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
-import java.util.List;
import java.util.Set;
import java.util.WeakHashMap;
/**
- * Base class for all IMS features that are supported by the framework.
+ * Base class for all IMS features that are supported by the framework. Use a concrete subclass
+ * of {@link ImsFeature}, such as {@link MmTelFeature} or {@link RcsFeature}.
+ *
* @hide
*/
+@SystemApi
public abstract class ImsFeature {
private static final String LOG_TAG = "ImsFeature";
@@ -46,7 +53,8 @@
/**
* Action to broadcast when ImsService is up.
* Internal use only.
- * Only defined here separately compatibility purposes with the old ImsService.
+ * Only defined here separately for compatibility purposes with the old ImsService.
+ *
* @hide
*/
public static final String ACTION_IMS_SERVICE_UP =
@@ -56,6 +64,7 @@
* Action to broadcast when ImsService is down.
* Internal use only.
* Only defined here separately for compatibility purposes with the old ImsService.
+ *
* @hide
*/
public static final String ACTION_IMS_SERVICE_DOWN =
@@ -65,67 +74,331 @@
* Part of the ACTION_IMS_SERVICE_UP or _DOWN intents.
* A long value; the phone ID corresponding to the IMS service coming up or down.
* Only defined here separately for compatibility purposes with the old ImsService.
+ *
* @hide
*/
public static final String EXTRA_PHONE_ID = "android:phone_id";
- // Invalid feature value
- public static final int INVALID = -1;
+ /**
+ * Invalid feature value
+ * @hide
+ */
+ public static final int FEATURE_INVALID = -1;
// ImsFeatures that are defined in the Manifests. Ensure that these values match the previously
// defined values in ImsServiceClass for compatibility purposes.
- public static final int EMERGENCY_MMTEL = 0;
- public static final int MMTEL = 1;
- public static final int RCS = 2;
- // Total number of features defined
- public static final int MAX = 3;
+ /**
+ * This feature supports emergency calling over MMTEL. If defined, the framework will try to
+ * place an emergency call over IMS first. If it is not defined, the framework will only use
+ * CSFB for emergency calling.
+ */
+ public static final int FEATURE_EMERGENCY_MMTEL = 0;
+ /**
+ * This feature supports the MMTEL feature.
+ */
+ public static final int FEATURE_MMTEL = 1;
+ /**
+ * This feature supports the RCS feature.
+ */
+ public static final int FEATURE_RCS = 2;
+ /**
+ * Total number of features defined
+ * @hide
+ */
+ public static final int FEATURE_MAX = 3;
- // Integer values defining the state of the ImsFeature at any time.
+ /**
+ * Integer values defining IMS features that are supported in ImsFeature.
+ * @hide
+ */
@IntDef(flag = true,
value = {
- STATE_NOT_AVAILABLE,
+ FEATURE_EMERGENCY_MMTEL,
+ FEATURE_MMTEL,
+ FEATURE_RCS
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface FeatureType {}
+
+ /**
+ * Integer values defining the state of the ImsFeature at any time.
+ * @hide
+ */
+ @IntDef(flag = true,
+ value = {
+ STATE_UNAVAILABLE,
STATE_INITIALIZING,
STATE_READY,
})
@Retention(RetentionPolicy.SOURCE)
public @interface ImsState {}
- public static final int STATE_NOT_AVAILABLE = 0;
+
+ /**
+ * This {@link ImsFeature}'s state is unavailable and should not be communicated with.
+ */
+ public static final int STATE_UNAVAILABLE = 0;
+ /**
+ * This {@link ImsFeature} state is initializing and should not be communicated with.
+ */
public static final int STATE_INITIALIZING = 1;
+ /**
+ * This {@link ImsFeature} is ready for communication.
+ */
public static final int STATE_READY = 2;
+ /**
+ * Integer values defining the result codes that should be returned from
+ * {@link #changeEnabledCapabilities} when the framework tries to set a feature's capability.
+ * @hide
+ */
+ @IntDef(flag = true,
+ value = {
+ CAPABILITY_ERROR_GENERIC,
+ CAPABILITY_SUCCESS
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ImsCapabilityError {}
+
+ /**
+ * The capability was unable to be changed.
+ */
+ public static final int CAPABILITY_ERROR_GENERIC = -1;
+ /**
+ * The capability was able to be changed.
+ */
+ public static final int CAPABILITY_SUCCESS = 0;
+
+
+ /**
+ * The framework implements this callback in order to register for Feature Capability status
+ * updates, via {@link #onCapabilitiesStatusChanged(Capabilities)}, query Capability
+ * configurations, via {@link #onQueryCapabilityConfiguration}, as well as to receive error
+ * callbacks when the ImsService can not change the capability as requested, via
+ * {@link #onChangeCapabilityConfigurationError}.
+ *
+ * @hide
+ */
+ public static class CapabilityCallback extends IImsCapabilityCallback.Stub {
+
+ @Override
+ public final void onCapabilitiesStatusChanged(int config) throws RemoteException {
+ onCapabilitiesStatusChanged(new Capabilities(config));
+ }
+
+ /**
+ * Returns the result of a query for the capability configuration of a requested capability.
+ *
+ * @param capability The capability that was requested.
+ * @param radioTech The IMS radio technology associated with the capability.
+ * @param isEnabled true if the capability is enabled, false otherwise.
+ */
+ @Override
+ public void onQueryCapabilityConfiguration(int capability, int radioTech,
+ boolean isEnabled) {
+
+ }
+
+ /**
+ * Called when a change to the capability configuration has returned an error.
+ *
+ * @param capability The capability that was requested to be changed.
+ * @param radioTech The IMS radio technology associated with the capability.
+ * @param reason error associated with the failure to change configuration.
+ */
+ @Override
+ public void onChangeCapabilityConfigurationError(int capability, int radioTech,
+ @ImsCapabilityError int reason) {
+ }
+
+ /**
+ * The status of the feature's capabilities has changed to either available or unavailable.
+ * If unavailable, the feature is not able to support the unavailable capability at this
+ * time.
+ *
+ * @param config The new availability of the capabilities.
+ */
+ public void onCapabilitiesStatusChanged(Capabilities config) {
+ }
+ }
+
+ /**
+ * Used by the ImsFeature to call back to the CapabilityCallback that the framework has
+ * provided.
+ */
+ protected static class CapabilityCallbackProxy {
+ private final IImsCapabilityCallback mCallback;
+
+ /** @hide */
+ public CapabilityCallbackProxy(IImsCapabilityCallback c) {
+ mCallback = c;
+ }
+
+ /**
+ * This method notifies the provided framework callback that the request to change the
+ * indicated capability has failed and has not changed.
+ *
+ * @param capability The Capability that will be notified to the framework, defined as
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT}, or
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS}.
+ * @param radioTech The radio tech that this capability failed for, defined as
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_LTE} or
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN}.
+ * @param reason The reason this capability was unable to be changed, defined as
+ * {@link #CAPABILITY_ERROR_GENERIC} or {@link #CAPABILITY_SUCCESS}.
+ */
+ public void onChangeCapabilityConfigurationError(int capability, int radioTech,
+ @ImsCapabilityError int reason) {
+ if (mCallback == null) {
+ return;
+ }
+ try {
+ mCallback.onChangeCapabilityConfigurationError(capability, radioTech, reason);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "onChangeCapabilityConfigurationError called on dead binder.");
+ }
+ }
+ }
+
+ /**
+ * Contains the capabilities defined and supported by an ImsFeature in the form of a bit mask.
+ * @hide
+ */
+ public static class Capabilities {
+ protected int mCapabilities = 0;
+
+ public Capabilities() {
+ }
+
+ protected Capabilities(int capabilities) {
+ mCapabilities = capabilities;
+ }
+
+ /**
+ * @param capabilities Capabilities to be added to the configuration in the form of a
+ * bit mask.
+ */
+ public void addCapabilities(int capabilities) {
+ mCapabilities |= capabilities;
+ }
+
+ /**
+ * @param capabilities Capabilities to be removed to the configuration in the form of a
+ * bit mask.
+ */
+ public void removeCapabilities(int capabilities) {
+ mCapabilities &= ~capabilities;
+ }
+
+ /**
+ * @return true if all of the capabilities specified are capable.
+ */
+ public boolean isCapable(int capabilities) {
+ return (mCapabilities & capabilities) == capabilities;
+ }
+
+ /**
+ * @return a deep copy of the Capabilites.
+ */
+ public Capabilities copy() {
+ return new Capabilities(mCapabilities);
+ }
+
+ /**
+ * @return a bitmask containing the capability flags directly.
+ */
+ public int getMask() {
+ return mCapabilities;
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Capabilities)) return false;
+
+ Capabilities that = (Capabilities) o;
+
+ return mCapabilities == that.mCapabilities;
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public int hashCode() {
+ return mCapabilities;
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public String toString() {
+ return "Capabilities: " + Integer.toBinaryString(mCapabilities);
+ }
+ }
+
private final Set<IImsFeatureStatusCallback> mStatusCallbacks = Collections.newSetFromMap(
new WeakHashMap<IImsFeatureStatusCallback, Boolean>());
- private @ImsState int mState = STATE_NOT_AVAILABLE;
+ private @ImsState int mState = STATE_UNAVAILABLE;
private int mSlotId = SubscriptionManager.INVALID_SIM_SLOT_INDEX;
+ /**
+ * @hide
+ */
protected Context mContext;
+ private final Object mLock = new Object();
+ private final RemoteCallbackList<IImsCapabilityCallback> mCapabilityCallbacks
+ = new RemoteCallbackList<>();
+ private Capabilities mCapabilityStatus = new Capabilities();
- public void setContext(Context context) {
+ /**
+ * @hide
+ */
+ public final void initialize(Context context, int slotId) {
mContext = context;
- }
-
- public void setSlotId(int slotId) {
mSlotId = slotId;
}
+ /**
+ * @return The current state of the feature, defined as {@link #STATE_UNAVAILABLE},
+ * {@link #STATE_INITIALIZING}, or {@link #STATE_READY}.
+ * @hide
+ */
public int getFeatureState() {
- return mState;
- }
-
- protected final void setFeatureState(@ImsState int state) {
- if (mState != state) {
- mState = state;
- notifyFeatureState(state);
+ synchronized (mLock) {
+ return mState;
}
}
- public void addImsFeatureStatusCallback(IImsFeatureStatusCallback c) {
- if (c == null) {
- return;
+ /**
+ * Set the state of the ImsFeature. The state is used as a signal to the framework to start or
+ * stop communication, depending on the state sent.
+ * @param state The ImsFeature's state, defined as {@link #STATE_UNAVAILABLE},
+ * {@link #STATE_INITIALIZING}, or {@link #STATE_READY}.
+ */
+ public final void setFeatureState(@ImsState int state) {
+ synchronized (mLock) {
+ if (mState != state) {
+ mState = state;
+ notifyFeatureState(state);
+ }
}
+ }
+
+ /**
+ * Not final for testing, but shouldn't be extended!
+ * @hide
+ */
+ @VisibleForTesting
+ public void addImsFeatureStatusCallback(@NonNull IImsFeatureStatusCallback c) {
try {
// If we have just connected, send queued status.
- c.notifyImsFeatureStatus(mState);
+ c.notifyImsFeatureStatus(getFeatureState());
// Add the callback if the callback completes successfully without a RemoteException.
- synchronized (mStatusCallbacks) {
+ synchronized (mLock) {
mStatusCallbacks.add(c);
}
} catch (RemoteException e) {
@@ -133,23 +406,24 @@
}
}
- public void removeImsFeatureStatusCallback(IImsFeatureStatusCallback c) {
- if (c == null) {
- return;
- }
- synchronized (mStatusCallbacks) {
+ /**
+ * Not final for testing, but shouldn't be extended!
+ * @hide
+ */
+ @VisibleForTesting
+ public void removeImsFeatureStatusCallback(@NonNull IImsFeatureStatusCallback c) {
+ synchronized (mLock) {
mStatusCallbacks.remove(c);
}
}
/**
* Internal method called by ImsFeature when setFeatureState has changed.
- * @param state
*/
private void notifyFeatureState(@ImsState int state) {
- synchronized (mStatusCallbacks) {
+ synchronized (mLock) {
for (Iterator<IImsFeatureStatusCallback> iter = mStatusCallbacks.iterator();
- iter.hasNext(); ) {
+ iter.hasNext(); ) {
IImsFeatureStatusCallback callback = iter.next();
try {
Log.i(LOG_TAG, "notifying ImsFeatureState=" + state);
@@ -168,12 +442,12 @@
* Provide backwards compatibility using deprecated service UP/DOWN intents.
*/
private void sendImsServiceIntent(@ImsState int state) {
- if(mContext == null || mSlotId == SubscriptionManager.INVALID_SIM_SLOT_INDEX) {
+ if (mContext == null || mSlotId == SubscriptionManager.INVALID_SIM_SLOT_INDEX) {
return;
}
Intent intent;
switch (state) {
- case ImsFeature.STATE_NOT_AVAILABLE:
+ case ImsFeature.STATE_UNAVAILABLE:
case ImsFeature.STATE_INITIALIZING:
intent = new Intent(ACTION_IMS_SERVICE_DOWN);
break;
@@ -188,17 +462,104 @@
}
/**
- * Called when the feature is ready to use.
+ * @hide
*/
- public abstract void onFeatureReady();
+ public final void addCapabilityCallback(IImsCapabilityCallback c) {
+ mCapabilityCallbacks.register(c);
+ }
/**
- * Called when the feature is being removed and must be cleaned up.
+ * @hide
+ */
+ public final void removeCapabilityCallback(IImsCapabilityCallback c) {
+ mCapabilityCallbacks.unregister(c);
+ }
+
+ /**
+ * @return the cached capabilities status for this feature.
+ * @hide
+ */
+ @VisibleForTesting
+ public Capabilities queryCapabilityStatus() {
+ synchronized (mLock) {
+ return mCapabilityStatus.copy();
+ }
+ }
+
+ /**
+ * Called internally to request the change of enabled capabilities.
+ * @hide
+ */
+ @VisibleForTesting
+ public final void requestChangeEnabledCapabilities(CapabilityChangeRequest request,
+ IImsCapabilityCallback c) {
+ if (request == null) {
+ throw new IllegalArgumentException(
+ "ImsFeature#requestChangeEnabledCapabilities called with invalid params.");
+ }
+ changeEnabledCapabilities(request, new CapabilityCallbackProxy(c));
+ }
+
+ /**
+ * Called by the ImsFeature when the capabilities status has changed.
+ *
+ * @param c A {@link Capabilities} containing the new Capabilities status.
+ *
+ * @hide
+ */
+ protected final void notifyCapabilitiesStatusChanged(Capabilities c) {
+ synchronized (mLock) {
+ mCapabilityStatus = c.copy();
+ }
+ int count = mCapabilityCallbacks.beginBroadcast();
+ try {
+ for (int i = 0; i < count; i++) {
+ try {
+ mCapabilityCallbacks.getBroadcastItem(i).onCapabilitiesStatusChanged(
+ c.mCapabilities);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, e + " " + "notifyCapabilitiesStatusChanged() - Skipping " +
+ "callback.");
+ }
+ }
+ } finally {
+ mCapabilityCallbacks.finishBroadcast();
+ }
+ }
+
+ /**
+ * Features should override this method to receive Capability preference change requests from
+ * the framework using the provided {@link CapabilityChangeRequest}. If any of the capabilities
+ * in the {@link CapabilityChangeRequest} are not able to be completed due to an error,
+ * {@link CapabilityCallbackProxy#onChangeCapabilityConfigurationError} should be called for
+ * each failed capability.
+ *
+ * @param request A {@link CapabilityChangeRequest} containing requested capabilities to
+ * enable/disable.
+ * @param c A {@link CapabilityCallbackProxy}, which will be used to call back to the framework
+ * setting a subset of these capabilities fail, using
+ * {@link CapabilityCallbackProxy#onChangeCapabilityConfigurationError}.
+ */
+ public abstract void changeEnabledCapabilities(CapabilityChangeRequest request,
+ CapabilityCallbackProxy c);
+
+ /**
+ * Called when the framework is removing this feature and it needs to be cleaned up.
*/
public abstract void onFeatureRemoved();
/**
- * @return Binder instance
+ * Called when the feature has been initialized and communication with the framework is set up.
+ * Any attempt by this feature to access the framework before this method is called will return
+ * with an {@link IllegalStateException}.
+ * The IMS provider should use this method to trigger registration for this feature on the IMS
+ * network, if needed.
*/
- public abstract IInterface getBinder();
+ public abstract void onFeatureReady();
+
+ /**
+ * @return Binder instance that the framework will use to communicate with this feature.
+ * @hide
+ */
+ protected abstract IInterface getBinder();
}
diff --git a/telephony/java/android/telephony/ims/feature/MmTelFeature.java b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
new file mode 100644
index 0000000..bc790fb
--- /dev/null
+++ b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
@@ -0,0 +1,721 @@
+/*
+ * 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
+ */
+
+package android.telephony.ims.feature;
+
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
+import android.os.Bundle;
+import android.os.Message;
+import android.os.RemoteException;
+import android.telecom.TelecomManager;
+import android.telephony.ims.stub.ImsRegistrationImplBase;
+import android.telephony.ims.stub.ImsCallSessionImplBase;
+import android.telephony.ims.stub.ImsSmsImplBase;
+import android.telephony.ims.aidl.IImsCapabilityCallback;
+import android.telephony.ims.aidl.IImsMmTelFeature;
+import android.telephony.ims.aidl.IImsMmTelListener;
+import android.telephony.ims.aidl.IImsSmsListener;
+import android.telephony.ims.stub.ImsEcbmImplBase;
+import android.telephony.ims.stub.ImsMultiEndpointImplBase;
+import android.telephony.ims.stub.ImsUtImplBase;
+import android.util.Log;
+
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsReasonInfo;
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsEcbm;
+import com.android.ims.internal.IImsMultiEndpoint;
+import com.android.ims.internal.IImsUt;
+import android.telephony.ims.ImsCallSession;
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Base implementation for Voice and SMS (IR-92) and Video (IR-94) IMS support.
+ *
+ * Any class wishing to use MmTelFeature should extend this class and implement all methods that the
+ * service supports.
+ * @hide
+ */
+@SystemApi
+public class MmTelFeature extends ImsFeature {
+
+ private static final String LOG_TAG = "MmTelFeature";
+
+ private final IImsMmTelFeature mImsMMTelBinder = new IImsMmTelFeature.Stub() {
+
+ @Override
+ public void setListener(IImsMmTelListener l) throws RemoteException {
+ synchronized (mLock) {
+ MmTelFeature.this.setListener(l);
+ }
+ }
+
+ @Override
+ public int getFeatureState() throws RemoteException {
+ synchronized (mLock) {
+ try {
+ return MmTelFeature.this.getFeatureState();
+ } catch (Exception e) {
+ throw new RemoteException(e.getMessage());
+ }
+ }
+ }
+
+
+ @Override
+ public ImsCallProfile createCallProfile(int callSessionType, int callType)
+ throws RemoteException {
+ synchronized (mLock) {
+ try {
+ return MmTelFeature.this.createCallProfile(callSessionType, callType);
+ } catch (Exception e) {
+ throw new RemoteException(e.getMessage());
+ }
+ }
+ }
+
+ @Override
+ public IImsCallSession createCallSession(ImsCallProfile profile) throws RemoteException {
+ synchronized (mLock) {
+ return createCallSessionInterface(profile);
+ }
+ }
+
+ @Override
+ public int shouldProcessCall(String[] numbers) {
+ synchronized (mLock) {
+ return MmTelFeature.this.shouldProcessCall(numbers);
+ }
+ }
+
+ @Override
+ public IImsUt getUtInterface() throws RemoteException {
+ synchronized (mLock) {
+ return MmTelFeature.this.getUtInterface();
+ }
+ }
+
+ @Override
+ public IImsEcbm getEcbmInterface() throws RemoteException {
+ synchronized (mLock) {
+ return MmTelFeature.this.getEcbmInterface();
+ }
+ }
+
+ @Override
+ public void setUiTtyMode(int uiTtyMode, Message onCompleteMessage) throws RemoteException {
+ synchronized (mLock) {
+ try {
+ MmTelFeature.this.setUiTtyMode(uiTtyMode, onCompleteMessage);
+ } catch (Exception e) {
+ throw new RemoteException(e.getMessage());
+ }
+ }
+ }
+
+ @Override
+ public IImsMultiEndpoint getMultiEndpointInterface() throws RemoteException {
+ synchronized (mLock) {
+ return MmTelFeature.this.getMultiEndpointInterface();
+ }
+ }
+
+ @Override
+ public int queryCapabilityStatus() throws RemoteException {
+ synchronized (mLock) {
+ return MmTelFeature.this.queryCapabilityStatus().mCapabilities;
+ }
+ }
+
+ @Override
+ public void addCapabilityCallback(IImsCapabilityCallback c) {
+ // no need to lock, structure already handles multithreading.
+ MmTelFeature.this.addCapabilityCallback(c);
+ }
+
+ @Override
+ public void removeCapabilityCallback(IImsCapabilityCallback c) {
+ // no need to lock, structure already handles multithreading.
+ MmTelFeature.this.removeCapabilityCallback(c);
+ }
+
+ @Override
+ public void changeCapabilitiesConfiguration(CapabilityChangeRequest request,
+ IImsCapabilityCallback c) throws RemoteException {
+ synchronized (mLock) {
+ MmTelFeature.this.requestChangeEnabledCapabilities(request, c);
+ }
+ }
+
+ @Override
+ public void queryCapabilityConfiguration(int capability, int radioTech,
+ IImsCapabilityCallback c) {
+ synchronized (mLock) {
+ queryCapabilityConfigurationInternal(capability, radioTech, c);
+ }
+ }
+
+ @Override
+ public void setSmsListener(IImsSmsListener l) throws RemoteException {
+ synchronized (mLock) {
+ MmTelFeature.this.setSmsListener(l);
+ }
+ }
+
+ @Override
+ public void sendSms(int token, int messageRef, String format, String smsc, boolean retry,
+ byte[] pdu) {
+ synchronized (mLock) {
+ MmTelFeature.this.sendSms(token, messageRef, format, smsc, retry, pdu);
+ }
+ }
+
+ @Override
+ public void acknowledgeSms(int token, int messageRef, int result) {
+ synchronized (mLock) {
+ MmTelFeature.this.acknowledgeSms(token, messageRef, result);
+ }
+ }
+
+ @Override
+ public void acknowledgeSmsReport(int token, int messageRef, int result) {
+ synchronized (mLock) {
+ MmTelFeature.this.acknowledgeSmsReport(token, messageRef, result);
+ }
+ }
+
+ @Override
+ public String getSmsFormat() {
+ synchronized (mLock) {
+ return MmTelFeature.this.getSmsFormat();
+ }
+ }
+
+ @Override
+ public void onSmsReady() {
+ synchronized (mLock) {
+ MmTelFeature.this.onSmsReady();
+ }
+ }
+ };
+
+ /**
+ * Contains the capabilities defined and supported by a MmTelFeature in the form of a Bitmask.
+ * The capabilities that are used in MmTelFeature are defined as
+ * {@link MmTelCapabilities#CAPABILITY_TYPE_VOICE},
+ * {@link MmTelCapabilities#CAPABILITY_TYPE_VIDEO},
+ * {@link MmTelCapabilities#CAPABILITY_TYPE_UT}, and
+ * {@link MmTelCapabilities#CAPABILITY_TYPE_SMS}.
+ *
+ * The capabilities of this MmTelFeature will be set by the framework and can be queried with
+ * {@link #queryCapabilityStatus()}.
+ *
+ * This MmTelFeature can then return the status of each of these capabilities (enabled or not)
+ * by sending a {@link #notifyCapabilitiesStatusChanged} callback to the framework. The current
+ * status can also be queried using {@link #queryCapabilityStatus()}.
+ */
+ public static class MmTelCapabilities extends Capabilities {
+
+ /**
+ * @hide
+ */
+ @VisibleForTesting
+ public MmTelCapabilities() {
+ super();
+ }
+
+ public MmTelCapabilities(Capabilities c) {
+ mCapabilities = c.mCapabilities;
+ }
+
+ public MmTelCapabilities(int capabilities) {
+ mCapabilities = capabilities;
+ }
+
+ @IntDef(flag = true,
+ value = {
+ CAPABILITY_TYPE_VOICE,
+ CAPABILITY_TYPE_VIDEO,
+ CAPABILITY_TYPE_UT,
+ CAPABILITY_TYPE_SMS
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface MmTelCapability {}
+
+ /**
+ * This MmTelFeature supports Voice calling (IR.92)
+ */
+ public static final int CAPABILITY_TYPE_VOICE = 1 << 0;
+
+ /**
+ * This MmTelFeature supports Video (IR.94)
+ */
+ public static final int CAPABILITY_TYPE_VIDEO = 1 << 1;
+
+ /**
+ * This MmTelFeature supports XCAP over Ut for supplementary services. (IR.92)
+ */
+ public static final int CAPABILITY_TYPE_UT = 1 << 2;
+
+ /**
+ * This MmTelFeature supports SMS (IR.92)
+ */
+ public static final int CAPABILITY_TYPE_SMS = 1 << 3;
+
+ @Override
+ public final void addCapabilities(@MmTelCapability int capabilities) {
+ super.addCapabilities(capabilities);
+ }
+
+ @Override
+ public final void removeCapabilities(@MmTelCapability int capability) {
+ super.removeCapabilities(capability);
+ }
+
+ @Override
+ public final boolean isCapable(@MmTelCapability int capabilities) {
+ return super.isCapable(capabilities);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder("MmTel Capabilities - [");
+ builder.append("Voice: ");
+ builder.append(isCapable(CAPABILITY_TYPE_VOICE));
+ builder.append(" Video: ");
+ builder.append(isCapable(CAPABILITY_TYPE_VIDEO));
+ builder.append(" UT: ");
+ builder.append(isCapable(CAPABILITY_TYPE_UT));
+ builder.append(" SMS: ");
+ builder.append(isCapable(CAPABILITY_TYPE_SMS));
+ builder.append("]");
+ return builder.toString();
+ }
+ }
+
+ /**
+ * Listener that the framework implements for communication from the MmTelFeature.
+ * @hide
+ */
+ public static class Listener extends IImsMmTelListener.Stub {
+
+ /**
+ * Called when the IMS provider receives an incoming call.
+ * @param c The {@link ImsCallSession} associated with the new call.
+ */
+ @Override
+ public void onIncomingCall(IImsCallSession c, Bundle extras) {
+
+ }
+
+ /**
+ * Called when the IMS provider implicitly rejects an incoming call during setup.
+ * @param callProfile An {@link ImsCallProfile} with the call details.
+ * @param reason The {@link ImsReasonInfo} reason for call rejection.
+ */
+ @Override
+ public void onRejectedCall(ImsCallProfile callProfile, ImsReasonInfo reason) {
+
+ }
+
+ /**
+ * Updates the Listener when the voice message count for IMS has changed.
+ * @param count an integer representing the new message count.
+ */
+ @Override
+ public void onVoiceMessageCountUpdate(int count) {
+
+ }
+ }
+
+ /**
+ * To be returned by {@link #shouldProcessCall(String[])} when the ImsService should process the
+ * outgoing call as IMS.
+ */
+ public static final int PROCESS_CALL_IMS = 0;
+ /**
+ * To be returned by {@link #shouldProcessCall(String[])} when the telephony framework should
+ * not process the outgoing call as IMS and should instead use circuit switch.
+ */
+ public static final int PROCESS_CALL_CSFB = 1;
+
+ @IntDef(flag = true,
+ value = {
+ PROCESS_CALL_IMS,
+ PROCESS_CALL_CSFB
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ProcessCallResult {}
+
+
+ // Lock for feature synchronization
+ private final Object mLock = new Object();
+ private IImsMmTelListener mListener;
+
+ /**
+ * @param listener A {@link Listener} used when the MmTelFeature receives an incoming call and
+ * notifies the framework.
+ */
+ private void setListener(IImsMmTelListener listener) {
+ synchronized (mLock) {
+ mListener = listener;
+ }
+ if (mListener != null) {
+ onFeatureReady();
+ }
+ }
+
+ private void queryCapabilityConfigurationInternal(int capability, int radioTech,
+ IImsCapabilityCallback c) {
+ boolean enabled = queryCapabilityConfiguration(capability, radioTech);
+ try {
+ if (c != null) {
+ c.onQueryCapabilityConfiguration(capability, radioTech, enabled);
+ }
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "queryCapabilityConfigurationInternal called on dead binder!");
+ }
+ }
+
+ /**
+ * The current capability status that this MmTelFeature has defined is available. This
+ * configuration will be used by the platform to figure out which capabilities are CURRENTLY
+ * available to be used.
+ *
+ * Should be a subset of the capabilities that are enabled by the framework in
+ * {@link #changeEnabledCapabilities}.
+ * @return A copy of the current MmTelFeature capability status.
+ */
+ @Override
+ public final MmTelCapabilities queryCapabilityStatus() {
+ return new MmTelCapabilities(super.queryCapabilityStatus());
+ }
+
+ /**
+ * Notify the framework that the status of the Capabilities has changed. Even though the
+ * MmTelFeature capability may be enabled by the framework, the status may be disabled due to
+ * the feature being unavailable from the network.
+ * @param c The current capability status of the MmTelFeature. If a capability is disabled, then
+ * the status of that capability is disabled. This can happen if the network does not currently
+ * support the capability that is enabled. A capability that is disabled by the framework (via
+ * {@link #changeEnabledCapabilities}) should also show the status as disabled.
+ */
+ public final void notifyCapabilitiesStatusChanged(MmTelCapabilities c) {
+ super.notifyCapabilitiesStatusChanged(c);
+ }
+
+ /**
+ * Notify the framework of an incoming call.
+ * @param c The {@link ImsCallSessionImplBase} of the new incoming call.
+ */
+ public final void notifyIncomingCall(ImsCallSessionImplBase c, Bundle extras) {
+ synchronized (mLock) {
+ if (mListener == null) {
+ throw new IllegalStateException("Session is not available.");
+ }
+ try {
+ mListener.onIncomingCall(c.getServiceImpl(), extras);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ /**
+ * Notify the framework that a call has been implicitly rejected by this MmTelFeature
+ * during call setup.
+ * @param callProfile The {@link ImsCallProfile} IMS call profile with details.
+ * This can be null if no call information is available for the rejected call.
+ * @param reason The {@link ImsReasonInfo} call rejection reason.
+ */
+ public final void notifyRejectedCall(ImsCallProfile callProfile, ImsReasonInfo reason) {
+ synchronized (mLock) {
+ if (mListener == null) {
+ throw new IllegalStateException("Session is not available.");
+ }
+ try {
+ mListener.onRejectedCall(callProfile, reason);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ /**
+ *
+ * @hide
+ */
+ public final void notifyIncomingCallSession(IImsCallSession c, Bundle extras) {
+ synchronized (mLock) {
+ if (mListener == null) {
+ throw new IllegalStateException("Session is not available.");
+ }
+ try {
+ mListener.onIncomingCall(c, extras);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ /**
+ * Notify the framework of a change in the Voice Message count.
+ * @link count the new Voice Message count.
+ */
+ public final void notifyVoiceMessageCountUpdate(int count) {
+ synchronized (mLock) {
+ if (mListener == null) {
+ throw new IllegalStateException("Session is not available.");
+ }
+ try {
+ mListener.onVoiceMessageCountUpdate(count);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ /**
+ * Provides the MmTelFeature with the ability to return the framework Capability Configuration
+ * for a provided Capability. If the framework calls {@link #changeEnabledCapabilities} and
+ * includes a capability A to enable or disable, this method should return the correct enabled
+ * status for capability A.
+ * @param capability The capability that we are querying the configuration for.
+ * @return true if the capability is enabled, false otherwise.
+ */
+ public boolean queryCapabilityConfiguration(@MmTelCapabilities.MmTelCapability int capability,
+ @ImsRegistrationImplBase.ImsRegistrationTech int radioTech) {
+ // Base implementation - Override to provide functionality
+ return false;
+ }
+
+ /**
+ * The MmTelFeature should override this method to handle the enabling/disabling of
+ * MmTel Features, defined in {@link MmTelCapabilities.MmTelCapability}. The framework assumes
+ * the {@link CapabilityChangeRequest} was processed successfully. If a subset of capabilities
+ * could not be set to their new values,
+ * {@link CapabilityCallbackProxy#onChangeCapabilityConfigurationError} must be called
+ * individually for each capability whose processing resulted in an error.
+ *
+ * Enabling/Disabling a capability here indicates that the capability should be registered or
+ * deregistered (depending on the capability change) and become available or unavailable to
+ * the framework.
+ */
+ @Override
+ public void changeEnabledCapabilities(CapabilityChangeRequest request,
+ CapabilityCallbackProxy c) {
+ // Base implementation, no-op
+ }
+
+ /**
+ * Creates a {@link ImsCallProfile} from the service capabilities & IMS registration state.
+ *
+ * @param callSessionType a service type that is specified in {@link ImsCallProfile}
+ * {@link ImsCallProfile#SERVICE_TYPE_NONE}
+ * {@link ImsCallProfile#SERVICE_TYPE_NORMAL}
+ * {@link ImsCallProfile#SERVICE_TYPE_EMERGENCY}
+ * @param callType a call type that is specified in {@link ImsCallProfile}
+ * {@link ImsCallProfile#CALL_TYPE_VOICE}
+ * {@link ImsCallProfile#CALL_TYPE_VT}
+ * {@link ImsCallProfile#CALL_TYPE_VT_TX}
+ * {@link ImsCallProfile#CALL_TYPE_VT_RX}
+ * {@link ImsCallProfile#CALL_TYPE_VT_NODIR}
+ * {@link ImsCallProfile#CALL_TYPE_VS}
+ * {@link ImsCallProfile#CALL_TYPE_VS_TX}
+ * {@link ImsCallProfile#CALL_TYPE_VS_RX}
+ * @return a {@link ImsCallProfile} object
+ */
+ public ImsCallProfile createCallProfile(int callSessionType, int callType) {
+ // Base Implementation - Should be overridden
+ return null;
+ }
+
+ /**
+ * @hide
+ */
+ public IImsCallSession createCallSessionInterface(ImsCallProfile profile)
+ throws RemoteException {
+ ImsCallSessionImplBase s = MmTelFeature.this.createCallSession(profile);
+ return s != null ? s.getServiceImpl() : null;
+ }
+
+ /**
+ * Creates an {@link ImsCallSession} with the specified call profile.
+ * Use other methods, if applicable, instead of interacting with
+ * {@link ImsCallSession} directly.
+ *
+ * @param profile a call profile to make the call
+ */
+ public ImsCallSessionImplBase createCallSession(ImsCallProfile profile) {
+ // Base Implementation - Should be overridden
+ return null;
+ }
+
+ /**
+ * Called by the framework to determine if the outgoing call, designated by the outgoing
+ * {@link String}s, should be processed as an IMS call or CSFB call. If this method's
+ * functionality is not overridden, the platform will process every call as IMS as long as the
+ * MmTelFeature reports that the {@link MmTelCapabilities#CAPABILITY_TYPE_VOICE} capability is
+ * available.
+ * @param numbers An array of {@link String}s that will be used for placing the call. There can
+ * be multiple {@link String}s listed in the case when we want to place an outgoing
+ * call as a conference.
+ * @return a {@link ProcessCallResult} to the framework, which will be used to determine if the
+ * call will be placed over IMS or via CSFB.
+ */
+ public @ProcessCallResult int shouldProcessCall(String[] numbers) {
+ return PROCESS_CALL_IMS;
+ }
+
+ /**
+ *
+ * @hide
+ */
+ protected IImsUt getUtInterface() throws RemoteException {
+ ImsUtImplBase utImpl = getUt();
+ return utImpl != null ? utImpl.getInterface() : null;
+ }
+
+ /**
+ * @hide
+ */
+ protected IImsEcbm getEcbmInterface() throws RemoteException {
+ ImsEcbmImplBase ecbmImpl = getEcbm();
+ return ecbmImpl != null ? ecbmImpl.getImsEcbm() : null;
+ }
+
+ /**
+ * @hide
+ */
+ public IImsMultiEndpoint getMultiEndpointInterface() throws RemoteException {
+ ImsMultiEndpointImplBase multiendpointImpl = getMultiEndpoint();
+ return multiendpointImpl != null ? multiendpointImpl.getIImsMultiEndpoint() : null;
+ }
+
+ /**
+ * @return The {@link ImsUtImplBase} Ut interface implementation for the supplementary service
+ * configuration.
+ */
+ public ImsUtImplBase getUt() {
+ // Base Implementation - Should be overridden
+ return new ImsUtImplBase();
+ }
+
+ /**
+ * @return The {@link ImsEcbmImplBase} Emergency call-back mode interface for emergency VoLTE
+ * calls that support it.
+ */
+ public ImsEcbmImplBase getEcbm() {
+ // Base Implementation - Should be overridden
+ return new ImsEcbmImplBase();
+ }
+
+ /**
+ * @return The {@link ImsMultiEndpointImplBase} implementation for implementing Dialog event
+ * package processing for multi-endpoint.
+ */
+ public ImsMultiEndpointImplBase getMultiEndpoint() {
+ // Base Implementation - Should be overridden
+ return new ImsMultiEndpointImplBase();
+ }
+
+ /**
+ * Sets the current UI TTY mode for the MmTelFeature.
+ * @param mode An integer containing the new UI TTY Mode, can consist of
+ * {@link TelecomManager#TTY_MODE_OFF},
+ * {@link TelecomManager#TTY_MODE_FULL},
+ * {@link TelecomManager#TTY_MODE_HCO},
+ * {@link TelecomManager#TTY_MODE_VCO}
+ * @param onCompleteMessage If non-null, this MmTelFeature should call this {@link Message} when
+ * the operation is complete by using the associated {@link android.os.Messenger} in
+ * {@link Message#replyTo}. For example:
+ * {@code
+ * // Set UI TTY Mode and other operations...
+ * try {
+ * // Notify framework that the mode was changed.
+ * Messenger uiMessenger = onCompleteMessage.replyTo;
+ * uiMessenger.send(onCompleteMessage);
+ * } catch (RemoteException e) {
+ * // Remote side is dead
+ * }
+ * }
+ */
+ public void setUiTtyMode(int mode, Message onCompleteMessage) {
+ // Base Implementation - Should be overridden
+ }
+
+ private void setSmsListener(IImsSmsListener listener) {
+ getSmsImplementation().registerSmsListener(listener);
+ }
+
+ private void sendSms(int token, int messageRef, String format, String smsc, boolean isRetry,
+ byte[] pdu) {
+ getSmsImplementation().sendSms(token, messageRef, format, smsc, isRetry, pdu);
+ }
+
+ private void acknowledgeSms(int token, int messageRef,
+ @ImsSmsImplBase.DeliverStatusResult int result) {
+ getSmsImplementation().acknowledgeSms(token, messageRef, result);
+ }
+
+ private void acknowledgeSmsReport(int token, int messageRef,
+ @ImsSmsImplBase.StatusReportResult int result) {
+ getSmsImplementation().acknowledgeSmsReport(token, messageRef, result);
+ }
+
+ private void onSmsReady() {
+ getSmsImplementation().onReady();
+ }
+
+ /**
+ * Must be overridden by IMS Provider to be able to support SMS over IMS. Otherwise a default
+ * non-functional implementation is returned.
+ *
+ * @return an instance of {@link ImsSmsImplBase} which should be implemented by the IMS
+ * Provider.
+ */
+ public ImsSmsImplBase getSmsImplementation() {
+ return new ImsSmsImplBase();
+ }
+
+ private String getSmsFormat() {
+ return getSmsImplementation().getSmsFormat();
+ }
+
+ /**{@inheritDoc}*/
+ @Override
+ public void onFeatureRemoved() {
+ // Base Implementation - Should be overridden
+ }
+
+ /**{@inheritDoc}*/
+ @Override
+ public void onFeatureReady() {
+ // Base Implementation - Should be overridden
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public final IImsMmTelFeature getBinder() {
+ return mImsMMTelBinder;
+ }
+}
diff --git a/telephony/java/android/telephony/ims/feature/RcsFeature.java b/telephony/java/android/telephony/ims/feature/RcsFeature.java
index 40c5181..a637e16 100644
--- a/telephony/java/android/telephony/ims/feature/RcsFeature.java
+++ b/telephony/java/android/telephony/ims/feature/RcsFeature.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -16,16 +16,18 @@
package android.telephony.ims.feature;
-import com.android.ims.internal.IImsRcsFeature;
+import android.annotation.SystemApi;
+import android.telephony.ims.aidl.IImsRcsFeature;
/**
* Base implementation of the RcsFeature APIs. Any ImsService wishing to support RCS should extend
* this class and provide implementations of the RcsFeature methods that they support.
* @hide
*/
-
+@SystemApi
public class RcsFeature extends ImsFeature {
+ /**{@inheritDoc}*/
private final IImsRcsFeature mImsRcsBinder = new IImsRcsFeature.Stub() {
// Empty Default Implementation.
};
@@ -35,16 +37,30 @@
super();
}
+ /**
+ * {@inheritDoc}
+ */
@Override
- public void onFeatureReady() {
-
+ public void changeEnabledCapabilities(CapabilityChangeRequest request,
+ CapabilityCallbackProxy c) {
+ // Do nothing for base implementation.
}
+ /**{@inheritDoc}*/
@Override
public void onFeatureRemoved() {
}
+ /**{@inheritDoc}*/
+ @Override
+ public void onFeatureReady() {
+
+ }
+
+ /**
+ * @hide
+ */
@Override
public final IImsRcsFeature getBinder() {
return mImsRcsBinder;
diff --git a/telephony/java/android/telephony/ims/internal/ImsCallSessionListener.java b/telephony/java/android/telephony/ims/internal/ImsCallSessionListener.java
deleted file mode 100644
index 5d16dd5..0000000
--- a/telephony/java/android/telephony/ims/internal/ImsCallSessionListener.java
+++ /dev/null
@@ -1,364 +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
- */
-
-package android.telephony.ims.internal;
-
-import android.os.RemoteException;
-import android.telephony.ims.internal.aidl.IImsCallSessionListener;
-
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsConferenceState;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsSuppServiceNotification;
-import com.android.ims.internal.ImsCallSession;
-
-/**
- * Proxy class for interfacing with the framework's Call session for an ongoing IMS call.
- *
- * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
- * will break other implementations of ImsCallSessionListener maintained by other ImsServices.
- *
- * @hide
- */
-public class ImsCallSessionListener {
-
- private final IImsCallSessionListener mListener;
-
- public ImsCallSessionListener(IImsCallSessionListener l) {
- mListener = l;
- }
-
- /**
- * Called when a request is sent out to initiate a new session
- * and 1xx response is received from the network.
- */
- public void callSessionProgressing(ImsStreamMediaProfile profile)
- throws RemoteException {
- mListener.callSessionProgressing(profile);
- }
-
- /**
- * Called when the session is initiated.
- *
- * @param profile the associated {@link ImsCallSession}.
- */
- public void callSessionInitiated(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionInitiated(profile);
- }
-
- /**
- * Called when the session establishment has failed.
- *
- * @param reasonInfo detailed reason of the session establishment failure
- */
- public void callSessionInitiatedFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionInitiatedFailed(reasonInfo);
- }
-
- /**
- * Called when the session is terminated.
- *
- * @param reasonInfo detailed reason of the session termination
- */
- public void callSessionTerminated(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionTerminated(reasonInfo);
- }
-
- /**
- * Called when the session is on hold.
- */
- public void callSessionHeld(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionHeld(profile);
- }
-
- /**
- * Called when the session hold has failed.
- *
- * @param reasonInfo detailed reason of the session hold failure
- */
- public void callSessionHoldFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionHoldFailed(reasonInfo);
- }
-
- /**
- * Called when the session hold is received from the remote user.
- */
- public void callSessionHoldReceived(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionHoldReceived(profile);
- }
-
- /**
- * Called when the session resume is done.
- */
- public void callSessionResumed(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionResumed(profile);
- }
-
- /**
- * Called when the session resume has failed.
- *
- * @param reasonInfo detailed reason of the session resume failure
- */
- public void callSessionResumeFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionResumeFailed(reasonInfo);
- }
-
- /**
- * Called when the session resume is received from the remote user.
- */
- public void callSessionResumeReceived(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionResumeReceived(profile);
- }
-
- /**
- * Called when the session merge has been started. At this point, the {@code newSession}
- * represents the session which has been initiated to the IMS conference server for the
- * new merged conference.
- *
- * @param newSession the session object that is merged with an active & hold session
- */
- public void callSessionMergeStarted(ImsCallSession newSession, ImsCallProfile profile)
- throws RemoteException {
- mListener.callSessionMergeStarted(newSession != null ? newSession.getSession() : null,
- profile);
- }
-
- /**
- * Called when the session merge is successful and the merged session is active.
- *
- * @param newSession the new session object that is used for the conference
- */
- public void callSessionMergeComplete(ImsCallSession newSession) throws RemoteException {
- mListener.callSessionMergeComplete(newSession != null ? newSession.getSession() : null);
- }
-
- /**
- * Called when the session merge has failed.
- *
- * @param reasonInfo detailed reason of the call merge failure
- */
- public void callSessionMergeFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionMergeFailed(reasonInfo);
- }
-
- /**
- * Called when the session is updated (except for hold/unhold).
- */
- public void callSessionUpdated(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionUpdated(profile);
- }
-
- /**
- * Called when the session update has failed.
- *
- * @param reasonInfo detailed reason of the session update failure
- */
- public void callSessionUpdateFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionUpdateFailed(reasonInfo);
- }
-
- /**
- * Called when the session update is received from the remote user.
- */
- public void callSessionUpdateReceived(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionUpdateReceived(profile);
- }
-
- /**
- * Called when the session has been extended to a conference session.
- *
- * @param newSession the session object that is extended to the conference
- * from the active session
- */
- public void callSessionConferenceExtended(ImsCallSession newSession, ImsCallProfile profile)
- throws RemoteException {
- mListener.callSessionConferenceExtended(newSession != null ? newSession.getSession() : null,
- profile);
- }
-
- /**
- * Called when the conference extension has failed.
- *
- * @param reasonInfo detailed reason of the conference extension failure
- */
- public void callSessionConferenceExtendFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionConferenceExtendFailed(reasonInfo);
- }
-
- /**
- * Called when the conference extension is received from the remote user.
- */
- public void callSessionConferenceExtendReceived(ImsCallSession newSession,
- ImsCallProfile profile) throws RemoteException {
- mListener.callSessionConferenceExtendReceived(newSession != null
- ? newSession.getSession() : null, profile);
- }
-
- /**
- * Called when the invitation request of the participants is delivered to the conference
- * server.
- */
- public void callSessionInviteParticipantsRequestDelivered() throws RemoteException {
- mListener.callSessionInviteParticipantsRequestDelivered();
- }
-
- /**
- * Called when the invitation request of the participants has failed.
- *
- * @param reasonInfo detailed reason of the conference invitation failure
- */
- public void callSessionInviteParticipantsRequestFailed(ImsReasonInfo reasonInfo)
- throws RemoteException {
- mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
- }
-
- /**
- * Called when the removal request of the participants is delivered to the conference
- * server.
- */
- public void callSessionRemoveParticipantsRequestDelivered() throws RemoteException {
- mListener.callSessionRemoveParticipantsRequestDelivered();
- }
-
- /**
- * Called when the removal request of the participants has failed.
- *
- * @param reasonInfo detailed reason of the conference removal failure
- */
- public void callSessionRemoveParticipantsRequestFailed(ImsReasonInfo reasonInfo)
- throws RemoteException {
- mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
- }
-
- /**
- * Notifies the framework of the updated Call session conference state.
- *
- * @param state the new {@link ImsConferenceState} associated with the conference.
- */
- public void callSessionConferenceStateUpdated(ImsConferenceState state) throws RemoteException {
- mListener.callSessionConferenceStateUpdated(state);
- }
-
- /**
- * Notifies the incoming USSD message.
- */
- public void callSessionUssdMessageReceived(int mode, String ussdMessage)
- throws RemoteException {
- mListener.callSessionUssdMessageReceived(mode, ussdMessage);
- }
-
- /**
- * Notifies of a case where a {@link com.android.ims.internal.ImsCallSession} may potentially
- * handover from one radio technology to another.
- *
- * @param srcAccessTech The source radio access technology; one of the access technology
- * constants defined in {@link android.telephony.ServiceState}. For
- * example
- * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
- * @param targetAccessTech The target radio access technology; one of the access technology
- * constants defined in {@link android.telephony.ServiceState}. For
- * example
- * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
- */
- public void callSessionMayHandover(int srcAccessTech, int targetAccessTech)
- throws RemoteException {
- mListener.callSessionMayHandover(srcAccessTech, targetAccessTech);
- }
-
- /**
- * Called when session access technology changes.
- *
- * @param srcAccessTech original access technology
- * @param targetAccessTech new access technology
- * @param reasonInfo
- */
- public void callSessionHandover(int srcAccessTech, int targetAccessTech,
- ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionHandover(srcAccessTech, targetAccessTech, reasonInfo);
- }
-
- /**
- * Called when session access technology change fails.
- *
- * @param srcAccessTech original access technology
- * @param targetAccessTech new access technology
- * @param reasonInfo handover failure reason
- */
- public void callSessionHandoverFailed(int srcAccessTech, int targetAccessTech,
- ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionHandoverFailed(srcAccessTech, targetAccessTech, reasonInfo);
- }
-
- /**
- * Called when the TTY mode is changed by the remote party.
- *
- * @param mode one of the following: -
- * {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} -
- * {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} -
- * {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} -
- * {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
- */
- public void callSessionTtyModeReceived(int mode) throws RemoteException {
- mListener.callSessionTtyModeReceived(mode);
- }
-
- /**
- * Called when the multiparty state is changed for this {@code ImsCallSession}.
- *
- * @param isMultiParty {@code true} if the session became multiparty,
- * {@code false} otherwise.
- */
-
- public void callSessionMultipartyStateChanged(boolean isMultiParty) throws RemoteException {
- mListener.callSessionMultipartyStateChanged(isMultiParty);
- }
-
- /**
- * Called when the supplementary service information is received for the current session.
- */
- public void callSessionSuppServiceReceived(ImsSuppServiceNotification suppSrvNotification)
- throws RemoteException {
- mListener.callSessionSuppServiceReceived(suppSrvNotification);
- }
-
- /**
- * Received RTT modify request from the remote party.
- *
- * @param callProfile ImsCallProfile with updated attributes
- */
- public void callSessionRttModifyRequestReceived(ImsCallProfile callProfile)
- throws RemoteException {
- mListener.callSessionRttModifyRequestReceived(callProfile);
- }
-
- /**
- * @param status the received response for RTT modify request.
- */
- public void callSessionRttModifyResponseReceived(int status) throws RemoteException {
- mListener.callSessionRttModifyResponseReceived(status);
- }
-
- /**
- * Device received RTT message from Remote UE.
- *
- * @param rttMessage RTT message received
- */
- public void callSessionRttMessageReceived(String rttMessage) throws RemoteException {
- mListener.callSessionRttMessageReceived(rttMessage);
- }
-}
-
diff --git a/telephony/java/android/telephony/ims/internal/ImsService.java b/telephony/java/android/telephony/ims/internal/ImsService.java
deleted file mode 100644
index afaf332..0000000
--- a/telephony/java/android/telephony/ims/internal/ImsService.java
+++ /dev/null
@@ -1,339 +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
- */
-
-package android.telephony.ims.internal;
-
-import android.app.Service;
-import android.content.Intent;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.telephony.CarrierConfigManager;
-import android.telephony.ims.internal.aidl.IImsConfig;
-import android.telephony.ims.internal.aidl.IImsMmTelFeature;
-import android.telephony.ims.internal.aidl.IImsRcsFeature;
-import android.telephony.ims.internal.aidl.IImsServiceController;
-import android.telephony.ims.internal.aidl.IImsServiceControllerListener;
-import android.telephony.ims.internal.feature.ImsFeature;
-import android.telephony.ims.internal.feature.MmTelFeature;
-import android.telephony.ims.internal.feature.RcsFeature;
-import android.telephony.ims.internal.stub.ImsConfigImplBase;
-import android.telephony.ims.internal.stub.ImsFeatureConfiguration;
-import android.telephony.ims.stub.ImsRegistrationImplBase;
-import android.util.Log;
-import android.util.SparseArray;
-
-import com.android.ims.internal.IImsFeatureStatusCallback;
-import com.android.ims.internal.IImsRegistration;
-import com.android.internal.annotations.VisibleForTesting;
-
-/**
- * Main ImsService implementation, which binds via the Telephony ImsResolver. Services that extend
- * ImsService must register the service in their AndroidManifest to be detected by the framework.
- * First, the application must declare that they use the "android.permission.BIND_IMS_SERVICE"
- * permission. Then, the ImsService definition in the manifest must follow the following format:
- *
- * ...
- * <service android:name=".EgImsService"
- * android:permission="android.permission.BIND_IMS_SERVICE" >
- * <!-- Apps must declare which features they support as metadata. The different categories are
- * defined below. In this example, the RCS_FEATURE feature is supported. -->
- * <meta-data android:name="android.telephony.ims.RCS_FEATURE" android:value="true" />
- * <intent-filter>
- * <action android:name="android.telephony.ims.ImsService" />
- * </intent-filter>
- * </service>
- * ...
- *
- * The telephony framework will then bind to the ImsService you have defined in your manifest
- * if you are either:
- * 1) Defined as the default ImsService for the device in the device overlay using
- * "config_ims_package".
- * 2) Defined as a Carrier Provided ImsService in the Carrier Configuration using
- * {@link CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING}.
- *
- * The features that are currently supported in an ImsService are:
- * - RCS_FEATURE: This ImsService implements the RcsFeature class.
- * - MMTEL_FEATURE: This ImsService implements the MmTelFeature class.
- * @hide
- */
-public class ImsService extends Service {
-
- private static final String LOG_TAG = "ImsService";
-
- /**
- * The intent that must be defined as an intent-filter in the AndroidManifest of the ImsService.
- * @hide
- */
- public static final String SERVICE_INTERFACE = "android.telephony.ims.ImsService";
-
- // A map of slot Id -> map of features (indexed by ImsFeature feature id) corresponding to that
- // slot.
- // We keep track of this to facilitate cleanup of the IImsFeatureStatusCallback and
- // call ImsFeature#onFeatureRemoved.
- private final SparseArray<SparseArray<ImsFeature>> mFeaturesBySlot = new SparseArray<>();
-
- private IImsServiceControllerListener mListener;
-
-
- /**
- * Listener that notifies the framework of ImsService changes.
- */
- public static class Listener extends IImsServiceControllerListener.Stub {
- /**
- * The IMS features that this ImsService supports has changed.
- * @param c a new {@link ImsFeatureConfiguration} containing {@link ImsFeature.FeatureType}s
- * that this ImsService supports. This may trigger the addition/removal of feature
- * in this service.
- */
- public void onUpdateSupportedImsFeatures(ImsFeatureConfiguration c) {
- }
- }
-
- /**
- * @hide
- */
- protected final IBinder mImsServiceController = new IImsServiceController.Stub() {
- @Override
- public void setListener(IImsServiceControllerListener l) {
- mListener = l;
- }
-
- @Override
- public IImsMmTelFeature createMmTelFeature(int slotId, IImsFeatureStatusCallback c) {
- return createMmTelFeatureInternal(slotId, c);
- }
-
- @Override
- public IImsRcsFeature createRcsFeature(int slotId, IImsFeatureStatusCallback c) {
- return createRcsFeatureInternal(slotId, c);
- }
-
- @Override
- public void removeImsFeature(int slotId, int featureType, IImsFeatureStatusCallback c)
- throws RemoteException {
- ImsService.this.removeImsFeature(slotId, featureType, c);
- }
-
- @Override
- public ImsFeatureConfiguration querySupportedImsFeatures() {
- return ImsService.this.querySupportedImsFeatures();
- }
-
- @Override
- public void notifyImsServiceReadyForFeatureCreation() {
- ImsService.this.readyForFeatureCreation();
- }
-
- @Override
- public void notifyImsFeatureReady(int slotId, int featureType)
- throws RemoteException {
- ImsService.this.notifyImsFeatureReady(slotId, featureType);
- }
-
- @Override
- public IImsConfig getConfig(int slotId) throws RemoteException {
- ImsConfigImplBase c = ImsService.this.getConfig(slotId);
- return c != null ? c.getBinder() : null;
- }
-
- @Override
- public IImsRegistration getRegistration(int slotId) throws RemoteException {
- ImsRegistrationImplBase r = ImsService.this.getRegistration(slotId);
- return r != null ? r.getBinder() : null;
- }
- };
-
- /**
- * @hide
- */
- @Override
- public IBinder onBind(Intent intent) {
- if(SERVICE_INTERFACE.equals(intent.getAction())) {
- Log.i(LOG_TAG, "ImsService Bound.");
- return mImsServiceController;
- }
- return null;
- }
-
- /**
- * @hide
- */
- @VisibleForTesting
- public SparseArray<ImsFeature> getFeatures(int slotId) {
- return mFeaturesBySlot.get(slotId);
- }
-
- private IImsMmTelFeature createMmTelFeatureInternal(int slotId,
- IImsFeatureStatusCallback c) {
- MmTelFeature f = createMmTelFeature(slotId);
- if (f != null) {
- setupFeature(f, slotId, ImsFeature.FEATURE_MMTEL, c);
- return f.getBinder();
- } else {
- Log.e(LOG_TAG, "createMmTelFeatureInternal: null feature returned.");
- return null;
- }
- }
-
- private IImsRcsFeature createRcsFeatureInternal(int slotId,
- IImsFeatureStatusCallback c) {
- RcsFeature f = createRcsFeature(slotId);
- if (f != null) {
- setupFeature(f, slotId, ImsFeature.FEATURE_RCS, c);
- return f.getBinder();
- } else {
- Log.e(LOG_TAG, "createRcsFeatureInternal: null feature returned.");
- return null;
- }
- }
-
- private void setupFeature(ImsFeature f, int slotId, int featureType,
- IImsFeatureStatusCallback c) {
- f.addImsFeatureStatusCallback(c);
- f.initialize(this, slotId);
- addImsFeature(slotId, featureType, f);
- }
-
- private void addImsFeature(int slotId, int featureType, ImsFeature f) {
- synchronized (mFeaturesBySlot) {
- // Get SparseArray for Features, by querying slot Id
- SparseArray<ImsFeature> features = mFeaturesBySlot.get(slotId);
- if (features == null) {
- // Populate new SparseArray of features if it doesn't exist for this slot yet.
- features = new SparseArray<>();
- mFeaturesBySlot.put(slotId, features);
- }
- features.put(featureType, f);
- }
- }
-
- private void removeImsFeature(int slotId, int featureType,
- IImsFeatureStatusCallback c) {
- synchronized (mFeaturesBySlot) {
- // get ImsFeature associated with the slot/feature
- SparseArray<ImsFeature> features = mFeaturesBySlot.get(slotId);
- if (features == null) {
- Log.w(LOG_TAG, "Can not remove ImsFeature. No ImsFeatures exist on slot "
- + slotId);
- return;
- }
- ImsFeature f = features.get(featureType);
- if (f == null) {
- Log.w(LOG_TAG, "Can not remove ImsFeature. No feature with type "
- + featureType + " exists on slot " + slotId);
- return;
- }
- f.removeImsFeatureStatusCallback(c);
- f.onFeatureRemoved();
- features.remove(featureType);
- }
- }
-
- private void notifyImsFeatureReady(int slotId, int featureType) {
- synchronized (mFeaturesBySlot) {
- // get ImsFeature associated with the slot/feature
- SparseArray<ImsFeature> features = mFeaturesBySlot.get(slotId);
- if (features == null) {
- Log.w(LOG_TAG, "Can not notify ImsFeature ready. No ImsFeatures exist on " +
- "slot " + slotId);
- return;
- }
- ImsFeature f = features.get(featureType);
- if (f == null) {
- Log.w(LOG_TAG, "Can not notify ImsFeature ready. No feature with type "
- + featureType + " exists on slot " + slotId);
- return;
- }
- f.onFeatureReady();
- }
- }
-
- /**
- * When called, provide the {@link ImsFeatureConfiguration} that this ImsService currently
- * supports. This will trigger the framework to set up the {@link ImsFeature}s that correspond
- * to the {@link ImsFeature.FeatureType}s configured here.
- * @return an {@link ImsFeatureConfiguration} containing Features this ImsService supports,
- * defined in {@link ImsFeature.FeatureType}.
- */
- public ImsFeatureConfiguration querySupportedImsFeatures() {
- // Return empty for base implementation
- return new ImsFeatureConfiguration();
- }
-
- /**
- * Updates the framework with a new {@link ImsFeatureConfiguration} containing the updated
- * features, defined in {@link ImsFeature.FeatureType} that this ImsService supports. This may
- * trigger the framework to add/remove new ImsFeatures, depending on the configuration.
- */
- public final void onUpdateSupportedImsFeatures(ImsFeatureConfiguration c)
- throws RemoteException {
- if (mListener == null) {
- throw new IllegalStateException("Framework is not ready");
- }
- mListener.onUpdateSupportedImsFeatures(c);
- }
-
- /**
- * The ImsService has been bound and is ready for ImsFeature creation based on the Features that
- * the ImsService has registered for with the framework, either in the manifest or via
- * The ImsService should use this signal instead of onCreate/onBind or similar to perform
- * feature initialization because the framework may bind to this service multiple times to
- * query the ImsService's {@link ImsFeatureConfiguration} via
- * {@link #querySupportedImsFeatures()}before creating features.
- */
- public void readyForFeatureCreation() {
- }
-
- /**
- * When called, the framework is requesting that a new MmTelFeature is created for the specified
- * slot.
- *
- * @param slotId The slot ID that the MMTel Feature is being created for.
- * @return The newly created MmTelFeature associated with the slot or null if the feature is not
- * supported.
- */
- public MmTelFeature createMmTelFeature(int slotId) {
- return null;
- }
-
- /**
- * When called, the framework is requesting that a new RcsFeature is created for the specified
- * slot
- *
- * @param slotId The slot ID that the RCS Feature is being created for.
- * @return The newly created RcsFeature associated with the slot or null if the feature is not
- * supported.
- */
- public RcsFeature createRcsFeature(int slotId) {
- return null;
- }
-
- /**
- * @param slotId The slot that the IMS configuration is associated with.
- * @return ImsConfig implementation that is associated with the specified slot.
- */
- public ImsConfigImplBase getConfig(int slotId) {
- return new ImsConfigImplBase();
- }
-
- /**
- * @param slotId The slot that is associated with the IMS Registration.
- * @return the ImsRegistration implementation associated with the slot.
- */
- public ImsRegistrationImplBase getRegistration(int slotId) {
- return new ImsRegistrationImplBase();
- }
-}
diff --git a/telephony/java/android/telephony/ims/internal/SmsImplBase.java b/telephony/java/android/telephony/ims/internal/SmsImplBase.java
deleted file mode 100644
index 47414cf..0000000
--- a/telephony/java/android/telephony/ims/internal/SmsImplBase.java
+++ /dev/null
@@ -1,260 +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
- */
-
-package android.telephony.ims.internal;
-
-import android.annotation.IntDef;
-import android.annotation.SystemApi;
-import android.os.RemoteException;
-import android.telephony.SmsManager;
-import android.telephony.SmsMessage;
-import android.telephony.ims.internal.aidl.IImsSmsListener;
-import android.telephony.ims.internal.feature.MmTelFeature;
-import android.util.Log;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Base implementation for SMS over IMS.
- *
- * Any service wishing to provide SMS over IMS should extend this class and implement all methods
- * that the service supports.
- * @hide
- */
-public class SmsImplBase {
- private static final String LOG_TAG = "SmsImplBase";
-
- @IntDef({
- SEND_STATUS_OK,
- SEND_STATUS_ERROR,
- SEND_STATUS_ERROR_RETRY,
- SEND_STATUS_ERROR_FALLBACK
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface SendStatusResult {}
- /**
- * Message was sent successfully.
- */
- public static final int SEND_STATUS_OK = 1;
-
- /**
- * IMS provider failed to send the message and platform should not retry falling back to sending
- * the message using the radio.
- */
- public static final int SEND_STATUS_ERROR = 2;
-
- /**
- * IMS provider failed to send the message and platform should retry again after setting TP-RD bit
- * to high.
- */
- public static final int SEND_STATUS_ERROR_RETRY = 3;
-
- /**
- * IMS provider failed to send the message and platform should retry falling back to sending
- * the message using the radio.
- */
- public static final int SEND_STATUS_ERROR_FALLBACK = 4;
-
- @IntDef({
- DELIVER_STATUS_OK,
- DELIVER_STATUS_ERROR
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface DeliverStatusResult {}
- /**
- * Message was delivered successfully.
- */
- public static final int DELIVER_STATUS_OK = 1;
-
- /**
- * Message was not delivered.
- */
- public static final int DELIVER_STATUS_ERROR = 2;
-
- @IntDef({
- STATUS_REPORT_STATUS_OK,
- STATUS_REPORT_STATUS_ERROR
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface StatusReportResult {}
-
- /**
- * Status Report was set successfully.
- */
- public static final int STATUS_REPORT_STATUS_OK = 1;
-
- /**
- * Error while setting status report.
- */
- public static final int STATUS_REPORT_STATUS_ERROR = 2;
-
-
- // Lock for feature synchronization
- private final Object mLock = new Object();
- private IImsSmsListener mListener;
-
- /**
- * Registers a listener responsible for handling tasks like delivering messages.
- *
- * @param listener listener to register.
- *
- * @hide
- */
- public final void registerSmsListener(IImsSmsListener listener) {
- synchronized (mLock) {
- mListener = listener;
- }
- }
-
- /**
- * This method will be triggered by the platform when the user attempts to send an SMS. This
- * method should be implemented by the IMS providers to provide implementation of sending an SMS
- * over IMS.
- *
- * @param smsc the Short Message Service Center address.
- * @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
- * {@link SmsMessage#FORMAT_3GPP2}.
- * @param messageRef the message reference.
- * @param isRetry whether it is a retry of an already attempted message or not.
- * @param pdu PDUs representing the contents of the message.
- */
- public void sendSms(int messageRef, String format, String smsc, boolean isRetry, byte[] pdu) {
- // Base implementation returns error. Should be overridden.
- try {
- onSendSmsResult(messageRef, SEND_STATUS_ERROR, SmsManager.RESULT_ERROR_GENERIC_FAILURE);
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "Can not send sms: " + e.getMessage());
- }
- }
-
- /**
- * This method will be triggered by the platform after {@link #onSmsReceived(String, byte[])} has
- * been called to deliver the result to the IMS provider.
- *
- * @param result result of delivering the message. Valid values are defined in
- * {@link DeliverStatusResult}
- * @param messageRef the message reference or -1 of unavailable.
- */
- public void acknowledgeSms(int messageRef, @DeliverStatusResult int result) {
-
- }
-
- /**
- * This method will be triggered by the platform after
- * {@link #onSmsStatusReportReceived(int, int, byte[])} has been called to provide the result to
- * the IMS provider.
- *
- * @param result result of delivering the message. Valid values are defined in
- * {@link StatusReportResult}
- * @param messageRef the message reference or -1 of unavailable.
- */
- public void acknowledgeSmsReport(int messageRef, @StatusReportResult int result) {
-
- }
-
- /**
- * This method should be triggered by the IMS providers when there is an incoming message. The
- * platform will deliver the message to the messages database and notify the IMS provider of the
- * result by calling {@link #acknowledgeSms(int, int)}.
- *
- * This method must not be called before {@link MmTelFeature#onFeatureReady()} is called.
- *
- * @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
- * {@link SmsMessage#FORMAT_3GPP2}.
- * @param pdu PDUs representing the contents of the message.
- * @throws IllegalStateException if called before {@link MmTelFeature#onFeatureReady()}
- */
- public final void onSmsReceived(String format, byte[] pdu) throws IllegalStateException {
- synchronized (mLock) {
- if (mListener == null) {
- throw new IllegalStateException("Feature not ready.");
- }
- try {
- mListener.onSmsReceived(format, pdu);
- acknowledgeSms(-1, DELIVER_STATUS_OK);
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "Can not deliver sms: " + e.getMessage());
- acknowledgeSms(-1, DELIVER_STATUS_ERROR);
- }
- }
- }
-
- /**
- * This method should be triggered by the IMS providers to pass the result of the sent message
- * to the platform.
- *
- * This method must not be called before {@link MmTelFeature#onFeatureReady()} is called.
- *
- * @param messageRef the message reference. Should be between 0 and 255 per TS.123.040
- * @param status result of sending the SMS. Valid values are defined in {@link SendStatusResult}
- * @param reason reason in case status is failure. Valid values are:
- * {@link SmsManager#RESULT_ERROR_NONE},
- * {@link SmsManager#RESULT_ERROR_GENERIC_FAILURE},
- * {@link SmsManager#RESULT_ERROR_RADIO_OFF},
- * {@link SmsManager#RESULT_ERROR_NULL_PDU},
- * {@link SmsManager#RESULT_ERROR_NO_SERVICE},
- * {@link SmsManager#RESULT_ERROR_LIMIT_EXCEEDED},
- * {@link SmsManager#RESULT_ERROR_SHORT_CODE_NOT_ALLOWED},
- * {@link SmsManager#RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED}
- * @throws IllegalStateException if called before {@link MmTelFeature#onFeatureReady()}
- * @throws RemoteException if the connection to the framework is not available. If this happens
- * attempting to send the SMS should be aborted.
- */
- public final void onSendSmsResult(int messageRef, @SendStatusResult int status, int reason)
- throws IllegalStateException, RemoteException {
- synchronized (mLock) {
- if (mListener == null) {
- throw new IllegalStateException("Feature not ready.");
- }
- mListener.onSendSmsResult(messageRef, status, reason);
- }
- }
-
- /**
- * Sets the status report of the sent message.
- *
- * @param messageRef the message reference.
- * @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
- * {@link SmsMessage#FORMAT_3GPP2}.
- * @param pdu PDUs representing the content of the status report.
- * @throws IllegalStateException if called before {@link MmTelFeature#onFeatureReady()}
- */
- public final void onSmsStatusReportReceived(int messageRef, String format, byte[] pdu) {
- synchronized (mLock) {
- if (mListener == null) {
- throw new IllegalStateException("Feature not ready.");
- }
- try {
- mListener.onSmsStatusReportReceived(messageRef, format, pdu);
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "Can not process sms status report: " + e.getMessage());
- acknowledgeSmsReport(messageRef, STATUS_REPORT_STATUS_ERROR);
- }
- }
- }
-
- /**
- * Returns the SMS format. Default is {@link SmsMessage#FORMAT_3GPP} unless overridden by IMS
- * Provider.
- *
- * @return the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
- * {@link SmsMessage#FORMAT_3GPP2}.
- */
- public String getSmsFormat() {
- return SmsMessage.FORMAT_3GPP;
- }
-
-}
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl b/telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl
deleted file mode 100644
index 468629a..0000000
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl
+++ /dev/null
@@ -1,27 +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.
- */
-
-package android.telephony.ims.internal.aidl;
-
-/**
- * See MMTelFeature for more information.
- * {@hide}
- */
-interface IImsSmsListener {
- void onSendSmsResult(in int messageRef, in int status, in int reason);
- void onSmsStatusReportReceived(in int messageRef, in String format, in byte[] pdu);
- void onSmsReceived(in String format, in byte[] pdu);
-}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/ims/internal/feature/ImsFeature.java b/telephony/java/android/telephony/ims/internal/feature/ImsFeature.java
deleted file mode 100644
index 9f82ad2..0000000
--- a/telephony/java/android/telephony/ims/internal/feature/ImsFeature.java
+++ /dev/null
@@ -1,462 +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
- */
-
-package android.telephony.ims.internal.feature;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.content.Context;
-import android.content.Intent;
-import android.os.IInterface;
-import android.os.RemoteCallbackList;
-import android.os.RemoteException;
-import android.telephony.SubscriptionManager;
-import android.telephony.ims.internal.aidl.IImsCapabilityCallback;
-import android.util.Log;
-
-import com.android.ims.internal.IImsFeatureStatusCallback;
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.WeakHashMap;
-
-/**
- * Base class for all IMS features that are supported by the framework.
- *
- * @hide
- */
-public abstract class ImsFeature {
-
- private static final String LOG_TAG = "ImsFeature";
-
- /**
- * Action to broadcast when ImsService is up.
- * Internal use only.
- * Only defined here separately for compatibility purposes with the old ImsService.
- *
- * @hide
- */
- public static final String ACTION_IMS_SERVICE_UP =
- "com.android.ims.IMS_SERVICE_UP";
-
- /**
- * Action to broadcast when ImsService is down.
- * Internal use only.
- * Only defined here separately for compatibility purposes with the old ImsService.
- *
- * @hide
- */
- public static final String ACTION_IMS_SERVICE_DOWN =
- "com.android.ims.IMS_SERVICE_DOWN";
-
- /**
- * Part of the ACTION_IMS_SERVICE_UP or _DOWN intents.
- * A long value; the phone ID corresponding to the IMS service coming up or down.
- * Only defined here separately for compatibility purposes with the old ImsService.
- *
- * @hide
- */
- public static final String EXTRA_PHONE_ID = "android:phone_id";
-
- // Invalid feature value
- public static final int FEATURE_INVALID = -1;
- // ImsFeatures that are defined in the Manifests. Ensure that these values match the previously
- // defined values in ImsServiceClass for compatibility purposes.
- public static final int FEATURE_EMERGENCY_MMTEL = 0;
- public static final int FEATURE_MMTEL = 1;
- public static final int FEATURE_RCS = 2;
- // Total number of features defined
- public static final int FEATURE_MAX = 3;
-
- // Integer values defining IMS features that are supported in ImsFeature.
- @IntDef(flag = true,
- value = {
- FEATURE_EMERGENCY_MMTEL,
- FEATURE_MMTEL,
- FEATURE_RCS
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface FeatureType {}
-
- // Integer values defining the state of the ImsFeature at any time.
- @IntDef(flag = true,
- value = {
- STATE_UNAVAILABLE,
- STATE_INITIALIZING,
- STATE_READY,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface ImsState {}
-
- public static final int STATE_UNAVAILABLE = 0;
- public static final int STATE_INITIALIZING = 1;
- public static final int STATE_READY = 2;
-
- // Integer values defining the result codes that should be returned from
- // {@link changeEnabledCapabilities} when the framework tries to set a feature's capability.
- @IntDef(flag = true,
- value = {
- CAPABILITY_ERROR_GENERIC,
- CAPABILITY_SUCCESS
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface ImsCapabilityError {}
-
- public static final int CAPABILITY_ERROR_GENERIC = -1;
- public static final int CAPABILITY_SUCCESS = 0;
-
-
- /**
- * The framework implements this callback in order to register for Feature Capability status
- * updates, via {@link #onCapabilitiesStatusChanged(Capabilities)}, query Capability
- * configurations, via {@link #onQueryCapabilityConfiguration}, as well as to receive error
- * callbacks when the ImsService can not change the capability as requested, via
- * {@link #onChangeCapabilityConfigurationError}.
- */
- public static class CapabilityCallback extends IImsCapabilityCallback.Stub {
-
- @Override
- public final void onCapabilitiesStatusChanged(int config) throws RemoteException {
- onCapabilitiesStatusChanged(new Capabilities(config));
- }
-
- /**
- * Returns the result of a query for the capability configuration of a requested capability.
- *
- * @param capability The capability that was requested.
- * @param radioTech The IMS radio technology associated with the capability.
- * @param isEnabled true if the capability is enabled, false otherwise.
- */
- @Override
- public void onQueryCapabilityConfiguration(int capability, int radioTech,
- boolean isEnabled) {
-
- }
-
- /**
- * Called when a change to the capability configuration has returned an error.
- *
- * @param capability The capability that was requested to be changed.
- * @param radioTech The IMS radio technology associated with the capability.
- * @param reason error associated with the failure to change configuration.
- */
- @Override
- public void onChangeCapabilityConfigurationError(int capability, int radioTech,
- int reason) {
- }
-
- /**
- * The status of the feature's capabilities has changed to either available or unavailable.
- * If unavailable, the feature is not able to support the unavailable capability at this
- * time.
- *
- * @param config The new availability of the capabilities.
- */
- public void onCapabilitiesStatusChanged(Capabilities config) {
- }
- }
-
- /**
- * Used by the ImsFeature to call back to the CapabilityCallback that the framework has
- * provided.
- */
- protected static class CapabilityCallbackProxy {
- private final IImsCapabilityCallback mCallback;
-
- public CapabilityCallbackProxy(IImsCapabilityCallback c) {
- mCallback = c;
- }
-
- /**
- * This method notifies the provided framework callback that the request to change the
- * indicated capability has failed and has not changed.
- *
- * @param capability The Capability that will be notified to the framework.
- * @param radioTech The radio tech that this capability failed for.
- * @param reason The reason this capability was unable to be changed.
- */
- public void onChangeCapabilityConfigurationError(int capability, int radioTech,
- @ImsCapabilityError int reason) {
- try {
- mCallback.onChangeCapabilityConfigurationError(capability, radioTech, reason);
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "onChangeCapabilityConfigurationError called on dead binder.");
- }
- }
-
- public void onQueryCapabilityConfiguration(int capability, int radioTech,
- boolean isEnabled) {
- try {
- mCallback.onQueryCapabilityConfiguration(capability, radioTech, isEnabled);
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "onQueryCapabilityConfiguration called on dead binder.");
- }
- }
- }
-
- /**
- * Contains the capabilities defined and supported by an ImsFeature in the form of a bit mask.
- */
- public static class Capabilities {
- protected int mCapabilities = 0;
-
- public Capabilities() {
- }
-
- protected Capabilities(int capabilities) {
- mCapabilities = capabilities;
- }
-
- /**
- * @param capabilities Capabilities to be added to the configuration in the form of a
- * bit mask.
- */
- public void addCapabilities(int capabilities) {
- mCapabilities |= capabilities;
- }
-
- /**
- * @param capabilities Capabilities to be removed to the configuration in the form of a
- * bit mask.
- */
- public void removeCapabilities(int capabilities) {
- mCapabilities &= ~capabilities;
- }
-
- /**
- * @return true if all of the capabilities specified are capable.
- */
- public boolean isCapable(int capabilities) {
- return (mCapabilities & capabilities) == capabilities;
- }
-
- public Capabilities copy() {
- return new Capabilities(mCapabilities);
- }
-
- /**
- * @return a bitmask containing the capability flags directly.
- */
- public int getMask() {
- return mCapabilities;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof Capabilities)) return false;
-
- Capabilities that = (Capabilities) o;
-
- return mCapabilities == that.mCapabilities;
- }
-
- @Override
- public int hashCode() {
- return mCapabilities;
- }
- }
-
- private final Set<IImsFeatureStatusCallback> mStatusCallbacks = Collections.newSetFromMap(
- new WeakHashMap<IImsFeatureStatusCallback, Boolean>());
- private @ImsState int mState = STATE_UNAVAILABLE;
- private int mSlotId = SubscriptionManager.INVALID_SIM_SLOT_INDEX;
- private Context mContext;
- private final Object mLock = new Object();
- private final RemoteCallbackList<IImsCapabilityCallback> mCapabilityCallbacks
- = new RemoteCallbackList<>();
- private Capabilities mCapabilityStatus = new Capabilities();
-
- public final void initialize(Context context, int slotId) {
- mContext = context;
- mSlotId = slotId;
- }
-
- public final int getFeatureState() {
- synchronized (mLock) {
- return mState;
- }
- }
-
- protected final void setFeatureState(@ImsState int state) {
- synchronized (mLock) {
- if (mState != state) {
- mState = state;
- notifyFeatureState(state);
- }
- }
- }
-
- // Not final for testing, but shouldn't be extended!
- @VisibleForTesting
- public void addImsFeatureStatusCallback(@NonNull IImsFeatureStatusCallback c) {
- try {
- // If we have just connected, send queued status.
- c.notifyImsFeatureStatus(getFeatureState());
- // Add the callback if the callback completes successfully without a RemoteException.
- synchronized (mLock) {
- mStatusCallbacks.add(c);
- }
- } catch (RemoteException e) {
- Log.w(LOG_TAG, "Couldn't notify feature state: " + e.getMessage());
- }
- }
-
- @VisibleForTesting
- // Not final for testing, but should not be extended!
- public void removeImsFeatureStatusCallback(@NonNull IImsFeatureStatusCallback c) {
- synchronized (mLock) {
- mStatusCallbacks.remove(c);
- }
- }
-
- /**
- * Internal method called by ImsFeature when setFeatureState has changed.
- */
- private void notifyFeatureState(@ImsState int state) {
- synchronized (mLock) {
- for (Iterator<IImsFeatureStatusCallback> iter = mStatusCallbacks.iterator();
- iter.hasNext(); ) {
- IImsFeatureStatusCallback callback = iter.next();
- try {
- Log.i(LOG_TAG, "notifying ImsFeatureState=" + state);
- callback.notifyImsFeatureStatus(state);
- } catch (RemoteException e) {
- // remove if the callback is no longer alive.
- iter.remove();
- Log.w(LOG_TAG, "Couldn't notify feature state: " + e.getMessage());
- }
- }
- }
- sendImsServiceIntent(state);
- }
-
- /**
- * Provide backwards compatibility using deprecated service UP/DOWN intents.
- */
- private void sendImsServiceIntent(@ImsState int state) {
- if (mContext == null || mSlotId == SubscriptionManager.INVALID_SIM_SLOT_INDEX) {
- return;
- }
- Intent intent;
- switch (state) {
- case ImsFeature.STATE_UNAVAILABLE:
- case ImsFeature.STATE_INITIALIZING:
- intent = new Intent(ACTION_IMS_SERVICE_DOWN);
- break;
- case ImsFeature.STATE_READY:
- intent = new Intent(ACTION_IMS_SERVICE_UP);
- break;
- default:
- intent = new Intent(ACTION_IMS_SERVICE_DOWN);
- }
- intent.putExtra(EXTRA_PHONE_ID, mSlotId);
- mContext.sendBroadcast(intent);
- }
-
- public final void addCapabilityCallback(IImsCapabilityCallback c) {
- mCapabilityCallbacks.register(c);
- }
-
- public final void removeCapabilityCallback(IImsCapabilityCallback c) {
- mCapabilityCallbacks.unregister(c);
- }
-
- /**
- * @return the cached capabilities status for this feature.
- */
- @VisibleForTesting
- public Capabilities queryCapabilityStatus() {
- synchronized (mLock) {
- return mCapabilityStatus.copy();
- }
- }
-
- // Called internally to request the change of enabled capabilities.
- @VisibleForTesting
- public final void requestChangeEnabledCapabilities(CapabilityChangeRequest request,
- IImsCapabilityCallback c) throws RemoteException {
- if (request == null) {
- throw new IllegalArgumentException(
- "ImsFeature#requestChangeEnabledCapabilities called with invalid params.");
- }
- changeEnabledCapabilities(request, new CapabilityCallbackProxy(c));
- }
-
- /**
- * Called by the ImsFeature when the capabilities status has changed.
- *
- * @param c A {@link Capabilities} containing the new Capabilities status.
- */
- protected final void notifyCapabilitiesStatusChanged(Capabilities c) {
- synchronized (mLock) {
- mCapabilityStatus = c.copy();
- }
- int count = mCapabilityCallbacks.beginBroadcast();
- try {
- for (int i = 0; i < count; i++) {
- try {
- mCapabilityCallbacks.getBroadcastItem(i).onCapabilitiesStatusChanged(
- c.mCapabilities);
- } catch (RemoteException e) {
- Log.w(LOG_TAG, e + " " + "notifyCapabilitiesStatusChanged() - Skipping " +
- "callback.");
- }
- }
- } finally {
- mCapabilityCallbacks.finishBroadcast();
- }
- }
-
- /**
- * Features should override this method to receive Capability preference change requests from
- * the framework using the provided {@link CapabilityChangeRequest}. If any of the capabilities
- * in the {@link CapabilityChangeRequest} are not able to be completed due to an error,
- * {@link CapabilityCallbackProxy#onChangeCapabilityConfigurationError} should be called for
- * each failed capability.
- *
- * @param request A {@link CapabilityChangeRequest} containing requested capabilities to
- * enable/disable.
- * @param c A {@link CapabilityCallbackProxy}, which will be used to call back to the framework
- * setting a subset of these capabilities fail, using
- * {@link CapabilityCallbackProxy#onChangeCapabilityConfigurationError}.
- */
- public abstract void changeEnabledCapabilities(CapabilityChangeRequest request,
- CapabilityCallbackProxy c);
-
- /**
- * Called when the framework is removing this feature and it needs to be cleaned up.
- */
- public abstract void onFeatureRemoved();
-
- /**
- * Called when the feature has been initialized and communication with the framework is set up.
- * Any attempt by this feature to access the framework before this method is called will return
- * with an {@link IllegalStateException}.
- * The IMS provider should use this method to trigger registration for this feature on the IMS
- * network, if needed.
- */
- public abstract void onFeatureReady();
-
- /**
- * @return Binder instance that the framework will use to communicate with this feature.
- */
- protected abstract IInterface getBinder();
-}
diff --git a/telephony/java/android/telephony/ims/internal/feature/MmTelFeature.java b/telephony/java/android/telephony/ims/internal/feature/MmTelFeature.java
deleted file mode 100644
index 057c9a86..0000000
--- a/telephony/java/android/telephony/ims/internal/feature/MmTelFeature.java
+++ /dev/null
@@ -1,504 +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
- */
-
-package android.telephony.ims.internal.feature;
-
-import android.annotation.IntDef;
-import android.os.Message;
-import android.os.RemoteException;
-import android.telecom.TelecomManager;
-import android.telephony.ims.internal.ImsCallSessionListener;
-import android.telephony.ims.internal.SmsImplBase;
-import android.telephony.ims.internal.SmsImplBase.DeliverStatusResult;
-import android.telephony.ims.internal.SmsImplBase.StatusReportResult;
-import android.telephony.ims.internal.aidl.IImsCallSessionListener;
-import android.telephony.ims.internal.aidl.IImsCapabilityCallback;
-import android.telephony.ims.internal.aidl.IImsMmTelFeature;
-import android.telephony.ims.internal.aidl.IImsMmTelListener;
-import android.telephony.ims.internal.aidl.IImsSmsListener;
-import android.telephony.ims.stub.ImsRegistrationImplBase;
-import android.telephony.ims.stub.ImsEcbmImplBase;
-import android.telephony.ims.stub.ImsMultiEndpointImplBase;
-import android.telephony.ims.stub.ImsUtImplBase;
-import android.util.Log;
-
-import com.android.ims.ImsCallProfile;
-import com.android.ims.internal.IImsCallSession;
-import com.android.ims.internal.IImsEcbm;
-import com.android.ims.internal.IImsMultiEndpoint;
-import com.android.ims.internal.IImsUt;
-import com.android.ims.internal.ImsCallSession;
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Base implementation for Voice and SMS (IR-92) and Video (IR-94) IMS support.
- *
- * Any class wishing to use MmTelFeature should extend this class and implement all methods that the
- * service supports.
- * @hide
- */
-
-public class MmTelFeature extends ImsFeature {
-
- private static final String LOG_TAG = "MmTelFeature";
-
- private final IImsMmTelFeature mImsMMTelBinder = new IImsMmTelFeature.Stub() {
-
- @Override
- public void setListener(IImsMmTelListener l) throws RemoteException {
- synchronized (mLock) {
- MmTelFeature.this.setListener(l);
- }
- }
-
- @Override
- public void setSmsListener(IImsSmsListener l) throws RemoteException {
- MmTelFeature.this.setSmsListener(l);
- }
-
- @Override
- public int getFeatureState() throws RemoteException {
- synchronized (mLock) {
- return MmTelFeature.this.getFeatureState();
- }
- }
-
-
- @Override
- public ImsCallProfile createCallProfile(int callSessionType, int callType)
- throws RemoteException {
- synchronized (mLock) {
- return MmTelFeature.this.createCallProfile(callSessionType, callType);
- }
- }
-
- @Override
- public IImsCallSession createCallSession(ImsCallProfile profile,
- IImsCallSessionListener listener) throws RemoteException {
- synchronized (mLock) {
- ImsCallSession s = MmTelFeature.this.createCallSession(profile,
- new ImsCallSessionListener(listener));
- return s != null ? s.getSession() : null;
- }
- }
-
- @Override
- public IImsUt getUtInterface() throws RemoteException {
- synchronized (mLock) {
- return MmTelFeature.this.getUt();
- }
- }
-
- @Override
- public IImsEcbm getEcbmInterface() throws RemoteException {
- synchronized (mLock) {
- return MmTelFeature.this.getEcbm();
- }
- }
-
- @Override
- public void setUiTtyMode(int uiTtyMode, Message onCompleteMessage) throws RemoteException {
- synchronized (mLock) {
- MmTelFeature.this.setUiTtyMode(uiTtyMode, onCompleteMessage);
- }
- }
-
- @Override
- public IImsMultiEndpoint getMultiEndpointInterface() throws RemoteException {
- synchronized (mLock) {
- return MmTelFeature.this.getMultiEndpoint();
- }
- }
-
- @Override
- public int queryCapabilityStatus() throws RemoteException {
- return MmTelFeature.this.queryCapabilityStatus().mCapabilities;
- }
-
- @Override
- public void addCapabilityCallback(IImsCapabilityCallback c) {
- MmTelFeature.this.addCapabilityCallback(c);
- }
-
- @Override
- public void removeCapabilityCallback(IImsCapabilityCallback c) {
- MmTelFeature.this.removeCapabilityCallback(c);
- }
-
- @Override
- public void changeCapabilitiesConfiguration(CapabilityChangeRequest request,
- IImsCapabilityCallback c) throws RemoteException {
- MmTelFeature.this.requestChangeEnabledCapabilities(request, c);
- }
-
- @Override
- public void queryCapabilityConfiguration(int capability, int radioTech,
- IImsCapabilityCallback c) {
- queryCapabilityConfigurationInternal(capability, radioTech, c);
- }
-
- @Override
- public void sendSms(int messageRef, String format, String smsc, boolean retry, byte[] pdu) {
- synchronized (mLock) {
- MmTelFeature.this.sendSms(messageRef, format, smsc, retry, pdu);
- }
- }
-
- @Override
- public void acknowledgeSms(int messageRef, int result) {
- synchronized (mLock) {
- MmTelFeature.this.acknowledgeSms(messageRef, result);
- }
- }
-
- @Override
- public void acknowledgeSmsReport(int messageRef, int result) {
- synchronized (mLock) {
- MmTelFeature.this.acknowledgeSmsReport(messageRef, result);
- }
- }
-
- @Override
- public String getSmsFormat() {
- synchronized (mLock) {
- return MmTelFeature.this.getSmsFormat();
- }
- }
- };
-
- /**
- * Contains the capabilities defined and supported by a MmTelFeature in the form of a Bitmask.
- * The capabilities that are used in MmTelFeature are defined by {@link MmTelCapability}.
- *
- * The capabilities of this MmTelFeature will be set by the framework and can be queried with
- * {@link #queryCapabilityStatus()}.
- *
- * This MmTelFeature can then return the status of each of these capabilities (enabled or not)
- * by sending a {@link #notifyCapabilitiesStatusChanged} callback to the framework. The current
- * status can also be queried using {@link #queryCapabilityStatus()}.
- */
- public static class MmTelCapabilities extends Capabilities {
-
- @VisibleForTesting
- public MmTelCapabilities() {
- super();
- }
-
- public MmTelCapabilities(Capabilities c) {
- mCapabilities = c.mCapabilities;
- }
-
- @IntDef(flag = true,
- value = {
- CAPABILITY_TYPE_VOICE,
- CAPABILITY_TYPE_VIDEO,
- CAPABILITY_TYPE_UT,
- CAPABILITY_TYPE_SMS
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface MmTelCapability {}
-
- /**
- * This MmTelFeature supports Voice calling (IR.92)
- */
- public static final int CAPABILITY_TYPE_VOICE = 1 << 0;
-
- /**
- * This MmTelFeature supports Video (IR.94)
- */
- public static final int CAPABILITY_TYPE_VIDEO = 1 << 1;
-
- /**
- * This MmTelFeature supports XCAP over Ut for supplementary services. (IR.92)
- */
- public static final int CAPABILITY_TYPE_UT = 1 << 2;
-
- /**
- * This MmTelFeature supports SMS (IR.92)
- */
- public static final int CAPABILITY_TYPE_SMS = 1 << 3;
-
- @Override
- public final void addCapabilities(@MmTelCapability int capabilities) {
- super.addCapabilities(capabilities);
- }
-
- @Override
- public final void removeCapabilities(@MmTelCapability int capability) {
- super.removeCapabilities(capability);
- }
-
- @Override
- public final boolean isCapable(@MmTelCapability int capabilities) {
- return super.isCapable(capabilities);
- }
- }
-
- /**
- * Listener that the framework implements for communication from the MmTelFeature.
- */
- public static class Listener extends IImsMmTelListener.Stub {
-
- @Override
- public final void onIncomingCall(IImsCallSession c) {
- onIncomingCall(new ImsCallSession(c));
- }
-
- /**
- * Updates the Listener when the voice message count for IMS has changed.
- * @param count an integer representing the new message count.
- */
- @Override
- public void onVoiceMessageCountUpdate(int count) {
-
- }
-
- /**
- * Called when the IMS provider receives an incoming call.
- * @param c The {@link ImsCallSession} associated with the new call.
- */
- public void onIncomingCall(ImsCallSession c) {
- }
- }
-
- // Lock for feature synchronization
- private final Object mLock = new Object();
- private IImsMmTelListener mListener;
-
- /**
- * @param listener A {@link Listener} used when the MmTelFeature receives an incoming call and
- * notifies the framework.
- */
- private void setListener(IImsMmTelListener listener) {
- synchronized (mLock) {
- mListener = listener;
- }
- }
-
- private void setSmsListener(IImsSmsListener listener) {
- getSmsImplementation().registerSmsListener(listener);
- }
-
- private void queryCapabilityConfigurationInternal(int capability, int radioTech,
- IImsCapabilityCallback c) {
- boolean enabled = queryCapabilityConfiguration(capability, radioTech);
- try {
- if (c != null) {
- c.onQueryCapabilityConfiguration(capability, radioTech, enabled);
- }
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "queryCapabilityConfigurationInternal called on dead binder!");
- }
- }
-
- /**
- * The current capability status that this MmTelFeature has defined is available. This
- * configuration will be used by the platform to figure out which capabilities are CURRENTLY
- * available to be used.
- *
- * Should be a subset of the capabilities that are enabled by the framework in
- * {@link #changeEnabledCapabilities}.
- * @return A copy of the current MmTelFeature capability status.
- */
- @Override
- public final MmTelCapabilities queryCapabilityStatus() {
- return new MmTelCapabilities(super.queryCapabilityStatus());
- }
-
- /**
- * Notify the framework that the status of the Capabilities has changed. Even though the
- * MmTelFeature capability may be enabled by the framework, the status may be disabled due to
- * the feature being unavailable from the network.
- * @param c The current capability status of the MmTelFeature. If a capability is disabled, then
- * the status of that capability is disabled. This can happen if the network does not currently
- * support the capability that is enabled. A capability that is disabled by the framework (via
- * {@link #changeEnabledCapabilities}) should also show the status as disabled.
- */
- protected final void notifyCapabilitiesStatusChanged(MmTelCapabilities c) {
- super.notifyCapabilitiesStatusChanged(c);
- }
-
- /**
- * Notify the framework of an incoming call.
- * @param c The {@link ImsCallSession} of the new incoming call.
- *
- * @throws RemoteException if the connection to the framework is not available. If this happens,
- * the call should be no longer considered active and should be cleaned up.
- * */
- protected final void notifyIncomingCall(ImsCallSession c) throws RemoteException {
- synchronized (mLock) {
- if (mListener == null) {
- throw new IllegalStateException("Session is not available.");
- }
- mListener.onIncomingCall(c.getSession());
- }
- }
-
- /**
- * Provides the MmTelFeature with the ability to return the framework Capability Configuration
- * for a provided Capability. If the framework calls {@link #changeEnabledCapabilities} and
- * includes a capability A to enable or disable, this method should return the correct enabled
- * status for capability A.
- * @param capability The capability that we are querying the configuration for.
- * @return true if the capability is enabled, false otherwise.
- */
- public boolean queryCapabilityConfiguration(@MmTelCapabilities.MmTelCapability int capability,
- @ImsRegistrationImplBase.ImsRegistrationTech int radioTech) {
- // Base implementation - Override to provide functionality
- return false;
- }
-
- /**
- * The MmTelFeature should override this method to handle the enabling/disabling of
- * MmTel Features, defined in {@link MmTelCapabilities.MmTelCapability}. The framework assumes
- * the {@link CapabilityChangeRequest} was processed successfully. If a subset of capabilities
- * could not be set to their new values,
- * {@link CapabilityCallbackProxy#onChangeCapabilityConfigurationError} must be called
- * individually for each capability whose processing resulted in an error.
- *
- * Enabling/Disabling a capability here indicates that the capability should be registered or
- * deregistered (depending on the capability change) and become available or unavailable to
- * the framework.
- */
- @Override
- public void changeEnabledCapabilities(CapabilityChangeRequest request,
- CapabilityCallbackProxy c) {
- // Base implementation, no-op
- }
-
- /**
- * Creates a {@link ImsCallProfile} from the service capabilities & IMS registration state.
- *
- * @param callSessionType a service type that is specified in {@link ImsCallProfile}
- * {@link ImsCallProfile#SERVICE_TYPE_NONE}
- * {@link ImsCallProfile#SERVICE_TYPE_NORMAL}
- * {@link ImsCallProfile#SERVICE_TYPE_EMERGENCY}
- * @param callType a call type that is specified in {@link ImsCallProfile}
- * {@link ImsCallProfile#CALL_TYPE_VOICE}
- * {@link ImsCallProfile#CALL_TYPE_VT}
- * {@link ImsCallProfile#CALL_TYPE_VT_TX}
- * {@link ImsCallProfile#CALL_TYPE_VT_RX}
- * {@link ImsCallProfile#CALL_TYPE_VT_NODIR}
- * {@link ImsCallProfile#CALL_TYPE_VS}
- * {@link ImsCallProfile#CALL_TYPE_VS_TX}
- * {@link ImsCallProfile#CALL_TYPE_VS_RX}
- * @return a {@link ImsCallProfile} object
- */
- public ImsCallProfile createCallProfile(int callSessionType, int callType) {
- // Base Implementation - Should be overridden
- return null;
- }
-
- /**
- * Creates an {@link ImsCallSession} with the specified call profile.
- * Use other methods, if applicable, instead of interacting with
- * {@link ImsCallSession} directly.
- *
- * @param profile a call profile to make the call
- * @param listener An implementation of IImsCallSessionListener.
- */
- public ImsCallSession createCallSession(ImsCallProfile profile,
- ImsCallSessionListener listener) {
- // Base Implementation - Should be overridden
- return null;
- }
-
- /**
- * @return The Ut interface for the supplementary service configuration.
- */
- public ImsUtImplBase getUt() {
- // Base Implementation - Should be overridden
- return null;
- }
-
- /**
- * @return The Emergency call-back mode interface for emergency VoLTE calls that support it.
- */
- public ImsEcbmImplBase getEcbm() {
- // Base Implementation - Should be overridden
- return null;
- }
-
- /**
- * @return The Emergency call-back mode interface for emergency VoLTE calls that support it.
- */
- public ImsMultiEndpointImplBase getMultiEndpoint() {
- // Base Implementation - Should be overridden
- return null;
- }
-
- /**
- * Sets the current UI TTY mode for the MmTelFeature.
- * @param mode An integer containing the new UI TTY Mode, can consist of
- * {@link TelecomManager#TTY_MODE_OFF},
- * {@link TelecomManager#TTY_MODE_FULL},
- * {@link TelecomManager#TTY_MODE_HCO},
- * {@link TelecomManager#TTY_MODE_VCO}
- * @param onCompleteMessage A {@link Message} to be used when the mode has been set.
- */
- void setUiTtyMode(int mode, Message onCompleteMessage) {
- // Base Implementation - Should be overridden
- }
-
- private void sendSms(int messageRef, String format, String smsc, boolean isRetry, byte[] pdu) {
- getSmsImplementation().sendSms(messageRef, format, smsc, isRetry, pdu);
- }
-
- private void acknowledgeSms(int messageRef, @DeliverStatusResult int result) {
- getSmsImplementation().acknowledgeSms(messageRef, result);
- }
-
- private void acknowledgeSmsReport(int messageRef, @StatusReportResult int result) {
- getSmsImplementation().acknowledgeSmsReport(messageRef, result);
- }
-
- private String getSmsFormat() {
- return getSmsImplementation().getSmsFormat();
- }
-
- /**
- * Must be overridden by IMS Provider to be able to support SMS over IMS. Otherwise a default
- * non-functional implementation is returned.
- *
- * @return an instance of {@link SmsImplBase} which should be implemented by the IMS Provider.
- */
- protected SmsImplBase getSmsImplementation() {
- return new SmsImplBase();
- }
-
- /**{@inheritDoc}*/
- @Override
- public void onFeatureRemoved() {
- // Base Implementation - Should be overridden
- }
-
- /**{@inheritDoc}*/
- @Override
- public void onFeatureReady() {
- // Base Implementation - Should be overridden
- }
-
- /**
- * @hide
- */
- @Override
- public final IImsMmTelFeature getBinder() {
- return mImsMMTelBinder;
- }
-}
diff --git a/telephony/java/android/telephony/ims/internal/stub/ImsConfigImplBase.java b/telephony/java/android/telephony/ims/internal/stub/ImsConfigImplBase.java
deleted file mode 100644
index 33aec5d..0000000
--- a/telephony/java/android/telephony/ims/internal/stub/ImsConfigImplBase.java
+++ /dev/null
@@ -1,173 +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
- */
-
-package android.telephony.ims.internal.stub;
-
-import android.os.RemoteCallbackList;
-import android.os.RemoteException;
-import android.telephony.ims.internal.aidl.IImsConfig;
-import android.telephony.ims.internal.aidl.IImsConfigCallback;
-
-import com.android.ims.ImsConfig;
-
-/**
- * Controls the modification of IMS specific configurations. For more information on the supported
- * IMS configuration constants, see {@link ImsConfig}.
- *
- * @hide
- */
-
-public class ImsConfigImplBase {
-
- //TODO: Implement the Binder logic to call base APIs. Need to finish other ImsService Config
- // work first.
- private final IImsConfig mBinder = new IImsConfig.Stub() {
-
- @Override
- public void addImsConfigCallback(IImsConfigCallback c) throws RemoteException {
- ImsConfigImplBase.this.addImsConfigCallback(c);
- }
-
- @Override
- public void removeImsConfigCallback(IImsConfigCallback c) throws RemoteException {
- ImsConfigImplBase.this.removeImsConfigCallback(c);
- }
-
- @Override
- public int getConfigInt(int item) throws RemoteException {
- return Integer.MIN_VALUE;
- }
-
- @Override
- public String getConfigString(int item) throws RemoteException {
- return null;
- }
-
- @Override
- public int setConfigInt(int item, int value) throws RemoteException {
- return Integer.MIN_VALUE;
- }
-
- @Override
- public int setConfigString(int item, String value) throws RemoteException {
- return Integer.MIN_VALUE;
- }
- };
-
- public class Callback extends IImsConfigCallback.Stub {
-
- @Override
- public final void onIntConfigChanged(int item, int value) throws RemoteException {
- onConfigChanged(item, value);
- }
-
- @Override
- public final void onStringConfigChanged(int item, String value) throws RemoteException {
- onConfigChanged(item, value);
- }
-
- /**
- * Called when the IMS configuration has changed.
- * @param item the IMS configuration key constant, as defined in ImsConfig.
- * @param value the new integer value of the IMS configuration constant.
- */
- public void onConfigChanged(int item, int value) {
- // Base Implementation
- }
-
- /**
- * Called when the IMS configuration has changed.
- * @param item the IMS configuration key constant, as defined in ImsConfig.
- * @param value the new String value of the IMS configuration constant.
- */
- public void onConfigChanged(int item, String value) {
- // Base Implementation
- }
- }
-
- private final RemoteCallbackList<IImsConfigCallback> mCallbacks = new RemoteCallbackList<>();
-
- /**
- * Adds a {@link Callback} to the list of callbacks notified when a value in the configuration
- * changes.
- * @param c callback to add.
- */
- private void addImsConfigCallback(IImsConfigCallback c) {
- mCallbacks.register(c);
- }
- /**
- * Removes a {@link Callback} to the list of callbacks notified when a value in the
- * configuration changes.
- *
- * @param c callback to remove.
- */
- private void removeImsConfigCallback(IImsConfigCallback c) {
- mCallbacks.unregister(c);
- }
-
- public final IImsConfig getBinder() {
- return mBinder;
- }
-
- /**
- * Sets the value for IMS service/capabilities parameters by the operator device
- * management entity. It sets the config item value in the provisioned storage
- * from which the master value is derived.
- *
- * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @param value in Integer format.
- * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
- */
- public int setConfig(int item, int value) {
- // Base Implementation - To be overridden.
- return ImsConfig.OperationStatusConstants.FAILED;
- }
-
- /**
- * Sets the value for IMS service/capabilities parameters by the operator device
- * management entity. It sets the config item value in the provisioned storage
- * from which the master value is derived.
- *
- * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @param value in String format.
- * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
- */
- public int setConfig(int item, String value) {
- return ImsConfig.OperationStatusConstants.FAILED;
- }
-
- /**
- * Gets the value for ims service/capabilities parameters from the provisioned
- * value storage.
- *
- * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @return value in Integer format.
- */
- public int getConfigInt(int item) {
- return ImsConfig.OperationStatusConstants.FAILED;
- }
-
- /**
- * Gets the value for ims service/capabilities parameters from the provisioned
- * value storage.
- *
- * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @return value in String format.
- */
- public String getConfigString(int item) {
- return null;
- }
-}
diff --git a/telephony/java/android/telephony/ims/internal/stub/ImsFeatureConfiguration.java b/telephony/java/android/telephony/ims/internal/stub/ImsFeatureConfiguration.java
deleted file mode 100644
index 244c957..0000000
--- a/telephony/java/android/telephony/ims/internal/stub/ImsFeatureConfiguration.java
+++ /dev/null
@@ -1,147 +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
- */
-
-package android.telephony.ims.internal.stub;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.telephony.ims.internal.feature.ImsFeature;
-import android.util.ArraySet;
-
-import java.util.Arrays;
-import java.util.Set;
-
-/**
- * Container class for IMS Feature configuration. This class contains the features that the
- * ImsService supports, which are defined in {@link ImsFeature.FeatureType}.
- * @hide
- */
-public class ImsFeatureConfiguration implements Parcelable {
- /**
- * Features that this ImsService supports.
- */
- private final Set<Integer> mFeatures;
-
- /**
- * Creates an ImsFeatureConfiguration with the features
- */
- public static class Builder {
- ImsFeatureConfiguration mConfig;
- public Builder() {
- mConfig = new ImsFeatureConfiguration();
- }
-
- /**
- * @param feature A feature defined in {@link ImsFeature.FeatureType} that this service
- * supports.
- * @return a {@link Builder} to continue constructing the ImsFeatureConfiguration.
- */
- public Builder addFeature(@ImsFeature.FeatureType int feature) {
- mConfig.addFeature(feature);
- return this;
- }
-
- public ImsFeatureConfiguration build() {
- return mConfig;
- }
- }
-
- /**
- * Creates with all registration features empty.
- *
- * Consider using the provided {@link Builder} to create this configuration instead.
- */
- public ImsFeatureConfiguration() {
- mFeatures = new ArraySet<>();
- }
-
- /**
- * Configuration of the ImsService, which describes which features the ImsService supports
- * (for registration).
- * @param features an array of feature integers defined in {@link ImsFeature} that describe
- * which features this ImsService supports.
- */
- public ImsFeatureConfiguration(int[] features) {
- mFeatures = new ArraySet<>();
-
- if (features != null) {
- for (int i : features) {
- mFeatures.add(i);
- }
- }
- }
-
- /**
- * @return an int[] containing the features that this ImsService supports.
- */
- public int[] getServiceFeatures() {
- return mFeatures.stream().mapToInt(i->i).toArray();
- }
-
- void addFeature(int feature) {
- mFeatures.add(feature);
- }
-
- protected ImsFeatureConfiguration(Parcel in) {
- int[] features = in.createIntArray();
- if (features != null) {
- mFeatures = new ArraySet<>(features.length);
- for(Integer i : features) {
- mFeatures.add(i);
- }
- } else {
- mFeatures = new ArraySet<>();
- }
- }
-
- public static final Creator<ImsFeatureConfiguration> CREATOR
- = new Creator<ImsFeatureConfiguration>() {
- @Override
- public ImsFeatureConfiguration createFromParcel(Parcel in) {
- return new ImsFeatureConfiguration(in);
- }
-
- @Override
- public ImsFeatureConfiguration[] newArray(int size) {
- return new ImsFeatureConfiguration[size];
- }
- };
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeIntArray(mFeatures.stream().mapToInt(i->i).toArray());
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof ImsFeatureConfiguration)) return false;
-
- ImsFeatureConfiguration that = (ImsFeatureConfiguration) o;
-
- return mFeatures.equals(that.mFeatures);
- }
-
- @Override
- public int hashCode() {
- return mFeatures.hashCode();
- }
-}
diff --git a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
index 80b2f78..da6a7a6 100644
--- a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
@@ -16,105 +16,262 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.os.Message;
import android.os.RemoteException;
+import android.telephony.ims.ImsCallSessionListener;
+import android.telephony.ims.aidl.IImsCallSessionListener;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.internal.ImsCallSession;
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsStreamMediaProfile;
+import android.telephony.ims.ImsCallSession;
import com.android.ims.internal.IImsCallSession;
-import com.android.ims.internal.IImsCallSessionListener;
import com.android.ims.internal.IImsVideoCallProvider;
+import android.telephony.ims.ImsVideoCallProvider;
/**
- * Base implementation of IImsCallSession, which implements stub versions of the methods in the
- * IImsCallSession AIDL. Override the methods that your implementation of ImsCallSession supports.
+ * Base implementation of IImsCallSession, which implements stub versions of the methods available.
*
- * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
- * will break other implementations of ImsCallSession maintained by other ImsServices.
+ * Override the methods that your implementation of ImsCallSession supports.
*
* @hide
*/
-
-public class ImsCallSessionImplBase extends IImsCallSession.Stub {
+@SystemApi
+// DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
+// will break other implementations of ImsCallSession maintained by other ImsServices.
+public class ImsCallSessionImplBase implements AutoCloseable {
+ /**
+ * Notify USSD Mode.
+ */
+ public static final int USSD_MODE_NOTIFY = 0;
+ /**
+ * Request USSD Mode
+ */
+ public static final int USSD_MODE_REQUEST = 1;
/**
- * Closes the object. This object is not usable after being closed.
+ * Defines IMS call session state.
*/
- @Override
- public void close() throws RemoteException {
+ public static class State {
+ public static final int IDLE = 0;
+ public static final int INITIATED = 1;
+ public static final int NEGOTIATING = 2;
+ public static final int ESTABLISHING = 3;
+ public static final int ESTABLISHED = 4;
+ public static final int RENEGOTIATING = 5;
+ public static final int REESTABLISHING = 6;
+
+ public static final int TERMINATING = 7;
+ public static final int TERMINATED = 8;
+
+ public static final int INVALID = (-1);
+
+ /**
+ * Converts the state to string.
+ */
+ public static String toString(int state) {
+ switch (state) {
+ case IDLE:
+ return "IDLE";
+ case INITIATED:
+ return "INITIATED";
+ case NEGOTIATING:
+ return "NEGOTIATING";
+ case ESTABLISHING:
+ return "ESTABLISHING";
+ case ESTABLISHED:
+ return "ESTABLISHED";
+ case RENEGOTIATING:
+ return "RENEGOTIATING";
+ case REESTABLISHING:
+ return "REESTABLISHING";
+ case TERMINATING:
+ return "TERMINATING";
+ case TERMINATED:
+ return "TERMINATED";
+ default:
+ return "UNKNOWN";
+ }
+ }
+
+ /**
+ * @hide
+ */
+ private State() {
+ }
}
- /**
- * Gets the call ID of the session.
- *
- * @return the call ID
- */
- @Override
- public String getCallId() throws RemoteException {
- return null;
- }
+ // Non-final for injection by tests
+ private IImsCallSession mServiceImpl = new IImsCallSession.Stub() {
+ @Override
+ public void close() {
+ ImsCallSessionImplBase.this.close();
+ }
+
+ @Override
+ public String getCallId() {
+ return ImsCallSessionImplBase.this.getCallId();
+ }
+
+ @Override
+ public ImsCallProfile getCallProfile() {
+ return ImsCallSessionImplBase.this.getCallProfile();
+ }
+
+ @Override
+ public ImsCallProfile getLocalCallProfile() {
+ return ImsCallSessionImplBase.this.getLocalCallProfile();
+ }
+
+ @Override
+ public ImsCallProfile getRemoteCallProfile() {
+ return ImsCallSessionImplBase.this.getRemoteCallProfile();
+ }
+
+ @Override
+ public String getProperty(String name) {
+ return ImsCallSessionImplBase.this.getProperty(name);
+ }
+
+ @Override
+ public int getState() {
+ return ImsCallSessionImplBase.this.getState();
+ }
+
+ @Override
+ public boolean isInCall() {
+ return ImsCallSessionImplBase.this.isInCall();
+ }
+
+ @Override
+ public void setListener(IImsCallSessionListener listener) {
+ ImsCallSessionImplBase.this.setListener(new ImsCallSessionListener(listener));
+ }
+
+ @Override
+ public void setMute(boolean muted) {
+ ImsCallSessionImplBase.this.setMute(muted);
+ }
+
+ @Override
+ public void start(String callee, ImsCallProfile profile) {
+ ImsCallSessionImplBase.this.start(callee, profile);
+ }
+
+ @Override
+ public void startConference(String[] participants, ImsCallProfile profile) throws
+ RemoteException {
+ ImsCallSessionImplBase.this.startConference(participants, profile);
+ }
+
+ @Override
+ public void accept(int callType, ImsStreamMediaProfile profile) {
+ ImsCallSessionImplBase.this.accept(callType, profile);
+ }
+
+ @Override
+ public void deflect(String deflectNumber) {
+ ImsCallSessionImplBase.this.deflect(deflectNumber);
+ }
+
+ @Override
+ public void reject(int reason) {
+ ImsCallSessionImplBase.this.reject(reason);
+ }
+
+ @Override
+ public void terminate(int reason) {
+ ImsCallSessionImplBase.this.terminate(reason);
+ }
+
+ @Override
+ public void hold(ImsStreamMediaProfile profile) {
+ ImsCallSessionImplBase.this.hold(profile);
+ }
+
+ @Override
+ public void resume(ImsStreamMediaProfile profile) {
+ ImsCallSessionImplBase.this.resume(profile);
+ }
+
+ @Override
+ public void merge() {
+ ImsCallSessionImplBase.this.merge();
+ }
+
+ @Override
+ public void update(int callType, ImsStreamMediaProfile profile) {
+ ImsCallSessionImplBase.this.update(callType, profile);
+ }
+
+ @Override
+ public void extendToConference(String[] participants) {
+ ImsCallSessionImplBase.this.extendToConference(participants);
+ }
+
+ @Override
+ public void inviteParticipants(String[] participants) {
+ ImsCallSessionImplBase.this.inviteParticipants(participants);
+ }
+
+ @Override
+ public void removeParticipants(String[] participants) {
+ ImsCallSessionImplBase.this.removeParticipants(participants);
+ }
+
+ @Override
+ public void sendDtmf(char c, Message result) {
+ ImsCallSessionImplBase.this.sendDtmf(c, result);
+ }
+
+ @Override
+ public void startDtmf(char c) {
+ ImsCallSessionImplBase.this.startDtmf(c);
+ }
+
+ @Override
+ public void stopDtmf() {
+ ImsCallSessionImplBase.this.stopDtmf();
+ }
+
+ @Override
+ public void sendUssd(String ussdMessage) {
+ ImsCallSessionImplBase.this.sendUssd(ussdMessage);
+ }
+
+ @Override
+ public IImsVideoCallProvider getVideoCallProvider() {
+ return ImsCallSessionImplBase.this.getVideoCallProvider();
+ }
+
+ @Override
+ public boolean isMultiparty() {
+ return ImsCallSessionImplBase.this.isMultiparty();
+ }
+
+ @Override
+ public void sendRttModifyRequest(ImsCallProfile toProfile) {
+ ImsCallSessionImplBase.this.sendRttModifyRequest(toProfile);
+ }
+
+ @Override
+ public void sendRttModifyResponse(boolean status) {
+ ImsCallSessionImplBase.this.sendRttModifyResponse(status);
+ }
+
+ @Override
+ public void sendRttMessage(String rttMessage) {
+ ImsCallSessionImplBase.this.sendRttMessage(rttMessage);
+ }
+ };
/**
- * Gets the call profile that this session is associated with
- *
- * @return the {@link ImsCallProfile} that this session is associated with
+ * @hide
*/
- @Override
- public ImsCallProfile getCallProfile() throws RemoteException {
- return null;
- }
-
- /**
- * Gets the local call profile that this session is associated with
- *
- * @return the local {@link ImsCallProfile} that this session is associated with
- */
- @Override
- public ImsCallProfile getLocalCallProfile() throws RemoteException {
- return null;
- }
-
- /**
- * Gets the remote call profile that this session is associated with
- *
- * @return the remote {@link ImsCallProfile} that this session is associated with
- */
- @Override
- public ImsCallProfile getRemoteCallProfile() throws RemoteException {
- return null;
- }
-
- /**
- * Gets the value associated with the specified property of this session.
- *
- * @return the string value associated with the specified property
- */
- @Override
- public String getProperty(String name) throws RemoteException {
- return null;
- }
-
- /**
- * Gets the session state.
- * The value returned must be one of the states in {@link ImsCallSession.State}.
- *
- * @return the session state
- */
- @Override
- public int getState() throws RemoteException {
- return ImsCallSession.State.INVALID;
- }
-
- /**
- * Checks if the session is in call.
- *
- * @return true if the session is in call, false otherwise
- */
- @Override
- public boolean isInCall() throws RemoteException {
- return false;
+ public final void setListener(IImsCallSessionListener listener) throws RemoteException {
+ setListener(new ImsCallSessionListener(listener));
}
/**
@@ -122,25 +279,87 @@
* can only hold one listener at a time. Subsequent calls to this method
* override the previous listener.
*
- * @param listener to listen to the session events of this object
+ * @param listener {@link ImsCallSessionListener} used to notify the framework of updates
+ * to the ImsCallSession
+ */
+ public void setListener(ImsCallSessionListener listener) {
+ }
+
+ /**
+ * Closes the object. This {@link ImsCallSessionImplBase} is not usable after being closed.
*/
@Override
- public void setListener(IImsCallSessionListener listener) throws RemoteException {
+ public void close() {
+
+ }
+
+ /**
+ * @return A String containing the unique call ID of this {@link ImsCallSessionImplBase}.
+ */
+ public String getCallId() {
+ return null;
+ }
+
+ /**
+ * @return The {@link ImsCallProfile} that this {@link ImsCallSessionImplBase} is associated
+ * with.
+ */
+ public ImsCallProfile getCallProfile() {
+ return null;
+ }
+
+ /**
+ * @return The local {@link ImsCallProfile} that this {@link ImsCallSessionImplBase} is
+ * associated with.
+ */
+ public ImsCallProfile getLocalCallProfile() {
+ return null;
+ }
+
+ /**
+ * @return The remote {@link ImsCallProfile} that this {@link ImsCallSessionImplBase} is
+ * associated with.
+ */
+ public ImsCallProfile getRemoteCallProfile() {
+ return null;
+ }
+
+ /**
+ * @param name The String extra key.
+ * @return The string extra value associated with the specified property.
+ */
+ public String getProperty(String name) {
+ return null;
+ }
+
+ /**
+ * @return The {@link ImsCallSessionImplBase} state, defined in
+ * {@link ImsCallSessionImplBase.State}.
+ */
+ public int getState() {
+ return ImsCallSessionImplBase.State.INVALID;
+ }
+
+ /**
+ * @return true if the {@link ImsCallSessionImplBase} is in a call, false otherwise.
+ */
+ public boolean isInCall() {
+ return false;
}
/**
* Mutes or unmutes the mic for the active call.
*
- * @param muted true if the call is muted, false otherwise
+ * @param muted true if the call should be muted, false otherwise.
*/
- @Override
- public void setMute(boolean muted) throws RemoteException {
+ public void setMute(boolean muted) {
}
/**
- * Initiates an IMS call with the specified target and call profile.
- * The session listener set in {@link #setListener} is called back upon defined session events.
- * The method is only valid to call when the session state is in
+ * Initiates an IMS call with the specified number and call profile.
+ * The session listener set in {@link #setListener(ImsCallSessionListener)} is called back upon
+ * defined session events.
+ * Only valid to call when the session state is in
* {@link ImsCallSession.State#IDLE}.
*
* @param callee dialed string to make the call to
@@ -149,13 +368,13 @@
* @see {@link ImsCallSession.Listener#callSessionStarted},
* {@link ImsCallSession.Listener#callSessionStartFailed}
*/
- @Override
- public void start(String callee, ImsCallProfile profile) throws RemoteException {
+ public void start(String callee, ImsCallProfile profile) {
}
/**
* Initiates an IMS call with the specified participants and call profile.
- * The session listener set in {@link #setListener} is called back upon defined session events.
+ * The session listener set in {@link #setListener(ImsCallSessionListener)} is called back upon
+ * defined session events.
* The method is only valid to call when the session state is in
* {@link ImsCallSession.State#IDLE}.
*
@@ -165,9 +384,7 @@
* @see {@link ImsCallSession.Listener#callSessionStarted},
* {@link ImsCallSession.Listener#callSessionStartFailed}
*/
- @Override
- public void startConference(String[] participants, ImsCallProfile profile)
- throws RemoteException {
+ public void startConference(String[] participants, ImsCallProfile profile) {
}
/**
@@ -177,31 +394,34 @@
* @param profile stream media profile {@link ImsStreamMediaProfile} to be answered
* @see {@link ImsCallSession.Listener#callSessionStarted}
*/
- @Override
- public void accept(int callType, ImsStreamMediaProfile profile) throws RemoteException {
+ public void accept(int callType, ImsStreamMediaProfile profile) {
+ }
+
+ /**
+ * Deflects an incoming call.
+ *
+ * @param deflectNumber number to deflect the call
+ */
+ public void deflect(String deflectNumber) {
}
/**
* Rejects an incoming call or session update.
*
- * @param reason reason code to reject an incoming call, defined in
- * com.android.ims.ImsReasonInfo
+ * @param reason reason code to reject an incoming call, defined in {@link ImsReasonInfo}.
* {@link ImsCallSession.Listener#callSessionStartFailed}
*/
- @Override
- public void reject(int reason) throws RemoteException {
+ public void reject(int reason) {
}
/**
* Terminates a call.
*
- * @param reason reason code to terminate a call, defined in
- * com.android.ims.ImsReasonInfo
+ * @param reason reason code to terminate a call, defined in {@link ImsReasonInfo}.
*
* @see {@link ImsCallSession.Listener#callSessionTerminated}
*/
- @Override
- public void terminate(int reason) throws RemoteException {
+ public void terminate(int reason) {
}
/**
@@ -212,8 +432,7 @@
* @see {@link ImsCallSession.Listener#callSessionHeld},
* {@link ImsCallSession.Listener#callSessionHoldFailed}
*/
- @Override
- public void hold(ImsStreamMediaProfile profile) throws RemoteException {
+ public void hold(ImsStreamMediaProfile profile) {
}
/**
@@ -224,12 +443,11 @@
* @see {@link ImsCallSession.Listener#callSessionResumed},
* {@link ImsCallSession.Listener#callSessionResumeFailed}
*/
- @Override
- public void resume(ImsStreamMediaProfile profile) throws RemoteException {
+ public void resume(ImsStreamMediaProfile profile) {
}
/**
- * Merges the active & hold call. When the merge starts,
+ * Merges the active and held call. When the merge starts,
* {@link ImsCallSession.Listener#callSessionMergeStarted} is called.
* {@link ImsCallSession.Listener#callSessionMergeComplete} is called if the merge is
* successful, and {@link ImsCallSession.Listener#callSessionMergeFailed} is called if the merge
@@ -239,8 +457,7 @@
* {@link ImsCallSession.Listener#callSessionMergeComplete},
* {@link ImsCallSession.Listener#callSessionMergeFailed}
*/
- @Override
- public void merge() throws RemoteException {
+ public void merge() {
}
/**
@@ -251,8 +468,7 @@
* @see {@link ImsCallSession.Listener#callSessionUpdated},
* {@link ImsCallSession.Listener#callSessionUpdateFailed}
*/
- @Override
- public void update(int callType, ImsStreamMediaProfile profile) throws RemoteException {
+ public void update(int callType, ImsStreamMediaProfile profile) {
}
/**
@@ -263,8 +479,7 @@
* @see {@link ImsCallSession.Listener#callSessionConferenceExtended},
* {@link ImsCallSession.Listener#callSessionConferenceExtendFailed}
*/
- @Override
- public void extendToConference(String[] participants) throws RemoteException {
+ public void extendToConference(String[] participants) {
}
/**
@@ -274,8 +489,7 @@
* @see {@link ImsCallSession.Listener#callSessionInviteParticipantsRequestDelivered},
* {@link ImsCallSession.Listener#callSessionInviteParticipantsRequestFailed}
*/
- @Override
- public void inviteParticipants(String[] participants) throws RemoteException {
+ public void inviteParticipants(String[] participants) {
}
/**
@@ -285,8 +499,7 @@
* @see {@link ImsCallSession.Listener#callSessionRemoveParticipantsRequestDelivered},
* {@link ImsCallSession.Listener#callSessionRemoveParticipantsRequestFailed}
*/
- @Override
- public void removeParticipants(String[] participants) throws RemoteException {
+ public void removeParticipants(String[] participants) {
}
/**
@@ -295,9 +508,23 @@
* and event flash to 16. Currently, event flash is not supported.
*
* @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
+ * @param result If non-null, the {@link Message} to send when the operation is complete. This
+ * is done by using the associated {@link android.os.Messenger} in
+ * {@link Message#replyTo}. For example:
+ * {@code
+ * // Send DTMF and other operations...
+ * try {
+ * // Notify framework that the DTMF was sent.
+ * Messenger dtmfMessenger = result.replyTo;
+ * if (dtmfMessenger != null) {
+ * dtmfMessenger.send(result);
+ * }
+ * } catch (RemoteException e) {
+ * // Remote side is dead
+ * }
+ * }
*/
- @Override
- public void sendDtmf(char c, Message result) throws RemoteException {
+ public void sendDtmf(char c, Message result) {
}
/**
@@ -307,15 +534,13 @@
*
* @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
*/
- @Override
- public void startDtmf(char c) throws RemoteException {
+ public void startDtmf(char c) {
}
/**
* Stop a DTMF code.
*/
- @Override
- public void stopDtmf() throws RemoteException {
+ public void stopDtmf() {
}
/**
@@ -323,17 +548,23 @@
*
* @param ussdMessage USSD message to send
*/
- @Override
- public void sendUssd(String ussdMessage) throws RemoteException {
+ public void sendUssd(String ussdMessage) {
}
/**
- * Returns a binder for the video call provider implementation contained within the IMS service
- * process. This binder is used by the VideoCallProvider subclass in Telephony which
- * intermediates between the propriety implementation and Telecomm/InCall.
+ * See {@link #getImsVideoCallProvider()}, used directly in older ImsService implementations.
+ * @hide
*/
- @Override
- public IImsVideoCallProvider getVideoCallProvider() throws RemoteException {
+ public IImsVideoCallProvider getVideoCallProvider() {
+ ImsVideoCallProvider provider = getImsVideoCallProvider();
+ return provider != null ? provider.getInterface() : null;
+ }
+
+ /**
+ * @return The {@link ImsVideoCallProvider} implementation contained within the IMS service
+ * process.
+ */
+ public ImsVideoCallProvider getImsVideoCallProvider() {
return null;
}
@@ -341,8 +572,7 @@
* Determines if the current session is multiparty.
* @return {@code True} if the session is multiparty.
*/
- @Override
- public boolean isMultiparty() throws RemoteException {
+ public boolean isMultiparty() {
return false;
}
@@ -350,16 +580,13 @@
* Device issues RTT modify request
* @param toProfile The profile with requested changes made
*/
- @Override
public void sendRttModifyRequest(ImsCallProfile toProfile) {
}
/**
* Device responds to Remote RTT modify request
- * @param status true Accepted the request
- * false Declined the request
+ * @param status true if the the request was accepted or false of the request is defined.
*/
- @Override
public void sendRttModifyResponse(boolean status) {
}
@@ -367,7 +594,16 @@
* Device sends RTT message
* @param rttMessage RTT message to be sent
*/
- @Override
public void sendRttMessage(String rttMessage) {
}
+
+ /** @hide */
+ public IImsCallSession getServiceImpl() {
+ return mServiceImpl;
+ }
+
+ /** @hide */
+ public void setServiceImpl(IImsCallSession serviceImpl) {
+ mServiceImpl = serviceImpl;
+ }
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java b/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java
deleted file mode 100644
index 6c18935..0000000
--- a/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java
+++ /dev/null
@@ -1,298 +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
- */
-
-package android.telephony.ims.stub;
-
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsConferenceState;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsSuppServiceNotification;
-import com.android.ims.internal.IImsCallSession;
-import com.android.ims.internal.IImsCallSessionListener;
-
-/**
- * Base implementation of ImsCallSessionListenerBase, which implements stub versions of the methods
- * in the IImsCallSessionListener AIDL. Override the methods that your implementation of
- * ImsCallSessionListener supports.
- *
- * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
- * will break other implementations of ImsCallSessionListener maintained by other ImsServices.
- *
- * @hide
- */
-public class ImsCallSessionListenerImplBase extends IImsCallSessionListener.Stub {
- /**
- * Notifies the result of the basic session operation (setup / terminate).
- */
- @Override
- public void callSessionProgressing(IImsCallSession session, ImsStreamMediaProfile profile) {
- // no-op
- }
-
- @Override
- public void callSessionStarted(IImsCallSession session, ImsCallProfile profile) {
- // no-op
- }
-
- @Override
- public void callSessionStartFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- @Override
- public void callSessionTerminated(IImsCallSession session, ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- /**
- * Notifies the result of the call hold/resume operation.
- */
- @Override
- public void callSessionHeld(IImsCallSession session, ImsCallProfile profile) {
- // no-op
- }
-
- @Override
- public void callSessionHoldFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- @Override
- public void callSessionHoldReceived(IImsCallSession session, ImsCallProfile profile) {
- // no-op
- }
-
- @Override
- public void callSessionResumed(IImsCallSession session, ImsCallProfile profile) {
- // no-op
- }
-
- @Override
- public void callSessionResumeFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- @Override
- public void callSessionResumeReceived(IImsCallSession session, ImsCallProfile profile) {
- // no-op
- }
-
- /**
- * Notifies the result of call merge operation.
- */
- @Override
- public void callSessionMergeStarted(IImsCallSession session, IImsCallSession newSession,
- ImsCallProfile profile) {
- // no-op
- }
-
- @Override
- public void callSessionMergeComplete(IImsCallSession session) {
- // no-op
- }
-
- @Override
- public void callSessionMergeFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- /**
- * Notifies the result of call upgrade / downgrade or any other call
- * updates.
- */
- @Override
- public void callSessionUpdated(IImsCallSession session, ImsCallProfile profile) {
- // no-op
- }
-
- @Override
- public void callSessionUpdateFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- @Override
- public void callSessionUpdateReceived(IImsCallSession session, ImsCallProfile profile) {
- // no-op
- }
-
- /**
- * Notifies the result of conference extension.
- */
- @Override
- public void callSessionConferenceExtended(IImsCallSession session, IImsCallSession newSession,
- ImsCallProfile profile) {
- // no-op
- }
-
- @Override
- public void callSessionConferenceExtendFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- @Override
- public void callSessionConferenceExtendReceived(IImsCallSession session,
- IImsCallSession newSession,
- ImsCallProfile profile) {
- // no-op
- }
-
- /**
- * Notifies the result of the participant invitation / removal to/from the
- * conference session.
- */
- @Override
- public void callSessionInviteParticipantsRequestDelivered(IImsCallSession session) {
- // no-op
- }
-
- @Override
- public void callSessionInviteParticipantsRequestFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- @Override
- public void callSessionRemoveParticipantsRequestDelivered(IImsCallSession session) {
- // no-op
- }
-
- @Override
- public void callSessionRemoveParticipantsRequestFailed(IImsCallSession session,
- ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- /**
- * Notifies the changes of the conference info. the conference session.
- */
- @Override
- public void callSessionConferenceStateUpdated(IImsCallSession session,
- ImsConferenceState state) {
- // no-op
- }
-
- /**
- * Notifies the incoming USSD message.
- */
- @Override
- public void callSessionUssdMessageReceived(IImsCallSession session, int mode,
- String ussdMessage) {
- // no-op
- }
-
- /**
- * Notifies of a case where a {@link com.android.ims.internal.ImsCallSession} may potentially
- * handover from one radio technology to another.
- * @param session
- * @param srcAccessTech The source radio access technology; one of the access technology
- * constants defined in {@link android.telephony.ServiceState}. For
- * example {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
- * @param targetAccessTech The target radio access technology; one of the access technology
- * constants defined in {@link android.telephony.ServiceState}. For
- * example {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
- */
- @Override
- public void callSessionMayHandover(IImsCallSession session, int srcAccessTech,
- int targetAccessTech) {
- // no-op
- }
-
- /**
- * Notifies of handover information for this call
- */
- @Override
- public void callSessionHandover(IImsCallSession session, int srcAccessTech,
- int targetAccessTech,
- ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- @Override
- public void callSessionHandoverFailed(IImsCallSession session, int srcAccessTech,
- int targetAccessTech,
- ImsReasonInfo reasonInfo) {
- // no-op
- }
-
- /**
- * Notifies the TTY mode change by remote party.
- *
- * @param mode one of the following: -
- * {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} -
- * {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} -
- * {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} -
- * {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
- */
- @Override
- public void callSessionTtyModeReceived(IImsCallSession session, int mode) {
- // no-op
- }
-
- /**
- * Notifies of a change to the multiparty state for this
- * {@code ImsCallSession}.
- *
- * @param session The call session.
- * @param isMultiParty {@code true} if the session became multiparty,
- * {@code false} otherwise.
- */
- @Override
- public void callSessionMultipartyStateChanged(IImsCallSession session, boolean isMultiParty) {
- // no-op
- }
-
- /**
- * Notifies the supplementary service information for the current session.
- */
- @Override
- public void callSessionSuppServiceReceived(IImsCallSession session,
- ImsSuppServiceNotification suppSrvNotification) {
- // no-op
- }
-
- /**
- * Received RTT modify request from Remote Party
- * @param session The call session.
- * @param callProfile ImsCallProfile with updated attribute
- */
- @Override
- public void callSessionRttModifyRequestReceived(IImsCallSession session,
- ImsCallProfile callProfile) {
- // no-op
- }
-
- /**
- * Received response for RTT modify request
- * @param status true : Accepted the request
- * false : Declined the request
- */
- @Override
- public void callSessionRttModifyResponseReceived(int status) {
- // no -op
- }
-
- /**
- * Device received RTT message from Remote UE
- * @param rttMessage RTT message received
- */
- @Override
- public void callSessionRttMessageReceived(String rttMessage) {
- // no-op
- }
-}
-
diff --git a/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
index 5a4db99..c6e5ddb 100644
--- a/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -16,135 +16,400 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
+import android.content.Context;
+import android.os.RemoteCallbackList;
import android.os.RemoteException;
+import android.telephony.ims.aidl.IImsConfig;
+import android.telephony.ims.aidl.IImsConfigCallback;
+import android.util.Log;
import com.android.ims.ImsConfig;
-import com.android.ims.ImsConfigListener;
-import com.android.ims.internal.IImsConfig;
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.lang.ref.WeakReference;
+import java.util.HashMap;
/**
- * Base implementation of ImsConfig, which implements stub versions of the methods
- * in the IImsConfig AIDL. Override the methods that your implementation of ImsConfig supports.
+ * Controls the modification of IMS specific configurations. For more information on the supported
+ * IMS configuration constants, see {@link ImsConfig}.
*
- * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
- * will break other implementations of ImsConfig maintained by other ImsServices.
- *
- * Provides APIs to get/set the IMS service feature/capability/parameters.
- * The config items include:
- * 1) Items provisioned by the operator.
- * 2) Items configured by user. Mainly service feature class.
- *
+ * The inner class {@link ImsConfigStub} implements methods of IImsConfig AIDL interface.
+ * The IImsConfig AIDL interface is called by ImsConfig, which may exist in many other processes.
+ * ImsConfigImpl access to the configuration parameters may be arbitrarily slow, especially in
+ * during initialization, or times when a lot of configuration parameters are being set/get
+ * (such as during boot up or SIM card change). By providing a cache in ImsConfigStub, we can speed
+ * up access to these configuration parameters, so a query to the ImsConfigImpl does not have to be
+ * performed every time.
* @hide
*/
+@SystemApi
+public class ImsConfigImplBase {
-public class ImsConfigImplBase extends IImsConfig.Stub {
+ private static final String TAG = "ImsConfigImplBase";
/**
- * Gets the value for ims service/capabilities parameters from the provisioned
- * value storage. Synchronous blocking call.
+ * Implements the IImsConfig AIDL interface, which is called by potentially many processes
+ * in order to get/set configuration parameters.
*
- * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @return value in Integer format.
+ * It holds an object of ImsConfigImplBase class which is usually extended by ImsConfigImpl
+ * with actual implementations from vendors. This class caches provisioned values from
+ * ImsConfigImpl layer because queries through ImsConfigImpl can be slow. When query goes in,
+ * it first checks cache layer. If missed, it will call the vendor implementation of
+ * ImsConfigImplBase API.
+ * and cache the return value if the set succeeds.
+ *
+ * Provides APIs to get/set the IMS service feature/capability/parameters.
+ * The config items include:
+ * 1) Items provisioned by the operator.
+ * 2) Items configured by user. Mainly service feature class.
+ *
+ * @hide
*/
- @Override
- public int getProvisionedValue(int item) throws RemoteException {
- return -1;
+ @VisibleForTesting
+ static public class ImsConfigStub extends IImsConfig.Stub {
+ WeakReference<ImsConfigImplBase> mImsConfigImplBaseWeakReference;
+ private HashMap<Integer, Integer> mProvisionedIntValue = new HashMap<>();
+ private HashMap<Integer, String> mProvisionedStringValue = new HashMap<>();
+
+ @VisibleForTesting
+ public ImsConfigStub(ImsConfigImplBase imsConfigImplBase) {
+ mImsConfigImplBaseWeakReference =
+ new WeakReference<ImsConfigImplBase>(imsConfigImplBase);
+ }
+
+ @Override
+ public void addImsConfigCallback(IImsConfigCallback c) throws RemoteException {
+ getImsConfigImpl().addImsConfigCallback(c);
+ }
+
+ @Override
+ public void removeImsConfigCallback(IImsConfigCallback c) throws RemoteException {
+ getImsConfigImpl().removeImsConfigCallback(c);
+ }
+
+ /**
+ * Gets the value for ims service/capabilities parameters. It first checks its local cache,
+ * if missed, it will call ImsConfigImplBase.getConfigInt.
+ * Synchronous blocking call.
+ *
+ * @param item integer key
+ * @return value in Integer format or {@link #CONFIG_RESULT_UNKNOWN} if
+ * unavailable.
+ */
+ @Override
+ public synchronized int getConfigInt(int item) throws RemoteException {
+ if (mProvisionedIntValue.containsKey(item)) {
+ return mProvisionedIntValue.get(item);
+ } else {
+ int retVal = getImsConfigImpl().getConfigInt(item);
+ if (retVal != ImsConfig.OperationStatusConstants.UNKNOWN) {
+ updateCachedValue(item, retVal, false);
+ }
+ return retVal;
+ }
+ }
+
+ /**
+ * Gets the value for ims service/capabilities parameters. It first checks its local cache,
+ * if missed, it will call #ImsConfigImplBase.getConfigString.
+ * Synchronous blocking call.
+ *
+ * @param item integer key
+ * @return value in String format.
+ */
+ @Override
+ public synchronized String getConfigString(int item) throws RemoteException {
+ if (mProvisionedIntValue.containsKey(item)) {
+ return mProvisionedStringValue.get(item);
+ } else {
+ String retVal = getImsConfigImpl().getConfigString(item);
+ if (retVal != null) {
+ updateCachedValue(item, retVal, false);
+ }
+ return retVal;
+ }
+ }
+
+ /**
+ * Sets the value for IMS service/capabilities parameters by the operator device
+ * management entity. It sets the config item value in the provisioned storage
+ * from which the master value is derived, and write it into local cache.
+ * Synchronous blocking call.
+ *
+ * @param item integer key
+ * @param value in Integer format.
+ * @return the result of setting the configuration value, defined as either
+ * {@link #CONFIG_RESULT_FAILED} or {@link #CONFIG_RESULT_SUCCESS}.
+ */
+ @Override
+ public synchronized int setConfigInt(int item, int value) throws RemoteException {
+ mProvisionedIntValue.remove(item);
+ int retVal = getImsConfigImpl().setConfig(item, value);
+ if (retVal == ImsConfig.OperationStatusConstants.SUCCESS) {
+ updateCachedValue(item, value, true);
+ } else {
+ Log.d(TAG, "Set provision value of " + item +
+ " to " + value + " failed with error code " + retVal);
+ }
+
+ return retVal;
+ }
+
+ /**
+ * Sets the value for IMS service/capabilities parameters by the operator device
+ * management entity. It sets the config item value in the provisioned storage
+ * from which the master value is derived, and write it into local cache.
+ * Synchronous blocking call.
+ *
+ * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param value in String format.
+ * @return the result of setting the configuration value, defined as either
+ * {@link #CONFIG_RESULT_FAILED} or {@link #CONFIG_RESULT_SUCCESS}.
+ */
+ @Override
+ public synchronized int setConfigString(int item, String value)
+ throws RemoteException {
+ mProvisionedStringValue.remove(item);
+ int retVal = getImsConfigImpl().setConfig(item, value);
+ if (retVal == ImsConfig.OperationStatusConstants.SUCCESS) {
+ updateCachedValue(item, value, true);
+ }
+
+ return retVal;
+ }
+
+ private ImsConfigImplBase getImsConfigImpl() throws RemoteException {
+ ImsConfigImplBase ref = mImsConfigImplBaseWeakReference.get();
+ if (ref == null) {
+ throw new RemoteException("Fail to get ImsConfigImpl");
+ } else {
+ return ref;
+ }
+ }
+
+ private void notifyImsConfigChanged(int item, int value) throws RemoteException {
+ getImsConfigImpl().notifyConfigChanged(item, value);
+ }
+
+ private void notifyImsConfigChanged(int item, String value) throws RemoteException {
+ getImsConfigImpl().notifyConfigChanged(item, value);
+ }
+
+ protected synchronized void updateCachedValue(int item, int value, boolean notifyChange)
+ throws RemoteException {
+ mProvisionedIntValue.put(item, value);
+ if (notifyChange) {
+ notifyImsConfigChanged(item, value);
+ }
+ }
+
+ protected synchronized void updateCachedValue(int item, String value,
+ boolean notifyChange) throws RemoteException {
+ mProvisionedStringValue.put(item, value);
+ if (notifyChange) {
+ notifyImsConfigChanged(item, value);
+ }
+ }
}
/**
- * Gets the value for ims service/capabilities parameters from the provisioned
- * value storage. Synchronous blocking call.
- *
- * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @return value in String format.
+ * Callback that the framework uses for receiving Configuration change updates.
+ * {@hide}
*/
- @Override
- public String getProvisionedStringValue(int item) throws RemoteException {
+ public static class Callback extends IImsConfigCallback.Stub {
+
+ @Override
+ public final void onIntConfigChanged(int item, int value) throws RemoteException {
+ onConfigChanged(item, value);
+ }
+
+ @Override
+ public final void onStringConfigChanged(int item, String value) throws RemoteException {
+ onConfigChanged(item, value);
+ }
+
+ /**
+ * Called when the IMS configuration has changed.
+ * @param item the IMS configuration key constant, as defined in ImsConfig.
+ * @param value the new integer value of the IMS configuration constant.
+ */
+ public void onConfigChanged(int item, int value) {
+ // Base Implementation
+ }
+
+ /**
+ * Called when the IMS configuration has changed.
+ * @param item the IMS configuration key constant, as defined in ImsConfig.
+ * @param value the new String value of the IMS configuration constant.
+ */
+ public void onConfigChanged(int item, String value) {
+ // Base Implementation
+ }
+ }
+
+ /**
+ * The configuration requested resulted in an unknown result. This may happen if the
+ * IMS configurations are unavailable.
+ */
+ public static final int CONFIG_RESULT_UNKNOWN = -1;
+ /**
+ * Setting the configuration value completed.
+ */
+ public static final int CONFIG_RESULT_SUCCESS = 0;
+ /**
+ * Setting the configuration value failed.
+ */
+ public static final int CONFIG_RESULT_FAILED = 1;
+
+ private final RemoteCallbackList<IImsConfigCallback> mCallbacks = new RemoteCallbackList<>();
+ ImsConfigStub mImsConfigStub;
+
+ /**
+ * Used for compatibility between older versions of the ImsService.
+ * @hide
+ */
+ public ImsConfigImplBase(Context context) {
+ mImsConfigStub = new ImsConfigStub(this);
+ }
+
+ public ImsConfigImplBase() {
+ mImsConfigStub = new ImsConfigStub(this);
+ }
+
+ /**
+ * Adds a {@link Callback} to the list of callbacks notified when a value in the configuration
+ * changes.
+ * @param c callback to add.
+ */
+ private void addImsConfigCallback(IImsConfigCallback c) {
+ mCallbacks.register(c);
+ }
+ /**
+ * Removes a {@link Callback} to the list of callbacks notified when a value in the
+ * configuration changes.
+ *
+ * @param c callback to remove.
+ */
+ private void removeImsConfigCallback(IImsConfigCallback c) {
+ mCallbacks.unregister(c);
+ }
+
+ /**
+ * @param item
+ * @param value
+ */
+ private final void notifyConfigChanged(int item, int value) {
+ // can be null in testing
+ if (mCallbacks == null) {
+ return;
+ }
+ mCallbacks.broadcast(c -> {
+ try {
+ c.onIntConfigChanged(item, value);
+ } catch (RemoteException e) {
+ Log.w(TAG, "notifyConfigChanged(int): dead binder in notify, skipping.");
+ }
+ });
+ }
+
+ private void notifyConfigChanged(int item, String value) {
+ // can be null in testing
+ if (mCallbacks == null) {
+ return;
+ }
+ mCallbacks.broadcast(c -> {
+ try {
+ c.onStringConfigChanged(item, value);
+ } catch (RemoteException e) {
+ Log.w(TAG, "notifyConfigChanged(string): dead binder in notify, skipping.");
+ }
+ });
+ }
+
+ /**
+ * @hide
+ */
+ public IImsConfig getIImsConfig() { return mImsConfigStub; }
+
+ /**
+ * Updates provisioning value and notifies the framework of the change.
+ * Doesn't call {@link #setConfig(int,int)} and assumes the result succeeded.
+ * This should only be used when the IMS implementer implicitly changed provisioned values.
+ *
+ * @param item an integer key.
+ * @param value in Integer format.
+ */
+ public final void notifyProvisionedValueChanged(int item, int value) {
+ try {
+ mImsConfigStub.updateCachedValue(item, value, true);
+ } catch (RemoteException e) {
+ Log.w(TAG, "notifyProvisionedValueChanged(int): Framework connection is dead.");
+ }
+ }
+
+ /**
+ * Updates provisioning value and notifies the framework of the change.
+ * Doesn't call {@link #setConfig(int,String)} and assumes the result succeeded.
+ * This should only be used when the IMS implementer implicitly changed provisioned values.
+ *
+ * @param item an integer key.
+ * @param value in String format.
+ */
+ public final void notifyProvisionedValueChanged(int item, String value) {
+ try {
+ mImsConfigStub.updateCachedValue(item, value, true);
+ } catch (RemoteException e) {
+ Log.w(TAG, "notifyProvisionedValueChanged(string): Framework connection is dead.");
+ }
+ }
+
+ /**
+ * Sets the configuration value for this ImsService.
+ *
+ * @param item an integer key.
+ * @param value an integer containing the configuration value.
+ * @return the result of setting the configuration value, defined as either
+ * {@link #CONFIG_RESULT_FAILED} or {@link #CONFIG_RESULT_SUCCESS}.
+ */
+ public int setConfig(int item, int value) {
+ // Base Implementation - To be overridden.
+ return CONFIG_RESULT_FAILED;
+ }
+
+ /**
+ * Sets the configuration value for this ImsService.
+ *
+ * @param item an integer key.
+ * @param value a String containing the new configuration value.
+ * @return Result of setting the configuration value, defined as either
+ * {@link #CONFIG_RESULT_FAILED} or {@link #CONFIG_RESULT_SUCCESS}.
+ */
+ public int setConfig(int item, String value) {
+ // Base Implementation - To be overridden.
+ return CONFIG_RESULT_FAILED;
+ }
+
+ /**
+ * Gets the currently stored value configuration value from the ImsService for {@code item}.
+ *
+ * @param item an integer key.
+ * @return configuration value, stored in integer format or {@link #CONFIG_RESULT_UNKNOWN} if
+ * unavailable.
+ */
+ public int getConfigInt(int item) {
+ // Base Implementation - To be overridden.
+ return CONFIG_RESULT_UNKNOWN;
+ }
+
+ /**
+ * Gets the currently stored value configuration value from the ImsService for {@code item}.
+ *
+ * @param item an integer key.
+ * @return configuration value, stored in String format or {@code null} if unavailable.
+ */
+ public String getConfigString(int item) {
+ // Base Implementation - To be overridden.
return null;
}
-
- /**
- * Sets the value for IMS service/capabilities parameters by the operator device
- * management entity. It sets the config item value in the provisioned storage
- * from which the master value is derived. Synchronous blocking call.
- *
- * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @param value in Integer format.
- * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
- */
- @Override
- public int setProvisionedValue(int item, int value) throws RemoteException {
- return ImsConfig.OperationStatusConstants.FAILED;
- }
-
- /**
- * Sets the value for IMS service/capabilities parameters by the operator device
- * management entity. It sets the config item value in the provisioned storage
- * from which the master value is derived. Synchronous blocking call.
- *
- * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @param value in String format.
- * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
- */
- @Override
- public int setProvisionedStringValue(int item, String value) throws RemoteException {
- return ImsConfig.OperationStatusConstants.FAILED;
- }
-
- /**
- * Gets the value of the specified IMS feature item for specified network type.
- * This operation gets the feature config value from the master storage (i.e. final
- * value). Asynchronous non-blocking call.
- *
- * @param feature as defined in com.android.ims.ImsConfig#FeatureConstants.
- * @param network as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
- * @param listener feature value returned asynchronously through listener.
- */
- @Override
- public void getFeatureValue(int feature, int network, ImsConfigListener listener)
- throws RemoteException {
- }
-
- /**
- * Sets the value for IMS feature item for specified network type.
- * This operation stores the user setting in setting db from which master db
- * is derived.
- *
- * @param feature as defined in com.android.ims.ImsConfig#FeatureConstants.
- * @param network as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
- * @param value as defined in com.android.ims.ImsConfig#FeatureValueConstants.
- * @param listener, provided if caller needs to be notified for set result.
- */
- @Override
- public void setFeatureValue(int feature, int network, int value, ImsConfigListener listener)
- throws RemoteException {
- }
-
- /**
- * Gets the value for IMS VoLTE provisioned.
- * This should be the same as the operator provisioned value if applies.
- */
- @Override
- public boolean getVolteProvisioned() throws RemoteException {
- return false;
- }
-
- /**
- * Gets the value for IMS feature item video quality.
- *
- * @param listener Video quality value returned asynchronously through listener.
- */
- @Override
- public void getVideoQuality(ImsConfigListener listener) throws RemoteException {
- }
-
- /**
- * Sets the value for IMS feature item video quality.
- *
- * @param quality, defines the value of video quality.
- * @param listener, provided if caller needs to be notified for set result.
- */
- @Override
- public void setVideoQuality(int quality, ImsConfigListener listener) throws RemoteException {
- }
-}
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java b/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java
index 89f95ff..06c35ea 100644
--- a/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java
@@ -16,7 +16,9 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.os.RemoteException;
+import android.util.Log;
import com.android.ims.internal.IImsEcbm;
import com.android.ims.internal.IImsEcbmListener;
@@ -30,22 +32,65 @@
*
* @hide
*/
+@SystemApi
+public class ImsEcbmImplBase {
+ private static final String TAG = "ImsEcbmImplBase";
-public class ImsEcbmImplBase extends IImsEcbm.Stub {
+ private IImsEcbmListener mListener;
+ private IImsEcbm mImsEcbm = new IImsEcbm.Stub() {
+ @Override
+ public void setListener(IImsEcbmListener listener) {
+ mListener = listener;
+ }
- /**
- * Sets the listener.
- */
- @Override
- public void setListener(IImsEcbmListener listener) throws RemoteException {
+ @Override
+ public void exitEmergencyCallbackMode() {
+ ImsEcbmImplBase.this.exitEmergencyCallbackMode();
+ }
+ };
+ /** @hide */
+ public IImsEcbm getImsEcbm() {
+ return mImsEcbm;
}
/**
- * Requests Modem to come out of ECBM mode
+ * This method should be implemented by the IMS provider. Framework will trigger this method to
+ * request to come out of ECBM mode
*/
- @Override
- public void exitEmergencyCallbackMode() throws RemoteException {
+ public void exitEmergencyCallbackMode() {
+ Log.d(TAG, "exitEmergencyCallbackMode() not implemented");
+ }
+ /**
+ * Notifies the framework when the device enters Emergency Callback Mode.
+ *
+ * @throws RuntimeException if the connection to the framework is not available.
+ */
+ public final void enteredEcbm() {
+ Log.d(TAG, "Entered ECBM.");
+ if (mListener != null) {
+ try {
+ mListener.enteredECBM();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ /**
+ * Notifies the framework when the device exits Emergency Callback Mode.
+ *
+ * @throws RuntimeException if the connection to the framework is not available.
+ */
+ public final void exitedEcbm() {
+ Log.d(TAG, "Exited ECBM.");
+ if (mListener != null) {
+ try {
+ mListener.exitedECBM();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
}
}
diff --git a/telephony/java/android/telephony/ims/internal/stub/ImsFeatureConfiguration.aidl b/telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.aidl
similarity index 93%
rename from telephony/java/android/telephony/ims/internal/stub/ImsFeatureConfiguration.aidl
rename to telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.aidl
index e890cf8..e2ae0e8 100644
--- a/telephony/java/android/telephony/ims/internal/stub/ImsFeatureConfiguration.aidl
+++ b/telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.aidl
@@ -14,6 +14,6 @@
* limitations under the License
*/
-package android.telephony.ims.internal.stub;
+package android.telephony.ims.stub;
parcelable ImsFeatureConfiguration;
diff --git a/telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.java b/telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.java
new file mode 100644
index 0000000..dfb6e2c
--- /dev/null
+++ b/telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.java
@@ -0,0 +1,220 @@
+/*
+ * 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
+ */
+
+package android.telephony.ims.stub;
+
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.telephony.ims.feature.ImsFeature;
+import android.util.ArraySet;
+import android.util.Pair;
+
+import java.util.Set;
+
+/**
+ * Container class for IMS Feature configuration. This class contains the features that the
+ * ImsService supports, which are defined in {@link ImsFeature} as
+ * {@link ImsFeature#FEATURE_EMERGENCY_MMTEL}, {@link ImsFeature#FEATURE_MMTEL}, and
+ * {@link ImsFeature#FEATURE_RCS}.
+ *
+ * @hide
+ */
+@SystemApi
+public final class ImsFeatureConfiguration implements Parcelable {
+
+ public static final class FeatureSlotPair {
+ /**
+ * SIM slot that this feature is associated with.
+ */
+ public final int slotId;
+ /**
+ * The feature that this slotId supports. Supported values are
+ * {@link ImsFeature#FEATURE_EMERGENCY_MMTEL}, {@link ImsFeature#FEATURE_MMTEL}, and
+ * {@link ImsFeature#FEATURE_RCS}.
+ */
+ public final @ImsFeature.FeatureType int featureType;
+
+ /**
+ * A mapping from slotId to IMS Feature type.
+ * @param slotId the SIM slot ID associated with this feature.
+ * @param featureType The feature that this slotId supports. Supported values are
+ * {@link ImsFeature#FEATURE_EMERGENCY_MMTEL}, {@link ImsFeature#FEATURE_MMTEL}, and
+ * {@link ImsFeature#FEATURE_RCS}.
+ */
+ public FeatureSlotPair(int slotId, @ImsFeature.FeatureType int featureType) {
+ this.slotId = slotId;
+ this.featureType = featureType;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ FeatureSlotPair that = (FeatureSlotPair) o;
+
+ if (slotId != that.slotId) return false;
+ return featureType == that.featureType;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = slotId;
+ result = 31 * result + featureType;
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "{s=" + slotId + ", f=" + featureType + "}";
+ }
+ }
+
+ /**
+ * Features that this ImsService supports.
+ */
+ private final Set<FeatureSlotPair> mFeatures;
+
+ /**
+ * Builder for {@link ImsFeatureConfiguration}.
+ */
+ public static class Builder {
+ ImsFeatureConfiguration mConfig;
+ public Builder() {
+ mConfig = new ImsFeatureConfiguration();
+ }
+
+ /**
+ * Adds an IMS feature associated with a SIM slot ID.
+ * @param slotId The slot ID associated with the IMS feature.
+ * @param featureType The feature that the slot ID supports. Supported values are
+ * {@link ImsFeature#FEATURE_EMERGENCY_MMTEL}, {@link ImsFeature#FEATURE_MMTEL}, and
+ * {@link ImsFeature#FEATURE_RCS}.
+ * @return a {@link Builder} to continue constructing the ImsFeatureConfiguration.
+ */
+ public Builder addFeature(int slotId, @ImsFeature.FeatureType int featureType) {
+ mConfig.addFeature(slotId, featureType);
+ return this;
+ }
+
+ public ImsFeatureConfiguration build() {
+ return mConfig;
+ }
+ }
+
+ /**
+ * Creates with all registration features empty.
+ * @hide
+ */
+ public ImsFeatureConfiguration() {
+ mFeatures = new ArraySet<>();
+ }
+
+ /**
+ * Configuration of the ImsService, which describes which features the ImsService supports
+ * (for registration).
+ * @param features a set of {@link FeatureSlotPair}s that describe which features this
+ * ImsService supports.
+ * @hide
+ */
+ public ImsFeatureConfiguration(Set<FeatureSlotPair> features) {
+ mFeatures = new ArraySet<>();
+
+ if (features != null) {
+ mFeatures.addAll(features);
+ }
+ }
+
+ /**
+ * @return a set of supported slot ID to feature type pairs contained within a
+ * {@link FeatureSlotPair}.
+ */
+ public Set<FeatureSlotPair> getServiceFeatures() {
+ return new ArraySet<>(mFeatures);
+ }
+
+ /**
+ * @hide
+ */
+ void addFeature(int slotId, int feature) {
+ mFeatures.add(new FeatureSlotPair(slotId, feature));
+ }
+
+ /** @hide */
+ protected ImsFeatureConfiguration(Parcel in) {
+ int featurePairLength = in.readInt();
+ // length
+ mFeatures = new ArraySet<>(featurePairLength);
+ for (int i = 0; i < featurePairLength; i++) {
+ // pair of reads for each entry (slotId->featureType)
+ mFeatures.add(new FeatureSlotPair(in.readInt(), in.readInt()));
+ }
+ }
+
+ public static final Creator<ImsFeatureConfiguration> CREATOR
+ = new Creator<ImsFeatureConfiguration>() {
+ @Override
+ public ImsFeatureConfiguration createFromParcel(Parcel in) {
+ return new ImsFeatureConfiguration(in);
+ }
+
+ @Override
+ public ImsFeatureConfiguration[] newArray(int size) {
+ return new ImsFeatureConfiguration[size];
+ }
+ };
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ FeatureSlotPair[] featureSlotPairs = new FeatureSlotPair[mFeatures.size()];
+ mFeatures.toArray(featureSlotPairs);
+ // length of list
+ dest.writeInt(featureSlotPairs.length);
+ // then pairs of integers for each entry (slotId->featureType).
+ for (FeatureSlotPair featureSlotPair : featureSlotPairs) {
+ dest.writeInt(featureSlotPair.slotId);
+ dest.writeInt(featureSlotPair.featureType);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof ImsFeatureConfiguration)) return false;
+
+ ImsFeatureConfiguration
+ that = (ImsFeatureConfiguration) o;
+
+ return mFeatures.equals(that.mFeatures);
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public int hashCode() {
+ return mFeatures.hashCode();
+ }
+}
diff --git a/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java b/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java
index 05da9da..ce2d89a 100644
--- a/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java
@@ -16,11 +16,16 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.os.RemoteException;
+import android.util.Log;
+import android.telephony.ims.ImsExternalCallState;
import com.android.ims.internal.IImsExternalCallStateListener;
import com.android.ims.internal.IImsMultiEndpoint;
+import java.util.List;
+
/**
* Base implementation of ImsMultiEndpoint, which implements stub versions of the methods
* in the IImsMultiEndpoint AIDL. Override the methods that your implementation of
@@ -31,23 +36,49 @@
*
* @hide
*/
+@SystemApi
+public class ImsMultiEndpointImplBase {
+ private static final String TAG = "MultiEndpointImplBase";
-public class ImsMultiEndpointImplBase extends IImsMultiEndpoint.Stub {
+ private IImsExternalCallStateListener mListener;
+ private IImsMultiEndpoint mImsMultiEndpoint = new IImsMultiEndpoint.Stub() {
+ @Override
+ public void setListener(IImsExternalCallStateListener listener) throws RemoteException {
+ mListener = listener;
+ }
- /**
- * Sets the listener.
- */
- @Override
- public void setListener(IImsExternalCallStateListener listener) throws RemoteException {
+ @Override
+ public void requestImsExternalCallStateInfo() throws RemoteException {
+ ImsMultiEndpointImplBase.this.requestImsExternalCallStateInfo();
+ }
+ };
+ /** @hide */
+ public IImsMultiEndpoint getIImsMultiEndpoint() {
+ return mImsMultiEndpoint;
}
/**
- * Query API to get the latest Dialog Event Package information
- * Should be invoked only after setListener is done
+ * Notifies framework when Dialog Event Package update is received
+ *
+ * @throws RuntimeException if the connection to the framework is not available.
*/
- @Override
- public void requestImsExternalCallStateInfo() throws RemoteException {
+ public final void onImsExternalCallStateUpdate(List<ImsExternalCallState> externalCallDialogs) {
+ Log.d(TAG, "ims external call state update triggered.");
+ if (mListener != null) {
+ try {
+ mListener.onImsExternalCallStateUpdate(externalCallDialogs);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ /**
+ * This method should be implemented by the IMS provider. Framework will trigger this to get the
+ * latest Dialog Event Package information. Should
+ */
+ public void requestImsExternalCallStateInfo() {
+ Log.d(TAG, "requestImsExternalCallStateInfo() not implemented");
}
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
index 42af083..4334d3a 100644
--- a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
@@ -17,15 +17,16 @@
package android.telephony.ims.stub;
import android.annotation.IntDef;
+import android.annotation.SystemApi;
import android.net.Uri;
-import android.os.IBinder;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
+import android.telephony.ims.aidl.IImsRegistration;
+import android.telephony.ims.aidl.IImsRegistrationCallback;
import android.util.Log;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.internal.IImsRegistration;
-import com.android.ims.internal.IImsRegistrationCallback;
+import android.telephony.ims.ImsReasonInfo;
+
import com.android.internal.annotations.VisibleForTesting;
import java.lang.annotation.Retention;
@@ -36,11 +37,14 @@
* registration for this ImsService has changed status.
* @hide
*/
-
+@SystemApi
public class ImsRegistrationImplBase {
private static final String LOG_TAG = "ImsRegistrationImplBase";
+ /**
+ * @hide
+ */
// Defines the underlying radio technology type that we have registered for IMS over.
@IntDef(flag = true,
value = {
@@ -155,6 +159,9 @@
// Locked on mLock, create unspecified disconnect cause.
private ImsReasonInfo mLastDisconnectCause = new ImsReasonInfo();
+ /**
+ * @hide
+ */
public final IImsRegistration getBinder() {
return mBinder;
}
@@ -171,8 +178,8 @@
/**
* Notify the framework that the device is connected to the IMS network.
*
- * @param imsRadioTech the radio access technology. Valid values are defined in
- * {@link ImsRegistrationTech}.
+ * @param imsRadioTech the radio access technology. Valid values are defined as
+ * {@link #REGISTRATION_TECH_LTE} and {@link #REGISTRATION_TECH_IWLAN}.
*/
public final void onRegistered(@ImsRegistrationTech int imsRadioTech) {
updateToState(imsRadioTech, REGISTRATION_STATE_REGISTERED);
@@ -189,8 +196,8 @@
/**
* Notify the framework that the device is trying to connect the IMS network.
*
- * @param imsRadioTech the radio access technology. Valid values are defined in
- * {@link ImsRegistrationTech}.
+ * @param imsRadioTech the radio access technology. Valid values are defined as
+ * {@link #REGISTRATION_TECH_LTE} and {@link #REGISTRATION_TECH_IWLAN}.
*/
public final void onRegistering(@ImsRegistrationTech int imsRadioTech) {
updateToState(imsRadioTech, REGISTRATION_STATE_REGISTERING);
@@ -221,6 +228,13 @@
});
}
+ /**
+ * Notify the framework that the handover from the current radio technology to the technology
+ * defined in {@code imsRadioTech} has failed.
+ * @param imsRadioTech The technology that has failed to be changed. Valid values are
+ * {@link #REGISTRATION_TECH_LTE} and {@link #REGISTRATION_TECH_IWLAN}.
+ * @param info The {@link ImsReasonInfo} for the failure to change technology.
+ */
public final void onTechnologyChangeFailed(@ImsRegistrationTech int imsRadioTech,
ImsReasonInfo info) {
mCallbacks.broadcast((c) -> {
@@ -233,6 +247,11 @@
});
}
+ /**
+ * The this device's subscriber associated {@link Uri}s have changed, which are used to filter
+ * out this device's {@link Uri}s during conference calling.
+ * @param uris
+ */
public final void onSubscriberAssociatedUriChanged(Uri[] uris) {
mCallbacks.broadcast((c) -> {
try {
@@ -264,6 +283,11 @@
}
}
+ /**
+ * @return the current registration connection type. Valid values are
+ * {@link #REGISTRATION_TECH_LTE} and {@link #REGISTRATION_TECH_IWLAN}
+ * @hide
+ */
@VisibleForTesting
public final @ImsRegistrationTech int getConnectionType() {
synchronized (mLock) {
diff --git a/telephony/java/android/telephony/ims/stub/ImsSmsImplBase.java b/telephony/java/android/telephony/ims/stub/ImsSmsImplBase.java
new file mode 100644
index 0000000..d03f63d
--- /dev/null
+++ b/telephony/java/android/telephony/ims/stub/ImsSmsImplBase.java
@@ -0,0 +1,334 @@
+/*
+ * 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
+ */
+
+package android.telephony.ims.stub;
+
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
+import android.os.RemoteException;
+import android.telephony.SmsManager;
+import android.telephony.SmsMessage;
+import android.telephony.ims.aidl.IImsSmsListener;
+import android.util.Log;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Base implementation for SMS over IMS.
+ *
+ * Any service wishing to provide SMS over IMS should extend this class and implement all methods
+ * that the service supports.
+ *
+ * @hide
+ */
+@SystemApi
+public class ImsSmsImplBase {
+ private static final String LOG_TAG = "SmsImplBase";
+
+ /** @hide */
+ @IntDef({
+ SEND_STATUS_OK,
+ SEND_STATUS_ERROR,
+ SEND_STATUS_ERROR_RETRY,
+ SEND_STATUS_ERROR_FALLBACK
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface SendStatusResult {}
+ /**
+ * Message was sent successfully.
+ */
+ public static final int SEND_STATUS_OK = 1;
+
+ /**
+ * IMS provider failed to send the message and platform should not retry falling back to sending
+ * the message using the radio.
+ */
+ public static final int SEND_STATUS_ERROR = 2;
+
+ /**
+ * IMS provider failed to send the message and platform should retry again after setting TP-RD
+ * bit to high.
+ */
+ public static final int SEND_STATUS_ERROR_RETRY = 3;
+
+ /**
+ * IMS provider failed to send the message and platform should retry falling back to sending
+ * the message using the radio.
+ */
+ public static final int SEND_STATUS_ERROR_FALLBACK = 4;
+
+ /** @hide */
+ @IntDef({
+ DELIVER_STATUS_OK,
+ DELIVER_STATUS_ERROR_GENERIC,
+ DELIVER_STATUS_ERROR_NO_MEMORY,
+ DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface DeliverStatusResult {}
+ /**
+ * Message was delivered successfully.
+ */
+ public static final int DELIVER_STATUS_OK = 1;
+
+ /**
+ * Message was not delivered.
+ */
+ public static final int DELIVER_STATUS_ERROR_GENERIC = 2;
+
+ /**
+ * Message was not delivered due to lack of memory.
+ */
+ public static final int DELIVER_STATUS_ERROR_NO_MEMORY = 3;
+
+ /**
+ * Message was not delivered as the request is not supported.
+ */
+ public static final int DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED = 4;
+
+ /** @hide */
+ @IntDef({
+ STATUS_REPORT_STATUS_OK,
+ STATUS_REPORT_STATUS_ERROR
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface StatusReportResult {}
+
+ /**
+ * Status Report was set successfully.
+ */
+ public static final int STATUS_REPORT_STATUS_OK = 1;
+
+ /**
+ * Error while setting status report.
+ */
+ public static final int STATUS_REPORT_STATUS_ERROR = 2;
+
+ // Lock for feature synchronization
+ private final Object mLock = new Object();
+ private IImsSmsListener mListener;
+
+ /**
+ * Registers a listener responsible for handling tasks like delivering messages.
+ *
+ * @param listener listener to register.
+ *
+ * @hide
+ */
+ public final void registerSmsListener(IImsSmsListener listener) {
+ synchronized (mLock) {
+ mListener = listener;
+ }
+ }
+
+ /**
+ * This method will be triggered by the platform when the user attempts to send an SMS. This
+ * method should be implemented by the IMS providers to provide implementation of sending an SMS
+ * over IMS.
+ *
+ * @param token unique token generated by the platform that should be used when triggering
+ * callbacks for this specific message.
+ * @param messageRef the message reference.
+ * @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
+ * {@link SmsMessage#FORMAT_3GPP2}.
+ * @param smsc the Short Message Service Center address.
+ * @param isRetry whether it is a retry of an already attempted message or not.
+ * @param pdu PDUs representing the contents of the message.
+ */
+ public void sendSms(int token, int messageRef, String format, String smsc, boolean isRetry,
+ byte[] pdu) {
+ // Base implementation returns error. Should be overridden.
+ try {
+ onSendSmsResult(token, messageRef, SEND_STATUS_ERROR,
+ SmsManager.RESULT_ERROR_GENERIC_FAILURE);
+ } catch (RuntimeException e) {
+ Log.e(LOG_TAG, "Can not send sms: " + e.getMessage());
+ }
+ }
+
+ /**
+ * This method will be triggered by the platform after
+ * {@link #onSmsReceived(int, String, byte[])} has been called to deliver the result to the IMS
+ * provider.
+ *
+ * @param token token provided in {@link #onSmsReceived(int, String, byte[])}
+ * @param result result of delivering the message. Valid values are:
+ * {@link #DELIVER_STATUS_OK},
+ * {@link #DELIVER_STATUS_ERROR_GENERIC},
+ * {@link #DELIVER_STATUS_ERROR_NO_MEMORY},
+ * {@link #DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED}
+ * @param messageRef the message reference
+ */
+ public void acknowledgeSms(int token, @DeliverStatusResult int messageRef, int result) {
+ Log.e(LOG_TAG, "acknowledgeSms() not implemented.");
+ }
+
+ /**
+ * This method will be triggered by the platform after
+ * {@link #onSmsStatusReportReceived(int, int, String, byte[])} has been called to provide the
+ * result to the IMS provider.
+ *
+ * @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
+ * @param result result of delivering the message. Valid values are:
+ * {@link #STATUS_REPORT_STATUS_OK},
+ * {@link #STATUS_REPORT_STATUS_ERROR}
+ * @param messageRef the message reference
+ */
+ public void acknowledgeSmsReport(int token, int messageRef, @StatusReportResult int result) {
+ Log.e(LOG_TAG, "acknowledgeSmsReport() not implemented.");
+ }
+
+ /**
+ * This method should be triggered by the IMS providers when there is an incoming message. The
+ * platform will deliver the message to the messages database and notify the IMS provider of the
+ * result by calling {@link #acknowledgeSms(int, int, int)}.
+ *
+ * This method must not be called before {@link #onReady()} is called or the call will fail. If
+ * the platform is not available, {@link #acknowledgeSms(int, int, int)} will be called with the
+ * {@link #DELIVER_STATUS_ERROR_GENERIC} result code.
+ *
+ * @param token unique token generated by IMS providers that the platform will use to trigger
+ * callbacks for this message.
+ * @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
+ * {@link SmsMessage#FORMAT_3GPP2}.
+ * @param pdu PDUs representing the contents of the message.
+ * @throws RuntimeException if called before {@link #onReady()} is triggered.
+ */
+ public final void onSmsReceived(int token, String format, byte[] pdu) throws RuntimeException {
+ synchronized (mLock) {
+ if (mListener == null) {
+ throw new RuntimeException("Feature not ready.");
+ }
+ try {
+ mListener.onSmsReceived(token, format, pdu);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Can not deliver sms: " + e.getMessage());
+ SmsMessage message = SmsMessage.createFromPdu(pdu, format);
+ if (message != null && message.mWrappedSmsMessage != null) {
+ acknowledgeSms(token, message.mWrappedSmsMessage.mMessageRef,
+ DELIVER_STATUS_ERROR_GENERIC);
+ } else {
+ Log.w(LOG_TAG, "onSmsReceived: Invalid pdu entered.");
+ acknowledgeSms(token, 0, DELIVER_STATUS_ERROR_GENERIC);
+ }
+ }
+ }
+ }
+
+ /**
+ * This method should be triggered by the IMS providers to pass the result of the sent message
+ * to the platform.
+ *
+ * This method must not be called before {@link #onReady()} is called.
+ *
+ * @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
+ * @param messageRef the message reference. Should be between 0 and 255 per TS.123.040
+ * @param status result of sending the SMS. Valid values are:
+ * {@link #SEND_STATUS_OK},
+ * {@link #SEND_STATUS_ERROR},
+ * {@link #SEND_STATUS_ERROR_RETRY},
+ * {@link #SEND_STATUS_ERROR_FALLBACK},
+ * @param reason reason in case status is failure. Valid values are:
+ * {@link SmsManager#RESULT_ERROR_NONE},
+ * {@link SmsManager#RESULT_ERROR_GENERIC_FAILURE},
+ * {@link SmsManager#RESULT_ERROR_RADIO_OFF},
+ * {@link SmsManager#RESULT_ERROR_NULL_PDU},
+ * {@link SmsManager#RESULT_ERROR_NO_SERVICE},
+ * {@link SmsManager#RESULT_ERROR_LIMIT_EXCEEDED},
+ * {@link SmsManager#RESULT_ERROR_FDN_CHECK_FAILURE},
+ * {@link SmsManager#RESULT_ERROR_SHORT_CODE_NOT_ALLOWED},
+ * {@link SmsManager#RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED},
+ * {@link SmsManager#RESULT_RADIO_NOT_AVAILABLE},
+ * {@link SmsManager#RESULT_NETWORK_REJECT},
+ * {@link SmsManager#RESULT_INVALID_ARGUMENTS},
+ * {@link SmsManager#RESULT_INVALID_STATE},
+ * {@link SmsManager#RESULT_NO_MEMORY},
+ * {@link SmsManager#RESULT_INVALID_SMS_FORMAT},
+ * {@link SmsManager#RESULT_SYSTEM_ERROR},
+ * {@link SmsManager#RESULT_MODEM_ERROR},
+ * {@link SmsManager#RESULT_NETWORK_ERROR},
+ * {@link SmsManager#RESULT_ENCODING_ERROR},
+ * {@link SmsManager#RESULT_INVALID_SMSC_ADDRESS},
+ * {@link SmsManager#RESULT_OPERATION_NOT_ALLOWED},
+ * {@link SmsManager#RESULT_INTERNAL_ERROR},
+ * {@link SmsManager#RESULT_NO_RESOURCES},
+ * {@link SmsManager#RESULT_CANCELLED},
+ * {@link SmsManager#RESULT_REQUEST_NOT_SUPPORTED}
+ *
+ * @throws RuntimeException if called before {@link #onReady()} is triggered or if the
+ * connection to the framework is not available. If this happens attempting to send the SMS
+ * should be aborted.
+ */
+ public final void onSendSmsResult(int token, int messageRef, @SendStatusResult int status,
+ int reason) throws RuntimeException {
+ synchronized (mLock) {
+ if (mListener == null) {
+ throw new RuntimeException("Feature not ready.");
+ }
+ try {
+ mListener.onSendSmsResult(token, messageRef, status, reason);
+ } catch (RemoteException e) {
+ e.rethrowFromSystemServer();
+ }
+ }
+ }
+
+ /**
+ * Sets the status report of the sent message.
+ *
+ * @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
+ * @param messageRef the message reference.
+ * @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
+ * {@link SmsMessage#FORMAT_3GPP2}.
+ * @param pdu PDUs representing the content of the status report.
+ * @throws RuntimeException if called before {@link #onReady()} is triggered
+ */
+ public final void onSmsStatusReportReceived(int token, int messageRef, String format,
+ byte[] pdu) throws RuntimeException{
+ synchronized (mLock) {
+ if (mListener == null) {
+ throw new RuntimeException("Feature not ready.");
+ }
+ try {
+ mListener.onSmsStatusReportReceived(token, messageRef, format, pdu);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Can not process sms status report: " + e.getMessage());
+ acknowledgeSmsReport(token, messageRef, STATUS_REPORT_STATUS_ERROR);
+ }
+ }
+ }
+
+ /**
+ * Returns the SMS format. Default is {@link SmsMessage#FORMAT_3GPP} unless overridden by IMS
+ * Provider.
+ *
+ * @return the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
+ * {@link SmsMessage#FORMAT_3GPP2}.
+ */
+ public String getSmsFormat() {
+ return SmsMessage.FORMAT_3GPP;
+ }
+
+ /**
+ * Called when ImsSmsImpl has been initialized and communication with the framework is set up.
+ * Any attempt by this class to access the framework before this method is called will return
+ * with a {@link RuntimeException}.
+ */
+ public void onReady() {
+ // Base Implementation - Should be overridden
+ }
+}
diff --git a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java
index 054a8b2..fcd7faf 100644
--- a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java
@@ -16,177 +16,332 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.RemoteException;
+import android.telephony.ims.ImsUtListener;
import com.android.ims.internal.IImsUt;
import com.android.ims.internal.IImsUtListener;
/**
- * Base implementation of ImsUt, which implements stub versions of the methods
- * in the IImsUt AIDL. Override the methods that your implementation of ImsUt supports.
- *
- * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
- * will break other implementations of ImsUt maintained by other ImsServices.
- *
- * Provides the Ut interface interworking to get/set the supplementary service configuration.
+ * Base implementation of IMS UT interface, which implements stubs. Override these methods to
+ * implement functionality.
*
* @hide
*/
+// DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
+// will break other implementations of ImsUt maintained by other ImsServices.
+@SystemApi
+public class ImsUtImplBase {
-public class ImsUtImplBase extends IImsUt.Stub {
+ private IImsUt.Stub mServiceImpl = new IImsUt.Stub() {
+ @Override
+ public void close() throws RemoteException {
+ ImsUtImplBase.this.close();
+ }
+
+ @Override
+ public int queryCallBarring(int cbType) throws RemoteException {
+ return ImsUtImplBase.this.queryCallBarring(cbType);
+ }
+
+ @Override
+ public int queryCallForward(int condition, String number) throws RemoteException {
+ return ImsUtImplBase.this.queryCallForward(condition, number);
+ }
+
+ @Override
+ public int queryCallWaiting() throws RemoteException {
+ return ImsUtImplBase.this.queryCallWaiting();
+ }
+
+ @Override
+ public int queryCLIR() throws RemoteException {
+ return ImsUtImplBase.this.queryCLIR();
+ }
+
+ @Override
+ public int queryCLIP() throws RemoteException {
+ return ImsUtImplBase.this.queryCLIP();
+ }
+
+ @Override
+ public int queryCOLR() throws RemoteException {
+ return ImsUtImplBase.this.queryCOLR();
+ }
+
+ @Override
+ public int queryCOLP() throws RemoteException {
+ return ImsUtImplBase.this.queryCOLP();
+ }
+
+ @Override
+ public int transact(Bundle ssInfo) throws RemoteException {
+ return ImsUtImplBase.this.transact(ssInfo);
+ }
+
+ @Override
+ public int updateCallBarring(int cbType, int action, String[] barrList) throws
+ RemoteException {
+ return ImsUtImplBase.this.updateCallBarring(cbType, action, barrList);
+ }
+
+ @Override
+ public int updateCallForward(int action, int condition, String number, int serviceClass,
+ int timeSeconds) throws RemoteException {
+ return ImsUtImplBase.this.updateCallForward(action, condition, number, serviceClass,
+ timeSeconds);
+ }
+
+ @Override
+ public int updateCallWaiting(boolean enable, int serviceClass) throws RemoteException {
+ return ImsUtImplBase.this.updateCallWaiting(enable, serviceClass);
+ }
+
+ @Override
+ public int updateCLIR(int clirMode) throws RemoteException {
+ return ImsUtImplBase.this.updateCLIR(clirMode);
+ }
+
+ @Override
+ public int updateCLIP(boolean enable) throws RemoteException {
+ return ImsUtImplBase.this.updateCLIP(enable);
+ }
+
+ @Override
+ public int updateCOLR(int presentation) throws RemoteException {
+ return ImsUtImplBase.this.updateCOLR(presentation);
+ }
+
+ @Override
+ public int updateCOLP(boolean enable) throws RemoteException {
+ return ImsUtImplBase.this.updateCOLP(enable);
+ }
+
+ @Override
+ public void setListener(IImsUtListener listener) throws RemoteException {
+ ImsUtImplBase.this.setListener(new ImsUtListener(listener));
+ }
+
+ @Override
+ public int queryCallBarringForServiceClass(int cbType, int serviceClass)
+ throws RemoteException {
+ return ImsUtImplBase.this.queryCallBarringForServiceClass(cbType, serviceClass);
+ }
+
+ @Override
+ public int updateCallBarringForServiceClass(int cbType, int action,
+ String[] barrList, int serviceClass) throws RemoteException {
+ return ImsUtImplBase.this.updateCallBarringForServiceClass(
+ cbType, action, barrList, serviceClass);
+ }
+ };
/**
- * Closes the object. This object is not usable after being closed.
+ * Called when the framework no longer needs to interact with the IMS UT implementation any
+ * longer.
*/
- @Override
- public void close() throws RemoteException {
+ public void close() {
}
/**
- * Retrieves the configuration of the call barring.
+ * Retrieves the call barring configuration.
+ * @param cbType
*/
- @Override
- public int queryCallBarring(int cbType) throws RemoteException {
+ public int queryCallBarring(int cbType) {
return -1;
}
/**
* Retrieves the configuration of the call barring for specified service class.
*/
- @Override
- public int queryCallBarringForServiceClass(int cbType, int serviceClass)
- throws RemoteException {
+ public int queryCallBarringForServiceClass(int cbType, int serviceClass) {
return -1;
}
/**
* Retrieves the configuration of the call forward.
*/
- @Override
- public int queryCallForward(int condition, String number) throws RemoteException {
+ public int queryCallForward(int condition, String number) {
return -1;
}
/**
* Retrieves the configuration of the call waiting.
*/
- @Override
- public int queryCallWaiting() throws RemoteException {
+ public int queryCallWaiting() {
return -1;
}
/**
* Retrieves the default CLIR setting.
+ * @hide
*/
- @Override
- public int queryCLIR() throws RemoteException {
+ public int queryCLIR() {
+ return queryClir();
+ }
+
+ /**
+ * Retrieves the CLIP call setting.
+ * @hide
+ */
+ public int queryCLIP() {
+ return queryClip();
+ }
+
+ /**
+ * Retrieves the COLR call setting.
+ * @hide
+ */
+ public int queryCOLR() {
+ return queryColr();
+ }
+
+ /**
+ * Retrieves the COLP call setting.
+ * @hide
+ */
+ public int queryCOLP() {
+ return queryColp();
+ }
+
+ /**
+ * Retrieves the default CLIR setting.
+ */
+ public int queryClir() {
return -1;
}
/**
* Retrieves the CLIP call setting.
*/
- @Override
- public int queryCLIP() throws RemoteException {
+ public int queryClip() {
return -1;
}
/**
* Retrieves the COLR call setting.
*/
- @Override
- public int queryCOLR() throws RemoteException {
+ public int queryColr() {
return -1;
}
/**
* Retrieves the COLP call setting.
*/
- @Override
- public int queryCOLP() throws RemoteException {
+ public int queryColp() {
return -1;
}
/**
* Updates or retrieves the supplementary service configuration.
*/
- @Override
- public int transact(Bundle ssInfo) throws RemoteException {
+ public int transact(Bundle ssInfo) {
return -1;
}
/**
* Updates the configuration of the call barring.
*/
- @Override
- public int updateCallBarring(int cbType, int action, String[] barrList) throws RemoteException {
+ public int updateCallBarring(int cbType, int action, String[] barrList) {
return -1;
}
/**
* Updates the configuration of the call barring for specified service class.
*/
- @Override
public int updateCallBarringForServiceClass(int cbType, int action, String[] barrList,
- int serviceClass) throws RemoteException {
+ int serviceClass) {
return -1;
}
/**
* Updates the configuration of the call forward.
*/
- @Override
public int updateCallForward(int action, int condition, String number, int serviceClass,
- int timeSeconds) throws RemoteException {
+ int timeSeconds) {
return 0;
}
/**
* Updates the configuration of the call waiting.
*/
- @Override
- public int updateCallWaiting(boolean enable, int serviceClass) throws RemoteException {
+ public int updateCallWaiting(boolean enable, int serviceClass) {
return -1;
}
/**
* Updates the configuration of the CLIR supplementary service.
+ * @hide
*/
- @Override
- public int updateCLIR(int clirMode) throws RemoteException {
+ public int updateCLIR(int clirMode) {
+ return updateClir(clirMode);
+ }
+
+ /**
+ * Updates the configuration of the CLIP supplementary service.
+ * @hide
+ */
+ public int updateCLIP(boolean enable) {
+ return updateClip(enable);
+ }
+
+ /**
+ * Updates the configuration of the COLR supplementary service.
+ * @hide
+ */
+ public int updateCOLR(int presentation) {
+ return updateColr(presentation);
+ }
+
+ /**
+ * Updates the configuration of the COLP supplementary service.
+ * @hide
+ */
+ public int updateCOLP(boolean enable) {
+ return updateColp(enable);
+ }
+
+ /**
+ * Updates the configuration of the CLIR supplementary service.
+ */
+ public int updateClir(int clirMode) {
return -1;
}
/**
* Updates the configuration of the CLIP supplementary service.
*/
- @Override
- public int updateCLIP(boolean enable) throws RemoteException {
+ public int updateClip(boolean enable) {
return -1;
}
/**
* Updates the configuration of the COLR supplementary service.
*/
- @Override
- public int updateCOLR(int presentation) throws RemoteException {
+ public int updateColr(int presentation) {
return -1;
}
/**
* Updates the configuration of the COLP supplementary service.
*/
- @Override
- public int updateCOLP(boolean enable) throws RemoteException {
+ public int updateColp(boolean enable) {
return -1;
}
/**
* Sets the listener.
*/
- @Override
- public void setListener(IImsUtListener listener) throws RemoteException {
+ public void setListener(ImsUtListener listener) {
+ }
+
+ /**
+ * @hide
+ */
+ public IImsUt getInterface() {
+ return mServiceImpl;
}
}
diff --git a/telephony/java/android/telephony/mbms/DownloadProgressListener.java b/telephony/java/android/telephony/mbms/DownloadProgressListener.java
new file mode 100644
index 0000000..4301cb1
--- /dev/null
+++ b/telephony/java/android/telephony/mbms/DownloadProgressListener.java
@@ -0,0 +1,48 @@
+/*
+ * 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
+ */
+
+package android.telephony.mbms;
+
+import android.telephony.MbmsDownloadSession;
+
+/**
+ * A optional listener class used by download clients to track progress. Apps should extend this
+ * class and pass an instance into
+ * {@link MbmsDownloadSession#download(DownloadRequest)}
+ *
+ * This is optionally specified when requesting a download and will only be called while the app
+ * is running.
+ */
+public class DownloadProgressListener {
+ /**
+ * Called when the middleware wants to report progress for a file in a {@link DownloadRequest}.
+ *
+ * @param request a {@link DownloadRequest}, indicating which download is being referenced.
+ * @param fileInfo a {@link FileInfo} specifying the file to report progress on. Note that
+ * the request may result in many files being downloaded and the client
+ * may not have been able to get a list of them in advance.
+ * @param currentDownloadSize is the current amount downloaded.
+ * @param fullDownloadSize is the total number of bytes that make up the downloaded content.
+ * This may be different from the decoded final size, but is useful in gauging download
+ * progress.
+ * @param currentDecodedSize is the number of bytes that have been decoded.
+ * @param fullDecodedSize is the total number of bytes that make up the final decoded content.
+ */
+ public void onProgressUpdated(DownloadRequest request, FileInfo fileInfo,
+ int currentDownloadSize, int fullDownloadSize,
+ int currentDecodedSize, int fullDecodedSize) {
+ }
+}
diff --git a/telephony/java/android/telephony/mbms/DownloadRequest.java b/telephony/java/android/telephony/mbms/DownloadRequest.java
index f0d60b6..9e3302b 100644
--- a/telephony/java/android/telephony/mbms/DownloadRequest.java
+++ b/telephony/java/android/telephony/mbms/DownloadRequest.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.content.Intent;
import android.net.Uri;
import android.os.Parcel;
@@ -27,10 +28,13 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.Externalizable;
+import java.io.File;
import java.io.IOException;
+import java.io.ObjectInput;
import java.io.ObjectInputStream;
+import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
-import java.io.Serializable;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
@@ -54,34 +58,116 @@
public static final int MAX_DESTINATION_URI_SIZE = 50000;
/** @hide */
- private static class OpaqueDataContainer implements Serializable {
- private final String appIntent;
- private final int version;
+ private static class SerializationDataContainer implements Externalizable {
+ private String fileServiceId;
+ private Uri source;
+ private Uri destination;
+ private int subscriptionId;
+ private String appIntent;
+ private int version;
- public OpaqueDataContainer(String appIntent, int version) {
- this.appIntent = appIntent;
- this.version = version;
+ public SerializationDataContainer() {}
+
+ SerializationDataContainer(DownloadRequest request) {
+ fileServiceId = request.fileServiceId;
+ source = request.sourceUri;
+ destination = request.destinationUri;
+ subscriptionId = request.subscriptionId;
+ appIntent = request.serializedResultIntentForApp;
+ version = request.version;
+ }
+
+ @Override
+ public void writeExternal(ObjectOutput objectOutput) throws IOException {
+ objectOutput.write(version);
+ objectOutput.writeUTF(fileServiceId);
+ objectOutput.writeUTF(source.toString());
+ objectOutput.writeUTF(destination.toString());
+ objectOutput.write(subscriptionId);
+ objectOutput.writeUTF(appIntent);
+ }
+
+ @Override
+ public void readExternal(ObjectInput objectInput) throws IOException {
+ version = objectInput.read();
+ fileServiceId = objectInput.readUTF();
+ source = Uri.parse(objectInput.readUTF());
+ destination = Uri.parse(objectInput.readUTF());
+ subscriptionId = objectInput.read();
+ appIntent = objectInput.readUTF();
+ // Do version checks here -- future versions may have other fields.
}
}
public static class Builder {
private String fileServiceId;
private Uri source;
+ private Uri destination;
private int subscriptionId;
private String appIntent;
private int version = CURRENT_VERSION;
+ /**
+ * Constructs a {@link Builder} from a {@link DownloadRequest}
+ * @param other The {@link DownloadRequest} from which the data for the {@link Builder}
+ * should come.
+ * @return An instance of {@link Builder} pre-populated with data from the provided
+ * {@link DownloadRequest}.
+ */
+ public static Builder fromDownloadRequest(DownloadRequest other) {
+ Builder result = new Builder(other.sourceUri, other.destinationUri)
+ .setServiceId(other.fileServiceId)
+ .setSubscriptionId(other.subscriptionId);
+ result.appIntent = other.serializedResultIntentForApp;
+ // Version of the result is going to be the current version -- as this class gets
+ // updated, new fields will be set to default values in here.
+ return result;
+ }
+
+ /**
+ * This method constructs a new instance of {@link Builder} based on the serialized data
+ * passed in.
+ * @param data A byte array, the contents of which should have been originally obtained
+ * from {@link DownloadRequest#toByteArray()}.
+ */
+ public static Builder fromSerializedRequest(byte[] data) {
+ Builder builder;
+ try {
+ ObjectInputStream stream = new ObjectInputStream(new ByteArrayInputStream(data));
+ SerializationDataContainer dataContainer =
+ (SerializationDataContainer) stream.readObject();
+ builder = new Builder(dataContainer.source, dataContainer.destination);
+ builder.version = dataContainer.version;
+ builder.appIntent = dataContainer.appIntent;
+ builder.fileServiceId = dataContainer.fileServiceId;
+ builder.subscriptionId = dataContainer.subscriptionId;
+ } catch (IOException e) {
+ // Really should never happen
+ Log.e(LOG_TAG, "Got IOException trying to parse opaque data");
+ throw new IllegalArgumentException(e);
+ } catch (ClassNotFoundException e) {
+ Log.e(LOG_TAG, "Got ClassNotFoundException trying to parse opaque data");
+ throw new IllegalArgumentException(e);
+ }
+ return builder;
+ }
/**
* Builds a new DownloadRequest.
* @param sourceUri the source URI for the DownloadRequest to be built. This URI should
* never be null.
+ * @param destinationUri The final location for the file(s) that are to be downloaded. It
+ * must be on the same filesystem as the temp file directory set via
+ * {@link android.telephony.MbmsDownloadSession#setTempFileRootDirectory(File)}.
+ * The provided path must be a directory that exists. An
+ * {@link IllegalArgumentException} will be thrown otherwise.
*/
- public Builder(@NonNull Uri sourceUri) {
- if (sourceUri == null) {
- throw new IllegalArgumentException("Source URI must be non-null.");
+ public Builder(@NonNull Uri sourceUri, @NonNull Uri destinationUri) {
+ if (sourceUri == null || destinationUri == null) {
+ throw new IllegalArgumentException("Source and destination URIs must be non-null.");
}
source = sourceUri;
+ destination = destinationUri;
}
/**
@@ -99,6 +185,7 @@
* @hide
*/
@SystemApi
+ @TestApi
public Builder setServiceId(String serviceId) {
fileServiceId = serviceId;
return this;
@@ -130,68 +217,34 @@
return this;
}
- /**
- * For use by the middleware to set the byte array of opaque data. The opaque data
- * includes information about the download request that is used by the client app and the
- * manager code, but is irrelevant to the middleware.
- * @param data A byte array, the contents of which should have been originally obtained
- * from {@link DownloadRequest#getOpaqueData()}.
- * @hide
- */
- @SystemApi
- public Builder setOpaqueData(byte[] data) {
- try {
- ObjectInputStream stream = new ObjectInputStream(new ByteArrayInputStream(data));
- OpaqueDataContainer dataContainer = (OpaqueDataContainer) stream.readObject();
- version = dataContainer.version;
- appIntent = dataContainer.appIntent;
- } catch (IOException e) {
- // Really should never happen
- Log.e(LOG_TAG, "Got IOException trying to parse opaque data");
- throw new IllegalArgumentException(e);
- } catch (ClassNotFoundException e) {
- Log.e(LOG_TAG, "Got ClassNotFoundException trying to parse opaque data");
- throw new IllegalArgumentException(e);
- }
- return this;
- }
-
public DownloadRequest build() {
- return new DownloadRequest(fileServiceId, source, subscriptionId, appIntent, version);
+ return new DownloadRequest(fileServiceId, source, destination,
+ subscriptionId, appIntent, version);
}
}
private final String fileServiceId;
private final Uri sourceUri;
+ private final Uri destinationUri;
private final int subscriptionId;
private final String serializedResultIntentForApp;
private final int version;
private DownloadRequest(String fileServiceId,
- Uri source, int sub,
+ Uri source, Uri destination, int sub,
String appIntent, int version) {
this.fileServiceId = fileServiceId;
sourceUri = source;
subscriptionId = sub;
+ destinationUri = destination;
serializedResultIntentForApp = appIntent;
this.version = version;
}
- public static DownloadRequest copy(DownloadRequest other) {
- return new DownloadRequest(other);
- }
-
- private DownloadRequest(DownloadRequest dr) {
- fileServiceId = dr.fileServiceId;
- sourceUri = dr.sourceUri;
- subscriptionId = dr.subscriptionId;
- serializedResultIntentForApp = dr.serializedResultIntentForApp;
- version = dr.version;
- }
-
private DownloadRequest(Parcel in) {
fileServiceId = in.readString();
sourceUri = in.readParcelable(getClass().getClassLoader());
+ destinationUri = in.readParcelable(getClass().getClassLoader());
subscriptionId = in.readInt();
serializedResultIntentForApp = in.readString();
version = in.readInt();
@@ -204,6 +257,7 @@
public void writeToParcel(Parcel out, int flags) {
out.writeString(fileServiceId);
out.writeParcelable(sourceUri, flags);
+ out.writeParcelable(destinationUri, flags);
out.writeInt(subscriptionId);
out.writeString(serializedResultIntentForApp);
out.writeInt(version);
@@ -224,6 +278,13 @@
}
/**
+ * @return The destination {@link Uri} of the downloaded file.
+ */
+ public Uri getDestinationUri() {
+ return destinationUri;
+ }
+
+ /**
* @return The subscription ID on which to perform MBMS operations.
*/
public int getSubscriptionId() {
@@ -244,19 +305,16 @@
}
/**
- * For use by the middleware only. The byte array returned from this method should be
- * persisted and sent back to the app upon download completion or failure by passing it into
- * {@link Builder#setOpaqueData(byte[])}.
- * @return A byte array of opaque data to persist.
- * @hide
+ * This method returns a byte array that may be persisted to disk and restored to a
+ * {@link DownloadRequest}. The instance of {@link DownloadRequest} persisted by this method
+ * may be recovered via {@link Builder#fromSerializedRequest(byte[])}.
+ * @return A byte array of data to persist.
*/
- @SystemApi
- public byte[] getOpaqueData() {
+ public byte[] toByteArray() {
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream stream = new ObjectOutputStream(byteArrayOutputStream);
- OpaqueDataContainer container = new OpaqueDataContainer(
- serializedResultIntentForApp, version);
+ SerializationDataContainer container = new SerializationDataContainer(this);
stream.writeObject(container);
stream.flush();
return byteArrayOutputStream.toByteArray();
@@ -299,15 +357,6 @@
}
/**
- * @hide
- */
- public boolean isMultipartDownload() {
- // TODO: figure out what qualifies a request as a multipart download request.
- return getSourceUri().getLastPathSegment() != null &&
- getSourceUri().getLastPathSegment().contains("*");
- }
-
- /**
* Retrieves the hash string that should be used as the filename when storing a token for
* this DownloadRequest.
* @hide
@@ -320,8 +369,9 @@
throw new RuntimeException("Could not get sha256 hash object");
}
if (version >= 1) {
- // Hash the source URI and the app intent
+ // Hash the source, destination, and the app intent
digest.update(sourceUri.toString().getBytes(StandardCharsets.UTF_8));
+ digest.update(destinationUri.toString().getBytes(StandardCharsets.UTF_8));
if (serializedResultIntentForApp != null) {
digest.update(serializedResultIntentForApp.getBytes(StandardCharsets.UTF_8));
}
@@ -344,12 +394,13 @@
version == request.version &&
Objects.equals(fileServiceId, request.fileServiceId) &&
Objects.equals(sourceUri, request.sourceUri) &&
+ Objects.equals(destinationUri, request.destinationUri) &&
Objects.equals(serializedResultIntentForApp, request.serializedResultIntentForApp);
}
@Override
public int hashCode() {
- return Objects.hash(fileServiceId, sourceUri,
+ return Objects.hash(fileServiceId, sourceUri, destinationUri,
subscriptionId, serializedResultIntentForApp, version);
}
}
diff --git a/telephony/java/android/telephony/mbms/DownloadStateCallback.java b/telephony/java/android/telephony/mbms/DownloadStateCallback.java
deleted file mode 100644
index 9f60cc3..0000000
--- a/telephony/java/android/telephony/mbms/DownloadStateCallback.java
+++ /dev/null
@@ -1,131 +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.
- */
-
-package android.telephony.mbms;
-
-import android.annotation.IntDef;
-import android.telephony.MbmsDownloadSession;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * A optional listener class used by download clients to track progress. Apps should extend this
- * class and pass an instance into
- * {@link MbmsDownloadSession#download(DownloadRequest)}
- *
- * This is optionally specified when requesting a download and will only be called while the app
- * is running.
- */
-public class DownloadStateCallback {
-
- /**
- * Bitmask flags used for filtering out callback methods. Used when constructing the
- * DownloadStateCallback as an optional parameter.
- * @hide
- */
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {ALL_UPDATES, PROGRESS_UPDATES, STATE_UPDATES})
- public @interface FilterFlag {}
-
- /**
- * Receive all callbacks.
- * Default value.
- */
- public static final int ALL_UPDATES = 0x00;
- /**
- * Receive callbacks for {@link #onProgressUpdated}.
- */
- public static final int PROGRESS_UPDATES = 0x01;
- /**
- * Receive callbacks for {@link #onStateUpdated}.
- */
- public static final int STATE_UPDATES = 0x02;
-
- private final int mCallbackFilterFlags;
-
- /**
- * Creates a DownloadStateCallback that will receive all callbacks.
- */
- public DownloadStateCallback() {
- mCallbackFilterFlags = ALL_UPDATES;
- }
-
- /**
- * Creates a DownloadStateCallback that will only receive callbacks for the methods specified
- * via the filterFlags parameter.
- * @param filterFlags A bitmask of filter flags that will specify which callback this instance
- * is interested in.
- */
- public DownloadStateCallback(int filterFlags) {
- mCallbackFilterFlags = filterFlags;
- }
-
- /**
- * Return the currently set filter flags.
- * @return An integer containing the bitmask of flags that this instance is interested in.
- * @hide
- */
- public int getCallbackFilterFlags() {
- return mCallbackFilterFlags;
- }
-
- /**
- * Returns true if a filter flag is set for a particular callback method. If the flag is set,
- * the callback will be delivered to the listening process.
- * @param flag A filter flag specifying whether or not a callback method is registered to
- * receive callbacks.
- * @return true if registered to receive callbacks in the listening process, false if not.
- */
- public final boolean isFilterFlagSet(@FilterFlag int flag) {
- if (mCallbackFilterFlags == ALL_UPDATES) {
- return true;
- }
- return (mCallbackFilterFlags & flag) > 0;
- }
-
- /**
- * Called when the middleware wants to report progress for a file in a {@link DownloadRequest}.
- *
- * @param request a {@link DownloadRequest}, indicating which download is being referenced.
- * @param fileInfo a {@link FileInfo} specifying the file to report progress on. Note that
- * the request may result in many files being downloaded and the client
- * may not have been able to get a list of them in advance.
- * @param currentDownloadSize is the current amount downloaded.
- * @param fullDownloadSize is the total number of bytes that make up the downloaded content.
- * This may be different from the decoded final size, but is useful in gauging download
- * progress.
- * @param currentDecodedSize is the number of bytes that have been decoded.
- * @param fullDecodedSize is the total number of bytes that make up the final decoded content.
- */
- public void onProgressUpdated(DownloadRequest request, FileInfo fileInfo,
- int currentDownloadSize, int fullDownloadSize,
- int currentDecodedSize, int fullDecodedSize) {
- }
-
- /**
- * Gives download state callbacks for a file in a {@link DownloadRequest}.
- *
- * @param request a {@link DownloadRequest}, indicating which download is being referenced.
- * @param fileInfo a {@link FileInfo} specifying the file to report progress on. Note that
- * the request may result in many files being downloaded and the client
- * may not have been able to get a list of them in advance.
- * @param state The current state of the download.
- */
- public void onStateUpdated(DownloadRequest request, FileInfo fileInfo,
- @MbmsDownloadSession.DownloadStatus int state) {
- }
-}
diff --git a/telephony/java/android/telephony/mbms/DownloadStatusListener.java b/telephony/java/android/telephony/mbms/DownloadStatusListener.java
new file mode 100644
index 0000000..ca77932
--- /dev/null
+++ b/telephony/java/android/telephony/mbms/DownloadStatusListener.java
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+package android.telephony.mbms;
+
+import android.annotation.IntDef;
+import android.telephony.MbmsDownloadSession;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * A optional listener class used by download clients to track progress. Apps should extend this
+ * class and pass an instance into
+ * {@link MbmsDownloadSession#download(DownloadRequest)}
+ *
+ * This is optionally specified when requesting a download and will only be called while the app
+ * is running.
+ */
+public class DownloadStatusListener {
+ /**
+ * Gives download status callbacks for a file in a {@link DownloadRequest}.
+ *
+ * @param request a {@link DownloadRequest}, indicating which download is being referenced.
+ * @param fileInfo a {@link FileInfo} specifying the file to report progress on. Note that
+ * the request may result in many files being downloaded and the client
+ * may not have been able to get a list of them in advance.
+ * @param status The current status of the download.
+ */
+ public void onStatusUpdated(DownloadRequest request, FileInfo fileInfo,
+ @MbmsDownloadSession.DownloadStatus int status) {
+ }
+}
diff --git a/telephony/java/android/telephony/mbms/IDownloadStateCallback.aidl b/telephony/java/android/telephony/mbms/IDownloadProgressListener.aidl
similarity index 90%
rename from telephony/java/android/telephony/mbms/IDownloadStateCallback.aidl
rename to telephony/java/android/telephony/mbms/IDownloadProgressListener.aidl
index cebc70d..d0adcb5 100755
--- a/telephony/java/android/telephony/mbms/IDownloadStateCallback.aidl
+++ b/telephony/java/android/telephony/mbms/IDownloadProgressListener.aidl
@@ -23,7 +23,7 @@
* The optional interface used by download clients to track progress.
* @hide
*/
-interface IDownloadStateCallback
+interface IDownloadProgressListener
{
/**
* Gives progress callbacks for a given DownloadRequest. Includes a FileInfo
@@ -32,6 +32,4 @@
void onProgressUpdated(in DownloadRequest request, in FileInfo fileInfo,
int currentDownloadSize, int fullDownloadSize,
int currentDecodedSize, int fullDecodedSize);
-
- void onStateUpdated(in DownloadRequest request, in FileInfo fileInfo, int state);
}
diff --git a/telephony/java/android/telephony/mbms/IDownloadStatusListener.aidl b/telephony/java/android/telephony/mbms/IDownloadStatusListener.aidl
new file mode 100755
index 0000000..799290a
--- /dev/null
+++ b/telephony/java/android/telephony/mbms/IDownloadStatusListener.aidl
@@ -0,0 +1,29 @@
+/*
+** Copyright 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.
+*/
+
+package android.telephony.mbms;
+
+import android.telephony.mbms.DownloadRequest;
+import android.telephony.mbms.FileInfo;
+
+/**
+ * The optional interface used by download clients to track download status.
+ * @hide
+ */
+interface IDownloadStatusListener
+{
+ void onStatusUpdated(in DownloadRequest request, in FileInfo fileInfo, int status);
+}
diff --git a/telephony/java/android/telephony/mbms/InternalDownloadProgressListener.java b/telephony/java/android/telephony/mbms/InternalDownloadProgressListener.java
new file mode 100644
index 0000000..403f758
--- /dev/null
+++ b/telephony/java/android/telephony/mbms/InternalDownloadProgressListener.java
@@ -0,0 +1,63 @@
+/*
+ * 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
+ */
+
+package android.telephony.mbms;
+
+import android.os.Binder;
+import android.os.RemoteException;
+
+import java.util.concurrent.Executor;
+
+/**
+ * @hide
+ */
+public class InternalDownloadProgressListener extends IDownloadProgressListener.Stub {
+ private final Executor mExecutor;
+ private final DownloadProgressListener mAppListener;
+ private volatile boolean mIsStopped = false;
+
+ public InternalDownloadProgressListener(DownloadProgressListener appListener,
+ Executor executor) {
+ mAppListener = appListener;
+ mExecutor = executor;
+ }
+
+ @Override
+ public void onProgressUpdated(final DownloadRequest request, final FileInfo fileInfo,
+ final int currentDownloadSize, final int fullDownloadSize, final int currentDecodedSize,
+ final int fullDecodedSize) throws RemoteException {
+ if (mIsStopped) {
+ return;
+ }
+
+ mExecutor.execute(new Runnable() {
+ @Override
+ public void run() {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppListener.onProgressUpdated(request, fileInfo, currentDownloadSize,
+ fullDownloadSize, currentDecodedSize, fullDecodedSize);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+ });
+ }
+
+ public void stop() {
+ mIsStopped = true;
+ }
+}
diff --git a/telephony/java/android/telephony/mbms/InternalDownloadSessionCallback.java b/telephony/java/android/telephony/mbms/InternalDownloadSessionCallback.java
index a7a5958..2916f81 100644
--- a/telephony/java/android/telephony/mbms/InternalDownloadSessionCallback.java
+++ b/telephony/java/android/telephony/mbms/InternalDownloadSessionCallback.java
@@ -16,70 +16,81 @@
package android.telephony.mbms;
-import android.os.Handler;
-import android.os.RemoteException;
+import android.os.Binder;
import java.util.List;
+import java.util.concurrent.Executor;
/** @hide */
public class InternalDownloadSessionCallback extends IMbmsDownloadSessionCallback.Stub {
- private final Handler mHandler;
+ private final Executor mExecutor;
private final MbmsDownloadSessionCallback mAppCallback;
private volatile boolean mIsStopped = false;
public InternalDownloadSessionCallback(MbmsDownloadSessionCallback appCallback,
- Handler handler) {
+ Executor executor) {
mAppCallback = appCallback;
- mHandler = handler;
+ mExecutor = executor;
}
@Override
- public void onError(final int errorCode, final String message) throws RemoteException {
+ public void onError(final int errorCode, final String message) {
if (mIsStopped) {
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onError(errorCode, message);
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onError(errorCode, message);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
@Override
- public void onFileServicesUpdated(final List<FileServiceInfo> services) throws RemoteException {
+ public void onFileServicesUpdated(final List<FileServiceInfo> services) {
if (mIsStopped) {
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onFileServicesUpdated(services);
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onFileServicesUpdated(services);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
@Override
- public void onMiddlewareReady() throws RemoteException {
+ public void onMiddlewareReady() {
if (mIsStopped) {
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onMiddlewareReady();
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onMiddlewareReady();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
- public Handler getHandler() {
- return mHandler;
- }
-
public void stop() {
mIsStopped = true;
}
diff --git a/telephony/java/android/telephony/mbms/InternalDownloadStateCallback.java b/telephony/java/android/telephony/mbms/InternalDownloadStateCallback.java
deleted file mode 100644
index 8702952..0000000
--- a/telephony/java/android/telephony/mbms/InternalDownloadStateCallback.java
+++ /dev/null
@@ -1,70 +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
- */
-
-package android.telephony.mbms;
-
-import android.os.Handler;
-import android.os.RemoteException;
-
-/**
- * @hide
- */
-public class InternalDownloadStateCallback extends IDownloadStateCallback.Stub {
- private final Handler mHandler;
- private final DownloadStateCallback mAppCallback;
- private volatile boolean mIsStopped = false;
-
- public InternalDownloadStateCallback(DownloadStateCallback appCallback, Handler handler) {
- mAppCallback = appCallback;
- mHandler = handler;
- }
-
- @Override
- public void onProgressUpdated(final DownloadRequest request, final FileInfo fileInfo,
- final int currentDownloadSize, final int fullDownloadSize, final int currentDecodedSize,
- final int fullDecodedSize) throws RemoteException {
- if (mIsStopped) {
- return;
- }
-
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- mAppCallback.onProgressUpdated(request, fileInfo, currentDownloadSize,
- fullDownloadSize, currentDecodedSize, fullDecodedSize);
- }
- });
- }
-
- @Override
- public void onStateUpdated(final DownloadRequest request, final FileInfo fileInfo,
- final int state) throws RemoteException {
- if (mIsStopped) {
- return;
- }
-
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- mAppCallback.onStateUpdated(request, fileInfo, state);
- }
- });
- }
-
- public void stop() {
- mIsStopped = true;
- }
-}
diff --git a/telephony/java/android/telephony/mbms/InternalDownloadStatusListener.java b/telephony/java/android/telephony/mbms/InternalDownloadStatusListener.java
new file mode 100644
index 0000000..ad6bb54
--- /dev/null
+++ b/telephony/java/android/telephony/mbms/InternalDownloadStatusListener.java
@@ -0,0 +1,61 @@
+/*
+ * 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
+ */
+
+package android.telephony.mbms;
+
+import android.os.Binder;
+import android.os.RemoteException;
+import android.telephony.MbmsDownloadSession;
+
+import java.util.concurrent.Executor;
+
+/**
+ * @hide
+ */
+public class InternalDownloadStatusListener extends IDownloadStatusListener.Stub {
+ private final Executor mExecutor;
+ private final DownloadStatusListener mAppListener;
+ private volatile boolean mIsStopped = false;
+
+ public InternalDownloadStatusListener(DownloadStatusListener appCallback, Executor executor) {
+ mAppListener = appCallback;
+ mExecutor = executor;
+ }
+
+ @Override
+ public void onStatusUpdated(final DownloadRequest request, final FileInfo fileInfo,
+ @MbmsDownloadSession.DownloadStatus final int status) throws RemoteException {
+ if (mIsStopped) {
+ return;
+ }
+
+ mExecutor.execute(new Runnable() {
+ @Override
+ public void run() {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppListener.onStatusUpdated(request, fileInfo, status);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+ });
+ }
+
+ public void stop() {
+ mIsStopped = true;
+ }
+}
diff --git a/telephony/java/android/telephony/mbms/InternalStreamingServiceCallback.java b/telephony/java/android/telephony/mbms/InternalStreamingServiceCallback.java
index eb6579ce..e9f39ff 100644
--- a/telephony/java/android/telephony/mbms/InternalStreamingServiceCallback.java
+++ b/telephony/java/android/telephony/mbms/InternalStreamingServiceCallback.java
@@ -16,18 +16,21 @@
package android.telephony.mbms;
-import android.os.Handler;
+import android.os.Binder;
import android.os.RemoteException;
+import java.util.concurrent.Executor;
+
/** @hide */
public class InternalStreamingServiceCallback extends IStreamingServiceCallback.Stub {
private final StreamingServiceCallback mAppCallback;
- private final Handler mHandler;
+ private final Executor mExecutor;
private volatile boolean mIsStopped = false;
- public InternalStreamingServiceCallback(StreamingServiceCallback appCallback, Handler handler) {
+ public InternalStreamingServiceCallback(StreamingServiceCallback appCallback,
+ Executor executor) {
mAppCallback = appCallback;
- mHandler = handler;
+ mExecutor = executor;
}
@Override
@@ -36,10 +39,15 @@
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onError(errorCode, message);
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onError(errorCode, message);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
@@ -50,10 +58,15 @@
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onStreamStateUpdated(state, reason);
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onStreamStateUpdated(state, reason);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
@@ -64,10 +77,15 @@
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onMediaDescriptionUpdated();
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onMediaDescriptionUpdated();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
@@ -78,10 +96,15 @@
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onBroadcastSignalStrengthUpdated(signalStrength);
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onBroadcastSignalStrengthUpdated(signalStrength);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
@@ -92,10 +115,15 @@
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onStreamMethodUpdated(methodType);
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onStreamMethodUpdated(methodType);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
diff --git a/telephony/java/android/telephony/mbms/InternalStreamingSessionCallback.java b/telephony/java/android/telephony/mbms/InternalStreamingSessionCallback.java
index d782d12..d47f5ad 100644
--- a/telephony/java/android/telephony/mbms/InternalStreamingSessionCallback.java
+++ b/telephony/java/android/telephony/mbms/InternalStreamingSessionCallback.java
@@ -16,21 +16,22 @@
package android.telephony.mbms;
-import android.os.Handler;
+import android.os.Binder;
import android.os.RemoteException;
import java.util.List;
+import java.util.concurrent.Executor;
/** @hide */
public class InternalStreamingSessionCallback extends IMbmsStreamingSessionCallback.Stub {
- private final Handler mHandler;
+ private final Executor mExecutor;
private final MbmsStreamingSessionCallback mAppCallback;
private volatile boolean mIsStopped = false;
public InternalStreamingSessionCallback(MbmsStreamingSessionCallback appCallback,
- Handler handler) {
+ Executor executor) {
mAppCallback = appCallback;
- mHandler = handler;
+ mExecutor = executor;
}
@Override
@@ -39,10 +40,15 @@
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onError(errorCode, message);
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onError(errorCode, message);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
@@ -54,10 +60,15 @@
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onStreamingServicesUpdated(services);
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onStreamingServicesUpdated(services);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
@@ -68,18 +79,19 @@
return;
}
- mHandler.post(new Runnable() {
+ mExecutor.execute(new Runnable() {
@Override
public void run() {
- mAppCallback.onMiddlewareReady();
+ long token = Binder.clearCallingIdentity();
+ try {
+ mAppCallback.onMiddlewareReady();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
});
}
- public Handler getHandler() {
- return mHandler;
- }
-
public void stop() {
mIsStopped = true;
}
diff --git a/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java b/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java
index 9ef188c..dd1061f 100644
--- a/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java
+++ b/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java
@@ -21,24 +21,25 @@
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Bundle;
import android.telephony.MbmsDownloadSession;
import android.telephony.mbms.vendor.VendorUtils;
import android.util.Log;
+import com.android.internal.annotations.VisibleForTesting;
+
import java.io.File;
import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -62,6 +63,8 @@
/** @hide */
public static final String MBMS_FILE_PROVIDER_META_DATA_KEY = "mbms-file-provider-authority";
+ private static final String EMBMS_INTENT_PERMISSION = "android.permission.SEND_EMBMS_INTENTS";
+
/**
* Indicates that the requested operation completed without error.
* @hide
@@ -137,6 +140,8 @@
/** @hide */
@Override
public void onReceive(Context context, Intent intent) {
+ verifyPermissionIntegrity(context);
+
if (!verifyIntentContents(context, intent)) {
setResultCode(RESULT_MALFORMED_INTENT);
return;
@@ -260,20 +265,21 @@
FileInfo completedFileInfo =
(FileInfo) intent.getParcelableExtra(MbmsDownloadSession.EXTRA_MBMS_FILE_INFO);
- Path stagingDirectory = FileSystems.getDefault().getPath(
- MbmsTempFileProvider.getEmbmsTempFileDir(context).getPath(),
- TEMP_FILE_STAGING_LOCATION);
+ Path appSpecifiedDestination = FileSystems.getDefault().getPath(
+ request.getDestinationUri().getPath());
- Uri stagedFileLocation;
+ Uri finalLocation;
try {
- stagedFileLocation = stageTempFile(finalTempFile, stagingDirectory);
+ String relativeLocation = getFileRelativePath(request.getSourceUri().getPath(),
+ completedFileInfo.getUri().getPath());
+ finalLocation = moveToFinalLocation(finalTempFile, appSpecifiedDestination,
+ relativeLocation);
} catch (IOException e) {
Log.w(LOG_TAG, "Failed to move temp file to final destination");
setResultCode(RESULT_DOWNLOAD_FINALIZATION_ERROR);
return;
}
- intentForApp.putExtra(MbmsDownloadSession.EXTRA_MBMS_COMPLETED_FILE_URI,
- stagedFileLocation);
+ intentForApp.putExtra(MbmsDownloadSession.EXTRA_MBMS_COMPLETED_FILE_URI, finalLocation);
intentForApp.putExtra(MbmsDownloadSession.EXTRA_MBMS_FILE_INFO, completedFileInfo);
context.sendBroadcast(intentForApp);
@@ -296,7 +302,9 @@
for (Uri tempFileUri : tempFiles) {
if (verifyTempFilePath(context, request.getFileServiceId(), tempFileUri)) {
File tempFile = new File(tempFileUri.getSchemeSpecificPart());
- tempFile.delete();
+ if (!tempFile.delete()) {
+ Log.w(LOG_TAG, "Failed to delete temp file at " + tempFile.getPath());
+ }
}
}
}
@@ -437,23 +445,57 @@
}
/*
- * Moves a tempfile located at fromPath to a new location in the staging directory.
+ * Moves a tempfile located at fromPath to its final home where the app wants it
*/
- private static Uri stageTempFile(Uri fromPath, Path stagingDirectory) throws IOException {
+ private static Uri moveToFinalLocation(Uri fromPath, Path appSpecifiedPath,
+ String relativeLocation) throws IOException {
if (!ContentResolver.SCHEME_FILE.equals(fromPath.getScheme())) {
- Log.w(LOG_TAG, "Moving source uri " + fromPath+ " does not have a file scheme");
+ Log.w(LOG_TAG, "Downloaded file location uri " + fromPath +
+ " does not have a file scheme");
return null;
}
Path fromFile = FileSystems.getDefault().getPath(fromPath.getPath());
- if (!Files.isDirectory(stagingDirectory)) {
- Files.createDirectory(stagingDirectory);
+ Path toFile = appSpecifiedPath.resolve(relativeLocation);
+
+ if (!Files.isDirectory(toFile.getParent())) {
+ Files.createDirectories(toFile.getParent());
}
- Path result = Files.move(fromFile, stagingDirectory.resolve(fromFile.getFileName()));
+ Path result = Files.move(fromFile, toFile,
+ StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);
return Uri.fromFile(result.toFile());
}
+ /**
+ * @hide
+ */
+ @VisibleForTesting
+ public static String getFileRelativePath(String sourceUriPath, String fileInfoPath) {
+ if (sourceUriPath.endsWith("*")) {
+ // This is a wildcard path. Strip the last path component and use that as the root of
+ // the relative path.
+ int lastSlash = sourceUriPath.lastIndexOf('/');
+ sourceUriPath = sourceUriPath.substring(0, lastSlash);
+ }
+ if (!fileInfoPath.startsWith(sourceUriPath)) {
+ Log.e(LOG_TAG, "File location specified in FileInfo does not match the source URI."
+ + " source: " + sourceUriPath + " fileinfo path: " + fileInfoPath);
+ return null;
+ }
+ if (fileInfoPath.length() == sourceUriPath.length()) {
+ // This is the single-file download case. Return the name of the file so that the
+ // receiver puts the file directly into the dest directory.
+ return sourceUriPath.substring(sourceUriPath.lastIndexOf('/') + 1);
+ }
+
+ String prefixOmittedPath = fileInfoPath.substring(sourceUriPath.length());
+ if (prefixOmittedPath.startsWith("/")) {
+ prefixOmittedPath = prefixOmittedPath.substring(1);
+ }
+ return prefixOmittedPath;
+ }
+
private static boolean verifyTempFilePath(Context context, String serviceId,
Uri filePath) {
if (!ContentResolver.SCHEME_FILE.equals(filePath.getScheme())) {
@@ -470,6 +512,8 @@
if (!MbmsUtils.isContainedIn(
MbmsUtils.getEmbmsTempFileDirForService(context, serviceId), tempFile)) {
+ Log.w(LOG_TAG, "File at " + path + " is not contained in the temp file root," +
+ " which is " + MbmsUtils.getEmbmsTempFileDirForService(context, serviceId));
return false;
}
@@ -513,39 +557,29 @@
return mMiddlewarePackageNameCache;
}
- private static boolean manualMove(File src, File dst) {
- InputStream in = null;
- OutputStream out = null;
- try {
- if (!dst.exists()) {
- dst.createNewFile();
- }
- in = new FileInputStream(src);
- out = new FileOutputStream(dst);
- byte[] buffer = new byte[2048];
- int len;
- do {
- len = in.read(buffer);
- out.write(buffer, 0, len);
- } while (len > 0);
- } catch (IOException e) {
- Log.w(LOG_TAG, "Manual file move failed due to exception " + e);
- if (dst.exists()) {
- dst.delete();
- }
- return false;
- } finally {
- try {
- if (in != null) {
- in.close();
- }
- if (out != null) {
- out.close();
- }
- } catch (IOException e) {
- Log.w(LOG_TAG, "Error closing streams: " + e);
- }
+ private void verifyPermissionIntegrity(Context context) {
+ PackageManager pm = context.getPackageManager();
+ Intent queryIntent = new Intent(context, MbmsDownloadReceiver.class);
+ List<ResolveInfo> infos = pm.queryBroadcastReceivers(queryIntent, 0);
+ if (infos.size() != 1) {
+ throw new IllegalStateException("Non-unique download receiver in your app");
}
- return true;
+ ActivityInfo selfInfo = infos.get(0).activityInfo;
+ if (selfInfo == null) {
+ throw new IllegalStateException("Queried ResolveInfo does not contain a receiver");
+ }
+ if (MbmsUtils.getOverrideServiceName(context,
+ MbmsDownloadSession.MBMS_DOWNLOAD_SERVICE_ACTION) != null) {
+ // If an override was specified, just make sure that the permission isn't null.
+ if (selfInfo.permission == null) {
+ throw new IllegalStateException(
+ "MbmsDownloadReceiver must require some permission");
+ }
+ return;
+ }
+ if (!Objects.equals(EMBMS_INTENT_PERMISSION, selfInfo.permission)) {
+ throw new IllegalStateException("MbmsDownloadReceiver must require the " +
+ "SEND_EMBMS_INTENTS permission.");
+ }
}
}
diff --git a/telephony/java/android/telephony/mbms/MbmsDownloadSessionCallback.java b/telephony/java/android/telephony/mbms/MbmsDownloadSessionCallback.java
index 77dea6f..5003b57 100644
--- a/telephony/java/android/telephony/mbms/MbmsDownloadSessionCallback.java
+++ b/telephony/java/android/telephony/mbms/MbmsDownloadSessionCallback.java
@@ -16,8 +16,11 @@
package android.telephony.mbms;
+import android.annotation.IntDef;
import android.telephony.MbmsDownloadSession;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.List;
/**
@@ -25,6 +28,26 @@
* cell-broadcast.
*/
public class MbmsDownloadSessionCallback {
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(value = {
+ MbmsErrors.ERROR_NO_UNIQUE_MIDDLEWARE,
+ MbmsErrors.ERROR_MIDDLEWARE_LOST,
+ MbmsErrors.ERROR_MIDDLEWARE_NOT_BOUND,
+ MbmsErrors.InitializationErrors.ERROR_APP_PERMISSIONS_NOT_GRANTED,
+ MbmsErrors.InitializationErrors.ERROR_DUPLICATE_INITIALIZE,
+ MbmsErrors.InitializationErrors.ERROR_UNABLE_TO_INITIALIZE,
+ MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_NOT_YET_READY,
+ MbmsErrors.GeneralErrors.ERROR_OUT_OF_MEMORY,
+ MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_TEMPORARILY_UNAVAILABLE,
+ MbmsErrors.GeneralErrors.ERROR_IN_E911,
+ MbmsErrors.GeneralErrors.ERROR_NOT_CONNECTED_TO_HOME_CARRIER_LTE,
+ MbmsErrors.GeneralErrors.ERROR_UNABLE_TO_READ_SIM,
+ MbmsErrors.GeneralErrors.ERROR_CARRIER_CHANGE_NOT_ALLOWED,
+ MbmsErrors.DownloadErrors.ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT,
+ MbmsErrors.DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST,
+ MbmsErrors.DownloadErrors.ERROR_UNKNOWN_FILE_INFO}, prefix = { "ERROR_" })
+ private @interface DownloadError{}
/**
* Indicates that the middleware has encountered an asynchronous error.
@@ -32,7 +55,7 @@
* @param message A message, intended for debugging purposes, describing the error in further
* detail.
*/
- public void onError(int errorCode, String message) {
+ public void onError(@DownloadError int errorCode, String message) {
// default implementation empty
}
diff --git a/telephony/java/android/telephony/mbms/MbmsErrors.java b/telephony/java/android/telephony/mbms/MbmsErrors.java
index af0af24..7c4321b 100644
--- a/telephony/java/android/telephony/mbms/MbmsErrors.java
+++ b/telephony/java/android/telephony/mbms/MbmsErrors.java
@@ -19,6 +19,13 @@
import android.telephony.MbmsStreamingSession;
public class MbmsErrors {
+ /**
+ * Indicates that the middleware has sent an error code that is not defined in the version of
+ * the SDK targeted by your app. This is an illegal value for the middleware to return -- it
+ * should only ever be generated by the framework.
+ */
+ public static final int UNKNOWN = -1;
+
/** Indicates that the operation was successful. */
public static final int SUCCESS = 0;
@@ -108,8 +115,8 @@
/**
* Indicates that the app called
- * {@link MbmsStreamingSession#startStreaming(
- * StreamingServiceInfo, StreamingServiceCallback, android.os.Handler)}
+ * {@link MbmsStreamingSession#startStreaming(StreamingServiceInfo,
+ * java.util.concurrent.Executor, StreamingServiceCallback)}
* more than once for the same {@link StreamingServiceInfo}.
*/
public static final int ERROR_DUPLICATE_START_STREAM = 303;
@@ -128,6 +135,9 @@
/** Indicates that the middleware has no record of the supplied {@link DownloadRequest}. */
public static final int ERROR_UNKNOWN_DOWNLOAD_REQUEST = 402;
+
+ /** Indicates the the middleware has no record of the supplied {@link FileInfo} */
+ public static final int ERROR_UNKNOWN_FILE_INFO = 403;
}
private MbmsErrors() {}
diff --git a/telephony/java/android/telephony/mbms/MbmsStreamingSessionCallback.java b/telephony/java/android/telephony/mbms/MbmsStreamingSessionCallback.java
index 5c130a0..1bdb20bf 100644
--- a/telephony/java/android/telephony/mbms/MbmsStreamingSessionCallback.java
+++ b/telephony/java/android/telephony/mbms/MbmsStreamingSessionCallback.java
@@ -16,26 +16,50 @@
package android.telephony.mbms;
+import android.annotation.IntDef;
import android.annotation.Nullable;
import android.content.Context;
-import android.os.Handler;
import android.telephony.MbmsStreamingSession;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.List;
+import java.util.concurrent.Executor;
/**
* A callback class that is used to receive information from the middleware on MBMS streaming
* services. An instance of this object should be passed into
- * {@link MbmsStreamingSession#create(Context, MbmsStreamingSessionCallback, int, Handler)}.
+ * {@link MbmsStreamingSession#create(Context, Executor, int, MbmsStreamingSessionCallback)}.
*/
public class MbmsStreamingSessionCallback {
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(value = {
+ MbmsErrors.ERROR_NO_UNIQUE_MIDDLEWARE,
+ MbmsErrors.ERROR_MIDDLEWARE_LOST,
+ MbmsErrors.ERROR_MIDDLEWARE_NOT_BOUND,
+ MbmsErrors.InitializationErrors.ERROR_APP_PERMISSIONS_NOT_GRANTED,
+ MbmsErrors.InitializationErrors.ERROR_DUPLICATE_INITIALIZE,
+ MbmsErrors.InitializationErrors.ERROR_UNABLE_TO_INITIALIZE,
+ MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_NOT_YET_READY,
+ MbmsErrors.GeneralErrors.ERROR_OUT_OF_MEMORY,
+ MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_TEMPORARILY_UNAVAILABLE,
+ MbmsErrors.GeneralErrors.ERROR_IN_E911,
+ MbmsErrors.GeneralErrors.ERROR_NOT_CONNECTED_TO_HOME_CARRIER_LTE,
+ MbmsErrors.GeneralErrors.ERROR_UNABLE_TO_READ_SIM,
+ MbmsErrors.GeneralErrors.ERROR_CARRIER_CHANGE_NOT_ALLOWED,
+ MbmsErrors.StreamingErrors.ERROR_CONCURRENT_SERVICE_LIMIT_REACHED,
+ MbmsErrors.StreamingErrors.ERROR_UNABLE_TO_START_SERVICE,
+ MbmsErrors.StreamingErrors.ERROR_DUPLICATE_START_STREAM}, prefix = { "ERROR_" })
+ private @interface StreamingError{}
+
/**
* Called by the middleware when it has detected an error condition. The possible error codes
* are listed in {@link MbmsErrors}.
* @param errorCode The error code.
* @param message A human-readable message generated by the middleware for debugging purposes.
*/
- public void onError(int errorCode, @Nullable String message) {
+ public void onError(@StreamingError int errorCode, @Nullable String message) {
// default implementation empty
}
diff --git a/telephony/java/android/telephony/mbms/MbmsUtils.java b/telephony/java/android/telephony/mbms/MbmsUtils.java
index b4ad1d7..06b2120 100644
--- a/telephony/java/android/telephony/mbms/MbmsUtils.java
+++ b/telephony/java/android/telephony/mbms/MbmsUtils.java
@@ -50,7 +50,7 @@
return new ComponentName(ci.packageName, ci.name);
}
- private static ComponentName getOverrideServiceName(Context context, String serviceAction) {
+ public static ComponentName getOverrideServiceName(Context context, String serviceAction) {
String metaDataKey = null;
switch (serviceAction) {
case MbmsDownloadSession.MBMS_DOWNLOAD_SERVICE_ACTION:
@@ -130,8 +130,12 @@
* Returns a File linked to the directory used to store temp files for this file service
*/
public static File getEmbmsTempFileDirForService(Context context, String serviceId) {
+ // Replace all non-alphanumerics/underscores with an underscore. Some filesystems don't
+ // like special characters.
+ String sanitizedServiceId = serviceId.replaceAll("[^a-zA-Z0-9_]", "_");
+
File embmsTempFileDir = MbmsTempFileProvider.getEmbmsTempFileDir(context);
- return new File(embmsTempFileDir, serviceId);
+ return new File(embmsTempFileDir, sanitizedServiceId);
}
}
diff --git a/telephony/java/android/telephony/mbms/StreamingService.java b/telephony/java/android/telephony/mbms/StreamingService.java
index ec9134a..b6239fe 100644
--- a/telephony/java/android/telephony/mbms/StreamingService.java
+++ b/telephony/java/android/telephony/mbms/StreamingService.java
@@ -29,11 +29,11 @@
/**
* Class used to represent a single MBMS stream. After a stream has been started with
- * {@link MbmsStreamingSession#startStreaming(StreamingServiceInfo,
- * StreamingServiceCallback, android.os.Handler)},
+ * {@link MbmsStreamingSession#startStreaming(StreamingServiceInfo, java.util.concurrent.Executor,
+ * StreamingServiceCallback)},
* this class is used to hold information about the stream and control it.
*/
-public class StreamingService {
+public class StreamingService implements AutoCloseable {
private static final String LOG_TAG = "MbmsStreamingService";
/**
@@ -41,7 +41,7 @@
* @hide
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef({STATE_STOPPED, STATE_STARTED, STATE_STALLED})
+ @IntDef(prefix = { "STATE_" }, value = {STATE_STOPPED, STATE_STARTED, STATE_STALLED})
public @interface StreamingState {}
public final static int STATE_STOPPED = 1;
public final static int STATE_STARTED = 2;
@@ -53,7 +53,8 @@
* @hide
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef({REASON_BY_USER_REQUEST, REASON_END_OF_SESSION, REASON_FREQUENCY_CONFLICT,
+ @IntDef(prefix = { "REASON_" },
+ value = {REASON_BY_USER_REQUEST, REASON_END_OF_SESSION, REASON_FREQUENCY_CONFLICT,
REASON_OUT_OF_MEMORY, REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE,
REASON_LEFT_MBMS_BROADCAST_AREA, REASON_NONE})
public @interface StreamingStateChangeReason {}
@@ -64,9 +65,9 @@
public static final int REASON_NONE = 0;
/**
- * State changed due to a call to {@link #stopStreaming()} or
+ * State changed due to a call to {@link #close()} or
* {@link MbmsStreamingSession#startStreaming(StreamingServiceInfo,
- * StreamingServiceCallback, android.os.Handler)}
+ * java.util.concurrent.Executor, StreamingServiceCallback)}
*/
public static final int REASON_BY_USER_REQUEST = 1;
@@ -161,7 +162,8 @@
*
* May throw an {@link IllegalArgumentException} or an {@link IllegalStateException}
*/
- public void stopStreaming() {
+ @Override
+ public void close() {
if (mService == null) {
throw new IllegalStateException("No streaming service attached");
}
diff --git a/telephony/java/android/telephony/mbms/StreamingServiceCallback.java b/telephony/java/android/telephony/mbms/StreamingServiceCallback.java
index 0903824..c265db6 100644
--- a/telephony/java/android/telephony/mbms/StreamingServiceCallback.java
+++ b/telephony/java/android/telephony/mbms/StreamingServiceCallback.java
@@ -16,13 +16,34 @@
package android.telephony.mbms;
+import android.annotation.IntDef;
import android.annotation.Nullable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/**
* A callback class for use when the application is actively streaming content. The middleware
* will provide updates on the status of the stream via this callback.
*/
public class StreamingServiceCallback {
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(value = {
+ MbmsErrors.ERROR_NO_UNIQUE_MIDDLEWARE,
+ MbmsErrors.ERROR_MIDDLEWARE_LOST,
+ MbmsErrors.ERROR_MIDDLEWARE_NOT_BOUND,
+ MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_NOT_YET_READY,
+ MbmsErrors.GeneralErrors.ERROR_OUT_OF_MEMORY,
+ MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_TEMPORARILY_UNAVAILABLE,
+ MbmsErrors.GeneralErrors.ERROR_IN_E911,
+ MbmsErrors.GeneralErrors.ERROR_NOT_CONNECTED_TO_HOME_CARRIER_LTE,
+ MbmsErrors.GeneralErrors.ERROR_UNABLE_TO_READ_SIM,
+ MbmsErrors.GeneralErrors.ERROR_CARRIER_CHANGE_NOT_ALLOWED,
+ MbmsErrors.StreamingErrors.ERROR_CONCURRENT_SERVICE_LIMIT_REACHED,
+ MbmsErrors.StreamingErrors.ERROR_UNABLE_TO_START_SERVICE,
+ MbmsErrors.StreamingErrors.ERROR_DUPLICATE_START_STREAM}, prefix = { "ERROR_" })
+ private @interface StreamingServiceError{}
/**
* Indicates broadcast signal strength is not available for this service.
@@ -39,7 +60,7 @@
* @param errorCode The error code.
* @param message A human-readable message generated by the middleware for debugging purposes.
*/
- public void onError(int errorCode, @Nullable String message) {
+ public void onError(@StreamingServiceError int errorCode, @Nullable String message) {
// default implementation empty
}
diff --git a/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl b/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl
index cb93542..445087fb 100755
--- a/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl
+++ b/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl
@@ -20,8 +20,9 @@
import android.net.Uri;
import android.telephony.mbms.DownloadRequest;
import android.telephony.mbms.FileInfo;
+import android.telephony.mbms.IDownloadProgressListener;
+import android.telephony.mbms.IDownloadStatusListener;
import android.telephony.mbms.IMbmsDownloadSessionCallback;
-import android.telephony.mbms.IDownloadStateCallback;
/**
* @hide
@@ -36,17 +37,23 @@
int download(in DownloadRequest downloadRequest);
- int registerStateCallback(in DownloadRequest downloadRequest, IDownloadStateCallback listener,
- int flags);
+ int addStatusListener(in DownloadRequest downloadRequest,
+ IDownloadStatusListener listener);
- int unregisterStateCallback(in DownloadRequest downloadRequest,
- IDownloadStateCallback listener);
+ int removeStatusListener(in DownloadRequest downloadRequest,
+ IDownloadStatusListener listener);
+
+ int addProgressListener(in DownloadRequest downloadRequest,
+ IDownloadProgressListener listener);
+
+ int removeProgressListener(in DownloadRequest downloadRequest,
+ IDownloadProgressListener listener);
List<DownloadRequest> listPendingDownloads(int subscriptionId);
int cancelDownload(in DownloadRequest downloadRequest);
- int getDownloadStatus(in DownloadRequest downloadRequest, in FileInfo fileInfo);
+ int requestDownloadState(in DownloadRequest downloadRequest, in FileInfo fileInfo);
int resetDownloadKnowledge(in DownloadRequest downloadRequest);
diff --git a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
index 4fee3df..a9f10b1 100644
--- a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
+++ b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
@@ -24,11 +24,13 @@
import android.os.IBinder;
import android.os.RemoteException;
import android.telephony.MbmsDownloadSession;
+import android.telephony.mbms.DownloadProgressListener;
import android.telephony.mbms.DownloadRequest;
-import android.telephony.mbms.DownloadStateCallback;
+import android.telephony.mbms.DownloadStatusListener;
import android.telephony.mbms.FileInfo;
import android.telephony.mbms.FileServiceInfo;
-import android.telephony.mbms.IDownloadStateCallback;
+import android.telephony.mbms.IDownloadProgressListener;
+import android.telephony.mbms.IDownloadStatusListener;
import android.telephony.mbms.IMbmsDownloadSessionCallback;
import android.telephony.mbms.MbmsDownloadSessionCallback;
import android.telephony.mbms.MbmsErrors;
@@ -45,47 +47,50 @@
@SystemApi
@TestApi
public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub {
- private final Map<IBinder, DownloadStateCallback> mDownloadCallbackBinderMap = new HashMap<>();
+ private final Map<IBinder, DownloadStatusListener> mDownloadStatusListenerBinderMap =
+ new HashMap<>();
+ private final Map<IBinder, DownloadProgressListener> mDownloadProgressListenerBinderMap =
+ new HashMap<>();
private final Map<IBinder, DeathRecipient> mDownloadCallbackDeathRecipients = new HashMap<>();
+ private abstract static class VendorDownloadStatusListener extends DownloadStatusListener {
+ private final IDownloadStatusListener mListener;
+ public VendorDownloadStatusListener(IDownloadStatusListener listener) {
+ mListener = listener;
+ }
- // Filters the DownloadStateCallbacks by its configuration from the app.
- private abstract static class FilteredDownloadStateCallback extends DownloadStateCallback {
+ @Override
+ public void onStatusUpdated(DownloadRequest request, FileInfo fileInfo,
+ @MbmsDownloadSession.DownloadStatus int state) {
+ try {
+ mListener.onStatusUpdated(request, fileInfo, state);
+ } catch (RemoteException e) {
+ onRemoteException(e);
+ }
+ }
- private final IDownloadStateCallback mCallback;
- public FilteredDownloadStateCallback(IDownloadStateCallback callback, int callbackFlags) {
- super(callbackFlags);
- mCallback = callback;
+ protected abstract void onRemoteException(RemoteException e);
+ }
+
+ private abstract static class VendorDownloadProgressListener extends DownloadProgressListener {
+ private final IDownloadProgressListener mListener;
+
+ public VendorDownloadProgressListener(IDownloadProgressListener listener) {
+ mListener = listener;
}
@Override
public void onProgressUpdated(DownloadRequest request, FileInfo fileInfo,
int currentDownloadSize, int fullDownloadSize, int currentDecodedSize,
int fullDecodedSize) {
- if (!isFilterFlagSet(PROGRESS_UPDATES)) {
- return;
- }
try {
- mCallback.onProgressUpdated(request, fileInfo, currentDownloadSize,
+ mListener.onProgressUpdated(request, fileInfo, currentDownloadSize,
fullDownloadSize, currentDecodedSize, fullDecodedSize);
} catch (RemoteException e) {
onRemoteException(e);
}
}
- @Override
- public void onStateUpdated(DownloadRequest request, FileInfo fileInfo,
- @MbmsDownloadSession.DownloadStatus int state) {
- if (!isFilterFlagSet(STATE_UPDATES)) {
- return;
- }
- try {
- mCallback.onStateUpdated(request, fileInfo, state);
- } catch (RemoteException e) {
- onRemoteException(e);
- }
- }
-
protected abstract void onRemoteException(RemoteException e);
}
@@ -125,6 +130,10 @@
@Override
public void onError(int errorCode, String message) {
try {
+ if (errorCode == MbmsErrors.UNKNOWN) {
+ throw new IllegalArgumentException(
+ "Middleware cannot send an unknown error.");
+ }
callback.onError(errorCode, message);
} catch (RemoteException e) {
onAppCallbackDied(uid, subscriptionId);
@@ -223,71 +232,70 @@
}
/**
- * Registers a download state callbacks for the provided {@link DownloadRequest}.
+ * Registers a download status listener for the provided {@link DownloadRequest}.
*
- * This method is called by the app when it wants to request updates on the progress or
- * status of the download.
+ * This method is called by the app when it wants to request updates on the status of
+ * the download.
*
* If the middleware is not aware of a download having been requested with the provided
- *
* {@link DownloadRequest} in the past,
* {@link MbmsErrors.DownloadErrors#ERROR_UNKNOWN_DOWNLOAD_REQUEST}
* must be returned.
*
* @param downloadRequest The {@link DownloadRequest} that was used to initiate the download
* for which progress updates are being requested.
- * @param callback The callback object to use.
+ * @param listener The listener object to use.
*/
- public int registerStateCallback(DownloadRequest downloadRequest,
- DownloadStateCallback callback) throws RemoteException {
+ public int addStatusListener(DownloadRequest downloadRequest,
+ DownloadStatusListener listener) throws RemoteException {
return 0;
}
/**
- * Actual AIDL implementation -- hides the callback AIDL from the API.
+ * Actual AIDL implementation -- hides the listener AIDL from the API.
* @hide
*/
@Override
- public final int registerStateCallback(final DownloadRequest downloadRequest,
- final IDownloadStateCallback callback, int flags) throws RemoteException {
+ public final int addStatusListener(final DownloadRequest downloadRequest,
+ final IDownloadStatusListener listener) throws RemoteException {
final int uid = Binder.getCallingUid();
if (downloadRequest == null) {
throw new NullPointerException("Download request must not be null");
}
- if (callback == null) {
+ if (listener == null) {
throw new NullPointerException("Callback must not be null");
}
- DownloadStateCallback exposedCallback = new FilteredDownloadStateCallback(callback, flags) {
+ DownloadStatusListener exposedCallback = new VendorDownloadStatusListener(listener) {
@Override
protected void onRemoteException(RemoteException e) {
onAppCallbackDied(uid, downloadRequest.getSubscriptionId());
}
};
- int result = registerStateCallback(downloadRequest, exposedCallback);
+ int result = addStatusListener(downloadRequest, exposedCallback);
if (result == MbmsErrors.SUCCESS) {
DeathRecipient deathRecipient = new DeathRecipient() {
@Override
public void binderDied() {
onAppCallbackDied(uid, downloadRequest.getSubscriptionId());
- mDownloadCallbackBinderMap.remove(callback.asBinder());
- mDownloadCallbackDeathRecipients.remove(callback.asBinder());
+ mDownloadStatusListenerBinderMap.remove(listener.asBinder());
+ mDownloadCallbackDeathRecipients.remove(listener.asBinder());
}
};
- mDownloadCallbackDeathRecipients.put(callback.asBinder(), deathRecipient);
- callback.asBinder().linkToDeath(deathRecipient, 0);
- mDownloadCallbackBinderMap.put(callback.asBinder(), exposedCallback);
+ mDownloadCallbackDeathRecipients.put(listener.asBinder(), deathRecipient);
+ listener.asBinder().linkToDeath(deathRecipient, 0);
+ mDownloadStatusListenerBinderMap.put(listener.asBinder(), exposedCallback);
}
return result;
}
/**
- * Un-registers a download state callbacks for the provided {@link DownloadRequest}.
+ * Un-registers a download status listener for the provided {@link DownloadRequest}.
*
- * This method is called by the app when it no longer wants to request updates on the
+ * This method is called by the app when it no longer wants to request status updates on the
* download.
*
* If the middleware is not aware of a download having been requested with the provided
@@ -296,45 +304,157 @@
* must be returned.
*
* @param downloadRequest The {@link DownloadRequest} that was used to register the callback
- * @param callback The callback object that
- * {@link #registerStateCallback(DownloadRequest, DownloadStateCallback)}
+ * @param listener The callback object that
+ * {@link #addStatusListener(DownloadRequest, DownloadStatusListener)}
* was called with.
*/
- public int unregisterStateCallback(DownloadRequest downloadRequest,
- DownloadStateCallback callback) throws RemoteException {
+ public int removeStatusListener(DownloadRequest downloadRequest,
+ DownloadStatusListener listener) throws RemoteException {
return 0;
}
/**
- * Actual AIDL implementation -- hides the callback AIDL from the API.
+ * Actual AIDL implementation -- hides the listener AIDL from the API.
* @hide
*/
- @Override
- public final int unregisterStateCallback(
- final DownloadRequest downloadRequest, final IDownloadStateCallback callback)
+ public final int removeStatusListener(
+ final DownloadRequest downloadRequest, final IDownloadStatusListener listener)
throws RemoteException {
if (downloadRequest == null) {
throw new NullPointerException("Download request must not be null");
}
- if (callback == null) {
+ if (listener == null) {
throw new NullPointerException("Callback must not be null");
}
DeathRecipient deathRecipient =
- mDownloadCallbackDeathRecipients.remove(callback.asBinder());
+ mDownloadCallbackDeathRecipients.remove(listener.asBinder());
if (deathRecipient == null) {
- throw new IllegalArgumentException("Unknown callback");
+ throw new IllegalArgumentException("Unknown listener");
}
- callback.asBinder().unlinkToDeath(deathRecipient, 0);
+ listener.asBinder().unlinkToDeath(deathRecipient, 0);
- DownloadStateCallback exposedCallback =
- mDownloadCallbackBinderMap.remove(callback.asBinder());
+ DownloadStatusListener exposedCallback =
+ mDownloadStatusListenerBinderMap.remove(listener.asBinder());
if (exposedCallback == null) {
- throw new IllegalArgumentException("Unknown callback");
+ throw new IllegalArgumentException("Unknown listener");
}
- return unregisterStateCallback(downloadRequest, exposedCallback);
+ return removeStatusListener(downloadRequest, exposedCallback);
+ }
+
+ /**
+ * Registers a download progress listener for the provided {@link DownloadRequest}.
+ *
+ * This method is called by the app when it wants to request updates on the progress of
+ * the download.
+ *
+ * If the middleware is not aware of a download having been requested with the provided
+ * {@link DownloadRequest} in the past,
+ * {@link MbmsErrors.DownloadErrors#ERROR_UNKNOWN_DOWNLOAD_REQUEST}
+ * must be returned.
+ *
+ * @param downloadRequest The {@link DownloadRequest} that was used to initiate the download
+ * for which progress updates are being requested.
+ * @param listener The listener object to use.
+ */
+ public int addProgressListener(DownloadRequest downloadRequest,
+ DownloadProgressListener listener) throws RemoteException {
+ return 0;
+ }
+
+ /**
+ * Actual AIDL implementation -- hides the listener AIDL from the API.
+ * @hide
+ */
+ @Override
+ public final int addProgressListener(final DownloadRequest downloadRequest,
+ final IDownloadProgressListener listener) throws RemoteException {
+ final int uid = Binder.getCallingUid();
+ if (downloadRequest == null) {
+ throw new NullPointerException("Download request must not be null");
+ }
+ if (listener == null) {
+ throw new NullPointerException("Callback must not be null");
+ }
+
+ DownloadProgressListener exposedCallback = new VendorDownloadProgressListener(listener) {
+ @Override
+ protected void onRemoteException(RemoteException e) {
+ onAppCallbackDied(uid, downloadRequest.getSubscriptionId());
+ }
+ };
+
+ int result = addProgressListener(downloadRequest, exposedCallback);
+
+ if (result == MbmsErrors.SUCCESS) {
+ DeathRecipient deathRecipient = new DeathRecipient() {
+ @Override
+ public void binderDied() {
+ onAppCallbackDied(uid, downloadRequest.getSubscriptionId());
+ mDownloadProgressListenerBinderMap.remove(listener.asBinder());
+ mDownloadCallbackDeathRecipients.remove(listener.asBinder());
+ }
+ };
+ mDownloadCallbackDeathRecipients.put(listener.asBinder(), deathRecipient);
+ listener.asBinder().linkToDeath(deathRecipient, 0);
+ mDownloadProgressListenerBinderMap.put(listener.asBinder(), exposedCallback);
+ }
+
+ return result;
+ }
+
+ /**
+ * Un-registers a download progress listener for the provided {@link DownloadRequest}.
+ *
+ * This method is called by the app when it no longer wants to request progress updates on the
+ * download.
+ *
+ * If the middleware is not aware of a download having been requested with the provided
+ * {@link DownloadRequest} in the past,
+ * {@link MbmsErrors.DownloadErrors#ERROR_UNKNOWN_DOWNLOAD_REQUEST}
+ * must be returned.
+ *
+ * @param downloadRequest The {@link DownloadRequest} that was used to register the callback
+ * @param listener The callback object that
+ * {@link #addProgressListener(DownloadRequest, DownloadProgressListener)}
+ * was called with.
+ */
+ public int removeProgressListener(DownloadRequest downloadRequest,
+ DownloadProgressListener listener) throws RemoteException {
+ return 0;
+ }
+
+ /**
+ * Actual AIDL implementation -- hides the listener AIDL from the API.
+ * @hide
+ */
+ public final int removeProgressListener(
+ final DownloadRequest downloadRequest, final IDownloadProgressListener listener)
+ throws RemoteException {
+ if (downloadRequest == null) {
+ throw new NullPointerException("Download request must not be null");
+ }
+ if (listener == null) {
+ throw new NullPointerException("Callback must not be null");
+ }
+
+ DeathRecipient deathRecipient =
+ mDownloadCallbackDeathRecipients.remove(listener.asBinder());
+ if (deathRecipient == null) {
+ throw new IllegalArgumentException("Unknown listener");
+ }
+
+ listener.asBinder().unlinkToDeath(deathRecipient, 0);
+
+ DownloadProgressListener exposedCallback =
+ mDownloadProgressListenerBinderMap.remove(listener.asBinder());
+ if (exposedCallback == null) {
+ throw new IllegalArgumentException("Unknown listener");
+ }
+
+ return removeProgressListener(downloadRequest, exposedCallback);
}
/**
@@ -370,18 +490,18 @@
}
/**
- * Gets information about the status of a file pending download.
+ * Requests information about the state of a file pending download.
*
- * If the middleware has not yet been properly initialized or if it has no records of the
+ * If the middleware has no records of the
* file indicated by {@code fileInfo} being associated with {@code downloadRequest},
- * {@link MbmsDownloadSession#STATUS_UNKNOWN} must be returned.
+ * {@link MbmsErrors.DownloadErrors#ERROR_UNKNOWN_FILE_INFO} must be returned.
*
* @param downloadRequest The download request to query.
* @param fileInfo The particular file within the request to get information on.
- * @return The status of the download.
+ * @return {@link MbmsErrors#SUCCESS} if the request was successful, an error code otherwise.
*/
@Override
- public int getDownloadStatus(DownloadRequest downloadRequest, FileInfo fileInfo)
+ public int requestDownloadState(DownloadRequest downloadRequest, FileInfo fileInfo)
throws RemoteException {
return 0;
}
diff --git a/telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java b/telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java
index db177c0..5ce612d 100644
--- a/telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java
+++ b/telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java
@@ -77,6 +77,10 @@
@Override
public void onError(final int errorCode, final String message) {
try {
+ if (errorCode == MbmsErrors.UNKNOWN) {
+ throw new IllegalArgumentException(
+ "Middleware cannot send an unknown error.");
+ }
callback.onError(errorCode, message);
} catch (RemoteException e) {
onAppCallbackDied(uid, subscriptionId);
@@ -173,6 +177,10 @@
@Override
public void onError(final int errorCode, final String message) {
try {
+ if (errorCode == MbmsErrors.UNKNOWN) {
+ throw new IllegalArgumentException(
+ "Middleware cannot send an unknown error.");
+ }
callback.onError(errorCode, message);
} catch (RemoteException e) {
onAppCallbackDied(uid, subscriptionId);
diff --git a/telephony/java/com/android/ims/ImsConfig.java b/telephony/java/com/android/ims/ImsConfig.java
index cf4c47b..6ad44ba 100644
--- a/telephony/java/com/android/ims/ImsConfig.java
+++ b/telephony/java/com/android/ims/ImsConfig.java
@@ -19,8 +19,9 @@
import android.content.Context;
import android.os.RemoteException;
import android.telephony.Rlog;
-
-import com.android.ims.internal.IImsConfig;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.aidl.IImsConfig;
+import android.telephony.ims.stub.ImsConfigImplBase;
/**
* Provides APIs to get/set the IMS service feature/capability/parameters.
@@ -34,7 +35,6 @@
private static final String TAG = "ImsConfig";
private boolean DBG = true;
private final IImsConfig miConfig;
- private Context mContext;
/**
* Broadcast action: the feature enable status was changed
@@ -46,7 +46,7 @@
/**
* Broadcast action: the configuration was changed
- *
+ * @deprecated Use {@link ImsConfig#addConfigCallback(ImsConfigImplBase.Callback)} instead.
* @hide
*/
public static final String ACTION_IMS_CONFIG_CHANGED =
@@ -70,6 +70,8 @@
/**
* Defines IMS service/capability feature constants.
+ * @deprecated Use
+ * {@link android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability} instead.
*/
public static class FeatureConstants {
public static final int FEATURE_TYPE_UNKNOWN = -1;
@@ -538,163 +540,163 @@
public static final int WIFI_PREFERRED = 2;
}
- public ImsConfig(IImsConfig iconfig, Context context) {
- if (DBG) Rlog.d(TAG, "ImsConfig creates");
+ public ImsConfig(IImsConfig iconfig) {
miConfig = iconfig;
- mContext = context;
}
/**
- * Gets the provisioned value for IMS service/capabilities parameters used by IMS stack.
- * This function should not be called from the mainthread as it could block the
- * mainthread.
+ * @deprecated see {@link #getConfigInt(int)} instead.
+ */
+ public int getProvisionedValue(int item) throws ImsException {
+ return getConfigInt(item);
+ }
+
+ /**
+ * Gets the configuration value for IMS service/capabilities parameters used by IMS stack.
*
* @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
* @return the value in Integer format.
- *
- * @throws ImsException if calling the IMS service results in an error.
+ * @throws ImsException if the ImsService is unavailable.
*/
- public int getProvisionedValue(int item) throws ImsException {
+ public int getConfigInt(int item) throws ImsException {
int ret = 0;
try {
- ret = miConfig.getProvisionedValue(item);
+ ret = miConfig.getConfigInt(item);
} catch (RemoteException e) {
- throw new ImsException("getValue()", e,
+ throw new ImsException("getInt()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
- if (DBG) Rlog.d(TAG, "getProvisionedValue(): item = " + item + ", ret =" + ret);
+ if (DBG) Rlog.d(TAG, "getInt(): item = " + item + ", ret =" + ret);
return ret;
}
/**
- * Gets the provisioned value for IMS service/capabilities parameters used by IMS stack.
- * This function should not be called from the mainthread as it could block the
- * mainthread.
+ * @deprecated see {@link #getConfigString(int)} instead
+ */
+ public String getProvisionedStringValue(int item) throws ImsException {
+ return getConfigString(item);
+ }
+
+ /**
+ * Gets the configuration value for IMS service/capabilities parameters used by IMS stack.
*
* @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
* @return value in String format.
*
- * @throws ImsException if calling the IMS service results in an error.
+ * @throws ImsException if the ImsService is unavailable.
*/
- public String getProvisionedStringValue(int item) throws ImsException {
+ public String getConfigString(int item) throws ImsException {
String ret = "Unknown";
try {
- ret = miConfig.getProvisionedStringValue(item);
+ ret = miConfig.getConfigString(item);
} catch (RemoteException e) {
- throw new ImsException("getProvisionedStringValue()", e,
+ throw new ImsException("getConfigString()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
- if (DBG) Rlog.d(TAG, "getProvisionedStringValue(): item = " + item + ", ret =" + ret);
+ if (DBG) Rlog.d(TAG, "getConfigString(): item = " + item + ", ret =" + ret);
return ret;
}
/**
- * Sets the value for IMS service/capabilities parameters by
- * the operator device management entity.
- * This function should not be called from main thread as it could block
- * mainthread.
+ * @deprecated see {@link #setConfig(int, int)} instead.
+ */
+ public int setProvisionedValue(int item, int value) throws ImsException {
+ return setConfig(item, value);
+ }
+
+ /**
+ * @deprecated see {@link #setConfig(int, String)} instead.
+ */
+ public int setProvisionedStringValue(int item, String value) throws ImsException {
+ return setConfig(item, value);
+ }
+
+ /**
+ * Sets the value for ImsService configuration item.
*
* @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
* @param value in Integer format.
* @return as defined in com.android.ims.ImsConfig#OperationStatusConstants
*
- * @throws ImsException if calling the IMS service results in an error.
+ * @throws ImsException if the ImsService is unavailable.
*/
- public int setProvisionedValue(int item, int value)
- throws ImsException {
+ public int setConfig(int item, int value) throws ImsException {
int ret = OperationStatusConstants.UNKNOWN;
if (DBG) {
- Rlog.d(TAG, "setProvisionedValue(): item = " + item +
+ Rlog.d(TAG, "setConfig(): item = " + item +
"value = " + value);
}
try {
- ret = miConfig.setProvisionedValue(item, value);
+ ret = miConfig.setConfigInt(item, value);
} catch (RemoteException e) {
- throw new ImsException("setProvisionedValue()", e,
+ throw new ImsException("setConfig()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
if (DBG) {
- Rlog.d(TAG, "setProvisionedValue(): item = " + item +
+ Rlog.d(TAG, "setConfig(): item = " + item +
+ " value = " + value + " ret = " + ret);
+ }
+ return ret;
+
+ }
+
+ /**
+ * Sets the value for ImsService configuration item.
+ *
+ * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param value in Integer format.
+ * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants
+ *
+ * @throws ImsException if the ImsService is unavailable.
+ */
+ public int setConfig(int item, String value) throws ImsException {
+ int ret = OperationStatusConstants.UNKNOWN;
+ if (DBG) {
+ Rlog.d(TAG, "setConfig(): item = " + item +
+ "value = " + value);
+ }
+ try {
+ ret = miConfig.setConfigString(item, value);
+ } catch (RemoteException e) {
+ throw new ImsException("setConfig()", e,
+ ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
+ }
+ if (DBG) {
+ Rlog.d(TAG, "setConfig(): item = " + item +
" value = " + value + " ret = " + ret);
}
return ret;
}
/**
- * Sets the value for IMS service/capabilities parameters by
- * the operator device management entity.
- * This function should not be called from main thread as it could block
- * mainthread.
+ * Adds a {@link ImsConfigImplBase.Callback} to the ImsService to notify when a Configuration
+ * item has changed.
*
- * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @param value in String format.
- * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants
- *
- * @throws ImsException if calling the IMS service results in an error.
+ * Make sure to call {@link #removeConfigCallback(ImsConfigImplBase.Callback)} when finished
+ * using this callback.
*/
- public int setProvisionedStringValue(int item, String value)
- throws ImsException {
- int ret = OperationStatusConstants.UNKNOWN;
+ public void addConfigCallback(ImsConfigImplBase.Callback callback) throws ImsException {
+ if (DBG) Rlog.d(TAG, "addConfigCallback: " + callback);
try {
- ret = miConfig.setProvisionedStringValue(item, value);
+ miConfig.addImsConfigCallback(callback);
} catch (RemoteException e) {
- throw new ImsException("setProvisionedStringValue()", e,
- ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
- }
- if (DBG) {
- Rlog.d(TAG, "setProvisionedStringValue(): item = " + item +
- ", value =" + value);
- }
- return ret;
- }
-
- /**
- * Gets the value for IMS feature item for specified network type.
- *
- * @param feature, defined as in FeatureConstants.
- * @param network, defined as in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
- * @param listener, provided to be notified for the feature on/off status.
- * @return void
- *
- * @throws ImsException if calling the IMS service results in an error.
- */
- public void getFeatureValue(int feature, int network,
- ImsConfigListener listener) throws ImsException {
- if (DBG) {
- Rlog.d(TAG, "getFeatureValue: feature = " + feature + ", network =" + network +
- ", listener =" + listener);
- }
- try {
- miConfig.getFeatureValue(feature, network, listener);
- } catch (RemoteException e) {
- throw new ImsException("getFeatureValue()", e,
+ throw new ImsException("addConfigCallback()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
}
/**
- * Sets the value for IMS feature item for specified network type.
- *
- * @param feature, as defined in FeatureConstants.
- * @param network, as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
- * @param value, as defined in FeatureValueConstants.
- * @param listener, provided if caller needs to be notified for set result.
- * @return void
- *
- * @throws ImsException if calling the IMS service results in an error.
+ * Removes a {@link ImsConfigImplBase.Callback} from the ImsService that was previously added
+ * by {@link #addConfigCallback(ImsConfigImplBase.Callback)}.
*/
- public void setFeatureValue(int feature, int network, int value,
- ImsConfigListener listener) throws ImsException {
- if (DBG) {
- Rlog.d(TAG, "setFeatureValue: feature = " + feature + ", network =" + network +
- ", value =" + value + ", listener =" + listener);
- }
+ public void removeConfigCallback(ImsConfigImplBase.Callback callback) throws ImsException {
+ if (DBG) Rlog.d(TAG, "removeConfigCallback: " + callback);
try {
- miConfig.setFeatureValue(feature, network, value, listener);
- } catch (RemoteException e) {
- throw new ImsException("setFeatureValue()", e,
+ miConfig.removeImsConfigCallback(callback);
+ } catch (RemoteException e) {
+ throw new ImsException("removeConfigCallback()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
}
diff --git a/telephony/java/com/android/ims/ImsException.java b/telephony/java/com/android/ims/ImsException.java
index 0e8bad7..f35e886 100644
--- a/telephony/java/com/android/ims/ImsException.java
+++ b/telephony/java/com/android/ims/ImsException.java
@@ -16,6 +16,8 @@
package com.android.ims;
+import android.telephony.ims.ImsReasonInfo;
+
/**
* This class defines a general IMS-related exception.
*
diff --git a/telephony/java/com/android/ims/ImsSsData.java b/telephony/java/com/android/ims/ImsSsData.java
deleted file mode 100644
index 7336c13..0000000
--- a/telephony/java/com/android/ims/ImsSsData.java
+++ /dev/null
@@ -1,189 +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.
- */
-package com.android.ims;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.ArrayList;
-
-/**
- * Provided STK Call Control Suplementary Service information
- *
- * {@hide}
- */
-public class ImsSsData implements Parcelable {
-
- //ServiceType
- public static final int SS_CFU = 0;
- public static final int SS_CF_BUSY = 1;
- public static final int SS_CF_NO_REPLY = 2;
- public static final int SS_CF_NOT_REACHABLE = 3;
- public static final int SS_CF_ALL = 4;
- public static final int SS_CF_ALL_CONDITIONAL = 5;
- public static final int SS_CFUT = 6;
- public static final int SS_CLIP = 7;
- public static final int SS_CLIR = 8;
- public static final int SS_COLP = 9;
- public static final int SS_COLR = 10;
- public static final int SS_CNAP = 11;
- public static final int SS_WAIT = 12;
- public static final int SS_BAOC = 13;
- public static final int SS_BAOIC = 14;
- public static final int SS_BAOIC_EXC_HOME = 15;
- public static final int SS_BAIC = 16;
- public static final int SS_BAIC_ROAMING = 17;
- public static final int SS_ALL_BARRING = 18;
- public static final int SS_OUTGOING_BARRING = 19;
- public static final int SS_INCOMING_BARRING = 20;
- public static final int SS_INCOMING_BARRING_DN = 21;
- public static final int SS_INCOMING_BARRING_ANONYMOUS = 22;
-
- //SSRequestType
- public static final int SS_ACTIVATION = 0;
- public static final int SS_DEACTIVATION = 1;
- public static final int SS_INTERROGATION = 2;
- public static final int SS_REGISTRATION = 3;
- public static final int SS_ERASURE = 4;
-
- //TeleserviceType
- public static final int SS_ALL_TELE_AND_BEARER_SERVICES = 0;
- public static final int SS_ALL_TELESEVICES = 1;
- public static final int SS_TELEPHONY = 2;
- public static final int SS_ALL_DATA_TELESERVICES = 3;
- public static final int SS_SMS_SERVICES = 4;
- public static final int SS_ALL_TELESERVICES_EXCEPT_SMS = 5;
-
- // Refer to ServiceType
- public int serviceType;
- // Refere to SSRequestType
- public int requestType;
- // Refer to TeleserviceType
- public int teleserviceType;
- // Service Class
- public int serviceClass;
- // Error information
- public int result;
-
- public int[] ssInfo; /* Valid for all supplementary services.
- This field will be empty for RequestType SS_INTERROGATION
- and ServiceType SS_CF_*, SS_INCOMING_BARRING_DN,
- SS_INCOMING_BARRING_ANONYMOUS.*/
-
- public ImsCallForwardInfo[] cfInfo; /* Valid only for supplementary services
- ServiceType SS_CF_* and RequestType SS_INTERROGATION */
-
- public ImsSsInfo[] imsSsInfo; /* Valid only for ServiceType SS_INCOMING_BARRING_DN and
- ServiceType SS_INCOMING_BARRING_ANONYMOUS */
-
- public ImsSsData() {}
-
- public ImsSsData(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator<ImsSsData> CREATOR = new Creator<ImsSsData>() {
- @Override
- public ImsSsData createFromParcel(Parcel in) {
- return new ImsSsData(in);
- }
-
- @Override
- public ImsSsData[] newArray(int size) {
- return new ImsSsData[size];
- }
- };
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeInt(serviceType);
- out.writeInt(requestType);
- out.writeInt(teleserviceType);
- out.writeInt(serviceClass);
- out.writeInt(result);
- out.writeIntArray(ssInfo);
- out.writeParcelableArray(cfInfo, 0);
- }
-
- private void readFromParcel(Parcel in) {
- serviceType = in.readInt();
- requestType = in.readInt();
- teleserviceType = in.readInt();
- serviceClass = in.readInt();
- result = in.readInt();
- ssInfo = in.createIntArray();
- cfInfo = (ImsCallForwardInfo[])in.readParcelableArray(this.getClass().getClassLoader());
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- public boolean isTypeCF() {
- return (serviceType == SS_CFU || serviceType == SS_CF_BUSY ||
- serviceType == SS_CF_NO_REPLY || serviceType == SS_CF_NOT_REACHABLE ||
- serviceType == SS_CF_ALL || serviceType == SS_CF_ALL_CONDITIONAL);
- }
-
- public boolean isTypeUnConditional() {
- return (serviceType == SS_CFU || serviceType == SS_CF_ALL);
- }
-
- public boolean isTypeCW() {
- return (serviceType == SS_WAIT);
- }
-
- public boolean isTypeClip() {
- return (serviceType == SS_CLIP);
- }
-
- public boolean isTypeColr() {
- return (serviceType == SS_COLR);
- }
-
- public boolean isTypeColp() {
- return (serviceType == SS_COLP);
- }
-
- public boolean isTypeClir() {
- return (serviceType == SS_CLIR);
- }
-
- public boolean isTypeIcb() {
- return (serviceType == SS_INCOMING_BARRING_DN ||
- serviceType == SS_INCOMING_BARRING_ANONYMOUS);
- }
-
- public boolean isTypeBarring() {
- return (serviceType == SS_BAOC || serviceType == SS_BAOIC ||
- serviceType == SS_BAOIC_EXC_HOME || serviceType == SS_BAIC ||
- serviceType == SS_BAIC_ROAMING || serviceType == SS_ALL_BARRING ||
- serviceType == SS_OUTGOING_BARRING || serviceType == SS_INCOMING_BARRING);
- }
-
- public boolean isTypeInterrogation() {
- return (requestType == SS_INTERROGATION);
- }
-
- public String toString() {
- return "[ImsSsData] " + "ServiceType: " + serviceType
- + " RequestType: " + requestType
- + " TeleserviceType: " + teleserviceType
- + " ServiceClass: " + serviceClass
- + " Result: " + result;
- }
-}
diff --git a/telephony/java/com/android/ims/ImsUtInterface.java b/telephony/java/com/android/ims/ImsUtInterface.java
index 14c184a..c9d4405 100644
--- a/telephony/java/com/android/ims/ImsUtInterface.java
+++ b/telephony/java/com/android/ims/ImsUtInterface.java
@@ -18,6 +18,8 @@
import android.os.Handler;
import android.os.Message;
+import android.telephony.ims.ImsCallForwardInfo;
+import android.telephony.ims.ImsSsInfo;
/**
* Provides APIs for the supplementary service settings using IMS (Ut interface).
diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
index c6fc5e5..15234e5 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
@@ -17,9 +17,10 @@
package com.android.ims.internal;
import android.os.Message;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.internal.IImsCallSessionListener;
+import android.telephony.ims.aidl.IImsCallSessionListener;
+
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsStreamMediaProfile;
import com.android.ims.internal.IImsVideoCallProvider;
/**
@@ -135,6 +136,13 @@
void accept(int callType, in ImsStreamMediaProfile profile);
/**
+ * Deflects an incoming call.
+ *
+ * @param deflectNumber number to deflect the call
+ */
+ void deflect(String deflectNumber);
+
+ /**
* Rejects an incoming call or session update.
*
* @param reason reason code to reject an incoming call
diff --git a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
index 748092d..a8e8b7dd 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
@@ -16,12 +16,12 @@
package com.android.ims.internal;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsConferenceState;
+import android.telephony.ims.ImsStreamMediaProfile;
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsConferenceState;
import com.android.ims.internal.IImsCallSession;
-import com.android.ims.ImsSuppServiceNotification;
+import android.telephony.ims.ImsSuppServiceNotification;
/**
* A listener type for receiving notification on IMS call session events.
diff --git a/telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl b/telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl
index 1621967..b3d8139 100644
--- a/telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl
@@ -16,7 +16,7 @@
package com.android.ims.internal;
-import com.android.ims.ImsExternalCallState;
+import android.telephony.ims.ImsExternalCallState;
/**
* A listener type for receiving notifications about DEP through IMS
diff --git a/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl b/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl
index 41b1042..b83b130 100644
--- a/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl
+++ b/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl
@@ -17,9 +17,9 @@
package com.android.ims.internal;
/**
-* Interface from ImsFeature in the ImsService to ImsServiceController.
+ * Interface from ImsFeature in the ImsService to ImsServiceController.
* {@hide}
*/
oneway interface IImsFeatureStatusCallback {
void notifyImsFeatureStatus(int featureStatus);
-}
\ No newline at end of file
+}
diff --git a/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl b/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl
index 52b3853..5151192 100644
--- a/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl
+++ b/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl
@@ -18,9 +18,8 @@
import android.app.PendingIntent;
-import com.android.ims.ImsCallProfile;
+import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
-import com.android.ims.internal.IImsCallSessionListener;
import com.android.ims.internal.IImsConfig;
import com.android.ims.internal.IImsEcbm;
import com.android.ims.internal.IImsMultiEndpoint;
@@ -43,8 +42,7 @@
void addRegistrationListener(in IImsRegistrationListener listener);
void removeRegistrationListener(in IImsRegistrationListener listener);
ImsCallProfile createCallProfile(int sessionId, int callSessionType, int callType);
- IImsCallSession createCallSession(int sessionId, in ImsCallProfile profile,
- IImsCallSessionListener listener);
+ IImsCallSession createCallSession(int sessionId, in ImsCallProfile profile);
IImsCallSession getPendingCallSession(int sessionId, String callId);
IImsUt getUtInterface();
IImsConfig getConfigInterface();
diff --git a/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl b/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl
index 15f8726..2212109 100644
--- a/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl
@@ -16,7 +16,7 @@
package com.android.ims.internal;
-import com.android.ims.ImsReasonInfo;
+import android.telephony.ims.ImsReasonInfo;
import android.net.Uri;
diff --git a/telephony/java/com/android/ims/internal/IImsService.aidl b/telephony/java/com/android/ims/internal/IImsService.aidl
index 406d22d..c3cc6fb 100644
--- a/telephony/java/com/android/ims/internal/IImsService.aidl
+++ b/telephony/java/com/android/ims/internal/IImsService.aidl
@@ -18,7 +18,7 @@
import android.app.PendingIntent;
-import com.android.ims.ImsCallProfile;
+import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsCallSessionListener;
import com.android.ims.internal.IImsConfig;
diff --git a/telephony/java/com/android/ims/internal/IImsServiceController.aidl b/telephony/java/com/android/ims/internal/IImsServiceController.aidl
index 7ac25ac..857089f 100644
--- a/telephony/java/com/android/ims/internal/IImsServiceController.aidl
+++ b/telephony/java/com/android/ims/internal/IImsServiceController.aidl
@@ -18,7 +18,6 @@
import com.android.ims.internal.IImsFeatureStatusCallback;
import com.android.ims.internal.IImsMMTelFeature;
-import com.android.ims.internal.IImsRegistration;
import com.android.ims.internal.IImsRcsFeature;
/**
@@ -30,5 +29,4 @@
IImsMMTelFeature createMMTelFeature(int slotId, in IImsFeatureStatusCallback c);
IImsRcsFeature createRcsFeature(int slotId, in IImsFeatureStatusCallback c);
void removeImsFeature(int slotId, int featureType, in IImsFeatureStatusCallback c);
- IImsRegistration getRegistration(int slotId);
}
diff --git a/telephony/java/com/android/ims/internal/IImsUtListener.aidl b/telephony/java/com/android/ims/internal/IImsUtListener.aidl
index 1bc0369..a603cd3 100644
--- a/telephony/java/com/android/ims/internal/IImsUtListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsUtListener.aidl
@@ -18,11 +18,11 @@
import android.os.Bundle;
-import com.android.ims.ImsCallForwardInfo;
-import com.android.ims.ImsSsData;
-import com.android.ims.ImsSsInfo;
+import android.telephony.ims.ImsCallForwardInfo;
+import android.telephony.ims.ImsSsInfo;
import com.android.ims.internal.IImsUt;
-import com.android.ims.ImsReasonInfo;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsSsData;
/**
* {@hide}
diff --git a/telephony/java/com/android/internal/telephony/DctConstants.java b/telephony/java/com/android/internal/telephony/DctConstants.java
index 91032f3..d999c13 100644
--- a/telephony/java/com/android/internal/telephony/DctConstants.java
+++ b/telephony/java/com/android/internal/telephony/DctConstants.java
@@ -108,6 +108,7 @@
public static final int EVENT_SET_CARRIER_DATA_ENABLED = BASE + 46;
public static final int EVENT_DATA_RECONNECT = BASE + 47;
public static final int EVENT_ROAMING_SETTING_CHANGE = BASE + 48;
+ public static final int EVENT_DATA_SERVICE_BINDING_CHANGED = BASE + 49;
/***** Constants *****/
diff --git a/telephony/java/com/android/internal/telephony/ExponentialBackoff.java b/telephony/java/com/android/internal/telephony/ExponentialBackoff.java
index 80958c0..f323a0c 100644
--- a/telephony/java/com/android/internal/telephony/ExponentialBackoff.java
+++ b/telephony/java/com/android/internal/telephony/ExponentialBackoff.java
@@ -20,6 +20,8 @@
import android.os.Handler;
import android.os.Looper;
+import com.android.internal.annotations.VisibleForTesting;
+
/** The implementation of exponential backoff with jitter applied. */
public class ExponentialBackoff {
private int mRetryCounter;
@@ -27,8 +29,31 @@
private long mMaximumDelayMs;
private long mCurrentDelayMs;
private int mMultiplier;
- private Runnable mRunnable;
- private Handler mHandler;
+ private final Runnable mRunnable;
+ private final Handler mHandler;
+
+ /**
+ * Implementation of Handler methods, Adapter for testing (can't spy on final methods).
+ */
+ private HandlerAdapter mHandlerAdapter = new HandlerAdapter() {
+ @Override
+ public boolean postDelayed(Runnable runnable, long delayMillis) {
+ return mHandler.postDelayed(runnable, delayMillis);
+ }
+
+ @Override
+ public void removeCallbacks(Runnable runnable) {
+ mHandler.removeCallbacks(runnable);
+ }
+ };
+
+ /**
+ * Need to spy final methods for testing.
+ */
+ public interface HandlerAdapter {
+ boolean postDelayed(Runnable runnable, long delayMillis);
+ void removeCallbacks(Runnable runnable);
+ }
public ExponentialBackoff(
long initialDelayMs,
@@ -57,14 +82,14 @@
public void start() {
mRetryCounter = 0;
mCurrentDelayMs = mStartDelayMs;
- mHandler.removeCallbacks(mRunnable);
- mHandler.postDelayed(mRunnable, mCurrentDelayMs);
+ mHandlerAdapter.removeCallbacks(mRunnable);
+ mHandlerAdapter.postDelayed(mRunnable, mCurrentDelayMs);
}
/** Stops the backoff, all pending messages will be removed from the message queue. */
public void stop() {
mRetryCounter = 0;
- mHandler.removeCallbacks(mRunnable);
+ mHandlerAdapter.removeCallbacks(mRunnable);
}
/** Should call when the retry action has failed and we want to retry after a longer delay. */
@@ -73,12 +98,17 @@
long temp = Math.min(
mMaximumDelayMs, (long) (mStartDelayMs * Math.pow(mMultiplier, mRetryCounter)));
mCurrentDelayMs = (long) (((1 + Math.random()) / 2) * temp);
- mHandler.removeCallbacks(mRunnable);
- mHandler.postDelayed(mRunnable, mCurrentDelayMs);
+ mHandlerAdapter.removeCallbacks(mRunnable);
+ mHandlerAdapter.postDelayed(mRunnable, mCurrentDelayMs);
}
/** Returns the delay for the most recently posted message. */
public long getCurrentDelay() {
return mCurrentDelayMs;
}
+
+ @VisibleForTesting
+ public void setHandlerAdapter(HandlerAdapter a) {
+ mHandlerAdapter = a;
+ }
}
diff --git a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
index 8e3f4c0..0d315e5 100644
--- a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
+++ b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
@@ -21,6 +21,7 @@
import android.telephony.SignalStrength;
import android.telephony.CellInfo;
import android.telephony.DataConnectionRealTimeInfo;
+import android.telephony.PhysicalChannelConfig;
import android.telephony.PreciseCallState;
import android.telephony.PreciseDataConnectionState;
import android.telephony.VoLteServiceState;
@@ -37,6 +38,7 @@
void onDataConnectionStateChanged(int state, int networkType);
void onDataActivity(int direction);
void onSignalStrengthsChanged(in SignalStrength signalStrength);
+ void onPhysicalChannelConfigurationChanged(in List<PhysicalChannelConfig> configs);
void onOtaspChanged(in int otaspMode);
void onCellInfoChanged(in List<CellInfo> cellInfo);
void onPreciseCallStateChanged(in PreciseCallState callState);
@@ -45,6 +47,7 @@
void onVoLteServiceStateChanged(in VoLteServiceState lteState);
void onVoiceActivationStateChanged(int activationState);
void onDataActivationStateChanged(int activationState);
+ void onOemHookRawEvent(in byte[] rawData);
void onCarrierNetworkChange(in boolean active);
void onUserMobileDataStateChanged(in boolean enabled);
}
diff --git a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
index 0f31821..93964f3 100644
--- a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
+++ b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
@@ -68,11 +68,6 @@
String getSubscriberIdForSubscriber(int subId, String callingPackage);
/**
- * Retrieves the Group Identifier Level1 for GSM phones.
- */
- String getGroupIdLevel1(String callingPackage);
-
- /**
* Retrieves the Group Identifier Level1 for GSM phones of a subId.
*/
String getGroupIdLevel1ForSubscriber(int subId, String callingPackage);
@@ -152,6 +147,13 @@
in ImsiEncryptionInfo imsiEncryptionInfo);
/**
+ * Resets the Carrier Keys in the database. This involves 2 steps:
+ * 1. Delete the keys from the database.
+ * 2. Send an intent to download new Certificates.
+ */
+ void resetCarrierKeysForImsiEncryption(int subId, String callingPackage);
+
+ /**
* Retrieves the alpha identifier associated with the voice mail number.
*/
String getVoiceMailAlphaTag(String callingPackage);
@@ -195,14 +197,6 @@
String[] getIsimPcscf(int subId);
/**
- * TODO: Deprecate and remove this interface. Superceded by getIccsimChallengeResponse.
- * Returns the response of ISIM Authetification through RIL.
- * @return the response of ISIM Authetification, or null if
- * the Authentification hasn't been successed or isn't present iphonesubinfo.
- */
- String getIsimChallengeResponse(String nonce);
-
- /**
* Returns the response of the SIM application on the UICC to authentication
* challenge/response algorithm. The data string and challenge response are
* Base64 encoded Strings.
diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl
index fe37531..a4eb424 100644
--- a/telephony/java/com/android/internal/telephony/ISms.aidl
+++ b/telephony/java/com/android/internal/telephony/ISms.aidl
@@ -187,6 +187,57 @@
in PendingIntent deliveryIntent, in boolean persistMessage);
/**
+ * Send an SMS with options using Subscription Id.
+ *
+ * @param subId the subId on which the SMS has to be sent.
+ * @param destAddr the address to send the message to
+ * @param scAddr the SMSC to send the message through, or NULL for the
+ * default SMSC
+ * @param text the body of the message to send
+ * @param sentIntent if not NULL this <code>PendingIntent</code> is
+ * broadcast when the message is sucessfully sent, or failed.
+ * The result code will be <code>Activity.RESULT_OK<code> for success,
+ * or one of these errors:<br>
+ * <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
+ * <code>RESULT_ERROR_RADIO_OFF</code><br>
+ * <code>RESULT_ERROR_NULL_PDU</code><br>
+ * For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include
+ * the extra "errorCode" containing a radio technology specific value,
+ * generally only useful for troubleshooting.<br>
+ * The per-application based SMS control checks sentIntent. If sentIntent
+ * is NULL the caller will be checked against all unknown applications,
+ * which cause smaller number of SMS to be sent in checking period.
+ * @param deliveryIntent if not NULL this <code>PendingIntent</code> is
+ * broadcast when the message is delivered to the recipient. The
+ * raw pdu of the status report is in the extended data ("pdu").
+ * @param persistMessageForNonDefaultSmsApp whether the sent message should
+ * be automatically persisted in the SMS db. It only affects messages sent
+ * by a non-default SMS app. Currently only the carrier app can set this
+ * parameter to false to skip auto message persistence.
+ * @param priority Priority level of the message
+ * Refer specification See 3GPP2 C.S0015-B, v2.0, table 4.5.9-1
+ * ---------------------------------
+ * PRIORITY | Level of Priority
+ * ---------------------------------
+ * '00' | Normal
+ * '01' | Interactive
+ * '10' | Urgent
+ * '11' | Emergency
+ * ----------------------------------
+ * Any Other values included Negative considered as Invalid Priority Indicator of the message.
+ * @param expectMore is a boolean to indicate the sending message is multi segmented or not.
+ * @param validityPeriod Validity Period of the message in mins.
+ * Refer specification 3GPP TS 23.040 V6.8.1 section 9.2.3.12.1.
+ * Validity Period(Minimum) -> 5 mins
+ * Validity Period(Maximum) -> 635040 mins(i.e.63 weeks).
+ * Any Other values included Negative considered as Invalid Validity Period of the message.
+ */
+ void sendTextForSubscriberWithOptions(in int subId, String callingPkg, in String destAddr,
+ in String scAddr, in String text, in PendingIntent sentIntent,
+ in PendingIntent deliveryIntent, in boolean persistMessageForNonDefaultSmsApp,
+ in int priority, in boolean expectMore, in int validityPeriod);
+
+ /**
* Inject an SMS PDU into the android platform.
*
* @param subId the subId on which the SMS has to be injected.
@@ -234,6 +285,56 @@
in List<PendingIntent> deliveryIntents, in boolean persistMessageForNonDefaultSmsApp);
/**
+ * Send a multi-part text based SMS with options using Subscription Id.
+ *
+ * @param subId the subId on which the SMS has to be sent.
+ * @param destinationAddress the address to send the message to
+ * @param scAddress is the service center address or null to use
+ * the current default SMSC
+ * @param parts an <code>ArrayList</code> of strings that, in order,
+ * comprise the original message
+ * @param sentIntents if not null, an <code>ArrayList</code> of
+ * <code>PendingIntent</code>s (one for each message part) that is
+ * broadcast when the corresponding message part has been sent.
+ * The result code will be <code>Activity.RESULT_OK<code> for success,
+ * or one of these errors:
+ * <code>RESULT_ERROR_GENERIC_FAILURE</code>
+ * <code>RESULT_ERROR_RADIO_OFF</code>
+ * <code>RESULT_ERROR_NULL_PDU</code>.
+ * @param deliveryIntents if not null, an <code>ArrayList</code> of
+ * <code>PendingIntent</code>s (one for each message part) that is
+ * broadcast when the corresponding message part has been delivered
+ * to the recipient. The raw pdu of the status report is in the
+ * extended data ("pdu").
+ * @param persistMessageForNonDefaultSmsApp whether the sent message should
+ * be automatically persisted in the SMS db. It only affects messages sent
+ * by a non-default SMS app. Currently only the carrier app can set this
+ * parameter to false to skip auto message persistence.
+ * @param priority Priority level of the message
+ * Refer specification See 3GPP2 C.S0015-B, v2.0, table 4.5.9-1
+ * ---------------------------------
+ * PRIORITY | Level of Priority
+ * ---------------------------------
+ * '00' | Normal
+ * '01' | Interactive
+ * '10' | Urgent
+ * '11' | Emergency
+ * ----------------------------------
+ * Any Other values included Negative considered as Invalid Priority Indicator of the message.
+ * @param expectMore is a boolean to indicate the sending message is multi segmented or not.
+ * @param validityPeriod Validity Period of the message in mins.
+ * Refer specification 3GPP TS 23.040 V6.8.1 section 9.2.3.12.1.
+ * Validity Period(Minimum) -> 5 mins
+ * Validity Period(Maximum) -> 635040 mins(i.e.63 weeks).
+ * Any Other values included Negative considered as Invalid Validity Period of the message.
+ */
+ void sendMultipartTextForSubscriberWithOptions(in int subId, String callingPkg,
+ in String destinationAddress, in String scAddress, in List<String> parts,
+ in List<PendingIntent> sentIntents, in List<PendingIntent> deliveryIntents,
+ in boolean persistMessageForNonDefaultSmsApp, in int priority, in boolean expectMore,
+ in int validityPeriod);
+
+ /**
* Enable reception of cell broadcast (SMS-CB) messages with the given
* message identifier and RAN type. The RAN type specify this message ID
* belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index fba82ee..3fd1d04 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -38,15 +38,17 @@
import android.telephony.SignalStrength;
import android.telephony.TelephonyHistogram;
import android.telephony.VisualVoicemailSmsFilterSettings;
-import com.android.ims.internal.IImsMMTelFeature;
-import com.android.ims.internal.IImsRcsFeature;
-import com.android.ims.internal.IImsRegistration;
+import android.telephony.ims.aidl.IImsConfig;
+import android.telephony.ims.aidl.IImsMmTelFeature;
+import android.telephony.ims.aidl.IImsRcsFeature;
+import android.telephony.ims.aidl.IImsRegistration;
import com.android.ims.internal.IImsServiceFeatureCallback;
import com.android.internal.telephony.CellNetworkScanResult;
import com.android.internal.telephony.OperatorInfo;
import java.util.List;
+import android.telephony.UiccSlotInfo;
/**
* Interface used to interact with the phone. Mostly this is used by the
@@ -621,12 +623,6 @@
void setCellInfoListRate(int rateInMillis);
/**
- * get default sim
- * @return sim id
- */
- int getDefaultSim();
-
- /**
* Opens a logical channel to the ICC card.
*
* Input parameters equivalent to TS 27.007 AT+CCHO command.
@@ -679,6 +675,7 @@
* Input parameters equivalent to TS 27.007 AT+CSIM command.
*
* @param subId The subscription to use.
+ * @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.
@@ -689,7 +686,7 @@
* @return The APDU response from the ICC card with the status appended at
* the end.
*/
- String iccTransmitApduBasicChannel(int subId, int cla, int instruction,
+ String iccTransmitApduBasicChannel(int subId, String callingPackage, int cla, int instruction,
int p1, int p2, int p3, String data);
/**
@@ -786,20 +783,21 @@
int getTetherApnRequired();
/**
- * Get IImsMMTelFeature binder from ImsResolver that corresponds to the subId and MMTel feature
- * as well as registering the MMTelFeature for callbacks using the IImsServiceFeatureCallback
- * interface.
- */
- IImsMMTelFeature getMMTelFeatureAndListen(int slotId, in IImsServiceFeatureCallback callback);
+ * Enables framework IMS and triggers IMS Registration.
+ */
+ void enableIms(int slotId);
/**
- * Get IImsMMTelFeature binder from ImsResolver that corresponds to the subId and MMTel feature
- * as well as registering the MMTelFeature for callbacks using the IImsServiceFeatureCallback
+ * Disables framework IMS and triggers IMS deregistration.
+ */
+ void disableIms(int slotId);
+
+ /**
+ * Get IImsMmTelFeature binder from ImsResolver that corresponds to the subId and MMTel feature
+ * as well as registering the MmTelFeature for callbacks using the IImsServiceFeatureCallback
* interface.
- * Used for emergency calling only.
*/
- IImsMMTelFeature getEmergencyMMTelFeatureAndListen(int slotId,
- in IImsServiceFeatureCallback callback);
+ IImsMmTelFeature getMmTelFeatureAndListen(int slotId, in IImsServiceFeatureCallback callback);
/**
* Get IImsRcsFeature binder from ImsResolver that corresponds to the subId and RCS feature
@@ -814,6 +812,27 @@
IImsRegistration getImsRegistration(int slotId, int feature);
/**
+ * Returns the IImsConfig associated with the slot and feature specified.
+ */
+ IImsConfig getImsConfig(int slotId, int feature);
+
+ /**
+ * @return true if the IMS resolver is busy resolving a binding and should not be considered
+ * available, false if the IMS resolver is idle.
+ */
+ boolean isResolvingImsBinding();
+
+ /**
+ * @return true if the ImsService to bind to for the slot id specified was set, false otherwise.
+ */
+ boolean setImsService(int slotId, boolean isCarrierImsService, String packageName);
+
+ /**
+ * @return the package name of the carrier/device ImsService associated with this slot.
+ */
+ String getImsService(int slotId, boolean isCarrierImsService);
+
+ /**
* Set the network selection mode to automatic.
*
* @param subId the id of the subscription to update.
@@ -943,6 +962,11 @@
int getCarrierPrivilegeStatus(int subId);
/**
+ * Similar to above, but check for the given uid.
+ */
+ int getCarrierPrivilegeStatusForUid(int subId, int uid);
+
+ /**
* Similar to above, but check for the package whose name is pkgName.
*/
int checkCarrierPrivilegesForPackage(String pkgName);
@@ -1041,6 +1065,17 @@
in List<String> cdmaNonRoamingList);
/**
+ * Returns the result and response from RIL for oem request
+ *
+ * @param oemReq the data is sent to ril.
+ * @param oemResp the respose data from RIL.
+ * @return negative value request was not handled or get error
+ * 0 request was handled succesfully, but no response data
+ * positive value success, data length of response
+ */
+ int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp);
+
+ /**
* Check if any mobile Radios need to be shutdown.
*
* @return true is any mobile radio needs to be shutdown
@@ -1114,33 +1149,33 @@
boolean isHearingAidCompatibilitySupported();
/**
- * Get IMS Registration Status
- */
- boolean isImsRegistered();
-
- /**
* Get IMS Registration Status on a particular subid.
*
* @param subId user preferred subId.
*
* @return {@code true} if the IMS status is registered.
*/
- boolean isImsRegisteredForSubscriber(int subId);
+ boolean isImsRegistered(int subId);
/**
- * Returns the Status of Wi-Fi Calling
+ * Returns the Status of Wi-Fi Calling for the subscription id specified.
*/
- boolean isWifiCallingAvailable();
+ boolean isWifiCallingAvailable(int subId);
/**
- * Returns the Status of Volte
+ * Returns the Status of VoLTE for the subscription ID specified.
*/
- boolean isVolteAvailable();
+ boolean isVolteAvailable(int subId);
/**
- * Returns the Status of VT (video telephony)
+ * Returns the Status of VT (video telephony) for the subscription ID specified.
*/
- boolean isVideoTelephonyAvailable();
+ boolean isVideoTelephonyAvailable(int subId);
+
+ /**
+ * Returns the MMTEL IMS registration technology for the subsciption ID specified.
+ */
+ int getImsRegTechnologyForMmTel(int subId);
/**
* Returns the unique device ID of phone, for example, the IMEI for
@@ -1338,10 +1373,10 @@
/**
* Returns carrier name of the given subscription.
- * <p>Carrier name is a user-facing name of carrier id {@link #getSubscriptionCarrierId(int)},
+ * <p>Carrier name is a user-facing name of carrier id {@link #getSimCarrierId(int)},
* usually the brand name of the subsidiary (e.g. T-Mobile). Each carrier could configure
* multiple {@link #getSimOperatorName() SPN} but should have a single carrier name.
- * Carrier name is not canonical identity, use {@link #getSubscriptionCarrierId(int)} instead.
+ * Carrier name is not canonical identity, use {@link #getSimCarrierId(int)} instead.
* <p>Returned carrier name is unlocalized.
*
* @return Carrier name of given subscription id. return {@code null} if subscription is
@@ -1444,4 +1479,40 @@
* @hide
*/
SignalStrength getSignalStrength(int subId);
+
+ /**
+ * Get slot info for all the UICC slots.
+ * @return UiccSlotInfo array.
+ * @hide
+ */
+ UiccSlotInfo[] getUiccSlotsInfo();
+
+ /**
+ * Map logicalSlot to physicalSlot, and activate the physicalSlot if it is inactive.
+ * @param physicalSlots Index i in the array representing physical slot for phone i. The array
+ * size should be same as getPhoneCount().
+ * @return boolean Return true if the switch succeeds, false if the switch fails.
+ */
+ boolean switchSlots(in int[] physicalSlots);
+
+ /**
+ * Sets radio indication update mode. This can be used to control the behavior of indication
+ * update from modem to Android frameworks. For example, by default several indication updates
+ * are turned off when screen is off, but in some special cases (e.g. carkit is connected but
+ * screen is off) we want to turn on those indications even when the screen is off.
+ */
+ void setRadioIndicationUpdateMode(int subId, int filters, int mode);
+
+ /**
+ * A test API to override carrier information including mccmnc, imsi, iccid, gid1, gid2,
+ * plmn and spn. This would be handy for, eg, forcing a particular carrier id, carrier's config
+ * (also any country or carrier overlays) to be loaded when using a test SIM with a call box.
+ */
+ void setCarrierTestOverride(int subId, String mccmnc, String imsi, String iccid, String gid1,
+ String gid2, String plmn, String spn);
+
+ /**
+ * A test API to return installed carrier id list version.
+ */
+ int getCarrierIdListVersion(int subId);
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
index 188167c..0127db9 100644
--- a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
@@ -21,9 +21,9 @@
import android.net.NetworkCapabilities;
import android.os.Bundle;
import android.telephony.CellInfo;
+import android.telephony.PhysicalChannelConfig;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
-import android.telephony.CellInfo;
import android.telephony.VoLteServiceState;
import com.android.internal.telephony.IPhoneStateListener;
import com.android.internal.telephony.IOnSubscriptionsChangedListener;
@@ -58,6 +58,9 @@
void notifyCellLocationForSubscriber(in int subId, in Bundle cellLocation);
void notifyOtaspChanged(in int otaspMode);
void notifyCellInfo(in List<CellInfo> cellInfo);
+ void notifyPhysicalChannelConfiguration(in List<PhysicalChannelConfig> configs);
+ void notifyPhysicalChannelConfigurationForSubscriber(in int subId,
+ in List<PhysicalChannelConfig> configs);
void notifyPreciseCallState(int ringingCallState, int foregroundCallState,
int backgroundCallState);
void notifyDisconnectCause(int disconnectCause, int preciseDisconnectCause);
@@ -67,6 +70,7 @@
void notifyVoLteServiceStateChanged(in VoLteServiceState lteState);
void notifySimActivationStateChangedForPhoneId(in int phoneId, in int subId,
int activationState, int activationType);
+ void notifyOemHookRawEventForSubscriber(in int subId, in byte[] rawData);
void notifySubscriptionInfoChanged();
void notifyCarrierNetworkChange(in boolean active);
void notifyUserMobileDataStateChangedForPhoneId(in int phoneId, in int subId, in boolean state);
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index f804cb0..49fbd8f 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -25,6 +25,7 @@
*/
import android.os.SystemProperties;
+import android.telephony.TelephonyManager;
/**
* {@hide}
@@ -105,6 +106,8 @@
int DEVICE_IN_USE = 64; /* Operation cannot be performed because the device
is currently in use */
int ABORTED = 65; /* Operation aborted */
+ int INVALID_RESPONSE = 66; /* Invalid response sent by vendor code */
+
// Below is list of OEM specific error codes which can by used by OEMs in case they don't want to
// reveal particular replacement for Generic failure
int OEM_ERROR_1 = 501;
@@ -160,8 +163,8 @@
int NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA = 20; /* TD-SCDMA, GSM/WCDMA and LTE */
int NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 21; /*TD-SCDMA,EvDo,CDMA,GSM/WCDMA*/
int NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 22; /* TD-SCDMA/LTE/GSM/WCDMA, CDMA, and EvDo */
- int PREFERRED_NETWORK_MODE = SystemProperties.getInt("ro.telephony.default_network",
- NETWORK_MODE_WCDMA_PREF);
+ int PREFERRED_NETWORK_MODE = Integer.parseInt(TelephonyManager.getTelephonyProperty(0,
+ "ro.telephony.default_network", Integer.toString(NETWORK_MODE_WCDMA_PREF)));
int BAND_MODE_UNSPECIFIED = 0; //"unspecified" (selected by baseband automatically)
int BAND_MODE_EURO = 1; //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
@@ -218,11 +221,6 @@
String SETUP_DATA_PROTOCOL_IPV6 = "IPV6";
String SETUP_DATA_PROTOCOL_IPV4V6 = "IPV4V6";
- /* Deactivate data call reasons */
- int DEACTIVATE_REASON_NONE = 0;
- int DEACTIVATE_REASON_RADIO_OFF = 1;
- int DEACTIVATE_REASON_PDP_RESET = 2;
-
/* NV config radio reset types. */
int NV_CONFIG_RELOAD_RESET = 1;
int NV_CONFIG_ERASE_RESET = 2;
@@ -419,6 +417,10 @@
int RIL_REQUEST_STOP_NETWORK_SCAN = 143;
int RIL_REQUEST_GET_SLOT_STATUS = 144;
int RIL_REQUEST_SET_LOGICAL_TO_PHYSICAL_SLOT_MAPPING = 145;
+ int RIL_REQUEST_START_KEEPALIVE = 146;
+ int RIL_REQUEST_STOP_KEEPALIVE = 147;
+ int RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA = 148;
+ int RIL_REQUEST_SET_LINK_CAPACITY_REPORTING_CRITERIA = 149;
int RIL_RESPONSE_ACKNOWLEDGEMENT = 800;
@@ -474,4 +476,6 @@
int RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION = 1048;
int RIL_UNSOL_NETWORK_SCAN_RESULT = 1049;
int RIL_UNSOL_ICC_SLOT_STATUS = 1050;
+ int RIL_UNSOL_KEEPALIVE_STATUS = 1051;
+ int RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG = 1052;
}
diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
index f29d993c..51369d0 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
@@ -486,4 +486,10 @@
*/
public static final String ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE =
"com.android.omadm.service.CONFIGURATION_UPDATE";
+
+ /**
+ * Broadcast action to trigger the Carrier Certificate download.
+ */
+ public static final String ACTION_CARRIER_CERTIFICATE_DOWNLOAD =
+ "com.android.internal.telephony.ACTION_CARRIER_CERTIFICATE_DOWNLOAD";
}
diff --git a/telephony/java/com/android/internal/telephony/TelephonyPermissions.java b/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
new file mode 100644
index 0000000..bbe38b7
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
@@ -0,0 +1,291 @@
+/*
+ * 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.
+ */
+package com.android.internal.telephony;
+
+import static android.content.pm.PackageManager.PERMISSION_GRANTED;
+
+import android.Manifest;
+import android.app.AppOpsManager;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.os.Binder;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.telephony.Rlog;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.util.function.Supplier;
+
+/** Utility class for Telephony permission enforcement. */
+public final class TelephonyPermissions {
+ private static final String LOG_TAG = "TelephonyPermissions";
+
+ private static final boolean DBG = false;
+
+ private static final Supplier<ITelephony> TELEPHONY_SUPPLIER = () ->
+ ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
+
+ private TelephonyPermissions() {}
+
+ /**
+ * Check whether the caller (or self, if not processing an IPC) can read phone state.
+ *
+ * <p>This method behaves in one of the following ways:
+ * <ul>
+ * <li>return true: if the caller has the READ_PRIVILEGED_PHONE_STATE permission, the
+ * READ_PHONE_STATE runtime permission, or carrier privileges on the given subId.
+ * <li>throw SecurityException: if the caller didn't declare any of these permissions, or, for
+ * apps which support runtime permissions, if the caller does not currently have any of
+ * these permissions.
+ * <li>return false: if the caller lacks all of these permissions and doesn't support runtime
+ * permissions. This implies that the user revoked the ability to read phone state
+ * manually (via AppOps). In this case we can't throw as it would break app compatibility,
+ * so we return false to indicate that the calling function should return dummy data.
+ * </ul>
+ *
+ * <p>Note: for simplicity, this method always returns false for callers using legacy
+ * permissions and who have had READ_PHONE_STATE revoked, even if they are carrier-privileged.
+ * Such apps should migrate to runtime permissions or stop requiring READ_PHONE_STATE on P+
+ * devices.
+ *
+ * @param subId the subId of the relevant subscription; used to check carrier privileges. May be
+ * {@link SubscriptionManager#INVALID_SUBSCRIPTION_ID} to skip this check for cases
+ * where it isn't relevant (hidden APIs, or APIs which are otherwise okay to leave
+ * inaccesible to carrier-privileged apps).
+ */
+ public static boolean checkCallingOrSelfReadPhoneState(
+ Context context, int subId, String callingPackage, String message) {
+ return checkReadPhoneState(context, subId, Binder.getCallingPid(), Binder.getCallingUid(),
+ callingPackage, message);
+ }
+
+ /**
+ * Check whether the app with the given pid/uid can read phone state.
+ *
+ * <p>This method behaves in one of the following ways:
+ * <ul>
+ * <li>return true: if the caller has the READ_PRIVILEGED_PHONE_STATE permission, the
+ * READ_PHONE_STATE runtime permission, or carrier privileges on the given subId.
+ * <li>throw SecurityException: if the caller didn't declare any of these permissions, or, for
+ * apps which support runtime permissions, if the caller does not currently have any of
+ * these permissions.
+ * <li>return false: if the caller lacks all of these permissions and doesn't support runtime
+ * permissions. This implies that the user revoked the ability to read phone state
+ * manually (via AppOps). In this case we can't throw as it would break app compatibility,
+ * so we return false to indicate that the calling function should return dummy data.
+ * </ul>
+ *
+ * <p>Note: for simplicity, this method always returns false for callers using legacy
+ * permissions and who have had READ_PHONE_STATE revoked, even if they are carrier-privileged.
+ * Such apps should migrate to runtime permissions or stop requiring READ_PHONE_STATE on P+
+ * devices.
+ */
+ public static boolean checkReadPhoneState(
+ Context context, int subId, int pid, int uid, String callingPackage, String message) {
+ return checkReadPhoneState(
+ context, TELEPHONY_SUPPLIER, subId, pid, uid, callingPackage, message);
+ }
+
+ @VisibleForTesting
+ public static boolean checkReadPhoneState(
+ Context context, Supplier<ITelephony> telephonySupplier, int subId, int pid, int uid,
+ String callingPackage, String message) {
+ try {
+ context.enforcePermission(
+ android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, pid, uid, message);
+
+ // SKIP checking for run-time permission since caller has PRIVILEGED permission
+ return true;
+ } catch (SecurityException privilegedPhoneStateException) {
+ try {
+ context.enforcePermission(
+ android.Manifest.permission.READ_PHONE_STATE, pid, uid, message);
+ } catch (SecurityException phoneStateException) {
+ // If we don't have the runtime permission, but do have carrier privileges, that
+ // suffices for reading phone state.
+ if (SubscriptionManager.isValidSubscriptionId(subId)) {
+ enforceCarrierPrivilege(telephonySupplier, subId, uid, message);
+ return true;
+ }
+ throw phoneStateException;
+ }
+ }
+
+ // We have READ_PHONE_STATE permission, so return true as long as the AppOps bit hasn't been
+ // revoked.
+ AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
+ return appOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, uid, callingPackage) ==
+ AppOpsManager.MODE_ALLOWED;
+ }
+
+ /**
+ * Check whether the app with the given pid/uid can read the call log.
+ * @return {@code true} if the specified app has the read call log permission and AppOpp granted
+ * to it, {@code false} otherwise.
+ */
+ public static boolean checkReadCallLog(
+ Context context, int subId, int pid, int uid, String callingPackage) {
+ return checkReadCallLog(
+ context, TELEPHONY_SUPPLIER, subId, pid, uid, callingPackage);
+ }
+
+ @VisibleForTesting
+ public static boolean checkReadCallLog(
+ Context context, Supplier<ITelephony> telephonySupplier, int subId, int pid, int uid,
+ String callingPackage) {
+
+ if (context.checkPermission(Manifest.permission.READ_CALL_LOG, pid, uid)
+ != PERMISSION_GRANTED) {
+ // If we don't have the runtime permission, but do have carrier privileges, that
+ // suffices for being able to see the call phone numbers.
+ if (SubscriptionManager.isValidSubscriptionId(subId)) {
+ enforceCarrierPrivilege(telephonySupplier, subId, uid, "readCallLog");
+ return true;
+ }
+ return false;
+ }
+
+ // We have READ_CALL_LOG permission, so return true as long as the AppOps bit hasn't been
+ // revoked.
+ AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
+ return appOps.noteOp(AppOpsManager.OP_READ_CALL_LOG, uid, callingPackage) ==
+ AppOpsManager.MODE_ALLOWED;
+ }
+
+ /**
+ * Returns whether the caller can read phone numbers.
+ *
+ * <p>Besides apps with the ability to read phone state per {@link #checkReadPhoneState}, the
+ * default SMS app and apps with READ_SMS or READ_PHONE_NUMBERS can also read phone numbers.
+ */
+ public static boolean checkCallingOrSelfReadPhoneNumber(
+ Context context, int subId, String callingPackage, String message) {
+ return checkReadPhoneNumber(
+ context, TELEPHONY_SUPPLIER, subId, Binder.getCallingPid(), Binder.getCallingUid(),
+ callingPackage, message);
+ }
+
+ @VisibleForTesting
+ public static boolean checkReadPhoneNumber(
+ Context context, Supplier<ITelephony> telephonySupplier, int subId, int pid, int uid,
+ String callingPackage, String message) {
+ // Default SMS app can always read it.
+ AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
+ if (appOps.noteOp(AppOpsManager.OP_WRITE_SMS, uid, callingPackage) ==
+ AppOpsManager.MODE_ALLOWED) {
+ return true;
+ }
+
+ // NOTE(b/73308711): If an app has one of the following AppOps bits explicitly revoked, they
+ // will be denied access, even if they have another permission and AppOps bit if needed.
+
+ // First, check if we can read the phone state.
+ try {
+ return checkReadPhoneState(
+ context, telephonySupplier, subId, pid, uid, callingPackage, message);
+ } catch (SecurityException readPhoneStateSecurityException) {
+ }
+ // Can be read with READ_SMS too.
+ try {
+ context.enforcePermission(android.Manifest.permission.READ_SMS, pid, uid, message);
+ int opCode = AppOpsManager.permissionToOpCode(android.Manifest.permission.READ_SMS);
+ if (opCode != AppOpsManager.OP_NONE) {
+ return appOps.noteOp(opCode, uid, callingPackage) == AppOpsManager.MODE_ALLOWED;
+ } else {
+ return true;
+ }
+ } catch (SecurityException readSmsSecurityException) {
+ }
+ // Can be read with READ_PHONE_NUMBERS too.
+ try {
+ context.enforcePermission(android.Manifest.permission.READ_PHONE_NUMBERS, pid, uid,
+ message);
+ int opCode = AppOpsManager.permissionToOpCode(
+ android.Manifest.permission.READ_PHONE_NUMBERS);
+ if (opCode != AppOpsManager.OP_NONE) {
+ return appOps.noteOp(opCode, uid, callingPackage) == AppOpsManager.MODE_ALLOWED;
+ } else {
+ return true;
+ }
+ } catch (SecurityException readPhoneNumberSecurityException) {
+ }
+
+ throw new SecurityException(message + ": Neither user " + uid +
+ " nor current process has " + android.Manifest.permission.READ_PHONE_STATE +
+ ", " + android.Manifest.permission.READ_SMS + ", or " +
+ android.Manifest.permission.READ_PHONE_NUMBERS);
+ }
+
+ /**
+ * Ensure the caller (or self, if not processing an IPC) has MODIFY_PHONE_STATE (and is thus a
+ * privileged app) or carrier privileges.
+ *
+ * @throws SecurityException if the caller does not have the required permission/privileges
+ */
+ public static void enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(
+ Context context, int subId, String message) {
+ if (context.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE) ==
+ PERMISSION_GRANTED) {
+ return;
+ }
+
+ if (DBG) Rlog.d(LOG_TAG, "No modify permission, check carrier privilege next.");
+ enforceCallingOrSelfCarrierPrivilege(subId, message);
+ }
+
+ /**
+ * Make sure the caller (or self, if not processing an IPC) has carrier privileges.
+ *
+ * @throws SecurityException if the caller does not have the required privileges
+ */
+ public static void enforceCallingOrSelfCarrierPrivilege(int subId, String message) {
+ // NOTE: It's critical that we explicitly pass the calling UID here rather than call
+ // TelephonyManager#hasCarrierPrivileges directly, as the latter only works when called from
+ // the phone process. When called from another process, it will check whether that process
+ // has carrier privileges instead.
+ enforceCarrierPrivilege(subId, Binder.getCallingUid(), message);
+ }
+
+ private static void enforceCarrierPrivilege(int subId, int uid, String message) {
+ enforceCarrierPrivilege(TELEPHONY_SUPPLIER, subId, uid, message);
+ }
+
+ private static void enforceCarrierPrivilege(
+ Supplier<ITelephony> telephonySupplier, int subId, int uid, String message) {
+ if (getCarrierPrivilegeStatus(telephonySupplier, subId, uid) !=
+ TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) {
+ if (DBG) Rlog.e(LOG_TAG, "No Carrier Privilege.");
+ throw new SecurityException(message);
+ }
+ }
+
+ private static int getCarrierPrivilegeStatus(
+ Supplier<ITelephony> telephonySupplier, int subId, int uid) {
+ ITelephony telephony = telephonySupplier.get();
+ try {
+ if (telephony != null) {
+ return telephony.getCarrierPrivilegeStatusForUid(subId, uid);
+ }
+ } catch (RemoteException e) {
+ // Fallback below.
+ }
+ Rlog.e(LOG_TAG, "Phone process is down, cannot check carrier privileges");
+ return TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS;
+ }
+}
diff --git a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java
index 7a53ef6..964a313 100644
--- a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java
+++ b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java
@@ -99,6 +99,15 @@
private static final int RETURN_NO_ACK = 0;
private static final int RETURN_ACK = 1;
+ /**
+ * Supported priority modes for CDMA SMS messages
+ * (See 3GPP2 C.S0015-B, v2.0, table 4.5.9-1)
+ */
+ private static final int PRIORITY_NORMAL = 0x0;
+ private static final int PRIORITY_INTERACTIVE = 0x1;
+ private static final int PRIORITY_URGENT = 0x2;
+ private static final int PRIORITY_EMERGENCY = 0x3;
+
private SmsEnvelope mEnvelope;
private BearerData mBearerData;
@@ -211,6 +220,26 @@
*/
public static SubmitPdu getSubmitPdu(String scAddr, String destAddr, String message,
boolean statusReportRequested, SmsHeader smsHeader) {
+ return getSubmitPdu(scAddr, destAddr, message, statusReportRequested, smsHeader, -1);
+ }
+
+ /**
+ * Get an SMS-SUBMIT PDU for a destination address and a message
+ *
+ * @param scAddr Service Centre address. Null means use default.
+ * @param destAddr Address of the recipient.
+ * @param message String representation of the message payload.
+ * @param statusReportRequested Indicates whether a report is requested for this message.
+ * @param smsHeader Array containing the data for the User Data Header, preceded
+ * by the Element Identifiers.
+ * @param priority Priority level of the message
+ * @return a <code>SubmitPdu</code> containing the encoded SC
+ * address, if applicable, and the encoded message.
+ * Returns null on encode error.
+ * @hide
+ */
+ public static SubmitPdu getSubmitPdu(String scAddr, String destAddr, String message,
+ boolean statusReportRequested, SmsHeader smsHeader, int priority) {
/**
* TODO(cleanup): Do we really want silent failure like this?
@@ -224,7 +253,7 @@
UserData uData = new UserData();
uData.payloadStr = message;
uData.userDataHeader = smsHeader;
- return privateGetSubmitPdu(destAddr, statusReportRequested, uData);
+ return privateGetSubmitPdu(destAddr, statusReportRequested, uData, priority);
}
/**
@@ -282,6 +311,22 @@
}
/**
+ * Get an SMS-SUBMIT PDU for a data message to a destination address & port
+ *
+ * @param destAddr the address of the destination for the message
+ * @param userData the data for the message
+ * @param statusReportRequested Indicates whether a report is requested for this message.
+ * @param priority Priority level of the message
+ * @return a <code>SubmitPdu</code> containing the encoded SC
+ * address, if applicable, and the encoded message.
+ * Returns null on encode error.
+ */
+ public static SubmitPdu getSubmitPdu(String destAddr, UserData userData,
+ boolean statusReportRequested, int priority) {
+ return privateGetSubmitPdu(destAddr, statusReportRequested, userData, priority);
+ }
+
+ /**
* Note: This function is a GSM specific functionality which is not supported in CDMA mode.
*/
@Override
@@ -425,6 +470,9 @@
int bearerDataLength;
SmsEnvelope env = new SmsEnvelope();
CdmaSmsAddress addr = new CdmaSmsAddress();
+ // We currently do not parse subaddress in PDU, but it is required when determining
+ // fingerprint (see getIncomingSmsFingerprint()).
+ CdmaSmsSubaddress subaddr = new CdmaSmsSubaddress();
try {
env.messageType = dis.readInt();
@@ -475,6 +523,7 @@
// link the filled objects to this SMS
mOriginatingAddress = addr;
env.origAddress = addr;
+ env.origSubaddress = subaddr;
mEnvelope = env;
mPdu = pdu;
@@ -764,6 +813,15 @@
*/
private static SubmitPdu privateGetSubmitPdu(String destAddrStr, boolean statusReportRequested,
UserData userData) {
+ return privateGetSubmitPdu(destAddrStr, statusReportRequested, userData, -1);
+ }
+
+ /**
+ * Creates BearerData and Envelope from parameters for a Submit SMS.
+ * @return byte stream for SubmitPdu.
+ */
+ private static SubmitPdu privateGetSubmitPdu(String destAddrStr, boolean statusReportRequested,
+ UserData userData, int priority) {
/**
* TODO(cleanup): give this function a more meaningful name.
@@ -792,6 +850,10 @@
bearerData.userAckReq = false;
bearerData.readAckReq = false;
bearerData.reportReq = false;
+ if (priority >= PRIORITY_NORMAL && priority <= PRIORITY_EMERGENCY) {
+ bearerData.priorityIndicatorSet = true;
+ bearerData.priority = priority;
+ }
bearerData.userData = userData;
@@ -951,8 +1013,11 @@
output.write(mEnvelope.teleService);
output.write(mEnvelope.origAddress.origBytes, 0, mEnvelope.origAddress.origBytes.length);
output.write(mEnvelope.bearerData, 0, mEnvelope.bearerData.length);
- output.write(mEnvelope.origSubaddress.origBytes, 0,
- mEnvelope.origSubaddress.origBytes.length);
+ // subaddress is not set when parsing some MT SMS.
+ if (mEnvelope.origSubaddress != null && mEnvelope.origSubaddress.origBytes != null) {
+ output.write(mEnvelope.origSubaddress.origBytes, 0,
+ mEnvelope.origSubaddress.origBytes.length);
+ }
return output.toByteArray();
}
diff --git a/telephony/java/com/android/internal/telephony/euicc/IEuiccCardController.aidl b/telephony/java/com/android/internal/telephony/euicc/IEuiccCardController.aidl
index abc55c7..e33f44c 100644
--- a/telephony/java/com/android/internal/telephony/euicc/IEuiccCardController.aidl
+++ b/telephony/java/com/android/internal/telephony/euicc/IEuiccCardController.aidl
@@ -41,42 +41,49 @@
/** @hide */
interface IEuiccCardController {
- oneway void getAllProfiles(String callingPackage, in IGetAllProfilesCallback callback);
- oneway void getProfile(String callingPackage, String iccid, in IGetProfileCallback callback);
- oneway void disableProfile(String callingPackage, String iccid, boolean refresh,
+ oneway void getAllProfiles(String callingPackage, String cardId,
+ in IGetAllProfilesCallback callback);
+ oneway void getProfile(String callingPackage, String cardId, String iccid,
+ in IGetProfileCallback callback);
+ oneway void disableProfile(String callingPackage, String cardId, String iccid, boolean refresh,
in IDisableProfileCallback callback);
- oneway void switchToProfile(String callingPackage, String iccid, boolean refresh,
+ oneway void switchToProfile(String callingPackage, String cardId, String iccid, boolean refresh,
in ISwitchToProfileCallback callback);
- String getEid();
- oneway void setNickname(String callingPackage, String iccid, String nickname,
+ oneway void setNickname(String callingPackage, String cardId, String iccid, String nickname,
in ISetNicknameCallback callback);
- oneway void deleteProfile(String callingPackage, String iccid,
+ oneway void deleteProfile(String callingPackage, String cardId, String iccid,
in IDeleteProfileCallback callback);
- oneway void resetMemory(String callingPackage, int options, in IResetMemoryCallback callback);
- oneway void getDefaultSmdpAddress(String callingPackage,
+ oneway void resetMemory(String callingPackage, String cardId, int options, in IResetMemoryCallback callback);
+ oneway void getDefaultSmdpAddress(String callingPackage, String cardId,
in IGetDefaultSmdpAddressCallback callback);
- oneway void getSmdsAddress(String callingPackage, in IGetSmdsAddressCallback callback);
- oneway void setDefaultSmdpAddress(String callingPackage, String address,
+ oneway void getSmdsAddress(String callingPackage, String cardId,
+ in IGetSmdsAddressCallback callback);
+ oneway void setDefaultSmdpAddress(String callingPackage, String cardId, String address,
in ISetDefaultSmdpAddressCallback callback);
- oneway void getRulesAuthTable(String callingPackage, in IGetRulesAuthTableCallback callback);
- oneway void getEuiccChallenge(String callingPackage, in IGetEuiccChallengeCallback callback);
- oneway void getEuiccInfo1(String callingPackage, in IGetEuiccInfo1Callback callback);
- oneway void getEuiccInfo2(String callingPackage, in IGetEuiccInfo2Callback callback);
- oneway void authenticateServer(String callingPackage, String matchingId,
+ oneway void getRulesAuthTable(String callingPackage, String cardId,
+ in IGetRulesAuthTableCallback callback);
+ oneway void getEuiccChallenge(String callingPackage, String cardId,
+ in IGetEuiccChallengeCallback callback);
+ oneway void getEuiccInfo1(String callingPackage, String cardId,
+ in IGetEuiccInfo1Callback callback);
+ oneway void getEuiccInfo2(String callingPackage, String cardId,
+ in IGetEuiccInfo2Callback callback);
+ oneway void authenticateServer(String callingPackage, String cardId, String matchingId,
in byte[] serverSigned1, in byte[] serverSignature1, in byte[] euiccCiPkIdToBeUsed,
in byte[] serverCertificatein, in IAuthenticateServerCallback callback);
- oneway void prepareDownload(String callingPackage, in byte[] hashCc, in byte[] smdpSigned2,
- in byte[] smdpSignature2, in byte[] smdpCertificate, in IPrepareDownloadCallback callback);
- oneway void loadBoundProfilePackage(String callingPackage, in byte[] boundProfilePackage,
- in ILoadBoundProfilePackageCallback callback);
- oneway void cancelSession(String callingPackage, in byte[] transactionId, int reason,
- in ICancelSessionCallback callback);
- oneway void listNotifications(String callingPackage, int events,
+ oneway void prepareDownload(String callingPackage, String cardId, in byte[] hashCc,
+ in byte[] smdpSigned2, in byte[] smdpSignature2, in byte[] smdpCertificate,
+ in IPrepareDownloadCallback callback);
+ oneway void loadBoundProfilePackage(String callingPackage, String cardId,
+ in byte[] boundProfilePackage, in ILoadBoundProfilePackageCallback callback);
+ oneway void cancelSession(String callingPackage, String cardId, in byte[] transactionId,
+ int reason, in ICancelSessionCallback callback);
+ oneway void listNotifications(String callingPackage, String cardId, int events,
in IListNotificationsCallback callback);
- oneway void retrieveNotificationList(String callingPackage, int events,
+ oneway void retrieveNotificationList(String callingPackage, String cardId, int events,
in IRetrieveNotificationListCallback callback);
- oneway void retrieveNotification(String callingPackage, int seqNumber,
+ oneway void retrieveNotification(String callingPackage, String cardId, int seqNumber,
in IRetrieveNotificationCallback callback);
- oneway void removeNotificationFromList(String callingPackage, int seqNumber,
+ oneway void removeNotificationFromList(String callingPackage, String cardId, int seqNumber,
in IRemoveNotificationFromListCallback callback);
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
index 1ca19e0..4f5bfa9 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
@@ -89,6 +89,18 @@
private int mVoiceMailCount = 0;
+ private static final int VALIDITY_PERIOD_FORMAT_NONE = 0x00;
+ private static final int VALIDITY_PERIOD_FORMAT_ENHANCED = 0x01;
+ private static final int VALIDITY_PERIOD_FORMAT_RELATIVE = 0x02;
+ private static final int VALIDITY_PERIOD_FORMAT_ABSOLUTE = 0x03;
+
+ //Validity Period min - 5 mins
+ private static final int VALIDITY_PERIOD_MIN = 5;
+ //Validity Period max - 63 weeks
+ private static final int VALIDITY_PERIOD_MAX = 635040;
+
+ private static final int INVALID_VALIDITY_PERIOD = -1;
+
public static class SubmitPdu extends SubmitPduBase {
}
@@ -202,6 +214,45 @@
}
/**
+ * Get Encoded Relative Validty Period Value from Validity period in mins.
+ *
+ * @param validityPeriod Validity period in mins.
+ *
+ * Refer specification 3GPP TS 23.040 V6.8.1 section 9.2.3.12.1.
+ * ||relValidityPeriod (TP-VP) || || validityPeriod ||
+ *
+ * 0 to 143 ---> (TP-VP + 1) x 5 minutes
+ *
+ * 144 to 167 ---> 12 hours + ((TP-VP -143) x 30 minutes)
+ *
+ * 168 to 196 ---> (TP-VP - 166) x 1 day
+ *
+ * 197 to 255 ---> (TP-VP - 192) x 1 week
+ *
+ * @return relValidityPeriod Encoded Relative Validity Period Value.
+ * @hide
+ */
+ public static int getRelativeValidityPeriod(int validityPeriod) {
+ int relValidityPeriod = INVALID_VALIDITY_PERIOD;
+
+ if (validityPeriod < VALIDITY_PERIOD_MIN || validityPeriod > VALIDITY_PERIOD_MAX) {
+ Rlog.e(LOG_TAG,"Invalid Validity Period" + validityPeriod);
+ return relValidityPeriod;
+ }
+
+ if (validityPeriod <= 720) {
+ relValidityPeriod = (validityPeriod / 5) - 1;
+ } else if (validityPeriod <= 1440) {
+ relValidityPeriod = ((validityPeriod - 720) / 30) + 143;
+ } else if (validityPeriod <= 43200) {
+ relValidityPeriod = (validityPeriod / 1440) + 166;
+ } else if (validityPeriod <= 635040) {
+ relValidityPeriod = (validityPeriod / 10080) + 192;
+ }
+ return relValidityPeriod;
+ }
+
+ /**
* Get an SMS-SUBMIT PDU for a destination address and a message
*
* @param scAddress Service Centre address. Null means use default.
@@ -236,6 +287,29 @@
String destinationAddress, String message,
boolean statusReportRequested, byte[] header, int encoding,
int languageTable, int languageShiftTable) {
+ return getSubmitPdu(scAddress, destinationAddress, message, statusReportRequested,
+ header, encoding, languageTable, languageShiftTable, -1);
+ }
+
+ /**
+ * Get an SMS-SUBMIT PDU for a destination address and a message using the
+ * specified encoding.
+ *
+ * @param scAddress Service Centre address. Null means use default.
+ * @param encoding Encoding defined by constants in
+ * com.android.internal.telephony.SmsConstants.ENCODING_*
+ * @param languageTable
+ * @param languageShiftTable
+ * @param validityPeriod Validity Period of the message in Minutes.
+ * @return a <code>SubmitPdu</code> containing the encoded SC
+ * address, if applicable, and the encoded message.
+ * Returns null on encode error.
+ * @hide
+ */
+ public static SubmitPdu getSubmitPdu(String scAddress,
+ String destinationAddress, String message,
+ boolean statusReportRequested, byte[] header, int encoding,
+ int languageTable, int languageShiftTable, int validityPeriod) {
// Perform null parameter checks.
if (message == null || destinationAddress == null) {
@@ -272,8 +346,19 @@
}
SubmitPdu ret = new SubmitPdu();
- // MTI = SMS-SUBMIT, UDHI = header != null
- byte mtiByte = (byte)(0x01 | (header != null ? 0x40 : 0x00));
+
+ int validityPeriodFormat = VALIDITY_PERIOD_FORMAT_NONE;
+ int relativeValidityPeriod = INVALID_VALIDITY_PERIOD;
+
+ // TP-Validity-Period-Format (TP-VPF) in 3GPP TS 23.040 V6.8.1 section 9.2.3.3
+ //bit 4:3 = 10 - TP-VP field present - relative format
+ if((relativeValidityPeriod = getRelativeValidityPeriod(validityPeriod)) >= 0) {
+ validityPeriodFormat = VALIDITY_PERIOD_FORMAT_RELATIVE;
+ }
+
+ byte mtiByte = (byte)(0x01 | (validityPeriodFormat << 0x03) |
+ (header != null ? 0x40 : 0x00));
+
ByteArrayOutputStream bo = getSubmitPduHead(
scAddress, destinationAddress, mtiByte,
statusReportRequested, ret);
@@ -338,7 +423,11 @@
bo.write(0x08);
}
- // (no TP-Validity-Period)
+ if (validityPeriodFormat == VALIDITY_PERIOD_FORMAT_RELATIVE) {
+ // ( TP-Validity-Period - relative format)
+ bo.write(relativeValidityPeriod);
+ }
+
bo.write(userData, 0, userData.length);
ret.encodedMessage = bo.toByteArray();
return ret;
@@ -388,6 +477,24 @@
}
/**
+ * Get an SMS-SUBMIT PDU for a destination address and a message
+ *
+ * @param scAddress Service Centre address. Null means use default.
+ * @param destinationAddress the address of the destination for the message
+ * @param statusReportRequested staus report of the message Requested
+ * @param validityPeriod Validity Period of the message in Minutes.
+ * @return a <code>SubmitPdu</code> containing the encoded SC
+ * address, if applicable, and the encoded message.
+ * Returns null on encode error.
+ */
+ public static SubmitPdu getSubmitPdu(String scAddress,
+ String destinationAddress, String message,
+ boolean statusReportRequested, int validityPeriod) {
+ return getSubmitPdu(scAddress, destinationAddress, message, statusReportRequested,
+ null, ENCODING_UNKNOWN, 0, 0, validityPeriod);
+ }
+
+ /**
* Get an SMS-SUBMIT PDU for a data message to a destination address & port
*
* @param scAddress Service Centre address. null == use default
diff --git a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
index 9f8b3a8..4790b75 100644
--- a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
+++ b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
@@ -105,7 +105,7 @@
/**
* PLMN (MCC/MNC) is encoded as per 24.008 10.5.1.3
* Returns a concatenated string of MCC+MNC, stripping
- * all invalid character 'f'
+ * all invalid character 'F'
*/
public static String bcdPlmnToString(byte[] data, int offset) {
if (offset + 3 > data.length) {
@@ -117,9 +117,9 @@
trans[2] = (byte) ((data[2 + offset] & 0xF0) | ((data[1 + offset] >> 4) & 0xF));
String ret = bytesToHexString(trans);
- // For a valid plmn we trim all character 'f'
- if (ret.contains("f")) {
- ret = ret.replaceAll("f", "");
+ // For a valid plmn we trim all character 'F'
+ if (ret.contains("F")) {
+ ret = ret.replaceAll("F", "");
}
return ret;
}
@@ -837,6 +837,13 @@
}
/**
+ * Strip all the trailing 'F' characters of a string, e.g., an ICCID.
+ */
+ public static String stripTrailingFs(String s) {
+ return s == null ? null : s.replaceAll("(?i)f*$", "");
+ }
+
+ /**
* Converts a character of [0-9a-aA-F] to its hex value in a byte. If the character is not a
* hex number, 0 will be returned.
*/
diff --git a/test-base/Android.bp b/test-base/Android.bp
index a42dc5a..a0e3985 100644
--- a/test-base/Android.bp
+++ b/test-base/Android.bp
@@ -24,12 +24,15 @@
srcs: ["src/**/*.java"],
- no_framework_libs: true,
- hostdex: true,
- libs: [
- "framework",
- ],
+ errorprone: {
+ javacflags: ["-Xep:DepAnn:ERROR"],
+ },
+ // Needs to be consistent with the repackaged version of this make target.
+ java_version: "1.8",
+
+ sdk_version: "current",
+ hostdex: true,
}
// Build the legacy-test library
@@ -39,12 +42,9 @@
// Also contains the com.android.internal.util.Predicate[s] classes.
java_library {
name: "legacy-test",
- static_libs: ["android.test.base"],
- no_framework_libs: true,
- libs: [
- "framework",
- ],
+ sdk_version: "current",
+ static_libs: ["android.test.base"],
}
// Build the repackaged.android.test.base library
@@ -54,37 +54,65 @@
java_library_static {
name: "repackaged.android.test.base",
+ sdk_version: "current",
static_libs: ["android.test.base"],
- no_framework_libs: true,
- libs: [
- "framework",
- ],
-
jarjar_rules: "jarjar-rules.txt",
+ // Pin java_version until jarjar is certified to support later versions. http://b/72703434
+ java_version: "1.8",
}
-// Build the legacy-android-test library
-// =====================================
-// This contains the android.test classes that were in Android API level 25,
-// including those from android.test.runner.
-// Also contains the com.android.internal.util.Predicate[s] classes.
+// Build the android.test.base-minus-junit library
+// ===============================================
+// This contains the android.test classes from android.test.base plus
+// the com.android.internal.util.Predicate[s] classes. This is only
+// intended for inclusion in the android.test.legacy and
+// legacy-android-test static libraries and must not be used elsewhere.
java_library_static {
- name: "legacy-android-test",
+ name: "android.test.base-minus-junit",
srcs: [
"src/android/**/*.java",
"src/com/**/*.java",
],
- static_libs: [
- "android.test.runner-minus-junit",
- "android.test.mock",
- ],
-
- no_framework_libs: true,
+ sdk_version: "current",
libs: [
- "framework",
"junit",
],
}
+
+droiddoc {
+ name: "android-test-base-api-stubs-gen-docs",
+ srcs: [
+ "src/**/*.java",
+ ],
+ custom_template: "droiddoc-templates-sdk",
+ installable: false,
+ args: "-stubpackages android.test:" +
+ "android.test.suitebuilder.annotation:" +
+ "com.android.internal.util:" +
+ "junit.framework -stubsourceonly -nodocs",
+ sdk_version: "current",
+ api_tag_name: "ANDROID_TEST_BASE",
+ api_filename: "android-test-base-api.txt",
+ removed_api_filename: "android-test-base-removed.txt",
+}
+
+// Build the android.test.base.stubs library
+// =========================================
+java_library_static {
+ name: "android.test.base.stubs",
+ srcs: [
+ ":android-test-base-api-stubs-gen-docs",
+ ],
+ product_variables: {
+ pdk: {
+ enabled: false,
+ },
+ unbundled_build: {
+ enabled: false,
+ },
+ },
+ sdk_version: "current",
+}
diff --git a/test-base/Android.mk b/test-base/Android.mk
index 25c3d76..baf5726 100644
--- a/test-base/Android.mk
+++ b/test-base/Android.mk
@@ -16,62 +16,13 @@
LOCAL_PATH:= $(call my-dir)
-# Generate the stub source files for legacy.test.stubs
-# ====================================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src)
-
-LOCAL_JAVA_LIBRARIES := \
- core-oj \
- core-libart \
- framework \
-
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src
-
-ANDROID_TEST_BASE_OUTPUT_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.base.stubs_intermediates/api.txt
-ANDROID_TEST_BASE_OUTPUT_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.base.stubs_intermediates/removed.txt
+# For unbundled build we'll use the prebuilt jar from prebuilts/sdk.
+ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
ANDROID_TEST_BASE_API_FILE := $(LOCAL_PATH)/api/android-test-base-current.txt
ANDROID_TEST_BASE_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-base-removed.txt
-LOCAL_DROIDDOC_OPTIONS:= \
- -stubpackages android.test:android.test.suitebuilder.annotation:com.android.internal.util:junit.framework \
- -stubsourceonly \
- -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.base.stubs_intermediates/src \
- -nodocs \
- -api $(ANDROID_TEST_BASE_OUTPUT_API_FILE) \
- -removedApi $(ANDROID_TEST_BASE_OUTPUT_REMOVED_API_FILE) \
-
-LOCAL_UNINSTALLABLE_MODULE := true
-LOCAL_MODULE := android-test-base-api-stubs-gen
-
-include $(BUILD_DROIDDOC)
-
-# Remember the target that will trigger the code generation.
-android_test_base_gen_stamp := $(full_target)
-
-# Add some additional dependencies
-$(ANDROID_TEST_BASE_OUTPUT_API_FILE): $(full_target)
-$(ANDROID_TEST_BASE_OUTPUT_REMOVED_API_FILE): $(full_target)
-
-# Build the android.test.base.stubs library
-# =========================================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.test.base.stubs
-
-LOCAL_SOURCE_FILES_ALL_GENERATED := true
-LOCAL_SDK_VERSION := current
-
-# Make sure to run droiddoc first to generate the stub source files.
-LOCAL_ADDITIONAL_DEPENDENCIES := $(android_test_base_gen_stamp)
-android_test_base_gen_stamp :=
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
+full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.base.stubs,,COMMON)/classes.jar
# Archive a copy of the classes.jar in SDK build.
$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.base.stubs.jar)
@@ -83,16 +34,16 @@
$(eval $(call check-api, \
check-android-test-base-api-current, \
$(ANDROID_TEST_BASE_API_FILE), \
- $(ANDROID_TEST_BASE_OUTPUT_API_FILE), \
+ $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE), \
$(ANDROID_TEST_BASE_REMOVED_API_FILE), \
- $(ANDROID_TEST_BASE_OUTPUT_REMOVED_API_FILE), \
+ $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_REMOVED_API_FILE), \
-error 2 -error 3 -error 4 -error 5 -error 6 \
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
-error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
-error 25 -error 26 -error 27, \
cat $(LOCAL_PATH)/api/apicheck_msg_android_test_base.txt, \
check-android-test-base-api, \
- $(call doc-timestamp-for,android-test-base-api-stubs-gen) \
+ $(OUT_DOCS)/android-test-base-api-stubs-gen-docs-stubs.srcjar \
))
.PHONY: check-android-test-base-api
@@ -101,11 +52,13 @@
.PHONY: update-android-test-base-api
update-api: update-android-test-base-api
-update-android-test-base-api: $(ANDROID_TEST_BASE_OUTPUT_API_FILE) | $(ACP)
+update-android-test-base-api: $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE) | $(ACP)
@echo Copying current.txt
- $(hide) $(ACP) $(ANDROID_TEST_BASE_OUTPUT_API_FILE) $(ANDROID_TEST_BASE_API_FILE)
+ $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE) $(ANDROID_TEST_BASE_API_FILE)
@echo Copying removed.txt
- $(hide) $(ACP) $(ANDROID_TEST_BASE_OUTPUT_REMOVED_API_FILE) $(ANDROID_TEST_BASE_REMOVED_API_FILE)
+ $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_REMOVED_API_FILE) $(ANDROID_TEST_BASE_REMOVED_API_FILE)
+
+endif # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true
ifeq ($(HOST_OS),linux)
# Build the legacy-performance-test-hostdex library
diff --git a/test-base/src/android/test/PerformanceTestCase.java b/test-base/src/android/test/PerformanceTestCase.java
index 65bd4a4..2584da2 100644
--- a/test-base/src/android/test/PerformanceTestCase.java
+++ b/test-base/src/android/test/PerformanceTestCase.java
@@ -21,6 +21,11 @@
*
* If you want your test to be used as a performance test, you must
* implement this interface.
+ *
+ * @deprecated Use
+ * <a href="{@docRoot}reference/android/support/test/runner/AndroidJUnitRunner.html">
+ * AndroidJUnitRunner</a> instead. New tests should be written using the
+ * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
*/
@Deprecated
public interface PerformanceTestCase
diff --git a/test-legacy/Android.bp b/test-legacy/Android.bp
new file mode 100644
index 0000000..d2af8a9
--- /dev/null
+++ b/test-legacy/Android.bp
@@ -0,0 +1,36 @@
+//
+// 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.
+//
+
+// Build the legacy-android-test library
+// =====================================
+// This contains the android.test classes that were in Android API level 25,
+// including those from android.test.runner.
+// Also contains the com.android.internal.util.Predicate[s] classes.
+java_library_static {
+ name: "legacy-android-test",
+
+ static_libs: [
+ "android.test.base-minus-junit",
+ "android.test.runner-minus-junit",
+ "android.test.mock",
+ ],
+
+ no_framework_libs: true,
+ libs: [
+ "framework",
+ "junit",
+ ],
+}
diff --git a/test-legacy/Android.mk b/test-legacy/Android.mk
new file mode 100644
index 0000000..da47de0
--- /dev/null
+++ b/test-legacy/Android.mk
@@ -0,0 +1,62 @@
+#
+# 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)
+
+# For unbundled build we'll use the prebuilt jar from prebuilts/sdk.
+ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
+
+# Build the android.test.legacy library
+# =====================================
+# Built against the SDK so that it can be statically included in APKs
+# without breaking link type checks.
+#
+# This builds directly from the source rather than simply statically
+# including the android.test.base-minus-junit and
+# android.test.runner-minus-junit libraries because the latter library
+# cannot itself be built against the SDK. That is because it uses on
+# an internal method (setTestContext) on the AndroidTestCase class.
+# That class is provided by both the android.test.base-minus-junit and
+# the current SDK and as the latter is first on the classpath its
+# version is used. Unfortunately, it does not provide the internal
+# method and so compilation fails.
+#
+# Building from source avoids that because the compiler will use the
+# source version of AndroidTestCase instead of the one from the current
+# SDK.
+#
+# The use of the internal method does not prevent this from being
+# statically included because the class that provides the method is
+# also included in this library.
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := android.test.legacy
+
+LOCAL_SRC_FILES := \
+ $(call all-java-files-under, ../test-base/src/android) \
+ $(call all-java-files-under, ../test-base/src/com) \
+ $(call all-java-files-under, ../test-runner/src/android) \
+
+LOCAL_SDK_VERSION := current
+
+LOCAL_JAVA_LIBRARIES := junit android.test.mock.stubs
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+# Archive a copy of the classes.jar in SDK build.
+$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.legacy.jar)
+
+endif # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true
diff --git a/test-mock/Android.bp b/test-mock/Android.bp
index b1ae40e..8fb6fda 100644
--- a/test-mock/Android.bp
+++ b/test-mock/Android.bp
@@ -19,6 +19,8 @@
java_library {
name: "android.test.mock",
+ // Needs to be consistent with the repackaged version of this make target.
+ java_version: "1.8",
srcs: ["src/**/*.java"],
no_framework_libs: true,
@@ -35,4 +37,52 @@
static_libs: ["android.test.mock"],
jarjar_rules: "jarjar-rules.txt",
+ // Pin java_version until jarjar is certified to support later versions. http://b/72703434
+ java_version: "1.8",
+}
+
+doc_defaults {
+ name:"android.test.mock.docs-defaults",
+ srcs: ["src/android/test/mock/**/*.java"],
+
+ // Includes the main framework source to ensure that doclava has access to the
+ // visibility information for the base classes of the mock classes. Without it
+ // otherwise hidden methods could be visible.
+ srcs_lib: "framework",
+ srcs_lib_whitelist_dirs: ["core/java"],
+ srcs_lib_whitelist_pkgs: ["android"],
+ libs: [
+ "core-oj",
+ "core-libart",
+ "framework",
+ "conscrypt",
+ "okhttp",
+ "bouncycastle",
+ "ext",
+ ],
+ local_sourcepaths: ["src/android/test/mock"],
+ custom_template: "droiddoc-templates-sdk",
+ installable: false,
+}
+
+android_test_mock_docs_args =
+ "-hide 110 -hide 111 -hide 113 -hide 121 -hide 125 -hide 126 -hide 127 -hide 128 " +
+ "-stubpackages android.test.mock " +
+ "-nodocs "
+
+droiddoc {
+ name: "android.test.mock.docs",
+ defaults: ["android.test.mock.docs-defaults"],
+
+ api_tag_name: "ANDROID_TEST_MOCK",
+ api_filename: "api/android-test-mock-current.txt",
+ removed_api_filename: "api/android-test-mock-removed.txt",
+
+ args: android_test_mock_docs_args,
+}
+
+java_library_static {
+ name: "android.test.mock.stubs",
+ srcs: [":android.test.mock.docs"],
+ sdk_version: "current",
}
diff --git a/test-mock/Android.mk b/test-mock/Android.mk
index d81ca01..08443c9 100644
--- a/test-mock/Android.mk
+++ b/test-mock/Android.mk
@@ -16,76 +16,30 @@
LOCAL_PATH:= $(call my-dir)
-android_test_mock_source_files := $(call all-java-files-under, src/android/test/mock)
-
-# Generate the stub source files for android.test.mock.stubs
-# ==========================================================
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(android_test_mock_source_files)
-
-LOCAL_JAVA_LIBRARIES := core-oj core-libart framework
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src/android/test/mock
-
-ANDROID_TEST_MOCK_OUTPUT_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.mock.stubs_intermediates/api.txt
-ANDROID_TEST_MOCK_OUTPUT_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.mock.stubs_intermediates/removed.txt
-
-ANDROID_TEST_MOCK_API_FILE := $(LOCAL_PATH)/api/android-test-mock-current.txt
-ANDROID_TEST_MOCK_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-mock-removed.txt
-
-LOCAL_DROIDDOC_OPTIONS:= \
- -stubpackages android.test.mock \
- -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.mock.stubs_intermediates/src \
- -nodocs \
- -api $(ANDROID_TEST_MOCK_OUTPUT_API_FILE) \
- -removedApi $(ANDROID_TEST_MOCK_OUTPUT_REMOVED_API_FILE) \
-
-LOCAL_UNINSTALLABLE_MODULE := true
-LOCAL_MODULE := android-test-mock-api-stubs-gen
-
-include $(BUILD_DROIDDOC)
-
-# Remember the target that will trigger the code generation.
-android_test_mock_gen_stamp := $(full_target)
-
-# Add some additional dependencies
-$(ANDROID_TEST_MOCK_OUTPUT_API_FILE): $(full_target)
-$(ANDROID_TEST_MOCK_OUTPUT_REMOVED_API_FILE): $(full_target)
-
-# Build the android.test.mock.stubs library
-# =========================================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.test.mock.stubs
-
-LOCAL_SOURCE_FILES_ALL_GENERATED := true
-
-# Make sure to run droiddoc first to generate the stub source files.
-LOCAL_ADDITIONAL_DEPENDENCIES := $(android_test_mock_gen_stamp)
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
# Archive a copy of the classes.jar in SDK build.
+full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.mock.stubs,,COMMON)/classes.jar
$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.mock.stubs.jar)
# Check that the android.test.mock.stubs library has not changed
# ==============================================================
+ANDROID_TEST_MOCK_API_FILE := $(LOCAL_PATH)/api/android-test-mock-current.txt
+ANDROID_TEST_MOCK_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-mock-removed.txt
# Check that the API we're building hasn't changed from the not-yet-released
# SDK version.
$(eval $(call check-api, \
check-android-test-mock-api-current, \
$(ANDROID_TEST_MOCK_API_FILE), \
- $(ANDROID_TEST_MOCK_OUTPUT_API_FILE), \
+ $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_API_FILE), \
$(ANDROID_TEST_MOCK_REMOVED_API_FILE), \
- $(ANDROID_TEST_MOCK_OUTPUT_REMOVED_API_FILE), \
+ $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_REMOVED_API_FILE), \
-error 2 -error 3 -error 4 -error 5 -error 6 \
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
-error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
-error 25 -error 26 -error 27, \
cat $(LOCAL_PATH)/api/apicheck_msg_android_test_mock.txt, \
check-android-test-mock-api, \
- $(call doc-timestamp-for,android-test-mock-api-stubs-gen) \
+ $(OUT_DOCS)/android.test.mock.docs-stubs.srcjar \
))
.PHONY: check-android-test-mock-api
@@ -94,8 +48,8 @@
.PHONY: update-android-test-mock-api
update-api: update-android-test-mock-api
-update-android-test-mock-api: $(ANDROID_TEST_MOCK_OUTPUT_API_FILE) | $(ACP)
+update-android-test-mock-api: $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_API_FILE) | $(ACP)
@echo Copying current.txt
- $(hide) $(ACP) $(ANDROID_TEST_MOCK_OUTPUT_API_FILE) $(ANDROID_TEST_MOCK_API_FILE)
+ $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_API_FILE) $(ANDROID_TEST_MOCK_API_FILE)
@echo Copying removed.txt
- $(hide) $(ACP) $(ANDROID_TEST_MOCK_OUTPUT_REMOVED_API_FILE) $(ANDROID_TEST_MOCK_REMOVED_API_FILE)
+ $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_REMOVED_API_FILE) $(ANDROID_TEST_MOCK_REMOVED_API_FILE)
diff --git a/test-mock/api/android-test-mock-current.txt b/test-mock/api/android-test-mock-current.txt
index 73f794b..07acfef 100644
--- a/test-mock/api/android-test-mock-current.txt
+++ b/test-mock/api/android-test-mock-current.txt
@@ -1,5 +1,9 @@
package android.test.mock {
+ public deprecated class MockAccountManager {
+ method public static android.accounts.AccountManager newMockAccountManager(android.content.Context);
+ }
+
public deprecated class MockApplication extends android.app.Application {
ctor public MockApplication();
}
@@ -9,8 +13,8 @@
ctor public MockContentProvider(android.content.Context);
ctor public MockContentProvider(android.content.Context, java.lang.String, java.lang.String, android.content.pm.PathPermission[]);
method public android.content.ContentProviderResult[] applyBatch(java.util.ArrayList<android.content.ContentProviderOperation>);
+ method public static deprecated void attachInfoForTesting(android.content.ContentProvider, android.content.Context, android.content.pm.ProviderInfo);
method public int delete(android.net.Uri, java.lang.String, java.lang.String[]);
- method public final android.content.IContentProvider getIContentProvider();
method public java.lang.String getType(android.net.Uri);
method public android.net.Uri insert(android.net.Uri, android.content.ContentValues);
method public boolean onCreate();
@@ -22,37 +26,26 @@
public class MockContentResolver extends android.content.ContentResolver {
ctor public MockContentResolver();
ctor public MockContentResolver(android.content.Context);
- method protected android.content.IContentProvider acquireProvider(android.content.Context, java.lang.String);
- method protected android.content.IContentProvider acquireUnstableProvider(android.content.Context, java.lang.String);
method public void addProvider(java.lang.String, android.content.ContentProvider);
- method public boolean releaseProvider(android.content.IContentProvider);
- method public boolean releaseUnstableProvider(android.content.IContentProvider);
- method public void unstableProviderDied(android.content.IContentProvider);
}
public class MockContext extends android.content.Context {
ctor public MockContext();
method public boolean bindService(android.content.Intent, android.content.ServiceConnection, int);
- method public boolean canLoadUnsafeResources();
method public int checkCallingOrSelfPermission(java.lang.String);
method public int checkCallingOrSelfUriPermission(android.net.Uri, int);
method public int checkCallingPermission(java.lang.String);
method public int checkCallingUriPermission(android.net.Uri, int);
method public int checkPermission(java.lang.String, int, int);
- method public int checkPermission(java.lang.String, int, int, android.os.IBinder);
method public int checkSelfPermission(java.lang.String);
method public int checkUriPermission(android.net.Uri, int, int, int);
- method public int checkUriPermission(android.net.Uri, int, int, int, android.os.IBinder);
method public int checkUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int);
method public void clearWallpaper();
- method public android.content.Context createApplicationContext(android.content.pm.ApplicationInfo, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.Context createConfigurationContext(android.content.res.Configuration);
method public android.content.Context createContextForSplit(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
- method public android.content.Context createCredentialProtectedStorageContext();
method public android.content.Context createDeviceProtectedStorageContext();
method public android.content.Context createDisplayContext(android.view.Display);
method public android.content.Context createPackageContext(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public android.content.Context createPackageContextAsUser(java.lang.String, int, android.os.UserHandle) throws android.content.pm.PackageManager.NameNotFoundException;
method public java.lang.String[] databaseList();
method public boolean deleteDatabase(java.lang.String);
method public boolean deleteFile(java.lang.String);
@@ -68,7 +61,6 @@
method public android.content.Context getApplicationContext();
method public android.content.pm.ApplicationInfo getApplicationInfo();
method public android.content.res.AssetManager getAssets();
- method public java.lang.String getBasePackageName();
method public java.io.File getCacheDir();
method public java.lang.ClassLoader getClassLoader();
method public java.io.File getCodeCacheDir();
@@ -76,8 +68,6 @@
method public java.io.File getDataDir();
method public java.io.File getDatabasePath(java.lang.String);
method public java.io.File getDir(java.lang.String, int);
- method public android.view.Display getDisplay();
- method public android.view.DisplayAdjustments getDisplayAdjustments(int);
method public java.io.File getExternalCacheDir();
method public java.io.File[] getExternalCacheDirs();
method public java.io.File getExternalFilesDir(java.lang.String);
@@ -89,25 +79,19 @@
method public java.io.File getNoBackupFilesDir();
method public java.io.File getObbDir();
method public java.io.File[] getObbDirs();
- method public java.lang.String getOpPackageName();
method public java.lang.String getPackageCodePath();
method public android.content.pm.PackageManager getPackageManager();
method public java.lang.String getPackageName();
method public java.lang.String getPackageResourcePath();
- method public java.io.File getPreloadsFileCache();
method public android.content.res.Resources getResources();
method public android.content.SharedPreferences getSharedPreferences(java.lang.String, int);
- method public android.content.SharedPreferences getSharedPreferences(java.io.File, int);
- method public java.io.File getSharedPreferencesPath(java.lang.String);
method public java.lang.Object getSystemService(java.lang.String);
method public java.lang.String getSystemServiceName(java.lang.Class<?>);
method public android.content.res.Resources.Theme getTheme();
- method public int getUserId();
method public android.graphics.drawable.Drawable getWallpaper();
method public int getWallpaperDesiredMinimumHeight();
method public int getWallpaperDesiredMinimumWidth();
method public void grantUriPermission(java.lang.String, android.net.Uri, int);
- method public boolean isCredentialProtectedStorage();
method public boolean isDeviceProtectedStorage();
method public boolean moveDatabaseFrom(android.content.Context, java.lang.String);
method public boolean moveSharedPreferencesFrom(android.content.Context, java.lang.String);
@@ -120,31 +104,19 @@
method public android.content.Intent registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, int);
method public android.content.Intent registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler);
method public android.content.Intent registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler, int);
- method public android.content.Intent registerReceiverAsUser(android.content.BroadcastReceiver, android.os.UserHandle, android.content.IntentFilter, java.lang.String, android.os.Handler);
- method public void reloadSharedPreferences();
method public void removeStickyBroadcast(android.content.Intent);
method public void removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle);
method public void revokeUriPermission(android.net.Uri, int);
method public void revokeUriPermission(java.lang.String, android.net.Uri, int);
method public void sendBroadcast(android.content.Intent);
method public void sendBroadcast(android.content.Intent, java.lang.String);
- method public void sendBroadcast(android.content.Intent, java.lang.String, android.os.Bundle);
- method public void sendBroadcast(android.content.Intent, java.lang.String, int);
method public void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle);
method public void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String);
- method public void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.os.Bundle);
- method public void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, int);
- method public void sendBroadcastMultiplePermissions(android.content.Intent, java.lang.String[]);
method public void sendOrderedBroadcast(android.content.Intent, java.lang.String);
method public void sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
- method public void sendOrderedBroadcast(android.content.Intent, java.lang.String, android.os.Bundle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
- method public void sendOrderedBroadcast(android.content.Intent, java.lang.String, int, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
method public void sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
- method public void sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, int, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
- method public void sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, int, android.os.Bundle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
method public void sendStickyBroadcast(android.content.Intent);
method public void sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle);
- method public void sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.os.Bundle);
method public void sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
method public void sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle);
method public void setTheme(int);
@@ -155,17 +127,13 @@
method public void startActivity(android.content.Intent);
method public void startActivity(android.content.Intent, android.os.Bundle);
method public android.content.ComponentName startForegroundService(android.content.Intent);
- method public android.content.ComponentName startForegroundServiceAsUser(android.content.Intent, android.os.UserHandle);
method public boolean startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle);
method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public android.content.ComponentName startService(android.content.Intent);
- method public android.content.ComponentName startServiceAsUser(android.content.Intent, android.os.UserHandle);
method public boolean stopService(android.content.Intent);
- method public boolean stopServiceAsUser(android.content.Intent, android.os.UserHandle);
method public void unbindService(android.content.ServiceConnection);
method public void unregisterReceiver(android.content.BroadcastReceiver);
- method public void updateDisplay(int);
}
public deprecated class MockCursor implements android.database.Cursor {
@@ -221,8 +189,6 @@
public deprecated class MockPackageManager extends android.content.pm.PackageManager {
ctor public MockPackageManager();
- method public void addCrossProfileIntentFilter(android.content.IntentFilter, int, int, int);
- method public void addOnPermissionsChangeListener(android.content.pm.PackageManager.OnPermissionsChangedListener);
method public void addPackageToPreferred(java.lang.String);
method public boolean addPermission(android.content.pm.PermissionInfo);
method public boolean addPermissionAsync(android.content.pm.PermissionInfo);
@@ -232,19 +198,10 @@
method public int checkPermission(java.lang.String, java.lang.String);
method public int checkSignatures(java.lang.String, java.lang.String);
method public int checkSignatures(int, int);
- method public void clearApplicationUserData(java.lang.String, android.content.pm.IPackageDataObserver);
- method public void clearCrossProfileIntentFilters(int);
method public void clearInstantAppCookie();
method public void clearPackagePreferredActivities(java.lang.String);
method public java.lang.String[] currentToCanonicalPackageNames(java.lang.String[]);
- method public void deleteApplicationCacheFiles(java.lang.String, android.content.pm.IPackageDataObserver);
- method public void deleteApplicationCacheFilesAsUser(java.lang.String, int, android.content.pm.IPackageDataObserver);
- method public void deletePackage(java.lang.String, android.content.pm.IPackageDeleteObserver, int);
- method public void deletePackageAsUser(java.lang.String, android.content.pm.IPackageDeleteObserver, int, int);
method public void extendVerificationTimeout(int, int, long);
- method public void flushPackageRestrictionsAsUser(int);
- method public void freeStorage(java.lang.String, long, android.content.IntentSender);
- method public void freeStorageAndNotify(java.lang.String, long, android.content.pm.IPackageDataObserver);
method public android.graphics.drawable.Drawable getActivityBanner(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.graphics.drawable.Drawable getActivityBanner(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.graphics.drawable.Drawable getActivityIcon(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
@@ -257,149 +214,75 @@
method public android.graphics.drawable.Drawable getApplicationBanner(android.content.pm.ApplicationInfo);
method public android.graphics.drawable.Drawable getApplicationBanner(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public int getApplicationEnabledSetting(java.lang.String);
- method public boolean getApplicationHiddenSettingAsUser(java.lang.String, android.os.UserHandle);
method public android.graphics.drawable.Drawable getApplicationIcon(android.content.pm.ApplicationInfo);
method public android.graphics.drawable.Drawable getApplicationIcon(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.pm.ApplicationInfo getApplicationInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public android.content.pm.ApplicationInfo getApplicationInfoAsUser(java.lang.String, int, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public java.lang.CharSequence getApplicationLabel(android.content.pm.ApplicationInfo);
method public android.graphics.drawable.Drawable getApplicationLogo(android.content.pm.ApplicationInfo);
method public android.graphics.drawable.Drawable getApplicationLogo(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.pm.ChangedPackages getChangedPackages(int);
method public int getComponentEnabledSetting(android.content.ComponentName);
method public android.graphics.drawable.Drawable getDefaultActivityIcon();
- method public java.lang.String getDefaultBrowserPackageNameAsUser(int);
method public android.graphics.drawable.Drawable getDrawable(java.lang.String, int, android.content.pm.ApplicationInfo);
- method public android.content.ComponentName getHomeActivities(java.util.List<android.content.pm.ResolveInfo>);
- method public int getInstallReason(java.lang.String, android.os.UserHandle);
method public java.util.List<android.content.pm.ApplicationInfo> getInstalledApplications(int);
- method public java.util.List<android.content.pm.ApplicationInfo> getInstalledApplicationsAsUser(int, int);
method public java.util.List<android.content.pm.PackageInfo> getInstalledPackages(int);
- method public java.util.List<android.content.pm.PackageInfo> getInstalledPackagesAsUser(int, int);
method public java.lang.String getInstallerPackageName(java.lang.String);
- method public java.lang.String getInstantAppAndroidId(java.lang.String, android.os.UserHandle);
method public byte[] getInstantAppCookie();
method public int getInstantAppCookieMaxBytes();
- method public int getInstantAppCookieMaxSize();
- method public android.graphics.drawable.Drawable getInstantAppIcon(java.lang.String);
- method public android.content.ComponentName getInstantAppInstallerComponent();
- method public android.content.ComponentName getInstantAppResolverSettingsComponent();
- method public java.util.List<android.content.pm.InstantAppInfo> getInstantApps();
method public android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public java.util.List<android.content.pm.IntentFilterVerificationInfo> getIntentFilterVerifications(java.lang.String);
- method public int getIntentVerificationStatusAsUser(java.lang.String, int);
- method public android.content.pm.KeySet getKeySetByAlias(java.lang.String, java.lang.String);
method public android.content.Intent getLaunchIntentForPackage(java.lang.String);
method public android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String);
- method public int getMoveStatus(int);
method public java.lang.String getNameForUid(int);
- method public java.lang.String[] getNamesForUids(int[]);
- method public java.util.List<android.os.storage.VolumeInfo> getPackageCandidateVolumes(android.content.pm.ApplicationInfo);
- method public android.os.storage.VolumeInfo getPackageCurrentVolume(android.content.pm.ApplicationInfo);
method public int[] getPackageGids(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public int[] getPackageGids(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.pm.PackageInfo getPackageInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.pm.PackageInfo getPackageInfo(android.content.pm.VersionedPackage, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public android.content.pm.PackageInfo getPackageInfoAsUser(java.lang.String, int, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.pm.PackageInstaller getPackageInstaller();
- method public void getPackageSizeInfoAsUser(java.lang.String, int, android.content.pm.IPackageStatsObserver);
method public int getPackageUid(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public int getPackageUidAsUser(java.lang.String, int, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public int getPackageUidAsUser(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public java.lang.String[] getPackagesForUid(int);
method public java.util.List<android.content.pm.PackageInfo> getPackagesHoldingPermissions(java.lang.String[], int);
- method public java.lang.String getPermissionControllerPackageName();
- method public int getPermissionFlags(java.lang.String, java.lang.String, android.os.UserHandle);
method public android.content.pm.PermissionGroupInfo getPermissionGroupInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.pm.PermissionInfo getPermissionInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public int getPreferredActivities(java.util.List<android.content.IntentFilter>, java.util.List<android.content.ComponentName>, java.lang.String);
method public java.util.List<android.content.pm.PackageInfo> getPreferredPackages(int);
- method public java.util.List<android.os.storage.VolumeInfo> getPrimaryStorageCandidateVolumes();
- method public android.os.storage.VolumeInfo getPrimaryStorageCurrentVolume();
method public android.content.pm.ProviderInfo getProviderInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.pm.ActivityInfo getReceiverInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.res.Resources getResourcesForActivity(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.res.Resources getResourcesForApplication(android.content.pm.ApplicationInfo);
method public android.content.res.Resources getResourcesForApplication(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
- method public android.content.res.Resources getResourcesForApplicationAsUser(java.lang.String, int);
method public android.content.pm.ServiceInfo getServiceInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public java.lang.String getServicesSystemSharedLibraryPackageName();
method public java.util.List<android.content.pm.SharedLibraryInfo> getSharedLibraries(int);
- method public java.util.List<android.content.pm.SharedLibraryInfo> getSharedLibrariesAsUser(int, int);
- method public java.lang.String getSharedSystemSharedLibraryPackageName();
- method public android.content.pm.KeySet getSigningKeySet(java.lang.String);
method public android.content.pm.FeatureInfo[] getSystemAvailableFeatures();
method public java.lang.String[] getSystemSharedLibraryNames();
method public java.lang.CharSequence getText(java.lang.String, int, android.content.pm.ApplicationInfo);
- method public int getUidForSharedUser(java.lang.String);
- method public android.graphics.drawable.Drawable getUserBadgeForDensity(android.os.UserHandle, int);
- method public android.graphics.drawable.Drawable getUserBadgeForDensityNoBackground(android.os.UserHandle, int);
method public android.graphics.drawable.Drawable getUserBadgedDrawableForDensity(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int);
method public android.graphics.drawable.Drawable getUserBadgedIcon(android.graphics.drawable.Drawable, android.os.UserHandle);
method public java.lang.CharSequence getUserBadgedLabel(java.lang.CharSequence, android.os.UserHandle);
- method public android.content.pm.VerifierDeviceIdentity getVerifierDeviceIdentity();
method public android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo);
- method public void grantRuntimePermission(java.lang.String, java.lang.String, android.os.UserHandle);
method public boolean hasSystemFeature(java.lang.String);
method public boolean hasSystemFeature(java.lang.String, int);
- method public int installExistingPackage(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
- method public int installExistingPackage(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public int installExistingPackageAsUser(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public void installPackage(android.net.Uri, android.content.pm.IPackageInstallObserver, int, java.lang.String);
- method public void installPackage(android.net.Uri, android.app.PackageInstallObserver, int, java.lang.String);
method public boolean isInstantApp();
method public boolean isInstantApp(java.lang.String);
- method public boolean isPackageAvailable(java.lang.String);
- method public boolean isPackageSuspendedForUser(java.lang.String, int);
- method public boolean isPermissionReviewModeEnabled();
method public boolean isPermissionRevokedByPolicy(java.lang.String, java.lang.String);
method public boolean isSafeMode();
- method public boolean isSignedBy(java.lang.String, android.content.pm.KeySet);
- method public boolean isSignedByExactly(java.lang.String, android.content.pm.KeySet);
- method public boolean isUpgrade();
- method public android.graphics.drawable.Drawable loadItemIcon(android.content.pm.PackageItemInfo, android.content.pm.ApplicationInfo);
- method public android.graphics.drawable.Drawable loadUnbadgedItemIcon(android.content.pm.PackageItemInfo, android.content.pm.ApplicationInfo);
- method public int movePackage(java.lang.String, android.os.storage.VolumeInfo);
- method public int movePrimaryStorage(android.os.storage.VolumeInfo);
method public java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent, int);
- method public java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceiversAsUser(android.content.Intent, int, int);
method public java.util.List<android.content.pm.ProviderInfo> queryContentProviders(java.lang.String, int, int);
method public java.util.List<android.content.pm.InstrumentationInfo> queryInstrumentation(java.lang.String, int);
method public java.util.List<android.content.pm.ResolveInfo> queryIntentActivities(android.content.Intent, int);
- method public java.util.List<android.content.pm.ResolveInfo> queryIntentActivitiesAsUser(android.content.Intent, int, int);
method public java.util.List<android.content.pm.ResolveInfo> queryIntentActivityOptions(android.content.ComponentName, android.content.Intent[], android.content.Intent, int);
method public java.util.List<android.content.pm.ResolveInfo> queryIntentContentProviders(android.content.Intent, int);
- method public java.util.List<android.content.pm.ResolveInfo> queryIntentContentProvidersAsUser(android.content.Intent, int, int);
method public java.util.List<android.content.pm.ResolveInfo> queryIntentServices(android.content.Intent, int);
- method public java.util.List<android.content.pm.ResolveInfo> queryIntentServicesAsUser(android.content.Intent, int, int);
method public java.util.List<android.content.pm.PermissionInfo> queryPermissionsByGroup(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public void registerDexModule(java.lang.String, android.content.pm.PackageManager.DexModuleRegisterCallback);
- method public void registerMoveCallback(android.content.pm.PackageManager.MoveCallback, android.os.Handler);
- method public void removeOnPermissionsChangeListener(android.content.pm.PackageManager.OnPermissionsChangedListener);
method public void removePackageFromPreferred(java.lang.String);
method public void removePermission(java.lang.String);
- method public void replacePreferredActivity(android.content.IntentFilter, int, android.content.ComponentName[], android.content.ComponentName);
method public android.content.pm.ResolveInfo resolveActivity(android.content.Intent, int);
- method public android.content.pm.ResolveInfo resolveActivityAsUser(android.content.Intent, int, int);
method public android.content.pm.ProviderInfo resolveContentProvider(java.lang.String, int);
- method public android.content.pm.ProviderInfo resolveContentProviderAsUser(java.lang.String, int, int);
method public android.content.pm.ResolveInfo resolveService(android.content.Intent, int);
- method public void revokeRuntimePermission(java.lang.String, java.lang.String, android.os.UserHandle);
method public void setApplicationCategoryHint(java.lang.String, int);
method public void setApplicationEnabledSetting(java.lang.String, int, int);
- method public boolean setApplicationHiddenSettingAsUser(java.lang.String, boolean, android.os.UserHandle);
method public void setComponentEnabledSetting(android.content.ComponentName, int, int);
- method public boolean setDefaultBrowserPackageNameAsUser(java.lang.String, int);
method public void setInstallerPackageName(java.lang.String, java.lang.String);
- method public boolean setInstantAppCookie(byte[]);
- method public java.lang.String[] setPackagesSuspendedAsUser(java.lang.String[], boolean, int);
- method public void setUpdateAvailable(java.lang.String, boolean);
- method public boolean shouldShowRequestPermissionRationale(java.lang.String);
- method public void unregisterMoveCallback(android.content.pm.PackageManager.MoveCallback);
method public void updateInstantAppCookie(byte[]);
- method public boolean updateIntentVerificationStatusAsUser(java.lang.String, int, int);
- method public void updatePermissionFlags(java.lang.String, java.lang.String, int, int, android.os.UserHandle);
- method public void verifyIntentFilter(int, int, java.util.List<java.lang.String>);
method public void verifyPendingInstall(int, int);
}
@@ -411,5 +294,9 @@
method public void updateConfiguration(android.content.res.Configuration, android.util.DisplayMetrics);
}
+ public deprecated class MockService {
+ method public static <T extends android.app.Service> void attachForTesting(android.app.Service, android.content.Context, java.lang.String, android.app.Application);
+ }
+
}
diff --git a/test-mock/api/android-test-mock-removed.txt b/test-mock/api/android-test-mock-removed.txt
index 5b358cf..bd109a8 100644
--- a/test-mock/api/android-test-mock-removed.txt
+++ b/test-mock/api/android-test-mock-removed.txt
@@ -8,6 +8,7 @@
public deprecated class MockPackageManager extends android.content.pm.PackageManager {
method public deprecated java.lang.String getDefaultBrowserPackageName(int);
method public deprecated boolean setDefaultBrowserPackageName(java.lang.String, int);
+ method public boolean setInstantAppCookie(byte[]);
}
}
diff --git a/test-mock/src/android/test/mock/MockAccountManager.java b/test-mock/src/android/test/mock/MockAccountManager.java
new file mode 100644
index 0000000..c9b4c7b
--- /dev/null
+++ b/test-mock/src/android/test/mock/MockAccountManager.java
@@ -0,0 +1,119 @@
+/*
+ * 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.
+ */
+package android.test.mock;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.accounts.AccountManagerCallback;
+import android.accounts.AccountManagerFuture;
+import android.accounts.AuthenticatorException;
+import android.accounts.OnAccountsUpdateListener;
+import android.accounts.OperationCanceledException;
+import android.content.Context;
+import android.os.Handler;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * A mock {@link android.accounts.AccountManager} class.
+ *
+ * <p>Provided for use by {@code android.test.IsolatedContext}.
+ *
+ * @deprecated Use a mocking framework like <a href="https://github.com/mockito/mockito">Mockito</a>.
+ * New tests should be written using the
+ * <a href="{@docRoot}
+ * tools/testing-support-library/index.html">Android Testing Support Library</a>.
+ */
+@Deprecated
+public class MockAccountManager {
+
+ /**
+ * Create a new mock {@link AccountManager} instance.
+ *
+ * @param context the {@link Context} to which the returned object belongs.
+ * @return the new instance.
+ */
+ public static AccountManager newMockAccountManager(Context context) {
+ return new MockAccountManagerImpl(context);
+ }
+
+ private MockAccountManager() {
+ }
+
+ private static class MockAccountManagerImpl extends AccountManager {
+
+ MockAccountManagerImpl(Context context) {
+ super(context, null /* IAccountManager */, null /* handler */);
+ }
+
+ public void addOnAccountsUpdatedListener(OnAccountsUpdateListener listener,
+ Handler handler, boolean updateImmediately) {
+ // do nothing
+ }
+
+ public Account[] getAccounts() {
+ return new Account[] {};
+ }
+
+ public AccountManagerFuture<Account[]> getAccountsByTypeAndFeatures(
+ final String type, final String[] features,
+ AccountManagerCallback<Account[]> callback, Handler handler) {
+ return new MockAccountManagerFuture<Account[]>(new Account[0]);
+ }
+
+ public String blockingGetAuthToken(Account account, String authTokenType,
+ boolean notifyAuthFailure)
+ throws OperationCanceledException, IOException, AuthenticatorException {
+ return null;
+ }
+ }
+
+ /**
+ * A very simple AccountManagerFuture class
+ * that returns what ever was passed in
+ */
+ private static class MockAccountManagerFuture<T>
+ implements AccountManagerFuture<T> {
+
+ T mResult;
+
+ MockAccountManagerFuture(T result) {
+ mResult = result;
+ }
+
+ public boolean cancel(boolean mayInterruptIfRunning) {
+ return false;
+ }
+
+ public boolean isCancelled() {
+ return false;
+ }
+
+ public boolean isDone() {
+ return true;
+ }
+
+ public T getResult()
+ throws OperationCanceledException, IOException, AuthenticatorException {
+ return mResult;
+ }
+
+ public T getResult(long timeout, TimeUnit unit)
+ throws OperationCanceledException, IOException, AuthenticatorException {
+ return getResult();
+ }
+ }
+}
diff --git a/test-mock/src/android/test/mock/MockContentProvider.java b/test-mock/src/android/test/mock/MockContentProvider.java
index d5f3ce8..b917fbd 100644
--- a/test-mock/src/android/test/mock/MockContentProvider.java
+++ b/test-mock/src/android/test/mock/MockContentProvider.java
@@ -277,4 +277,21 @@
public final IContentProvider getIContentProvider() {
return mIContentProvider;
}
+
+ /**
+ * Like {@link #attachInfo(Context, android.content.pm.ProviderInfo)}, but for use
+ * when directly instantiating the provider for testing.
+ *
+ * <p>Provided for use by {@code android.test.ProviderTestCase2} and
+ * {@code android.test.RenamingDelegatingContext}.
+ *
+ * @deprecated Use a mocking framework like <a href="https://github.com/mockito/mockito">Mockito</a>.
+ * New tests should be written using the
+ * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
+ */
+ @Deprecated
+ public static void attachInfoForTesting(
+ ContentProvider provider, Context context, ProviderInfo providerInfo) {
+ provider.attachInfoForTesting(context, providerInfo);
+ }
}
diff --git a/test-mock/src/android/test/mock/MockContext.java b/test-mock/src/android/test/mock/MockContext.java
index 5e5ba46..8cde612 100644
--- a/test-mock/src/android/test/mock/MockContext.java
+++ b/test-mock/src/android/test/mock/MockContext.java
@@ -359,6 +359,13 @@
}
/** @hide */
+ @Override
+ public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+ String[] receiverPermissions) {
+ throw new UnsupportedOperationException();
+ }
+
+ /** @hide */
@SystemApi
@Override
public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
diff --git a/test-mock/src/android/test/mock/MockPackageManager.java b/test-mock/src/android/test/mock/MockPackageManager.java
index 7e08f51..da70f0f 100644
--- a/test-mock/src/android/test/mock/MockPackageManager.java
+++ b/test-mock/src/android/test/mock/MockPackageManager.java
@@ -47,6 +47,7 @@
import android.content.pm.SharedLibraryInfo;
import android.content.pm.VerifierDeviceIdentity;
import android.content.pm.VersionedPackage;
+import android.content.pm.dex.ArtManager;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.Rect;
@@ -1184,4 +1185,12 @@
@Nullable DexModuleRegisterCallback callback) {
throw new UnsupportedOperationException();
}
+
+ /**
+ * @hide
+ */
+ @Override
+ public ArtManager getArtManager() {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/test-mock/src/android/test/mock/MockService.java b/test-mock/src/android/test/mock/MockService.java
new file mode 100644
index 0000000..dbba4f3
--- /dev/null
+++ b/test-mock/src/android/test/mock/MockService.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package android.test.mock;
+
+import android.app.Application;
+import android.app.Service;
+import android.content.Context;
+
+/**
+ * A mock {@link android.app.Service} class.
+ *
+ * <p>Provided for use by {@code android.test.ServiceTestCase}.
+ *
+ * @deprecated Use a mocking framework like <a href="https://github.com/mockito/mockito">Mockito</a>.
+ * New tests should be written using the
+ * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
+ */
+@Deprecated
+public class MockService {
+
+ public static <T extends Service> void attachForTesting(Service service, Context context,
+ String serviceClassName,
+ Application application) {
+ service.attach(
+ context,
+ null, // ActivityThread not actually used in Service
+ serviceClassName,
+ null, // token not needed when not talking with the activity manager
+ application,
+ null // mocked services don't talk with the activity manager
+ );
+ }
+
+ private MockService() {
+ }
+}
diff --git a/test-runner/Android.bp b/test-runner/Android.bp
index dfaeed5..29d7ea9 100644
--- a/test-runner/Android.bp
+++ b/test-runner/Android.bp
@@ -19,19 +19,26 @@
java_library {
name: "android.test.runner",
+ // Needs to be consistent with the repackaged version of this make target.
+ java_version: "1.8",
srcs: ["src/**/*.java"],
+ errorprone: {
+ javacflags: ["-Xep:DepAnn:ERROR"],
+ },
+
no_framework_libs: true,
libs: [
"framework",
"android.test.base",
- "android.test.mock",
+ "android.test.mock.stubs",
],
}
// Build the android.test.runner-minus-junit library
// =================================================
-// This is provided solely for use by the legacy-android-test module.
+// This is only intended for inclusion in the legacy-android-test static
+// library and must not be used elsewhere.
java_library {
name: "android.test.runner-minus-junit",
@@ -41,7 +48,7 @@
libs: [
"framework",
"android.test.base",
- "android.test.mock",
+ "android.test.mock.stubs",
"junit",
],
}
@@ -54,4 +61,51 @@
static_libs: ["android.test.runner"],
jarjar_rules: "jarjar-rules.txt",
+ // Pin java_version until jarjar is certified to support later versions. http://b/72703434
+ java_version: "1.8",
+}
+
+droiddoc {
+ name: "android-test-runner-api-stubs-gen-docs",
+ srcs: [
+ "src/**/*.java",
+ ],
+ libs: [
+ "core-oj",
+ "core-libart",
+ "framework",
+ "android.test.base",
+ "android.test.mock",
+ ],
+ custom_template: "droiddoc-templates-sdk",
+ installable: false,
+ args: "-stubpackages android.test:" +
+ "android.test.suitebuilder:" +
+ "junit.runner:" +
+ "junit.textui -stubsourceonly -nodocs",
+ api_tag_name: "ANDROID_TEST_RUNNER",
+ api_filename: "android-test-runner-current.txt",
+ removed_api_filename: "android-test-runner-removed.txt",
+}
+
+// Build the android.test.runner.stubs library
+// =========================================
+java_library_static {
+ name: "android.test.runner.stubs",
+ srcs: [
+ ":android-test-runner-api-stubs-gen-docs",
+ ],
+ libs: [
+ "android.test.base.stubs",
+ "android.test.mock.stubs",
+ ],
+ product_variables: {
+ pdk: {
+ enabled: false,
+ },
+ unbundled_build: {
+ enabled: false,
+ },
+ },
+ sdk_version: "current",
}
diff --git a/test-runner/Android.mk b/test-runner/Android.mk
index cdc7756..b70d249 100644
--- a/test-runner/Android.mk
+++ b/test-runner/Android.mk
@@ -16,65 +16,13 @@
LOCAL_PATH:= $(call my-dir)
-# Generate the stub source files for android.test.runner.stubs
-# ============================================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_JAVA_LIBRARIES := \
- core-oj \
- core-libart \
- framework \
- android.test.base \
- android.test.mock \
-
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src
-
-ANDROID_TEST_RUNNER_OUTPUT_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.runner.stubs_intermediates/api.txt
-ANDROID_TEST_RUNNER_OUTPUT_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.runner.stubs_intermediates/removed.txt
+# For unbundled build we'll use the prebuilt jar from prebuilts/sdk.
+ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
ANDROID_TEST_RUNNER_API_FILE := $(LOCAL_PATH)/api/android-test-runner-current.txt
ANDROID_TEST_RUNNER_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-runner-removed.txt
-LOCAL_DROIDDOC_OPTIONS:= \
- -stubpackages android.test:android.test.suitebuilder:junit.runner:junit.textui \
- -stubsourceonly \
- -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android.test.runner.stubs_intermediates/src \
- -nodocs \
- -api $(ANDROID_TEST_RUNNER_OUTPUT_API_FILE) \
- -removedApi $(ANDROID_TEST_RUNNER_OUTPUT_REMOVED_API_FILE) \
-
-LOCAL_UNINSTALLABLE_MODULE := true
-LOCAL_MODULE := android-test-runner-api-stubs-gen
-
-include $(BUILD_DROIDDOC)
-
-# Remember the target that will trigger the code generation.
-android_test_runner_api_gen_stamp := $(full_target)
-
-# Add some additional dependencies
-$(ANDROID_TEST_RUNNER_OUTPUT_API_FILE): $(full_target)
-$(ANDROID_TEST_RUNNER_OUTPUT_REMOVED_API_FILE): $(full_target)
-
-# Build the android.test.runner.stubs library
-# ===========================================
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.test.runner.stubs
-
-LOCAL_JAVA_LIBRARIES := \
- android.test.base.stubs \
- android.test.mock.stubs \
-
-LOCAL_SOURCE_FILES_ALL_GENERATED := true
-
-# Make sure to run droiddoc first to generate the stub source files.
-LOCAL_ADDITIONAL_DEPENDENCIES := $(android_test_runner_api_gen_stamp)
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
+full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.runner.stubs,,COMMON)/classes.jar
# Archive a copy of the classes.jar in SDK build.
$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.runner.stubs.jar)
@@ -86,16 +34,16 @@
$(eval $(call check-api, \
check-android-test-runner-api-current, \
$(ANDROID_TEST_RUNNER_API_FILE), \
- $(ANDROID_TEST_RUNNER_OUTPUT_API_FILE), \
+ $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE), \
$(ANDROID_TEST_RUNNER_REMOVED_API_FILE), \
- $(ANDROID_TEST_RUNNER_OUTPUT_REMOVED_API_FILE), \
+ $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_REMOVED_API_FILE), \
-error 2 -error 3 -error 4 -error 5 -error 6 \
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
-error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
-error 25 -error 26 -error 27, \
cat $(LOCAL_PATH)/api/apicheck_msg_android_test_runner.txt, \
check-android-test-runner-api, \
- $(call doc-timestamp-for,android-test-runner-api-stubs-gen) \
+ $(OUT_DOCS)/android-test-runner-api-stubs-gen-docs-stubs.srcjar \
))
.PHONY: check-android-test-runner-api
@@ -104,8 +52,13 @@
.PHONY: update-android-test-runner-api
update-api: update-android-test-runner-api
-update-android-test-runner-api: $(ANDROID_TEST_RUNNER_OUTPUT_API_FILE) | $(ACP)
+update-android-test-runner-api: $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) | $(ACP)
@echo Copying current.txt
- $(hide) $(ACP) $(ANDROID_TEST_RUNNER_OUTPUT_API_FILE) $(ANDROID_TEST_RUNNER_API_FILE)
+ $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) $(ANDROID_TEST_RUNNER_API_FILE)
@echo Copying removed.txt
- $(hide) $(ACP) $(ANDROID_TEST_RUNNER_OUTPUT_REMOVED_API_FILE) $(ANDROID_TEST_RUNNER_REMOVED_API_FILE)
+ $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_REMOVED_API_FILE) $(ANDROID_TEST_RUNNER_REMOVED_API_FILE)
+
+endif # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true
+
+# additionally, build unit tests in a separate .apk
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/test-runner/src/android/test/ComparisonFailure.java b/test-runner/src/android/test/ComparisonFailure.java
index 3fa76f5..d86b7007 100644
--- a/test-runner/src/android/test/ComparisonFailure.java
+++ b/test-runner/src/android/test/ComparisonFailure.java
@@ -19,8 +19,9 @@
/**
* Thrown when an assert equals for Strings failed.
*
- * @deprecated use junit.framework.ComparisonFailure
+ * @deprecated use org.junit.ComparisonFailure
*/
+@Deprecated
public class ComparisonFailure extends AssertionFailedError {
private junit.framework.ComparisonFailure mComparison;
diff --git a/test-runner/src/android/test/IsolatedContext.java b/test-runner/src/android/test/IsolatedContext.java
index 0b77c00..6e4c41e 100644
--- a/test-runner/src/android/test/IsolatedContext.java
+++ b/test-runner/src/android/test/IsolatedContext.java
@@ -17,12 +17,6 @@
package android.test;
import android.accounts.AccountManager;
-import android.accounts.AccountManagerCallback;
-import android.accounts.AccountManagerFuture;
-import android.accounts.AuthenticatorException;
-import android.accounts.OnAccountsUpdateListener;
-import android.accounts.OperationCanceledException;
-import android.accounts.Account;
import android.content.ContextWrapper;
import android.content.ContentResolver;
import android.content.Intent;
@@ -32,12 +26,10 @@
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.net.Uri;
-import android.os.Handler;
+import android.test.mock.MockAccountManager;
import java.io.File;
-import java.io.IOException;
import java.util.ArrayList;
-import java.util.concurrent.TimeUnit;
import java.util.List;
@@ -52,7 +44,7 @@
public class IsolatedContext extends ContextWrapper {
private ContentResolver mResolver;
- private final MockAccountManager mMockAccountManager;
+ private final AccountManager mMockAccountManager;
private List<Intent> mBroadcastIntents = new ArrayList<>();
@@ -60,7 +52,7 @@
ContentResolver resolver, Context targetContext) {
super(targetContext);
mResolver = resolver;
- mMockAccountManager = new MockAccountManager();
+ mMockAccountManager = MockAccountManager.newMockAccountManager(IsolatedContext.this);
}
/** Returns the list of intents that were broadcast since the last call to this method. */
@@ -123,71 +115,6 @@
return null;
}
- private class MockAccountManager extends AccountManager {
- public MockAccountManager() {
- super(IsolatedContext.this, null /* IAccountManager */, null /* handler */);
- }
-
- public void addOnAccountsUpdatedListener(OnAccountsUpdateListener listener,
- Handler handler, boolean updateImmediately) {
- // do nothing
- }
-
- public Account[] getAccounts() {
- return new Account[]{};
- }
-
- public AccountManagerFuture<Account[]> getAccountsByTypeAndFeatures(
- final String type, final String[] features,
- AccountManagerCallback<Account[]> callback, Handler handler) {
- return new MockAccountManagerFuture<Account[]>(new Account[0]);
- }
-
- public String blockingGetAuthToken(Account account, String authTokenType,
- boolean notifyAuthFailure)
- throws OperationCanceledException, IOException, AuthenticatorException {
- return null;
- }
-
-
- /**
- * A very simple AccountManagerFuture class
- * that returns what ever was passed in
- */
- private class MockAccountManagerFuture<T>
- implements AccountManagerFuture<T> {
-
- T mResult;
-
- public MockAccountManagerFuture(T result) {
- mResult = result;
- }
-
- public boolean cancel(boolean mayInterruptIfRunning) {
- return false;
- }
-
- public boolean isCancelled() {
- return false;
- }
-
- public boolean isDone() {
- return true;
- }
-
- public T getResult()
- throws OperationCanceledException, IOException, AuthenticatorException {
- return mResult;
- }
-
- public T getResult(long timeout, TimeUnit unit)
- throws OperationCanceledException, IOException, AuthenticatorException {
- return getResult();
- }
- }
-
- }
-
@Override
public File getFilesDir() {
return new File("/dev/null");
diff --git a/test-runner/src/android/test/ProviderTestCase2.java b/test-runner/src/android/test/ProviderTestCase2.java
index 1fa633e..be18b53 100644
--- a/test-runner/src/android/test/ProviderTestCase2.java
+++ b/test-runner/src/android/test/ProviderTestCase2.java
@@ -21,6 +21,7 @@
import android.content.Context;
import android.content.pm.ProviderInfo;
import android.content.res.Resources;
+import android.test.mock.MockContentProvider;
import android.test.mock.MockContext;
import android.test.mock.MockContentResolver;
import android.database.DatabaseUtils;
@@ -152,7 +153,7 @@
T instance = providerClass.newInstance();
ProviderInfo providerInfo = new ProviderInfo();
providerInfo.authority = authority;
- instance.attachInfoForTesting(context, providerInfo);
+ MockContentProvider.attachInfoForTesting(instance, context, providerInfo);
return instance;
}
diff --git a/test-runner/src/android/test/RenamingDelegatingContext.java b/test-runner/src/android/test/RenamingDelegatingContext.java
index fd33321..10ccebc 100644
--- a/test-runner/src/android/test/RenamingDelegatingContext.java
+++ b/test-runner/src/android/test/RenamingDelegatingContext.java
@@ -21,6 +21,7 @@
import android.content.ContentProvider;
import android.database.DatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase;
+import android.test.mock.MockContentProvider;
import android.util.Log;
import java.io.File;
@@ -71,7 +72,7 @@
if (allowAccessToExistingFilesAndDbs) {
mContext.makeExistingFilesAndDbsAccessible();
}
- mProvider.attachInfoForTesting(mContext, null);
+ MockContentProvider.attachInfoForTesting(mProvider, mContext, null);
return mProvider;
}
diff --git a/test-runner/src/android/test/ServiceTestCase.java b/test-runner/src/android/test/ServiceTestCase.java
index c8ff0f9..cd54955 100644
--- a/test-runner/src/android/test/ServiceTestCase.java
+++ b/test-runner/src/android/test/ServiceTestCase.java
@@ -23,6 +23,7 @@
import android.os.IBinder;
import android.test.mock.MockApplication;
+import android.test.mock.MockService;
import java.util.Random;
/**
@@ -163,14 +164,8 @@
if (getApplication() == null) {
setApplication(new MockApplication());
}
- mService.attach(
- getContext(),
- null, // ActivityThread not actually used in Service
- mServiceClass.getName(),
- null, // token not needed when not talking with the activity manager
- getApplication(),
- null // mocked services don't talk with the activity manager
- );
+ MockService.attachForTesting(
+ mService, getContext(), mServiceClass.getName(), getApplication());
assertNotNull(mService);
diff --git a/test-runner/src/android/test/TestSuiteProvider.java b/test-runner/src/android/test/TestSuiteProvider.java
index c74651c..12cfcb7 100644
--- a/test-runner/src/android/test/TestSuiteProvider.java
+++ b/test-runner/src/android/test/TestSuiteProvider.java
@@ -20,6 +20,11 @@
/**
* Implementors will know how to get a test suite.
+ *
+ * @deprecated Use
+ * <a href="{@docRoot}reference/android/support/test/runner/AndroidJUnitRunner.html">
+ * AndroidJUnitRunner</a> instead. New tests should be written using the
+ * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
*/
@Deprecated
public interface TestSuiteProvider {
diff --git a/test-runner/src/junit/runner/BaseTestRunner.java b/test-runner/src/junit/runner/BaseTestRunner.java
index e7e0431..b2fa16c 100644
--- a/test-runner/src/junit/runner/BaseTestRunner.java
+++ b/test-runner/src/junit/runner/BaseTestRunner.java
@@ -207,6 +207,7 @@
*
* @deprecated not present in JUnit4.10
*/
+ @Deprecated
public TestSuiteLoader getLoader() {
return new StandardTestSuiteLoader();
}
@@ -279,6 +280,7 @@
// BEGIN android-changed - add back this method for API compatibility
/** @deprecated not present in JUnit4.10 */
+ @Deprecated
public static boolean inVAJava() {
return false;
}
diff --git a/test-runner/tests/Android.mk b/test-runner/tests/Android.mk
index 7ee047e4..7b9e9a4 100644
--- a/test-runner/tests/Android.mk
+++ b/test-runner/tests/Android.mk
@@ -32,6 +32,8 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := FrameworkTestRunnerTests
+# Because of android.test.mock.
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/AccessibilityEventsLogger/Android.mk b/tests/AccessibilityEventsLogger/Android.mk
index 52bc579..4224017 100644
--- a/tests/AccessibilityEventsLogger/Android.mk
+++ b/tests/AccessibilityEventsLogger/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := AccessibilityEventsLogger
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/tests/ActivityTests/Android.mk b/tests/ActivityTests/Android.mk
index f3c6b5a..4c68c8b 100644
--- a/tests/ActivityTests/Android.mk
+++ b/tests/ActivityTests/Android.mk
@@ -4,8 +4,15 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := ActivityTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
LOCAL_CERTIFICATE := platform
+LOCAL_USE_AAPT2 := true
+# Disable AAPT2 manifest checks to fix:
+# frameworks/base/tests/ActivityTests/AndroidManifest.xml:42: error: unexpected element <preferred> found in <manifest><application><activity>.
+# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
+LOCAL_AAPT_FLAGS += --warn-manifest-validation
+
include $(BUILD_PACKAGE)
diff --git a/tests/ActivityTests/res/values/themes.xml b/tests/ActivityTests/res/values/themes.xml
index c11d2e4..1c30537 100644
--- a/tests/ActivityTests/res/values/themes.xml
+++ b/tests/ActivityTests/res/values/themes.xml
@@ -17,8 +17,6 @@
<resources>
<style name="SlowDialog" parent="@android:style/Theme.Holo.Dialog">
<item name="android:windowAnimationStyle">@style/SlowDialog</item>
- </style>
- <style name="SlowDialog">
<item name="android:windowEnterAnimation">@anim/slow_enter</item>
<item name="android:windowExitAnimation">@anim/slow_exit</item>
</style>
diff --git a/tests/AppLaunch/Android.mk b/tests/AppLaunch/Android.mk
index d01b1f9..9cbb4ed 100644
--- a/tests/AppLaunch/Android.mk
+++ b/tests/AppLaunch/Android.mk
@@ -7,6 +7,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := AppLaunch
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := legacy-android-test
diff --git a/tests/Assist/Android.mk b/tests/Assist/Android.mk
index f31c4dd..d0d3eca 100644
--- a/tests/Assist/Android.mk
+++ b/tests/Assist/Android.mk
@@ -6,5 +6,6 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := Assist
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/BandwidthTests/Android.mk b/tests/BandwidthTests/Android.mk
index 7bc5f857..d00fdc6 100644
--- a/tests/BandwidthTests/Android.mk
+++ b/tests/BandwidthTests/Android.mk
@@ -19,6 +19,7 @@
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := BandwidthEnforcementTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_SRC_FILES := $(call all-java-files-under, src)
include $(BUILD_PACKAGE)
diff --git a/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/BandwidthEnforcementTestService.java b/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/BandwidthEnforcementTestService.java
index a2427f5..35f1e58 100644
--- a/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/BandwidthEnforcementTestService.java
+++ b/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/BandwidthEnforcementTestService.java
@@ -16,7 +16,10 @@
package com.android.tests.bandwidthenforcement;
import android.app.IntentService;
+import android.content.Context;
import android.content.Intent;
+import android.net.ConnectivityManager;
+import android.net.Network;
import android.net.SntpClient;
import android.os.Environment;
import android.util.Log;
@@ -55,7 +58,7 @@
String outputFile = intent.getStringExtra(OUTPUT_FILE);
dumpResult("testUrlConnection", testUrlConnection(), outputFile);
dumpResult("testUrlConnectionv6", testUrlConnectionv6(), outputFile);
- dumpResult("testSntp", testSntp(), outputFile);
+ dumpResult("testSntp", testSntp(getApplicationContext()), outputFile);
dumpResult("testDns", testDns(), outputFile);
}
@@ -138,9 +141,12 @@
* Tests to connect via sntp.
* @return true if it was able to connect, false otherwise.
*/
- public static boolean testSntp() {
+ public static boolean testSntp(Context context) {
final SntpClient client = new SntpClient();
- if (client.requestTime("0.pool.ntp.org", 10000)) {
+ final ConnectivityManager mCM = context.getSystemService(ConnectivityManager.class);
+ final Network network = mCM.getActiveNetwork();
+
+ if (client.requestTime("0.pool.ntp.org", 10000, network)) {
return true;
}
return false;
diff --git a/tests/BatteryWaster/Android.mk b/tests/BatteryWaster/Android.mk
index 6db34a7..fb244a8 100644
--- a/tests/BatteryWaster/Android.mk
+++ b/tests/BatteryWaster/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := BatteryWaster
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/tests/BiDiTests/Android.mk b/tests/BiDiTests/Android.mk
index ae29fc2..78cf4be 100644
--- a/tests/BiDiTests/Android.mk
+++ b/tests/BiDiTests/Android.mk
@@ -21,6 +21,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := BiDiTests
+LOCAL_SDK_VERSION := current
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
diff --git a/tests/BrowserPowerTest/Android.mk b/tests/BrowserPowerTest/Android.mk
index 59bc729..50f1d10 100644
--- a/tests/BrowserPowerTest/Android.mk
+++ b/tests/BrowserPowerTest/Android.mk
@@ -25,6 +25,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := BrowserPowerTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
#LOCAL_INSTRUMENTATION_FOR := browserpowertest
diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.bp b/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.bp
new file mode 100644
index 0000000..0b16b0e
--- /dev/null
+++ b/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.bp
@@ -0,0 +1,41 @@
+// Copyright (C) 2013 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.
+//
+
+cc_test_library {
+ name: "libsmartcamera_jni",
+
+ sdk_version: "14",
+
+ srcs: [
+ "contrast.cpp",
+ "brightness.cpp",
+ "exposure.cpp",
+ "colorspace.cpp",
+ "histogram.cpp",
+ "frametovalues.cpp",
+ "pixelutils.cpp",
+ "sobeloperator.cpp",
+ "stats_scorer.cpp",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+
+ stl: "c++_static",
+}
diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.mk b/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.mk
deleted file mode 100644
index 6e0d58a..0000000
--- a/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright (C) 2013 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.
-#
-
-FILTERFW_NATIVE_PATH := $(call my-dir)
-
-
-#
-# Build module libfilterframework
-#
-LOCAL_PATH := $(FILTERFW_NATIVE_PATH)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SDK_VERSION := 14
-
-LOCAL_MODULE := libsmartcamera_jni
-
-LOCAL_SRC_FILES := contrast.cpp \
- brightness.cpp \
- exposure.cpp \
- colorspace.cpp \
- histogram.cpp \
- frametovalues.cpp \
- pixelutils.cpp \
- sobeloperator.cpp \
- stats_scorer.cpp
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter
-
-LOCAL_NDK_STL_VARIANT := c++_static
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/FrameManager.java b/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/FrameManager.java
index 55ed277..9a4348e 100644
--- a/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/FrameManager.java
+++ b/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/FrameManager.java
@@ -354,7 +354,7 @@
assertNotRunning();
FrameSlot slot = getSlot(name);
slot.releaseFrame();
- mFrameSlots.remove(slot);
+ mFrameSlots.remove(name);
}
/**
diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk b/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
index 527d1bbf..541bddc 100644
--- a/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
+++ b/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
@@ -19,6 +19,7 @@
LOCAL_MODULE_TAGS := tests
# LOCAL_SDK_VERSION := current
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_PACKAGE_NAME := SmartCamera-tests
diff --git a/tests/CameraPrewarmTest/Android.mk b/tests/CameraPrewarmTest/Android.mk
index b6316f0..e128504 100644
--- a/tests/CameraPrewarmTest/Android.mk
+++ b/tests/CameraPrewarmTest/Android.mk
@@ -4,6 +4,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := CameraPrewarmTest
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
LOCAL_CERTIFICATE := platform
diff --git a/tests/CanvasCompare/Android.mk b/tests/CanvasCompare/Android.mk
index 90de503..6b850a9 100644
--- a/tests/CanvasCompare/Android.mk
+++ b/tests/CanvasCompare/Android.mk
@@ -20,6 +20,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-files-under, src)
LOCAL_PACKAGE_NAME := CanvasCompare
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
diff --git a/tests/Compatibility/Android.mk b/tests/Compatibility/Android.mk
index 82e2126..9c47a26 100644
--- a/tests/Compatibility/Android.mk
+++ b/tests/Compatibility/Android.mk
@@ -24,6 +24,7 @@
LOCAL_PACKAGE_NAME := AppCompatibilityTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/tests/CoreTests/android/Android.mk b/tests/CoreTests/android/Android.mk
index c9f1161..e568264 100644
--- a/tests/CoreTests/android/Android.mk
+++ b/tests/CoreTests/android/Android.mk
@@ -10,5 +10,6 @@
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := CoreTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/DataIdleTest/Android.mk b/tests/DataIdleTest/Android.mk
index 4e15729..17ba75f 100644
--- a/tests/DataIdleTest/Android.mk
+++ b/tests/DataIdleTest/Android.mk
@@ -20,6 +20,7 @@
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := DataIdleTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/DozeTest/Android.mk b/tests/DozeTest/Android.mk
index 01f10e5..ec250ff 100644
--- a/tests/DozeTest/Android.mk
+++ b/tests/DozeTest/Android.mk
@@ -7,6 +7,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := DozeTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/DpiTest/Android.mk b/tests/DpiTest/Android.mk
index f55ce6e..e69d082 100644
--- a/tests/DpiTest/Android.mk
+++ b/tests/DpiTest/Android.mk
@@ -4,6 +4,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := DensityTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
diff --git a/tests/FeatureSplit/base/Android.mk b/tests/FeatureSplit/base/Android.mk
index 93f6d7a..5ddceda 100644
--- a/tests/FeatureSplit/base/Android.mk
+++ b/tests/FeatureSplit/base/Android.mk
@@ -19,6 +19,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := FeatureSplitBase
+LOCAL_SDK_VERSION := current
LOCAL_EXPORT_PACKAGE_RESOURCES := true
LOCAL_MODULE_TAGS := tests
diff --git a/tests/FeatureSplit/feature1/Android.mk b/tests/FeatureSplit/feature1/Android.mk
index e6ba5c2..d4d2589 100644
--- a/tests/FeatureSplit/feature1/Android.mk
+++ b/tests/FeatureSplit/feature1/Android.mk
@@ -20,6 +20,7 @@
LOCAL_USE_AAPT2 := true
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := FeatureSplit1
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
LOCAL_APK_LIBRARIES := FeatureSplitBase
diff --git a/tests/FeatureSplit/feature2/Android.mk b/tests/FeatureSplit/feature2/Android.mk
index c8e8609..5e5e78b 100644
--- a/tests/FeatureSplit/feature2/Android.mk
+++ b/tests/FeatureSplit/feature2/Android.mk
@@ -20,6 +20,7 @@
LOCAL_USE_AAPT2 := true
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := FeatureSplit2
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
LOCAL_APK_LIBRARIES := FeatureSplitBase
diff --git a/tests/FixVibrateSetting/Android.mk b/tests/FixVibrateSetting/Android.mk
index 2a88e5a..86db09e 100644
--- a/tests/FixVibrateSetting/Android.mk
+++ b/tests/FixVibrateSetting/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := FixVibrateSetting
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/tests/FrameworkPerf/Android.mk b/tests/FrameworkPerf/Android.mk
index d2ec753..b083c12 100644
--- a/tests/FrameworkPerf/Android.mk
+++ b/tests/FrameworkPerf/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := FrameworkPerf
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
diff --git a/tests/GridLayoutTest/Android.mk b/tests/GridLayoutTest/Android.mk
index a02918b..e7e3ccd 100644
--- a/tests/GridLayoutTest/Android.mk
+++ b/tests/GridLayoutTest/Android.mk
@@ -20,6 +20,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := GridLayoutTest
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
diff --git a/tests/HierarchyViewerTest/Android.mk b/tests/HierarchyViewerTest/Android.mk
index f8c8656..cf1a512 100644
--- a/tests/HierarchyViewerTest/Android.mk
+++ b/tests/HierarchyViewerTest/Android.mk
@@ -6,8 +6,9 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := HierarchyViewerTest
+LOCAL_SDK_VERSION := current
-LOCAL_JAVA_LIBRARIES := android.test.runner
-LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
+LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
+LOCAL_STATIC_JAVA_LIBRARIES := junit
include $(BUILD_PACKAGE)
diff --git a/tests/HwAccelerationTest/Android.mk b/tests/HwAccelerationTest/Android.mk
index d4743f9..11ea954 100644
--- a/tests/HwAccelerationTest/Android.mk
+++ b/tests/HwAccelerationTest/Android.mk
@@ -20,6 +20,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := HwAccelerationTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
diff --git a/tests/ImfTest/Android.mk b/tests/ImfTest/Android.mk
index eb5327b..a8f5b08 100644
--- a/tests/ImfTest/Android.mk
+++ b/tests/ImfTest/Android.mk
@@ -8,6 +8,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := ImfTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/ImfTest/tests/Android.mk b/tests/ImfTest/tests/Android.mk
index 6042471..2a49998 100644
--- a/tests/ImfTest/tests/Android.mk
+++ b/tests/ImfTest/tests/Android.mk
@@ -11,6 +11,7 @@
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := ImfTestTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_INSTRUMENTATION_FOR := ImfTest
diff --git a/tests/Internal/Android.mk b/tests/Internal/Android.mk
index fc001e9..a8fb395 100644
--- a/tests/Internal/Android.mk
+++ b/tests/Internal/Android.mk
@@ -18,6 +18,7 @@
LOCAL_CERTIFICATE := platform
LOCAL_PACKAGE_NAME := InternalTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
include $(BUILD_PACKAGE)
diff --git a/tests/JobSchedulerTestApp/Android.mk b/tests/JobSchedulerTestApp/Android.mk
index 7336d8c..48ee1f6 100644
--- a/tests/JobSchedulerTestApp/Android.mk
+++ b/tests/JobSchedulerTestApp/Android.mk
@@ -8,6 +8,7 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := JobSchedulerTestApp
+LOCAL_SDK_VERSION := current
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/tests/LargeAssetTest/Android.mk b/tests/LargeAssetTest/Android.mk
index cb7f01b..f6d98bf 100644
--- a/tests/LargeAssetTest/Android.mk
+++ b/tests/LargeAssetTest/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := LargeAssetTest
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/tests/LegacyAssistant/Android.mk b/tests/LegacyAssistant/Android.mk
index 0ad48d1..a583369 100644
--- a/tests/LegacyAssistant/Android.mk
+++ b/tests/LegacyAssistant/Android.mk
@@ -4,6 +4,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := LegacyAssistant
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
LOCAL_CERTIFICATE := platform
diff --git a/tests/LocationTracker/Android.mk b/tests/LocationTracker/Android.mk
index b142d22..0d51b3b 100644
--- a/tests/LocationTracker/Android.mk
+++ b/tests/LocationTracker/Android.mk
@@ -4,6 +4,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := LocationTracker
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
diff --git a/tests/LockTaskTests/Android.mk b/tests/LockTaskTests/Android.mk
index ed58643..a693eaa 100644
--- a/tests/LockTaskTests/Android.mk
+++ b/tests/LockTaskTests/Android.mk
@@ -5,6 +5,7 @@
LOCAL_MODULE_PATH := $(PRODUCT_OUT)/system/priv-app
LOCAL_PACKAGE_NAME := LockTaskTests
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-Iaidl-files-under, src) $(call all-java-files-under, src)
diff --git a/tests/LotsOfApps/Android.mk b/tests/LotsOfApps/Android.mk
index 0ef9550..bee3bcc 100644
--- a/tests/LotsOfApps/Android.mk
+++ b/tests/LotsOfApps/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := LotsOfApps
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/tests/LotsOfApps/AndroidManifest.xml b/tests/LotsOfApps/AndroidManifest.xml
index 1a16570..585ddcc 100644
--- a/tests/LotsOfApps/AndroidManifest.xml
+++ b/tests/LotsOfApps/AndroidManifest.xml
@@ -7,700 +7,700 @@
<uses-permission android:name="android.permission.VIBRATE" />
<application>
- <activity android:name="00" android:icon="@drawable/ic_launcher_add_folder">
+ <activity android:name="com.android.lotsofapps.activity00" android:icon="@drawable/ic_launcher_add_folder">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="01" android:icon="@drawable/ic_launcher_alarmclock">
+ <activity android:name="com.android.lotsofapps.activity01" android:icon="@drawable/ic_launcher_alarmclock">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="02" android:icon="@drawable/ic_launcher_application">
+ <activity android:name="com.android.lotsofapps.activity02" android:icon="@drawable/ic_launcher_application">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="03" android:icon="@drawable/ic_launcher_browser">
+ <activity android:name="com.android.lotsofapps.activity03" android:icon="@drawable/ic_launcher_browser">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="04" android:icon="@drawable/ic_launcher_camera">
+ <activity android:name="com.android.lotsofapps.activity04" android:icon="@drawable/ic_launcher_camera">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="05" android:icon="@drawable/ic_launcher_camera_record">
+ <activity android:name="com.android.lotsofapps.activity05" android:icon="@drawable/ic_launcher_camera_record">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="06" android:icon="@drawable/ic_launcher_contacts">
+ <activity android:name="com.android.lotsofapps.activity06" android:icon="@drawable/ic_launcher_contacts">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="07" android:icon="@drawable/ic_launcher_drm_file">
+ <activity android:name="com.android.lotsofapps.activity07" android:icon="@drawable/ic_launcher_drm_file">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="08" android:icon="@drawable/ic_launcher_folder">
+ <activity android:name="com.android.lotsofapps.activity08" android:icon="@drawable/ic_launcher_folder">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="09" android:icon="@drawable/ic_launcher_folder_bluetooth">
+ <activity android:name="com.android.lotsofapps.activity09" android:icon="@drawable/ic_launcher_folder_bluetooth">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="10" android:icon="@drawable/ic_launcher_folder_live">
+ <activity android:name="com.android.lotsofapps.activity10" android:icon="@drawable/ic_launcher_folder_live">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="11" android:icon="@drawable/ic_launcher_folder_live_contacts">
+ <activity android:name="com.android.lotsofapps.activity11" android:icon="@drawable/ic_launcher_folder_live_contacts">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="12" android:icon="@drawable/ic_launcher_folder_live_contacts_phone">
+ <activity android:name="com.android.lotsofapps.activity12" android:icon="@drawable/ic_launcher_folder_live_contacts_phone">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="13" android:icon="@drawable/ic_launcher_folder_live_contacts_starred">
+ <activity android:name="com.android.lotsofapps.activity13" android:icon="@drawable/ic_launcher_folder_live_contacts_starred">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="14" android:icon="@drawable/ic_launcher_folder_open">
+ <activity android:name="com.android.lotsofapps.activity14" android:icon="@drawable/ic_launcher_folder_open">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="15" android:icon="@drawable/ic_launcher_gallery">
+ <activity android:name="com.android.lotsofapps.activity15" android:icon="@drawable/ic_launcher_gallery">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="16" android:icon="@drawable/ic_launcher_home">
+ <activity android:name="com.android.lotsofapps.activity16" android:icon="@drawable/ic_launcher_home">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="17" android:icon="@drawable/ic_launcher_im">
+ <activity android:name="com.android.lotsofapps.activity17" android:icon="@drawable/ic_launcher_im">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="18" android:icon="@drawable/ic_launcher_musicplayer_2">
+ <activity android:name="com.android.lotsofapps.activity18" android:icon="@drawable/ic_launcher_musicplayer_2">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="19" android:icon="@drawable/ic_launcher_phone">
+ <activity android:name="com.android.lotsofapps.activity19" android:icon="@drawable/ic_launcher_phone">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="20" android:icon="@drawable/ic_launcher_record_audio">
+ <activity android:name="com.android.lotsofapps.activity20" android:icon="@drawable/ic_launcher_record_audio">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="21" android:icon="@drawable/ic_launcher_settings">
+ <activity android:name="com.android.lotsofapps.activity21" android:icon="@drawable/ic_launcher_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="22" android:icon="@drawable/ic_launcher_shortcut">
+ <activity android:name="com.android.lotsofapps.activity22" android:icon="@drawable/ic_launcher_shortcut">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="23" android:icon="@drawable/ic_launcher_shortcut_browser_bookmark">
+ <activity android:name="com.android.lotsofapps.activity23" android:icon="@drawable/ic_launcher_shortcut_browser_bookmark">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="24" android:icon="@drawable/ic_launcher_contacts">
+ <activity android:name="com.android.lotsofapps.activity24" android:icon="@drawable/ic_launcher_contacts">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="25" android:icon="@drawable/ic_launcher_shortcut_directdial">
+ <activity android:name="com.android.lotsofapps.activity25" android:icon="@drawable/ic_launcher_shortcut_directdial">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="26" android:icon="@drawable/ic_launcher_shortcut_directmessage">
+ <activity android:name="com.android.lotsofapps.activity26" android:icon="@drawable/ic_launcher_shortcut_directmessage">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="27" android:icon="@drawable/ic_launcher_browser">
+ <activity android:name="com.android.lotsofapps.activity27" android:icon="@drawable/ic_launcher_browser">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="28" android:icon="@drawable/ic_launcher_sim_toolkit">
+ <activity android:name="com.android.lotsofapps.activity28" android:icon="@drawable/ic_launcher_sim_toolkit">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="29" android:icon="@drawable/ic_launcher_slideshow_add_sms">
+ <activity android:name="com.android.lotsofapps.activity29" android:icon="@drawable/ic_launcher_slideshow_add_sms">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="20" android:icon="@drawable/ic_launcher_slideshow_default_sms">
+ <activity android:name="com.android.lotsofapps.activity20" android:icon="@drawable/ic_launcher_slideshow_default_sms">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="31" android:icon="@drawable/ic_launcher_smsmms">
+ <activity android:name="com.android.lotsofapps.activity31" android:icon="@drawable/ic_launcher_smsmms">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="32" android:icon="@drawable/ic_launcher_soundrecorder">
+ <activity android:name="com.android.lotsofapps.activity32" android:icon="@drawable/ic_launcher_soundrecorder">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="33" android:icon="@drawable/ic_launcher_video_camera">
+ <activity android:name="com.android.lotsofapps.activity33" android:icon="@drawable/ic_launcher_video_camera">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="34" android:icon="@drawable/ic_launcher_video_player">
+ <activity android:name="com.android.lotsofapps.activity34" android:icon="@drawable/ic_launcher_video_player">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="35" android:icon="@drawable/ic_launcher_wallpaper">
+ <activity android:name="com.android.lotsofapps.activity35" android:icon="@drawable/ic_launcher_wallpaper">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="36" android:icon="@drawable/ic_launcher_im">
+ <activity android:name="com.android.lotsofapps.activity36" android:icon="@drawable/ic_launcher_im">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="37" android:icon="@drawable/ic_launcher_musicplayer_2">
+ <activity android:name="com.android.lotsofapps.activity37" android:icon="@drawable/ic_launcher_musicplayer_2">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="38" android:icon="@drawable/ic_launcher_phone">
+ <activity android:name="com.android.lotsofapps.activity38" android:icon="@drawable/ic_launcher_phone">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="39" android:icon="@drawable/ic_launcher_record_audio">
+ <activity android:name="com.android.lotsofapps.activity39" android:icon="@drawable/ic_launcher_record_audio">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="40" android:icon="@drawable/ic_launcher_settings">
+ <activity android:name="com.android.lotsofapps.activity40" android:icon="@drawable/ic_launcher_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="41" android:icon="@drawable/ic_launcher_shortcut">
+ <activity android:name="com.android.lotsofapps.activity41" android:icon="@drawable/ic_launcher_shortcut">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="42" android:icon="@drawable/ic_launcher_sim_toolkit">
+ <activity android:name="com.android.lotsofapps.activity42" android:icon="@drawable/ic_launcher_sim_toolkit">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="43" android:icon="@drawable/ic_launcher_smsmms">
+ <activity android:name="com.android.lotsofapps.activity43" android:icon="@drawable/ic_launcher_smsmms">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="44" android:icon="@drawable/ic_launcher_soundrecorder">
+ <activity android:name="com.android.lotsofapps.activity44" android:icon="@drawable/ic_launcher_soundrecorder">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="45" android:icon="@drawable/ic_launcher_video_camera">
+ <activity android:name="com.android.lotsofapps.activity45" android:icon="@drawable/ic_launcher_video_camera">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="46" android:icon="@drawable/ic_launcher_wallpaper">
+ <activity android:name="com.android.lotsofapps.activity46" android:icon="@drawable/ic_launcher_wallpaper">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="47" android:icon="@drawable/ic_launcher_drm_file">
+ <activity android:name="com.android.lotsofapps.activity47" android:icon="@drawable/ic_launcher_drm_file">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="48" android:icon="@drawable/ic_launcher_contacts">
+ <activity android:name="com.android.lotsofapps.activity48" android:icon="@drawable/ic_launcher_contacts">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="49" android:icon="@drawable/ic_launcher_drm_file">
+ <activity android:name="com.android.lotsofapps.activity49" android:icon="@drawable/ic_launcher_drm_file">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="50" android:icon="@drawable/ic_launcher_add_folder">
+ <activity android:name="com.android.lotsofapps.activity50" android:icon="@drawable/ic_launcher_add_folder">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="51" android:icon="@drawable/ic_launcher_alarmclock">
+ <activity android:name="com.android.lotsofapps.activity51" android:icon="@drawable/ic_launcher_alarmclock">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="52" android:icon="@drawable/ic_launcher_application">
+ <activity android:name="com.android.lotsofapps.activity52" android:icon="@drawable/ic_launcher_application">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="53" android:icon="@drawable/ic_launcher_browser">
+ <activity android:name="com.android.lotsofapps.activity53" android:icon="@drawable/ic_launcher_browser">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="54" android:icon="@drawable/ic_launcher_camera">
+ <activity android:name="com.android.lotsofapps.activity54" android:icon="@drawable/ic_launcher_camera">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="55" android:icon="@drawable/ic_launcher_camera_record">
+ <activity android:name="com.android.lotsofapps.activity55" android:icon="@drawable/ic_launcher_camera_record">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="56" android:icon="@drawable/ic_launcher_contacts">
+ <activity android:name="com.android.lotsofapps.activity56" android:icon="@drawable/ic_launcher_contacts">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="57" android:icon="@drawable/ic_launcher_drm_file">
+ <activity android:name="com.android.lotsofapps.activity57" android:icon="@drawable/ic_launcher_drm_file">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="58" android:icon="@drawable/ic_launcher_folder">
+ <activity android:name="com.android.lotsofapps.activity58" android:icon="@drawable/ic_launcher_folder">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="59" android:icon="@drawable/ic_launcher_folder_bluetooth">
+ <activity android:name="com.android.lotsofapps.activity59" android:icon="@drawable/ic_launcher_folder_bluetooth">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="60" android:icon="@drawable/ic_launcher_folder_live">
+ <activity android:name="com.android.lotsofapps.activity60" android:icon="@drawable/ic_launcher_folder_live">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="61" android:icon="@drawable/ic_launcher_folder_live_contacts">
+ <activity android:name="com.android.lotsofapps.activity61" android:icon="@drawable/ic_launcher_folder_live_contacts">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="62" android:icon="@drawable/ic_launcher_folder_live_contacts_phone">
+ <activity android:name="com.android.lotsofapps.activity62" android:icon="@drawable/ic_launcher_folder_live_contacts_phone">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="63" android:icon="@drawable/ic_launcher_folder_live_contacts_starred">
+ <activity android:name="com.android.lotsofapps.activity63" android:icon="@drawable/ic_launcher_folder_live_contacts_starred">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="64" android:icon="@drawable/ic_launcher_folder_open">
+ <activity android:name="com.android.lotsofapps.activity64" android:icon="@drawable/ic_launcher_folder_open">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="65" android:icon="@drawable/ic_launcher_gallery">
+ <activity android:name="com.android.lotsofapps.activity65" android:icon="@drawable/ic_launcher_gallery">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="66" android:icon="@drawable/ic_launcher_home">
+ <activity android:name="com.android.lotsofapps.activity66" android:icon="@drawable/ic_launcher_home">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="67" android:icon="@drawable/ic_launcher_im">
+ <activity android:name="com.android.lotsofapps.activity67" android:icon="@drawable/ic_launcher_im">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="68" android:icon="@drawable/ic_launcher_musicplayer_2">
+ <activity android:name="com.android.lotsofapps.activity68" android:icon="@drawable/ic_launcher_musicplayer_2">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="69" android:icon="@drawable/ic_launcher_phone">
+ <activity android:name="com.android.lotsofapps.activity69" android:icon="@drawable/ic_launcher_phone">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="70" android:icon="@drawable/ic_launcher_record_audio">
+ <activity android:name="com.android.lotsofapps.activity70" android:icon="@drawable/ic_launcher_record_audio">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="71" android:icon="@drawable/ic_launcher_settings">
+ <activity android:name="com.android.lotsofapps.activity71" android:icon="@drawable/ic_launcher_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="72" android:icon="@drawable/ic_launcher_shortcut">
+ <activity android:name="com.android.lotsofapps.activity72" android:icon="@drawable/ic_launcher_shortcut">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="73" android:icon="@drawable/ic_launcher_shortcut_browser_bookmark">
+ <activity android:name="com.android.lotsofapps.activity73" android:icon="@drawable/ic_launcher_shortcut_browser_bookmark">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="74" android:icon="@drawable/ic_launcher_contacts">
+ <activity android:name="com.android.lotsofapps.activity74" android:icon="@drawable/ic_launcher_contacts">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="75" android:icon="@drawable/ic_launcher_shortcut_directdial">
+ <activity android:name="com.android.lotsofapps.activity75" android:icon="@drawable/ic_launcher_shortcut_directdial">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="76" android:icon="@drawable/ic_launcher_shortcut_directmessage">
+ <activity android:name="com.android.lotsofapps.activity76" android:icon="@drawable/ic_launcher_shortcut_directmessage">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="77" android:icon="@drawable/ic_launcher_browser">
+ <activity android:name="com.android.lotsofapps.activity77" android:icon="@drawable/ic_launcher_browser">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="78" android:icon="@drawable/ic_launcher_sim_toolkit">
+ <activity android:name="com.android.lotsofapps.activity78" android:icon="@drawable/ic_launcher_sim_toolkit">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="79" android:icon="@drawable/ic_launcher_slideshow_add_sms">
+ <activity android:name="com.android.lotsofapps.activity79" android:icon="@drawable/ic_launcher_slideshow_add_sms">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="80" android:icon="@drawable/ic_launcher_slideshow_default_sms">
+ <activity android:name="com.android.lotsofapps.activity80" android:icon="@drawable/ic_launcher_slideshow_default_sms">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="81" android:icon="@drawable/ic_launcher_smsmms">
+ <activity android:name="com.android.lotsofapps.activity81" android:icon="@drawable/ic_launcher_smsmms">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="82" android:icon="@drawable/ic_launcher_soundrecorder">
+ <activity android:name="com.android.lotsofapps.activity82" android:icon="@drawable/ic_launcher_soundrecorder">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="83" android:icon="@drawable/ic_launcher_video_camera">
+ <activity android:name="com.android.lotsofapps.activity83" android:icon="@drawable/ic_launcher_video_camera">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="84" android:icon="@drawable/ic_launcher_video_player">
+ <activity android:name="com.android.lotsofapps.activity84" android:icon="@drawable/ic_launcher_video_player">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="85" android:icon="@drawable/ic_launcher_wallpaper">
+ <activity android:name="com.android.lotsofapps.activity85" android:icon="@drawable/ic_launcher_wallpaper">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="86" android:icon="@drawable/ic_launcher_im">
+ <activity android:name="com.android.lotsofapps.activity86" android:icon="@drawable/ic_launcher_im">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="87" android:icon="@drawable/ic_launcher_musicplayer_2">
+ <activity android:name="com.android.lotsofapps.activity87" android:icon="@drawable/ic_launcher_musicplayer_2">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="88" android:icon="@drawable/ic_launcher_phone">
+ <activity android:name="com.android.lotsofapps.activity88" android:icon="@drawable/ic_launcher_phone">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="89" android:icon="@drawable/ic_launcher_record_audio">
+ <activity android:name="com.android.lotsofapps.activity89" android:icon="@drawable/ic_launcher_record_audio">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="90" android:icon="@drawable/ic_launcher_settings">
+ <activity android:name="com.android.lotsofapps.activity90" android:icon="@drawable/ic_launcher_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="91" android:icon="@drawable/ic_launcher_shortcut">
+ <activity android:name="com.android.lotsofapps.activity91" android:icon="@drawable/ic_launcher_shortcut">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="92" android:icon="@drawable/ic_launcher_sim_toolkit">
+ <activity android:name="com.android.lotsofapps.activity92" android:icon="@drawable/ic_launcher_sim_toolkit">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="93" android:icon="@drawable/ic_launcher_smsmms">
+ <activity android:name="com.android.lotsofapps.activity93" android:icon="@drawable/ic_launcher_smsmms">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="94" android:icon="@drawable/ic_launcher_soundrecorder">
+ <activity android:name="com.android.lotsofapps.activity94" android:icon="@drawable/ic_launcher_soundrecorder">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="95" android:icon="@drawable/ic_launcher_video_camera">
+ <activity android:name="com.android.lotsofapps.activity95" android:icon="@drawable/ic_launcher_video_camera">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="96" android:icon="@drawable/ic_launcher_wallpaper">
+ <activity android:name="com.android.lotsofapps.activity96" android:icon="@drawable/ic_launcher_wallpaper">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="97" android:icon="@drawable/ic_launcher_drm_file">
+ <activity android:name="com.android.lotsofapps.activity97" android:icon="@drawable/ic_launcher_drm_file">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="98" android:icon="@drawable/ic_launcher_contacts">
+ <activity android:name="com.android.lotsofapps.activity98" android:icon="@drawable/ic_launcher_contacts">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="99" android:icon="@drawable/ic_launcher_drm_file">
+ <activity android:name="com.android.lotsofapps.activity99" android:icon="@drawable/ic_launcher_drm_file">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
diff --git a/tests/LowStorageTest/Android.mk b/tests/LowStorageTest/Android.mk
index ab5b9e9..bdde6bd 100644
--- a/tests/LowStorageTest/Android.mk
+++ b/tests/LowStorageTest/Android.mk
@@ -21,5 +21,6 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := lowstoragetest
+LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
diff --git a/tests/MemoryUsage/Android.mk b/tests/MemoryUsage/Android.mk
index 578e628..bab6a70 100644
--- a/tests/MemoryUsage/Android.mk
+++ b/tests/MemoryUsage/Android.mk
@@ -7,6 +7,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := MemoryUsage
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := android.test.runner
diff --git a/tests/NetworkSecurityConfigTest/Android.mk b/tests/NetworkSecurityConfigTest/Android.mk
index dd9ff11..e29090b 100644
--- a/tests/NetworkSecurityConfigTest/Android.mk
+++ b/tests/NetworkSecurityConfigTest/Android.mk
@@ -12,5 +12,6 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := NetworkSecurityConfigTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/OneMedia/Android.mk b/tests/OneMedia/Android.mk
index 9fc6403..41f3f64 100644
--- a/tests/OneMedia/Android.mk
+++ b/tests/OneMedia/Android.mk
@@ -7,6 +7,7 @@
$(call all-Iaidl-files-under, src)
LOCAL_PACKAGE_NAME := OneMedia
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES += org.apache.http.legacy
diff --git a/tests/RenderThreadTest/Android.mk b/tests/RenderThreadTest/Android.mk
index e07e943..4e5f35b 100644
--- a/tests/RenderThreadTest/Android.mk
+++ b/tests/RenderThreadTest/Android.mk
@@ -7,6 +7,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := RenderThreadTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_STATIC_JAVA_LIBRARIES += android-common
diff --git a/tests/SerialChat/Android.mk b/tests/SerialChat/Android.mk
index a534e1a..ed6ca999 100644
--- a/tests/SerialChat/Android.mk
+++ b/tests/SerialChat/Android.mk
@@ -22,5 +22,6 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := SerialChat
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/ServiceCrashTest/Android.mk b/tests/ServiceCrashTest/Android.mk
index d1f8456..3aa7132 100644
--- a/tests/ServiceCrashTest/Android.mk
+++ b/tests/ServiceCrashTest/Android.mk
@@ -7,6 +7,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := ServiceCrashTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := legacy-android-test
diff --git a/tests/SharedLibrary/client/Android.mk b/tests/SharedLibrary/client/Android.mk
index a04fb05..9e76c40 100644
--- a/tests/SharedLibrary/client/Android.mk
+++ b/tests/SharedLibrary/client/Android.mk
@@ -7,6 +7,7 @@
LOCAL_RES_LIBRARIES := SharedLibrary
LOCAL_PACKAGE_NAME := SharedLibraryClient
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
diff --git a/tests/SharedLibrary/lib/Android.mk b/tests/SharedLibrary/lib/Android.mk
index 78fcb8b..3c1ca87 100644
--- a/tests/SharedLibrary/lib/Android.mk
+++ b/tests/SharedLibrary/lib/Android.mk
@@ -6,6 +6,7 @@
LOCAL_AAPT_FLAGS := --shared-lib
LOCAL_PACKAGE_NAME := SharedLibrary
+LOCAL_SDK_VERSION := current
LOCAL_EXPORT_PACKAGE_RESOURCES := true
LOCAL_PRIVILEGED_MODULE := true
diff --git a/tests/ShowWhenLockedApp/Android.mk b/tests/ShowWhenLockedApp/Android.mk
index 0064167..41e0ac4 100644
--- a/tests/ShowWhenLockedApp/Android.mk
+++ b/tests/ShowWhenLockedApp/Android.mk
@@ -4,6 +4,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := ShowWhenLocked
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
diff --git a/tests/SmokeTestApps/Android.mk b/tests/SmokeTestApps/Android.mk
index 3f5f011..1f564e0 100644
--- a/tests/SmokeTestApps/Android.mk
+++ b/tests/SmokeTestApps/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := SmokeTestTriggerApps
+LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
diff --git a/tests/SoundTriggerTestApp/Android.mk b/tests/SoundTriggerTestApp/Android.mk
index c327b09..73fb5e8 100644
--- a/tests/SoundTriggerTestApp/Android.mk
+++ b/tests/SoundTriggerTestApp/Android.mk
@@ -4,6 +4,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := SoundTriggerTestApp
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := optional
diff --git a/tests/SoundTriggerTests/Android.mk b/tests/SoundTriggerTests/Android.mk
index 359484e..774fc85 100644
--- a/tests/SoundTriggerTests/Android.mk
+++ b/tests/SoundTriggerTests/Android.mk
@@ -31,5 +31,6 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := SoundTriggerTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/Split/Android.mk b/tests/Split/Android.mk
index b068bef..4d15b2d 100644
--- a/tests/Split/Android.mk
+++ b/tests/Split/Android.mk
@@ -19,6 +19,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := Split
+LOCAL_SDK_VERSION := current
LOCAL_PACKAGE_SPLITS := mdpi-v4 hdpi-v4 xhdpi-v4 xxhdpi-v4
diff --git a/tests/StatusBar/Android.mk b/tests/StatusBar/Android.mk
index 502657f..e845335 100644
--- a/tests/StatusBar/Android.mk
+++ b/tests/StatusBar/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := StatusBarTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionTest.java b/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionTest.java
index 388f91a..261ea2e 100644
--- a/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionTest.java
+++ b/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionTest.java
@@ -66,9 +66,6 @@
super(SurfaceCompositionMeasuringActivity.class);
}
- private void testRestoreContexts() {
- }
-
@SmallTest
public void testSurfaceCompositionPerformance() {
Bundle status = new Bundle();
diff --git a/tests/SystemUIDemoModeController/Android.mk b/tests/SystemUIDemoModeController/Android.mk
index 64ea63c..cc6fa8d 100644
--- a/tests/SystemUIDemoModeController/Android.mk
+++ b/tests/SystemUIDemoModeController/Android.mk
@@ -6,5 +6,6 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := DemoModeController
+LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
diff --git a/tests/TouchLatency/Android.mk b/tests/TouchLatency/Android.mk
index 969283d..2334bd8 100644
--- a/tests/TouchLatency/Android.mk
+++ b/tests/TouchLatency/Android.mk
@@ -15,6 +15,7 @@
--auto-add-overlay
LOCAL_PACKAGE_NAME := TouchLatency
+LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := device-tests
diff --git a/tests/TransformTest/Android.mk b/tests/TransformTest/Android.mk
index 2d3637d..5340cdd 100644
--- a/tests/TransformTest/Android.mk
+++ b/tests/TransformTest/Android.mk
@@ -4,6 +4,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := TransformTest
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
diff --git a/tests/TransitionTests/Android.mk b/tests/TransitionTests/Android.mk
index 22fa638..a696156 100644
--- a/tests/TransitionTests/Android.mk
+++ b/tests/TransitionTests/Android.mk
@@ -7,6 +7,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := TransitionTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_STATIC_JAVA_LIBRARIES += android-common
diff --git a/tests/TtsTests/Android.mk b/tests/TtsTests/Android.mk
index 3c3cd77..4fee739 100644
--- a/tests/TtsTests/Android.mk
+++ b/tests/TtsTests/Android.mk
@@ -24,5 +24,6 @@
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := TtsTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/UiBench/Android.mk b/tests/UiBench/Android.mk
index e6af4b02..60327e5 100644
--- a/tests/UiBench/Android.mk
+++ b/tests/UiBench/Android.mk
@@ -10,23 +10,11 @@
# use appcompat/support lib from the tree, so improvements/
# regressions are reflected in test data
-LOCAL_RESOURCE_DIR := \
- $(LOCAL_PATH)/res \
- frameworks/support/design/res \
- frameworks/support/v7/appcompat/res \
- frameworks/support/v7/cardview/res \
- frameworks/support/v7/recyclerview/res \
- frameworks/support/v17/leanback/res
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_AAPT_FLAGS := \
- --auto-add-overlay \
- --extra-packages android.support.design \
- --extra-packages android.support.v7.appcompat \
- --extra-packages android.support.v7.cardview \
- --extra-packages android.support.v7.recyclerview \
- --extra-packages android.support.v17.leanback
+LOCAL_USE_AAPT2 := true
-LOCAL_STATIC_JAVA_LIBRARIES := \
+LOCAL_STATIC_ANDROID_LIBRARIES := \
android-support-design \
android-support-v4 \
android-support-v7-appcompat \
diff --git a/tests/UsageStatsTest/Android.mk b/tests/UsageStatsTest/Android.mk
index 6b5c999..6735c7c 100644
--- a/tests/UsageStatsTest/Android.mk
+++ b/tests/UsageStatsTest/Android.mk
@@ -11,5 +11,6 @@
LOCAL_CERTIFICATE := platform
LOCAL_PACKAGE_NAME := UsageStatsTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk b/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk
index 3137a73..cd7aaed 100644
--- a/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk
+++ b/tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.mk
@@ -25,6 +25,7 @@
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)
diff --git a/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk b/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk
index 354e8c9..bd8a51b 100644
--- a/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk
+++ b/tests/UsbHostExternalManagmentTest/AoapTestHost/Android.mk
@@ -25,6 +25,7 @@
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)
diff --git a/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk b/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk
index 2d6d6ea8..fed454e 100644
--- a/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk
+++ b/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.mk
@@ -25,6 +25,7 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := UsbHostExternalManagementTestApp
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_PRIVILEGED_MODULE := true
# TODO remove tests tag
diff --git a/tests/UsesFeature2Test/Android.mk b/tests/UsesFeature2Test/Android.mk
index cc784d7..4cba4ff 100644
--- a/tests/UsesFeature2Test/Android.mk
+++ b/tests/UsesFeature2Test/Android.mk
@@ -19,6 +19,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := UsesFeature2Test
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
diff --git a/tests/VectorDrawableTest/Android.mk b/tests/VectorDrawableTest/Android.mk
index dd8a4d4..155b2bc 100644
--- a/tests/VectorDrawableTest/Android.mk
+++ b/tests/VectorDrawableTest/Android.mk
@@ -20,6 +20,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := VectorDrawableTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
diff --git a/tests/VoiceEnrollment/Android.mk b/tests/VoiceEnrollment/Android.mk
index 2ab3d02..725e2bd 100644
--- a/tests/VoiceEnrollment/Android.mk
+++ b/tests/VoiceEnrollment/Android.mk
@@ -4,6 +4,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := VoiceEnrollment
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := optional
diff --git a/tests/VoiceInteraction/Android.mk b/tests/VoiceInteraction/Android.mk
index 8decca7..aa48b42 100644
--- a/tests/VoiceInteraction/Android.mk
+++ b/tests/VoiceInteraction/Android.mk
@@ -6,5 +6,6 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := VoiceInteraction
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/WallpaperTest/Android.mk b/tests/WallpaperTest/Android.mk
index b4259cd..4815500 100644
--- a/tests/WallpaperTest/Android.mk
+++ b/tests/WallpaperTest/Android.mk
@@ -8,6 +8,7 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_PACKAGE_NAME := WallpaperTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/tests/WindowManagerStressTest/Android.mk b/tests/WindowManagerStressTest/Android.mk
index e4cbe93..6f4403f 100644
--- a/tests/WindowManagerStressTest/Android.mk
+++ b/tests/WindowManagerStressTest/Android.mk
@@ -20,6 +20,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := WindowManagerStressTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
diff --git a/tests/appwidgets/AppWidgetHostTest/Android.mk b/tests/appwidgets/AppWidgetHostTest/Android.mk
index 4d0c704..c9e6c6b 100644
--- a/tests/appwidgets/AppWidgetHostTest/Android.mk
+++ b/tests/appwidgets/AppWidgetHostTest/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := AppWidgetHostTest
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/tests/appwidgets/AppWidgetProviderTest/Android.mk b/tests/appwidgets/AppWidgetProviderTest/Android.mk
index 6084fb9..b26c60b 100644
--- a/tests/appwidgets/AppWidgetProviderTest/Android.mk
+++ b/tests/appwidgets/AppWidgetProviderTest/Android.mk
@@ -6,6 +6,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := AppWidgetProvider
+LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
diff --git a/tests/backup/Android.mk b/tests/backup/Android.mk
index 202a699..e9618300 100644
--- a/tests/backup/Android.mk
+++ b/tests/backup/Android.mk
@@ -40,6 +40,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := BackupTest
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/tests/net/Android.mk b/tests/net/Android.mk
index 24524e3..b3a82f5 100644
--- a/tests/net/Android.mk
+++ b/tests/net/Android.mk
@@ -24,6 +24,7 @@
android.test.runner
LOCAL_PACKAGE_NAME := FrameworksNetTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
@@ -31,12 +32,15 @@
# These are not normally accessible from apps so they must be explicitly included.
LOCAL_JNI_SHARED_LIBRARIES := \
android.hidl.token@1.0 \
+ $(UBSAN_RUNTIME_LIBRARY) \
+ libartbase \
libbacktrace \
libbase \
libbinder \
libc++ \
libcrypto \
libcutils \
+ libdexfile \
libframeworksnettestsjni \
libhidl-gen-utils \
libhidlbase \
@@ -50,13 +54,14 @@
libpcre2 \
libselinux \
libui \
- libunwind \
libutils \
libvintf \
libvndksupport \
libtinyxml2 \
libunwindstack \
- libutilscallstack
+ libutilscallstack \
+ libziparchive \
+ libz
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
diff --git a/tests/net/OWNERS b/tests/net/OWNERS
index 6f77e04..ce50558 100644
--- a/tests/net/OWNERS
+++ b/tests/net/OWNERS
@@ -1,7 +1,6 @@
set noparent
ek@google.com
-hugobenichi@google.com
jchalard@google.com
lorenzo@google.com
satk@google.com
diff --git a/tests/net/java/android/app/usage/NetworkStatsManagerTest.java b/tests/net/java/android/app/usage/NetworkStatsManagerTest.java
new file mode 100644
index 0000000..25e1474
--- /dev/null
+++ b/tests/net/java/android/app/usage/NetworkStatsManagerTest.java
@@ -0,0 +1,213 @@
+/*
+ * 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.
+ */
+
+package android.app.usage;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.net.ConnectivityManager;
+import android.net.INetworkStatsService;
+import android.net.INetworkStatsSession;
+import android.net.NetworkStats.Entry;
+import android.net.NetworkStatsHistory;
+import android.net.NetworkTemplate;
+import android.os.RemoteException;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.invocation.InvocationOnMock;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class NetworkStatsManagerTest {
+
+ private @Mock INetworkStatsService mService;
+ private @Mock INetworkStatsSession mStatsSession;
+
+ private NetworkStatsManager mManager;
+
+ // TODO: change to NetworkTemplate.MATCH_MOBILE once internal constant rename is merged to aosp.
+ private static final int MATCH_MOBILE_ALL = 1;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mManager = new NetworkStatsManager(InstrumentationRegistry.getContext(), mService);
+ }
+
+ @Test
+ public void testQueryDetails() throws RemoteException {
+ final String subscriberId = "subid";
+ final long startTime = 1;
+ final long endTime = 100;
+ final int uid1 = 10001;
+ final int uid2 = 10002;
+ final int uid3 = 10003;
+
+ Entry uid1Entry1 = new Entry("if1", uid1,
+ android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE,
+ 100, 10, 200, 20, 0);
+
+ Entry uid1Entry2 = new Entry(
+ "if2", uid1,
+ android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE,
+ 100, 10, 200, 20, 0);
+
+ Entry uid2Entry1 = new Entry("if1", uid2,
+ android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE,
+ 150, 10, 250, 20, 0);
+
+ Entry uid2Entry2 = new Entry(
+ "if2", uid2,
+ android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE,
+ 150, 10, 250, 20, 0);
+
+ NetworkStatsHistory history1 = new NetworkStatsHistory(10, 2);
+ history1.recordData(10, 20, uid1Entry1);
+ history1.recordData(20, 30, uid1Entry2);
+
+ NetworkStatsHistory history2 = new NetworkStatsHistory(10, 2);
+ history1.recordData(30, 40, uid2Entry1);
+ history1.recordData(35, 45, uid2Entry2);
+
+
+ when(mService.openSessionForUsageStats(anyInt(), anyString())).thenReturn(mStatsSession);
+ when(mStatsSession.getRelevantUids()).thenReturn(new int[] { uid1, uid2, uid3 });
+
+ when(mStatsSession.getHistoryIntervalForUid(any(NetworkTemplate.class),
+ eq(uid1), eq(android.net.NetworkStats.SET_ALL),
+ eq(android.net.NetworkStats.TAG_NONE),
+ eq(NetworkStatsHistory.FIELD_ALL), eq(startTime), eq(endTime)))
+ .then((InvocationOnMock inv) -> {
+ NetworkTemplate template = inv.getArgument(0);
+ assertEquals(MATCH_MOBILE_ALL, template.getMatchRule());
+ assertEquals(subscriberId, template.getSubscriberId());
+ return history1;
+ });
+
+ when(mStatsSession.getHistoryIntervalForUid(any(NetworkTemplate.class),
+ eq(uid2), eq(android.net.NetworkStats.SET_ALL),
+ eq(android.net.NetworkStats.TAG_NONE),
+ eq(NetworkStatsHistory.FIELD_ALL), eq(startTime), eq(endTime)))
+ .then((InvocationOnMock inv) -> {
+ NetworkTemplate template = inv.getArgument(0);
+ assertEquals(MATCH_MOBILE_ALL, template.getMatchRule());
+ assertEquals(subscriberId, template.getSubscriberId());
+ return history2;
+ });
+
+
+ NetworkStats stats = mManager.queryDetails(
+ ConnectivityManager.TYPE_MOBILE, subscriberId, startTime, endTime);
+
+ NetworkStats.Bucket bucket = new NetworkStats.Bucket();
+
+ // First 2 buckets exactly match entry timings
+ assertTrue(stats.getNextBucket(bucket));
+ assertEquals(10, bucket.getStartTimeStamp());
+ assertEquals(20, bucket.getEndTimeStamp());
+ assertBucketMatches(uid1Entry1, bucket);
+
+ assertTrue(stats.getNextBucket(bucket));
+ assertEquals(20, bucket.getStartTimeStamp());
+ assertEquals(30, bucket.getEndTimeStamp());
+ assertBucketMatches(uid1Entry2, bucket);
+
+ // 30 -> 40: contains uid2Entry1 and half of uid2Entry2
+ assertTrue(stats.getNextBucket(bucket));
+ assertEquals(30, bucket.getStartTimeStamp());
+ assertEquals(40, bucket.getEndTimeStamp());
+ assertEquals(225, bucket.getRxBytes());
+ assertEquals(15, bucket.getRxPackets());
+ assertEquals(375, bucket.getTxBytes());
+ assertEquals(30, bucket.getTxPackets());
+
+ // 40 -> 50: contains half of uid2Entry2
+ assertTrue(stats.getNextBucket(bucket));
+ assertEquals(40, bucket.getStartTimeStamp());
+ assertEquals(50, bucket.getEndTimeStamp());
+ assertEquals(75, bucket.getRxBytes());
+ assertEquals(5, bucket.getRxPackets());
+ assertEquals(125, bucket.getTxBytes());
+ assertEquals(10, bucket.getTxPackets());
+
+ assertFalse(stats.hasNextBucket());
+ }
+
+ @Test
+ public void testQueryDetails_NoSubscriberId() throws RemoteException {
+ final long startTime = 1;
+ final long endTime = 100;
+ final int uid1 = 10001;
+ final int uid2 = 10002;
+
+ when(mService.openSessionForUsageStats(anyInt(), anyString())).thenReturn(mStatsSession);
+ when(mStatsSession.getRelevantUids()).thenReturn(new int[] { uid1, uid2 });
+
+ NetworkStats stats = mManager.queryDetails(
+ ConnectivityManager.TYPE_MOBILE, null, startTime, endTime);
+
+ when(mStatsSession.getHistoryIntervalForUid(any(NetworkTemplate.class),
+ anyInt(), anyInt(), anyInt(), anyInt(), anyLong(), anyLong()))
+ .thenReturn(new NetworkStatsHistory(10, 0));
+
+ verify(mStatsSession, times(1)).getHistoryIntervalForUid(
+ argThat((NetworkTemplate t) ->
+ // No subscriberId: MATCH_MOBILE_WILDCARD template
+ t.getMatchRule() == NetworkTemplate.MATCH_MOBILE_WILDCARD),
+ eq(uid1), eq(android.net.NetworkStats.SET_ALL),
+ eq(android.net.NetworkStats.TAG_NONE),
+ eq(NetworkStatsHistory.FIELD_ALL), eq(startTime), eq(endTime));
+
+ verify(mStatsSession, times(1)).getHistoryIntervalForUid(
+ argThat((NetworkTemplate t) ->
+ // No subscriberId: MATCH_MOBILE_WILDCARD template
+ t.getMatchRule() == NetworkTemplate.MATCH_MOBILE_WILDCARD),
+ eq(uid2), eq(android.net.NetworkStats.SET_ALL),
+ eq(android.net.NetworkStats.TAG_NONE),
+ eq(NetworkStatsHistory.FIELD_ALL), eq(startTime), eq(endTime));
+
+ assertFalse(stats.hasNextBucket());
+ }
+
+ private void assertBucketMatches(Entry expected,
+ NetworkStats.Bucket actual) {
+ assertEquals(expected.uid, actual.getUid());
+ assertEquals(expected.rxBytes, actual.getRxBytes());
+ assertEquals(expected.rxPackets, actual.getRxPackets());
+ assertEquals(expected.txBytes, actual.getTxBytes());
+ assertEquals(expected.txPackets, actual.getTxPackets());
+ }
+}
diff --git a/tests/net/java/android/net/ConnectivityManagerTest.java b/tests/net/java/android/net/ConnectivityManagerTest.java
index cc792cc..03a617c 100644
--- a/tests/net/java/android/net/ConnectivityManagerTest.java
+++ b/tests/net/java/android/net/ConnectivityManagerTest.java
@@ -38,6 +38,7 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyBoolean;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.timeout;
@@ -217,7 +218,8 @@
// callback triggers
captor.getValue().send(makeMessage(request, ConnectivityManager.CALLBACK_AVAILABLE));
- verify(callback, timeout(500).times(1)).onAvailable(any());
+ verify(callback, timeout(500).times(1)).onAvailable(any(Network.class),
+ any(NetworkCapabilities.class), any(LinkProperties.class));
// unregister callback
manager.unregisterNetworkCallback(callback);
@@ -244,7 +246,8 @@
// callback triggers
captor.getValue().send(makeMessage(req1, ConnectivityManager.CALLBACK_AVAILABLE));
- verify(callback, timeout(100).times(1)).onAvailable(any());
+ verify(callback, timeout(100).times(1)).onAvailable(any(Network.class),
+ any(NetworkCapabilities.class), any(LinkProperties.class));
// unregister callback
manager.unregisterNetworkCallback(callback);
@@ -335,6 +338,10 @@
static Message makeMessage(NetworkRequest req, int messageType) {
Bundle bundle = new Bundle();
bundle.putParcelable(NetworkRequest.class.getSimpleName(), req);
+ // Pass default objects as we don't care which get passed here
+ bundle.putParcelable(Network.class.getSimpleName(), new Network(1));
+ bundle.putParcelable(NetworkCapabilities.class.getSimpleName(), new NetworkCapabilities());
+ bundle.putParcelable(LinkProperties.class.getSimpleName(), new LinkProperties());
Message msg = Message.obtain();
msg.what = messageType;
msg.setData(bundle);
diff --git a/tests/net/java/android/net/IpPrefixTest.java b/tests/net/java/android/net/IpPrefixTest.java
index b5b2c07..1f1ba2e 100644
--- a/tests/net/java/android/net/IpPrefixTest.java
+++ b/tests/net/java/android/net/IpPrefixTest.java
@@ -223,14 +223,14 @@
}
@Test
- public void testContains() {
+ public void testContainsInetAddress() {
IpPrefix p = new IpPrefix("2001:db8:f00::ace:d00d/127");
assertTrue(p.contains(Address("2001:db8:f00::ace:d00c")));
assertTrue(p.contains(Address("2001:db8:f00::ace:d00d")));
assertFalse(p.contains(Address("2001:db8:f00::ace:d00e")));
assertFalse(p.contains(Address("2001:db8:f00::bad:d00d")));
assertFalse(p.contains(Address("2001:4868:4860::8888")));
- assertFalse(p.contains(null));
+ assertFalse(p.contains((InetAddress)null));
assertFalse(p.contains(Address("8.8.8.8")));
p = new IpPrefix("192.0.2.0/23");
@@ -251,6 +251,53 @@
}
@Test
+ public void testContainsIpPrefix() {
+ assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("0.0.0.0/0")));
+ assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("1.2.3.4/0")));
+ assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("1.2.3.4/8")));
+ assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("1.2.3.4/24")));
+ assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("1.2.3.4/23")));
+
+ assertTrue(new IpPrefix("1.2.3.4/8").containsPrefix(new IpPrefix("1.2.3.4/8")));
+ assertTrue(new IpPrefix("1.2.3.4/8").containsPrefix(new IpPrefix("1.254.12.9/8")));
+ assertTrue(new IpPrefix("1.2.3.4/21").containsPrefix(new IpPrefix("1.2.3.4/21")));
+ assertTrue(new IpPrefix("1.2.3.4/32").containsPrefix(new IpPrefix("1.2.3.4/32")));
+
+ assertTrue(new IpPrefix("1.2.3.4/20").containsPrefix(new IpPrefix("1.2.3.0/24")));
+
+ assertFalse(new IpPrefix("1.2.3.4/32").containsPrefix(new IpPrefix("1.2.3.5/32")));
+ assertFalse(new IpPrefix("1.2.3.4/8").containsPrefix(new IpPrefix("2.2.3.4/8")));
+ assertFalse(new IpPrefix("0.0.0.0/16").containsPrefix(new IpPrefix("0.0.0.0/15")));
+ assertFalse(new IpPrefix("100.0.0.0/8").containsPrefix(new IpPrefix("99.0.0.0/8")));
+
+ assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("::/0")));
+ assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/1")));
+ assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("3d8a:661:a0::770/8")));
+ assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/8")));
+ assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/64")));
+ assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/113")));
+ assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/128")));
+
+ assertTrue(new IpPrefix("2001:db8:f00::ace:d00d/64").containsPrefix(
+ new IpPrefix("2001:db8:f00::ace:d00d/64")));
+ assertTrue(new IpPrefix("2001:db8:f00::ace:d00d/64").containsPrefix(
+ new IpPrefix("2001:db8:f00::ace:d00d/120")));
+ assertFalse(new IpPrefix("2001:db8:f00::ace:d00d/64").containsPrefix(
+ new IpPrefix("2001:db8:f00::ace:d00d/32")));
+ assertFalse(new IpPrefix("2001:db8:f00::ace:d00d/64").containsPrefix(
+ new IpPrefix("2006:db8:f00::ace:d00d/96")));
+
+ assertTrue(new IpPrefix("2001:db8:f00::ace:d00d/128").containsPrefix(
+ new IpPrefix("2001:db8:f00::ace:d00d/128")));
+ assertTrue(new IpPrefix("2001:db8:f00::ace:d00d/100").containsPrefix(
+ new IpPrefix("2001:db8:f00::ace:ccaf/110")));
+
+ assertFalse(new IpPrefix("2001:db8:f00::ace:d00d/128").containsPrefix(
+ new IpPrefix("2001:db8:f00::ace:d00e/128")));
+ assertFalse(new IpPrefix("::/30").containsPrefix(new IpPrefix("::/29")));
+ }
+
+ @Test
public void testHashCode() {
IpPrefix p = new IpPrefix(new byte[4], 0);
Random random = new Random();
diff --git a/tests/net/java/android/net/IpSecAlgorithmTest.java b/tests/net/java/android/net/IpSecAlgorithmTest.java
index 6bdfdc6..85e8361 100644
--- a/tests/net/java/android/net/IpSecAlgorithmTest.java
+++ b/tests/net/java/android/net/IpSecAlgorithmTest.java
@@ -22,8 +22,12 @@
import android.os.Parcel;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+
+import java.util.AbstractMap.SimpleEntry;
import java.util.Arrays;
+import java.util.Map.Entry;
import java.util.Random;
+
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -40,19 +44,29 @@
};
@Test
- public void testDefaultTruncLen() throws Exception {
- IpSecAlgorithm explicit =
+ public void testNoTruncLen() throws Exception {
+ Entry<String, Integer>[] authAndAeadList =
+ new Entry[] {
+ new SimpleEntry<>(IpSecAlgorithm.AUTH_HMAC_MD5, 128),
+ new SimpleEntry<>(IpSecAlgorithm.AUTH_HMAC_SHA1, 160),
+ new SimpleEntry<>(IpSecAlgorithm.AUTH_HMAC_SHA256, 256),
+ new SimpleEntry<>(IpSecAlgorithm.AUTH_HMAC_SHA384, 384),
+ new SimpleEntry<>(IpSecAlgorithm.AUTH_HMAC_SHA512, 512),
+ new SimpleEntry<>(IpSecAlgorithm.AUTH_CRYPT_AES_GCM, 224)
+ };
+
+ // Expect auth and aead algorithms to throw errors if trunclen is omitted.
+ for (Entry<String, Integer> algData : authAndAeadList) {
+ try {
new IpSecAlgorithm(
- IpSecAlgorithm.AUTH_HMAC_SHA256, Arrays.copyOf(KEY_MATERIAL, 256 / 8), 256);
- IpSecAlgorithm implicit =
- new IpSecAlgorithm(
- IpSecAlgorithm.AUTH_HMAC_SHA256, Arrays.copyOf(KEY_MATERIAL, 256 / 8));
- assertTrue(
- "Default Truncation Length Incorrect, Explicit: "
- + explicit
- + "implicit: "
- + implicit,
- IpSecAlgorithm.equals(explicit, implicit));
+ algData.getKey(), Arrays.copyOf(KEY_MATERIAL, algData.getValue() / 8));
+ fail("Expected exception on unprovided auth trunclen");
+ } catch (IllegalArgumentException expected) {
+ }
+ }
+
+ // Ensure crypt works with no truncation length supplied.
+ new IpSecAlgorithm(IpSecAlgorithm.CRYPT_AES_CBC, Arrays.copyOf(KEY_MATERIAL, 256 / 8));
}
@Test
diff --git a/tests/net/java/android/net/IpSecConfigTest.java b/tests/net/java/android/net/IpSecConfigTest.java
index f6c5532..771faaf 100644
--- a/tests/net/java/android/net/IpSecConfigTest.java
+++ b/tests/net/java/android/net/IpSecConfigTest.java
@@ -17,6 +17,7 @@
package android.net;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -48,18 +49,12 @@
assertEquals(IpSecManager.INVALID_RESOURCE_ID, c.getSpiResourceId());
}
- @Test
- public void testParcelUnparcel() throws Exception {
- assertParcelingIsLossless(new IpSecConfig());
-
+ private IpSecConfig getSampleConfig() {
IpSecConfig c = new IpSecConfig();
c.setMode(IpSecTransform.MODE_TUNNEL);
c.setSourceAddress("0.0.0.0");
c.setDestinationAddress("1.2.3.4");
- c.setEncapType(android.system.OsConstants.UDP_ENCAP_ESPINUDP);
- c.setEncapSocketResourceId(7);
- c.setEncapRemotePort(22);
- c.setNattKeepaliveInterval(42);
+ c.setSpiResourceId(1984);
c.setEncryption(
new IpSecAlgorithm(
IpSecAlgorithm.CRYPT_AES_CBC,
@@ -67,8 +62,39 @@
c.setAuthentication(
new IpSecAlgorithm(
IpSecAlgorithm.AUTH_HMAC_MD5,
- new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, 0}));
- c.setSpiResourceId(1984);
+ new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, 0},
+ 128));
+ c.setAuthenticatedEncryption(
+ new IpSecAlgorithm(
+ IpSecAlgorithm.AUTH_CRYPT_AES_GCM,
+ new byte[] {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, 0, 1, 2, 3, 4
+ },
+ 128));
+ c.setEncapType(android.system.OsConstants.UDP_ENCAP_ESPINUDP);
+ c.setEncapSocketResourceId(7);
+ c.setEncapRemotePort(22);
+ c.setNattKeepaliveInterval(42);
+ c.setMarkValue(12);
+ c.setMarkMask(23);
+
+ return c;
+ }
+
+ @Test
+ public void testCopyConstructor() {
+ IpSecConfig original = getSampleConfig();
+ IpSecConfig copy = new IpSecConfig(original);
+
+ assertTrue(IpSecConfig.equals(original, copy));
+ assertFalse(original == copy);
+ }
+
+ @Test
+ public void testParcelUnparcel() throws Exception {
+ assertParcelingIsLossless(new IpSecConfig());
+
+ IpSecConfig c = getSampleConfig();
assertParcelingIsLossless(c);
}
diff --git a/tests/net/java/android/net/IpSecManagerTest.java b/tests/net/java/android/net/IpSecManagerTest.java
index cc3366f..8160924 100644
--- a/tests/net/java/android/net/IpSecManagerTest.java
+++ b/tests/net/java/android/net/IpSecManagerTest.java
@@ -30,6 +30,7 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.test.mock.MockContext;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.system.Os;
@@ -37,6 +38,7 @@
import com.android.server.IpSecService;
import java.net.InetAddress;
+import java.net.Socket;
import java.net.UnknownHostException;
import org.junit.Before;
@@ -50,13 +52,18 @@
private static final int TEST_UDP_ENCAP_PORT = 34567;
private static final int DROID_SPI = 0xD1201D;
+ private static final int DUMMY_RESOURCE_ID = 0x1234;
private static final InetAddress GOOGLE_DNS_4;
+ private static final String VTI_INTF_NAME = "ipsec_test";
+ private static final InetAddress VTI_LOCAL_ADDRESS;
+ private static final LinkAddress VTI_INNER_ADDRESS = new LinkAddress("10.0.1.1/24");
static {
try {
// Google Public DNS Addresses;
GOOGLE_DNS_4 = InetAddress.getByName("8.8.8.8");
+ VTI_LOCAL_ADDRESS = InetAddress.getByName("8.8.4.4");
} catch (UnknownHostException e) {
throw new RuntimeException("Could not resolve DNS Addresses", e);
}
@@ -64,11 +71,17 @@
private IpSecService mMockIpSecService;
private IpSecManager mIpSecManager;
+ private MockContext mMockContext = new MockContext() {
+ @Override
+ public String getOpPackageName() {
+ return "fooPackage";
+ }
+ };
@Before
public void setUp() throws Exception {
mMockIpSecService = mock(IpSecService.class);
- mIpSecManager = new IpSecManager(mMockIpSecService);
+ mIpSecManager = new IpSecManager(mMockContext, mMockIpSecService);
}
/*
@@ -77,9 +90,8 @@
*/
@Test
public void testAllocSpi() throws Exception {
- int resourceId = 1;
IpSecSpiResponse spiResp =
- new IpSecSpiResponse(IpSecManager.Status.OK, resourceId, DROID_SPI);
+ new IpSecSpiResponse(IpSecManager.Status.OK, DUMMY_RESOURCE_ID, DROID_SPI);
when(mMockIpSecService.allocateSecurityParameterIndex(
eq(GOOGLE_DNS_4.getHostAddress()),
eq(DROID_SPI),
@@ -92,14 +104,13 @@
droidSpi.close();
- verify(mMockIpSecService).releaseSecurityParameterIndex(resourceId);
+ verify(mMockIpSecService).releaseSecurityParameterIndex(DUMMY_RESOURCE_ID);
}
@Test
public void testAllocRandomSpi() throws Exception {
- int resourceId = 1;
IpSecSpiResponse spiResp =
- new IpSecSpiResponse(IpSecManager.Status.OK, resourceId, DROID_SPI);
+ new IpSecSpiResponse(IpSecManager.Status.OK, DUMMY_RESOURCE_ID, DROID_SPI);
when(mMockIpSecService.allocateSecurityParameterIndex(
eq(GOOGLE_DNS_4.getHostAddress()),
eq(IpSecManager.INVALID_SECURITY_PARAMETER_INDEX),
@@ -113,7 +124,7 @@
randomSpi.close();
- verify(mMockIpSecService).releaseSecurityParameterIndex(resourceId);
+ verify(mMockIpSecService).releaseSecurityParameterIndex(DUMMY_RESOURCE_ID);
}
/*
@@ -165,11 +176,10 @@
@Test
public void testOpenEncapsulationSocket() throws Exception {
- int resourceId = 1;
IpSecUdpEncapResponse udpEncapResp =
new IpSecUdpEncapResponse(
IpSecManager.Status.OK,
- resourceId,
+ DUMMY_RESOURCE_ID,
TEST_UDP_ENCAP_PORT,
Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP));
when(mMockIpSecService.openUdpEncapsulationSocket(eq(TEST_UDP_ENCAP_PORT), anyObject()))
@@ -177,21 +187,47 @@
IpSecManager.UdpEncapsulationSocket encapSocket =
mIpSecManager.openUdpEncapsulationSocket(TEST_UDP_ENCAP_PORT);
- assertNotNull(encapSocket.getSocket());
+ assertNotNull(encapSocket.getFileDescriptor());
assertEquals(TEST_UDP_ENCAP_PORT, encapSocket.getPort());
encapSocket.close();
- verify(mMockIpSecService).closeUdpEncapsulationSocket(resourceId);
+ verify(mMockIpSecService).closeUdpEncapsulationSocket(DUMMY_RESOURCE_ID);
+ }
+
+ @Test
+ public void testApplyTransportModeTransformEnsuresSocketCreation() throws Exception {
+ Socket socket = new Socket();
+ IpSecConfig dummyConfig = new IpSecConfig();
+ IpSecTransform dummyTransform = new IpSecTransform(null, dummyConfig);
+
+ // Even if underlying SocketImpl is not initalized, this should force the init, and
+ // thereby succeed.
+ mIpSecManager.applyTransportModeTransform(
+ socket, IpSecManager.DIRECTION_IN, dummyTransform);
+
+ // Check to make sure the FileDescriptor is non-null
+ assertNotNull(socket.getFileDescriptor$());
+ }
+
+ @Test
+ public void testRemoveTransportModeTransformsForcesSocketCreation() throws Exception {
+ Socket socket = new Socket();
+
+ // Even if underlying SocketImpl is not initalized, this should force the init, and
+ // thereby succeed.
+ mIpSecManager.removeTransportModeTransforms(socket);
+
+ // Check to make sure the FileDescriptor is non-null
+ assertNotNull(socket.getFileDescriptor$());
}
@Test
public void testOpenEncapsulationSocketOnRandomPort() throws Exception {
- int resourceId = 1;
IpSecUdpEncapResponse udpEncapResp =
new IpSecUdpEncapResponse(
IpSecManager.Status.OK,
- resourceId,
+ DUMMY_RESOURCE_ID,
TEST_UDP_ENCAP_PORT,
Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP));
@@ -201,12 +237,12 @@
IpSecManager.UdpEncapsulationSocket encapSocket =
mIpSecManager.openUdpEncapsulationSocket();
- assertNotNull(encapSocket.getSocket());
+ assertNotNull(encapSocket.getFileDescriptor());
assertEquals(TEST_UDP_ENCAP_PORT, encapSocket.getPort());
encapSocket.close();
- verify(mMockIpSecService).closeUdpEncapsulationSocket(resourceId);
+ verify(mMockIpSecService).closeUdpEncapsulationSocket(DUMMY_RESOURCE_ID);
}
@Test
@@ -219,4 +255,49 @@
}
// TODO: add test when applicable transform builder interface is available
+
+ private IpSecManager.IpSecTunnelInterface createAndValidateVti(int resourceId, String intfName)
+ throws Exception {
+ IpSecTunnelInterfaceResponse dummyResponse =
+ new IpSecTunnelInterfaceResponse(IpSecManager.Status.OK, resourceId, intfName);
+ when(mMockIpSecService.createTunnelInterface(
+ eq(VTI_LOCAL_ADDRESS.getHostAddress()), eq(GOOGLE_DNS_4.getHostAddress()),
+ anyObject(), anyObject(), anyString()))
+ .thenReturn(dummyResponse);
+
+ IpSecManager.IpSecTunnelInterface tunnelIntf = mIpSecManager.createIpSecTunnelInterface(
+ VTI_LOCAL_ADDRESS, GOOGLE_DNS_4, mock(Network.class));
+
+ assertNotNull(tunnelIntf);
+ return tunnelIntf;
+ }
+
+ @Test
+ public void testCreateVti() throws Exception {
+ IpSecManager.IpSecTunnelInterface tunnelIntf =
+ createAndValidateVti(DUMMY_RESOURCE_ID, VTI_INTF_NAME);
+
+ assertEquals(VTI_INTF_NAME, tunnelIntf.getInterfaceName());
+
+ tunnelIntf.close();
+ verify(mMockIpSecService).deleteTunnelInterface(eq(DUMMY_RESOURCE_ID), anyString());
+ }
+
+ @Test
+ public void testAddRemoveAddressesFromVti() throws Exception {
+ IpSecManager.IpSecTunnelInterface tunnelIntf =
+ createAndValidateVti(DUMMY_RESOURCE_ID, VTI_INTF_NAME);
+
+ tunnelIntf.addAddress(VTI_INNER_ADDRESS.getAddress(),
+ VTI_INNER_ADDRESS.getPrefixLength());
+ verify(mMockIpSecService)
+ .addAddressToTunnelInterface(
+ eq(DUMMY_RESOURCE_ID), eq(VTI_INNER_ADDRESS), anyString());
+
+ tunnelIntf.removeAddress(VTI_INNER_ADDRESS.getAddress(),
+ VTI_INNER_ADDRESS.getPrefixLength());
+ verify(mMockIpSecService)
+ .addAddressToTunnelInterface(
+ eq(DUMMY_RESOURCE_ID), eq(VTI_INNER_ADDRESS), anyString());
+ }
}
diff --git a/tests/net/java/android/net/IpSecTransformTest.java b/tests/net/java/android/net/IpSecTransformTest.java
new file mode 100644
index 0000000..ffd1f06
--- /dev/null
+++ b/tests/net/java/android/net/IpSecTransformTest.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package android.net;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import android.support.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/** Unit tests for {@link IpSecTransform}. */
+@SmallTest
+@RunWith(JUnit4.class)
+public class IpSecTransformTest {
+
+ @Test
+ public void testCreateTransformCopiesConfig() {
+ // Create a config with a few parameters to make sure it's not empty
+ IpSecConfig config = new IpSecConfig();
+ config.setSourceAddress("0.0.0.0");
+ config.setDestinationAddress("1.2.3.4");
+ config.setSpiResourceId(1984);
+
+ IpSecTransform preModification = new IpSecTransform(null, config);
+
+ config.setSpiResourceId(1985);
+ IpSecTransform postModification = new IpSecTransform(null, config);
+
+ assertFalse(IpSecTransform.equals(preModification, postModification));
+ }
+
+ @Test
+ public void testCreateTransformsWithSameConfigEqual() {
+ // Create a config with a few parameters to make sure it's not empty
+ IpSecConfig config = new IpSecConfig();
+ config.setSourceAddress("0.0.0.0");
+ config.setDestinationAddress("1.2.3.4");
+ config.setSpiResourceId(1984);
+
+ IpSecTransform config1 = new IpSecTransform(null, config);
+ IpSecTransform config2 = new IpSecTransform(null, config);
+
+ assertTrue(IpSecTransform.equals(config1, config2));
+ }
+}
diff --git a/tests/net/java/android/net/LinkPropertiesTest.java b/tests/net/java/android/net/LinkPropertiesTest.java
index f3c22a5..9695e9a 100644
--- a/tests/net/java/android/net/LinkPropertiesTest.java
+++ b/tests/net/java/android/net/LinkPropertiesTest.java
@@ -27,6 +27,7 @@
import android.net.LinkProperties.CompareResult;
import android.net.LinkProperties.ProvisioningChange;
import android.net.RouteInfo;
+import android.os.Parcel;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.system.OsConstants;
@@ -82,6 +83,9 @@
assertTrue(source.isIdenticalPrivateDns(target));
assertTrue(target.isIdenticalPrivateDns(source));
+ assertTrue(source.isIdenticalValidatedPrivateDnses(target));
+ assertTrue(target.isIdenticalValidatedPrivateDnses(source));
+
assertTrue(source.isIdenticalRoutes(target));
assertTrue(target.isIdenticalRoutes(source));
@@ -784,4 +788,35 @@
assertEquals(new ArraySet<>(expectAdded), new ArraySet<>(result.added));
assertEquals(new ArraySet<>(expectRemoved), (new ArraySet<>(result.removed)));
}
+
+ @Test
+ public void testLinkPropertiesParcelable() {
+ LinkProperties source = new LinkProperties();
+ source.setInterfaceName(NAME);
+ // set 2 link addresses
+ source.addLinkAddress(LINKADDRV4);
+ source.addLinkAddress(LINKADDRV6);
+ // set 2 dnses
+ source.addDnsServer(DNS1);
+ source.addDnsServer(DNS2);
+ // set 2 gateways
+ source.addRoute(new RouteInfo(GATEWAY1));
+ source.addRoute(new RouteInfo(GATEWAY2));
+ // set 2 validated private dnses
+ source.addValidatedPrivateDnsServer(DNS6);
+ source.addValidatedPrivateDnsServer(GATEWAY61);
+
+ source.setMtu(MTU);
+
+ Parcel p = Parcel.obtain();
+ source.writeToParcel(p, /* flags */ 0);
+ p.setDataPosition(0);
+ final byte[] marshalled = p.marshall();
+ p = Parcel.obtain();
+ p.unmarshall(marshalled, 0, marshalled.length);
+ p.setDataPosition(0);
+ LinkProperties dest = LinkProperties.CREATOR.createFromParcel(p);
+
+ assertEquals(source, dest);
+ }
}
diff --git a/tests/net/java/android/net/MacAddressTest.java b/tests/net/java/android/net/MacAddressTest.java
index 9aad413..04266c5 100644
--- a/tests/net/java/android/net/MacAddressTest.java
+++ b/tests/net/java/android/net/MacAddressTest.java
@@ -172,7 +172,7 @@
final int iterations = 1000;
final String expectedAndroidOui = "da:a1:19";
for (int i = 0; i < iterations; i++) {
- MacAddress mac = MacAddress.createRandomUnicastAddress();
+ MacAddress mac = MacAddress.createRandomUnicastAddressWithGoogleBase();
String stringRepr = mac.toString();
assertTrue(stringRepr + " expected to be a locally assigned address",
@@ -195,6 +195,15 @@
assertTrue(stringRepr + " expected to begin with " + expectedLocalOui,
stringRepr.startsWith(expectedLocalOui));
}
+
+ for (int i = 0; i < iterations; i++) {
+ MacAddress mac = MacAddress.createRandomUnicastAddress();
+ String stringRepr = mac.toString();
+
+ assertTrue(stringRepr + " expected to be a locally assigned address",
+ mac.isLocallyAssigned());
+ assertEquals(MacAddress.TYPE_UNICAST, mac.getAddressType());
+ }
}
@Test
diff --git a/tests/net/java/android/net/NetworkCapabilitiesTest.java b/tests/net/java/android/net/NetworkCapabilitiesTest.java
index e6170cb..2f4d69ec 100644
--- a/tests/net/java/android/net/NetworkCapabilitiesTest.java
+++ b/tests/net/java/android/net/NetworkCapabilitiesTest.java
@@ -17,33 +17,48 @@
package android.net;
import static android.net.NetworkCapabilities.LINK_BANDWIDTH_UNSPECIFIED;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL;
import static android.net.NetworkCapabilities.NET_CAPABILITY_CBS;
import static android.net.NetworkCapabilities.NET_CAPABILITY_DUN;
import static android.net.NetworkCapabilities.NET_CAPABILITY_EIMS;
import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_MMS;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_OEM_PAID;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN;
import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_WIFI_P2P;
import static android.net.NetworkCapabilities.RESTRICTED_CAPABILITIES;
import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
import static android.net.NetworkCapabilities.UNRESTRICTED_CAPABILITIES;
+import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
+import android.util.ArraySet;
+
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.Set;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class NetworkCapabilitiesTest {
+ private static final String TEST_SSID = "TEST_SSID";
+ private static final String DIFFERENT_TEST_SSID = "DIFFERENT_TEST_SSID";
+
@Test
public void testMaybeMarkCapabilitiesRestricted() {
// verify EIMS is restricted
@@ -189,4 +204,311 @@
assertEquals(20, NetworkCapabilities
.maxBandwidth(10, 20));
}
+
+ @Test
+ public void testSetUids() {
+ final NetworkCapabilities netCap = new NetworkCapabilities();
+ final Set<UidRange> uids = new ArraySet<>();
+ uids.add(new UidRange(50, 100));
+ uids.add(new UidRange(3000, 4000));
+ netCap.setUids(uids);
+ assertTrue(netCap.appliesToUid(50));
+ assertTrue(netCap.appliesToUid(80));
+ assertTrue(netCap.appliesToUid(100));
+ assertTrue(netCap.appliesToUid(3000));
+ assertTrue(netCap.appliesToUid(3001));
+ assertFalse(netCap.appliesToUid(10));
+ assertFalse(netCap.appliesToUid(25));
+ assertFalse(netCap.appliesToUid(49));
+ assertFalse(netCap.appliesToUid(101));
+ assertFalse(netCap.appliesToUid(2000));
+ assertFalse(netCap.appliesToUid(100000));
+
+ assertTrue(netCap.appliesToUidRange(new UidRange(50, 100)));
+ assertTrue(netCap.appliesToUidRange(new UidRange(70, 72)));
+ assertTrue(netCap.appliesToUidRange(new UidRange(3500, 3912)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(1, 100)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(49, 100)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(1, 10)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(60, 101)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(60, 3400)));
+
+ NetworkCapabilities netCap2 = new NetworkCapabilities();
+ // A new netcap object has null UIDs, so anything will satisfy it.
+ assertTrue(netCap2.satisfiedByUids(netCap));
+ // Still not equal though.
+ assertFalse(netCap2.equalsUids(netCap));
+ netCap2.setUids(uids);
+ assertTrue(netCap2.satisfiedByUids(netCap));
+ assertTrue(netCap.equalsUids(netCap2));
+ assertTrue(netCap2.equalsUids(netCap));
+
+ uids.add(new UidRange(600, 700));
+ netCap2.setUids(uids);
+ assertFalse(netCap2.satisfiedByUids(netCap));
+ assertFalse(netCap.appliesToUid(650));
+ assertTrue(netCap2.appliesToUid(650));
+ netCap.combineCapabilities(netCap2);
+ assertTrue(netCap2.satisfiedByUids(netCap));
+ assertTrue(netCap.appliesToUid(650));
+ assertFalse(netCap.appliesToUid(500));
+
+ assertTrue(new NetworkCapabilities().satisfiedByUids(netCap));
+ netCap.combineCapabilities(new NetworkCapabilities());
+ assertTrue(netCap.appliesToUid(500));
+ assertTrue(netCap.appliesToUidRange(new UidRange(1, 100000)));
+ assertFalse(netCap2.appliesToUid(500));
+ assertFalse(netCap2.appliesToUidRange(new UidRange(1, 100000)));
+ assertTrue(new NetworkCapabilities().satisfiedByUids(netCap));
+ }
+
+ @Test
+ public void testParcelNetworkCapabilities() {
+ final Set<UidRange> uids = new ArraySet<>();
+ uids.add(new UidRange(50, 100));
+ uids.add(new UidRange(3000, 4000));
+ final NetworkCapabilities netCap = new NetworkCapabilities()
+ .addCapability(NET_CAPABILITY_INTERNET)
+ .setUids(uids)
+ .addCapability(NET_CAPABILITY_EIMS)
+ .addCapability(NET_CAPABILITY_NOT_METERED);
+ assertEqualsThroughMarshalling(netCap);
+ netCap.setSSID(TEST_SSID);
+ assertEqualsThroughMarshalling(netCap);
+ }
+
+ @Test
+ public void testOemPaid() {
+ NetworkCapabilities nc = new NetworkCapabilities();
+ // By default OEM_PAID is neither in the unwanted or required lists and the network is not
+ // restricted.
+ assertFalse(nc.hasUnwantedCapability(NET_CAPABILITY_OEM_PAID));
+ assertFalse(nc.hasCapability(NET_CAPABILITY_OEM_PAID));
+ nc.maybeMarkCapabilitiesRestricted();
+ assertTrue(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
+
+ // Adding OEM_PAID to capability list should make network restricted.
+ nc.addCapability(NET_CAPABILITY_OEM_PAID);
+ nc.addCapability(NET_CAPABILITY_INTERNET); // Combine with unrestricted capability.
+ nc.maybeMarkCapabilitiesRestricted();
+ assertTrue(nc.hasCapability(NET_CAPABILITY_OEM_PAID));
+ assertFalse(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
+
+ // Now let's make request for OEM_PAID network.
+ NetworkCapabilities nr = new NetworkCapabilities();
+ nr.addCapability(NET_CAPABILITY_OEM_PAID);
+ nr.maybeMarkCapabilitiesRestricted();
+ assertTrue(nr.satisfiedByNetworkCapabilities(nc));
+
+ // Request fails for network with the default capabilities.
+ assertFalse(nr.satisfiedByNetworkCapabilities(new NetworkCapabilities()));
+ }
+
+ @Test
+ public void testUnwantedCapabilities() {
+ NetworkCapabilities network = new NetworkCapabilities();
+
+ NetworkCapabilities request = new NetworkCapabilities();
+ assertTrue("Request: " + request + ", Network:" + network,
+ request.satisfiedByNetworkCapabilities(network));
+
+ // Requesting absence of capabilities that network doesn't have. Request should satisfy.
+ request.addUnwantedCapability(NET_CAPABILITY_WIFI_P2P);
+ request.addUnwantedCapability(NET_CAPABILITY_NOT_METERED);
+ assertTrue(request.satisfiedByNetworkCapabilities(network));
+ assertArrayEquals(new int[] {NET_CAPABILITY_WIFI_P2P,
+ NET_CAPABILITY_NOT_METERED},
+ request.getUnwantedCapabilities());
+
+ // This is a default capability, just want to make sure its there because we use it below.
+ assertTrue(network.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
+
+ // Verify that adding unwanted capability will effectively remove it from capability list.
+ request.addUnwantedCapability(NET_CAPABILITY_NOT_RESTRICTED);
+ assertTrue(request.hasUnwantedCapability(NET_CAPABILITY_NOT_RESTRICTED));
+ assertFalse(request.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
+
+ // Now this request won't be satisfied because network contains NOT_RESTRICTED.
+ assertFalse(request.satisfiedByNetworkCapabilities(network));
+ network.removeCapability(NET_CAPABILITY_NOT_RESTRICTED);
+ assertTrue(request.satisfiedByNetworkCapabilities(network));
+
+ // Verify that adding capability will effectively remove it from unwanted list
+ request.addCapability(NET_CAPABILITY_NOT_RESTRICTED);
+ assertTrue(request.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
+ assertFalse(request.hasUnwantedCapability(NET_CAPABILITY_NOT_RESTRICTED));
+
+ assertFalse(request.satisfiedByNetworkCapabilities(network));
+ network.addCapability(NET_CAPABILITY_NOT_RESTRICTED);
+ assertTrue(request.satisfiedByNetworkCapabilities(network));
+ }
+
+ @Test
+ public void testEqualsNetCapabilities() {
+ NetworkCapabilities nc1 = new NetworkCapabilities();
+ NetworkCapabilities nc2 = new NetworkCapabilities();
+ assertTrue(nc1.equalsNetCapabilities(nc2));
+ assertEquals(nc1, nc2);
+
+ nc1.addCapability(NET_CAPABILITY_MMS);
+ assertFalse(nc1.equalsNetCapabilities(nc2));
+ assertNotEquals(nc1, nc2);
+ nc2.addCapability(NET_CAPABILITY_MMS);
+ assertTrue(nc1.equalsNetCapabilities(nc2));
+ assertEquals(nc1, nc2);
+
+ nc1.addUnwantedCapability(NET_CAPABILITY_INTERNET);
+ assertFalse(nc1.equalsNetCapabilities(nc2));
+ nc2.addUnwantedCapability(NET_CAPABILITY_INTERNET);
+ assertTrue(nc1.equalsNetCapabilities(nc2));
+
+ nc1.removeCapability(NET_CAPABILITY_INTERNET);
+ assertFalse(nc1.equalsNetCapabilities(nc2));
+ nc2.removeCapability(NET_CAPABILITY_INTERNET);
+ assertTrue(nc1.equalsNetCapabilities(nc2));
+ }
+
+ @Test
+ public void testSSID() {
+ NetworkCapabilities nc1 = new NetworkCapabilities();
+ NetworkCapabilities nc2 = new NetworkCapabilities();
+ assertTrue(nc2.satisfiedBySSID(nc1));
+
+ nc1.setSSID(TEST_SSID);
+ assertTrue(nc2.satisfiedBySSID(nc1));
+ nc2.setSSID("different " + TEST_SSID);
+ assertFalse(nc2.satisfiedBySSID(nc1));
+
+ assertTrue(nc1.satisfiedByImmutableNetworkCapabilities(nc2));
+ assertFalse(nc1.satisfiedByNetworkCapabilities(nc2));
+ }
+
+ private ArraySet<UidRange> uidRange(int from, int to) {
+ final ArraySet<UidRange> range = new ArraySet<>(1);
+ range.add(new UidRange(from, to));
+ return range;
+ }
+
+ @Test
+ public void testCombineCapabilities() {
+ NetworkCapabilities nc1 = new NetworkCapabilities();
+ NetworkCapabilities nc2 = new NetworkCapabilities();
+
+ nc1.addUnwantedCapability(NET_CAPABILITY_CAPTIVE_PORTAL);
+ nc1.addCapability(NET_CAPABILITY_NOT_ROAMING);
+ assertNotEquals(nc1, nc2);
+ nc2.combineCapabilities(nc1);
+ assertEquals(nc1, nc2);
+ assertTrue(nc2.hasCapability(NET_CAPABILITY_NOT_ROAMING));
+ assertTrue(nc2.hasUnwantedCapability(NET_CAPABILITY_CAPTIVE_PORTAL));
+
+ // This will effectively move NOT_ROAMING capability from required to unwanted for nc1.
+ nc1.addUnwantedCapability(NET_CAPABILITY_NOT_ROAMING);
+
+ nc2.combineCapabilities(nc1);
+ // We will get this capability in both requested and unwanted lists thus this request
+ // will never be satisfied.
+ assertTrue(nc2.hasCapability(NET_CAPABILITY_NOT_ROAMING));
+ assertTrue(nc2.hasUnwantedCapability(NET_CAPABILITY_NOT_ROAMING));
+
+ nc1.setSSID(TEST_SSID);
+ nc2.combineCapabilities(nc1);
+ assertTrue(TEST_SSID.equals(nc2.getSSID()));
+
+ // Because they now have the same SSID, the following call should not throw
+ nc2.combineCapabilities(nc1);
+
+ nc1.setSSID(DIFFERENT_TEST_SSID);
+ try {
+ nc2.combineCapabilities(nc1);
+ fail("Expected IllegalStateException: can't combine different SSIDs");
+ } catch (IllegalStateException expected) {}
+ nc1.setSSID(TEST_SSID);
+
+ nc1.setUids(uidRange(10, 13));
+ assertNotEquals(nc1, nc2);
+ nc2.combineCapabilities(nc1); // Everything + 10~13 is still everything.
+ assertNotEquals(nc1, nc2);
+ nc1.combineCapabilities(nc2); // 10~13 + everything is everything.
+ assertEquals(nc1, nc2);
+ nc1.setUids(uidRange(10, 13));
+ nc2.setUids(uidRange(20, 23));
+ assertNotEquals(nc1, nc2);
+ nc1.combineCapabilities(nc2);
+ assertTrue(nc1.appliesToUid(12));
+ assertFalse(nc2.appliesToUid(12));
+ assertTrue(nc1.appliesToUid(22));
+ assertTrue(nc2.appliesToUid(22));
+ }
+
+ @Test
+ public void testSetCapabilities() {
+ final int[] REQUIRED_CAPABILITIES = new int[] {
+ NET_CAPABILITY_INTERNET, NET_CAPABILITY_NOT_VPN };
+ final int[] UNWANTED_CAPABILITIES = new int[] {
+ NET_CAPABILITY_NOT_RESTRICTED, NET_CAPABILITY_NOT_METERED
+ };
+
+ NetworkCapabilities nc1 = new NetworkCapabilities();
+ NetworkCapabilities nc2 = new NetworkCapabilities();
+
+ nc1.setCapabilities(REQUIRED_CAPABILITIES, UNWANTED_CAPABILITIES);
+ assertArrayEquals(REQUIRED_CAPABILITIES, nc1.getCapabilities());
+
+ // Verify that setting and adding capabilities leads to the same object state.
+ nc2.clearAll();
+ for (int cap : REQUIRED_CAPABILITIES) {
+ nc2.addCapability(cap);
+ }
+ for (int cap : UNWANTED_CAPABILITIES) {
+ nc2.addUnwantedCapability(cap);
+ }
+ assertEquals(nc1, nc2);
+ }
+
+ private void assertEqualsThroughMarshalling(NetworkCapabilities netCap) {
+ Parcel p = Parcel.obtain();
+ netCap.writeToParcel(p, /* flags */ 0);
+ p.setDataPosition(0);
+ byte[] marshalledData = p.marshall();
+
+ p = Parcel.obtain();
+ p.unmarshall(marshalledData, 0, marshalledData.length);
+ p.setDataPosition(0);
+ assertEquals(NetworkCapabilities.CREATOR.createFromParcel(p), netCap);
+ }
+
+ @Test
+ public void testSet() {
+ NetworkCapabilities nc1 = new NetworkCapabilities();
+ NetworkCapabilities nc2 = new NetworkCapabilities();
+
+ nc1.addUnwantedCapability(NET_CAPABILITY_CAPTIVE_PORTAL);
+ nc1.addCapability(NET_CAPABILITY_NOT_ROAMING);
+ assertNotEquals(nc1, nc2);
+ nc2.set(nc1);
+ assertEquals(nc1, nc2);
+ assertTrue(nc2.hasCapability(NET_CAPABILITY_NOT_ROAMING));
+ assertTrue(nc2.hasUnwantedCapability(NET_CAPABILITY_CAPTIVE_PORTAL));
+
+ // This will effectively move NOT_ROAMING capability from required to unwanted for nc1.
+ nc1.addUnwantedCapability(NET_CAPABILITY_NOT_ROAMING);
+ nc1.setSSID(TEST_SSID);
+ nc2.set(nc1);
+ assertEquals(nc1, nc2);
+ // Contrary to combineCapabilities, set() will have removed the NOT_ROAMING capability
+ // from nc2.
+ assertFalse(nc2.hasCapability(NET_CAPABILITY_NOT_ROAMING));
+ assertTrue(nc2.hasUnwantedCapability(NET_CAPABILITY_NOT_ROAMING));
+ assertTrue(TEST_SSID.equals(nc2.getSSID()));
+
+ nc1.setSSID(DIFFERENT_TEST_SSID);
+ nc2.set(nc1);
+ assertEquals(nc1, nc2);
+ assertTrue(DIFFERENT_TEST_SSID.equals(nc2.getSSID()));
+
+ nc1.setUids(uidRange(10, 13));
+ nc2.set(nc1); // Overwrites, as opposed to combineCapabilities
+ assertEquals(nc1, nc2);
+ }
}
diff --git a/tests/net/java/android/net/NetworkStatsHistoryTest.java b/tests/net/java/android/net/NetworkStatsHistoryTest.java
index 1c0c14e..301d04d 100644
--- a/tests/net/java/android/net/NetworkStatsHistoryTest.java
+++ b/tests/net/java/android/net/NetworkStatsHistoryTest.java
@@ -32,9 +32,14 @@
import static android.text.format.DateUtils.SECOND_IN_MILLIS;
import static android.text.format.DateUtils.WEEK_IN_MILLIS;
import static android.text.format.DateUtils.YEAR_IN_MILLIS;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.Suppress;
import android.util.Log;
@@ -46,25 +51,31 @@
import java.io.DataOutputStream;
import java.util.Random;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
@SmallTest
-public class NetworkStatsHistoryTest extends AndroidTestCase {
+public class NetworkStatsHistoryTest {
private static final String TAG = "NetworkStatsHistoryTest";
private static final long TEST_START = 1194220800000L;
private NetworkStatsHistory stats;
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
+ @After
+ public void tearDown() throws Exception {
if (stats != null) {
assertConsistent(stats);
}
}
+ @Test
public void testReadOriginalVersion() throws Exception {
- final DataInputStream in = new DataInputStream(
- getContext().getResources().openRawResource(R.raw.history_v1));
+ final Context context = InstrumentationRegistry.getContext();
+ final DataInputStream in =
+ new DataInputStream(context.getResources().openRawResource(R.raw.history_v1));
NetworkStatsHistory.Entry entry = null;
try {
@@ -88,6 +99,7 @@
}
}
+ @Test
public void testRecordSingleBucket() throws Exception {
final long BUCKET_SIZE = HOUR_IN_MILLIS;
stats = new NetworkStatsHistory(BUCKET_SIZE);
@@ -100,6 +112,7 @@
assertValues(stats, 0, SECOND_IN_MILLIS, 1024L, 10L, 2048L, 20L, 2L);
}
+ @Test
public void testRecordEqualBuckets() throws Exception {
final long bucketDuration = HOUR_IN_MILLIS;
stats = new NetworkStatsHistory(bucketDuration);
@@ -114,6 +127,7 @@
assertValues(stats, 1, HOUR_IN_MILLIS / 2, 512L, 5L, 64L, 1L, 1L);
}
+ @Test
public void testRecordTouchingBuckets() throws Exception {
final long BUCKET_SIZE = 15 * MINUTE_IN_MILLIS;
stats = new NetworkStatsHistory(BUCKET_SIZE);
@@ -134,6 +148,7 @@
assertValues(stats, 2, 4 * MINUTE_IN_MILLIS, 200L, 400L, 1000L, 2000L, 20L);
}
+ @Test
public void testRecordGapBuckets() throws Exception {
final long BUCKET_SIZE = HOUR_IN_MILLIS;
stats = new NetworkStatsHistory(BUCKET_SIZE);
@@ -165,6 +180,7 @@
assertValues(stats, 3, SECOND_IN_MILLIS, 64L, 1L, 512L, 8L, 2L);
}
+ @Test
public void testRecordOverlapBuckets() throws Exception {
final long BUCKET_SIZE = HOUR_IN_MILLIS;
stats = new NetworkStatsHistory(BUCKET_SIZE);
@@ -182,6 +198,7 @@
assertValues(stats, 1, (HOUR_IN_MILLIS / 2), 512L, 5L, 512L, 5L, 5L);
}
+ @Test
public void testRecordEntireGapIdentical() throws Exception {
// first, create two separate histories far apart
final NetworkStatsHistory stats1 = new NetworkStatsHistory(HOUR_IN_MILLIS);
@@ -206,6 +223,7 @@
assertValues(stats, 3, 500L, 250L);
}
+ @Test
public void testRecordEntireOverlapVaryingBuckets() throws Exception {
// create history just over hour bucket boundary
final NetworkStatsHistory stats1 = new NetworkStatsHistory(HOUR_IN_MILLIS);
@@ -247,6 +265,7 @@
assertValues(stats, 3, 150L, 150L);
}
+ @Test
public void testRemove() throws Exception {
stats = new NetworkStatsHistory(HOUR_IN_MILLIS);
@@ -280,6 +299,7 @@
assertEquals(0, stats.size());
}
+ @Test
public void testTotalData() throws Exception {
final long BUCKET_SIZE = HOUR_IN_MILLIS;
stats = new NetworkStatsHistory(BUCKET_SIZE);
@@ -304,7 +324,7 @@
}
- @Suppress
+ @Test
public void testFuzzing() throws Exception {
try {
// fuzzing with random events, looking for crashes
@@ -341,6 +361,7 @@
return value < 0 ? -value : value;
}
+ @Test
public void testIgnoreFields() throws Exception {
final NetworkStatsHistory history = new NetworkStatsHistory(
MINUTE_IN_MILLIS, 0, FIELD_RX_BYTES | FIELD_TX_BYTES);
@@ -353,6 +374,7 @@
assertFullValues(history, UNKNOWN, 1026L, UNKNOWN, 2050L, UNKNOWN, UNKNOWN);
}
+ @Test
public void testIgnoreFieldsRecordIn() throws Exception {
final NetworkStatsHistory full = new NetworkStatsHistory(MINUTE_IN_MILLIS, 0, FIELD_ALL);
final NetworkStatsHistory partial = new NetworkStatsHistory(
@@ -365,6 +387,7 @@
assertFullValues(partial, UNKNOWN, UNKNOWN, 10L, UNKNOWN, UNKNOWN, 4L);
}
+ @Test
public void testIgnoreFieldsRecordOut() throws Exception {
final NetworkStatsHistory full = new NetworkStatsHistory(MINUTE_IN_MILLIS, 0, FIELD_ALL);
final NetworkStatsHistory partial = new NetworkStatsHistory(
@@ -377,6 +400,7 @@
assertFullValues(full, MINUTE_IN_MILLIS, 0L, 10L, 0L, 0L, 4L);
}
+ @Test
public void testSerialize() throws Exception {
final NetworkStatsHistory before = new NetworkStatsHistory(MINUTE_IN_MILLIS, 40, FIELD_ALL);
before.recordData(0, 4 * MINUTE_IN_MILLIS,
@@ -396,6 +420,7 @@
assertFullValues(after, 5 * MINUTE_IN_MILLIS, 1034L, 30L, 2078L, 60L, 54L);
}
+ @Test
public void testVarLong() throws Exception {
assertEquals(0L, performVarLong(0L));
assertEquals(-1L, performVarLong(-1L));
@@ -409,6 +434,7 @@
assertEquals(Long.MAX_VALUE - 40, performVarLong(Long.MAX_VALUE - 40));
}
+ @Test
public void testIndexBeforeAfter() throws Exception {
final long BUCKET_SIZE = HOUR_IN_MILLIS;
stats = new NetworkStatsHistory(BUCKET_SIZE);
@@ -451,6 +477,7 @@
assertIndexBeforeAfter(stats, 4, 4, Long.MAX_VALUE);
}
+ @Test
public void testIntersects() throws Exception {
final long BUCKET_SIZE = HOUR_IN_MILLIS;
stats = new NetworkStatsHistory(BUCKET_SIZE);
@@ -485,6 +512,7 @@
assertTrue(stats.intersects(Long.MIN_VALUE, TEST_START + 1));
}
+ @Test
public void testSetValues() throws Exception {
stats = new NetworkStatsHistory(HOUR_IN_MILLIS);
stats.recordData(TEST_START, TEST_START + 1,
diff --git a/tests/net/java/android/net/NetworkStatsTest.java b/tests/net/java/android/net/NetworkStatsTest.java
index 035a4cd7..8f18d07 100644
--- a/tests/net/java/android/net/NetworkStatsTest.java
+++ b/tests/net/java/android/net/NetworkStatsTest.java
@@ -19,6 +19,7 @@
import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
+import static android.net.NetworkStats.INTERFACES_ALL;
import static android.net.NetworkStats.METERED_ALL;
import static android.net.NetworkStats.METERED_NO;
import static android.net.NetworkStats.METERED_YES;
@@ -31,14 +32,17 @@
import static android.net.NetworkStats.SET_DBG_VPN_OUT;
import static android.net.NetworkStats.SET_ALL;
import static android.net.NetworkStats.IFACE_ALL;
+import static android.net.NetworkStats.TAG_ALL;
import static android.net.NetworkStats.TAG_NONE;
import static android.net.NetworkStats.UID_ALL;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import android.os.Process;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.filters.SmallTest;
+import android.util.ArrayMap;
import com.google.android.collect.Sets;
@@ -641,6 +645,218 @@
ROAMING_ALL, DEFAULT_NETWORK_ALL, 50500L, 27L, 100200L, 55, 0);
}
+ @Test
+ public void testFilter_NoFilter() {
+ NetworkStats.Entry entry1 = new NetworkStats.Entry(
+ "test1", 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry2 = new NetworkStats.Entry(
+ "test2", 10101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry3 = new NetworkStats.Entry(
+ "test2", 10101, SET_DEFAULT, 123, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats stats = new NetworkStats(TEST_START, 3)
+ .addValues(entry1)
+ .addValues(entry2)
+ .addValues(entry3);
+
+ stats.filter(UID_ALL, INTERFACES_ALL, TAG_ALL);
+ assertEquals(3, stats.size());
+ assertEquals(entry1, stats.getValues(0, null));
+ assertEquals(entry2, stats.getValues(1, null));
+ assertEquals(entry3, stats.getValues(2, null));
+ }
+
+ @Test
+ public void testFilter_UidFilter() {
+ final int testUid = 10101;
+ NetworkStats.Entry entry1 = new NetworkStats.Entry(
+ "test1", 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry2 = new NetworkStats.Entry(
+ "test2", testUid, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry3 = new NetworkStats.Entry(
+ "test2", testUid, SET_DEFAULT, 123, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats stats = new NetworkStats(TEST_START, 3)
+ .addValues(entry1)
+ .addValues(entry2)
+ .addValues(entry3);
+
+ stats.filter(testUid, INTERFACES_ALL, TAG_ALL);
+ assertEquals(2, stats.size());
+ assertEquals(entry2, stats.getValues(0, null));
+ assertEquals(entry3, stats.getValues(1, null));
+ }
+
+ @Test
+ public void testFilter_InterfaceFilter() {
+ final String testIf1 = "testif1";
+ final String testIf2 = "testif2";
+ NetworkStats.Entry entry1 = new NetworkStats.Entry(
+ testIf1, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry2 = new NetworkStats.Entry(
+ "otherif", 10101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry3 = new NetworkStats.Entry(
+ testIf1, 10101, SET_DEFAULT, 123, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry4 = new NetworkStats.Entry(
+ testIf2, 10101, SET_DEFAULT, 123, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats stats = new NetworkStats(TEST_START, 4)
+ .addValues(entry1)
+ .addValues(entry2)
+ .addValues(entry3)
+ .addValues(entry4);
+
+ stats.filter(UID_ALL, new String[] { testIf1, testIf2 }, TAG_ALL);
+ assertEquals(3, stats.size());
+ assertEquals(entry1, stats.getValues(0, null));
+ assertEquals(entry3, stats.getValues(1, null));
+ assertEquals(entry4, stats.getValues(2, null));
+ }
+
+ @Test
+ public void testFilter_EmptyInterfaceFilter() {
+ NetworkStats.Entry entry1 = new NetworkStats.Entry(
+ "if1", 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry2 = new NetworkStats.Entry(
+ "if2", 10101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats stats = new NetworkStats(TEST_START, 3)
+ .addValues(entry1)
+ .addValues(entry2);
+
+ stats.filter(UID_ALL, new String[] { }, TAG_ALL);
+ assertEquals(0, stats.size());
+ }
+
+ @Test
+ public void testFilter_TagFilter() {
+ final int testTag = 123;
+ final int otherTag = 456;
+ NetworkStats.Entry entry1 = new NetworkStats.Entry(
+ "test1", 10100, SET_DEFAULT, testTag, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry2 = new NetworkStats.Entry(
+ "test2", 10101, SET_DEFAULT, testTag, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats.Entry entry3 = new NetworkStats.Entry(
+ "test2", 10101, SET_DEFAULT, otherTag, METERED_NO, ROAMING_NO,
+ DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L);
+
+ NetworkStats stats = new NetworkStats(TEST_START, 3)
+ .addValues(entry1)
+ .addValues(entry2)
+ .addValues(entry3);
+
+ stats.filter(UID_ALL, INTERFACES_ALL, testTag);
+ assertEquals(2, stats.size());
+ assertEquals(entry1, stats.getValues(0, null));
+ assertEquals(entry2, stats.getValues(1, null));
+ }
+
+ @Test
+ public void testApply464xlatAdjustments() {
+ final String v4Iface = "v4-wlan0";
+ final String baseIface = "wlan0";
+ final String otherIface = "other";
+ final int appUid = 10001;
+ final int rootUid = Process.ROOT_UID;
+ ArrayMap<String, String> stackedIface = new ArrayMap<>();
+ stackedIface.put(v4Iface, baseIface);
+
+ NetworkStats.Entry otherEntry = new NetworkStats.Entry(
+ otherIface, appUid, SET_DEFAULT, TAG_NONE,
+ 2600 /* rxBytes */,
+ 2 /* rxPackets */,
+ 3800 /* txBytes */,
+ 3 /* txPackets */,
+ 0 /* operations */);
+
+ NetworkStats stats = new NetworkStats(TEST_START, 3)
+ .addValues(v4Iface, appUid, SET_DEFAULT, TAG_NONE,
+ 30501490 /* rxBytes */,
+ 22401 /* rxPackets */,
+ 876235 /* txBytes */,
+ 13805 /* txPackets */,
+ 0 /* operations */)
+ .addValues(baseIface, rootUid, SET_DEFAULT, TAG_NONE,
+ 31113087,
+ 22588,
+ 1169942,
+ 13902,
+ 0)
+ .addValues(otherEntry);
+
+ stats.apply464xlatAdjustments(stackedIface);
+
+ assertEquals(3, stats.size());
+ assertValues(stats, 0, v4Iface, appUid, SET_DEFAULT, TAG_NONE,
+ METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO,
+ 30949510,
+ 22401,
+ 1152335,
+ 13805,
+ 0);
+ assertValues(stats, 1, baseIface, 0, SET_DEFAULT, TAG_NONE,
+ METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO,
+ 163577,
+ 187,
+ 17607,
+ 97,
+ 0);
+ assertEquals(otherEntry, stats.getValues(2, null));
+ }
+
+ @Test
+ public void testApply464xlatAdjustments_noStackedIface() {
+ NetworkStats.Entry firstEntry = new NetworkStats.Entry(
+ "if1", 10002, SET_DEFAULT, TAG_NONE,
+ 2600 /* rxBytes */,
+ 2 /* rxPackets */,
+ 3800 /* txBytes */,
+ 3 /* txPackets */,
+ 0 /* operations */);
+ NetworkStats.Entry secondEntry = new NetworkStats.Entry(
+ "if2", 10002, SET_DEFAULT, TAG_NONE,
+ 5000 /* rxBytes */,
+ 3 /* rxPackets */,
+ 6000 /* txBytes */,
+ 4 /* txPackets */,
+ 0 /* operations */);
+
+ NetworkStats stats = new NetworkStats(TEST_START, 2)
+ .addValues(firstEntry)
+ .addValues(secondEntry);
+
+ // Empty map: no adjustment
+ stats.apply464xlatAdjustments(new ArrayMap<>());
+
+ assertEquals(2, stats.size());
+ assertEquals(firstEntry, stats.getValues(0, null));
+ assertEquals(secondEntry, stats.getValues(1, null));
+ }
+
private static void assertContains(NetworkStats stats, String iface, int uid, int set,
int tag, int metered, int roaming, int defaultNetwork, long rxBytes, long rxPackets,
long txBytes, long txPackets, long operations) {
diff --git a/tests/net/java/android/net/NetworkUtilsTest.java b/tests/net/java/android/net/NetworkUtilsTest.java
index 8d51c3b..a5ee8e3 100644
--- a/tests/net/java/android/net/NetworkUtilsTest.java
+++ b/tests/net/java/android/net/NetworkUtilsTest.java
@@ -19,8 +19,10 @@
import android.net.NetworkUtils;
import android.test.suitebuilder.annotation.SmallTest;
+import java.math.BigInteger;
import java.net.Inet4Address;
import java.net.InetAddress;
+import java.util.TreeSet;
import junit.framework.TestCase;
@@ -67,4 +69,101 @@
assertInvalidNetworkMask(IPv4Address("255.255.255.253"));
assertInvalidNetworkMask(IPv4Address("255.255.0.255"));
}
+
+ @SmallTest
+ public void testRoutedIPv4AddressCount() {
+ final TreeSet<IpPrefix> set = new TreeSet<>(IpPrefix.lengthComparator());
+ // No routes routes to no addresses.
+ assertEquals(0, NetworkUtils.routedIPv4AddressCount(set));
+
+ set.add(new IpPrefix("0.0.0.0/0"));
+ assertEquals(1l << 32, NetworkUtils.routedIPv4AddressCount(set));
+
+ set.add(new IpPrefix("20.18.0.0/16"));
+ set.add(new IpPrefix("20.18.0.0/24"));
+ set.add(new IpPrefix("20.18.0.0/8"));
+ // There is a default route, still covers everything
+ assertEquals(1l << 32, NetworkUtils.routedIPv4AddressCount(set));
+
+ set.clear();
+ set.add(new IpPrefix("20.18.0.0/24"));
+ set.add(new IpPrefix("20.18.0.0/8"));
+ // The 8-length includes the 24-length prefix
+ assertEquals(1l << 24, NetworkUtils.routedIPv4AddressCount(set));
+
+ set.add(new IpPrefix("10.10.10.126/25"));
+ // The 8-length does not include this 25-length prefix
+ assertEquals((1l << 24) + (1 << 7), NetworkUtils.routedIPv4AddressCount(set));
+
+ set.clear();
+ set.add(new IpPrefix("1.2.3.4/32"));
+ set.add(new IpPrefix("1.2.3.4/32"));
+ set.add(new IpPrefix("1.2.3.4/32"));
+ set.add(new IpPrefix("1.2.3.4/32"));
+ assertEquals(1l, NetworkUtils.routedIPv4AddressCount(set));
+
+ set.add(new IpPrefix("1.2.3.5/32"));
+ set.add(new IpPrefix("1.2.3.6/32"));
+
+ set.add(new IpPrefix("1.2.3.7/32"));
+ set.add(new IpPrefix("1.2.3.8/32"));
+ set.add(new IpPrefix("1.2.3.9/32"));
+ set.add(new IpPrefix("1.2.3.0/32"));
+ assertEquals(7l, NetworkUtils.routedIPv4AddressCount(set));
+
+ // 1.2.3.4/30 eats 1.2.3.{4-7}/32
+ set.add(new IpPrefix("1.2.3.4/30"));
+ set.add(new IpPrefix("6.2.3.4/28"));
+ set.add(new IpPrefix("120.2.3.4/16"));
+ assertEquals(7l - 4 + 4 + 16 + 65536, NetworkUtils.routedIPv4AddressCount(set));
+ }
+
+ @SmallTest
+ public void testRoutedIPv6AddressCount() {
+ final TreeSet<IpPrefix> set = new TreeSet<>(IpPrefix.lengthComparator());
+ // No routes routes to no addresses.
+ assertEquals(BigInteger.ZERO, NetworkUtils.routedIPv6AddressCount(set));
+
+ set.add(new IpPrefix("::/0"));
+ assertEquals(BigInteger.ONE.shiftLeft(128), NetworkUtils.routedIPv6AddressCount(set));
+
+ set.add(new IpPrefix("1234:622a::18/64"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6adb/96"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6adb/8"));
+ // There is a default route, still covers everything
+ assertEquals(BigInteger.ONE.shiftLeft(128), NetworkUtils.routedIPv6AddressCount(set));
+
+ set.clear();
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6adb/96"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6adb/8"));
+ // The 8-length includes the 96-length prefix
+ assertEquals(BigInteger.ONE.shiftLeft(120), NetworkUtils.routedIPv6AddressCount(set));
+
+ set.add(new IpPrefix("10::26/64"));
+ // The 8-length does not include this 64-length prefix
+ assertEquals(BigInteger.ONE.shiftLeft(120).add(BigInteger.ONE.shiftLeft(64)),
+ NetworkUtils.routedIPv6AddressCount(set));
+
+ set.clear();
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad4/128"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad4/128"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad4/128"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad4/128"));
+ assertEquals(BigInteger.ONE, NetworkUtils.routedIPv6AddressCount(set));
+
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad5/128"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad6/128"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad7/128"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad8/128"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad9/128"));
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad0/128"));
+ assertEquals(BigInteger.valueOf(7), NetworkUtils.routedIPv6AddressCount(set));
+
+ // add4:f00:80:f7:1111::6ad4/126 eats add4:f00:8[:f7:1111::6ad{4-7}/128
+ set.add(new IpPrefix("add4:f00:80:f7:1111::6ad4/126"));
+ set.add(new IpPrefix("d00d:f00:80:f7:1111::6ade/124"));
+ set.add(new IpPrefix("f00b:a33::/112"));
+ assertEquals(BigInteger.valueOf(7l - 4 + 4 + 16 + 65536),
+ NetworkUtils.routedIPv6AddressCount(set));
+ }
}
diff --git a/tests/net/java/android/net/apf/ApfTest.java b/tests/net/java/android/net/apf/ApfTest.java
index 9b75a50..9838020 100644
--- a/tests/net/java/android/net/apf/ApfTest.java
+++ b/tests/net/java/android/net/apf/ApfTest.java
@@ -16,6 +16,7 @@
package android.net.apf;
+import static android.net.util.NetworkConstants.*;
import static android.system.OsConstants.*;
import static com.android.internal.util.BitUtils.bytesToBEInt;
import static com.android.internal.util.BitUtils.put;
@@ -26,13 +27,13 @@
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.verify;
+import android.content.Context;
import android.net.LinkAddress;
import android.net.LinkProperties;
-import android.net.NetworkUtils;
import android.net.apf.ApfFilter.ApfConfiguration;
import android.net.apf.ApfGenerator.IllegalInstructionException;
import android.net.apf.ApfGenerator.Register;
-import android.net.ip.IpManager;
+import android.net.ip.IpClient;
import android.net.metrics.IpConnectivityLog;
import android.net.metrics.RaEvent;
import android.net.util.InterfaceParams;
@@ -40,22 +41,13 @@
import android.os.Parcelable;
import android.os.SystemClock;
import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
import android.system.ErrnoException;
import android.system.Os;
import android.text.format.DateUtils;
-
import com.android.frameworks.tests.net.R;
import com.android.internal.util.HexDump;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileOutputStream;
@@ -66,9 +58,14 @@
import java.nio.ByteBuffer;
import java.util.List;
import java.util.Random;
-
import libcore.io.IoUtils;
import libcore.io.Streams;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
/**
* Tests for APF program generator and interpreter.
@@ -80,8 +77,10 @@
@SmallTest
public class ApfTest {
private static final int TIMEOUT_MS = 500;
+ private static final int MIN_APF_VERSION = 2;
@Mock IpConnectivityLog mLog;
+ @Mock Context mContext;
@Before
public void setUp() throws Exception {
@@ -91,20 +90,30 @@
}
// Expected return codes from APF interpreter.
- private final static int PASS = 1;
- private final static int DROP = 0;
+ private static final int PASS = 1;
+ private static final int DROP = 0;
// Interpreter will just accept packets without link layer headers, so pad fake packet to at
// least the minimum packet size.
- private final static int MIN_PKT_SIZE = 15;
+ private static final int MIN_PKT_SIZE = 15;
private static final ApfCapabilities MOCK_APF_CAPABILITIES =
new ApfCapabilities(2, 1700, ARPHRD_ETHER);
- private final static boolean DROP_MULTICAST = true;
- private final static boolean ALLOW_MULTICAST = false;
+ private static final boolean DROP_MULTICAST = true;
+ private static final boolean ALLOW_MULTICAST = false;
- private final static boolean DROP_802_3_FRAMES = true;
- private final static boolean ALLOW_802_3_FRAMES = false;
+ private static final boolean DROP_802_3_FRAMES = true;
+ private static final boolean ALLOW_802_3_FRAMES = false;
+
+ // Constants for opcode encoding
+ private static final byte LI_OP = (byte)(13 << 3);
+ private static final byte LDDW_OP = (byte)(22 << 3);
+ private static final byte STDW_OP = (byte)(23 << 3);
+ private static final byte SIZE0 = (byte)(0 << 1);
+ private static final byte SIZE8 = (byte)(1 << 1);
+ private static final byte SIZE16 = (byte)(2 << 1);
+ private static final byte SIZE32 = (byte)(3 << 1);
+ private static final byte R1 = 1;
private static ApfConfiguration getDefaultConfig() {
ApfFilter.ApfConfiguration config = new ApfConfiguration();
@@ -128,11 +137,11 @@
}
private void assertVerdict(int expected, byte[] program, byte[] packet, int filterAge) {
- assertReturnCodesEqual(expected, apfSimulate(program, packet, filterAge));
+ assertReturnCodesEqual(expected, apfSimulate(program, packet, null, filterAge));
}
private void assertVerdict(int expected, byte[] program, byte[] packet) {
- assertReturnCodesEqual(expected, apfSimulate(program, packet, 0));
+ assertReturnCodesEqual(expected, apfSimulate(program, packet, null, 0));
}
private void assertPass(byte[] program, byte[] packet, int filterAge) {
@@ -151,9 +160,33 @@
assertVerdict(DROP, program, packet);
}
+ private void assertProgramEquals(byte[] expected, byte[] program) throws AssertionError {
+ // assertArrayEquals() would only print one byte, making debugging difficult.
+ if (!java.util.Arrays.equals(expected, program)) {
+ throw new AssertionError(
+ "\nexpected: " + HexDump.toHexString(expected) +
+ "\nactual: " + HexDump.toHexString(program));
+ }
+ }
+
+ private void assertDataMemoryContents(
+ int expected, byte[] program, byte[] packet, byte[] data, byte[] expected_data)
+ throws IllegalInstructionException, Exception {
+ assertReturnCodesEqual(expected, apfSimulate(program, packet, data, 0 /* filterAge */));
+
+ // assertArrayEquals() would only print one byte, making debugging difficult.
+ if (!java.util.Arrays.equals(expected_data, data)) {
+ throw new Exception(
+ "\nprogram: " + HexDump.toHexString(program) +
+ "\ndata memory: " + HexDump.toHexString(data) +
+ "\nexpected: " + HexDump.toHexString(expected_data));
+ }
+ }
+
private void assertVerdict(int expected, ApfGenerator gen, byte[] packet, int filterAge)
throws IllegalInstructionException {
- assertReturnCodesEqual(expected, apfSimulate(gen.generate(), packet, filterAge));
+ assertReturnCodesEqual(expected, apfSimulate(gen.generate(), packet, null,
+ filterAge));
}
private void assertPass(ApfGenerator gen, byte[] packet, int filterAge)
@@ -186,11 +219,11 @@
// Empty program should pass because having the program counter reach the
// location immediately after the program indicates the packet should be
// passed to the AP.
- ApfGenerator gen = new ApfGenerator();
+ ApfGenerator gen = new ApfGenerator(MIN_APF_VERSION);
assertPass(gen);
// Test jumping to pass label.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJump(gen.PASS_LABEL);
byte[] program = gen.generate();
assertEquals(1, program.length);
@@ -198,7 +231,7 @@
assertPass(program, new byte[MIN_PKT_SIZE], 0);
// Test jumping to drop label.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJump(gen.DROP_LABEL);
program = gen.generate();
assertEquals(2, program.length);
@@ -207,121 +240,121 @@
assertDrop(program, new byte[15], 15);
// Test jumping if equal to 0.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0Equals(0, gen.DROP_LABEL);
assertDrop(gen);
// Test jumping if not equal to 0.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0NotEquals(0, gen.DROP_LABEL);
assertPass(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1);
gen.addJumpIfR0NotEquals(0, gen.DROP_LABEL);
assertDrop(gen);
// Test jumping if registers equal.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0EqualsR1(gen.DROP_LABEL);
assertDrop(gen);
// Test jumping if registers not equal.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0NotEqualsR1(gen.DROP_LABEL);
assertPass(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1);
gen.addJumpIfR0NotEqualsR1(gen.DROP_LABEL);
assertDrop(gen);
// Test load immediate.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addJumpIfR0Equals(1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test add.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addAdd(1234567890);
gen.addJumpIfR0Equals(1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test subtract.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addAdd(-1234567890);
gen.addJumpIfR0Equals(-1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test or.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addOr(1234567890);
gen.addJumpIfR0Equals(1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test and.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addAnd(123456789);
gen.addJumpIfR0Equals(1234567890 & 123456789, gen.DROP_LABEL);
assertDrop(gen);
// Test left shift.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addLeftShift(1);
gen.addJumpIfR0Equals(1234567890 << 1, gen.DROP_LABEL);
assertDrop(gen);
// Test right shift.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addRightShift(1);
gen.addJumpIfR0Equals(1234567890 >> 1, gen.DROP_LABEL);
assertDrop(gen);
// Test multiply.
- gen = new ApfGenerator();
- gen.addLoadImmediate(Register.R0, 1234567890);
+ gen = new ApfGenerator(MIN_APF_VERSION);
+ gen.addLoadImmediate(Register.R0, 123456789);
gen.addMul(2);
- gen.addJumpIfR0Equals(1234567890 * 2, gen.DROP_LABEL);
+ gen.addJumpIfR0Equals(123456789 * 2, gen.DROP_LABEL);
assertDrop(gen);
// Test divide.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addDiv(2);
gen.addJumpIfR0Equals(1234567890 / 2, gen.DROP_LABEL);
assertDrop(gen);
// Test divide by zero.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addDiv(0);
gen.addJump(gen.DROP_LABEL);
assertPass(gen);
// Test add.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 1234567890);
gen.addAddR1();
gen.addJumpIfR0Equals(1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test subtract.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, -1234567890);
gen.addAddR1();
gen.addJumpIfR0Equals(-1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test or.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 1234567890);
gen.addOrR1();
gen.addJumpIfR0Equals(1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test and.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addLoadImmediate(Register.R1, 123456789);
gen.addAndR1();
@@ -329,7 +362,7 @@
assertDrop(gen);
// Test left shift.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addLoadImmediate(Register.R1, 1);
gen.addLeftShiftR1();
@@ -337,7 +370,7 @@
assertDrop(gen);
// Test right shift.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addLoadImmediate(Register.R1, -1);
gen.addLeftShiftR1();
@@ -345,15 +378,15 @@
assertDrop(gen);
// Test multiply.
- gen = new ApfGenerator();
- gen.addLoadImmediate(Register.R0, 1234567890);
+ gen = new ApfGenerator(MIN_APF_VERSION);
+ gen.addLoadImmediate(Register.R0, 123456789);
gen.addLoadImmediate(Register.R1, 2);
gen.addMulR1();
- gen.addJumpIfR0Equals(1234567890 * 2, gen.DROP_LABEL);
+ gen.addJumpIfR0Equals(123456789 * 2, gen.DROP_LABEL);
assertDrop(gen);
// Test divide.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addLoadImmediate(Register.R1, 2);
gen.addDivR1();
@@ -361,136 +394,136 @@
assertDrop(gen);
// Test divide by zero.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addDivR1();
gen.addJump(gen.DROP_LABEL);
assertPass(gen);
// Test byte load.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoad8(Register.R0, 1);
gen.addJumpIfR0Equals(45, gen.DROP_LABEL);
assertDrop(gen, new byte[]{123,45,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0);
// Test out of bounds load.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoad8(Register.R0, 16);
gen.addJumpIfR0Equals(0, gen.DROP_LABEL);
assertPass(gen, new byte[]{123,45,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0);
// Test half-word load.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoad16(Register.R0, 1);
gen.addJumpIfR0Equals((45 << 8) | 67, gen.DROP_LABEL);
assertDrop(gen, new byte[]{123,45,67,0,0,0,0,0,0,0,0,0,0,0,0}, 0);
// Test word load.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoad32(Register.R0, 1);
gen.addJumpIfR0Equals((45 << 24) | (67 << 16) | (89 << 8) | 12, gen.DROP_LABEL);
assertDrop(gen, new byte[]{123,45,67,89,12,0,0,0,0,0,0,0,0,0,0}, 0);
// Test byte indexed load.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 1);
gen.addLoad8Indexed(Register.R0, 0);
gen.addJumpIfR0Equals(45, gen.DROP_LABEL);
assertDrop(gen, new byte[]{123,45,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0);
// Test out of bounds indexed load.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 8);
gen.addLoad8Indexed(Register.R0, 8);
gen.addJumpIfR0Equals(0, gen.DROP_LABEL);
assertPass(gen, new byte[]{123,45,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0);
// Test half-word indexed load.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 1);
gen.addLoad16Indexed(Register.R0, 0);
gen.addJumpIfR0Equals((45 << 8) | 67, gen.DROP_LABEL);
assertDrop(gen, new byte[]{123,45,67,0,0,0,0,0,0,0,0,0,0,0,0}, 0);
// Test word indexed load.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 1);
gen.addLoad32Indexed(Register.R0, 0);
gen.addJumpIfR0Equals((45 << 24) | (67 << 16) | (89 << 8) | 12, gen.DROP_LABEL);
assertDrop(gen, new byte[]{123,45,67,89,12,0,0,0,0,0,0,0,0,0,0}, 0);
// Test jumping if greater than.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0GreaterThan(0, gen.DROP_LABEL);
assertPass(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1);
gen.addJumpIfR0GreaterThan(0, gen.DROP_LABEL);
assertDrop(gen);
// Test jumping if less than.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0LessThan(0, gen.DROP_LABEL);
assertPass(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0LessThan(1, gen.DROP_LABEL);
assertDrop(gen);
// Test jumping if any bits set.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0AnyBitsSet(3, gen.DROP_LABEL);
assertPass(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1);
gen.addJumpIfR0AnyBitsSet(3, gen.DROP_LABEL);
assertDrop(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 3);
gen.addJumpIfR0AnyBitsSet(3, gen.DROP_LABEL);
assertDrop(gen);
// Test jumping if register greater than.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0GreaterThanR1(gen.DROP_LABEL);
assertPass(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 2);
gen.addLoadImmediate(Register.R1, 1);
gen.addJumpIfR0GreaterThanR1(gen.DROP_LABEL);
assertDrop(gen);
// Test jumping if register less than.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfR0LessThanR1(gen.DROP_LABEL);
assertPass(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 1);
gen.addJumpIfR0LessThanR1(gen.DROP_LABEL);
assertDrop(gen);
// Test jumping if any bits set in register.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 3);
gen.addJumpIfR0AnyBitsSetR1(gen.DROP_LABEL);
assertPass(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 3);
gen.addLoadImmediate(Register.R0, 1);
gen.addJumpIfR0AnyBitsSetR1(gen.DROP_LABEL);
assertDrop(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 3);
gen.addLoadImmediate(Register.R0, 3);
gen.addJumpIfR0AnyBitsSetR1(gen.DROP_LABEL);
assertDrop(gen);
// Test load from memory.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadFromMemory(Register.R0, 0);
gen.addJumpIfR0Equals(0, gen.DROP_LABEL);
assertDrop(gen);
// Test store to memory.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 1234567890);
gen.addStoreToMemory(Register.R1, 12);
gen.addLoadFromMemory(Register.R0, 12);
@@ -498,63 +531,63 @@
assertDrop(gen);
// Test filter age pre-filled memory.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadFromMemory(Register.R0, gen.FILTER_AGE_MEMORY_SLOT);
gen.addJumpIfR0Equals(1234567890, gen.DROP_LABEL);
assertDrop(gen, new byte[MIN_PKT_SIZE], 1234567890);
// Test packet size pre-filled memory.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadFromMemory(Register.R0, gen.PACKET_SIZE_MEMORY_SLOT);
gen.addJumpIfR0Equals(MIN_PKT_SIZE, gen.DROP_LABEL);
assertDrop(gen);
// Test IPv4 header size pre-filled memory.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadFromMemory(Register.R0, gen.IPV4_HEADER_SIZE_MEMORY_SLOT);
gen.addJumpIfR0Equals(20, gen.DROP_LABEL);
assertDrop(gen, new byte[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x45}, 0);
// Test not.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addNot(Register.R0);
gen.addJumpIfR0Equals(~1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test negate.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addNeg(Register.R0);
gen.addJumpIfR0Equals(-1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test move.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 1234567890);
gen.addMove(Register.R0);
gen.addJumpIfR0Equals(1234567890, gen.DROP_LABEL);
assertDrop(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addMove(Register.R1);
gen.addJumpIfR0Equals(1234567890, gen.DROP_LABEL);
assertDrop(gen);
// Test swap.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R1, 1234567890);
gen.addSwap();
gen.addJumpIfR0Equals(1234567890, gen.DROP_LABEL);
assertDrop(gen);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1234567890);
gen.addSwap();
gen.addJumpIfR0Equals(0, gen.DROP_LABEL);
assertDrop(gen);
// Test jump if bytes not equal.
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1);
gen.addJumpIfBytesNotEqual(Register.R0, new byte[]{123}, gen.DROP_LABEL);
program = gen.generate();
@@ -566,25 +599,258 @@
assertEquals(1, program[4]);
assertEquals(123, program[5]);
assertDrop(program, new byte[MIN_PKT_SIZE], 0);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1);
gen.addJumpIfBytesNotEqual(Register.R0, new byte[]{123}, gen.DROP_LABEL);
byte[] packet123 = {0,123,0,0,0,0,0,0,0,0,0,0,0,0,0};
assertPass(gen, packet123, 0);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addJumpIfBytesNotEqual(Register.R0, new byte[]{123}, gen.DROP_LABEL);
assertDrop(gen, packet123, 0);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1);
gen.addJumpIfBytesNotEqual(Register.R0, new byte[]{1,2,30,4,5}, gen.DROP_LABEL);
byte[] packet12345 = {0,1,2,3,4,5,0,0,0,0,0,0,0,0,0};
assertDrop(gen, packet12345, 0);
- gen = new ApfGenerator();
+ gen = new ApfGenerator(MIN_APF_VERSION);
gen.addLoadImmediate(Register.R0, 1);
gen.addJumpIfBytesNotEqual(Register.R0, new byte[]{1,2,3,4,5}, gen.DROP_LABEL);
assertPass(gen, packet12345, 0);
}
+ @Test(expected = ApfGenerator.IllegalInstructionException.class)
+ public void testApfGeneratorWantsV2OrGreater() throws Exception {
+ // The minimum supported APF version is 2.
+ new ApfGenerator(1);
+ }
+
+ @Test
+ public void testApfDataOpcodesWantApfV3() throws IllegalInstructionException, Exception {
+ ApfGenerator gen = new ApfGenerator(MIN_APF_VERSION);
+ try {
+ gen.addStoreData(Register.R0, 0);
+ fail();
+ } catch (IllegalInstructionException expected) {
+ /* pass */
+ }
+ try {
+ gen.addLoadData(Register.R0, 0);
+ fail();
+ } catch (IllegalInstructionException expected) {
+ /* pass */
+ }
+ }
+
+ /**
+ * Test that the generator emits immediates using the shortest possible encoding.
+ */
+ @Test
+ public void testImmediateEncoding() throws IllegalInstructionException {
+ ApfGenerator gen;
+
+ // 0-byte immediate: li R0, 0
+ gen = new ApfGenerator(4);
+ gen.addLoadImmediate(Register.R0, 0);
+ assertProgramEquals(new byte[]{LI_OP | SIZE0}, gen.generate());
+
+ // 1-byte immediate: li R0, 42
+ gen = new ApfGenerator(4);
+ gen.addLoadImmediate(Register.R0, 42);
+ assertProgramEquals(new byte[]{LI_OP | SIZE8, 42}, gen.generate());
+
+ // 2-byte immediate: li R1, 0x1234
+ gen = new ApfGenerator(4);
+ gen.addLoadImmediate(Register.R1, 0x1234);
+ assertProgramEquals(new byte[]{LI_OP | SIZE16 | R1, 0x12, 0x34}, gen.generate());
+
+ // 4-byte immediate: li R0, 0x12345678
+ gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R0, 0x12345678);
+ assertProgramEquals(
+ new byte[]{LI_OP | SIZE32, 0x12, 0x34, 0x56, 0x78},
+ gen.generate());
+ }
+
+ /**
+ * Test that the generator emits negative immediates using the shortest possible encoding.
+ */
+ @Test
+ public void testNegativeImmediateEncoding() throws IllegalInstructionException {
+ ApfGenerator gen;
+
+ // 1-byte negative immediate: li R0, -42
+ gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R0, -42);
+ assertProgramEquals(new byte[]{LI_OP | SIZE8, -42}, gen.generate());
+
+ // 2-byte negative immediate: li R1, -0x1122
+ gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R1, -0x1122);
+ assertProgramEquals(new byte[]{LI_OP | SIZE16 | R1, (byte)0xEE, (byte)0xDE},
+ gen.generate());
+
+ // 4-byte negative immediate: li R0, -0x11223344
+ gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R0, -0x11223344);
+ assertProgramEquals(
+ new byte[]{LI_OP | SIZE32, (byte)0xEE, (byte)0xDD, (byte)0xCC, (byte)0xBC},
+ gen.generate());
+ }
+
+ /**
+ * Test that the generator correctly emits positive and negative immediates for LDDW/STDW.
+ */
+ @Test
+ public void testLoadStoreDataEncoding() throws IllegalInstructionException {
+ ApfGenerator gen;
+
+ // Load data with no offset: lddw R0, [0 + r1]
+ gen = new ApfGenerator(3);
+ gen.addLoadData(Register.R0, 0);
+ assertProgramEquals(new byte[]{LDDW_OP | SIZE0}, gen.generate());
+
+ // Store data with 8bit negative offset: lddw r0, [-42 + r1]
+ gen = new ApfGenerator(3);
+ gen.addStoreData(Register.R0, -42);
+ assertProgramEquals(new byte[]{STDW_OP | SIZE8, -42}, gen.generate());
+
+ // Store data to R1 with 16bit negative offset: stdw r1, [-0x1122 + r0]
+ gen = new ApfGenerator(3);
+ gen.addStoreData(Register.R1, -0x1122);
+ assertProgramEquals(new byte[]{STDW_OP | SIZE16 | R1, (byte)0xEE, (byte)0xDE},
+ gen.generate());
+
+ // Load data to R1 with 32bit negative offset: lddw r1, [0xDEADBEEF + r0]
+ gen = new ApfGenerator(3);
+ gen.addLoadData(Register.R1, 0xDEADBEEF);
+ assertProgramEquals(
+ new byte[]{LDDW_OP | SIZE32 | R1, (byte)0xDE, (byte)0xAD, (byte)0xBE, (byte)0xEF},
+ gen.generate());
+ }
+
+ /**
+ * Test that the interpreter correctly executes STDW with a negative 8bit offset
+ */
+ @Test
+ public void testApfDataWrite() throws IllegalInstructionException, Exception {
+ byte[] packet = new byte[MIN_PKT_SIZE];
+ byte[] data = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ byte[] expected_data = data.clone();
+
+ // No memory access instructions: should leave the data segment untouched.
+ ApfGenerator gen = new ApfGenerator(3);
+ assertDataMemoryContents(PASS, gen.generate(), packet, data, expected_data);
+
+ // Expect value 0x87654321 to be stored starting from address -11 from the end of the
+ // data buffer, in big-endian order.
+ gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R0, 0x87654321);
+ gen.addLoadImmediate(Register.R1, -5);
+ gen.addStoreData(Register.R0, -6); // -5 + -6 = -11 (offset +5 with data_len=16)
+ expected_data[5] = (byte)0x87;
+ expected_data[6] = (byte)0x65;
+ expected_data[7] = (byte)0x43;
+ expected_data[8] = (byte)0x21;
+ assertDataMemoryContents(PASS, gen.generate(), packet, data, expected_data);
+ }
+
+ /**
+ * Test that the interpreter correctly executes LDDW with a negative 16bit offset
+ */
+ @Test
+ public void testApfDataRead() throws IllegalInstructionException, Exception {
+ // Program that DROPs if address 10 (-6) contains 0x87654321.
+ ApfGenerator gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R1, 1000);
+ gen.addLoadData(Register.R0, -1006); // 1000 + -1006 = -6 (offset +10 with data_len=16)
+ gen.addJumpIfR0Equals(0x87654321, gen.DROP_LABEL);
+ byte[] program = gen.generate();
+ byte[] packet = new byte[MIN_PKT_SIZE];
+
+ // Content is incorrect (last byte does not match) -> PASS
+ byte[] data = new byte[16];
+ data[10] = (byte)0x87;
+ data[11] = (byte)0x65;
+ data[12] = (byte)0x43;
+ data[13] = (byte)0x00; // != 0x21
+ byte[] expected_data = data.clone();
+ assertDataMemoryContents(PASS, program, packet, data, expected_data);
+
+ // Fix the last byte -> conditional jump taken -> DROP
+ data[13] = (byte)0x21;
+ expected_data = data;
+ assertDataMemoryContents(DROP, program, packet, data, expected_data);
+ }
+
+ /**
+ * Test that the interpreter correctly executes LDDW followed by a STDW.
+ * To cover a few more edge cases, LDDW has a 0bit offset, while STDW has a positive 8bit
+ * offset.
+ */
+ @Test
+ public void testApfDataReadModifyWrite() throws IllegalInstructionException, Exception {
+ ApfGenerator gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R1, -22);
+ gen.addLoadData(Register.R0, 0); // Load from address 32 -22 + 0 = 10
+ gen.addAdd(0x78453412); // 87654321 + 78453412 = FFAA7733
+ gen.addStoreData(Register.R0, 4); // Write back to address 32 -22 + 4 = 14
+
+ byte[] packet = new byte[MIN_PKT_SIZE];
+ byte[] data = new byte[32];
+ data[10] = (byte)0x87;
+ data[11] = (byte)0x65;
+ data[12] = (byte)0x43;
+ data[13] = (byte)0x21;
+ byte[] expected_data = data.clone();
+ expected_data[14] = (byte)0xFF;
+ expected_data[15] = (byte)0xAA;
+ expected_data[16] = (byte)0x77;
+ expected_data[17] = (byte)0x33;
+ assertDataMemoryContents(PASS, gen.generate(), packet, data, expected_data);
+ }
+
+ @Test
+ public void testApfDataBoundChecking() throws IllegalInstructionException, Exception {
+ byte[] packet = new byte[MIN_PKT_SIZE];
+ byte[] data = new byte[32];
+ byte[] expected_data = data;
+
+ // Program that DROPs unconditionally. This is our the baseline.
+ ApfGenerator gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R0, 3);
+ gen.addLoadData(Register.R1, 7);
+ gen.addJump(gen.DROP_LABEL);
+ assertDataMemoryContents(DROP, gen.generate(), packet, data, expected_data);
+
+ // Same program as before, but this time we're trying to load past the end of the data.
+ gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R0, 20);
+ gen.addLoadData(Register.R1, 15); // 20 + 15 > 32
+ gen.addJump(gen.DROP_LABEL); // Not reached.
+ assertDataMemoryContents(PASS, gen.generate(), packet, data, expected_data);
+
+ // Subtracting an immediate should work...
+ gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R0, 20);
+ gen.addLoadData(Register.R1, -4);
+ gen.addJump(gen.DROP_LABEL);
+ assertDataMemoryContents(DROP, gen.generate(), packet, data, expected_data);
+
+ // ...and underflowing simply wraps around to the end of the buffer...
+ gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R0, 20);
+ gen.addLoadData(Register.R1, -30);
+ gen.addJump(gen.DROP_LABEL);
+ assertDataMemoryContents(DROP, gen.generate(), packet, data, expected_data);
+
+ // ...but doesn't allow accesses before the start of the buffer
+ gen = new ApfGenerator(3);
+ gen.addLoadImmediate(Register.R0, 20);
+ gen.addLoadData(Register.R1, -1000);
+ gen.addJump(gen.DROP_LABEL); // Not reached.
+ assertDataMemoryContents(PASS, gen.generate(), packet, data, expected_data);
+ }
+
/**
* Generate some BPF programs, translate them to APF, then run APF and BPF programs
* over packet traces and verify both programs filter out the same packets.
@@ -603,7 +869,7 @@
}
}
- private class MockIpManagerCallback extends IpManager.Callback {
+ private class MockIpClientCallback extends IpClient.Callback {
private final ConditionVariable mGotApfProgram = new ConditionVariable();
private byte[] mLastApfProgram;
@@ -628,14 +894,14 @@
}
private static class TestApfFilter extends ApfFilter {
- public final static byte[] MOCK_MAC_ADDR = {1,2,3,4,5,6};
+ public static final byte[] MOCK_MAC_ADDR = {1,2,3,4,5,6};
private FileDescriptor mWriteSocket;
private final long mFixedTimeMs = SystemClock.elapsedRealtime();
- public TestApfFilter(ApfConfiguration config, IpManager.Callback ipManagerCallback,
- IpConnectivityLog log) throws Exception {
- super(config, InterfaceParams.getByName("lo"), ipManagerCallback, log);
+ public TestApfFilter(Context context, ApfConfiguration config,
+ IpClient.Callback ipClientCallback, IpConnectivityLog log) throws Exception {
+ super(context, config, InterfaceParams.getByName("lo"), ipClientCallback, log);
}
// Pretend an RA packet has been received and show it to ApfFilter.
@@ -757,19 +1023,30 @@
private static final byte[] ANOTHER_IPV4_ADDR = {10, 0, 0, 2};
private static final byte[] IPV4_ANY_HOST_ADDR = {0, 0, 0, 0};
+ // Helper to initialize a default apfFilter.
+ private ApfFilter setupApfFilter(IpClient.Callback ipClientCallback, ApfConfiguration config)
+ throws Exception {
+ LinkAddress link = new LinkAddress(InetAddress.getByAddress(MOCK_IPV4_ADDR), 19);
+ LinkProperties lp = new LinkProperties();
+ lp.addLinkAddress(link);
+ TestApfFilter apfFilter = new TestApfFilter(mContext, config, ipClientCallback, mLog);
+ apfFilter.setLinkProperties(lp);
+ return apfFilter;
+ }
+
@Test
public void testApfFilterIPv4() throws Exception {
- MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
+ MockIpClientCallback ipClientCallback = new MockIpClientCallback();
LinkAddress link = new LinkAddress(InetAddress.getByAddress(MOCK_IPV4_ADDR), 19);
LinkProperties lp = new LinkProperties();
lp.addLinkAddress(link);
ApfConfiguration config = getDefaultConfig();
config.multicastFilter = DROP_MULTICAST;
- TestApfFilter apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
+ TestApfFilter apfFilter = new TestApfFilter(mContext, config, ipClientCallback, mLog);
apfFilter.setLinkProperties(lp);
- byte[] program = ipManagerCallback.getApfProgram();
+ byte[] program = ipClientCallback.getApfProgram();
// Verify empty packet of 100 zero bytes is passed
ByteBuffer packet = ByteBuffer.wrap(new byte[100]);
@@ -816,10 +1093,10 @@
@Test
public void testApfFilterIPv6() throws Exception {
- MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
+ MockIpClientCallback ipClientCallback = new MockIpClientCallback();
ApfConfiguration config = getDefaultConfig();
- TestApfFilter apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
- byte[] program = ipManagerCallback.getApfProgram();
+ TestApfFilter apfFilter = new TestApfFilter(mContext, config, ipClientCallback, mLog);
+ byte[] program = ipClientCallback.getApfProgram();
// Verify empty IPv6 packet is passed
ByteBuffer packet = ByteBuffer.wrap(new byte[100]);
@@ -854,17 +1131,17 @@
final byte[] multicastIpv4Addr = {(byte)224,0,0,1};
final byte[] multicastIpv6Addr = {(byte)0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,(byte)0xfb};
- MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
+ MockIpClientCallback ipClientCallback = new MockIpClientCallback();
LinkAddress link = new LinkAddress(InetAddress.getByAddress(unicastIpv4Addr), 24);
LinkProperties lp = new LinkProperties();
lp.addLinkAddress(link);
ApfConfiguration config = getDefaultConfig();
config.ieee802_3Filter = DROP_802_3_FRAMES;
- TestApfFilter apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
+ TestApfFilter apfFilter = new TestApfFilter(mContext, config, ipClientCallback, mLog);
apfFilter.setLinkProperties(lp);
- byte[] program = ipManagerCallback.getApfProgram();
+ byte[] program = ipClientCallback.getApfProgram();
// Construct IPv4 and IPv6 multicast packets.
ByteBuffer mcastv4packet = ByteBuffer.wrap(new byte[100]);
@@ -901,9 +1178,9 @@
assertPass(program, bcastv4unicastl2packet.array());
// Turn on multicast filter and verify it works
- ipManagerCallback.resetApfProgramWait();
+ ipClientCallback.resetApfProgramWait();
apfFilter.setMulticastFilter(true);
- program = ipManagerCallback.getApfProgram();
+ program = ipClientCallback.getApfProgram();
assertDrop(program, mcastv4packet.array());
assertDrop(program, mcastv6packet.array());
assertDrop(program, bcastv4packet1.array());
@@ -911,9 +1188,9 @@
assertDrop(program, bcastv4unicastl2packet.array());
// Turn off multicast filter and verify it's off
- ipManagerCallback.resetApfProgramWait();
+ ipClientCallback.resetApfProgramWait();
apfFilter.setMulticastFilter(false);
- program = ipManagerCallback.getApfProgram();
+ program = ipClientCallback.getApfProgram();
assertPass(program, mcastv4packet.array());
assertPass(program, mcastv6packet.array());
assertPass(program, bcastv4packet1.array());
@@ -921,13 +1198,13 @@
assertPass(program, bcastv4unicastl2packet.array());
// Verify it can be initialized to on
- ipManagerCallback.resetApfProgramWait();
+ ipClientCallback.resetApfProgramWait();
apfFilter.shutdown();
config.multicastFilter = DROP_MULTICAST;
config.ieee802_3Filter = DROP_802_3_FRAMES;
- apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
+ apfFilter = new TestApfFilter(mContext, config, ipClientCallback, mLog);
apfFilter.setLinkProperties(lp);
- program = ipManagerCallback.getApfProgram();
+ program = ipClientCallback.getApfProgram();
assertDrop(program, mcastv4packet.array());
assertDrop(program, mcastv6packet.array());
assertDrop(program, bcastv4packet1.array());
@@ -941,17 +1218,48 @@
}
@Test
+ public void testApfFilterMulticastPingWhileDozing() throws Exception {
+ MockIpClientCallback ipClientCallback = new MockIpClientCallback();
+ ApfFilter apfFilter = setupApfFilter(ipClientCallback, getDefaultConfig());
+
+ // Construct a multicast ICMPv6 ECHO request.
+ final byte[] multicastIpv6Addr = {(byte)0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,(byte)0xfb};
+ ByteBuffer packet = ByteBuffer.wrap(new byte[100]);
+ packet.putShort(ETH_ETHERTYPE_OFFSET, (short)ETH_P_IPV6);
+ packet.put(IPV6_NEXT_HEADER_OFFSET, (byte)IPPROTO_ICMPV6);
+ packet.put(ICMP6_TYPE_OFFSET, (byte)ICMPV6_ECHO_REQUEST_TYPE);
+ put(packet, IPV6_DEST_ADDR_OFFSET, multicastIpv6Addr);
+
+ // Normally, we let multicast pings alone...
+ assertPass(ipClientCallback.getApfProgram(), packet.array());
+
+ // ...and even while dozing...
+ apfFilter.setDozeMode(true);
+ assertPass(ipClientCallback.getApfProgram(), packet.array());
+
+ // ...but when the multicast filter is also enabled, drop the multicast pings to save power.
+ apfFilter.setMulticastFilter(true);
+ assertDrop(ipClientCallback.getApfProgram(), packet.array());
+
+ // However, we should still let through all other ICMPv6 types.
+ ByteBuffer raPacket = ByteBuffer.wrap(packet.array().clone());
+ raPacket.put(ICMP6_TYPE_OFFSET, (byte)ICMPV6_ROUTER_ADVERTISEMENT);
+ assertPass(ipClientCallback.getApfProgram(), raPacket.array());
+
+ // Now wake up from doze mode to ensure that we no longer drop the packets.
+ // (The multicast filter is still enabled at this point).
+ apfFilter.setDozeMode(false);
+ assertPass(ipClientCallback.getApfProgram(), packet.array());
+
+ apfFilter.shutdown();
+ }
+
+ @Test
public void testApfFilter802_3() throws Exception {
- MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
- LinkAddress link = new LinkAddress(InetAddress.getByAddress(MOCK_IPV4_ADDR), 19);
- LinkProperties lp = new LinkProperties();
- lp.addLinkAddress(link);
-
+ MockIpClientCallback ipClientCallback = new MockIpClientCallback();
ApfConfiguration config = getDefaultConfig();
- TestApfFilter apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
- apfFilter.setLinkProperties(lp);
-
- byte[] program = ipManagerCallback.getApfProgram();
+ ApfFilter apfFilter = setupApfFilter(ipClientCallback, config);
+ byte[] program = ipClientCallback.getApfProgram();
// Verify empty packet of 100 zero bytes is passed
// Note that eth-type = 0 makes it an IEEE802.3 frame
@@ -967,12 +1275,11 @@
assertPass(program, packet.array());
// Now turn on the filter
- ipManagerCallback.resetApfProgramWait();
+ ipClientCallback.resetApfProgramWait();
apfFilter.shutdown();
config.ieee802_3Filter = DROP_802_3_FRAMES;
- apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
- apfFilter.setLinkProperties(lp);
- program = ipManagerCallback.getApfProgram();
+ apfFilter = setupApfFilter(ipClientCallback, config);
+ program = ipClientCallback.getApfProgram();
// Verify that IEEE802.3 frame is dropped
// In this case ethtype is used for payload length
@@ -992,19 +1299,14 @@
@Test
public void testApfFilterEthTypeBL() throws Exception {
- MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
- LinkAddress link = new LinkAddress(InetAddress.getByAddress(MOCK_IPV4_ADDR), 19);
- LinkProperties lp = new LinkProperties();
- lp.addLinkAddress(link);
final int[] emptyBlackList = {};
final int[] ipv4BlackList = {ETH_P_IP};
final int[] ipv4Ipv6BlackList = {ETH_P_IP, ETH_P_IPV6};
+ MockIpClientCallback ipClientCallback = new MockIpClientCallback();
ApfConfiguration config = getDefaultConfig();
- TestApfFilter apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
- apfFilter.setLinkProperties(lp);
-
- byte[] program = ipManagerCallback.getApfProgram();
+ ApfFilter apfFilter = setupApfFilter(ipClientCallback, config);
+ byte[] program = ipClientCallback.getApfProgram();
// Verify empty packet of 100 zero bytes is passed
// Note that eth-type = 0 makes it an IEEE802.3 frame
@@ -1020,12 +1322,11 @@
assertPass(program, packet.array());
// Now add IPv4 to the black list
- ipManagerCallback.resetApfProgramWait();
+ ipClientCallback.resetApfProgramWait();
apfFilter.shutdown();
config.ethTypeBlackList = ipv4BlackList;
- apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
- apfFilter.setLinkProperties(lp);
- program = ipManagerCallback.getApfProgram();
+ apfFilter = setupApfFilter(ipClientCallback, config);
+ program = ipClientCallback.getApfProgram();
// Verify that IPv4 frame will be dropped
packet.putShort(ETH_ETHERTYPE_OFFSET, (short)ETH_P_IP);
@@ -1036,12 +1337,11 @@
assertPass(program, packet.array());
// Now let us have both IPv4 and IPv6 in the black list
- ipManagerCallback.resetApfProgramWait();
+ ipClientCallback.resetApfProgramWait();
apfFilter.shutdown();
config.ethTypeBlackList = ipv4Ipv6BlackList;
- apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
- apfFilter.setLinkProperties(lp);
- program = ipManagerCallback.getApfProgram();
+ apfFilter = setupApfFilter(ipClientCallback, config);
+ program = ipClientCallback.getApfProgram();
// Verify that IPv4 frame will be dropped
packet.putShort(ETH_ETHERTYPE_OFFSET, (short)ETH_P_IP);
@@ -1054,7 +1354,7 @@
apfFilter.shutdown();
}
- private byte[] getProgram(MockIpManagerCallback cb, ApfFilter filter, LinkProperties lp) {
+ private byte[] getProgram(MockIpClientCallback cb, ApfFilter filter, LinkProperties lp) {
cb.resetApfProgramWait();
filter.setLinkProperties(lp);
return cb.getApfProgram();
@@ -1077,23 +1377,23 @@
@Test
public void testApfFilterArp() throws Exception {
- MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
+ MockIpClientCallback ipClientCallback = new MockIpClientCallback();
ApfConfiguration config = getDefaultConfig();
config.multicastFilter = DROP_MULTICAST;
config.ieee802_3Filter = DROP_802_3_FRAMES;
- TestApfFilter apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
+ TestApfFilter apfFilter = new TestApfFilter(mContext, config, ipClientCallback, mLog);
// Verify initially ARP request filter is off, and GARP filter is on.
- verifyArpFilter(ipManagerCallback.getApfProgram(), PASS);
+ verifyArpFilter(ipClientCallback.getApfProgram(), PASS);
// Inform ApfFilter of our address and verify ARP filtering is on
LinkAddress linkAddress = new LinkAddress(InetAddress.getByAddress(MOCK_IPV4_ADDR), 24);
LinkProperties lp = new LinkProperties();
assertTrue(lp.addLinkAddress(linkAddress));
- verifyArpFilter(getProgram(ipManagerCallback, apfFilter, lp), DROP);
+ verifyArpFilter(getProgram(ipClientCallback, apfFilter, lp), DROP);
// Inform ApfFilter of loss of IP and verify ARP filtering is off
- verifyArpFilter(getProgram(ipManagerCallback, apfFilter, new LinkProperties()), PASS);
+ verifyArpFilter(getProgram(ipClientCallback, apfFilter, new LinkProperties()), PASS);
apfFilter.shutdown();
}
@@ -1124,7 +1424,7 @@
return packet.array();
}
- // Verify that the last program pushed to the IpManager.Callback properly filters the
+ // Verify that the last program pushed to the IpClient.Callback properly filters the
// given packet for the given lifetime.
private void verifyRaLifetime(byte[] program, ByteBuffer packet, int lifetime) {
final int FRACTION_OF_LIFETIME = 6;
@@ -1154,12 +1454,12 @@
// Test that when ApfFilter is shown the given packet, it generates a program to filter it
// for the given lifetime.
- private void verifyRaLifetime(TestApfFilter apfFilter, MockIpManagerCallback ipManagerCallback,
+ private void verifyRaLifetime(TestApfFilter apfFilter, MockIpClientCallback ipClientCallback,
ByteBuffer packet, int lifetime) throws IOException, ErrnoException {
// Verify new program generated if ApfFilter witnesses RA
- ipManagerCallback.resetApfProgramWait();
+ ipClientCallback.resetApfProgramWait();
apfFilter.pretendPacketReceived(packet.array());
- byte[] program = ipManagerCallback.getApfProgram();
+ byte[] program = ipClientCallback.getApfProgram();
verifyRaLifetime(program, packet, lifetime);
}
@@ -1192,21 +1492,21 @@
&& (ev1.dnsslLifetime == ev2.dnsslLifetime);
}
- private void assertInvalidRa(TestApfFilter apfFilter, MockIpManagerCallback ipManagerCallback,
+ private void assertInvalidRa(TestApfFilter apfFilter, MockIpClientCallback ipClientCallback,
ByteBuffer packet) throws IOException, ErrnoException {
- ipManagerCallback.resetApfProgramWait();
+ ipClientCallback.resetApfProgramWait();
apfFilter.pretendPacketReceived(packet.array());
- ipManagerCallback.assertNoProgramUpdate();
+ ipClientCallback.assertNoProgramUpdate();
}
@Test
public void testApfFilterRa() throws Exception {
- MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
+ MockIpClientCallback ipClientCallback = new MockIpClientCallback();
ApfConfiguration config = getDefaultConfig();
config.multicastFilter = DROP_MULTICAST;
config.ieee802_3Filter = DROP_802_3_FRAMES;
- TestApfFilter apfFilter = new TestApfFilter(config, ipManagerCallback, mLog);
- byte[] program = ipManagerCallback.getApfProgram();
+ TestApfFilter apfFilter = new TestApfFilter(mContext, config, ipClientCallback, mLog);
+ byte[] program = ipClientCallback.getApfProgram();
final int ROUTER_LIFETIME = 1000;
final int PREFIX_VALID_LIFETIME = 200;
@@ -1231,7 +1531,7 @@
basePacket.put(IPV6_ALL_NODES_ADDRESS);
assertPass(program, basePacket.array());
- verifyRaLifetime(apfFilter, ipManagerCallback, basePacket, ROUTER_LIFETIME);
+ verifyRaLifetime(apfFilter, ipClientCallback, basePacket, ROUTER_LIFETIME);
verifyRaEvent(new RaEvent(ROUTER_LIFETIME, -1, -1, -1, -1, -1));
ByteBuffer newFlowLabelPacket = ByteBuffer.wrap(new byte[ICMP6_RA_OPTION_OFFSET]);
@@ -1249,7 +1549,7 @@
zeroLengthOptionPacket.put(basePacket);
zeroLengthOptionPacket.put((byte)ICMP6_PREFIX_OPTION_TYPE);
zeroLengthOptionPacket.put((byte)0);
- assertInvalidRa(apfFilter, ipManagerCallback, zeroLengthOptionPacket);
+ assertInvalidRa(apfFilter, ipClientCallback, zeroLengthOptionPacket);
// Generate several RAs with different options and lifetimes, and verify when
// ApfFilter is shown these packets, it generates programs to filter them for the
@@ -1267,7 +1567,7 @@
ICMP6_RA_OPTION_OFFSET + ICMP6_PREFIX_OPTION_VALID_LIFETIME_OFFSET,
PREFIX_VALID_LIFETIME);
verifyRaLifetime(
- apfFilter, ipManagerCallback, prefixOptionPacket, PREFIX_PREFERRED_LIFETIME);
+ apfFilter, ipClientCallback, prefixOptionPacket, PREFIX_PREFERRED_LIFETIME);
verifyRaEvent(new RaEvent(
ROUTER_LIFETIME, PREFIX_VALID_LIFETIME, PREFIX_PREFERRED_LIFETIME, -1, -1, -1));
@@ -1279,7 +1579,7 @@
rdnssOptionPacket.put((byte)(ICMP6_4_BYTE_OPTION_LEN / 8));
rdnssOptionPacket.putInt(
ICMP6_RA_OPTION_OFFSET + ICMP6_4_BYTE_LIFETIME_OFFSET, RDNSS_LIFETIME);
- verifyRaLifetime(apfFilter, ipManagerCallback, rdnssOptionPacket, RDNSS_LIFETIME);
+ verifyRaLifetime(apfFilter, ipClientCallback, rdnssOptionPacket, RDNSS_LIFETIME);
verifyRaEvent(new RaEvent(ROUTER_LIFETIME, -1, -1, -1, RDNSS_LIFETIME, -1));
ByteBuffer routeInfoOptionPacket = ByteBuffer.wrap(
@@ -1290,7 +1590,7 @@
routeInfoOptionPacket.put((byte)(ICMP6_4_BYTE_OPTION_LEN / 8));
routeInfoOptionPacket.putInt(
ICMP6_RA_OPTION_OFFSET + ICMP6_4_BYTE_LIFETIME_OFFSET, ROUTE_LIFETIME);
- verifyRaLifetime(apfFilter, ipManagerCallback, routeInfoOptionPacket, ROUTE_LIFETIME);
+ verifyRaLifetime(apfFilter, ipClientCallback, routeInfoOptionPacket, ROUTE_LIFETIME);
verifyRaEvent(new RaEvent(ROUTER_LIFETIME, -1, -1, ROUTE_LIFETIME, -1, -1));
ByteBuffer dnsslOptionPacket = ByteBuffer.wrap(
@@ -1301,11 +1601,11 @@
dnsslOptionPacket.put((byte)(ICMP6_4_BYTE_OPTION_LEN / 8));
dnsslOptionPacket.putInt(
ICMP6_RA_OPTION_OFFSET + ICMP6_4_BYTE_LIFETIME_OFFSET, DNSSL_LIFETIME);
- verifyRaLifetime(apfFilter, ipManagerCallback, dnsslOptionPacket, ROUTER_LIFETIME);
+ verifyRaLifetime(apfFilter, ipClientCallback, dnsslOptionPacket, ROUTER_LIFETIME);
verifyRaEvent(new RaEvent(ROUTER_LIFETIME, -1, -1, -1, -1, DNSSL_LIFETIME));
// Verify that current program filters all five RAs:
- program = ipManagerCallback.getApfProgram();
+ program = ipClientCallback.getApfProgram();
verifyRaLifetime(program, basePacket, ROUTER_LIFETIME);
verifyRaLifetime(program, newFlowLabelPacket, ROUTER_LIFETIME);
verifyRaLifetime(program, prefixOptionPacket, PREFIX_PREFERRED_LIFETIME);
@@ -1347,11 +1647,11 @@
public void testRaParsing() throws Exception {
final int maxRandomPacketSize = 512;
final Random r = new Random();
- MockIpManagerCallback cb = new MockIpManagerCallback();
+ MockIpClientCallback cb = new MockIpClientCallback();
ApfConfiguration config = getDefaultConfig();
config.multicastFilter = DROP_MULTICAST;
config.ieee802_3Filter = DROP_802_3_FRAMES;
- TestApfFilter apfFilter = new TestApfFilter(config, cb, mLog);
+ TestApfFilter apfFilter = new TestApfFilter(mContext, config, cb, mLog);
for (int i = 0; i < 1000; i++) {
byte[] packet = new byte[r.nextInt(maxRandomPacketSize + 1)];
r.nextBytes(packet);
@@ -1368,11 +1668,11 @@
public void testRaProcessing() throws Exception {
final int maxRandomPacketSize = 512;
final Random r = new Random();
- MockIpManagerCallback cb = new MockIpManagerCallback();
+ MockIpClientCallback cb = new MockIpClientCallback();
ApfConfiguration config = getDefaultConfig();
config.multicastFilter = DROP_MULTICAST;
config.ieee802_3Filter = DROP_802_3_FRAMES;
- TestApfFilter apfFilter = new TestApfFilter(config, cb, mLog);
+ TestApfFilter apfFilter = new TestApfFilter(mContext, config, cb, mLog);
for (int i = 0; i < 1000; i++) {
byte[] packet = new byte[r.nextInt(maxRandomPacketSize + 1)];
r.nextBytes(packet);
@@ -1385,10 +1685,11 @@
}
/**
- * Call the APF interpreter the run {@code program} on {@code packet} pretending the
- * filter was installed {@code filter_age} seconds ago.
+ * Call the APF interpreter to run {@code program} on {@code packet} with persistent memory
+ * segment {@data} pretending the filter was installed {@code filter_age} seconds ago.
*/
- private native static int apfSimulate(byte[] program, byte[] packet, int filter_age);
+ private native static int apfSimulate(byte[] program, byte[] packet, byte[] data,
+ int filter_age);
/**
* Compile a tcpdump human-readable filter (e.g. "icmp" or "tcp port 54") into a BPF
diff --git a/tests/net/java/android/net/apf/Bpf2Apf.java b/tests/net/java/android/net/apf/Bpf2Apf.java
index 220e54d..5d57cde 100644
--- a/tests/net/java/android/net/apf/Bpf2Apf.java
+++ b/tests/net/java/android/net/apf/Bpf2Apf.java
@@ -307,7 +307,7 @@
* program and return it.
*/
public static byte[] convert(String bpf) throws IllegalInstructionException {
- ApfGenerator gen = new ApfGenerator();
+ ApfGenerator gen = new ApfGenerator(3);
for (String line : bpf.split("\\n")) convertLine(line, gen);
return gen.generate();
}
@@ -320,7 +320,7 @@
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String line = null;
StringBuilder responseData = new StringBuilder();
- ApfGenerator gen = new ApfGenerator();
+ ApfGenerator gen = new ApfGenerator(3);
while ((line = in.readLine()) != null) convertLine(line, gen);
System.out.write(gen.generate());
}
diff --git a/tests/net/java/android/net/captiveportal/CaptivePortalProbeSpecTest.java b/tests/net/java/android/net/captiveportal/CaptivePortalProbeSpecTest.java
new file mode 100644
index 0000000..40a8b3e
--- /dev/null
+++ b/tests/net/java/android/net/captiveportal/CaptivePortalProbeSpecTest.java
@@ -0,0 +1,171 @@
+/*
+ * 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.
+ */
+
+package android.net.captiveportal;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNull;
+import static junit.framework.Assert.assertTrue;
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.ParseException;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class CaptivePortalProbeSpecTest {
+
+ @Test
+ public void testGetResult_Regex() throws MalformedURLException, ParseException {
+ // 2xx status or 404, with an empty (match everything) location regex
+ CaptivePortalProbeSpec statusRegexSpec = CaptivePortalProbeSpec.parseSpec(
+ "http://www.google.com@@/@@2[0-9]{2}|404@@/@@");
+
+ // 404, or 301/302 redirect to some HTTPS page under google.com
+ CaptivePortalProbeSpec redirectSpec = CaptivePortalProbeSpec.parseSpec(
+ "http://google.com@@/@@404|30[12]@@/@@https://([0-9a-z]+\\.)*google\\.com.*");
+
+ assertSuccess(statusRegexSpec.getResult(200, null));
+ assertSuccess(statusRegexSpec.getResult(299, "qwer"));
+ assertSuccess(statusRegexSpec.getResult(404, null));
+ assertSuccess(statusRegexSpec.getResult(404, ""));
+
+ assertPortal(statusRegexSpec.getResult(300, null));
+ assertPortal(statusRegexSpec.getResult(399, "qwer"));
+ assertPortal(statusRegexSpec.getResult(500, null));
+
+ assertSuccess(redirectSpec.getResult(404, null));
+ assertSuccess(redirectSpec.getResult(404, ""));
+ assertSuccess(redirectSpec.getResult(301, "https://www.google.com"));
+ assertSuccess(redirectSpec.getResult(301, "https://www.google.com/test?q=3"));
+ assertSuccess(redirectSpec.getResult(302, "https://google.com/test?q=3"));
+
+ assertPortal(redirectSpec.getResult(299, "https://google.com/test?q=3"));
+ assertPortal(redirectSpec.getResult(299, ""));
+ assertPortal(redirectSpec.getResult(499, null));
+ assertPortal(redirectSpec.getResult(301, "http://login.portal.example.com/loginpage"));
+ assertPortal(redirectSpec.getResult(302, "http://www.google.com/test?q=3"));
+ }
+
+ @Test(expected = ParseException.class)
+ public void testParseSpec_Empty() throws MalformedURLException, ParseException {
+ CaptivePortalProbeSpec.parseSpec("");
+ }
+
+ @Test(expected = ParseException.class)
+ public void testParseSpec_Null() throws MalformedURLException, ParseException {
+ CaptivePortalProbeSpec.parseSpec(null);
+ }
+
+ @Test(expected = ParseException.class)
+ public void testParseSpec_MissingParts() throws MalformedURLException, ParseException {
+ CaptivePortalProbeSpec.parseSpec("http://google.com/@@/@@123");
+ }
+
+ @Test(expected = ParseException.class)
+ public void testParseSpec_TooManyParts() throws MalformedURLException, ParseException {
+ CaptivePortalProbeSpec.parseSpec("http://google.com/@@/@@123@@/@@456@@/@@extra");
+ }
+
+ @Test(expected = ParseException.class)
+ public void testParseSpec_InvalidStatusRegex() throws MalformedURLException, ParseException {
+ CaptivePortalProbeSpec.parseSpec("http://google.com/@@/@@unmatched(parenthesis@@/@@456");
+ }
+
+ @Test(expected = ParseException.class)
+ public void testParseSpec_InvalidLocationRegex() throws MalformedURLException, ParseException {
+ CaptivePortalProbeSpec.parseSpec("http://google.com/@@/@@123@@/@@unmatched[[]bracket");
+ }
+
+ @Test(expected = MalformedURLException.class)
+ public void testParseSpec_EmptyURL() throws MalformedURLException, ParseException {
+ CaptivePortalProbeSpec.parseSpec("@@/@@123@@/@@123");
+ }
+
+ @Test(expected = ParseException.class)
+ public void testParseSpec_NoParts() throws MalformedURLException, ParseException {
+ CaptivePortalProbeSpec.parseSpec("invalid");
+ }
+
+ @Test(expected = MalformedURLException.class)
+ public void testParseSpec_RegexInvalidUrl() throws MalformedURLException, ParseException {
+ CaptivePortalProbeSpec.parseSpec("notaurl@@/@@123@@/@@123");
+ }
+
+ @Test
+ public void testParseSpecOrNull_UsesSpec() {
+ final String specUrl = "http://google.com/probe";
+ final String redirectUrl = "https://google.com/probe";
+ CaptivePortalProbeSpec spec = CaptivePortalProbeSpec.parseSpecOrNull(
+ specUrl + "@@/@@302@@/@@" + redirectUrl);
+ assertEquals(specUrl, spec.getUrl().toString());
+
+ assertPortal(spec.getResult(302, "http://portal.example.com"));
+ assertSuccess(spec.getResult(302, redirectUrl));
+ }
+
+ @Test
+ public void testParseSpecOrNull_UsesFallback() throws MalformedURLException {
+ CaptivePortalProbeSpec spec = CaptivePortalProbeSpec.parseSpecOrNull(null);
+ assertNull(spec);
+
+ spec = CaptivePortalProbeSpec.parseSpecOrNull("");
+ assertNull(spec);
+
+ spec = CaptivePortalProbeSpec.parseSpecOrNull("@@/@@ @@/@@ @@/@@");
+ assertNull(spec);
+
+ spec = CaptivePortalProbeSpec.parseSpecOrNull("invalid@@/@@123@@/@@456");
+ assertNull(spec);
+ }
+
+ @Test
+ public void testParseSpecOrUseStatusCodeFallback_EmptySpec() throws MalformedURLException {
+ CaptivePortalProbeSpec spec = CaptivePortalProbeSpec.parseSpecOrNull("");
+ assertNull(spec);
+ }
+
+ private void assertIsStatusSpec(CaptivePortalProbeSpec spec) {
+ assertSuccess(spec.getResult(204, null));
+ assertSuccess(spec.getResult(204, "1234"));
+
+ assertPortal(spec.getResult(200, null));
+ assertPortal(spec.getResult(301, null));
+ assertPortal(spec.getResult(302, "1234"));
+ assertPortal(spec.getResult(399, ""));
+
+ assertFailed(spec.getResult(404, null));
+ assertFailed(spec.getResult(500, "1234"));
+ }
+
+ private void assertPortal(CaptivePortalProbeResult result) {
+ assertTrue(result.isPortal());
+ }
+
+ private void assertSuccess(CaptivePortalProbeResult result) {
+ assertTrue(result.isSuccessful());
+ }
+
+ private void assertFailed(CaptivePortalProbeResult result) {
+ assertTrue(result.isFailed());
+ }
+}
diff --git a/tests/net/java/android/net/ip/IpManagerTest.java b/tests/net/java/android/net/ip/IpClientTest.java
similarity index 78%
rename from tests/net/java/android/net/ip/IpManagerTest.java
rename to tests/net/java/android/net/ip/IpClientTest.java
index 22d88fb..89453e0 100644
--- a/tests/net/java/android/net/ip/IpManagerTest.java
+++ b/tests/net/java/android/net/ip/IpClientTest.java
@@ -21,6 +21,7 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -38,10 +39,12 @@
import android.net.IpPrefix;
import android.net.LinkAddress;
import android.net.LinkProperties;
+import android.net.MacAddress;
import android.net.RouteInfo;
-import android.net.ip.IpManager.Callback;
-import android.net.ip.IpManager.InitialConfiguration;
-import android.net.ip.IpManager.ProvisioningConfiguration;
+import android.net.ip.IpClient.Callback;
+import android.net.ip.IpClient.InitialConfiguration;
+import android.net.ip.IpClient.ProvisioningConfiguration;
+import android.net.util.InterfaceParams;
import android.os.INetworkManagementService;
import android.provider.Settings;
import android.support.test.filters.SmallTest;
@@ -68,15 +71,19 @@
import java.util.Set;
/**
- * Tests for IpManager.
+ * Tests for IpClient.
*/
@RunWith(AndroidJUnit4.class)
@SmallTest
-public class IpManagerTest {
+public class IpClientTest {
private static final int DEFAULT_AVOIDBADWIFI_CONFIG_VALUE = 1;
private static final String VALID = "VALID";
private static final String INVALID = "INVALID";
+ private static final String TEST_IFNAME = "test_wlan0";
+ private static final int TEST_IFINDEX = 1001;
+ // See RFC 7042#section-2.1.2 for EUI-48 documentation values.
+ private static final MacAddress TEST_MAC = MacAddress.fromString("00:00:5E:00:53:01");
@Mock private Context mContext;
@Mock private INetworkManagementService mNMService;
@@ -84,9 +91,11 @@
@Mock private Resources mResources;
@Mock private Callback mCb;
@Mock private AlarmManager mAlarm;
+ @Mock private IpClient.Dependencies mDependecies;
private MockContentResolver mContentResolver;
- BaseNetworkObserver mObserver;
+ private BaseNetworkObserver mObserver;
+ private InterfaceParams mIfParams;
@Before
public void setUp() throws Exception {
@@ -100,10 +109,23 @@
mContentResolver = new MockContentResolver();
mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider());
when(mContext.getContentResolver()).thenReturn(mContentResolver);
+
+ mIfParams = null;
+
+ when(mDependecies.getNMS()).thenReturn(mNMService);
+ when(mDependecies.getNetd()).thenReturn(mNetd);
}
- private IpManager makeIpManager(String ifname) throws Exception {
- final IpManager ipm = new IpManager(mContext, ifname, mCb, mNMService, mNetd);
+ private void setTestInterfaceParams(String ifname) {
+ mIfParams = (ifname != null)
+ ? new InterfaceParams(ifname, TEST_IFINDEX, TEST_MAC)
+ : null;
+ when(mDependecies.getInterfaceParams(anyString())).thenReturn(mIfParams);
+ }
+
+ private IpClient makeIpClient(String ifname) throws Exception {
+ setTestInterfaceParams(ifname);
+ final IpClient ipc = new IpClient(mContext, ifname, mCb, mDependecies);
verify(mNMService, timeout(100).times(1)).disableIpv6(ifname);
verify(mNMService, timeout(100).times(1)).clearInterfaceAddresses(ifname);
ArgumentCaptor<BaseNetworkObserver> arg =
@@ -111,23 +133,63 @@
verify(mNMService, times(1)).registerObserver(arg.capture());
mObserver = arg.getValue();
reset(mNMService);
- return ipm;
+ // Verify IpClient doesn't call onLinkPropertiesChange() when it starts.
+ verify(mCb, never()).onLinkPropertiesChange(any());
+ reset(mCb);
+ return ipc;
+ }
+
+ private static LinkProperties makeEmptyLinkProperties(String iface) {
+ final LinkProperties empty = new LinkProperties();
+ empty.setInterfaceName(iface);
+ return empty;
}
@Test
- public void testNullCallbackDoesNotThrow() throws Exception {
- final IpManager ipm = new IpManager(mContext, "lo", null, mNMService);
+ public void testNullInterfaceNameMostDefinitelyThrows() throws Exception {
+ setTestInterfaceParams(null);
+ try {
+ final IpClient ipc = new IpClient(mContext, null, mCb, mDependecies);
+ ipc.shutdown();
+ fail();
+ } catch (NullPointerException npe) {
+ // Phew; null interface names not allowed.
+ }
+ }
+
+ @Test
+ public void testNullCallbackMostDefinitelyThrows() throws Exception {
+ final String ifname = "lo";
+ setTestInterfaceParams(ifname);
+ try {
+ final IpClient ipc = new IpClient(mContext, ifname, null, mDependecies);
+ ipc.shutdown();
+ fail();
+ } catch (NullPointerException npe) {
+ // Phew; null callbacks not allowed.
+ }
}
@Test
public void testInvalidInterfaceDoesNotThrow() throws Exception {
- final IpManager ipm = new IpManager(mContext, "test_wlan0", mCb, mNMService);
+ setTestInterfaceParams(TEST_IFNAME);
+ final IpClient ipc = new IpClient(mContext, TEST_IFNAME, mCb, mDependecies);
+ ipc.shutdown();
+ }
+
+ @Test
+ public void testInterfaceNotFoundFailsImmediately() throws Exception {
+ setTestInterfaceParams(null);
+ final IpClient ipc = new IpClient(mContext, TEST_IFNAME, mCb, mDependecies);
+ ipc.startProvisioning(new IpClient.ProvisioningConfiguration());
+ verify(mCb, times(1)).onProvisioningFailure(any());
+ ipc.shutdown();
}
@Test
public void testDefaultProvisioningConfiguration() throws Exception {
- final String iface = "test_wlan0";
- final IpManager ipm = makeIpManager(iface);
+ final String iface = TEST_IFNAME;
+ final IpClient ipc = makeIpClient(iface);
ProvisioningConfiguration config = new ProvisioningConfiguration.Builder()
.withoutIPv4()
@@ -136,20 +198,22 @@
.withoutIpReachabilityMonitor()
.build();
- ipm.startProvisioning(config);
+ ipc.startProvisioning(config);
verify(mCb, times(1)).setNeighborDiscoveryOffload(true);
verify(mCb, timeout(100).times(1)).setFallbackMulticastFilter(false);
verify(mCb, never()).onProvisioningFailure(any());
- ipm.stop();
+ ipc.shutdown();
verify(mNMService, timeout(100).times(1)).disableIpv6(iface);
verify(mNMService, timeout(100).times(1)).clearInterfaceAddresses(iface);
+ verify(mCb, timeout(100).times(1))
+ .onLinkPropertiesChange(eq(makeEmptyLinkProperties(iface)));
}
@Test
public void testProvisioningWithInitialConfiguration() throws Exception {
- final String iface = "test_wlan0";
- final IpManager ipm = makeIpManager(iface);
+ final String iface = TEST_IFNAME;
+ final IpClient ipc = makeIpClient(iface);
String[] addresses = {
"fe80::a4be:f92:e1f7:22d1/64",
@@ -164,7 +228,7 @@
.withInitialConfiguration(conf(links(addresses), prefixes(prefixes), ips()))
.build();
- ipm.startProvisioning(config);
+ ipc.startProvisioning(config);
verify(mCb, times(1)).setNeighborDiscoveryOffload(true);
verify(mCb, timeout(100).times(1)).setFallbackMulticastFilter(false);
verify(mCb, never()).onProvisioningFailure(any());
@@ -190,9 +254,11 @@
want.setInterfaceName(iface);
verify(mCb, timeout(100).times(1)).onProvisioningSuccess(eq(want));
- ipm.stop();
+ ipc.shutdown();
verify(mNMService, timeout(100).times(1)).disableIpv6(iface);
verify(mNMService, timeout(100).times(1)).clearInterfaceAddresses(iface);
+ verify(mCb, timeout(100).times(1))
+ .onLinkPropertiesChange(eq(makeEmptyLinkProperties(iface)));
}
@Test
@@ -228,7 +294,7 @@
};
for (IsProvisionedTestCase testcase : testcases) {
- if (IpManager.isProvisioned(testcase.lp, testcase.config) != testcase.isProvisioned) {
+ if (IpClient.isProvisioned(testcase.lp, testcase.config) != testcase.isProvisioned) {
fail(testcase.errorMessage());
}
}
@@ -424,11 +490,11 @@
List<String> list3 = Arrays.asList("bar", "baz");
List<String> list4 = Arrays.asList("foo", "bar", "baz");
- assertTrue(IpManager.all(list1, (x) -> false));
- assertFalse(IpManager.all(list2, (x) -> false));
- assertTrue(IpManager.all(list3, (x) -> true));
- assertTrue(IpManager.all(list2, (x) -> x.charAt(0) == 'f'));
- assertFalse(IpManager.all(list4, (x) -> x.charAt(0) == 'f'));
+ assertTrue(IpClient.all(list1, (x) -> false));
+ assertFalse(IpClient.all(list2, (x) -> false));
+ assertTrue(IpClient.all(list3, (x) -> true));
+ assertTrue(IpClient.all(list2, (x) -> x.charAt(0) == 'f'));
+ assertFalse(IpClient.all(list4, (x) -> x.charAt(0) == 'f'));
}
@Test
@@ -438,11 +504,11 @@
List<String> list3 = Arrays.asList("bar", "baz");
List<String> list4 = Arrays.asList("foo", "bar", "baz");
- assertFalse(IpManager.any(list1, (x) -> true));
- assertTrue(IpManager.any(list2, (x) -> true));
- assertTrue(IpManager.any(list2, (x) -> x.charAt(0) == 'f'));
- assertFalse(IpManager.any(list3, (x) -> x.charAt(0) == 'f'));
- assertTrue(IpManager.any(list4, (x) -> x.charAt(0) == 'f'));
+ assertFalse(IpClient.any(list1, (x) -> true));
+ assertTrue(IpClient.any(list2, (x) -> true));
+ assertTrue(IpClient.any(list2, (x) -> x.charAt(0) == 'f'));
+ assertFalse(IpClient.any(list3, (x) -> x.charAt(0) == 'f'));
+ assertTrue(IpClient.any(list4, (x) -> x.charAt(0) == 'f'));
}
@Test
@@ -451,9 +517,9 @@
List<String> list2 = Arrays.asList("foo");
List<String> list3 = Arrays.asList("foo", "bar", "baz");
- assertEquals(list1, IpManager.findAll(list1, (x) -> true));
- assertEquals(list1, IpManager.findAll(list3, (x) -> false));
- assertEquals(list3, IpManager.findAll(list3, (x) -> true));
- assertEquals(list2, IpManager.findAll(list3, (x) -> x.charAt(0) == 'f'));
+ assertEquals(list1, IpClient.findAll(list1, (x) -> true));
+ assertEquals(list1, IpClient.findAll(list3, (x) -> false));
+ assertEquals(list3, IpClient.findAll(list3, (x) -> true));
+ assertEquals(list2, IpClient.findAll(list3, (x) -> x.charAt(0) == 'f'));
}
}
diff --git a/tests/net/java/android/net/util/InterfaceSetTest.java b/tests/net/java/android/net/util/InterfaceSetTest.java
new file mode 100644
index 0000000..8012838
--- /dev/null
+++ b/tests/net/java/android/net/util/InterfaceSetTest.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+package android.net.util;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class InterfaceSetTest {
+ @Test
+ public void testNullNamesIgnored() {
+ final InterfaceSet set = new InterfaceSet(null, "if1", null, "if2", null);
+ assertEquals(2, set.ifnames.size());
+ assertTrue(set.ifnames.contains("if1"));
+ assertTrue(set.ifnames.contains("if2"));
+ }
+
+ @Test
+ public void testToString() {
+ final InterfaceSet set = new InterfaceSet("if1", "if2");
+ final String setString = set.toString();
+ assertTrue(setString.equals("[if1,if2]") || setString.equals("[if2,if1]"));
+ }
+
+ @Test
+ public void testToString_Empty() {
+ final InterfaceSet set = new InterfaceSet(null, null);
+ assertEquals("[]", set.toString());
+ }
+
+ @Test
+ public void testEquals() {
+ assertEquals(new InterfaceSet(null, "if1", "if2"), new InterfaceSet("if2", "if1"));
+ assertEquals(new InterfaceSet(null, null), new InterfaceSet());
+ assertFalse(new InterfaceSet("if1", "if3").equals(new InterfaceSet("if1", "if2")));
+ assertFalse(new InterfaceSet("if1", "if2").equals(new InterfaceSet("if1")));
+ assertFalse(new InterfaceSet().equals(null));
+ }
+}
diff --git a/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java b/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java
index 56b8e60..788924b 100644
--- a/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java
+++ b/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java
@@ -67,7 +67,7 @@
IoUtils.deleteContents(mTestProc);
}
- mFactory = new NetworkStatsFactory(mTestProc);
+ mFactory = new NetworkStatsFactory(mTestProc, false);
}
@After
@@ -170,7 +170,7 @@
assertStatsEntry(stats, "dummy0", 0, SET_DEFAULT, 0x0, 0L, 168L);
assertStatsEntry(stats, "lo", 0, SET_DEFAULT, 0x0, 1288L, 1288L);
- NetworkStatsFactory.noteStackedIface("v4-wlan0", null);
+ NetworkStatsFactory.clearStackedIfaces();
}
@Test
@@ -198,7 +198,7 @@
assertStatsEntry(stats, "v4-wlan0", 10106, SET_FOREGROUND, 0x0, appRxBytesAfter, 7867488L);
assertStatsEntry(stats, "wlan0", 0, SET_DEFAULT, 0x0, rootRxBytesAfter, 647587L);
- NetworkStatsFactory.noteStackedIface("v4-wlan0", null);
+ NetworkStatsFactory.clearStackedIfaces();
}
/**
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index 70cacb3..d6018f1 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -17,6 +17,9 @@
package com.android.server;
import static android.net.ConnectivityManager.CONNECTIVITY_ACTION;
+import static android.net.ConnectivityManager.PRIVATE_DNS_MODE_OFF;
+import static android.net.ConnectivityManager.PRIVATE_DNS_MODE_OPPORTUNISTIC;
+import static android.net.ConnectivityManager.PRIVATE_DNS_MODE_PROVIDER_HOSTNAME;
import static android.net.ConnectivityManager.TYPE_ETHERNET;
import static android.net.ConnectivityManager.TYPE_MOBILE;
import static android.net.ConnectivityManager.TYPE_MOBILE_FOTA;
@@ -35,6 +38,7 @@
import static android.net.NetworkCapabilities.NET_CAPABILITY_MMS;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN;
import static android.net.NetworkCapabilities.NET_CAPABILITY_RCS;
import static android.net.NetworkCapabilities.NET_CAPABILITY_SUPL;
@@ -44,10 +48,12 @@
import static android.net.NetworkCapabilities.NET_CAPABILITY_XCAP;
import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
import static android.net.NetworkCapabilities.TRANSPORT_ETHERNET;
+import static android.net.NetworkCapabilities.TRANSPORT_VPN;
import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
import static android.net.NetworkCapabilities.TRANSPORT_WIFI_AWARE;
import static com.android.internal.util.TestUtils.waitForIdleHandler;
+import static com.android.internal.util.TestUtils.waitForIdleLooper;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -60,12 +66,14 @@
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
@@ -76,6 +84,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.pm.UserInfo;
import android.content.res.Resources;
import android.net.CaptivePortal;
import android.net.ConnectivityManager;
@@ -83,6 +92,7 @@
import android.net.ConnectivityManager.PacketKeepalive;
import android.net.ConnectivityManager.PacketKeepaliveCallback;
import android.net.ConnectivityManager.TooManyRequestsException;
+import android.net.ConnectivityThread;
import android.net.INetworkPolicyManager;
import android.net.INetworkStatsService;
import android.net.IpPrefix;
@@ -101,6 +111,9 @@
import android.net.NetworkUtils;
import android.net.RouteInfo;
import android.net.StringNetworkSpecifier;
+import android.net.UidRange;
+import android.net.VpnService;
+import android.net.captiveportal.CaptivePortalProbeResult;
import android.net.metrics.IpConnectivityLog;
import android.net.util.MultinetworkPolicyTracker;
import android.os.ConditionVariable;
@@ -122,15 +135,19 @@
import android.util.ArraySet;
import android.util.Log;
+import com.android.internal.net.VpnConfig;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.WakeupMessage;
import com.android.internal.util.test.BroadcastInterceptingContext;
import com.android.internal.util.test.FakeSettingsProvider;
+import com.android.server.connectivity.ConnectivityConstants;
import com.android.server.connectivity.DefaultNetworkMetrics;
+import com.android.server.connectivity.DnsManager;
import com.android.server.connectivity.IpConnectivityMetrics;
import com.android.server.connectivity.MockableSystemProperties;
import com.android.server.connectivity.NetworkAgentInfo;
import com.android.server.connectivity.NetworkMonitor;
+import com.android.server.connectivity.Vpn;
import com.android.server.net.NetworkPinner;
import com.android.server.net.NetworkPolicyManagerInternal;
@@ -148,6 +165,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
@@ -172,12 +190,16 @@
private static final int TIMEOUT_MS = 500;
private static final int TEST_LINGER_DELAY_MS = 120;
+ private static final String MOBILE_IFNAME = "test_rmnet_data0";
+ private static final String WIFI_IFNAME = "test_wlan0";
+
private MockContext mServiceContext;
private WrappedConnectivityService mService;
private WrappedConnectivityManager mCm;
private MockNetworkAgent mWiFiNetworkAgent;
private MockNetworkAgent mCellNetworkAgent;
private MockNetworkAgent mEthernetNetworkAgent;
+ private MockVpn mMockVpn;
private Context mContext;
@Mock IpConnectivityMetrics.Logger mMetricsService;
@@ -274,6 +296,7 @@
waitForIdle(mWiFiNetworkAgent, timeoutMs);
waitForIdle(mEthernetNetworkAgent, timeoutMs);
waitForIdleHandler(mService.mHandlerThread, timeoutMs);
+ waitForIdleLooper(ConnectivityThread.getInstanceLooper(), timeoutMs);
}
public void waitForIdle(MockNetworkAgent agent, long timeoutMs) {
@@ -314,6 +337,7 @@
// This test has an inherent race condition in it, and cannot be enabled for continuous testing
// or presubmit tests. It is kept for manual runs and documentation purposes.
+ @Ignore
public void verifyThatNotWaitingForIdleCausesRaceConditions() {
// Bring up a network that we can use to send messages to ConnectivityService.
ConditionVariable cv = waitForConnectivityBroadcasts(1);
@@ -360,7 +384,7 @@
MockNetworkAgent(int transport, LinkProperties linkProperties) {
final int type = transportToLegacyType(transport);
- final String typeName = ConnectivityManager.getNetworkTypeName(type);
+ final String typeName = ConnectivityManager.getNetworkTypeName(transport);
mNetworkInfo = new NetworkInfo(type, 0, typeName, "Mock");
mNetworkCapabilities = new NetworkCapabilities();
mNetworkCapabilities.addTransportType(transport);
@@ -377,6 +401,10 @@
case TRANSPORT_WIFI_AWARE:
mScore = 20;
break;
+ case TRANSPORT_VPN:
+ mNetworkCapabilities.removeCapability(NET_CAPABILITY_NOT_VPN);
+ mScore = ConnectivityConstants.VPN_DEFAULT_SCORE;
+ break;
default:
throw new UnsupportedOperationException("unimplemented network type");
}
@@ -438,6 +466,11 @@
mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
}
+ public void setUids(Set<UidRange> uids) {
+ mNetworkCapabilities.setUids(uids);
+ mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
+ }
+
public void setSignalStrength(int signalStrength) {
mNetworkCapabilities.setSignalStrength(signalStrength);
mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
@@ -448,6 +481,14 @@
mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
}
+ public void setNetworkCapabilities(NetworkCapabilities nc,
+ boolean sendToConnectivityService) {
+ mNetworkCapabilities.set(nc);
+ if (sendToConnectivityService) {
+ mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
+ }
+ }
+
public void connectWithoutInternet() {
mNetworkInfo.setDetailedState(DetailedState.CONNECTED, null, null);
mNetworkAgent.sendNetworkInfo(mNetworkInfo);
@@ -477,6 +518,7 @@
mWrappedNetworkMonitor.gen204ProbeResult = 204;
NetworkRequest request = new NetworkRequest.Builder()
.addTransportType(mNetworkCapabilities.getTransportTypes()[0])
+ .clearCapabilities()
.build();
callback = new NetworkCallback() {
public void onCapabilitiesChanged(Network network,
@@ -515,6 +557,11 @@
mNetworkAgent.sendNetworkInfo(mNetworkInfo);
}
+ public void resume() {
+ mNetworkInfo.setDetailedState(DetailedState.CONNECTED, null, null);
+ mNetworkAgent.sendNetworkInfo(mNetworkInfo);
+ }
+
public void disconnect() {
mNetworkInfo.setDetailedState(DetailedState.DISCONNECTED, null, null);
mNetworkAgent.sendNetworkInfo(mNetworkInfo);
@@ -556,6 +603,14 @@
assertTrue(mNetworkStatusReceived.block(TIMEOUT_MS));
return mRedirectUrl;
}
+
+ public NetworkAgent getNetworkAgent() {
+ return mNetworkAgent;
+ }
+
+ public NetworkCapabilities getNetworkCapabilities() {
+ return mNetworkCapabilities;
+ }
}
/**
@@ -685,6 +740,87 @@
}
}
+ private static Looper startHandlerThreadAndReturnLooper() {
+ final HandlerThread handlerThread = new HandlerThread("MockVpnThread");
+ handlerThread.start();
+ return handlerThread.getLooper();
+ }
+
+ private class MockVpn extends Vpn {
+ // TODO : the interactions between this mock and the mock network agent are too
+ // hard to get right at this moment, because it's unclear in which case which
+ // target needs to get a method call or both, and in what order. It's because
+ // MockNetworkAgent wants to manage its own NetworkCapabilities, but the Vpn
+ // parent class of MockVpn agent wants that responsibility.
+ // That being said inside the test it should be possible to make the interactions
+ // harder to get wrong with precise speccing, judicious comments, helper methods
+ // and a few sprinkled assertions.
+
+ private boolean mConnected = false;
+ // Careful ! This is different from mNetworkAgent, because MockNetworkAgent does
+ // not inherit from NetworkAgent.
+ private MockNetworkAgent mMockNetworkAgent;
+
+ public MockVpn(int userId) {
+ super(startHandlerThreadAndReturnLooper(), mServiceContext, mNetworkManagementService,
+ userId);
+ }
+
+ public void setNetworkAgent(MockNetworkAgent agent) {
+ waitForIdle(agent, TIMEOUT_MS);
+ mMockNetworkAgent = agent;
+ mNetworkAgent = agent.getNetworkAgent();
+ mNetworkCapabilities.set(agent.getNetworkCapabilities());
+ }
+
+ public void setUids(Set<UidRange> uids) {
+ mNetworkCapabilities.setUids(uids);
+ updateCapabilities();
+ }
+
+ @Override
+ public int getNetId() {
+ return mMockNetworkAgent.getNetwork().netId;
+ }
+
+ @Override
+ public boolean appliesToUid(int uid) {
+ return mConnected; // Trickery to simplify testing.
+ }
+
+ @Override
+ protected boolean isCallerEstablishedOwnerLocked() {
+ return mConnected; // Similar trickery
+ }
+
+ public void connect() {
+ mNetworkCapabilities.set(mMockNetworkAgent.getNetworkCapabilities());
+ mConnected = true;
+ mConfig = new VpnConfig();
+ }
+
+ @Override
+ public void updateCapabilities() {
+ if (!mConnected) return;
+ super.updateCapabilities();
+ // Because super.updateCapabilities will update the capabilities of the agent but not
+ // the mock agent, the mock agent needs to know about them.
+ copyCapabilitiesToNetworkAgent();
+ }
+
+ private void copyCapabilitiesToNetworkAgent() {
+ if (null != mMockNetworkAgent) {
+ mMockNetworkAgent.setNetworkCapabilities(mNetworkCapabilities,
+ false /* sendToConnectivityService */);
+ }
+ }
+
+ public void disconnect() {
+ mConnected = false;
+ mConfig = null;
+ }
+ }
+
private class FakeWakeupMessage extends WakeupMessage {
private static final int UNREASONABLY_LONG_WAIT = 1000;
@@ -722,6 +858,7 @@
// NetworkMonitor implementation allowing overriding of Internet connectivity probe result.
private class WrappedNetworkMonitor extends NetworkMonitor {
+ public final Handler connectivityHandler;
// HTTP response code fed back to NetworkMonitor for Internet connectivity probe.
public int gen204ProbeResult = 500;
public String gen204ProbeRedirectUrl = null;
@@ -731,6 +868,7 @@
IpConnectivityLog log) {
super(context, handler, networkAgentInfo, defaultRequest, log,
NetworkMonitor.NetworkMonitorSettings.DEFAULT);
+ connectivityHandler = handler;
}
@Override
@@ -841,10 +979,25 @@
return mMetricsService;
}
+ @Override
+ protected void registerNetdEventCallback() {
+ }
+
public WrappedNetworkMonitor getLastCreatedWrappedNetworkMonitor() {
return mLastCreatedNetworkMonitor;
}
+ public void mockVpn(int uid) {
+ synchronized (mVpns) {
+ int userId = UserHandle.getUserId(uid);
+ mMockVpn = new MockVpn(userId);
+ // This has no effect unless the VPN is actually connected, because things like
+ // getActiveNetworkForUidInternal call getNetworkAgentInfoForNetId on the VPN
+ // netId, and check if that network is actually connected.
+ mVpns.put(userId, mMockVpn);
+ }
+ }
+
public void waitForIdle(int timeoutMs) {
waitForIdleHandler(mHandlerThread, timeoutMs);
}
@@ -888,13 +1041,15 @@
mock(INetworkPolicyManager.class),
mock(IpConnectivityLog.class));
- mService.systemReady();
mCm = new WrappedConnectivityManager(InstrumentationRegistry.getContext(), mService);
+ mService.systemReady();
+ mService.mockVpn(Process.myUid());
mCm.bindProcessToNetwork(null);
// Ensure that the default setting for Captive Portals is used for most tests
setCaptivePortalMode(Settings.Global.CAPTIVE_PORTAL_MODE_PROMPT);
setMobileDataAlwaysOn(false);
+ setPrivateDnsSettings(PRIVATE_DNS_MODE_OFF, "ignored.example.com");
}
@After
@@ -1260,6 +1415,7 @@
NETWORK_CAPABILITIES,
LINK_PROPERTIES,
SUSPENDED,
+ RESUMED,
LOSING,
LOST,
UNAVAILABLE
@@ -1300,6 +1456,7 @@
private final static int TIMEOUT_MS = 100;
private final LinkedBlockingQueue<CallbackInfo> mCallbacks = new LinkedBlockingQueue<>();
+ private Network mLastAvailableNetwork;
protected void setLastCallback(CallbackState state, Network network, Object o) {
mCallbacks.offer(new CallbackInfo(state, network, o));
@@ -1307,6 +1464,7 @@
@Override
public void onAvailable(Network network) {
+ mLastAvailableNetwork = network;
setLastCallback(CallbackState.AVAILABLE, network, null);
}
@@ -1331,15 +1489,25 @@
}
@Override
+ public void onNetworkResumed(Network network) {
+ setLastCallback(CallbackState.RESUMED, network, null);
+ }
+
+ @Override
public void onLosing(Network network, int maxMsToLive) {
setLastCallback(CallbackState.LOSING, network, maxMsToLive /* autoboxed int */);
}
@Override
public void onLost(Network network) {
+ mLastAvailableNetwork = null;
setLastCallback(CallbackState.LOST, network, null);
}
+ public Network getLastAvailableNetwork() {
+ return mLastAvailableNetwork;
+ }
+
CallbackInfo nextCallback(int timeoutMs) {
CallbackInfo cb = null;
try {
@@ -1409,9 +1577,9 @@
expectCallback(CallbackState.SUSPENDED, agent, timeoutMs);
}
if (expectValidated) {
- expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, agent);
+ expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, agent, timeoutMs);
} else {
- expectCapabilitiesWithout(NET_CAPABILITY_VALIDATED, agent);
+ expectCapabilitiesWithout(NET_CAPABILITY_VALIDATED, agent, timeoutMs);
}
expectCallback(CallbackState.LINK_PROPERTIES, agent, timeoutMs);
}
@@ -1450,19 +1618,35 @@
}
NetworkCapabilities expectCapabilitiesWith(int capability, MockNetworkAgent agent) {
- CallbackInfo cbi = expectCallback(CallbackState.NETWORK_CAPABILITIES, agent);
+ return expectCapabilitiesWith(capability, agent, TIMEOUT_MS);
+ }
+
+ NetworkCapabilities expectCapabilitiesWith(int capability, MockNetworkAgent agent,
+ int timeoutMs) {
+ CallbackInfo cbi = expectCallback(CallbackState.NETWORK_CAPABILITIES, agent, timeoutMs);
NetworkCapabilities nc = (NetworkCapabilities) cbi.arg;
assertTrue(nc.hasCapability(capability));
return nc;
}
NetworkCapabilities expectCapabilitiesWithout(int capability, MockNetworkAgent agent) {
- CallbackInfo cbi = expectCallback(CallbackState.NETWORK_CAPABILITIES, agent);
+ return expectCapabilitiesWithout(capability, agent, TIMEOUT_MS);
+ }
+
+ NetworkCapabilities expectCapabilitiesWithout(int capability, MockNetworkAgent agent,
+ int timeoutMs) {
+ CallbackInfo cbi = expectCallback(CallbackState.NETWORK_CAPABILITIES, agent, timeoutMs);
NetworkCapabilities nc = (NetworkCapabilities) cbi.arg;
assertFalse(nc.hasCapability(capability));
return nc;
}
+ void expectCapabilitiesLike(Predicate<NetworkCapabilities> fn, MockNetworkAgent agent) {
+ CallbackInfo cbi = expectCallback(CallbackState.NETWORK_CAPABILITIES, agent);
+ assertTrue("Received capabilities don't match expectations : " + cbi.arg,
+ fn.test((NetworkCapabilities) cbi.arg));
+ }
+
void assertNoCallback() {
waitForIdle();
CallbackInfo c = mCallbacks.peek();
@@ -1591,6 +1775,7 @@
callback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
defaultCallback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
mWiFiNetworkAgent.connect(true);
// We get AVAILABLE on wifi when wifi connects and satisfies our unmetered request.
@@ -1601,6 +1786,7 @@
callback.expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
defaultCallback.expectAvailableDoubleValidatedCallbacks(mWiFiNetworkAgent);
assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
mEthernetNetworkAgent.connect(true);
callback.expectAvailableCallbacksUnvalidated(mEthernetNetworkAgent);
@@ -1609,11 +1795,13 @@
callback.expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, mEthernetNetworkAgent);
defaultCallback.expectAvailableDoubleValidatedCallbacks(mEthernetNetworkAgent);
assertEquals(mEthernetNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
mEthernetNetworkAgent.disconnect();
callback.expectCallback(CallbackState.LOST, mEthernetNetworkAgent);
defaultCallback.expectCallback(CallbackState.LOST, mEthernetNetworkAgent);
defaultCallback.expectAvailableCallbacksValidated(mWiFiNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
for (int i = 0; i < 4; i++) {
MockNetworkAgent oldNetwork, newNetwork;
@@ -1642,6 +1830,7 @@
defaultCallback.expectCapabilitiesWithout(NET_CAPABILITY_NOT_METERED, mWiFiNetworkAgent);
defaultCallback.assertNoCallback();
callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Wifi no longer satisfies our listen, which is for an unmetered network.
// But because its score is 55, it's still up (and the default network).
@@ -1651,8 +1840,11 @@
mWiFiNetworkAgent.disconnect();
defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
defaultCallback.expectAvailableCallbacksValidated(mCellNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
mCellNetworkAgent.disconnect();
defaultCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+ waitForIdle();
+ assertEquals(null, mCm.getActiveNetwork());
mCm.unregisterNetworkCallback(callback);
waitForIdle();
@@ -1669,6 +1861,7 @@
callback.expectAvailableCallbacksUnvalidated(mCellNetworkAgent);
defaultCallback.expectAvailableCallbacksUnvalidated(mCellNetworkAgent);
assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Bring up wifi with a score of 20.
// Cell stays up because it would satisfy the default request if it validated.
@@ -1677,12 +1870,14 @@
callback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
defaultCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
mWiFiNetworkAgent.disconnect();
callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
defaultCallback.expectAvailableCallbacksUnvalidated(mCellNetworkAgent);
assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Bring up wifi with a score of 70.
// Cell is lingered because it would not satisfy any request, even if it validated.
@@ -1693,6 +1888,7 @@
callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
defaultCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Tear down wifi.
mWiFiNetworkAgent.disconnect();
@@ -1700,6 +1896,7 @@
defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
defaultCallback.expectAvailableCallbacksUnvalidated(mCellNetworkAgent);
assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Bring up wifi, then validate it. Previous versions would immediately tear down cell, but
// it's arguably correct to linger it, since it was the default network before it validated.
@@ -1711,6 +1908,7 @@
callback.expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
defaultCallback.expectAvailableThenValidatedCallbacks(mWiFiNetworkAgent);
assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
mWiFiNetworkAgent.disconnect();
callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
@@ -1719,12 +1917,15 @@
mCellNetworkAgent.disconnect();
callback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
defaultCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+ waitForIdle();
+ assertEquals(null, mCm.getActiveNetwork());
// If a network is lingering, and we add and remove a request from it, resume lingering.
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
mCellNetworkAgent.connect(true);
callback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
defaultCallback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
mWiFiNetworkAgent.connect(true);
defaultCallback.expectAvailableDoubleValidatedCallbacks(mWiFiNetworkAgent);
@@ -1732,6 +1933,7 @@
// TODO: Investigate sending validated before losing.
callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
callback.expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
NetworkRequest cellRequest = new NetworkRequest.Builder()
.addTransportType(TRANSPORT_CELLULAR).build();
@@ -1748,6 +1950,7 @@
callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
defaultCallback.expectAvailableCallbacksValidated(mCellNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Cell is now the default network. Pin it with a cell-specific request.
noopCallback = new NetworkCallback(); // Can't reuse NetworkCallbacks. http://b/20701525
@@ -1758,6 +1961,7 @@
mWiFiNetworkAgent.connect(true);
callback.expectAvailableThenValidatedCallbacks(mWiFiNetworkAgent);
defaultCallback.expectAvailableDoubleValidatedCallbacks(mWiFiNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// The default request is lingering on cell, but nothing happens to cell, and we send no
// callbacks for it, because it's kept up by cellRequest.
callback.assertNoCallback();
@@ -1781,6 +1985,7 @@
callback.expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, mEthernetNetworkAgent);
trackDefaultCallback.expectAvailableDoubleValidatedCallbacks(mEthernetNetworkAgent);
defaultCallback.expectAvailableDoubleValidatedCallbacks(mEthernetNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Let linger run its course.
callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent, lingerTimeoutMs);
@@ -1797,6 +2002,51 @@
}
@Test
+ public void testNetworkGoesIntoBackgroundAfterLinger() {
+ setMobileDataAlwaysOn(true);
+ NetworkRequest request = new NetworkRequest.Builder()
+ .clearCapabilities()
+ .build();
+ TestNetworkCallback callback = new TestNetworkCallback();
+ mCm.registerNetworkCallback(request, callback);
+
+ TestNetworkCallback defaultCallback = new TestNetworkCallback();
+ mCm.registerDefaultNetworkCallback(defaultCallback);
+
+ mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+ mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+
+ mCellNetworkAgent.connect(true);
+ callback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
+ defaultCallback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
+
+ // Wifi comes up and cell lingers.
+ mWiFiNetworkAgent.connect(true);
+ defaultCallback.expectAvailableDoubleValidatedCallbacks(mWiFiNetworkAgent);
+ callback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+ callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+ callback.expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
+
+ // File a request for cellular, then release it.
+ NetworkRequest cellRequest = new NetworkRequest.Builder()
+ .addTransportType(TRANSPORT_CELLULAR).build();
+ NetworkCallback noopCallback = new NetworkCallback();
+ mCm.requestNetwork(cellRequest, noopCallback);
+ mCm.unregisterNetworkCallback(noopCallback);
+ callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+
+ // Let linger run its course.
+ callback.assertNoCallback();
+ final int lingerTimeoutMs = TEST_LINGER_DELAY_MS + TEST_LINGER_DELAY_MS / 4;
+ callback.expectCapabilitiesWithout(NET_CAPABILITY_FOREGROUND, mCellNetworkAgent,
+ lingerTimeoutMs);
+
+ // Clean up.
+ mCm.unregisterNetworkCallback(defaultCallback);
+ mCm.unregisterNetworkCallback(callback);
+ }
+
+ @Test
public void testExplicitlySelected() {
NetworkRequest request = new NetworkRequest.Builder()
.clearCapabilities().addCapability(NET_CAPABILITY_INTERNET)
@@ -2384,23 +2634,27 @@
mCellNetworkAgent.connect(true);
cellNetworkCallback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
defaultNetworkCallback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
+ assertEquals(defaultNetworkCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Bring up wifi and expect CALLBACK_AVAILABLE.
mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
mWiFiNetworkAgent.connect(true);
cellNetworkCallback.assertNoCallback();
defaultNetworkCallback.expectAvailableDoubleValidatedCallbacks(mWiFiNetworkAgent);
+ assertEquals(defaultNetworkCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Bring down cell. Expect no default network callback, since it wasn't the default.
mCellNetworkAgent.disconnect();
cellNetworkCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
defaultNetworkCallback.assertNoCallback();
+ assertEquals(defaultNetworkCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Bring up cell. Expect no default network callback, since it won't be the default.
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
mCellNetworkAgent.connect(true);
cellNetworkCallback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
defaultNetworkCallback.assertNoCallback();
+ assertEquals(defaultNetworkCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
// Bring down wifi. Expect the default network callback to notified of LOST wifi
// followed by AVAILABLE cell.
@@ -2411,6 +2665,24 @@
mCellNetworkAgent.disconnect();
cellNetworkCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
defaultNetworkCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+ waitForIdle();
+ assertEquals(null, mCm.getActiveNetwork());
+
+ final int uid = Process.myUid();
+ final MockNetworkAgent vpnNetworkAgent = new MockNetworkAgent(TRANSPORT_VPN);
+ final ArraySet<UidRange> ranges = new ArraySet<>();
+ ranges.add(new UidRange(uid, uid));
+ mMockVpn.setNetworkAgent(vpnNetworkAgent);
+ mMockVpn.setUids(ranges);
+ vpnNetworkAgent.connect(true);
+ mMockVpn.connect();
+ defaultNetworkCallback.expectAvailableThenValidatedCallbacks(vpnNetworkAgent);
+ assertEquals(defaultNetworkCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
+
+ vpnNetworkAgent.disconnect();
+ defaultNetworkCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+ waitForIdle();
+ assertEquals(null, mCm.getActiveNetwork());
}
@Test
@@ -2441,16 +2713,31 @@
// Suspend the network.
mCellNetworkAgent.suspend();
+ cellNetworkCallback.expectCapabilitiesWithout(NET_CAPABILITY_NOT_SUSPENDED,
+ mCellNetworkAgent);
cellNetworkCallback.expectCallback(CallbackState.SUSPENDED, mCellNetworkAgent);
cellNetworkCallback.assertNoCallback();
// Register a garden variety default network request.
- final TestNetworkCallback dfltNetworkCallback = new TestNetworkCallback();
+ TestNetworkCallback dfltNetworkCallback = new TestNetworkCallback();
mCm.registerDefaultNetworkCallback(dfltNetworkCallback);
// We should get onAvailable(), onCapabilitiesChanged(), onLinkPropertiesChanged(),
// as well as onNetworkSuspended() in rapid succession.
dfltNetworkCallback.expectAvailableAndSuspendedCallbacks(mCellNetworkAgent, true);
dfltNetworkCallback.assertNoCallback();
+ mCm.unregisterNetworkCallback(dfltNetworkCallback);
+
+ mCellNetworkAgent.resume();
+ cellNetworkCallback.expectCapabilitiesWith(NET_CAPABILITY_NOT_SUSPENDED,
+ mCellNetworkAgent);
+ cellNetworkCallback.expectCallback(CallbackState.RESUMED, mCellNetworkAgent);
+ cellNetworkCallback.assertNoCallback();
+
+ dfltNetworkCallback = new TestNetworkCallback();
+ mCm.registerDefaultNetworkCallback(dfltNetworkCallback);
+ // This time onNetworkSuspended should not be called.
+ dfltNetworkCallback.expectAvailableCallbacksValidated(mCellNetworkAgent);
+ dfltNetworkCallback.assertNoCallback();
mCm.unregisterNetworkCallback(dfltNetworkCallback);
mCm.unregisterNetworkCallback(cellNetworkCallback);
@@ -2468,6 +2755,14 @@
waitForIdle();
}
+ private void setPrivateDnsSettings(String mode, String specifier) {
+ final ContentResolver cr = mServiceContext.getContentResolver();
+ Settings.Global.putString(cr, Settings.Global.PRIVATE_DNS_MODE, mode);
+ Settings.Global.putString(cr, Settings.Global.PRIVATE_DNS_SPECIFIER, specifier);
+ mService.updatePrivateDnsSettings();
+ waitForIdle();
+ }
+
private boolean isForegroundNetwork(MockNetworkAgent network) {
NetworkCapabilities nc = mCm.getNetworkCapabilities(network.getNetwork());
assertNotNull(nc);
@@ -3076,6 +3371,9 @@
InetAddress dstIPv4 = InetAddress.getByName("8.8.8.8");
InetAddress dstIPv6 = InetAddress.getByName("2001:4860:4860::8888");
+ final int validKaInterval = 15;
+ final int invalidKaInterval = 9;
+
LinkProperties lp = new LinkProperties();
lp.setInterfaceName("wlan12");
lp.addLinkAddress(new LinkAddress(myIPv6, 64));
@@ -3090,36 +3388,37 @@
PacketKeepalive ka;
// Attempt to start keepalives with invalid parameters and check for errors.
- ka = mCm.startNattKeepalive(notMyNet, 25, callback, myIPv4, 1234, dstIPv4);
+ ka = mCm.startNattKeepalive(notMyNet, validKaInterval, callback, myIPv4, 1234, dstIPv4);
callback.expectError(PacketKeepalive.ERROR_INVALID_NETWORK);
- ka = mCm.startNattKeepalive(myNet, 19, callback, notMyIPv4, 1234, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, invalidKaInterval, callback, myIPv4, 1234, dstIPv4);
callback.expectError(PacketKeepalive.ERROR_INVALID_INTERVAL);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 1234, dstIPv6);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 1234, dstIPv6);
callback.expectError(PacketKeepalive.ERROR_INVALID_IP_ADDRESS);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv6, 1234, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv6, 1234, dstIPv4);
callback.expectError(PacketKeepalive.ERROR_INVALID_IP_ADDRESS);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv6, 1234, dstIPv6);
- callback.expectError(PacketKeepalive.ERROR_INVALID_IP_ADDRESS); // NAT-T is IPv4-only.
+ // NAT-T is only supported for IPv4.
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv6, 1234, dstIPv6);
+ callback.expectError(PacketKeepalive.ERROR_INVALID_IP_ADDRESS);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 123456, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 123456, dstIPv4);
callback.expectError(PacketKeepalive.ERROR_INVALID_PORT);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 123456, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 123456, dstIPv4);
callback.expectError(PacketKeepalive.ERROR_INVALID_PORT);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 12345, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 12345, dstIPv4);
callback.expectError(PacketKeepalive.ERROR_HARDWARE_UNSUPPORTED);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 12345, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 12345, dstIPv4);
callback.expectError(PacketKeepalive.ERROR_HARDWARE_UNSUPPORTED);
// Check that a started keepalive can be stopped.
mWiFiNetworkAgent.setStartKeepaliveError(PacketKeepalive.SUCCESS);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 12345, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 12345, dstIPv4);
callback.expectStarted();
mWiFiNetworkAgent.setStopKeepaliveError(PacketKeepalive.SUCCESS);
ka.stop();
@@ -3127,7 +3426,7 @@
// Check that deleting the IP address stops the keepalive.
LinkProperties bogusLp = new LinkProperties(lp);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 12345, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 12345, dstIPv4);
callback.expectStarted();
bogusLp.removeLinkAddress(new LinkAddress(myIPv4, 25));
bogusLp.addLinkAddress(new LinkAddress(notMyIPv4, 25));
@@ -3136,7 +3435,7 @@
mWiFiNetworkAgent.sendLinkProperties(lp);
// Check that a started keepalive is stopped correctly when the network disconnects.
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 12345, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 12345, dstIPv4);
callback.expectStarted();
mWiFiNetworkAgent.disconnect();
waitFor(mWiFiNetworkAgent.getDisconnectedCV());
@@ -3153,7 +3452,7 @@
mWiFiNetworkAgent.setStartKeepaliveError(PacketKeepalive.SUCCESS);
// Check things work as expected when the keepalive is stopped and the network disconnects.
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 12345, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 12345, dstIPv4);
callback.expectStarted();
ka.stop();
mWiFiNetworkAgent.disconnect();
@@ -3167,13 +3466,14 @@
// Check that keepalive slots start from 1 and increment. The first one gets slot 1.
mWiFiNetworkAgent.setExpectedKeepaliveSlot(1);
- ka = mCm.startNattKeepalive(myNet, 25, callback, myIPv4, 12345, dstIPv4);
+ ka = mCm.startNattKeepalive(myNet, validKaInterval, callback, myIPv4, 12345, dstIPv4);
callback.expectStarted();
// The second one gets slot 2.
mWiFiNetworkAgent.setExpectedKeepaliveSlot(2);
TestKeepaliveCallback callback2 = new TestKeepaliveCallback();
- PacketKeepalive ka2 = mCm.startNattKeepalive(myNet, 25, callback2, myIPv4, 6789, dstIPv4);
+ PacketKeepalive ka2 = mCm.startNattKeepalive(
+ myNet, validKaInterval, callback2, myIPv4, 6789, dstIPv4);
callback2.expectStarted();
// Now stop the first one and create a third. This also gets slot 1.
@@ -3182,7 +3482,8 @@
mWiFiNetworkAgent.setExpectedKeepaliveSlot(1);
TestKeepaliveCallback callback3 = new TestKeepaliveCallback();
- PacketKeepalive ka3 = mCm.startNattKeepalive(myNet, 25, callback3, myIPv4, 9876, dstIPv4);
+ PacketKeepalive ka3 = mCm.startNattKeepalive(
+ myNet, validKaInterval, callback3, myIPv4, 9876, dstIPv4);
callback3.expectStarted();
ka2.stop();
@@ -3461,7 +3762,7 @@
mCm.registerNetworkCallback(networkRequest, networkCallback);
LinkProperties lp = new LinkProperties();
- lp.setInterfaceName("wlan0");
+ lp.setInterfaceName(WIFI_IFNAME);
LinkAddress myIpv4Address = new LinkAddress("192.168.12.3/24");
RouteInfo myIpv4DefaultRoute = new RouteInfo((IpPrefix) null,
NetworkUtils.numericToInetAddress("192.168.12.1"), lp.getInterfaceName());
@@ -3550,42 +3851,273 @@
@Test
public void testBasicDnsConfigurationPushed() throws Exception {
+ setPrivateDnsSettings(PRIVATE_DNS_MODE_OPPORTUNISTIC, "ignored.example.com");
+ ArgumentCaptor<String[]> tlsServers = ArgumentCaptor.forClass(String[].class);
+
+ // Clear any interactions that occur as a result of CS starting up.
+ reset(mNetworkManagementService);
+
+ final String[] EMPTY_STRING_ARRAY = new String[0];
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
waitForIdle();
verify(mNetworkManagementService, never()).setDnsConfigurationForNetwork(
- anyInt(), any(), any(), any(), anyBoolean(), anyString());
+ anyInt(), eq(EMPTY_STRING_ARRAY), any(), any(), eq(""), eq(EMPTY_STRING_ARRAY));
+ verifyNoMoreInteractions(mNetworkManagementService);
final LinkProperties cellLp = new LinkProperties();
- cellLp.setInterfaceName("test_rmnet_data0");
+ cellLp.setInterfaceName(MOBILE_IFNAME);
+ // Add IPv4 and IPv6 default routes, because DNS-over-TLS code does
+ // "is-reachable" testing in order to not program netd with unreachable
+ // nameservers that it might try repeated to validate.
+ cellLp.addLinkAddress(new LinkAddress("192.0.2.4/24"));
+ cellLp.addRoute(new RouteInfo((IpPrefix) null, InetAddress.getByName("192.0.2.4"),
+ MOBILE_IFNAME));
+ cellLp.addLinkAddress(new LinkAddress("2001:db8:1::1/64"));
+ cellLp.addRoute(new RouteInfo((IpPrefix) null, InetAddress.getByName("2001:db8:1::1"),
+ MOBILE_IFNAME));
mCellNetworkAgent.sendLinkProperties(cellLp);
mCellNetworkAgent.connect(false);
waitForIdle();
- verify(mNetworkManagementService, times(1)).setDnsConfigurationForNetwork(
- anyInt(), mStringArrayCaptor.capture(), any(), any(), anyBoolean(), anyString());
// CS tells netd about the empty DNS config for this network.
- assertEmpty(mStringArrayCaptor.getValue());
+ verify(mNetworkManagementService, atLeastOnce()).setDnsConfigurationForNetwork(
+ anyInt(), eq(EMPTY_STRING_ARRAY), any(), any(), eq(""), eq(EMPTY_STRING_ARRAY));
reset(mNetworkManagementService);
cellLp.addDnsServer(InetAddress.getByName("2001:db8::1"));
mCellNetworkAgent.sendLinkProperties(cellLp);
waitForIdle();
- verify(mNetworkManagementService, times(1)).setDnsConfigurationForNetwork(
- anyInt(), mStringArrayCaptor.capture(), any(), any(), anyBoolean(), anyString());
+ verify(mNetworkManagementService, atLeastOnce()).setDnsConfigurationForNetwork(
+ anyInt(), mStringArrayCaptor.capture(), any(), any(),
+ eq(""), tlsServers.capture());
assertEquals(1, mStringArrayCaptor.getValue().length);
assertTrue(ArrayUtils.contains(mStringArrayCaptor.getValue(), "2001:db8::1"));
+ // Opportunistic mode.
+ assertTrue(ArrayUtils.contains(tlsServers.getValue(), "2001:db8::1"));
reset(mNetworkManagementService);
cellLp.addDnsServer(InetAddress.getByName("192.0.2.1"));
mCellNetworkAgent.sendLinkProperties(cellLp);
waitForIdle();
- verify(mNetworkManagementService, times(1)).setDnsConfigurationForNetwork(
- anyInt(), mStringArrayCaptor.capture(), any(), any(), anyBoolean(), anyString());
+ verify(mNetworkManagementService, atLeastOnce()).setDnsConfigurationForNetwork(
+ anyInt(), mStringArrayCaptor.capture(), any(), any(),
+ eq(""), tlsServers.capture());
+ assertEquals(2, mStringArrayCaptor.getValue().length);
+ assertTrue(ArrayUtils.containsAll(mStringArrayCaptor.getValue(),
+ new String[]{"2001:db8::1", "192.0.2.1"}));
+ // Opportunistic mode.
+ assertEquals(2, tlsServers.getValue().length);
+ assertTrue(ArrayUtils.containsAll(tlsServers.getValue(),
+ new String[]{"2001:db8::1", "192.0.2.1"}));
+ reset(mNetworkManagementService);
+
+ final String TLS_SPECIFIER = "tls.example.com";
+ final String TLS_SERVER6 = "2001:db8:53::53";
+ final InetAddress[] TLS_IPS = new InetAddress[]{ InetAddress.getByName(TLS_SERVER6) };
+ final String[] TLS_SERVERS = new String[]{ TLS_SERVER6 };
+ final Handler h = mCellNetworkAgent.getWrappedNetworkMonitor().connectivityHandler;
+ h.sendMessage(h.obtainMessage(
+ NetworkMonitor.EVENT_PRIVATE_DNS_CONFIG_RESOLVED, 0,
+ mCellNetworkAgent.getNetwork().netId,
+ new DnsManager.PrivateDnsConfig(TLS_SPECIFIER, TLS_IPS)));
+ waitForIdle();
+ verify(mNetworkManagementService, atLeastOnce()).setDnsConfigurationForNetwork(
+ anyInt(), mStringArrayCaptor.capture(), any(), any(),
+ eq(TLS_SPECIFIER), eq(TLS_SERVERS));
assertEquals(2, mStringArrayCaptor.getValue().length);
assertTrue(ArrayUtils.containsAll(mStringArrayCaptor.getValue(),
new String[]{"2001:db8::1", "192.0.2.1"}));
reset(mNetworkManagementService);
}
+ @Test
+ public void testPrivateDnsSettingsChange() throws Exception {
+ final String[] EMPTY_STRING_ARRAY = new String[0];
+ ArgumentCaptor<String[]> tlsServers = ArgumentCaptor.forClass(String[].class);
+
+ // Clear any interactions that occur as a result of CS starting up.
+ reset(mNetworkManagementService);
+
+ // The default on Android is opportunistic mode ("Automatic").
+ setPrivateDnsSettings(PRIVATE_DNS_MODE_OPPORTUNISTIC, "ignored.example.com");
+
+ final TestNetworkCallback cellNetworkCallback = new TestNetworkCallback();
+ final NetworkRequest cellRequest = new NetworkRequest.Builder()
+ .addTransportType(TRANSPORT_CELLULAR).build();
+ mCm.requestNetwork(cellRequest, cellNetworkCallback);
+
+ mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+ waitForIdle();
+ // CS tells netd about the empty DNS config for this network.
+ verify(mNetworkManagementService, never()).setDnsConfigurationForNetwork(
+ anyInt(), eq(EMPTY_STRING_ARRAY), any(), any(), eq(""), eq(EMPTY_STRING_ARRAY));
+ verifyNoMoreInteractions(mNetworkManagementService);
+
+ final LinkProperties cellLp = new LinkProperties();
+ cellLp.setInterfaceName(MOBILE_IFNAME);
+ // Add IPv4 and IPv6 default routes, because DNS-over-TLS code does
+ // "is-reachable" testing in order to not program netd with unreachable
+ // nameservers that it might try repeated to validate.
+ cellLp.addLinkAddress(new LinkAddress("192.0.2.4/24"));
+ cellLp.addRoute(new RouteInfo((IpPrefix) null, InetAddress.getByName("192.0.2.4"),
+ MOBILE_IFNAME));
+ cellLp.addLinkAddress(new LinkAddress("2001:db8:1::1/64"));
+ cellLp.addRoute(new RouteInfo((IpPrefix) null, InetAddress.getByName("2001:db8:1::1"),
+ MOBILE_IFNAME));
+ cellLp.addDnsServer(InetAddress.getByName("2001:db8::1"));
+ cellLp.addDnsServer(InetAddress.getByName("192.0.2.1"));
+
+ mCellNetworkAgent.sendLinkProperties(cellLp);
+ mCellNetworkAgent.connect(false);
+ waitForIdle();
+ verify(mNetworkManagementService, atLeastOnce()).setDnsConfigurationForNetwork(
+ anyInt(), mStringArrayCaptor.capture(), any(), any(),
+ eq(""), tlsServers.capture());
+ assertEquals(2, mStringArrayCaptor.getValue().length);
+ assertTrue(ArrayUtils.containsAll(mStringArrayCaptor.getValue(),
+ new String[]{"2001:db8::1", "192.0.2.1"}));
+ // Opportunistic mode.
+ assertEquals(2, tlsServers.getValue().length);
+ assertTrue(ArrayUtils.containsAll(tlsServers.getValue(),
+ new String[]{"2001:db8::1", "192.0.2.1"}));
+ reset(mNetworkManagementService);
+ cellNetworkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+ cellNetworkCallback.expectCallback(CallbackState.NETWORK_CAPABILITIES,
+ mCellNetworkAgent);
+ CallbackInfo cbi = cellNetworkCallback.expectCallback(
+ CallbackState.LINK_PROPERTIES, mCellNetworkAgent);
+ cellNetworkCallback.assertNoCallback();
+ assertFalse(((LinkProperties)cbi.arg).isPrivateDnsActive());
+ assertNull(((LinkProperties)cbi.arg).getPrivateDnsServerName());
+
+ setPrivateDnsSettings(PRIVATE_DNS_MODE_OFF, "ignored.example.com");
+ verify(mNetworkManagementService, times(1)).setDnsConfigurationForNetwork(
+ anyInt(), mStringArrayCaptor.capture(), any(), any(),
+ eq(""), eq(EMPTY_STRING_ARRAY));
+ assertEquals(2, mStringArrayCaptor.getValue().length);
+ assertTrue(ArrayUtils.containsAll(mStringArrayCaptor.getValue(),
+ new String[]{"2001:db8::1", "192.0.2.1"}));
+ reset(mNetworkManagementService);
+ cellNetworkCallback.assertNoCallback();
+
+ setPrivateDnsSettings(PRIVATE_DNS_MODE_OPPORTUNISTIC, "ignored.example.com");
+ verify(mNetworkManagementService, atLeastOnce()).setDnsConfigurationForNetwork(
+ anyInt(), mStringArrayCaptor.capture(), any(), any(),
+ eq(""), tlsServers.capture());
+ assertEquals(2, mStringArrayCaptor.getValue().length);
+ assertTrue(ArrayUtils.containsAll(mStringArrayCaptor.getValue(),
+ new String[]{"2001:db8::1", "192.0.2.1"}));
+ assertEquals(2, tlsServers.getValue().length);
+ assertTrue(ArrayUtils.containsAll(tlsServers.getValue(),
+ new String[]{"2001:db8::1", "192.0.2.1"}));
+ reset(mNetworkManagementService);
+ cellNetworkCallback.assertNoCallback();
+
+ setPrivateDnsSettings(PRIVATE_DNS_MODE_PROVIDER_HOSTNAME, "strict.example.com");
+ // Can't test dns configuration for strict mode without properly mocking
+ // out the DNS lookups, but can test that LinkProperties is updated.
+ cbi = cellNetworkCallback.expectCallback(CallbackState.LINK_PROPERTIES,
+ mCellNetworkAgent);
+ cellNetworkCallback.assertNoCallback();
+ assertTrue(((LinkProperties)cbi.arg).isPrivateDnsActive());
+ assertEquals("strict.example.com", ((LinkProperties)cbi.arg).getPrivateDnsServerName());
+ }
+
+ @Test
+ public void testLinkPropertiesWithPrivateDnsValidationEvents() throws Exception {
+ // The default on Android is opportunistic mode ("Automatic").
+ setPrivateDnsSettings(PRIVATE_DNS_MODE_OPPORTUNISTIC, "ignored.example.com");
+
+ final TestNetworkCallback cellNetworkCallback = new TestNetworkCallback();
+ final NetworkRequest cellRequest = new NetworkRequest.Builder()
+ .addTransportType(TRANSPORT_CELLULAR).build();
+ mCm.requestNetwork(cellRequest, cellNetworkCallback);
+
+ mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+ waitForIdle();
+ LinkProperties lp = new LinkProperties();
+ mCellNetworkAgent.sendLinkProperties(lp);
+ mCellNetworkAgent.connect(false);
+ waitForIdle();
+ cellNetworkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+ cellNetworkCallback.expectCallback(CallbackState.NETWORK_CAPABILITIES,
+ mCellNetworkAgent);
+ CallbackInfo cbi = cellNetworkCallback.expectCallback(
+ CallbackState.LINK_PROPERTIES, mCellNetworkAgent);
+ cellNetworkCallback.assertNoCallback();
+ assertFalse(((LinkProperties)cbi.arg).isPrivateDnsActive());
+ assertNull(((LinkProperties)cbi.arg).getPrivateDnsServerName());
+ Set<InetAddress> dnsServers = new HashSet<>();
+ checkDnsServers(cbi.arg, dnsServers);
+
+ // Send a validation event for a server that is not part of the current
+ // resolver config. The validation event should be ignored.
+ mService.mNetdEventCallback.onPrivateDnsValidationEvent(
+ mCellNetworkAgent.getNetwork().netId, "", "145.100.185.18", true);
+ cellNetworkCallback.assertNoCallback();
+
+ // Add a dns server to the LinkProperties.
+ LinkProperties lp2 = new LinkProperties(lp);
+ lp2.addDnsServer(InetAddress.getByName("145.100.185.16"));
+ mCellNetworkAgent.sendLinkProperties(lp2);
+ cbi = cellNetworkCallback.expectCallback(CallbackState.LINK_PROPERTIES,
+ mCellNetworkAgent);
+ cellNetworkCallback.assertNoCallback();
+ assertFalse(((LinkProperties)cbi.arg).isPrivateDnsActive());
+ assertNull(((LinkProperties)cbi.arg).getPrivateDnsServerName());
+ dnsServers.add(InetAddress.getByName("145.100.185.16"));
+ checkDnsServers(cbi.arg, dnsServers);
+
+ // Send a validation event containing a hostname that is not part of
+ // the current resolver config. The validation event should be ignored.
+ mService.mNetdEventCallback.onPrivateDnsValidationEvent(
+ mCellNetworkAgent.getNetwork().netId, "145.100.185.16", "hostname", true);
+ cellNetworkCallback.assertNoCallback();
+
+ // Send a validation event where validation failed.
+ mService.mNetdEventCallback.onPrivateDnsValidationEvent(
+ mCellNetworkAgent.getNetwork().netId, "145.100.185.16", "", false);
+ cellNetworkCallback.assertNoCallback();
+
+ // Send a validation event where validation succeeded for a server in
+ // the current resolver config. A LinkProperties callback with updated
+ // private dns fields should be sent.
+ mService.mNetdEventCallback.onPrivateDnsValidationEvent(
+ mCellNetworkAgent.getNetwork().netId, "145.100.185.16", "", true);
+ cbi = cellNetworkCallback.expectCallback(CallbackState.LINK_PROPERTIES,
+ mCellNetworkAgent);
+ cellNetworkCallback.assertNoCallback();
+ assertTrue(((LinkProperties)cbi.arg).isPrivateDnsActive());
+ assertNull(((LinkProperties)cbi.arg).getPrivateDnsServerName());
+ checkDnsServers(cbi.arg, dnsServers);
+
+ // The private dns fields in LinkProperties should be preserved when
+ // the network agent sends unrelated changes.
+ LinkProperties lp3 = new LinkProperties(lp2);
+ lp3.setMtu(1300);
+ mCellNetworkAgent.sendLinkProperties(lp3);
+ cbi = cellNetworkCallback.expectCallback(CallbackState.LINK_PROPERTIES,
+ mCellNetworkAgent);
+ cellNetworkCallback.assertNoCallback();
+ assertTrue(((LinkProperties)cbi.arg).isPrivateDnsActive());
+ assertNull(((LinkProperties)cbi.arg).getPrivateDnsServerName());
+ checkDnsServers(cbi.arg, dnsServers);
+ assertEquals(1300, ((LinkProperties)cbi.arg).getMtu());
+
+ // Removing the only validated server should affect the private dns
+ // fields in LinkProperties.
+ LinkProperties lp4 = new LinkProperties(lp3);
+ lp4.removeDnsServer(InetAddress.getByName("145.100.185.16"));
+ mCellNetworkAgent.sendLinkProperties(lp4);
+ cbi = cellNetworkCallback.expectCallback(CallbackState.LINK_PROPERTIES,
+ mCellNetworkAgent);
+ cellNetworkCallback.assertNoCallback();
+ assertFalse(((LinkProperties)cbi.arg).isPrivateDnsActive());
+ assertNull(((LinkProperties)cbi.arg).getPrivateDnsServerName());
+ dnsServers.remove(InetAddress.getByName("145.100.185.16"));
+ checkDnsServers(cbi.arg, dnsServers);
+ assertEquals(1300, ((LinkProperties)cbi.arg).getMtu());
+ }
+
private void checkDirectlyConnectedRoutes(Object callbackObj,
Collection<LinkAddress> linkAddresses, Collection<RouteInfo> otherRoutes) {
assertTrue(callbackObj instanceof LinkProperties);
@@ -3603,6 +4135,13 @@
assertTrue(observedRoutes.containsAll(expectedRoutes));
}
+ private static void checkDnsServers(Object callbackObj, Set<InetAddress> dnsServers) {
+ assertTrue(callbackObj instanceof LinkProperties);
+ LinkProperties lp = (LinkProperties) callbackObj;
+ assertEquals(dnsServers.size(), lp.getDnsServers().size());
+ assertTrue(lp.getDnsServers().containsAll(dnsServers));
+ }
+
private static <T> void assertEmpty(T[] ts) {
int length = ts.length;
assertEquals("expected empty array, but length was " + length, 0, length);
@@ -3625,4 +4164,258 @@
return;
}
}
+
+ @Test
+ public void testVpnNetworkActive() {
+ final int uid = Process.myUid();
+
+ final TestNetworkCallback genericNetworkCallback = new TestNetworkCallback();
+ final TestNetworkCallback genericNotVpnNetworkCallback = new TestNetworkCallback();
+ final TestNetworkCallback wifiNetworkCallback = new TestNetworkCallback();
+ final TestNetworkCallback vpnNetworkCallback = new TestNetworkCallback();
+ final TestNetworkCallback defaultCallback = new TestNetworkCallback();
+ final NetworkRequest genericNotVpnRequest = new NetworkRequest.Builder().build();
+ final NetworkRequest genericRequest = new NetworkRequest.Builder()
+ .removeCapability(NET_CAPABILITY_NOT_VPN).build();
+ final NetworkRequest wifiRequest = new NetworkRequest.Builder()
+ .addTransportType(TRANSPORT_WIFI).build();
+ final NetworkRequest vpnNetworkRequest = new NetworkRequest.Builder()
+ .removeCapability(NET_CAPABILITY_NOT_VPN)
+ .addTransportType(TRANSPORT_VPN).build();
+ mCm.registerNetworkCallback(genericRequest, genericNetworkCallback);
+ mCm.registerNetworkCallback(genericNotVpnRequest, genericNotVpnNetworkCallback);
+ mCm.registerNetworkCallback(wifiRequest, wifiNetworkCallback);
+ mCm.registerNetworkCallback(vpnNetworkRequest, vpnNetworkCallback);
+ mCm.registerDefaultNetworkCallback(defaultCallback);
+ defaultCallback.assertNoCallback();
+
+ mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+ mWiFiNetworkAgent.connect(false);
+
+ genericNetworkCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+ genericNotVpnNetworkCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+ wifiNetworkCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+ defaultCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+ vpnNetworkCallback.assertNoCallback();
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
+
+ final MockNetworkAgent vpnNetworkAgent = new MockNetworkAgent(TRANSPORT_VPN);
+ final ArraySet<UidRange> ranges = new ArraySet<>();
+ ranges.add(new UidRange(uid, uid));
+ mMockVpn.setNetworkAgent(vpnNetworkAgent);
+ mMockVpn.setUids(ranges);
+ vpnNetworkAgent.connect(false);
+ mMockVpn.connect();
+
+ genericNetworkCallback.expectAvailableCallbacksUnvalidated(vpnNetworkAgent);
+ genericNotVpnNetworkCallback.assertNoCallback();
+ wifiNetworkCallback.assertNoCallback();
+ vpnNetworkCallback.expectAvailableCallbacksUnvalidated(vpnNetworkAgent);
+ defaultCallback.expectAvailableCallbacksUnvalidated(vpnNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
+
+ genericNetworkCallback.expectCallback(CallbackState.NETWORK_CAPABILITIES, vpnNetworkAgent);
+ genericNotVpnNetworkCallback.assertNoCallback();
+ vpnNetworkCallback.expectCapabilitiesLike(nc -> null == nc.getUids(), vpnNetworkAgent);
+ defaultCallback.expectCallback(CallbackState.NETWORK_CAPABILITIES, vpnNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
+
+ ranges.clear();
+ vpnNetworkAgent.setUids(ranges);
+
+ genericNetworkCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+ genericNotVpnNetworkCallback.assertNoCallback();
+ wifiNetworkCallback.assertNoCallback();
+ vpnNetworkCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+
+ // TODO : The default network callback should actually get a LOST call here (also see the
+ // comment below for AVAILABLE). This is because ConnectivityService does not look at UID
+ // ranges at all when determining whether a network should be rematched. In practice, VPNs
+ // can't currently update their UIDs without disconnecting, so this does not matter too
+ // much, but that is the reason the test here has to check for an update to the
+ // capabilities instead of the expected LOST then AVAILABLE.
+ defaultCallback.expectCallback(CallbackState.NETWORK_CAPABILITIES, vpnNetworkAgent);
+
+ ranges.add(new UidRange(uid, uid));
+ mMockVpn.setUids(ranges);
+
+ genericNetworkCallback.expectAvailableCallbacksValidated(vpnNetworkAgent);
+ genericNotVpnNetworkCallback.assertNoCallback();
+ wifiNetworkCallback.assertNoCallback();
+ vpnNetworkCallback.expectAvailableCallbacksValidated(vpnNetworkAgent);
+ // TODO : Here like above, AVAILABLE would be correct, but because this can't actually
+ // happen outside of the test, ConnectivityService does not rematch callbacks.
+ defaultCallback.expectCallback(CallbackState.NETWORK_CAPABILITIES, vpnNetworkAgent);
+
+ mWiFiNetworkAgent.disconnect();
+
+ genericNetworkCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+ genericNotVpnNetworkCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+ wifiNetworkCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+ vpnNetworkCallback.assertNoCallback();
+ defaultCallback.assertNoCallback();
+
+ vpnNetworkAgent.disconnect();
+
+ genericNetworkCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+ genericNotVpnNetworkCallback.assertNoCallback();
+ wifiNetworkCallback.assertNoCallback();
+ vpnNetworkCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+ defaultCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+ assertEquals(null, mCm.getActiveNetwork());
+
+ mCm.unregisterNetworkCallback(genericNetworkCallback);
+ mCm.unregisterNetworkCallback(wifiNetworkCallback);
+ mCm.unregisterNetworkCallback(vpnNetworkCallback);
+ mCm.unregisterNetworkCallback(defaultCallback);
+ }
+
+ @Test
+ public void testVpnWithAndWithoutInternet() {
+ final int uid = Process.myUid();
+
+ final TestNetworkCallback defaultCallback = new TestNetworkCallback();
+ mCm.registerDefaultNetworkCallback(defaultCallback);
+ defaultCallback.assertNoCallback();
+
+ mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+ mWiFiNetworkAgent.connect(true);
+
+ defaultCallback.expectAvailableThenValidatedCallbacks(mWiFiNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
+
+ MockNetworkAgent vpnNetworkAgent = new MockNetworkAgent(TRANSPORT_VPN);
+ final ArraySet<UidRange> ranges = new ArraySet<>();
+ ranges.add(new UidRange(uid, uid));
+ mMockVpn.setNetworkAgent(vpnNetworkAgent);
+ mMockVpn.setUids(ranges);
+ vpnNetworkAgent.connect(true /* validated */, false /* hasInternet */);
+ mMockVpn.connect();
+
+ defaultCallback.assertNoCallback();
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
+
+ vpnNetworkAgent.disconnect();
+ defaultCallback.assertNoCallback();
+
+ vpnNetworkAgent = new MockNetworkAgent(TRANSPORT_VPN);
+ mMockVpn.setNetworkAgent(vpnNetworkAgent);
+ mMockVpn.setUids(ranges);
+ vpnNetworkAgent.connect(true /* validated */, true /* hasInternet */);
+ mMockVpn.connect();
+ defaultCallback.expectAvailableThenValidatedCallbacks(vpnNetworkAgent);
+ assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
+
+ vpnNetworkAgent.disconnect();
+ defaultCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+ defaultCallback.expectAvailableCallbacksValidated(mWiFiNetworkAgent);
+
+ vpnNetworkAgent = new MockNetworkAgent(TRANSPORT_VPN);
+ ranges.clear();
+ mMockVpn.setNetworkAgent(vpnNetworkAgent);
+ mMockVpn.setUids(ranges);
+ vpnNetworkAgent.connect(false /* validated */, true /* hasInternet */);
+ mMockVpn.connect();
+ defaultCallback.assertNoCallback();
+
+ mCm.unregisterNetworkCallback(defaultCallback);
+ }
+
+ @Test
+ public void testVpnSetUnderlyingNetworks() {
+ final int uid = Process.myUid();
+
+ final TestNetworkCallback vpnNetworkCallback = new TestNetworkCallback();
+ final NetworkRequest vpnNetworkRequest = new NetworkRequest.Builder()
+ .removeCapability(NET_CAPABILITY_NOT_VPN)
+ .addTransportType(TRANSPORT_VPN)
+ .build();
+ NetworkCapabilities nc;
+ mCm.registerNetworkCallback(vpnNetworkRequest, vpnNetworkCallback);
+ vpnNetworkCallback.assertNoCallback();
+
+ final MockNetworkAgent vpnNetworkAgent = new MockNetworkAgent(TRANSPORT_VPN);
+ final ArraySet<UidRange> ranges = new ArraySet<>();
+ ranges.add(new UidRange(uid, uid));
+ mMockVpn.setNetworkAgent(vpnNetworkAgent);
+ mMockVpn.connect();
+ mMockVpn.setUids(ranges);
+ vpnNetworkAgent.connect(true /* validated */, false /* hasInternet */);
+
+ vpnNetworkCallback.expectAvailableThenValidatedCallbacks(vpnNetworkAgent);
+ nc = mCm.getNetworkCapabilities(vpnNetworkAgent.getNetwork());
+ assertTrue(nc.hasTransport(TRANSPORT_VPN));
+ assertFalse(nc.hasTransport(TRANSPORT_CELLULAR));
+ assertFalse(nc.hasTransport(TRANSPORT_WIFI));
+ // For safety reasons a VPN without underlying networks is considered metered.
+ assertFalse(nc.hasCapability(NET_CAPABILITY_NOT_METERED));
+
+ // Connect cell and use it as an underlying network.
+ mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+ mCellNetworkAgent.connect(true);
+
+ mService.setUnderlyingNetworksForVpn(
+ new Network[] { mCellNetworkAgent.getNetwork() });
+
+ vpnNetworkCallback.expectCapabilitiesLike((caps) -> caps.hasTransport(TRANSPORT_VPN)
+ && caps.hasTransport(TRANSPORT_CELLULAR) && !caps.hasTransport(TRANSPORT_WIFI)
+ && !caps.hasCapability(NET_CAPABILITY_NOT_METERED),
+ vpnNetworkAgent);
+
+ mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+ mWiFiNetworkAgent.addCapability(NET_CAPABILITY_NOT_METERED);
+ mWiFiNetworkAgent.connect(true);
+
+ mService.setUnderlyingNetworksForVpn(
+ new Network[] { mCellNetworkAgent.getNetwork(), mWiFiNetworkAgent.getNetwork() });
+
+ vpnNetworkCallback.expectCapabilitiesLike((caps) -> caps.hasTransport(TRANSPORT_VPN)
+ && caps.hasTransport(TRANSPORT_CELLULAR) && caps.hasTransport(TRANSPORT_WIFI)
+ && !caps.hasCapability(NET_CAPABILITY_NOT_METERED),
+ vpnNetworkAgent);
+
+ // Don't disconnect, but note the VPN is not using wifi any more.
+ mService.setUnderlyingNetworksForVpn(
+ new Network[] { mCellNetworkAgent.getNetwork() });
+
+ vpnNetworkCallback.expectCapabilitiesLike((caps) -> caps.hasTransport(TRANSPORT_VPN)
+ && caps.hasTransport(TRANSPORT_CELLULAR) && !caps.hasTransport(TRANSPORT_WIFI)
+ && !caps.hasCapability(NET_CAPABILITY_NOT_METERED),
+ vpnNetworkAgent);
+
+ // Use Wifi but not cell. Note the VPN is now unmetered.
+ mService.setUnderlyingNetworksForVpn(
+ new Network[] { mWiFiNetworkAgent.getNetwork() });
+
+ vpnNetworkCallback.expectCapabilitiesLike((caps) -> caps.hasTransport(TRANSPORT_VPN)
+ && !caps.hasTransport(TRANSPORT_CELLULAR) && caps.hasTransport(TRANSPORT_WIFI)
+ && caps.hasCapability(NET_CAPABILITY_NOT_METERED),
+ vpnNetworkAgent);
+
+ // Use both again.
+ mService.setUnderlyingNetworksForVpn(
+ new Network[] { mCellNetworkAgent.getNetwork(), mWiFiNetworkAgent.getNetwork() });
+
+ vpnNetworkCallback.expectCapabilitiesLike((caps) -> caps.hasTransport(TRANSPORT_VPN)
+ && caps.hasTransport(TRANSPORT_CELLULAR) && caps.hasTransport(TRANSPORT_WIFI)
+ && !caps.hasCapability(NET_CAPABILITY_NOT_METERED),
+ vpnNetworkAgent);
+
+ // Disconnect cell. Receive update without even removing the dead network from the
+ // underlying networks – it's dead anyway. Not metered any more.
+ mCellNetworkAgent.disconnect();
+ vpnNetworkCallback.expectCapabilitiesLike((caps) -> caps.hasTransport(TRANSPORT_VPN)
+ && !caps.hasTransport(TRANSPORT_CELLULAR) && caps.hasTransport(TRANSPORT_WIFI)
+ && caps.hasCapability(NET_CAPABILITY_NOT_METERED),
+ vpnNetworkAgent);
+
+ // Disconnect wifi too. No underlying networks means this is now metered.
+ mWiFiNetworkAgent.disconnect();
+ vpnNetworkCallback.expectCapabilitiesLike((caps) -> caps.hasTransport(TRANSPORT_VPN)
+ && !caps.hasTransport(TRANSPORT_CELLULAR) && !caps.hasTransport(TRANSPORT_WIFI)
+ && !caps.hasCapability(NET_CAPABILITY_NOT_METERED),
+ vpnNetworkAgent);
+
+ mMockVpn.disconnect();
+ }
}
diff --git a/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java b/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java
index 1618e07..102cb7c 100644
--- a/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java
+++ b/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java
@@ -17,15 +17,17 @@
package com.android.server;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyLong;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.app.AppOpsManager;
import android.content.Context;
import android.net.INetd;
import android.net.IpSecAlgorithm;
@@ -33,9 +35,13 @@
import android.net.IpSecManager;
import android.net.IpSecSpiResponse;
import android.net.IpSecTransformResponse;
+import android.net.IpSecTunnelInterfaceResponse;
+import android.net.LinkAddress;
+import android.net.Network;
import android.net.NetworkUtils;
import android.os.Binder;
import android.os.ParcelFileDescriptor;
+import android.test.mock.MockContext;
import android.support.test.filters.SmallTest;
import android.system.Os;
@@ -44,6 +50,7 @@
import java.util.Collection;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -57,10 +64,15 @@
private final String mDestinationAddr;
private final String mSourceAddr;
+ private final LinkAddress mLocalInnerAddress;
@Parameterized.Parameters
public static Collection ipSecConfigs() {
- return Arrays.asList(new Object[][] {{"1.2.3.4", "8.8.4.4"}, {"2601::2", "2601::10"}});
+ return Arrays.asList(
+ new Object[][] {
+ {"1.2.3.4", "8.8.4.4", "10.0.1.1/24"},
+ {"2601::2", "2601::10", "2001:db8::1/64"}
+ });
}
private static final byte[] AEAD_KEY = {
@@ -83,10 +95,32 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F
};
- Context mMockContext;
+ AppOpsManager mMockAppOps = mock(AppOpsManager.class);
+
+ MockContext mMockContext = new MockContext() {
+ @Override
+ public Object getSystemService(String name) {
+ switch(name) {
+ case Context.APP_OPS_SERVICE:
+ return mMockAppOps;
+ default:
+ return null;
+ }
+ }
+
+ @Override
+ public void enforceCallingOrSelfPermission(String permission, String message) {
+ if (permission == android.Manifest.permission.MANAGE_IPSEC_TUNNELS) {
+ return;
+ }
+ throw new SecurityException("Unavailable permission requested");
+ }
+ };
+
INetd mMockNetd;
IpSecService.IpSecServiceConfiguration mMockIpSecSrvConfig;
IpSecService mIpSecService;
+ Network fakeNetwork = new Network(0xAB);
private static final IpSecAlgorithm AUTH_ALGO =
new IpSecAlgorithm(IpSecAlgorithm.AUTH_HMAC_SHA256, AUTH_KEY, AUTH_KEY.length * 4);
@@ -95,20 +129,31 @@
private static final IpSecAlgorithm AEAD_ALGO =
new IpSecAlgorithm(IpSecAlgorithm.AUTH_CRYPT_AES_GCM, AEAD_KEY, 128);
- public IpSecServiceParameterizedTest(String sourceAddr, String destAddr) {
+ public IpSecServiceParameterizedTest(
+ String sourceAddr, String destAddr, String localInnerAddr) {
mSourceAddr = sourceAddr;
mDestinationAddr = destAddr;
+ mLocalInnerAddress = new LinkAddress(localInnerAddr);
}
@Before
public void setUp() throws Exception {
- mMockContext = mock(Context.class);
mMockNetd = mock(INetd.class);
mMockIpSecSrvConfig = mock(IpSecService.IpSecServiceConfiguration.class);
mIpSecService = new IpSecService(mMockContext, mMockIpSecSrvConfig);
// Injecting mock netd
when(mMockIpSecSrvConfig.getNetdInstance()).thenReturn(mMockNetd);
+ // A package granted the AppOp for MANAGE_IPSEC_TUNNELS will be MODE_ALLOWED.
+ when(mMockAppOps.noteOp(anyInt(), anyInt(), eq("blessedPackage")))
+ .thenReturn(AppOpsManager.MODE_ALLOWED);
+ // A system package will not be granted the app op, so this should fall back to
+ // a permissions check, which should pass.
+ when(mMockAppOps.noteOp(anyInt(), anyInt(), eq("systemPackage")))
+ .thenReturn(AppOpsManager.MODE_DEFAULT);
+ // A mismatch between the package name and the UID will return MODE_IGNORED.
+ when(mMockAppOps.noteOp(anyInt(), anyInt(), eq("badPackage")))
+ .thenReturn(AppOpsManager.MODE_IGNORED);
}
@Test
@@ -136,7 +181,12 @@
verify(mMockNetd)
.ipSecDeleteSecurityAssociation(
- eq(spiResp.resourceId), anyString(), anyString(), eq(TEST_SPI));
+ eq(spiResp.resourceId),
+ anyString(),
+ anyString(),
+ eq(TEST_SPI),
+ anyInt(),
+ anyInt());
// Verify quota and RefcountedResource objects cleaned up
IpSecService.UserRecord userRecord =
@@ -168,7 +218,12 @@
verify(mMockNetd)
.ipSecDeleteSecurityAssociation(
- eq(spiResp.resourceId), anyString(), anyString(), eq(TEST_SPI));
+ eq(spiResp.resourceId),
+ anyString(),
+ anyString(),
+ eq(TEST_SPI),
+ anyInt(),
+ anyInt());
// Verify quota and RefcountedResource objects cleaned up
assertEquals(0, userRecord.mSpiQuotaTracker.mCurrent);
@@ -210,7 +265,7 @@
addAuthAndCryptToIpSecConfig(ipSecConfig);
IpSecTransformResponse createTransformResp =
- mIpSecService.createTransform(ipSecConfig, new Binder());
+ mIpSecService.createTransform(ipSecConfig, new Binder(), "blessedPackage");
assertEquals(IpSecManager.Status.OK, createTransformResp.status);
verify(mMockNetd)
@@ -219,8 +274,10 @@
anyInt(),
anyString(),
anyString(),
- anyLong(),
+ anyInt(),
eq(TEST_SPI),
+ anyInt(),
+ anyInt(),
eq(IpSecAlgorithm.AUTH_HMAC_SHA256),
eq(AUTH_KEY),
anyInt(),
@@ -243,7 +300,7 @@
ipSecConfig.setAuthenticatedEncryption(AEAD_ALGO);
IpSecTransformResponse createTransformResp =
- mIpSecService.createTransform(ipSecConfig, new Binder());
+ mIpSecService.createTransform(ipSecConfig, new Binder(), "blessedPackage");
assertEquals(IpSecManager.Status.OK, createTransformResp.status);
verify(mMockNetd)
@@ -252,8 +309,10 @@
anyInt(),
anyString(),
anyString(),
- anyLong(),
+ anyInt(),
eq(TEST_SPI),
+ anyInt(),
+ anyInt(),
eq(""),
eq(new byte[] {}),
eq(0),
@@ -268,18 +327,19 @@
anyInt());
}
+ @Test
public void testCreateTwoTransformsWithSameSpis() throws Exception {
IpSecConfig ipSecConfig = new IpSecConfig();
addDefaultSpisAndRemoteAddrToIpSecConfig(ipSecConfig);
addAuthAndCryptToIpSecConfig(ipSecConfig);
IpSecTransformResponse createTransformResp =
- mIpSecService.createTransform(ipSecConfig, new Binder());
+ mIpSecService.createTransform(ipSecConfig, new Binder(), "blessedPackage");
assertEquals(IpSecManager.Status.OK, createTransformResp.status);
// Attempting to create transform a second time with the same SPIs should throw an error...
try {
- mIpSecService.createTransform(ipSecConfig, new Binder());
+ mIpSecService.createTransform(ipSecConfig, new Binder(), "blessedPackage");
fail("IpSecService should have thrown an error for reuse of SPI");
} catch (IllegalStateException expected) {
}
@@ -287,30 +347,74 @@
// ... even if the transform is deleted
mIpSecService.deleteTransform(createTransformResp.resourceId);
try {
- mIpSecService.createTransform(ipSecConfig, new Binder());
+ mIpSecService.createTransform(ipSecConfig, new Binder(), "blessedPackage");
fail("IpSecService should have thrown an error for reuse of SPI");
} catch (IllegalStateException expected) {
}
}
@Test
+ public void testReleaseOwnedSpi() throws Exception {
+ IpSecConfig ipSecConfig = new IpSecConfig();
+ addDefaultSpisAndRemoteAddrToIpSecConfig(ipSecConfig);
+ addAuthAndCryptToIpSecConfig(ipSecConfig);
+
+ IpSecTransformResponse createTransformResp =
+ mIpSecService.createTransform(ipSecConfig, new Binder(), "blessedPackage");
+ IpSecService.UserRecord userRecord =
+ mIpSecService.mUserResourceTracker.getUserRecord(Os.getuid());
+ assertEquals(1, userRecord.mSpiQuotaTracker.mCurrent);
+ mIpSecService.releaseSecurityParameterIndex(ipSecConfig.getSpiResourceId());
+ verify(mMockNetd, times(0))
+ .ipSecDeleteSecurityAssociation(
+ eq(createTransformResp.resourceId),
+ anyString(),
+ anyString(),
+ eq(TEST_SPI),
+ anyInt(),
+ anyInt());
+ // quota is not released until the SPI is released by the Transform
+ assertEquals(1, userRecord.mSpiQuotaTracker.mCurrent);
+ }
+
+ @Test
public void testDeleteTransform() throws Exception {
IpSecConfig ipSecConfig = new IpSecConfig();
addDefaultSpisAndRemoteAddrToIpSecConfig(ipSecConfig);
addAuthAndCryptToIpSecConfig(ipSecConfig);
IpSecTransformResponse createTransformResp =
- mIpSecService.createTransform(ipSecConfig, new Binder());
+ mIpSecService.createTransform(ipSecConfig, new Binder(), "blessedPackage");
mIpSecService.deleteTransform(createTransformResp.resourceId);
- verify(mMockNetd)
+ verify(mMockNetd, times(1))
.ipSecDeleteSecurityAssociation(
- eq(createTransformResp.resourceId), anyString(), anyString(), eq(TEST_SPI));
+ eq(createTransformResp.resourceId),
+ anyString(),
+ anyString(),
+ eq(TEST_SPI),
+ anyInt(),
+ anyInt());
// Verify quota and RefcountedResource objects cleaned up
IpSecService.UserRecord userRecord =
mIpSecService.mUserResourceTracker.getUserRecord(Os.getuid());
assertEquals(0, userRecord.mTransformQuotaTracker.mCurrent);
+ assertEquals(1, userRecord.mSpiQuotaTracker.mCurrent);
+
+ mIpSecService.releaseSecurityParameterIndex(ipSecConfig.getSpiResourceId());
+ // Verify that ipSecDeleteSa was not called when the SPI was released because the
+ // ownedByTransform property should prevent it; (note, the called count is cumulative).
+ verify(mMockNetd, times(1))
+ .ipSecDeleteSecurityAssociation(
+ anyInt(),
+ anyString(),
+ anyString(),
+ anyInt(),
+ anyInt(),
+ anyInt());
+ assertEquals(0, userRecord.mSpiQuotaTracker.mCurrent);
+
try {
userRecord.mTransformRecords.getRefcountedResourceOrThrow(
createTransformResp.resourceId);
@@ -327,7 +431,7 @@
addAuthAndCryptToIpSecConfig(ipSecConfig);
IpSecTransformResponse createTransformResp =
- mIpSecService.createTransform(ipSecConfig, new Binder());
+ mIpSecService.createTransform(ipSecConfig, new Binder(), "blessedPackage");
IpSecService.UserRecord userRecord =
mIpSecService.mUserResourceTracker.getUserRecord(Os.getuid());
@@ -339,7 +443,12 @@
verify(mMockNetd)
.ipSecDeleteSecurityAssociation(
- eq(createTransformResp.resourceId), anyString(), anyString(), eq(TEST_SPI));
+ eq(createTransformResp.resourceId),
+ anyString(),
+ anyString(),
+ eq(TEST_SPI),
+ anyInt(),
+ anyInt());
// Verify quota and RefcountedResource objects cleaned up
assertEquals(0, userRecord.mTransformQuotaTracker.mCurrent);
@@ -359,7 +468,7 @@
addAuthAndCryptToIpSecConfig(ipSecConfig);
IpSecTransformResponse createTransformResp =
- mIpSecService.createTransform(ipSecConfig, new Binder());
+ mIpSecService.createTransform(ipSecConfig, new Binder(), "blessedPackage");
ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(new Socket());
int resourceId = createTransformResp.resourceId;
@@ -382,4 +491,116 @@
verify(mMockNetd).ipSecRemoveTransportModeTransform(pfd.getFileDescriptor());
}
+
+ private IpSecTunnelInterfaceResponse createAndValidateTunnel(
+ String localAddr, String remoteAddr, String pkgName) {
+ IpSecTunnelInterfaceResponse createTunnelResp =
+ mIpSecService.createTunnelInterface(
+ mSourceAddr, mDestinationAddr, fakeNetwork, new Binder(), pkgName);
+
+ assertNotNull(createTunnelResp);
+ assertEquals(IpSecManager.Status.OK, createTunnelResp.status);
+ return createTunnelResp;
+ }
+
+ @Test
+ public void testCreateTunnelInterface() throws Exception {
+ IpSecTunnelInterfaceResponse createTunnelResp =
+ createAndValidateTunnel(mSourceAddr, mDestinationAddr, "blessedPackage");
+
+ // Check that we have stored the tracking object, and retrieve it
+ IpSecService.UserRecord userRecord =
+ mIpSecService.mUserResourceTracker.getUserRecord(Os.getuid());
+ IpSecService.RefcountedResource refcountedRecord =
+ userRecord.mTunnelInterfaceRecords.getRefcountedResourceOrThrow(
+ createTunnelResp.resourceId);
+
+ assertEquals(1, userRecord.mTunnelQuotaTracker.mCurrent);
+ verify(mMockNetd)
+ .addVirtualTunnelInterface(
+ eq(createTunnelResp.interfaceName),
+ eq(mSourceAddr),
+ eq(mDestinationAddr),
+ anyInt(),
+ anyInt());
+ }
+
+ @Test
+ public void testDeleteTunnelInterface() throws Exception {
+ IpSecTunnelInterfaceResponse createTunnelResp =
+ createAndValidateTunnel(mSourceAddr, mDestinationAddr, "blessedPackage");
+
+ IpSecService.UserRecord userRecord =
+ mIpSecService.mUserResourceTracker.getUserRecord(Os.getuid());
+
+ mIpSecService.deleteTunnelInterface(createTunnelResp.resourceId, "blessedPackage");
+
+ // Verify quota and RefcountedResource objects cleaned up
+ assertEquals(0, userRecord.mTunnelQuotaTracker.mCurrent);
+ verify(mMockNetd).removeVirtualTunnelInterface(eq(createTunnelResp.interfaceName));
+ try {
+ userRecord.mTunnelInterfaceRecords.getRefcountedResourceOrThrow(
+ createTunnelResp.resourceId);
+ fail("Expected IllegalArgumentException on attempt to access deleted resource");
+ } catch (IllegalArgumentException expected) {
+ }
+ }
+
+ @Test
+ public void testTunnelInterfaceBinderDeath() throws Exception {
+ IpSecTunnelInterfaceResponse createTunnelResp =
+ createAndValidateTunnel(mSourceAddr, mDestinationAddr, "blessedPackage");
+
+ IpSecService.UserRecord userRecord =
+ mIpSecService.mUserResourceTracker.getUserRecord(Os.getuid());
+ IpSecService.RefcountedResource refcountedRecord =
+ userRecord.mTunnelInterfaceRecords.getRefcountedResourceOrThrow(
+ createTunnelResp.resourceId);
+
+ refcountedRecord.binderDied();
+
+ // Verify quota and RefcountedResource objects cleaned up
+ assertEquals(0, userRecord.mTunnelQuotaTracker.mCurrent);
+ verify(mMockNetd).removeVirtualTunnelInterface(eq(createTunnelResp.interfaceName));
+ try {
+ userRecord.mTunnelInterfaceRecords.getRefcountedResourceOrThrow(
+ createTunnelResp.resourceId);
+ fail("Expected IllegalArgumentException on attempt to access deleted resource");
+ } catch (IllegalArgumentException expected) {
+ }
+ }
+
+ @Test
+ public void testAddRemoveAddressFromTunnelInterface() throws Exception {
+ for (String pkgName : new String[]{"blessedPackage", "systemPackage"}) {
+ IpSecTunnelInterfaceResponse createTunnelResp =
+ createAndValidateTunnel(mSourceAddr, mDestinationAddr, pkgName);
+ mIpSecService.addAddressToTunnelInterface(
+ createTunnelResp.resourceId, mLocalInnerAddress, pkgName);
+ verify(mMockNetd, times(1))
+ .interfaceAddAddress(
+ eq(createTunnelResp.interfaceName),
+ eq(mLocalInnerAddress.getAddress().getHostAddress()),
+ eq(mLocalInnerAddress.getPrefixLength()));
+ mIpSecService.removeAddressFromTunnelInterface(
+ createTunnelResp.resourceId, mLocalInnerAddress, pkgName);
+ verify(mMockNetd, times(1))
+ .interfaceDelAddress(
+ eq(createTunnelResp.interfaceName),
+ eq(mLocalInnerAddress.getAddress().getHostAddress()),
+ eq(mLocalInnerAddress.getPrefixLength()));
+ mIpSecService.deleteTunnelInterface(createTunnelResp.resourceId, pkgName);
+ }
+ }
+
+ @Ignore
+ @Test
+ public void testAddTunnelFailsForBadPackageName() throws Exception {
+ try {
+ IpSecTunnelInterfaceResponse createTunnelResp =
+ createAndValidateTunnel(mSourceAddr, mDestinationAddr, "badPackage");
+ fail("Expected a SecurityException for badPackage.");
+ } catch (SecurityException expected) {
+ }
+ }
}
diff --git a/tests/net/java/com/android/server/IpSecServiceTest.java b/tests/net/java/com/android/server/IpSecServiceTest.java
index a375b60..2c94a60 100644
--- a/tests/net/java/com/android/server/IpSecServiceTest.java
+++ b/tests/net/java/com/android/server/IpSecServiceTest.java
@@ -635,4 +635,25 @@
verify(mMockNetd).ipSecSetEncapSocketOwner(argThat(fdMatcher), eq(Os.getuid()));
mIpSecService.closeUdpEncapsulationSocket(udpEncapResp.resourceId);
}
+
+ @Test
+ public void testReserveNetId() {
+ int start = mIpSecService.TUN_INTF_NETID_START;
+ for (int i = 0; i < mIpSecService.TUN_INTF_NETID_RANGE; i++) {
+ assertEquals(start + i, mIpSecService.reserveNetId());
+ }
+
+ // Check that resource exhaustion triggers an exception
+ try {
+ mIpSecService.reserveNetId();
+ fail("Did not throw error for all netIds reserved");
+ } catch (IllegalStateException expected) {
+ }
+
+ // Now release one and try again
+ int releasedNetId =
+ mIpSecService.TUN_INTF_NETID_START + mIpSecService.TUN_INTF_NETID_RANGE / 2;
+ mIpSecService.releaseNetId(releasedNetId);
+ assertEquals(releasedNetId, mIpSecService.reserveNetId());
+ }
}
diff --git a/tests/net/java/com/android/server/NetworkManagementServiceTest.java b/tests/net/java/com/android/server/NetworkManagementServiceTest.java
index 2ac73db..56a075b 100644
--- a/tests/net/java/com/android/server/NetworkManagementServiceTest.java
+++ b/tests/net/java/com/android/server/NetworkManagementServiceTest.java
@@ -99,8 +99,12 @@
@After
public void tearDown() throws Exception {
- if (mSocket != null) mSocket.close();
- if (mServerSocket != null) mServerSocket.close();
+ 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();
}
/**
diff --git a/tests/net/java/com/android/server/connectivity/DnsManagerTest.java b/tests/net/java/com/android/server/connectivity/DnsManagerTest.java
new file mode 100644
index 0000000..1ec4eec
--- /dev/null
+++ b/tests/net/java/com/android/server/connectivity/DnsManagerTest.java
@@ -0,0 +1,237 @@
+/*
+ * 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.
+ */
+
+package com.android.server.connectivity;
+
+import static android.net.ConnectivityManager.PRIVATE_DNS_MODE_OFF;
+import static android.net.ConnectivityManager.PRIVATE_DNS_MODE_OPPORTUNISTIC;
+import static android.net.ConnectivityManager.PRIVATE_DNS_MODE_PROVIDER_HOSTNAME;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.when;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.net.IpPrefix;
+import android.net.LinkAddress;
+import android.net.LinkProperties;
+import android.net.Network;
+import android.net.RouteInfo;
+import android.os.INetworkManagementService;
+import android.provider.Settings;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+import android.test.mock.MockContentResolver;
+
+import com.android.internal.util.test.FakeSettingsProvider;
+import com.android.server.connectivity.MockableSystemProperties;
+
+import java.net.InetAddress;
+import java.util.Arrays;
+
+import org.junit.runner.RunWith;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+/**
+ * Tests for {@link DnsManager}.
+ *
+ * Build, install and run with:
+ * runtest frameworks-net -c com.android.server.connectivity.DnsManagerTest
+ */
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class DnsManagerTest {
+ static final String TEST_IFACENAME = "test_wlan0";
+ static final int TEST_NETID = 100;
+ static final int TEST_NETID_ALTERNATE = 101;
+ static final int TEST_NETID_UNTRACKED = 102;
+ final boolean IS_DEFAULT = true;
+ final boolean NOT_DEFAULT = false;
+
+ DnsManager mDnsManager;
+ MockContentResolver mContentResolver;
+
+ @Mock Context mCtx;
+ @Mock INetworkManagementService mNMService;
+ @Mock MockableSystemProperties mSystemProperties;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ mContentResolver = new MockContentResolver();
+ mContentResolver.addProvider(Settings.AUTHORITY,
+ new FakeSettingsProvider());
+ when(mCtx.getContentResolver()).thenReturn(mContentResolver);
+ mDnsManager = new DnsManager(mCtx, mNMService, mSystemProperties);
+
+ // Clear the private DNS settings
+ Settings.Global.putString(mContentResolver,
+ Settings.Global.PRIVATE_DNS_MODE, "");
+ Settings.Global.putString(mContentResolver,
+ Settings.Global.PRIVATE_DNS_SPECIFIER, "");
+ }
+
+ @Test
+ public void testTrackedValidationUpdates() throws Exception {
+ mDnsManager.updatePrivateDns(new Network(TEST_NETID),
+ mDnsManager.getPrivateDnsConfig());
+ mDnsManager.updatePrivateDns(new Network(TEST_NETID_ALTERNATE),
+ mDnsManager.getPrivateDnsConfig());
+ LinkProperties lp = new LinkProperties();
+ lp.setInterfaceName(TEST_IFACENAME);
+ lp.addDnsServer(InetAddress.getByName("3.3.3.3"));
+ lp.addDnsServer(InetAddress.getByName("4.4.4.4"));
+
+ // Send a validation event that is tracked on the alternate netId
+ mDnsManager.setDnsConfigurationForNetwork(TEST_NETID, lp, IS_DEFAULT);
+ mDnsManager.setDnsConfigurationForNetwork(TEST_NETID_ALTERNATE, lp, NOT_DEFAULT);
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID_ALTERNATE,
+ InetAddress.parseNumericAddress("4.4.4.4"), "", true));
+ LinkProperties fixedLp = new LinkProperties(lp);
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, fixedLp);
+ assertFalse(fixedLp.isPrivateDnsActive());
+ assertNull(fixedLp.getPrivateDnsServerName());
+ fixedLp = new LinkProperties(lp);
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID_ALTERNATE, fixedLp);
+ assertTrue(fixedLp.isPrivateDnsActive());
+ assertNull(fixedLp.getPrivateDnsServerName());
+ assertEquals(Arrays.asList(InetAddress.getByName("4.4.4.4")),
+ fixedLp.getValidatedPrivateDnsServers());
+
+ // Set up addresses for strict mode and switch to it.
+ lp.addLinkAddress(new LinkAddress("192.0.2.4/24"));
+ lp.addRoute(new RouteInfo((IpPrefix) null, InetAddress.getByName("192.0.2.4"),
+ TEST_IFACENAME));
+ lp.addLinkAddress(new LinkAddress("2001:db8:1::1/64"));
+ lp.addRoute(new RouteInfo((IpPrefix) null, InetAddress.getByName("2001:db8:1::1"),
+ TEST_IFACENAME));
+
+ Settings.Global.putString(mContentResolver,
+ Settings.Global.PRIVATE_DNS_MODE, PRIVATE_DNS_MODE_PROVIDER_HOSTNAME);
+ Settings.Global.putString(mContentResolver,
+ Settings.Global.PRIVATE_DNS_SPECIFIER, "strictmode.com");
+ mDnsManager.updatePrivateDns(new Network(TEST_NETID),
+ new DnsManager.PrivateDnsConfig("strictmode.com", new InetAddress[] {
+ InetAddress.parseNumericAddress("6.6.6.6"),
+ InetAddress.parseNumericAddress("2001:db8:66:66::1")
+ }));
+ mDnsManager.setDnsConfigurationForNetwork(TEST_NETID, lp, IS_DEFAULT);
+ fixedLp = new LinkProperties(lp);
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, fixedLp);
+ assertTrue(fixedLp.isPrivateDnsActive());
+ assertEquals("strictmode.com", fixedLp.getPrivateDnsServerName());
+ // No validation events yet.
+ assertEquals(Arrays.asList(new InetAddress[0]), fixedLp.getValidatedPrivateDnsServers());
+ // Validate one.
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID,
+ InetAddress.parseNumericAddress("6.6.6.6"), "strictmode.com", true));
+ fixedLp = new LinkProperties(lp);
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, fixedLp);
+ assertEquals(Arrays.asList(InetAddress.parseNumericAddress("6.6.6.6")),
+ fixedLp.getValidatedPrivateDnsServers());
+ // Validate the 2nd one.
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID,
+ InetAddress.parseNumericAddress("2001:db8:66:66::1"), "strictmode.com", true));
+ fixedLp = new LinkProperties(lp);
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, fixedLp);
+ assertEquals(Arrays.asList(
+ InetAddress.parseNumericAddress("2001:db8:66:66::1"),
+ InetAddress.parseNumericAddress("6.6.6.6")),
+ fixedLp.getValidatedPrivateDnsServers());
+ }
+
+ @Test
+ public void testIgnoreUntrackedValidationUpdates() throws Exception {
+ // The PrivateDnsConfig map is empty, so no validation events will
+ // be tracked.
+ LinkProperties lp = new LinkProperties();
+ lp.addDnsServer(InetAddress.getByName("3.3.3.3"));
+ mDnsManager.setDnsConfigurationForNetwork(TEST_NETID, lp, IS_DEFAULT);
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID,
+ InetAddress.parseNumericAddress("3.3.3.3"), "", true));
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, lp);
+ assertFalse(lp.isPrivateDnsActive());
+ assertNull(lp.getPrivateDnsServerName());
+
+ // Validation event has untracked netId
+ mDnsManager.updatePrivateDns(new Network(TEST_NETID),
+ mDnsManager.getPrivateDnsConfig());
+ mDnsManager.setDnsConfigurationForNetwork(TEST_NETID, lp, IS_DEFAULT);
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID_UNTRACKED,
+ InetAddress.parseNumericAddress("3.3.3.3"), "", true));
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, lp);
+ assertFalse(lp.isPrivateDnsActive());
+ assertNull(lp.getPrivateDnsServerName());
+
+ // Validation event has untracked ipAddress
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID,
+ InetAddress.parseNumericAddress("4.4.4.4"), "", true));
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, lp);
+ assertFalse(lp.isPrivateDnsActive());
+ assertNull(lp.getPrivateDnsServerName());
+
+ // Validation event has untracked hostname
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID,
+ InetAddress.parseNumericAddress("3.3.3.3"), "hostname",
+ true));
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, lp);
+ assertFalse(lp.isPrivateDnsActive());
+ assertNull(lp.getPrivateDnsServerName());
+
+ // Validation event failed
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID,
+ InetAddress.parseNumericAddress("3.3.3.3"), "", false));
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, lp);
+ assertFalse(lp.isPrivateDnsActive());
+ assertNull(lp.getPrivateDnsServerName());
+
+ // Network removed
+ mDnsManager.removeNetwork(new Network(TEST_NETID));
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID,
+ InetAddress.parseNumericAddress("3.3.3.3"), "", true));
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, lp);
+ assertFalse(lp.isPrivateDnsActive());
+ assertNull(lp.getPrivateDnsServerName());
+
+ // Turn private DNS mode off
+ Settings.Global.putString(mContentResolver,
+ Settings.Global.PRIVATE_DNS_MODE, PRIVATE_DNS_MODE_OFF);
+ mDnsManager.updatePrivateDns(new Network(TEST_NETID),
+ mDnsManager.getPrivateDnsConfig());
+ mDnsManager.setDnsConfigurationForNetwork(TEST_NETID, lp, IS_DEFAULT);
+ mDnsManager.updatePrivateDnsValidation(
+ new DnsManager.PrivateDnsValidationUpdate(TEST_NETID,
+ InetAddress.parseNumericAddress("3.3.3.3"), "", true));
+ mDnsManager.updatePrivateDnsStatus(TEST_NETID, lp);
+ assertFalse(lp.isPrivateDnsActive());
+ assertNull(lp.getPrivateDnsServerName());
+ }
+}
diff --git a/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java b/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
index 9f2cb92..8359fe2 100644
--- a/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
+++ b/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
@@ -66,7 +66,6 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -175,7 +174,6 @@
}
@Test
- @Ignore
public void testDefaultNetworkEvents() throws Exception {
final long cell = BitUtils.packBits(new int[]{NetworkCapabilities.TRANSPORT_CELLULAR});
final long wifi = BitUtils.packBits(new int[]{NetworkCapabilities.TRANSPORT_WIFI});
@@ -294,7 +292,6 @@
}
@Test
- @Ignore
public void testEndToEndLogging() throws Exception {
// TODO: instead of comparing textpb to textpb, parse textpb and compare proto to proto.
IpConnectivityLog logger = new IpConnectivityLog(mService.impl);
@@ -635,6 +632,7 @@
when(nai.getCurrentScore()).thenReturn(score);
nai.linkProperties = new LinkProperties();
nai.networkCapabilities = new NetworkCapabilities();
+ nai.lastValidated = true;
for (int t : BitUtils.unpackBits(transports)) {
nai.networkCapabilities.addTransportType(t);
}
diff --git a/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java b/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java
new file mode 100644
index 0000000..4a83d1b
--- /dev/null
+++ b/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java
@@ -0,0 +1,134 @@
+/*
+ * 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
+ */
+
+package com.android.server.connectivity;
+
+import static android.Manifest.permission.CHANGE_NETWORK_STATE;
+import static android.Manifest.permission.CHANGE_WIFI_STATE;
+import static android.Manifest.permission.CONNECTIVITY_INTERNAL;
+import static android.Manifest.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS;
+import static android.Manifest.permission.NETWORK_STACK;
+import static android.content.pm.ApplicationInfo.FLAG_SYSTEM;
+import static android.content.pm.PackageManager.GET_PERMISSIONS;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class PermissionMonitorTest {
+ private static final int MOCK_UID = 10001;
+ private static final String[] MOCK_PACKAGE_NAMES = new String[] { "com.foo.bar" };
+
+ @Mock private Context mContext;
+ @Mock private PackageManager mPackageManager;
+
+ private PermissionMonitor mPermissionMonitor;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ when(mContext.getPackageManager()).thenReturn(mPackageManager);
+ when(mPackageManager.getPackagesForUid(MOCK_UID)).thenReturn(MOCK_PACKAGE_NAMES);
+ mPermissionMonitor = new PermissionMonitor(mContext, null);
+ }
+
+ private void expectPermission(String[] permissions, boolean preinstalled) throws Exception {
+ final PackageInfo packageInfo = packageInfoWithPermissions(permissions, preinstalled);
+ when(mPackageManager.getPackageInfo(MOCK_PACKAGE_NAMES[0], GET_PERMISSIONS))
+ .thenReturn(packageInfo);
+ }
+
+ private PackageInfo packageInfoWithPermissions(String[] permissions, boolean preinstalled) {
+ final PackageInfo packageInfo = new PackageInfo();
+ packageInfo.requestedPermissions = permissions;
+ packageInfo.applicationInfo = new ApplicationInfo();
+ packageInfo.applicationInfo.flags = preinstalled ? FLAG_SYSTEM : 0;
+ return packageInfo;
+ }
+
+ @Test
+ public void testHasPermission() {
+ PackageInfo app = packageInfoWithPermissions(new String[] {}, false);
+ assertFalse(mPermissionMonitor.hasPermission(app, CHANGE_NETWORK_STATE));
+ assertFalse(mPermissionMonitor.hasPermission(app, NETWORK_STACK));
+ assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS));
+ assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_INTERNAL));
+
+ app = packageInfoWithPermissions(new String[] {
+ CHANGE_NETWORK_STATE, NETWORK_STACK
+ }, false);
+ assertTrue(mPermissionMonitor.hasPermission(app, CHANGE_NETWORK_STATE));
+ assertTrue(mPermissionMonitor.hasPermission(app, NETWORK_STACK));
+ assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS));
+ assertFalse(mPermissionMonitor.hasPermission(app, CONNECTIVITY_INTERNAL));
+
+ app = packageInfoWithPermissions(new String[] {
+ CONNECTIVITY_USE_RESTRICTED_NETWORKS, CONNECTIVITY_INTERNAL
+ }, false);
+ assertFalse(mPermissionMonitor.hasPermission(app, CHANGE_NETWORK_STATE));
+ assertFalse(mPermissionMonitor.hasPermission(app, NETWORK_STACK));
+ assertTrue(mPermissionMonitor.hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS));
+ assertTrue(mPermissionMonitor.hasPermission(app, CONNECTIVITY_INTERNAL));
+ }
+
+ @Test
+ public void testIsPreinstalledSystemApp() {
+ PackageInfo app = packageInfoWithPermissions(new String[] {}, false);
+ assertFalse(mPermissionMonitor.isPreinstalledSystemApp(app));
+
+ app = packageInfoWithPermissions(new String[] {}, true);
+ assertTrue(mPermissionMonitor.isPreinstalledSystemApp(app));
+ }
+
+ @Test
+ public void testHasUseBackgroundNetworksPermission() throws Exception {
+ expectPermission(new String[] { CHANGE_NETWORK_STATE }, false);
+ assertTrue(mPermissionMonitor.hasUseBackgroundNetworksPermission(MOCK_UID));
+
+ expectPermission(new String[] { NETWORK_STACK, CONNECTIVITY_INTERNAL }, false);
+ assertTrue(mPermissionMonitor.hasUseBackgroundNetworksPermission(MOCK_UID));
+
+ // TODO : make this false when b/31479477 is fixed
+ expectPermission(new String[] {}, true);
+ assertTrue(mPermissionMonitor.hasUseBackgroundNetworksPermission(MOCK_UID));
+ expectPermission(new String[] { CHANGE_WIFI_STATE }, true);
+ assertTrue(mPermissionMonitor.hasUseBackgroundNetworksPermission(MOCK_UID));
+
+ expectPermission(new String[] { NETWORK_STACK, CONNECTIVITY_INTERNAL }, true);
+ assertTrue(mPermissionMonitor.hasUseBackgroundNetworksPermission(MOCK_UID));
+
+ expectPermission(new String[] {}, false);
+ assertFalse(mPermissionMonitor.hasUseBackgroundNetworksPermission(MOCK_UID));
+
+ expectPermission(new String[] { CHANGE_WIFI_STATE }, false);
+ assertFalse(mPermissionMonitor.hasUseBackgroundNetworksPermission(MOCK_UID));
+ }
+}
diff --git a/tests/net/java/com/android/server/connectivity/TetheringTest.java b/tests/net/java/com/android/server/connectivity/TetheringTest.java
index a115146..9994cdd 100644
--- a/tests/net/java/com/android/server/connectivity/TetheringTest.java
+++ b/tests/net/java/com/android/server/connectivity/TetheringTest.java
@@ -19,16 +19,25 @@
import static android.hardware.usb.UsbManager.USB_CONFIGURED;
import static android.hardware.usb.UsbManager.USB_CONNECTED;
import static android.hardware.usb.UsbManager.USB_FUNCTION_RNDIS;
+import static android.net.ConnectivityManager.ACTION_TETHER_STATE_CHANGED;
+import static android.net.ConnectivityManager.EXTRA_ACTIVE_LOCAL_ONLY;
+import static android.net.ConnectivityManager.EXTRA_ACTIVE_TETHER;
+import static android.net.ConnectivityManager.EXTRA_AVAILABLE_TETHER;
+import static android.net.ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
import static android.net.ConnectivityManager.TETHERING_WIFI;
import static android.net.ConnectivityManager.TETHERING_USB;
+import static android.net.ConnectivityManager.TYPE_MOBILE;
import static android.net.wifi.WifiManager.IFACE_IP_MODE_LOCAL_ONLY;
import static android.net.wifi.WifiManager.IFACE_IP_MODE_TETHERED;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_INTERFACE_NAME;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_MODE;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_STATE;
import static android.net.wifi.WifiManager.WIFI_AP_STATE_ENABLED;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.notNull;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyString;
@@ -36,45 +45,65 @@
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.mock;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
-import android.content.ContextWrapper;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.res.Resources;
import android.hardware.usb.UsbManager;
-import android.net.ConnectivityManager;
-import android.net.ConnectivityManager.NetworkCallback;
+import android.net.INetd;
import android.net.INetworkPolicyManager;
import android.net.INetworkStatsService;
import android.net.InterfaceConfiguration;
-import android.net.NetworkRequest;
+import android.net.IpPrefix;
+import android.net.LinkAddress;
+import android.net.LinkProperties;
+import android.net.MacAddress;
+import android.net.Network;
+import android.net.NetworkCapabilities;
+import android.net.NetworkInfo;
+import android.net.NetworkState;
+import android.net.NetworkUtils;
+import android.net.RouteInfo;
+import android.net.ip.RouterAdvertisementDaemon;
+import android.net.util.InterfaceParams;
+import android.net.util.NetworkConstants;
import android.net.util.SharedLog;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
+import android.os.Bundle;
import android.os.Handler;
import android.os.INetworkManagementService;
import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.test.TestLooper;
import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.Settings;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.CarrierConfigManager;
import android.test.mock.MockContentResolver;
+import com.android.internal.util.ArrayUtils;
+import com.android.internal.util.StateMachine;
import com.android.internal.util.test.BroadcastInterceptingContext;
import com.android.internal.util.test.FakeSettingsProvider;
+import com.android.server.connectivity.tethering.IControlsTethering;
+import com.android.server.connectivity.tethering.IPv6TetheringCoordinator;
import com.android.server.connectivity.tethering.OffloadHardwareInterface;
+import com.android.server.connectivity.tethering.TetherInterfaceStateMachine;
import com.android.server.connectivity.tethering.TetheringDependencies;
+import com.android.server.connectivity.tethering.UpstreamNetworkMonitor;
import org.junit.After;
import org.junit.Before;
@@ -83,33 +112,45 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import java.net.Inet4Address;
+import java.net.Inet6Address;
import java.util.ArrayList;
import java.util.Vector;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class TetheringTest {
+ private static final int IFINDEX_OFFSET = 100;
+
private static final String[] PROVISIONING_APP_NAME = {"some", "app"};
+ private static final String TEST_MOBILE_IFNAME = "test_rmnet_data0";
+ private static final String TEST_XLAT_MOBILE_IFNAME = "v4-test_rmnet_data0";
+ private static final String TEST_USB_IFNAME = "test_rndis0";
+ private static final String TEST_WLAN_IFNAME = "test_wlan0";
@Mock private ApplicationInfo mApplicationInfo;
@Mock private Context mContext;
- @Mock private ConnectivityManager mConnectivityManager;
@Mock private INetworkManagementService mNMService;
@Mock private INetworkStatsService mStatsService;
@Mock private INetworkPolicyManager mPolicyManager;
@Mock private MockableSystemProperties mSystemProperties;
@Mock private OffloadHardwareInterface mOffloadHardwareInterface;
@Mock private Resources mResources;
- @Mock private TetheringDependencies mTetheringDependencies;
@Mock private UsbManager mUsbManager;
@Mock private WifiManager mWifiManager;
@Mock private CarrierConfigManager mCarrierConfigManager;
+ @Mock private UpstreamNetworkMonitor mUpstreamNetworkMonitor;
+ @Mock private IPv6TetheringCoordinator mIPv6TetheringCoordinator;
+ @Mock private RouterAdvertisementDaemon mRouterAdvertisementDaemon;
+ @Mock private INetd mNetd;
+
+ private final MockTetheringDependencies mTetheringDependencies =
+ new MockTetheringDependencies();
// Like so many Android system APIs, these cannot be mocked because it is marked final.
// We have to use the real versions.
private final PersistableBundle mCarrierConfig = new PersistableBundle();
private final TestLooper mLooper = new TestLooper();
- private final String mTestIfname = "test_wlan0";
private Vector<Intent> mIntents;
private BroadcastInterceptingContext mServiceContext;
@@ -136,30 +177,141 @@
@Override
public Object getSystemService(String name) {
- if (Context.CONNECTIVITY_SERVICE.equals(name)) return mConnectivityManager;
if (Context.WIFI_SERVICE.equals(name)) return mWifiManager;
if (Context.USB_SERVICE.equals(name)) return mUsbManager;
return super.getSystemService(name);
}
}
+ public class MockTetheringDependencies extends TetheringDependencies {
+ StateMachine upstreamNetworkMonitorMasterSM;
+ ArrayList<TetherInterfaceStateMachine> ipv6CoordinatorNotifyList;
+ int isTetheringSupportedCalls;
+
+ public void reset() {
+ upstreamNetworkMonitorMasterSM = null;
+ ipv6CoordinatorNotifyList = null;
+ isTetheringSupportedCalls = 0;
+ }
+
+ @Override
+ public OffloadHardwareInterface getOffloadHardwareInterface(Handler h, SharedLog log) {
+ return mOffloadHardwareInterface;
+ }
+
+ @Override
+ public UpstreamNetworkMonitor getUpstreamNetworkMonitor(Context ctx,
+ StateMachine target, SharedLog log, int what) {
+ upstreamNetworkMonitorMasterSM = target;
+ return mUpstreamNetworkMonitor;
+ }
+
+ @Override
+ public IPv6TetheringCoordinator getIPv6TetheringCoordinator(
+ ArrayList<TetherInterfaceStateMachine> notifyList, SharedLog log) {
+ ipv6CoordinatorNotifyList = notifyList;
+ return mIPv6TetheringCoordinator;
+ }
+
+ @Override
+ public RouterAdvertisementDaemon getRouterAdvertisementDaemon(InterfaceParams ifParams) {
+ return mRouterAdvertisementDaemon;
+ }
+
+ @Override
+ public INetd getNetdService() {
+ return mNetd;
+ }
+
+ @Override
+ public InterfaceParams getInterfaceParams(String ifName) {
+ final String[] ifaces = new String[] { TEST_USB_IFNAME, TEST_WLAN_IFNAME,
+ TEST_MOBILE_IFNAME };
+ final int index = ArrayUtils.indexOf(ifaces, ifName);
+ assertTrue("Non-mocked interface: " + ifName, index >= 0);
+ return new InterfaceParams(ifName, index + IFINDEX_OFFSET,
+ MacAddress.ALL_ZEROS_ADDRESS);
+ }
+
+ @Override
+ public boolean isTetheringSupported() {
+ isTetheringSupportedCalls++;
+ return true;
+ }
+ }
+
+ private static NetworkState buildMobileUpstreamState(boolean withIPv4, boolean withIPv6,
+ boolean with464xlat) {
+ final NetworkInfo info = new NetworkInfo(TYPE_MOBILE, 0, null, null);
+ info.setDetailedState(NetworkInfo.DetailedState.CONNECTED, null, null);
+ final LinkProperties prop = new LinkProperties();
+ prop.setInterfaceName(TEST_MOBILE_IFNAME);
+
+ if (withIPv4) {
+ prop.addRoute(new RouteInfo(new IpPrefix(Inet4Address.ANY, 0),
+ NetworkUtils.numericToInetAddress("10.0.0.1"), TEST_MOBILE_IFNAME));
+ }
+
+ if (withIPv6) {
+ prop.addDnsServer(NetworkUtils.numericToInetAddress("2001:db8::2"));
+ prop.addLinkAddress(
+ new LinkAddress(NetworkUtils.numericToInetAddress("2001:db8::"),
+ NetworkConstants.RFC7421_PREFIX_LENGTH));
+ prop.addRoute(new RouteInfo(new IpPrefix(Inet6Address.ANY, 0),
+ NetworkUtils.numericToInetAddress("2001:db8::1"), TEST_MOBILE_IFNAME));
+ }
+
+ if (with464xlat) {
+ final LinkProperties stackedLink = new LinkProperties();
+ stackedLink.setInterfaceName(TEST_XLAT_MOBILE_IFNAME);
+ stackedLink.addRoute(new RouteInfo(new IpPrefix(Inet4Address.ANY, 0),
+ NetworkUtils.numericToInetAddress("192.0.0.1"), TEST_XLAT_MOBILE_IFNAME));
+
+ prop.addStackedLink(stackedLink);
+ }
+
+
+ final NetworkCapabilities capabilities = new NetworkCapabilities()
+ .addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR);;
+ return new NetworkState(info, prop, capabilities, new Network(100), null, "netid");
+ }
+
+ private static NetworkState buildMobileIPv4UpstreamState() {
+ return buildMobileUpstreamState(true, false, false);
+ }
+
+ private static NetworkState buildMobileIPv6UpstreamState() {
+ return buildMobileUpstreamState(false, true, false);
+ }
+
+ private static NetworkState buildMobileDualStackUpstreamState() {
+ return buildMobileUpstreamState(true, true, false);
+ }
+
+ private static NetworkState buildMobile464xlatUpstreamState() {
+ return buildMobileUpstreamState(false, true, true);
+ }
+
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
when(mResources.getStringArray(com.android.internal.R.array.config_tether_dhcp_range))
.thenReturn(new String[0]);
when(mResources.getStringArray(com.android.internal.R.array.config_tether_usb_regexs))
- .thenReturn(new String[0]);
+ .thenReturn(new String[] { "test_rndis\\d" });
when(mResources.getStringArray(com.android.internal.R.array.config_tether_wifi_regexs))
- .thenReturn(new String[]{ "test_wlan\\d", "test_rndis\\d" });
+ .thenReturn(new String[]{ "test_wlan\\d" });
when(mResources.getStringArray(com.android.internal.R.array.config_tether_bluetooth_regexs))
.thenReturn(new String[0]);
when(mResources.getIntArray(com.android.internal.R.array.config_tether_upstream_types))
.thenReturn(new int[0]);
when(mNMService.listInterfaces())
- .thenReturn(new String[]{ "test_rmnet_data0", mTestIfname });
+ .thenReturn(new String[] {
+ TEST_MOBILE_IFNAME, TEST_WLAN_IFNAME, TEST_USB_IFNAME});
when(mNMService.getInterfaceConfig(anyString()))
.thenReturn(new InterfaceConfiguration());
+ when(mRouterAdvertisementDaemon.start())
+ .thenReturn(true);
mServiceContext = new MockContext(mContext);
mContentResolver = new MockContentResolver(mServiceContext);
@@ -172,9 +324,8 @@
}
};
mServiceContext.registerReceiver(mBroadcastReceiver,
- new IntentFilter(ConnectivityManager.ACTION_TETHER_STATE_CHANGED));
- when(mTetheringDependencies.getOffloadHardwareInterface(
- any(Handler.class), any(SharedLog.class))).thenReturn(mOffloadHardwareInterface);
+ new IntentFilter(ACTION_TETHER_STATE_CHANGED));
+ mTetheringDependencies.reset();
mTethering = new Tethering(mServiceContext, mNMService, mStatsService, mPolicyManager,
mLooper.getLooper(), mSystemProperties,
mTetheringDependencies);
@@ -204,6 +355,7 @@
@Test
public void canRequireProvisioning() {
setupForRequiredProvisioning();
+ sendConfigurationChanged();
assertTrue(mTethering.isTetherProvisioningRequired());
}
@@ -212,6 +364,7 @@
setupForRequiredProvisioning();
when(mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE))
.thenReturn(null);
+ sendConfigurationChanged();
// Couldn't get the CarrierConfigManager, but still had a declared provisioning app.
// We therefore still require provisioning.
assertTrue(mTethering.isTetherProvisioningRequired());
@@ -221,6 +374,7 @@
public void toleratesCarrierConfigMissing() {
setupForRequiredProvisioning();
when(mCarrierConfigManager.getConfig()).thenReturn(null);
+ sendConfigurationChanged();
// We still have a provisioning app configured, so still require provisioning.
assertTrue(mTethering.isTetherProvisioningRequired());
}
@@ -260,17 +414,22 @@
mServiceContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
+ private void sendConfigurationChanged() {
+ final Intent intent = new Intent(Intent.ACTION_CONFIGURATION_CHANGED);
+ mServiceContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
+ }
+
private void verifyInterfaceServingModeStarted() throws Exception {
- verify(mNMService, times(1)).getInterfaceConfig(mTestIfname);
+ verify(mNMService, times(1)).getInterfaceConfig(TEST_WLAN_IFNAME);
verify(mNMService, times(1))
- .setInterfaceConfig(eq(mTestIfname), any(InterfaceConfiguration.class));
- verify(mNMService, times(1)).tetherInterface(mTestIfname);
+ .setInterfaceConfig(eq(TEST_WLAN_IFNAME), any(InterfaceConfiguration.class));
+ verify(mNMService, times(1)).tetherInterface(TEST_WLAN_IFNAME);
}
private void verifyTetheringBroadcast(String ifname, String whichExtra) {
// Verify that ifname is in the whichExtra array of the tether state changed broadcast.
final Intent bcast = mIntents.get(0);
- assertEquals(ConnectivityManager.ACTION_TETHER_STATE_CHANGED, bcast.getAction());
+ assertEquals(ACTION_TETHER_STATE_CHANGED, bcast.getAction());
final ArrayList<String> ifnames = bcast.getStringArrayListExtra(whichExtra);
assertTrue(ifnames.contains(ifname));
mIntents.remove(bcast);
@@ -278,13 +437,11 @@
public void failingLocalOnlyHotspotLegacyApBroadcast(
boolean emulateInterfaceStatusChanged) throws Exception {
- when(mConnectivityManager.isTetheringSupported()).thenReturn(true);
-
// Emulate externally-visible WifiManager effects, causing the
// per-interface state machine to start up, and telling us that
// hotspot mode is to be started.
if (emulateInterfaceStatusChanged) {
- mTethering.interfaceStatusChanged(mTestIfname, true);
+ mTethering.interfaceStatusChanged(TEST_WLAN_IFNAME, true);
}
sendWifiApStateChanged(WIFI_AP_STATE_ENABLED);
mLooper.dispatchAll();
@@ -293,30 +450,31 @@
// then it creates a TetherInterfaceStateMachine and sends out a
// broadcast indicating that the interface is "available".
if (emulateInterfaceStatusChanged) {
- verify(mConnectivityManager, atLeastOnce()).isTetheringSupported();
- verifyTetheringBroadcast(mTestIfname, ConnectivityManager.EXTRA_AVAILABLE_TETHER);
+ assertEquals(1, mTetheringDependencies.isTetheringSupportedCalls);
+ verifyTetheringBroadcast(TEST_WLAN_IFNAME, EXTRA_AVAILABLE_TETHER);
}
- verifyNoMoreInteractions(mConnectivityManager);
verifyNoMoreInteractions(mNMService);
verifyNoMoreInteractions(mWifiManager);
}
- @Test
- public void testUsbConfiguredBroadcastStartsTethering() throws Exception {
- when(mConnectivityManager.isTetheringSupported()).thenReturn(true);
+ private void prepareUsbTethering(NetworkState upstreamState) {
+ when(mUpstreamNetworkMonitor.selectPreferredUpstreamType(any()))
+ .thenReturn(upstreamState);
// Emulate pressing the USB tethering button in Settings UI.
mTethering.startTethering(TETHERING_USB, null, false);
mLooper.dispatchAll();
verify(mUsbManager, times(1)).setCurrentFunction(UsbManager.USB_FUNCTION_RNDIS, false);
- // Pretend we receive a USB connected broadcast. Here we also pretend
- // that the RNDIS function is somehow enabled, so that we see if we
- // might trip ourselves up.
- sendUsbBroadcast(true, false, true);
- mLooper.dispatchAll();
+ mTethering.interfaceStatusChanged(TEST_USB_IFNAME, true);
+ }
+
+ @Test
+ public void testUsbConfiguredBroadcastStartsTethering() throws Exception {
+ NetworkState upstreamState = buildMobileIPv4UpstreamState();
+ prepareUsbTethering(upstreamState);
+
// This should produce no activity of any kind.
- verifyNoMoreInteractions(mConnectivityManager);
verifyNoMoreInteractions(mNMService);
// Pretend we then receive USB configured broadcast.
@@ -325,6 +483,10 @@
// Now we should see the start of tethering mechanics (in this case:
// tetherMatchingInterfaces() which starts by fetching all interfaces).
verify(mNMService, times(1)).listInterfaces();
+
+ // UpstreamNetworkMonitor should receive selected upstream
+ verify(mUpstreamNetworkMonitor, times(1)).selectPreferredUpstreamType(any());
+ verify(mUpstreamNetworkMonitor, times(1)).setCurrentUpstream(upstreamState.network);
}
@Test
@@ -339,55 +501,158 @@
public void workingLocalOnlyHotspotEnrichedApBroadcast(
boolean emulateInterfaceStatusChanged) throws Exception {
- when(mConnectivityManager.isTetheringSupported()).thenReturn(true);
-
// Emulate externally-visible WifiManager effects, causing the
// per-interface state machine to start up, and telling us that
// hotspot mode is to be started.
if (emulateInterfaceStatusChanged) {
- mTethering.interfaceStatusChanged(mTestIfname, true);
+ mTethering.interfaceStatusChanged(TEST_WLAN_IFNAME, true);
}
- sendWifiApStateChanged(WIFI_AP_STATE_ENABLED, mTestIfname, IFACE_IP_MODE_LOCAL_ONLY);
+ sendWifiApStateChanged(WIFI_AP_STATE_ENABLED, TEST_WLAN_IFNAME, IFACE_IP_MODE_LOCAL_ONLY);
mLooper.dispatchAll();
verifyInterfaceServingModeStarted();
- verifyTetheringBroadcast(mTestIfname, ConnectivityManager.EXTRA_AVAILABLE_TETHER);
+ verifyTetheringBroadcast(TEST_WLAN_IFNAME, EXTRA_AVAILABLE_TETHER);
verify(mNMService, times(1)).setIpForwardingEnabled(true);
verify(mNMService, times(1)).startTethering(any(String[].class));
verifyNoMoreInteractions(mNMService);
verify(mWifiManager).updateInterfaceIpState(
- mTestIfname, WifiManager.IFACE_IP_MODE_LOCAL_ONLY);
+ TEST_WLAN_IFNAME, WifiManager.IFACE_IP_MODE_LOCAL_ONLY);
verifyNoMoreInteractions(mWifiManager);
- verifyTetheringBroadcast(mTestIfname, ConnectivityManager.EXTRA_ACTIVE_LOCAL_ONLY);
- // UpstreamNetworkMonitor will be started, and will register two callbacks:
- // a "listen all" and a "track default".
- verify(mConnectivityManager, times(1)).registerNetworkCallback(
- any(NetworkRequest.class), any(NetworkCallback.class), any(Handler.class));
- verify(mConnectivityManager, times(1)).registerDefaultNetworkCallback(
- any(NetworkCallback.class), any(Handler.class));
+ verifyTetheringBroadcast(TEST_WLAN_IFNAME, EXTRA_ACTIVE_LOCAL_ONLY);
+ verify(mUpstreamNetworkMonitor, times(1)).start();
// TODO: Figure out why this isn't exactly once, for sendTetherStateChangedBroadcast().
- verify(mConnectivityManager, atLeastOnce()).isTetheringSupported();
- verifyNoMoreInteractions(mConnectivityManager);
+ assertTrue(1 <= mTetheringDependencies.isTetheringSupportedCalls);
// Emulate externally-visible WifiManager effects, when hotspot mode
// is being torn down.
sendWifiApStateChanged(WifiManager.WIFI_AP_STATE_DISABLED);
- mTethering.interfaceRemoved(mTestIfname);
+ mTethering.interfaceRemoved(TEST_WLAN_IFNAME);
mLooper.dispatchAll();
- verify(mNMService, times(1)).untetherInterface(mTestIfname);
+ verify(mNMService, times(1)).untetherInterface(TEST_WLAN_IFNAME);
// TODO: Why is {g,s}etInterfaceConfig() called more than once?
- verify(mNMService, atLeastOnce()).getInterfaceConfig(mTestIfname);
+ verify(mNMService, atLeastOnce()).getInterfaceConfig(TEST_WLAN_IFNAME);
verify(mNMService, atLeastOnce())
- .setInterfaceConfig(eq(mTestIfname), any(InterfaceConfiguration.class));
+ .setInterfaceConfig(eq(TEST_WLAN_IFNAME), any(InterfaceConfiguration.class));
verify(mNMService, times(1)).stopTethering();
verify(mNMService, times(1)).setIpForwardingEnabled(false);
verifyNoMoreInteractions(mNMService);
verifyNoMoreInteractions(mWifiManager);
// Asking for the last error after the per-interface state machine
// has been reaped yields an unknown interface error.
- assertEquals(ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE,
- mTethering.getLastTetherError(mTestIfname));
+ assertEquals(TETHER_ERROR_UNKNOWN_IFACE, mTethering.getLastTetherError(TEST_WLAN_IFNAME));
+ }
+
+ /**
+ * Send CMD_IPV6_TETHER_UPDATE to TISMs as would be done by IPv6TetheringCoordinator.
+ */
+ private void sendIPv6TetherUpdates(NetworkState upstreamState) {
+ // IPv6TetheringCoordinator must have been notified of downstream
+ verify(mIPv6TetheringCoordinator, times(1)).addActiveDownstream(
+ argThat(sm -> sm.linkProperties().getInterfaceName().equals(TEST_USB_IFNAME)),
+ eq(IControlsTethering.STATE_TETHERED));
+
+ for (TetherInterfaceStateMachine tism :
+ mTetheringDependencies.ipv6CoordinatorNotifyList) {
+ NetworkState ipv6OnlyState = buildMobileUpstreamState(false, true, false);
+ tism.sendMessage(TetherInterfaceStateMachine.CMD_IPV6_TETHER_UPDATE, 0, 0,
+ upstreamState.linkProperties.isIPv6Provisioned()
+ ? ipv6OnlyState.linkProperties
+ : null);
+ }
+ mLooper.dispatchAll();
+ }
+
+ private void runUsbTethering(NetworkState upstreamState) {
+ prepareUsbTethering(upstreamState);
+ sendUsbBroadcast(true, true, true);
+ mLooper.dispatchAll();
+ }
+
+ @Test
+ public void workingMobileUsbTethering_IPv4() throws Exception {
+ NetworkState upstreamState = buildMobileIPv4UpstreamState();
+ runUsbTethering(upstreamState);
+
+ verify(mNMService, times(1)).enableNat(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+ verify(mNMService, times(1)).startInterfaceForwarding(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+
+ sendIPv6TetherUpdates(upstreamState);
+ verify(mRouterAdvertisementDaemon, never()).buildNewRa(any(), notNull());
+ }
+
+ @Test
+ public void workingMobileUsbTethering_IPv6() throws Exception {
+ NetworkState upstreamState = buildMobileIPv6UpstreamState();
+ runUsbTethering(upstreamState);
+
+ verify(mNMService, times(1)).enableNat(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+ verify(mNMService, times(1)).startInterfaceForwarding(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+
+ sendIPv6TetherUpdates(upstreamState);
+ verify(mRouterAdvertisementDaemon, times(1)).buildNewRa(any(), notNull());
+ verify(mNetd, times(1)).tetherApplyDnsInterfaces();
+ }
+
+ @Test
+ public void workingMobileUsbTethering_DualStack() throws Exception {
+ NetworkState upstreamState = buildMobileDualStackUpstreamState();
+ runUsbTethering(upstreamState);
+
+ verify(mNMService, times(1)).enableNat(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+ verify(mNMService, times(1)).startInterfaceForwarding(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+ verify(mRouterAdvertisementDaemon, times(1)).start();
+
+ sendIPv6TetherUpdates(upstreamState);
+ verify(mRouterAdvertisementDaemon, times(1)).buildNewRa(any(), notNull());
+ verify(mNetd, times(1)).tetherApplyDnsInterfaces();
+ }
+
+ @Test
+ public void workingMobileUsbTethering_MultipleUpstreams() throws Exception {
+ NetworkState upstreamState = buildMobile464xlatUpstreamState();
+ runUsbTethering(upstreamState);
+
+ verify(mNMService, times(1)).enableNat(TEST_USB_IFNAME, TEST_XLAT_MOBILE_IFNAME);
+ verify(mNMService, times(1)).enableNat(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+ verify(mNMService, times(1)).startInterfaceForwarding(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+ verify(mNMService, times(1)).startInterfaceForwarding(TEST_USB_IFNAME,
+ TEST_XLAT_MOBILE_IFNAME);
+
+ sendIPv6TetherUpdates(upstreamState);
+ verify(mRouterAdvertisementDaemon, times(1)).buildNewRa(any(), notNull());
+ verify(mNetd, times(1)).tetherApplyDnsInterfaces();
+ }
+
+ @Test
+ public void workingMobileUsbTethering_v6Then464xlat() throws Exception {
+ // Setup IPv6
+ NetworkState upstreamState = buildMobileIPv6UpstreamState();
+ runUsbTethering(upstreamState);
+
+ verify(mNMService, times(1)).enableNat(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+ verify(mNMService, times(1)).startInterfaceForwarding(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+
+ // Then 464xlat comes up
+ upstreamState = buildMobile464xlatUpstreamState();
+ when(mUpstreamNetworkMonitor.selectPreferredUpstreamType(any()))
+ .thenReturn(upstreamState);
+
+ // Upstream LinkProperties changed: UpstreamNetworkMonitor sends EVENT_ON_LINKPROPERTIES.
+ mTetheringDependencies.upstreamNetworkMonitorMasterSM.sendMessage(
+ Tethering.TetherMasterSM.EVENT_UPSTREAM_CALLBACK,
+ UpstreamNetworkMonitor.EVENT_ON_LINKPROPERTIES,
+ 0,
+ upstreamState);
+ mLooper.dispatchAll();
+
+ // Forwarding is added for 464xlat
+ verify(mNMService, times(1)).enableNat(TEST_USB_IFNAME, TEST_XLAT_MOBILE_IFNAME);
+ verify(mNMService, times(1)).startInterfaceForwarding(TEST_USB_IFNAME,
+ TEST_XLAT_MOBILE_IFNAME);
+ // Forwarding was not re-added for v6 (still times(1))
+ verify(mNMService, times(1)).enableNat(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
+ verify(mNMService, times(1)).startInterfaceForwarding(TEST_USB_IFNAME, TEST_MOBILE_IFNAME);
}
@Test
@@ -403,7 +668,6 @@
// TODO: Test with and without interfaceStatusChanged().
@Test
public void failingWifiTetheringLegacyApBroadcast() throws Exception {
- when(mConnectivityManager.isTetheringSupported()).thenReturn(true);
when(mWifiManager.startSoftAp(any(WifiConfiguration.class))).thenReturn(true);
// Emulate pressing the WiFi tethering button.
@@ -411,19 +675,17 @@
mLooper.dispatchAll();
verify(mWifiManager, times(1)).startSoftAp(null);
verifyNoMoreInteractions(mWifiManager);
- verifyNoMoreInteractions(mConnectivityManager);
verifyNoMoreInteractions(mNMService);
// Emulate externally-visible WifiManager effects, causing the
// per-interface state machine to start up, and telling us that
// tethering mode is to be started.
- mTethering.interfaceStatusChanged(mTestIfname, true);
+ mTethering.interfaceStatusChanged(TEST_WLAN_IFNAME, true);
sendWifiApStateChanged(WIFI_AP_STATE_ENABLED);
mLooper.dispatchAll();
- verify(mConnectivityManager, atLeastOnce()).isTetheringSupported();
- verifyTetheringBroadcast(mTestIfname, ConnectivityManager.EXTRA_AVAILABLE_TETHER);
- verifyNoMoreInteractions(mConnectivityManager);
+ assertEquals(1, mTetheringDependencies.isTetheringSupportedCalls);
+ verifyTetheringBroadcast(TEST_WLAN_IFNAME, EXTRA_AVAILABLE_TETHER);
verifyNoMoreInteractions(mNMService);
verifyNoMoreInteractions(mWifiManager);
}
@@ -431,7 +693,6 @@
// TODO: Test with and without interfaceStatusChanged().
@Test
public void workingWifiTetheringEnrichedApBroadcast() throws Exception {
- when(mConnectivityManager.isTetheringSupported()).thenReturn(true);
when(mWifiManager.startSoftAp(any(WifiConfiguration.class))).thenReturn(true);
// Emulate pressing the WiFi tethering button.
@@ -439,39 +700,30 @@
mLooper.dispatchAll();
verify(mWifiManager, times(1)).startSoftAp(null);
verifyNoMoreInteractions(mWifiManager);
- verifyNoMoreInteractions(mConnectivityManager);
verifyNoMoreInteractions(mNMService);
// Emulate externally-visible WifiManager effects, causing the
// per-interface state machine to start up, and telling us that
// tethering mode is to be started.
- mTethering.interfaceStatusChanged(mTestIfname, true);
- sendWifiApStateChanged(WIFI_AP_STATE_ENABLED, mTestIfname, IFACE_IP_MODE_TETHERED);
+ mTethering.interfaceStatusChanged(TEST_WLAN_IFNAME, true);
+ sendWifiApStateChanged(WIFI_AP_STATE_ENABLED, TEST_WLAN_IFNAME, IFACE_IP_MODE_TETHERED);
mLooper.dispatchAll();
verifyInterfaceServingModeStarted();
- verifyTetheringBroadcast(mTestIfname, ConnectivityManager.EXTRA_AVAILABLE_TETHER);
+ verifyTetheringBroadcast(TEST_WLAN_IFNAME, EXTRA_AVAILABLE_TETHER);
verify(mNMService, times(1)).setIpForwardingEnabled(true);
verify(mNMService, times(1)).startTethering(any(String[].class));
verifyNoMoreInteractions(mNMService);
verify(mWifiManager).updateInterfaceIpState(
- mTestIfname, WifiManager.IFACE_IP_MODE_TETHERED);
+ TEST_WLAN_IFNAME, WifiManager.IFACE_IP_MODE_TETHERED);
verifyNoMoreInteractions(mWifiManager);
- verifyTetheringBroadcast(mTestIfname, ConnectivityManager.EXTRA_ACTIVE_TETHER);
- // UpstreamNetworkMonitor will be started, and will register two callbacks:
- // a "listen all" and a "track default".
- verify(mConnectivityManager, times(1)).registerNetworkCallback(
- any(NetworkRequest.class), any(NetworkCallback.class), any(Handler.class));
- verify(mConnectivityManager, times(1)).registerDefaultNetworkCallback(
- any(NetworkCallback.class), any(Handler.class));
+ verifyTetheringBroadcast(TEST_WLAN_IFNAME, EXTRA_ACTIVE_TETHER);
+ verify(mUpstreamNetworkMonitor, times(1)).start();
// In tethering mode, in the default configuration, an explicit request
// for a mobile network is also made.
- verify(mConnectivityManager, times(1)).requestNetwork(
- any(NetworkRequest.class), any(NetworkCallback.class), eq(0), anyInt(),
- any(Handler.class));
+ verify(mUpstreamNetworkMonitor, times(1)).registerMobileNetworkRequest();
// TODO: Figure out why this isn't exactly once, for sendTetherStateChangedBroadcast().
- verify(mConnectivityManager, atLeastOnce()).isTetheringSupported();
- verifyNoMoreInteractions(mConnectivityManager);
+ assertTrue(1 <= mTetheringDependencies.isTetheringSupportedCalls);
/////
// We do not currently emulate any upstream being found.
@@ -485,34 +737,31 @@
mLooper.dispatchAll();
verify(mWifiManager, times(1)).stopSoftAp();
verifyNoMoreInteractions(mWifiManager);
- verifyNoMoreInteractions(mConnectivityManager);
verifyNoMoreInteractions(mNMService);
// Emulate externally-visible WifiManager effects, when tethering mode
// is being torn down.
sendWifiApStateChanged(WifiManager.WIFI_AP_STATE_DISABLED);
- mTethering.interfaceRemoved(mTestIfname);
+ mTethering.interfaceRemoved(TEST_WLAN_IFNAME);
mLooper.dispatchAll();
- verify(mNMService, times(1)).untetherInterface(mTestIfname);
+ verify(mNMService, times(1)).untetherInterface(TEST_WLAN_IFNAME);
// TODO: Why is {g,s}etInterfaceConfig() called more than once?
- verify(mNMService, atLeastOnce()).getInterfaceConfig(mTestIfname);
+ verify(mNMService, atLeastOnce()).getInterfaceConfig(TEST_WLAN_IFNAME);
verify(mNMService, atLeastOnce())
- .setInterfaceConfig(eq(mTestIfname), any(InterfaceConfiguration.class));
+ .setInterfaceConfig(eq(TEST_WLAN_IFNAME), any(InterfaceConfiguration.class));
verify(mNMService, times(1)).stopTethering();
verify(mNMService, times(1)).setIpForwardingEnabled(false);
verifyNoMoreInteractions(mNMService);
verifyNoMoreInteractions(mWifiManager);
// Asking for the last error after the per-interface state machine
// has been reaped yields an unknown interface error.
- assertEquals(ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE,
- mTethering.getLastTetherError(mTestIfname));
+ assertEquals(TETHER_ERROR_UNKNOWN_IFACE, mTethering.getLastTetherError(TEST_WLAN_IFNAME));
}
// TODO: Test with and without interfaceStatusChanged().
@Test
public void failureEnablingIpForwarding() throws Exception {
- when(mConnectivityManager.isTetheringSupported()).thenReturn(true);
when(mWifiManager.startSoftAp(any(WifiConfiguration.class))).thenReturn(true);
doThrow(new RemoteException()).when(mNMService).setIpForwardingEnabled(true);
@@ -521,27 +770,28 @@
mLooper.dispatchAll();
verify(mWifiManager, times(1)).startSoftAp(null);
verifyNoMoreInteractions(mWifiManager);
- verifyNoMoreInteractions(mConnectivityManager);
verifyNoMoreInteractions(mNMService);
// Emulate externally-visible WifiManager effects, causing the
// per-interface state machine to start up, and telling us that
// tethering mode is to be started.
- mTethering.interfaceStatusChanged(mTestIfname, true);
- sendWifiApStateChanged(WIFI_AP_STATE_ENABLED, mTestIfname, IFACE_IP_MODE_TETHERED);
+ mTethering.interfaceStatusChanged(TEST_WLAN_IFNAME, true);
+ sendWifiApStateChanged(WIFI_AP_STATE_ENABLED, TEST_WLAN_IFNAME, IFACE_IP_MODE_TETHERED);
mLooper.dispatchAll();
- // We verify get/set called twice here: once for setup and once during
+ // We verify get/set called thrice here: once for setup and twice during
// teardown because all events happen over the course of the single
- // dispatchAll() above.
- verify(mNMService, times(2)).getInterfaceConfig(mTestIfname);
- verify(mNMService, times(2))
- .setInterfaceConfig(eq(mTestIfname), any(InterfaceConfiguration.class));
- verify(mNMService, times(1)).tetherInterface(mTestIfname);
+ // dispatchAll() above. Note that once the TISM IPv4 address config
+ // code is refactored the two calls during shutdown will revert to one.
+ verify(mNMService, times(2)).getInterfaceConfig(TEST_WLAN_IFNAME);
+ verify(mNMService, times(3))
+ .setInterfaceConfig(eq(TEST_WLAN_IFNAME), any(InterfaceConfiguration.class));
+ verify(mNMService, times(1)).tetherInterface(TEST_WLAN_IFNAME);
verify(mWifiManager).updateInterfaceIpState(
- mTestIfname, WifiManager.IFACE_IP_MODE_TETHERED);
- verify(mConnectivityManager, atLeastOnce()).isTetheringSupported();
- verifyTetheringBroadcast(mTestIfname, ConnectivityManager.EXTRA_AVAILABLE_TETHER);
+ TEST_WLAN_IFNAME, WifiManager.IFACE_IP_MODE_TETHERED);
+ // TODO: Figure out why this isn't exactly once, for sendTetherStateChangedBroadcast().
+ assertTrue(1 <= mTetheringDependencies.isTetheringSupportedCalls);
+ verifyTetheringBroadcast(TEST_WLAN_IFNAME, EXTRA_AVAILABLE_TETHER);
// This is called, but will throw.
verify(mNMService, times(1)).setIpForwardingEnabled(true);
// This never gets called because of the exception thrown above.
@@ -549,15 +799,98 @@
// When the master state machine transitions to an error state it tells
// downstream interfaces, which causes us to tell Wi-Fi about the error
// so it can take down AP mode.
- verify(mNMService, times(1)).untetherInterface(mTestIfname);
+ verify(mNMService, times(1)).untetherInterface(TEST_WLAN_IFNAME);
verify(mWifiManager).updateInterfaceIpState(
- mTestIfname, WifiManager.IFACE_IP_MODE_CONFIGURATION_ERROR);
+ TEST_WLAN_IFNAME, WifiManager.IFACE_IP_MODE_CONFIGURATION_ERROR);
verifyNoMoreInteractions(mWifiManager);
- verifyNoMoreInteractions(mConnectivityManager);
verifyNoMoreInteractions(mNMService);
}
+ private void userRestrictionsListenerBehaviour(
+ boolean currentDisallow, boolean nextDisallow, String[] activeTetheringIfacesList,
+ int expectedInteractionsWithShowNotification) throws Exception {
+ final int userId = 0;
+ final Bundle currRestrictions = new Bundle();
+ final Bundle newRestrictions = new Bundle();
+ Tethering tethering = mock(Tethering.class);
+ Tethering.TetheringUserRestrictionListener turl =
+ new Tethering.TetheringUserRestrictionListener(tethering);
+
+ currRestrictions.putBoolean(UserManager.DISALLOW_CONFIG_TETHERING, currentDisallow);
+ newRestrictions.putBoolean(UserManager.DISALLOW_CONFIG_TETHERING, nextDisallow);
+ when(tethering.getTetheredIfaces()).thenReturn(activeTetheringIfacesList);
+
+ turl.onUserRestrictionsChanged(userId, newRestrictions, currRestrictions);
+
+ verify(tethering, times(expectedInteractionsWithShowNotification))
+ .showTetheredNotification(anyInt(), eq(false));
+
+ verify(tethering, times(expectedInteractionsWithShowNotification)).untetherAll();
+ }
+
+ @Test
+ public void testDisallowTetheringWhenNoTetheringInterfaceIsActive() throws Exception {
+ final String[] emptyActiveIfacesList = new String[]{};
+ final boolean currDisallow = false;
+ final boolean nextDisallow = true;
+ final int expectedInteractionsWithShowNotification = 0;
+
+ userRestrictionsListenerBehaviour(currDisallow, nextDisallow, emptyActiveIfacesList,
+ expectedInteractionsWithShowNotification);
+ }
+
+ @Test
+ public void testDisallowTetheringWhenAtLeastOneTetheringInterfaceIsActive() throws Exception {
+ final String[] nonEmptyActiveIfacesList = new String[]{TEST_WLAN_IFNAME};
+ final boolean currDisallow = false;
+ final boolean nextDisallow = true;
+ final int expectedInteractionsWithShowNotification = 1;
+
+ userRestrictionsListenerBehaviour(currDisallow, nextDisallow, nonEmptyActiveIfacesList,
+ expectedInteractionsWithShowNotification);
+ }
+
+ @Test
+ public void testAllowTetheringWhenNoTetheringInterfaceIsActive() throws Exception {
+ final String[] nonEmptyActiveIfacesList = new String[]{};
+ final boolean currDisallow = true;
+ final boolean nextDisallow = false;
+ final int expectedInteractionsWithShowNotification = 0;
+
+ userRestrictionsListenerBehaviour(currDisallow, nextDisallow, nonEmptyActiveIfacesList,
+ expectedInteractionsWithShowNotification);
+ }
+
+ @Test
+ public void testAllowTetheringWhenAtLeastOneTetheringInterfaceIsActive() throws Exception {
+ final String[] nonEmptyActiveIfacesList = new String[]{TEST_WLAN_IFNAME};
+ final boolean currDisallow = true;
+ final boolean nextDisallow = false;
+ final int expectedInteractionsWithShowNotification = 0;
+
+ userRestrictionsListenerBehaviour(currDisallow, nextDisallow, nonEmptyActiveIfacesList,
+ expectedInteractionsWithShowNotification);
+ }
+
+ @Test
+ public void testDisallowTetheringUnchanged() throws Exception {
+ final String[] nonEmptyActiveIfacesList = new String[]{TEST_WLAN_IFNAME};
+ final int expectedInteractionsWithShowNotification = 0;
+ boolean currDisallow = true;
+ boolean nextDisallow = true;
+
+ userRestrictionsListenerBehaviour(currDisallow, nextDisallow, nonEmptyActiveIfacesList,
+ expectedInteractionsWithShowNotification);
+
+ currDisallow = false;
+ nextDisallow = false;
+
+ userRestrictionsListenerBehaviour(currDisallow, nextDisallow, nonEmptyActiveIfacesList,
+ expectedInteractionsWithShowNotification);
+ }
+
+
// TODO: Test that a request for hotspot mode doesn't interfere with an
// already operating tethering mode interface.
}
diff --git a/tests/net/java/com/android/server/connectivity/VpnTest.java b/tests/net/java/com/android/server/connectivity/VpnTest.java
index 1dbf9b2..e377a47 100644
--- a/tests/net/java/com/android/server/connectivity/VpnTest.java
+++ b/tests/net/java/com/android/server/connectivity/VpnTest.java
@@ -57,15 +57,20 @@
import android.content.pm.UserInfo;
import android.content.res.Resources;
import android.net.ConnectivityManager;
+import android.net.IConnectivityManager;
+import android.net.IpPrefix;
+import android.net.LinkProperties;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo.DetailedState;
+import android.net.RouteInfo;
import android.net.UidRange;
import android.net.VpnService;
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.os.INetworkManagementService;
import android.os.Looper;
+import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
import android.support.test.filters.SmallTest;
@@ -84,13 +89,16 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import java.net.Inet4Address;
+import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
-
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
/**
* Tests for {@link Vpn}.
@@ -563,4 +571,103 @@
return networks.get(network);
}).when(mConnectivityManager).getNetworkCapabilities(any());
}
+
+ // Need multiple copies of this, but Java's Stream objects can't be reused or
+ // duplicated.
+ private Stream<String> publicIpV4Routes() {
+ return Stream.of(
+ "0.0.0.0/5", "8.0.0.0/7", "11.0.0.0/8", "12.0.0.0/6", "16.0.0.0/4",
+ "32.0.0.0/3", "64.0.0.0/2", "128.0.0.0/3", "160.0.0.0/5", "168.0.0.0/6",
+ "172.0.0.0/12", "172.32.0.0/11", "172.64.0.0/10", "172.128.0.0/9",
+ "173.0.0.0/8", "174.0.0.0/7", "176.0.0.0/4", "192.0.0.0/9", "192.128.0.0/11",
+ "192.160.0.0/13", "192.169.0.0/16", "192.170.0.0/15", "192.172.0.0/14",
+ "192.176.0.0/12", "192.192.0.0/10", "193.0.0.0/8", "194.0.0.0/7",
+ "196.0.0.0/6", "200.0.0.0/5", "208.0.0.0/4");
+ }
+
+ private Stream<String> publicIpV6Routes() {
+ return Stream.of(
+ "::/1", "8000::/2", "c000::/3", "e000::/4", "f000::/5", "f800::/6",
+ "fe00::/8", "2605:ef80:e:af1d::/64");
+ }
+
+ @Test
+ public void testProvidesRoutesToMostDestinations() {
+ final LinkProperties lp = new LinkProperties();
+
+ // Default route provides routes to all IPv4 destinations.
+ lp.addRoute(new RouteInfo(new IpPrefix("0.0.0.0/0")));
+ assertTrue(Vpn.providesRoutesToMostDestinations(lp));
+
+ // Empty LP provides routes to no destination
+ lp.clear();
+ assertFalse(Vpn.providesRoutesToMostDestinations(lp));
+
+ // All IPv4 routes except for local networks. This is the case most relevant
+ // to this function. It provides routes to almost the entire space.
+ // (clone the stream so that we can reuse it later)
+ publicIpV4Routes().forEach(s -> lp.addRoute(new RouteInfo(new IpPrefix(s))));
+ assertTrue(Vpn.providesRoutesToMostDestinations(lp));
+
+ // Removing a 16-bit prefix, which is 65536 addresses. This is still enough to
+ // provide routes to "most" destinations.
+ lp.removeRoute(new RouteInfo(new IpPrefix("192.169.0.0/16")));
+ assertTrue(Vpn.providesRoutesToMostDestinations(lp));
+
+ // Remove the /2 route, which represent a quarter of the available routing space.
+ // This LP does not provides routes to "most" destinations any more.
+ lp.removeRoute(new RouteInfo(new IpPrefix("64.0.0.0/2")));
+ assertFalse(Vpn.providesRoutesToMostDestinations(lp));
+
+ lp.clear();
+ publicIpV6Routes().forEach(s -> lp.addRoute(new RouteInfo(new IpPrefix(s))));
+ assertTrue(Vpn.providesRoutesToMostDestinations(lp));
+
+ lp.removeRoute(new RouteInfo(new IpPrefix("::/1")));
+ assertFalse(Vpn.providesRoutesToMostDestinations(lp));
+
+ // V6 does not provide sufficient coverage but v4 does
+ publicIpV4Routes().forEach(s -> lp.addRoute(new RouteInfo(new IpPrefix(s))));
+ assertTrue(Vpn.providesRoutesToMostDestinations(lp));
+
+ // V4 still does
+ lp.removeRoute(new RouteInfo(new IpPrefix("192.169.0.0/16")));
+ assertTrue(Vpn.providesRoutesToMostDestinations(lp));
+
+ // V4 does not any more
+ lp.removeRoute(new RouteInfo(new IpPrefix("64.0.0.0/2")));
+ assertFalse(Vpn.providesRoutesToMostDestinations(lp));
+
+ // V4 does not, but V6 has sufficient coverage again
+ lp.addRoute(new RouteInfo(new IpPrefix("::/1")));
+ assertTrue(Vpn.providesRoutesToMostDestinations(lp));
+ }
+
+ @Test
+ public void testDoesNotLockUpWithTooManyRoutes() {
+ final LinkProperties lp = new LinkProperties();
+ final byte[] ad = new byte[4];
+ // Actually evaluating this many routes under 1500ms is impossible on
+ // current hardware and for some time, as the algorithm is O(n²).
+ // Make sure the system has a safeguard against this and does not
+ // lock up.
+ final int MAX_ROUTES = 4000;
+ final long MAX_ALLOWED_TIME_MS = 1500;
+ for (int i = 0; i < MAX_ROUTES; ++i) {
+ ad[0] = (byte)((i >> 24) & 0xFF);
+ ad[1] = (byte)((i >> 16) & 0xFF);
+ ad[2] = (byte)((i >> 8) & 0xFF);
+ ad[3] = (byte)(i & 0xFF);
+ try {
+ lp.addRoute(new RouteInfo(new IpPrefix(Inet4Address.getByAddress(ad), 32)));
+ } catch (UnknownHostException e) {
+ // UnknownHostException is only thrown for an address of illegal length,
+ // which can't happen in the case above.
+ }
+ }
+ final long start = SystemClock.currentThreadTimeMillis();
+ assertTrue(Vpn.providesRoutesToMostDestinations(lp));
+ final long end = SystemClock.currentThreadTimeMillis();
+ assertTrue(end - start < MAX_ALLOWED_TIME_MS);
+ }
}
diff --git a/tests/net/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java b/tests/net/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
index db5373a..19d3a2e 100644
--- a/tests/net/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
+++ b/tests/net/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
@@ -31,7 +31,6 @@
import static android.net.ConnectivityManager.TETHER_ERROR_ENABLE_NAT_ERROR;
import static android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR;
import static android.net.ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR;
-import static android.net.ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR;
import static android.net.ConnectivityManager.TETHERING_BLUETOOTH;
import static android.net.ConnectivityManager.TETHERING_USB;
import static android.net.ConnectivityManager.TETHERING_WIFI;
@@ -39,12 +38,12 @@
import static com.android.server.connectivity.tethering.IControlsTethering.STATE_TETHERED;
import static com.android.server.connectivity.tethering.IControlsTethering.STATE_UNAVAILABLE;
-import android.net.ConnectivityManager;
import android.net.INetworkStatsService;
import android.net.InterfaceConfiguration;
import android.net.LinkAddress;
import android.net.LinkProperties;
import android.net.RouteInfo;
+import android.net.util.InterfaceSet;
import android.net.util.SharedLog;
import android.os.INetworkManagementService;
import android.os.RemoteException;
@@ -75,6 +74,7 @@
@Mock private IControlsTethering mTetherHelper;
@Mock private InterfaceConfiguration mInterfaceConfiguration;
@Mock private SharedLog mSharedLog;
+ @Mock private TetheringDependencies mTetheringDependencies;
private final TestLooper mLooper = new TestLooper();
private final ArgumentCaptor<LinkProperties> mLinkPropertiesCaptor =
@@ -84,7 +84,7 @@
private void initStateMachine(int interfaceType) throws Exception {
mTestedSm = new TetherInterfaceStateMachine(
IFACE_NAME, mLooper.getLooper(), interfaceType, mSharedLog,
- mNMService, mStatsService, mTetherHelper);
+ mNMService, mStatsService, mTetherHelper, mTetheringDependencies);
mTestedSm.start();
// Starting the state machine always puts us in a consistent state and notifies
// the rest of the world that we've changed from an unknown to available state.
@@ -111,7 +111,8 @@
@Test
public void startsOutAvailable() {
mTestedSm = new TetherInterfaceStateMachine(IFACE_NAME, mLooper.getLooper(),
- TETHERING_BLUETOOTH, mSharedLog, mNMService, mStatsService, mTetherHelper);
+ TETHERING_BLUETOOTH, mSharedLog, mNMService, mStatsService, mTetherHelper,
+ mTetheringDependencies);
mTestedSm.start();
mLooper.dispatchAll();
verify(mTetherHelper).updateInterfaceState(
@@ -172,6 +173,7 @@
dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED);
InOrder inOrder = inOrder(mNMService, mStatsService, mTetherHelper);
inOrder.verify(mNMService).untetherInterface(IFACE_NAME);
+ inOrder.verify(mNMService).setInterfaceConfig(eq(IFACE_NAME), any());
inOrder.verify(mTetherHelper).updateInterfaceState(
mTestedSm, STATE_AVAILABLE, TETHER_ERROR_NO_ERROR);
inOrder.verify(mTetherHelper).updateLinkProperties(
@@ -269,6 +271,7 @@
inOrder.verify(mNMService).stopInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE);
inOrder.verify(mNMService).disableNat(IFACE_NAME, UPSTREAM_IFACE);
inOrder.verify(mNMService).untetherInterface(IFACE_NAME);
+ inOrder.verify(mNMService).setInterfaceConfig(eq(IFACE_NAME), any());
inOrder.verify(mTetherHelper).updateInterfaceState(
mTestedSm, STATE_AVAILABLE, TETHER_ERROR_NO_ERROR);
inOrder.verify(mTetherHelper).updateLinkProperties(
@@ -346,7 +349,7 @@
* Send a command to the state machine under test, and run the event loop to idle.
*
* @param command One of the TetherInterfaceStateMachine.CMD_* constants.
- * @param obj An additional argument to pass.
+ * @param arg1 An additional argument to pass.
*/
private void dispatchCommand(int command, int arg1) {
mTestedSm.sendMessage(command, arg1);
@@ -371,7 +374,7 @@
*/
private void dispatchTetherConnectionChanged(String upstreamIface) {
mTestedSm.sendMessage(TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED,
- upstreamIface);
+ new InterfaceSet(upstreamIface));
mLooper.dispatchAll();
}
diff --git a/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java b/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java
index c3b9def..9661dc2 100644
--- a/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java
+++ b/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java
@@ -147,6 +147,16 @@
}
@Test
+ public void testCallbacksRegistered() {
+ mUNM.start();
+ verify(mCM, times(1)).registerNetworkCallback(any(), any(), any());
+ verify(mCM, times(1)).registerDefaultNetworkCallback(any(), any());
+
+ mUNM.stop();
+ verify(mCM, times(2)).unregisterNetworkCallback(any(NetworkCallback.class));
+ }
+
+ @Test
public void testRequestsMobileNetwork() throws Exception {
assertFalse(mUNM.mobileNetworkRequested());
assertEquals(0, mCM.requested.size());
diff --git a/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java b/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java
index da0a48a..6f14332 100644
--- a/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java
+++ b/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java
@@ -26,6 +26,9 @@
import static android.os.Process.myUid;
import static android.text.format.DateUtils.HOUR_IN_MILLIS;
import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
import static com.android.server.net.NetworkStatsCollection.multiplySafe;
@@ -37,11 +40,12 @@
import android.net.NetworkTemplate;
import android.os.Process;
import android.os.UserHandle;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
import android.telephony.SubscriptionPlan;
import android.telephony.TelephonyManager;
-import android.test.AndroidTestCase;
import android.test.MoreAsserts;
-import android.test.suitebuilder.annotation.SmallTest;
import android.text.format.DateUtils;
import android.util.RecurrenceRule;
@@ -64,11 +68,17 @@
import java.util.ArrayList;
import java.util.List;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
/**
* Tests for {@link NetworkStatsCollection}.
*/
+@RunWith(AndroidJUnit4.class)
@SmallTest
-public class NetworkStatsCollectionTest extends AndroidTestCase {
+public class NetworkStatsCollectionTest {
private static final String TEST_FILE = "test.bin";
private static final String TEST_IMSI = "310260000000000";
@@ -79,18 +89,15 @@
private static Clock sOriginalClock;
- @Override
+ @Before
public void setUp() throws Exception {
- super.setUp();
sOriginalClock = RecurrenceRule.sClock;
-
// ignore any device overlay while testing
NetworkTemplate.forceAllNetworkTypes();
}
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
+ @After
+ public void tearDown() throws Exception {
RecurrenceRule.sClock = sOriginalClock;
}
@@ -98,8 +105,10 @@
RecurrenceRule.sClock = Clock.fixed(instant, ZoneId.systemDefault());
}
+ @Test
public void testReadLegacyNetwork() throws Exception {
- final File testFile = new File(getContext().getFilesDir(), TEST_FILE);
+ final File testFile =
+ new File(InstrumentationRegistry.getContext().getFilesDir(), TEST_FILE);
stageFile(R.raw.netstats_v1, testFile);
final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS);
@@ -124,8 +133,10 @@
636016770L, 709306L, 88038768L, 518836L, NetworkStatsAccess.Level.DEVICE);
}
+ @Test
public void testReadLegacyUid() throws Exception {
- final File testFile = new File(getContext().getFilesDir(), TEST_FILE);
+ final File testFile =
+ new File(InstrumentationRegistry.getContext().getFilesDir(), TEST_FILE);
stageFile(R.raw.netstats_uid_v4, testFile);
final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS);
@@ -150,8 +161,10 @@
637076152L, 711413L, 88343717L, 521022L, NetworkStatsAccess.Level.DEVICE);
}
+ @Test
public void testReadLegacyUidTags() throws Exception {
- final File testFile = new File(getContext().getFilesDir(), TEST_FILE);
+ final File testFile =
+ new File(InstrumentationRegistry.getContext().getFilesDir(), TEST_FILE);
stageFile(R.raw.netstats_uid_v4, testFile);
final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS);
@@ -176,6 +189,7 @@
77017831L, 100995L, 35436758L, 92344L);
}
+ @Test
public void testStartEndAtomicBuckets() throws Exception {
final NetworkStatsCollection collection = new NetworkStatsCollection(HOUR_IN_MILLIS);
@@ -190,6 +204,7 @@
assertEquals(2 * HOUR_IN_MILLIS, collection.getEndMillis());
}
+ @Test
public void testAccessLevels() throws Exception {
final NetworkStatsCollection collection = new NetworkStatsCollection(HOUR_IN_MILLIS);
final NetworkStats.Entry entry = new NetworkStats.Entry();
@@ -250,8 +265,10 @@
0, NetworkStatsAccess.Level.DEVICE);
}
+ @Test
public void testAugmentPlan() throws Exception {
- final File testFile = new File(getContext().getFilesDir(), TEST_FILE);
+ final File testFile =
+ new File(InstrumentationRegistry.getContext().getFilesDir(), TEST_FILE);
stageFile(R.raw.netstats_v1, testFile);
final NetworkStatsCollection emptyCollection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS);
@@ -439,6 +456,7 @@
}
}
+ @Test
public void testAugmentPlanGigantic() throws Exception {
// We're in the future, but not that far off
setClock(Instant.parse("2012-06-01T00:00:00.00Z"));
@@ -461,6 +479,7 @@
assertEquals(4_939_212_386L, getHistory(large, plan, TIME_A, TIME_C).getTotalBytes());
}
+ @Test
public void testRounding() throws Exception {
final NetworkStatsCollection coll = new NetworkStatsCollection(HOUR_IN_MILLIS);
@@ -482,6 +501,7 @@
assertEquals(TIME_A - HOUR_IN_MILLIS, coll.roundDown(TIME_A - 1));
}
+ @Test
public void testMultiplySafe() {
assertEquals(25, multiplySafe(50, 1, 2));
assertEquals(100, multiplySafe(50, 2, 1));
@@ -510,7 +530,7 @@
InputStream in = null;
OutputStream out = null;
try {
- in = getContext().getResources().openRawResource(rawId);
+ in = InstrumentationRegistry.getContext().getResources().openRawResource(rawId);
out = new FileOutputStream(file);
Streams.copy(in, out);
} finally {
diff --git a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java
index 47c3455..6836626 100644
--- a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java
+++ b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java
@@ -25,6 +25,7 @@
import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
import static android.net.NetworkStats.IFACE_ALL;
+import static android.net.NetworkStats.INTERFACES_ALL;
import static android.net.NetworkStats.METERED_ALL;
import static android.net.NetworkStats.METERED_NO;
import static android.net.NetworkStats.METERED_YES;
@@ -58,6 +59,9 @@
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -89,12 +93,13 @@
import android.os.PowerManager;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
+import android.support.test.filters.SmallTest;
import android.telephony.TelephonyManager;
-import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;
import android.util.TrustedTime;
import com.android.internal.net.VpnInfo;
+import com.android.internal.util.ArrayUtils;
import com.android.internal.util.test.BroadcastInterceptingContext;
import com.android.server.net.NetworkStatsService.NetworkStatsSettings;
import com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config;
@@ -211,7 +216,6 @@
ArgumentCaptor.forClass(INetworkManagementEventObserver.class);
verify(mNetManager).registerObserver(networkObserver.capture());
mNetworkObserver = networkObserver.getValue();
-
}
@After
@@ -668,6 +672,94 @@
}
@Test
+ public void testDetailedUidStats() throws Exception {
+ // pretend that network comes online
+ expectDefaultSettings();
+ expectNetworkState(buildWifiState());
+ expectNetworkStatsSummary(buildEmptyStats());
+ expectNetworkStatsUidDetail(buildEmptyStats());
+ expectBandwidthControlCheck();
+
+ mService.forceUpdateIfaces(NETWORKS_WIFI);
+
+ NetworkStats.Entry entry1 = new NetworkStats.Entry(
+ TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 50L, 5L, 50L, 5L, 0L);
+ NetworkStats.Entry entry2 = new NetworkStats.Entry(
+ TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 50L, 5L, 50L, 5L, 0L);
+ NetworkStats.Entry entry3 = new NetworkStats.Entry(
+ TEST_IFACE, UID_BLUE, SET_DEFAULT, 0xBEEF, 1024L, 8L, 512L, 4L, 0L);
+
+ incrementCurrentTime(HOUR_IN_MILLIS);
+ expectDefaultSettings();
+ expectNetworkStatsSummary(buildEmptyStats());
+ expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 3)
+ .addValues(entry1)
+ .addValues(entry2)
+ .addValues(entry3));
+ mService.incrementOperationCount(UID_RED, 0xF00D, 1);
+
+ NetworkStats stats = mService.getDetailedUidStats(INTERFACES_ALL);
+
+ assertEquals(3, stats.size());
+ entry1.operations = 1;
+ assertEquals(entry1, stats.getValues(0, null));
+ entry2.operations = 1;
+ assertEquals(entry2, stats.getValues(1, null));
+ assertEquals(entry3, stats.getValues(2, null));
+ }
+
+ @Test
+ public void testDetailedUidStats_Filtered() throws Exception {
+ // pretend that network comes online
+ expectDefaultSettings();
+
+ final String stackedIface = "stacked-test0";
+ final LinkProperties stackedProp = new LinkProperties();
+ stackedProp.setInterfaceName(stackedIface);
+ final NetworkState wifiState = buildWifiState();
+ wifiState.linkProperties.addStackedLink(stackedProp);
+ expectNetworkState(wifiState);
+
+ expectNetworkStatsSummary(buildEmptyStats());
+ expectNetworkStatsUidDetail(buildEmptyStats());
+ expectBandwidthControlCheck();
+
+ mService.forceUpdateIfaces(NETWORKS_WIFI);
+
+ NetworkStats.Entry uidStats = new NetworkStats.Entry(
+ TEST_IFACE, UID_BLUE, SET_DEFAULT, 0xF00D, 1024L, 8L, 512L, 4L, 0L);
+ // Stacked on matching interface
+ NetworkStats.Entry tetheredStats1 = new NetworkStats.Entry(
+ stackedIface, UID_BLUE, SET_DEFAULT, 0xF00D, 1024L, 8L, 512L, 4L, 0L);
+ // Different interface
+ NetworkStats.Entry tetheredStats2 = new NetworkStats.Entry(
+ "otherif", UID_BLUE, SET_DEFAULT, 0xF00D, 1024L, 8L, 512L, 4L, 0L);
+
+ final String[] ifaceFilter = new String[] { TEST_IFACE };
+ incrementCurrentTime(HOUR_IN_MILLIS);
+ expectDefaultSettings();
+ expectNetworkStatsSummary(buildEmptyStats());
+ when(mNetManager.getNetworkStatsUidDetail(eq(UID_ALL), any()))
+ .thenReturn(new NetworkStats(getElapsedRealtime(), 1)
+ .addValues(uidStats));
+ when(mNetManager.getNetworkStatsTethering(STATS_PER_UID))
+ .thenReturn(new NetworkStats(getElapsedRealtime(), 2)
+ .addValues(tetheredStats1)
+ .addValues(tetheredStats2));
+
+ NetworkStats stats = mService.getDetailedUidStats(ifaceFilter);
+
+ verify(mNetManager, times(1)).getNetworkStatsUidDetail(eq(UID_ALL), argThat(ifaces ->
+ ifaces != null && ifaces.length == 2
+ && ArrayUtils.contains(ifaces, TEST_IFACE)
+ && ArrayUtils.contains(ifaces, stackedIface)));
+
+ assertEquals(2, stats.size());
+ assertEquals(uidStats, stats.getValues(0, null));
+ assertEquals(tetheredStats1, stats.getValues(1, null));
+ }
+
+ @Test
public void testForegroundBackground() throws Exception {
// pretend that network comes online
expectCurrentTime();
@@ -870,7 +962,6 @@
// verify service has empty history for wifi
assertNetworkTotal(sTemplateWifi, 0L, 0L, 0L, 0L, 0);
- String callingPackage = "the.calling.package";
long thresholdInBytes = 1L; // very small; should be overriden by framework
DataUsageRequest inputRequest = new DataUsageRequest(
DataUsageRequest.REQUEST_ID_UNSET, sTemplateWifi, thresholdInBytes);
@@ -890,7 +981,7 @@
// Register and verify request and that binder was called
DataUsageRequest request =
- mService.registerUsageCallback(callingPackage, inputRequest,
+ mService.registerUsageCallback(mServiceContext.getOpPackageName(), inputRequest,
messenger, mBinder);
assertTrue(request.requestId > 0);
assertTrue(Objects.equals(sTemplateWifi, request.template));
@@ -1056,7 +1147,7 @@
private void expectNetworkStatsUidDetail(NetworkStats detail, NetworkStats tetherStats)
throws Exception {
- when(mNetManager.getNetworkStatsUidDetail(UID_ALL)).thenReturn(detail);
+ when(mNetManager.getNetworkStatsUidDetail(UID_ALL, INTERFACES_ALL)).thenReturn(detail);
// also include tethering details, since they are folded into UID
when(mNetManager.getNetworkStatsTethering(STATS_PER_UID)).thenReturn(tetherStats);
diff --git a/tests/net/jni/apf_jni.cpp b/tests/net/jni/apf_jni.cpp
index d415d22..1ea9e27 100644
--- a/tests/net/jni/apf_jni.cpp
+++ b/tests/net/jni/apf_jni.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2016, The Android Open Source Project
+ * Copyright 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.
@@ -28,13 +28,31 @@
// JNI function acting as simply call-through to native APF interpreter.
static jint com_android_server_ApfTest_apfSimulate(
- JNIEnv* env, jclass, jbyteArray program, jbyteArray packet, jint filter_age) {
- return accept_packet(
- (uint8_t*)env->GetByteArrayElements(program, NULL),
- env->GetArrayLength(program),
- (uint8_t*)env->GetByteArrayElements(packet, NULL),
- env->GetArrayLength(packet),
- filter_age);
+ JNIEnv* env, jclass, jbyteArray program, jbyteArray packet,
+ jbyteArray data, jint filter_age) {
+ uint8_t* program_raw = (uint8_t*)env->GetByteArrayElements(program, nullptr);
+ uint8_t* packet_raw = (uint8_t*)env->GetByteArrayElements(packet, nullptr);
+ uint8_t* data_raw = (uint8_t*)(data ? env->GetByteArrayElements(data, nullptr) : nullptr);
+ uint32_t program_len = env->GetArrayLength(program);
+ uint32_t packet_len = env->GetArrayLength(packet);
+ uint32_t data_len = data ? env->GetArrayLength(data) : 0;
+
+ // Merge program and data into a single buffer.
+ uint8_t* program_and_data = (uint8_t*)malloc(program_len + data_len);
+ memcpy(program_and_data, program_raw, program_len);
+ memcpy(program_and_data + program_len, data_raw, data_len);
+
+ jint result =
+ accept_packet(program_and_data, program_len, program_len + data_len,
+ packet_raw, packet_len, filter_age);
+ if (data) {
+ memcpy(data_raw, program_and_data + program_len, data_len);
+ env->ReleaseByteArrayElements(data, (jbyte*)data_raw, 0 /* copy back */);
+ }
+ free(program_and_data);
+ env->ReleaseByteArrayElements(packet, (jbyte*)packet_raw, JNI_ABORT);
+ env->ReleaseByteArrayElements(program, (jbyte*)program_raw, JNI_ABORT);
+ return result;
}
class ScopedPcap {
@@ -100,8 +118,8 @@
jstring jpcap_filename, jbyteArray japf_program) {
ScopedUtfChars filter(env, jfilter);
ScopedUtfChars pcap_filename(env, jpcap_filename);
- const uint8_t* apf_program = (uint8_t*)env->GetByteArrayElements(japf_program, NULL);
- const uint32_t apf_program_len = env->GetArrayLength(japf_program);
+ uint8_t* apf_program = (uint8_t*)env->GetByteArrayElements(japf_program, NULL);
+ uint32_t apf_program_len = env->GetArrayLength(japf_program);
// Open pcap file for BPF filtering
ScopedFILE bpf_fp(fopen(pcap_filename.c_str(), "rb"));
@@ -143,7 +161,8 @@
do {
apf_packet = pcap_next(apf_pcap.get(), &apf_header);
} while (apf_packet != NULL && !accept_packet(
- apf_program, apf_program_len, apf_packet, apf_header.len, 0));
+ apf_program, apf_program_len, 0 /* data_len */,
+ apf_packet, apf_header.len, 0 /* filter_age */));
// Make sure both filters matched the same packet.
if (apf_packet == NULL && bpf_packet == NULL)
@@ -167,7 +186,7 @@
}
static JNINativeMethod gMethods[] = {
- { "apfSimulate", "([B[BI)I",
+ { "apfSimulate", "([B[B[BI)I",
(void*)com_android_server_ApfTest_apfSimulate },
{ "compileToBpf", "(Ljava/lang/String;)Ljava/lang/String;",
(void*)com_android_server_ApfTest_compileToBpf },
diff --git a/tests/net/res/raw/net_dev_typical b/tests/net/res/raw/net_dev_typical
new file mode 100644
index 0000000..290bf03
--- /dev/null
+++ b/tests/net/res/raw/net_dev_typical
@@ -0,0 +1,8 @@
+Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ lo: 8308 116 0 0 0 0 0 0 8308 116 0 0 0 0 0 0
+rmnet0: 1507570 2205 0 0 0 0 0 0 489339 2237 0 0 0 0 0 0
+ ifb0: 52454 151 0 151 0 0 0 0 0 0 0 0 0 0 0 0
+ ifb1: 52454 151 0 151 0 0 0 0 0 0 0 0 0 0 0 0
+ sit0: 0 0 0 0 0 0 0 0 0 0 148 0 0 0 0 0
+ip6tnl0: 0 0 0 0 0 0 0 0 0 0 151 151 0 0 0 0
diff --git a/tests/permission/Android.mk b/tests/permission/Android.mk
index 54688c8..fb84bcf 100644
--- a/tests/permission/Android.mk
+++ b/tests/permission/Android.mk
@@ -10,6 +10,7 @@
LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
LOCAL_PACKAGE_NAME := FrameworkPermissionTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
diff --git a/tests/testables/tests/Android.mk b/tests/testables/tests/Android.mk
index 16fe535..4ec1b0f 100644
--- a/tests/testables/tests/Android.mk
+++ b/tests/testables/tests/Android.mk
@@ -19,6 +19,7 @@
LOCAL_MODULE_TAGS := tests
LOCAL_PACKAGE_NAME := TestablesTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
$(call all-Iaidl-files-under, src)
diff --git a/tests/touchlag/Android.bp b/tests/touchlag/Android.bp
new file mode 100644
index 0000000..2610cb3
--- /dev/null
+++ b/tests/touchlag/Android.bp
@@ -0,0 +1,17 @@
+cc_test {
+ name: "test-touchlag",
+ gtest: false,
+
+ srcs: ["touchlag.cpp"],
+
+ shared_libs: [
+ "libcutils",
+ "libutils",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+}
diff --git a/tests/touchlag/Android.mk b/tests/touchlag/Android.mk
deleted file mode 100644
index 70b1989..0000000
--- a/tests/touchlag/Android.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- touchlag.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils libutils \
-
-LOCAL_MODULE:= test-touchlag
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-LOCAL_MODULE_TAGS := tests
-
-include $(BUILD_EXECUTABLE)
diff --git a/tests/utils/DummyIME/Android.mk b/tests/utils/DummyIME/Android.mk
index c8d9f87..0f6c988b5 100644
--- a/tests/utils/DummyIME/Android.mk
+++ b/tests/utils/DummyIME/Android.mk
@@ -22,5 +22,6 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := DummyIME
+LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
diff --git a/tests/utils/testutils/java/com/android/internal/util/test/BroadcastInterceptingContext.java b/tests/utils/testutils/java/com/android/internal/util/test/BroadcastInterceptingContext.java
index 2166240..25bd7c0 100644
--- a/tests/utils/testutils/java/com/android/internal/util/test/BroadcastInterceptingContext.java
+++ b/tests/utils/testutils/java/com/android/internal/util/test/BroadcastInterceptingContext.java
@@ -175,6 +175,12 @@
}
@Override
+ public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+ String[] receiverPermissions) {
+ sendBroadcast(intent);
+ }
+
+ @Override
public void sendBroadcastAsUser(Intent intent, UserHandle user) {
sendBroadcast(intent);
}
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 52b93a9..06eb84d 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -18,13 +18,10 @@
#include <utils/TypeHelpers.h>
#include <stdarg.h>
-// SSIZE: mingw does not have signed size_t == ssize_t.
// STATUST: mingw does seem to redefine UNKNOWN_ERROR from our enum value, so a cast is necessary.
#if !defined(_WIN32)
-# define SSIZE(x) x
# define STATUST(x) x
#else
-# define SSIZE(x) (signed size_t)x
# define STATUST(x) (status_t)x
#endif
@@ -3040,7 +3037,7 @@
sp<AaptFile> strFile = p->getTypeStringsData();
ssize_t amt = data->writeData(strFile->getData(), strFile->getSize());
if (kPrintStringMetrics) {
- fprintf(stderr, "**** type strings: %zd\n", SSIZE(amt));
+ fprintf(stderr, "**** type strings: %zd\n", amt);
}
strAmt += amt;
if (amt < 0) {
@@ -3050,7 +3047,7 @@
strFile = p->getKeyStringsData();
amt = data->writeData(strFile->getData(), strFile->getSize());
if (kPrintStringMetrics) {
- fprintf(stderr, "**** key strings: %zd\n", SSIZE(amt));
+ fprintf(stderr, "**** key strings: %zd\n", amt);
}
strAmt += amt;
if (amt < 0) {
@@ -3322,8 +3319,8 @@
ssize_t amt = (dest->getSize()-strStart);
strAmt += amt;
if (kPrintStringMetrics) {
- fprintf(stderr, "**** value strings: %zd\n", SSIZE(amt));
- fprintf(stderr, "**** total strings: %zd\n", SSIZE(strAmt));
+ fprintf(stderr, "**** value strings: %zd\n", amt);
+ fprintf(stderr, "**** total strings: %zd\n", amt);
}
for (pi=0; pi<flatPackages.size(); pi++) {
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 866291a..37b61bf 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -12,13 +12,6 @@
#include "ResourceTable.h"
-// SSIZE: mingw does not have signed size_t == ssize_t.
-#if !defined(_WIN32)
-# define SSIZE(x) x
-#else
-# define SSIZE(x) (signed size_t)x
-#endif
-
// Set to true for noisy debug output.
static const bool kIsDebug = false;
@@ -202,7 +195,7 @@
if (kIsDebug) {
printf("Adding string %s to pool: pos=%zd eidx=%zd vidx=%zd\n",
- String8(value).string(), SSIZE(pos), SSIZE(eidx), SSIZE(vidx));
+ String8(value).string(), pos, eidx, vidx);
}
return pos;
@@ -598,7 +591,7 @@
const Vector<size_t>* indices = offsetsForString(val);
ssize_t res = indices != NULL && indices->size() > 0 ? indices->itemAt(0) : -1;
if (kIsDebug) {
- printf("Offset for string %s: %zd (%s)\n", String8(val).string(), SSIZE(res),
+ printf("Offset for string %s: %zd (%s)\n", String8(val).string(), res,
res >= 0 ? String8(mEntries[mEntryArray[res]].value).string() : String8());
}
return res;
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index 15ec4af..861efd5 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -16,13 +16,10 @@
#define O_BINARY 0
#endif
-// SSIZE: mingw does not have signed size_t == ssize_t.
// STATUST: mingw does seem to redefine UNKNOWN_ERROR from our enum value, so a cast is necessary.
#if !defined(_WIN32)
-# define SSIZE(x) x
# define STATUST(x) x
#else
-# define SSIZE(x) (signed size_t)x
# define STATUST(x) (status_t)x
#endif
@@ -1426,7 +1423,7 @@
idx = outPool->add(attr.name);
if (kIsDebug) {
printf("Adding attr %s (resid 0x%08x) to pool: idx=%zd\n",
- String8(attr.name).string(), id, SSIZE(idx));
+ String8(attr.name).string(), id, idx);
}
if (id != 0) {
while ((ssize_t)outResIds->size() <= idx) {
@@ -1437,7 +1434,7 @@
}
attr.namePoolIdx = idx;
if (kIsDebug) {
- printf("String %s offset=0x%08zd\n", String8(attr.name).string(), SSIZE(idx));
+ printf("String %s offset=0x%08zd\n", String8(attr.name).string(), idx);
}
}
}
diff --git a/tools/aapt2/OWNERS b/tools/aapt2/OWNERS
index d76233e..23ec5ab 100644
--- a/tools/aapt2/OWNERS
+++ b/tools/aapt2/OWNERS
@@ -1,2 +1,2 @@
set noparent
-adamlesinski@google.com
+toddke@google.com
diff --git a/tools/aapt2/cmd/Link.cpp b/tools/aapt2/cmd/Link.cpp
index 7742f36..3a312b0 100644
--- a/tools/aapt2/cmd/Link.cpp
+++ b/tools/aapt2/cmd/Link.cpp
@@ -1923,6 +1923,12 @@
.OptionalFlag("--version-name",
"Version name to inject into the AndroidManifest.xml if none is present.",
&options.manifest_fixer_options.version_name_default)
+ .OptionalSwitch("--replace-version",
+ "If --version-code and/or --version-name are specified, these\n"
+ "values will replace any value already in the manifest. By\n"
+ "default, nothing is changed if the manifest already defines\n"
+ "these attributes.",
+ &options.manifest_fixer_options.replace_version)
.OptionalSwitch("--shared-lib", "Generates a shared Android runtime library.",
&shared_lib)
.OptionalSwitch("--static-lib", "Generate a static Android library.", &static_lib)
@@ -1968,6 +1974,9 @@
&options.manifest_fixer_options.rename_instrumentation_target_package)
.OptionalFlagList("-0", "File extensions not to compress.",
&options.extensions_to_not_compress)
+ .OptionalSwitch("--warn-manifest-validation",
+ "Treat manifest validation errors as warnings.",
+ &options.manifest_fixer_options.warn_validation)
.OptionalFlagList("--split",
"Split resources matching a set of configs out to a Split APK.\n"
"Syntax: path/to/output.apk:<config>[,<config>[...]].\n"
diff --git a/tools/aapt2/integration-tests/AppOne/Android.mk b/tools/aapt2/integration-tests/AppOne/Android.mk
index 38bd5b5..7b30c4e 100644
--- a/tools/aapt2/integration-tests/AppOne/Android.mk
+++ b/tools/aapt2/integration-tests/AppOne/Android.mk
@@ -19,6 +19,7 @@
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
LOCAL_PACKAGE_NAME := AaptTestAppOne
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets $(LOCAL_PATH)/assets2
diff --git a/tools/aapt2/integration-tests/AutoVersionTest/Android.mk b/tools/aapt2/integration-tests/AutoVersionTest/Android.mk
index 012728f..03cce35 100644
--- a/tools/aapt2/integration-tests/AutoVersionTest/Android.mk
+++ b/tools/aapt2/integration-tests/AutoVersionTest/Android.mk
@@ -19,5 +19,6 @@
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
LOCAL_PACKAGE_NAME := AaptAutoVersionTest
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
include $(BUILD_PACKAGE)
diff --git a/tools/aapt2/integration-tests/StaticLibOne/Android.mk b/tools/aapt2/integration-tests/StaticLibOne/Android.mk
index 0b7129a..ec4f052 100644
--- a/tools/aapt2/integration-tests/StaticLibOne/Android.mk
+++ b/tools/aapt2/integration-tests/StaticLibOne/Android.mk
@@ -19,6 +19,7 @@
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
LOCAL_MODULE := AaptTestStaticLibOne
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
diff --git a/tools/aapt2/integration-tests/StaticLibTwo/Android.mk b/tools/aapt2/integration-tests/StaticLibTwo/Android.mk
index 8b6eb41..40f91af 100644
--- a/tools/aapt2/integration-tests/StaticLibTwo/Android.mk
+++ b/tools/aapt2/integration-tests/StaticLibTwo/Android.mk
@@ -19,6 +19,7 @@
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
LOCAL_MODULE := AaptTestStaticLibTwo
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
diff --git a/tools/aapt2/integration-tests/SymlinkTest/Android.mk b/tools/aapt2/integration-tests/SymlinkTest/Android.mk
index 902fc65..8da1141 100644
--- a/tools/aapt2/integration-tests/SymlinkTest/Android.mk
+++ b/tools/aapt2/integration-tests/SymlinkTest/Android.mk
@@ -19,5 +19,6 @@
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
LOCAL_PACKAGE_NAME := AaptSymlinkTest
+LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := tests
include $(BUILD_PACKAGE)
diff --git a/tools/aapt2/java/ManifestClassGenerator.cpp b/tools/aapt2/java/ManifestClassGenerator.cpp
index cad4c6c..f4391e1 100644
--- a/tools/aapt2/java/ManifestClassGenerator.cpp
+++ b/tools/aapt2/java/ManifestClassGenerator.cpp
@@ -22,9 +22,11 @@
#include "java/AnnotationProcessor.h"
#include "java/ClassDefinition.h"
#include "util/Maybe.h"
+#include "text/Unicode.h"
#include "xml/XmlDom.h"
-using android::StringPiece;
+using ::android::StringPiece;
+using ::aapt::text::IsJavaIdentifier;
namespace aapt {
@@ -46,11 +48,8 @@
return {};
}
- iter = util::FindNonAlphaNumericAndNotInSet(result, "_");
- if (iter != result.end()) {
- diag->Error(DiagMessage(source) << "invalid character '"
- << StringPiece(iter, 1) << "' in '"
- << result << "'");
+ if (!IsJavaIdentifier(result)) {
+ diag->Error(DiagMessage(source) << "invalid Java identifier '" << result << "'");
return {};
}
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp
index 6fb1793..ca7b653 100644
--- a/tools/aapt2/link/ManifestFixer.cpp
+++ b/tools/aapt2/link/ManifestFixer.cpp
@@ -127,9 +127,9 @@
diag->Error(DiagMessage(el->line_number)
<< "attribute 'package' in <manifest> tag must not be a reference");
return false;
- } else if (!util::IsJavaPackageName(attr->value)) {
+ } else if (!util::IsAndroidPackageName(attr->value)) {
diag->Error(DiagMessage(el->line_number)
- << "attribute 'package' in <manifest> tag is not a valid Java package name: '"
+ << "attribute 'package' in <manifest> tag is not a valid Android package name: '"
<< attr->value << "'");
return false;
}
@@ -237,6 +237,9 @@
manifest_action.Action(FixCoreAppAttribute);
manifest_action.Action([&](xml::Element* el) -> bool {
if (options_.version_name_default) {
+ if (options_.replace_version) {
+ el->RemoveAttribute(xml::kSchemaAndroid, "versionName");
+ }
if (el->FindAttribute(xml::kSchemaAndroid, "versionName") == nullptr) {
el->attributes.push_back(
xml::Attribute{xml::kSchemaAndroid, "versionName",
@@ -245,6 +248,9 @@
}
if (options_.version_code_default) {
+ if (options_.replace_version) {
+ el->RemoveAttribute(xml::kSchemaAndroid, "versionCode");
+ }
if (el->FindAttribute(xml::kSchemaAndroid, "versionCode") == nullptr) {
el->attributes.push_back(
xml::Attribute{xml::kSchemaAndroid, "versionCode",
@@ -409,7 +415,10 @@
return false;
}
- if (!executor.Execute(xml::XmlActionExecutorPolicy::kWhitelist, context->GetDiagnostics(), doc)) {
+ xml::XmlActionExecutorPolicy policy = options_.warn_validation
+ ? xml::XmlActionExecutorPolicy::kWhitelistWarning
+ : xml::XmlActionExecutorPolicy::kWhitelist;
+ if (!executor.Execute(policy, context->GetDiagnostics(), doc)) {
return false;
}
diff --git a/tools/aapt2/link/ManifestFixer.h b/tools/aapt2/link/ManifestFixer.h
index 470f65e..d7a5931 100644
--- a/tools/aapt2/link/ManifestFixer.h
+++ b/tools/aapt2/link/ManifestFixer.h
@@ -33,8 +33,22 @@
Maybe<std::string> target_sdk_version_default;
Maybe<std::string> rename_manifest_package;
Maybe<std::string> rename_instrumentation_target_package;
+
+ // The version name to set if 'android:versionName' is not defined in <manifest> or if
+ // replace_version is set.
Maybe<std::string> version_name_default;
+
+ // The version code to set if 'android:versionCode' is not defined in <manifest> or if
+ // replace_version is set.
Maybe<std::string> version_code_default;
+
+ // Wether validation errors should be treated only as warnings. If this is 'true', then an
+ // incorrect node will not result in an error, but only as a warning, and the parsing will
+ // continue.
+ bool warn_validation = false;
+
+ // Whether to replace the manifest version with the the command line version
+ bool replace_version = false;
};
/**
diff --git a/tools/aapt2/link/ManifestFixer_test.cpp b/tools/aapt2/link/ManifestFixer_test.cpp
index da7f410..e6410c9 100644
--- a/tools/aapt2/link/ManifestFixer_test.cpp
+++ b/tools/aapt2/link/ManifestFixer_test.cpp
@@ -19,7 +19,9 @@
#include "test/Test.h"
using ::android::StringPiece;
+using ::testing::IsNull;
using ::testing::NotNull;
+using ::testing::StrEq;
namespace aapt {
@@ -109,7 +111,9 @@
}
TEST_F(ManifestFixerTest, UseDefaultSdkVersionsIfNonePresent) {
- ManifestFixerOptions options = {std::string("8"), std::string("22")};
+ ManifestFixerOptions options;
+ options.min_sdk_version_default = std::string("8");
+ options.target_sdk_version_default = std::string("22");
std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
@@ -190,7 +194,9 @@
}
TEST_F(ManifestFixerTest, UsesSdkMustComeBeforeApplication) {
- ManifestFixerOptions options = {std::string("8"), std::string("22")};
+ ManifestFixerOptions options;
+ options.min_sdk_version_default = std::string("8");
+ options.target_sdk_version_default = std::string("22");
std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android">
@@ -334,6 +340,136 @@
EXPECT_EQ(std::string("0x10000000"), attr->value);
}
+TEST_F(ManifestFixerTest, DontUseDefaultVersionNameAndCode) {
+ManifestFixerOptions options;
+options.version_name_default = std::string("Beta");
+options.version_code_default = std::string("0x10000000");
+
+std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x20000000"
+ android:versionName="Alpha" />)EOF",
+ options);
+ASSERT_THAT(doc, NotNull());
+
+xml::Element* manifest_el = doc->root.get();
+ASSERT_THAT(manifest_el, NotNull());
+
+xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("Alpha"));
+
+attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("0x20000000"));
+}
+
+TEST_F(ManifestFixerTest, ReplaceVersionNameAndCode) {
+ManifestFixerOptions options;
+options.replace_version = true;
+options.version_name_default = std::string("Beta");
+options.version_code_default = std::string("0x10000000");
+
+std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x20000000"
+ android:versionName="Alpha" />)EOF",
+ options);
+ASSERT_THAT(doc, NotNull());
+
+xml::Element* manifest_el = doc->root.get();
+ASSERT_THAT(manifest_el, NotNull());
+
+xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("Beta"));
+
+attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("0x10000000"));
+}
+
+TEST_F(ManifestFixerTest, ReplaceVersionName) {
+ManifestFixerOptions options;
+options.replace_version = true;
+options.version_name_default = std::string("Beta");
+
+std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x20000000"
+ android:versionName="Alpha" />)EOF",
+ options);
+ASSERT_THAT(doc, NotNull());
+
+xml::Element* manifest_el = doc->root.get();
+ASSERT_THAT(manifest_el, NotNull());
+
+xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("Beta"));
+
+attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("0x20000000"));
+}
+
+TEST_F(ManifestFixerTest, ReplaceVersionCode) {
+ManifestFixerOptions options;
+options.replace_version = true;
+options.version_code_default = std::string("0x10000000");
+
+std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x20000000"
+ android:versionName="Alpha" />)EOF",
+ options);
+ASSERT_THAT(doc, NotNull());
+
+xml::Element* manifest_el = doc->root.get();
+ASSERT_THAT(manifest_el, NotNull());
+
+xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("Alpha"));
+
+attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("0x10000000"));
+}
+
+TEST_F(ManifestFixerTest, DontReplaceVersionNameOrCode) {
+ManifestFixerOptions options;
+options.replace_version = true;
+
+std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x20000000"
+ android:versionName="Alpha" />)EOF",
+ options);
+ASSERT_THAT(doc, NotNull());
+
+xml::Element* manifest_el = doc->root.get();
+ASSERT_THAT(manifest_el, NotNull());
+
+xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("Alpha"));
+
+attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ASSERT_THAT(attr, NotNull());
+EXPECT_THAT(attr->value, StrEq("0x20000000"));
+}
+
TEST_F(ManifestFixerTest, EnsureManifestAttributesAreTyped) {
EXPECT_EQ(nullptr,
Verify("<manifest package=\"android\" coreApp=\"hello\" />"));
@@ -439,4 +575,27 @@
EXPECT_THAT(Verify(input), NotNull());
}
+TEST_F(ManifestFixerTest, UnexpectedElementsInManifest) {
+ std::string input = R"(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android">
+ <beep/>
+ </manifest>)";
+ ManifestFixerOptions options;
+ options.warn_validation = true;
+
+ // Unexpected element should result in a warning if the flag is set to 'true'.
+ std::unique_ptr<xml::XmlResource> manifest = VerifyWithOptions(input, options);
+ ASSERT_THAT(manifest, NotNull());
+
+ // Unexpected element should result in an error if the flag is set to 'false'.
+ options.warn_validation = false;
+ manifest = VerifyWithOptions(input, options);
+ ASSERT_THAT(manifest, IsNull());
+
+ // By default the flag should be set to 'false'.
+ manifest = Verify(input);
+ ASSERT_THAT(manifest, IsNull());
+}
+
} // namespace aapt
diff --git a/tools/aapt2/text/Unicode.cpp b/tools/aapt2/text/Unicode.cpp
index 75eeb46..3735b3e 100644
--- a/tools/aapt2/text/Unicode.cpp
+++ b/tools/aapt2/text/Unicode.cpp
@@ -85,7 +85,8 @@
return false;
}
- if (!IsXidStart(iter.Next())) {
+ const char32_t first_codepoint = iter.Next();
+ if (!IsXidStart(first_codepoint) && first_codepoint != U'_' && first_codepoint != U'$') {
return false;
}
diff --git a/tools/aapt2/text/Unicode_test.cpp b/tools/aapt2/text/Unicode_test.cpp
index d47fb28..a8e797c 100644
--- a/tools/aapt2/text/Unicode_test.cpp
+++ b/tools/aapt2/text/Unicode_test.cpp
@@ -44,10 +44,11 @@
TEST(UnicodeTest, IsJavaIdentifier) {
EXPECT_TRUE(IsJavaIdentifier("FøøBar_12"));
EXPECT_TRUE(IsJavaIdentifier("Føø$Bar"));
+ EXPECT_TRUE(IsJavaIdentifier("_FøøBar"));
+ EXPECT_TRUE(IsJavaIdentifier("$Føø$Bar"));
EXPECT_FALSE(IsJavaIdentifier("12FøøBar"));
- EXPECT_FALSE(IsJavaIdentifier("_FøøBar"));
- EXPECT_FALSE(IsJavaIdentifier("$Føø$Bar"));
+ EXPECT_FALSE(IsJavaIdentifier(".Hello"));
}
TEST(UnicodeTest, IsValidResourceEntryName) {
diff --git a/tools/aapt2/util/Util.cpp b/tools/aapt2/util/Util.cpp
index 51a75d7..7c1c1ad 100644
--- a/tools/aapt2/util/Util.cpp
+++ b/tools/aapt2/util/Util.cpp
@@ -24,6 +24,7 @@
#include "androidfw/StringPiece.h"
#include "utils/Unicode.h"
+#include "text/Unicode.h"
#include "text/Utf8Iterator.h"
#include "util/BigBuffer.h"
#include "util/Maybe.h"
@@ -94,72 +95,55 @@
return StringPiece(start, end - start);
}
-StringPiece::const_iterator FindNonAlphaNumericAndNotInSet(
- const StringPiece& str, const StringPiece& allowed_chars) {
- const auto end_iter = str.end();
- for (auto iter = str.begin(); iter != end_iter; ++iter) {
- char c = *iter;
- if ((c >= u'a' && c <= u'z') || (c >= u'A' && c <= u'Z') ||
- (c >= u'0' && c <= u'9')) {
- continue;
- }
-
- bool match = false;
- for (char i : allowed_chars) {
- if (c == i) {
- match = true;
- break;
- }
- }
-
- if (!match) {
- return iter;
+static int IsJavaNameImpl(const StringPiece& str) {
+ int pieces = 0;
+ for (const StringPiece& piece : Tokenize(str, '.')) {
+ pieces++;
+ if (!text::IsJavaIdentifier(piece)) {
+ return -1;
}
}
- return end_iter;
+ return pieces;
}
bool IsJavaClassName(const StringPiece& str) {
- size_t pieces = 0;
- for (const StringPiece& piece : Tokenize(str, '.')) {
- pieces++;
- if (piece.empty()) {
- return false;
- }
-
- // Can't have starting or trailing $ character.
- if (piece.data()[0] == '$' || piece.data()[piece.size() - 1] == '$') {
- return false;
- }
-
- if (FindNonAlphaNumericAndNotInSet(piece, "$_") != piece.end()) {
- return false;
- }
- }
- return pieces >= 2;
+ return IsJavaNameImpl(str) >= 2;
}
bool IsJavaPackageName(const StringPiece& str) {
- if (str.empty()) {
- return false;
- }
+ return IsJavaNameImpl(str) >= 1;
+}
- size_t pieces = 0;
+static int IsAndroidNameImpl(const StringPiece& str) {
+ int pieces = 0;
for (const StringPiece& piece : Tokenize(str, '.')) {
- pieces++;
if (piece.empty()) {
- return false;
+ return -1;
}
- if (piece.data()[0] == '_' || piece.data()[piece.size() - 1] == '_') {
- return false;
+ const char first_character = piece.data()[0];
+ if (!::isalpha(first_character)) {
+ return -1;
}
- if (FindNonAlphaNumericAndNotInSet(piece, "_") != piece.end()) {
- return false;
+ bool valid = std::all_of(piece.begin() + 1, piece.end(), [](const char c) -> bool {
+ return ::isalnum(c) || c == '_';
+ });
+
+ if (!valid) {
+ return -1;
}
+ pieces++;
}
- return pieces >= 1;
+ return pieces;
+}
+
+bool IsAndroidPackageName(const StringPiece& str) {
+ return IsAndroidNameImpl(str) > 1 || str == "android";
+}
+
+bool IsAndroidSplitName(const StringPiece& str) {
+ return IsAndroidNameImpl(str) > 0;
}
Maybe<std::string> GetFullyQualifiedClassName(const StringPiece& package,
@@ -176,7 +160,7 @@
return {};
}
- std::string result(package.data(), package.size());
+ std::string result = package.to_string();
if (classname.data()[0] != '.') {
result += '.';
}
diff --git a/tools/aapt2/util/Util.h b/tools/aapt2/util/Util.h
index 8f021ab..f12746f 100644
--- a/tools/aapt2/util/Util.h
+++ b/tools/aapt2/util/Util.h
@@ -53,48 +53,40 @@
std::vector<std::string> Split(const android::StringPiece& str, char sep);
std::vector<std::string> SplitAndLowercase(const android::StringPiece& str, char sep);
-/**
- * Returns true if the string starts with prefix.
- */
+// Returns true if the string starts with prefix.
bool StartsWith(const android::StringPiece& str, const android::StringPiece& prefix);
-/**
- * Returns true if the string ends with suffix.
- */
+// Returns true if the string ends with suffix.
bool EndsWith(const android::StringPiece& str, const android::StringPiece& suffix);
-/**
- * Creates a new StringPiece16 that points to a substring
- * of the original string without leading or trailing whitespace.
- */
+// Creates a new StringPiece16 that points to a substring of the original string without leading or
+// trailing whitespace.
android::StringPiece TrimWhitespace(const android::StringPiece& str);
-/**
- * Returns an iterator to the first character that is not alpha-numeric and that
- * is not in the allowedChars set.
- */
-android::StringPiece::const_iterator FindNonAlphaNumericAndNotInSet(
- const android::StringPiece& str, const android::StringPiece& allowed_chars);
-
-/**
- * Tests that the string is a valid Java class name.
- */
+// Tests that the string is a valid Java class name.
bool IsJavaClassName(const android::StringPiece& str);
-/**
- * Tests that the string is a valid Java package name.
- */
+// Tests that the string is a valid Java package name.
bool IsJavaPackageName(const android::StringPiece& str);
-/**
- * Converts the class name to a fully qualified class name from the given
- * `package`. Ex:
- *
- * asdf --> package.asdf
- * .asdf --> package.asdf
- * .a.b --> package.a.b
- * asdf.adsf --> asdf.adsf
- */
+// Tests that the string is a valid Android package name. More strict than a Java package name.
+// - First character of each component (separated by '.') must be an ASCII letter.
+// - Subsequent characters of a component can be ASCII alphanumeric or an underscore.
+// - Package must contain at least two components, unless it is 'android'.
+bool IsAndroidPackageName(const android::StringPiece& str);
+
+// Tests that the string is a valid Android split name.
+// - First character of each component (separated by '.') must be an ASCII letter.
+// - Subsequent characters of a component can be ASCII alphanumeric or an underscore.
+bool IsAndroidSplitName(const android::StringPiece& str);
+
+// Converts the class name to a fully qualified class name from the given
+// `package`. Ex:
+//
+// asdf --> package.asdf
+// .asdf --> package.asdf
+// .a.b --> package.a.b
+// asdf.adsf --> asdf.adsf
Maybe<std::string> GetFullyQualifiedClassName(const android::StringPiece& package,
const android::StringPiece& class_name);
@@ -108,23 +100,17 @@
return 0;
}
-/**
- * Makes a std::unique_ptr<> with the template parameter inferred by the compiler.
- * This will be present in C++14 and can be removed then.
- */
+// Makes a std::unique_ptr<> with the template parameter inferred by the compiler.
+// This will be present in C++14 and can be removed then.
template <typename T, class... Args>
std::unique_ptr<T> make_unique(Args&&... args) {
return std::unique_ptr<T>(new T{std::forward<Args>(args)...});
}
-/**
- * Writes a set of items to the std::ostream, joining the times with the
- * provided
- * separator.
- */
+// Writes a set of items to the std::ostream, joining the times with the provided separator.
template <typename Container>
-::std::function<::std::ostream&(::std::ostream&)> Joiner(
- const Container& container, const char* sep) {
+::std::function<::std::ostream&(::std::ostream&)> Joiner(const Container& container,
+ const char* sep) {
using std::begin;
using std::end;
const auto begin_iter = begin(container);
@@ -140,32 +126,19 @@
};
}
-/**
- * Helper method to extract a UTF-16 string from a StringPool. If the string is
- * stored as UTF-8,
- * the conversion to UTF-16 happens within ResStringPool.
- */
+// Helper method to extract a UTF-16 string from a StringPool. If the string is stored as UTF-8,
+// the conversion to UTF-16 happens within ResStringPool.
android::StringPiece16 GetString16(const android::ResStringPool& pool, size_t idx);
-/**
- * Helper method to extract a UTF-8 string from a StringPool. If the string is
- * stored as UTF-16,
- * the conversion from UTF-16 to UTF-8 does not happen in ResStringPool and is
- * done by this method,
- * which maintains no state or cache. This means we must return an std::string
- * copy.
- */
+// Helper method to extract a UTF-8 string from a StringPool. If the string is stored as UTF-16,
+// the conversion from UTF-16 to UTF-8 does not happen in ResStringPool and is done by this method,
+// which maintains no state or cache. This means we must return an std::string copy.
std::string GetString(const android::ResStringPool& pool, size_t idx);
-/**
- * Checks that the Java string format contains no non-positional arguments
- * (arguments without
- * explicitly specifying an index) when there are more than one argument. This
- * is an error
- * because translations may rearrange the order of the arguments in the string,
- * which will
- * break the string interpolation.
- */
+// Checks that the Java string format contains no non-positional arguments (arguments without
+// explicitly specifying an index) when there are more than one argument. This is an error
+// because translations may rearrange the order of the arguments in the string, which will
+// break the string interpolation.
bool VerifyJavaStringFormat(const android::StringPiece& str);
class StringBuilder {
@@ -194,36 +167,38 @@
std::string error_;
};
-inline const std::string& StringBuilder::ToString() const { return str_; }
+inline const std::string& StringBuilder::ToString() const {
+ return str_;
+}
-inline const std::string& StringBuilder::Error() const { return error_; }
+inline const std::string& StringBuilder::Error() const {
+ return error_;
+}
-inline bool StringBuilder::IsEmpty() const { return str_.empty(); }
+inline bool StringBuilder::IsEmpty() const {
+ return str_.empty();
+}
-inline size_t StringBuilder::Utf16Len() const { return utf16_len_; }
+inline size_t StringBuilder::Utf16Len() const {
+ return utf16_len_;
+}
-inline StringBuilder::operator bool() const { return error_.empty(); }
+inline StringBuilder::operator bool() const {
+ return error_.empty();
+}
-/**
- * Converts a UTF8 string to a UTF16 string.
- */
+// Converts a UTF8 string to a UTF16 string.
std::u16string Utf8ToUtf16(const android::StringPiece& utf8);
std::string Utf16ToUtf8(const android::StringPiece16& utf16);
-/**
- * Writes the entire BigBuffer to the output stream.
- */
+// Writes the entire BigBuffer to the output stream.
bool WriteAll(std::ostream& out, const BigBuffer& buffer);
-/*
- * Copies the entire BigBuffer into a single buffer.
- */
+// Copies the entire BigBuffer into a single buffer.
std::unique_ptr<uint8_t[]> Copy(const BigBuffer& buffer);
-/**
- * A Tokenizer implemented as an iterable collection. It does not allocate
- * any memory on the heap nor use standard containers.
- */
+// A Tokenizer implemented as an iterable collection. It does not allocate any memory on the heap
+// nor use standard containers.
class Tokenizer {
public:
class iterator {
@@ -269,38 +244,42 @@
const iterator end_;
};
-inline Tokenizer Tokenize(const android::StringPiece& str, char sep) { return Tokenizer(str, sep); }
+inline Tokenizer Tokenize(const android::StringPiece& str, char sep) {
+ return Tokenizer(str, sep);
+}
-inline uint16_t HostToDevice16(uint16_t value) { return htods(value); }
+inline uint16_t HostToDevice16(uint16_t value) {
+ return htods(value);
+}
-inline uint32_t HostToDevice32(uint32_t value) { return htodl(value); }
+inline uint32_t HostToDevice32(uint32_t value) {
+ return htodl(value);
+}
-inline uint16_t DeviceToHost16(uint16_t value) { return dtohs(value); }
+inline uint16_t DeviceToHost16(uint16_t value) {
+ return dtohs(value);
+}
-inline uint32_t DeviceToHost32(uint32_t value) { return dtohl(value); }
+inline uint32_t DeviceToHost32(uint32_t value) {
+ return dtohl(value);
+}
-/**
- * Given a path like: res/xml-sw600dp/foo.xml
- *
- * Extracts "res/xml-sw600dp/" into outPrefix.
- * Extracts "foo" into outEntry.
- * Extracts ".xml" into outSuffix.
- *
- * Returns true if successful.
- */
+// Given a path like: res/xml-sw600dp/foo.xml
+//
+// Extracts "res/xml-sw600dp/" into outPrefix.
+// Extracts "foo" into outEntry.
+// Extracts ".xml" into outSuffix.
+//
+// Returns true if successful.
bool ExtractResFilePathParts(const android::StringPiece& path, android::StringPiece* out_prefix,
android::StringPiece* out_entry, android::StringPiece* out_suffix);
} // namespace util
-/**
- * Stream operator for functions. Calls the function with the stream as an
- * argument.
- * In the aapt namespace for lookup.
- */
-inline ::std::ostream& operator<<(
- ::std::ostream& out,
- const ::std::function<::std::ostream&(::std::ostream&)>& f) {
+// Stream operator for functions. Calls the function with the stream as an argument.
+// In the aapt namespace for lookup.
+inline ::std::ostream& operator<<(::std::ostream& out,
+ const ::std::function<::std::ostream&(::std::ostream&)>& f) {
return f(out);
}
diff --git a/tools/aapt2/util/Util_test.cpp b/tools/aapt2/util/Util_test.cpp
index adb5291..2d1242a 100644
--- a/tools/aapt2/util/Util_test.cpp
+++ b/tools/aapt2/util/Util_test.cpp
@@ -117,24 +117,46 @@
EXPECT_TRUE(util::IsJavaClassName("android.test.Class$Inner"));
EXPECT_TRUE(util::IsJavaClassName("android_test.test.Class"));
EXPECT_TRUE(util::IsJavaClassName("_android_.test._Class_"));
- EXPECT_FALSE(util::IsJavaClassName("android.test.$Inner"));
- EXPECT_FALSE(util::IsJavaClassName("android.test.Inner$"));
+ EXPECT_TRUE(util::IsJavaClassName("android.test.$Inner"));
+ EXPECT_TRUE(util::IsJavaClassName("android.test.Inner$"));
+ EXPECT_TRUE(util::IsJavaClassName("com.foo.FøøBar"));
+
EXPECT_FALSE(util::IsJavaClassName(".test.Class"));
EXPECT_FALSE(util::IsJavaClassName("android"));
+ EXPECT_FALSE(util::IsJavaClassName("FooBar"));
}
TEST(UtilTest, IsJavaPackageName) {
EXPECT_TRUE(util::IsJavaPackageName("android"));
EXPECT_TRUE(util::IsJavaPackageName("android.test"));
EXPECT_TRUE(util::IsJavaPackageName("android.test_thing"));
- EXPECT_FALSE(util::IsJavaPackageName("_android"));
- EXPECT_FALSE(util::IsJavaPackageName("android_"));
+ EXPECT_TRUE(util::IsJavaPackageName("_android"));
+ EXPECT_TRUE(util::IsJavaPackageName("android_"));
+ EXPECT_TRUE(util::IsJavaPackageName("android._test"));
+ EXPECT_TRUE(util::IsJavaPackageName("cøm.foo"));
+
EXPECT_FALSE(util::IsJavaPackageName("android."));
EXPECT_FALSE(util::IsJavaPackageName(".android"));
- EXPECT_FALSE(util::IsJavaPackageName("android._test"));
EXPECT_FALSE(util::IsJavaPackageName(".."));
}
+TEST(UtilTest, IsAndroidPackageName) {
+ EXPECT_TRUE(util::IsAndroidPackageName("android"));
+ EXPECT_TRUE(util::IsAndroidPackageName("android.test"));
+ EXPECT_TRUE(util::IsAndroidPackageName("com.foo"));
+ EXPECT_TRUE(util::IsAndroidPackageName("com.foo.test_thing"));
+ EXPECT_TRUE(util::IsAndroidPackageName("com.foo.testing_thing_"));
+ EXPECT_TRUE(util::IsAndroidPackageName("com.foo.test_99_"));
+
+ EXPECT_FALSE(util::IsAndroidPackageName("android._test"));
+ EXPECT_FALSE(util::IsAndroidPackageName("com"));
+ EXPECT_FALSE(util::IsAndroidPackageName("_android"));
+ EXPECT_FALSE(util::IsAndroidPackageName("android."));
+ EXPECT_FALSE(util::IsAndroidPackageName(".android"));
+ EXPECT_FALSE(util::IsAndroidPackageName(".."));
+ EXPECT_FALSE(util::IsAndroidPackageName("cøm.foo"));
+}
+
TEST(UtilTest, FullyQualifiedClassName) {
EXPECT_THAT(util::GetFullyQualifiedClassName("android", ".asdf"), Eq("android.asdf"));
EXPECT_THAT(util::GetFullyQualifiedClassName("android", ".a.b"), Eq("android.a.b"));
diff --git a/tools/aapt2/xml/XmlActionExecutor.cpp b/tools/aapt2/xml/XmlActionExecutor.cpp
index cc664a5..cb844f0 100644
--- a/tools/aapt2/xml/XmlActionExecutor.cpp
+++ b/tools/aapt2/xml/XmlActionExecutor.cpp
@@ -16,6 +16,8 @@
#include "xml/XmlActionExecutor.h"
+using ::android::StringPiece;
+
namespace aapt {
namespace xml {
@@ -46,8 +48,8 @@
*msg << el->name << ">";
}
-bool XmlNodeAction::Execute(XmlActionExecutorPolicy policy, SourcePathDiagnostics* diag,
- Element* el) const {
+bool XmlNodeAction::Execute(XmlActionExecutorPolicy policy, std::vector<StringPiece>* bread_crumb,
+ SourcePathDiagnostics* diag, Element* el) const {
bool error = false;
for (const ActionFuncWithDiag& action : actions_) {
error |= !action(el, diag);
@@ -57,17 +59,29 @@
if (child_el->namespace_uri.empty()) {
std::map<std::string, XmlNodeAction>::const_iterator iter = map_.find(child_el->name);
if (iter != map_.end()) {
- error |= !iter->second.Execute(policy, diag, child_el);
+ // Use the iterator's copy of the element name, because the element may be modified.
+ bread_crumb->push_back(iter->first);
+ error |= !iter->second.Execute(policy, bread_crumb, diag, child_el);
+ bread_crumb->pop_back();
continue;
}
- if (policy == XmlActionExecutorPolicy::kWhitelist) {
+ if (policy != XmlActionExecutorPolicy::kNone) {
DiagMessage error_msg(child_el->line_number);
- error_msg << "unknown element ";
+ error_msg << "unexpected element ";
PrintElementToDiagMessage(child_el, &error_msg);
- error_msg << " found";
- diag->Error(error_msg);
- error = true;
+ error_msg << " found in ";
+ for (const StringPiece& element : *bread_crumb) {
+ error_msg << "<" << element << ">";
+ }
+ if (policy == XmlActionExecutorPolicy::kWhitelistWarning) {
+ // Treat the error only as a warning.
+ diag->Warn(error_msg);
+ } else {
+ // Policy is XmlActionExecutorPolicy::kWhitelist, we should fail.
+ diag->Error(error_msg);
+ error = true;
+ }
}
}
}
@@ -90,14 +104,15 @@
if (el->namespace_uri.empty()) {
std::map<std::string, XmlNodeAction>::const_iterator iter = map_.find(el->name);
if (iter != map_.end()) {
- return iter->second.Execute(policy, &source_diag, el);
+ std::vector<StringPiece> bread_crumb;
+ bread_crumb.push_back(iter->first);
+ return iter->second.Execute(policy, &bread_crumb, &source_diag, el);
}
if (policy == XmlActionExecutorPolicy::kWhitelist) {
DiagMessage error_msg(el->line_number);
- error_msg << "unknown element ";
+ error_msg << "unexpected root element ";
PrintElementToDiagMessage(el, &error_msg);
- error_msg << " found";
source_diag.Error(error_msg);
return false;
}
diff --git a/tools/aapt2/xml/XmlActionExecutor.h b/tools/aapt2/xml/XmlActionExecutor.h
index 1d70045..f689b2a 100644
--- a/tools/aapt2/xml/XmlActionExecutor.h
+++ b/tools/aapt2/xml/XmlActionExecutor.h
@@ -34,62 +34,57 @@
// Actions are run if elements are matched, errors occur only when actions return false.
kNone,
- // The actions defined must match and run. If an element is found that does
- // not match an action, an error occurs.
+ // The actions defined must match and run. If an element is found that does not match an action,
+ // an error occurs.
// Note: namespaced elements are always ignored.
kWhitelist,
+
+ // The actions defined should match and run. if an element is found that does not match an
+ // action, a warning is printed.
+ // Note: namespaced elements are always ignored.
+ kWhitelistWarning,
};
-/**
- * Contains the actions to perform at this XML node. This is a recursive data
- * structure that
- * holds XmlNodeActions for child XML nodes.
- */
+// Contains the actions to perform at this XML node. This is a recursive data structure that
+// holds XmlNodeActions for child XML nodes.
class XmlNodeAction {
public:
using ActionFuncWithDiag = std::function<bool(Element*, SourcePathDiagnostics*)>;
using ActionFunc = std::function<bool(Element*)>;
- /**
- * Find or create a child XmlNodeAction that will be performed for the child
- * element with the name `name`.
- */
- XmlNodeAction& operator[](const std::string& name) { return map_[name]; }
+ // Find or create a child XmlNodeAction that will be performed for the child element with the
+ // name `name`.
+ XmlNodeAction& operator[](const std::string& name) {
+ return map_[name];
+ }
- /**
- * Add an action to be performed at this XmlNodeAction.
- */
+ // Add an action to be performed at this XmlNodeAction.
void Action(ActionFunc f);
void Action(ActionFuncWithDiag);
private:
friend class XmlActionExecutor;
- bool Execute(XmlActionExecutorPolicy policy, SourcePathDiagnostics* diag, Element* el) const;
+ bool Execute(XmlActionExecutorPolicy policy, std::vector<::android::StringPiece>* bread_crumb,
+ SourcePathDiagnostics* diag, Element* el) const;
std::map<std::string, XmlNodeAction> map_;
std::vector<ActionFuncWithDiag> actions_;
};
-/**
- * Allows the definition of actions to execute at specific XML elements defined
- * by their
- * hierarchy.
- */
+// Allows the definition of actions to execute at specific XML elements defined by their hierarchy.
class XmlActionExecutor {
public:
XmlActionExecutor() = default;
- /**
- * Find or create a root XmlNodeAction that will be performed for the root XML
- * element with the name `name`.
- */
- XmlNodeAction& operator[](const std::string& name) { return map_[name]; }
+ // Find or create a root XmlNodeAction that will be performed for the root XML element with the
+ // name `name`.
+ XmlNodeAction& operator[](const std::string& name) {
+ return map_[name];
+ }
- /**
- * Execute the defined actions for this XmlResource.
- * Returns true if all actions return true, otherwise returns false.
- */
+ // Execute the defined actions for this XmlResource.
+ // Returns true if all actions return true, otherwise returns false.
bool Execute(XmlActionExecutorPolicy policy, IDiagnostics* diag, XmlResource* doc) const;
private:
diff --git a/tools/aapt2/xml/XmlActionExecutor_test.cpp b/tools/aapt2/xml/XmlActionExecutor_test.cpp
index 0fe7ab0..d39854e 100644
--- a/tools/aapt2/xml/XmlActionExecutor_test.cpp
+++ b/tools/aapt2/xml/XmlActionExecutor_test.cpp
@@ -56,9 +56,13 @@
XmlActionExecutor executor;
executor["manifest"]["application"];
- std::unique_ptr<XmlResource> doc =
- test::BuildXmlDom("<manifest><application /><activity /></manifest>");
+ std::unique_ptr<XmlResource> doc;
StdErrDiagnostics diag;
+
+ doc = test::BuildXmlDom("<manifest><application /><activity /></manifest>");
+ ASSERT_FALSE(executor.Execute(XmlActionExecutorPolicy::kWhitelist, &diag, doc.get()));
+
+ doc = test::BuildXmlDom("<manifest><application><activity /></application></manifest>");
ASSERT_FALSE(executor.Execute(XmlActionExecutorPolicy::kWhitelist, &diag, doc.get()));
}
diff --git a/tools/aapt2/xml/XmlDom.cpp b/tools/aapt2/xml/XmlDom.cpp
index 1d122db..22767781 100644
--- a/tools/aapt2/xml/XmlDom.cpp
+++ b/tools/aapt2/xml/XmlDom.cpp
@@ -394,6 +394,15 @@
return nullptr;
}
+void Element::RemoveAttribute(const StringPiece& ns, const StringPiece& name) {
+ auto new_attr_end = std::remove_if(attributes.begin(), attributes.end(),
+ [&](const Attribute& attr) -> bool {
+ return ns == attr.namespace_uri && name == attr.name;
+ });
+
+ attributes.erase(new_attr_end, attributes.end());
+}
+
Element* Element::FindChild(const StringPiece& ns, const StringPiece& name) {
return FindChildWithAttribute(ns, name, {}, {}, {});
}
diff --git a/tools/aapt2/xml/XmlDom.h b/tools/aapt2/xml/XmlDom.h
index 1542243..995cdb24 100644
--- a/tools/aapt2/xml/XmlDom.h
+++ b/tools/aapt2/xml/XmlDom.h
@@ -98,6 +98,9 @@
Attribute* FindAttribute(const android::StringPiece& ns, const android::StringPiece& name);
const Attribute* FindAttribute(const android::StringPiece& ns,
const android::StringPiece& name) const;
+ void RemoveAttribute(const android::StringPiece& ns,
+ const android::StringPiece& name);
+
Element* FindChild(const android::StringPiece& ns, const android::StringPiece& name);
Element* FindChildWithAttribute(const android::StringPiece& ns, const android::StringPiece& name,
const android::StringPiece& attr_ns,
diff --git a/tools/bit/util.cpp b/tools/bit/util.cpp
index 9223931..a502a9d 100644
--- a/tools/bit/util.cpp
+++ b/tools/bit/util.cpp
@@ -241,6 +241,8 @@
char* buf = (char*)malloc(size);
if ((size_t) size != fread(buf, 1, size, file)) {
+ free(buf);
+ fclose(file);
return string();
}
diff --git a/tools/fonts/fontchain_linter.py b/tools/fonts/fontchain_linter.py
index c6ad4c2a..dcb90e4 100755
--- a/tools/fonts/fontchain_linter.py
+++ b/tools/fonts/fontchain_linter.py
@@ -13,6 +13,7 @@
LANG_TO_SCRIPT = {
'as': 'Beng',
+ 'be': 'Cyrl',
'bg': 'Cyrl',
'bn': 'Beng',
'cu': 'Cyrl',
@@ -33,6 +34,7 @@
'ja': 'Jpan',
'kn': 'Knda',
'ko': 'Kore',
+ 'la': 'Latn',
'ml': 'Mlym',
'mn': 'Cyrl',
'mr': 'Deva',
diff --git a/tools/hiddenapi/checksorted_sha.sh b/tools/hiddenapi/checksorted_sha.sh
new file mode 100755
index 0000000..ceb705f
--- /dev/null
+++ b/tools/hiddenapi/checksorted_sha.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -e
+LOCAL_DIR="$( dirname ${BASH_SOURCE} )"
+git show --name-only --pretty=format: $1 | grep "config/hiddenapi-.*txt" | while read file; do
+ diff <(git show $1:$file) <(git show $1:$file | $LOCAL_DIR/sort_api.sh ) || {
+ echo -e "\e[1m\e[31m$file $1 is not sorted or contains duplicates. To sort it correctly:\e[0m"
+ echo -e "\e[33m${LOCAL_DIR}/sort_api.sh $2/frameworks/base/$file\e[0m"
+ exit 1
+ }
+done
diff --git a/tools/hiddenapi/sort_api.sh b/tools/hiddenapi/sort_api.sh
new file mode 100755
index 0000000..1c6eb1b
--- /dev/null
+++ b/tools/hiddenapi/sort_api.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -e
+if [ -z "$1" ]; then
+ source_list=/dev/stdin
+ dest_list=/dev/stdout
+else
+ source_list="$1"
+ dest_list="$1"
+fi
+# Load the file
+readarray A < "$source_list"
+# Sort
+IFS=$'\n'
+A=( $(LC_COLLATE=C sort -f <<< "${A[*]}") )
+A=( $(uniq <<< "${A[*]}") )
+unset IFS
+# Dump array back into the file
+printf '%s\n' "${A[@]}" > "$dest_list"
diff --git a/tools/incident_report/main.cpp b/tools/incident_report/main.cpp
index 1d8809f6..4b67a3e98 100644
--- a/tools/incident_report/main.cpp
+++ b/tools/incident_report/main.cpp
@@ -529,6 +529,7 @@
args[argpos++] = NULL;
execvp(args[0], (char*const*)args);
fprintf(stderr, "execvp failed: %s\n", strerror(errno));
+ free(args);
return 0;
} else {
// parent
diff --git a/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java b/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java
index ee0e36c..81a0773 100644
--- a/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java
+++ b/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java
@@ -18,7 +18,6 @@
import java.util.LinkedList;
import java.util.List;
import org.objectweb.asm.ClassVisitor;
-import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.TryCatchBlockSorter;
@@ -101,7 +100,7 @@
try {
a.analyze(owner, mn);
} catch (AnalyzerException e) {
- e.printStackTrace();
+ throw new RuntimeException("Locked region code injection: " + e.getMessage(), e);
}
InsnList instructions = mn.instructions;
diff --git a/tools/sdkparcelables/src/com/android/sdkparcelables/AncestorCollector.kt b/tools/sdkparcelables/src/com/android/sdkparcelables/AncestorCollector.kt
index f278aec..d75aea5 100644
--- a/tools/sdkparcelables/src/com/android/sdkparcelables/AncestorCollector.kt
+++ b/tools/sdkparcelables/src/com/android/sdkparcelables/AncestorCollector.kt
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
package com.android.sdkparcelables
import org.objectweb.asm.ClassVisitor
@@ -25,4 +41,4 @@
super.visit(version, access, name, signature, superName, interfaces)
}
-}
\ No newline at end of file
+}
diff --git a/tools/sdkparcelables/src/com/android/sdkparcelables/Main.kt b/tools/sdkparcelables/src/com/android/sdkparcelables/Main.kt
index 3e9d92c..22e8d78 100644
--- a/tools/sdkparcelables/src/com/android/sdkparcelables/Main.kt
+++ b/tools/sdkparcelables/src/com/android/sdkparcelables/Main.kt
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
package com.android.sdkparcelables
import org.objectweb.asm.ClassReader
@@ -53,4 +69,4 @@
fun usage() {
System.err.println("Usage: <input jar> <output aidl>")
kotlin.system.exitProcess(1)
-}
\ No newline at end of file
+}
diff --git a/tools/sdkparcelables/src/com/android/sdkparcelables/ParcelableDetector.kt b/tools/sdkparcelables/src/com/android/sdkparcelables/ParcelableDetector.kt
index 620f798..45027b5 100644
--- a/tools/sdkparcelables/src/com/android/sdkparcelables/ParcelableDetector.kt
+++ b/tools/sdkparcelables/src/com/android/sdkparcelables/ParcelableDetector.kt
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
package com.android.sdkparcelables
/** A class that uses an ancestor map to find all classes that
@@ -11,6 +27,8 @@
impl.build()
return impl.parcelables
}
+
+ const val PARCELABLE_CLASS = "android/os/Parcelable"
}
private class Impl(val ancestors: Map<String, Ancestors>) {
@@ -19,7 +37,7 @@
fun build() {
val classList = ancestors.keys
- classList.filterTo(parcelables, this::isParcelable)
+ classList.filterTo(parcelables, { (it != PARCELABLE_CLASS) && isParcelable(it) })
parcelables.sort()
}
@@ -28,7 +46,7 @@
return false
}
- if (c == "android/os/Parcelable") {
+ if (c == PARCELABLE_CLASS) {
return true
}
diff --git a/tools/sdkparcelables/tests/com/android/sdkparcelables/ParcelableDetectorTest.kt b/tools/sdkparcelables/tests/com/android/sdkparcelables/ParcelableDetectorTest.kt
index edfc825..f08173d 100644
--- a/tools/sdkparcelables/tests/com/android/sdkparcelables/ParcelableDetectorTest.kt
+++ b/tools/sdkparcelables/tests/com/android/sdkparcelables/ParcelableDetectorTest.kt
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
package com.android.sdkparcelables
import junit.framework.TestCase.assertEquals
@@ -12,7 +28,7 @@
val parcelables = ParcelableDetector.ancestorsToParcelables(ancestorMap)
- assertEquals(parcelables, listOf("android/os/Parcelable", "android/test/Parcelable"))
+ assertEquals(parcelables, listOf("android/test/Parcelable"))
}
@Test
@@ -23,7 +39,7 @@
val parcelables = ParcelableDetector.ancestorsToParcelables(ancestorMap)
- assertEquals(parcelables, listOf("android/os/Parcelable", "android/test/Parcelable"))
+ assertEquals(parcelables, listOf("android/test/Parcelable"))
}
@Test
@@ -35,7 +51,7 @@
val parcelables = ParcelableDetector.ancestorsToParcelables(ancestorMap)
- assertEquals(parcelables, listOf("android/os/Parcelable", "android/test/Parcelable", "android/test/SuperParcelable"))
+ assertEquals(parcelables, listOf("android/test/Parcelable", "android/test/SuperParcelable"))
}
@Test
@@ -47,7 +63,7 @@
val parcelables = ParcelableDetector.ancestorsToParcelables(ancestorMap)
- assertEquals(parcelables, listOf("android/os/Parcelable", "android/test/IParcelable", "android/test/Parcelable"))
+ assertEquals(parcelables, listOf("android/test/IParcelable", "android/test/Parcelable"))
}
}
diff --git a/vr/Android.bp b/vr/Android.bp
new file mode 100644
index 0000000..b5904d6
--- /dev/null
+++ b/vr/Android.bp
@@ -0,0 +1,40 @@
+// 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.
+
+// Library to perform dlopen on the actual shared library.
+cc_library_shared {
+ name: "libdvr_loader",
+ owner: "google",
+ srcs: ["dvr_library_loader.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
+
+// Java platform library for vr stuff.
+java_library {
+ name: "com.google.vr.platform",
+ owner: "google",
+ required: [
+ "libdvr_loader",
+ "libdvr",
+ ],
+ srcs: ["java/**/*.java"],
+}
+
+prebuilt_etc_xml {
+ name: "com.google.vr.platform.xml",
+ src: "com.google.vr.platform.xml",
+}
diff --git a/vr/Android.mk b/vr/Android.mk
deleted file mode 100644
index 73e9f23..0000000
--- a/vr/Android.mk
+++ /dev/null
@@ -1,39 +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)
-
-# Library to perform dlopen on the actual shared library.
-include $(CLEAR_VARS)
-LOCAL_MODULE := libdvr_loader
-LOCAL_MODULE_OWNER := google
-LOCAL_SRC_FILES := dvr_library_loader.cpp
-LOCAL_CFLAGS := -Wall -Werror
-include $(BUILD_SHARED_LIBRARY)
-
-# Java platform library for vr stuff.
-include $(CLEAR_VARS)
-LOCAL_MODULE := com.google.vr.platform
-LOCAL_MODULE_OWNER := google
-LOCAL_REQUIRED_MODULES := libdvr_loader libdvr
-LOCAL_SRC_FILES := $(call all-java-files-under, java)
-include $(BUILD_JAVA_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := com.google.vr.platform.xml
-LOCAL_SRC_FILES := com.google.vr.platform.xml
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_OWNER := google
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
-include $(BUILD_PREBUILT)
diff --git a/wifi/tests/Android.mk b/wifi/tests/Android.mk
index c98e40a..3d535f0 100644
--- a/wifi/tests/Android.mk
+++ b/wifi/tests/Android.mk
@@ -34,10 +34,6 @@
# This only works if the class name matches the file name and the directory structure
# matches the package.
local_classes := $(subst /,.,$(patsubst src/%.java,%,$(local_java_files)))
-# Utility variables to allow replacing a space with a comma
-comma:= ,
-empty:=
-space:= $(empty) $(empty)
# Convert class name list to jacoco exclude list
# This appends a * to all classes and replace the space separators with commas.
# These patterns will match all classes in this module and their inner classes.
@@ -60,6 +56,7 @@
android.test.runner \
LOCAL_PACKAGE_NAME := FrameworksWifiApiTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
include $(BUILD_PACKAGE)
diff --git a/wifi/tests/src/android/net/wifi/WifiManagerTest.java b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
index b235ccc7..8ac659f 100644
--- a/wifi/tests/src/android/net/wifi/WifiManagerTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
@@ -599,6 +599,7 @@
/**
* Verify the watchLocalOnlyHotspot call goes to WifiServiceImpl.
*/
+ @Test
public void testWatchLocalOnlyHotspot() throws Exception {
TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
index 9bfc010..71e6859 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
@@ -263,6 +263,7 @@
*
* @throws Exception
*/
+ @Test
public void validateCertCredentialWithoutCaCert() throws Exception {
Credential cred = createCredentialWithCertificateCredential();
cred.setCaCertificate(null);