Commit Graph

2493 Commits

Author SHA1 Message Date
Keun-young Park dbbc635ca6 Merge "Add UID for vehicle network" am: 9112b419bd am: 3142267ff2 am: 1692bbc410
am: b7f99e8cf4

Change-Id: I973f7b68440855e2dd5d5dd21cf5594dede6aecf
2016-10-28 21:25:16 +00:00
Keun-young Park 3142267ff2 Merge "Add UID for vehicle network"
am: 9112b419bd

Change-Id: Ie6111026580d97d8552fd3de1fe10e88820205c6
2016-10-28 21:09:36 +00:00
Keun-young Park 42e802c2fb Add UID for vehicle network
- Access to vehicle network is done in vehicle network service process.

Test: build
bug: 32508433
Change-Id: I340d1f4964d70b53f10d84fb15a62107e1dedc0e
2016-10-28 12:08:07 -07:00
Eric Laurent f7586d3045 Merge "radio: fix compatibility for 64 bit processes" 2016-10-27 15:23:05 +00:00
Eric Laurent 5d4d06ab1e radio: fix compatibility for 64 bit processes
Clarify use of 32 bit quantities in all internal and HAL structures
to make sure that structures can be passed through binder calls between
processes with different data unit sizes.

NOTE: some structures still contain a pointer to metadata buffer: This pointer
is always at the end of the structures and special care is taken in binder
call implementations to cope with pointer size differences.

Change-Id: I2023f70c3c62f6fa45f9eab3f09d18033f0efe4f
2016-10-26 15:37:33 -07:00
Dimitry Ivanov e3d6392198 Merge "Upgrade native bridge to version 3 to support namespace" am: 28c0c0762e am: 996cfc70a0 am: 442b7b5f53
am: 625a2f68ad

Change-Id: I5af717ca6722040377a4cc29d533704eb568b333
2016-10-26 20:36:19 +00:00
Dimitry Ivanov 996cfc70a0 Merge "Upgrade native bridge to version 3 to support namespace"
am: 28c0c0762e

Change-Id: Ic4263e89f59b1ad34f1f8f28b52f4b45a4df351d
2016-10-26 20:11:25 +00:00
Dimitry Ivanov 28c0c0762e Merge "Upgrade native bridge to version 3 to support namespace" 2016-10-26 18:27:38 +00:00
Mark Salyzyn 3bd87e66f2 Merge "log/logd.h should point to log/log.h" am: d97efe0383 am: 171a6a4277 am: a8c6a372b5
am: 6c4816c674

Change-Id: Id1ebfdf2e2e6a558097c345542697acfbd7b5415
2016-10-25 19:37:58 +00:00
Mark Salyzyn 171a6a4277 Merge "log/logd.h should point to log/log.h"
am: d97efe0383

Change-Id: I5fbbe7f957f303fb61d60177474f615c9f3e7c25
2016-10-25 19:24:54 +00:00
Zhenhua WANG f2804e5985 Upgrade native bridge to version 3 to support namespace
Native bridge implements namespace related interfaces in version 3.
The namespace semantic here is same as Android dynamic linker's.
Native loader wraps library loading functions of dynamic linker and
native bridge. Thus, Android runtime is able to load native library
of different ISA on one device by calling native loader directly.

Bug: http://b/28242460
Test: mm && make test-art-host -j48
Change-Id: Idde2b9d99fb6ebe547407c716b5478a231f745a7
Signed-off-by: Zhenhua WANG <zhenhua.wang@intel.com>
2016-10-25 11:11:38 -07:00
Mark Salyzyn 57ba9c96e3 log/logd.h should point to log/log.h
Test: compile
Bug: 32395896
Bug: 30465923
Change-Id: I1ee85594a0dc6b094480161dc5dbec71eaecdfb9
2016-10-25 09:21:00 -07:00
Mark Salyzyn de3ae8cfc0 liblog: logd: logcat: Split out log/logger.h into public and private. am: aeaaf81c2c am: 28fcac705b am: df8ca4c0cf
am: 003248a984

Change-Id: I3b6a45c965c814493b7080415f4b3fc2678df3db
2016-10-24 23:04:41 +00:00
Mark Salyzyn 28fcac705b liblog: logd: logcat: Split out log/logger.h into public and private.
am: aeaaf81c2c

Change-Id: I124c69673c30bb5f2259849792ed4ca99f4d6b60
2016-10-24 22:53:11 +00:00
Mark Salyzyn 43dc72ffef Merge "liblog: restructure log/log.h and android/log.h" am: 11a7165ecf am: 9fd2ffc145 am: 5290d85f54
am: 1104ceb573

Change-Id: I34fff2d86ddd3c769dfa59b54a176b5908a0233f
2016-10-24 20:57:04 +00:00
Mark Salyzyn 9fd2ffc145 Merge "liblog: restructure log/log.h and android/log.h"
am: 11a7165ecf

Change-Id: I6ebdebdd82e8a59a711ee0fe41056abdacb084b3
2016-10-24 20:46:08 +00:00
Mark Salyzyn aeaaf81c2c liblog: logd: logcat: Split out log/logger.h into public and private.
log/logger.h pieces moved into log/log.h.  Correct for some
minor Android Coding standards.

Test: gTests liblog-unit-tests, logd-unit-tests and logcat-unit-tests
Bug: 19235719
Bug: 26552300
Bug: 31289077
Bug: 31456426
Change-Id: I0a19fd8788eec20a582e72e4c62c04534bdb1b9a
2016-10-24 11:12:49 -07:00
Mark Salyzyn 749a298dfd liblog: restructure log/log.h and android/log.h
We went too far, so this is a partial revert, part deux.

Keep general purpose logging macros in android/log.h for the NDK.
More internal features like Radio, System and Events logging are
moved back to log/log.h.  Correct liblog ndk symbols.  Correct for
some Android Coding standards.

Test: compile
Bug: 31992412
Change-Id: Id3731496fa226e8c170305d0d2a1859e8cf67e14
2016-10-24 11:03:49 -07:00
Mark Salyzyn b4c9ab960e Merge "system/core: preparation to pull back interfaces from android/log.h" am: 27d2d49f48 am: 8a7297a09f
am: c561af07ae

Change-Id: I7bfb6dd925739345624a1ed16c0c3cb2106ad098
2016-10-20 18:21:18 +00:00
Mark Salyzyn 8a7297a09f Merge "system/core: preparation to pull back interfaces from android/log.h"
am: 27d2d49f48

Change-Id: I604bb1d4cf62636663fa92e3d14a55887dbcae23
2016-10-20 18:03:57 +00:00
Mark Salyzyn cfd5b080af system/core: preparation to pull back interfaces from android/log.h
Point to log/log.h where necessary, define LOG_TAG where necessary.
Accept that private/android_logger.h is suitable replacement for
log/logger.h and android/log.h.

Correct liblog/README

Effectively a cleanup and controlled select revert of
'system/core: drop or replace log/logger.h' and
'system/core: Replace log/log.h with android/log.h'.

Test: compile
Bug: 30465923
Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
2016-10-20 08:11:39 -07:00
Mark Salyzyn 332200bce7 Merge "liblog: Add private interfaces for buffer size properties" am: 094004bf42 am: 8806766621
am: eb980356fe

Change-Id: Ic0d4f248bc4ba6e6e4c1fca3b88891055e4414f9
2016-10-18 23:43:38 +00:00
Mark Salyzyn 8806766621 Merge "liblog: Add private interfaces for buffer size properties"
am: 094004bf42

Change-Id: I81c6ff947b0f0939b41ea59dae153c5584ac9049
2016-10-18 23:29:28 +00:00
Mark Salyzyn 094004bf42 Merge "liblog: Add private interfaces for buffer size properties" 2016-10-18 23:22:18 +00:00
Tianjie Xu 769c601b91 resolve merge conflicts of 34486c5 to master
Change-Id: I12fc8eb4760bd6c4ae5c97583eb6c659122c9fa9
2016-10-18 15:46:56 -07:00
Tianjie Xu b2ca85184b Merge "Add functions in recovery/minzip to libziparchive"
am: 4bc51d1ea4

Change-Id: Ica94e8050286bed1c5bc23a33305050ab8da8ec5
2016-10-18 21:57:30 +00:00
Tianjie Xu 4bc51d1ea4 Merge "Add functions in recovery/minzip to libziparchive" 2016-10-18 17:30:02 +00:00
Mark Salyzyn e455373b57 liblog: Add private interfaces for buffer size properties
Add private function __android_logger_get_buffer_size() to read
properties and compose the default buffer size.  This interface
complements the existing android_looger_get_size() which returns
the logd setting which can differ at runtime.  For use in logd
and dumpstate.  Side effect is we also add the private functions
__android_logger_property_get_bool() and
__android_logger_valid_buffer_size() for reuse in logd.

Test: gTest liblog-unit-test, logd-unit-tests and logcat-unit-tests in
      combination with commit 'logd: Use private interfaces for
      buffer size properties'
Bug: 31750617
Change-Id: Id95cb68f775ef6b427c122e10f6f8291d336d184
2016-10-18 09:48:55 -07:00
Mark Salyzyn 39b3339790 Merge "liblog: LIBLOG_ABI_PRIVATE __android_log_is_debuggable()" am: 915d620359 am: 3132543d83
am: 224865fce8

Change-Id: Ibaf5ef907bfc5df08d2bccf51896b3dcc9a1a53f
2016-10-17 22:10:52 +00:00
Mark Salyzyn 3132543d83 Merge "liblog: LIBLOG_ABI_PRIVATE __android_log_is_debuggable()"
am: 915d620359

Change-Id: I66547a2d32c96b9baffccb8a391a15a155faf123
2016-10-17 21:57:22 +00:00
Treehugger Robot 915d620359 Merge "liblog: LIBLOG_ABI_PRIVATE __android_log_is_debuggable()" 2016-10-17 21:46:37 +00:00
Tianjie Xu 18c25920c2 Add functions in recovery/minzip to libziparchive
Add two functions libziparchive that libminzip has. And create
corresponding unit tests.
1. Open a zip archive from a memory mapped region.
2. A new writer that takes a call back function pointer.
(Used by the OTA updater to stream the data.)

Test: Unit tests passed
Bug: 19472796
Change-Id: I2b2daec71174afe221030357e39bff5faea51e72
2016-10-15 23:16:34 -07:00
Elliott Hughes 8ae0809676 Merge "Remove socket_loopback_client." am: 5171bebf41 am: 091113ec6c
am: 232a19495b

Change-Id: I6dd6b5fe4a313fc4f0ee6fd786032cb69e3e2562
2016-10-14 20:47:12 +00:00
Elliott Hughes 091113ec6c Merge "Remove socket_loopback_client."
am: 5171bebf41

Change-Id: I28080f043ba5a042573e81a6da3f5be83c7a4251
2016-10-14 20:37:06 +00:00
Treehugger Robot 5171bebf41 Merge "Remove socket_loopback_client." 2016-10-14 18:21:38 +00:00
Mark Salyzyn 9ea359fce0 liblog: LIBLOG_ABI_PRIVATE __android_log_is_debuggable()
Allow our own libraries to use this privately instead of
running the less efficient get_properties and doing the math.

Test: compile and boot smoke test
Bug: 27566046
Bug: 31456426
Change-Id: I2f677276d27fbcb6af01b600ac1d9891c8938d43
2016-10-14 08:00:41 -07:00
Tao Wu 25353c0e37 Merge "Fallback to IPv6 when IPv4 is not available in adb" am: c32d7fd66f am: 5b7c6772b0 am: 27c6c4cf04
am: 4b9774fe97

Change-Id: I1a76d4245be930ae9e6cff32f54cf0158d216f2b
2016-10-14 01:55:42 +00:00
Tao Wu 4b9774fe97 Merge "Fallback to IPv6 when IPv4 is not available in adb" am: c32d7fd66f am: 5b7c6772b0
am: 27c6c4cf04

Change-Id: I2ceb40b4589dfc2721197065ae5a85e9dc83b907
2016-10-14 01:51:54 +00:00
Tao Wu 27c6c4cf04 Merge "Fallback to IPv6 when IPv4 is not available in adb" am: c32d7fd66f
am: 5b7c6772b0

Change-Id: I63e945622d47ab1cbcbdd82d00cfdf3d51c95564
2016-10-14 01:46:26 +00:00
Treehugger Robot c32d7fd66f Merge "Fallback to IPv6 when IPv4 is not available in adb" 2016-10-14 01:35:43 +00:00
Elliott Hughes dd92a0a812 Remove socket_loopback_client.
Bug: http://b/31537253
Test: builds
Change-Id: If02c8107206fb60e4622f8937bee0d0a362e1c7d
2016-10-13 16:51:46 -07:00
Chia-I Wu b955e34fee Merge "Add native_handle_init" am: d790aae4bc am: 28423b86fe am: bf72cf21dc
am: 7e671b343f

Change-Id: Ie7cdf1686da3c1017b4d807bbbf49f07c752f938
2016-10-13 22:36:10 +00:00
Chia-I Wu 7e671b343f Merge "Add native_handle_init" am: d790aae4bc am: 28423b86fe
am: bf72cf21dc

Change-Id: I5d4cc013421350dd30fa13d168112d30ad93e7cd
2016-10-13 22:32:57 +00:00
Chia-I Wu bf72cf21dc Merge "Add native_handle_init" am: d790aae4bc
am: 28423b86fe

Change-Id: Ied7a062c6ce40864ea181819f5da21e64cae04de
2016-10-13 22:26:11 +00:00
Tao Wu 7b700763f5 Fallback to IPv6 when IPv4 is not available in adb
Test: manual - make sure it works in both IPv4/IPv6 env.
BUG: 31537253
Change-Id: Ica492bff34a8c0441516a213d0e8b78fcdfd3282
Signed-off-by: Tao Wu <lepton@google.com>
2016-10-13 08:54:43 -07:00
Chia-I Wu b843791b61 Add native_handle_init
HIDL requires file descriptors to be wrapped in native_handle_t.  We want
a low overhead way to do that when the number of file descriptors is known
at compile time.  Instead of

  // wrap an fd in native_handle_t
  native_handle_t* fd_handle = native_handle_create(1, 0);
  if (!fd_handle) {
    // clean up and return error
  }
  fd_handle->data[0] = fd;

  hidl_cb(..., fd_handle);

  native_handle_delete(fd_handle);

this change adds native_handle_init to allow for

  // wrap an fd in native_handle_t
  NATIVE_HANDLE_DECLARE_STORAGE(fd_storage, 1, 0);
  native_handle_t* fd_handle = native_handle_init(fd_storage, 1, 0);
  fd_handle->data[0] = fd;

  hidl_cb(..., fd_handle);

Test: make libcutils
Bug: 32021609
Change-Id: If1fd07482243d37492fdea57c602a1b13c8953cc
2016-10-12 18:04:41 -07:00
Mark Salyzyn d22ec4759d Merge "liblog: adb: move security interfaces to private" am: 09dac589f1 am: 586c6985cf am: 4b5456eacc
am: 144abd8cb2

Change-Id: I7cfbc0e02d7a174b471528424ef6b5f7291e96eb
2016-10-10 23:45:01 +00:00
Mark Salyzyn 144abd8cb2 Merge "liblog: adb: move security interfaces to private" am: 09dac589f1 am: 586c6985cf
am: 4b5456eacc

Change-Id: Id78628d7e7abfa16f1ada16f894f9616a2dc469b
2016-10-10 23:34:54 +00:00
Mark Salyzyn 4b5456eacc Merge "liblog: adb: move security interfaces to private" am: 09dac589f1
am: 586c6985cf

Change-Id: I8c54bdc1a3582be1fc7c4a9be83b555624fcb0a3
2016-10-10 23:29:55 +00:00
Mark Salyzyn 6debf985aa liblog: adb: move security interfaces to private
Test: Compile & adb functioning
Bug: 19235719
Bug: 26552300
Bug: 31289077
Bug: 31456426
Change-Id: I7ad8963bcca3d8b5c37b547c11d163b652d35556
2016-10-10 15:15:45 +00:00
Chia-I Wu 83c351a6d3 Merge "Add native_handle_clone" am: e8f6c7398b am: 462e087e40 am: cb52dc258e
am: ebebf0198d

Change-Id: Iefc37b74b98d265ab779c0ded9e4bbc3ee73ba2c
2016-10-08 01:56:36 +00:00
Chia-I Wu ebebf0198d Merge "Add native_handle_clone" am: e8f6c7398b am: 462e087e40
am: cb52dc258e

Change-Id: I011555d429120a26e61fbce5f7a125ce96fadb3f
2016-10-08 01:39:01 +00:00
Chia-I Wu cb52dc258e Merge "Add native_handle_clone" am: e8f6c7398b
am: 462e087e40

Change-Id: I745341bf4c76fc8c75f36e578cf1086808119426
2016-10-08 01:34:05 +00:00
Chia-I Wu e8f6c7398b Merge "Add native_handle_clone" 2016-10-08 01:25:35 +00:00
Elliott Hughes c2b3b5fade Merge "Test for _WIN32 in instead of USE_MINGW." am: ec99158580 am: 2e7e065db9 am: 04819403d6
am: c9dc124e2f

Change-Id: I2cfb73fc12da1bb6396bfdd8f638b9ce977f84bc
2016-10-05 18:44:02 +00:00
Elliott Hughes c9dc124e2f Merge "Test for _WIN32 in instead of USE_MINGW." am: ec99158580 am: 2e7e065db9
am: 04819403d6

Change-Id: I03fc482f4d0aab72991b351e855b8e240ed3abd9
2016-10-05 18:38:10 +00:00
Elliott Hughes 04819403d6 Merge "Test for _WIN32 in instead of USE_MINGW." am: ec99158580
am: 2e7e065db9

Change-Id: I9c7bee42bf1d7522d4dd95b5bb8a925841f96624
2016-10-05 18:35:40 +00:00
Treehugger Robot ec99158580 Merge "Test for _WIN32 in instead of USE_MINGW." 2016-10-05 18:30:06 +00:00
Elliott Hughes 34a4f0b8c7 Test for _WIN32 in instead of USE_MINGW.
Bug: http://b/23392815
Test: builds
Change-Id: I7fce8de1f0e2314170cce456cd49346dcee9d134
2016-10-05 09:37:44 -07:00
Mark Salyzyn 631ce33fc9 Merge "system/core: drop or replace log/logger.h" am: 1f90485804 am: cb670780be am: 6e5ffe2680
am: 74ba3b0ce6

Change-Id: I542132517d0cc91f543bf5613dce97c457483177
2016-10-04 18:46:24 +00:00
Mark Salyzyn 74ba3b0ce6 Merge "system/core: drop or replace log/logger.h" am: 1f90485804 am: cb670780be
am: 6e5ffe2680

Change-Id: I4c1351fb61b3357d059a8e1da4ce14e3701e17af
2016-10-04 18:37:14 +00:00
Mark Salyzyn 6e5ffe2680 Merge "system/core: drop or replace log/logger.h" am: 1f90485804
am: cb670780be

Change-Id: I532a0f6143511f53f3303751f95de115ac034cd7
2016-10-04 18:33:44 +00:00
Mark Salyzyn 37c9451349 system/core: drop or replace log/logger.h
debuggerd does not require log/logger.h, can use android/log.h
In some cases, mark why log/logger.h was required.

Test: Compile and boot smoke test
Bug: 26552300
Bug: 31289077
Bug: 31456426
Change-Id: Ia34987e25a01d81971ec8d785415f732b8376c4f
2016-10-04 09:09:10 -07:00
Mohan Srinivasan 03a7950fda Merge "liblog: logd: Add android_lookupEventTag_len()" am: 093951a230 am: aed39f1f3d am: 2acb41b46c
am: 96eba22338

Change-Id: I5321bf766ac59f0ecc34bb3623440621a6a7ab1d
2016-10-03 22:50:09 +00:00
Mohan Srinivasan 96eba22338 Merge "liblog: logd: Add android_lookupEventTag_len()" am: 093951a230 am: aed39f1f3d
am: 2acb41b46c

Change-Id: Ifd5da3780cf05863b71fad9583b1b83f4962b46f
2016-10-03 22:47:51 +00:00
Mohan Srinivasan 2acb41b46c Merge "liblog: logd: Add android_lookupEventTag_len()" am: 093951a230
am: aed39f1f3d

Change-Id: If1615c62df20df58eda2910455f2a1e05268fba7
2016-10-03 22:42:20 +00:00
Mark Salyzyn 807e40ecc9 liblog: logd: Add android_lookupEventTag_len()
Allows us to mitigate the impact of MAP_PRIVATE and copy on write by
calling android_lookupEventTag_len instead of android_lookupEventTag,
and delaying the copy on write impact to the later.  We return a
string length in a supplied location along with the string pointer
with android_lookupEventTag_len(const EventTagMap* map, size_t* len,
int tag).  The string is not guaranteed to be nul terminated.  Since
android_lookupEventTag() called even once can cause the memory
impact, we will mark it as deprecated, but we currently have no
timeframe for removal since this is a very old interface.

Add an API for __android_log_is_loggable_len() that accepts the non
null terminated content and fixup callers that would gain because the
length is known prior to the call either in the compiler or at
runtime.  Tackle transition to android_lookupEventTag_len() and
fixup callers.

On any application that performs logging (eg: com.android.phone)

/proc/<pid>/smaps before:

xxxxxxxxxx-xxxxxxxxxx rw-p 00000000 fd:00 463 /system/etc/event-log-tags
Size:                 20 kB
Rss:                  20 kB
Pss:                   1 kB
Shared_Clean:          0 kB
Shared_Dirty:         20 kB
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:            0 kB
Anonymous:            20 kB
AnonHugePages:         0 kB
Swap:                  0 kB
SwapPss:               0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:                0 kB
VmFlags: rd wr mr mw me ac

/proc/<pid>/smaps after:

xxxxxxxxxx-xxxxxxxxxx rw-p 00000000 fd:00 1773 /system/etc/event-log-tags
Size:                 20 kB
Rss:                  20 kB
Pss:                   1 kB
Shared_Clean:         20 kB  (was 0kB)
Shared_Dirty:          0 kB  (was 20kB)
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:           20 kB  (was 0kB)
Anonymous:             0 kB  (was 20kB)
AnonHugePages:         0 kB
Swap:                  0 kB
SwapPss:               0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:                0 kB
VmFlags: rd wr mr mw me ac

Added liblog-unit-tests --gtest_filter=liblog.event_log_tags to
check for Shared_Clean: to not be 0 and Anonymous: to be 0 for
all processes referencing event-log-tags.  Which can include multiple
references to /system/etc/event-log-tags and future possible refs to
/data/misc/logd/event-log-tags and /dev/event-log-tags.  We want
failure messages to help point to errant code using the deprecated
interface.

This change saves 1/4MB of memory or more on a typical system.

Test: gTest liblog-unit-tests
Bug: 31456426
Change-Id: I9e08e44d9092bd96fe704b5709242e7195281d33
2016-10-03 11:08:34 -07:00
Mark Salyzyn 7a7b066e5e system/core Replace log/log.h with android/log.h am: ff2dcd9af9 am: cac331afd9 am: 0308b0eabd
am: 9f6b98dec0

Change-Id: I1a1384253e4fce0489b7d1aa77b0f67ee12185c3
2016-10-01 00:43:22 +00:00
Mark Salyzyn 4bf372ae30 system/core Replace cutils/log.h with android/log.h am: 66ce3e08c5 am: eb189f147b am: 16f7786032
am: 0abff8fc61

Change-Id: I8c9d221094f0c27838e120aeb41fff276fbab4b2
2016-10-01 00:43:07 +00:00
Mark Salyzyn 5c1281350f libcutils: Replace cutils/log.h with android/log.h am: 23ed4c242a am: f56fce0240 am: 9fd2eaf827
am: 9bb1f2f915

Change-Id: I3d1b88a3717cbb04573ccc8f4696aecf72bb2a93
2016-10-01 00:42:36 +00:00
Mark Salyzyn 49db2170be liblog: Replace log/log.h with android/log.h am: 6584d0a35a am: 499a33d6dc am: c528ac0fe8
am: 2156aae1d5

Change-Id: Ib795c30add8a1076a63f852fa4dedecf5c2a5231
2016-10-01 00:42:21 +00:00
Mark Salyzyn e083d36696 liblog: logcat: Replace log/logd.h with log/log.h am: a166708d15 am: 772ed1c63c am: 2b42b87d8c
am: ea3c6d1029

Change-Id: Ic7f57bc44007de93ceba3cd55884373055b74e6d
2016-10-01 00:42:05 +00:00
Mark Salyzyn 92820f1466 liblog: logd: logcat: deprecate log/log_read.h am: 004cd3c55d am: 78a459a8c8 am: 13c68b09d9
am: a06a6509d9

Change-Id: Ia0980d6bccd2c7af64c659d56047bd445be634e7
2016-10-01 00:41:48 +00:00
Mark Salyzyn a30f5f5720 liblog: Add C++ wrapper for C event log handler am: 8eaaac0103 am: 8b4cab3f69 am: 848da90978
am: 519bdbf0b4

Change-Id: Ia0b6074dc10d7d51df0c9410d1a812514b01e0e0
2016-10-01 00:41:33 +00:00
Mark Salyzyn 9f6b98dec0 system/core Replace log/log.h with android/log.h am: ff2dcd9af9 am: cac331afd9
am: 0308b0eabd

Change-Id: I4d631d53b4fc27e1a02d412bae21fffad6635258
2016-09-30 22:18:18 +00:00
Mark Salyzyn 0abff8fc61 system/core Replace cutils/log.h with android/log.h am: 66ce3e08c5 am: eb189f147b
am: 16f7786032

Change-Id: I26939d55686b6182c9fae5fc74f3e7ed92132cdb
2016-09-30 22:18:03 +00:00
Mark Salyzyn 9bb1f2f915 libcutils: Replace cutils/log.h with android/log.h am: 23ed4c242a am: f56fce0240
am: 9fd2eaf827

Change-Id: If01fd686fc15aaf74b6f06b7e661eb46e127d51b
2016-09-30 22:17:30 +00:00
Mark Salyzyn 2156aae1d5 liblog: Replace log/log.h with android/log.h am: 6584d0a35a am: 499a33d6dc
am: c528ac0fe8

Change-Id: I2e6eb5782ccd27e47e8302381d790611fd58a1d7
2016-09-30 22:17:20 +00:00
Mark Salyzyn ea3c6d1029 liblog: logcat: Replace log/logd.h with log/log.h am: a166708d15 am: 772ed1c63c
am: 2b42b87d8c

Change-Id: I4a977e248d0ea7e3b8ed31aed0643752aaab4e1c
2016-09-30 22:17:14 +00:00
Mark Salyzyn a06a6509d9 liblog: logd: logcat: deprecate log/log_read.h am: 004cd3c55d am: 78a459a8c8
am: 13c68b09d9

Change-Id: Icaab3eedecad8f55d8d1291b3414da5c12cec287
2016-09-30 22:17:08 +00:00
Mark Salyzyn 519bdbf0b4 liblog: Add C++ wrapper for C event log handler am: 8eaaac0103 am: 8b4cab3f69
am: 848da90978

Change-Id: I215d1da28c1d4e0377097f49493d1e9c5fc9ee75
2016-09-30 22:17:02 +00:00
Mark Salyzyn 0308b0eabd system/core Replace log/log.h with android/log.h am: ff2dcd9af9
am: cac331afd9

Change-Id: I95c6a64bc35a041688303fcee4d506865d0a19a4
2016-09-30 22:13:00 +00:00
Mark Salyzyn 16f7786032 system/core Replace cutils/log.h with android/log.h am: 66ce3e08c5
am: eb189f147b

Change-Id: I3f2b13e259d9bbb7bc714f21eab7181fa72c35bf
2016-09-30 22:12:55 +00:00
Mark Salyzyn 9fd2eaf827 libcutils: Replace cutils/log.h with android/log.h am: 23ed4c242a
am: f56fce0240

Change-Id: I588c3a252594e1ecd4b34242217cf23c84e4af67
2016-09-30 22:12:45 +00:00
Mark Salyzyn c528ac0fe8 liblog: Replace log/log.h with android/log.h am: 6584d0a35a
am: 499a33d6dc

Change-Id: If28b70b199b4bbf99f853d6c6d14b73a72fafacb
2016-09-30 22:12:41 +00:00
Mark Salyzyn 2b42b87d8c liblog: logcat: Replace log/logd.h with log/log.h am: a166708d15
am: 772ed1c63c

Change-Id: Ibd14ac6a57994019e188e6ec138682b50d1f7e69
2016-09-30 22:12:36 +00:00
Mark Salyzyn 13c68b09d9 liblog: logd: logcat: deprecate log/log_read.h am: 004cd3c55d
am: 78a459a8c8

Change-Id: If1a76043e7941191b3c6ba07ca0277b7f9b7f2e6
2016-09-30 22:12:32 +00:00
Mark Salyzyn 848da90978 liblog: Add C++ wrapper for C event log handler am: 8eaaac0103
am: 8b4cab3f69

Change-Id: I2760c8480818f30dd126e7cfbb900a0f5796c8b1
2016-09-30 22:12:28 +00:00
Mark Salyzyn ff2dcd9af9 system/core Replace log/log.h with android/log.h
Should use android/log.h instead of log/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I33a8fb4e754d2dc4754d335660c450e0a67190fc
2016-09-30 12:47:05 -07:00
Mark Salyzyn 66ce3e08c5 system/core Replace cutils/log.h with android/log.h
Should use android/log.h instead of cutils/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
2016-09-30 12:47:05 -07:00
Mark Salyzyn 23ed4c242a libcutils: Replace cutils/log.h with android/log.h
Replace references to cutils/log.h and log/log.h with android/log.h.
Point cutils/log.h to android/log.h. Adjust header order to comply
with Android Coding standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I4b00c0dff3a0a50cbb54301fdc5a6c29c21dab65
2016-09-30 12:47:05 -07:00
Mark Salyzyn 6584d0a35a liblog: Replace log/log.h with android/log.h
Move all liblog related content into android/log.h, and make
log/log.h points to android/log.h.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I858e0ebe047b86f2a8530a99bc9c380d3d58edbb
2016-09-30 12:47:05 -07:00
Mark Salyzyn a166708d15 liblog: logcat: Replace log/logd.h with log/log.h
Should use log/log.h and in some cases android/log.h instead. Can
not remove file because still in use by partners, so log/logd.h
points to log/log.h.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I3580d46154617abb7231027a44f4ab9ee023febf
2016-09-30 12:47:05 -07:00
Mark Salyzyn 004cd3c55d liblog: logd: logcat: deprecate log/log_read.h
Always used in combination with log/logger.h except in log_time.cpp,
and not used externally.  As a result liblog has to support stl, a
small price to pay since goal is to convert liblog to C++ internally.

Test: compile
Bug: 31456426
Bug: 26552300
Bug: 31289077
Change-Id: I72828ec807d0a2c8e40bbdebd7a69f147a7ca5a9
2016-09-30 12:47:05 -07:00
Mark Salyzyn 8eaaac0103 liblog: Add C++ wrapper for C event log handler
Add android_log_event_context class.

Test: in context of 'logd: add getEventTag command and service'
Bug: 31456426
Bug: 26552300
Bug: 31289077
Bug: 19235719
Change-Id: Icf918b443f01e04040c8d3efe0cdb7a8e70be10c
2016-09-30 12:47:05 -07:00
Miodrag Dinic 019adde2ba Merge "[qemu]: Fix payload size format in qemu_pipe_frame_send()" am: e5976bea7a am: 8c274361fb am: f610eaac14
am: 53be7eb3d0

Change-Id: I08eb0b5d904678fde74ed3a6dbdf78d9e09a741f
2016-09-30 18:19:58 +00:00
Miodrag Dinic 53be7eb3d0 Merge "[qemu]: Fix payload size format in qemu_pipe_frame_send()" am: e5976bea7a am: 8c274361fb
am: f610eaac14

Change-Id: I890fbb885044e82d4ec66a5a400240124003ac25
2016-09-30 18:00:16 +00:00
Miodrag Dinic f610eaac14 Merge "[qemu]: Fix payload size format in qemu_pipe_frame_send()" am: e5976bea7a
am: 8c274361fb

Change-Id: I7c80343b0002ec68ef9cde40dad2202aa9b70c00
2016-09-30 17:49:11 +00:00
Miodrag Dinic 192be1dcae [qemu]: Fix payload size format in qemu_pipe_frame_send()
The following change introduced regression for booting AOSP
on emulator for all architectures:

7c7990e Fix warnings in system/ headers

qemu_pipe expects payload size in the message header to be in hex format,
as stated in the comment for qemu_pipe_frame_send().

Change-Id: I32cfa9c9b2af56f93bbda0ea5597451c389ae45e
Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
2016-09-30 13:58:11 +02:00
Colin Cross 910ab5ec75 Merge "Fix more system/core/include warnings" am: 18fbd80504 am: 5fe194a9fd am: b5ca47989c
am: 0763c30289

Change-Id: I4dcce9ecde9c7f1bf02952a1aafb6407a260d73b
2016-09-29 18:04:35 +00:00
Colin Cross 0763c30289 Merge "Fix more system/core/include warnings" am: 18fbd80504 am: 5fe194a9fd
am: b5ca47989c

Change-Id: I8d5a602f94bc57866aa3827cc508c94afb4ac4ba
2016-09-29 17:58:08 +00:00
Colin Cross b5ca47989c Merge "Fix more system/core/include warnings" am: 18fbd80504
am: 5fe194a9fd

Change-Id: I8e561ab27f93ed10efa8a0e864cd7d1283bb6163
2016-09-29 17:42:19 +00:00
Colin Cross 18fbd80504 Merge "Fix more system/core/include warnings" 2016-09-29 17:20:30 +00:00
Mark Salyzyn 6ffb7ba101 Merge "liblog: fix errno issues with event tag map" am: dfd30c4a16 am: 930ff186ce am: 71b38def04
am: ae1612c54c

Change-Id: Ideb84958162fd0c8354164a31fafb1c7c9be4b4b
2016-09-28 18:23:36 +00:00
Mark Salyzyn ae1612c54c Merge "liblog: fix errno issues with event tag map" am: dfd30c4a16 am: 930ff186ce
am: 71b38def04

Change-Id: I83de9e374a67946fde8191d63720b102690d468f
2016-09-28 18:21:01 +00:00
Mark Salyzyn 71b38def04 Merge "liblog: fix errno issues with event tag map" am: dfd30c4a16
am: 930ff186ce

Change-Id: Iac84f40e9e79063bee7f213eb21ff5f866462a32
2016-09-28 18:17:49 +00:00
Colin Cross 1811d156e9 Fix more system/core/include warnings
The warnings in these files were hidden by -isystem
framework/native/include.

Bug: 31752268
Test: m -j
Change-Id: I2a54376aea380ee24e6483fb7d35fdfe8991c490
2016-09-27 16:21:12 -07:00
Mark Salyzyn 70a83dc7b3 liblog: fix errno issues with event tag map
Cleanup.

Save the errno for the calls that fail, and reinstate them for
return. Drop fprintf stutter, one succinct line. Solve a memory
leak in close.  Change android_lookupEventTag() to use an
unsigned int so that we can use the full range of uint32_t tags.

Make sure this file compiles clean in C++.

Test: gTest liblog-unit-tests
Bug: 30963384
Bug: 31456426
Change-Id: I6a5efa6fb7e991431caba75ef0971e111968f6bf
2016-09-26 09:23:55 -07:00
Chia-I Wu fd3ea3d118 Add native_handle_clone
libhwbinder's Parcel::readNativeHandleNoDup returns a temporary
native_handle_t.  We want a way to save the temporary handle for later
use.

Change-Id: I16f32043aa8b7d2c0aa57d67551500259b411410
2016-09-26 21:59:04 +08:00
David Pursell ab024abe3a Merge "Flattenable: switch from assignment to memcpy()." am: b2356a6993 am: bb276d8555 am: 9f106bece8
am: 7bc0052ff1

Change-Id: I2ce0426298c62249c3be164dc4488c26883cb6d6
2016-09-25 20:34:40 +00:00
Colin Cross 636bb92325 Merge "Move android_get_control_socket out of line" am: 4b5abcdba2 am: 4873829953 am: ea2b61c7a8
am: 8e3427fb04

Change-Id: I82ef9aeae182eccafb5aef710a450e2a877b4cd4
2016-09-25 20:34:27 +00:00
David Pursell 7bc0052ff1 Merge "Flattenable: switch from assignment to memcpy()." am: b2356a6993 am: bb276d8555
am: 9f106bece8

Change-Id: I43e4e5c6bb0aa1fd23a1d0d9776c9e2c8028527e
2016-09-23 22:56:01 +00:00
David Pursell 9f106bece8 Merge "Flattenable: switch from assignment to memcpy()." am: b2356a6993
am: bb276d8555

Change-Id: I2d7317f601dcfc85705f2e71408c314de55a0f69
2016-09-23 22:53:48 +00:00
David Pursell b2356a6993 Merge "Flattenable: switch from assignment to memcpy()." 2016-09-23 22:46:03 +00:00
Colin Cross 8e3427fb04 Merge "Move android_get_control_socket out of line" am: 4b5abcdba2 am: 4873829953
am: ea2b61c7a8

Change-Id: Ib406546b998d6d525829f0023a5f693c2e1dfd6c
2016-09-23 21:00:41 +00:00
Colin Cross ea2b61c7a8 Merge "Move android_get_control_socket out of line" am: 4b5abcdba2
am: 4873829953

Change-Id: I45e8b86e43a47213664acf486a5de266bab6deb8
2016-09-23 20:58:40 +00:00
David Pursell 2ebce7384b Flattenable: switch from assignment to memcpy().
FlattenableUtils read() and write() currently use assignment to copy
bytes. However, by casting the void* buffer to type T, the compiler is
allowed to assume that buffer obeys the alignment requirements of T,
which is not necessarily the case during serialization. On some
architectures, we can get SIGBUS when this alignment is violated.

We don't want the users of these routines to have to worry about
alignment when packing structures, so use memcpy() instead which should
always be safe since the compiler won't assume any alignment for the
void* buffer.

On architectures that can handle unaligned direct read/write of type T,
the compiler should be smart enough to optimize this code back to a
direct read/write anyway, but architectures that can't handle it will
fall back to memcpy; this means that this change shouldn't have any
impact on current Android devices. See the linked bug for more details.

Bug: http://b/31671510
Test: libgui Sensor serialization no longer gives SIGBUS.
Test: libgui.so unchanged on Shamu before and after this CL.
Change-Id: I2197127e8cbfb43f4f553bda6464f6ebe087febd
2016-09-23 13:56:40 -07:00
Colin Cross e8ffa449fd Move android_get_control_socket out of line
android_get_control_socket has a warning from the implicit cast from
long to int.  The warning was being hidden because cutils/sockets.h was
included with -isystem.  Move android_get_control_socket to sockets.cpp,
since we don't want header only dependencies anyways, and fix the
warning with a range check and a static_cast.

Bug: 31492149
Test: m -j <module that uses sockets.h and -Wall>
Change-Id: I1f394ab26d4ec8a7dd0e7907c10416d7f8647624
2016-09-23 11:26:08 -07:00
Colin Cross fd49e46c39 Merge "Fix warnings in libutils headers" am: 65a1633ec3 am: 0f79b62bf6 am: 1446cbac58
am: 28cda0bf38

Change-Id: I1190211b67e0c8d02ed1eb09c6b25401687069dd
2016-09-23 01:17:43 +00:00
Colin Cross c5c30e0735 Merge "Remove has_trivial_move trait from Vector<T>" am: 588b3b0c03 am: 85942090f6 am: 749181c10b
am: 021899fa8a

Change-Id: I4c93cda9b55ae1caf043f94e7ee27b2bbabbe4d8
2016-09-23 01:10:59 +00:00
Colin Cross 7df39fbdf4 Merge "Fix warnings in system/ headers" am: d7f60fd871 am: 299df0bf01 am: 88fd7e2ec4
am: bd45ba6972

Change-Id: I3f643d2586ca0fa2eec0411f5995eca74308775c
2016-09-23 01:09:54 +00:00
Ajay Panicker ac657cd0d2 Merge "Remove net_bt_stack group and replace it with bluetooth" am: 7875407bb7 am: f924c252bd am: b0db9714bb
am: 531b201eb6

Change-Id: Ie822dd8f259f240eb457f5d67948c417f84817c6
2016-09-23 00:04:45 +00:00
Colin Cross 28cda0bf38 Merge "Fix warnings in libutils headers" am: 65a1633ec3 am: 0f79b62bf6
am: 1446cbac58

Change-Id: I94a39bb24224218ef1c48080ace3455c1fc7233a
2016-09-22 23:04:13 +00:00
Colin Cross 021899fa8a Merge "Remove has_trivial_move trait from Vector<T>" am: 588b3b0c03 am: 85942090f6
am: 749181c10b

Change-Id: Ie339e0ea27463d0c5b093e9a5e262367d1ca57a5
2016-09-22 22:58:13 +00:00
Colin Cross bd45ba6972 Merge "Fix warnings in system/ headers" am: d7f60fd871 am: 299df0bf01
am: 88fd7e2ec4

Change-Id: I94891ea3c3a00ee39b48531fcc8e5e3d6ebe724a
2016-09-22 22:52:44 +00:00
Colin Cross 1446cbac58 Merge "Fix warnings in libutils headers" am: 65a1633ec3
am: 0f79b62bf6

Change-Id: I62fea8f4ed3f2a9d16d68539eb073965531944da
2016-09-22 22:51:15 +00:00
Ajay Panicker 531b201eb6 Merge "Remove net_bt_stack group and replace it with bluetooth" am: 7875407bb7 am: f924c252bd
am: b0db9714bb

Change-Id: I025c5301fecf0566d8184efce099a195fdbfc460
2016-09-22 21:58:27 +00:00
Colin Cross 749181c10b Merge "Remove has_trivial_move trait from Vector<T>" am: 588b3b0c03
am: 85942090f6

Change-Id: Ic41410047760bff11063d12839921ae008fe7e65
2016-09-22 20:33:40 +00:00
Colin Cross 17b5b82d64 Fix warnings in libutils headers
system/core/include is included in the global include path using
-isystem, which hides all warnings.  Fix warnings in libutils
headers in preparation for moving from -isystem to -I.

- Fix implicit cast from int64_t to long in Condition.h.  Remove
  the __LP64__ check and always compare against LONG_MAX before
  casting.
- Fix implicit cast from size_t to ssize_t in KeyedVector.h
- Fix -Wshadow-field-in-constructor warnings in Looper.h and RefBase.h
- Move destructors for MessageHandler and LooperCallback to Looper.cpp
  and ReferenceRenamer and VirtualLightRefBase to RefBase.cpp to prevent
  vtables in every compilation unit.
- Declare template variables in Singleton.h
- Fix old-style casts in StrongPointer.h and TypeHelpers.h
- Use template metaprogramming in TypeHelpers.h to avoid warnings on
  memmove on non-trivial types.
- Add an assignment operator to key_value_pair_t to complete
  rule-of-three
- Use memcpy instead of dereferencing a reinterpret_casted pointer to
  treat the bits of a float or double as int32_t or int64_t
- Escape unicode sequences inside doxygen comments between \code and
  \endcode
- Remove WIN32 ZD definition in Compat.h, %zd works fine with mingw
- Fix WIN32 printf warnings in Filemap.cpp
- Initialize mNullValue with 0 in LruCache.h, some of the tests use a
  non-pointer type for TValue.

Test: m -j native
Bug: 31492149
Change-Id: I385a05a3ca01258e44fe3b37ef77e4aaff547b26
2016-09-22 13:03:15 -07:00
Colin Cross 588b3b0c03 Merge "Remove has_trivial_move trait from Vector<T>" 2016-09-22 19:44:28 +00:00
Colin Cross 097395532b Remove has_trivial_move trait from Vector<T>
Vector<T> objects are a dynamic type with a vtable, which is not
trivially moveable.

Impact on aapt for frameworks-res is negligible, ~3%.

Bug: 31595853
Test: m -j framework-res
Change-Id: I8a3269c35d95affb6e86d60588bcfca46db7f445
2016-09-22 10:14:05 -07:00
Colin Cross 88fd7e2ec4 Merge "Fix warnings in system/ headers" am: d7f60fd871
am: 299df0bf01

Change-Id: Ie6b83fdc3b97601e1021b104d4b42eec6b30bfc4
2016-09-22 11:54:20 +00:00
Ajay Panicker b0db9714bb Merge "Remove net_bt_stack group and replace it with bluetooth" am: 7875407bb7
am: f924c252bd

Change-Id: I99e0ed5e52c71b2e41e54faf03678e57a853d140
2016-09-22 11:23:53 +00:00
Colin Cross cde7766832 Merge "Hide warning in cutils/trace.h" am: 5cf3db6d2b am: a802e570b3 am: 06ec4b1352
am: 7673c4dc88

Change-Id: I556b9a6800480cc4cd9b1f5cc702d0ae460dd95e
2016-09-22 09:26:11 +00:00
Colin Cross ac9e186da2 Merge "Hide gnu extension warnings in log/log.h" am: 21049e5c91 am: 9eb3592e62 am: 4df8e4580b
am: e84c07c832

Change-Id: I333d7b0e9cd4f56087ccf20ab732024d238ad68f
2016-09-22 09:26:00 +00:00
Colin Cross 7673c4dc88 Merge "Hide warning in cutils/trace.h" am: 5cf3db6d2b am: a802e570b3
am: 06ec4b1352

Change-Id: If41d5b551ffe237922f4768cf403cadf7ee15887
2016-09-22 09:15:21 +00:00
Colin Cross e84c07c832 Merge "Hide gnu extension warnings in log/log.h" am: 21049e5c91 am: 9eb3592e62
am: 4df8e4580b

Change-Id: I18d466cf45327b96856e2fb2c0ec7954a675987a
2016-09-22 09:15:06 +00:00
Treehugger Robot d7f60fd871 Merge "Fix warnings in system/ headers" 2016-09-22 02:46:51 +00:00
Ajay Panicker 7875407bb7 Merge "Remove net_bt_stack group and replace it with bluetooth" 2016-09-22 01:32:34 +00:00
Colin Cross 06ec4b1352 Merge "Hide warning in cutils/trace.h" am: 5cf3db6d2b
am: a802e570b3

Change-Id: I216420b21d71087b2e3a5bc864f9d419270dc749
2016-09-22 01:02:40 +00:00
Colin Cross 4df8e4580b Merge "Hide gnu extension warnings in log/log.h" am: 21049e5c91
am: 9eb3592e62

Change-Id: I3c155d9b0ca9f5e87e35159e578fbe91af0ed4ec
2016-09-22 01:02:27 +00:00
Colin Cross 7c7990e6fd Fix warnings in system/ headers
system/core/include is included in the global include path using
-isystem, which hides all warnings.  Fix warnings in
system/core/include/system in preparation for moving from -isystem to -I.

- Fix invalid doxygen syntax in graphics.h
- Use a pragma to hide a C99 extension warning on the flexible length
  array in graphics.h
- Make static functions in radio.h static inline
- Fix size_t printf and size_t vs. ssize_t comparision in qemu_pipe.h
- Fix old style cast in window.h

Test: m -j native
Bug: 31492149
Change-Id: I857f289e4c8e303494831873282bbb69de155c10
2016-09-21 17:46:59 -07:00
Colin Cross 5cf3db6d2b Merge "Hide warning in cutils/trace.h" 2016-09-22 00:46:13 +00:00
Colin Cross 9993e799f1 Hide warning in cutils/trace.h
system/core/include is included in the global include path using
-isystem, which hides all warnings.  cutils/trace.h has an ignored
return value warning, move the implementation to trace-dev.c so it
doesn't cause warnings in every module that includes it in preparation
for moving from -isystem to -I.

Test: m -j native
Bug: 31492149
Change-Id: If8b3fe13059c9e59c2d5208294d427d84fa6e588
2016-09-21 17:45:31 -07:00
Colin Cross 21049e5c91 Merge "Hide gnu extension warnings in log/log.h" 2016-09-22 00:45:02 +00:00
Ajay Panicker 604208e957 Remove net_bt_stack group and replace it with bluetooth
Bug: 31549206
Change-Id: I667963e5f9fd1a5dc9ad74378b318e3b782e6883
2016-09-20 12:01:33 -07:00
Colin Cross 67b337d5cf Merge "Fix warnings in libziparchive" am: 91811d2d34 am: 6f5edc78d8 am: e3d8246c0b
am: bcedc20a2e

Change-Id: Ie67aafbf802b295b2a71ace612d898f02830510d
2016-09-20 18:52:50 +00:00
Colin Cross bcedc20a2e Merge "Fix warnings in libziparchive" am: 91811d2d34 am: 6f5edc78d8
am: e3d8246c0b

Change-Id: I4737599a4245d4ed1b8c6c77ff939fee1e206f86
2016-09-20 18:47:46 +00:00
Colin Cross e3d8246c0b Merge "Fix warnings in libziparchive" am: 91811d2d34
am: 6f5edc78d8

Change-Id: I3f2869a94cebaf86647443bdc7a2f3520e5dd555
2016-09-20 18:37:19 +00:00
Colin Cross 7c6c7f0b9f Fix warnings in libziparchive
system/core/include is included in the global include path using
-isystem, which hides all warnings.  zlib.h is included through
system/core/include/ziparchive/zip_archive.h, which was hiding warnings
in it.  Use a #pragma around the call to deflateInit2, it is a macro
that expands to an old-style cast, in preparation for moving from
-isystem to -I.  Also move the ZipString constructor to zip_archive.cc
so it can assert on the length of the string parameter and fix an
implicit conversion from size_t to uint16_t.

Test: m -j native
Bug: 31492149
Change-Id: I74cdad7fe9c723859b5cfbea73c8f27d9d9ca265
2016-09-20 09:23:47 -07:00
Elliott Hughes 3eed32c1d2 Move libusbhost's headers into libusbhost. am: e0a7c773ed am: d141edfb3c am: 1cde9655bb
am: c6dd9aaf5c

Change-Id: I4ba3a219eb6b3ebcb1fd228fb50587e70440b9a9
2016-09-17 01:46:11 +00:00
Elliott Hughes c6dd9aaf5c Move libusbhost's headers into libusbhost. am: e0a7c773ed am: d141edfb3c
am: 1cde9655bb

Change-Id: I2df83b58943ca2ffe3f82ba7199ae85976f169c8
2016-09-17 01:43:40 +00:00
Elliott Hughes 1cde9655bb Move libusbhost's headers into libusbhost. am: e0a7c773ed
am: d141edfb3c

Change-Id: I3eed13355c67ff09b6f61aee5b6329ec15ce8b21
2016-09-17 01:41:09 +00:00
Elliott Hughes d141edfb3c Move libusbhost's headers into libusbhost.
am: e0a7c773ed

Change-Id: Ia6b0131c9405650a8c9934a7010c7723f028f6dd
2016-09-17 01:38:39 +00:00
Treehugger Robot 36b88ce975 Merge "Move libusbhost's headers into libusbhost." 2016-09-17 01:33:11 +00:00
Colin Cross ed9ef61b2c Merge "Fix warnings in cutils/atomic.h" am: 5e093f367c am: 6f292bcab9 am: a205ed0aad
am: 3b7524fe3a

Change-Id: I3e3ad863658826141886b4e6eae538297b84dd5c
2016-09-16 20:12:58 +00:00
Colin Cross 3b7524fe3a Merge "Fix warnings in cutils/atomic.h" am: 5e093f367c am: 6f292bcab9
am: a205ed0aad

Change-Id: I03b1bcf695452b7f0322aaa166c2fe64fc0b49bb
2016-09-16 20:08:56 +00:00
Colin Cross a205ed0aad Merge "Fix warnings in cutils/atomic.h" am: 5e093f367c
am: 6f292bcab9

Change-Id: I69dc6ea6ec78f48710be69e287f1610726894466
2016-09-16 19:47:31 +00:00
Treehugger Robot 5e093f367c Merge "Fix warnings in cutils/atomic.h" 2016-09-16 19:31:10 +00:00
Elliott Hughes 20d2a81b90 Move libbinderwrapper's headers into libbinderwrapper. am: 40104501fa am: c5cc029993 am: 761c529b37
am: ab273a5a4b

Change-Id: I4d02d36c06d50f9ff24aef7b0421d42613e525b9
2016-09-16 18:16:17 +00:00
Colin Cross 412ad0dad8 Hide gnu extension warnings in log/log.h
system/core/include is included in the global include path using
-isystem, which hides all warnings.  Fix warnings in log/log.h
in preparation for moving from -isystem to -I.

log/log.h uses gnu extensions for zero-argument variadic macro token
pasting, which clang warns about with -Weverything.  Hide the warnings
using pragmas.

Test: m -j native
Bug: 31492149
Change-Id: Ib2113f877d811a6ecc0e91c035640b506f04bd86
2016-09-16 11:13:20 -07:00
Elliott Hughes ab273a5a4b Move libbinderwrapper's headers into libbinderwrapper. am: 40104501fa am: c5cc029993
am: 761c529b37

Change-Id: Iabb74f1a8ea0c79821b2ee3efbfce4bfbccbac13
2016-09-16 18:04:57 +00:00
Elliott Hughes 761c529b37 Move libbinderwrapper's headers into libbinderwrapper. am: 40104501fa
am: c5cc029993

Change-Id: I351680f306d7fb8814f8b41eb9e895a1a4153827
2016-09-16 17:51:24 +00:00
Elliott Hughes e0a7c773ed Move libusbhost's headers into libusbhost.
Change-Id: Ic5ff65bd6456ea3cc92e0c8f9d7a6f499e58dbfc
2016-09-16 10:43:56 -07:00
Elliott Hughes 40104501fa Move libbinderwrapper's headers into libbinderwrapper.
It was probably the LOCAL_EXPORT_C_INCLUDE_DIRS that made me miss this on the
original code review...

Change-Id: I55bc0b0698604338cd206bf5f336798929b6d8f9
2016-09-16 09:02:47 -07:00
Colin Cross ec69c05463 Fix warnings in cutils/atomic.h
system/core/include is included in the global include path using
-isystem, which hides all warnings.  Fix warnings in cutils/atomic.h in
preparation for moving from -isystem to -I.

Test: m -j native
Bug: 31492149
Change-Id: I2a212f192309090a16d507e9ab6acf0fd7cac02d
2016-09-15 19:22:32 -07:00
Courtney Goeltzenleuchter 7ae63a8cbd Add color mode enums am: a2e874eabc
am: ae93122c0e

Change-Id: Ifaef323f9804c36ca5271fd3eafcef75cf67e9c5
2016-09-09 18:47:13 +00:00
Lajos Molnar ef8322329e add android_flex_layout for describing all flexible formats. am: 0e10df4dd6
am: a2d46813fc

Change-Id: I47fbc1c78ac1458150d5231a85b4cf5c3e17a62f
2016-09-09 18:47:07 +00:00
Courtney Goeltzenleuchter a2e874eabc Add color mode enums
The android_color_mode_t defines the color modes supported
by a display. A display can support multiple different
color modes.

sRGB mode and AdobeRGB are deliberately placed at 7 and 8
so that they match mode ID's used on prior devices.

bug: http://b/27926012
Change-Id: I9ab41b56ec0b495c02539665da5be158ffddf843
2016-09-08 11:39:32 -07:00
Lajos Molnar 0e10df4dd6 add android_flex_layout for describing all flexible formats.
Bug: 22767098
Bug: 24759202
Change-Id: I61e4ca9bd71e8da88a9571ec4effc7165026715b
2016-09-08 11:38:53 -07:00
Felipe Leme 4eeca5d0b0 Added a NETWORK trace tag. am: 785735bde1 am: 860f100454
am: c561b35f29

Change-Id: Ifb2cba7664af19b22c9bb5062f69b8052e789336
2016-09-08 00:55:47 +00:00
Felipe Leme c561b35f29 Added a NETWORK trace tag. am: 785735bde1
am: 860f100454

Change-Id: I729a74de3a1da6cbf176e33dfda253ac47d4dfd8
2016-09-08 00:44:48 +00:00
Felipe Leme 785735bde1 Added a NETWORK trace tag.
BUG: 31281543
Change-Id: I4d7c7fc26c77fec099bbf0f9426e3a9f3a722e6d
2016-09-07 12:47:18 -07:00
Mark Salyzyn 2fb3f08d51 liblog: add __android_log_close()
Bug: 30963384

(cherry picked from commit df7a4c6bae)

Change-Id: Iee7cd0db819644299fa086586630e71415643294
2016-08-30 16:02:08 +01:00
Christopher Ferris 0c572d01af Fix race condition updating local map data.
If the underlying local map changes, it's possible for multiple
threads to try and modify the map data associated with the UnwindLocalMap
object. Add a lock when generating the local map to avoid this problem.

In addition, add a read lock whenever any caller gets the maps iterator.
Updated all iterator callers to make this lock.

Bug: 29387050
Bug: 31067025

(cherry picked from commit 3a14004c7f)

Change-Id: Id00116f156a24b36085c0d5dfc3dde4d2ac55194
2016-08-25 15:01:53 -07:00
Martijn Coenen 111ef54a28 Merge changes from topic 'utf' am: 3a07e5bf94 am: aa7fd8a3ec
am: ade3876260

Change-Id: Ifec806c7553b36a6502a8b5bb3dec559c117f4cc
2016-08-25 20:31:42 +00:00
Martijn Coenen ade3876260 Merge changes from topic 'utf' am: 3a07e5bf94
am: aa7fd8a3ec

Change-Id: I3c90317d492a84ff99b18463d6f489e7b1cca61b
2016-08-25 20:24:14 +00:00
Sergio Giro 1cfa56d46c libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

Test: ran libutils_tests
Bug: 29250543
Change-Id: I6115e3357141ed245c63c6eb25fc0fd0a9a7a2bb
(cherry picked from commit c4966a363e)
2016-08-25 20:07:51 +00:00
Sergio Giro 9de6776321 Unicode: specify destination length in utf8_to_utf16 methods
String16(const char *utf8) now returns the empty string in case
a string ends halfway throw a utf8 character.

Bug: 29267949
Clean cherry-pick from 1dcc0c8239

Change-Id: I5223caa7d42f4582a982609a898a02043265c6d3
2016-08-25 19:57:06 +00:00
Hans Boehm a1709d5269 Merge "Make RefBase more robust and debuggable" am: daac359be7 am: 7bf3d21fde am: 7dddf9433c
am: 2d3545fe82

Change-Id: I65537ec0db45b05f96dae43b8f4a91bd4af2d39b
2016-08-25 00:14:54 +00:00
Hans Boehm 2d3545fe82 Merge "Make RefBase more robust and debuggable" am: daac359be7 am: 7bf3d21fde
am: 7dddf9433c

Change-Id: Ia8bdef250b29d964a9ab07c450da31a368bb3143
2016-08-24 23:52:14 +00:00
Hans Boehm 7dddf9433c Merge "Make RefBase more robust and debuggable" am: daac359be7
am: 7bf3d21fde

Change-Id: I643c4bd38062b80d382c50ed161f5440f35c1dd9
2016-08-24 23:49:14 +00:00
Hans Boehm daac359be7 Merge "Make RefBase more robust and debuggable" 2016-08-24 23:36:13 +00:00
Andy Hung e131ea2a25 Fix Mutex::timedLock to properly handle relative time am: 604ba48220 am: 708b9d118a am: 47e5ca61e2
am: 8ec6753d61

Change-Id: Ia281e33c13df240baf0c2bb187b0c13fefdeff8e
2016-08-24 23:08:27 +00:00
Andy Hung 8ec6753d61 Fix Mutex::timedLock to properly handle relative time am: 604ba48220 am: 708b9d118a
am: 47e5ca61e2

Change-Id: I5c351fbdc485acbcb33426b99ea6b900519ee0e3
2016-08-24 22:50:00 +00:00
Andy Hung 604ba48220 Fix Mutex::timedLock to properly handle relative time
Bug: 31008450
Change-Id: Ie6c17e17b7a8c3d8a087c47be535e9d04f285380
2016-08-24 22:29:11 +00:00
Mark Salyzyn 0b6f5ea819 Merge "liblog: add __android_log_close()" am: 812d1c7ea2 am: 6322efe522 am: ed421af68d
am: e5bda4d0ec

Change-Id: Ie8f6b6f866575f830ea3526d39fbedcb4e9795b3
2016-08-24 16:18:56 +00:00
Mark Salyzyn 309122d798 Merge "logger: validate hdr_size field in logger entry" am: fcf7ab8b1b am: 2d562c9dce am: 098b5887c6
am: af3623281f

Change-Id: I517e59cd638b8d1525b1ae6798af50bd8ca6f1ff
2016-08-24 16:18:56 +00:00
Mark Salyzyn e60a17a9db Merge "libcutils: Add ashmem_valid() function" am: d00c7470ea am: 8b1f7b595c am: da07f7880c
am: 8e5cb037c4

Change-Id: Ic2a5ed0ddc1c506d486a3dd5c86880b6c181b5b4
2016-08-24 16:18:55 +00:00
Mark Salyzyn e5bda4d0ec Merge "liblog: add __android_log_close()" am: 812d1c7ea2 am: 6322efe522
am: ed421af68d

Change-Id: Ifacd3de810c30a9b79cb262ab4c2432d8b1c0791
2016-08-24 16:10:09 +00:00
Mark Salyzyn af3623281f Merge "logger: validate hdr_size field in logger entry" am: fcf7ab8b1b am: 2d562c9dce
am: 098b5887c6

Change-Id: I4d067039a766e7079a91eb56d2ffb8d68aba58b5
2016-08-24 16:10:08 +00:00
Mark Salyzyn ed421af68d Merge "liblog: add __android_log_close()" am: 812d1c7ea2
am: 6322efe522

Change-Id: Ib61d4ec5102fcfb12c48250c019fcdf019c2ffc5
2016-08-24 16:07:39 +00:00
Mark Salyzyn 098b5887c6 Merge "logger: validate hdr_size field in logger entry" am: fcf7ab8b1b
am: 2d562c9dce

Change-Id: I5721e8614079a04c2dc364304d0ffed10d74be90
2016-08-24 16:07:38 +00:00
Mark Salyzyn 6322efe522 Merge "liblog: add __android_log_close()"
am: 812d1c7ea2

Change-Id: I2ba5ed22e78564a864bab6b550b6d2bd2609a629
2016-08-24 16:05:05 +00:00
Mark Salyzyn 2d562c9dce Merge "logger: validate hdr_size field in logger entry"
am: fcf7ab8b1b

Change-Id: Ic88fe616256ab4949040771d3bed1dfb823ab981
2016-08-24 16:05:04 +00:00
Treehugger Robot 812d1c7ea2 Merge "liblog: add __android_log_close()" 2016-08-24 15:58:48 +00:00
Treehugger Robot fcf7ab8b1b Merge "logger: validate hdr_size field in logger entry" 2016-08-24 15:56:23 +00:00
Mark Salyzyn 8e5cb037c4 Merge "libcutils: Add ashmem_valid() function" am: d00c7470ea am: 8b1f7b595c
am: da07f7880c

Change-Id: I3a4cf9a2cd848aae04ec3e88ae1e50a51774cd5f
2016-08-24 15:54:08 +00:00
Mark Salyzyn da07f7880c Merge "libcutils: Add ashmem_valid() function" am: d00c7470ea
am: 8b1f7b595c

Change-Id: I1be0fc5d74c609ec42578c29c7af9d897708f8c6
2016-08-24 15:51:08 +00:00
Mark Salyzyn 8b1f7b595c Merge "libcutils: Add ashmem_valid() function"
am: d00c7470ea

Change-Id: Ib09d3ee7bb131c30f59ea273f357c045394206fb
2016-08-24 15:48:55 +00:00