Commit Graph

7795 Commits

Author SHA1 Message Date
Chalard Jean
ca7e22fea5 Merge "Cut the dependency to APN constants" am: f1df59afe3 am: ca757d6635
am: 832da6e8c4

Change-Id: I71f8a944fcb8b3d8199296aef67251b50abe6172
2019-11-21 05:00:52 -08:00
Chalard Jean
832da6e8c4 Merge "Cut the dependency to APN constants" am: f1df59afe3
am: ca757d6635

Change-Id: I97f01b82916e66673339bef437d80927e78282ee
2019-11-21 04:52:31 -08:00
Chalard Jean
ca757d6635 Merge "Cut the dependency to APN constants"
am: f1df59afe3

Change-Id: I140f294e0b044c66b925ae5c8ae6f2859c694753
2019-11-21 04:45:07 -08:00
Chalard Jean
f1df59afe3 Merge "Cut the dependency to APN constants" 2019-11-21 12:37:33 +00:00
Chalard Jean
7eb4a341be Merge changes I52f70756,Icc621f0a am: 3701fcd817 am: 41e584fa48
am: f9cc6e88e6

Change-Id: I7cfd5d6ba67a61ade33cb036250f598811a05b06
2019-11-21 01:03:56 -08:00
Chalard Jean
f9cc6e88e6 Merge changes I52f70756,Icc621f0a am: 3701fcd817
am: 41e584fa48

Change-Id: I1549ecd1361ee299073127e64108313872ed51b4
2019-11-21 00:56:08 -08:00
Chalard Jean
41e584fa48 Merge changes I52f70756,Icc621f0a
am: 3701fcd817

Change-Id: Idd877fbaaec711e379e3387efb5810e14508f2a1
2019-11-21 00:48:38 -08:00
Chalard Jean
3701fcd817 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
Chalard Jean
afaed1a5e0 Cut the dependency to APN constants
With Telephony moving to Mainline these constants are not accessible
any more, and should not be made public. As they are only used by
a deprecated method that can only be called by apps with a target
SDK < M and only for one of the features it used to handle, copying
the constants until this method is completely removed is the simplest
way to go.

Test: FrameworksNetTests
Bug: 144454341
Change-Id: Iea18c8d2f2c8a40f04db9383d3f74b917267ba25
2019-11-21 14:48:00 +09:00
Meng Wang
0f7c764ef0 Merge "Use TelephonyManager instead of ITelephony Binder" am: 138728da9a am: 565782e413
am: 1e9a9a3d4f

Change-Id: I52c56a08092297b45b57f37f258f38ef5d93b393
2019-11-20 20:59:54 -08:00
Meng Wang
1e9a9a3d4f Merge "Use TelephonyManager instead of ITelephony Binder" am: 138728da9a
am: 565782e413

Change-Id: Iba67484246e81361ed540592558371cd7f2352c6
2019-11-20 20:51:54 -08:00
Meng Wang
565782e413 Merge "Use TelephonyManager instead of ITelephony Binder"
am: 138728da9a

Change-Id: I6172adeb2489abede44555b17340a6e58e23fafe
2019-11-20 20:44:19 -08:00
Meng Wang
138728da9a Merge "Use TelephonyManager instead of ITelephony Binder" 2019-11-21 04:36:10 +00:00
Chalard Jean
dc5ea899c8 Merge changes I493b969c,I7b759425,I60fe318a,Ie4ae6a97,I2379e47b, ... am: e2427502f1 am: 3bac6b4b1c
am: 5dcb5ee7a0

Change-Id: Ia1b3c12a96df2774bc780e58d1c6748e1f61e180
2019-11-20 20:28:29 -08:00
Chalard Jean
5dcb5ee7a0 Merge changes I493b969c,I7b759425,I60fe318a,Ie4ae6a97,I2379e47b, ... am: e2427502f1
am: 3bac6b4b1c

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

Change-Id: Ic5b59cb5e23feaf7aac0075f16afa3da94d3628c
2019-11-20 20:08:51 -08:00
Meng Wang
ed6f441315 Use TelephonyManager instead of ITelephony Binder
Bug: 140908357
Test: make
Change-Id: If3be915329cc27c560af3fd71a903984a626aca8
2019-11-20 10:05:33 -08:00
Chalard Jean
798cb4d8b9 Merge "Rename waitForConnectivityBroadcast" am: eb6a236187 am: 0f6c70e0f8
am: 6307e13292

Change-Id: I9c3197407c99bb209700364686ee64d6ccb07a06
2019-11-20 06:21:12 -08:00
Chalard Jean
6307e13292 Merge "Rename waitForConnectivityBroadcast" am: eb6a236187
am: 0f6c70e0f8

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

Change-Id: I10ecb001c2654de1636e639ac52c719f03e007a4
2019-11-20 06:04:45 -08:00
Chalard Jean
f728b7c91b [NS A08] Tiny refactoring
Test: ConnectivityServiceTest
Change-Id: I52f70756003cef61b450e9c1e9e57dc70f3091d5
2019-11-20 20:32:57 +09:00
Chalard Jean
ed295c52b2 [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
d56c485af9 [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
1c75c2309a [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
a97b9c8fec [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
ef365c70c9 [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
8ab4698397 Merge "Add tests for the legacy broadcast" am: 48127ba387 am: 48c6b7f68c
am: dc7feb216c

Change-Id: Ifc56e73f7eeaa22d8f16fcd50083f0b0fa37dc95
2019-11-19 19:43:42 -08:00
Chalard Jean
dc7feb216c Merge "Add tests for the legacy broadcast" am: 48127ba387
am: 48c6b7f68c

Change-Id: I1d4365b5f092d2f1fed3117e40d64a26244b940a
2019-11-19 15:41:06 -08:00
Chalard Jean
48c6b7f68c Merge "Add tests for the legacy broadcast"
am: 48127ba387

Change-Id: I9fa07add080b3336cbf539d406220c9906e0adfe
2019-11-19 15:28:06 -08:00
Artur Satayev
e100a72cbc Merge "Add @UnsupportedAppUsage annotations for greylist." 2019-11-19 15:05:51 +00:00
Artur Satayev
32958fcc98 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.

This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.

Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
2019-11-19 15:05:35 +00:00
Chalard Jean
7c10ed5e9b 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
dd8adb9866 [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
2c8b3e302f [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
48127ba387 Merge "Add tests for the legacy broadcast" 2019-11-19 13:32:17 +00:00
Chalard Jean
4aa9d9d859 Add tests for the legacy broadcast
Test: this
Change-Id: I0777bf443f65d894eaab9b800db40c1caf6520fe
2019-11-19 21:08:44 +09:00
Roshan Pius
615462b9f2 Merge "StaticIpConfiguration: Couple of minor fixes" am: 90a81fedc5 am: a215878d38
am: 7aa5f04e7f

Change-Id: I66a1e125c1ecfa456ae7e83153dfc02eb7d7d3b0
2019-11-18 07:17:43 -08:00
Roshan Pius
7aa5f04e7f Merge "StaticIpConfiguration: Couple of minor fixes" am: 90a81fedc5
am: a215878d38

Change-Id: Ic40a6d4221cdb39e40b895efbe313160b7ab0846
2019-11-18 07:14:08 -08:00
Roshan Pius
a215878d38 Merge "StaticIpConfiguration: Couple of minor fixes"
am: 90a81fedc5

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

Change-Id: Ief1f090f3664d583565f291c89357bfbac58fe17
2019-11-18 01:09:40 -08:00
Jayachandran Chinnakkannu
0049091605 Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 73e22ad21d
am: 01586c399e

Change-Id: I7613a654dd726bcf5428a5a07ad4369f616bbcfa
2019-11-18 01:05:02 -08:00
Jayachandran Chinnakkannu
01586c399e 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
2092850198 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
32b898bb6d 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
9abd130eeb [automerger skipped] Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." am: a98026f7aa am: f11566d236
am: e74f099313 -s ours
am skip reason: change_id Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6 with SHA1 fa065b1fc8 is in history

Change-Id: I1e9b0579e65071e042c4595083427bcc7889c15e
2019-11-13 14:05:06 -08:00
Artur Satayev
e74f099313 Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." am: a98026f7aa
am: f11566d236

Change-Id: Ic691d764839ecf34daa8b53aa92497e013c9a2a7
2019-11-13 10:40:54 -08:00
Artur Satayev
f11566d236 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
96639a6e4e 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
Artur Satayev
fa065b1fc8 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 12:58:29 +00:00