Commit Graph

8661 Commits

Author SHA1 Message Date
Chiachang Wang
ef723b7617 Merge "Update language to comply with Android's inclusive language guidance" am: f702025bdf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1373160

Change-Id: Ifcb4682d75b8df577281030c58b61eff53e6ae20
2020-07-28 11:04:20 +00:00
Chiachang Wang
f702025bdf Merge "Update language to comply with Android's inclusive language guidance" 2020-07-28 10:51:53 +00:00
Chiachang Wang
3b9549f408 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
Change-Id: I6c3c03c0c2d1302af6d5245486823c13a3432900
2020-07-28 15:36:30 +08:00
Aaron Huang
5463bbece5 Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" am: c36f17d32e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1146757

Change-Id: Ib3e7b1ff5c2fbe3fd9a049b58faf26a6c355ad8f
2020-07-17 05:53:43 +00:00
Aaron Huang
c36f17d32e Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" 2020-07-17 05:40:31 +00:00
Treehugger Robot
0c55907a0a Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" am: 0ac564e673
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364497

Change-Id: I74242ad8ffae7aa7bcf0562eee577d7f66747f09
2020-07-16 11:57:03 +00:00
Treehugger Robot
0ac564e673 Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" 2020-07-16 11:43:51 +00:00
junyulai
c3e3a1d0ef Attribute data usage to virtual RAT type for 5G non-standalone mode
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498
Change-Id: I8753e68140c0993773017c9a49bd8a666a364071
Merged-In: I8753e68140c0993773017c9a49bd8a666a364071
(cherry-picked from ag/12167624)
2020-07-16 18:22:09 +08:00
Treehugger Robot
ce769a0d8e Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360157

Change-Id: I0b5da0e4e20cbd2dd5856b04d1f1ddfe3323b10b
2020-07-10 05:26:41 +00:00
Junyu Lai
43b3142dc3 Revert "Attribute data usage to 5G for 5G non-standalone mode"
This reverts commit dc31686c31.

Reason for revert: Revert and wait for the design is settled down.

Change-Id: I10fdfc37d6456678de1886698cd6ad08bf8aa810
2020-07-10 03:43:19 +00:00
Junyu Lai
214280263e Merge "Attribute data usage to 5G for 5G non-standalone mode" am: c987a53a93
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1359203

Change-Id: I89ed9dd80f6b30e43e59d91fdd3fb91fb0e9be45
2020-07-10 02:56:44 +00:00
junyulai
dc31686c31 Attribute data usage to 5G for 5G non-standalone mode
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498

Change-Id: I563df14500caeb3602b381479afaf5163ad8e6a1
2020-07-09 16:56:54 +08:00
Paul Hu
9778855eb6 Merge "[RFPM02] Add Dependencies class for injection in tests." am: 27cba24934
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318291

Change-Id: Ibc81b90c9a7428f63afcb6bad27eb593cf2f628e
2020-07-08 10:24:36 +00:00
Paul Hu
27cba24934 Merge "[RFPM02] Add Dependencies class for injection in tests." 2020-07-08 10:07:23 +00:00
paulhu
a1a8814b82 [RFPM02] Add Dependencies class for injection in tests.
Add Dependencies class in PermissionMonitor for injection
in tests easily.

Bug: 132784544
Test: atests FrameworksNetTests
Change-Id: Ibb84d548908f7a955fa0ff206794486733259978
2020-07-08 15:30:42 +08:00
Chalard Jean
3b3c6ffdc2 Merge "Add some more public doc for MacAddress" am: a9c0a7e2e2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1354447

Change-Id: I1126b78eb886c5c84afa107b028fe2569d7573e4
2020-07-08 05:29:56 +00:00
Chalard Jean
a9c0a7e2e2 Merge "Add some more public doc for MacAddress" 2020-07-08 05:15:20 +00:00
Aaron Huang
ffb76492e0 Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)
Update all callers to use ProxyInfo(Uri) and remove ProxyInfo(String).

Bug: 160557668
Test: build pass
      atest FrameworksNetTests

Change-Id: I4c980764c8839c48acf03208bb68cd53eb910121
2020-07-06 11:59:27 +00:00
Chalard Jean
ded38fda42 Add some more public doc for MacAddress
Bug: 140807677
Test: doc-only change
Change-Id: I0f6e59eda42fd92ec34db0e9bc2d26d2e83d41d0
2020-07-04 09:01:58 +09:00
Pavel Grafov
1f2605f517 Merge "Connectivity: start PAC global proxy after reboot." am: 22fbf24ce4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/431599

Change-Id: I31aa41a6268d88178c4a3f276c7ea7750695b417
2020-07-03 11:13:01 +00:00
Pavel Grafov
22fbf24ce4 Merge "Connectivity: start PAC global proxy after reboot." 2020-07-03 10:54:10 +00:00
Treehugger Robot
cf29497f56 Merge "Revert "Move Inet[4]AddressUtils to libs/net"" am: 55d6e27887
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1354443

Change-Id: I472fd717d82304e4362c3075805b460b02a197e0
2020-07-03 00:54:07 +00:00
Chalard Jean
064d18d188 Revert "Move Inet[4]AddressUtils to libs/net"
This reverts commit c98e38195d.

Reason for revert: Breaks the build b/160390899

Merged-In: Icd141a992c46290c74929785e261a1cd57bc001b
Change-Id: Ie10e66f61393602f17fbb61bf17230b176bf1f44
2020-07-02 23:47:35 +00:00
Remi NGUYEN VAN
53fbc9d8c0 Merge "Move Inet[4]AddressUtils to libs/net" am: 5bc91ca167
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1324109

Change-Id: I51d32e4efd0d9fc458b02022b6308920f7c812a9
2020-07-02 09:21:23 +00:00
Remi NGUYEN VAN
c98e38195d Move Inet[4]AddressUtils to libs/net
The classes should not be picked up from frameworks/base, as they are
part of several mainline modules.

Also refine comments in DhcpResults following feedback in previous
change.

(cherry-pick from internal branch skipping wifi classes; no other
conflict)

Bug: 151052811
Test: m; manual: flashed, wifi and telephony working
Test: atest NetworkStackCoverageTests
Merged-In: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f

Change-Id: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f
2020-07-02 10:52:31 +09:00
Chalard Jean
007c9dd007 Merge "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."" am: 8ec089e59a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1353491

Change-Id: I837da6368ab0492c5c65afba4e6cb388d526199d
2020-07-01 05:21:03 +00:00
Chalard Jean
8ec089e59a Merge "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."" 2020-07-01 05:12:40 +00:00
Chalard Jean
f90e5bcc2a Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."
Revert "Add new network quirk parcelable in the NetworkAttributes."

Revert submission 1323251-ipv6_prov_loss_quirk_parcelable

Reason for revert: Breaks CtsStrictJavaPackagesTestCases
Reverted Changes:
I18e05c09f:Add new network quirk parcelable in the NetworkAtt...
I8dbff2377:Test IPv6ProvisioningLossParcelable in the Network...

Change-Id: Ie906919b344131cd768fbed787248d3caac2f74d
2020-07-01 01:46:26 +00:00
Xiao Ma
22c1b251b6 Merge "Test IPv6ProvisioningLossParcelable in the NetworkAttributes." am: 111123c560
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322637

Change-Id: I2f6870d0a6b4e52e484f926d86352f6dcd393cca
2020-06-29 12:04:24 +00:00
Paul Hu
b67261dcc9 Merge "[RFPM01] Merge package added/removed methods" am: 6287112701
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317236

Change-Id: I0c7f6ab65220eaf0169fb4d88f9aec023ab33228
2020-06-29 12:03:56 +00:00
Xiao Ma
111123c560 Merge "Test IPv6ProvisioningLossParcelable in the NetworkAttributes." 2020-06-29 11:58:24 +00:00
Xiao Ma
0c140bf1ec Test IPv6ProvisioningLossParcelable in the NetworkAttributes.
Bug: 157534516
Test: atest FrameworksNetTests
Change-Id: I8dbff2377457bb8fd0f447be0a3cda9af952f2a2
2020-06-29 11:57:32 +00:00
Paul Hu
6287112701 Merge "[RFPM01] Merge package added/removed methods" 2020-06-29 11:50:57 +00:00
Lorenzo Colitti
078956721a Merge "Send ConnDiags event before revalidating network in CS." am: ed2ccf0586
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350662

Change-Id: Ie3108f4cc45083523f6f0cda67dad1f13568f296
2020-06-26 07:31:08 +00:00
Lorenzo Colitti
ed2ccf0586 Merge "Send ConnDiags event before revalidating network in CS." 2020-06-26 07:13:56 +00:00
Cody Kesting
3d1df816d2 Send ConnDiags event before revalidating network in CS.
This change updates ConnectivityService to notify the
ConnectivityDiagnosticsHandler of app-reported connectivity before
attempting to revalidate the network. This change forces an ordering on
Connectivity Diagnostics events in the case that the reported
connectivity does not match the known connectivity for the network -
this leads to the network being revalidated and the
ConnectivityDiagnostics event onConnectivityReportAvailable. Passing the
onNetworkConnectivityReported event to the
ConnectivityDiagnosticsHandler first ensures that it is passed to
callbacks before any potential ConnectivityReports are.

Bug: 159718782
Test: android.net.cts.ConnectivityDiagnosticsManagerTest
Change-Id: Ic7bc7138c54c47bbfdf56af5811709fde66f8606
2020-06-25 16:57:18 -07:00
Orion Hodson
ed859035cc Merge changes from topic "lnh-platform-split" am: 9ee9dcf07e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348764

Change-Id: Ie34095ddf885fcf57e2a7bcb89817485564e9100
2020-06-25 07:58:17 +00:00
Orion Hodson
9ee9dcf07e Merge changes from topic "lnh-platform-split"
* changes:
  Update to use nativehelper/JNIPlatformHelp.h
  Sync with libnativehelper refactoring
2020-06-25 07:36:05 +00:00
Luke Huang
f1d39bbada Merge "Disable sockets and DNS if process lacks INTERNET permission." am: 9f5ade331a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348586

Change-Id: I12eb986a95894e41679673830adbbb727d8a8834
2020-06-24 18:52:53 +00:00
Luke Huang
353e8ef81c Merge "Move DnsPacket to libs net" am: d295f3e4f4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348582

Change-Id: I9a5f1d701e5c8f7629df1dfcd0dab44e28945dfc
2020-06-24 18:51:42 +00:00
Luke Huang
9f5ade331a Merge "Disable sockets and DNS if process lacks INTERNET permission." 2020-06-24 18:42:08 +00:00
Orion Hodson
1c962a802f Update to use nativehelper/JNIPlatformHelp.h
Reflects refactoring of JNI helper code that depends on private
methods within libnativehelper.

Bug: 151443957
Test: Treehugger
Change-Id: I7af128f42ae89a77a8e3fb113ea533331153c535
Merged-In: I7af128f42ae89a77a8e3fb113ea533331153c535
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit 329c612e3d5ae440bf13e1f5fc9a4012263524e9)
2020-06-24 14:13:49 +01:00
Luke Huang
caaee1d0ec Disable sockets and DNS if process lacks INTERNET permission.
This is a Client-only solution.
  - Add to NetdClient a per-process std::atomic_boolean
    similar to netIdForProcess and netIdForResolv.
  - The boolean says whether the process should be
    allowed Internet connectivity.
  - Add an @hide method to NetUtils.java to set the boolean;
    call it from the initialization code of the new
    process just after forking from zygote.
  - Make netdClientSocket and dnsOpenProxy check the
    boolean. If the boolean is false, return EPERM from
    socket calls.

Bug: 150028556
Test: atest NetworkUtilsTest
Test: atest CtsAppSecurityHostTestCases:UseProcessTest
(cherry-pick from internal branch, ag/11881939)
Merged-In: If002280fbad493dfc2db3d9d505c0257d49a9056
Change-Id: If002280fbad493dfc2db3d9d505c0257d49a9056
2020-06-24 11:58:57 +00:00
Luke Huang
ff0dc5cf49 Move DnsPacket to libs net
This class might be used by some mainline modules.

Bug: 151052811
Test: atest DnsPacketTest
Test: atest DnsResolverTest
(clean cherry-pick from internal branch)
Merged-In: I8841d91456952ded5efbf8ea221289aecc7746ad
Change-Id: I8841d91456952ded5efbf8ea221289aecc7746ad
2020-06-24 11:32:26 +00:00
paulhu
aa4620914e [RFPM01] Merge package added/removed methods
There are two methods to handle package added/removed from
two differnt listeners. It can use one of listener to handle the
changes. Thus, keep PackageManagerInternal#PackageListObserver
but remove the listening from ConnectivityService.

Bug: 132784544
Test: atests FrameworksNetTests
Change-Id: Ib2db85e4108f9fda731bf6667d0af0610fc79fea
2020-06-23 16:10:03 +08:00
Paul Hu
64e73a539e Merge "Make PendingIntent immutable and correct Settings package name" am: f1140d1a9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1325698

Change-Id: I39f50eb0b88d0f255bea1bd46cf61da010491f20
2020-06-23 04:09:20 +00:00
Paul Hu
f1140d1a9c Merge "Make PendingIntent immutable and correct Settings package name" 2020-06-23 03:55:22 +00:00
paulhu
7746e4ea2d Make PendingIntent immutable and correct Settings package name
ConnectivityService puts up some notifications with pending
intents, but these pending intents are mutable that content can
be changed by someone. So make these pending intents to be
immutable.

Some OEMs have their own Settings package. Thus, need to get the
current using Settings package name instead of just use default
name "com.android.settings".

Bug: 154928507
Test: atest FrameworksNetTests
Change-Id: I02e3277358623400aa03dc8996af3d7c46a8ce76
Merged-In: I02e3277358623400aa03dc8996af3d7c46a8ce76
2020-06-23 10:05:01 +08:00
Treehugger Robot
b3132b400e Merge "Update DnsManagerTest for AIDL interface change" am: 1ce8850c27
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1345375

Change-Id: Ic9836cb0ca7ad9e97b7edb135dbb1f8269f4a0df
2020-06-22 15:50:00 +00:00
Treehugger Robot
1ce8850c27 Merge "Update DnsManagerTest for AIDL interface change" 2020-06-22 15:31:54 +00:00