Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
Merge "Run callbacks on ConnectivityService thread"
am: 08e1dae42f

Change-Id: I7a8d035ec7453c5351eb2646c631c19964cb0f88

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-08-30 03:36:26 -07:00
904ee8f635
Run callbacks on ConnectivityService thread
Run MultinetworkPolicyTracker and DataConnectionStats callbacks on the
ConnectivityService handler thread.

Previously the callbacks would be using the SystemServer foreground
thread (Looper.myLooper()), or the broadcast thread for the
MultinetworkPolicyTracker BroadcastReceiver. This is error-prone, can
cause threading issues and makes it difficult to test the components.

Test: atest FrameworksNetTests
Change-Id: I189213dd363004abed294659165bf5430d153bba

Remi NGUYEN VAN   commited 2019-08-28 10:10:04 +09:00
96521fb87d
Merge "avoid generating reserved local MACs"
am: 464e1b5e6f

Change-Id: Ia6d0eb0c5e8101d9c4b4bc63de79157f7d1c2284

Oscar Shu   authored and   android-build-merger   commited 2019-08-23 02:24:15 -07:00
6fcb2696cd
Merge "avoid generating reserved local MACs"
Oscar Shu   authored and   Gerrit Code Review   commited 2019-08-21 17:45:00 +00:00
464e1b5e6f
avoid generating reserved local MACs
Avoid generating WifiInfo.DEFAULT_MAC_ADDRESS as a randomized MAC
address since it's being used for another purpose.

Bug: 137796328
Test: atest MacAddressTest
Change-Id: Ia7beef0d0af5d7b39845e662cd343d81aef97702

xshu   commited 2019-08-16 10:20:22 -07:00
8438a85683
Merge "Get resource based on subId for multi-SIM"
am: 55752cf8d4

Change-Id: I020c2546fa4432d05cf27b20fdb1943508aac671

Chiachang Wang   authored and   android-build-merger   commited 2019-08-14 04:30:57 -07:00
85ff8a6902
Get resource based on subId for multi-SIM
The resource loading is done based on the last SIM to come up
which is not a deterministic design. Thus, update the way to get
the resource based on the subId.

Test: atest FrameworksNetTests
Test: manually test with avoid bad wifi feature supported sim
Bug: 138956509
Change-Id: Ib5b085d97103889600773d269e03b939c29ca47d

Chiachang Wang   commited 2019-08-14 13:56:37 +08:00
5fed8d9ee3
Return NonNull and other imports
Change-Id: Ia38b13209b45d8228ac02f06663e4dc12be9de60

Fedor Kudasov   commited 2019-07-09 14:19:04 +00:00
26f1ab857b
Merge changes from topic "fix_master_build"
am: 2e5319117a

Change-Id: If49999e7ce6149e847a678b03ccf8b4549f8365b

Fedor Kudasov   authored and   android-build-merger   commited 2019-07-09 06:10:01 -07:00
da2257cea2
Revert "Cherry-pick the relevant parts of master change"
This reverts commit 5a4844e307.

Reason for revert: multiple build breakages b/137069068

Change-Id: If48bfa2d2cab0877a053743b3ec53820d0c4ed6b

Fedor Kudasov   authored and   Chalard Jean   commited 2019-07-09 09:29:17 +00:00
2559cb3953
Revert "Remove providesRoutesToMostDestinations."
This reverts commit 92bd90fa0b.

Reason for revert: multiple build breakages b/137069068

Change-Id: I60a4f71e13fe82f970b177a07c0b58439cbc64ff

Fedor Kudasov   commited 2019-07-09 09:23:25 +00:00
496a313f47
Merge changes Ia43f8811,I7de4f672
am: 3ef04b8e3c

Change-Id: Ifcacd81d343a29b17fdb79f4c8b54c89a293a2b8

Chalard Jean   authored and   android-build-merger   commited 2019-07-09 00:56:57 -07:00
4896785b0b
Remove providesRoutesToMostDestinations.
This function is not used any more.

Test: FrameworksNetTests
Change-Id: Ia43f8811cb9d575e16735b0f4b76d91e7cd42ebc

Chalard Jean   commited 2019-07-08 20:36:33 +09:00
92bd90fa0b
Cherry-pick the relevant parts of master change
I566437e4fe10e1346858149120c50b3c20ca073f to avoid a conflict

Test: atest FrameworksNetTests
Change-Id: I7de4f67234bf97d58bddffa22272c7670398f56d

Chalard Jean   commited 2019-07-08 20:25:45 +09:00
5a4844e307
Merge "Unit tests for new explicitlySelected behaviour." am: d1379a4a80
am: 10c1a704c0

Change-Id: Id77a5d6a58e7ab4fdaa0b7c15b824270863b83fd

Lorenzo Colitti   authored and   android-build-merger   commited 2019-06-29 02:01:55 -07:00
c3bb7285f4
Unit tests for new explicitlySelected behaviour.
ag/7905088 added the ability to pass in acceptUnvalidated without
passing in explicitlySelected. Add unit tests for that code.

While I'm at it, convert a couple of "== 1"s to toBool(), and
update the comments in NetworkAgent.

Bug: 130766237
Test: atest FrameworksNetTests
Change-Id: I6b550bd621e3596975f83464c7b4b8a14269120b

Lorenzo Colitti   commited 2019-06-28 23:57:22 +09:00
f255e047b7
Merge "Move the test of minimum supported keepalive slots to CTS" am: c961e03526
am: 6ff00fee75

Change-Id: Ib9b06d3458782a648a2f5b8fd5a9ca1d34bd11f9

Junyu Lai   authored and   android-build-merger   commited 2019-06-19 07:29:11 -07:00
59cc58b295
Merge "Correct value of supported keepalive count for cellular" am: 7423873ac8
am: 056eeae27c

Change-Id: If833b813ba00eeff913160598f1ea9c74e6e35d8

Junyu Lai   authored and   android-build-merger   commited 2019-06-19 07:28:53 -07:00
bafc7c9b8f
Merge "Move the test of minimum supported keepalive slots to CTS"
Junyu Lai   authored and   Gerrit Code Review   commited 2019-06-19 14:08:31 +00:00
c961e03526
Merge "Correct value of supported keepalive count for cellular"
Junyu Lai   authored and   Gerrit Code Review   commited 2019-06-19 14:08:31 +00:00
7423873ac8
Move the test of minimum supported keepalive slots to CTS
This change also enables log when keepalive is started.

Bug: 134352656
Test: 1. atest android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimitTelephony
      2. atest FrameworksNetTests
Change-Id: I408750fa0bceb0c1c26afb5fead4e44fb824fbc1

junyulai   commited 2019-06-19 16:25:19 +08:00
5b3b486b8f
Merge "Remove the <= P restriction for WIFI_P2P" am: 43a52d0aaa
am: bb754c9c8d

Change-Id: I14f5865249740587d550ac31b59883f4a87fd4a1

Chalard Jean   authored and   android-build-merger   commited 2019-06-17 08:20:18 -07:00
649a5747ef
Remove the <= P restriction for WIFI_P2P
This is still sent in an intent.

Bug: 975059
Change-Id: I56c86b0c1912064d5a642991df32d2cefb6a8d5b

Chalard Jean   commited 2019-06-17 19:46:34 +09:00
a070aaa88f
Merge "Fix race condition caused by fd reused for DnsResolver" am: 7c98ae7d01
am: f8a2c15ca1

Change-Id: I93e0d4a8664a16f2814763346ff00e6c874efd02

Luke Huang   authored and   android-build-merger   commited 2019-06-11 08:52:18 -07:00
bab0336604
Correct value of supported keepalive count for cellular
Cellular only supports 1 keepalive connection so correct the default
supported value to 1.

Bug: 134037217
Test: - atest FrameworksNetTests
      - atest android.net.cts.ConnectivityManagerTest \
        #testSocketKeepaliveLimitTelephony

Change-Id: Ia3761f2e78d54866bb2e156d58004396bbc8adc3

Aaron Huang   commited 2019-06-11 22:04:34 +08:00
ede0d5075b
Fix race condition caused by fd reused for DnsResolver
There might be a gap between fd close and fd event listener unregister.
If fd is reused for another query during that gap, it might cause the
query failed with no response since addOnFileDescriptorEventListener
method failed. To fix this problem, we must ensure that fd event
listener is unregistered before fd closing.

Bug: 134310704
Test: atest DnsResolverTest
Change-Id: Ifb6bd34dc54dcf1c61fe8b87785124df4bc0f410

Luke Huang   commited 2019-06-11 15:18:28 +08:00
6c8b770a98
Merge "Allow passing in acceptUnvalidated without explicitlySelected"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2019-06-05 05:00:14 +00:00
c8b4342998
Allow passing in acceptUnvalidated without explicitlySelected
This will allow wifi to tell ConnectivityService that partial
connectivity is acceptable even if the network is not explicitly
selected.

This is needed when the user selects a partial connectivity
network and tells the system to connect to the network, and never
to ask again. In such cases, the system must switch to the
network even if it is not explicitly selected.

Bug: 130766237
Test: atest FrameworksNetTests
Test: unit tests in an upcoming CL
Change-Id: I13465090b7b1c0bf5dc83362387a5428d77b7e1d
Merged-In: I13465090b7b1c0bf5dc83362387a5428d77b7e1d
(cherry picked from commit e01696a4c4)

Lorenzo Colitti   commited 2019-06-05 11:12:18 +09:00
b882c54945
Merge "Allow passing in acceptUnvalidated without explicitlySelected" into qt-dev
am: 56b7edcae2

Change-Id: Ifd9dbc9c83e426e66417247cbf1fa594193e000f

Lorenzo Colitti   authored and   android-build-merger   commited 2019-06-04 18:29:51 -07:00
b643b2ba9c
Merge "Allow passing in acceptUnvalidated without explicitlySelected" into qt-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2019-06-04 18:00:31 +00:00
56b7edcae2
Merge "Fix cannot create Nat-T keepalive on mobile data" into qt-dev
am: eabafd5ceb

Change-Id: I580b4dd2e493430e8420ca0907f9cf7d1d5a8773

junyulai   authored and   android-build-merger   commited 2019-06-04 08:48:21 -07:00
2f233cc104
Allow passing in acceptUnvalidated without explicitlySelected
This will allow wifi to tell ConnectivityService that partial
connectivity is acceptable even if the network is not explicitly
selected.

This is needed when the user selects a partial connectivity
network and tells the system to connect to the network, and never
to ask again. In such cases, the system must switch to the
network even if it is not explicitly selected.

Bug: 130766237
Test: atest FrameworksNetTests
Test: unit tests in an upcoming CL
Change-Id: I13465090b7b1c0bf5dc83362387a5428d77b7e1d

Lorenzo Colitti   commited 2019-06-04 14:35:22 +00:00
e01696a4c4
Fix cannot create Nat-T keepalive on mobile data
Currently phone process fail to unparcel NattKeepalivePacketData
since it is not in framework. Moves NattKeepalivePacketData to
framework to make it can be utilized by telephony.

This change also removes the error feedback triggered by calling
add keepalive packet filter to an unsupported network agent. This
is misinterpreted by KeepaliveTracker that start keepalive is
failing.

Bug: 134048171
Test: 1. atest android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimitTelephony
      2. atest android.net.cts.ConnectivityManagerTest
      3. atest FrameworksNetTests
      4. atest FrameworksTelephonyTests

Merged-In: If630d5b339aa722717258c721daa8ead8c431e2d
Change-Id: Ic0f168be6f5a6263a5e0565b6381dcb5c645660f
(cherry picked from commit 9ede677bb2c081ccdc41c8c3c19c949114bcc138)

junyulai   commited 2019-06-04 20:44:29 +08:00
97e3775df4
Fix cannot create Nat-T keepalive on mobile data
Currently phone process fail to unparcel NattKeepalivePacketData
since it is not in framework. Moves NattKeepalivePacketData to
framework to make it can be utilized by telephony.

This change also removes the error feedback triggered by calling
add keepalive packet filter to an unsupported network agent. This
is misinterpreted by KeepaliveTracker that start keepalive is
failing.

Bug: 134048171
Test: 1. atest android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimitTelephony
      2. atest android.net.cts.ConnectivityManagerTest
      3. atest FrameworksNetTests
      4. atest FrameworksTelephonyTests
Change-Id: If630d5b339aa722717258c721daa8ead8c431e2d

junyulai   commited 2019-06-04 18:22:15 +08:00
88da121dfe
Fix issue for DnsResolver#query
1. Previously, getDnsNetId doesn't handle all the cases.
Fix it with cosidering bypass private DNS flag.
2. Make getDnsNetId return Network instead of netId,
and change name from getDnsNetId to getDnsNetwork

Bug: 129530368
Test: atest DnsResolverTest DnsUtilsTest

Merged-In: Ibb5080acd3c296650d56532fc7da525e9fa95e8f
(cherry picked from commit 3854966dc9499e39187835606397b16367e5e27b)

Change-Id: I37353642088bcc17da0cf17f78a5ed9efc9aefc3

Luke Huang   commited 2019-05-30 11:58:25 +00:00
976e09ab5c
Merge "Fix issue for DnsResolver#query" am: 7edc776afc
am: da47327520

Change-Id: I819fa9eb0abab64951fdb8adb7b1fc660544a1ad

Luke Huang   authored and   android-build-merger   commited 2019-05-30 04:36:42 -07:00
36fecce5a1
Fix issue for DnsResolver#query
1. Previously, getDnsNetId doesn't handle all the cases.
Fix it with cosidering bypass private DNS flag.
2. Make getDnsNetId return Network instead of netId,
and change name from getDnsNetId to getDnsNetwork

Bug: 129530368
Test: atest DnsResolverTest DnsUtilsTest
Change-Id: Ic8d45b802d72a266f9ec97bfea620c1ede6967e5

Luke Huang   commited 2019-05-30 06:34:03 +00:00
be164b2db8
Merge "Minor changes for DnsUtils and its test" am: 8c4ef95cbb
am: dfda15715d

Change-Id: Ic1990922e599884582606d1a4d7da3950200d25c

Luke Huang   authored and   android-build-merger   commited 2019-05-29 03:33:34 -07:00
a771bede7c
Minor changes for DnsUtils and its test
fix nits for ag/7671031

Bug: 129530368
Test: atest DnsUtilsTest
Change-Id: I562d33870a933a5fe55c89137a2d9574e3c59b90

Luke Huang   commited 2019-05-29 13:56:27 +08:00
3b14d4641a
Merge "Reinstate access to a forgotten member" into qt-dev
Chalard Jean   authored and   Android (Google) Code Review   commited 2019-05-28 09:38:51 +00:00
e97ef6d1d9
Merge changes from topic "am-851f19c8d7d34bb48accd48868aae501-qt-dev" into qt-dev
* changes:
  Remove broken test testRfc6724Sort
  Add Rfc6724 style sort for DnsResolver and fix potential bug

Luke Huang   authored and   Android (Google) Code Review   commited 2019-05-28 05:38:49 +00:00
d8bc2b5a15
Reinstate access to a forgotten member
Followup to aosp/964440

Bug: 131764329
Test: none
Merged-In: I6f6b2cf75793532d3d537a223b8e15d7304a1e3f
Change-Id: Ib279c0076016c53e0491fc0df8cefff8ae280d66
(cherry picked from commit 41bd3c57b4ba347ac6eb4546855daf5473264a29)

Chalard Jean   commited 2019-05-27 12:21:15 +00:00
ddfa1f5f4d
Merge "Reinstate access to a forgotten member" am: c73af87b45
am: 2f4bd91b99

Change-Id: Ib279c0076016c53e0491fc0df8cefff8ae280d66

Chalard Jean   authored and   android-build-merger   commited 2019-05-27 04:33:13 -07:00
bdee05bfd1
Merge "Reinstate access to a forgotten member"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-05-27 11:14:37 +00:00
c73af87b45
[CM] Fix NPE due to unvalidated callback value
When unregistering callback due to ON_UNAVAILABLE did not check for
a non-null callback.

Bug: 132950880
Test: atest ConnectivityServiceTest
Merged-In: Ib3fde31d88c36469cdee1e3578606d130a9817cb
Change-Id: Ib3fde31d88c36469cdee1e3578606d130a9817cb
(cherry picked from commit 51ddc176abd23bd3ddbc26124e5541a983a1db07)

Etan Cohen   commited 2019-05-23 16:20:15 +00:00
0da57a8b67
Add Rfc6724 style sort for DnsResolver and fix potential bug
1. pass default network explicitly to fix potential
   mis-sync network problem in DnsResolver#query
2. Add rfc6724 sort and related test
3. DnsResolver do rfc6724 sort before response InetAddress answers
4. move haveIpv* function from DnsResolver to DnsUtils

Bug: 129530368
Test: atest DnsResolverTest DnsUtilsTest

Merged-In: I0323f5c7f32fc3fa589b9e87f8e7c9caf744dbd4
(cherry picked from commit d352f4ca85ff8418a5a58d32fb03b85d7e0b843b)

Change-Id: I98455045fa43cc5a5902a08232251c1734feaac3

Luke Huang   commited 2019-05-23 14:36:21 +00:00
51b9f6c069
Merge "Add Rfc6724 style sort for DnsResolver and fix potential bug" am: 7a1133eb44
am: d352f4ca85

Change-Id: Ic356f42b46a3ad170fb01f22d9b3e0b7bf1585d4

Luke Huang   authored and   android-build-merger   commited 2019-05-23 07:23:31 -07:00
387e63d68b
Reinstate access to a forgotten member
Followup to aosp/964440

Bug: 131764329
Test: none
Change-Id: I6f6b2cf75793532d3d537a223b8e15d7304a1e3f

Chalard Jean   commited 2019-05-23 03:32:30 +00:00
8759c1ec9e
Add Rfc6724 style sort for DnsResolver and fix potential bug
1. pass default network explicitly to fix potential
   mis-sync network problem in DnsResolver#query
2. Add rfc6724 sort and related test
3. DnsResolver do rfc6724 sort before response InetAddress answers
4. move haveIpv* function from DnsResolver to DnsUtils

Bug: 129530368
Test: atest DnsResolverTest DnsUtilsTest
Change-Id: I4efa599c0605f6a9e4ef2dd1a36572c69b3c433f

Luke Huang   commited 2019-05-23 11:23:41 +08:00
26c1cdb19d
Merge "[CM] Fix NPE due to unvalidated callback value" am: 43c1536c6b
am: 51ddc176ab

Change-Id: Idf439c1f6badd715776eaaced1a781b066ba6d37

Etan Cohen   authored and   android-build-merger   commited 2019-05-22 10:44:37 -07:00
2ab18250bb