Commit graph

2043 commits

Author SHA1 Message Date
Dan Stoza
7f7c1c5de6 graphics.h: Add android_hdr_t
Adds android_hdr_t, which specifies different types of high dynamic
range encodings to be used throughout the system.

Bug: 25684127
Change-Id: Ic92bb5dc64494e643b828a8e24af8760e74e2360
2016-04-06 14:52:10 -07:00
Greg Kaiser
e60b407d43 Merge "Mutex: Note that STL is generally prefered" into nyc-dev
am: a30a626

* commit 'a30a6263d632a7d2dedc4f09c6707ab20df3fb1a':
  Mutex: Note that STL is generally prefered

Change-Id: I69eec173bf9679dc592987bd78cc8edcc81a1fbb
2016-04-06 13:06:00 +00:00
Greg Kaiser
d62698d4a3 Mutex: Note that STL is generally prefered
This class was designed prior to Android having usable C++11
support.  With that support now in place, we prefer people to
start using the STL threading classes, unless the code needs
to build on Win32.

Change-Id: If1b4d9bdfcb1e65824909376f022842bab9653d6
2016-04-05 12:38:47 -07:00
Elliott Hughes
8ea300663e Merge "Fix Condition::waitRelative." am: 0d6bb55
am: 9bf8f9e

* commit '9bf8f9efd4945513f2713159c1d72a7a7bd9cfb5':
  Fix Condition::waitRelative.

Change-Id: I378c8cbdd1b8f2563b6f2e0f7fb3799f0127eff7
2016-04-05 16:54:44 +00:00
Elliott Hughes
fd376b97f7 Fix Condition::waitRelative.
HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE has never been defined for LP64,
so let's have everyone use the same code path.

Also fix the possible overflow.

Bug: http://b/26944282
Bug: http://b/27918161
Change-Id: I51fc0ebb1f6b860dc62d721f8ebfbcf724ce66e7
2016-04-04 14:51:21 -07:00
Pablo Ceballos
0daf872712 Merge "Rename single buffer mode to shared buffer mode" into nyc-dev
am: 0e28c1f

* commit '0e28c1fa4a759755f21bf8a10d9e645ae64d1f78':
  Rename single buffer mode to shared buffer mode
2016-03-28 21:01:03 +00:00
Pablo Ceballos
0e28c1fa4a Merge "Rename single buffer mode to shared buffer mode" into nyc-dev 2016-03-28 19:34:27 +00:00
Dan Stoza
42d5a1f941 Merge "graphics.h: Add android_color_transform_t" into nyc-dev
am: beda52b

* commit 'beda52b32a0c324ba54b67e52e4714c2cd303070':
  graphics.h: Add android_color_transform_t
2016-03-24 22:41:01 +00:00
Dan Stoza
bb1deda59b graphics.h: Add android_color_transform_t
Adds android_color_transform_t, which specifies a range of color
transforms which may be applied to the whole display.

Bug: 22767098
Change-Id: Iaf03915c09ac0bdd18512b5f78c39da1705bda08
2016-03-24 10:38:46 -07:00
Mattias Nissler
b82b279b3f Merge "Add nvram user."
am: 4c9b149

* commit '4c9b1494e278185c54e684b90264a654b705582c':
  Add nvram user.
2016-03-23 16:53:30 +00:00
Mattias Nissler
4c9b1494e2 Merge "Add nvram user." 2016-03-23 08:17:56 +00:00
Mark Salyzyn
b8e596eb5a Merge changes If37ef423,If93df3ae,I01b38637 into nyc-dev
am: df4e31b

* commit 'df4e31b031e14aacd8b1435ddf7a32923e6e1427':
  liblog: add __android_log_pmsg_file_read
  liblog: add __android_log_pmsg_file_write
  liblog: split out transports into separate files
2016-03-22 23:24:21 +00:00
Mark Salyzyn
2b8157d9fd liblog: add __android_log_pmsg_file_read
(cherry pick from commit 864e8e80e4)

- This is considered an Android Private function, not exported
  for general use.
- goal is to retreive a file's content from a series of log
  messages from pmsg, to be retrieved after a reboot for
  transfer to a persistent location.
- files are presented in reverse sorted order, first based on
  _any_ numerical content, then by alphanumeric order.
- Add a gTest for this function, relies on gTest for
  liblog.__android_log_pmsg_file_write from prior to reboot.

Bug: 27176738
Change-Id: If37ef423009bd28b598b233af3bccef3429bdc22
2016-03-22 14:08:00 -07:00
Mark Salyzyn
10bdf61e5f liblog: add __android_log_pmsg_file_write
(cherry pick from commit d4b061bde2)

- This is considered an Android Private function, not exported
  for general use.
- goal is to record a file's content into a series of log
  messages into pmsg, to be retrieved after a reboot for
  transfer to a persistent location.
- filename reference is converted to a tag-unique
  "<dirbase>:<filebase>".
- buffer and length representing the filename contents are
  recorded, along with a sequence number placed into the nsec
  time field to ANDROID_LOG_PMSG_FILE_MAX_SEQUENCE.
- Add a gTest for this function.

Bug: 27176738
Change-Id: If93df3ae8bfc1bb75516d4a1fd8dae0301af644b
2016-03-22 14:07:54 -07:00
Mark Salyzyn
864e8e80e4 liblog: add __android_log_pmsg_file_read
- This is considered an Android Private function, not exported
  for general use.
- goal is to retreive a file's content from a series of log
  messages from pmsg, to be retrieved after a reboot for
  transfer to a persistent location.
- files are presented in reverse sorted order, first based on
  _any_ numerical content, then by alphanumeric order.
- Add a gTest for this function, relies on gTest for
  liblog.__android_log_pmsg_file_write from prior to reboot.

Bug: 27176738
Change-Id: If37ef423009bd28b598b233af3bccef3429bdc22
2016-03-22 13:03:53 -07:00
Mark Salyzyn
d4b061bde2 liblog: add __android_log_pmsg_file_write
- This is considered an Android Private function, not exported
  for general use.
- goal is to record a file's content into a series of log
  messages into pmsg, to be retrieved after a reboot for
  transfer to a persistent location.
- filename reference is converted to a tag-unique
  "<dirbase>:<filebase>".
- buffer and length representing the filename contents are
  recorded, along with a sequence number placed into the nsec
  time field to ANDROID_LOG_PMSG_FILE_MAX_SEQUENCE.
- Add a gTest for this function.

Bug: 27176738
Change-Id: If93df3ae8bfc1bb75516d4a1fd8dae0301af644b
2016-03-22 13:03:36 -07:00
Mattias Nissler
0897ab0849 Add nvram user.
This is intended to be used by user space daemons that are part of
access-controlled NVRAM HAL implementations for Brillo. Because there
might be sensitive data flowing through the daemon, we'd like to run
it as a separate user.

BUG: 27764637
Change-Id: If6ad7923af3c650963ee9e926f732001b6a8cb5d
2016-03-22 10:11:26 +01:00
Pablo Ceballos
248e77156d Rename single buffer mode to shared buffer mode
Change-Id: If5d45b2955d1219687c624395799b81e432dcfcc
2016-03-17 16:11:08 -07:00
Brian Carlstrom
de6d6041c1 system/core: Make Thread::run threadName argument required
am: e71b914775

* commit 'e71b9147756ab4da306e4c16461ad23936769603':
  system/core: Make Thread::run threadName argument required
2016-03-14 15:24:54 +00:00
Brian Carlstrom
e71b914775 system/core: Make Thread::run threadName argument required
Bug: 27557176
Change-Id: Iae83a1e5489c86c2858fc8481f246b8480f0eec4
2016-03-12 21:32:52 -08:00
Christopher Ferris
7c970c8ada Add error reporting mechanism for failing Unwind.
am: c463ba45c4

* commit 'c463ba45c42b4e2d8ce30c02a626d7183102f46e':
  Add error reporting mechanism for failing Unwind.
2016-03-10 22:29:26 +00:00
Christopher Ferris
c463ba45c4 Add error reporting mechanism for failing Unwind.
Remove the logging of an error if a thread disappears before the unwind
can begin. This can happen, so allow the caller to determine if this
is really a problem worth logging.

Bug: 27449879

(cherry picked from commit 206a3b9798)

Change-Id: If9e7cfeb6eb7b122679a734c1a9eacee8354ef18
2016-03-10 14:14:43 -08:00
Christopher Ferris
206a3b9798 Add error reporting mechanism for failing Unwind.
Remove the logging of an error if a thread disappears before the unwind
can begin. This can happen, so allow the caller to determine if this
is really a problem worth logging.

Bug: 27449879
Change-Id: Ie81718d53fb0e519fa0a7db9fd5f314b72bfa431
2016-03-10 12:39:15 -08:00
Adam Lesinski
cbb6e057f3 libziparchive: ensure ReadAtOffset is atomic
am: b1911401e0

* commit 'b1911401e0008c2b12a3fe6c9dc34528bf7710a5':
  libziparchive: ensure ReadAtOffset is atomic
2016-03-10 01:42:42 +00:00
Adam Lesinski
b1911401e0 libziparchive: ensure ReadAtOffset is atomic
ag/880725 modified ReadAtOffset to seek then read from the open
file descriptor. Previously pread64 was used to provide atomic
behaviour.

This causes races when multiple threads are trying to access data from
the file. This is supported, so this change reverts the relevant parts
of the above CL to restore the old behaviour.
Bug:27563413

Change-Id: I7bffd78da8c558745dfc3c072ba9691b1b15bb5b
2016-03-09 17:17:19 -08:00
Jorge Lucangeli Obes
7e070eb29f Merge "Add notice for adding users in AOSP." am: acf69772ff
am: da6b7ef1e9

* commit 'da6b7ef1e9585a2a2cc62d3e64f537e477b226d5':
  Add notice for adding users in AOSP.
2016-02-27 00:53:26 +00:00
Stephen Hines
242393fec1 Merge "Fix windows 64-bit builds" into nyc-dev 2016-02-26 23:34:39 +00:00
Jorge Lucangeli Obes
5596cf04ff Add notice for adding users in AOSP.
Sometimes new users/groups get added in internal branches, and the list
gets out of sync. Add a comment to prompt developers to add users in
AOSP.

Bug: None
Change-Id: I5b2df391902b842f1af8a377c8eac4cdb36a0518
2016-02-26 15:03:44 -08:00
Lajos Molnar
0b4cc2f3e1 Merge "keep legacy HAL_DATASPACE enums unchanged" into nyc-dev
am: 1e86e1ba1a

* commit '1e86e1ba1acfec7a16cdad8ab87f262e7bfc3e52':
  keep legacy HAL_DATASPACE enums unchanged
2016-02-26 05:08:36 +00:00
Lajos Molnar
1e86e1ba1a Merge "keep legacy HAL_DATASPACE enums unchanged" into nyc-dev 2016-02-26 05:06:13 +00:00
Dan Willemsen
9dddd137c7 Fix windows 64-bit builds
pid_t is 64-bit in 64-bit mingw, but the windows process/thread
functions return a DWORD(uint32_t). Instead of promoting to a pid_t and
fixing the format strings, just use a uint32_t to store the values.

android_thread_id also cannot be a 64-bit pointer, so for windows just
force it to be a uint32_t.

libutils/ProcessCallStack only works under Linux, since it makes heavy
use of /proc. Don't compile it under Windows or Darwin.

Bug: 26957718

(cherry picked from commit 86cf941c48)

Change-Id: I8d39d1951fea1b3011caf585c983e1da7959f7c0
2016-02-25 18:43:55 -08:00
Mark Salyzyn
1d5afc9e08 liblog: add android_log_write_string8_len
(cherry pick from commit 67d7eafd56)

android_log_write_string8_len(android_log_context ctx,
                              const char *value, size_t maxlen)

Caps the supplied string to a maxlen length. Alter API to handle
a NULL pointer for the value string for this and
android_log_write_string8() and instead of returning -EINVAL,
act like a null string "" was supplied to preserve the list
location. API is also changed to report the number of characters
actually placed into the android_log_context.

Bug: 27356456
Bug: 19235719
Change-Id: I6a03d405eac1d741555dd05555513ec691e7a46e
2016-02-25 15:53:00 -08:00
Mark Salyzyn
79e0c9eeca Merge changes Ic15a87f4,I8a53ad3a,I6a03d405 am: 9377fa863a
am: acc6ca3eb8

* commit 'acc6ca3eb83606478123efd3fe5c2f22f16279e5':
  liblog: __android_log_error_write use event list library
  liblog: test: __android_log_error_write accuracy
  liblog: add android_log_write_string8_len
2016-02-25 21:59:37 +00:00
Mark Salyzyn
67d7eafd56 liblog: add android_log_write_string8_len
android_log_write_string8_len(android_log_context ctx,
                              const char *value, size_t maxlen)

Caps the supplied string to a maxlen length. Alter API to handle
a NULL pointer for the value string for this and
android_log_write_string8() and instead of returning -EINVAL,
act like a null string "" was supplied to preserve the list
location. API is also changed to report the number of characters
actually placed into the android_log_context.

Bug: 27356456
Bug: 19235719
Change-Id: I6a03d405eac1d741555dd05555513ec691e7a46e
2016-02-25 12:29:32 -08:00
Lajos Molnar
88a5ad3f13 keep legacy HAL_DATASPACE enums unchanged
Bug: 25975353
Change-Id: I092b568420aa605425c12de9b245bca7ed602f43
2016-02-24 15:36:57 -08:00
Jorge Lucangeli Obes
ddedf05738 Merge "Add more first-party Brillo system users." am: 21dd6feb1c
am: e2d720a61f

* commit 'e2d720a61fb6da6981d4cb086d708cee9706449b':
  Add more first-party Brillo system users.
2016-02-24 22:28:13 +00:00
Jorge Lucangeli Obes
1c13c3d388 Add more first-party Brillo system users.
Brillo is converging on a set of mandatory system services to be
included in all Brillo builds. We'd like these services to run as
separate users just like other native Android/Brillo system services.

Add users for these services:
-Firewalld: Brillo has more granular firewall requirements (think e.g.
  Brillo-powered router.) Firewalld exposes a (currently) D-Bus/
  (soon to be) Binder API to broker access to IPTables rules.
-Trunksd: Some Brillo product configs will require TPMs. Trunksd
  manages TPMs in Chrome OS and Brillo.

Bug: 27299198

Change-Id: Ibe3303acdd9398ea52da0a37dbef73e5c5a948f7
2016-02-24 13:38:01 -08:00
Chien-Yu Chen
0836c9e386 Sync internal<->AOSP user list.
Bug: 27299198

Cherry-picked from:

Restart cameraserver

Bug: 24511454
Change-Id: Ia27f4ef0eb71f891c789f637a21b04afe0b1c4e9
2016-02-23 15:56:55 -08:00
Dimitry Ivanov
32912090e6 Merge "Move libnativeloader headers into libnativeloader." into nyc-dev 2016-02-23 19:45:22 +00:00
Mark Salyzyn
97ba9510d4 liblog: event log list logging handler
am: 9dd6510dd0

* commit '9dd6510dd09f40973b8834c5cad1217ce1c3011d':
  liblog: event log list logging handler
2016-02-23 15:52:22 +00:00
Mark Salyzyn
9dd6510dd0 liblog: event log list logging handler
(cherry pick from commit bd1ad049b2)

Based off an initial request and effort by williamluh@google.com

- Added the following functions:

* Composing and Writing:

android_log_context create_android_logger(uint32_t tag)

int android_log_write_list_begin(android_log_context ctx)
int android_log_write_list_end(android_log_context ctx)

int android_log_write_int32(android_log_context ctx, int32_t value)
int android_log_write_int64(android_log_context ctx, int64_t value)
int android_log_write_string8(android_log_context ctx, const char *value)
int android_log_write_float32(android_log_context ctx, float value)

int android_log_write_list(android_log_context ctx, log_id_t id)

* Reading and Interpreting:

android_log_context create_android_log_parser(const char *msg, size_t len)

android_log_list_element android_log_read_next(android_log_context ctx)
android_log_list_element android_log_peek_next(android_log_context ctx)

* Destroy context used above:

int android_log_destroy(android_log_context *ctx);

- Added unit gTests

We moved implemented android_log_buffer_to_string() to the test since
it is an alternate for already existing logprint functionality.
Please move into liblog should it be of some common use, otherwise
as is it is a good means of stessing the reading and interpreting
handlers.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 19235719
Change-Id: I4aa1927e8e6a75f0a129d15a27c891cf1ccd4f5c
2016-02-23 07:45:49 -08:00
Mark Salyzyn
bd1ad049b2 liblog: event log list logging handler
Based off an initial request and effort by williamluh@google.com

- Added the following functions:

* Composing and Writing:

android_log_context create_android_logger(uint32_t tag)

int android_log_write_list_begin(android_log_context ctx)
int android_log_write_list_end(android_log_context ctx)

int android_log_write_int32(android_log_context ctx, int32_t value)
int android_log_write_int64(android_log_context ctx, int64_t value)
int android_log_write_string8(android_log_context ctx, const char *value)
int android_log_write_float32(android_log_context ctx, float value)

int android_log_write_list(android_log_context ctx, log_id_t id)

* Reading and Interpreting:

android_log_context create_android_log_parser(const char *msg, size_t len)

android_log_list_element android_log_read_next(android_log_context ctx)
android_log_list_element android_log_peek_next(android_log_context ctx)

* Destroy context used above:

int android_log_destroy(android_log_context *ctx);

- Added unit gTests

We moved implemented android_log_buffer_to_string() to the test since
it is an alternate for already existing logprint functionality.
Please move into liblog should it be of some common use, otherwise
as is it is a good means of stessing the reading and interpreting
handlers.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 19235719
Change-Id: I4aa1927e8e6a75f0a129d15a27c891cf1ccd4f5c
2016-02-22 16:04:41 -08:00
Elliott Hughes
2a7f7e0090 Move libnativeloader headers into libnativeloader.
Change-Id: I227676276da1b08a84486f29fb0e1502c8dbdf4a
(cherry picked from commit e2b4e1e00c)
2016-02-22 15:23:22 -08:00
Calin Juravle
b219fe37c6 Merge "Create profiles folders" into nyc-dev
am: aed972dead

* commit 'aed972dead82d2a74c3a9be296ba3390477d30cf':
  Create profiles folders
2016-02-22 11:49:17 +00:00
Calin Juravle
aed972dead Merge "Create profiles folders" into nyc-dev 2016-02-22 11:42:02 +00:00
Pablo Ceballos
f9603bcb4f Merge "Add the setAutoRefresh interface in ANativeWindow" into nyc-dev
am: f411123ea0

* commit 'f411123ea06da276f435cfd27d824d11b2aebbfe':
  Add the setAutoRefresh interface in ANativeWindow
2016-02-20 18:38:58 +00:00
Pablo Ceballos
f411123ea0 Merge "Add the setAutoRefresh interface in ANativeWindow" into nyc-dev 2016-02-20 18:22:29 +00:00
Calin Juravle
807f23aff2 Create profiles folders
Current profiles (the ones which have not been used for
compilation) are stored in /data/misc/profiles/cur/0/pkgname/.

Reference profiles (the merged of all user profiles, used for
compilation) are stored in /data/misc/profiles/ref/pkgname/.

Add a method to get the shared app gid from an uid or appid.

Bug: 26719109
Bug: 26563023
Change-Id: I89601d7dbeb3041df882c141a9127dac200a645e
2016-02-19 13:42:37 +00:00
Samuel Tan
cf1649da00 Merge "libutils: add String8 and String16 std_string utility methods" am: fb0670d650
am: 941d48f0ee

* commit '941d48f0eeb98fac7c869beee22833ff659318bc':
  libutils: add String8 and String16 std_string utility methods
2016-02-19 04:49:17 +00:00
Samuel Tan
4b2e76966e Merge "libutils: remove whitespace from String8 files" am: e771e846a8
am: 450b9b7068

* commit '450b9b7068cac286ca442c404a90a8a8b57a79e8':
  libutils: remove whitespace from String8 files
2016-02-19 04:49:08 +00:00
Samuel Tan
9ac4e005b4 libutils: add String8 and String16 std_string utility methods
Add utility methods that convert String16 and String8 into
std::string.

Also, remove a repeated include of <utils/Unicode.h> in
String16.h, since it is not used in that header file,
and is already included in String16.cpp.

BUG: 27200800
Change-Id: I5238aeb70689499763060a99dff9950fbb7adb3e
TEST: libutils builds successfully.
2016-02-18 17:04:23 -08:00
Samuel Tan
95fd527065 libutils: remove whitespace from String8 files
Remove trailing whitespace from String8 header and
cpp files.

BUG: None
Change-Id: Ie77da3f0fbce9cdce20225ce1310cf62295179a4
2016-02-18 17:04:20 -08:00
Samuel Tan
9518b9db5b Merge "libutils: remove whitespaces in String16.cpp and String16.h"
am: 8c09555aac

* commit '8c09555aac6f00cb7fa7d62cb5c356e2f07a268b':
  libutils: remove whitespaces in String16.cpp and String16.h
2016-02-17 00:38:10 +00:00
Samuel Tan
8c09555aac Merge "libutils: remove whitespaces in String16.cpp and String16.h" 2016-02-17 00:33:31 +00:00
Samuel Tan
f9d16ef106 libutils: remove whitespaces in String16.cpp and String16.h
Remove trailing whitespaces in both these files.

BUG: None
Change-Id: I18eca5162871b5b2bf7757a7ef36a4e80073798c
2016-02-16 15:21:34 -08:00
Elliott Hughes
5ce57a6717 Merge "Move libnetutils headers into libnetutils."
am: d61ad3c44e

* commit 'd61ad3c44eba0d9b9248005a9068e6b477c06c32':
  Move libnetutils headers into libnetutils.
2016-02-16 22:11:31 +00:00
Elliott Hughes
d61ad3c44e Merge "Move libnetutils headers into libnetutils." 2016-02-16 21:25:52 +00:00
Elliott Hughes
3e08b8205c Merge "Move libdiskconfig headers into libdiskconfig."
am: 737325fb7c

* commit '737325fb7c0231eb530c75b7ea21466308fd3ea1':
  Move libdiskconfig headers into libdiskconfig.
2016-02-16 20:46:00 +00:00
Elliott Hughes
ffd662d259 Merge "Move libmemtrack headers into libmemtrack."
am: 1c3d784030

* commit '1c3d78403009008130d24c27ab3ea24ac6b14dfd':
  Move libmemtrack headers into libmemtrack.
2016-02-16 20:45:35 +00:00
Elliott Hughes
737325fb7c Merge "Move libdiskconfig headers into libdiskconfig." 2016-02-16 18:34:24 +00:00
Elliott Hughes
1c3d784030 Merge "Move libmemtrack headers into libmemtrack." 2016-02-16 17:14:11 +00:00
Elliott Hughes
8dccdbf3f8 Move libdiskconfig headers into libdiskconfig.
Change-Id: I5d8e29687dca39a2a134d92f311528479b4ea102
2016-02-13 12:48:23 -08:00
Elliott Hughes
c768bfc9f5 Merge "Move libnativeloader headers into libnativeloader."
am: 25aca65a93

* commit '25aca65a9385b32191f4016b644c9c27d66cfbb1':
  Move libnativeloader headers into libnativeloader.
2016-02-13 03:49:33 +00:00
Elliott Hughes
ab5ed09924 Move libmemtrack headers into libmemtrack.
Change-Id: I6f695b4a965e924331d1a07fc45e9d8b6bc43d92
2016-02-12 18:16:48 -08:00
Elliott Hughes
8501751bdf Move libnetutils headers into libnetutils.
Change-Id: I8e51b369b7617e780db78c2f77c8e28d0fb93445
2016-02-12 18:10:06 -08:00
Elliott Hughes
e2b4e1e00c Move libnativeloader headers into libnativeloader.
Change-Id: I227676276da1b08a84486f29fb0e1502c8dbdf4a
2016-02-12 18:07:29 -08:00
Lajos Molnar
e6c7f9a0c5 Expand HAL_DATASPACE to include range, standard and transfer bitfields
am: 9136922045

* commit '9136922045978385be99b0171c2c873aa6c2e186':
  Expand HAL_DATASPACE to include range, standard and transfer bitfields
2016-02-10 02:13:44 +00:00
Pablo Ceballos
3daa57490e Add the setAutoRefresh interface in ANativeWindow
Bug 24940410

Change-Id: I6c0d149c63236f169897c64b21563630fb034338
2016-02-09 17:17:21 -08:00
Lajos Molnar
9136922045 Expand HAL_DATASPACE to include range, standard and transfer bitfields
Bug: 25975353
Change-Id: Id2668508b523130e5fa3496440d9423682b31632
2016-02-10 00:21:37 +00:00
Dan Willemsen
cf1381c834 Merge "Fix windows 64-bit builds"
am: 3f68ba4dc6

* commit '3f68ba4dc67360d4c242110005e36bfe65c66098':
  Fix windows 64-bit builds
2016-02-08 23:59:59 +00:00
Dan Willemsen
86cf941c48 Fix windows 64-bit builds
pid_t is 64-bit in 64-bit mingw, but the windows process/thread
functions return a DWORD(uint32_t). Instead of promoting to a pid_t and
fixing the format strings, just use a uint32_t to store the values.

android_thread_id also cannot be a 64-bit pointer, so for windows just
force it to be a uint32_t.

libutils/ProcessCallStack only works under Linux, since it makes heavy
use of /proc. Don't compile it under Windows or Darwin.

Bug: 26957718
Change-Id: I4e43e7cf18a96f22b3a9a08dbab8c3e960c12930
2016-02-05 16:10:10 -08:00
Mattias Nissler
e98d9a076d Merge "graphics: Include stddef.h for size_t." 2016-02-03 21:37:39 +00:00
Mattias Nissler
9cf80c6b40 graphics: Include stddef.h for size_t.
graphics.h uses size_t, but doesn't pull in a declaration. This results
in compile errors if code that includes graphics.h (such as
hardware/hardware.h) doesn't happen to have a size_t declaration from
elsewhere.

Change-Id: I0f3882c3dce20425697d25366d49930b2251ef7f
2016-02-03 22:24:53 +01:00
David Pursell
f722c253e6 Merge "libcutils/fastboot: improve multi-buffer write." am: f6f800ef3c
am: ef0e01c346

* commit 'ef0e01c346b2f60b1941bf3335906de5996785d8':
  libcutils/fastboot: improve multi-buffer write.
2016-02-03 18:13:02 +00:00
David Pursell
b34e4a06ee libcutils/fastboot: improve multi-buffer write.
Fixes libcutils multi-buffer write interface to be more friendly and
hooks into it from the fastboot Socket class.

Bug: http://b/26558551
Change-Id: Ibb3a8428fc379755602de52722c1260f9e345bc0
2016-02-03 10:01:38 -08:00
David Pursell
2fe3a0b7a4 Merge "libcutils: add multi-buffer socket send." am: d95ecfc432
am: d56499b21d

* commit 'd56499b21d1411a7c799cdad316fb2138db26a7c':
  libcutils: add multi-buffer socket send.
2016-02-02 19:25:52 +00:00
David Pursell
e03df480b1 Merge "libcutils: add socket_get_local_port()." am: d90adbc45b
am: 9875e6c7e3

* commit '9875e6c7e318fe11a888b6b53c0472f5586410e4':
  libcutils: add socket_get_local_port().
2016-02-02 19:21:39 +00:00
David Pursell
8385fb299f libcutils: add multi-buffer socket send.
Unix and Windows both have functions to write multiple buffers to a
socket with a single call but they have very different signatures. This
CL creates some cross-platform functions to be able to perform these
operations in a uniform way, which will be required for upcoming
fastboot functionality.

This CL also fixes some inconsistent spacing in the touched files.

Bug: http://b/26558551
Change-Id: I8f14d52d3a1de1f3b464267666d6cd3b54263238
2016-02-02 11:18:56 -08:00
David Pursell
756e1c81e8 libcutils: add socket_get_local_port().
Tests that require a local server currently hardcode a test value,
which can run into conflicts depending on what's currently running on
the machine.

This CL adds socket_get_local_port(), which lets us pass 0 so the
system picks an open port and we can query which port it chose.

Bug: http://b/26236380
Change-Id: I01d1558884e7636081d9a357db6faa86929934f6
2016-02-02 09:52:02 -08:00
Tim Murray
6647bb5130 Enable top-app cpuset support.
Allows ActivityManager to use the top-app cpuset to grant the currently
focused app exclusive access to a CPU core.

Change-Id: I45bca5170477e413dec6e5889338399d0859706c
2016-02-01 15:03:16 -08:00
Dan Stoza
c003b515e9 Merge "Name the pixel format and transform enums" am: 53529ecacd
am: 65823b7820

* commit '65823b78207f7636e4d7ad8a4104ed663336c159':
  Name the pixel format and transform enums
2016-01-28 23:25:38 +00:00
Dan Stoza
53529ecacd Merge "Name the pixel format and transform enums" 2016-01-28 23:18:43 +00:00
Chien-Yu Chen
cd2ef4ef1c Restart cameraserver
Bug: 24511454
Change-Id: Ia27f4ef0eb71f891c789f637a21b04afe0b1c4e9
2016-01-25 11:52:40 -08:00
Marco Nelissen
0b17e3a362 Merge "uid for codec process" am: c7096b5e42
am: e40b58328f

* commit 'e40b58328f13c19d4954c760f7c7f7f86a8f2aa1':
  uid for codec process
2016-01-25 16:57:18 +00:00
Marco Nelissen
003c07238a uid for codec process
Change-Id: Iadf8012e6c177bcf487048e1b5a9b4fc51a0aeba
2016-01-25 07:49:39 -08:00
David Pursell
f6012df68d Merge "fastboot: use cutils socket functions." am: bbedd9523f
am: f0bfaf9503

* commit 'f0bfaf95038241c3f8ed65099c7d532a6c112e86':
  fastboot: use cutils socket functions.
2016-01-22 18:46:54 +00:00
David Pursell
572bce2908 fastboot: use cutils socket functions.
Now that cutils has cross-platform socket functionality, we can
restructure fastboot to remove platform-dependent networking code.

This CL adds socket_set_receive_timeout() to libcutils and combines the
fastboot socket code into a single implementation. It also adds TCP
functionality to fastboot sockets, but nothing uses it yet except for
the unit tests. A future CL will add the TCP protocol which will use
this TCP socket implementation.

Bug: http://b/26558551

Change-Id: If613fb348f9332b31fa2c88d67fb1e839923768a
2016-01-21 09:53:11 -08:00
David Pursell
cb56fb4b15 Merge "libcutils: share Windows networking code." am: 1906de1e0f
am: 7a568dbdd6

* commit '7a568dbdd6c1a39a90c01ab89092cb67a9a86198':
  libcutils: share Windows networking code.
2016-01-21 17:03:45 +00:00
David Pursell
1906de1e0f Merge "libcutils: share Windows networking code." 2016-01-21 16:40:00 +00:00
Christopher Ferris
df69064892 Merge "Allow setting an arbitrary alignment for an entry." am: ad12df20e9
am: 5633ccf042

* commit '5633ccf042f76a894fa31fe1579846ac516fa60c':
  Allow setting an arbitrary alignment for an entry.
2016-01-19 22:35:06 +00:00
Christopher Ferris
ad12df20e9 Merge "Allow setting an arbitrary alignment for an entry." 2016-01-19 22:28:02 +00:00
Christopher Ferris
5e9f3d44a3 Allow setting an arbitrary alignment for an entry.
The current code only allows the creation of an entry that is 32 bit
aligned.

Bug: 25446938

Change-Id: I6c924df12ef2bc067b3de7789257af7e3db7e904
2016-01-19 13:55:53 -08:00
Rubin Xu
c43b47a31c Merge "Add logd security buffer tag types and string write API." am: 95d1bd2421
am: 7fa35356a8

* commit '7fa35356a845ee301c442e51e35c5690c35e54d5':
  Add logd security buffer tag types and string write API.
2016-01-19 20:55:00 +00:00
Rubin Xu
95d1bd2421 Merge "Add logd security buffer tag types and string write API." 2016-01-19 20:40:16 +00:00
Elliott Hughes
7c452f80f6 Merge "Remove unused cruft from <log/log.h>." am: 6acf7663c2
am: b22c169f20

* commit 'b22c169f20d8887f214f1b99a8e4b54215ff5558':
  Remove unused cruft from <log/log.h>.
2016-01-19 17:33:06 +00:00
Rubin Xu
d545d2930e Add logd security buffer tag types and string write API.
Bug: 22860162
Change-Id: I1cceed3462eaebdd8208abf101b127f27f0023a7
2016-01-19 17:13:28 +00:00
Elliott Hughes
3a84b685e9 Remove unused cruft from <log/log.h>.
The callers are, in fact, already gone.

Change-Id: I665183ce595b542b1e47df79bc8990e069571b97
2016-01-16 11:11:19 -08:00
Christopher Ferris
469bf483b1 Merge "Add a ZipArchiveStreamEntry class." am: 9162c1496d
am: 64686bcd9e

* commit '64686bcd9edffdd29c4b7b19ddcbf5b8ab56ae73':
  Add a ZipArchiveStreamEntry class.
2016-01-15 23:58:02 +00:00
David Pursell
0eb8e1b706 libcutils: share Windows networking code.
This CL moves Windows networking code from fastboot to libcutils so
that it can be shared with other host programs such as adb.

Not all libcutils networking functions have been implemented for
Windows, just those necessary for fastboot. In the next CL I will do
the same for adb, adding any additional required functions.

Unit tests have also been added to test the functions using a loopback
connection.

Bug: http://b/26236380.
Change-Id: Ibc51a67030fe69a04c23512eefa9d19b055c7c12
2016-01-15 15:57:35 -08:00
Christopher Ferris
e6884ce56f Add a ZipArchiveStreamEntry class.
This allows someone to stream the data out of a zip archive
instead of extracting to a file or to memory.

Included in this change is a small cleanup of the makefile.

Change-Id: I8b679a679c3502ff4ea0bc4f9e918303657fa424
2016-01-14 12:30:20 -08:00