Commit Graph

204 Commits

Author SHA1 Message Date
Yifan Hong
dd0e942597 IBatteryPropertiesRegistrar: remove unused functions
* Remove BatteryProperties
* Remove IBatteryPropertiesListener
* Remove IBatteryPropertiesRegistrar.(un)registerListener
  functions

Test: builds
Test: boots
Bug: 68724651
Change-Id: Ic9a9d337e5cb39784db1a2745297ef985dd31653
2018-05-04 14:50:42 -07:00
David Brazdil
4f9d4d566c Build hidden API DEX signatures with Soong
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
Change-Id: Ifa912f8751025b7de24a982a1a227a9c27d18267
2018-04-26 16:06:08 +01:00
David Brazdil
9150bd4b48 Merge "Generate @removed DEX API signatures" am: eddd165c20
am: 86cd9642c3

Change-Id: I936c3b375a4c1a58c301965f6a2922e135699663
2018-04-26 07:41:56 -07:00
David Brazdil
df41728b85 Generate @removed DEX API signatures
CL I8fe27e8c03334f9c90204db1e69447de65a06a38 adds support to generate
a list of all @removed DEX API signatures. Amend the public API build
rule to produce this file.

Bug: 78182899
Test: make
Change-Id: Iba8869ce6e4f401a8e420ad83ab459d25bbbaae0
2018-04-24 16:27:53 +01:00
Anton Hansson
e5bf20608a Move frameworks/base off the SRC_API_DIR variable.
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-23 15:46:19 +01:00
Anton Hansson
6a9e72651b Move frameworks/base off the SRC_API_DIR variable.
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-23 11:44:53 +01:00
Makoto Onuki
fa3a2acfbc Merge "Add stats logging to ServiceManager and NPMS" into pi-dev
am: a26e755900

Change-Id: Ib0bd9ecc183b1b2c9a6785554e6f717744820da3
2018-04-11 18:39:53 -07:00
Makoto Onuki
49392d335a Add stats logging to ServiceManager and NPMS
ServiceManager:
- Do an event log every N getService() calls with total time spent
in getService().
where N = 100 for core UIDs and 200 for other apps.

- Do an event log if getService() takes longer than N ms.
where N = 10 for core UIDs and 50 for other apps.

... with some extra throttling.

NPMS:
- Do the basic "stats logger" log for updateNetworkEnabledNL() and
isUidNetworkingBlocked()

This CL also enhances StatsLogegr so it now can show the slowest call
and the max # of calls per-second.

Bug: 77853238
Test: Manual test:
- Insert a SIM card
- Set data limit
- toggle airplane mode
- toggle wifi
- toggle mobile data

Then
- "dumpsys netpolicy" and "dumpsys activity processes" and check the stats
- also check "adb logcat -b all | grep ' service_manager'"

Change-Id: I5789541063f95d0eac501189816c8604a4571ba0
2018-04-11 16:37:57 -07:00
Nan Zhang
99ce5c7090 Add filegroup for supporting apache-http stubs generation.
Bug: b/70351683
Test: m clean && m check-apache-http-legacy-api,
and compare the old and new stubs.jar using md5sum.

Change-Id: I0035837aef48a76e40a2c723c2adce3ff129ad28
Merged-In: I0035837aef48a76e40a2c723c2adce3ff129ad28
2018-04-11 14:57:28 -07:00
Nan Zhang
a0f91af44d Add filegroup for supporting apache-http stubs generation.
Bug: b/70351683
Test: m clean && m check-apache-http-legacy-api,
and compare the old and new stubs.jar using md5sum.

Change-Id: I0035837aef48a76e40a2c723c2adce3ff129ad28
2018-04-10 12:46:31 -07:00
Colin Cross
7c99052071 Merge "Add a droiddoc generator for hwbinder.stubs" am: 1142ffcc9b
am: c97d768b6b

Change-Id: I63439c9bcf33f7ed64791e84a493e257b7ec7991
2018-04-10 12:26:56 -07:00
Vishwath Mohan
f2f7495f49 Merge "Rename BiometricDialog to BiometricPrompt." into pi-dev
am: 5ab3cf8bec

Change-Id: Id450c37765a5f657c6fe422aa98e3b7191d7b773
2018-04-05 14:49:14 -07:00
Vishwath Mohan
ecf00cedb6 Rename BiometricDialog to BiometricPrompt.
Renamed to BiometricPrompt per API-council feedback.

Bug: 77494933
Test: m -j70
Change-Id: Ifed2b8f3439a7e671e0ce46d3a7db9f24871b16a
2018-04-05 10:41:19 -07:00
Colin Cross
a2b78a7ed2 Add a droiddoc generator for hwbinder.stubs
hwbinder.stubs provides stubs for @SystemAPI hwbinder classes
that doesn't depend on framework, used to break a dependency cycle
between hidl interfaces and android_system_stubs_current while
satisifying the link type checks.

Bug: 77285514
Test: m checkbuild
Change-Id: Id4093e19f607dc5b0c663e1b637012799ab110c3
2018-03-29 22:41:40 -07:00
Steven Moreland
4dde8a113b Allow HIDL to be used in priv-apps.
Marking HIDL as SystemApi to allow vendor apps to talk to their own
native HIDL services. This includes implementing HIDL callback objects.

HIDL (HAL interface design language) is a language that is used to
facilitate vendor<->system communication which provides guarantees
of ABI stability. For system and vendor services alike, this can also
be used for internal communication.

Bug: 67725182
Test: boot device, hidl_test_java
Change-Id: I9d028cc43ce6f81ea619f01e18f1cd772e17cbfa
Merged-In: I9d028cc43ce6f81ea619f01e18f1cd772e17cbfa
(cherry picked from commit e8e63aae6f)
2018-03-29 15:03:59 -07:00
Vishwath Mohan
77b5ccb59b Merge "Refactor FingerprintDialog to BiometricDialog" into pi-dev
am: 86ed912f5a

Change-Id: I2582d4770900460a8d37c9d832e9a20583f9adf9
2018-03-28 19:01:11 +00:00
Vishwath Mohan
cf87df1531 Refactor FingerprintDialog to BiometricDialog
This CL changes FingerprintDialog into the more generic
BiometricDialog, which OEMs will be able to extend as necessary to
provide support for alternate biometric modalities.

Bug: 74831038
Test: m -j50 FingerprintDialog (from the associated CL on this topic)
      The app works and authenticates successfully.
Test: make update-api -j56

Change-Id: Ic398ef0a0b448be68dbe3330b30779f93f567243
2018-03-27 13:15:01 -07:00
Treehugger Robot
aa8f09d41a Merge "Split the DownloadStateCallback class into two" 2018-03-26 23:53:40 +00:00
Hall Liu
49d1cb4770 Split the DownloadStateCallback class into two
Use individually-registered DownloadStatusListener and
DownloadProgressListener instead to listen for download status and
progress, respectively.

Bug: 74409377
Test: cts
Change-Id: Ifd5289038ffd66eef8bd7916f5256205b49be5f9
Merged-In: Ifd5289038ffd66eef8bd7916f5256205b49be5f9
2018-03-26 21:45:21 +00:00
Hall Liu
3f65260be7 Merge "Split the DownloadStateCallback class into two" into pi-dev
am: ecd4709573

Change-Id: I09cdcd69729ac917ac7290d4e1efcf4d9dbc0530
2018-03-24 00:31:02 +00:00
Hall Liu
ecd4709573 Merge "Split the DownloadStateCallback class into two" into pi-dev 2018-03-23 23:11:46 +00:00
Nan Zhang
f33e1947b7 Add additional droiddoc options for stubs-api
There's slightly different for droiddoc options between AOSP and
internal Master. So set droiddoc options to be consistent with current
ones in internal Master.

Test: m android_stubs_current
Bug: b/70351683 b/76179848
Change-Id: I3b87021b8a882e0934faedf51a9f84c996654c1f
2018-03-23 01:04:02 -07:00
Jiyong Park
189cc7df45 Merge changes I7f413e38,I20aba7e9 into pi-dev
am: 4d6dc48d24

Change-Id: Ib63541d0924b400580d62513864d790a02021de9
2018-03-22 00:46:46 +00:00
TreeHugger Robot
4d6dc48d24 Merge changes I7f413e38,I20aba7e9 into pi-dev
* changes:
  Remove FlpHardwareProvider
  Create the stubs lib for com.android.location.provider
2018-03-22 00:29:38 +00:00
Hall Liu
7953997160 Split the DownloadStateCallback class into two
Use individually-registered DownloadStatusListener and
DownloadProgressListener instead to listen for download status and
progress, respectively.

Bug: 74409377
Test: cts
Change-Id: Ifd5289038ffd66eef8bd7916f5256205b49be5f9
2018-03-21 23:39:07 +00:00
Philip P. Moltmann
9dd3e7d300 Add SoundTriggerDetectionService
am: 18e3eb8168

Change-Id: I4bb7ada74c36df4a64956c9c36a1675aad1f6645
2018-03-21 06:00:01 +00:00
Jiyong Park
4cc3a1c056 Remove FlpHardwareProvider
After Treble's FLP merge into GNSS HAL, the FlpHardwareProvider is just
an empty shell. Removing FusedLocation and/or Flp + Hardware classes
altogether.

Bug: 35726697
Test: m -j
Test: Open Google Map and then walk around. The dot moves as I walk.
Change-Id: I7f413e38b57424e8ebb9d7d14d94f145a48d10f8
2018-03-21 10:36:44 +09:00
Nan Zhang
7bfac8dce2 Remove Make side (system/test-)api-stubs droiddoc targets
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-20 16:22:30 -07:00
Philip P. Moltmann
18e3eb8168 Add SoundTriggerDetectionService
The service is meant to replace the PendingIntent based API. Once all
users of the PendingIntent based API switched the PendingIntent based API
will be removed.

To have as little as possible impact on the whole SoundTrigger framework
the RemoteSoundTriggerDetectionService class implements the same
interface as the PendingIntent based class. Hence the exising code has
very little change. Further once the old code can be removed the amount
of changed (and added) code is limited.

The RemoteSoundTriggerDetectionService -> SoundTriggerDetectionService
is a vanilla as possible service implementation. The special behaviors
are:
- The system holds a wakelock while service operations are in progress
and the service is bound as foreground. Hence the service can e.g.
listen to the microphone.
- Service operations have a certain amount of time they are allowed to
run. Once every operation is either finished or the the operation
exceeded the allotted time, the system calls onStopOperation for each
still pending operation. This is a similar model as for the commonly
used JobService.
  Please note that if the time allowed for an operation is 15s and
op1 was run as 0si, and op1 was run at 5s, the service is allowed to run
until 20s. Hence _both_ onStopOperations will happen at 20s. This is
done for ease of implementation but should not give the service more
power than calling onStopOperation exactly 15s after each operation is
triggered.
- If an operation is done before the allotted time is reached, the
service can declare the operation as finished manually by calling
onOperationFinished. This is a call back into the system, hence a
'client' binder is sent to the service. If the operation is finished
by calling this method onStopOperation will not be called.
- As the service instance might be killed and restored between
operations we add a opaque bundle 'params' to each operations. The users
of the API can use this to send data from the start command to the
operations. It can also just be set to null. The params are not meant to
store changing state in between operations. Such state needs to be
persisted using the regular methods (e.g. write it to disk)
- A service can be used for multiple recognition sessions. Each
recognition is uniquelity defined by its sound model UUID. Hence each
operation gets at least tree arguments: Operation ID, sound mode UUID, params
- As a small optimization the params are cached inside of the service
instance.

The time allowed for each operation is in a @SystemAPI global setting,
so the service can make sure it finishes the operations before they are
stopped. It might take some time to deliver the operations via the
binder, hence it is not recommended to try to use every last ms of
allotted time.

Test: atest SoundTriggerDetectionServiceTest (added in separate CL)
      atest android.provider.SettingsBackupTest
Change-Id: I47f813b7a5138a6f24732197813a605d29f85a93
Fixes: 73829108
2018-03-20 13:57:14 -07:00
Nan Zhang
54963cba91 Remove Make side (system/test-)api-stubs droiddoc targets
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-20 11:43:51 -07:00
Nan Zhang
538e615919 Remove test/* from API stubs jars generation.
Test: Generated old and new API stubs jars. And
cd /tmp/new/; find . -type f -name "*.class" -exec md5sum {} \+ | ( cd /tmp/old; md5sum -c --quiet )

Bug: b/70351683
Change-Id: If5e668cca483f54646fb64776b24c95044092620
2018-03-12 14:11:57 -07:00
Nan Zhang
f9ac62dddb Merge "Convert api-stubs, system-api-stubs, and test-api-stubs target" am: baa37dbbad
am: 5a4b586e28

Change-Id: I880168e468e06a0351ad9e084e108cd46f8ca1d3
2018-03-10 00:38:00 +00:00
Kweku Adams
eadd123d68 Dumping stack traces to proto.
Bug: 72177715
Test: flash device and check incident.proto output
Change-Id: Id2a15e0fc62b66efe875949af97f0eb651c7e322
(cherry picked from commit 5c804e2b98)
2018-03-07 21:50:12 +00:00
Nan Zhang
172875bdd2 Convert api-stubs, system-api-stubs, and test-api-stubs target
The output generate a .srcsjar instead of a directory of java files.

Bug: b/70351683
Test: compare source-file-list, and ninja rule.

Change-Id: I987601c4baa6f94b5208d3d4106cf60323329af8
2018-03-05 16:23:50 -08:00
Logan Chien
71ddfeaf14 Reformat Android.bp file
This commit replaces `=` with `:`, which is more idiomatic.

Test: walleye-userdebug builds
Change-Id: I8fe71e53a4005e44c4bdee2ee23220997b6c3e4f
2018-02-27 16:43:50 +08:00
Svetoslav Ganov
2d20fb47f4 APIs to watch active op changes
System singed components can watch for starting/finishing of
long running app ops. Also protected the APIs to watch op mode
changes with a singature permission for the cross-uid use case.

Test: atest com.android.server.appops.AppOpsActiveWatcherTest

bug:64085448

Change-Id: Id7fe79ce1de4c5690b4f52786424ec5a5d9eb0fa
2018-02-16 18:29:04 -08:00
Calin Juravle
1d875ad3ae Add SystemApis to expose runtime profile information
The API allows a system apps which acquired
{@code android.permission.READ_RUNTIME_PROFILE} to snapshot the runtime
profiles of installed packages.

The API is implemented in a new service class (AndroidRuntimeManager)
accessible from the context using
context().getPackageManager().getAndroidRuntimeManager().

The main functionality is exposed as a one way call into the
AndroidRuntimeManager with the result being posted on a callback. The
profile is available to the caller as a read-only ParcelFileDescriptor.

This CL only adds the API interfaces and validation. It does not fully
implement the functionality.

oneway void snapshotRuntimeProfile(in String packageName,
  in String codePath, in ISnapshotRuntimeProfileCallback callback)

(cherry picked from commit 45f8b29ce0)

Bug: 30934496
Test: gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases

Merged-In: Iaa6be4715840f24508acba3162ea9c1ab725bd38
Change-Id: Iaa6be4715840f24508acba3162ea9c1ab725bd38
2018-02-14 08:00:56 -08:00
Logan Chien
404eb2bcd5 Fix PDK build
This commit moves "IConfirmationPromptCallback.aidl" and
"IKeystoreService.aidl" to "system/security/keystore/binder" so that
"libkeystore_aidl" can be built in PDK builds.

Test: Run `cts-tradefed run cts -m CtsKeystoreTestCases` on Pixel 2017
and the test results are idential with and without this CL.

Test: Build PDK with special manifest described in
http://b/69539820#comment18 and http://b/69539820#comment19.

Test: Build a target (described in http://b/72961456) with
`platform.zip` built from master FSK source tree.

Bug: 69539820
Bug: 72961456
Change-Id: I7350f0ca943b15a6f3e40023a6cc299bdf8aed0e
2018-02-14 15:46:50 +08:00
Eric Laurent
1d3cdce9b0 Add audioserver state callback
Add system APIs for components (e.g rild) to monitor native audioserver
state and be able to reaply states after a native audioserver
crash and restart.

Bug: 67317552
Test: manual test.

Change-Id: I2afba9da5fc32b3768ca5ca0d5f97cc68707c408
2018-02-09 18:14:58 -08:00
TreeHugger Robot
4f07fa4e74 Merge "Add support for vibrator HAL 1.2 effects." 2018-02-09 16:36:13 +00:00
Michael Wright
f268bf573f Add support for vibrator HAL 1.2 effects.
Test: atest android.os.VibrationEffectTest
Bug: 64184692
Bug: 64185677
Change-Id: I0b3f9caa04b3e7bdadba5c44188120ac14943f82
2018-02-08 21:24:02 +00:00
Etan Cohen
9accbba1b7 [RTT] Remove the legacy RTT service
Remove the legacy RTT service. RTT requests are already directed to
the new API by a previous CL.

Bug: 65108579
Test: unit tests
Test: WifiRttManagerTest:test_regular_scan_then_rtt_ranging_stress
Change-Id: I436e8bcd2f4e2ba6056870d887eea141fbebae85
2018-02-07 12:36:05 -08:00
Steve Paik
94292a388c Move CarServiceHelperService (again)
Move CarServiceHelperService.java and ICarServiceHelper.aidl from
frameworks/base to frameworks/opt/car/services.

Bug: 72571496
Test: Complies and runs
Change-Id: I0f09c84e25a372dab3f170bd623f25a92f9b0f73
2018-02-06 11:55:10 -08:00
Steve Paik
d2fecf34f9 Revert "Move CarServiceHelperService"
This reverts commit ee47dea99a.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Ie26a7b08cb2d86c71f3d8c8c509d9803d0ad293b
2018-02-03 01:54:11 +00:00
Steve Paik
ee47dea99a Move CarServiceHelperService
Move CarServiceHelperService.java and ICarServiceHelper.aidl from
frameworks/base to frameworks/opt/car/services.

Bug: 72571496
Test: Complies and runs
Change-Id: I3e25cec3db75b5250a0dec4959c32526d6553da6
2018-02-01 17:46:52 -08:00
Brad Ebinger
5b1883b5f1 Integrate new MMTel APIs into the framework
Performs the bulk of the work of:
1) Moving the old MMTel APIs to a hidden
.compat namespace to support older vendor
versions of the code.

2) Replace the compat MMTel APIs with the
new ImsService APIs and integrate them
into existing code.

This is one of two CLs, this CL
integrates the new APIs, the next CL
creates the compat layer in telephony
to translate the .compat APIs to the new
APIs to allow Telephony to work with
older versions of the API.

Before commit, the corresponding vendor
changes will have to be submitted as well.

Bug: 63987047
Test: Telephony Unit tests
Merged-In: Icc9ecfdad000f42399beeac142083e62962c12d3
Change-Id: Icc9ecfdad000f42399beeac142083e62962c12d3
2018-02-01 15:45:29 -08:00
Brad Ebinger
6ed4ee6847 Integrate ImsCallSessionListener API changes
Integrates the ImsCallSessionListener API changes.
This involves:

1) Moving the ImsCallSessionListener to the
android.telephony.ims namespace.
2) Creating a compat layer between the old
IImsCallSessionListener AIDL and the new one
for vendors using the old implementation.
3) Modify ImsCallSession to only use
setListener to set ImsCallSessionListener
(other method was never used in our code).

Test: Telephony Unit Tests, Manual IMS Tests
Bug: 63987047
Merged-In: I4378c0b1d68ff4f5f21815c81af52c03a66f81c5
Change-Id: Id0cc43e9c97abb6f2776d8ad1cf599353b71e4b7
2018-02-01 15:45:28 -08:00
Mohamed Abdalkader
7073c075fb Remove internal version of SMS apis
Test: manual
BUG=69846044
Merged-In: Ie084ea67c460c686bd587e4b36f8c1579517ea7f
Change-Id: Ie084ea67c460c686bd587e4b36f8c1579517ea7f
2018-01-31 11:55:39 -08:00
Jerry Zhang
327b809ad1 Refactor and clean up USB, add tests
Change UsbManager apis to use long instead of string, to match
usb hal. Change UsbDeviceManager internals to match as well.

Remove isFunctionEnabled and add getEnabledFunctions. Callers
would often call isFunctionEnabled for every possible function
to get the list of functions, so getEnabledFunctions reduces the
number of aidl calls.

Separate out dependencies between UsbHandler and UsbDeviceManager
and staticize the UsbHandler classes. Add unit tests with
mocked out dependencies to test state transitions for UsbHandler.

Bug: 62876645
Test: atest UsbTests
Change-Id: I785c4c24121a70e725de9742c6af50a6bf1baea0
2018-01-31 11:40:48 -08:00
Mohamed Abdalkader
6e545d5892 Move Sms API to proper MMTelFeature class
- while here remove unnecessary call to ackSms from
  SmsImplBase as this is handled by ImsSmsDispatcher

Test: None, APIs not exercised yet.
BUG=69846044
Merged-In: Iec4bbd07a67502dbbfb2142a7bc95f51be0cb377
Change-Id: Iec4bbd07a67502dbbfb2142a7bc95f51be0cb377
2018-01-31 11:24:31 -08:00