OSDN Git Service

android-x86/frameworks-base.git
5 years agoMerge "Tethering: fix using wrong subId problem"
Mark Chien [Tue, 16 Apr 2019 12:31:10 +0000 (12:31 +0000)]
Merge "Tethering: fix using wrong subId problem"

5 years agoMerge "Notify the caller about I/O error"
Treehugger Robot [Tue, 16 Apr 2019 11:52:31 +0000 (11:52 +0000)]
Merge "Notify the caller about I/O error"

5 years agoTethering: fix using wrong subId problem
markchien [Tue, 9 Apr 2019 07:53:24 +0000 (15:53 +0800)]
Tethering: fix using wrong subId problem

There is the potential bug[1] that default data subId change
intent may lose. So tethering may cache the outdated default
data subId in TetheringConfiguration. Now EntitlementManager
would fetch configuration every time and this would re-exam
whether subId is changed.
Additional passing subId to Settings to avoid default data
subId change right away when launching entitlement check.
Thus, Settings can know whether this is outdated entitlement
check request.
[1] b/129224596

Bug: 129751453
Test: -build, flash, boot
      -atest FrameworksNetTests
      -manual test with carrier SIM

Change-Id: If334dd1cd383cced9db5cf0d0bc9dc60ed198816

5 years agoNotify the caller about I/O error
Abhijeet Kaur [Mon, 15 Apr 2019 09:16:42 +0000 (10:16 +0100)]
Notify the caller about I/O error

Call onError for caller of BugreportManager.start() if any io error
occurs during runtime.

Test: Tested manually by throwing IO exception in the code when
bugreport is being generated, onError of the callback successfully
called.
Change-Id: I9033d85d392b926041fc26a86806a370752d062d

5 years agoMerge "Fix DnsResolver API could not bypass private DNS correctly"
Luke Huang [Tue, 16 Apr 2019 09:03:22 +0000 (09:03 +0000)]
Merge "Fix DnsResolver API could not bypass private DNS correctly"

5 years agoMerge "Restrict access to dangerous methods to <= P"
Chalard Jean [Tue, 16 Apr 2019 05:17:20 +0000 (05:17 +0000)]
Merge "Restrict access to dangerous methods to <= P"

5 years agoMerge "Release keepalive slot after stopped"
Junyu Lai [Tue, 16 Apr 2019 04:46:18 +0000 (04:46 +0000)]
Merge "Release keepalive slot after stopped"

5 years agoFix DnsResolver API could not bypass private DNS correctly
Luke Huang [Tue, 16 Apr 2019 03:50:15 +0000 (11:50 +0800)]
Fix DnsResolver API could not bypass private DNS correctly

Bug: 130594022
Test: atest DnsResolverTest
Change-Id: Ibf3edac3075d921d189237c485871efb869b320b

5 years agoMerge "Add comments in grouping APIs to clarify possible exceptions."
Xiangyu/Malcolm Chen [Mon, 15 Apr 2019 23:47:41 +0000 (23:47 +0000)]
Merge "Add comments in grouping APIs to clarify possible exceptions."

5 years agoMerge "Add EHPLMN and HPLMN to SubscriptionInfo"
Hall Liu [Mon, 15 Apr 2019 23:27:40 +0000 (23:27 +0000)]
Merge "Add EHPLMN and HPLMN to SubscriptionInfo"

5 years agoMerge "Fix Emergency Number API doc"
Shuo Qian [Mon, 15 Apr 2019 23:12:42 +0000 (23:12 +0000)]
Merge "Fix Emergency Number API doc"

5 years agoMerge "Get new surface if it was released from setWindowStopped"
Treehugger Robot [Mon, 15 Apr 2019 22:52:55 +0000 (22:52 +0000)]
Merge "Get new surface if it was released from setWindowStopped"

5 years agoAdd comments in grouping APIs to clarify possible exceptions.
Malcolm Chen [Thu, 4 Apr 2019 01:39:21 +0000 (18:39 -0700)]
Add comments in grouping APIs to clarify possible exceptions.

Bug: 127408608
Test: cts, unittest, TelephonyManagerTestApp
Change-Id: I3671e366be7e8c3a75b5ee23b7cf88a33ecd3a4f
Merged-In: I3671e366be7e8c3a75b5ee23b7cf88a33ecd3a4f

5 years agoFix Emergency Number API doc
sqian [Fri, 12 Apr 2019 23:35:13 +0000 (16:35 -0700)]
Fix Emergency Number API doc

1) remove documentation about null return
2) Map including the key*s* as the active subscription ID*s*

Bug: 130426238
Test: Treehugger
Change-Id: I4c9b682ef25378b9de91cd6255ed6fc514ea220d
Merged-In: I4c9b682ef25378b9de91cd6255ed6fc514ea220d
(cherry picked from commit aca6eb7dac0a307756d0c3e76b26503618f40df5)

5 years agoAdd EHPLMN and HPLMN to SubscriptionInfo
Hall Liu [Thu, 11 Apr 2019 22:28:20 +0000 (15:28 -0700)]
Add EHPLMN and HPLMN to SubscriptionInfo

Add EHPLMN and HPLMN fields to SubscriptionInfo. These fields are read
from the ICC card.

Bug: 130253962
Test: manual
Change-Id: If98c57c14e39b917a5e7e8bbc59c2170989b63a7

5 years agoMerge "Refine Bluetooth Metadata API"
Treehugger Robot [Mon, 15 Apr 2019 20:37:28 +0000 (20:37 +0000)]
Merge "Refine Bluetooth Metadata API"

5 years agoMerge "Add NonNull in Carriers constant"
Treehugger Robot [Mon, 15 Apr 2019 19:53:50 +0000 (19:53 +0000)]
Merge "Add NonNull in Carriers constant"

5 years agoAdd NonNull in Carriers constant
calvinpan [Fri, 12 Apr 2019 01:14:02 +0000 (09:14 +0800)]
Add NonNull in Carriers constant

Add NonNull in Carriers constant

Bug: 126699334
Test: build pass
Change-Id: Ifda6407092847e8863cba79360eba3df12f9c7e1
Merged-In: I428ff623d46d3891b05882df5774343bfe3234c0

5 years agoMerge "Switch ByteStringUtils over to HexEncoding impl"
Neil Fuller [Mon, 15 Apr 2019 17:30:35 +0000 (17:30 +0000)]
Merge "Switch ByteStringUtils over to HexEncoding impl"

5 years agoMerge "Move some telephony methods to max-sdk-p list."
Mathew Inwood [Mon, 15 Apr 2019 12:16:09 +0000 (12:16 +0000)]
Merge "Move some telephony methods to max-sdk-p list."

5 years agoMerge "Update OWNERS"
Treehugger Robot [Mon, 15 Apr 2019 10:46:32 +0000 (10:46 +0000)]
Merge "Update OWNERS"

5 years agoRelease keepalive slot after stopped
junyulai [Tue, 9 Apr 2019 06:37:35 +0000 (14:37 +0800)]
Release keepalive slot after stopped

Currntly, keepalive slot is released when stop() is called. Next
starting keepalive can use the same slot number while previous
keepalive is still stopping. When the previous keepalive is
stopped, the incoming as will be processed by the new keepalive.

This change release keepalive slot after the result of stopping
has returned. Thus, newly created keepalive cannot allocate the
same slot number while lower layer is still processing stop event.

This change also disable flaky assertions that are caused by
test port has been occupied by other process.

Bug: 129512753
Test: 1. atest com.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 100
      2. atest FrameworksNetTests --generate-new-metrics 10
      3. simulate the fail case manually.

Change-Id: I1991627545519ee5cb408a3df3a006f710f4af7b

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 14:36:12 +0000 (14:36 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 12:35:12 +0000 (12:35 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 12:14:21 +0000 (12:14 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 12:13:21 +0000 (12:13 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 12:10:24 +0000 (12:10 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 12:10:21 +0000 (12:10 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 12:02:25 +0000 (12:02 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 12:02:21 +0000 (12:02 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 11:59:26 +0000 (11:59 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 11:58:45 +0000 (11:58 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 11:58:42 +0000 (11:58 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoMerge "Import translations. DO NOT MERGE"
Treehugger Robot [Sat, 13 Apr 2019 11:47:32 +0000 (11:47 +0000)]
Merge "Import translations. DO NOT MERGE"

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 09:08:02 +0000 (02:08 -0700)]
Import translations. DO NOT MERGE

Change-Id: I3488f6c74138241f29504eafd73569f780ee9a74
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 06:23:15 +0000 (23:23 -0700)]
Import translations. DO NOT MERGE

Change-Id: Ib4bb37b12e29ecd0a1a8a726d4a761eaba4abd1f
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 06:15:48 +0000 (23:15 -0700)]
Import translations. DO NOT MERGE

Change-Id: I492f38a82826682746367dfb5122e22b934712f2
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 04:17:01 +0000 (21:17 -0700)]
Import translations. DO NOT MERGE

Change-Id: I219d0c8ab1cf805a0f32e64b53dee3a94abfa68a
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 04:09:30 +0000 (21:09 -0700)]
Import translations. DO NOT MERGE

Change-Id: I55e7b90aabc7dbc880c72cffe1e5282c8ef27f1d
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 04:02:07 +0000 (21:02 -0700)]
Import translations. DO NOT MERGE

Change-Id: I1f5ac7cc91022343245dad427a0dd40c4ed12594
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 02:47:39 +0000 (19:47 -0700)]
Import translations. DO NOT MERGE

Change-Id: Ia4b5b3d094538e5a3e64613a9b7dc11591aaf809
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 02:40:50 +0000 (19:40 -0700)]
Import translations. DO NOT MERGE

Change-Id: I0f47607801a75f9c98ec454e7902102dc3e39988
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 02:11:58 +0000 (19:11 -0700)]
Import translations. DO NOT MERGE

Change-Id: I6d280118ec178a0e787498bd9e38c816e156e6bb
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 01:58:20 +0000 (18:58 -0700)]
Import translations. DO NOT MERGE

Change-Id: I5b163a3870ef427527470e0443bab579cb88ea36
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 01:50:31 +0000 (18:50 -0700)]
Import translations. DO NOT MERGE

Change-Id: I59be6fef50c3065874ca36a6ed77bfa93242c3ee
Auto-generated-cl: translation import

5 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 Apr 2019 01:42:35 +0000 (18:42 -0700)]
Import translations. DO NOT MERGE

Change-Id: I271a1675c49cfaabbf3cb74c2d805390efc2161f
Auto-generated-cl: translation import

5 years agoMerge "Fixed the incorrect function signature"
Jack Yu [Fri, 12 Apr 2019 23:13:38 +0000 (23:13 +0000)]
Merge "Fixed the incorrect function signature"

5 years agoMerge "Remove key_ prefix from CarrierConfig Strings"
Nathan Harold [Fri, 12 Apr 2019 22:50:04 +0000 (22:50 +0000)]
Merge "Remove key_ prefix from CarrierConfig Strings"

5 years agoMerge "Ask netd to swap stats map before reading"
Treehugger Robot [Fri, 12 Apr 2019 22:35:52 +0000 (22:35 +0000)]
Merge "Ask netd to swap stats map before reading"

5 years agoMerge "Framework: Lock inversion checker"
Andreas Gampe [Fri, 12 Apr 2019 22:17:15 +0000 (22:17 +0000)]
Merge "Framework: Lock inversion checker"

5 years agoMerge "Add MEDIA_TIMEOUT error for RTCP timeout"
Treehugger Robot [Fri, 12 Apr 2019 21:54:13 +0000 (21:54 +0000)]
Merge "Add MEDIA_TIMEOUT error for RTCP timeout"

5 years agoMerge "Bluetooth: Make ScanRecord.getServiceSolicitationUuids NonNull"
Treehugger Robot [Fri, 12 Apr 2019 18:12:27 +0000 (18:12 +0000)]
Merge "Bluetooth: Make ScanRecord.getServiceSolicitationUuids NonNull"

5 years agoFramework: Lock inversion checker
Andreas Gampe [Mon, 4 Mar 2019 22:15:18 +0000 (14:15 -0800)]
Framework: Lock inversion checker

Add an agent-based lock inversion checker. The agent will dynamically
rewrite bytecode to inject calls to LockHook, which runs a checker
on these.

Implement a simple on-thread checker that keeps a per-thread stack
of locks and a global map of lock ordering. As-is, transitivity of
checks is not guaranteed, but should be captured in most practical
cases.

To run a process with the lock checker, start the process with the
agent. The helper script start_with_lockagent.sh can be used for this:

  adb shell setprop wrap.pkg-name script start_with_lockagent

(cherry picked from commit aeb6fce5b33680bc538dbd66979a28bcba1329b4)

Bug: 124744938
Test: manual
Merged-In: Idd9a7066a5b8cb8c0de2e995f08759c98d9473e1
Change-Id: Idd9a7066a5b8cb8c0de2e995f08759c98d9473e1

5 years agoMerge "Preload: Add a simple test for the state of classes"
Andreas Gampe [Fri, 12 Apr 2019 17:36:35 +0000 (17:36 +0000)]
Merge "Preload: Add a simple test for the state of classes"

5 years agoMerge "Pass core platform API policy property to ART"
David Brazdil [Fri, 12 Apr 2019 15:43:15 +0000 (15:43 +0000)]
Merge "Pass core platform API policy property to ART"

5 years agoMerge changes I4f181789,Ia8a0c99b
Lorenzo Colitti [Fri, 12 Apr 2019 13:11:18 +0000 (13:11 +0000)]
Merge changes I4f181789,Ia8a0c99b

* changes:
  Revert new tests and PackageManager mock
  Revert "Revert "Block incoming non-VPN packets to apps under fully-routed VPN""

5 years agoRevert new tests and PackageManager mock
Lorenzo Colitti [Fri, 12 Apr 2019 10:50:22 +0000 (19:50 +0900)]
Revert new tests and PackageManager mock

A mocked PackageManager caused test failures in existing tests.
Revert that for now to make tests pass again.

Bug: 114231106
Bug: 130397860
Test: atest FrameworksNetTests
Change-Id: I4f181789152438f18e6cd2d235d76fabe3872ea3

5 years agoRevert "Revert "Block incoming non-VPN packets to apps under fully-routed VPN""
Lorenzo Colitti [Fri, 12 Apr 2019 10:48:06 +0000 (10:48 +0000)]
Revert "Revert "Block incoming non-VPN packets to apps under fully-routed VPN""

This reverts commit 3897df2e36d4d015304b398c545c1232ee35a1c9.

Reason for revert: Rolling forward, will fix tests in same CL stack.

Bug: 114231106
Bug: 130397860
Test: FrameworksNetTests
Change-Id: Ia8a0c99b4e1fd5dff26c881715cd876618ca4321

5 years agoMerge "Revert "Block incoming non-VPN packets to apps under fully-routed VPN""
Remi NGUYEN VAN [Fri, 12 Apr 2019 10:25:46 +0000 (10:25 +0000)]
Merge "Revert "Block incoming non-VPN packets to apps under fully-routed VPN""

5 years agoPass core platform API policy property to ART
David Brazdil [Fri, 12 Apr 2019 10:18:07 +0000 (11:18 +0100)]
Pass core platform API policy property to ART

When starting ART, read property
""persist.debug.dalvik.vm.core_platform_api_policy" and pass its value
on the command line. This enables users to enable core platform API
violation reporting on demand. Note that the settings take effect after
a reboot.

Bug: 125701194
Test: compiles, boots, reporting observed
Change-Id: I97507afc85d8e186736700979c5dbf2ad0f79f12

5 years agoRevert "Block incoming non-VPN packets to apps under fully-routed VPN"
Remi NGUYEN VAN [Fri, 12 Apr 2019 09:05:40 +0000 (09:05 +0000)]
Revert "Block incoming non-VPN packets to apps under fully-routed VPN"

This reverts commit fd8f96d71925cc80f5052365af2e5150cc0ec3ca.
This change does not have any topic: not reverting the other 2 commits in the original topic.

Reason for revert: broke FrameworksNetTests presubmit: b/130397860

Change-Id: Iff41d9fe97fafea44680c8d67d1ce19277548cc0

5 years agoMerge changes from topic "nnapi_ext_restrict"
Przemyslaw Szczepaniak [Fri, 12 Apr 2019 08:50:56 +0000 (08:50 +0000)]
Merge changes from topic "nnapi_ext_restrict"

* changes:
  Remove PRODUCT_SERVICES from PackageManagerNative.getLocation.
  Add getLocationFlags getter to PackageManagerNative.

5 years agoMerge "Pass valid file descriptor to binder"
Treehugger Robot [Fri, 12 Apr 2019 08:23:33 +0000 (08:23 +0000)]
Merge "Pass valid file descriptor to binder"

5 years agoBluetooth: Make ScanRecord.getServiceSolicitationUuids NonNull
Jakub Pawlowski [Wed, 10 Apr 2019 16:48:57 +0000 (18:48 +0200)]
Bluetooth: Make ScanRecord.getServiceSolicitationUuids NonNull

Test: compilation
Bug: 115639878
Merged-In: I5f895d65a7036275ab0faa0afd2ee1eebc416476
Change-Id: I5f895d65a7036275ab0faa0afd2ee1eebc416476

5 years agoMerge "Add a lock to protect persistent stats snapshot"
Treehugger Robot [Fri, 12 Apr 2019 01:33:00 +0000 (01:33 +0000)]
Merge "Add a lock to protect persistent stats snapshot"

5 years agoMerge "Change the validation URL for Chinese SIMs"
Remi NGUYEN VAN [Fri, 12 Apr 2019 01:18:12 +0000 (01:18 +0000)]
Merge "Change the validation URL for Chinese SIMs"

5 years agoMerge "API council feedbacks for DnsResolver"
Luke Huang [Fri, 12 Apr 2019 00:45:18 +0000 (00:45 +0000)]
Merge "API council feedbacks for DnsResolver"

5 years agoMerge "Improve Range Checks on CellIdentity Classes"
Nathan Harold [Fri, 12 Apr 2019 00:35:38 +0000 (00:35 +0000)]
Merge "Improve Range Checks on CellIdentity Classes"

5 years agoRemove key_ prefix from CarrierConfig Strings
Nathan Harold [Thu, 11 Apr 2019 23:33:26 +0000 (16:33 -0700)]
Remove key_ prefix from CarrierConfig Strings

Remove the key_ prefix from the resolved string
of:
KEY_SUBSCRIPTION_GROUP_UUID_STRING; and
KEY_IS_OPPORTUNISTIC_SUBSCRIPTION_BOOL

Bug: 130374824
Test: compilation (trivial string change)
Change-Id: I1ae1df9d33229d3f3aba237d865ceb2373761af4

5 years agoPreload: Add a simple test for the state of classes
Andreas Gampe [Wed, 10 Apr 2019 22:21:18 +0000 (15:21 -0700)]
Preload: Add a simple test for the state of classes

Use app_process and reflection to find the class state.

This is expected to break when internals change, so include a test
for expectations.

Bug: 130206915
Test: atest PreloadCheck
Change-Id: I7ecdb88a19efcfcfa1c7aa5c7e67d1990306166e

5 years agoMerge "Update API for UiSelector."
Cody Kesting [Thu, 11 Apr 2019 22:11:12 +0000 (22:11 +0000)]
Merge "Update API for UiSelector."

5 years agoUpdate API for UiSelector.
Cody Kesting [Sat, 6 Apr 2019 16:39:59 +0000 (09:39 -0700)]
Update API for UiSelector.

Bug: 130371784
Test: API definition update. no impact to code.
Change-Id: I310b98426f0a8bc2e6c52f266ea669619a775552

5 years agoImprove Range Checks on CellIdentity Classes
Nathan Harold [Thu, 11 Apr 2019 00:39:27 +0000 (17:39 -0700)]
Improve Range Checks on CellIdentity Classes

Add range checks to ensure that parameters passed
to CellIdentity are within range; if not then set
them to the UNAVAILABLE value.

Bug: 122834811
Test: atest FrameworksTelephonyTests
Change-Id: I0d3699823be60722a1b741efd60b56f23bbc3e86

5 years agoPass valid file descriptor to binder
Abhijeet Kaur [Fri, 29 Mar 2019 17:04:48 +0000 (17:04 +0000)]
Pass valid file descriptor to binder

screenshotFd needs to be optional in Bugreport API. For some bugreports
such as wifi,telephony, interactive etc taking a screenshot is not
required.

Initially, the API was sending invalid file descriptor to the Binder, but
that binder transaction could not be completed as Binder validates the
file descriptor to be valid and not-null.

Adding a tmp.png screenshot file to pass to bugreport API call. In a
separate CL in frameworks/native, added check that the bugreports that
don't require screenshots would not use this file descriptor value.

Bug: 128981582
Test: Tested by taking bugreports using Bugreport API in shell
Merged-In: I3233f5753506ae159c9fa591742e6b99e361039b
Change-Id: I3233f5753506ae159c9fa591742e6b99e361039b
(cherry picked from commit b462e2e49964ed500b49ad07cbe80d96866d61bb)

5 years agoMerge "Block incoming non-VPN packets to apps under fully-routed VPN"
Rubin Xu [Thu, 11 Apr 2019 16:46:16 +0000 (16:46 +0000)]
Merge "Block incoming non-VPN packets to apps under fully-routed VPN"

5 years agoMerge "Create new RcsParticipantQueryResultParcelable"
Treehugger Robot [Thu, 11 Apr 2019 16:27:14 +0000 (16:27 +0000)]
Merge "Create new RcsParticipantQueryResultParcelable"

5 years agoAPI council feedbacks for DnsResolver
Luke Huang [Mon, 8 Apr 2019 07:16:04 +0000 (15:16 +0800)]
API council feedbacks for DnsResolver

To address the API review feedback provided by
the API council.

Bug: 129261432
Test: atest DnsResolverTest
Change-Id: I3de11c913682abf790850b45cd5d50ac28b3fc5c

5 years agoMerge "Add support for TAP interfaces in TestNetworkManager."
Lorenzo Colitti [Thu, 11 Apr 2019 11:45:40 +0000 (11:45 +0000)]
Merge "Add support for TAP interfaces in TestNetworkManager."

5 years agoMerge "provide a resource overlay to configure customized DNS Server."
Treehugger Robot [Thu, 11 Apr 2019 11:06:51 +0000 (11:06 +0000)]
Merge "provide a resource overlay to configure customized DNS Server."

5 years agoMerge "Address nit in NetworkStackUtils"
Chiachang Wang [Thu, 11 Apr 2019 10:48:58 +0000 (10:48 +0000)]
Merge "Address nit in NetworkStackUtils"

5 years agoMerge "Switch from Byte.toHexString() to HexEncoding"
Neil Fuller [Thu, 11 Apr 2019 09:27:54 +0000 (09:27 +0000)]
Merge "Switch from Byte.toHexString() to HexEncoding"

5 years agoSwitch from Byte.toHexString() to HexEncoding
Neil Fuller [Thu, 4 Apr 2019 20:02:06 +0000 (21:02 +0100)]
Switch from Byte.toHexString() to HexEncoding

Switch from Byte.toHexString() to HexEncoding equivalents.

Bug: 124232146
Test: build only
Exempt-From-Owner-Approval: Cherry-picking OWNERS approved internal version
Merged-In: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
Change-Id: Id244e5247eb87c67446cbd65eb5d320f3617b8cd

5 years agoChange the validation URL for Chinese SIMs
Remi NGUYEN VAN [Thu, 11 Apr 2019 06:36:06 +0000 (15:36 +0900)]
Change the validation URL for Chinese SIMs

The default HTTPS and fallback validation URLs are not accessible from
China, so users in China never get a validated network on WiFi with the
default AOSP settings. OEMs selling devices targeting China typically
change the check URLs for that reason.

When the device uses a Chinese SIM card, change the default validation
URLs to URLs accessible accessible from China as of now.

Test: inserted China SIM, WiFi off/on, dumpsys network_stack shows new
      URL used
Bug: 111819230
Change-Id: Ib7f41f470ef1a9c7712f2477ebfab44e915cf1b9

5 years agoprovide a resource overlay to configure customized DNS Server.
Xiao Ma [Tue, 9 Apr 2019 10:16:17 +0000 (19:16 +0900)]
provide a resource overlay to configure customized DNS Server.

Bug: 122621524
Test:  atest FrameworksNetTests NetworkStackTests
Change-Id: I123b3d4516cc6ba6d17629eb74daf448ba7121eb

5 years agoMerge "Remove @hide from builder of CarrierRestrictionRules"
Michele Berionne [Thu, 11 Apr 2019 06:27:08 +0000 (06:27 +0000)]
Merge "Remove @hide from builder of CarrierRestrictionRules"

5 years agoAddress nit in NetworkStackUtils
Chiachang Wang [Thu, 11 Apr 2019 03:10:51 +0000 (11:10 +0800)]
Address nit in NetworkStackUtils

Follow up commit to fix nit in aosp/937891

Bug: 120013793
Test: Build
Change-Id: I61a6306d3c439a2d72323ab56e2b47771cc60d48

5 years agoFixed the incorrect function signature
Jack Yu [Wed, 10 Apr 2019 17:50:01 +0000 (10:50 -0700)]
Fixed the incorrect function signature

The name source should be an integer instead of long

Test: Manual + unit tests
Bug: 130237749
Merged-In: Ic4447da24073d37401ae0f6e8f8b41bd60d7167d
Change-Id: Ic4447da24073d37401ae0f6e8f8b41bd60d7167d
(cherry picked from commit 5d8f6447a7e5e90d74cda99173adb1535a2770a7)

5 years agoMerge "Freeze netd AIDL interface (framework)"
Remi NGUYEN VAN [Thu, 11 Apr 2019 00:13:29 +0000 (00:13 +0000)]
Merge "Freeze netd AIDL interface (framework)"

5 years agoMerge "Disable XOM on libraries for apps with targetSdkVerison<Q"
Treehugger Robot [Thu, 11 Apr 2019 00:10:34 +0000 (00:10 +0000)]
Merge "Disable XOM on libraries for apps with targetSdkVerison<Q"

5 years agoRemove @hide from builder of CarrierRestrictionRules
Michele [Wed, 10 Apr 2019 21:29:00 +0000 (14:29 -0700)]
Remove @hide from builder of CarrierRestrictionRules

Remove @hide from builder of CarrierRestrictionRules class.

Bug: 124325937
Test: compilation

Change-Id: If05e7d950b6737a6bb92af962816c7cbc36b00d1

5 years agoAdd MEDIA_TIMEOUT error for RTCP timeout
Youming Ye [Wed, 10 Apr 2019 21:50:19 +0000 (14:50 -0700)]
Add MEDIA_TIMEOUT error for RTCP timeout

Bug: 130167535
Test: Build
Change-Id: I7498072a1c6a9ecf084308e91db07f3731969106

5 years agoMerge "Allow GSM RSSI levels to be customized by CarrierConfig"
Jack Yu [Wed, 10 Apr 2019 22:22:11 +0000 (22:22 +0000)]
Merge "Allow GSM RSSI levels to be customized by CarrierConfig"

5 years agoMerge "Update AppComponentFactory.instantiateClassLoader docs"
David Brazdil [Wed, 10 Apr 2019 22:18:02 +0000 (22:18 +0000)]
Merge "Update AppComponentFactory.instantiateClassLoader docs"

5 years agoDisable XOM on libraries for apps with targetSdkVerison<Q
Jeff Vander Stoep [Tue, 26 Mar 2019 03:27:52 +0000 (20:27 -0700)]
Disable XOM on libraries for apps with targetSdkVerison<Q

Apps may (and do) assume that libraries are readable. To avoid app
breakage, mark execute-only sections of as read+execute
for apps with targetSdkVersion<Q.

Bug: 128907672
Test: Check libc for app with targetSdk==current
cat /proc/25950/maps | grep libc.so
77c01e3000-77c028b000 --xp 00041000 07:20 106 /apex/com.android.runtime/lib64/bionic/libc.so
Test: Check libc for app with targetSdk<current
cat /proc/26355/maps | grep libc.so
77c01e3000-77c028b000 r-xp 00041000 07:20 106
/apex/com.android.runtime/lib64/bionic/libc.so

Change-Id: I90b5c91923c8008ae4b4818985842fe3e354a850
Merged-In: I90b5c91923c8008ae4b4818985842fe3e354a850
(cherry picked from commit 739c0b5193345abfce0373502c795448cc94a3ab)

5 years agoAsk netd to swap stats map before reading
Chenbo Feng [Thu, 28 Feb 2019 03:07:39 +0000 (19:07 -0800)]
Ask netd to swap stats map before reading

To avoid protentail race problem between netd and system_server when
reading the network stats map. Always inform netd before reading the
stats and let netd to do a swap between active stats map and inactive
stats map. So the system_server can safely remove the stats after
reading.

Bug: 126620214
Test: android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Change-Id: I8fa37c26bec23ffca0b29b679e72ba1189f557f1

5 years agoAdd a lock to protect persistent stats snapshot
Chenbo Feng [Wed, 10 Apr 2019 19:55:07 +0000 (12:55 -0700)]
Add a lock to protect persistent stats snapshot

Since the network stats could be polled from multiple services at
runtime, it is not thread safe for networkStatsFactory to hold a
persistent stats snapshot without any protection. Use a internal lock to
prevent concurrent modification on mPersistentSnapshot to fix the
problem.

Bug: 124764595
Test: android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Change-Id: I22afb46f17697e8b6359d4f593802e0f4b95db8b

5 years agoUpdate AppComponentFactory.instantiateClassLoader docs
David Brazdil [Tue, 9 Apr 2019 16:18:31 +0000 (17:18 +0100)]
Update AppComponentFactory.instantiateClassLoader docs

Clarify the intended use and properties of the default class loader.

Bug: 128524313
Test: n/a
Change-Id: Iae82554f9294d5248b98f1fa72fc1a47993e86fd

5 years agoMerge "Update Javadocs for CellInfo Classes"
Nathan Harold [Wed, 10 Apr 2019 17:29:01 +0000 (17:29 +0000)]
Merge "Update Javadocs for CellInfo Classes"

5 years agoMerge changes I98573a5c,Ic7394f24
Benedict Wong [Wed, 10 Apr 2019 17:06:17 +0000 (17:06 +0000)]
Merge changes I98573a5c,Ic7394f24

* changes:
  Enable checks for MANAGE_TEST_NETWORKS in TestNetworkService
  Cleanup of Test Network service

5 years agoBlock incoming non-VPN packets to apps under fully-routed VPN
Rubin Xu [Tue, 8 Jan 2019 22:03:26 +0000 (22:03 +0000)]
Block incoming non-VPN packets to apps under fully-routed VPN

When a fully-routed VPN is running, we want to prevent normal apps
under the VPN from receiving packets originating from any local non-VPN
interfaces. This is achieved by using eBPF to create a per-UID input
interface whitelist and populate the whitelist such that all
non-bypassable apps under a VPN can only receive packets from the VPN's
TUN interface (and loopback implicitly)

This is the framework part of the change that build the whitelist.
The whitelist needs to be updated in the following cases:
* When a VPN is connected and disconnected
    This will cover the change to allowBypass bit, since that can't be
    changed without reconnecting.
* When a VPN's NetworkCapabilites is changed (whitelist/blacklist app changes)
* When a new app is installed
* When an existing app is removed
* When a VPN becomes fully-routed or is no longer fully-routed

New user/profile creation will automatically result in a whitelist app change
transition so it doesn't need to be handled specially here.

Due to the limitation of the kernel IPSec interacting with eBPF (sk_buf->ifindex
does not point to the virtual tunnel interface for kernel IPSec), the whitelist
will only apply to app VPNs but not legacy VPN connections, to prevent breaking
connectivity with kernel IPSec entirely.

Test: atest PermissionMonitorTest
Test: atest android.net.RouteInfoTest
Test: atest com.android.server.ConnectivityServiceTest
Test: atest HostsideVpnTests
Bug: 114231106
Change-Id: I143b03d60e46cb1b04732b4a4034f5847b4d1b1a