From 79e35c3bebb348be9ccb95bfd7d1862365303fcb Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Tue, 11 Feb 2020 14:36:40 +0000 Subject: [PATCH] Enable compat checking & lint for module_lib api These were previously turned off as there were no previous releases to compare it to. Check in empty files as comparison. The new tethering APIs fail lint -- I have filed a release blocking bug to get these cleaned up. Bug: 149430003 Bug: 147559833 Test: m module-lib-api-api-lint Test: m module-lib-api-check-last-released-api (with+without incompatibilities) Change-Id: I2b171dc836ca121502fb345d8dd512a05c566a49 --- StubLibraries.bp | 23 ++++++++++------------ api/module-lib-lint-baseline.txt | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 api/module-lib-lint-baseline.txt diff --git a/StubLibraries.bp b/StubLibraries.bp index 50d23ad2d6576..4616ced1226c3 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -197,20 +197,17 @@ droidstubs { api_file: "api/module-lib-current.txt", removed_api_file: "api/module-lib-removed.txt", }, - // TODO(b/147559833) enable the compatibility check against the last release API - // and the API lint - //last_released: { - // api_file: ":last-released-module-lib-api", - // removed_api_file: "api/module-lib-removed.txt", - // baseline_file: ":module-lib-api-incompatibilities-with-last-released" - //}, - //api_lint: { - // enabled: true, - // new_since: ":last-released-module-lib-api", - // baseline_file: "api/module-lib-lint-baseline.txt", - //}, + last_released: { + api_file: ":last-released-module-lib-api", + removed_api_file: "api/module-lib-removed.txt", + baseline_file: ":module-lib-api-incompatibilities-with-last-released" + }, + api_lint: { + enabled: true, + new_since: ":last-released-module-lib-api", + baseline_file: "api/module-lib-lint-baseline.txt", + }, }, - //jdiff_enabled: true, } diff --git a/api/module-lib-lint-baseline.txt b/api/module-lib-lint-baseline.txt new file mode 100644 index 0000000000000..6e59596cb05f3 --- /dev/null +++ b/api/module-lib-lint-baseline.txt @@ -0,0 +1,33 @@ +// Baseline format: 1.0 +ActionValue: android.net.TetheringConstants#EXTRA_ADD_TETHER_TYPE: + Inconsistent extra value; expected `android.net.extra.ADD_TETHER_TYPE`, was `extraAddTetherType` +ActionValue: android.net.TetheringConstants#EXTRA_PROVISION_CALLBACK: + Inconsistent extra value; expected `android.net.extra.PROVISION_CALLBACK`, was `extraProvisionCallback` +ActionValue: android.net.TetheringConstants#EXTRA_REM_TETHER_TYPE: + Inconsistent extra value; expected `android.net.extra.REM_TETHER_TYPE`, was `extraRemTetherType` +ActionValue: android.net.TetheringConstants#EXTRA_RUN_PROVISION: + Inconsistent extra value; expected `android.net.extra.RUN_PROVISION`, was `extraRunProvision` +ActionValue: android.net.TetheringConstants#EXTRA_SET_ALARM: + Inconsistent extra value; expected `android.net.extra.SET_ALARM`, was `extraSetAlarm` +ActionValue: android.net.TetheringManager#ACTION_TETHER_STATE_CHANGED: + Inconsistent action value; expected `android.net.action.TETHER_STATE_CHANGED`, was `android.net.conn.TETHER_STATE_CHANGED` +ActionValue: android.net.TetheringManager#EXTRA_ACTIVE_TETHER: + Inconsistent extra value; expected `android.net.extra.ACTIVE_TETHER`, was `tetherArray` +ActionValue: android.net.TetheringManager#EXTRA_AVAILABLE_TETHER: + Inconsistent extra value; expected `android.net.extra.AVAILABLE_TETHER`, was `availableArray` +ActionValue: android.net.TetheringManager#EXTRA_ERRORED_TETHER: + Inconsistent extra value; expected `android.net.extra.ERRORED_TETHER`, was `erroredArray` + + +ManagerConstructor: android.net.TetheringManager#TetheringManager(android.content.Context, java.util.function.Supplier): + Managers must always be obtained from Context; no direct constructors + + +PrivateSuperclass: android.location.GnssAntennaInfo.PhaseCenterVariationCorrections: + Public class android.location.GnssAntennaInfo.PhaseCenterVariationCorrections extends private class android.location.GnssAntennaInfo.SphericalCorrections +PrivateSuperclass: android.location.GnssAntennaInfo.SignalGainCorrections: + Public class android.location.GnssAntennaInfo.SignalGainCorrections extends private class android.location.GnssAntennaInfo.SphericalCorrections + + +StaticUtils: android.net.TetheringConstants: + Fully-static utility classes must not have constructor