OSDN Git Service

android-x86/frameworks-base.git
6 years agoUse the malloc debug heap dumper.
Christopher Ferris [Wed, 13 Jun 2018 20:19:57 +0000 (13:19 -0700)]
Use the malloc debug heap dumper.

Instead of having the malloc debug heap dump code live in frameworks
code, call into malloc debug to do the dump.

Test: Ran am dumpheap -n <PID> <FILE> of a process with and without
Test: malloc debug enabled.
Change-Id: I7911a3ee7dcbc79dd11003a24e27ff99c8301d43
Merged-In: I7911a3ee7dcbc79dd11003a24e27ff99c8301d43
(cherry picked from commit 38e2c3bc9c50770aa5efce47f90fbcfcdda523de)

6 years agoMerge "Build com.android.location.provider with java_sdk_library"
Treehugger Robot [Fri, 15 Jun 2018 03:41:18 +0000 (03:41 +0000)]
Merge "Build com.android.location.provider with java_sdk_library"

6 years agoMerge "Make dumpHexString() tolerate null arrays."
Treehugger Robot [Fri, 15 Jun 2018 02:32:54 +0000 (02:32 +0000)]
Merge "Make dumpHexString() tolerate null arrays."

6 years agoMerge "Clear calling identity before doing any work"
Treehugger Robot [Thu, 14 Jun 2018 19:13:29 +0000 (19:13 +0000)]
Merge "Clear calling identity before doing any work"

6 years agoClear calling identity before doing any work
Neil Fuller [Wed, 13 Jun 2018 15:56:38 +0000 (16:56 +0100)]
Clear calling identity before doing any work

This makes sure that the system server is credited/blamed
for the logic being executed.

Test: (internal) atest FrameworksServicesTests:com.android.server.timedetector
Bug: 78217059
Change-Id: Ie2586cf0d983e9aef9371d6db285c8420e9c8dc0

6 years agoMake dumpHexString() tolerate null arrays.
Bernie Innocenti [Thu, 14 Jun 2018 08:55:58 +0000 (17:55 +0900)]
Make dumpHexString() tolerate null arrays.

Rationale: hexdumps are mainly used when verbose logging is enabled,
which means that callers are rarely exercised (let alone tested).
Crashing on unchecked null pointers doesn't make debugging any easier,
nor production code any more robust.

Moreover, this is the behavior of system.out.println() and other
logging APIs.

Test: runtest -x core/tests/coretests/src/com/android/internal/util/HexDumpTest.java
Bug: 110177912
Change-Id: Idccd81a5654ed0f7fee6b27177941bf8c311973e

6 years agoMerge "Add TimestampedValue.toString()"
Neil Fuller [Thu, 14 Jun 2018 08:21:27 +0000 (08:21 +0000)]
Merge "Add TimestampedValue.toString()"

6 years agoMerge changes from topic "clean"
Pengquan Meng [Wed, 13 Jun 2018 20:47:13 +0000 (20:47 +0000)]
Merge changes from topic "clean"

* changes:
  Remove internal ApnSetting.
  Docs: noted that setting proxy hostnames on an ApnSetting requires an internet connection for DNS.

6 years agoAdd TimestampedValue.toString()
Neil Fuller [Wed, 13 Jun 2018 14:23:32 +0000 (15:23 +0100)]
Add TimestampedValue.toString()

To make debug logging useful.

Bug: 78217059
Test: Build
Change-Id: I710b56d189afeb26ac50f55d9286d04219779ee7

6 years agoMerge "Use disableForUser in StatusBarManager"
Treehugger Robot [Wed, 13 Jun 2018 14:19:32 +0000 (14:19 +0000)]
Merge "Use disableForUser in StatusBarManager"

6 years agoRemove internal ApnSetting.
yuemingw [Wed, 13 Jun 2018 11:32:13 +0000 (12:32 +0100)]
Remove internal ApnSetting.

Bug: 77511388
Test: atest FrameworksTelephonyTests
Change-Id: I0da354c7d55ac49f90ca1376e8f2034e65e4e274
Merged-In: I9757ef4aae269d828c98a7363c98629c9be74846

6 years agoDocs: noted that setting proxy hostnames on an ApnSetting requires an internet connec...
Benjamin Miller [Thu, 7 Jun 2018 19:10:08 +0000 (19:10 +0000)]
Docs: noted that setting proxy hostnames on an ApnSetting requires an internet connection for DNS.

Doc-only change.
Also improved the class descriptions and fixed some typos.

Bug: 80238372
Test: make ds-docs with visual inspection of generated HTML
Change-Id: I460d70d692cc1a04cf0efd6b9d0b1e13a9403968
Merged-In: Id4a00c1a44dc3cbbaefc94c0438eb1a077f06e5e

6 years agoMerge "Frameworks: Remove complex boolean"
Treehugger Robot [Tue, 12 Jun 2018 19:24:19 +0000 (19:24 +0000)]
Merge "Frameworks: Remove complex boolean"

6 years agoMerge "persist.sys.boot.reason is cleared once read by bootstat"
Treehugger Robot [Tue, 12 Jun 2018 19:19:57 +0000 (19:19 +0000)]
Merge "persist.sys.boot.reason is cleared once read by bootstat"

6 years agoUse disableForUser in StatusBarManager
Evan Laird [Tue, 29 May 2018 21:28:58 +0000 (17:28 -0400)]
Use disableForUser in StatusBarManager

If a secondary user is added to the device and in the middle of SUW, the
SUW process can be killed via ADB. This will cause the process to get
restarted and call StatusBarManager#disable()/disable2(), which uses the
StatusBarManagerService methods that use the current uid.

The fix is to use Binder.getCallingUserHandle() in StatusBarManager so that the
SUW from another user can't affect the current user unless it is
current.

Test: start SUW from new user, cancel set up and go back to primary
user. Kill the SUW process. Nav bars remain un-hidden

Change-Id: Ie6f648827d8d384ae87f74e2d746b7566a7b9011
Fixes: 78360699

6 years agoFrameworks: Remove complex boolean
Andreas Gampe [Tue, 12 Jun 2018 17:37:04 +0000 (10:37 -0700)]
Frameworks: Remove complex boolean

To allow an Errorprone warning to become an error.

Bug: 72451126
Test: m
Change-Id: I8733f0ee74de615e4ffc979fb9de38730c2506c6
Merged-In: Ia6856157e8813856268fba003e1e591d690cb26e

6 years agoMerge "Simple pass-through TimeDetectorService"
Treehugger Robot [Tue, 12 Jun 2018 17:01:25 +0000 (17:01 +0000)]
Merge "Simple pass-through TimeDetectorService"

6 years agoSimple pass-through TimeDetectorService
Neil Fuller [Fri, 8 Jun 2018 17:44:49 +0000 (18:44 +0100)]
Simple pass-through TimeDetectorService

This is sufficient to wire up time detection from telephony
to the new service without breaking time detection.

This cherry-pick contains a small change: to use
SystemClock.elapsedRealtime() instead of the newer
SystemClock.elapsedRealtimeClock() with Clock.millis().

Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Merged-In: Id7175878dc22e5272c31f3e478af4b0e4183b62b
Change-Id: Id7175878dc22e5272c31f3e478af4b0e4183b62b
(cherry picked from commit 24836bfb1564b1f98c322108a924965a8dbbee4f)

6 years agoMerge changes I6abd2221,I2c149d29,I45d22857,I1f879b2c,If4986a25, ...
Chalard Jean [Tue, 12 Jun 2018 12:23:59 +0000 (12:23 +0000)]
Merge changes I6abd2221,I2c149d29,I45d22857,I1f879b2c,If4986a25, ...

* changes:
  [PT06] Move setGlobalProxy into ProxyTracker
  [PT05] Move sendProxyBroadcast into ProxyTracker.
  [PT04] Move PacManager into ProxyTracker.
  [PT03] Move some more code into ProxyTracker.
  [PT02] Move static methods to ProxyTracker
  [PT01] Introduce ProxyTracker
  Remove a useless parameter.
  Small cleanup of Network.
  Cleanup of LinkProperties.

6 years ago[PT06] Move setGlobalProxy into ProxyTracker
Chalard Jean [Thu, 7 Jun 2018 09:37:59 +0000 (18:37 +0900)]
[PT06] Move setGlobalProxy into ProxyTracker

Test: runtest
Change-Id: I6abd2221882db368a411b7174c66d8bd3b6b5110

6 years ago[PT05] Move sendProxyBroadcast into ProxyTracker.
Chalard Jean [Thu, 7 Jun 2018 10:30:29 +0000 (19:30 +0900)]
[PT05] Move sendProxyBroadcast into ProxyTracker.

Test: runtest
Change-Id: I2c149d29d4b75d3978021b940b6bc58f677b8d17

6 years ago[PT04] Move PacManager into ProxyTracker.
Chalard Jean [Thu, 7 Jun 2018 10:20:08 +0000 (19:20 +0900)]
[PT04] Move PacManager into ProxyTracker.

Test: runtest
Change-Id: I45d22857459fe1746d484ac04f8d5cd81fc61835

6 years ago[PT03] Move some more code into ProxyTracker.
Chalard Jean [Thu, 7 Jun 2018 09:02:37 +0000 (18:02 +0900)]
[PT03] Move some more code into ProxyTracker.

Add finals and annotations. Remove comments that have lost their
context (they were in the context of disabling a permission check
that had been added, but constituted an API change that would not
serve any real purpose).

Test: runtest
Change-Id: I1f879b2c105d2127072b88233d72097a0d78fe14

6 years ago[PT02] Move static methods to ProxyTracker
Chalard Jean [Thu, 7 Jun 2018 08:41:29 +0000 (17:41 +0900)]
[PT02] Move static methods to ProxyTracker

No logic changes. Only changes are adding nullability annotations,
final modifiers, and adding an s in a comment.

Test: runtests
Change-Id: If4986a25bb36819de8ff459c4c0439c56d4e5a50

6 years ago[PT01] Introduce ProxyTracker
Chalard Jean [Thu, 7 Jun 2018 07:44:04 +0000 (16:44 +0900)]
[PT01] Introduce ProxyTracker

The goal of this is to simplify ConnectivityService by reducing
the amount of code it contains. This is small enough to be obviously
correct and followup changes will move code into this class.

Test: runtest
Change-Id: Ic5ab19b521e98ae397c9bf657856820304362fbb

6 years agoRemove a useless parameter.
Chalard Jean [Thu, 7 Jun 2018 07:11:34 +0000 (16:11 +0900)]
Remove a useless parameter.

This argument is useless because all its callers pass the same
value : false.

Test: runtest
Change-Id: Id921caa4ffadef535a5bbcfea052283a07320b28

6 years agoSmall cleanup of Network.
Chalard Jean [Thu, 7 Jun 2018 04:46:52 +0000 (13:46 +0900)]
Small cleanup of Network.

Test: runtest
Change-Id: I56dbd37bb8f890938d360f45835de72be4beb91a

6 years agoCleanup of LinkProperties.
Chalard Jean [Thu, 7 Jun 2018 04:27:00 +0000 (13:27 +0900)]
Cleanup of LinkProperties.

Test: runtest
Change-Id: I7299de93a79901635ce755a2d933666ee43767d5

6 years agoMerge "Minimum viable TimeDetectorService"
Neil Fuller [Tue, 12 Jun 2018 09:50:32 +0000 (09:50 +0000)]
Merge "Minimum viable TimeDetectorService"

6 years agoMerge "Update Docs to clarify using a Message across IPC"
Brad Ebinger [Mon, 11 Jun 2018 19:56:07 +0000 (19:56 +0000)]
Merge "Update Docs to clarify using a Message across IPC"

6 years agoMerge "Framework: Disable native-bridge for non-zygote"
Treehugger Robot [Mon, 11 Jun 2018 15:23:38 +0000 (15:23 +0000)]
Merge "Framework: Disable native-bridge for non-zygote"

6 years agoMerge "ScanRecord.getServiceData NPE fix"
Jakub Pawlowski [Mon, 11 Jun 2018 14:43:57 +0000 (14:43 +0000)]
Merge "ScanRecord.getServiceData NPE fix"

6 years agoScanRecord.getServiceData NPE fix
Jakub Pawlowski [Mon, 4 Jun 2018 17:32:06 +0000 (10:32 -0700)]
ScanRecord.getServiceData NPE fix

Bug: 109662587
Change-Id: I0e9653d9cd7e4b748870bacb6fbcecae535ebb2a

6 years agoMinimum viable TimeDetectorService
Neil Fuller [Wed, 30 May 2018 13:35:24 +0000 (14:35 +0100)]
Minimum viable TimeDetectorService

This is a do-nothing TimeDetectorService that can be
populated in following commits. A temporary method has been
added so the service has one method.

Unit tests can be run with:

atest FrameworksServicesTests:TimeDetectorServiceTest

Test: build / boot
Test: See above
Merged-In: I9e4eac70b944441f34491315cd1ce7fa2b9ae150
Change-Id: I9e4eac70b944441f34491315cd1ce7fa2b9ae150
(cherry picked from commit feeee682a23f25760c4a1aa07c00945901911ba3)

6 years agoMerge changes Ifd7d73ad,Id79096fa
Treehugger Robot [Mon, 11 Jun 2018 11:54:21 +0000 (11:54 +0000)]
Merge changes Ifd7d73ad,Id79096fa

* changes:
  Bugfixes in LinkProperties#toString
  Cleanup of ConnectivityManager.

6 years agoBugfixes in LinkProperties#toString
Chalard Jean [Thu, 7 Jun 2018 04:28:09 +0000 (13:28 +0900)]
Bugfixes in LinkProperties#toString

We should stop trying to use a human brain to write code

Test: manual
Change-Id: Ifd7d73ad65de0f671466080beacbd97287e17bfe

6 years agoCleanup of ConnectivityManager.
Chalard Jean [Mon, 4 Jun 2018 07:52:49 +0000 (16:52 +0900)]
Cleanup of ConnectivityManager.

This is not exhaustive, but still an undeniable improvement.

Test: runtest frameworks-net
Change-Id: Id79096faf20eec80de7c17b261ef338b895af1e0

6 years agoMerge "Use ParcelFileDescriptor's C++ implementation in libbinder"
Treehugger Robot [Mon, 11 Jun 2018 07:27:41 +0000 (07:27 +0000)]
Merge "Use ParcelFileDescriptor's C++ implementation in libbinder"

6 years agoMerge "No-op cleanup of ConnectivityService."
Treehugger Robot [Mon, 11 Jun 2018 04:57:31 +0000 (04:57 +0000)]
Merge "No-op cleanup of ConnectivityService."

6 years agoMerge "Copy clat modified linkProperties into new one."
Treehugger Robot [Mon, 11 Jun 2018 03:26:26 +0000 (03:26 +0000)]
Merge "Copy clat modified linkProperties into new one."

6 years agoMerge changes from topic "audio-package-update"
Treehugger Robot [Fri, 8 Jun 2018 20:47:03 +0000 (20:47 +0000)]
Merge changes from topic "audio-package-update"

* changes:
  Include InCallNotification.ogg in AllAudio.mk file
  Add ChargingStarted + InCallNotif to AudioPackage

6 years agoMerge "Check for null path in getInternalPathForUser"
Treehugger Robot [Fri, 8 Jun 2018 20:16:14 +0000 (20:16 +0000)]
Merge "Check for null path in getInternalPathForUser"

6 years agoCheck for null path in getInternalPathForUser
Jerry Zhang [Wed, 6 Jun 2018 18:04:46 +0000 (11:04 -0700)]
Check for null path in getInternalPathForUser

In some situations, path could be null resulting
in a crash.

Test: no crash
Bug: 109730998
Change-Id: I2ce0410162d1327905d690331f461f9187e20906
(cherry picked from commit 6f6154bf0493cf66628c8f2418827fe54679b1eb)

6 years agoMerge "API updated for ICU4J 61.1"
Treehugger Robot [Fri, 8 Jun 2018 17:19:55 +0000 (17:19 +0000)]
Merge "API updated for ICU4J 61.1"

6 years agoMerge changes from topic "ipsec-sync-with-pi"
nharold [Fri, 8 Jun 2018 17:07:11 +0000 (17:07 +0000)]
Merge changes from topic "ipsec-sync-with-pi"

* changes:
  Disable the AppOp Restriction for IpSec Tunnels
  Rework Exception Handling for IpSecManager
  Update IpSecManager to use InetAddress and prefixLen
  Add AppOps Checks for MANAGE_IPSEC_TUNNELS
  Add MANAGE_IPSEC_TUNNELS Permission

6 years agoMerge "Adds a private field to parceled data."
Brad Ebinger [Fri, 8 Jun 2018 17:03:14 +0000 (17:03 +0000)]
Merge "Adds a private field to parceled data."

6 years agoMerge "Unhide @SystemApi Constructor"
Brad Ebinger [Fri, 8 Jun 2018 17:02:48 +0000 (17:02 +0000)]
Merge "Unhide @SystemApi Constructor"

6 years agoMerge "Build dark greylist from public + light grey API"
David Brazdil [Fri, 8 Jun 2018 14:22:26 +0000 (14:22 +0000)]
Merge "Build dark greylist from public + light grey API"

6 years agoAPI updated for ICU4J 61.1
Fredrik Roubert [Tue, 3 Apr 2018 18:55:14 +0000 (20:55 +0200)]
API updated for ICU4J 61.1

Bug: 77634530
Bug: 109837373
Test: make
Test: cts-tradefed run cts-dev -m CtsIcuTestCases -t android.icu.dev.test.format.MeasureUnitTest
for CTS coverage
Change-Id: I721fbef5c79df1310e144a48ab2f18929b10bdfa

6 years agoMerge "Opportunistic typo fix"
Treehugger Robot [Fri, 8 Jun 2018 11:51:29 +0000 (11:51 +0000)]
Merge "Opportunistic typo fix"

6 years agoNo-op cleanup of ConnectivityService.
Chalard Jean [Mon, 4 Jun 2018 04:33:12 +0000 (13:33 +0900)]
No-op cleanup of ConnectivityService.

Funny how these things accumulate. Not exhaustive of course, but
still an improvement.
- Remove unused imports.
- Remove unused variables and members.
- Replace members with locals where applicable.
- Remove useless type parameters and explicit unboxings for Java 7.
- Conversely add the diamond operator for auto-genericity for
  Java 6.
- Reduce visibility of members where possible.

Test: runtest frameworks-net
Change-Id: I13586aee09b4cd1c87c525fafb5eee44dedb5360

6 years agoCopy clat modified linkProperties into new one.
junyulai [Tue, 5 Jun 2018 08:10:04 +0000 (16:10 +0800)]
Copy clat modified linkProperties into new one.

updateLinkProperties copied the linkProperties in networkAgent,
but the clat fix-up function did not copy stacked link into new one.
This caused an incorrect clat iface removal, and the IPv4 network
 to be unreachable.

Clean cherry-pick of ag/4260470

Bug: 80261579
Test: 1. ping after ipv6 only data call with 2g voice call on/off
      2. runtest frameworks-net
      3. run cts -m CtsNetTestCases
Change-Id: Ide47a3b0680dddfcf3e2e759a59b19aee3605050

6 years agoMerge "Add field to set A2DP device volume on connect (1/2)"
Treehugger Robot [Fri, 8 Jun 2018 02:06:17 +0000 (02:06 +0000)]
Merge "Add field to set A2DP device volume on connect (1/2)"

6 years agoDisable the AppOp Restriction for IpSec Tunnels
Nathan Harold [Wed, 16 May 2018 02:18:38 +0000 (19:18 -0700)]
Disable the AppOp Restriction for IpSec Tunnels

This CL temporarily removes the AppOp restriction
that disallows creation of IpSec tunnels due to
the lack of the appropriate AppOp in AOSP/master.
When the relevant framework merges out to master,
this CL should be reverted.

Bug: none
Test: compilation
Change-Id: Ic06c193f85f6bcdd0ead4238825c1add78703cde

6 years agoRework Exception Handling for IpSecManager
Nathan Harold [Tue, 3 Apr 2018 23:13:19 +0000 (16:13 -0700)]
Rework Exception Handling for IpSecManager

In order to properly support EOPNOTSUPP this CL
applies a consistent approach to handling Exceptions.
Hereafter, all exceptions that aren't of a special
method-specific type (such as SpiUnavailableException)
will all be returned to the calling process unchanged.
At the API call site, the ServiceSpecificException,
which is really an Errno, will be inspected and either
converted to an unchecked exception for types we know,
or it will be converted to an IOException in cases where
that method can return a checked exception. In cases
where we do not expect an errno, we will simply throw
a generic RuntimeException. This means all API calls
will now properly throw UnsupportedOperationException
and may be CTS tested accordingly.

Bug: 72420898
Test: runtest frameworks-net
Merged-In: I4a00e221618896223fcdb4b4279fb14cd14e34d8
Change-Id: I4a00e221618896223fcdb4b4279fb14cd14e34d8
(cherry picked from commit ddeb90aa9db108d4a2e5aadc778a726b65e5c921)

6 years agoUpdate IpSecManager to use InetAddress and prefixLen
Benedict Wong [Wed, 4 Apr 2018 03:30:54 +0000 (20:30 -0700)]
Update IpSecManager to use InetAddress and prefixLen

LinkAddress constructors are currently @hide; this change updates
IpSecManager to use InetAddress and prefixLen, and then construct a
LinkAddress internally. LinkAddress is used over the binder interface to
IpSecService to ensure validity.

Bug: 77528639
Test: CTS, Java unit tests ran on walleye
Merged-In: I19e124adef6d9f4992d8293db3190bcf74c95848
Change-Id: I19e124adef6d9f4992d8293db3190bcf74c95848
(cherry picked from commit 3f2c54b7820c3a568890700479230966fdbcf0a4)

6 years agoAdd AppOps Checks for MANAGE_IPSEC_TUNNELS
Nathan Harold [Fri, 16 Mar 2018 01:06:06 +0000 (18:06 -0700)]
Add AppOps Checks for MANAGE_IPSEC_TUNNELS

Adds support for a new AppOp to permit services to
use IpSec tunnel mode. The IpSecService now needs
a context so change the service mode to a cached
service rather than a static service.

Bug: 66955045
Test: runtest frameworks-net
Merged-In: I17a4a286225b432c3e15ea1587d946189931b4f4
Change-Id: I17a4a286225b432c3e15ea1587d946189931b4f4
(cherry picked from commit 592dadbd43fcb7c5d67e737adb34d07923da90c4)

6 years agoAdd MANAGE_IPSEC_TUNNELS Permission
Nathan Harold [Wed, 21 Mar 2018 22:32:42 +0000 (15:32 -0700)]
Add MANAGE_IPSEC_TUNNELS Permission

Add a new MANAGE_IPSEC_TUNNELS permission and
protect all IPsec Tunnel mode APIs with it.
This permission is only granted to the system or
through an AppOp.

Bug: 66955045
Test: compilation
Merged-In: I0f618373b500c493ef2211bece681f74652a1833
Change-Id: I0f618373b500c493ef2211bece681f74652a1833
(cherry picked from commit 159788455c79fa47847d0c40fcee7aceff2551ae)

6 years agoMerge "Add filter for NoPreloadHolders"
Mathieu Chartier [Thu, 7 Jun 2018 23:27:12 +0000 (23:27 +0000)]
Merge "Add filter for NoPreloadHolders"

6 years agoInclude InCallNotification.ogg in AllAudio.mk file
Beverly [Thu, 7 Jun 2018 18:30:55 +0000 (14:30 -0400)]
Include InCallNotification.ogg in AllAudio.mk file

Test: manual
Change-Id: Ic7dee1ece7231731a6fdab5aa7057ff240b94071

6 years agoAdd field to set A2DP device volume on connect (1/2)
Eric Laurent [Mon, 21 May 2018 16:28:46 +0000 (09:28 -0700)]
Add field to set A2DP device volume on connect (1/2)

Add a field to setBluetoothA2dpDeviceConnectionStateInt() to allow
Bluetooth to set a volume for the new device when it connects.

Bug: 79529581
Test: Switch repeatedly between devices and see that the old volume isn't
used on the new device or the new volume isn't used on the old device.
Change-Id: Iea13ca8b5c538c999149baba6e9069745ad9466b
Merged-In: I909fa3f40818c595fc977695fbfa1214f9a4de72

(cherry picked from commit 3e6fb6309033c50081c0789b5905d5cd539b38f6)

6 years agoAdd filter for NoPreloadHolders
Mathieu Chartier [Thu, 7 Jun 2018 21:30:24 +0000 (14:30 -0700)]
Add filter for NoPreloadHolders

Avoid including these in the preloaded classes.

Test: manual
Bug: 109652611
Change-Id: I1efd1749e54e8b38ca8f7e3ff05058ddb0fe4460

6 years agoAdd ChargingStarted + InCallNotif to AudioPackage
Beverly [Tue, 5 Jun 2018 13:41:42 +0000 (09:41 -0400)]
Add ChargingStarted + InCallNotif to AudioPackage

Add the ChargingStarted and InCallNotification sounds
to AudioPackages to make them available to AOSP

Test: manual
Change-Id: I614bd69471ef19f6095f7d7874acbb85ff56d99c

6 years agoFramework: Disable native-bridge for non-zygote
Andreas Gampe [Thu, 7 Jun 2018 16:42:02 +0000 (09:42 -0700)]
Framework: Disable native-bridge for non-zygote

Non-zygotes may not have the permissions/capabilities to run a
bridge and may abort attempts to load a bridge because of seccomp
rules. So don't tell the runtime to load a bridge when starting
a non-zygote.

Bug: 77878177
Bug: 80118963
Test: m
Test: cts-tradefed run commandAndExit cts-dev -m CtsWrapWrapDebugTestCases
Change-Id: I7894b89feec79e4bd478f649c004ad29fc46597e

6 years agoMerge "Add GTS test APIs for testing ImsService"
Brad Ebinger [Thu, 7 Jun 2018 17:03:28 +0000 (17:03 +0000)]
Merge "Add GTS test APIs for testing ImsService"

6 years agoMerge "Remove CommonClock / CommonTimeManagementService"
Neil Fuller [Thu, 7 Jun 2018 15:50:06 +0000 (15:50 +0000)]
Merge "Remove CommonClock / CommonTimeManagementService"

6 years agoBuild com.android.location.provider with java_sdk_library
Sundong Ahn [Mon, 21 May 2018 08:39:23 +0000 (17:39 +0900)]
Build com.android.location.provider with java_sdk_library

com.android.location.provider is built with java_sdk_library and api
files are added by running "make update-api".
Remove com.android.location.provider.xml since it will be
make auto generation by soong when the library is built with
java_sdk_library.

Bug:77577799
Test: make -j
Test: make checkapi
Test: adb shell cmd package list libraries |\
      grep com.android.location.provider
      And check the com.android.location.provider library

Change-Id: Iad0b4452fd87716c277235f3da6f3540aafdbed3

6 years agoMerge "com.android.mediadrm.signer is built with java_sdk_library"
Treehugger Robot [Thu, 7 Jun 2018 11:27:25 +0000 (11:27 +0000)]
Merge "com.android.mediadrm.signer is built with java_sdk_library"

6 years agoBuild dark greylist from public + light grey API
David Brazdil [Thu, 31 May 2018 12:58:41 +0000 (13:58 +0100)]
Build dark greylist from public + light grey API

The dark greylist is meant to contain non-SDK APIs which are "related"
to APIs accessible to apps without restrictions. The list used to be
built as all non-SDK APIs in the same package as those on the light
greylist. That is not sufficient and should include the public SDK API
packages too.

This patch modifies the makefile to generate a list of public API DEX
signatures with Doclava and then use that as a basis for the dark
greylist generation.

Bug: 80461842
Bug: 64382372
Test: make out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt
Change-Id: I4b1588013f26661207126b4006cdef0a0fc8ae2c

6 years agoOpportunistic typo fix
Chalard Jean [Thu, 7 Jun 2018 05:48:23 +0000 (14:48 +0900)]
Opportunistic typo fix

Test: unneeded
Change-Id: I2f5636f3d7ea4b6e9d3e6feddfd0cb586d658813

6 years agoUpdate Docs to clarify using a Message across IPC
Brad Ebinger [Wed, 11 Apr 2018 18:25:05 +0000 (11:25 -0700)]
Update Docs to clarify using a Message across IPC

When using Message across IPC, the message must be sent
with a Messenger. Update Docs to reflect this.

Bug: 77870347
Test: Telephony Unit Tests
Merged-In: Ie1a0be63d26136f14cd30c354b889ec0311cc7ee
Change-Id: I27977a13f7ccb6875b5fdb7eb6c6836a84166eeb

6 years agoAdds a private field to parceled data.
Brad Ebinger [Mon, 9 Apr 2018 22:15:49 +0000 (15:15 -0700)]
Adds a private field to parceled data.

Bug: 77957465
Test: Manual/GTS
Merged-In: Ib87a7af0654cc1ec0db052d8ee72f4c74c0aea04
Change-Id: I321b667f9186feaf2579bd4dd27ebf67fc2e0d52

6 years agoUnhide @SystemApi Constructor
Brad Ebinger [Thu, 29 Mar 2018 18:12:24 +0000 (11:12 -0700)]
Unhide @SystemApi Constructor

There are a few small classes that never got properly
exposed as @SystemApi. These classes were not caught
because vendors currently build against the source
directly and have access to hidden APIs. We can not
change the vendor code at this point (different vendor
code for each year for all supported devices), but
we can start pulling back the API for new devices.

1) Keep all public mutable fields @hide and put
todo (and file bug b/74402619) to make fields
private or final.

2) Add public constructor that populates all fields
so that @hide public mutable fields can be set to
private/final in the future.

3) Provide getters for fields that will not be
public in the future.

In this way, we can make minimal API changes for P,
support new vendor/3rd party ImsServices, and phase
out old ImsService implementations that still build
against the source instead of using the correct
@SystemApi.

Bug: 77278031
Bug: 74402619
Test: Manual
Merged-In: Idbf2a71018f1bd06f8445b07fc52bc65cb6776f6
Change-Id: Ifa3b6d0cbdb12e92efc699b760ca874768a89a7c

6 years agoAdd GTS test APIs for testing ImsService
Brad Ebinger [Tue, 3 Apr 2018 22:16:38 +0000 (15:16 -0700)]
Add GTS test APIs for testing ImsService

Bug: 77141737
Test: Manual
Merged-In: Id60cf07121cf98ab3f0a10af10cf70beb25feb54
Change-Id: Ia41a96b5013bc6a7f534c347db72a14348c1fc5d

6 years agoMerge "Ensure self-managed calls use voip audio mode."
Tyler Gunn [Wed, 6 Jun 2018 21:19:04 +0000 (21:19 +0000)]
Merge "Ensure self-managed calls use voip audio mode."

6 years agoRemove CommonClock / CommonTimeManagementService
Neil Fuller [Mon, 4 Jun 2018 14:35:31 +0000 (15:35 +0100)]
Remove CommonClock / CommonTimeManagementService

The service and associated code is unused.

Bug: 80462439
Test: build / boot
Merged-In: Ibdfab1b7d2951a0c45e07bd47850af037990841b
Change-Id: Ibdfab1b7d2951a0c45e07bd47850af037990841b

6 years agoMerge changes Ia764b341,I4e4b41bb,I61b262d8,Ie6ace6bd,I21e866c7, ...
Chalard Jean [Wed, 6 Jun 2018 08:25:45 +0000 (08:25 +0000)]
Merge changes Ia764b341,I4e4b41bb,I61b262d8,Ie6ace6bd,I21e866c7, ...

* changes:
  Let tests enumerate all transports/capabilities.
  Destroy networks as soon as they are disconnected.
  Fix a ConcurrentModificationException crash.
  Unify behavior of various cases of "no underlying networks"
  Fix: VPNs update caps upon underlying network disconnect.
  Add tests for setUnderlyingNetworks.
  Fix setCapabilities.
  Fix SSID not being logged by the validation logs
  Make sure getActiveNetwork is consistent with default callbacks
  Add tests for getActiveNetwork.
  Guard the SSID with NETWORK_SETTINGS
  Add a new ssid field in NetworkCapabilities.
  Notif manager and captive portal app to read SSID again
  Remove unwanted capability from the java-doc
  Actually @hide unwanted capability methods.
  API council requested tweaks to NetworkRequest.
  Add OEM_PAID capability to system api
  add airplane mode shell commands to connectivity
  Enable cleartext for captive portal apps
  Expose CONNECTIVITY_ACTION to Instant Apps
  fix isActiveNetworkMetered with VPNs

6 years agoLet tests enumerate all transports/capabilities.
Jeff Sharkey [Mon, 14 May 2018 19:49:07 +0000 (13:49 -0600)]
Let tests enumerate all transports/capabilities.

This gives them a way to collect all included values without
resorting to manual probing of each newly added value.

Cherry-pick of ag/4052941 with minor conflicts in the imports.

Bug: 16207332
Test: atest com.android.cts.net.HostsideVpnTests
Change-Id: Ia764b3412bf834890612378e0c3846913f4e0a06
Merged-In: Ie5cd22cfa2b6a60510fd1e31d7ebcd8f6cc890a0
Merged-In: If07e77c92046807235229a4f67ee087bdd7bccf1

6 years agoDestroy networks as soon as they are disconnected.
Chalard Jean [Fri, 11 May 2018 11:19:20 +0000 (20:19 +0900)]
Destroy networks as soon as they are disconnected.

...as opposed to after the async channel finished disconnecting.

Clean cherry-pick of ag/4043255

Bug: 78308259
Test: runtest frameworks-net
      also used a device with this patch over the weekend and
      tried all I could think of
Merged-In: Ic4c7520e907de353a01c2a3a8a50d661dee4a994
Merged-In: I0617f0ff6e46a1d3764335a1e7ad01b34c8cc5a8

Change-Id: I4e4b41bbdf25d7d7bea4124cb58da004d47f1090

6 years agoFix a ConcurrentModificationException crash.
Chalard Jean [Wed, 23 May 2018 00:07:51 +0000 (09:07 +0900)]
Fix a ConcurrentModificationException crash.

This is a pinpoint fix against the bug listed below. While a client
is synchronously reading the LinkProperties of a network, the
ConnectivityServiceThread is updating its properties. Make sure
that update is done atomically.

This is a stopgap countermeasure against a problem that is
pervasive with usage of LinkProperties, but fixing the problem
itself will happen later.

Clean cherry-pick of ag/4174798

Bug: 80077223
Test: runtest frameworks-net
Change-Id: I61b262d824c98b4ced36395a597b73de9193a199
Merged-In: I25007ac26349e451bb47f966af70d590d699c347
Merged-In: I03526187645b6955eb89ca4d2e4a930ebac236b8

6 years agoUnify behavior of various cases of "no underlying networks"
Chalard Jean [Mon, 21 May 2018 06:30:56 +0000 (15:30 +0900)]
Unify behavior of various cases of "no underlying networks"

Before this change, VPNs having no underlying networks would be
marked as metered as the safe option, but VPNs having only
disconnected underlying networks would be marked as unmetered.
Fix this discrepancy.

Clean cherry-pick of ag/4113809

Bug: 79748782
Test: runtest frameworks-net
Change-Id: Ie6ace6bd95139605ffcfa8cd6c15cf28f8fa28c8
Merged-In: If19b85325e7d684e645470293b3c8a674084c641
Merged-in: I22f80a6a39d4a19ff74aa61fcbd66f1a041b1003

6 years agoFix: VPNs update caps upon underlying network disconnect.
Chalard Jean [Fri, 18 May 2018 13:02:56 +0000 (22:02 +0900)]
Fix: VPNs update caps upon underlying network disconnect.

Clean cherry-pick of ag/4083954

Bug: 79748782
Test: ConnectivityServiceTests still pass
Change-Id: I21e866c723099e5c3dee54ff13e830d44427fc7a
Merged-In: I12c948ebeb2b74290908f8320ff77220dc4a9fb9

6 years agoAdd tests for setUnderlyingNetworks.
Chalard Jean [Fri, 18 May 2018 12:47:45 +0000 (21:47 +0900)]
Add tests for setUnderlyingNetworks.

Fixes come later. This is complex enough as it is.

Clean cherry-pick of ag/4083953

Bug: 79748782
Test: new test passes, old tests still pass
Change-Id: If7276fe1f751be7b9c18f689e97699e566e5bde0
Merged-In: I12c948ebeb2b74290908f8320ff77220dc4a9fb9

6 years agoFix setCapabilities.
Chalard Jean [Fri, 18 May 2018 14:48:49 +0000 (23:48 +0900)]
Fix setCapabilities.

P introduced setSSID, UIDs and unwanted capabilities.
None of these exhibit commutative behavior through combineCapabilities
because their semantics don't allow it. Therefore
NetworkRequest.setCapabilities() is badly broken around any of
these. Look at the comments in the new tests to realize the
extent of the damage.

Clean cherry-pick of ag/4083952

Bug: 79748782
Test: new tests written, old tests pass
Change-Id: Iafe074126132a82af37f4bf056c4a7b8d56bdc83
Merged-In: Ia5bebf8a233775367bbf1b788870528934ecbcfb
Merged-In: I13d7782a6c0c7b1f94137995bbb0d257a58d89c1

6 years agoFix SSID not being logged by the validation logs
Chalard Jean [Thu, 26 Apr 2018 07:16:10 +0000 (16:16 +0900)]
Fix SSID not being logged by the validation logs

Also add it in the logs of the notification manager.

Clean cherry-pick of ag/4022397

Bug: 78547904
Test: manual
Change-Id: I0afc18c94adf97154c61af2a5bdf933fb5f0e622
Merged-In: Iad5388a31a1502bc1944346276bb9600ac1386bd
Merged-In: I8bdd4a020e9d04f46847ef3c7e80ccf5c5cd19ea

6 years agoMake sure getActiveNetwork is consistent with default callbacks
Chalard Jean [Wed, 18 Apr 2018 11:18:38 +0000 (20:18 +0900)]
Make sure getActiveNetwork is consistent with default callbacks

Almost clean cherry-pick of ag/3889538.

Bug: 77737389
Test: runtest framework-net
      new test don't pass without the main code change, but they
      do with it
Change-Id: I0cd83a935ab0b349aa47e065b830e5a43ab9a091
Merged-In: Iaa0285825735d3f16bba6e4946723a437fd9b0b9
Merged-In: Ia8f985b448251f911484e6bd63fa562bffc1b0e4

6 years agoAdd tests for getActiveNetwork.
Chalard Jean [Wed, 18 Apr 2018 10:18:58 +0000 (19:18 +0900)]
Add tests for getActiveNetwork.

Clean cherry-pick of ag/3918295
One-line adjustment for ag/3638326 which has not been put in AOSP.

Bug: 77737389
Test: runtest frameworks-net
Change-Id: I03ae2bbb08559f2cd44979e291c1f5d50eb215da
Merged-In: Iaa0285825735d3f16bba6e4946723a437fd9b0b9
Merged-In: Ia8f985b448251f911484e6bd63fa562bffc1b0e4

6 years agoGuard the SSID with NETWORK_SETTINGS
Chalard Jean [Mon, 16 Apr 2018 03:25:22 +0000 (12:25 +0900)]
Guard the SSID with NETWORK_SETTINGS

Clean cherry-pick of ag/3904260

Bug: 77865258
Test: manual
Change-Id: I2a2e236041797df495759dd4e07648545cad6c7c
Merged-In: Iba59e93875c28b8e30db0c013575bc2f117cb16c
Merged-In: I6cf364f0815a2eaab60f5de5e1d5ccc4908e9eca

6 years agoAdd a new ssid field in NetworkCapabilities.
Chalard Jean [Wed, 11 Apr 2018 12:09:10 +0000 (21:09 +0900)]
Add a new ssid field in NetworkCapabilities.

Clean cherry-pick of ag/3887737

Bug: 77891227
Test: frameworks-net
Change-Id: Icefe1657bca52b913a72b56705342a7285769658
Merged-In: Ia1f4e51b7c2e9118789242cf6d9e7576c4167cda
Merged-In: I6dd1aba6fde5a502b4a9145cf16393d8ce623c89

6 years agoNotif manager and captive portal app to read SSID again
Chalard Jean [Thu, 12 Apr 2018 02:52:37 +0000 (11:52 +0900)]
Notif manager and captive portal app to read SSID again

Cherry-picked from ag/3887738 ; almost clean CP, only had
to add an import.

Bug: 77114259
Test: frameworks-net pass
      manual test shows the SSID is now displayed again
Change-Id: I5cb2b4777ad78d972031e8f2ff22e2155f4ab894
Merged-In: I588fedba49ea5d08e40bd2b3ea8ba2c2383958ec
Merged-In: I663a59ff2847a9f44ea1395326f6cb00e97237b6

6 years agoRemove unwanted capability from the java-doc
Pavel Maltsev [Mon, 9 Apr 2018 20:10:11 +0000 (13:10 -0700)]
Remove unwanted capability from the java-doc

Per API council feedback remove unwanted capaibility from public API
java docs

Clean cherry-pick from ag/3868438

Bug: 77601789
Test: make docs
Test: build and flash
Change-Id: I4f3b8b558e8dab2bcc9ef4cc6cfc3135c264c291
Merged-In: I7fef43cce3cfe17dae6a5e4f564ad8857371502a
Merged-In: Ib02988daf44dabfaef7a0b788385b7f7c655b8b2

6 years agoActually @hide unwanted capability methods.
Pavel Maltsev [Mon, 2 Apr 2018 18:10:13 +0000 (11:10 -0700)]
Actually @hide unwanted capability methods.

Cherry-pick of ag/3943779

Bug: 77601789
Test: builds, boots
Test: make doc-comment-check-docs
Merged-In: I80a88123b16c54734306da7e5dc0670972041648
Merged-In: I923e5377a1abe761217612452cbfdba752e53de2

6 years agoAPI council requested tweaks to NetworkRequest.
Jeff Sharkey [Wed, 28 Mar 2018 20:01:55 +0000 (14:01 -0600)]
API council requested tweaks to NetworkRequest.

If you put values into the Builder, you should be able to observe
those values on the built object.

Clean cherry-pick of ag/3813257

Test: atest android.net.cts.NetworkRequestTest
Bug: 74945408
Change-Id: Ib28de279efb8b33ab46aa64f580e10fe5f8720e3
Merged-In: I0d090ebb7d57689a061badcf593ae9a37d88f7ce
Merged-In: I539184f7385c1f288cfb77be8307e4463e07e9e6

6 years agoAdd OEM_PAID capability to system api
Pavel Maltsev [Thu, 22 Mar 2018 18:41:32 +0000 (11:41 -0700)]
Add OEM_PAID capability to system api

Some system apps should be able to request OEM_PAID networks.  This
makes a lot of sense when Android is used as in-vehicle infotainment
systems.

Clean cherry-pick of ag/3782591

Bug: 68762530
Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest
Change-Id: I306f060c5a386ff4b82cd99a03dc037ce60ded6a
Merged-In: Ic164c4a29cd449a31b2f1c12c8c345bcc5dc77fa
Merged-In: I6e9c4130db23a4f1c89ce7e9071ae519a2b0b7ec

6 years agoadd airplane mode shell commands to connectivity
mswest46 [Mon, 12 Mar 2018 17:34:34 +0000 (10:34 -0700)]
add airplane mode shell commands to connectivity

Clean cherry-pick of ag/3718273

Change-Id: I302802afc952b9df7a5544b12d9015091997bd67
Fixes: 74410990
Test: Manually checked that commands enable/disable airplane mode.
Merged-In: I8787d642594e6852bff5b902e8d0fa380ce7c37f

6 years agoEnable cleartext for captive portal apps
Adam Newman [Fri, 16 Mar 2018 17:36:35 +0000 (10:36 -0700)]
Enable cleartext for captive portal apps

When a user attempts to visit a captive portal the Activity will attempt
to load http://connectivitycheck.gstatic.com/generate_204 and a
walled-garden will typically intercept this and respond with a 302
redirect to a sign-in flow.

The new default of disabling cleartext unless explicitly enabled breaks
captive portal operation. This change enables cleartext for the two
applications that contain a CaptivePortalLoginActivity.

Clean cherry-pick of ag/3750960

Bug: 75279991
Test: Manually associated with captive portals.
Exempt-From-Owner-Approval: Already approved by owner on pi-dev.
Change-Id: Ib9ea7a8a2aa72b8305fa7044df0e369a57d33953
Merged-In: Ie38d6ce6f54336db2f4672746dc7385e0a7979fb
Merged-In: I742bf6be74a9e6953d0a779bdab0c25cf32aa740

6 years agoMerge "Add metalava based api-stubs modules in Android.bp"
Treehugger Robot [Wed, 6 Jun 2018 04:36:53 +0000 (04:36 +0000)]
Merge "Add metalava based api-stubs modules in Android.bp"

6 years agoAdd metalava based api-stubs modules in Android.bp
Nan Zhang [Thu, 26 Apr 2018 00:23:33 +0000 (17:23 -0700)]
Add metalava based api-stubs modules in Android.bp

Test: m clean && m metalava-api-stubs-docs
Bug: b/78245848
Change-Id: Ie0943d306af4176d965425ec85236cd173c1e870

6 years agoMerge "Fix a 'memory leak'"
Treehugger Robot [Tue, 5 Jun 2018 23:29:10 +0000 (23:29 +0000)]
Merge "Fix a 'memory leak'"

6 years agoMerge "Suppress AID log on adb logcat"
Ruchi Kandoi [Tue, 5 Jun 2018 20:56:35 +0000 (20:56 +0000)]
Merge "Suppress AID log on adb logcat"