Commit Graph

6334 Commits

Author SHA1 Message Date
Lorenzo Colitti
82f2a72d01 Move TcpKeepalivePacketData out of the framework.
This class is not used in framework.jar, only in services.jar.
Move it out of the framework so framework.jar can stop depending
on the NetworkStack stable AIDL interfaces.

This should really under com.android.server as well, but that's
a cross-project change to be done in another CL.

Test: m
Bug: 128804404
Change-Id: Ib2805f7fcc516a5f6989c252365d1c95b8042703
Merged-In: Ib2805f7fcc516a5f6989c252365d1c95b8042703
2019-03-20 08:56:31 +09:00
Lorenzo Colitti
15c035c790 Stop using netd parcelables in the framework.
The only actual users of these classes are in services.jar, not
in frameworks.jar. The only reason the framework depends on them
is that the code that converts to and from stable parcelables is
currently in the framework. Move that code to services and cut
the dependency.

These classes aren't used in the networkstack app so they don't
need to be in shared. They also can't be in shared because the
classes are not in the SDK. So put the conversion functions
directly inside their only user (NetworkManagementService).

Also remove the jarjar rules that rename the classes for use by
the NetworkStack app.

This does not actually remove the dependency from the build file,
that will be done in a future CL.

Bug: 128804404
Test: builds, boots
Test: atest FrameworksNetTests android.net.cts.ConnectivityManagerTest HostsideVpnTests
Change-Id: I027d50ba56091f5558f45e6e08f32e5912b2a82a
Merged-In: I027d50ba56091f5558f45e6e08f32e5912b2a82a
2019-03-20 08:56:24 +09:00
Chenbo Feng
2c7e5e9b2f [automerger skipped] Merge "Add uid information in PackageListObserver" am: 4376896ea9 am: 5b3a644227
am: e046bf1f5f -s ours
am skip reason: change_id I2bd4bdf924687960a4fa3a47235bae68d885e445 with SHA1 9d4479a4f4 is in history

Change-Id: Ie05eba316be7bf44fb06706f3e3457dffbf729a7
2019-03-19 15:08:07 -07:00
Chenbo Feng
e046bf1f5f Merge "Add uid information in PackageListObserver" am: 4376896ea9
am: 5b3a644227

Change-Id: I61f46bf443c2027ed70a884f0cbb3ede80a8c1f3
2019-03-19 14:53:10 -07:00
Chenbo Feng
5b3a644227 Merge "Add uid information in PackageListObserver"
am: 4376896ea9

Change-Id: I4fef26fed802902d6a69563c19704a94916ff834
2019-03-19 14:42:14 -07:00
Treehugger Robot
4376896ea9 Merge "Add uid information in PackageListObserver" 2019-03-19 21:19:16 +00:00
Varun Anand
b5d1b24eb0 Merge "Add unit tests related to data accounting for VPNs with one underlying network." am: 43c87768e0 am: 5df3d62d01
am: 12f4d3d7e3

Change-Id: I80e3ebb556ac0b6bff5d232b881f7d869cb74f00
2019-03-19 09:47:04 -07:00
Varun Anand
12f4d3d7e3 Merge "Add unit tests related to data accounting for VPNs with one underlying network." am: 43c87768e0
am: 5df3d62d01

Change-Id: I7ab73884266bc4b64d1914557a29e84fc4de431e
2019-03-19 09:37:37 -07:00
Varun Anand
5df3d62d01 Merge "Add unit tests related to data accounting for VPNs with one underlying network."
am: 43c87768e0

Change-Id: I91971112870c7a3a2d4786c25125204de7e008f5
2019-03-19 09:28:22 -07:00
Treehugger Robot
43c87768e0 Merge "Add unit tests related to data accounting for VPNs with one underlying network." 2019-03-19 16:18:28 +00:00
Lorenzo Colitti
47002ed0d1 Move TcpKeepalivePacketData out of the framework.
This class is not used in framework.jar, only in services.jar.
Move it out of the framework so framework.jar can stop depending
on the NetworkStack stable AIDL interfaces.

This should really under com.android.server as well, but that's
a cross-project change to be done in another CL.

Test: m
Bug: 128804404
Change-Id: Ib2805f7fcc516a5f6989c252365d1c95b8042703
2019-03-20 00:49:33 +09:00
Lorenzo Colitti
86b51bb8a4 Stop using netd parcelables in the framework.
The only actual users of these classes are in services.jar, not
in frameworks.jar. The only reason the framework depends on them
is that the code that converts to and from stable parcelables is
currently in the framework. Move that code to services and cut
the dependency.

These classes aren't used in the networkstack app so they don't
need to be in shared. They also can't be in shared because the
classes are not in the SDK. So put the conversion functions
directly inside their only user (NetworkManagementService).

Also remove the jarjar rules that rename the classes for use by
the NetworkStack app.

This does not actually remove the dependency from the build file,
that will be done in a future CL.

Bug: 128804404
Test: builds, boots
Test: atest FrameworksNetTests android.net.cts.ConnectivityManagerTest HostsideVpnTests
Change-Id: I027d50ba56091f5558f45e6e08f32e5912b2a82a
2019-03-20 00:49:32 +09:00
Xiao Ma
cefa778aa4 Merge "Move the IpMemoryStore to the network stack." am: edb899fcf8 am: 61e928c7cd
am: 78e3f9ab7d

Change-Id: I243056012d2f099d96a33657c0eb63a5b66a2cfe
2019-03-19 06:54:43 -07:00
Xiao Ma
78e3f9ab7d Merge "Move the IpMemoryStore to the network stack." am: edb899fcf8
am: 61e928c7cd

Change-Id: I20e384320309579b19fe44f3841ffbc49c028c6d
2019-03-19 06:44:45 -07:00
Xiao Ma
61e928c7cd Merge "Move the IpMemoryStore to the network stack."
am: edb899fcf8

Change-Id: I672d07ca2d0a251c246993ab8c7c3075de385570
2019-03-19 06:35:31 -07:00
Xiao Ma
edb899fcf8 Merge "Move the IpMemoryStore to the network stack." 2019-03-19 13:21:12 +00:00
Remi NGUYEN VAN
18017cb6d1 Add documentation for CaptivePortal APP_RETURN_*
This fixes API review requests.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 126883311
Change-Id: I0632a98675e65c5e722e81a2c1e0cf1403b54395
2019-03-19 18:57:44 +09:00
Luke Huang
9c21fcd7f6 Merge "Replace Handler with Executor for async DNS API" am: 21be4d297c am: 699127bae2
am: cadce1355b

Change-Id: Ia2305094fe66017fbdfdc18b2c7284452ac90036
2019-03-18 23:40:49 -07:00
Luke Huang
cadce1355b Merge "Replace Handler with Executor for async DNS API" am: 21be4d297c
am: 699127bae2

Change-Id: I40ce45d039e01f831b6f4f50ed360a2a206a1146
2019-03-18 23:25:58 -07:00
Luke Huang
bcee2f4588 Merge "Refactor answer callback for async DNS query JAVA API" am: 2b474c454f am: 5f80d53df8
am: d54dc33070

Change-Id: Id4d0ae87b1ac8618c28da666619c5c5b5bd2d722
2019-03-18 23:24:06 -07:00
Luke Huang
d54dc33070 Merge "Refactor answer callback for async DNS query JAVA API" am: 2b474c454f
am: 5f80d53df8

Change-Id: I7538b247c5bd84d7f5b21be11b9bb1940fb9ba5a
2019-03-18 23:09:58 -07:00
Luke Huang
699127bae2 Merge "Replace Handler with Executor for async DNS API"
am: 21be4d297c

Change-Id: I5fb0d659d27894ca9f243654f9283764f1369745
2019-03-18 23:05:15 -07:00
Luke Huang
5f80d53df8 Merge "Refactor answer callback for async DNS query JAVA API"
am: 2b474c454f

Change-Id: I26eb642cc04e3804cd82a56e45a890689b3c643f
2019-03-18 22:55:37 -07:00
Luke Huang
21be4d297c Merge "Replace Handler with Executor for async DNS API" 2019-03-19 05:35:39 +00:00
Luke Huang
2b474c454f Merge "Refactor answer callback for async DNS query JAVA API" 2019-03-19 05:35:18 +00:00
Mark Chien
cb9503a379 Merge "Remove deprecated entitlement API" am: 2adc944732 am: 74b3b60b76
am: 3baef16087

Change-Id: I6bb5611de8d45e9a5c17128ea38ba1bdd8f86ac2
2019-03-18 20:38:36 -07:00
Mark Chien
3baef16087 Merge "Remove deprecated entitlement API" am: 2adc944732
am: 74b3b60b76

Change-Id: I6028d1f11f99bf5719f0d2a5b387fe651905aba3
2019-03-18 20:22:09 -07:00
Mark Chien
74b3b60b76 Merge "Remove deprecated entitlement API"
am: 2adc944732

Change-Id: I6b19b684a1dfa509ee77304d6acfe3fcdb6ca69c
2019-03-18 20:00:35 -07:00
Mark Chien
2adc944732 Merge "Remove deprecated entitlement API" 2019-03-19 02:44:37 +00:00
Chenbo Feng
ceb0eba5bd Add uid information in PackageListObserver
The uid information of a removed package cannot be retrieved by the
packageName anymore once it is removed. So it would be useful to provide
the uid of removed package in the onPackageAdded and onPackageRemoved
method of the PackageListObserver. This modification helps simplify the
design in PermissionMonitor.

Bug: 125396053
Test: dumpsys netd trafficcontroller

Exempt-From-Owner-Approval: Already merged in internal master
Merged-In: I2bd4bdf924687960a4fa3a47235bae68d885e445
Change-Id: I2bd4bdf924687960a4fa3a47235bae68d885e445
2019-03-18 19:32:29 -07:00
TreeHugger Robot
376b30f985 Merge "Revert "Revert "Update VPN capabilities when its underlying network set is null.""" into pi-dev 2019-03-19 02:00:38 +00:00
TreeHugger Robot
182784fea4 Merge "Remove ConnectivityManager and its usages from NetworkStatsService." into pi-dev 2019-03-19 02:00:38 +00:00
Chalard Jean
4ae71e9ebc Move the IpMemoryStore to the network stack.
Test: atest FrameworksNetTests
Change-Id: Ic5bd6ff54b09a6fa92b6863f240a5b053011acb6
2019-03-18 11:33:17 +09:00
Remi NGUYEN VAN
5734499deb Merge "Remove NetworkParcelable" am: 7b9d4803b6 am: d7f138704b
am: 3f8edc8006

Change-Id: Ifec0dd683bf9c9b73c4af12835b76d284559daf8
2019-03-17 19:12:02 -07:00
Remi NGUYEN VAN
3f8edc8006 Merge "Remove NetworkParcelable" am: 7b9d4803b6
am: d7f138704b

Change-Id: Ice0f04749d2b7c2863ad18c29f5967649127ee0e
2019-03-17 18:55:26 -07:00
Remi NGUYEN VAN
d7f138704b Merge "Remove NetworkParcelable"
am: 7b9d4803b6

Change-Id: I8dc6d665a33d19ecad2bd5f611c2b68e08d53b97
2019-03-17 18:44:58 -07:00
Remi NGUYEN VAN
7b9d4803b6 Merge "Remove NetworkParcelable" 2019-03-18 01:30:25 +00:00
Luke Huang
b1cf5aaf06 Support query cancellation for async DNS API
Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest DnsPacketTest

Change-Id: Iaa72f5c17f58cf0a58663b892bb18cfdf23cd545
2019-03-16 18:53:09 +08:00
Luke Huang
dfd2e4da29 Replace Handler with Executor for async DNS API
Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest DnsPacketTest

Change-Id: Ie1dc27643d4767f2a8a39da755edf388a00962d5
2019-03-16 18:53:07 +08:00
Luke Huang
6d72b2c073 Refactor answer callback for async DNS query JAVA API
1. refactor AnswerCallback with a generic type
2. support onError in AnswerCallback
3. Fix minor problem reported from API Review

Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest DnsPacketTest

Change-Id: I685c9989f8401acb63d2e83f552b2d5b20c41af0
2019-03-16 18:53:05 +08:00
Varun Anand
3a84b3cee7 Add unit tests related to data accounting for VPNs with one underlying
network.

This is to establish a baseline for the existing behavior, and to ensure
that following changes are not causing a regression in existing
behavior.

This CL is also adding missing cleanup for NetworkStatsCollectionTest
which was forcing all network types in NetworkTemplate that was causing
NetworkStatsService related tests to fail.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Change-Id: I285f186cfb16bc9fa704c797996b1e4f8a73dee4
2019-03-15 17:23:28 -07:00
Jack Yu
5d1c01d97a [automerger skipped] Merge "Moved transport to IntDef" am: 122c557701 am: e8bb52935c
am: 7a1a9822f4 -s ours
am skip reason: change_id I1b513bcaaa0ebf47c14593d962579ed48a7c6db0 with SHA1 1d2fb10430 is in history

Change-Id: Iae5ff42920f769ecfc9de290f513bd926e4de77b
2019-03-15 16:53:51 -07:00
Jack Yu
7a1a9822f4 Merge "Moved transport to IntDef" am: 122c557701
am: e8bb52935c

Change-Id: I9a68e86efd37018db87dfb09af58fba8b99c3b15
2019-03-15 16:40:23 -07:00
Jack Yu
e8bb52935c Merge "Moved transport to IntDef"
am: 122c557701

Change-Id: I80d2bf5b3d195d4b05135006418ba4b638271f4f
2019-03-15 16:31:06 -07:00
Treehugger Robot
122c557701 Merge "Moved transport to IntDef" 2019-03-15 23:21:29 +00:00
Jack Yu
28c0430010 Merge "Moved transport to IntDef" 2019-03-15 21:16:42 +00:00
Remi NGUYEN VAN
eb42f2f9e7 Remove NetworkParcelable
With the @JavaOnlyStableParcelable annotation, Network can now be used
as-is as a framework parcelable.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 126477266
Change-Id: I5d9695a31b3ac48d10edcf08ccd0c34375353b79
2019-03-16 03:51:09 +09:00
Benedict Wong
4f693d7347 [automerger skipped] Merge "Integrate testNetworkService and Manager with Connectivity stack" am: 546bcbb218 am: 7d82f9cf63
am: d13dcbe59c -s ours
am skip reason: change_id I741ef9cdf4bd4125d9129af3a030edf32f438e4f with SHA1 b36a811d58 is in history

Change-Id: Ic64ea5abdc07034b674c1365de7af75abd94d119
2019-03-15 11:13:04 -07:00
Benedict Wong
d13dcbe59c Merge "Integrate testNetworkService and Manager with Connectivity stack" am: 546bcbb218
am: 7d82f9cf63

Change-Id: If9efbc3e0b3f0949286a2a5ad8226009ebbcfc07
2019-03-15 10:59:21 -07:00
Benedict Wong
7d82f9cf63 Merge "Integrate testNetworkService and Manager with Connectivity stack"
am: 546bcbb218

Change-Id: I571e583d896841c814efe58b8c0875fa9cd3873c
2019-03-15 10:50:06 -07:00