Commit Graph

7481 Commits

Author SHA1 Message Date
Chalard Jean
49e7dcb844 Merge changes I52f70756,Icc621f0a am: 2513c4cd2b
am: 7422e8d4fa

Change-Id: I1549ecd1361ee299073127e64108313872ed51b4
2019-11-21 00:56:08 -08:00
Chalard Jean
7422e8d4fa Merge changes I52f70756,Icc621f0a
am: 2513c4cd2b

Change-Id: Idd877fbaaec711e379e3387efb5810e14508f2a1
2019-11-21 00:48:38 -08:00
Chalard Jean
2513c4cd2b Merge changes I52f70756,Icc621f0a
* changes:
  [NS A08] Tiny refactoring
  [NS A07] Move the last side effects out of the decision loop.
2019-11-21 08:32:35 +00:00
Meng Wang
21f23c28dc Merge "Use TelephonyManager instead of ITelephony Binder" am: 33046223a2
am: eb1e692b65

Change-Id: Iba67484246e81361ed540592558371cd7f2352c6
2019-11-20 20:51:54 -08:00
Meng Wang
eb1e692b65 Merge "Use TelephonyManager instead of ITelephony Binder"
am: 33046223a2

Change-Id: I6172adeb2489abede44555b17340a6e58e23fafe
2019-11-20 20:44:19 -08:00
Meng Wang
33046223a2 Merge "Use TelephonyManager instead of ITelephony Binder" 2019-11-21 04:36:10 +00:00
Chalard Jean
f599a82e31 Merge changes I493b969c,I7b759425,I60fe318a,Ie4ae6a97,I2379e47b, ... am: e2427502f1
am: 1a9849efbc

Change-Id: I11a181c4e378a41718843489a1ca286ddad2755d
2019-11-20 20:16:46 -08:00
Chalard Jean
1a9849efbc Merge changes I493b969c,I7b759425,I60fe318a,Ie4ae6a97,I2379e47b, ...
am: e2427502f1

Change-Id: Ic5b59cb5e23feaf7aac0075f16afa3da94d3628c
2019-11-20 20:08:51 -08:00
Meng Wang
91311c0033 Use TelephonyManager instead of ITelephony Binder
Bug: 140908357
Test: make
Change-Id: If3be915329cc27c560af3fd71a903984a626aca8
2019-11-20 10:05:33 -08:00
Chalard Jean
c16dd33261 Merge "Rename waitForConnectivityBroadcast" am: eb6a236187
am: 4073f980bf

Change-Id: If7012f1f602a7290283d38dd61f309dc303a1c1b
2019-11-20 06:12:16 -08:00
Chalard Jean
4073f980bf Merge "Rename waitForConnectivityBroadcast"
am: eb6a236187

Change-Id: I10ecb001c2654de1636e639ac52c719f03e007a4
2019-11-20 06:04:45 -08:00
Chalard Jean
3a990e150b [NS A08] Tiny refactoring
Test: ConnectivityServiceTest
Change-Id: I52f70756003cef61b450e9c1e9e57dc70f3091d5
2019-11-20 20:32:57 +09:00
Chalard Jean
f791454420 [NS A06] Move more side effects out of the decision loop
This is a no-op.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I493b969c278097a289a1ef689ca268606227ae79
2019-11-20 20:32:57 +09:00
Chalard Jean
962d7fa543 [NS A07] Move the last side effects out of the decision loop.
This is a no-op. Reviewers : please scrutinize this for behavior
changes.

Test: ConnectivityServiceTest
Change-Id: Icc621f0a64a72dae0192843e6b6587ec4e31ea4d
2019-11-20 20:32:57 +09:00
Chalard Jean
b1d1cb83fe [NS A05] Move some side effects out of the network decision loop
This moves the side effects done by the decision loop when a
network stops satisfying a request to outside the decision loop.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I7b7594250d5c04362c699e065d30a1181effed09
2019-11-20 20:32:57 +09:00
Chalard Jean
9fe3ecafc4 [NS A04] Store changes in rematchNetworkAndRequests in a map
This is a preliminary change to move the code that chooses what
network gets assigned to what request out of ConnectivityService.

By storing the list of changes first, it becomes possible to move
the changes with side-effects to a later part of the code, after
the decisions have been made. This move is implemented in a later
change.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I60fe318a8eabf13d1c07b144367ca92cf07e734e
2019-11-20 20:32:56 +09:00
Chalard Jean
2883eaffb4 [NS A03] Remove mNetworkForRequestId
The goal of doing this is to remove the locks. Locking imposes
an ordering that is parallel to the program sequence ; often
it is what is needed, but the refactoring in progress needs to
change the traversal order of the requests without having
observable side-effects (or at least, very controlled ones).
The order is difficult enough to maintain when there is
only one. In this case, it is easy to remove the locks, and it
will simplify vastly the complexity of the refactoring by
removing the parallel ordering that would have to be maintained.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: Ie4ae6a97053559e6cbac8230f2db3d35000b35a9
2019-11-20 20:32:45 +09:00
Chalard Jean
d7e3abc2e7 Merge "Add tests for the legacy broadcast" am: 840102cf8d
am: d0d5ff5d7c

Change-Id: I1d4365b5f092d2f1fed3117e40d64a26244b940a
2019-11-19 15:41:06 -08:00
Chalard Jean
d0d5ff5d7c Merge "Add tests for the legacy broadcast"
am: 840102cf8d

Change-Id: I9fa07add080b3336cbf539d406220c9906e0adfe
2019-11-19 15:28:06 -08:00
Chalard Jean
ba1a47dd75 Rename waitForConnectivityBroadcast
This doesn't wait, so it was ill-named.
Test: ConnectivityServiceTest

Change-Id: I15e5083f961e415b1d2d870e49c177fc84f0312c
2019-11-19 22:41:09 +09:00
Chalard Jean
e8cf3bf724 [NS A02] Move the contents of mNetworkForRequestId to NRIs
The member will be removed in a subsequent change

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I2379e47b1a97fb939b8558c01547d3d704f0f628
2019-11-19 22:41:09 +09:00
Chalard Jean
4deee63037 [NS A01] Add checks for the handler thread
This is a preliminary step to removing mNetworkForRequestId, whose
role could be better managed by storing the network inside the NRI.
This serves two purposes :
1. It is a sanity check. Those functions should never be called out
of the handler thread, and if they are it's a bug.
2. It will serve to prove the followup changes are correct.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: If29066839ad640121d33f231abdd4f37d0ad3fd5
2019-11-19 22:41:09 +09:00
Chalard Jean
840102cf8d Merge "Add tests for the legacy broadcast" 2019-11-19 13:32:17 +00:00
Chalard Jean
53f3e0c141 Add tests for the legacy broadcast
Test: this
Change-Id: I0777bf443f65d894eaab9b800db40c1caf6520fe
2019-11-19 21:08:44 +09:00
Roshan Pius
45fe413537 Merge "StaticIpConfiguration: Couple of minor fixes" am: bf78f3fcc0
am: 3c28bfe9d4

Change-Id: Ic40a6d4221cdb39e40b895efbe313160b7ab0846
2019-11-18 07:14:08 -08:00
Roshan Pius
3c28bfe9d4 Merge "StaticIpConfiguration: Couple of minor fixes"
am: bf78f3fcc0

Change-Id: I29469c22d25fd812590f7adca23ef83337580b2b
2019-11-18 07:10:41 -08:00
Roshan Pius
bf78f3fcc0 Merge "StaticIpConfiguration: Couple of minor fixes" 2019-11-18 15:05:31 +00:00
Jayachandran Chinnakkannu
f1b55ba4af Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 73e22ad21d
am: c9c264b861

Change-Id: I7613a654dd726bcf5428a5a07ad4369f616bbcfa
2019-11-18 01:05:02 -08:00
Jayachandran Chinnakkannu
c9c264b861 Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs"
am: 73e22ad21d

Change-Id: I555617ff893acf4c53e6a73d6591b6aaebf3ce50
2019-11-17 22:30:01 -08:00
Jayachandran C
4022aa3829 Remove usage of Telephonymanager getDefault() and from() hidden APIs
This CL replaces with getSystemService(TelephonyManager.class)

Bug: 140768340
Test: atest frameworks/base/tests/net
Change-Id: I0f14cc5440fa85c81ab90f3199e9e91c1b00f5e1
2019-11-15 19:26:33 -08:00
Roshan Pius
d4ec409242 StaticIpConfiguration: Couple of minor fixes
a) Ensure the Builder.build() does not crash if setDnsServers() is not
invoked.
b) Add a checkNotNull on setDnsServers() since it is marked @NonNull.

Bug: 144487020
Test: Compiles
Change-Id: I2b9f990efa0583c0f067c25e23d8c944ffbdf6a5
(cherry-picked from d0348339c50eeae0fe137c62476f6a01542f4163)
2019-11-14 18:13:26 -08:00
Artur Satayev
f92ac004da Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." am: a98026f7aa
am: a10dd26c25

Change-Id: Ic691d764839ecf34daa8b53aa92497e013c9a2a7
2019-11-13 10:40:54 -08:00
Artur Satayev
a10dd26c25 Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps."
am: a98026f7aa

Change-Id: Ia39fbc2200aa7262e4a05b0710b7a382bb01b276
2019-11-13 10:33:06 -08:00
Artur Satayev
4bac8c7057 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 15:05:56 +00:00
Remi NGUYEN VAN
81dc489a66 Merge "Add permissions to NetIntegrationTests manifest" am: 541077b76a
am: 4a0d8ff37e

Change-Id: If487d15f3666af5460d886cfce78d87b6343e443
2019-11-11 21:48:51 -08:00
Remi NGUYEN VAN
4a0d8ff37e Merge "Add permissions to NetIntegrationTests manifest"
am: 541077b76a

Change-Id: Ieb22f6fa83bcc1e5c867a188f3a342980fce3203
2019-11-11 21:44:07 -08:00
Remi NGUYEN VAN
541077b76a Merge "Add permissions to NetIntegrationTests manifest" 2019-11-12 05:31:19 +00:00
Artur Satayev
d75627ab98 Merge "Add @UnsupportedAppUsage annotations for greylist." am: 350393e373
am: 9ee152ef44

Change-Id: I48075ef4296e0b55c0055f7364c5129bbd60e9ed
2019-11-11 09:33:13 -08:00
Artur Satayev
9ee152ef44 Merge "Add @UnsupportedAppUsage annotations for greylist."
am: 350393e373

Change-Id: I5387b4742fdaf67ad3189356f2361f73969b53a8
2019-11-11 09:13:24 -08:00
Treehugger Robot
350393e373 Merge "Add @UnsupportedAppUsage annotations for greylist." 2019-11-11 14:27:47 +00:00
Artur Satayev
6fd98374aa Merge "Add @UnsupportedAppUsage annotations for max-p." am: addbe293c8
am: f0d39b343d

Change-Id: Iff80c388dec2c6f8184b739be6fb38b8ec8a1a49
2019-11-08 09:49:03 -08:00
Artur Satayev
f0d39b343d Merge "Add @UnsupportedAppUsage annotations for max-p."
am: addbe293c8

Change-Id: I2f249063c274b54a58a24cda23f1d5a60fa14540
2019-11-08 09:38:12 -08:00
Treehugger Robot
addbe293c8 Merge "Add @UnsupportedAppUsage annotations for max-p." 2019-11-08 17:26:36 +00:00
Artur Satayev
198d650573 Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00
Artur Satayev
28a9741626 Add @UnsupportedAppUsage annotations for max-p.
See go/UnsupportedAppUsage for more details.

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m
Change-Id: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
Merged-In: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
2019-11-08 16:17:13 +00:00
Lucas Lin
15731e9d75 Merge "[NS01] Create NetworkScore" am: 0dba9c87f1
am: 6ee212b303

Change-Id: I0ba5523bf80f949a148e53774a367de325853747
2019-11-07 16:59:11 -08:00
Lucas Lin
6ee212b303 Merge "[NS01] Create NetworkScore"
am: 0dba9c87f1

Change-Id: I63a76689ef468b55ad1d43db19655e8d822d0122
2019-11-07 16:53:15 -08:00
Lucas Lin
0dba9c87f1 Merge "[NS01] Create NetworkScore" 2019-11-08 00:47:22 +00:00
lucaslin
fe4c578d6e [NS01] Create NetworkScore
It's the first patch for refounding network selection. The new
network selection will try to compare the networks by more
factors, and will try to choose the best network after doing
the evaluation of trade-off.
Create the object that will serve to represent network quality
for more comprehensive ranking.

Bug: 143676287
Test: 1. Build pass.
      2. atest FrameworksNetTests

Change-Id: I4b6071d14365aa84d06be9802516fedf527e70f7
2019-11-07 16:47:56 +08:00
Xin Li
babe4048d3 Merge "DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master" into stage-aosp-master
am: d13ac68c9a

Change-Id: I3a1d6dd3aefe1720f7b77174287357446626d1dd
2019-10-31 14:33:39 -07:00