Commit Graph

118 Commits

Author SHA1 Message Date
chenbruce
5d95562622 Set transport types to resolver
For a given network, resolver doesn't know what transport types are.
Therefore, when a new network is created or transport types are changed
in a give network, transport types will be updated and sent by calling
setResolverConfiguration(). In the same time, if link properties or
transport types are null, setResolverConfiguration() won't be called.
The original behaviors of setResolverConfiguration() aren't changed.
Only increasing one new behavior that when a given network has transport
type change, calling setResolverConfiguration() directly and resolver
updates the transport types for that given network.

Bug: 143732914
Test: atest FrameworksNetTests
      atest FrameworksNetIntegrationTests
Change-Id: I6527cde0e177ba08c886576131b35fc769c2bb53
2020-04-11 14:39:59 +08:00
Anton Hansson
04f9ad0f29 Stop system server depending on the stubs of itself
It should have the stubs of the modules it depends on in its
classpath instead, so link against service-permission-stubs
which is the only module it currently depends on.

Bug: 152864915
Test: m
Change-Id: I4ca19b9ed0db5b9bd61d67e37f5de2e61253bc95
2020-04-06 10:15:10 +01:00
Ytai Ben-Tsvi
48f90c22e5 Change external capture state notification mechanism
Previously, external capture state notifications were delivered from
the audio policy manager to the sound trigger service as normal
"forward calls". However this creates a cyclic dependency between
sound trigger and APM, which is especially problematic during startup,
when the audio server is assumed to start prior to the system server
and thus cannot block on the sound trigger service becoming available.

With this change, the sound trigger service would register a callback
with APM for these notifications.

A small refactoring was needed in order to keep the internal interface
of sound trigger classes having the setExternalCapture() methods,
while removing them from the external interface.

Test: Manual verification, checking the logs, validating behavior in
      response to killing the audioserver process.
Bug: 146157104
Merged-In: I4b4467fbac3607ee170394dc1b3309e7e3d422d8
Change-Id: Ibf68a5e5681afca9c5b1b821bb8ac18a2eebb4ca
2020-04-01 10:00:14 -07:00
Will Brockman
dce5a57376 Merge "Pull out library needed for Notification CTS test." into rvc-dev 2020-03-30 13:29:42 +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
Will Brockman
a83de9e43e Pull out library needed for Notification CTS test.
Bug: 152031499
Test: atest NotificationManagerServiceTest
Change-Id: I6292482b3650709149ff06249ba4a3704289ee46
2020-03-27 19:55:25 +00:00
TreeHugger Robot
f4a69284d0 Merge changes from topic "revert" into rvc-dev
* changes:
  [DO NOT MERGE] Enable biometrics.fingerprint@2.2
  [DO NOT MERGE] Revert "Add support for fingerprint@2.2 and face@1.1"
2020-03-20 17:44:50 +00:00
Ilya Matyukhin
7f91123ea4 [DO NOT MERGE] Enable biometrics.fingerprint@2.2
Bug: 148493694
Bug: 139317981
Test: build
Change-Id: I9ef4431b64da15b924cb557994dfe2782c05345c
2020-03-19 23:05:30 +00:00
Ilya Matyukhin
244aee6368 [DO NOT MERGE] Revert "Add support for fingerprint@2.2 and face@1.1"
This reverts commit ef410e3c1e.

Reason for revert: the implementation is untested in R; moving to S.

Bug: 139317981
Bug: 151331855
Change-Id: If6a2fdb26e1ffbdb2cad7dfc16a7cd579f513d5c
2020-03-19 23:05:13 +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
0d95282d7c Update references to ike stubs
Bug: 147768409
Test: m
Change-Id: Idf801c304458908f0a8ef36bfa5a7a7546e6bf48
2020-03-13 13:04:13 +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
Jia-yi Chen
73e2b381f0 Merge "Support PowerHAL AIDL service" into rvc-dev 2020-03-07 06:27:22 +00:00
Jia-yi Chen
bfd8f1f74d Support PowerHAL AIDL service
Bug: 147840082
Test: Boot & check logs
Change-Id: Iccdaf84053e0974ffb43857aaa2e382d2f1b4a6b
2020-03-06 10:08:30 -08:00
Winson
62ac8b56a9 Refactor overlayable policy
To make it easier to add the actor policy in a follow up CL,
move most of the policy handling to a central location.

The strings and transformation between strings and flags is
now handled in libidmap2policies, with libandroidfw
containing the single source of policy flags.

This also extracts all the test resource IDs into an R.h
so they can be swapped without having to edit a dozen files
each time.

Bug: 130563563

Test: m aapt2_tests idmapt2_tests and run from host test output
Test: atest libandroidfw_tests

Change-Id: Ie533c9cebf938215df7586f00c38763ae467e606
2020-02-26 15:59:43 -08:00
evitayan
d713db92a5 Do not statically link ike-stubs
Stub jars should not be in statically linked except for inside
other stub jars.

Bug: 145995723
Test: build, flash and reboot
Test: FrameworksIkeTests, FrameworksNetTests
Change-Id: I503616de0143cc39dd189ae689de3e8d77c345da
Merged-In: I503616de0143cc39dd189ae689de3e8d77c345da
(cherry picked from commit 5fc0bbaae7)
2020-02-25 00:40:05 -08:00
Yan Yan
e2ff46a5e3 Merge "Dynamically include ike-stubs in services.core.unboosted" 2020-02-21 04:10:42 +00:00
evitayan
24c8c12926 Dynamically include ike-stubs in services.core.unboosted
Previously because compilation will preferentially uses the
ike-stubs statically included in framework.jar,
FrameworksIkeTests has to jarjar the ike_test.jar. Otherwise
the tests will use the ike-stubs and cannot access to the hidden
implementation.

This commit removes ike-stubs in framework-minus-apex and framework
and statically includes it in services.core.unboosted.

In this way, system server can still compile against ike.jar and
at the same time FrameworksIkeTests does not need to jarjar the
ike_test.jar anymore

Bug: 145995723
Test: build, flash, boot, loaded in system server
Test: atest FramewokrsIkeTests (passed)
Test: m mts && mts-tradefed run mts-ipsec (passed)
Change-Id: I75dabcc522e89c94c3e888f5cea22ad5ce0a77e5
2020-02-20 18:03:50 -08:00
Automerger Merge Worker
ed67786e6b Merge "Consume health HAL 2.1 values from framework" am: 217aadd0c2 am: 28c43860ea am: 8f9d77ae03
Change-Id: I60f9cee5e0ba74349a0448204b0e31d213151e5f
2020-02-19 22:16:25 +00:00
Stephane Lee
90bf87449f Consume health HAL 2.1 values from framework
Bug: 148816661
Test: Ensure that there are no issues with the time to full when
charging
Change-Id: Ie21d451432cd65a91303a8faf40df64935f5c4bb
2020-02-15 16:51:02 -08:00
TreeHugger Robot
9b0e5e6681 Merge "Use framework-tethering-stub instead of framework-tethering" 2020-02-07 11:32:23 +00:00
Ivailo Karamanolev
4c5ac6b353 Add Lights AIDL HAL support to LightsService
Add conditional code to LightsService to call the new Lights AIDL HAL
where available and fall back to the 2.0 HIDL HAL if not.

Bug: 142230898
Test: manual; send a notification with lights; display backlight set ok
Test: see followup commit for atest instructions.
Change-Id: I6ca278bf789ae1e7473ce132a895099ad236b26a
Merged-In: Ic9b4fbc5570ea49cff903df27c9714bed23bf98c
2020-02-07 02:07:10 +01: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
Ilya Matyukhin
ef410e3c1e Add support for fingerprint@2.2 and face@1.1
This CL adds the necessary plumbing, but not implementation, to do the
following:

biometrics.fingerprint@2.2:
- enroll_2_2(..., handle windowId)
- authenticate_2_2(..., handle windowId)

biometrics.face@1.1:
- enroll_1_1(..., handle windowId)
- enrollRemotely(...)

Bug: 148493694
Bug: 145562442
Test: enrolled and authenticated with Keyguard and BiometricPrompt
Test: compiled face@1.0 HAL as face@1.1 and made sure it works
Change-Id: I22e25df4d880d16d21a940e7dff6d233b64743d1
2020-02-06 01:49:40 -08:00
Ivailo Karamanolev
c176fb8fa4 Add Lights AIDL HAL support to LightsService
Add conditional code to LightsService to call the new Lights AIDL HAL
where available and fall back to the 2.0 HIDL HAL if not.

Bug: 142230898
Test: manual; send a notification with lights; display backlight set ok
Change-Id: Ic9b4fbc5570ea49cff903df27c9714bed23bf98c
Exempt-From-Owner-Approval: Reviewed in OOO OWNERS's stead.
2020-01-22 23:49:02 +01:00
Santos Cordon
4505e5e6e8 Add display configuration files.
Adds a static display configuration file for specifying static display
configurations as a sustainable API.

Bug: 131813802
Test: Verify brightness changes work as expected.  Verify changes going
through system to HAL conversion.
Exempt-From-Owner-Approval: I am new owner of lights, but OWNERS rights hasnt yet propogated.
Change-Id: I17922267f4695bc042d7c0687d4dcc10554e1b85
2020-01-22 18:34:39 +00: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
Mathew Inwood
503371e2a1 Remove duplicated compat config.
Since the build now merges compat config properly, including these extra
platform_compat_config rules results in duplicated config on the device.

Test: m
Test: Manually inspect contents of /etc/compat_config
Change-Id: I9a0e9ed43d16ae44ecc9e5a5d6984be2332713c5
2020-01-09 15:30:11 +00:00
Kenny Root
f76cfc314c Support Resume on Reboot
When an OTA is downloaded, the RecoverySystem can be triggered to store
the user's lock screen knowledge factor in a secure way using the
IRebootEscrow HAL. This will allow the credential encrypted (CE)
storage, keymaster credentials, and possibly others to be unlocked when
the device reboots after an OTA.

Bug: 63928581
Test: atest FrameworksServicesTests:RebootEscrowDataTest \
            FrameworksServicesTests:LockSettingsServiceTests \
            FrameworksServicesTests:RecoverySystemServiceTest \
            FrameworksServicesTests:RebootEscrowManagerTests
Test: use fake OTA console app to apply update
Change-Id: I59df6942b27ea2bdd11b757922f5169085a325f0
2020-01-07 08:18:02 -08:00
Steven Moreland
623e66caa7 vibrator: use package as name
In order to provide a more descriptive name, and to be consistent
with HIDL, the stable AIDL package names are switching from
vintf-vibrator format to the package format
(android.hardware.vibrator).

Bug: N/A
Test: all build time
Change-Id: I3805fea0be71c6cec9354d0ca71b4678387e516c
Merged-In: I3805fea0be71c6cec9354d0ca71b4678387e516c
2020-01-06 15:33:50 -08:00
Steven Moreland
f53d7fef59 vibrator: use package as name
In order to provide a more descriptive name, and to be consistent
with HIDL, the stable AIDL package names are switching from
vintf-vibrator format to the package format
(android.hardware.vibrator).

Bug: N/A
Test: all build time
Change-Id: I3805fea0be71c6cec9354d0ca71b4678387e516c
2020-01-06 23:30:45 +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
Ytai Ben-Tsvi
93c117c86f Implement the soundtrigger_middlewware service
This service is intended to replace:
frameworks/av/include/soundtrigger/ISoundTriggerHwService.h

This change only adds the replacement service, follow up
changes migrate the clients to use the new service and remove
the old one. The new service is feature-equivalent to the new
one, but offers the following advantages:
- AIDL interface (as opposed to hand-written parceling code).
- Pure Java implementation all the way to the HAL.
- Better documentation.
- Rigorous error handling.
- Unit tests.
- Reduced code complexity (less layers, better separation of
  concerns).
- Permission-based security model (as opposed to some baked-in
  assumptions about process affinity).

Change-Id: I79f4eff105d3e6245990be068b933d4d48c35a0d
Bug: 142070343
2019-12-16 14:15:37 -08: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
atrost
c3c2e4de2d Add a compat change to opt-in to latest SELinux domain.
Refactor getSeInfo into a method, if the app doesn't share a
sharedUserId, and the change is enabled use targetSdkVersion R (1000)
for the seInfo domain.

Add a listener to the compat change that checks if seInfo has changed
(as a result of enabling/disabling the change), and if it did updates it,
and calls prepareAppDataAfterInstallLIF to make sure the data is
correctly labeled.
The listener will be called when an override is introduced or removed
for the change.

Bug: 143539591
Test: atest com.android.server.pm.SELinuxMMAXTest
Test: Install facebook (target SDK 28), login +download a photo, turn on
      the change, open facebook, download another photo, disable change,
      open facebook again, download another photo. Everything works as
      expected, photos are accessible, profile is setup.

Change-Id: If5ecf490e781db13d84656b36d0740a00ee124b5
2019-12-03 15:01:03 +00:00
markchien
0df2ebc43d [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-30 10:03:08 +00:00
markchien
d8676d99ff [Tether07] Clean up build rule for libtetheroffloadjni
- Statically include android.hardware.tetheroffload.config@1.0,
  libcutils and their dependency library.
- Use shared-lib if there is NDK or NDK-compliant version
- Remove android.hardware.tetheroffload.control-V1.0-java from
  service.core because it is already statically built in tethering apk

Bug: 143195885
Test: -build, flash, boot
Change-Id: Ic082045bc04d3989f7f095c7a499bc0d943e4031
Merged-In: Ic082045bc04d3989f7f095c7a499bc0d943e4031
2019-11-30 09:57:36 +00:00
markchien
0f63ca6e91 [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-29 07:05:21 +00:00
markchien
b337516e23 [Tether07] Clean up build rule for libtetheroffloadjni
- Statically include android.hardware.tetheroffload.config@1.0,
  libcutils and their dependency library.
- Use shared-lib if there is NDK or NDK-compliant version
- Remove android.hardware.tetheroffload.control-V1.0-java from
  service.core because it is already statically built in tethering apk

Bug: 143195885
Test: -build, flash, boot
Change-Id: Ic082045bc04d3989f7f095c7a499bc0d943e4031
2019-11-28 11:26:16 +08:00
Jeff Chang
d136e77a5a Convert EventLogTags.AM* events log points to EventLogTags.WM
Since all activity management is now under the WM package we should also
convert the event log points for activities from EventLogTags.AM* to
EventLogTags.WM*.

Bug: 143461660
Test: Build and run, check event logs.
Change-Id: I62034ee353f65ef95b069e1f36db214ccb3c6d85
2019-11-26 15:18:14 +08:00
TreeHugger Robot
20fcf04717 Merge "Add filegroups for services.* libraries" 2019-11-22 01:08:34 +00:00
Bernardo Rufino
5cf5c3fe63 Merge "[Roll Forward] Block background custom toasts" 2019-11-20 17:50:40 +00:00
Steven Moreland
e998094441 Merge changes from topic "rm-vibrator-1.4-pass-2" am: 8fee0722bd am: ee46efcad7
am: 4b8eed0b8c

Change-Id: I424ebdb6a6cb0d7549ca0a9658c1c59d099addc1
2019-11-20 09:09:43 -08:00
Bernardo Rufino
60c39b3bc8 [Roll Forward] Block background custom toasts
Previous CL (ag/9699132) broke CTS ToastTest and was reverted (ag/9754500).
This was because the test was posting a background toast and verifying it
wasn't clickable. Test has been updated to use a foreground toast in ag/9754274
and I will also look into having it be executed in presubmit.(b/144810971).

-- Previous CL description (updated "Test:" lines)

To assess app compatibility problems early on, this CL blocks background
custom toasts in a non-secure way. We create a new method in the AIDL called
enqueueTextToast() that now contain the same parameters as
enqueueToast(), receiving the view created inside the app's process. But this
method will, in the future, contain a CharSequence instead of
ITransientNotification, for window creation inside the system.

We use PlatformCompat infrastructure to check if the change is enabled.

I learned with this change that if user blocks notifications for an app, it
won't be able to show background toasts, allowing me to re-use the foreground
check that was already in place.

This change will display a text toast (from the system) in case the app's
custom toast gets blocked, this is temporary to get feedback from
dogfood.

Test: With sample app, verify that:
      1. Posting text toast in bg works
      2. Posting custom toast in fg works
      3. Posting custom toast in bg does NOT work
Test: atest CtsToastTestCases CtsWindowManagerDeviceTestCases:ToastTest
      CtsWidgetTestCases:ToastTest CtsToastLegacyTestCases
Test: Working on CTS
Bug: 128611929

Change-Id: I25c6339c6adeb907878596332f57e2fa229bfda9
2019-11-20 09:16:31 +00:00
Bernardo Rufino
a229e8f1c1 Merge "Revert "Block background custom toasts"" 2019-11-19 16:29:44 +00:00
Bernardo Rufino
15fecc3662 Revert "Block background custom toasts"
This reverts commit 880cf32c70.

Reason for revert: Broke CtsWindowManagerDeviceTestCases ToastTest.testToastIsNotClickable()

Change-Id: Ia108eeee81b673306d0e552e01d18e1558a00dd8
2019-11-19 16:25:20 +00:00
Bernardo Rufino
f2e1609f54 Merge "Block background custom toasts" 2019-11-19 11:18:48 +00:00
Steven Moreland
5af46952b2 Remove vibrator@1.4
Since this HAL was converted to AIDL.

Bug: 141828236
Test: boot, use vibrator
Change-Id: I0835dcecf7e6a3a4b5b01675df2a36ca8e6cd7a7
2019-11-18 20:10:34 -08:00
Bernardo Rufino
880cf32c70 Block background custom toasts
To assess app compatibility problems early on, this CL blocks background
custom toasts in a non-secure way. We create a new method in the AIDL called
enqueueTextToast() that now contain the same parameters as
enqueueToast(), receiving the view created inside the app's process. But this
method will, in the future, contain a CharSequence instead of
ITransientNotification, for window creation inside the system.

We use PlatformCompat infrastructure to check if the change is enabled.

I learned with this change that if user blocks notifications for an app, it
won't be able to show background toasts, allowing me to re-use the foreground
check that was already in place.

This change will display a text toast (from the system) in case the app's
custom toast gets blocked, this is temporary to get feedback from
dogfood.

Test: With sample app targeting SDK 29, verify that:
      1. Posting text toast in bg works
      2. Posting custom toast in fg works
      3. Posting custom toast in bg does NOT work
Test: With sample app targeting SDK 28, verify that 1, 2 and 3 above work.
Test: Working on CTS
Bug: 128611929
Change-Id: Icecbbeff081fa5e7c4329bf3b383d6859520b517
2019-11-18 15:45:41 +00:00