Commit graph

10,200 commits

Message SHA1
Merge changes from topic "sep11" am: 17b739a5f7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I4fd71573b4301e5473d44517a72d73858b3928c8

Jeff Sharkey   authored and   Automerger Merge Worker   commited 2020-09-14 22:36:51 +00:00
94d8d5e4ce
Merge changes from topic "sep11"
* changes:
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance

Jeff Sharkey   authored and   Gerrit Code Review   commited 2020-09-14 21:52:13 +00:00
17b739a5f7
Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: If75259aab72329f9f8b0e1972a96370ca5134e2c

Jeff Sharkey   commited 2020-09-14 10:00:10 -06:00
0d58543df0
Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I53003332717baf57dc088b2f6b969cdb1863f65e

Jeff Sharkey   commited 2020-09-14 09:59:01 -06:00
814cd18388
Merge "Merge mainline-release 6664920 to stage-aosp-master - DO NOT MERGE" into stage-aosp-master
Bill Yi   authored and   Android (Google) Code Review   commited 2020-09-14 05:33:38 +00:00
77c27b78ea
Merge "Handle lockdown VPN reset intent in ConnectivityService"
Junyu Lai   authored and   Gerrit Code Review   commited 2020-09-14 03:14:51 +00:00
63b0d576a0
Merge mainline-release 6664920 to stage-aosp-master - DO NOT MERGE
Merged-In: I8f9b41ca6388fdeeda287e7919ef05e56f9da1a6
Change-Id: If78e130888b8d4653ef128d747e18cc46844d732

Bill Yi   commited 2020-09-13 07:58:42 -07:00
e908d9f43d
Handle lockdown VPN reset intent in ConnectivityService
Currently, LockdownVpnTracker handles lockdown VPN reset intent.
Which will grab VPN object as a lock, then calls into
ConnectivityService to grab mVpn lock when querying NetworkInfo.
However, the order of grabing locks differs from ConnectivityService
and will causes deadlock if ConnectivityService grabs locks in
the other order.

Thus, make ConnectivityService handles reset intent so the
order of grabing locks can be consistent.

Test: atest FrameworksNetTests
Bug: 147403549
Change-Id: Ia10a3ef6f1e20d092a17313935083a84860961aa

junyulai   commited 2020-09-11 11:43:51 +08:00
b56dc51652
Merge Android R
Bug: 168057903
Merged-In: Ice3e441cc9c0df8d0a6acc016bb74375e081bd67
Change-Id: I1d85742f594be2007c99841b290e502b6ede624e

Xin Li   commited 2020-09-09 20:21:10 -07:00
2fc9f48792
Merge RP1A.200720.011
Bug: 167588565
Merged-In: Iec7a26ecd68aca9c7a38cc8f441197a8237b0c8c
Change-Id: Ia8f5f008bc1f77115b644ab996aedc892fab68e7

Xin Li   commited 2020-09-02 12:34:37 -07:00
383cdb1c99
Mark RP1A.200720.001 as merged
Bug: 167588565
Merged-In: I608df7327b8366fd365b11c6bdff9ed28fde99b0
Change-Id: Ie293ab2bcba5f778a7cac8476e226dc7c15e000f

Xin Li   commited 2020-09-02 11:44:54 -07:00
9fbf46da7d
Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2

Xin Li   commited 2020-08-31 21:21:38 -07:00
4037c36d47
Merge "Notify the keepalive is stopped after the slot has been released"
Junyu Lai   authored and   Gerrit Code Review   commited 2020-08-28 10:12:44 +00:00
09a0f57f87
Merge "Skip RAT type listener registration if IMSI is not available" am: 1e9c48bfec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1409907

Change-Id: Ie24dee18456ee0741dbcd9330664398f0492c644

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-08-25 20:27:30 +00:00
a2f81d1442
Merge "Skip RAT type listener registration if IMSI is not available"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-08-25 19:55:09 +00:00
1e9c48bfec
Skip RAT type listener registration if IMSI is not available
Currently, if SIM is inserted but IMSI is not available, such
as SIM PIN locked state. Information of such SIM will still
be available but IMSI is not. Which makes
NetworkStatsSubscriptionMonitor failed to store IMSI locally
for later RAT type query. Hence, NETWORK_TYPE_UNKNOWN is
always returned for such SIM.

Skip the registration until the IMSI is available. This is safe
since there will be another onSubscriptionsChanged event when
that happens.

Test: enable SIM PIN and manually test
Test: atest NetworkStatsSubscriptionsMonitorTest#testSubscriberIdUnavailable
Test: ./out/host/linux-x86/bin/statsd_testdrive 10082
Bug: 160941101
Merged-In: I408379b3c432d9e62e0837d6b4f6551cc7838e29
Change-Id: I408379b3c432d9e62e0837d6b4f6551cc7838e29
(cherry-picked from ag/12400327)

junyulai   commited 2020-08-25 18:03:38 +08:00
8c91a5f6cf
Merge "Revert "[RFPM03] Check permission by uid."" am: 0925015de5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404654

Change-Id: I51b37f8e717123a2725ade859d5b9dcff19ef484

Paul Hu   authored and   Automerger Merge Worker   commited 2020-08-20 08:33:41 +00:00
b2982a0643
Merge "Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"" am: bddd412feb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404653

Change-Id: I35fe76f9cfedf0619f64023e9111d9a50cc3c41c

Paul Hu   authored and   Automerger Merge Worker   commited 2020-08-20 08:27:16 +00:00
9f33dbb509
Merge "Revert "[RFPM03] Check permission by uid.""
Paul Hu   authored and   Gerrit Code Review   commited 2020-08-20 08:24:30 +00:00
0925015de5
Merge "Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method""
Paul Hu   authored and   Gerrit Code Review   commited 2020-08-20 08:14:48 +00:00
bddd412feb
Merge "Revert "[RFPM05] Add UidNetdPermissionInfo class"" am: 324af52c7a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404652

Change-Id: I8cef4a21aa8fd1923334c2a99e4ff2e864f516a5

Paul Hu   authored and   Automerger Merge Worker   commited 2020-08-20 06:44:04 +00:00
701cd3908e
Merge "Revert "[RFPM05] Add UidNetdPermissionInfo class""
Paul Hu   authored and   Gerrit Code Review   commited 2020-08-20 06:25:06 +00:00
324af52c7a
Revert "[RFPM03] Check permission by uid."
This reverts commit f1e343c1c3.

Reason for revert: Regression in SW.  Bug:162499840

Change-Id: Ic93e762e41a728f66e200e5bc8e40ebe4c7b44f7

Paul Hu   authored and   Remi NGUYEN VAN   commited 2020-08-20 06:23:16 +00:00
fe640c8708
Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"
This reverts commit bfa9f182b0.

Reason for revert: Regression in SW.  Bug:162499840

Change-Id: I96bf28ffc9f2d8f3838cb6d2dac16f89a70177ed

Paul Hu   authored and   Remi NGUYEN VAN   commited 2020-08-20 06:23:00 +00:00
e573ac006d
Revert "[RFPM05] Add UidNetdPermissionInfo class"
This reverts commit fbc1f34c22.

Reason for revert: Regression in SW.  Bug:162499840

Change-Id: I0e846efcc4fc06b53d97b2007e0d8e8f97c6ac10

Paul Hu   commited 2020-08-20 03:10:08 +00:00
9e986a8e98
Notify the keepalive is stopped after the slot has been released
Currently, the callbacks of stopping were fired when stop procedure
is started, because the upper layer apps only care about the reason
of stopping instead of stopping result. Thus, there is no need to
wait for the result comes back. However, this behavior generates
races if apps want to re-start keepalive immediately since the
resources are not released yet.

Fix: 134891441
Fix: 140305589
Test: atest com.android.server.ConnectivityServiceTest#testPacketKeepalives \
      --rerun-until-failure 1000

Change-Id: I987776a9211a50e964c4675b747bc10e203750f1

junyulai   commited 2020-08-20 11:00:08 +08:00
72d2bd016b
Merge "Rename Kotlin util files to not include the Kt suffix" am: 6a8da60a32
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350084

Change-Id: I7e1f015c21d54591a1a25b5fa461e751bc707509

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-08-13 04:09:27 +00:00
97cda73a1c
Merge "Rename Kotlin util files to not include the Kt suffix"
Chalard Jean   authored and   Gerrit Code Review   commited 2020-08-13 03:52:47 +00:00
6a8da60a32
Merge "Update language to comply with Android's inclusive language guidance" am: 64f9851e3a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1379156

Change-Id: Iecf8601b2f9e286cefca0675476d0892436d5e5b

Chiachang Wang   authored and   Automerger Merge Worker   commited 2020-08-12 09:52:30 +00:00
6afddeb044
Merge "Update language to comply with Android's inclusive language guidance"
Chiachang Wang   authored and   Gerrit Code Review   commited 2020-08-12 09:30:11 +00:00
64f9851e3a
Merge "[RFPM05] Add UidNetdPermissionInfo class" am: 255bf95e97
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322556

Change-Id: I91a603d8b37ee750c3f582363bec94977d70014e

Paul Hu   authored and   Automerger Merge Worker   commited 2020-08-12 06:37:34 +00:00
1cc0664651
Merge "[RFPM05] Add UidNetdPermissionInfo class"
Paul Hu   authored and   Gerrit Code Review   commited 2020-08-12 06:17:46 +00:00
255bf95e97
Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code
for reference.

Bug: 161896447
Test: m ; atest FrameworkNetTests
Change-Id: Ib6b4c9526992c31e05e82be80e2b9b86bc0b57ef

Chiachang Wang   commited 2020-08-12 12:23:59 +08:00
e6a0a2b6b9
[RFPM05] Add UidNetdPermissionInfo class
Add UidNetdPermissionInfo class to store netd permission info of
each uid. Use the bit mask for combining all netd permission into
one value which can update and get the uid permission easily.
Moreover, aosp/1340042 add carryover package info into this class
which centralizes all netd permissions relevant data.

Bug: 132784544
Test: atest FrameworksNetTests
Change-Id: I3b81ea2a5017e8f4d0d603144a33c9b08640d7ba

paulhu   commited 2020-08-12 10:33:18 +08:00
fbc1f34c22
Rename Kotlin util files to not include the Kt suffix
Callers don't care what language the utilities are written in

Test: builds
Change-Id: Ie212144f36c50db223c05f3fcb6bad745842cb5e

Chalard Jean   commited 2020-08-12 10:02:50 +09:00
e47850dbf2
Merge changes I33b70b0a,I1074eedb am: 1fb7241345
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1392725

Change-Id: I18869fe6bddd51f77068a91034b524f12c5a3450

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-08-07 06:59:30 +00:00
a2772cf640
Revert "Revert "Move Inet[4]AddressUtils to libs/net"" am: 403df8633d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382497

Change-Id: Ia5e7e926bc3a9af8b03f8970738e6abe4c6d15b6

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-08-07 06:59:26 +00:00
40c2c5f85b
Merge changes I33b70b0a,I1074eedb
* changes:
  Remove the services.net-module-wifi module target.
  Revert "Revert "Move Inet[4]AddressUtils to libs/net""

Chalard Jean   authored and   Gerrit Code Review   commited 2020-08-07 06:45:15 +00:00
1fb7241345
Merge "Fix fd leak in KeepaliveTracker." am: c6a527351f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1361907

Change-Id: I13df61b292a9ec964854641ba170d39caf66125a

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2020-08-07 05:48:00 +00:00
759c08d0f4
Merge "Fix fd leak in KeepaliveTracker."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-08-07 05:40:33 +00:00
c6a527351f
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

Chalard Jean   commited 2020-08-07 03:31:04 +00:00
403df8633d
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

Josh Gao   authored and   Lorenzo Colitti   commited 2020-08-07 03:22:38 +00:00
bd97cc8ebf
Merge "Resolve the endpoint in legacy VPN" am: c0f31b35d0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382496

Change-Id: I732bb2282cf5b4ba74653ecc0bd934bf991649de

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-08-06 13:10:36 +00:00
0317f66f27
Merge "Add a test for starting the legacy VPN." am: c029c1e928
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1372896

Change-Id: I31352ae32ddeba4a37cc37bdcf6d7568f63fd70a

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-08-06 13:10:20 +00:00
0cc2c0d906
Merge "Resolve the endpoint in legacy VPN"
Chalard Jean   authored and   Gerrit Code Review   commited 2020-08-06 12:51:50 +00:00
c0f31b35d0
Merge "Add a test for starting the legacy VPN."
Chalard Jean   authored and   Gerrit Code Review   commited 2020-08-06 12:50:50 +00:00
c029c1e928
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

Chalard Jean   commited 2020-08-06 17:29:59 +09:00
180d580dc2
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)

Chalard Jean   commited 2020-08-06 17:16:00 +09:00
ceacf96547
Merge "Update language to comply with Android's inclusive language guidance" am: 56f5e6595b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1380906

Change-Id: Id2829bcdfb836db02db9842bb250e2eb628495aa

Alex Light   authored and   Automerger Merge Worker   commited 2020-08-03 21:01:33 +00:00
3ca65c6b2b
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: I971050a2665c177870ff257bd0f41343db702892
Merged-In: I971050a2665c177870ff257bd0f41343db702892

Alex Light   commited 2020-08-03 17:04:58 +00:00
ed78646808