Commit Graph

519022 Commits

Author SHA1 Message Date
Lorenzo Colitti
af8f6f7111 Merge "Fix fd leak in KeepaliveTracker." am: 4f1a3c1c74
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1361907

Change-Id: I13df61b292a9ec964854641ba170d39caf66125a
2020-08-07 05:48:00 +00:00
Lorenzo Colitti
4f1a3c1c74 Merge "Fix fd leak in KeepaliveTracker." 2020-08-07 05:40:33 +00:00
Chalard Jean
c9e026f4e9 Add a test for starting the legacy VPN.
The legacy VPN has, among many parameters, a host to connect to.
This host can be specified as a numeric address, or as a hostname.
When it's a name, resolution is required. Currently, name
resolution is performed by the native VPN daemons racoon and
mtpd. When a hostname is used, the framework does not know the
IP address of the VPN server and does not add a throw route for
the VPN server IP address. On older kernels this does not matter
because the legacy PPP kernel code binds the PPP socket to the
right network, but on newer devices that use the upstream PPP
code, this does not work. See b/133797637.

This patch instruments the legacy VPN code so that it can be
run in tests, and uses this instrumentation to simulate passing
a configuration that contains a host, and verifies that the
arguments passed to the mptd and racoon daemons receive the
expected server address, and that the expected throw route is
correctly installed.
It then adds two tests : one specifying the server as a numeric
address, and one as a hostname. As the resolution is currently
broken, the latter of these tests is added disabled, and the
followup fix to the issue enables it.

This test is basic and very targeted, but it's what we need right
now. Also there are plans to remove this entire code path in S, so
the test being ad-hoc is not much of a problem.

Test: this
Bug: 158974172
Change-Id: I96f4bbb9b109e3e5813d083bed1989d88fb156b8
Merged-In: I3c4a94181bd71df68121fa0f71669fa4fa588bdd
(cherry picked from commit dece7f3f74)
2020-08-07 05:11:43 +00:00
wilsonshih
d9bebe5cfd Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for
reference.

Bug: 162536543
Test: Treehugger
Change-Id: I8549339772c2199d35b43719c1a88872697629ab
2020-08-07 11:47:33 +08:00
Chalard Jean
be00709344 Revert "Revert "Move Inet[4]AddressUtils to libs/net""
This patch is still needed and should go in now that the
error is fixed.
The patch was submitted into rvc-dev and is already in
rvc-dev-plus-aosp (patch in in ag/11923559, revert
skipped in ag/12072199). A follow-up will remove the
unused services.net-module-wifi target.

Test: originally tested in aosp/1324109
Test: m; manual: flashed, wifi and telephony working
Test: atest NetworkStackCoverageTests
Change-Id: I1074eedb0b0f156a1135e11210ec102de15ea674
Merged-In: Icd141a992c46290c74929785e261a1cd57bc001b
2020-08-07 03:31:04 +00:00
Puma Hsu
a9d3817d69 Merge "Update language to comply with Android's inclusive language guidance" am: b8017c9d03 am: cbc7b156b2 am: 185d02ec5d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382480

Change-Id: Ib364c43dc446a87ea9f76fccc634d35e90c8042a
2020-08-07 03:26:30 +00:00
Josh Gao
a67198dbfd Fix fd leak in KeepaliveTracker.
The semantics of FileDescriptor in AIDL are that the callee must close
the file descriptor it receives manually.

Bug: http://b/157789860
Test: treehugger
Change-Id: Ice9fc9abe2959a84ad138a95c900dff676653665
2020-08-07 03:22:38 +00:00
Puma Hsu
185d02ec5d Merge "Update language to comply with Android's inclusive language guidance" am: b8017c9d03 am: cbc7b156b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382480

Change-Id: Ia235f0faf642f5752e9c169c3383c37219e735a6
2020-08-07 03:07:01 +00:00
Puma Hsu
cbc7b156b2 Merge "Update language to comply with Android's inclusive language guidance" am: b8017c9d03
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382480

Change-Id: Ia0c937717d130ea844bab629c744e32201991610
2020-08-07 02:54:33 +00:00
Puma Hsu
b8017c9d03 Merge "Update language to comply with Android's inclusive language guidance" 2020-08-07 02:39:26 +00:00
TreeHugger Robot
861c8740b8 [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-d1-dev am: b82ba472f7 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12321109

Change-Id: Ic5e02b07213304f8efb3a256f28e46286122da20
2020-08-06 23:35:58 +00:00
TreeHugger Robot
b82ba472f7 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-d1-dev 2020-08-06 23:18:07 +00:00
Santiago Seifert
f92d07e5f9 Add updatable-media jarjar rules to framework-all
Prevents the robolectric shadows jar from including ExoPlayer
symbols, which collide with app-bundled class files.

Bug: 161753405
Test: Manually checked robolectric jar contents.
Test: Built sargo-userdebug, flashed and tested on physical device.
Change-Id: I3bdc9e0b22cd0dea40f5bad15b0e6c619d32faf6
2020-08-06 23:15:18 +01:00
Steven Moreland
7542475521 Parcelable getStability SystemApi MODULE_LIBRARIES
This method is intentionally overridden by subclasses. The
infrastructure doesn't detect that this is happening, but we should
still annotate this as part of the API.

As requested by API review council.

Bug: 162811168
Test: build only
Change-Id: I27714a93b71108cc0cc62fc858c260e2a6920ba9
2020-08-06 21:22:15 +00:00
Liam Harrington
c782be6e6f Refactor of PointerController
Abstracted logic that applies to all pointer types into general
PointerController class and moved implementation of logic specific
to the mouse cursor and touch spots to MouseCursorController and
TouchSpotController, respectively.
Test: Pixel 3XL device, atest PointerController_test, compile

Change-Id: Ia5825c37ca75951cc8bcd7d5102c986bd957e69f
2020-08-06 20:22:26 +00:00
Calin Juravle
11f352b4d7 [automerger skipped] Merge "Notify IORap without including packages for secondary dex opt." into rvc-dev am: eddf0c94d2 am: 724d8f1740 -s ours
am skip reason: Change-Id Iae4fc0b6fc73707ada8895b38c3ae3f772ac2cd0 with SHA-1 9b4958afb0 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12280079

Change-Id: I9b73c637b235f62449ca51a023dd29e97dd2007a
2020-08-06 19:37:16 +00:00
Calin Juravle
e0dfb2ce74 [automerger skipped] Merge "Notify IORap without including packages for secondary dex opt." into rvc-dev am: eddf0c94d2 -s ours am: 74cc42dcb1 -s ours
am skip reason: Change-Id Iae4fc0b6fc73707ada8895b38c3ae3f772ac2cd0 with SHA-1 8e41a2debb is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12280079

Change-Id: I2b2c152f224ca23a7a4ec0a8acd0726ed7cb8a04
2020-08-06 19:35:58 +00:00
Calin Juravle
724d8f1740 Merge "Notify IORap without including packages for secondary dex opt." into rvc-dev am: eddf0c94d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12280079

Change-Id: I516152d64468fd248b2a8d5dc5127567f538b8b3
2020-08-06 19:23:07 +00:00
Calin Juravle
74cc42dcb1 [automerger skipped] Merge "Notify IORap without including packages for secondary dex opt." into rvc-dev am: eddf0c94d2 -s ours
am skip reason: Change-Id Iae4fc0b6fc73707ada8895b38c3ae3f772ac2cd0 with SHA-1 8e41a2debb is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12280079

Change-Id: Ia64d23ca6ed8b45553963af97ce65e153ab7af87
2020-08-06 19:22:53 +00:00
Calin Juravle
eddf0c94d2 Merge "Notify IORap without including packages for secondary dex opt." into rvc-dev 2020-08-06 19:08:29 +00:00
felipeal
2b8bf40f60 Fixed how com.android.server.pm.Settings handle pre-created users.
Its getAllUsers() method was not returning pre-created users, so
packages installed for a "regular" user were not marked as
"installed=false" for the pre-created users. Hence, when the
pre-created was "promoted" to a full user, it contained such
packages.

Here's how to reproduce the issue:

$ m -j ApiDemos

$ adb shell pm create-user --pre-create-only
Success: created user id 10

$ adb install --user cur $OUT/testcases/ApiDemos/arm64/ApiDemos.apk
Performing Streamed Install
Success

$ adb shell pm list packages --user cur | grep com.example.android.apis || echo
package:com.example.android.apis

$ adb shell pm list packages --user 10 | grep com.example.android.apis || echo "NOT FOUND"
package:com.example.android.apis # Should return "NOT FOUND"

$ adb shell pm create-user FullUserIAm
Success: created user id 10

$ adb shell pm list packages --user 10 | grep com.example.android.apis || echo "NOT FOUND"
package:com.example.android.apis # Should return "NOT FOUND"

With this fix, it returns "NOT FOUND" in the expected steps.

Fixes: 160252062
Fixes: 162847145
Test: see above

Merged-In: I6cd17ac588a4d95bf0ea704dd18387e19eeab374
Change-Id: I6cd17ac588a4d95bf0ea704dd18387e19eeab374
(cherry picked from commit 00175974ba24d982ecfe760ee78a1a17bb326d04)
2020-08-06 10:12:24 -07:00
Chalard Jean
9da9925389 Merge "Resolve the endpoint in legacy VPN" am: 429b59c8a4 am: fc546021bb am: 4820e9d4e4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382496

Change-Id: I96691f6091c43377f23a00621242ed034fcb0444
2020-08-06 16:35:54 +00:00
Chalard Jean
4d64450516 Merge "Add a test for starting the legacy VPN." am: 869d4f597d am: 6926df6314 am: 4136a41652
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1372896

Change-Id: I3c4a94181bd71df68121fa0f71669fa4fa588bdd
2020-08-06 16:35:30 +00:00
James Wei
70c8e5b4a2 Merge "UsbAccessory: Update language to comply with Android's inclusive language guidance" am: 3c127a54bb am: 6549bf6d3d am: 51929ba1f3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382397

Change-Id: I5241b4b9dc639ceeb59cbe8c76fdf712c7281a10
2020-08-06 16:35:06 +00:00
Xin Li
7f35d6cc41 [automerger skipped] Merge "Merge QQ3A.200805.001" am: 4b3c00e75f am: 4939ba29f5 -s ours am: 955e04a8ee -s ours
am skip reason: Change-Id I6e0bdc8c02bab54f6278096b3a3acadd97c064c6 with SHA-1 9450069de9 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1387434

Change-Id: I00546350457b10598b72fb79403132c38edb91e9
2020-08-06 16:22:27 +00:00
Chalard Jean
4820e9d4e4 Merge "Resolve the endpoint in legacy VPN" am: 429b59c8a4 am: fc546021bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382496

Change-Id: If649ab2763c9971c25af7732b32e97bfd50fb6f0
2020-08-06 16:06:20 +00:00
Chalard Jean
4136a41652 Merge "Add a test for starting the legacy VPN." am: 869d4f597d am: 6926df6314
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1372896

Change-Id: Idc49c61cc0547cdabe37cfa19b685c2beeda473b
2020-08-06 16:06:08 +00:00
James Wei
51929ba1f3 Merge "UsbAccessory: Update language to comply with Android's inclusive language guidance" am: 3c127a54bb am: 6549bf6d3d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382397

Change-Id: Ib01f4fc9c916d998641bd944fb8d416fb8a3ac2d
2020-08-06 16:04:11 +00:00
Xin Li
955e04a8ee [automerger skipped] Merge "Merge QQ3A.200805.001" am: 4b3c00e75f am: 4939ba29f5 -s ours
am skip reason: Change-Id I6e0bdc8c02bab54f6278096b3a3acadd97c064c6 with SHA-1 9450069de9 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1387434

Change-Id: I110045d98caea24424bf28d315cb99b353870722
2020-08-06 16:02:18 +00:00
Aman Gupta
7395b0a265 Add KEYCODE_PROG_{BLUE,RED,GREEN,YELLOW} mappings to LKC equivalents
My goal is to allow colored keys on HDMI-CEC and Bluetooth remotes to be used by an Android TV app.

The USB HID spec [1] and CEC spec [2] both define distinct codes for these keys.

The kernel converts both the HID [4] and CEC [5] codes to standard LKC codes [6]:

  #define KEY_RED		0x18e
  #define KEY_GREEN		0x18f
  #define KEY_YELLOW	0x190
  #define KEY_BLUE		0x191

Android also defines KEYCODE_PROG_ constants for these keys in KeyEvent.java [3]. This commit maps these LKC codes starting at 0x18e (i.e 398) to the existing KeyEvent equivalents.

[1] https://www.usb.org/sites/default/files/color_buttons_0.pdf
[2] https://github.com/floe/CEC/raw/master/extras/CEC_Specs.pdf
[3] https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/java/android/view/KeyEvent.java#L539-L550
[4] https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c#L897-L900
[5] https://github.com/torvalds/linux/blob/master/drivers/media/rc/keymaps/rc-cec.c#L142-L145
[6] https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h#L470-L473

Signed-off-by: Aman Gupta <aman@tmm1.net>
Change-Id: I26c63732c8533390de91460acec312fd27ad8866
2020-08-06 08:03:19 -07:00
Christian Wailes
5e0437a1b5 [automerger skipped] Merge "Rename blacklist to denylist" am: 0f2d849c39 am: c044cd9bb1 -s ours am: c82b42a599 -s ours
am skip reason: Change-Id If8bb7c923f1ce8d8ce8c3142bf1b674982a96573 with SHA-1 b656b9540a is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1379680

Change-Id: Iff5184afb8d9f4544b70e97afb44c72e8411137f
2020-08-06 13:11:42 +00:00
Treehugger Robot
847b1d7cba [automerger skipped] Merge "Parent: cc2d51fc (Merge "Update language to comply with Android's inclusive language guidance") Author: Paul McLean <pmclean@google.com> AuthorDate: 2020-07-28 15:07:26 +0000 Commit: Glenn Kasten <gkasten@android.com> CommitDate: 2020-08-04 00:06:51 +0000" am: 830c70ad25 am: ff642c408c -s ours am: 80b4e4de4c -s ours
am skip reason: Change-Id I4b3affce57ba61ad9697e91f2a5f63556ee1cd62 with SHA-1 5b0078defd is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1374724

Change-Id: I8acc81352a181881aee5527503c74bfa4a14996d
2020-08-06 13:10:38 +00:00
Chalard Jean
fc546021bb Merge "Resolve the endpoint in legacy VPN" am: 429b59c8a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382496

Change-Id: I732bb2282cf5b4ba74653ecc0bd934bf991649de
2020-08-06 13:10:36 +00:00
Chalard Jean
6926df6314 Merge "Add a test for starting the legacy VPN." am: 869d4f597d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1372896

Change-Id: I31352ae32ddeba4a37cc37bdcf6d7568f63fd70a
2020-08-06 13:10:20 +00:00
TreeHugger Robot
8d592fae4e Merge "resolve merge conflicts of c94e810cab to rvc-dev-plus-aosp" into rvc-dev-plus-aosp am: a3d8ee34a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12316526

Change-Id: I3de451092d7139bc0b19d4288967e9347a69908e
2020-08-06 13:10:00 +00:00
Christian Wailes
c82b42a599 [automerger skipped] Merge "Rename blacklist to denylist" am: 0f2d849c39 am: c044cd9bb1 -s ours
am skip reason: Change-Id If8bb7c923f1ce8d8ce8c3142bf1b674982a96573 with SHA-1 b656b9540a is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1379680

Change-Id: I119acd7019af2e7253dd837376ed0d8019a80d6d
2020-08-06 13:09:30 +00:00
Treehugger Robot
80b4e4de4c [automerger skipped] Merge "Parent: cc2d51fc (Merge "Update language to comply with Android's inclusive language guidance") Author: Paul McLean <pmclean@google.com> AuthorDate: 2020-07-28 15:07:26 +0000 Commit: Glenn Kasten <gkasten@android.com> CommitDate: 2020-08-04 00:06:51 +0000" am: 830c70ad25 am: ff642c408c -s ours
am skip reason: Change-Id I4b3affce57ba61ad9697e91f2a5f63556ee1cd62 with SHA-1 5b0078defd is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1374724

Change-Id: I67ecbc1e51d6f0316c2bc1e99902a6d658b5790d
2020-08-06 13:09:18 +00:00
TreeHugger Robot
a3d8ee34a4 Merge "resolve merge conflicts of c94e810cab to rvc-dev-plus-aosp" into rvc-dev-plus-aosp 2020-08-06 13:01:00 +00:00
Chalard Jean
429b59c8a4 Merge "Resolve the endpoint in legacy VPN" 2020-08-06 12:51:50 +00:00
Chalard Jean
869d4f597d Merge "Add a test for starting the legacy VPN." 2020-08-06 12:50:50 +00:00
Josh Hou
6aac86eed5 Allow call forwarding number with prefixes to be dialed while on IMS roaming
If the carrier supports call forwarding number prefixes to be allowed
while on IMS roaming, then the number should be dialed and forwarded successfully

Bug: 153413483
Test: Verify the call using *72 <number to be forwarded to> is dialed and forwarded successully
Change-Id: Ia93dec2ebb11aa3ab8f48975a9b6f02089d1482b
Merged-In: I6cd1e60e0dbb634581c97552dad244383ff4e3f9
2020-08-06 16:55:48 +08:00
Chalard Jean
197b4a7168 Resolve the endpoint in legacy VPN
This adds code to resolve the endpoint in the legacy VPN
runner if it was specified as a hostname, and enables the
previously added test that was disabled because this was
broken until this patch. See the linked bug for details.

This patch uses the async DNS API to do the resolution.
This lets the resolution be fully cancellable, though the
code is more complex than with the non-interruptible
getByName.

Test: VpnTest and in particular VpnTest#testStartRacoon
      Fixes the test meant to test this
      Also manual testing that resolution of a real
      hostname works as expected, that failure to resolve
      returns correctly, and that cancellation/interruption
      will unblock the thread and terminate immediately.
Bug: 158974172
Change-Id: I714985f3c7919dad9c1854830c50f29c1f94a21e
2020-08-06 17:29:59 +09:00
Chalard Jean
b2a73dc872 Add a test for starting the legacy VPN.
The legacy VPN has, among many parameters, a host to connect to.
This host can be specified as a numeric address, or as a hostname.
When it's a name, resolution is required. Currently, name
resolution is performed by the native VPN daemons racoon and
mtpd. When a hostname is used, the framework does not know the
IP address of the VPN server and does not add a throw route for
the VPN server IP address. On older kernels this does not matter
because the legacy PPP kernel code binds the PPP socket to the
right network, but on newer devices that use the upstream PPP
code, this does not work. See b/133797637.

This patch instruments the legacy VPN code so that it can be
run in tests, and uses this instrumentation to simulate passing
a configuration that contains a host, and verifies that the
arguments passed to the mptd and racoon daemons receive the
expected server address, and that the expected throw route is
correctly installed.
It then adds two tests : one specifying the server as a numeric
address, and one as a hostname. As the resolution is currently
broken, the latter of these tests is added disabled, and the
followup fix to the issue enables it.

This test is basic and very targeted, but it's what we need right
now. Also there are plans to remove this entire code path in S, so
the test being ad-hoc is not much of a problem.

Test: this
Bug: 158974172
Change-Id: I420b63db03a58e8c67a98a85c9f4c2d6ed7ad078
(cherry picked from commit 45846a03051a13d667732288e457eab4336a691e)
2020-08-06 17:16:00 +09:00
Puma Hsu
15630c0b43 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference


BUG=162536543

Change-Id: I1eeee50e4c67ed176d464ef7252adac9fb99c31f
2020-08-06 06:13:51 +00:00
Bill Yi
aa78645d74 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4efc1a23c45bbff500fe38afbbea32d7f0b172b9
2020-08-06 04:22:35 +00:00
Wayne Lin
5b908d36a3 Merge "Extend SUPL network request timeout for consecutive SUPL request" into rvc-d1-dev am: db9c531910
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12279987

Change-Id: Icd6c812e9ad22a4bd84602837ec6fd1435b1c5ff
2020-08-06 04:13:14 +00:00
Wayne Lin
db9c531910 Merge "Extend SUPL network request timeout for consecutive SUPL request" into rvc-d1-dev 2020-08-06 03:51:14 +00:00
James Wei
6549bf6d3d Merge "UsbAccessory: Update language to comply with Android's inclusive language guidance" am: 3c127a54bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382397

Change-Id: I8696f0cdad5ada3040a46638fe964f394ae08dbb
2020-08-06 01:41:21 +00:00
Chavi Weingarten
1812833eb2 Merge "Revert "Reparent bounds layer if surface was replaced."" into rvc-d1-dev am: 15e6f37a16
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12308823

Change-Id: I49889d6e90ed4d8ce33ca773eeeb3ab7e4a43924
2020-08-06 01:39:49 +00:00
Chavi Weingarten
15e6f37a16 Merge "Revert "Reparent bounds layer if surface was replaced."" into rvc-d1-dev 2020-08-06 01:16:23 +00:00