374057 Commits

Author SHA1 Message Date
Christopher Ferris
ffa139e83d 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)
2018-06-15 12:29:36 -07:00
Tyler Gunn
b48c662e21 Update onDeregistered docs to make capability change expectations clear.
Updating the onDeregistered docs to make it clear that the ImsService
must report any feature capability changes to the framework prior to
de-registration.

Bug: 73076695
Test: Docs only change.
Merged-In: Ib9bc88bfb43670f04c8afde36d0947255399397a
Change-Id: Ib9bc88bfb43670f04c8afde36d0947255399397a
2018-06-15 09:15:32 -07:00
Sundong Ahn
abdaa314f8 Merge "Build com.android.location.provider with java_sdk_library"
am: aa5d8dfeb0

Change-Id: I53720ed4fcbe9f00f2f1f607d07efa9adaaf7bb4
2018-06-14 21:59:40 -07:00
Bernie Innocenti
7bb253d078 Merge "Make dumpHexString() tolerate null arrays."
am: a917c1db32

Change-Id: Ib0160e232cab0a713853a65eef26f7a02d65c1f1
2018-06-14 21:55:53 -07:00
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
Colin Cross
6719222fb7 Fix ManifestMerger issues
Set LOCAL_MIN_SDK_VERSION in SettingsLib so that the build system
doesn't raise the minSdkVersion value specified in the manifest,
which causes ManifestMerger to error when trying to merge it into
a package that specifies a lower minSdkVersion.

Bug: 78447299
Test: m java
Change-Id: Ie2c2458647cd6495418999b35894dc92343992cc
2018-06-14 15:25:20 -07:00
Neil Fuller
3eb2ad1096 Merge "Clear calling identity before doing any work"
am: 31686e954a

Change-Id: I144fd2b5f46ce7d7a06195a2dd5207d44cd951f0
2018-06-14 14:15:04 -07: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
Andreas Gampe
5b003117b2 Apf: Avoid constant overflow
The used constant overflows. This is irrelevant to the test, so
decrease test constant.

Bug: 110155920
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Idfc7e987ba9c36389a20c7fc01b1161ef89483d8
2018-06-14 08:43:07 -07: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
494665870f Merge "Add TimestampedValue.toString()"
am: bfa58946f7

Change-Id: I38760ef47ba04f20882a467857e7c57c088d4391
2018-06-14 02:40:17 -07:00
Neil Fuller
bfa58946f7 Merge "Add TimestampedValue.toString()" 2018-06-14 08:21:27 +00:00
Nan Zhang
4b81658d40 Enabled annotations for Metalava based api-stubs.
Test: m -j metalava-api-stubs-docs
Bug: b/78245848
Change-Id: I4ba661900a52f246fc0191c31aabfc96b89fa2db
2018-06-13 17:42:09 -07:00
Pengquan Meng
fdad4c89fb Merge changes from topic "clean"
am: 9f2362bb82

Change-Id: I9a0554d7cacd8c02d78ad08b7d05b074720dfe2a
2018-06-13 15:33:08 -07:00
Benjamin Miller
8efa35360f [automerger skipped] Docs: noted that setting proxy hostnames on an ApnSetting requires an internet connection for DNS.
am: ce3d429832  -s ours

Change-Id: If38c9f39b28e39f26481671bfc7f293e321a26d9
2018-06-13 15:26:20 -07: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
Evan Laird
3f3aa3518f Merge "Use disableForUser in StatusBarManager"
am: 5392d799ab

Change-Id: I346f8a17d43e65c6e9ed362942345146ad6cac1d
2018-06-13 08:56:41 -07: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
Andreas Gampe
c997d66018 [automerger skipped] Merge "Frameworks: Remove complex boolean"
am: 16eef1aad8  -s ours

Change-Id: I407b42d45738599955bca210b5f9896753e51224
2018-06-12 14:58:00 -07:00
Mark Salyzyn
660c145dd1 Merge "persist.sys.boot.reason is cleared once read by bootstat"
am: 8ec0c6ba48

Change-Id: Ib52e362e07a81086e142ff1f120a266862f0a073
2018-06-12 14:14:03 -07:00
Treehugger Robot
16eef1aad8 Merge "Frameworks: Remove complex boolean" 2018-06-12 19:24:19 +00:00
Neil Fuller
10e276a24d Fix a syntax error in SystemServiceRegistry
The syntax error was introduced by a bad conflict resolution
in http://ag/4324946.

Bug: 110097023
Test: Inspection only
Merged-In: I9e4eac70b944441f34491315cd1ce7fa2b9ae150
Change-Id: I546f2d010faa6f75033cf7e3e51ef7ed640854ed
2018-06-12 20:20:27 +01: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
Neil Fuller
415585f2a5 Merge "Simple pass-through TimeDetectorService"
am: cb749e2e50

Change-Id: Ic2e3d3c3f9181ef4054f599baf4ac086ec21d8bd
2018-06-12 11:17:51 -07: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 24836bfb1564b1f98c322108a924965a8dbbee4f)
2018-06-12 15:33:35 +01:00
Chalard Jean
85bae863f5 Merge changes I6abd2221,I2c149d29,I45d22857,I1f879b2c,If4986a25, ...
am: 6c0106b57f

Change-Id: I86bc83e2bd859b48017f12832e9ff0080ec162b8
2018-06-12 06:57:33 -07:00
Neil Fuller
79d42a61e4 resolve merge conflicts of 5e1d95b0cc05eb1a6bf25a13223601f2e8f8fccb to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ic5527b29cbe8c84d2053be849cf09df5341e4790
2018-06-12 14:23:51 +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
d82ba6d374 [PT09] Add javadoc comments to all ProxyTracker methods/members.
Also rename some vars and inline a function that is now private.

Test: runtest
Change-Id: I4b1bca8b29f46d97056973cd38ed8effc3f5b591
2018-06-12 19:03:16 +09:00
Chalard Jean
daab8f917e [PT08] Move setDefaultProxy to ProxyTracker
Test: runtest
Change-Id: Idb7d2f2895aac63d54e3a6481379b739a726eff6
2018-06-12 19:03:16 +09:00
Chalard Jean
3c443fcf40 [PT06] Move setGlobalProxy into ProxyTracker
Test: runtest
Change-Id: I6abd2221882db368a411b7174c66d8bd3b6b5110
2018-06-12 19:03:15 +09:00
Chalard Jean
1900b59e25 [PT07] Small cleanup of setGlobalProxy
Test: runtest
Change-Id: I4825e6326f7ce7bd45d625d57824f8d27c51d6f2
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
b57dfe26cf [automerger skipped] Merge "Update Docs to clarify using a Message across IPC"
am: 0be0692691  -s ours

Change-Id: I1d3887c7d4a868a1f1b56c0d2e4f824eef29fb3a
2018-06-11 15:24:19 -07:00