Commit Graph

344988 Commits

Author SHA1 Message Date
Treehugger Robot
aa5d8dfeb0 Merge "Build com.android.location.provider with java_sdk_library" 2018-06-15 03:41:18 +00:00
Treehugger Robot
a917c1db32 Merge "Make dumpHexString() tolerate null arrays." 2018-06-15 02:32:54 +00:00
Treehugger Robot
31686e954a Merge "Clear calling identity before doing any work" 2018-06-14 19:13:29 +00:00
Neil Fuller
185a29a5a8 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
2018-06-14 17:44:55 +01:00
Bernie Innocenti
dee4e0bde4 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
2018-06-14 22:59:08 +09:00
Neil Fuller
bfa58946f7 Merge "Add TimestampedValue.toString()" 2018-06-14 08:21:27 +00:00
Pengquan Meng
9f2362bb82 Merge changes from topic "clean"
* changes:
  Remove internal ApnSetting.
  Docs: noted that setting proxy hostnames on an ApnSetting requires an internet connection for DNS.
2018-06-13 20:47:13 +00:00
Neil Fuller
ca97b34330 Add TimestampedValue.toString()
To make debug logging useful.

Bug: 78217059
Test: Build
Change-Id: I710b56d189afeb26ac50f55d9286d04219779ee7
2018-06-13 15:29:05 +01:00
Treehugger Robot
5392d799ab Merge "Use disableForUser in StatusBarManager" 2018-06-13 14:19:32 +00:00
yuemingw
457c62801b Remove internal ApnSetting.
Bug: 77511388
Test: atest FrameworksTelephonyTests
Change-Id: I0da354c7d55ac49f90ca1376e8f2034e65e4e274
Merged-In: I9757ef4aae269d828c98a7363c98629c9be74846
2018-06-13 12:52:25 +01:00
Benjamin Miller
ce3d429832 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
2018-06-13 12:50:57 +01:00
Treehugger Robot
16eef1aad8 Merge "Frameworks: Remove complex boolean" 2018-06-12 19:24:19 +00:00
Treehugger Robot
8ec0c6ba48 Merge "persist.sys.boot.reason is cleared once read by bootstat" 2018-06-12 19:19:57 +00:00
Evan Laird
172708b539 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
2018-06-12 15:14:25 -04:00
Andreas Gampe
eb56c581d3 Frameworks: Remove complex boolean
To allow an Errorprone warning to become an error.

Bug: 72451126
Test: m
Change-Id: I8733f0ee74de615e4ffc979fb9de38730c2506c6
Merged-In: Ia6856157e8813856268fba003e1e591d690cb26e
2018-06-12 10:37:04 -07:00
Treehugger Robot
cb749e2e50 Merge "Simple pass-through TimeDetectorService" 2018-06-12 17:01:25 +00:00
Neil Fuller
4773b9dadc 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 24836bfb15)
2018-06-12 15:33:35 +01:00
Chalard Jean
6c0106b57f 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.
2018-06-12 12:23:59 +00:00
Chalard Jean
3c443fcf40 [PT06] Move setGlobalProxy into ProxyTracker
Test: runtest
Change-Id: I6abd2221882db368a411b7174c66d8bd3b6b5110
2018-06-12 19:03:15 +09:00
Chalard Jean
3319c62dfe [PT05] Move sendProxyBroadcast into ProxyTracker.
Test: runtest
Change-Id: I2c149d29d4b75d3978021b940b6bc58f677b8d17
2018-06-12 19:03:15 +09:00
Chalard Jean
ff5d0055bc [PT04] Move PacManager into ProxyTracker.
Test: runtest
Change-Id: I45d22857459fe1746d484ac04f8d5cd81fc61835
2018-06-12 19:03:15 +09:00
Chalard Jean
5afbc83b91 [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
2018-06-12 19:03:15 +09:00
Chalard Jean
4949dd7540 [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
2018-06-12 19:03:14 +09:00
Chalard Jean
52c2aa7eeb [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
2018-06-12 19:03:14 +09:00
Chalard Jean
c098291bc4 Remove a useless parameter.
This argument is useless because all its callers pass the same
value : false.

Test: runtest
Change-Id: Id921caa4ffadef535a5bbcfea052283a07320b28
2018-06-12 19:03:14 +09:00
Chalard Jean
6823744fa6 Small cleanup of Network.
Test: runtest
Change-Id: I56dbd37bb8f890938d360f45835de72be4beb91a
2018-06-12 19:03:14 +09:00
Chalard Jean
b8cfa1d0eb Cleanup of LinkProperties.
Test: runtest
Change-Id: I7299de93a79901635ce755a2d933666ee43767d5
2018-06-12 19:03:07 +09:00
Neil Fuller
5e1d95b0cc Merge "Minimum viable TimeDetectorService" 2018-06-12 09:50:32 +00:00
Brad Ebinger
0be0692691 Merge "Update Docs to clarify using a Message across IPC" 2018-06-11 19:56:07 +00:00
Treehugger Robot
05c09faad2 Merge "Framework: Disable native-bridge for non-zygote" 2018-06-11 15:23:38 +00:00
Jakub Pawlowski
d62f74e806 Merge "ScanRecord.getServiceData NPE fix" 2018-06-11 14:43:57 +00:00
Jakub Pawlowski
59880123d7 ScanRecord.getServiceData NPE fix
Bug: 109662587
Change-Id: I0e9653d9cd7e4b748870bacb6fbcecae535ebb2a
2018-06-11 14:43:42 +00:00
Neil Fuller
b557907f51 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 feeee682a2)
2018-06-11 15:29:57 +01:00
Treehugger Robot
bfe3b1a691 Merge changes Ifd7d73ad,Id79096fa
* changes:
  Bugfixes in LinkProperties#toString
  Cleanup of ConnectivityManager.
2018-06-11 11:54:21 +00:00
Chalard Jean
faaf2fe700 Bugfixes in LinkProperties#toString
We should stop trying to use a human brain to write code

Test: manual
Change-Id: Ifd7d73ad65de0f671466080beacbd97287e17bfe
2018-06-11 18:48:37 +09:00
Chalard Jean
4d660114dc Cleanup of ConnectivityManager.
This is not exhaustive, but still an undeniable improvement.

Test: runtest frameworks-net
Change-Id: Id79096faf20eec80de7c17b261ef338b895af1e0
2018-06-11 18:48:37 +09:00
Treehugger Robot
20e243d627 Merge "Use ParcelFileDescriptor's C++ implementation in libbinder" 2018-06-11 07:27:41 +00:00
Treehugger Robot
a190a41b51 Merge "No-op cleanup of ConnectivityService." 2018-06-11 04:57:31 +00:00
Treehugger Robot
33b5abb6f8 Merge "Copy clat modified linkProperties into new one." 2018-06-11 03:26:26 +00:00
Treehugger Robot
2d5156733c Merge changes from topic "audio-package-update"
* changes:
  Include InCallNotification.ogg in AllAudio.mk file
  Add ChargingStarted + InCallNotif to AudioPackage
2018-06-08 20:47:03 +00:00
Treehugger Robot
0559afdbcc Merge "Check for null path in getInternalPathForUser" 2018-06-08 20:16:14 +00:00
Jerry Zhang
30f63cf1f9 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 6f6154bf04)
2018-06-08 11:26:33 -07:00
Treehugger Robot
c2791389a5 Merge "API updated for ICU4J 61.1" 2018-06-08 17:19:55 +00:00
nharold
b2749539c0 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
2018-06-08 17:07:11 +00:00
Brad Ebinger
7db23752ab Merge "Adds a private field to parceled data." 2018-06-08 17:03:14 +00:00
Brad Ebinger
442b546e2a Merge "Unhide @SystemApi Constructor" 2018-06-08 17:02:48 +00:00
David Brazdil
60229832de Merge "Build dark greylist from public + light grey API" 2018-06-08 14:22:26 +00:00
Fredrik Roubert
267f1ca774 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
2018-06-08 13:39:46 +00:00
Treehugger Robot
6b03498a54 Merge "Opportunistic typo fix" 2018-06-08 11:51:29 +00:00
Chalard Jean
4133a12431 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
2018-06-08 19:10:59 +09:00