Commit Graph

345003 Commits

Author SHA1 Message Date
Sundong Ahn
9794d2a5b9 Build com.android.future.usb.accessory with java_sdk_library
com.android.future.usb.accessory is built with java_sdk_library and api
files are added by running "make update-api".

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

Change-Id: I21c635c06ab809b3d1b34b2a8de055fa20d9b066
2018-06-19 10:22:30 +09:00
Treehugger Robot
a9bf7a8810 Merge "Fixed the incorrect permission for data/network service binding" 2018-06-19 00:36:38 +00:00
Treehugger Robot
79d3bf6e54 Merge "Enabled annotations for Metalava based api-stubs." 2018-06-18 16:55:28 +00:00
Chalard Jean
84d4e535ae Merge changes I4b1bca8b,Idb7d2f28,I4825e632
* changes:
  [PT09] Add javadoc comments to all ProxyTracker methods/members.
  [PT08] Move setDefaultProxy to ProxyTracker
  [PT07] Small cleanup of setGlobalProxy
2018-06-18 09:00:40 +00:00
Treehugger Robot
5b99659943 Merge "Apf: Avoid constant overflow" 2018-06-18 06:16:23 +00:00
Christopher Ferris
0ec0c17596 Merge "Use the malloc debug heap dumper." 2018-06-15 21:36:42 +00:00
Jack Yu
063ed82eef Fixed the incorrect permission for data/network service binding
The permission renaming was done in ag/3552774. Other places
need to be fixed accordingly.

Test: Unit tests
Bug: 73659459
Change-Id: Ic325d666c333eef22dba95f8d2488fb172810c2c
2018-06-15 14:34:22 -07:00
Treehugger Robot
684b5f038b Merge "Fix ManifestMerger issues" 2018-06-15 20:47:30 +00:00
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 38e2c3bc9c)
2018-06-15 12:29:36 -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
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
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
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
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
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