summaryrefslogtreecommitdiff
path: root/Android.mk
AgeCommit message (Collapse)Author
2018-05-09Populate hidden API dark greylistDavid Brazdil
This patch will iterate over all classes in the light greylist and add the remaining (currently blacklisted) class members into the dark greylist. This is meant to mitigate the impact of the feature on legacy apps, in case their hidden API uses have not been detected by our analyses. The dark greylist entries will be available to apps targeting pre-P SDK versions, but blocked for apps targeting P or later. Bug: 64382372 Test: make out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt Merged-In: Id1ef4ab523b3b4d1333b5fbf2b3e6622ef2be607 Change-Id: Id1ef4ab523b3b4d1333b5fbf2b3e6622ef2be607 (cherry picked from commit 185f00e6677cea3fb135648f4a19d22dec54bbb5)
2018-05-09Refactor build rules for hidden API listsDavid Brazdil
The build rules were getting messy and too difficult to extend. Extract assertions into own functions, create shared variables. Bug: 64382372 Test: make out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt Merged-In: Ie34adb8b5349b30daa2e9e4976d285f6d9711f0e Change-Id: Ie34adb8b5349b30daa2e9e4976d285f6d9711f0e (cherry picked from commit 721bc8e6a8b1350c62b4a570f523541d1ce1124a)
2018-05-08Merge changes I8b20e03c,Id1ef4ab5,Ie34adb8b into pi-devDavid Brazdil
am: a08802dac1 Change-Id: Icfc9aab47db9568d5c06b11c3713f49924b94438
2018-05-08Manualy blacklist certain hidden APIsDavid Brazdil
Previous CL introduced the concept of populating the dark greylist with remaining members of classes on the light greylist. This breaks the assumption that some methods/fields will always remain blacklisted. Introduce a new file which forces their blacklisting and adjust the build rules accordingly. Bug: 64382372 Test: make out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt Change-Id: I8b20e03c50f4027a24d2a6081bedb08bc8a34011
2018-05-08Populate hidden API dark greylistDavid Brazdil
This patch will iterate over all classes in the light greylist and add the remaining (currently blacklisted) class members into the dark greylist. This is meant to mitigate the impact of the feature on legacy apps, in case their hidden API uses have not been detected by our analyses. The dark greylist entries will be available to apps targeting pre-P SDK versions, but blocked for apps targeting P or later. Bug: 64382372 Test: make out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt Change-Id: Id1ef4ab523b3b4d1333b5fbf2b3e6622ef2be607
2018-05-08Refactor build rules for hidden API listsDavid Brazdil
The build rules were getting messy and too difficult to extend. Extract assertions into own functions, create shared variables. Bug: 64382372 Test: make out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt Change-Id: Ie34adb8b5349b30daa2e9e4976d285f6d9711f0e
2018-05-08Enable hidden API blacklist in AOSPDavid Brazdil
The CL copies the build rule for hidden API lists from the internal tree to AOSP. This is not a cherry-pick but it will make the rules the same in all the branches. As a result, the blacklist becomes enabled in AOSP. Test: make Merged-In: I8757a66bf625388e6f6419714ef5bba7af5d93ea Change-Id: I567c10dc8e833aa0a6775ab91f2ce9553b0dd8df
2018-05-03Remove hiddenapi-blacklist.txtDavid Brazdil
Create an empty file in the build rule instead. Do not merged this beyond AOSP. We have an implicitly built blacklist everywhere else. Bug: 64382372 Test: make Change-Id: I4e13e5daf635934a152d389a95bf45c482b5a87f Merged-In: Ifa912f8751025b7de24a982a1a227a9c27d18267
2018-05-03Add rule to build hidden API blacklistDavid Brazdil
Add a new Makefile rule 'hiddenapi-b-blacklist' which takes the manually published hiddenapi-p-light-greylist.txt and subtracts it from private-dex.txt built for the current branch. This is meant to provide an approximation of the blacklist in internal branches. Bug: 64382372 Test: make hiddenapi-aosp-blacklist Change-Id: I528a70cc6a71e988b53d94ca7ef81d6c181e5153
2018-05-02Merge "Update apidiff source files to use new api location." into ↵Anton Hansson
pi-dev-plus-aosp
2018-05-02Build hidden API DEX signatures with SoongDavid Brazdil
Internal master tree is still invoking Doclava with a Makefile build rule for hidden API, while the remaining Doclava rules have been migrated to Soong. Do the same for hidden API. Test: make out/soong/.intermediates/frameworks/base/hiddenapi-lists/android_common/private-dex.txt Merged-In: Ifa912f8751025b7de24a982a1a227a9c27d18267 Change-Id: Ifa912f8751025b7de24a982a1a227a9c27d18267 (cherry picked from commit 4f9d4d566c6022f18c245380a2f6cd51957ac12a)
2018-05-02Merge non-SDK @removed API and light greylistDavid Brazdil
am: 0585533a85 Change-Id: I3b052c65e23b813f96df9a8d28fe81961bf42a7f
2018-05-02Merge non-SDK @removed API and light greylistDavid Brazdil
@removed APIs are not part of the public SDK but we do not want to block access to them. Use the recently added removed-dex.txt list of @removed API signatures and merge it into the hidden API light greylist programmatically. Note that due to Doclava's rule precedence, @removed APIs which override a public SDK method are considered public and are whitelisted. We have to intersect removed-dex.txt with private-dex.txt to satisfy the rule that light greylist is a subset of private-dex.txt. Bug: 78182899 Test: make out/target/common/obj/PACKAGING/removed-dex.txt Change-Id: I44e54c405fc667d54a990b9ded1de8456802545e
2018-05-02Build list of @removed API's dex signaturesDavid Brazdil
CL Iba8869ce6e4f401a8e420ad83ab459d25bbbaae0 added Doclava support to generate a list of @removed API. Add a rule which builds that list. Bug: 78182899 Test: make out/target/common/obj/PACKAGING/removed-dex.txt Merged-In: Ifa912f8751025b7de24a982a1a227a9c27d18267 Merged-In: I80860c2b9f7213db65d0a9ca65bd645187aa0ce0 Change-Id: I688c14e0d2fbfafe9ac212e6abdc3593cb744ef9
2018-04-23Update apidiff source files to use new api location.Anton Hansson
Also remove some duplicated code between public api and system, by making a new make macro. Paths before: frameworks/base/../../prebuilts/sdk/api/28 frameworks/base/../../prebuilts/sdk/system-api/28 Paths after: prebuilts/sdk/28/public/api/android prebuilts/sdk/28/system/api/android Test: make offline-sdk-referenceonly-diff Test: make offline-system-sdk-referenceonly-diff Bug: 77525052 Change-Id: I54989816ea09ad7a1e2f2355926678e6d2edb27c
2018-04-23Move frameworks/base off the SRC_API_DIR variable.Anton Hansson
This directory is going away. Migrate to the new paths, and replace the long list of "since" arguments with a loop in the makefile. Also fix the soong buildfile to use the new path and the 28 prebuilts. This removes the need to update it every time an API is finalized (in make, I don't know how to make loops in soong). Bug: 77525052 Test: Verified variable is the same before & after, except for path change Change-Id: I1d4e87e7840e979b83779a2aefe176e7c1ed1527 Merged-In: I1d4e87e7840e979b83779a2aefe176e7c1ed1527
2018-04-23Move frameworks/base off the SRC_API_DIR variable.Anton Hansson
This directory is going away. Migrate to the new paths, and replace the long list of "since" arguments with a loop in the makefile. Also fix the soong buildfile to use the new path and the 28 prebuilts. This removes the need to update it every time an API is finalized (in make, I don't know how to make loops in soong). Bug: 77525052 Test: Verified variable is the same before & after, except for path change Change-Id: I1d4e87e7840e979b83779a2aefe176e7c1ed1527
2018-04-19Merge "Update docs 'since' for API 28." into pi-devAnton Hansson
am: 93f457c531 Change-Id: I86d0f88190fa9603ac3eef6468a73d32c1a633e3
2018-04-19Update docs 'since' for API 28.Anton Hansson
I'm replacing this list with a for-loop in master, so it shouldn't need updating in future (except for temporary apis). Bug: 77588754 Test: make docs Change-Id: Ib48218e303b53e2b16a13866e4423ee2ad1c2f4a
2018-03-29Merge "Federate platform docs against AndroidX" into pi-devAlan Viverette
am: 73a66276e3 Change-Id: I037ae591cb7fbdf33260ff7494a28a0ae22919c1
2018-03-28Federate platform docs against AndroidXAlan Viverette
Bug: 76692459 Test: make docs Change-Id: If1523ee47bcc58151a641938ac6f4a6e7ae1af0b
2018-03-28Merge "Revert Revert: Enable hidden API blacklist" into pi-devDavid Brazdil
am: c60a932ae5 Change-Id: I95c824b6107083667be474c4fc1f8d3bbd22648e
2018-03-28Revert Revert: Enable hidden API blacklistDavid Brazdil
APIs which have not been explicitly greylisted have so far been put on the dark greylist. This patch changes the default to blacklist and therefore enables strict enforcement. This reverts commit f712b23d56226c788f7892a984fb9abe6f5144c2. Bug: 64382372 Test: make Change-Id: I1608b1adbe5dcafd13335691ddeb94abbb2c6e71
2018-03-27Merge "Add serialization methods to hidden API light greylist" into pi-devDavid Brazdil
am: 02175b7847 Change-Id: Ie625488ec40b3fd18d11043a1d25f5ccb487c351
2018-03-27Add serialization methods to hidden API light greylistDavid Brazdil
This patch adds a build-time rule that adds all members with signatures: readObject(Ljava/io/ObjectInputStream;)V readObjectNoData()V readResolve()Ljava/lang/Object; serialVersionUID:J serialPersistentFields:[Ljava/io/ObjectStreamField writeObject(Ljava/io/ObjectOutputStream;)V writeReplace()Ljava/lang/Object; to the hidden API light greylist. This is needed so that apps can retain the ability to write their own serializers. Bug: 64382372 Bug: 73255398 Test: make Change-Id: I0103f47044e957bbff0a39230ff53562f3feddac
2018-03-22Merge "Revert "Enable hidden API blacklist"" into pi-devMathieu Chartier
am: 90ad15400a Change-Id: I1d2b05e6959538b5b60a63f76fcd10b42b8e83a5
2018-03-22Revert "Enable hidden API blacklist"David Brazdil
This reverts commit 16bfa11b73a34be1f1c72d2ffe86702f85378e92. Reason for revert: Revert until b/76138670 is fixed Bug: 64382372 Bug: 76138670 Bug: 76157445 Change-Id: Iaf6c76b773fbea4d4710b38808dee2e7e06f5e78
2018-03-21Merge "Enable hidden API blacklist" into pi-devNicolas Geoffray
am: 34aae0daad Change-Id: Ie71f420a40afcd63b0bf758e17fefe4ea59aee1b
2018-03-20Remove Make side (system/test-)api-stubs droiddoc targetsNan Zhang
Remove old droiddoc targets for api-stubs, system-api-stubs, and test-api-stubs. And also set api_tag_name, api_filename, private_api_filename, and etc. properties in Android.bp for new droiddoc. Test: manually compare if dependencies change after Soong based droiddoc runs. Bug: b/70351683 Change-Id: I8d944c83de120ec8148276adc1c9872113d9d29b Merged-In: I8d944c83de120ec8148276adc1c9872113d9d29b
2018-03-20Remove Make side (system/test-)api-stubs droiddoc targetsNan Zhang
Remove old droiddoc targets for api-stubs, system-api-stubs, and test-api-stubs. And also set api_tag_name, api_filename, private_api_filename, and etc. properties in Android.bp for new droiddoc. Test: manually compare if dependencies change after Soong based droiddoc runs. Bug: b/70351683 Change-Id: I8d944c83de120ec8148276adc1c9872113d9d29b Merged-In: I8d944c83de120ec8148276adc1c9872113d9d29b
2018-03-20Enable hidden API blacklistDavid Brazdil
APIs which have not been explicitly greylisted have so far been put on the dark greylist. This patch changes the default to blacklist and therefore enables strict enforcement. Bug: 64382372 Test: make Test: device boots Change-Id: Id38dd14382e9c2f0e853698ad7df7e9602084336
2018-03-16Add uses of hidden APIs from vendor appsDavid Brazdil
These will move into the dark greylist once we remove the UI toast. Merge them with light greylist for now. Bug: 64382372 Bug: 74589747 Bug: 74588266 Bug: 74586173 Bug: 74586969 Test: make Change-Id: I8c1d3b67b763e8b14a66874705ba7165cf421e72 Merged-In: I5d0ec308a0187d67df6d9a4f0778c9285dc1e2af
2018-03-08Whitelist all @SystemApi and @TestApi for hidden APIDavid Brazdil
We used to greylist @SystemApi and @TestApi individually, but we should allow all of them to be used. Run Doclava in a separate pass to generate a list of private APIs, assuming that @SystemApi and @TestApi override the @hide annotation. Bug: 64382372 Bug: 74346885 Test: check generated files Change-Id: Ie3726a294a4fdeb03fc8888878b013c9ad5bd04b
2018-03-07Remove com.android.internal{.util} from generated documentation.Tobias Thierer
com.android.internal.* is meant to be hidden from documentation, but most of it is erroneously not hidden via @hide or -hidePackage directives; why documentation is currently generated for Predicate but not other classes from com.android.internal.util, and why some but not all classes from that package show up in package-level documentation (package-summary.html), is not currently understood. There appears to be a behavior difference between OpenJDK 8 and OpenJDK 9's javadoc that results in additional classes showing up in package-summary.html. This CL fixes this by adding -hidePackage directives for com.android.internal{.util}; other sub-packages of com.android.internal do not currently show up in documentation and are not touched by this CL. Test: Patched this CL into the internal-master branch and ran: USE_R8=true EXPERIMENTAL_USE_OPENJDK9=true make offline-sdk-docs Checked that this removes all documentation for com.* (com.android.internal.util was the only com.* package for which documentation was previously generated). In other words: Before this CL, [1] existed, but after this CL, the entire directory subtree [2] does not exist. Test: Checked that Predicate was already missing from stubs before this CL. In other words, [3] already did not exist before this CL. [1] out/target/common/docs/offline-sdk/reference/com/android/internal/util/Predicate.html [2] out/target/common/docs/offline-sdk/reference/com [3] out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/classes/com Bug: 69736344 Bug: 69736236 (cherry picked from commit 97bb6cf371f51549c708cf58a04584968eaf7d5a) Merged-In: Ic9757f4966f54092aac0191896581fa4222cc634 Change-Id: Ic9757f4966f54092aac0191896581fa4222cc634
2018-03-06Remove com.android.internal{.util} from generated documentation.Tobias Thierer
com.android.internal.* is meant to be hidden from documentation, but most of it is erroneously not hidden via @hide or -hidePackage directives; why documentation is currently generated for Predicate but not other classes from com.android.internal.util, and why some but not all classes from that package show up in package-level documentation (package-summary.html), is not currently understood. There appears to be a behavior difference between OpenJDK 8 and OpenJDK 9's javadoc that results in additional classes showing up in package-summary.html. This CL fixes this by adding -hidePackage directives for com.android.internal{.util}; other sub-packages of com.android.internal do not currently show up in documentation and are not touched by this CL. Test: Patched this CL into the internal-master branch and ran: USE_R8=true EXPERIMENTAL_USE_OPENJDK9=true make offline-sdk-docs Checked that this removes all documentation for com.* (com.android.internal.util was the only com.* package for which documentation was previously generated). In other words: Before this CL, [1] existed, but after this CL, the entire directory subtree [2] does not exist. Test: Checked that Predicate was already missing from stubs before this CL. In other words, [3] already did not exist before this CL. [1] out/target/common/docs/offline-sdk/reference/com/android/internal/util/Predicate.html [2] out/target/common/docs/offline-sdk/reference/com [3] out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/classes/com Bug: 69736344 Bug: 69736236 Change-Id: I3243e2820348c338a54e42c72d29bed71389a6c4
2018-03-01Merge "Enable new yaml file for reference nav that lists all framework ↵Scott Main
files." into oc-mr1-dev am: e3c0216f95 am: 91ca55c174 Change-Id: I04555e22ddd6a26904e0c83d1113d67ff13e69a2
2018-03-01Merge "Enable new yaml file for reference nav that lists all framework ↵Scott Main
files." into oc-mr1-dev am: e3c0216f95 Change-Id: I535787ff921cb6e6978e57dd775e7446f67195f8
2018-03-01Enable new yaml file for reference nav that lists all framework files.Scott Main
This depends on DocLava changes in ag/3382461 bug: b/69845924 test: make ds-docs Change-Id: I4acd2c2034581b349ab4c00cbfe195ee5eca2354
2018-02-27Merge "docs: Adding P to the API levels"Andrew Solovay
2018-02-26docs: Adding P to the API levelsAndrew Solovay
Based this on SMain@ 's changes in ag/1936024 , which added the O API level for the O preview. Doc is staged to: go/dac-stage/reference/ For an example of a new API class with the watermark, see: go/dac-stage/reference/android/media/MediaPlayer2.html Test: make ds-docs Bug: 73009741 Change-Id: I591419c903222c9ad0c541dcd4bfce6a38ba1f2c
2018-02-26Remove icu4j dependency.Neil Fuller
This dependency is no longer required: it was added for libcore when libcore was implemented in terms of com.icu classes. libcore has since moved to android.icu (in core-libart) and so the droiddoc dependency is no longer required. Test: make droid docs Merged-In: I6e4e79a7df201fdc2cefa60037adf831593eaa0f Change-Id: I6e4e79a7df201fdc2cefa60037adf831593eaa0f
2018-02-26Remove icu4j dependency.Neil Fuller
This dependency is no longer required: it was added for libcore when libcore was implemented in terms of com.icu classes. libcore has since moved to android.icu (in core-libart) and so the droiddoc dependency is no longer required. Test: make droid docs Change-Id: I6e4e79a7df201fdc2cefa60037adf831593eaa0f
2018-02-16Framework: Disable [MissingOverride] for platformprotosAndreas Gampe
Bug: 72714520 Test: m javac-check-platformprotos RUN_ERROR_PRONE=true Merged-In: I00f5a588fa74621d4c35dc4e39b54536815ad476 Change-Id: I00f5a588fa74621d4c35dc4e39b54536815ad476
2018-02-15Framework: Disable [MissingOverride] for platformprotosAndreas Gampe
Bug: 72714520 Test: m javac-check-platformprotos RUN_ERROR_PRONE=true Change-Id: I00f5a588fa74621d4c35dc4e39b54536815ad476
2018-02-13Merge "Fix link-type check warnings for platformprotosnano"TreeHugger Robot
2018-02-13Merge "Don't put android.os.Parcelable in framework.aidl" am: 0872f6d5e3 am: ↵Colin Cross
6864210fe2 am: 37ba3de333 Change-Id: Ib8d8277171ede82ea4626b6d2de2fcb9c1a1d307
2018-02-12Fix link-type check warnings for platformprotosnanoJiyong Park
platformprotosnano is used by cts-amwm-util and this is causing link-type check warning because cts-amwm-util is built using SDK but platformprotosnano isn't. Since platformprotosnano can actually be built with SDK APIs only, setting LOCAL_SDK_VERSION to 'current' instead of building against core-oj and core-libart which contain private APIs. LOCAL_SDK_VERSION := core_current has been tried but it didn't work because libprotobuf-java-nano is using Android APIs (thus marked as java:sdk). java:core -> java:sdk dependency is not allowed. Bug: 69899800 Test: m -j platformprotosnano Change-Id: I14a9a80bb218dae63e8320b7aab40d7ad48a7a13
2018-02-09Don't put android.os.Parcelable in framework.aidlColin Cross
Parcelable shouldn't be in the list of parcelables in framework.aidl. Remove it to fix warning when running aidl: framework.aidl:287 attempt to redefine built in class android.os.Parcelable Also make the dependency on sdk_parcelables not be order-only so framework.aidl gets rebuilt when sdk_parcelables changes. Bug: 73135791 Test: ParcelableDetectorTest Test: out/target/common/obj/framework.aidl does not contain android.os.Parcelable Change-Id: If5222879be9ec1e5fa08810adc624ec526ddc0ec
2018-02-08Revert "Make blacklist the default hidden API list"Nicolas Geoffray
Bug: 64382372 This reverts commit 3f4136c3b76d2ec9cdba9caf132d9ca2958821b7. Reason for revert: Causing too many downstream issues together with I2c1353d31386da447456b17f9643c0470128ee3d. Revert to unblock pi-release and testing. Bug: 73105914 Bug: 73103669 Bug: 73106486 Bug: 64382372 Bug: 73103081 Bug: 73119220 Bug: 73114663 Change-Id: I072dd571f779e2b5e405d21eecce5a60d1b3c7f2
2018-02-08Make blacklist the default hidden API listDavid Brazdil
Starting with DP1 we will move private APIs that have not been explicitly greylisted into the blacklist. Modify Android.mk to generate the API lists accordingly. Bug: 64382372 Test: make, inspect out/target/common/obj/PACKAGING/hiddenapi-* Change-Id: I1d817ba6b95058ad052a2c7663ef99257bdeffc1