13 Commits

Author SHA1 Message Date
Anton Hansson
d8ac5fa1b2 Use ro.build.version.extensions.r
The sdk_info prop is mostly there as a communication channel
if we need to channel more information in the future. For now,
using ro.build.version.extensions.r (which is "stable") is sufficient.

Bug: 137191822
Test: boot and getprop ro.build.version.extensions.r
Change-Id: I630c235fd98eaeda9086fa490914e56556b18706
2019-12-11 13:26:15 +00:00
Anton Hansson
3f19841dc2 Merge "Migrate sdkext tests to CTS" 2019-12-10 18:36:56 +00:00
Anton Hansson
370add0c6a Merge "Expose SdkExtension in the system SDK" 2019-12-10 17:43:38 +00:00
Anton Hansson
e15e6483f6 Revert "Add genrule for the current sdk proto"
This reverts commit 1911d7c1a27771dde909deeed5cc99e6a744e8ce.

Bug: 145882325
Test: treehugger
Change-Id: I94ca81c29ef967a489b1e3c34591134fa0bb0b35
2019-12-09 17:30:13 +00:00
Anton Hansson
099c082dfe Migrate sdkext tests to CTS
Bug: 143937446
Test: treehugger
Change-Id: I583952fdfe8f169c6839a6488837bf4fb964d5a7
2019-12-09 17:21:56 +00:00
Anton Hansson
b52bd1cbbe Expose SdkExtension in the system SDK
Also tweak the javadoc a little bit.

Bug: 137191822
Bug: 143937447
Test: treehugger
Change-Id: Iae1b025685344c2ffe4ed1089850b447c82a6b83
Merged-In: Iae1b025685344c2ffe4ed1089850b447c82a6b83
2019-12-09 17:21:24 +00:00
Anton Hansson
9ff695eee1 Add TEST_MAPPING
...and remove the broken test!

Bug: 137191822
Test: treehugger (hopefully!?)
Change-Id: I175c1262275ae95caabac32a5308fd454ae62a4d
2019-12-06 19:00:33 +00:00
Anton Hansson
ff172bbbc7 Add an init service for setting sdk props
Add a oneshot init service, to be triggered early in the boot.
This is unlikely to be the permanent solution, but allows us
to get off the ground by at least getting the prop set.

Bug: 137191822
Test: m com.android.sdkext
Test: boot && adb shell getprop | grep sdk_info
Change-Id: I253c56961289d1226f3a9a471e7b6ca047c52a4e
2019-12-05 18:27:53 +00:00
Anton Hansson
1911d7c1a2 Add genrule for the current sdk proto
This is intended to be added to all apexes exposing SDK apis. The
version can then be bumped by changing the value in a single place.
The current version is 0.

Also build this into the sdkext module.

Bug: 137191822
Test: m com.android.sdkext
Change-Id: Ic2cd92ad1d184c8a01f0bc3d4fc21deb588cb7e8
2019-12-05 16:28:32 +00:00
Anton Hansson
a82f161d33 Add derive_sdk binary for reading sdk protos
Put the lowest seen number in a persist sysprop.

Bug: 137191822
Test: manual ran derive_sdk on device with fake protos installed
Change-Id: Ic73d615d9d60769d237aa5a72dae2dfe56463007
2019-12-05 11:05:17 +00:00
Anton Hansson
4ec07fadef Add SdkExtensions class
It currently just reads a prop that is never set, but that will
be updated separately.

Keep the class @hide for now.

Bug: 137191822
Test: m com.android.sdkext
Change-Id: I1a874bf3d3e34676b5d767c4d03b09337b193cce
2019-12-02 15:32:39 +00:00
Anton Hansson
5559245baa Add apex build rule for com.android.sdkext
Bug: 137191822
Test: m com.android.sdkext
Change-Id: I8b349e7b4705f0d9d3f2125778e2c6b6d0638879
2019-12-02 14:24:54 +00:00
Anton Hansson
98460abc89 Add scaffolding for 'sdkext' module
This module will have a java framework part as well as a native
binary. Add directory and hook future java sources into the stub
rules.

Bug: 137191822
Test: m
Change-Id: I5527a055bf935178b88a1b20504b251f18f3d873
2019-12-02 13:56:06 +00:00