Commit graph

2488 commits

Author SHA1 Message Date
Vijay Venkatraman
75acc7bf81 Exporting C++ headers from system/core
Moved headers from include/libutils and include/libsysutils to
libutils/include and libsysutils/include respectively, so they can be
exported via these libs. They needed to be moved since Soong does
not allow export from external folder.

Added symlink from old locations. They are needed since Soong
includes system/core/include by default. Once all modules are
cleaned up to explicitly add the required libs, the symlinks will be
removed.

Moved headers of libutils to libutils_headers. They should be used
by modules for header-only inlines. Added libutils_headers as
dependency of libutils.

Split of C++ headers into those that have no dependency and those that
have dependency on libutils.so will be handled in a later CL.

Test: Add above libs to shared lib of local module
Change-Id: I122db72056b26b1f39bad1d9a0c2a1c5efda3550
2017-01-24 22:51:36 +00:00
Peng Xu
c216a795af Add dataspace for sensor direct report
This CL syncs change in HAL.
Test: compiles

Change-Id: I6b6dca9ca68f25b6d68df2db1605cc31cca0beae
2017-01-24 02:58:07 -08:00
TreeHugger Robot
b7b91d5deb Merge "Plumb refresh cycle duration up to VK_GOOGLE_display_timing." 2017-01-23 22:13:42 +00:00
Ian Elliott
b5663fc093 Plumb refresh cycle duration up to VK_GOOGLE_display_timing.
Test: Manually tested with a modified cube demo, that reports the refresh
duration returned from this extension.

Change-Id: Ida765850e185f5bdf6570796534be005791a64a8
2017-01-23 11:45:15 -07:00
Vijay Venkatraman
3c6763ca21 Exporting C headers from system/core
Moved headers from include/libcutils and include/liblog to
libcutils/include and liblog/include respectively, so they can be
exported via these libs. They needed to be moved since Soong does
not allow export from external folder.

Added symlink from old locations. They are needed since Soong
includes system/core/include by default. Once all modules are
cleaned up to explicitly add the required libs, the symlinks will be
removed.

Also added liblog_vndk_headers that exports a special log/log.h for
VNDK.

Moved headers of libcutils to libcutils_headers. They should be used
by modules for header-only inlines. Added libcutils_headers as
dependency of libcutils.

Added libcutils_vndk_headers that exports a special cutils/log.h
deprecating usage of the file. A later CL will deprecate the one in
libcutils_headers

Test: Add above libs to shared lib of local module
Change-Id: I6e1f9c5f23d8b6eae13dc3b7e5dfe7fae93b8510
2017-01-22 19:45:38 -08:00
Romain Guy
abe4304deb Add Display P3 color mode
Bug: 32984164
Test: compile
Change-Id: Ic3f8e5ae840ad6de8d0dc416221098078d8a1b0f
2017-01-20 16:04:15 -08:00
Jeff Sharkey
84dc96227d Merge "Define GID range for external data and OBBs." am: 1e7cdf3c7d am: d150012349 am: 23b6547230
am: b1e89ec14f

Change-Id: If94a9fd76e895f922f8b5f6ed99b871b5febb3f9
2017-01-19 16:39:37 +00:00
Josh Gao
85401cca56 Merge "debuggerd: advance our amazing bet." am: 230201dcbf am: 11b938e881 am: 787f1b29d0
am: 1b1e416fcc

Change-Id: Id6387b7f7ce6aac7ee1ac68ffcf76e69f5c3a924
2017-01-19 00:45:12 +00:00
Jeff Sharkey
7e5d0b1fae Define GID range for external data and OBBs.
To quickly answer the question of "how much data is a UID using?" we
need a GID range to label files on external storage, similar to
the GID ranges already defined for cached and shared data.

Also define a new GID that will be used to label the OBB files shared
between all users under /data/media/obb.

Test: builds, newly added tests pass
Bug: 34263266
Change-Id: I16fb7d166c3dcdeafbf477162d191d3b73ae8ac2
2017-01-18 17:11:05 -07:00
Josh Gao
cbe70cb0a8 debuggerd: advance our amazing bet.
Remove debuggerd in favor of a helper process that gets execed by
crashing processes.

Bug: http://b/30705528
Test: debuggerd_test
Change-Id: I9906c69473989cbf7fe5ea6cccf9a9c563d75906
2017-01-17 13:57:57 -08:00
Brian C. Anderson
eccaae3659 Merge "Update native_window_get_frame_timestamps args" 2017-01-17 01:09:47 +00:00
Elliott Hughes
e04c3b0533 Remove unused klog_get_level.
Every little helps...

Bug: N/A
Test: builds
Change-Id: Ibcac5cda1619420c95903211ed0b96af81351f9e
2017-01-13 18:14:12 -08:00
Wei Wang
fc453321df Merge "libcutils: change klog_level to KLOG_INFO_LEVEL" am: 5e9863bf63 am: 974dd6291e am: c87d4ce758
am: a06b862257

Change-Id: I83876ce9b0258bc8c5217043f6ea9810a9bfd7a8
2017-01-13 08:22:40 +00:00
Wei Wang
677ba31db2 libcutils: change klog_level to KLOG_INFO_LEVEL
Some of Android componets e.g. init have migrated to use base/logging to get rid
of klog utilities. However, without explicit initilization, the default
klog_level is set to 3 which masks the logwrap output.
This patch sets default klog_level to KLOG_INFO_LEVEL to make
android_fork_execvp_ext log available.

Bug: 34256270
Test: manual
Change-Id: Ibe74707a92c954053cd0e6828a984fbd72b4acae
2017-01-12 22:18:46 -08:00
Mark Salyzyn
5c8bdf42e7 Merge "liblog: use log/log.h for ALOG macros" am: dd9fa24091 am: 112d1dcd95 am: 33807cd6c2
am: 07388af1e6

Change-Id: I3789497189d23724824babaacbc8aa442e7a026c
2017-01-12 23:57:31 +00:00
Mark Salyzyn
dd9fa24091 Merge "liblog: use log/log.h for ALOG macros" 2017-01-12 23:46:29 +00:00
Mark Salyzyn
51c33b7011 liblog: use log/log.h for ALOG macros
Test: compile
Bug: 34250038
Change-Id: I0f56c563871f377c03380498cd867b916892f1dc
2017-01-12 15:44:06 -08:00
Brian Anderson
6933088664 Update native_window_get_frame_timestamps args
- Add outLatchTime, outLastRefreshStartTime and
  outDequeueReadyTime.
- Rename outRefreshStartTime to outFirstRefreshStartTime.

Test: Manual testing with Chrome.

Change-Id: I1ed3237e393803546f627a645f65f3a8f1ab9dfc
2017-01-12 12:18:34 -08:00
Tomasz Wasilczyk
3eba74fec1 Fix typo in radio_metadata_t definition.
Test: none, this struct is opaque.
Change-Id: I6b8f5787441618a7a818c7d4595010d241574c13
2017-01-12 11:15:32 -08:00
Tomasz Wasilczyk
0994121251 Merge "Fix typo in radio_metadata_t definition." 2017-01-12 19:09:09 +00:00
Courtney Goeltzenleuchter
6769842f3a Merge "Add DISPLAY-P3 DATASPACE" 2017-01-10 18:31:46 +00:00
Elliott Hughes
b569f4d029 Merge "Revert "Revert "android_ids: move to bionic""" am: b2375fc40c am: 5f57659030 am: 15f24e5df9
am: 86e63c8ae6

Change-Id: I0c9347c53425c7e1fc895a921933c18067e46b56
2017-01-10 01:38:10 +00:00
Tomasz Wasilczyk
e324500f3f Merge "Make metadata field mandatory for program info struct." 2017-01-10 01:24:27 +00:00
Elliott Hughes
b2375fc40c Merge "Revert "Revert "android_ids: move to bionic""" 2017-01-10 01:15:30 +00:00
Tomasz Wasilczyk
70a8148b52 Make metadata field mandatory for program info struct.
Also, make metadata struct aligned.

Test: VTS, manual
Change-Id: I7dbd62d36ac21475fdbc49723ba3ea6744460d21
2017-01-09 14:26:43 -08:00
Tomasz Wasilczyk
a4b9066685 Make metadata field mandatory for program info struct.
Test: VTS, manual
Change-Id: I7dbd62d36ac21475fdbc49723ba3ea6744460d21
2017-01-06 14:20:13 -08:00
Courtney Goeltzenleuchter
de092983c7 Add DISPLAY-P3 DATASPACE
Industry specifications will include a Display-P3
color space that we'll want to use.
Test: compile

Change-Id: I17107f0c63a4d18a29eedbb248417c643adbbb79
2017-01-06 13:41:42 -07:00
Elliott Hughes
c57e5d191a Merge "Make libziparchive C++-only." am: b175ee271b am: b7c94f3e50 am: 8f378bc31e
am: 478ffd46ce

Change-Id: I76b54a4cfc7194d884c5919084db342c224416d6
2016-12-30 20:10:07 +00:00
Elliott Hughes
b175ee271b Merge "Make libziparchive C++-only." 2016-12-30 19:40:56 +00:00
Tomasz Wasilczyk
fd08e55799 Fix typo in radio_metadata_t definition.
Test: none, this code is unused yet.

Change-Id: I515aac5ce56e706225518cf7f6cbd1a28750001b
2016-12-29 11:55:52 -08:00
Elliott Hughes
a970c8f1fc Make libziparchive C++-only.
If we're going to build libziparchive with _FILE_OFFSET_BITS=64, which
seems like a reasonable idea, we don't want off_t/off64_t mixups in the
ABI, and C++ name mangling helps protect against that where C wouldn't.

Bug: N/A
Test: builds
Change-Id: I5f068b41fb4cd9e1e055e5250054318b35bcbc08
2016-12-29 10:38:37 -08:00
Mark Salyzyn
fcdfd71c73 Merge "liblog: add IF_ALOG_RATELIMIT" am: 3d6d5b101a am: 342276b428 am: da471bc6e2
am: f855e29375

Change-Id: I12c6f91c226f79a8790f7ffc4bb7c4fbd348da66
2016-12-21 22:19:01 +00:00
Mark Salyzyn
fc148f7f33 liblog: add IF_ALOG_RATELIMIT
IF_ALOG_RATELIMIT()
    ALOGE("Only one message globally using IF_ALOG_RATELIMIT()"
          " in the process may appear ever ten seconds,"
          " (%s)", strerror(errno));

static time_t last; /* initial state zero */
IF_ALOG_RATELIMIT_LOCAL(60, &last)
    ALOGE("Only one message locally may appear every minute,"
          " (%s)", strerror(errno));

These new calls are guaranteed not to affect the value of a
non-zero errno to simplify logging of errors.  However, the
ALOGE calls in the above examples may update the errno value
upon their return.

Test: gTest liblog-unit-tests --gtest_filter=liblog.__android_log_ratelimit
Bug: 33535908
Change-Id: Id8cc192fc7d14504ffd418933cf88ae945c089f2
2016-12-21 21:36:14 +00:00
Romain Guy
f52d65a73b Remove RGBX_FP16 format
Bug: 32984164
Test: compile
Change-Id: I5fb298c7020b9e09bbec041088b296e315e9bec4
2016-12-16 09:57:58 -08:00
Jeff Sharkey
c35144844b Merge "Define range of GIDs for cached app data." am: da94f09e22 am: ac13675071 am: 1ad4090e4e
am: 40717394bd

Change-Id: I74e4e62cd69d3696698609e010bf08ad86daa0f4
2016-12-16 01:15:39 +00:00
Romain Guy
631e0b7dfc Regenerate graphics-base.h
Bug: 32984164
Test: hidl-gen -o system/core/include/system/graphics-base.h -Lexport-header
-r android.hardware:hardware/interfaces
android.hardware.graphics.common@1.0 and compilation

Change-Id: Ied7f53c97b94eb15e11e26db4e73a568cfd982bb
2016-12-14 18:29:28 -08:00
Romain Guy
0c6dde6159 Prevent conflict with deprecated pixel format constants
Bug: 32984164
Test: Compile
Change-Id: Ia075c24740eeb33ca748e3423da156ffb9af0550
2016-12-14 10:10:49 -08:00
Elliott Hughes
e801a68239 Revert "Revert "android_ids: move to bionic""
This reverts commit 7b7a8074e1.

Change-Id: Icdc7221af6745084e5a4a28d851d3ad14e2a4ece
2016-12-13 23:47:16 +00:00
Jeff Sharkey
dff44709cf Define range of GIDs for cached app data.
To support upcoming disk usage calculation optimizations, this change
creates a new GID for each app that will be used to mark its cached
data.  We're allocating these unique GIDs so that we can use
quotactl() to track cached data on a per-app basis.

This change also tightens up the implementation of both the cache
and shared GID calculation to ensure that they stay inside the valid
ranges, and includes tests to verify.

Test: builds, boots, tests pass
Bug: 27948817
Change-Id: Ie4377e5aae267f2da39a165888139228995987cb
2016-12-13 13:28:08 -07:00
TreeHugger Robot
6ec17dc8c1 Merge "Ran hardware/interfaces/update-base-files.sh." 2016-12-13 19:31:03 +00:00
Elliott Hughes
30eedb401b Merge "Revert "android_ids: move to bionic"" am: b0a15d8319 am: 88aa74b86f am: fee5e1cdd7
am: 2cec27ee5d

Change-Id: I37010b6662af8dcf2f72a327ba55d3896fe37a1c
2016-12-13 01:21:27 +00:00
Josh Gao
8370e4ae8b cutils: add adb trace tag. am: e2d9732682 am: 49d9efe777 am: 8f0e42f839
am: 69fb5721e5

Change-Id: I02b1e538ef559893c2c0a1d717702b818cd8b97e
2016-12-13 01:10:54 +00:00
Josh Gao
f64256f47f libutils: allow multiple ATRACE_NAMEs in a scope. am: 01937ee2b9 am: d28920f745 am: e152b1b418
am: e12d7beedf

Change-Id: Idf23a284f706ba0ce1f29c7d1a69902c99985595
2016-12-13 01:10:45 +00:00
Treehugger Robot
b0a15d8319 Merge "Revert "android_ids: move to bionic"" 2016-12-13 00:31:26 +00:00
Elliott Hughes
7b7a8074e1 Revert "android_ids: move to bionic"
This reverts commit bc56847e84.

Change-Id: I2d00db0aaa7dfe292e36c6bdbaaa76230849e732
2016-12-12 22:11:29 +00:00
Josh Gao
e2d9732682 cutils: add adb trace tag.
Bug: http://b/31289465
Test: systrace
Change-Id: I8537731febc6629f055b86f6e19b16104208c4f8
2016-12-12 12:28:45 -08:00
Josh Gao
01937ee2b9 libutils: allow multiple ATRACE_NAMEs in a scope.
Bug: http://b/31289465
Test: m
Change-Id: Iabd97439fa55ea285ce0501dbb4fd9d07149ae61
2016-12-12 12:28:04 -08:00
Steven Moreland
f4321334d4 Ran hardware/interfaces/update-base-files.sh.
Test: pass
Change-Id: I9301f22e2bec1d61021186da9e22e3c1b3a5df71
2016-12-12 09:48:49 -08:00
William Roberts
46355e65f2 fs_config: add comment to header am: acdf527c52 am: d677b76496 am: eb935ab12f
am: 188351e040

Change-Id: If216861333e95a454968a33f88ef600902a8b3d4
2016-12-10 00:46:44 +00:00
William Roberts
a0cbe589ed android_ids: move to bionic am: bc56847e84 am: d0abdb75a1 am: 22f13c4b11
am: 3682a6311f

Change-Id: I5ddba953ea38efcf04aad63f23b78f762f749a89
2016-12-10 00:46:37 +00:00
William Roberts
d677b76496 fs_config: add comment to header
am: acdf527c52

Change-Id: Ie861f2f18060f56b6cc21ec4b8c2df291ea5d435
2016-12-10 00:21:43 +00:00
William Roberts
d0abdb75a1 android_ids: move to bionic
am: bc56847e84

Change-Id: I45393361b58370755f88793e84e2ef59b53a16ea
2016-12-10 00:21:39 +00:00
Elliott Hughes
b0aa8b2369 Merge changes from topic 'fsconfig-2'
* changes:
  fs_config: add comment to header
  android_ids: move to bionic
2016-12-10 00:13:05 +00:00
Mark Salyzyn
9b66d51a1f Merge "utils: Add FastStrcmp.h" am: 0f8890d985 am: dcd44168d3 am: 54890a929c
am: 41c99f83d9

Change-Id: Ic0d10a2a6536a75c5d99345475135418fc943380
2016-12-10 00:00:27 +00:00
Mark Salyzyn
0eeb06b932 utils: Add FastStrcmp.h
Move existing fast<str*cmp> templates for general use, pulled from
the implementation used in logd that dealt with speed through cache
locality and subroutine call mitigation.  Rename to fastcmp.

Test: logd-benchmarks and based on manual profiling from the past
Bug: 31456426
Change-Id: Ic62f4a437fc3e06ffdeaae73a6f34e197957a6b0
2016-12-09 12:40:17 -08:00
William Roberts
bc56847e84 android_ids: move to bionic
Prevent others from using android_ids and force them
to use grp.h and pwd.h family of functions.

Test: Build and boot, verify services are running properly.
Bug: 27999086

Change-Id: Idcd75cf7e91a49ef07a0ed3bdb514ad61aa82e69
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-12-08 16:57:17 -08:00
William Roberts
acdf527c52 fs_config: add comment to header
Add a comment to android_filesystem_config.h
about AID and OEM Range "scraping" done by
build/tools/fs_config.

Test: Build and boot.

Change-Id: I2d4845d91546ae967a1ee5166b73d119938faccc
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-12-08 16:57:17 -08:00
Brian C. Anderson
2aaa485e15 Merge "Add NATIVE_WINDOW_ENABLE_FRAME_TIMESTAMPS" 2016-12-04 00:36:23 +00:00
Jeff Sharkey
f35b5e1976 Merge "Define GIDs for internal media file types." am: 4b44753085 am: 33d1ec216b am: ff2b9311f2
am: 0289e5d74f

Change-Id: I8e99fb2034a8b7d945a3c1d31a47039323c9b3ee
2016-12-03 04:51:39 +00:00
Jeff Sharkey
33d1ec216b Merge "Define GIDs for internal media file types."
am: 4b44753085

Change-Id: I95df8c122f0600e3af6306d800724d1ac9f26040
2016-12-03 04:23:24 +00:00
Jeff Sharkey
4de27c6a6d Define GIDs for internal media file types.
Currently, all internal media storage files (under /data/media) are
given the same "media_rw" GID.  To support an upcoming optimization
to disk usage calculation, this CL defines three new GIDs that can be
used to quickly identify common types: audio, video, and images.

Test: builds
Bug: 27948817
Change-Id: I8548459c3d3ccbf7d822431c6e2ebd1c2e309d70
2016-12-02 14:17:48 -07:00
Brian C. Anderson
3e151ecb1a Merge "Add displayPresentTime to NATIVE_WINDOW_GET_FRAME_TIMESTAMPS" 2016-12-01 15:47:49 +00:00
Brian C. Anderson
a8f0b3a2ed Merge "Rename posted to requestedPresent for NATIVE_WINDOW_GET_FRAME_TIMESTAMPS" 2016-11-30 17:25:49 +00:00
Mark Salyzyn
7374bca9c5 Merge "liblog: add private android_log_write_list_buffer()" am: 636c851f8d am: a95e19abd2 am: c3bbcb885c
am: a1817f68b0

Change-Id: If662d2b8195801d681935677d938b2197820eb0b
2016-11-22 16:21:27 +00:00
Mark Salyzyn
e6282f11ea Merge "liblog: move android_log_event_context class to log/log_event_list.h" am: 418558f8af am: d96b925d9c am: ef7df80ea3
am: cc451d6a70

Change-Id: I18af6a26f5a0c33187ddffa5669be2d92e13b6d3
2016-11-22 16:21:10 +00:00
Mark Salyzyn
a95e19abd2 Merge "liblog: add private android_log_write_list_buffer()"
am: 636c851f8d

Change-Id: If0c24576c69b9d2aad6637c7548d61f79173e932
2016-11-22 15:56:49 +00:00
Mark Salyzyn
d96b925d9c Merge "liblog: move android_log_event_context class to log/log_event_list.h"
am: 418558f8af

Change-Id: I4f537d4010e60b86ad4f565135804cf92fa7bd37
2016-11-22 15:56:32 +00:00
Mark Salyzyn
2ca4f49476 liblog: add private android_log_write_list_buffer()
Allows us to compose an event message for our own in-memory purposes.
Will be used to compose an event message in logd and directly write
it to just the pmsg buffer.  Provide an internal enhanced C++ wrapper
for event handling.

Test: gTest liblog-unit-tests --gtest_filter=liblog.android_log_write_list_buffer
Bug: 31456426
Change-Id: I98246898ba580f9e506baba8af2fd1b26a2a8aae
2016-11-21 09:46:39 -08:00
Mark Salyzyn
472245d962 liblog: move android_log_event_context class to log/log_event_list.h
rename class from android_log_event_context to android_log_event_list

Test: gTest logcat-unit-tests
Bug: 31992412
Bug: 31456426
Change-Id: Ib61cbca7d453837d64959c56b0e11f8c5edbfbdd
2016-11-21 09:46:34 -08:00
TreeHugger Robot
6ab340e4f4 Merge "Update with wide gamut defines" 2016-11-18 05:00:52 +00:00
Brian Anderson
77e53d990b Add NATIVE_WINDOW_ENABLE_FRAME_TIMESTAMPS
Test: Manual testing with Chrome.

Change-Id: Ia16546064952693f42205de34a06f3b097debea0
2016-11-17 15:52:49 -08:00
Brian Anderson
43f232bd55 Add displayPresentTime to NATIVE_WINDOW_GET_FRAME_TIMESTAMPS
Test: Manual testing with Chrome.

Change-Id: Ifbf0debf9883099b7b5a8a237edbb0a0eb2adf9a
2016-11-17 15:52:39 -08:00
Mark Salyzyn
95dbf68245 Merge "libcutils: move cutils/files.h to cutils/android_get_control_file.h" am: 8c41e791ed am: 809dee506e am: 26545e3c60
am: 124b7cb732

Change-Id: I575ef1a45746c14b5c01301d8336307f2575a4ba
2016-11-17 16:02:50 +00:00
Mark Salyzyn
809dee506e Merge "libcutils: move cutils/files.h to cutils/android_get_control_file.h"
am: 8c41e791ed

Change-Id: Ifbc00285da734859d590153a7c6cfc8e51c014f9
2016-11-17 15:33:02 +00:00
Courtney Goeltzenleuchter
de5df5f520 Update with wide gamut defines
Test: make
Change-Id: I0542bdc5c6d9caedcc86e5b66d263abd9c0596dc
2016-11-17 08:27:10 -07:00
Mark Salyzyn
52bd37e633 libcutils: move cutils/files.h to cutils/android_get_control_file.h
files.[h|cpp] is bound to be abused with junk, replace with
android_get_control_file.[h|cpp]. Plus some sundry cleanup.

Test: gTest libcutils-tests, logd-unit-tests, liblog-unit-tests,
      logcat-unit-tests and init_tests
Bug: 32450474
Change-Id: Ibd4a7aa4624ea19a43d1f98a3c71ac37805d36b5
2016-11-16 15:56:56 -08:00
Brian Anderson
18f2903cf7 Rename posted to requestedPresent for NATIVE_WINDOW_GET_FRAME_TIMESTAMPS
Test: Manual testing with Chrome.

Change-Id: Ib7ef5c76dcd71887848c7cb91336f7fcc5815773
2016-11-15 15:41:41 -08:00
Tao Bao
26a5c41255 Merge "ziparchive: Allow ExtractEntryToFile() to work with block device." am: 787482ecd9 am: af2a8858c4 am: 9b1b0627b9
am: 87cbd3aaf9

Change-Id: I490b2e9098288c98b5397c72d9aad451ad4a8793
2016-11-15 22:34:37 +00:00
Tao Bao
af2a8858c4 Merge "ziparchive: Allow ExtractEntryToFile() to work with block device."
am: 787482ecd9

Change-Id: Icdce4207cb64e084e200b6f7f8ae194831d5c4f0
2016-11-15 22:11:21 +00:00
Tao Bao
a456c21348 ziparchive: Allow ExtractEntryToFile() to work with block device.
FileWriter::Create() calls ftruncate(2) to truncate the destination
file, which doesn't work with FD that references a block device. It
leads to kIoError when calling ExtractEntryToFile() to extract an entry
to block device FD.

As a result, it fails the package_extract_file() command in OTA updates
(e.g. 'package_extract_file("boot.img",
"/dev/block/platform/soc.0/f9824900.sdhci/by-name/boot")').

This CL skips the call to ftruncate(2) if FD references a block device.

Bug: 32903624
Test: ziparchive-tests works.
Test: Build an OTA updater (m updater) and call package_extract_file().

Change-Id: Ia81116f1a8d7cab802396bdc32c6096b4cb56a3c
2016-11-15 10:19:04 -08:00
Craig Donner
ce54b4d14e Adds ANativeWindowBuffer support for layered images.
This is required for support of buffers that back texture arrays.

Bug: 31686534
Test: manual
Change-Id: I78ce132592f3803482ca858fd4be103c286f21e9
2016-11-11 11:35:08 -08:00
Mark Salyzyn
0820e1e5b9 liblog: logcat: logprint support -v descriptive am: 4fd0507b20 am: cacd9dc244 am: 3bcdc007c1
am: 6c66f5fde3

Change-Id: I20beb2ad5e09c0608685e6a91023fb4351107077
2016-11-07 23:07:00 +00:00
Mark Salyzyn
120ec73110 liblog: add android_lookupEventFormat_len am: 530711b39e am: 494a394545 am: 68513d18d6
am: 2a1160c7d5

Change-Id: If38ae30e56dea1817a9b15bd5ccbef4516f763ef
2016-11-07 23:06:52 +00:00
Mark Salyzyn
cacd9dc244 liblog: logcat: logprint support -v descriptive
am: 4fd0507b20

Change-Id: Idd4379d83b1d2f708451e1f2dd21cd40bfa49811
2016-11-07 22:46:45 +00:00
Mark Salyzyn
494a394545 liblog: add android_lookupEventFormat_len
am: 530711b39e

Change-Id: I62a33b249df6afdc4405a89b3f60a51a2897f98e
2016-11-07 22:46:39 +00:00
Mark Salyzyn
e133feb6b4 Merge changes I93a1c003,I283fec89
* changes:
  liblog: logcat: logprint support -v descriptive
  liblog: add android_lookupEventFormat_len
2016-11-07 22:42:08 +00:00
Dimitry Ivanov
5255757ed2 Merge "Allow different namespace types for different classloaders" am: a61c48d5fd am: 9b1d1cb923 am: 08aa99d622
am: dba7cef327

Change-Id: Ide7f3064281c1496d4035d1265566bff99cfa422
2016-11-07 18:21:49 +00:00
Dimitry Ivanov
9b1d1cb923 Merge "Allow different namespace types for different classloaders"
am: a61c48d5fd

Change-Id: Idcf998f47e8a09fbe1e56a898f23b2c82a75aa44
2016-11-07 18:08:06 +00:00
Mark Salyzyn
4fd0507b20 liblog: logcat: logprint support -v descriptive
Expand logprint feature to pull out the log tag description
fields, parse them and merge into the logging content.  Add
-v descriptive, -v colour(british, hidden) and -v help. Also
added a unit test for the descriptive format borrowing from
event tags that have been unchanged since 2009.

Had to add -v help because we have too many undocumented
formats and format adverbs.

Test: gTest logcat-unit-tests --gtest_filter=logcat.descriptive
Bug: 31456426
Change-Id: I93a1c003b7a3f4c332544946fdedb7277919cec3
2016-11-04 15:22:52 -07:00
Mark Salyzyn
530711b39e liblog: add android_lookupEventFormat_len
Test: compile
Bug: 31456426
Change-Id: I283fec89431c18af788fa0477a2ab78792221878
2016-11-04 15:22:52 -07:00
Dimitry Ivanov
d836ab005a Allow different namespace types for different classloaders
An app should be able to make cross-arch calls to different apps
via other app's Context.getClassLoader()

Bug: 32542970
Test: Boot fugu. Check that there are no linker-namespace
      related errors in the log.

Change-Id: I1593f4688bcde0121a5e24a707441a4935fa7dc4
2016-11-04 15:21:13 -07:00
Mark Salyzyn
076194b73d libcutils: add android_get_control_file() am: 0b034d9d7b am: c020d3fa6e am: 13b832c9bf
am: 67c52fa22e

Change-Id: Ib16ef1a3a62a611d3ead14fba44b3d2f4077b197
2016-11-04 15:03:29 +00:00
Mark Salyzyn
c020d3fa6e libcutils: add android_get_control_file()
am: 0b034d9d7b

Change-Id: I7d0a58c12839dba59aa43b96e5a920d3c415efcf
2016-11-04 14:42:57 +00:00
Mark Salyzyn
0b034d9d7b libcutils: add android_get_control_file()
Solve one more issue where privilege is required to open a file and
we do not want to grant such to the service. This is the client side
of the picture, init is the server. The file's descriptor was placed
into the environment as "ANDROID_FILE_<path>" where non-alpha and
non-numeric characters in the <path> are replaced with _ and this
function picks the file descriptor up.

Added definition ANDROID_FILE_ENV_PREFIX ("ANDROID_FILE_") and
android_get_control_file() prototype in a new include <cutils/files.h>

android_get_control_file() checks if the resulting file descriptor is
valid, open and matches the name reference, which on purpose will fail
if a symbolic link is in the path rather than using a fully qualified
path.  Add gTest unit test for both.

Test: gTest libcutils_test --gtest_filter=FileTest.android_get_control_file
Bug: 32450474
Change-Id: I2d0310a1727f1e393a00d9fc7e6cf5d028f27905
2016-11-03 13:34:20 -07:00
Chia-I Wu
e4c672a2ad graphics.h: generate some of the enums from HIDL
Test: make
Change-Id: I77791f05bdaf2d2696ba995a3572ca28f3a18d5b
2016-11-01 09:35:35 +08:00
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