Commit Graph

19412 Commits

Author SHA1 Message Date
James Hawkins bd04bb0d29 Merge "system/core: Cleanup direct calls to opendir by containing in a std::unique_ptr." 2016-02-19 17:49:13 +00:00
Yabin Cui 219806bc7a Merge "healthd: separate libbatterymonitor for use in recovery." 2016-02-19 17:32:00 +00:00
Yabin Cui e98e177a34 healthd: separate libbatterymonitor for use in recovery.
Bug: 26879394

Change-Id: I97b5b4994c42988ce43f5085b8b4b25e9e80c9fa
2016-02-18 22:14:25 -08:00
Colin Cross 6288b28fc7 Merge "imprecise mark and sweep native memory leak detector" 2016-02-19 04:19:41 +00:00
Samuel Tan fb0670d650 Merge "libutils: add String8 and String16 std_string utility methods" 2016-02-19 03:18:31 +00:00
Samuel Tan e771e846a8 Merge "libutils: remove whitespace from String8 files" 2016-02-19 01:07:47 +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
Josh Gao d5126ddf71 Merge "adb: fix clang-format for access modifier dedent." 2016-02-18 23:00:51 +00:00
James Hawkins 588a2cad7f system/core: Cleanup direct calls to opendir by containing in a
std::unique_ptr.

Bug: 26643633
Change-Id: Ia3491fdbff086558da694ae949cf08e4c89d0307
2016-02-18 14:52:46 -08:00
Josh Gao 5da522ec45 adb: fix clang-format for access modifier dedent.
It was previously -1 (the default from Google style, since it uses 2
space indentation), instead of -2.

Change-Id: I1865505ce17a2cc13b85de58bda55c3b1dfcf08c
2016-02-18 14:52:07 -08:00
Elliott Hughes d3289ac581 Merge "Remove logcat's false dependency on a libutils header file." 2016-02-17 22:10:35 +00:00
Todd Poynor fdd26c961d Merge "healthd: Add "No UI" operation for charger mode" 2016-02-17 21:36:36 +00:00
Todd Poynor 7c5a3e12a4 healthd: Add "No UI" operation for charger mode
Boards can opt to have charger mode be passive, with no screen UI or key
processing, the same as for recovery mode, via BOARD_CHARGER_NO_UI.  The
minui and associated libs and charging image files are not built into the
executable in this case.

Always select charger No UI operation for Brillo devices.

Bug: 27170356
Change-Id: Ibe71498743353b01ce5b6521e42ed94d75547547
2016-02-17 21:35:03 +00:00
Mark Salyzyn 3fd5649424 Merge "fake_log_device: long lived allocations" 2016-02-17 21:19:48 +00:00
Mark Salyzyn 0085a135b9 fake_log_device: long lived allocations
Use static space for long lived allocations as they
will appear to act like a memory leak. Resort to a
larger on-stack iovec to reduce the chances of an
allocation. Fix bug in writer where not enough size
was available for "security" buffer name. Minor
transitions to more consistent coding style.

Bug: 27107691
Change-Id: I68c918e7b916b1ae3b04829d48b3eddaa0a7e739
2016-02-17 12:22:18 -08:00
Elliott Hughes fd9619004b Merge "Remove two bogus libutils dependencies." 2016-02-17 20:01:04 +00:00
Elliott Hughes b3a77b1198 Merge "Remove libbase's libutils dependency." 2016-02-17 20:00:38 +00:00
Elliott Hughes b9e53b4d2d Remove logcat's false dependency on a libutils header file.
Change-Id: Idf499d77e88d2ee7d5b1050eaf45ba29481793a4
2016-02-17 11:58:01 -08:00
Elliott Hughes ce927189a4 Remove two bogus libutils dependencies.
Change-Id: Idcc25ee1d039935f3218fb419bc73ffaa58242bb
2016-02-17 11:54:47 -08:00
Elliott Hughes 38e2b63db8 Remove libbase's libutils dependency.
Yuck.

Change-Id: If84758f25bc15d5b1a732eaccc226385f51cac13
2016-02-17 11:53:54 -08:00
Yabin Cui 2773d4f96a Merge "healthd: init members of BatteryMonitor." 2016-02-17 18:30:05 +00:00
David Pursell bcaeb78f63 Merge "fastboot: fix TCP protocol version check." 2016-02-17 18:16:12 +00:00
David Pursell aad72a533f fastboot: fix TCP protocol version check.
Currently the TCP handshake fails if the device TCP protocol version
doesn't match the host exactly, but the protocol is supposed to allow
for forwards compatibility by accepting any protocol version >= itself.
That way the other side can potentially lower its protocol to match and
keep going.

This CL fixes the protocol version check and adds corresponding unit
tests.

Bug: http://b/27220700
Change-Id: Ib17f0a55eb910105a27609bc94bf76a30442e92e
2016-02-17 10:00:09 -08:00
James Hawkins 8a97f88a6d Merge "bootstat: Record metrics for factory_reset and time_since_factory_reset." 2016-02-17 17:46:39 +00:00
Yabin Cui db04a49a6f healthd: init members of BatteryMonitor.
Bug: 26879394
Change-Id: I09a6c78137f91a0c88bf4ba1e8890b4ec31dcf2c
2016-02-16 17:19:23 -08:00
Samuel Tan 8c09555aac Merge "libutils: remove whitespaces in String16.cpp and String16.h" 2016-02-17 00:33:31 +00:00
James Hawkins 500d71566a bootstat: Record metrics for factory_reset and time_since_factory_reset.
Bug: 25448351
Change-Id: I9b3a557317bc256a078f76e2b65d16bc071e4a6a
2016-02-16 16:19:48 -08:00
Alex Deymo 753676a154 Merge "Add .clang-format symlink to Brillo's clang-format." 2016-02-16 23:38:29 +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
Alex Deymo 5e087e451c Add .clang-format symlink to Brillo's clang-format.
This patch replaces the locally defined clang-format with a symlink
to the one defined in build/tools.

Bug: 27121653
TEST=Ran clang-format.

Change-Id: I8810428d12b60c7463bc7f9a96228600ec8b425d
2016-02-16 14:39:56 -08:00
Sami Tolvanen d1ac932330 Merge "logd: enforce policy integrity" 2016-02-16 21:52:13 +00:00
Elliott Hughes d61ad3c44e Merge "Move libnetutils headers into libnetutils." 2016-02-16 21:25:52 +00:00
Elliott Hughes 0a3a46afea Merge "Remove unnecessary #include from <memtrack/memtrack.h>." 2016-02-16 21:24:18 +00:00
Sami Tolvanen d122ee65b6 logd: enforce policy integrity
If a SELinux policy change or a switch to permissive mode is detected
on a user build, restart the device into safe mode, and keep it there
until an OTA is applied or user data is wiped.

This change deprecates the ro.logd.auditd property.

Needs matching changes from
  I781c3059ea8d4fb2f0c923e4488b1932d69678d3
  Ica825cf2af74f5624cf4091544bd24bb5482dbe7
  Id3ca7889ede30b54b7af73dd50653ca1a20d59aa

Bug: 26902605
Change-Id: Idcdc5bff133f13c1267f0ec0a75cc8cf1ddbda0d
2016-02-16 12:54:54 -08:00
Mark Salyzyn 8cd629aedd Merge "liblog: document fakeLogClose never to be called" 2016-02-16 20:22:15 +00:00
Mark Salyzyn bc81b17e06 liblog: document fakeLogClose never to be called
Bug: 27107691
Change-Id: Ia699646ec2e83ca46f8b62b5d4f144e533b36074
2016-02-16 10:35:06 -08:00
Elliott Hughes 737325fb7c Merge "Move libdiskconfig headers into libdiskconfig." 2016-02-16 18:34:24 +00:00
Elliott Hughes e81f4d6d40 Remove unnecessary #include from <memtrack/memtrack.h>.
Change-Id: I933bc75ffa8a612fd6f572e6ee76cf9a24a35562
2016-02-16 10:32:30 -08:00
Elliott Hughes ae2b746c82 Merge "Don't go busy loop when waiting child process." 2016-02-16 18:23:32 +00:00
Elliott Hughes 9c9818374e Merge "fs_mgr: BLKGETSIZE causes memory corruption" 2016-02-16 18:16:42 +00:00
Tao Wu bc31090b7a Don't go busy loop when waiting child process.
Before this change, code works like this: after gets POLLHUP from poll, it just
go a busy loop to do poll -> waitpid -> poll -> waitpid ... until child process
really exit. This doesn't make sense and is waste of CPU.

Change-Id: If6cd8b0245587d623e309c3ae27f162e1c7ef504
Signed-off-by: Tao Wu <lepton@google.com>
2016-02-16 10:13:48 -08:00
Keith Mok d93adf55df fs_mgr: BLKGETSIZE causes memory corruption
BLKGETSIZE return unsigned long sector size,
but unsigned long is of 8 bytes in 64 bits system.
Passing an integar value will causes stack corruption.
Use BLKGETSIZE64 instead.

Change-Id: I60323e51c6692d4405cf2ed015ab4216c1591f68
2016-02-16 09:51:00 -08:00
Elliott Hughes 1c3d784030 Merge "Move libmemtrack headers into libmemtrack." 2016-02-16 17:14:11 +00:00
James Hawkins 06bfaa7078 Merge "bootstat: Add a few more bootreasons and rebase the index against index 1." 2016-02-13 21:46:21 +00:00
Elliott Hughes 8dccdbf3f8 Move libdiskconfig headers into libdiskconfig.
Change-Id: I5d8e29687dca39a2a134d92f311528479b4ea102
2016-02-13 12:48:23 -08:00
James Hawkins 6f74c0b843 bootstat: Add a few more bootreasons and rebase the index against index 1.
This is necessary to match the mapping in the internal infrastructure.

Bug: 21724738
Change-Id: I292166ff5c0dea7f3d771627120f16af4c56073b
2016-02-13 09:54:35 -08:00
Dimitry Ivanov 8b68829c06 Merge "Add missing liblog dependency" 2016-02-13 04:44:44 +00:00
Elliott Hughes 25aca65a93 Merge "Move libnativeloader headers into libnativeloader." 2016-02-13 03:35:44 +00:00
Dimitry Ivanov 01f21da732 Add missing liblog dependency
Bug: http://b/27171986
Change-Id: Ia7f03c72de9a8e5d61896bde6b4b1af396376f54
2016-02-12 18:40:29 -08:00