Commit Graph

71 Commits

Author SHA1 Message Date
Paul Duffin
abebc6a897 Switch to standard naming scheme
Removes use of the special framework-modules naming scheme.

Bug: 155164730
Test: m java
Exempt-From-Owner-Approval: Build cleanup.
Change-Id: I3b78fcbcacc3df787e171d6eedeef1e51b087615
Merged-In: I0c31e2183353dfb5bd49f04f3455cb7b10be6866
(cherry picked from 8b864fb45c)
2020-06-02 06:53:53 +00:00
Dmitri Plotnikov
defd82296d Merge "Fold service-jobscheduler and service-blobstore into services.jar" into rvc-dev 2020-05-06 19:41:49 +00:00
Anton Hansson
0cdc5c26bc Merge "Fix last-released check of removed.txt" into rvc-dev 2020-05-06 08:32:29 +00:00
Dmitri Plotnikov
4eaac3afcc Fold service-jobscheduler and service-blobstore into services.jar
Test: atest android.jobscheduler.cts
Bug: 155631167
Change-Id: I04877a0662e1a92dc11da43e5c42981638a878b7
2020-05-06 03:06:58 +00:00
Jeff Sharkey
559130df3f Merge "Add custom Error Prone check for SDK comparisons." into rvc-dev 2020-05-04 23:10:06 +00:00
Jeff Sharkey
4d1d7b56cd Add custom Error Prone check for SDK comparisons.
Over the years we've had several obscure bugs related to how SDK level
comparisons are performed, specifically during the window of time
where we've started distributing the "frankenbuild" to developers.

Consider the case where a framework developer shipping release "R"
wants to only grant a specific behavior to modern apps; they could
write this in two different ways:

1. if (targetSdkVersion > Build.VERSION_CODES.Q) {
2. if (targetSdkVersion >= Build.VERSION_CODES.R) {

The safer of these two options is (2), which will ensure that
developers only get the behavior when *both* the app and the
platform concur on the specific SDK level having shipped.

Consider the breakage that would happen with option (1) if we
started shipping APKs that are based on the final R SDK, but are
then installed on earlier preview releases which still consider R
to be CUR_DEVELOPMENT; they'd risk crashing due to behaviors that
were never part of the official R SDK.

Bug: 64412239
Test: ./build/soong/soong_ui.bash --make-mode services RUN_ERROR_PRONE=true
Exempt-From-Owner-Approval: trivial blueprint changes
Change-Id: Ia20181f8602451ac9a719ea488d148e160708592
2020-05-04 23:09:48 +00:00
Anton Hansson
960c675a83 Fix last-released check of removed.txt
The last-released checks should check compatibility of the removed.txt
file generated from src with the checked in last-released removed.txt.
It was previously checking compatibility with the checked in removed.txt
at HEAD, which is what check_api is for.

Bug: 155197156
Test: m checkapi
Change-Id: I0f4eca5a30ee13e2c098ccf50e1b992adf4e22cb
2020-05-02 18:03:21 +01:00
Anton Hansson
48ee95e9b1 Change last-released filegroup
There were two different filegroups referencing the same last released
APIs. Delete the manually defined one and switch references over to use
the one defined by prebuilt_apis.

Bug: 155197156
Test: m
Change-Id: Ib15d2c08e6400546ca03de6bfd4e5cbcc938c992
2020-05-02 17:49:26 +01:00
Anton Hansson
960c16cd38 Remove obsolete droidstub args
- I see no usages of private_api_filename / private.txt /
  private_dex_api_filename
- tags are no longer used as of
  Iff355041d88eb59ac47dd19a03e993cf1ce3927e
- api_filename/removed_api_filename does nothing if check_api is
  specified. test-api does not need a removed.txt

Bug: 152479829
Bug: 144149403
Test: m
Change-Id: Ic1e859dc6aa91f8d7b4f285b63d3faafb27edc9b
2020-04-22 20:59:21 +01:00
Artur Satayev
d6503d5cfd Merge "Export change id processor." into rvc-dev 2020-03-29 18:07:37 +00:00
Artur Satayev
f9172bd785 Export change id processor.
- Don't declare the plugin directly, it is exported via java_library that defines the sources.
- Remove unneeded framework-annotation-proc.

Bug: 152220864
Test: m && diff merged_compat_config.xml
Change-Id: Ie750b5391229d21679a8610780b9f8d4a997e204
Merged-In: Ie750b5391229d21679a8610780b9f8d4a997e204
(cherry picked from commit 9f5a5623a7)
2020-03-28 19:24:53 +00:00
Anton Hansson
442fcf48c4 Add package filter for system_server stubs
Should prevent accidental addition of APIs outside com.android,
which is where we want these APIs to be.

Also fix a bug in the permission filegroup where it wasn't
specifying the subpath of its code.

Bug: 149293194
Test: m update-api
Change-Id: I144ce6dbfe524106fc7de87318f66390c31b45af
2020-03-27 15:09:26 +00:00
Anton Hansson
d9a3fee23d Convert disting of api txt from mk to bp
droidstubs dist now dists the api file, so convert these manual
mk rules into bp dist instead.

Bug: 149293194
Test: m dist sdk && find out/dist/apistubs -name /android\.txt
Change-Id: I96052b427dc01a6d24b040ad0006129d4d1e48fb
2020-03-23 18:33:21 +00:00
Anton Hansson
7b0414beb7 Add module_lib and system-server artifacts to sdk dist
Makes these artifacts available for the update_prebuilts script.

Bug: 149293194
Test: m win_sdk dist && find out/dist -type f
Change-Id: Ia1064e50e987433e5e308527c6770ba2d3e8bde3
2020-03-19 19:21:49 +00:00
Anton Hansson
a49fb99d8c Make system_server stubs consistent with other stubs
Include the module_api stubs in system_server one instead of
putting both of these jars on the classpath. Also rename it
to be in line with the other stubs.

Bug: 149293194
Test: m
Change-Id: I2a9318c8ae036edafac086687601fa73d9bf4678
2020-03-19 17:56:49 +00:00
Anton Hansson
fe8b04583b Create all variants of stubs for tethering
Add separate publicapi, systemapi and module_libs stubs for tethering.

Bug: 147768409
Test: m
Test: m framework-tethering-stubs-{public,system,module_libs_}api
Change-Id: I0ed44691b4e7080818442a9d0eb37d874f707195
2020-03-10 13:13:36 +00:00
Roshan Pius
ea33fb9ab8 SupplicantManager: Expose an API to start/stop supplicant daemon
Bug: 149923078
Test: Compiles
Change-Id: Ic7027f0d18abee2ea1c9e48700c706954d54773a
2020-02-20 14:03:17 -08:00
Anton Hansson
f74130f525 Allow com.android.* classes in system_service stubs
The android.* rule is meant to be for the public SDK.

Bug: 147559833
Test: m checkapi
Change-Id: I8b36cf7a4ff569d0b960455de09ed40592dd5a9e
2020-02-19 18:29:12 +00:00
Anton Hansson
daa9d88444 Enable compat checking & lint for system_services api
These were previously turned off as there were no previous
releases to compare it to. Check in empty files as comparison.

Whitelist current lint problems for now (filed bugs to follow-up).

Bug: 149818061
Bug: 149818284
Bug: 147559833
Test: m checkapi
Change-Id: Ib4cbc84ac9a826f7b947c951c94f8f5578f4554d
2020-02-19 12:03:04 +00:00
Muhammad Qureshi
8ea733e435 Clean up service-statsd
- Build against framework-statsd
- Build against service-stubs

Bug: 146084685
Test: m
Change-Id: I0b855c065ce0159dbfd73998a54bc388a4d9611a
2020-02-08 22:37:04 -08:00
markchien
2c153703e4 Use framework-tethering-stub instead of framework-tethering
The non-updatable part of the platform now is built with
framework-tethering-stub, which is a stub library of
framework-tethering.

Bug: 147200698
Test: m
Change-Id: I97ef83f7f9b4c1376f373713036f5256318f1050
2020-02-07 00:27:26 +08:00
Makoto Onuki
af97aef137 Stop using SystemApi.process per the latest spec
Bug: 148177503
Test: Build / treehugger

Change-Id: If656b2faa2e031775ef1fc4e9bfaeb170db55620
2020-02-04 17:05:49 +00:00
Jiyong Park
5ba39dfc27 rename services-stub-sources filegroup to services-all-sources
The filegroup contains all source files for the system server. Calling
it services-stub-sources is misleading and is causing a confusion with
'services-stubs.sources' which is the metalava-filtered source files for
the stub library 'services-stub'.

Bug: N/A
Test: m
Change-Id: I123fbee3c5b5f4d3e8e070e4374d40effc6b799c
2020-01-19 19:08:37 +09:00
Hai Zhang
76f0defebf Move runtime permissions persistence into APEX.
Bug: 136503238
Test: presubmit
Change-Id: Id016d8c111ceadd27dc318c256b2f32ff0380f60
2020-01-17 19:05:48 -08:00
Automerger Merge Worker
f0c149099d Merge "Annotating a class with @SystemApi makes its members @SystemApi" am: 9c8b644b83 am: 6813b8a90b am: 6c1921ece5
Change-Id: I85329e6252dfa71d247f10d26d9a8e07cddf9c2b
2020-01-09 01:16:41 +00:00
Jiyong Park
3160c60a21 Annotating a class with @SystemApi makes its members @SystemApi
This change fixes a bug that annotating a class in services.jar as
@SystemApi doesn't automatically make its member fields and methods as
@SystemApi. The problem was due to a wrong option to the metalava.

Bug: 147322525
Test: cherry-pick ag/10037363 and `m update-api`.
services/api/current.txt contains all the symbols from the
SystemService class.

Change-Id: I30a515761f8d1792593f207fa4e268ab68a81480
2020-01-08 10:13:48 +09:00
Danning Chen
20b32edbfe Add the skeleton code for People Service which is a new system service with only internal APIs
Change-Id: I78b1b362735d5da40c49a344ae3063ea0df0759f
Bug: 146522621
Test: Code builds and runs successfully
2020-01-01 13:46:38 -08:00
Jiyong Park
1a3b9b93d0 Add API signature files for the system server APIs
... so that they can be reviewed.

Bug: 140202860
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: Iec8cdd30ad5e4979d56140a8c00a85af6476f67f
(cherry picked from commit 13c923d00a)
Change-Id: Iec8cdd30ad5e4979d56140a8c00a85af6476f67f
2019-12-26 15:15:58 +09:00
Jiyong Park
13c923d00a Add API signature files for the system server APIs
... so that they can be reviewed.

Bug: 140202860
Test: m
Change-Id: Iec8cdd30ad5e4979d56140a8c00a85af6476f67f
2019-12-24 00:22:36 +09:00
Jiyong Park
5640e1d836 Merge changes I4af73809,Iba6a564a,I3305b71e
* changes:
  Hide com.android.server package with @hide javadoc tag
  Add more enums for the client and process attributes of SystemApi
  SystemApi is parameterized
2019-12-22 08:15:25 +00:00
Treehugger Robot
99d091ee81 Merge "Add services-stubs for in-process APIs in services.jar" 2019-12-22 01:38:33 +00:00
markchien
ae8aa646dc [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-20 10:31:31 +08:00
markchien
6d06f6d51a [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +08:00
Jiyong Park
5ed5a04385 Add more enums for the client and process attributes of SystemApi
For the client attribute, we have
- MODULE_APPS for representing APKs implementing modules which are
considered part of the platform
- MODULE_LIBRARIES for representing jars inside modules.

For the process attribute, we have
- SYSTEM_SERVER for representing the system_server process.

For example, @SystemApi(client=MODULE_LIBRARIES,process=ALL) actually
means that the API is meant to be available for classes in the
bootclasspath but not to the classes from the app classloader.

Bug: 140202860
Test: m

Exempt-From-Owner-Approval: cherry-picked from internal

Merged-In: Iba6a564a0967e4d109164849ee6d6500d46469de
(cherry picked from commit 88d5e494c4)
Change-Id: Iba6a564a0967e4d109164849ee6d6500d46469de
2019-12-19 11:49:39 +09:00
TreeHugger Robot
86c09b2ddc Merge changes I4af73809,Iba6a564a
* changes:
  Hide com.android.server package with @hide javadoc tag
  Add more enums for the client and process attributes of SystemApi
2019-12-19 02:46:17 +00:00
Jiyong Park
88d5e494c4 Add more enums for the client and process attributes of SystemApi
For the client attribute, we have
- MODULE_APPS for representing APKs implementing modules which are
considered part of the platform
- MODULE_LIBRARIES for representing jars inside modules.

For the process attribute, we have
- SYSTEM_SERVER for representing the system_server process.

For example, @SystemApi(client=MODULE_LIBRARIES,process=ALL) actually
means that the API is meant to be available for classes in the
bootclasspath but not to the classes from the app classloader.

Bug: 140202860
Test: m
Change-Id: Iba6a564a0967e4d109164849ee6d6500d46469de
2019-12-19 09:49:18 +09:00
Anton Hansson
6fb18bbfdb Cleanup framework-all usage
It generally shouldn't be depended on. Only by droidstubs for
modules.

Bug: 137191822
Test: m
Change-Id: I16e672aaae80d8bcce25e46c34984797740aae1b
2019-12-18 07:03:15 +00:00
Jiyong Park
abe6158431 SystemApi is parameterized
We have decided to reuse the existing annotation @SystemApi for all Java
APIs regardless of whether they are for apps or platform internal
modules. This was because introducing new annotation types every time
when we have to create new API surfaces will only increase the confusion
without giving much benefit.

Instead, to differenciate the different API surfaces of @SystemApi, the
annotation type is parameterized. Specifically, it has to axises.

client: specifies the intended client of the API.

process: specifies the process(es) that the API is available.

The default for client and process are priv-apps and all, respectively,
which corresponds to the today's @SystemApi for privileged apps like
GMS.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 140202860
Test: m
Merged-In: I3305b71e22970e80db95f3daf3d7713603c7d68d
(cherry picked from commit 119afc0695)
Change-Id: I3305b71e22970e80db95f3daf3d7713603c7d68d
2019-12-17 17:52:15 +09:00
Jiyong Park
759a269a65 Add services-stubs for in-process APIs in services.jar
services-stubs is a stubs library for services.jar. It provides the
in-process APIs that's available inside the system server process
running services.jar.

Currently, all APIs in the jar are hidden by annotating
com.android.server package with @android.annotation.Hide. To add some
APIs,

1) remove package-info.java for com.android.server
2) add package-info.java for other sub packages
3) annotate them with @android.annotation.Hide except for the package
where the newly added APIs are in

This change also added android.annotation.Hide class which can be used
to hide an API without using the @hide javadoc tag. This opens up the
possibility of running metalava over the compiled jar, which is expected
to be much faster than when ran with source files.

Bug: 139391334
Test: m
Test: m services-stubs

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: I027b8a22b3e7533f6203aabb9dc3f690e4e842a6
(cherry picked from commit abc72e45c6)
Change-Id: I027b8a22b3e7533f6203aabb9dc3f690e4e842a6
2019-12-17 14:20:15 +09:00
Jiyong Park
119afc0695 SystemApi is parameterized
We have decided to reuse the existing annotation @SystemApi for all Java
APIs regardless of whether they are for apps or platform internal
modules. This was because introducing new annotation types every time
when we have to create new API surfaces will only increase the confusion
without giving much benefit.

Instead, to differenciate the different API surfaces of @SystemApi, the
annotation type is parameterized. Specifically, it has to axises.

client: specifies the intended client of the API.

process: specifies the process(es) that the API is available.

The default for client and process are priv-apps and all, respectively,
which corresponds to the today's @SystemApi for privileged apps like
GMS.

Bug: 140202860
Test: m
Change-Id: I3305b71e22970e80db95f3daf3d7713603c7d68d
2019-12-13 14:58:16 +09:00
Jiyong Park
e86e89acff Add filegroups for services.* libraries
... in preparation for creating a stub library from services.jar

Bug: 139391334
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: Ifd6cfc77acf2284804a2f64011c2733b5c222369
(cherry picked from commit bae2e90796)
Change-Id: Ifd6cfc77acf2284804a2f64011c2733b5c222369
2019-12-11 15:55:33 +09:00
Jiyong Park
abc72e45c6 Add services-stubs for in-process APIs in services.jar
services-stubs is a stubs library for services.jar. It provides the
in-process APIs that's available inside the system server process
running services.jar.

Currently, all APIs in the jar are hidden by annotating
com.android.server package with @android.annotation.Hide. To add some
APIs,

1) remove package-info.java for com.android.server
2) add package-info.java for other sub packages
3) annotate them with @android.annotation.Hide except for the package
where the newly added APIs are in

This change also added android.annotation.Hide class which can be used
to hide an API without using the @hide javadoc tag. This opens up the
possibility of running metalava over the compiled jar, which is expected
to be much faster than when ran with source files.

Bug: 139391334
Test: m
Test: m services-stubs
Change-Id: I027b8a22b3e7533f6203aabb9dc3f690e4e842a6
2019-12-06 16:30:22 +09:00
Automerger Merge Worker
1601683d93 Merge "Export path to profile (to be used by other modules)." am: 831cad71f3 am: 80a64f666e
Change-Id: I261e7799fb181117ac5f5f3783f2ce55c8c3c6b6
2019-12-04 22:42:24 +00:00
Ulya Trafimovich
0d1b063d6c Export path to profile (to be used by other modules).
Test: m
Change-Id: Id7dad3c49152fe45d72d743cba88476d3ae58241
2019-12-03 11:59:51 +00:00
Roshan Pius
ac76d48454 Revert "Mainline wifi stack module"
This reverts commit 6f5338dd8f.

Reason for revert: Wifi services no longer plan to be a separate
APK/process for mainline. Will instead become a jar loaded from Apex.

Bug: 144722612
Test: Device boots up & connects to wifi networks.
Change-Id: I293e36973c4bdbd8bf9db2fcd78e61e6c38b39f4
2019-11-25 20:59:31 -08:00
Jiyong Park
bae2e90796 Add filegroups for services.* libraries
... in preparation for creating a stub library from services.jar

Bug: 139391334
Test: m
Change-Id: Ifd6cfc77acf2284804a2f64011c2733b5c222369
2019-11-17 14:05:08 +09:00
Al Sutton
a2de241c84 Revert "Add BackupEncryption apk as requirement for services"
This reverts commit 38e0e2cc44.

Reason for revert: Backup Encryption is not being delivered in R, so we should not package this APK with all system images.

Change-Id: I262f04839b7bc314ef451769ccd3ae011ca9c4e7
2019-10-31 13:57:13 +00:00
Al Sutton
38e0e2cc44 Add BackupEncryption apk as requirement for services
Bug: 111386661
Test: `m clobber; m -j` then ensure BackupEncrypter.apk is in the system image
Change-Id: I0bd55fc53b74a17fa496681a5afcbf042df45a30
2019-09-23 11:05:26 +01:00
Anna Trostanetski
bfd56df443 Merge "Remove prefix property from platform_compat_config module" am: cc55cca985 am: eb6576d67d am: 68c7df5124 am: d8327e2b74
am: d8ad090cf0

Change-Id: If371525951302629018504590bbb168f10d89107
2019-08-29 10:45:22 -07:00
Anna Trostanetski
eb6576d67d Merge "Remove prefix property from platform_compat_config module"
am: cc55cca985

Change-Id: Id0739fe8a6460a361243a029d259c608e3d9e736
2019-08-29 10:08:38 -07:00