From 2d81effc15a31d639dc04a7a6d071ed8e74f9423 Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Wed, 11 Jul 2018 15:19:22 -0700 Subject: [PATCH 01/71] Add offline/online-sdk-docs in Soong. Since support libraries have been migrated to Soong, these docs modules currently are ready to be supported in Soong. Bug: b/70351683 Test: m -j offline-sdk-docs Change-Id: I8739d94909c7cc830c30fa3d1047d26761cc5076 --- Android.bp | 303 ++++++++++++++++++++++++++++++++++++++++++-- Android.mk | 365 +---------------------------------------------------- 2 files changed, 300 insertions(+), 368 deletions(-) diff --git a/Android.bp b/Android.bp index ae91a094cbba..6a3e56cf6c4d 100644 --- a/Android.bp +++ b/Android.bp @@ -996,6 +996,7 @@ framework_docs_args = "-android -manifest $(location core/res/AndroidManifest.xm "-since $(location 26/public/api/android.txt) 26 " + "-since $(location 27/public/api/android.txt) 27 " + "-since $(location 28/public/api/android.txt) 28 " + + "-since $(location api/current.txt) Q " + "-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. @@ -1003,7 +1004,7 @@ framework_docs_args = "-android -manifest $(location core/res/AndroidManifest.xm "-federationapi SupportLib $(location current/support-api.txt) " doc_defaults { - name: "framework-docs-default", + name: "api-stubs-default", srcs: [ ":opt-telephony-srcs", ":opt-net-voip-srcs", @@ -1053,7 +1054,7 @@ doc_defaults { droiddoc { name: "api-stubs-docs", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", @@ -1086,7 +1087,7 @@ droiddoc { droiddoc { name: "system-api-stubs-docs", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", @@ -1120,7 +1121,7 @@ droiddoc { droiddoc { name: "test-api-stubs-docs", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", @@ -1145,6 +1146,286 @@ droiddoc { }, } +doc_defaults { + name: "framework-docs-default", + srcs: [ + "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", + "test-mock/src/**/*.java", + "test-runner/src/**/*.java", + ], + exclude_srcs: [ + ":annotated_ojluni_files", + ], + srcs_lib: "framework", + srcs_lib_whitelist_dirs: frameworks_base_subdirs, + srcs_lib_whitelist_pkgs: packages_to_document, + libs: [ + "voip-common", + "android.test.mock", + "android-support-annotations", + "android-support-compat", + "android-support-core-ui", + "android-support-core-utils", + "android-support-customtabs", + "android-support-design", + "android-support-dynamic-animation", + "android-support-exifinterface", + "android-support-fragment", + "android-support-media-compat", + "android-support-percent", + "android-support-recommendation", + "android-support-transition", + "android-support-tv-provider", + "android-support-v7-cardview", + "android-support-v7-gridlayout", + "android-support-v7-mediarouter", + "android-support-v7-palette", + "android-support-v7-preference", + "android-support-v13", + "android-support-v14-preference", + "android-support-v17-leanback", + "android-support-v17-preference-leanback", + "android-support-wear", + "android-support-vectordrawable", + "android-support-animatedvectordrawable", + "android-support-v7-appcompat", + "android-support-v7-recyclerview", + "android-support-emoji", + "android-support-emoji-appcompat", + "android-support-emoji-bundled", + "android-support-v8-renderscript", + "android-support-multidex", + "android-support-multidex-instrumentation", + ], + local_sourcepaths: frameworks_base_subdirs, + html_dirs: [ + "docs/html", + ], + knowntags: [ + "docs/knowntags.txt", + ":known-oj-tags", + ], + custom_template: "droiddoc-templates-sdk", + resourcesdir: "docs/html/reference/images/", + resourcesoutdir: "reference/android/images/", + hdf: [ + "dac true", + "sdk.codename O", + "sdk.preview.version 1", + "sdk.version 7.0", + "sdk.rel.id 1", + "sdk.preview 0", + ], + arg_files: [ + "core/res/AndroidManifest.xml", + ":api-version-xml", + "core/java/overview.html", + ":current-support-api", + "api/current.txt", + ], + create_stubs: false, +} + +droiddoc { + name: "doc-comment-check-docs", + defaults: ["framework-docs-default"], + args: framework_docs_args + " -referenceonly -parsecomments", + installable: false, +} + +droiddoc { + name: "offline-sdk-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc offline", + ], + proofread_file: "offline-sdk-docs-proofrerad.txt", + args: framework_docs_args + " -offlinemode -title \"Android SDK\"", + write_sdk_values: true, + static_doc_index_redirect: "docs/docs-preview-index.html", +} + +droiddoc { + name: "offline-sdk-referenceonly-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc offline", + ], + proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt", + args: framework_docs_args + " -offlinemode -title \"Android SDK\" -referenceonly", + write_sdk_values: true, + static_doc_index_redirect: "docs/docs-documentation-redirect.html", + static_doc_properties: "docs/source.properties", +} + +droiddoc { + name: "offline-system-sdk-referenceonly-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc offline", + ], + proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt", + args: framework_docs_args + " -hide 101 -hide 104 -hide 108" + + " -showAnnotation android.annotation.SystemApi " + + " -offlinemode -title \"Android System SDK\" -referenceonly", + write_sdk_values: true, + static_doc_index_redirect: "docs/docs-documentation-redirect.html", + static_doc_properties: "docs/source.properties", +} + +droiddoc { + name: "online-sdk-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + "android.hasSamples true", + ], + proofread_file: "online-sdk-docs-proofrerad.txt", + args: framework_docs_args + + " -toroot / -samplegroup Admin " + + " -samplegroup Background " + + " -samplegroup Connectivity " + + " -samplegroup Content " + + " -samplegroup Input " + + " -samplegroup Media " + + " -samplegroup Notification " + + " -samplegroup RenderScript " + + " -samplegroup Security " + + " -samplegroup Sensors " + + " -samplegroup System " + + " -samplegroup Testing " + + " -samplegroup UI " + + " -samplegroup Views " + + " -samplegroup Wearable -samplesdir development/samples/browseable ", +} + +droiddoc { + name: "online-system-api-sdk-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + "android.hasSamples true", + ], + proofread_file: "online-system-api-sdk-docs-proofrerad.txt", + args: framework_docs_args + + " -referenceonly " + + " -showAnnotation android.annotation.SystemApi " + + " -title \"Android SDK - Including system APIs.\" " + + " -hide 101 " + + " -hide 104 " + + " -hide 108 " + + " -toroot / -samplegroup Admin " + + " -samplegroup Background " + + " -samplegroup Connectivity " + + " -samplegroup Content " + + " -samplegroup Input " + + " -samplegroup Media " + + " -samplegroup Notification " + + " -samplegroup RenderScript " + + " -samplegroup Security " + + " -samplegroup Sensors " + + " -samplegroup System " + + " -samplegroup Testing " + + " -samplegroup UI " + + " -samplegroup Views " + + " -samplegroup Wearable -samplesdir development/samples/browseable ", + installable: false, +} + +droiddoc { + name: "ds-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + "android.hasSamples true", + ], + proofread_file: "ds-docs-proofrerad.txt", + args: framework_docs_args + + " -toroot / -samplegroup Admin " + + " -samplegroup Background " + + " -samplegroup Connectivity " + + " -samplegroup Content " + + " -samplegroup Input " + + " -samplegroup Media " + + " -samplegroup Notification " + + " -samplegroup RenderScript " + + " -samplegroup Security " + + " -samplegroup Sensors " + + " -samplegroup System " + + " -samplegroup Testing " + + " -samplegroup UI " + + " -samplegroup Views " + + " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ", +} + +droiddoc { + name: "ds-static-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + ], + proofread_file: "ds-static-docs-proofrerad.txt", + args: framework_docs_args + + " -staticonly " + + " -toroot / " + + " -devsite " + + " -ignoreJdLinks ", +} + +droiddoc { + name: "ds-ref-navtree-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + ], + proofread_file: "ds-ref-navtree-docs-proofrerad.txt", + args: framework_docs_args + + " -toroot / " + + " -atLinksNavtree " + + " -navtreeonly ", +} + +droiddoc { + name: "online-sdk-dev-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + "android.hasSamples true", + ], + proofread_file: "online-sdk-dev-docs-proofrerad.txt", + args: framework_docs_args + + " -toroot / -samplegroup Admin " + + " -samplegroup Background " + + " -samplegroup Connectivity " + + " -samplegroup Content " + + " -samplegroup Input " + + " -samplegroup Media " + + " -samplegroup Notification " + + " -samplegroup RenderScript " + + " -samplegroup Security " + + " -samplegroup Sensors " + + " -samplegroup System " + + " -samplegroup Testing " + + " -samplegroup UI " + + " -samplegroup Views " + + " -samplegroup Wearable -samplesdir development/samples/browseable ", +} + +droiddoc { + name: "hidden-docs", + defaults: ["framework-docs-default"], + proofread_file: "hidden-docs-proofrerad.txt", + args: framework_docs_args + + " -referenceonly " + + " -title \"Android SDK - Including hidden APIs.\"", +} + droiddoc { name: "hwbinder-stubs-docs", srcs: [ @@ -1178,12 +1459,13 @@ java_library_static { droiddoc { name: "hiddenapi-lists", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", "core/java/overview.html", ":current-support-api", + "api/current.txt", ], dex_api_filename: "public-dex.txt", private_dex_api_filename: "private-dex.txt", @@ -1198,12 +1480,13 @@ droiddoc { droiddoc { name: "hiddenapi-mappings", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", "core/java/overview.html", ":current-support-api", + "api/current.txt", ], dex_mapping_filename: "dex-mapping.txt", args: framework_docs_args + @@ -1247,7 +1530,7 @@ metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.x "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo" doc_defaults { - name: "metalava-framework-docs-default", + name: "metalava-api-stubs-default", srcs: [ ":opt-telephony-srcs", ":opt-net-voip-srcs", @@ -1283,7 +1566,7 @@ doc_defaults { droiddoc { name: "metalava-api-stubs-docs", - defaults: ["metalava-framework-docs-default"], + defaults: ["metalava-api-stubs-default"], api_tag_name: "METALAVA_PUBLIC", api_filename: "public_api.txt", private_api_filename: "private.txt", @@ -1296,7 +1579,7 @@ droiddoc { droiddoc { name: "metalava-system-api-stubs-docs", - defaults: ["metalava-framework-docs-default"], + defaults: ["metalava-api-stubs-default"], api_tag_name: "METALAVA_SYSTEM", api_filename: "system-api.txt", private_api_filename: "system-private.txt", @@ -1310,7 +1593,7 @@ droiddoc { droiddoc { name: "metalava-test-api-stubs-docs", - defaults: ["metalava-framework-docs-default"], + defaults: ["metalava-api-stubs-default"], api_tag_name: "METALAVA_TEST", api_filename: "test-api.txt", removed_api_filename: "test-removed.txt", diff --git a/Android.mk b/Android.mk index 7890983e8a24..2883f3441882 100644 --- a/Android.mk +++ b/Android.mk @@ -311,364 +311,13 @@ $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE)) $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE)) $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE)) -# ==== check javadoc comments but don't generate docs ======== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := doc-comment-check - -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -referenceonly \ - -parsecomments - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -LOCAL_UNINSTALLABLE_MODULE := true - -include $(BUILD_DROIDDOC) - -# Run this for checkbuild -checkbuild: doc-comment-check-docs -# Check comment when you are updating the API -update-api: doc-comment-check-docs - -# ==== static html in the sdk ================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := offline-sdk - -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -offlinemode \ - -title "Android SDK" \ - -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ - -sdkvalues $(OUT_DOCS) \ - -hdf android.whichdoc offline - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -static_doc_index_redirect := $(out_dir)/index.html -$(static_doc_index_redirect): \ - $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP) - $(hide) mkdir -p $(dir $@) - $(hide) $(ACP) $< $@ - -$(full_target): $(static_doc_index_redirect) - - -# ==== Public API static reference docs ================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := offline-sdk-referenceonly - -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -offlinemode \ - -title "Android SDK" \ - -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ - -sdkvalues $(OUT_DOCS) \ - -hdf android.whichdoc offline \ - -referenceonly - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -static_doc_index_redirect := $(out_dir)/index.html -$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html - $(copy-file-to-target) - -static_doc_properties := $(out_dir)/source.properties -$(static_doc_properties): \ - $(LOCAL_PATH)/docs/source.properties | $(ACP) - $(hide) mkdir -p $(dir $@) - $(hide) $(ACP) $< $@ - -$(full_target): $(static_doc_index_redirect) -$(full_target): $(static_doc_properties) - - -# ==== System API static reference docs ================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := offline-system-sdk-referenceonly - -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -hide 101 -hide 104 -hide 108 \ - -showAnnotation android.annotation.SystemApi \ - -offlinemode \ - -title "Android System SDK" \ - -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ - -sdkvalues $(OUT_DOCS) \ - -hdf android.whichdoc offline \ - -referenceonly - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -static_doc_index_redirect := $(out_dir)/index.html -$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html - $(copy-file-to-target) - -static_doc_properties := $(out_dir)/source.properties -$(static_doc_properties): \ - $(LOCAL_PATH)/docs/source.properties | $(ACP) - $(hide) mkdir -p $(dir $@) - $(hide) $(ACP) $< $@ - -$(full_target): $(static_doc_index_redirect) -$(full_target): $(static_doc_properties) -$(full_target): $(framework_built) - - -# ==== docs for the web (on the androiddevdocs app engine server) ======================= -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := online-sdk - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -toroot / \ - -hdf android.whichdoc online \ - $(sample_groups) \ - -hdf android.hasSamples true \ - -samplesdir $(samples_dir) - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== docs for the web (on the androiddevdocs app engine server) ======================= -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := online-system-api-sdk - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -referenceonly \ - -showAnnotation android.annotation.SystemApi \ - -title "Android SDK - Including system APIs." \ - -toroot / \ - -hide 101 \ - -hide 104 \ - -hide 108 \ - -hdf android.whichdoc online \ - $(sample_groups) \ - -hdf android.hasSamples true \ - -samplesdir $(samples_dir) - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -LOCAL_UNINSTALLABLE_MODULE := true - -include $(BUILD_DROIDDOC) - -# ==== docs for the web (on the devsite app engine server) ======================= -include $(CLEAR_VARS) -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -# specify a second html input dir and an output path relative to OUT_DIR) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := ds - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -toroot / \ - -hdf android.whichdoc online \ - -devsite \ - -yamlV2 \ - $(sample_groups) \ - -hdf android.hasSamples true \ - -samplesdir $(samples_dir) - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== docs for the web (on the devsite app engine server) ======================= -include $(CLEAR_VARS) -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -# specify a second html input dir and an output path relative to OUT_DIR) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := ds-static - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -hdf android.whichdoc online \ - -staticonly \ - -toroot / \ - -devsite \ - -ignoreJdLinks - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== generates full navtree for resolving @links in ds postprocessing ==== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) -LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) -LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) -LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := ds-ref-navtree - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -hdf android.whichdoc online \ - -toroot / \ - -atLinksNavtree \ - -navtreeonly - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== site updates for docs (on the androiddevdocs app engine server) ======================= -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := online-sdk-dev - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -toroot / \ - -hdf android.whichdoc online \ - $(sample_groups) \ - -hdf android.hasSamples true \ - -samplesdir $(samples_dir) - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== docs that have all of the stuff that's @hidden ======================= -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := hidden -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -referenceonly \ - -title "Android SDK - Including hidden APIs." -# -hidden - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) +# sdk.atree needs to copy the whole dir: $(OUT_DOCS)/offline-sdk to the final zip. +# So keep offline-sdk-timestamp target here, and unzip offline-sdk-docs.zip to +# $(OUT_DOCS)/offline-sdk. +$(OUT_DOCS)/offline-sdk-timestamp: $(OUT_DOCS)/offline-sdk-docs-docs.zip + $(hide) rm -rf $(OUT_DOCS)/offline-sdk + $(hide) mkdir -p $(OUT_DOCS)/offline-sdk + ( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1 # ==== java proto device library (for test only) ============================== include $(CLEAR_VARS) -- GitLab From 3c47f131d342fd0d3cfb0104610300f97d3cbfbd Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Thu, 26 Jul 2018 02:16:31 +0000 Subject: [PATCH 02/71] Revert "Add offline/online-sdk-docs in Soong." This reverts commit 2d81effc15a31d639dc04a7a6d071ed8e74f9423. Reason for revert: Change-Id: I3b7c7f291723789a9bd232b133af9737df6e7967 --- Android.bp | 303 ++------------------------------------------ Android.mk | 365 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 368 insertions(+), 300 deletions(-) diff --git a/Android.bp b/Android.bp index 6a3e56cf6c4d..ae91a094cbba 100644 --- a/Android.bp +++ b/Android.bp @@ -996,7 +996,6 @@ framework_docs_args = "-android -manifest $(location core/res/AndroidManifest.xm "-since $(location 26/public/api/android.txt) 26 " + "-since $(location 27/public/api/android.txt) 27 " + "-since $(location 28/public/api/android.txt) 28 " + - "-since $(location api/current.txt) Q " + "-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. @@ -1004,7 +1003,7 @@ framework_docs_args = "-android -manifest $(location core/res/AndroidManifest.xm "-federationapi SupportLib $(location current/support-api.txt) " doc_defaults { - name: "api-stubs-default", + name: "framework-docs-default", srcs: [ ":opt-telephony-srcs", ":opt-net-voip-srcs", @@ -1054,7 +1053,7 @@ doc_defaults { droiddoc { name: "api-stubs-docs", - defaults: ["api-stubs-default"], + defaults: ["framework-docs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", @@ -1087,7 +1086,7 @@ droiddoc { droiddoc { name: "system-api-stubs-docs", - defaults: ["api-stubs-default"], + defaults: ["framework-docs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", @@ -1121,7 +1120,7 @@ droiddoc { droiddoc { name: "test-api-stubs-docs", - defaults: ["api-stubs-default"], + defaults: ["framework-docs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", @@ -1146,286 +1145,6 @@ droiddoc { }, } -doc_defaults { - name: "framework-docs-default", - srcs: [ - "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", - "test-mock/src/**/*.java", - "test-runner/src/**/*.java", - ], - exclude_srcs: [ - ":annotated_ojluni_files", - ], - srcs_lib: "framework", - srcs_lib_whitelist_dirs: frameworks_base_subdirs, - srcs_lib_whitelist_pkgs: packages_to_document, - libs: [ - "voip-common", - "android.test.mock", - "android-support-annotations", - "android-support-compat", - "android-support-core-ui", - "android-support-core-utils", - "android-support-customtabs", - "android-support-design", - "android-support-dynamic-animation", - "android-support-exifinterface", - "android-support-fragment", - "android-support-media-compat", - "android-support-percent", - "android-support-recommendation", - "android-support-transition", - "android-support-tv-provider", - "android-support-v7-cardview", - "android-support-v7-gridlayout", - "android-support-v7-mediarouter", - "android-support-v7-palette", - "android-support-v7-preference", - "android-support-v13", - "android-support-v14-preference", - "android-support-v17-leanback", - "android-support-v17-preference-leanback", - "android-support-wear", - "android-support-vectordrawable", - "android-support-animatedvectordrawable", - "android-support-v7-appcompat", - "android-support-v7-recyclerview", - "android-support-emoji", - "android-support-emoji-appcompat", - "android-support-emoji-bundled", - "android-support-v8-renderscript", - "android-support-multidex", - "android-support-multidex-instrumentation", - ], - local_sourcepaths: frameworks_base_subdirs, - html_dirs: [ - "docs/html", - ], - knowntags: [ - "docs/knowntags.txt", - ":known-oj-tags", - ], - custom_template: "droiddoc-templates-sdk", - resourcesdir: "docs/html/reference/images/", - resourcesoutdir: "reference/android/images/", - hdf: [ - "dac true", - "sdk.codename O", - "sdk.preview.version 1", - "sdk.version 7.0", - "sdk.rel.id 1", - "sdk.preview 0", - ], - arg_files: [ - "core/res/AndroidManifest.xml", - ":api-version-xml", - "core/java/overview.html", - ":current-support-api", - "api/current.txt", - ], - create_stubs: false, -} - -droiddoc { - name: "doc-comment-check-docs", - defaults: ["framework-docs-default"], - args: framework_docs_args + " -referenceonly -parsecomments", - installable: false, -} - -droiddoc { - name: "offline-sdk-docs", - defaults: ["framework-docs-default"], - hdf: [ - "android.whichdoc offline", - ], - proofread_file: "offline-sdk-docs-proofrerad.txt", - args: framework_docs_args + " -offlinemode -title \"Android SDK\"", - write_sdk_values: true, - static_doc_index_redirect: "docs/docs-preview-index.html", -} - -droiddoc { - name: "offline-sdk-referenceonly-docs", - defaults: ["framework-docs-default"], - hdf: [ - "android.whichdoc offline", - ], - proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt", - args: framework_docs_args + " -offlinemode -title \"Android SDK\" -referenceonly", - write_sdk_values: true, - static_doc_index_redirect: "docs/docs-documentation-redirect.html", - static_doc_properties: "docs/source.properties", -} - -droiddoc { - name: "offline-system-sdk-referenceonly-docs", - defaults: ["framework-docs-default"], - hdf: [ - "android.whichdoc offline", - ], - proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt", - args: framework_docs_args + " -hide 101 -hide 104 -hide 108" + - " -showAnnotation android.annotation.SystemApi " + - " -offlinemode -title \"Android System SDK\" -referenceonly", - write_sdk_values: true, - static_doc_index_redirect: "docs/docs-documentation-redirect.html", - static_doc_properties: "docs/source.properties", -} - -droiddoc { - name: "online-sdk-docs", - defaults: ["framework-docs-default"], - hdf: [ - "android.whichdoc online", - "android.hasSamples true", - ], - proofread_file: "online-sdk-docs-proofrerad.txt", - args: framework_docs_args + - " -toroot / -samplegroup Admin " + - " -samplegroup Background " + - " -samplegroup Connectivity " + - " -samplegroup Content " + - " -samplegroup Input " + - " -samplegroup Media " + - " -samplegroup Notification " + - " -samplegroup RenderScript " + - " -samplegroup Security " + - " -samplegroup Sensors " + - " -samplegroup System " + - " -samplegroup Testing " + - " -samplegroup UI " + - " -samplegroup Views " + - " -samplegroup Wearable -samplesdir development/samples/browseable ", -} - -droiddoc { - name: "online-system-api-sdk-docs", - defaults: ["framework-docs-default"], - hdf: [ - "android.whichdoc online", - "android.hasSamples true", - ], - proofread_file: "online-system-api-sdk-docs-proofrerad.txt", - args: framework_docs_args + - " -referenceonly " + - " -showAnnotation android.annotation.SystemApi " + - " -title \"Android SDK - Including system APIs.\" " + - " -hide 101 " + - " -hide 104 " + - " -hide 108 " + - " -toroot / -samplegroup Admin " + - " -samplegroup Background " + - " -samplegroup Connectivity " + - " -samplegroup Content " + - " -samplegroup Input " + - " -samplegroup Media " + - " -samplegroup Notification " + - " -samplegroup RenderScript " + - " -samplegroup Security " + - " -samplegroup Sensors " + - " -samplegroup System " + - " -samplegroup Testing " + - " -samplegroup UI " + - " -samplegroup Views " + - " -samplegroup Wearable -samplesdir development/samples/browseable ", - installable: false, -} - -droiddoc { - name: "ds-docs", - defaults: ["framework-docs-default"], - hdf: [ - "android.whichdoc online", - "android.hasSamples true", - ], - proofread_file: "ds-docs-proofrerad.txt", - args: framework_docs_args + - " -toroot / -samplegroup Admin " + - " -samplegroup Background " + - " -samplegroup Connectivity " + - " -samplegroup Content " + - " -samplegroup Input " + - " -samplegroup Media " + - " -samplegroup Notification " + - " -samplegroup RenderScript " + - " -samplegroup Security " + - " -samplegroup Sensors " + - " -samplegroup System " + - " -samplegroup Testing " + - " -samplegroup UI " + - " -samplegroup Views " + - " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ", -} - -droiddoc { - name: "ds-static-docs", - defaults: ["framework-docs-default"], - hdf: [ - "android.whichdoc online", - ], - proofread_file: "ds-static-docs-proofrerad.txt", - args: framework_docs_args + - " -staticonly " + - " -toroot / " + - " -devsite " + - " -ignoreJdLinks ", -} - -droiddoc { - name: "ds-ref-navtree-docs", - defaults: ["framework-docs-default"], - hdf: [ - "android.whichdoc online", - ], - proofread_file: "ds-ref-navtree-docs-proofrerad.txt", - args: framework_docs_args + - " -toroot / " + - " -atLinksNavtree " + - " -navtreeonly ", -} - -droiddoc { - name: "online-sdk-dev-docs", - defaults: ["framework-docs-default"], - hdf: [ - "android.whichdoc online", - "android.hasSamples true", - ], - proofread_file: "online-sdk-dev-docs-proofrerad.txt", - args: framework_docs_args + - " -toroot / -samplegroup Admin " + - " -samplegroup Background " + - " -samplegroup Connectivity " + - " -samplegroup Content " + - " -samplegroup Input " + - " -samplegroup Media " + - " -samplegroup Notification " + - " -samplegroup RenderScript " + - " -samplegroup Security " + - " -samplegroup Sensors " + - " -samplegroup System " + - " -samplegroup Testing " + - " -samplegroup UI " + - " -samplegroup Views " + - " -samplegroup Wearable -samplesdir development/samples/browseable ", -} - -droiddoc { - name: "hidden-docs", - defaults: ["framework-docs-default"], - proofread_file: "hidden-docs-proofrerad.txt", - args: framework_docs_args + - " -referenceonly " + - " -title \"Android SDK - Including hidden APIs.\"", -} - droiddoc { name: "hwbinder-stubs-docs", srcs: [ @@ -1459,13 +1178,12 @@ java_library_static { droiddoc { name: "hiddenapi-lists", - defaults: ["api-stubs-default"], + defaults: ["framework-docs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", "core/java/overview.html", ":current-support-api", - "api/current.txt", ], dex_api_filename: "public-dex.txt", private_dex_api_filename: "private-dex.txt", @@ -1480,13 +1198,12 @@ droiddoc { droiddoc { name: "hiddenapi-mappings", - defaults: ["api-stubs-default"], + defaults: ["framework-docs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", "core/java/overview.html", ":current-support-api", - "api/current.txt", ], dex_mapping_filename: "dex-mapping.txt", args: framework_docs_args + @@ -1530,7 +1247,7 @@ metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.x "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo" doc_defaults { - name: "metalava-api-stubs-default", + name: "metalava-framework-docs-default", srcs: [ ":opt-telephony-srcs", ":opt-net-voip-srcs", @@ -1566,7 +1283,7 @@ doc_defaults { droiddoc { name: "metalava-api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-framework-docs-default"], api_tag_name: "METALAVA_PUBLIC", api_filename: "public_api.txt", private_api_filename: "private.txt", @@ -1579,7 +1296,7 @@ droiddoc { droiddoc { name: "metalava-system-api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-framework-docs-default"], api_tag_name: "METALAVA_SYSTEM", api_filename: "system-api.txt", private_api_filename: "system-private.txt", @@ -1593,7 +1310,7 @@ droiddoc { droiddoc { name: "metalava-test-api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-framework-docs-default"], api_tag_name: "METALAVA_TEST", api_filename: "test-api.txt", removed_api_filename: "test-removed.txt", diff --git a/Android.mk b/Android.mk index 2883f3441882..7890983e8a24 100644 --- a/Android.mk +++ b/Android.mk @@ -311,13 +311,364 @@ $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE)) $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE)) $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE)) -# sdk.atree needs to copy the whole dir: $(OUT_DOCS)/offline-sdk to the final zip. -# So keep offline-sdk-timestamp target here, and unzip offline-sdk-docs.zip to -# $(OUT_DOCS)/offline-sdk. -$(OUT_DOCS)/offline-sdk-timestamp: $(OUT_DOCS)/offline-sdk-docs-docs.zip - $(hide) rm -rf $(OUT_DOCS)/offline-sdk - $(hide) mkdir -p $(OUT_DOCS)/offline-sdk - ( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1 +# ==== check javadoc comments but don't generate docs ======== +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) + +LOCAL_MODULE := doc-comment-check + +LOCAL_DROIDDOC_OPTIONS:=\ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -referenceonly \ + -parsecomments + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +LOCAL_UNINSTALLABLE_MODULE := true + +include $(BUILD_DROIDDOC) + +# Run this for checkbuild +checkbuild: doc-comment-check-docs +# Check comment when you are updating the API +update-api: doc-comment-check-docs + +# ==== static html in the sdk ================================== +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) + +LOCAL_MODULE := offline-sdk + +LOCAL_DROIDDOC_OPTIONS:=\ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -offlinemode \ + -title "Android SDK" \ + -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ + -sdkvalues $(OUT_DOCS) \ + -hdf android.whichdoc offline + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +include $(BUILD_DROIDDOC) + +static_doc_index_redirect := $(out_dir)/index.html +$(static_doc_index_redirect): \ + $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP) + $(hide) mkdir -p $(dir $@) + $(hide) $(ACP) $< $@ + +$(full_target): $(static_doc_index_redirect) + + +# ==== Public API static reference docs ================================== +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) + +LOCAL_MODULE := offline-sdk-referenceonly + +LOCAL_DROIDDOC_OPTIONS:=\ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -offlinemode \ + -title "Android SDK" \ + -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ + -sdkvalues $(OUT_DOCS) \ + -hdf android.whichdoc offline \ + -referenceonly + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +include $(BUILD_DROIDDOC) + +static_doc_index_redirect := $(out_dir)/index.html +$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html + $(copy-file-to-target) + +static_doc_properties := $(out_dir)/source.properties +$(static_doc_properties): \ + $(LOCAL_PATH)/docs/source.properties | $(ACP) + $(hide) mkdir -p $(dir $@) + $(hide) $(ACP) $< $@ + +$(full_target): $(static_doc_index_redirect) +$(full_target): $(static_doc_properties) + + +# ==== System API static reference docs ================================== +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) + +LOCAL_MODULE := offline-system-sdk-referenceonly + +LOCAL_DROIDDOC_OPTIONS:=\ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -hide 101 -hide 104 -hide 108 \ + -showAnnotation android.annotation.SystemApi \ + -offlinemode \ + -title "Android System SDK" \ + -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ + -sdkvalues $(OUT_DOCS) \ + -hdf android.whichdoc offline \ + -referenceonly + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +include $(BUILD_DROIDDOC) + +static_doc_index_redirect := $(out_dir)/index.html +$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html + $(copy-file-to-target) + +static_doc_properties := $(out_dir)/source.properties +$(static_doc_properties): \ + $(LOCAL_PATH)/docs/source.properties | $(ACP) + $(hide) mkdir -p $(dir $@) + $(hide) $(ACP) $< $@ + +$(full_target): $(static_doc_index_redirect) +$(full_target): $(static_doc_properties) +$(full_target): $(framework_built) + + +# ==== docs for the web (on the androiddevdocs app engine server) ======================= +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) +LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / + +LOCAL_MODULE := online-sdk + +LOCAL_DROIDDOC_OPTIONS:= \ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -toroot / \ + -hdf android.whichdoc online \ + $(sample_groups) \ + -hdf android.hasSamples true \ + -samplesdir $(samples_dir) + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +include $(BUILD_DROIDDOC) + +# ==== docs for the web (on the androiddevdocs app engine server) ======================= +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) +LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / + +LOCAL_MODULE := online-system-api-sdk + +LOCAL_DROIDDOC_OPTIONS:= \ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -referenceonly \ + -showAnnotation android.annotation.SystemApi \ + -title "Android SDK - Including system APIs." \ + -toroot / \ + -hide 101 \ + -hide 104 \ + -hide 108 \ + -hdf android.whichdoc online \ + $(sample_groups) \ + -hdf android.hasSamples true \ + -samplesdir $(samples_dir) + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +LOCAL_UNINSTALLABLE_MODULE := true + +include $(BUILD_DROIDDOC) + +# ==== docs for the web (on the devsite app engine server) ======================= +include $(CLEAR_VARS) +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) +# specify a second html input dir and an output path relative to OUT_DIR) +LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / + +LOCAL_MODULE := ds + +LOCAL_DROIDDOC_OPTIONS:= \ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -toroot / \ + -hdf android.whichdoc online \ + -devsite \ + -yamlV2 \ + $(sample_groups) \ + -hdf android.hasSamples true \ + -samplesdir $(samples_dir) + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +include $(BUILD_DROIDDOC) + +# ==== docs for the web (on the devsite app engine server) ======================= +include $(CLEAR_VARS) +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) +# specify a second html input dir and an output path relative to OUT_DIR) +LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / + +LOCAL_MODULE := ds-static + +LOCAL_DROIDDOC_OPTIONS:= \ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -hdf android.whichdoc online \ + -staticonly \ + -toroot / \ + -devsite \ + -ignoreJdLinks + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +include $(BUILD_DROIDDOC) + +# ==== generates full navtree for resolving @links in ds postprocessing ==== +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) +LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) +LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) +LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) + +LOCAL_MODULE := ds-ref-navtree + +LOCAL_DROIDDOC_OPTIONS:= \ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -hdf android.whichdoc online \ + -toroot / \ + -atLinksNavtree \ + -navtreeonly + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +include $(BUILD_DROIDDOC) + +# ==== site updates for docs (on the androiddevdocs app engine server) ======================= +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) +LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / + +LOCAL_MODULE := online-sdk-dev + +LOCAL_DROIDDOC_OPTIONS:= \ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -toroot / \ + -hdf android.whichdoc online \ + $(sample_groups) \ + -hdf android.hasSamples true \ + -samplesdir $(samples_dir) + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +include $(BUILD_DROIDDOC) + +# ==== docs that have all of the stuff that's @hidden ======================= +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) +LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) +LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) +LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) +LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) + +LOCAL_MODULE := hidden +LOCAL_DROIDDOC_OPTIONS:=\ + $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ + -referenceonly \ + -title "Android SDK - Including hidden APIs." +# -hidden + +LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk + +include $(BUILD_DROIDDOC) # ==== java proto device library (for test only) ============================== include $(CLEAR_VARS) -- GitLab From 3e15ba88ec5a3a412d5714fea3549de14052bd27 Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Thu, 26 Jul 2018 18:41:12 +0000 Subject: [PATCH 03/71] Revert "Revert "Add offline/online-sdk-docs in Soong."" This reverts commit 3c47f131d342fd0d3cfb0104610300f97d3cbfbd. Reason for revert: Add offline/online-sdk-docs in Soong, attempt 2. This is the second attempt to merge this CL topic. The first attempt failed because . This CL fixes this by Test: m -j out/target/common/docs/offline-sdk-timestamp Bug: b/70351683 Change-Id: I338abfcfd3a15ce54436732f0d70c693a7e063c5 --- Android.bp | 303 ++++++++++++++++++++++++++++++++++++++++++-- Android.mk | 365 +---------------------------------------------------- 2 files changed, 300 insertions(+), 368 deletions(-) diff --git a/Android.bp b/Android.bp index ae91a094cbba..6a3e56cf6c4d 100644 --- a/Android.bp +++ b/Android.bp @@ -996,6 +996,7 @@ framework_docs_args = "-android -manifest $(location core/res/AndroidManifest.xm "-since $(location 26/public/api/android.txt) 26 " + "-since $(location 27/public/api/android.txt) 27 " + "-since $(location 28/public/api/android.txt) 28 " + + "-since $(location api/current.txt) Q " + "-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. @@ -1003,7 +1004,7 @@ framework_docs_args = "-android -manifest $(location core/res/AndroidManifest.xm "-federationapi SupportLib $(location current/support-api.txt) " doc_defaults { - name: "framework-docs-default", + name: "api-stubs-default", srcs: [ ":opt-telephony-srcs", ":opt-net-voip-srcs", @@ -1053,7 +1054,7 @@ doc_defaults { droiddoc { name: "api-stubs-docs", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", @@ -1086,7 +1087,7 @@ droiddoc { droiddoc { name: "system-api-stubs-docs", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", @@ -1120,7 +1121,7 @@ droiddoc { droiddoc { name: "test-api-stubs-docs", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", @@ -1145,6 +1146,286 @@ droiddoc { }, } +doc_defaults { + name: "framework-docs-default", + srcs: [ + "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", + "test-mock/src/**/*.java", + "test-runner/src/**/*.java", + ], + exclude_srcs: [ + ":annotated_ojluni_files", + ], + srcs_lib: "framework", + srcs_lib_whitelist_dirs: frameworks_base_subdirs, + srcs_lib_whitelist_pkgs: packages_to_document, + libs: [ + "voip-common", + "android.test.mock", + "android-support-annotations", + "android-support-compat", + "android-support-core-ui", + "android-support-core-utils", + "android-support-customtabs", + "android-support-design", + "android-support-dynamic-animation", + "android-support-exifinterface", + "android-support-fragment", + "android-support-media-compat", + "android-support-percent", + "android-support-recommendation", + "android-support-transition", + "android-support-tv-provider", + "android-support-v7-cardview", + "android-support-v7-gridlayout", + "android-support-v7-mediarouter", + "android-support-v7-palette", + "android-support-v7-preference", + "android-support-v13", + "android-support-v14-preference", + "android-support-v17-leanback", + "android-support-v17-preference-leanback", + "android-support-wear", + "android-support-vectordrawable", + "android-support-animatedvectordrawable", + "android-support-v7-appcompat", + "android-support-v7-recyclerview", + "android-support-emoji", + "android-support-emoji-appcompat", + "android-support-emoji-bundled", + "android-support-v8-renderscript", + "android-support-multidex", + "android-support-multidex-instrumentation", + ], + local_sourcepaths: frameworks_base_subdirs, + html_dirs: [ + "docs/html", + ], + knowntags: [ + "docs/knowntags.txt", + ":known-oj-tags", + ], + custom_template: "droiddoc-templates-sdk", + resourcesdir: "docs/html/reference/images/", + resourcesoutdir: "reference/android/images/", + hdf: [ + "dac true", + "sdk.codename O", + "sdk.preview.version 1", + "sdk.version 7.0", + "sdk.rel.id 1", + "sdk.preview 0", + ], + arg_files: [ + "core/res/AndroidManifest.xml", + ":api-version-xml", + "core/java/overview.html", + ":current-support-api", + "api/current.txt", + ], + create_stubs: false, +} + +droiddoc { + name: "doc-comment-check-docs", + defaults: ["framework-docs-default"], + args: framework_docs_args + " -referenceonly -parsecomments", + installable: false, +} + +droiddoc { + name: "offline-sdk-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc offline", + ], + proofread_file: "offline-sdk-docs-proofrerad.txt", + args: framework_docs_args + " -offlinemode -title \"Android SDK\"", + write_sdk_values: true, + static_doc_index_redirect: "docs/docs-preview-index.html", +} + +droiddoc { + name: "offline-sdk-referenceonly-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc offline", + ], + proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt", + args: framework_docs_args + " -offlinemode -title \"Android SDK\" -referenceonly", + write_sdk_values: true, + static_doc_index_redirect: "docs/docs-documentation-redirect.html", + static_doc_properties: "docs/source.properties", +} + +droiddoc { + name: "offline-system-sdk-referenceonly-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc offline", + ], + proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt", + args: framework_docs_args + " -hide 101 -hide 104 -hide 108" + + " -showAnnotation android.annotation.SystemApi " + + " -offlinemode -title \"Android System SDK\" -referenceonly", + write_sdk_values: true, + static_doc_index_redirect: "docs/docs-documentation-redirect.html", + static_doc_properties: "docs/source.properties", +} + +droiddoc { + name: "online-sdk-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + "android.hasSamples true", + ], + proofread_file: "online-sdk-docs-proofrerad.txt", + args: framework_docs_args + + " -toroot / -samplegroup Admin " + + " -samplegroup Background " + + " -samplegroup Connectivity " + + " -samplegroup Content " + + " -samplegroup Input " + + " -samplegroup Media " + + " -samplegroup Notification " + + " -samplegroup RenderScript " + + " -samplegroup Security " + + " -samplegroup Sensors " + + " -samplegroup System " + + " -samplegroup Testing " + + " -samplegroup UI " + + " -samplegroup Views " + + " -samplegroup Wearable -samplesdir development/samples/browseable ", +} + +droiddoc { + name: "online-system-api-sdk-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + "android.hasSamples true", + ], + proofread_file: "online-system-api-sdk-docs-proofrerad.txt", + args: framework_docs_args + + " -referenceonly " + + " -showAnnotation android.annotation.SystemApi " + + " -title \"Android SDK - Including system APIs.\" " + + " -hide 101 " + + " -hide 104 " + + " -hide 108 " + + " -toroot / -samplegroup Admin " + + " -samplegroup Background " + + " -samplegroup Connectivity " + + " -samplegroup Content " + + " -samplegroup Input " + + " -samplegroup Media " + + " -samplegroup Notification " + + " -samplegroup RenderScript " + + " -samplegroup Security " + + " -samplegroup Sensors " + + " -samplegroup System " + + " -samplegroup Testing " + + " -samplegroup UI " + + " -samplegroup Views " + + " -samplegroup Wearable -samplesdir development/samples/browseable ", + installable: false, +} + +droiddoc { + name: "ds-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + "android.hasSamples true", + ], + proofread_file: "ds-docs-proofrerad.txt", + args: framework_docs_args + + " -toroot / -samplegroup Admin " + + " -samplegroup Background " + + " -samplegroup Connectivity " + + " -samplegroup Content " + + " -samplegroup Input " + + " -samplegroup Media " + + " -samplegroup Notification " + + " -samplegroup RenderScript " + + " -samplegroup Security " + + " -samplegroup Sensors " + + " -samplegroup System " + + " -samplegroup Testing " + + " -samplegroup UI " + + " -samplegroup Views " + + " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ", +} + +droiddoc { + name: "ds-static-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + ], + proofread_file: "ds-static-docs-proofrerad.txt", + args: framework_docs_args + + " -staticonly " + + " -toroot / " + + " -devsite " + + " -ignoreJdLinks ", +} + +droiddoc { + name: "ds-ref-navtree-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + ], + proofread_file: "ds-ref-navtree-docs-proofrerad.txt", + args: framework_docs_args + + " -toroot / " + + " -atLinksNavtree " + + " -navtreeonly ", +} + +droiddoc { + name: "online-sdk-dev-docs", + defaults: ["framework-docs-default"], + hdf: [ + "android.whichdoc online", + "android.hasSamples true", + ], + proofread_file: "online-sdk-dev-docs-proofrerad.txt", + args: framework_docs_args + + " -toroot / -samplegroup Admin " + + " -samplegroup Background " + + " -samplegroup Connectivity " + + " -samplegroup Content " + + " -samplegroup Input " + + " -samplegroup Media " + + " -samplegroup Notification " + + " -samplegroup RenderScript " + + " -samplegroup Security " + + " -samplegroup Sensors " + + " -samplegroup System " + + " -samplegroup Testing " + + " -samplegroup UI " + + " -samplegroup Views " + + " -samplegroup Wearable -samplesdir development/samples/browseable ", +} + +droiddoc { + name: "hidden-docs", + defaults: ["framework-docs-default"], + proofread_file: "hidden-docs-proofrerad.txt", + args: framework_docs_args + + " -referenceonly " + + " -title \"Android SDK - Including hidden APIs.\"", +} + droiddoc { name: "hwbinder-stubs-docs", srcs: [ @@ -1178,12 +1459,13 @@ java_library_static { droiddoc { name: "hiddenapi-lists", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", "core/java/overview.html", ":current-support-api", + "api/current.txt", ], dex_api_filename: "public-dex.txt", private_dex_api_filename: "private-dex.txt", @@ -1198,12 +1480,13 @@ droiddoc { droiddoc { name: "hiddenapi-mappings", - defaults: ["framework-docs-default"], + defaults: ["api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ":api-version-xml", "core/java/overview.html", ":current-support-api", + "api/current.txt", ], dex_mapping_filename: "dex-mapping.txt", args: framework_docs_args + @@ -1247,7 +1530,7 @@ metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.x "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo" doc_defaults { - name: "metalava-framework-docs-default", + name: "metalava-api-stubs-default", srcs: [ ":opt-telephony-srcs", ":opt-net-voip-srcs", @@ -1283,7 +1566,7 @@ doc_defaults { droiddoc { name: "metalava-api-stubs-docs", - defaults: ["metalava-framework-docs-default"], + defaults: ["metalava-api-stubs-default"], api_tag_name: "METALAVA_PUBLIC", api_filename: "public_api.txt", private_api_filename: "private.txt", @@ -1296,7 +1579,7 @@ droiddoc { droiddoc { name: "metalava-system-api-stubs-docs", - defaults: ["metalava-framework-docs-default"], + defaults: ["metalava-api-stubs-default"], api_tag_name: "METALAVA_SYSTEM", api_filename: "system-api.txt", private_api_filename: "system-private.txt", @@ -1310,7 +1593,7 @@ droiddoc { droiddoc { name: "metalava-test-api-stubs-docs", - defaults: ["metalava-framework-docs-default"], + defaults: ["metalava-api-stubs-default"], api_tag_name: "METALAVA_TEST", api_filename: "test-api.txt", removed_api_filename: "test-removed.txt", diff --git a/Android.mk b/Android.mk index 7890983e8a24..2883f3441882 100644 --- a/Android.mk +++ b/Android.mk @@ -311,364 +311,13 @@ $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE)) $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE)) $(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE)) -# ==== check javadoc comments but don't generate docs ======== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := doc-comment-check - -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -referenceonly \ - -parsecomments - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -LOCAL_UNINSTALLABLE_MODULE := true - -include $(BUILD_DROIDDOC) - -# Run this for checkbuild -checkbuild: doc-comment-check-docs -# Check comment when you are updating the API -update-api: doc-comment-check-docs - -# ==== static html in the sdk ================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := offline-sdk - -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -offlinemode \ - -title "Android SDK" \ - -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ - -sdkvalues $(OUT_DOCS) \ - -hdf android.whichdoc offline - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -static_doc_index_redirect := $(out_dir)/index.html -$(static_doc_index_redirect): \ - $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP) - $(hide) mkdir -p $(dir $@) - $(hide) $(ACP) $< $@ - -$(full_target): $(static_doc_index_redirect) - - -# ==== Public API static reference docs ================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := offline-sdk-referenceonly - -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -offlinemode \ - -title "Android SDK" \ - -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ - -sdkvalues $(OUT_DOCS) \ - -hdf android.whichdoc offline \ - -referenceonly - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -static_doc_index_redirect := $(out_dir)/index.html -$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html - $(copy-file-to-target) - -static_doc_properties := $(out_dir)/source.properties -$(static_doc_properties): \ - $(LOCAL_PATH)/docs/source.properties | $(ACP) - $(hide) mkdir -p $(dir $@) - $(hide) $(ACP) $< $@ - -$(full_target): $(static_doc_index_redirect) -$(full_target): $(static_doc_properties) - - -# ==== System API static reference docs ================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := offline-system-sdk-referenceonly - -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -hide 101 -hide 104 -hide 108 \ - -showAnnotation android.annotation.SystemApi \ - -offlinemode \ - -title "Android System SDK" \ - -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ - -sdkvalues $(OUT_DOCS) \ - -hdf android.whichdoc offline \ - -referenceonly - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -static_doc_index_redirect := $(out_dir)/index.html -$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html - $(copy-file-to-target) - -static_doc_properties := $(out_dir)/source.properties -$(static_doc_properties): \ - $(LOCAL_PATH)/docs/source.properties | $(ACP) - $(hide) mkdir -p $(dir $@) - $(hide) $(ACP) $< $@ - -$(full_target): $(static_doc_index_redirect) -$(full_target): $(static_doc_properties) -$(full_target): $(framework_built) - - -# ==== docs for the web (on the androiddevdocs app engine server) ======================= -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := online-sdk - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -toroot / \ - -hdf android.whichdoc online \ - $(sample_groups) \ - -hdf android.hasSamples true \ - -samplesdir $(samples_dir) - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== docs for the web (on the androiddevdocs app engine server) ======================= -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := online-system-api-sdk - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -referenceonly \ - -showAnnotation android.annotation.SystemApi \ - -title "Android SDK - Including system APIs." \ - -toroot / \ - -hide 101 \ - -hide 104 \ - -hide 108 \ - -hdf android.whichdoc online \ - $(sample_groups) \ - -hdf android.hasSamples true \ - -samplesdir $(samples_dir) - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -LOCAL_UNINSTALLABLE_MODULE := true - -include $(BUILD_DROIDDOC) - -# ==== docs for the web (on the devsite app engine server) ======================= -include $(CLEAR_VARS) -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -# specify a second html input dir and an output path relative to OUT_DIR) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := ds - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -toroot / \ - -hdf android.whichdoc online \ - -devsite \ - -yamlV2 \ - $(sample_groups) \ - -hdf android.hasSamples true \ - -samplesdir $(samples_dir) - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== docs for the web (on the devsite app engine server) ======================= -include $(CLEAR_VARS) -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -# specify a second html input dir and an output path relative to OUT_DIR) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := ds-static - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -hdf android.whichdoc online \ - -staticonly \ - -toroot / \ - -devsite \ - -ignoreJdLinks - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== generates full navtree for resolving @links in ds postprocessing ==== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) -LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) -LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) -LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := ds-ref-navtree - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -hdf android.whichdoc online \ - -toroot / \ - -atLinksNavtree \ - -navtreeonly - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== site updates for docs (on the androiddevdocs app engine server) ======================= -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) -LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl / - -LOCAL_MODULE := online-sdk-dev - -LOCAL_DROIDDOC_OPTIONS:= \ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -toroot / \ - -hdf android.whichdoc online \ - $(sample_groups) \ - -hdf android.hasSamples true \ - -samplesdir $(samples_dir) - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) - -# ==== docs that have all of the stuff that's @hidden ======================= -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) -LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES) -LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS) -LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_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_ADDITIONAL_JAVA_DIR) -LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) - -LOCAL_MODULE := hidden -LOCAL_DROIDDOC_OPTIONS:=\ - $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \ - -referenceonly \ - -title "Android SDK - Including hidden APIs." -# -hidden - -LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk - -include $(BUILD_DROIDDOC) +# sdk.atree needs to copy the whole dir: $(OUT_DOCS)/offline-sdk to the final zip. +# So keep offline-sdk-timestamp target here, and unzip offline-sdk-docs.zip to +# $(OUT_DOCS)/offline-sdk. +$(OUT_DOCS)/offline-sdk-timestamp: $(OUT_DOCS)/offline-sdk-docs-docs.zip + $(hide) rm -rf $(OUT_DOCS)/offline-sdk + $(hide) mkdir -p $(OUT_DOCS)/offline-sdk + ( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1 # ==== java proto device library (for test only) ============================== include $(CLEAR_VARS) -- GitLab From d366771e84f584330c21b6381c902518af110034 Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas Date: Tue, 17 Apr 2018 09:50:46 -0700 Subject: [PATCH 04/71] Migrated SystemUI & SettingsLib to androidx Test: make SystemUI SettingsLib Bug:76692459 Change-Id: I248fdf4042a0a97bc6349091da21c936c2d37c95 Merged-In: I248fdf4042a0a97bc6349091da21c936c2d37c95 (cherry picked from commit fd52c1433c4e4d3f53aef2454d03f6b58f2411a3) --- packages/SettingsLib/Android.mk | 14 +++++----- packages/SettingsLib/common.mk | 16 +++++------ .../res/layout/preference_access_point.xml | 2 +- .../res/layout/preference_two_target.xml | 2 +- .../settingslib/CustomDialogPreference.java | 4 +-- .../settingslib/CustomEditTextPreference.java | 6 ++-- .../android/settingslib/DeviceInfoUtils.java | 2 +- .../settingslib/RestrictedLockUtils.java | 2 +- .../settingslib/RestrictedPreference.java | 6 ++-- .../RestrictedPreferenceHelper.java | 4 +-- .../RestrictedSwitchPreference.java | 8 +++--- .../com/android/settingslib/TetherUtil.java | 2 +- .../settingslib/TwoTargetPreference.java | 4 +-- .../applications/ApplicationsState.java | 9 +++--- .../applications/StorageStatsSource.java | 2 +- .../bluetooth/CachedBluetoothDevice.java | 2 +- .../LocalBluetoothProfileManager.java | 2 +- .../android/settingslib/bluetooth/Utils.java | 2 +- .../core/AbstractPreferenceController.java | 6 ++-- .../core/ConfirmationDialogController.java | 4 +-- .../SharedPreferencesLogger.java | 2 +- .../VisibilityLoggerMixin.java | 6 ++-- .../settingslib/core/lifecycle/Lifecycle.java | 20 ++++++------- .../core/lifecycle/LifecycleObserver.java | 4 +-- .../core/lifecycle/ObservableActivity.java | 14 +++++----- .../lifecycle/ObservableDialogFragment.java | 14 +++++----- .../core/lifecycle/ObservableFragment.java | 14 +++++----- .../ObservablePreferenceFragment.java | 18 ++++++------ .../core/lifecycle/events/OnCreate.java | 4 +-- .../core/lifecycle/events/OnDestroy.java | 4 +-- .../core/lifecycle/events/OnPause.java | 4 +-- .../core/lifecycle/events/OnResume.java | 4 +-- .../core/lifecycle/events/OnStart.java | 4 +-- .../core/lifecycle/events/OnStop.java | 4 +-- .../lifecycle/events/SetPreferenceScreen.java | 2 +- .../settingslib/datetime/ZoneGetter.java | 6 ++-- ...AbstractEnableAdbPreferenceController.java | 12 ++++---- .../AbstractLogdSizePreferenceController.java | 10 +++---- ...bstractLogpersistPreferenceController.java | 10 +++---- .../DeveloperOptionsPreferenceController.java | 4 +-- .../DevelopmentSettingsEnabler.java | 2 +- .../development/SystemPropPoker.java | 4 +-- ...tBluetoothAddressPreferenceController.java | 6 ++-- ...AbstractImsStatusPreferenceController.java | 6 ++-- ...AbstractIpAddressPreferenceController.java | 6 ++-- ...tractSerialNumberPreferenceController.java | 6 ++-- .../AbstractUptimePreferenceController.java | 6 ++-- ...actWifiMacAddressPreferenceController.java | 6 ++-- .../settingslib/drawer/CategoryManager.java | 2 +- .../fuelgauge/PowerWhitelistBackend.java | 2 +- .../graph/BluetoothDeviceLayerDrawable.java | 2 +- .../InputMethodAndSubtypeEnablerManager.java | 10 +++---- .../InputMethodAndSubtypeUtil.java | 8 +++--- .../inputmethod/InputMethodPreference.java | 6 ++-- .../InputMethodSubtypePreference.java | 2 +- .../SwitchWithNoTextPreference.java | 2 +- .../license/LicenseHtmlGeneratorFromXml.java | 2 +- .../license/LicenseHtmlLoader.java | 2 +- .../location/RecentLocationApps.java | 2 +- .../notification/ZenDurationDialog.java | 2 +- .../suggestions/SuggestionController.java | 4 +-- .../SuggestionControllerMixin.java | 6 ++-- .../suggestions/SuggestionParser.java | 2 +- .../users/AppRestrictionsHelper.java | 2 +- .../android/settingslib/utils/IconCache.java | 4 +-- .../android/settingslib/utils/PowerUtil.java | 2 +- .../settingslib/widget/FooterPreference.java | 6 ++-- .../widget/FooterPreferenceMixin.java | 4 +-- .../android/settingslib/wifi/AccessPoint.java | 2 +- .../wifi/AccessPointPreference.java | 6 ++-- .../wifi/TestAccessPointBuilder.java | 2 +- .../android/settingslib/wifi/WifiTracker.java | 6 ++-- .../settingslib/wifi/WifiTrackerFactory.java | 4 +-- .../android/settingslib/wifi/WifiUtils.java | 2 +- .../RestrictedPreferenceHelperTest.java | 4 +-- .../settingslib/TwoTargetPreferenceTest.java | 2 +- .../AbstractPreferenceControllerTest.java | 4 +-- .../VisibilityLoggerMixinTest.java | 2 +- .../core/lifecycle/LifecycleTest.java | 4 +-- ...eloperOptionsPreferenceControllerTest.java | 4 +-- .../EnableAdbPreferenceControllerTest.java | 6 ++-- .../LogdSizePreferenceControllerTest.java | 4 +-- .../LogpersistPreferenceControllerTest.java | 8 +++--- ...etoothAddressPreferenceControllerTest.java | 4 +-- .../ImsStatusPreferenceControllerTest.java | 4 +-- .../IpAddressPreferenceControllerTest.java | 4 +-- .../SerialNumberPreferenceControllerTest.java | 4 +-- .../UptimePreferenceControllerTest.java | 4 +-- ...ifiMacAddressPreferenceControllerTest.java | 4 +-- .../SuggestionControllerMixinTest.java | 6 ++-- .../widget/FooterPreferenceMixinTest.java | 8 +++--- .../widget/FooterPreferenceTest.java | 2 +- packages/SystemUI/Android.mk | 28 +++++++++---------- packages/SystemUI/AndroidManifest.xml | 4 +-- packages/SystemUI/proguard.flags | 4 +-- .../res/layout/qs_customize_panel_content.xml | 2 +- .../res/layout/tuner_shortcut_list.xml | 2 +- .../keyguard/KeyguardSecurityContainer.java | 2 +- .../android/keyguard/KeyguardSliceView.java | 4 +-- .../android/keyguard/KeyguardStatusView.java | 2 +- .../android/systemui/ScreenDecorations.java | 2 +- .../DozeScreenStatePreventingAdapter.java | 2 +- ...zeSuspendScreenStatePreventingAdapter.java | 2 +- .../fragments/FragmentHostManager.java | 2 +- .../power/PowerNotificationWarnings.java | 2 +- .../android/systemui/qs/PagedTileLayout.java | 4 +-- .../src/com/android/systemui/qs/QSFooter.java | 2 +- .../com/android/systemui/qs/QSFooterImpl.java | 4 +-- .../com/android/systemui/qs/QSFragment.java | 4 +-- .../android/systemui/qs/QSScrollLayout.java | 2 +- .../systemui/qs/QuickStatusBarHeader.java | 2 +- .../android/systemui/qs/car/CarQSFooter.java | 2 +- .../systemui/qs/car/CarQSFragment.java | 6 ++-- .../systemui/qs/car/CarStatusBarHeader.java | 2 +- .../systemui/qs/customize/QSCustomizer.java | 6 ++-- .../systemui/qs/customize/TileAdapter.java | 14 +++++----- .../systemui/qs/external/TileColorPicker.java | 2 +- .../qs/external/TileLifecycleManager.java | 2 +- .../qs/external/TileServiceManager.java | 2 +- .../systemui/qs/tileimpl/SlashImageView.java | 2 +- .../systemui/qs/tiles/NightDisplayTile.java | 2 +- .../systemui/qs/touch/SwipeDetector.java | 4 +-- .../systemui/recents/TriangleShape.java | 2 +- .../recents/views/TaskViewHeader.java | 2 +- .../systemui/statusbar/CommandQueue.java | 2 +- .../NotificationBlockingHelperManager.java | 2 +- .../systemui/statusbar/NotificationGuts.java | 2 +- .../statusbar/NotificationGutsManager.java | 2 +- .../android/systemui/statusbar/ScrimView.java | 2 +- .../systemui/statusbar/StatusBarIconView.java | 2 +- .../statusbar/car/FullscreenUserSwitcher.java | 2 +- .../statusbar/car/UserGridRecyclerView.java | 6 ++-- .../MediaNotificationProcessor.java | 4 +-- .../notification/RowInflaterTask.java | 2 +- .../notification/VisualStabilityManager.java | 2 +- .../statusbar/phone/HeadsUpManagerPhone.java | 2 +- .../phone/NavigationBarFragment.java | 2 +- .../statusbar/phone/NavigationBarView.java | 2 +- .../statusbar/phone/NearestTouchFrame.java | 2 +- .../phone/NotificationGroupManager.java | 2 +- .../phone/NotificationIconAreaController.java | 4 +-- .../phone/NotificationIconContainer.java | 2 +- .../NotificationsQuickSettingsContainer.java | 2 +- .../statusbar/phone/QuickStepController.java | 2 +- .../phone/StatusBarIconController.java | 2 +- .../statusbar/policy/IconLoggerImpl.java | 2 +- .../policy/LocationControllerImpl.java | 2 +- .../statusbar/stack/AnimationFilter.java | 2 +- .../stack/NotificationStackScrollLayout.java | 6 ++-- .../systemui/tuner/BatteryPreference.java | 2 +- .../systemui/tuner/BetterListPreference.java | 2 +- .../systemui/tuner/ClockPreference.java | 2 +- .../systemui/tuner/CustomListPreference.java | 4 +-- .../systemui/tuner/DemoModeFragment.java | 10 +++---- .../systemui/tuner/LockscreenFragment.java | 14 +++++----- .../android/systemui/tuner/NavBarTuner.java | 6 ++-- .../android/systemui/tuner/OtherPrefs.java | 2 +- .../systemui/tuner/PluginFragment.java | 8 +++--- .../systemui/tuner/RadioListPreference.java | 6 ++-- .../systemui/tuner/SelectablePreference.java | 2 +- .../systemui/tuner/ShortcutPicker.java | 10 +++---- .../systemui/tuner/StatusBarSwitch.java | 2 +- .../android/systemui/tuner/TunerActivity.java | 6 ++-- .../android/systemui/tuner/TunerFragment.java | 4 +-- .../tuner/TunerPreferenceFragment.java | 4 +-- .../android/systemui/tuner/TunerSwitch.java | 2 +- .../android/systemui/util/leak/DumpTruck.java | 2 +- .../systemui/util/leak/LeakReporter.java | 2 +- .../systemui/util/wakelock/WakeLock.java | 2 +- .../systemui/volume/MediaRouterWrapper.java | 4 +-- packages/SystemUI/tests/Android.mk | 28 +++++++++---------- 171 files changed, 391 insertions(+), 392 deletions(-) diff --git a/packages/SettingsLib/Android.mk b/packages/SettingsLib/Android.mk index 7b89fb243d38..96012c1f2a34 100644 --- a/packages/SettingsLib/Android.mk +++ b/packages/SettingsLib/Android.mk @@ -8,17 +8,17 @@ LOCAL_AAPT2_ONLY := true LOCAL_MODULE := SettingsLib LOCAL_JAVA_LIBRARIES := \ - android-support-annotations + androidx.annotation_annotation LOCAL_SHARED_ANDROID_LIBRARIES := \ - android-support-v4 \ - android-support-v7-recyclerview \ - android-support-v7-preference \ - android-support-v7-appcompat \ - android-arch-lifecycle-runtime + androidx.legacy_legacy-support-v4 \ + androidx.recyclerview_recyclerview \ + androidx.preference_preference \ + androidx.appcompat_appcompat \ + androidx.lifecycle_lifecycle-runtime LOCAL_SHARED_JAVA_LIBRARIES := \ - android-arch-lifecycle-common + androidx.lifecycle_lifecycle-common LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res diff --git a/packages/SettingsLib/common.mk b/packages/SettingsLib/common.mk index 5de3a6e99440..834b83b49ada 100644 --- a/packages/SettingsLib/common.mk +++ b/packages/SettingsLib/common.mk @@ -14,15 +14,15 @@ # LOCAL_STATIC_JAVA_LIBRARIES += \ - android-support-annotations \ - android-arch-lifecycle-common + androidx.annotation_annotation \ + androidx.lifecycle_lifecycle-common LOCAL_STATIC_ANDROID_LIBRARIES += \ - android-support-v4 \ - android-arch-lifecycle-runtime \ - android-support-v7-recyclerview \ - android-support-v7-preference \ - android-support-v7-appcompat \ - android-support-v14-preference \ + androidx.legacy_legacy-support-v4 \ + androidx.lifecycle_lifecycle-runtime \ + androidx.recyclerview_recyclerview \ + androidx.preference_preference \ + androidx.appcompat_appcompat \ + androidx.legacy_legacy-preference-v14 \ SettingsLib diff --git a/packages/SettingsLib/res/layout/preference_access_point.xml b/packages/SettingsLib/res/layout/preference_access_point.xml index 62173da5b7eb..472a6e3d0dd4 100644 --- a/packages/SettingsLib/res/layout/preference_access_point.xml +++ b/packages/SettingsLib/res/layout/preference_access_point.xml @@ -45,7 +45,7 @@ android:clipToPadding="false" android:paddingTop="4dp" android:paddingBottom="4dp"> - - > { + androidx.lifecycle.LifecycleObserver, LoaderManager.LoaderCallbacks> { public interface SuggestionControllerHost { /** diff --git a/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionParser.java b/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionParser.java index 9c347631d817..8705c9846a6f 100644 --- a/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionParser.java +++ b/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionParser.java @@ -30,7 +30,7 @@ import android.net.NetworkInfo; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import android.text.TextUtils; import android.text.format.DateUtils; import android.util.ArrayMap; diff --git a/packages/SettingsLib/src/com/android/settingslib/users/AppRestrictionsHelper.java b/packages/SettingsLib/src/com/android/settingslib/users/AppRestrictionsHelper.java index 0fc9a4d6e408..7cdbe719df78 100644 --- a/packages/SettingsLib/src/com/android/settingslib/users/AppRestrictionsHelper.java +++ b/packages/SettingsLib/src/com/android/settingslib/users/AppRestrictionsHelper.java @@ -31,7 +31,7 @@ import android.graphics.drawable.Drawable; import android.os.RemoteException; import android.os.UserHandle; import android.os.UserManager; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import android.text.TextUtils; import android.util.Log; import android.view.inputmethod.InputMethodInfo; diff --git a/packages/SettingsLib/src/com/android/settingslib/utils/IconCache.java b/packages/SettingsLib/src/com/android/settingslib/utils/IconCache.java index 3d55c4fee358..f0548ff7a923 100644 --- a/packages/SettingsLib/src/com/android/settingslib/utils/IconCache.java +++ b/packages/SettingsLib/src/com/android/settingslib/utils/IconCache.java @@ -19,8 +19,8 @@ package com.android.settingslib.utils; import android.content.Context; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; -import android.support.annotation.VisibleForTesting; -import android.support.v4.util.ArrayMap; +import androidx.annotation.VisibleForTesting; +import androidx.collection.ArrayMap; /** diff --git a/packages/SettingsLib/src/com/android/settingslib/utils/PowerUtil.java b/packages/SettingsLib/src/com/android/settingslib/utils/PowerUtil.java index a53ff3904346..e16da84ce713 100644 --- a/packages/SettingsLib/src/com/android/settingslib/utils/PowerUtil.java +++ b/packages/SettingsLib/src/com/android/settingslib/utils/PowerUtil.java @@ -22,7 +22,7 @@ import android.icu.text.MeasureFormat; import android.icu.text.MeasureFormat.FormatWidth; import android.icu.util.Measure; import android.icu.util.MeasureUnit; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.text.TextUtils; import com.android.settingslib.R; diff --git a/packages/SettingsLib/src/com/android/settingslib/widget/FooterPreference.java b/packages/SettingsLib/src/com/android/settingslib/widget/FooterPreference.java index e6935516f401..87a56c7548d2 100644 --- a/packages/SettingsLib/src/com/android/settingslib/widget/FooterPreference.java +++ b/packages/SettingsLib/src/com/android/settingslib/widget/FooterPreference.java @@ -17,9 +17,9 @@ package com.android.settingslib.widget; import android.content.Context; -import android.support.v4.content.res.TypedArrayUtils; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; +import androidx.core.content.res.TypedArrayUtils; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; import android.text.method.LinkMovementMethod; import android.util.AttributeSet; import android.widget.TextView; diff --git a/packages/SettingsLib/src/com/android/settingslib/widget/FooterPreferenceMixin.java b/packages/SettingsLib/src/com/android/settingslib/widget/FooterPreferenceMixin.java index 2edcd9e2c066..5883754fa2ed 100644 --- a/packages/SettingsLib/src/com/android/settingslib/widget/FooterPreferenceMixin.java +++ b/packages/SettingsLib/src/com/android/settingslib/widget/FooterPreferenceMixin.java @@ -17,8 +17,8 @@ package com.android.settingslib.widget; import android.content.Context; -import android.support.v14.preference.PreferenceFragment; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.PreferenceFragment; +import androidx.preference.PreferenceScreen; import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.core.lifecycle.LifecycleObserver; diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java index 50dfc26d6a2b..b9c76013b0d7 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java @@ -48,7 +48,7 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; import android.os.UserHandle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.Spannable; import android.text.SpannableString; import android.text.TextUtils; diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java index 26f3683f92b4..b07dd8f18354 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java @@ -25,9 +25,9 @@ import android.graphics.drawable.StateListDrawable; import android.net.wifi.WifiConfiguration; import android.os.Looper; import android.os.UserHandle; -import android.support.annotation.VisibleForTesting; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; +import androidx.annotation.VisibleForTesting; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; import android.text.TextUtils; import android.util.AttributeSet; import android.util.SparseArray; diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java b/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java index 2993a0de0658..5862e6f19e16 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java @@ -24,7 +24,7 @@ import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiInfo; import android.os.Bundle; import android.os.Parcelable; -import android.support.annotation.Keep; +import androidx.annotation.Keep; import com.android.settingslib.wifi.AccessPoint.Speed; diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java index d8f0886730d8..6211d1214fcc 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java @@ -41,9 +41,9 @@ import android.os.Message; import android.os.Process; import android.os.SystemClock; import android.provider.Settings; -import android.support.annotation.GuardedBy; -import android.support.annotation.NonNull; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.GuardedBy; +import androidx.annotation.NonNull; +import androidx.annotation.VisibleForTesting; import android.text.format.DateUtils; import android.util.ArrayMap; import android.util.ArraySet; diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTrackerFactory.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTrackerFactory.java index 8b5863aee91f..e73d952cd645 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTrackerFactory.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTrackerFactory.java @@ -16,8 +16,8 @@ package com.android.settingslib.wifi; import android.content.Context; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; import com.android.settingslib.core.lifecycle.Lifecycle; diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java index bee2fa135957..4792317c9f1e 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java @@ -21,7 +21,7 @@ import android.net.wifi.ScanResult; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiInfo; import android.os.SystemClock; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import com.android.settingslib.R; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java index a8821ba60785..f00ae0b08019 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java @@ -24,8 +24,8 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.content.Context; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceViewHolder; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; import android.view.View; import android.widget.TextView; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/TwoTargetPreferenceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/TwoTargetPreferenceTest.java index 480143a79410..efd7de351ebe 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/TwoTargetPreferenceTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/TwoTargetPreferenceTest.java @@ -24,7 +24,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import android.content.Context; -import android.support.v7.preference.PreferenceViewHolder; +import androidx.preference.PreferenceViewHolder; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/AbstractPreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/AbstractPreferenceControllerTest.java index 393fd029e6da..5261ea0c88bb 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/AbstractPreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/AbstractPreferenceControllerTest.java @@ -19,8 +19,8 @@ import static com.google.common.truth.Truth.assertThat; import static org.mockito.Mockito.when; import android.content.Context; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import org.junit.Before; import org.junit.Test; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixinTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixinTest.java index 8b31450f8a3f..f34c33844d11 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixinTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixinTest.java @@ -30,7 +30,7 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import com.android.internal.logging.nano.MetricsProto; import com.android.settingslib.SettingsLibRobolectricTestRunner; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/lifecycle/LifecycleTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/lifecycle/LifecycleTest.java index 2b2bf5b6cc8b..52068e9842e5 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/lifecycle/LifecycleTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/lifecycle/LifecycleTest.java @@ -15,10 +15,10 @@ */ package com.android.settingslib.core.lifecycle; -import static android.arch.lifecycle.Lifecycle.Event.ON_START; +import static androidx.lifecycle.Lifecycle.Event.ON_START; import static com.google.common.truth.Truth.assertThat; -import android.arch.lifecycle.LifecycleOwner; +import androidx.lifecycle.LifecycleOwner; import android.content.Context; import android.view.Menu; import android.view.MenuInflater; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/DeveloperOptionsPreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/DeveloperOptionsPreferenceControllerTest.java index 7820fd2fe340..9dd93b3af390 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/DeveloperOptionsPreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/DeveloperOptionsPreferenceControllerTest.java @@ -19,8 +19,8 @@ package com.android.settingslib.development; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.verify; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import com.android.settingslib.SettingsLibRobolectricTestRunner; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/EnableAdbPreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/EnableAdbPreferenceControllerTest.java index 475e7d8c2209..7c653351974a 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/EnableAdbPreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/EnableAdbPreferenceControllerTest.java @@ -26,9 +26,9 @@ import android.content.Context; import android.content.pm.PackageManager; import android.os.UserManager; import android.provider.Settings; -import android.support.v14.preference.SwitchPreference; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.SwitchPreference; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import com.android.settingslib.SettingsLibRobolectricTestRunner; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/LogdSizePreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/LogdSizePreferenceControllerTest.java index 72c8d1ad3642..ae3072ca86b8 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/LogdSizePreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/LogdSizePreferenceControllerTest.java @@ -40,8 +40,8 @@ import static org.mockito.Mockito.verify; import android.content.Context; import android.os.SystemProperties; -import android.support.v7.preference.ListPreference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.ListPreference; +import androidx.preference.PreferenceScreen; import com.android.settingslib.R; import com.android.settingslib.SettingsLibRobolectricTestRunner; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/LogpersistPreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/LogpersistPreferenceControllerTest.java index 4b9bfc3f37ca..b0aaa256fdab 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/LogpersistPreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/LogpersistPreferenceControllerTest.java @@ -21,11 +21,11 @@ import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.verify; -import android.arch.lifecycle.LifecycleOwner; +import androidx.lifecycle.LifecycleOwner; import android.os.SystemProperties; -import android.support.v7.preference.ListPreference; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.ListPreference; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import com.android.settingslib.SettingsLibRobolectricTestRunner; import com.android.settingslib.core.lifecycle.Lifecycle; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/BluetoothAddressPreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/BluetoothAddressPreferenceControllerTest.java index 0385f4bd29af..8ec7149ce1a8 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/BluetoothAddressPreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/BluetoothAddressPreferenceControllerTest.java @@ -22,8 +22,8 @@ import static org.mockito.Mockito.doReturn; import android.bluetooth.BluetoothAdapter; import android.content.Context; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import com.android.settingslib.SettingsLibRobolectricTestRunner; import com.android.settingslib.core.lifecycle.Lifecycle; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/ImsStatusPreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/ImsStatusPreferenceControllerTest.java index d600c2093c77..cb7861b30562 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/ImsStatusPreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/ImsStatusPreferenceControllerTest.java @@ -23,8 +23,8 @@ import static org.mockito.Mockito.mock; import android.content.Context; import android.os.PersistableBundle; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import android.telephony.CarrierConfigManager; import android.telephony.SubscriptionManager; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/IpAddressPreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/IpAddressPreferenceControllerTest.java index 99e582cae60a..8f144cdf3a15 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/IpAddressPreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/IpAddressPreferenceControllerTest.java @@ -23,8 +23,8 @@ import static org.mockito.Mockito.doReturn; import android.content.Context; import android.net.ConnectivityManager; import android.net.wifi.WifiManager; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import com.android.settingslib.SettingsLibRobolectricTestRunner; import com.android.settingslib.core.lifecycle.Lifecycle; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/SerialNumberPreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/SerialNumberPreferenceControllerTest.java index a4fa7aa29bef..69fb86e88d5b 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/SerialNumberPreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/SerialNumberPreferenceControllerTest.java @@ -20,8 +20,8 @@ import static com.google.common.truth.Truth.assertThat; import static org.mockito.Mockito.when; import android.content.Context; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import com.android.settingslib.SettingsLibRobolectricTestRunner; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/UptimePreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/UptimePreferenceControllerTest.java index 39e05faddc1a..ba955f9f2275 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/UptimePreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/UptimePreferenceControllerTest.java @@ -23,8 +23,8 @@ import static org.mockito.Mockito.verify; import android.content.Context; import android.os.SystemClock; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import android.text.format.DateUtils; import com.android.settingslib.SettingsLibRobolectricTestRunner; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/WifiMacAddressPreferenceControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/WifiMacAddressPreferenceControllerTest.java index b7bc661116e9..ddbcb87725d1 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/WifiMacAddressPreferenceControllerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/WifiMacAddressPreferenceControllerTest.java @@ -28,8 +28,8 @@ import android.net.ConnectivityManager; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.provider.Settings; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; import com.android.settingslib.R; import com.android.settingslib.SettingsLibRobolectricTestRunner; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/SuggestionControllerMixinTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/SuggestionControllerMixinTest.java index cfa16b8a952a..f486989f5a56 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/SuggestionControllerMixinTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/SuggestionControllerMixinTest.java @@ -16,15 +16,15 @@ package com.android.settingslib.suggestions; -import static android.arch.lifecycle.Lifecycle.Event.ON_START; -import static android.arch.lifecycle.Lifecycle.Event.ON_STOP; +import static androidx.lifecycle.Lifecycle.Event.ON_START; +import static androidx.lifecycle.Lifecycle.Event.ON_STOP; import static com.google.common.truth.Truth.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.app.LoaderManager; -import android.arch.lifecycle.LifecycleOwner; +import androidx.lifecycle.LifecycleOwner; import android.content.ComponentName; import android.content.Context; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/FooterPreferenceMixinTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/FooterPreferenceMixinTest.java index 8071c6db4cfd..78b7616716f5 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/FooterPreferenceMixinTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/FooterPreferenceMixinTest.java @@ -23,10 +23,10 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import android.arch.lifecycle.LifecycleOwner; -import android.support.v14.preference.PreferenceFragment; -import android.support.v7.preference.PreferenceManager; -import android.support.v7.preference.PreferenceScreen; +import androidx.lifecycle.LifecycleOwner; +import androidx.preference.PreferenceFragment; +import androidx.preference.PreferenceManager; +import androidx.preference.PreferenceScreen; import com.android.settingslib.SettingsLibRobolectricTestRunner; import com.android.settingslib.core.lifecycle.Lifecycle; diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/FooterPreferenceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/FooterPreferenceTest.java index ff11b803c053..3280089a88f6 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/FooterPreferenceTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/FooterPreferenceTest.java @@ -19,7 +19,7 @@ package com.android.settingslib.widget; import static com.google.common.truth.Truth.assertThat; import android.content.Context; -import android.support.v7.preference.PreferenceViewHolder; +import androidx.preference.PreferenceViewHolder; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.widget.TextView; diff --git a/packages/SystemUI/Android.mk b/packages/SystemUI/Android.mk index df2115147fb2..d9ec0fd0214b 100644 --- a/packages/SystemUI/Android.mk +++ b/packages/SystemUI/Android.mk @@ -37,20 +37,20 @@ LOCAL_SRC_FILES := \ LOCAL_STATIC_ANDROID_LIBRARIES := \ SystemUIPluginLib \ SystemUISharedLib \ - android-support-car \ - android-support-v4 \ - android-support-v7-recyclerview \ - android-support-v7-preference \ - android-support-v7-appcompat \ - android-support-v7-mediarouter \ - android-support-v7-palette \ - android-support-v14-preference \ - android-support-v17-leanback \ - android-slices-core \ - android-slices-view \ - android-slices-builders \ - android-arch-core-runtime \ - android-arch-lifecycle-extensions \ + androidx.car_car \ + androidx.legacy_legacy-support-v4 \ + androidx.recyclerview_recyclerview \ + androidx.preference_preference \ + androidx.appcompat_appcompat \ + androidx.mediarouter_mediarouter \ + androidx.palette_palette \ + androidx.legacy_legacy-preference-v14 \ + androidx.leanback_leanback \ + androidx.slice_slice-core \ + androidx.slice_slice-view \ + androidx.slice_slice-builders \ + androidx.arch.core_core-runtime \ + androidx.lifecycle_lifecycle-extensions \ LOCAL_STATIC_JAVA_LIBRARIES := \ SystemUI-tags \ diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 5599b5a2837a..beb4e9e5ba9c 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -229,7 +229,7 @@ android:theme="@style/Theme.SystemUI" android:defaultToDeviceProtectedStorage="true" android:directBootAware="true" - android:appComponentFactory="android.support.v4.app.CoreComponentFactory"> + android:appComponentFactory="androidx.core.app.CoreComponentFactory"> @@ -594,7 +594,7 @@ diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags index 4b5d10e8d190..e6452e717d5e 100644 --- a/packages/SystemUI/proguard.flags +++ b/packages/SystemUI/proguard.flags @@ -36,9 +36,9 @@ public (android.content.Context, android.util.AttributeSet); } --keep class ** extends android.support.v14.preference.PreferenceFragment +-keep class ** extends androidx.preference.PreferenceFragment -keep class com.android.systemui.tuner.* -keep class com.android.systemui.plugins.** { public protected *; } --keep class android.support.v4.app.CoreComponentFactory +-keep class androidx.core.app.CoreComponentFactory diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml index d70a37ae15b2..4ce6ef6ed31d 100644 --- a/packages/SystemUI/res/layout/qs_customize_panel_content.xml +++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml @@ -38,7 +38,7 @@ android:navigationContentDescription="@*android:string/action_bar_up_description" style="?android:attr/toolbarStyle" /> - - Date: Mon, 23 Apr 2018 17:31:10 -0700 Subject: [PATCH 05/71] Migrated various apps under frameworks/base/packages/Shell to androidx Bug: 76692459 Test: make Shell Change-Id: If11159cac1bd5aa61c46a346647b97a661abbf11 Merged-In: If11159cac1bd5aa61c46a346647b97a661abbf11 (cherry picked from commit e92135a6e9e3bae6236063d35670f3f7f2f51be4) --- packages/Shell/Android.mk | 3 ++- packages/Shell/AndroidManifest.xml | 2 +- .../Shell/src/com/android/shell/BugreportProgressService.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/Shell/Android.mk b/packages/Shell/Android.mk index 5713dc679341..b738d7771465 100644 --- a/packages/Shell/Android.mk +++ b/packages/Shell/Android.mk @@ -12,7 +12,8 @@ LOCAL_SRC_FILES += \ LOCAL_AIDL_INCLUDES = frameworks/native/cmds/dumpstate/binder -LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 +LOCAL_STATIC_ANDROID_LIBRARIES := androidx.legacy_legacy-support-v4 +LOCAL_USE_AAPT2 := true LOCAL_PACKAGE_NAME := Shell LOCAL_PRIVATE_PLATFORM_APIS := true diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index b4f331d89074..8a5cb4a6d643 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -157,7 +157,7 @@ android:defaultToDeviceProtectedStorage="true" android:directBootAware="true"> diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index 600f0dc37775..4fc190d43056 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -88,7 +88,7 @@ import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.os.Vibrator; -import android.support.v4.content.FileProvider; +import androidx.core.content.FileProvider; import android.text.TextUtils; import android.text.format.DateUtils; import android.util.Log; -- GitLab From 63a6a00f44a5ad84963c9e54e2449f5f4db2582d Mon Sep 17 00:00:00 2001 From: Sundong Ahn Date: Tue, 31 Jul 2018 16:54:41 +0900 Subject: [PATCH 06/71] Build android.test.* with java_sdk_library android.test.* are built with java_sdk_library and api files are added by running "make update-api". android.test.base_static is created for allowing to use android.test.base as a static library. Bug:77577799 Test: make -j Test: make checkapi Test: make checkapi fails with a random change in the txt file Test: adb shell cmd package list libraries |\ grep android.test.* And check the android.test.* libraries Merged-In: Ia27612657532e50b077a9c55dbef59ee3ec04b8a Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a (cherry picked from commit f24779c8c7a3f647f65944e02425b751e580b393) --- Android.bp | 4 +- data/etc/platform.xml | 6 +- test-base/Android.bp | 71 +++++++------- test-base/Android.mk | 44 --------- .../api/apicheck_msg_android_test_base.txt | 17 ---- ...roid-test-base-current.txt => current.txt} | 0 ...roid-test-base-removed.txt => removed.txt} | 0 .../api/system-current.txt | 0 .../api/system-removed.txt | 0 test-base/api/test-current.txt | 0 test-base/api/test-removed.txt | 0 test-legacy/Android.bp | 2 +- test-mock/Android.bp | 86 +---------------- test-mock/Android.mk | 93 ------------------- .../apicheck_msg_android_test_mock-system.txt | 17 ---- .../api/apicheck_msg_android_test_mock.txt | 17 ---- ...roid-test-mock-current.txt => current.txt} | 0 ...roid-test-mock-removed.txt => removed.txt} | 0 ...-system-current.txt => system-current.txt} | 0 test-mock/api/system-removed.txt | 0 test-mock/api/test-current.txt | 16 ++++ test-mock/api/test-removed.txt | 0 test-runner/Android.bp | 72 ++++---------- test-runner/Android.mk | 44 --------- .../api/apicheck_msg_android_test_runner.txt | 17 ---- ...id-test-runner-current.txt => current.txt} | 0 test-runner/api/removed.txt | 0 test-runner/api/system-current.txt | 0 test-runner/api/system-removed.txt | 0 test-runner/api/test-current.txt | 0 test-runner/api/test-removed.txt | 0 31 files changed, 74 insertions(+), 432 deletions(-) delete mode 100644 test-base/api/apicheck_msg_android_test_base.txt rename test-base/api/{android-test-base-current.txt => current.txt} (100%) rename test-base/api/{android-test-base-removed.txt => removed.txt} (100%) rename test-mock/api/android-test-mock-system-removed.txt => test-base/api/system-current.txt (100%) rename test-runner/api/android-test-runner-removed.txt => test-base/api/system-removed.txt (100%) create mode 100644 test-base/api/test-current.txt create mode 100644 test-base/api/test-removed.txt delete mode 100644 test-mock/Android.mk delete mode 100644 test-mock/api/apicheck_msg_android_test_mock-system.txt delete mode 100644 test-mock/api/apicheck_msg_android_test_mock.txt rename test-mock/api/{android-test-mock-current.txt => current.txt} (100%) rename test-mock/api/{android-test-mock-removed.txt => removed.txt} (100%) rename test-mock/api/{android-test-mock-system-current.txt => system-current.txt} (100%) create mode 100644 test-mock/api/system-removed.txt create mode 100644 test-mock/api/test-current.txt create mode 100644 test-mock/api/test-removed.txt delete mode 100644 test-runner/api/apicheck_msg_android_test_runner.txt rename test-runner/api/{android-test-runner-current.txt => current.txt} (100%) create mode 100644 test-runner/api/removed.txt create mode 100644 test-runner/api/system-current.txt create mode 100644 test-runner/api/system-removed.txt create mode 100644 test-runner/api/test-current.txt create mode 100644 test-runner/api/test-removed.txt diff --git a/Android.bp b/Android.bp index f11341e254a0..910fbfdfb058 100644 --- a/Android.bp +++ b/Android.bp @@ -1063,7 +1063,7 @@ doc_defaults { "ext", "framework", "voip-common", - "android.test.mock", + "android.test.mock.impl", ], local_sourcepaths: frameworks_base_subdirs, html_dirs: [ @@ -1200,7 +1200,7 @@ doc_defaults { "ext", "framework", "voip-common", - "android.test.mock", + "android.test.mock.impl", ], local_sourcepaths: frameworks_base_subdirs, installable: false, diff --git a/data/etc/platform.xml b/data/etc/platform.xml index b3f05dc9fc98..6f52fbd1b4f5 100644 --- a/data/etc/platform.xml +++ b/data/etc/platform.xml @@ -182,11 +182,11 @@ code to link against. --> + file="/system/framework/android.test.base.impl.jar" /> + file="/system/framework/android.test.mock.impl.jar" /> + file="/system/framework/android.test.runner.impl.jar" /> diff --git a/test-base/Android.bp b/test-base/Android.bp index d25b47727c0b..0b8a02a815d9 100644 --- a/test-base/Android.bp +++ b/test-base/Android.bp @@ -19,9 +19,8 @@ // This contains the junit.framework and android.test classes that were in // Android API level 25 excluding those from android.test.runner. // Also contains the com.android.internal.util.Predicate[s] classes. -java_library { +java_sdk_library { name: "android.test.base", - installable: true, srcs: ["src/**/*.java"], @@ -29,11 +28,38 @@ java_library { javacflags: ["-Xep:DepAnn:ERROR"], }, + hostdex: true, + + api_packages: [ + "android.test", + "android.test.suitebuilder.annotation", + "com.android.internal.util", + "junit.framework", + ], + + droiddoc_options: ["stubsourceonly"], + compile_dex: true, +} + +// Build the android.test.base_static library +// ========================================== +// This is only intended for inclusion in the android.test.runner-minus-junit, +// robolectric_android-all-stub and repackaged.android.test.* libraries. +// Must not be used elewhere. +java_library_static { + name: "android.test.base_static", + installable: false, + + srcs: ["src/**/*.java"], + + 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 @@ -46,7 +72,7 @@ java_library { installable: true, sdk_version: "current", - static_libs: ["android.test.base"], + static_libs: ["android.test.base_static"], } // Build the repackaged.android.test.base library @@ -57,7 +83,7 @@ java_library_static { name: "repackaged.android.test.base", sdk_version: "current", - static_libs: ["android.test.base"], + static_libs: ["android.test.base_static"], jarjar_rules: "jarjar-rules.txt", // Pin java_version until jarjar is certified to support later versions. http://b/72703434 @@ -84,38 +110,3 @@ java_library_static { ], } -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", - compile_dex: true, -} diff --git a/test-base/Android.mk b/test-base/Android.mk index baf5726ff8bd..a9d30cf3131a 100644 --- a/test-base/Android.mk +++ b/test-base/Android.mk @@ -16,50 +16,6 @@ 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))) - -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 - -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) - -# Check that the android.test.base.stubs library has not changed -# ============================================================== - -# Check that the API we're building hasn't changed from the not-yet-released -# SDK version. -$(eval $(call check-api, \ - check-android-test-base-api-current, \ - $(ANDROID_TEST_BASE_API_FILE), \ - $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE), \ - $(ANDROID_TEST_BASE_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, \ - $(OUT_DOCS)/android-test-base-api-stubs-gen-docs-stubs.srcjar \ - )) - -.PHONY: check-android-test-base-api -checkapi: check-android-test-base-api - -.PHONY: update-android-test-base-api -update-api: update-android-test-base-api - -update-android-test-base-api: $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE) | $(ACP) - @echo Copying current.txt - $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE) $(ANDROID_TEST_BASE_API_FILE) - @echo Copying removed.txt - $(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/api/apicheck_msg_android_test_base.txt b/test-base/api/apicheck_msg_android_test_base.txt deleted file mode 100644 index 144aecc21bce..000000000000 --- a/test-base/api/apicheck_msg_android_test_base.txt +++ /dev/null @@ -1,17 +0,0 @@ - -****************************** -You have tried to change the API from what has been previously approved. - -To make these errors go away, you have two choices: - 1) You can add "@hide" javadoc comments to the methods, etc. listed in the - errors above. - - 2) You can update android-test-base-current.txt by executing the following command: - make update-android-test-base-api - - To submit the revised android-test-base-current.txt to the main Android repository, - you will need approval. -****************************** - - - diff --git a/test-base/api/android-test-base-current.txt b/test-base/api/current.txt similarity index 100% rename from test-base/api/android-test-base-current.txt rename to test-base/api/current.txt diff --git a/test-base/api/android-test-base-removed.txt b/test-base/api/removed.txt similarity index 100% rename from test-base/api/android-test-base-removed.txt rename to test-base/api/removed.txt diff --git a/test-mock/api/android-test-mock-system-removed.txt b/test-base/api/system-current.txt similarity index 100% rename from test-mock/api/android-test-mock-system-removed.txt rename to test-base/api/system-current.txt diff --git a/test-runner/api/android-test-runner-removed.txt b/test-base/api/system-removed.txt similarity index 100% rename from test-runner/api/android-test-runner-removed.txt rename to test-base/api/system-removed.txt diff --git a/test-base/api/test-current.txt b/test-base/api/test-current.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-base/api/test-removed.txt b/test-base/api/test-removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-legacy/Android.bp b/test-legacy/Android.bp index d2af8a9f1c82..833c714f07b0 100644 --- a/test-legacy/Android.bp +++ b/test-legacy/Android.bp @@ -25,7 +25,7 @@ java_library_static { static_libs: [ "android.test.base-minus-junit", "android.test.runner-minus-junit", - "android.test.mock", + "android.test.mock.impl", ], no_framework_libs: true, diff --git a/test-mock/Android.bp b/test-mock/Android.bp index 8d3faaef9f6b..5eba01779f46 100644 --- a/test-mock/Android.bp +++ b/test-mock/Android.bp @@ -16,95 +16,15 @@ // Build the android.test.mock library // =================================== -java_library { +java_sdk_library { name: "android.test.mock", - installable: true, - java_version: "1.8", srcs: ["src/**/*.java"], - no_framework_libs: true, - libs: [ - "framework", + api_packages: [ + "android.test.mock", ], -} - -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, -} - -droiddoc { - name: "android.test.mock.docs-system", - defaults: ["android.test.mock.docs-defaults"], - - api_tag_name: "ANDROID_TEST_MOCK_SYSTEM", - api_filename: "api/android-test-mock-system-current.txt", - removed_api_filename: "api/android-test-mock-system-removed.txt", - - args: android_test_mock_docs_args + - "-showAnnotation android.annotation.SystemApi ", -} - -java_library_static { - name: "android.test.mock.stubs", - srcs: [":android.test.mock.docs"], - sdk_version: "current", - product_variables: { - unbundled_build: { - // Unbundled apps will use the prebuilt one - // prebuilts/sdk/current - enabled: false, - }, - }, - compile_dex: true, -} - -java_library_static { - name: "android.test.mock.stubs-system", - srcs: [":android.test.mock.docs-system"], - sdk_version: "system_current", - product_variables: { - unbundled_build: { - // Unbundled apps will use the prebuilt one - // prebuilts/sdk/system_current - enabled: false, - }, - }, compile_dex: true, } diff --git a/test-mock/Android.mk b/test-mock/Android.mk deleted file mode 100644 index 73a7340826a6..000000000000 --- a/test-mock/Android.mk +++ /dev/null @@ -1,93 +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. -# - -LOCAL_PATH:= $(call my-dir) - -# 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), \ - $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_API_FILE), \ - $(ANDROID_TEST_MOCK_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, \ - $(OUT_DOCS)/android.test.mock.docs-stubs.srcjar \ - )) - -.PHONY: check-android-test-mock-api -checkapi: check-android-test-mock-api - -.PHONY: update-android-test-mock-api -update-api: update-android-test-mock-api - -update-android-test-mock-api: $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_API_FILE) | $(ACP) - @echo Copying current.txt - $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_API_FILE) $(ANDROID_TEST_MOCK_API_FILE) - @echo Copying removed.txt - $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_REMOVED_API_FILE) $(ANDROID_TEST_MOCK_REMOVED_API_FILE) - -# Archive a copy of the classes.jar in SDK build. -full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.mock.stubs-system,,COMMON)/classes.jar -$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.mock.stubs_system.jar) - -# Check that the android.test.mock.stubs-system library has not changed -# ===================================================================== -ANDROID_TEST_MOCK_SYSTEM_API_FILE := $(LOCAL_PATH)/api/android-test-mock-system-current.txt -ANDROID_TEST_MOCK_SYSTEM_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-mock-system-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-system-api-current, \ - $(ANDROID_TEST_MOCK_SYSTEM_API_FILE), \ - $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_API_FILE), \ - $(ANDROID_TEST_MOCK_SYSTEM_REMOVED_API_FILE), \ - $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_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-system.txt, \ - check-android-test-mock-system-api, \ - $(OUT_DOCS)/android.test.mock.docs-system-stubs.srcjar \ - )) - -.PHONY: check-android-test-mock-system-api -checkapi: check-android-test-mock-system-api - -.PHONY: update-android-test-mock-system-api -update-api: update-android-test-mock-system-api - -update-android-test-mock-system-api: $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_API_FILE) | $(ACP) - @echo Copying current.txt - $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_API_FILE) $(ANDROID_TEST_MOCK_SYSTEM_API_FILE) - @echo Copying removed.txt - $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_REMOVED_API_FILE) $(ANDROID_TEST_MOCK_SYSTEM_REMOVED_API_FILE) diff --git a/test-mock/api/apicheck_msg_android_test_mock-system.txt b/test-mock/api/apicheck_msg_android_test_mock-system.txt deleted file mode 100644 index 3a97117f3ea1..000000000000 --- a/test-mock/api/apicheck_msg_android_test_mock-system.txt +++ /dev/null @@ -1,17 +0,0 @@ - -****************************** -You have tried to change the API from what has been previously approved. - -To make these errors go away, you have two choices: - 1) You can add "@hide" javadoc comments to the methods, etc. listed in the - errors above. - - 2) You can update android-test-mock-current.txt by executing the following command: - make update-android-test-mock-system-api - - To submit the revised android-test-mock-system-current.txt to the main Android repository, - you will need approval. -****************************** - - - diff --git a/test-mock/api/apicheck_msg_android_test_mock.txt b/test-mock/api/apicheck_msg_android_test_mock.txt deleted file mode 100644 index e388935bf798..000000000000 --- a/test-mock/api/apicheck_msg_android_test_mock.txt +++ /dev/null @@ -1,17 +0,0 @@ - -****************************** -You have tried to change the API from what has been previously approved. - -To make these errors go away, you have two choices: - 1) You can add "@hide" javadoc comments to the methods, etc. listed in the - errors above. - - 2) You can update android-test-mock-current.txt by executing the following command: - make update-android-test-mock-api - - To submit the revised android-test-mock-current.txt to the main Android repository, - you will need approval. -****************************** - - - diff --git a/test-mock/api/android-test-mock-current.txt b/test-mock/api/current.txt similarity index 100% rename from test-mock/api/android-test-mock-current.txt rename to test-mock/api/current.txt diff --git a/test-mock/api/android-test-mock-removed.txt b/test-mock/api/removed.txt similarity index 100% rename from test-mock/api/android-test-mock-removed.txt rename to test-mock/api/removed.txt diff --git a/test-mock/api/android-test-mock-system-current.txt b/test-mock/api/system-current.txt similarity index 100% rename from test-mock/api/android-test-mock-system-current.txt rename to test-mock/api/system-current.txt diff --git a/test-mock/api/system-removed.txt b/test-mock/api/system-removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-mock/api/test-current.txt b/test-mock/api/test-current.txt new file mode 100644 index 000000000000..725ea935896f --- /dev/null +++ b/test-mock/api/test-current.txt @@ -0,0 +1,16 @@ +package android.test.mock { + + public deprecated class MockPackageManager extends android.content.pm.PackageManager { + method public java.lang.String getDefaultBrowserPackageNameAsUser(int); + method public int getInstallReason(java.lang.String, android.os.UserHandle); + method public java.util.List getInstalledApplicationsAsUser(int, int); + method public java.util.List getInstalledPackagesAsUser(int, int); + method public java.lang.String[] getNamesForUids(int[]); + method public java.lang.String getPermissionControllerPackageName(); + method public java.lang.String getServicesSystemSharedLibraryPackageName(); + method public java.lang.String getSharedSystemSharedLibraryPackageName(); + method public boolean isPermissionReviewModeEnabled(); + } + +} + diff --git a/test-mock/api/test-removed.txt b/test-mock/api/test-removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-runner/Android.bp b/test-runner/Android.bp index 2caa6c45f16b..ea615b920df6 100644 --- a/test-runner/Android.bp +++ b/test-runner/Android.bp @@ -16,23 +16,32 @@ // Build the android.test.runner library // ===================================== -java_library { +java_sdk_library { name: "android.test.runner", - installable: true, - // Needs to be consistent with the repackaged version of this make target. - java_version: "1.8", srcs: ["src/**/*.java"], errorprone: { javacflags: ["-Xep:DepAnn:ERROR"], }, - sdk_version: "current", libs: [ "android.test.base", - "android.test.mock.stubs", + "android.test.mock", + ], + stub_only_libs: [ + "android.test.base", + "android.test.mock", ], + api_packages: [ + "android.test", + "android.test.suitebuilder", + "junit.runner", + "junit.textui", + ], + + droiddoc_options: ["stubsourceonly"], + compile_dex: true } // Build the android.test.runner-minus-junit library @@ -46,8 +55,8 @@ java_library { sdk_version: "current", libs: [ - "android.test.base", - "android.test.mock.stubs", + "android.test.base_static", + "android.test.mock", "junit", ], } @@ -70,7 +79,7 @@ java_library_static { sdk_version: "current", libs: [ - "android.test.base", + "android.test.base_static", ], jarjar_rules: "jarjar-rules.txt", @@ -78,48 +87,3 @@ java_library_static { 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", - compile_dex: true, -} diff --git a/test-runner/Android.mk b/test-runner/Android.mk index b70d2498d491..18bde8517351 100644 --- a/test-runner/Android.mk +++ b/test-runner/Android.mk @@ -16,49 +16,5 @@ 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))) - -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 - -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) - -# Check that the android.test.runner.stubs library has not changed -# ================================================================ - -# Check that the API we're building hasn't changed from the not-yet-released -# SDK version. -$(eval $(call check-api, \ - check-android-test-runner-api-current, \ - $(ANDROID_TEST_RUNNER_API_FILE), \ - $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE), \ - $(ANDROID_TEST_RUNNER_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, \ - $(OUT_DOCS)/android-test-runner-api-stubs-gen-docs-stubs.srcjar \ - )) - -.PHONY: check-android-test-runner-api -checkapi: check-android-test-runner-api - -.PHONY: update-android-test-runner-api -update-api: update-android-test-runner-api - -update-android-test-runner-api: $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) | $(ACP) - @echo Copying current.txt - $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) $(ANDROID_TEST_RUNNER_API_FILE) - @echo Copying removed.txt - $(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/api/apicheck_msg_android_test_runner.txt b/test-runner/api/apicheck_msg_android_test_runner.txt deleted file mode 100644 index cf2d15ee1ee1..000000000000 --- a/test-runner/api/apicheck_msg_android_test_runner.txt +++ /dev/null @@ -1,17 +0,0 @@ - -****************************** -You have tried to change the API from what has been previously approved. - -To make these errors go away, you have two choices: - 1) You can add "@hide" javadoc comments to the methods, etc. listed in the - errors above. - - 2) You can update android-test-runner-current.txt by executing the following command: - make update-android-test-runner-api - - To submit the revised android-test-runner-current.txt to the main Android repository, - you will need approval. -****************************** - - - diff --git a/test-runner/api/android-test-runner-current.txt b/test-runner/api/current.txt similarity index 100% rename from test-runner/api/android-test-runner-current.txt rename to test-runner/api/current.txt diff --git a/test-runner/api/removed.txt b/test-runner/api/removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-runner/api/system-current.txt b/test-runner/api/system-current.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-runner/api/system-removed.txt b/test-runner/api/system-removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-runner/api/test-current.txt b/test-runner/api/test-current.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-runner/api/test-removed.txt b/test-runner/api/test-removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 -- GitLab From af2513048e10373f4bc3aaf7083079b82c7636a9 Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Thu, 30 Aug 2018 10:59:51 -0700 Subject: [PATCH 07/71] [Vendor] Add filegrouop for NonNull.java This is needed by google.camera.experimental docs. Test: m -j docs Bug: b/70351683 Change-Id: I79b3f0946a1d606cda770eabe7c287f4cc207bfc --- Android.bp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Android.bp b/Android.bp index f11341e254a0..ec8077867154 100644 --- a/Android.bp +++ b/Android.bp @@ -1561,3 +1561,10 @@ droiddoc { }, }, } + +filegroup { + name: "framework-annotation-nonnull-srcs", + srcs: [ + "core/java/android/annotation/NonNull.java", + ], +} -- GitLab From a9b2fcad7a1ba9b5a459f46cc40504c7ea4fe590 Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Thu, 9 Aug 2018 09:38:21 -0400 Subject: [PATCH 08/71] Cleanup trying to move to bp - Remove some resources that don't appear to do anything - Don't assume resource ids are final, because they aren't when compiled as a library Test: build Change-Id: I498bc2612d3f47df5f567c18c29e1666431e971c Merged-In: I498bc2612d3f47df5f567c18c29e1666431e971c (cherry picked from commit 05dd5671720985c03f35ec476591fb0d8399a018) --- packages/SystemUI/Android.mk | 1 - .../SystemUI/res/values-bg/donottranslate.xml | 24 ----------- .../SystemUI/res/values-hu/donottranslate.xml | 24 ----------- .../SystemUI/res/values-ja/donottranslate.xml | 24 ----------- .../SystemUI/res/values-ko/donottranslate.xml | 24 ----------- .../SystemUI/res/values-lt/donottranslate.xml | 24 ----------- .../res/values-sw720dp/donottranslate.xml | 27 ------------- .../SystemUI/res/values-tr/donottranslate.xml | 24 ----------- .../res/values-zh-rCN/donottranslate.xml | 24 ----------- .../res/values-zh-rTW/donottranslate.xml | 24 ----------- .../analytics/SensorLoggerSession.java | 40 +++++++++---------- .../android/systemui/qs/PseudoGridView.java | 16 +++----- .../systemui/qs/tiles/UserDetailItemView.java | 11 ++--- .../systemui/stackdivider/DividerView.java | 26 +++++------- .../statusbar/ExpandableNotificationRow.java | 20 +++++----- .../statusbar/phone/NavigationBarView.java | 12 +++--- .../statusbar/phone/UserAvatarView.java | 31 ++++++-------- .../statusbar/policy/SmartReplyView.java | 21 ++++------ 18 files changed, 76 insertions(+), 321 deletions(-) delete mode 100644 packages/SystemUI/res/values-bg/donottranslate.xml delete mode 100644 packages/SystemUI/res/values-hu/donottranslate.xml delete mode 100644 packages/SystemUI/res/values-ja/donottranslate.xml delete mode 100644 packages/SystemUI/res/values-ko/donottranslate.xml delete mode 100644 packages/SystemUI/res/values-lt/donottranslate.xml delete mode 100644 packages/SystemUI/res/values-sw720dp/donottranslate.xml delete mode 100644 packages/SystemUI/res/values-tr/donottranslate.xml delete mode 100644 packages/SystemUI/res/values-zh-rCN/donottranslate.xml delete mode 100644 packages/SystemUI/res/values-zh-rTW/donottranslate.xml diff --git a/packages/SystemUI/Android.mk b/packages/SystemUI/Android.mk index d9ec0fd0214b..920e3b6a3343 100644 --- a/packages/SystemUI/Android.mk +++ b/packages/SystemUI/Android.mk @@ -7,7 +7,6 @@ LOCAL_MODULE := SystemUI-proto LOCAL_SRC_FILES := $(call all-proto-files-under,src) LOCAL_PROTOC_OPTIMIZE_TYPE := nano -LOCAL_PROTO_JAVA_OUTPUT_PARAMS := optional_field_style=accessors include $(BUILD_STATIC_JAVA_LIBRARY) diff --git a/packages/SystemUI/res/values-bg/donottranslate.xml b/packages/SystemUI/res/values-bg/donottranslate.xml deleted file mode 100644 index dcf434db111b..000000000000 --- a/packages/SystemUI/res/values-bg/donottranslate.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - %2$s\n%1$s - - diff --git a/packages/SystemUI/res/values-hu/donottranslate.xml b/packages/SystemUI/res/values-hu/donottranslate.xml deleted file mode 100644 index dcf434db111b..000000000000 --- a/packages/SystemUI/res/values-hu/donottranslate.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - %2$s\n%1$s - - diff --git a/packages/SystemUI/res/values-ja/donottranslate.xml b/packages/SystemUI/res/values-ja/donottranslate.xml deleted file mode 100644 index dcf434db111b..000000000000 --- a/packages/SystemUI/res/values-ja/donottranslate.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - %2$s\n%1$s - - diff --git a/packages/SystemUI/res/values-ko/donottranslate.xml b/packages/SystemUI/res/values-ko/donottranslate.xml deleted file mode 100644 index dcf434db111b..000000000000 --- a/packages/SystemUI/res/values-ko/donottranslate.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - %2$s\n%1$s - - diff --git a/packages/SystemUI/res/values-lt/donottranslate.xml b/packages/SystemUI/res/values-lt/donottranslate.xml deleted file mode 100644 index dcf434db111b..000000000000 --- a/packages/SystemUI/res/values-lt/donottranslate.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - %2$s\n%1$s - - diff --git a/packages/SystemUI/res/values-sw720dp/donottranslate.xml b/packages/SystemUI/res/values-sw720dp/donottranslate.xml deleted file mode 100644 index 09960673a53e..000000000000 --- a/packages/SystemUI/res/values-sw720dp/donottranslate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - %1$s\n%2$s - - - diff --git a/packages/SystemUI/res/values-tr/donottranslate.xml b/packages/SystemUI/res/values-tr/donottranslate.xml deleted file mode 100644 index dcf434db111b..000000000000 --- a/packages/SystemUI/res/values-tr/donottranslate.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - %2$s\n%1$s - - diff --git a/packages/SystemUI/res/values-zh-rCN/donottranslate.xml b/packages/SystemUI/res/values-zh-rCN/donottranslate.xml deleted file mode 100644 index dcf434db111b..000000000000 --- a/packages/SystemUI/res/values-zh-rCN/donottranslate.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - %2$s\n%1$s - - diff --git a/packages/SystemUI/res/values-zh-rTW/donottranslate.xml b/packages/SystemUI/res/values-zh-rTW/donottranslate.xml deleted file mode 100644 index dcf434db111b..000000000000 --- a/packages/SystemUI/res/values-zh-rTW/donottranslate.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - %2$s\n%1$s - - diff --git a/packages/SystemUI/src/com/android/systemui/analytics/SensorLoggerSession.java b/packages/SystemUI/src/com/android/systemui/analytics/SensorLoggerSession.java index f8b73a172516..d6472b7ddbb9 100644 --- a/packages/SystemUI/src/com/android/systemui/analytics/SensorLoggerSession.java +++ b/packages/SystemUI/src/com/android/systemui/analytics/SensorLoggerSession.java @@ -101,31 +101,31 @@ public class SensorLoggerSession { public Session toProto() { Session proto = new Session(); - proto.setStartTimestampMillis(mStartTimestampMillis); - proto.setDurationMillis(mEndTimestampMillis - mStartTimestampMillis); - proto.setBuild(Build.FINGERPRINT); - proto.setResult(mResult); - proto.setType(mType); + proto.startTimestampMillis = mStartTimestampMillis; + proto.durationMillis = mEndTimestampMillis - mStartTimestampMillis; + proto.build = Build.FINGERPRINT; + proto.result = mResult; + proto.type = mType; proto.sensorEvents = mSensorEvents.toArray(proto.sensorEvents); proto.touchEvents = mMotionEvents.toArray(proto.touchEvents); proto.phoneEvents = mPhoneEvents.toArray(proto.phoneEvents); - proto.setTouchAreaWidth(mTouchAreaWidth); - proto.setTouchAreaHeight(mTouchAreaHeight); + proto.touchAreaWidth = mTouchAreaWidth; + proto.touchAreaHeight = mTouchAreaHeight; return proto; } private PhoneEvent phoneEventToProto(int eventType, long sysTimeNanos) { PhoneEvent proto = new PhoneEvent(); - proto.setType(eventType); - proto.setTimeOffsetNanos(sysTimeNanos - mStartSystemTimeNanos); + proto.type = eventType; + proto.timeOffsetNanos = sysTimeNanos - mStartSystemTimeNanos; return proto; } private SensorEvent sensorEventToProto(android.hardware.SensorEvent ev, long sysTimeNanos) { SensorEvent proto = new SensorEvent(); - proto.setType(ev.sensor.getType()); - proto.setTimeOffsetNanos(sysTimeNanos - mStartSystemTimeNanos); - proto.setTimestamp(ev.timestamp); + proto.type = ev.sensor.getType(); + proto.timeOffsetNanos = sysTimeNanos - mStartSystemTimeNanos; + proto.timestamp = ev.timestamp; proto.values = ev.values.clone(); return proto; } @@ -133,17 +133,17 @@ public class SensorLoggerSession { private TouchEvent motionEventToProto(MotionEvent ev) { int count = ev.getPointerCount(); TouchEvent proto = new TouchEvent(); - proto.setTimeOffsetNanos(ev.getEventTimeNano() - mStartSystemTimeNanos); - proto.setAction(ev.getActionMasked()); - proto.setActionIndex(ev.getActionIndex()); + proto.timeOffsetNanos = ev.getEventTimeNano() - mStartSystemTimeNanos; + proto.action = ev.getActionMasked(); + proto.actionIndex = ev.getActionIndex(); proto.pointers = new TouchEvent.Pointer[count]; for (int i = 0; i < count; i++) { TouchEvent.Pointer p = new TouchEvent.Pointer(); - p.setX(ev.getX(i)); - p.setY(ev.getY(i)); - p.setSize(ev.getSize(i)); - p.setPressure(ev.getPressure(i)); - p.setId(ev.getPointerId(i)); + p.x = ev.getX(i); + p.y = ev.getY(i); + p.size = ev.getSize(i); + p.pressure = ev.getPressure(i); + p.id = ev.getPointerId(i); proto.pointers[i] = p; } return proto; diff --git a/packages/SystemUI/src/com/android/systemui/qs/PseudoGridView.java b/packages/SystemUI/src/com/android/systemui/qs/PseudoGridView.java index a1c25772234e..87c64c78edc8 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/PseudoGridView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/PseudoGridView.java @@ -47,16 +47,12 @@ public class PseudoGridView extends ViewGroup { final int N = a.getIndexCount(); for (int i = 0; i < N; i++) { int attr = a.getIndex(i); - switch (attr) { - case R.styleable.PseudoGridView_numColumns: - mNumColumns = a.getInt(attr, 3); - break; - case R.styleable.PseudoGridView_verticalSpacing: - mVerticalSpacing = a.getDimensionPixelSize(attr, 0); - break; - case R.styleable.PseudoGridView_horizontalSpacing: - mHorizontalSpacing = a.getDimensionPixelSize(attr, 0); - break; + if (attr == R.styleable.PseudoGridView_numColumns) { + mNumColumns = a.getInt(attr, 3); + } else if (attr == R.styleable.PseudoGridView_verticalSpacing) { + mVerticalSpacing = a.getDimensionPixelSize(attr, 0); + } else if (attr == R.styleable.PseudoGridView_horizontalSpacing) { + mHorizontalSpacing = a.getDimensionPixelSize(attr, 0); } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailItemView.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailItemView.java index 1e9a618c3324..ad7d1b6b4689 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailItemView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailItemView.java @@ -69,13 +69,10 @@ public class UserDetailItemView extends LinearLayout { final int N = a.getIndexCount(); for (int i = 0; i < N; i++) { int attr = a.getIndex(i); - switch (attr) { - case R.styleable.UserDetailItemView_regularFontFamily: - mRegularTypeface = Typeface.create(a.getString(attr), 0 /* style */); - break; - case R.styleable.UserDetailItemView_activatedFontFamily: - mActivatedTypeface = Typeface.create(a.getString(attr), 0 /* style */); - break; + if (attr == R.styleable.UserDetailItemView_regularFontFamily) { + mRegularTypeface = Typeface.create(a.getString(attr), 0 /* style */); + } else if (attr == R.styleable.UserDetailItemView_activatedFontFamily) { + mActivatedTypeface = Typeface.create(a.getString(attr), 0 /* style */); } } a.recycle(); diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java index 3eb3160b028f..98925b9ba9e5 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java +++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java @@ -226,22 +226,16 @@ public class DividerView extends FrameLayout implements OnTouchListener, public boolean performAccessibilityAction(View host, int action, Bundle args) { int currentPosition = getCurrentPosition(); SnapTarget nextTarget = null; - switch (action) { - case R.id.action_move_tl_full: - nextTarget = mSnapAlgorithm.getDismissEndTarget(); - break; - case R.id.action_move_tl_70: - nextTarget = mSnapAlgorithm.getLastSplitTarget(); - break; - case R.id.action_move_tl_50: - nextTarget = mSnapAlgorithm.getMiddleTarget(); - break; - case R.id.action_move_tl_30: - nextTarget = mSnapAlgorithm.getFirstSplitTarget(); - break; - case R.id.action_move_rb_full: - nextTarget = mSnapAlgorithm.getDismissStartTarget(); - break; + if (action == R.id.action_move_tl_full) { + nextTarget = mSnapAlgorithm.getDismissEndTarget(); + } else if (action == R.id.action_move_tl_70) { + nextTarget = mSnapAlgorithm.getLastSplitTarget(); + } else if (action == R.id.action_move_tl_50) { + nextTarget = mSnapAlgorithm.getMiddleTarget(); + } else if (action == R.id.action_move_tl_30) { + nextTarget = mSnapAlgorithm.getFirstSplitTarget(); + } else if (action == R.id.action_move_rb_full) { + nextTarget = mSnapAlgorithm.getDismissStartTarget(); } if (nextTarget != null) { startDragging(true /* animate */, false /* touching */); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index d647e21888dd..29687228902f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -2747,16 +2747,18 @@ public class ExpandableNotificationRow extends ActivatableNotificationView case AccessibilityNodeInfo.ACTION_LONG_CLICK: doLongClickCallback(); return true; - case R.id.action_snooze: - NotificationMenuRowPlugin provider = getProvider(); - if (provider == null) { - provider = createMenu(); + default: + if (action == R.id.action_snooze) { + NotificationMenuRowPlugin provider = getProvider(); + if (provider == null) { + provider = createMenu(); + } + MenuItem snoozeMenu = provider.getSnoozeMenuItem(getContext()); + if (snoozeMenu != null) { + doLongClickCallback(getWidth() / 2, getHeight() / 2, snoozeMenu); + } + return true; } - MenuItem snoozeMenu = provider.getSnoozeMenuItem(getContext()); - if (snoozeMenu != null) { - doLongClickCallback(getWidth() / 2, getHeight() / 2, snoozeMenu); - } - return true; } return false; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index 8aebd611344a..d2ffdbf11e26 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -256,13 +256,11 @@ public class NavigationBarView extends FrameLayout implements PluginListener