Commit Graph

226 Commits

Author SHA1 Message Date
Lorenzo Colitti
918f68fce9 Merge "Avoid creating IpClient if ethernet cable is unplugged." 2020-01-09 05:26:34 +00:00
Junaid Babu
b92d1f5513 Fix refCount check at releaseNetworkFor
When releaseNetworkFor is called, refCount should be equal to 1 for
network.stop() to be called. This is the same logic that is followed by
WifiNetworkFactory also.
In the current code, when refCount is 2 and releaseNetworkFor() is called,
network.stop() will be executed and will stop Ethernet

Bug: 146089778
Test: build and boot OK
Change-Id: Ib7d1b488a2943364a8ba4a89eec5de4c33cf1d5a
2019-12-17 15:09:01 +09:00
kevinwk_lee
13d5b86614 Avoid creating IpClient if ethernet cable is unplugged.
This change avoids calling start() on needNetworkFor() if ethernet
cable is unplugged. Fixed by adding isLinkUp validation.

Test: ./cts-tradefed run cts-dev -d -m CtsSecurityTestCases -t \
      android.security.cts.ListeningPortsTest#testNoRemotelyAccessibleListeningUdpPorts
      adb shell netstat -lnup

Change-Id: I2debd7367a20b665249f9c19d2d8a61737435803
2019-10-31 07:23:11 +00:00
Xin Li
39e7509859 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: I10598042b88b6509ed29dee05fe27ca9decf184e
2019-10-30 11:49:19 -07:00
Paul Hu
5b12a54294 Merge "[Ethernet] Replace internal connectivity checks permission" am: cd73c22c96 am: 2afd43ff9f
am: 63721ec401

Change-Id: I3606bee0a292d70dd140b4e244b8f283e8205c96
2019-09-20 00:48:36 -07:00
Paul Hu
63721ec401 Merge "[Ethernet] Replace internal connectivity checks permission" am: cd73c22c96
am: 2afd43ff9f

Change-Id: I1ccd73bc12ceb18e4b7578454bbfd3428ce8f135
2019-09-20 00:42:42 -07:00
Paul Hu
2afd43ff9f Merge "[Ethernet] Replace internal connectivity checks permission"
am: cd73c22c96

Change-Id: Idafe2f4e829b70920ba1f423bf5273a766257cf2
2019-09-20 00:36:15 -07:00
Paul Hu
cd73c22c96 Merge "[Ethernet] Replace internal connectivity checks permission" 2019-09-20 07:23:07 +00:00
Chalard Jean
761a9e0eea Update Ethernet code for the NetworkFactory serial number. am: 91456a8c7a am: abb7a8c574
am: 8a5d92da6d

Change-Id: Ifcce756f31fc85bcba49731596a8fc270efc3c79
2019-09-18 05:27:47 -07:00
Chalard Jean
8a5d92da6d Update Ethernet code for the NetworkFactory serial number. am: 91456a8c7a
am: abb7a8c574

Change-Id: I36c6a101dc4dc67fe094a7ec6d12870f06c4cb78
2019-09-18 05:20:36 -07:00
Chalard Jean
abb7a8c574 Update Ethernet code for the NetworkFactory serial number.
am: 91456a8c7a

Change-Id: I4a0601db487d9d60d4bc7487601fb1b26ab748d8
2019-09-18 05:15:07 -07:00
Chalard Jean
91456a8c7a Update Ethernet code for the NetworkFactory serial number.
See aosp/708790

Bug: 18637384
Bug: 29030667
Test: manual
      cts
      runtest framework-net
      atest frameworks/opt/net/ethernet/tests

Change-Id: I5caa4cb89ca1441f3c84b5675ceede6ecacfd132
2019-09-09 11:03:51 +08:00
paulhu
6957e3a35a [Ethernet] Replace internal connectivity checks permission
A number of connectivity checks that protect system-only methods
check for CONNECTIVITY_INTERNAL, but CONNECTIVITY_INTERNAL is a
signature|privileged permission. We should audit the permissions
checks, and convert checks that protect code that should not be
called outside the system to a signature permission. So replace
the permission to NETWORK_STACK.

Bug: 32963470
Test: atest EthernetServiceTests
Change-Id: I2a88d04bbdcd7e7e624b9065372a6603d2bb45a2
2019-08-22 16:03:59 +08:00
Wally Yau
946288ef22 Fixed fatal exception in EthernetServiceThread am: b95be5972e am: 13a87fbc0e
am: 54816c5fe2

Change-Id: I35c737a0493cfbbde9cba05fb010c8253c9030ae
2019-05-30 10:10:04 -07:00
Wally Yau
54816c5fe2 Fixed fatal exception in EthernetServiceThread am: b95be5972e
am: 13a87fbc0e

Change-Id: I35e91e5c2f4f04e888eceb8492a3e970f98f3789
2019-05-30 09:49:49 -07:00
Wally Yau
13a87fbc0e Fixed fatal exception in EthernetServiceThread
am: b95be5972e

Change-Id: I9ae1b1fb00552931882ce0b1eafd6696f217c96e
2019-05-30 09:40:39 -07:00
Wally Yau
b95be5972e Fixed fatal exception in EthernetServiceThread
When this.mIpConfig is not initialized, it will cause a
java.lang.NullPointerException and put the device in a boot
loop with the following error:

FATAL EXCEPTION IN SYSTEM PROCESS: EthernetServiceThread

Test: passed pre-submit boot test.

Change-Id: I47df68071b4c07a4136c0abcbe69ee7ada7090e0
2019-05-29 14:50:38 -07:00
tank.hung
aaff25b1ec Merge "Add reconnect flow when updateIPConfiguration" am: 08998cf4d1
am: 571f7a6b67

Change-Id: I3deeb11c92dee6ceeeb4503d3696f87fa4ab4597
2019-05-14 09:48:00 -07:00
tank.hung
571f7a6b67 Merge "Add reconnect flow when updateIPConfiguration"
am: 08998cf4d1

Change-Id: Iad395c171db5f186859c485e8d929a6e577f3c5f
2019-05-14 09:42:35 -07:00
Treehugger Robot
08998cf4d1 Merge "Add reconnect flow when updateIPConfiguration" 2019-05-14 16:23:23 +00:00
tank.hung
f8a95e543f Add reconnect flow when updateIPConfiguration
Bug: 119085164
Test: manual, test with AndroidTV device

Partner gerrit review CL:
https://partner-android-review.googlesource.com/c/platform/frameworks/opt/net/ethernet/+/1215654

[Analysis]
APP called EthernetManager.setConfiguration API for switch DHCP to
Static,
setConfiguration’s flow just only update IpConfig finally but have not
trigger EthernetNetworkFactory.start().
So Static IP Setting just only take effect when unplug/plug Ethernet
Cable or AC Off&On.

[Repeat Steps]
1. Connect Ethernet with DHCP and Network access is normal
2. Change IP settings from DHCP to Static and set Static IP.
3. After setting, you can not automatically obtain Static IP.

[Recovery Method]
Unplug the Ethernet and insert it or AC OFF / ON

Change-Id: Idbb6a24ccfa360582f48e4f9369def7fc729fb9f

Bug: 112171349
2019-05-14 15:16:19 +00:00
Bill Rassieur
fd849fea84 Merge master@5428150 into git_qt-dev-plus-aosp.
am: e245135f93

Change-Id: I95b26c922e8b19bec14d0be9c6a93291b6b0d069
2019-04-03 16:45:02 -07:00
Bill Rassieur
e245135f93 Merge master@5428150 into git_qt-dev-plus-aosp.
Change-Id: Id7b68cfc15856ae3370bb9391b46a67c7c1f5505
BUG: 129345239
2019-04-02 18:33:43 +00:00
Sal Savage
d9c947bf2f Update comments and documentation in net type prop change am: ea26baf9ff am: 583912de29
am: 9c6fb69777

Change-Id: Ida49c0c86d12e5c0ae0705e53e5657a846c8d2e2
2019-03-26 10:45:27 -07:00
Sal Savage
9c6fb69777 Update comments and documentation in net type prop change am: ea26baf9ff
am: 583912de29

Change-Id: Ib9a534a0e13e4f6f62c27e2d028e085b4a3c1691
2019-03-26 10:36:15 -07:00
Sal Savage
583912de29 Update comments and documentation in net type prop change
am: ea26baf9ff

Change-Id: I0fe7d537d46ab0b4bcd6521162e35fcb719f13f9
2019-03-26 10:28:12 -07:00
Sal Savage
ea26baf9ff Update comments and documentation in net type prop change
Bug: b/112588045
Test: atest EthernetServiceTests --verbose
Test: kitchensink, dumpsys ethernet, with RPi devices and USB to
      ethernet adapters.

Change-Id: Iaa260aabbbd7aa4b7864eba32ecff7e3f84123c3
2019-03-25 14:11:20 -07:00
The Android Open Source Project
cf295965a6 [automerger skipped] DO NOT MERGE - Skip PPRL.190305.001 into master am: 2c514c69b7 -s ours am: 14837c2f31 -s ours
am: 0c3285031b -s ours
am skip reason: subject contains skip directive

Change-Id: Ibc47e3588fd3c7c027c3364899e1085ac512d029
2019-03-11 14:34:28 -07:00
The Android Open Source Project
0c3285031b [automerger skipped] DO NOT MERGE - Skip PPRL.190305.001 into master am: 2c514c69b7 -s ours
am: 14837c2f31 -s ours
am skip reason: subject contains skip directive

Change-Id: I24ba2152523a30ccc20028150843f628d735c14f
2019-03-11 14:05:05 -07:00
The Android Open Source Project
14837c2f31 [automerger skipped] DO NOT MERGE - Skip PPRL.190305.001 into master
am: 2c514c69b7 -s ours
am skip reason: subject contains skip directive

Change-Id: Ic455a6ffd8a17475f7c4419e8995c54ceebfa173
2019-03-11 13:07:41 -07:00
The Android Open Source Project
2c514c69b7 DO NOT MERGE - Skip PPRL.190305.001 into master
Bug: 127812889
Change-Id: I544793199b894342e9dc245bb4254d17854afeed
2019-03-11 11:23:23 -07:00
Brett Chabot
6d9fdc0839 Migrate frameworks/opt/net/ethernet to androidx.test am: e9eff7a450 am: da5fc01718
am: d24b0551d2

Change-Id: Ie933d7d304bc13a80dd1171a761d480f3cb58353
2019-03-05 20:27:28 -08:00
Brett Chabot
d24b0551d2 Migrate frameworks/opt/net/ethernet to androidx.test am: e9eff7a450
am: da5fc01718

Change-Id: I7838157884da46c513b171f501d066ced7ecfc18
2019-03-05 20:19:26 -08:00
Brett Chabot
da5fc01718 Migrate frameworks/opt/net/ethernet to androidx.test
am: e9eff7a450

Change-Id: Ibd005ade7b4aa33335f81ac5386d6cffca8bc0cf
2019-03-05 20:16:27 -08:00
Brett Chabot
e9eff7a450 Migrate frameworks/opt/net/ethernet to androidx.test
See go/jetpack-test-android-migration

Test: compile
Change-Id: I20fc49dd2487af2245f060454e7f32f5e9145a9c
2019-03-05 09:10:36 -08:00
Xin Li
841cc7f4d8 Merge stage-aosp-master into pi-dev-plus-aosp
am: 17c07503ec

Change-Id: I1fdf525277c5229791807404f3c74ab51d3ab841
2019-02-25 05:35:54 -08:00
Xin Li
17c07503ec Merge stage-aosp-master into pi-dev-plus-aosp
Bug: 126125118
Change-Id: Ifeafc16bc4f434aa86b015b4bbedceee14dc334f
2019-02-25 00:30:16 -08:00
Xin Li
1206467ba2 DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: I49bc176829a1f38eb79f28e4749785c2e9426314
2019-02-20 16:19:22 -08:00
Xin Li
acbced583f [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master am: f8b2a96d17 -s ours
am: 3b5065bb77 -s ours
am skip reason: subject contains skip directive

Change-Id: I0b7ad5cf4a9e52234f93790ee87c3b13da4cc680
2019-02-14 21:02:57 -08:00
Xin Li
3b5065bb77 [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master
am: f8b2a96d17 -s ours
am skip reason: subject contains skip directive

Change-Id: I0d3c9d594a5d0137a221a418d081d06a3d9fb015
2019-02-14 14:34:14 -08:00
Xin Li
f8b2a96d17 DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master
Bug: 124234733
Change-Id: I4c7e99256bd9d37fc4aa92d145ead2cdd4eb8306
2019-02-12 13:51:52 -08:00
android-build-team Robot
fdc1d0fff5 Snap for 5180536 from 016e5502ac to pi-platform-release
Change-Id: Icc5d32680bf08d75f01937a71eb845b89018cce6
2019-02-09 02:37:47 +00:00
Remi NGUYEN VAN
1972808bec Migrate EthernetNetworkFactory to IIpClient am: 5060d1d1be am: c7c0092d82
am: d0d0ac091b

Change-Id: If58d85611bee403e429a884f2139c3e5a627b211
2019-01-24 22:29:49 -08:00
Remi NGUYEN VAN
d0d0ac091b Migrate EthernetNetworkFactory to IIpClient am: 5060d1d1be
am: c7c0092d82

Change-Id: I0bae760c343a43ad149e85b7a626ede9c29afc35
2019-01-24 22:20:34 -08:00
Remi NGUYEN VAN
c7c0092d82 Migrate EthernetNetworkFactory to IIpClient
am: 5060d1d1be

Change-Id: Ic21a0d814cc4adebda0983155d341f3316ee6a54
2019-01-24 22:08:32 -08:00
Remi NGUYEN VAN
5060d1d1be Migrate EthernetNetworkFactory to IIpClient
Test: atest EthernetServiceTests
Bug: b/112869080
Change-Id: I54f32d3031e63c7dea78936b6fe5e83e5b293c33
2019-01-25 12:34:03 +09:00
Sal Savage
9ae59e4d4c Allow network transport type override am: d3a5c0404c am: ea38c67494
am: bfb81eb359

Change-Id: I3c95355d1485a3831c10d3c1672a7f8735b492a3
2019-01-22 17:49:53 -08:00
Sal Savage
bfb81eb359 Allow network transport type override am: d3a5c0404c
am: ea38c67494

Change-Id: Idcea8fe83d4e16e53213e6b329c4b14d70cd2732
2019-01-22 17:11:11 -08:00
Sal Savage
ea38c67494 Allow network transport type override
am: d3a5c0404c

Change-Id: Iac41b234aa5502d85e8f00275252bbdea838681e
2019-01-22 16:43:32 -08:00
Sal Savage
d3a5c0404c Allow network transport type override
Bug: b/112588045
Test: atest EthernetServiceTests --verbose
Test: kitchensink with RPi devices connected by USB -> Ethernet
      adapters. Edit config.xml to try different tranport
      overrides manually. Use dumpsys ethernet to show final
      final network scores.
Change-Id: I482e78a76d06c9c090aa6816db14bb346eb6528b
2019-01-15 11:56:50 -08:00