Commit Graph

379619 Commits

Author SHA1 Message Date
Adam Vartanian
f240cb8091 Fix authority parsing test
The test has been failing because http://r.android.com/793302 changed
how the port separator was found, only scanning ASCII digits until it
hits a colon, and previously it would scan for the colon and then
percent-decode the rest of it.  The new behavior actually better
matches the WHATWG URL parsing algorithm [1], which specifies that
ports only include ASCII digits.  It does mean that some edge cases
that previously parsed as host "foo", port 42 will now parse as
host "foo:42", no port, but those URLs wouldn't be accepted by
browsers so they should be exceedingly rare.

The behavior per the WHATWG spec would be to fail to parse in the case
of a percent-encoded character in the port section, but this class is
specifically documented to accept garbage, so lumping the mis-encoded
port as part of the hostname (which will result in a hostname that's
invalid and impossible to resolve) seems like the best option.

[1] https://url.spec.whatwg.org/#port-state

Fixes: 124360078
Test: atest android.net.UriTest
Change-Id: I1c788cb7703c821ae74b542b74d89e10cba5a546
2019-02-19 09:27:24 +00:00
Remi NGUYEN VAN
762f9f0c24 Merge "Move NetworkStack to services.net" 2019-02-15 10:52:03 +00:00
Remi NGUYEN VAN
d989ed753d Merge "Add NetworkStackTests to device-tests suite" 2019-02-15 08:16:03 +00:00
Remi NGUYEN VAN
bfe928d593 Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 08:09:29 +00:00
Xiao Ma
60e7162e05 Merge "Fix testApfFilterKeepaliveAck." 2019-02-15 04:04:32 +00:00
Dan Shi
b350df2941 Add NetworkStackTests to device-tests suite
It's needed for the test to run in a Test Mapping suite.

Bug: 123544631
Test: local build
Change-Id: I0678a3e8f9beed7c637c1b11594369aa5d3c87bf
2019-02-15 12:35:04 +09:00
Remi NGUYEN VAN
5db454c28d Move NetworkStack to services.net
NetworkStack is only used in services.net or clients of services.net. It
cannot stay in framework.jar because it needs to depend on AIDL
interfaces, which would conflict with app implementations if they were
in framework.jar.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: Ib1d08a3669983640119d008db7e2990fa798724f
Merged-In: I501b125a388c1100c2182bde4670944c2f0d7a02
2019-02-15 12:20:17 +09:00
Remi NGUYEN VAN
cfff01e2db Remove NetworkMonitor dependency on ICaptivePortal
ICaptivePortal is used in the framework and cannot be used as a
dependency in NetworkMonitor, as the framework class takes precedence
when linking.
Also fix NetworkMonitorTest that was not verifying the right
startCaptivePortalApp call.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: I8e7bb79e50650ae182a2e4277fb49abf5fb6d910
Merged-In: Ib6a89e54312628662b130fbeec18d11e139f09fa
2019-02-15 12:20:03 +09:00
Remi NGUYEN VAN
d36e3df7b0 Merge "Remove deps from framework on netd interfaces" 2019-02-15 03:11:31 +00:00
Eric Laurent
cec740470c Merge "Prevent 3rd party app from turning on speaker during the system call Test: manual" 2019-02-15 00:43:31 +00:00
Brad Ebinger
ca2abcf735 Merge "SMS: Add a compatible API getRecipientAddress for 3GPP2 SMS" 2019-02-14 23:40:44 +00:00
Treehugger Robot
b3be864186 Merge "Fixed a typo in an OWNERS file." 2019-02-14 21:50:08 +00:00
Benedict Wong
0dddb902ae Merge "Add Test Network and Transport types" 2019-02-14 18:37:04 +00:00
Treehugger Robot
5de80df81e Merge "Add :frameworks-base-api-current.txt filegroup" 2019-02-14 12:24:32 +00:00
Xiao Ma
d36a89ccd6 Fix testApfFilterKeepaliveAck.
Apf program for TCP keep alive ACK also compares protocol field in IPv4
header and the total length of TCP keep alive ACK packet. Besides,
should set the ACK flag in the the TCP header of keep alive ACK packet.

Bug: 123992564
Test: atest NetworkStackTests
Change-Id: I997cd6807a33f7e1af25566226d803dcc2e257dd
2019-02-14 19:16:01 +09:00
Remi NGUYEN VAN
dacee147b4 Remove deps from framework on netd interfaces
If included in framework.jar, the interfaces conflict with any app that
needs to depend on them, including the NetworkStack.

Bug: 124033493
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I2db9f87b7154130726d4700b241d55b041635d98
Merged-In: I0ecae20d514bf888f3a80331f19369ceb1c52aa3
2019-02-14 17:26:59 +09:00
Chiachang Wang
a75c52c3df Merge "Use ServiceState to get data cell ID" 2019-02-14 07:24:16 +00:00
Colin Cross
db400ed187 Merge "Don't run doc-comment-check-docs for update-api" 2019-02-14 04:58:42 +00:00
Treehugger Robot
5751278992 Merge "Add "close" socket option for immediately close socket after finish check captive portal." 2019-02-14 04:55:21 +00:00
Remi NGUYEN VAN
16758070d0 Merge "Fix flaky testNattSocketKeepalives" 2019-02-14 03:29:00 +00:00
Remi NGUYEN VAN
ac02bc8141 Fix flaky testNattSocketKeepalives
The test did not wait for the WifiNetworkAgent to disconnect, and there
are reports of flakes where it is still connected in
connectKeepaliveNetwork.

Test: atest FrameworksNetTests
Bug: 124319553
Change-Id: I85968806885c8853ec4f4dbea356366c1af0ea1c
2019-02-14 03:28:48 +00:00
Shuo Qian
6cc4c0c029 Merge "Call e.rethrowFromSystemServer() to exception of setDefaultSmsSubId" 2019-02-14 02:59:09 +00:00
Chiachang Wang
f9727b43cb Merge "Add build rule of data stall proto" 2019-02-14 02:57:38 +00:00
Chiachang Wang
8daede9700 Add build rule of data stall proto
Bug: 121185319
Bug: 120452078
Test: Build and test against data stall code
Change-Id: I3b243ab947464a431ef205c5f2f30edc883e2963
2019-02-14 10:55:03 +08:00
Hongshik
1da51fcdc4 Add "close" socket option for immediately close socket after finish check captive portal.
Unexpected packets are observed after captive portal check. Due to the packets, modem can't fall-back to idle state (modem remained as active state).
It makes unnecessary power consumtion.
To prevent it, "close" option is added in sendHttpProbe()

Test: check socket close.
Change-Id: I5b6987071ad915081846504adbb209eb371fd1c3
2019-02-14 10:51:51 +09:00
Lucas Lin
1037bbb82a Merge "Clear all lingering notifications when network is disconnected" 2019-02-14 01:40:47 +00:00
Chiachang Wang
7561071dfb Use ServiceState to get data cell ID
ServiceState now contains a CellIdentity that can be obtained
specifically from the data subscription, and for PS on cell
only.

This should be used for connectivity level network monitoring
info.

Bug: 123893112
Test: 1. atest NetworkMonitorTest
      2. Verify if cell id is correct

Change-Id: Ieb00de84a0d518e3197e3884f946b872e998304a
2019-02-14 09:30:58 +08:00
Colin Cross
22ec2e68ff Don't run doc-comment-check-docs for update-api
update-api would be fast except that it spends ~4 minutes doing
doc-comment-check-docs.  doc-comment-check-docs isn't really
related to update-api, so lets just remove it.

Fixes: 124386818
Test: m update-api
Change-Id: I0f5311e98063786671c0d8b6a8db52351d9fcfd7
2019-02-13 17:22:47 -08:00
Treehugger Robot
f7150486bf Merge "Enable DOM storage API for CaptivePortalLoginActivity" 2019-02-14 01:19:50 +00:00
sqian
a31ef445e9 Call e.rethrowFromSystemServer() to exception of setDefaultSmsSubId
Test: Treehugger
Bug: 123927534
Change-Id: Ica15965cb904b758e078b8439e5e9d3f39b9c0a2
Merged-In: Ica15965cb904b758e078b8439e5e9d3f39b9c0a2
(cherry picked from commit 04e94fcb0a)
2019-02-13 17:06:05 -08:00
Jordan Liu
b8493ac5eb Merge "Add UNINITIALIZED and rename INVALID" 2019-02-14 00:14:11 +00:00
Hall Liu
a3aae9fe4b Merge "Implement more location checks" 2019-02-13 23:21:43 +00:00
Treehugger Robot
2f199d6b35 Merge "Manually merge 885aca1bba to aosp-master" 2019-02-13 22:26:10 +00:00
Pengquan Meng
600827273c Merge "Add getSlotsMapping to TelephonyManager" 2019-02-13 22:23:16 +00:00
Hui Yu
f57e401241 Manually merge 885aca1bba to aosp-master
Bug: None.
Test: NA.
Change-Id: I04ebbaa3c2f939b139f0b8b6f25777383fd42375
Merged-In: Ifcc0c80f1da45c2ff89f7c88da6407ba777473e2
2019-02-13 20:32:27 +00:00
Hui Yu
539c545dc7 Merge "Revert "RESTRICT AUTOMERGE: Manually merge 885aca1bba to aosp-master"" 2019-02-13 20:23:03 +00:00
Chris Wailes
7ae743b313 Fixed a typo in an OWNERS file.
Test: None
Change-Id: I7f758f20fb2e5bfb9c2ba3193e55080046902bdc
2019-02-13 12:21:49 -08:00
Hui Yu
a558b05d53 Revert "RESTRICT AUTOMERGE: Manually merge 885aca1bba to aosp-master"
This reverts commit a738111eee.

Reason for revert: mistakenly used "RESTRICT AUTOMERGE" on the title.

Change-Id: I7ec9917887763912114405ba89eb5f0fac328d97
2019-02-13 20:10:27 +00:00
Jordan Liu
75a0066880 Merge "Update documentation for SubscriptionManager listener" 2019-02-13 19:26:58 +00:00
Tianjie Xu
c8f5981028 Merge "Improved wipe reason information for RecoverySystem" 2019-02-13 19:18:01 +00:00
Hall Liu
ee313737e9 Implement more location checks
Make the following modifications to APIs and required permissions.
Move the following APIs from checking coarse permission to fine
permission (except for apps targeting pre-Q):
TelephonyManager.getCellLocation()
(deprecated) TelephonyManager.getNeighboringCellInfo()
TelephonyManager.getAllCellInfo()
TelephonyManager.requestCellInfoUpdate()
PhoneStateListener#onCellLocationChanged
PhoneStateListener#onCellInfoChanged

Start checking for fine permission on the following APIs:
(Note -- these will only be logged, not denied until a future CL)
TelephonyManager.requestNetworkScan()
TelephonyScanManager.requestNetworkScan()
NetworkScanCallback#onResults

Start checking for coarse permission on the following APIs:
(Note -- these will only be logged, not denied until a future CL)
TelephonyManager#getAvailableNetworks
TelephonyManager#getServiceStateForSubscriber and #getServiceState
PhoneStateListener#onServiceStateChanged

Bug: 116258458
Test: manual via testapps
Change-Id: I45326ddacbcf538da50ca544d67eed12cf0c0861
2019-02-13 11:07:37 -08:00
Nathan Harold
627900696f Merge "Add missing UARFCN Getter to CellIdentityTdscdma" 2019-02-13 18:17:36 +00:00
Fan Zhang
accbb6b3c6 Merge "Revert "Enable static overlay for SettingsLib resources"" 2019-02-13 18:04:09 +00:00
Fan Zhang
086c189e20 Revert "Enable static overlay for SettingsLib resources"
This reverts commit 6828b0f191.

Fixes: 124370422


Reason for revert: b/124370422


Error: 

The following topic from AOSP:

https://android-review.googlesource.com/q/topic:%22116821732%22+(status:open%20OR%20status:merged)

Has broken several builds (test_suites_x86_64, build_test, docs) with the following error:

FAILED:
build/make/core/aapt2.mk:33: error: overriding commands for target `out/target/common/obj/APPS/SetupWraith_intermediates/flat-res/frameworks/base/packages/SettingsLib/res/color_batterymeter_bolt_color.xml.flat', previously defined at build/make/core/aapt2.mk:33
05:05:47 ckati failed with: exit status 1
make: *** [run_soong_ui] Error 1
Return Code: 2

Change-Id: I9b980c512eb354f87470bcefe1df095fc5c9a807
2019-02-13 18:00:16 +00:00
Jordan Liu
1f85a3ddf3 Add UNINITIALIZED and rename INVALID
UNINITIALIZED_CARD_ID is for before the card ID is ready.
INVALID_CARD_ID is renamed to UNSUPPORTED_CARD_ID and it is used if the
card ID is known to be unsupported.

Bug: 122978614
Test: atest UiccControllerTest
Change-Id: Ia2315d9b38ef35b30d9b96b6436c08fa4404e4df
Merged-In: Ia2315d9b38ef35b30d9b96b6436c08fa4404e4df
2019-02-13 09:54:30 -08:00
Blake Kragten
366318b9c3 Merge "Modem power monitor" 2019-02-13 17:21:30 +00:00
Blake Kragten
4d3a9f2b3c Modem power monitor
This is an AOSP carry over for the frameworks base CL. This change is needed here to allow telephony changes to be added to AOSP with no issues.

Adding monitored power rail as a new cellular battery stats component. This will be used to better determine actual power usage of the modem rather than relying on battery reduction rates.

If the device does not support rail power monitoring then this value
will always remain at 0.

Test: adb shell dumpsys activity service TelephonyDebugService --metrics
Results Examples:
	Energy consumed by modem (mAh): 2.41

Change-Id: If85af2f2e1b255661e189c5375ecc5825be84c58
2019-02-13 16:02:03 +00:00
Paul Duffin
0440e1fca9 Add :frameworks-base-api-current.txt filegroup
Needed by external/apache-http/Android.bp.

Bug: 119021844
Test: make checkbuild
Change-Id: Iab599d0e85524d2efa0aee9358a602e3da9931ad
2019-02-13 10:26:38 +00:00
Paul Duffin
32bfd77b79 Merge "Use filegroup name not contents in $(location ...)" 2019-02-13 10:12:46 +00:00
Hans Boehm
2b56c4cf48 Merge "Adjust AsyncTask.THREAD_POOL_EXECUTOR config" 2019-02-13 05:14:43 +00:00