Commit Graph

445685 Commits

Author SHA1 Message Date
Prabir Pradhan
ca7d72347e PointerController: Add guards to ensure display is valid
This change makes it so that PointerController does not ask its Policy
to load any resources for any displays until a DisplayViewport is set,
and verifies this with unit tests.

Bug: 145699789
Bug: 146385350
Test: atest libinputservice_test
Change-Id: I2e48e7ac4700e6f9fdf939a7bd0e6639b051ade6
Merged-In: I2e48e7ac4700e6f9fdf939a7bd0e6639b051ade6
2020-05-28 14:03:22 -07:00
Garfield Tan
b1b07be860 Move setDisplayViewport to InputReader.
InputReader is responsible to associate device and display so it makes
sense to allow it set display viewport for pointer controller.

Bug: 146385350
Test: Cursor can be associated with external freeform displays as
expected.

Change-Id: I00d664dd180f1e693b1900582feea8f7ff02f93c
Merged-In: I00d664dd180f1e693b1900582feea8f7ff02f93c
2020-05-28 14:03:21 -07:00
Garfield Tan
e9c6151756 Stop loading animation for addtional cursor type.
In the test below it only expects MockSprite#setIcon() being called
once, but with animation it may be called multiple times.

Bug: 144947344
Test: atest PoitnerControllerTest#updatePointerIcon
Change-Id: I5c4908fb8301cae144fd637c831f2012a35862e3
Merged-In: I5c4908fb8301cae144fd637c831f2012a35862e3
2020-05-28 14:03:21 -07:00
Garfield Tan
c15eb91b04 Add cursor type and hotspot to surface metadata.
Also bootstrap unit tests for PointerController. Need to mark 3
functions of SpriteController virtual so their behaviors can be
overridden.

Bug: 130822623
Test: SurfaceFlinger can get cursor type and hotspot.
Change-Id: I739cd03214364144bb4e22a166ecc7abfd3492fe
Merged-In: I739cd03214364144bb4e22a166ecc7abfd3492fe
2020-05-28 14:03:21 -07:00
Joanne Chung
ce64d9aa4c Merge "Change permissionLevel of ACCESS_SHORTCUTS and UNLIMITED_SHORTCUTS_API_CALLS" 2020-05-28 17:16:54 +00:00
Makoto Onuki
2ba0a25175 Merge "Update api-lint baseline for NO_SETTINGS_PROVIDER" 2020-05-28 17:02:57 +00:00
Paul Duffin
1bfeeeb8a1 Merge "Preload android.test.base to improve startup performance" 2020-05-28 16:41:06 +00:00
Paul Duffin
5ff91c01f9 Merge "Switch framework-tethering to use java_sdk_library" 2020-05-28 15:01:46 +00:00
Paul Duffin
9adce17ab4 Switch framework-tethering to use java_sdk_library
The names of the individual modules do not quite follow the pattern
that java_sdk_library uses so this temporarily sets the following:
    naming_scheme: "frameworks-modules"

That causes java_sdk_library to use a naming scheme that matches the
one used by the individual modules of this. It will be cleaned up
later.

Part of the purpose of the java_sdk_library is to hide the
implementation code and force users of the library to depend on stubs
for a well defined API. Ideally, it would allow access to the
implementation in those cases where it is safe, e.g. from within the
same APEX, or from tests for the implementation. Unfortunately, due to
limitations in the build it does not yet have enough information to
make that decision correctly which means that any code that needs to
compile against the implementation is broken which would prevent us
from converting the module to java_sdk_library.

However, the only way to provide the additional information to allow
the implementation to be correctly exposed is to convert the modules
to java_sdk_library; a cycle.

In order to break that cycle the java_sdk_library creates a special
<module>.impl target which is used directly by tests and any other code
that needs it. Once all the modules have been converted to a
java_sdk_library then we can resolve the limitations in the build and
remove the direct references to <module>.impl.

Test: m update-api
Bug: 155164730
Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
Merged-In: Id1c2e848430c49a2da7402244814cd084f5da77c
Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c
2020-05-28 13:14:52 +00:00
Treehugger Robot
7ed442881c Merge changes I289d935f,I0121a4ac
* changes:
  NetworkStats: apply464xlatAdjustments - don't remove CLAT_UID
  NetworkStats: apply464xlatAdjustments - remove useBpfStats parameter.
2020-05-28 10:34:01 +00:00
Maciej Żenczykowski
e273042404 Merge changes Ie73ba058,I4393afcb,Ifebd946e,Ib12ee882,Ia171b779
* changes:
  fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccounting100MBDownload
  fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccounting
  fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccountingSimple
  fix android.net.NetworkStatsTest#testApply464xlatAdjustments
  NetworkStats - no need for xt_qtaguid clat bw fixups
2020-05-28 09:04:42 +00:00
Maciej Żenczykowski
8de903184a NetworkStats: apply464xlatAdjustments - don't remove CLAT_UID
This should no longer be needed after all the cleanups.

Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I289d935f84b616ed857ef4c5a7427d57c282d00c
2020-05-28 01:47:30 -07:00
Maciej Żenczykowski
e6f6699ef9 NetworkStats: apply464xlatAdjustments - remove useBpfStats parameter.
Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0121a4ac7ee824adc5930bab786d550b2f00b05b
2020-05-28 01:33:25 -07:00
Treehugger Robot
3a7c2abef7 Merge "Extend timeout for requesting tethered interface" 2020-05-28 08:19:10 +00:00
Maciej Żenczykowski
c1aeb69e59 fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccounting100MBDownload
No clat app uid 0 rx stats on base iface due to ip6tables raw prerouting drop

(so just copy over the rx stats from the before file)

Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie73ba0586dafde67bc2726db26e07f7268c18be3
2020-05-28 00:26:18 -07:00
Maciej Żenczykowski
3f9933c48d fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccounting
No clat app uid 0 rx stats on base iface due to ip6tables raw prerouting drop

Test: atest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4393afcbe8e1bb886ecf4f5c1573f6ac8a0e29f5
2020-05-28 00:26:18 -07:00
Maciej Żenczykowski
2d269b8e0e fix com.android.server.net.NetworkStatsFactoryTest#testDoubleClatAccountingSimple
No clat app uid 0 rx stats on base iface due to ip6tables raw prerouting drop

Test: atest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifebd946e06b5fa2eeb7ff4fc0b1c423097021692
2020-05-28 00:26:18 -07:00
Maciej Żenczykowski
9417612bfe fix android.net.NetworkStatsTest#testApply464xlatAdjustments
Test: atest NetworkStatsTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib12ee88295eb502f6da13d212b4fd6298dea380f
2020-05-28 00:26:18 -07:00
Maciej Żenczykowski
2a9279f48e NetworkStats - no need for xt_qtaguid clat bw fixups
This is due to the previous addition of the ip6tables raw PREROUTING
drop rules for incoming ipv6 clat traffic pre-translation to ipv4.

Since we no longer double account, we no longer need these fixups.

Test: atest bpf_module_test clatd_test libbpf_android_test libnetdbpf_test
  netd_integration_test netd_unit_test netdutils_test
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia171b7797cdc99367064d0649bf1293c71579941
2020-05-28 00:26:17 -07:00
Chalard Jean
1e1a2e4e70 Merge "Adjust tests for renaming groupHint to cluster." 2020-05-28 04:20:26 +00:00
markchien
3639c015f2 Extend timeout for requesting tethered interface
Extend the timeout to lower the EthernetTetheringTest flaky.

Besides, also explicitly exempt entitlement check in
EtetherntTetheringTest because it do not test tethering upstream
currently. Thus, the tests would not be interrupted by entitlement
check if test SIM is entitlement required.

Bug: 156713866
Test: TetheringCoverageTests, CtsTehteringTest

Change-Id: I45e8e8d737486def9d0de8943ec7f09ca0942a0b
2020-05-28 12:13:14 +08:00
Maciej Żenczykowski
9273b6d980 Merge "NetworkStatsService - xt_qtaguid non-ebpf - account stacked interface stats" 2020-05-28 00:42:17 +00:00
Maciej Żenczykowski
a05899be79 NetworkStatsService - xt_qtaguid non-ebpf - account stacked interface stats
Test: atest bpf_module_test clatd_test libbpf_android_test libnetdbpf_test
  netd_integration_test netd_unit_test netdutils_test
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I297fcad0a83bd8c32c0fa6c6a77d83b42cd8c428
2020-05-27 23:26:26 +00:00
Ramy Medhat
d3243c5b4e Merge "Add package html files of droidstubs rules as inputs." 2020-05-27 23:23:25 +00:00
Baligh Uddin
29e3c0ba36 Merge "Adjust visibility rules for IPSec" 2020-05-27 21:40:18 +00:00
Baligh Uddin
b7ec5bbc0c Adjust visibility rules for IPSec
BUG: 156287389
Test: TH and Local Build
Change-Id: Ia2c1c6e82eef7ba25fe4c090ffa02bff5c3ddca2
2020-05-27 19:22:36 +00:00
Cody Kesting
b130258393 Merge "Comment reason for simulateDataStall structure." 2020-05-27 17:11:57 +00:00
Baligh Uddin
ed293d17d1 Merge "Migrate apex/sdkextensions to packages/modules/SdkExtensions" 2020-05-27 15:35:55 +00:00
Treehugger Robot
9ea883f4a3 Merge "Add keylayout for HORIPAD for Nintendo Switch" 2020-05-27 14:43:01 +00:00
Ramy Medhat
aaa8386be1 Add package html files of droidstubs rules as inputs.
Test: built aosp-crosshatch-userdebug with RBE_METALAVA=1.
Change-Id: I50ae5d361dd3b488fcdb4946b5629ab3ece05e27
2020-05-27 06:38:21 -04:00
Paul Duffin
0c57079427 Preload android.test.base to improve startup performance
Bug: 73711752
Test: make droid && flashall
Change-Id: I28ac1544c20bc3e8abb4341aa331c212f16301f0
2020-05-27 09:38:02 +01:00
Baligh Uddin
1293b0f9de Migrate apex/sdkextensions to packages/modules/SdkExtensions
BUG: 156286599
Test: TH and Forrest (mainline_modules)
Merged-In: I0009d286205d7942c2d681936bfba38e074700d2
Change-Id: I8a3d00da1528dee22839ac0997505d20c8bfe10e
2020-05-27 04:30:48 +00:00
Treehugger Robot
a5e8d3f73d Merge "Remove platform cert from Tethering tests" 2020-05-27 04:03:37 +00:00
Zach Johnson
6a67acaaf3 Merge "Add NAMESPACE_BLUETOOTH for bluetooth feature experiments" 2020-05-27 03:39:41 +00:00
Zach Johnson
61a01fb0ca Add NAMESPACE_BLUETOOTH for bluetooth feature experiments
Exempt-From-Owner-Approval: dianne approved, but from her android.com account instead of google.com account
Test: compile
Bug: 156757711
Merged-In: I330b8cc5aeb14ebcc15fb88c605ac72770497040
Change-Id: I330b8cc5aeb14ebcc15fb88c605ac72770497040
2020-05-27 03:39:06 +00:00
Brad Ebinger
c203e56238 Merge "Fix possible deadlock in incoming call" 2020-05-27 00:19:22 +00:00
Makoto Onuki
7821658dfb Update api-lint baseline for NO_SETTINGS_PROVIDER
Bug: 151454839
Test: See the other CL in the topic

Merged-in: I4e1d6c419c79663a47341cf26d5229ec17b9ca01
Change-Id: I4e1d6c419c79663a47341cf26d5229ec17b9ca01
2020-05-26 17:16:31 -07:00
Brad Ebinger
e3f505a02d Merge "Add clearAll method to RegistrantList for easier cleanup" 2020-05-26 23:10:30 +00:00
Brad Ebinger
3c1c15c9a2 Fix possible deadlock in incoming call
When notifying the framework of an incoming call, a lock is held
in both the MmTelFeature and MmTelFeatureConnection. This can cause
a deadlock if the MmTelFeatureConnection is also processing an
event, such as sending/acknowleging an SMS message.

Remove the lock around the listener methods to the framework, since
it is not needed.

Bug: 155083563
Fixes: 155819733
Test: atest CtsTelephonyTestCases:ImsServiceTest FrameworksTelephonyTests
Change-Id: I39f7192c6f79e215ef989797870f5f501197cd08
Merged-In: I39f7192c6f79e215ef989797870f5f501197cd08
2020-05-26 15:52:09 -07:00
Brad Ebinger
a659f19f39 Add clearAll method to RegistrantList for easier cleanup
Bug: 155320231
Fixes: 155819930
Test: atest FrameworksTelephonyTests
Change-Id: I6f1896ae163e77cff30e89a5b01b41162fc58200
Merged-In: I6f1896ae163e77cff30e89a5b01b41162fc58200
2020-05-26 14:45:13 -07:00
Orion Hodson
f900f3780a Merge changes from topic "lnh-jifd-leak"
* changes:
  Avoid potential fd leaks from jniCreateFileDescriptor (2/2)
  Avoid potential fd leak from jniCreateFileDescriptor (1/2)
2020-05-26 19:25:20 +00:00
Paul Duffin
a26485fa50 Merge "Disable shared library support for framework modules" 2020-05-26 17:35:59 +00:00
Treehugger Robot
5b0971801f Merge "Use tags to access conscrypt sources" 2020-05-26 16:58:31 +00:00
Heemin Seog
7e66cb43f9 Merge "Add hseog@ to OWNERS" 2020-05-26 15:52:25 +00:00
Paul Duffin
e55d4e3b62 Use tags to access conscrypt sources
Avoids direct access to the stub sources and instead access them via
tags passed to the java_sdk_library.

Bug: 155164730
Test: m checkapi
Change-Id: I93dfb8bfac60bd7ab628292667c8d7a9d5e8eb82
2020-05-26 14:08:01 +01:00
Neil Fuller
f60c302dad Merge "Be more defensive around invalid tzids" 2020-05-26 10:20:09 +00:00
Neil Fuller
26fe60a188 Be more defensive around invalid tzids
Add checks during boot in case the persist.sys.timezone property is set
to a bad ID.

This can happen in the rare case of a mainline rollback: i.e. if a device has
been set to a new ID and then the update is rolled back. Using GMT as a
fallback probably works without this change (it does in java.util.TimeZone),
but relies on all code, including native code that uses
persist.sys.timezone directly, knowing to interpret a bad ID as "GMT".
This commit makes that choice more explicit and defensive.

This change also removes the possibility of IOException, which is never
thrown, from some ZoneInfoDb methods.

Bug: 155738410
Test: boot with a valid id, verify persist.sys.timezone is unchanged
Test: boot with an invalid id set,  verify persist.sys.timezone is "GMT"
Merged-In: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Change-Id: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Exempt-From-Owner-Approval: Approved / landed internally
2020-05-26 10:19:53 +00:00
Lorenzo Colitti
808cb66c50 Merge "Inform the DNS resolver when it needs to do DNS64 synthesis." 2020-05-26 09:26:46 +00:00
Paul Duffin
077b4dffe5 Disable shared library support for framework modules
Defaults shared library to false as the majority of framework modules
should not be usable as a shared library. The exception is ike but it
does not currently use the defaults and will override this setting
when it does.

(cherry picked from f657ae3ee5)

Bug: 156723295
Bug: 155164730
Test: m droid and flash
Change-Id: I3e78994a9855110b02c3d71944ff38b986208e9a
Merged-In: I3e78994a9855110b02c3d71944ff38b986208e9a
2020-05-26 09:47:45 +01:00
markchien
fa270050cb Remove platform cert from Tethering tests
Bug: 156866746
Test: atest TetheringTests, TetheringCoverageTests
Change-Id: I7c539f1f4a447b5913164b222601c6113c6fe645
2020-05-26 09:31:16 +08:00