Commit Graph

2978 Commits

Author SHA1 Message Date
Chiachang Wang
bb26bd6f94 Merge "Replace InterfaceConfiguration usage with stable aidl" am: c0c71a50d6 am: 75cd8abbc7 am: 4ff4b9910f am: 50e11a6414
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1488356

Change-Id: I60b7d3c863121e4f766913c4b536795f6cc3b758
2020-11-18 10:47:38 +00:00
Chiachang Wang
c0c71a50d6 Merge "Replace InterfaceConfiguration usage with stable aidl" 2020-11-18 09:05:59 +00:00
Chiachang Wang
db04f067b0 Replace InterfaceConfiguration usage with stable aidl
Replace InterfaceConfiguration with InterfaceConfigurationParcel
for the incoming ConnectivityService mainline since mainline
modules could not use @hide API.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I17ce8741e985fd30e3c8f0c34e79564a82890dc6
2020-11-18 14:46:13 +08:00
Lucas Lin
c67d5ebb5d Merge "Fix the comments left on aosp/1481197" am: 51a4f05ef8 am: ba157d8b07 am: bae14aa611 am: dce5a4370c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1494036

Change-Id: I0758a4e38d349ffe01d8e1fd78c5b6337cdb9242
2020-11-17 10:01:41 +00:00
Lucas Lin
51a4f05ef8 Merge "Fix the comments left on aosp/1481197" 2020-11-17 07:06:46 +00:00
Dan Shi
ac6adb0744 Merge "Revert "Move BasicShellCommandHandler to frameworks/lib/modules-..."" 2020-11-12 22:46:35 +00:00
Dan Shi
f42e56f08e Revert "Move BasicShellCommandHandler to frameworks/lib/modules-..."
Revert "Update import path of BasicShellCommandHandler"

Revert "Update path for BasicShellCommandHandler"

Revert "Update path for BasicShellCommandHandler"

Revert "Update rule for BasicShellCommandHandler"

Revert submission 12975279-move_BSCH

Reason for revert: b/173120275
Reverted Changes:
Ib750f4774:Move BasicShellCommandHandler
I43c0dc327:Update import path of BasicShellCommandHandler
I73d58c07c:Update path for BasicShellCommandHandler
I21f103949:Update path for BasicShellCommandHandler
I8a2873df6:Move BasicShellCommandHandler to frameworks/lib/mo...
I91df774a3:Update rule for BasicShellCommandHandler

Exempt-From-Owner-Approval: to fix b/173120275

Change-Id: Iaa44f9aa4c1621f331275dc76ecb7505100fe9c5
2020-11-12 22:44:12 +00:00
Chiachang Wang
2628efa2db Merge "Move BasicShellCommandHandler to frameworks/lib/modules-utils" 2020-11-12 05:08:48 +00:00
Chiachang Wang
a636262ced Merge "Replace the way to add legacy routing" am: e94bf1bc3c am: 1b1c460be6 am: e7ef9769d1 am: c2a352ecef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1490244

Change-Id: Ibf3ef520e841a065225b15992fb924ada58ea828
2020-11-11 06:44:07 +00:00
Chiachang Wang
e94bf1bc3c Merge "Replace the way to add legacy routing" 2020-11-11 05:06:58 +00:00
Lucas Lin
c970b724ce Merge changes I67e5fa23,I223b207c am: 3ae04504d6 am: 3d4fd4e946 am: b2b8dc920d am: ece8c4b0ab
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1483969

Change-Id: I9d4fd09d4dbd017b416eb0e93a8ea5670076bdda
2020-11-10 18:06:23 +00:00
lucaslin
684a06de6d Fix the comments left on aosp/1481197
Bug: 172040168
Test: atest FrameworksNetTests
Test: Manual test NO_INTERNET, SIGN_IN, PARTIAL_CONNECTIVITY,
      VPN_ALWAYS_ON notifications.
Change-Id: Ibd05366481e6ddadf8b323335c2c35d40d340d0d
2020-11-10 14:54:52 +08:00
Chiachang Wang
fd3fa0a549 Replace the way to add legacy routing
ConnectivityService is going to become a mainline module which
is not able to access hidden API. Thus, replace the usage from
NMS to INetd.

Bug: 170598012
Test: atest FrameworksNetTests ConnectivityManagerLegacyTest
Change-Id: Ice1bd1effab26555917bc1766354aeaebd41ad66
2020-11-10 14:53:55 +08:00
Lucas Lin
3ae04504d6 Merge changes I67e5fa23,I223b207c
* changes:
  Use hasIpv[4|6]DefaultRoute instead of hasIPv[4|6]DefaultRoute
  Use local defined constants for notification channels
2020-11-10 05:28:33 +00:00
Chiachang Wang
5eb17941e9 Move BasicShellCommandHandler to frameworks/lib/modules-utils
BasicShellCommandHandler is used by mainline modules and the
framwork. There is a new repo that was created for putting
this kind of utility class. Move BasicShellCommandHandler for
the incoming ConnectivityService mainline and updating the
related usage.

Bug: 170598012
Test: m ; verify with adb shell cmd
Change-Id: I8a2873df6e7d8342b7a8b466bda155f74c807ee3
2020-11-10 09:54:14 +08:00
James Mattis
9797451b78 Merge "Adding multilayered requests to NetworkRequestInfo" am: f2c37de2ba am: a5bd693f29 am: bd74d7c875 am: ab87d08537
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1486199

Change-Id: I1baf71a84b92f35410cceab5a1fbd062a5134689
2020-11-06 06:40:52 +00:00
James Mattis
7835f74bac Adding multilayered requests to NetworkRequestInfo
Updating NetworkRequestInfo for "multilayered requests" functionality so that
requests can support a network hierarchy. I.e., requests network
with capability A first and if not available, request network with
capability B. This CL is the first step in adding that support by
updating the request object from a single request to a collection.

Bug: 171991028
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: I64a124802986e4cf4aa7de158c6690fdf9851cb2
2020-11-05 13:55:50 -08:00
Paul Hu
5202e6b0c3 Merge "Replace Context @hide APIs" am: f021a81854 am: 8fabfb25c3 am: fe50f2ab24 am: bbc5a2473f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458063

Change-Id: I5241814fffc4ef794c07abca748d650c720576eb
2020-11-05 09:51:13 +00:00
lucaslin
62bc2b0f24 Use hasIpv[4|6]DefaultRoute instead of hasIPv[4|6]DefaultRoute
ConnectivityService is going to be a mainline module, it can only
use formal APIs or @SystemApi. So use @SystemApi
hasIpv4DefaultRoute and hasIpv6DefaultRoute instead of
hasIPv4DefaultRoute and hasIPv6DefaultRoute.

Bug: 172183305
Test: atest FrameworksNetTests
Change-Id: I67e5fa234fbb6d0b9739ae3295eb0b0ea108f582
2020-11-04 01:29:53 +00:00
paulhu
fa229ae8a5 Replace Context @hide APIs
Connectivity service module is using some Context @hide APIs but
they are not able to call after CS becomes a mainline module.
Thus, replace them with similar System APIs.

Bug: 170593746
Test: atest FrameworksNetTests
Test: Manully check that receiving intent and starting activity
      can work normally.
Change-Id: I0f5b53ce0da4e3fc0f927896e9a9e444048401bd
2020-11-04 00:02:42 +08:00
lucaslin
3bd1f6f004 Use local defined constants for notification channels
ConnectivityService mainline module cannot call the members
inside SystemNotificationChannels.java. So use the local defined
constants instead.

Bug: 172040168
Test: atest FrameworksNetTests
Test: Manual test NO_INTERNET, SIGN_IN, PARTIAL_CONNECTIVITY,
      VPN_ALWAYS_ON notifications.
Change-Id: I223b207c4346e8239dee78e50dd2b0532a3e55b0
2020-11-02 11:53:16 +08:00
Chalard Jean
863fb9b9d9 Move module utils to the module package.
Test: FrameworksWifiTest FrameworksNetTest
Change-Id: I067eeecd458c34b7f2fbfa439072682661ac750c
2020-11-02 10:01:30 +09:00
Treehugger Robot
2e6e66df94 Merge "NetworkNotificationManager gets NotificationManager locally" am: a13966feea am: d0034c56c1 am: 0776d454a2 am: 29001506d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459882

Change-Id: Ib82fdb4eb61b7d52e0011271da81c30606dbe3c3
2020-10-30 11:54:12 +00:00
Paul Hu
e5fcad7f3b Merge "Replace NotificationManager @hide APIs" am: 39516dec37 am: 9fead7cb6e am: 91bf3e71e3 am: 6818725de8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1452435

Change-Id: Iaf9363492fb24714750314765439a4edec7d948c
2020-10-30 05:04:17 +00:00
paulhu
13cafd92b9 NetworkNotificationManager gets NotificationManager locally
It's confusing that NetworkNotificationManager uses
NotificationManager to put up notifcation which is passed from
ConnectivityService. And that NotificationManager should be
gotten from a context with UserHandle.ALL because the
notification should notify to all users. But the future developer
may not know this and pass incorrect NotificationManager
probably. Therefore, adjust the design that
NetworkNotificationManager will get NotificationManager locally.

Bug: 170593746
Test: atest FrameworksNetTests
Change-Id: Id65c998052b7b223171c5194ea46b49d7e84729d
2020-10-30 03:37:50 +00:00
Paul Hu
39516dec37 Merge "Replace NotificationManager @hide APIs" 2020-10-30 03:36:40 +00:00
Treehugger Robot
f30a0ed252 Merge "Replace hidden NMS permission control API" am: 67a478d08d am: 89f3f29524 am: a5c301c629 am: 1f8a2bda71
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473957

Change-Id: Ib53b5efe2af87f21563de0d883fce86afbdb89d7
2020-10-29 08:47:51 +00:00
Treehugger Robot
67a478d08d Merge "Replace hidden NMS permission control API" 2020-10-29 07:03:37 +00:00
Chiachang Wang
1d6fc4f622 Merge changes I6a51d803,I162fae5c am: b75c584971 am: 18013cefe3 am: 2d6e0ab8e7 am: fa1fc27d9b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473228

Change-Id: I40ff3cfcb4dbe7dc036eaa87df2fa192aee3f016
2020-10-29 06:19:52 +00:00
Chiachang Wang
671a480929 Merge "Replace hidden NMS interface to network API" am: 689399aa75 am: 667b09128d am: cf129dae9f am: 054053a6ca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473224

Change-Id: Id97da9dda9bed8c182ea2fcd92c79d94bc619d52
2020-10-29 06:19:30 +00:00
Chiachang Wang
b75c584971 Merge changes I6a51d803,I162fae5c
* changes:
  Replace hidden NMS API for setting MTU
  Replace hidden NMS default network configuration API
2020-10-29 05:03:43 +00:00
Chiachang Wang
689399aa75 Merge "Replace hidden NMS interface to network API" 2020-10-29 05:02:21 +00:00
paulhu
e7a50004d8 Replace NotificationManager @hide APIs
Connectivity service module is using some NotificationManager
@hide APIs but they are not able to call after CS become a
mainline module. Thus, replace them with similar System APIs.

Bug: 170593746
Test: atest FrameworksNetTests
Change-Id: I2644867cfc01d8d651c7029134294a9d44fdb471
2020-10-28 16:24:37 +08:00
Chiachang Wang
9695da3ba0 Replace hidden NMS permission control API
Replace the hidden setNetworkPermission NMS APIs with accessing
INetd directly for the incoming ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Change-Id: I37ed1003355677b98cbb741f774ba0fa4d193572
2020-10-28 14:38:18 +08:00
Chiachang Wang
fd47831a5c Replace hidden NMS API for setting MTU
Replace the hidden NMS setMtu API with calling INetd directly
for incoming ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Test: manually connect and disconnect network
Change-Id: I6a51d8033b3354824d4cfb953c2bbe3055d00102
2020-10-28 14:38:18 +08:00
Chiachang Wang
a93ddb250b Replace hidden NMS interface to network API
Replace the hidden NMS addInterfaceToNetwork and
removeInterfaceFromNetwork with calling INetd directly for
incoming ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Test: manually connect and disconnect network
Change-Id: I0f1f866be2f8084b992b340aeabfb5d62420686b
2020-10-28 14:38:18 +08:00
Chiachang Wang
c1fe7a0a37 Replace hidden NMS default network configuration API
Replace the hidden setDefaultNetId and clearDefaultNetId NMS
APIs with accessing INetd directly for the incoming
ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Test: manually connect and disconnect wifi
Change-Id: I162fae5ca444207a037e5ac4bf8fa0a77a648ca1
2020-10-28 14:38:18 +08:00
Paul Hu
d98cddc3d0 Merge "Replace PendingIntent @hide APIs" am: 3b32517990 am: 97adf1f334 am: 1847f9be9a am: d8bb35fdf5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456121

Change-Id: I6f3a1e221d9ce57947ff14c3f5b17a50e0e5d40f
2020-10-26 09:38:28 +00:00
Paul Hu
3b32517990 Merge "Replace PendingIntent @hide APIs" 2020-10-26 07:32:56 +00:00
Treehugger Robot
51d380586c Merge "Add a mutability flag to the PendingIntent" am: 315a097740 am: 0cfb318d10 am: fd2447df82 am: 9b136ebaa0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456120

Change-Id: I1e0adcc9affae154318f2e92a75ce190c97d3b10
2020-10-23 11:24:41 +00:00
Treehugger Robot
315a097740 Merge "Add a mutability flag to the PendingIntent" 2020-10-23 09:49:27 +00:00
Lucas Lin
752bba2382 Merge "Using Context#getSystemService instead of ServiceManager#checkService" am: d769b3863e am: bb6fc081c2 am: 884546597e am: c93771dde5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1463902

Change-Id: If50e3be30fa1ba34c945736ed9a8a83fbe122b48
2020-10-23 05:01:48 +00:00
lucaslin
f0d393d530 Using Context#getSystemService instead of ServiceManager#checkService
ConnectivityService is going to be a mainline module, it can only
use formal APIs or @SystemApi. So use public API -
Context#getSystemService() instead of hidden API -
ServiceManager#checkService().

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I9824caa7aec57e70f0ba405fcce39f9bc068732d
2020-10-23 03:07:07 +00:00
Chiachang Wang
4dae969c59 Merge "Do not use hidden SystemProperties.set" am: 93961f7b21 am: d7146b6742 am: b2d82398a6 am: 84ea88acb2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460971

Change-Id: Ie125f2d0d5605180189fa1dfbef70286ad79c23e
2020-10-21 08:31:09 +00:00
Chiachang Wang
93961f7b21 Merge "Do not use hidden SystemProperties.set" 2020-10-21 07:00:56 +00:00
Chiachang Wang
a6d08e9723 Merge "Remove unused MockableSystemProperties from DnsManager constructor" am: 3e23d7271b am: 250a9d3d20 am: 672ee3eef5 am: 67fcddf4f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466231

Change-Id: Id0b0b33e8156831222968ca68f289d206787d635
2020-10-20 21:22:27 +00:00
Chiachang Wang
c43d68f0d0 Do not use hidden SystemProperties.set
ConnectivityService is going to become a mainline module, and
it will not able to use hidden method anymore. Thus, use
alternative new sysprop as API to control the tcp init rwnd
value.

Bug: 170917042
Test: adb shell getprop net.tcp_def_init_rwnd and check if
      value is set correctly
Test: atest FrameworksNetTests
Change-Id: If9e99c88de50b6829721b0dfacc430a3b53c7728
2020-10-20 19:35:01 +08:00
Chiachang Wang
6710686910 Remove unused MockableSystemProperties from DnsManager constructor
DnsManager does not use MockableSystemProperties to communicate
with netd to configure the dns server anymore. ConnectivityService
does not need to take it into DnsManager as a parameter. Thus,
clean up the unused code.

Bug: 33308258
Test: atest FrameworksNetTests
Change-Id: I2ac89944391f7d1fd5d67f26cf7f2b11a4a4cf84
2020-10-20 15:46:30 +08:00
Aaron Huang
4a19a57729 Merge "Create service-connectivity.jar" 2020-10-20 06:09:41 +00:00
Bernie Innocenti
26b8ea83f0 Merge "Stop setting the legacy net.dnsX system properties" am: 61da71aa03 am: ab60aa4add am: 5e29d0c679 am: d8422c8eb4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1229561

Change-Id: I78ef627fdf0312cf84de53aa8da5f0bca466a6f3
2020-10-16 15:23:18 +00:00