OSDN Git Service

android-x86/frameworks-base.git
5 years ago[CS] Unregister callback as part of onUnavailable dispatch
Etan Cohen [Tue, 16 Apr 2019 22:07:55 +0000 (15:07 -0700)]
[CS] Unregister callback as part of onUnavailable dispatch

The onUnavailable semantics promise that it is equivalent to calling
the unregister callback method. But - it doesn't unregister the callback
allowing it to be reused. Fixed.

Additionally, modified the unregisterNetworkCallback method to not fail
on duplicate unregistration (since a callback could now self
unregister). Instead simply print a log.

Bug: 130651445
Test: atest ConnectivityServiceTest
Change-Id: I4c54b003a733eb0b1e4fd8674ed13081b1bef8e3

5 years agoMerge "Update to follow the new google benchmark API"
Haibo Huang [Wed, 8 May 2019 21:18:40 +0000 (21:18 +0000)]
Merge "Update to follow the new google benchmark API"

5 years agoMerge "Add IPsec tunnel mode feature flag"
Benedict Wong [Wed, 8 May 2019 20:04:06 +0000 (20:04 +0000)]
Merge "Add IPsec tunnel mode feature flag"

5 years agoUpdate to follow the new google benchmark API
Haibo Huang [Fri, 5 Apr 2019 00:29:15 +0000 (17:29 -0700)]
Update to follow the new google benchmark API

Test: build
Change-Id: Icc25b81e9b863c35c02c9673518fa4d30e9ae321

5 years agoAdd IPsec tunnel mode feature flag
Benedict Wong [Mon, 5 Nov 2018 21:35:06 +0000 (13:35 -0800)]
Add IPsec tunnel mode feature flag

This patch adds a feature flag for IPsec Tunnel Mode. This implies VTI
(with output-mark updating), or XFRM-I in the kernels.

Bug: 117183273
Test: Compiles
Change-Id: I6dd0e429cc0bd100f2ef1140a6651f6ef5294c79
Merged-In: I6dd0e429cc0bd100f2ef1140a6651f6ef5294c79
(cherry picked from commit dc92c69b087d5fbecff76ef1e739ae415312734d)

5 years agoMerge "Extend NetworkDnsEventReported and add new DnsCallReported to log per-query...
Frank Li [Wed, 8 May 2019 03:01:38 +0000 (03:01 +0000)]
Merge "Extend NetworkDnsEventReported and add new DnsCallReported to log per-query information"

5 years agoMerge "Update getCardId doc with details"
Jordan Liu [Tue, 7 May 2019 21:26:02 +0000 (21:26 +0000)]
Merge "Update getCardId doc with details"

5 years agoMerge "Fix incorrect parsing of UVC interface descriptor"
Treehugger Robot [Tue, 7 May 2019 19:11:33 +0000 (19:11 +0000)]
Merge "Fix incorrect parsing of UVC interface descriptor"

5 years agoMerge "Sorting and merge Emergency number better"
Shuo Qian [Tue, 7 May 2019 18:02:54 +0000 (18:02 +0000)]
Merge "Sorting and merge Emergency number better"

5 years agoSorting and merge Emergency number better
sqian [Fri, 3 May 2019 22:25:30 +0000 (15:25 -0700)]
Sorting and merge Emergency number better

Apply more parameters to sort Emergency number list, it is important
to keep two lists Collection-equal to each other if they have the same
contents. Otherwise, it will introduce more unnecessary updates in
 EmergencyNumberTracker and it may confuse users.

Test: atest EmergencyNumberTest
Bug: 131922424
Change-Id: I64a43886d4000b261ea703b081e6278b0307805f
Merged-In: I64a43886d4000b261ea703b081e6278b0307805f
(cherry picked from commit a1f21a5c2cd4cdc14f4cbf7cd0fc0de6e4911c02)

5 years agoMerge "Update path to audio files"
Anton Hansson [Tue, 7 May 2019 09:46:23 +0000 (09:46 +0000)]
Merge "Update path to audio files"

5 years agoMerge "Track libziparchive API change."
Elliott Hughes [Mon, 6 May 2019 23:45:16 +0000 (23:45 +0000)]
Merge "Track libziparchive API change."

5 years agoUpdate getCardId doc with details
Jordan Liu [Mon, 6 May 2019 23:38:27 +0000 (16:38 -0700)]
Update getCardId doc with details

getCardId() returns the EID in some cases and ICCID in others. Add
comments explaining exactly when it returns what.

Test: no change in behavior
Bug: 131423779
Change-Id: Id0cbae3affdf4c034b2435bf77371ae1355d3cfa

5 years agoMerge "Rollback SHELL UID check for CarrierConfigLoader"
Brad Ebinger [Mon, 6 May 2019 22:57:27 +0000 (22:57 +0000)]
Merge "Rollback SHELL UID check for CarrierConfigLoader"

5 years agoRollback SHELL UID check for CarrierConfigLoader
Brad Ebinger [Thu, 25 Apr 2019 17:59:08 +0000 (10:59 -0700)]
Rollback SHELL UID check for CarrierConfigLoader

When a test calls adoptShellPermissionIdentity before
calling a command, it doesn't adopt the shell UID, only
the permissions. So, we can not use
Binder#getCallingIdentity to determine it the API is
being called as part of a test. For now, we must only
use MODIFY_PHONE_STATE until a better pattern is
established.

Test: Manual
Bug: 131185660
Merged-In: I607b7c9afe1c384a41ce12b92ae43747b2ee1bc3
Change-Id: I59d32a2e36950b2485e1a46a25e3724928676219

5 years agoMerge "Fix binder leakage when turning off Bluetooth"
Treehugger Robot [Mon, 6 May 2019 03:21:18 +0000 (03:21 +0000)]
Merge "Fix binder leakage when turning off Bluetooth"

5 years agoTrack libziparchive API change.
Elliott Hughes [Sat, 4 May 2019 05:42:31 +0000 (22:42 -0700)]
Track libziparchive API change.

Bug: http://b/129068177
Test: treehugger
Change-Id: I88f49a06db416a7c6ec8afe87cc9cca825eb5ccb

5 years agoMerge "Whitelist 30075 for Switzerland"
Hall Liu [Fri, 3 May 2019 17:44:55 +0000 (17:44 +0000)]
Merge "Whitelist 30075 for Switzerland"

5 years agoMerge "Remove JapaneseCalendar.CURRENT_ERA from Android public SDK"
vichang [Fri, 3 May 2019 16:48:11 +0000 (16:48 +0000)]
Merge "Remove JapaneseCalendar.CURRENT_ERA from Android public SDK"

5 years agoMerge "Convert packages/Shell/**/Android.mk file to Android.bp"
Treehugger Robot [Fri, 3 May 2019 15:56:37 +0000 (15:56 +0000)]
Merge "Convert packages/Shell/**/Android.mk file to Android.bp"

5 years agoUpdate path to audio files
JeiFeng Lee [Fri, 3 May 2019 01:09:27 +0000 (09:09 +0800)]
Update path to audio files

The path to these audio files was changed in r.android.com/862589.
Update the configuration to read from the new path, too.

Bug: 131864467
Test: hear sound when locking/unlocking aosp_blueline
Change-Id: Ie0d69de6333a08d3e645829e13a707f83cb05e01
Merged-In: Ie0d69de6333a08d3e645829e13a707f83cb05e01

5 years agoRemove JapaneseCalendar.CURRENT_ERA from Android public SDK
Victor Chang [Fri, 3 May 2019 13:28:20 +0000 (14:28 +0100)]
Remove JapaneseCalendar.CURRENT_ERA from Android public SDK

JapaneseCalendar.CURRENT_ERA is final static int, and the developer
may mis-use and could have wrong expectation on this API, since
1. New emperor in Japan could result in a new era, but old Android device
   still provides an outdated "current" era.
2. Developer may expect its value depending on system time. However,
   given it's a static final int,
   Android could intiailize the value at boot with an incorrect time,
   and thus results in incorrect era. Thus, on Android, The value is
   always hard-coded.

Bug: 131893534
Test: make
Change-Id: I16ea841975dd8e913409c884123003f842c55bb8

5 years agoExtend NetworkDnsEventReported and add new DnsCallReported to log per-query information
lifr [Fri, 3 May 2019 04:02:54 +0000 (12:02 +0800)]
Extend NetworkDnsEventReported and add new DnsCallReported to log per-query information

NetworkDnsEventReported -The message represents the entire lookup operation,
which may result one or more queries to the recursive DNS resolvers.

DnsCallReported - Those DNS queries are individually logged in DnsCallReported
to enable computing error rates and network latency and timeouts broken up by
query type, transport, network interface, etc

Test: make statsd_testdrive
     ./out/host/linux-x86/bin/statsd_testdrive 116 => pass
Bug: 129253665

Change-Id: Ib75affea5d849437a293affbe294732153511d97
Merged-In: Ib75affea5d849437a293affbe294732153511d97

5 years agoConvert packages/Shell/**/Android.mk file to Android.bp
Sasha Smundak [Fri, 3 May 2019 04:35:45 +0000 (21:35 -0700)]
Convert packages/Shell/**/Android.mk file to Android.bp

See build/soong/README.md for more information.

Bug: 122332340
Test: atest ShellTests
(same errors as baseline)
Change-Id: I63b777342359e0b42ccd554b7d056c7431178380

5 years agoMerge "Pass in external packageName"
Treehugger Robot [Fri, 3 May 2019 01:33:30 +0000 (01:33 +0000)]
Merge "Pass in external packageName"

5 years agoPass in external packageName
Youming Ye [Tue, 30 Apr 2019 17:35:08 +0000 (10:35 -0700)]
Pass in external packageName

Use external packageName when ActivityThread couldn't get calling package
due to calling identity cleaned.

Bug: 131287254
Test: Manual
Change-Id: Icec3ad7193bc5988799188a7a1e68aebc0dc109d

5 years agoMerge "Add calling package parameter to IRcs methods"
Treehugger Robot [Thu, 2 May 2019 20:43:04 +0000 (20:43 +0000)]
Merge "Add calling package parameter to IRcs methods"

5 years agoMerge "Move to libunwindstack from libunwind."
Elliott Hughes [Thu, 2 May 2019 18:52:07 +0000 (18:52 +0000)]
Merge "Move to libunwindstack from libunwind."

5 years agoMerge "Added riddlehsu@, louischang@, and erosky@ to WM OWNERS file"
Treehugger Robot [Thu, 2 May 2019 18:02:35 +0000 (18:02 +0000)]
Merge "Added riddlehsu@, louischang@, and erosky@ to WM OWNERS file"

5 years agoMove to libunwindstack from libunwind.
Christopher Ferris [Thu, 2 May 2019 17:12:28 +0000 (10:12 -0700)]
Move to libunwindstack from libunwind.

This already matches internal master.

Test: Builds.
Change-Id: I1f9b886668569dd03a2a073f6d79f4fb959a2d32

5 years agoMerge "AddRestrictCause"
Treehugger Robot [Thu, 2 May 2019 17:10:18 +0000 (17:10 +0000)]
Merge "AddRestrictCause"

5 years agoAdded riddlehsu@, louischang@, and erosky@ to WM OWNERS file
Siarhei Vishniakou [Wed, 17 Apr 2019 23:05:06 +0000 (16:05 -0700)]
Added riddlehsu@, louischang@, and erosky@ to WM OWNERS file

With great power comes great responsibility.

Test: none
Bug: none
Change-Id: Ibea2b226bac196bb340395426f0abdacbcff9495

5 years agoMerge "Inline calls to MimeUtils."
Tobias Thierer [Thu, 2 May 2019 13:41:44 +0000 (13:41 +0000)]
Merge "Inline calls to MimeUtils."

5 years agoMerge "Use dev/null instead of tmp file"
Treehugger Robot [Thu, 2 May 2019 13:04:39 +0000 (13:04 +0000)]
Merge "Use dev/null instead of tmp file"

5 years agoFix binder leakage when turning off Bluetooth
Ugo Yu [Tue, 26 Mar 2019 13:38:08 +0000 (21:38 +0800)]
Fix binder leakage when turning off Bluetooth

* In current design, Bluetooth AdapterState stops all BR/EDR
  profiles' service and triggers onServiceDisconnected callback to
  all binder clients before BluetoothManagerService invokes
  onBluetoothStateChange(false), which means unbind service
  would never be called in framework.
* Do unbind service when onServiceDisconnected is invoked.
* Move profile binder logic to BluetoothProfileConnector except:
  - BluetoothHeadset: its binder logic is in BluetoothManagerService
  - BluetoothPbap: it has an individual ServiceListener

Bug: 129037442
Bug: 129437895
Test: Bluetooth ON/OFF stress test.
      adb shell dumpsys activity services | egrep "com.android.bluetooth"
      to check whether AppBindRecord for com.android.bluetooth grows

Merged-In: Id0d85866d386962b94d2d966f0a864b1da165d13
Change-Id: Id0d85866d386962b94d2d966f0a864b1da165d13

5 years agoMerge "Freeze networkstack-aidl-interfaces as version 3."
Mark Chien [Thu, 2 May 2019 07:09:51 +0000 (07:09 +0000)]
Merge "Freeze networkstack-aidl-interfaces as version 3."

5 years agoMerge "Correct buffer size limitation for DnsResolver API"
Luke Huang [Thu, 2 May 2019 05:59:33 +0000 (05:59 +0000)]
Merge "Correct buffer size limitation for DnsResolver API"

5 years agoCorrect buffer size limitation for DnsResolver API
Luke Huang [Thu, 2 May 2019 03:46:25 +0000 (11:46 +0800)]
Correct buffer size limitation for DnsResolver API

Bug: 131055651
Test: atest DnsResolverTest
Change-Id: I29decd480172eacb452ccb0da524ef1bf2ffadcf

5 years agoMerge "Add CTS API coverage for APIs which are used by NetworkStack"
Paul Hu [Thu, 2 May 2019 01:37:26 +0000 (01:37 +0000)]
Merge "Add CTS API coverage for APIs which are used by NetworkStack"

5 years agoMerge "Update getUiccCardsInfo doc"
Jordan Liu [Wed, 1 May 2019 21:32:46 +0000 (21:32 +0000)]
Merge "Update getUiccCardsInfo doc"

5 years agoMerge "Add EuiccManager#EXTRA_PHYSICAL_SLOT_ID to detect it's an operation for pSIM."
Xiangyu/Malcolm Chen [Wed, 1 May 2019 20:49:16 +0000 (20:49 +0000)]
Merge "Add EuiccManager#EXTRA_PHYSICAL_SLOT_ID to detect it's an operation for pSIM."

5 years agoAdd EuiccManager#EXTRA_PHYSICAL_SLOT_ID to detect it's an operation for pSIM.
Holly Jiuyu Sun [Mon, 15 Apr 2019 21:04:12 +0000 (14:04 -0700)]
Add EuiccManager#EXTRA_PHYSICAL_SLOT_ID to detect it's an operation for pSIM.

Platform needs to pass LPA the pSIM slotId so that LPA knows it's a
toggle action on pSIM.

Bug: 123945155
Test: build
Change-Id: Ie0db50e8ade4c6ce385ebfbfe7cf9e2982d67e34
Merged-In: Ie0db50e8ade4c6ce385ebfbfe7cf9e2982d67e34

5 years agoUpdate getUiccCardsInfo doc
Jordan Liu [Mon, 22 Apr 2019 22:16:10 +0000 (15:16 -0700)]
Update getUiccCardsInfo doc

This method will return info for inactive eUICCs, filtered by carrier
privilege. (Since we can't read carrier privilege on an inactive eUICC,
we always assume that the caller does not have carrier privilege).

Bug: 130826215
Test: manual
Change-Id: Id89fa48f119004b6c18bd21791396bc6c3df2c95
Merged-In: Id89fa48f119004b6c18bd21791396bc6c3df2c95

5 years agoMerge "Support IPv6 Bluetooth tethering"
Treehugger Robot [Wed, 1 May 2019 15:12:21 +0000 (15:12 +0000)]
Merge "Support IPv6 Bluetooth tethering"

5 years agoMerge "Make NetworkStack actually build in an unbundled setup."
Treehugger Robot [Wed, 1 May 2019 14:04:59 +0000 (14:04 +0000)]
Merge "Make NetworkStack actually build in an unbundled setup."

5 years agoMerge "hiddenapi: Support greylist-max-q"
Treehugger Robot [Wed, 1 May 2019 14:01:29 +0000 (14:01 +0000)]
Merge "hiddenapi: Support greylist-max-q"

5 years agoMake NetworkStack actually build in an unbundled setup.
Lorenzo Colitti [Wed, 1 May 2019 02:54:33 +0000 (11:54 +0900)]
Make NetworkStack actually build in an unbundled setup.

The Java code was already using sdk_version: "current", but the
JNI library did not have an sdk_version attribute, and had
forbidden dependencies on internal libraries such as libcutils,
liblog and libnativehelper.

This CL fixes things as follows:
- Use the NDK log functions, and switch to the NDK liblog.
- Switch to the NDK libnativehelper.
- Drop the dependencies on libcutils and libpcap, which were
  unused.
- Use the libc++ STL, and set the sdk_version of the library to
  current.

Bug: 131703417
Test: m
Test: installed NetworkStack APK via "adb install --staged" results in working networking
Test: builds, boots, wifi works
Test: atest FrameworksNetTests NetworkStackTests

(cherry picked from commit 3d680e887ba40cde436a5745578e67d4a6a6fce9)

Change-Id: I8a0a8d4b4e8872cb88ee526772ae519a8e6df615

5 years agoSupport IPv6 Bluetooth tethering
Milim [Tue, 30 Apr 2019 06:19:28 +0000 (15:19 +0900)]
Support IPv6 Bluetooth tethering

Test: build
Fix: 130843211
Change-Id: I6dac50b39aabad1fd907325090af6aaf53d68c67

5 years agohiddenapi: Support greylist-max-q
David Brazdil [Wed, 1 May 2019 10:57:05 +0000 (11:57 +0100)]
hiddenapi: Support greylist-max-q

Test: set maxTargetSdk=Q on an API, compiles, check hiddenapi-flags.csv
Change-Id: I990972d652d4f4bc578592a9b3d9954f93b1ab9f

5 years agoFreeze networkstack-aidl-interfaces as version 3.
markchien [Tue, 30 Apr 2019 02:27:23 +0000 (10:27 +0800)]
Freeze networkstack-aidl-interfaces as version 3.

IIpClient#addNattKeepalivePacketFilter is the only difference
between version 2 and 3.

Generated with: m networkstack-aidl-interfaces-freeze-api

Test: -builds, boots
      - atest NetworkStackTests
      - atest ConnectivityServiceTest
Bug: 128803828

Change-Id: I22333c3c5930415cc43d83bc8cc6f566d0acb1f2
Merged-In: I22333c3c5930415cc43d83bc8cc6f566d0acb1f2
(cherry picked from commit a9690c1f66c63ce4dd22f622cc9980d89ad40d20)

5 years agoMerge "HwBinder: call _exit over exit."
Treehugger Robot [Tue, 30 Apr 2019 23:46:35 +0000 (23:46 +0000)]
Merge "HwBinder: call _exit over exit."

5 years agoMerge "Fix tests/runtests.sh"
Michael Plass [Tue, 30 Apr 2019 22:12:38 +0000 (22:12 +0000)]
Merge "Fix tests/runtests.sh"

5 years agoAddRestrictCause
Youming Ye [Tue, 30 Apr 2019 21:26:51 +0000 (14:26 -0700)]
AddRestrictCause

Bug: 130744052
Test: Build
Change-Id: I51c49b8736c42276f7fd66168eeb3f9959b4d492

5 years agoMerge "Add PhoneAccountHandle method to check if 2 accts are from same CS."
Tyler Gunn [Tue, 30 Apr 2019 20:30:13 +0000 (20:30 +0000)]
Merge "Add PhoneAccountHandle method to check if 2 accts are from same CS."

5 years agoWhitelist 30075 for Switzerland
Hall Liu [Tue, 30 Apr 2019 17:05:48 +0000 (10:05 -0700)]
Whitelist 30075 for Switzerland

This number is a visual voicemail SMS number for Swisscom.

Bug: 120403639
Test: N/A
Change-Id: I8d8d6413b7f9869c13605e5175e4a20d48b3a23d

5 years agoAdd CTS API coverage for APIs which are used by NetworkStack
paulhu [Thu, 18 Apr 2019 07:24:48 +0000 (15:24 +0800)]
Add CTS API coverage for APIs which are used by NetworkStack

Change-Id: I4f6c34f3bcfa65e60cf73fc1b7cab2d83c32836a
Bug: 129200003
Bug: 129200292
Bug: 129199996
Bug: 129200261
Bug: 129200513
Bug: 129200316
Bug: 129200589
Bug: 129200181
Bug: 129200669
Bug: 129200504
Bug: 129200478
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass

5 years agoMerge "Update team members in the OWNERS file. DO NOT MERGE"
Al Sutton [Tue, 30 Apr 2019 07:30:24 +0000 (07:30 +0000)]
Merge "Update team members in the OWNERS file. DO NOT MERGE"

5 years agoAdd calling package parameter to IRcs methods
Leland Miller [Tue, 5 Mar 2019 21:43:57 +0000 (13:43 -0800)]
Add calling package parameter to IRcs methods

This will be used for permission handling in the IRcs service.

Test: Existing tests pass, both unit and RcsCtsTestCases
Change-Id: I7f2183cd2f764b8293d29dc2c278479e06d9d8a2

5 years agoMerge "Add EPROTONOSUPPORT to IpSecManager SSE map"
Benedict Wong [Mon, 29 Apr 2019 19:59:38 +0000 (19:59 +0000)]
Merge "Add EPROTONOSUPPORT to IpSecManager SSE map"

5 years agoHwBinder: call _exit over exit.
Steven Moreland [Mon, 29 Apr 2019 17:00:04 +0000 (10:00 -0700)]
HwBinder: call _exit over exit.

Avoid calls to static destructors.

Fixes: 131589658
Test: TH
Change-Id: I52ddcda75e902965f8d4a13f4851e6bdcbe4b0e5

5 years agoMerge "Support adding NATT keepalive packet filter"
Mark Chien [Mon, 29 Apr 2019 15:59:16 +0000 (15:59 +0000)]
Merge "Support adding NATT keepalive packet filter"

5 years agoMerge "Add Network, NetworkCapabilities, StaticIpConfiguration common test cases"
Paul Hu [Mon, 29 Apr 2019 15:38:48 +0000 (15:38 +0000)]
Merge "Add Network, NetworkCapabilities, StaticIpConfiguration common test cases"

5 years agoMerge "Freeze {ipmemorystore,networkstack}-aidl-interfaces as version 2."
Treehugger Robot [Mon, 29 Apr 2019 13:55:06 +0000 (13:55 +0000)]
Merge "Freeze {ipmemorystore,networkstack}-aidl-interfaces as version 2."

5 years agoSupport adding NATT keepalive packet filter
Aaron Huang [Fri, 19 Apr 2019 14:47:26 +0000 (22:47 +0800)]
Support adding NATT keepalive packet filter

Support adding NATT keepalive packet filter to APF
filter.
Generating APF program will be addressed in another CL.

Bug: 33530442
Test: - atest NetworkStackTests
      - atest FrameworksNetTests

Change-Id: I4961d5da343d8700600269632787c28112f0f9f1

5 years agoUpdate team members in the OWNERS file. DO NOT MERGE
Al Sutton [Wed, 24 Apr 2019 16:59:08 +0000 (17:59 +0100)]
Update team members in the OWNERS file. DO NOT MERGE

Change-Id: I7f23507e1ec9a5763579160f7942bf2f55df1bfb
Test: build/make/tools/checkowners.py -c -v OWNERS
Fixes: 129861520

5 years agoFreeze {ipmemorystore,networkstack}-aidl-interfaces as version 2.
Lorenzo Colitti [Mon, 29 Apr 2019 10:32:42 +0000 (19:32 +0900)]
Freeze {ipmemorystore,networkstack}-aidl-interfaces as version 2.

Generated with:
m networkstack-aidl-interfaces-freeze-api \
    ipmemorystore-aidl-interfaces-freeze-api

Test: builds, boots
Bug: 128803828
Change-Id: I079018679766738a97b827bc87a6903655f308dd

5 years agoMerge "Add AIDL parcelable for NattKeepalivePacketData"
Mark Chien [Mon, 29 Apr 2019 10:26:35 +0000 (10:26 +0000)]
Merge "Add AIDL parcelable for NattKeepalivePacketData"

5 years agoAdd Network, NetworkCapabilities, StaticIpConfiguration common test cases
paulhu [Mon, 29 Apr 2019 10:07:51 +0000 (18:07 +0800)]
Add Network, NetworkCapabilities, StaticIpConfiguration common test cases

Bug: 129200415
Bug: 129200142
Bug: 129200418
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Change-Id: I568d516e1ffc9e32061ca6860224c102bdfd7445

5 years agoMerge "Revert "Make the network stack a persistent process.""
Lorenzo Colitti [Mon, 29 Apr 2019 01:40:34 +0000 (01:40 +0000)]
Merge "Revert "Make the network stack a persistent process.""

5 years agoMerge changes Ia9865c75,I47d9d53d,Idbe10c36
Lorenzo Colitti [Mon, 29 Apr 2019 00:50:30 +0000 (00:50 +0000)]
Merge changes Ia9865c75,I47d9d53d,Idbe10c36

* changes:
  Fix some checkstyle nits in DhcpPacketTest.
  Additional code for server name in DHCP packets.
  Parse the server host name field of the dhcp package

5 years agoRevert "Make the network stack a persistent process."
Lorenzo Colitti [Sat, 27 Apr 2019 15:02:50 +0000 (15:02 +0000)]
Revert "Make the network stack a persistent process."

This reverts commit 796afddd6c7012dc7f10bc2557eb06767c5d873a.

Reason for revert: breaks updatability because persistent processes are not updatable.

Change-Id: I35ded113b31e742f13ad8523a10af3a83a111374

5 years agoFix some checkstyle nits in DhcpPacketTest.
Lorenzo Colitti [Sat, 27 Apr 2019 07:36:39 +0000 (16:36 +0900)]
Fix some checkstyle nits in DhcpPacketTest.

Use the Generated code suppression comment filter instead of the
IndentationCheck suppression comment filter because the latter
complains that '+' should be on a new line.

Bug: 120584519
Bug: 127423755
Test: atest NetworkStackTests
Test: atest FrameworksNetTests
Change-Id: Ia9865c75f940e2fbb3aef374a297339e8ea2fd1b

5 years agoAdditional code for server name in DHCP packets.
Lorenzo Colitti [Fri, 26 Apr 2019 10:10:20 +0000 (19:10 +0900)]
Additional code for server name in DHCP packets.

- Add the hostname to DhcpResultsParcelable.
- Don't store the server hostname if option overload is in use,
  as this is not valid.
- Add unit tests.

Bug: 120584519
Bug: 127423755
Test: atest NetworkStackTests
Test: atest FrameworksNetTests
Change-Id: I47d9d53d1fb58968322cc8b071a44fbc8f7156e1

5 years agoFix tests/runtests.sh
Otto Seiskari [Fri, 12 Apr 2019 10:16:14 +0000 (13:16 +0300)]
Fix tests/runtests.sh

The location of FrameworksWifiTests.apk installed by the script
with adb seems to have changed. The path of the APK contains the
TARGET_ARCH environment variable, which is now fetched
with a similar method as in system/netd/tests/runtests.sh.

Noticed the issue with "lunch aosp_x86_64-eng". Before this fix,
the test script produced an error:

    adb: failed to stat [...]/FrameworksWifiApiTests.apk:
    No such file or directory

Test: ./frameworks/base/wifi/tests/runtests.sh

Change-Id: Id4a33ca89fa21a9a4ef791c5c1c5760e0e2badaf
Merged-In: Id4a33ca89fa21a9a4ef791c5c1c5760e0e2badaf
Signed-off-by: Otto Seiskari <otto.seiskari@indooratlas.com>
5 years agoInline calls to MimeUtils.
Tobias Thierer [Fri, 26 Apr 2019 14:26:41 +0000 (15:26 +0100)]
Inline calls to MimeUtils.

A separate CL in this topic adds MimeMap to the @CorePlatformApi and
deletes MimeUtils. This CL inlines calls to MimeUtils to call MimeMap
instead.

Bug: 120171727
Test: Treehugger
Change-Id: Ibad1e62a63342fa7527332d2b156b69517956364

5 years agoParse the server host name field of the dhcp package
yuanyunli [Wed, 9 Jan 2019 08:59:37 +0000 (16:59 +0800)]
Parse the server host name field of the dhcp package

Some hotspot devices will fill in the server host name field of the DHCP
package, such as iphone. Parsing the server host name of the DHCP
package can help identify ios hotspots.

Bug: 120584519
Test: 127423755
Test: builds, boots, wifi works
Change-Id: Idbe10c36332ce421f1bba93eb87e9e1e12463088

5 years agoMerge "Convert misc tests Android.mk files to Android.bp"
Treehugger Robot [Fri, 26 Apr 2019 13:10:24 +0000 (13:10 +0000)]
Merge "Convert misc tests Android.mk files to Android.bp"

5 years agoMerge "Add validation type definition to support multiple probe result"
Lorenzo Colitti [Fri, 26 Apr 2019 10:32:19 +0000 (10:32 +0000)]
Merge "Add validation type definition to support multiple probe result"

5 years agoMerge "Make DNS cache lifecycle management explicit"
Lorenzo Colitti [Fri, 26 Apr 2019 00:23:22 +0000 (00:23 +0000)]
Merge "Make DNS cache lifecycle management explicit"

5 years agoMerge "Fixed the comment of carrier config for CDNR"
Pengquan Meng [Thu, 25 Apr 2019 22:07:25 +0000 (22:07 +0000)]
Merge "Fixed the comment of carrier config for CDNR"

5 years agoFixed the comment of carrier config for CDNR
Pengquan Meng [Tue, 23 Apr 2019 20:55:02 +0000 (13:55 -0700)]
Fixed the comment of carrier config for CDNR

Bug: 122921456
Test: build
Merged-In: If5cc8d37ba1e66d59e5bfe9444fe4108f2263be9
Change-Id: If5cc8d37ba1e66d59e5bfe9444fe4108f2263be9
(cherry picked from commit 7ac9a8f314ad8be530f6745a947b90bfcff9495c)

5 years agoAdd validation type definition to support multiple probe result
Chiachang Wang [Thu, 25 Apr 2019 15:58:27 +0000 (23:58 +0800)]
Add validation type definition to support multiple probe result

In order to allow NetworkMonitor to tell ConnectivityService
if the network is either parital, validated or both.
NetworkMonitor could update the probe result by passing the
bitmask to ConnectivityService.

Bug: 130078798
Bug: 130683832
Test: build
Change-Id: I429ccbd9b9afae3eafaf73b3c9eb835213c1f64d

5 years agoMerge "Remove Settings constants for NetworkStack"
Chiachang Wang [Thu, 25 Apr 2019 04:49:04 +0000 (04:49 +0000)]
Merge "Remove Settings constants for NetworkStack"

5 years agoMerge "Update exception type thrown when NetworkStack is missing"
Chiachang Wang [Thu, 25 Apr 2019 03:48:52 +0000 (03:48 +0000)]
Merge "Update exception type thrown when NetworkStack is missing"

5 years agoRemove Settings constants for NetworkStack
Chiachang Wang [Thu, 25 Apr 2019 01:47:27 +0000 (09:47 +0800)]
Remove Settings constants for NetworkStack

The definitions reference of these constants are moved from
Settings to DeviceConfig. These definitions are @hide and the
usage in the Settings are removed. Thus, remove the definitions
from API level.

Bug: 123167629
Test: make system-api-stubs-docs-update-current-api \
      test-api-stubs-docs-update-current-api
Test: atest NetworkStackTests
Change-Id: I28c4bf2c0b72e154cea91d11007a9497c7f21570
Merged-In: I7291cfa86cd6e907df35e8fbc97e2e9a77e56cab
Merged-In: Ic48bea07e79490dd3787068bc88c748525752a61

5 years agoMerge "Add privapp permissions to network modules."
Lorenzo Colitti [Thu, 25 Apr 2019 02:05:19 +0000 (02:05 +0000)]
Merge "Add privapp permissions to network modules."

5 years agoMerge "Use injected instance of RcsControllerCall"
Treehugger Robot [Wed, 24 Apr 2019 23:48:40 +0000 (23:48 +0000)]
Merge "Use injected instance of RcsControllerCall"

5 years agoMerge "Do not populate SLOT_KEY with wrong slot info"
Jordan Liu [Wed, 24 Apr 2019 23:04:25 +0000 (23:04 +0000)]
Merge "Do not populate SLOT_KEY with wrong slot info"

5 years agoAdd EPROTONOSUPPORT to IpSecManager SSE map
Benedict Wong [Mon, 16 Jul 2018 21:56:20 +0000 (14:56 -0700)]
Add EPROTONOSUPPORT to IpSecManager SSE map

This change maps EPROTONOSUPPORT to the list of error codes that map to
UnsupportedOperationException in IpSecManager.

Bug: 80103456
Test: Compiles, CTS tests ran
Change-Id: Iec3d5fc4a9bcad7c104414afefae775232d46558

5 years agoDo not populate SLOT_KEY with wrong slot info
Jordan Liu [Mon, 22 Apr 2019 20:58:02 +0000 (13:58 -0700)]
Do not populate SLOT_KEY with wrong slot info

The slotId is not necessarily the phoneId, so do not broadcast as if it
is. SLOT_KEY is a hidden extra so this should not impact apps in general
(if they need the old extra they can still use the hidden PHONE_KEY).

For select broadcasts like SIM_CARD_STATE_CHANGED, we will manually
populate the slot key. This is a temporary solution to b/130664115 and
we should eventually review and consider making the SLOT_KEY public for
some broadcasts.

Bug: 130664115
Test: manual
Change-Id: I84bd4c6bc4277e32cee9916dd18dd80948a808a0
Merged-In: I84bd4c6bc4277e32cee9916dd18dd80948a808a0

5 years agoMerge "Add 5G evolution icon"
SongFerng Wang [Wed, 24 Apr 2019 16:41:14 +0000 (16:41 +0000)]
Merge "Add 5G evolution icon"

5 years agoMerge "Make the network stack a persistent process."
Treehugger Robot [Wed, 24 Apr 2019 16:25:24 +0000 (16:25 +0000)]
Merge "Make the network stack a persistent process."

5 years agoAdd 5G evolution icon
SongFerngWang [Thu, 21 Mar 2019 15:14:20 +0000 (23:14 +0800)]
Add 5G evolution icon

This add the 5GE icon to the system UI for specific carriers
LTE CA network.

Bug: 124768697
Test: build & manually test:
fake the operator name with pattern, and check the status bar data icon.

Change-Id: Ife0401219138c7ed22e7bfbd4d5e8648c54a98a8
Merged-In: Ife0401219138c7ed22e7bfbd4d5e8648c54a98a8

5 years agoMerge "Remove unused methods from INetworkManagementService"
Treehugger Robot [Wed, 24 Apr 2019 14:29:39 +0000 (14:29 +0000)]
Merge "Remove unused methods from INetworkManagementService"

5 years agoAdd privapp permissions to network modules.
Lorenzo Colitti [Wed, 24 Apr 2019 13:51:49 +0000 (22:51 +0900)]
Add privapp permissions to network modules.

When built as part of the system, the network stack and the
captive portal login app should have the BYPASS_PRIVATE_DNS
and CONNECTIVITY_USE_RESTRICTED_NETWORKS permissions.
These are necessary to validate restricted networks, bypass VPNs,
bypass private DNS for captive portal login, etc. Add these
permissions to privapp-permissions-platform.xml.

When installed as mainline modules that cannot use signature
permissions, the modules get this ability by virtue of having the
MAINLINE_NETWORK_STACK permissions.

Additionally, add the CONNECTIVITY_USE_RESTRICTED_NETWORKS
permission to the captive portal login app manifest, which did
not contain it.

Bug: 129789428
Test: builds, boots
Test: dumpsys package shows permissions
Change-Id: I632359f7eff09fed71167733ac75824a5aa57894

5 years agoUpdate exception type thrown when NetworkStack is missing
Chiachang Wang [Wed, 24 Apr 2019 13:44:05 +0000 (21:44 +0800)]
Update exception type thrown when NetworkStack is missing

rethrowFromSystemServer is throwing DeadSystemException which
is different from the original log message. Thus, update the
way to rethrow the same RemoteException.

Bug: 130028724
Test: atest FrameworksNetTest
Test: Kill NetworkStack and check the log message
Change-Id: I60862e276dd4e2d143278b272a9ba54219acce26

5 years agoMake the network stack a persistent process.
Lorenzo Colitti [Wed, 24 Apr 2019 13:26:42 +0000 (22:26 +0900)]
Make the network stack a persistent process.

The network stack should never be killed, because if it does,
recovering networking requires a reboot. Make the process
persistent to reduce the chances of it being killed by the OOM
killer.

Bug: 131046856
Test: builds, boots
Test: process oom_score_adj is -800
Test: process goes from "Persistent Service" to "Persistent" in dumpsys meminfo
Change-Id: Ic8ebf6356e23489f6cd984d680ff9f1b4cbbe52d

5 years agoMerge "Switch to HexEncoding from ByteStringUtils"
Neil Fuller [Wed, 24 Apr 2019 12:57:25 +0000 (12:57 +0000)]
Merge "Switch to HexEncoding from ByteStringUtils"

5 years agoMerge "Delete unused timeout constant."
Treehugger Robot [Wed, 24 Apr 2019 09:44:14 +0000 (09:44 +0000)]
Merge "Delete unused timeout constant."

5 years agoMerge "Reinstate new VPN uid filtering unit tests"
Treehugger Robot [Wed, 24 Apr 2019 09:37:49 +0000 (09:37 +0000)]
Merge "Reinstate new VPN uid filtering unit tests"