Commit Graph

25799 Commits

Author SHA1 Message Date
Mitchell Wills c3d7cb95cc Merge "Give wifi_hal_legacy access to netlink"
am: 6fc7eaaad0

Change-Id: Ia3a6d48dab8123a5dc4e42d4b0d271d2e2c880e2
2016-09-23 16:32:57 +00:00
Treehugger Robot 6fc7eaaad0 Merge "Give wifi_hal_legacy access to netlink" 2016-09-23 16:27:41 +00:00
Tianjie Xu 1ee4892e66 Fix out of bound access in libziparchive
The boundary check of an invalid EOCD record may succeed due to the
overflow of uint32_t. Fix the check.

Test: Open the crash.apk and libziparchive reports the offset error as expected.

Bug: 31251826
Change-Id: I1d8092a19b73886a671bc9d291cfc27d65e3d236
(cherry picked from commit ae8180c06d)
2016-09-22 18:24:53 -07:00
Andreas Gampe 9ce7b8f21b Merge "Base: Add more log macros" am: 58af713d8a am: 9148006e85
am: 4939e19354

Change-Id: Iafa634da74d64c8099425201b15d5dbb90434507
2016-09-23 00:15:45 +00:00
Andreas Gampe 4939e19354 Merge "Base: Add more log macros" am: 58af713d8a
am: 9148006e85

Change-Id: Ib18375fd6bef00321b5ee7b2e866554b389ffa58
2016-09-23 00:03:26 +00:00
Andreas Gampe 9148006e85 Merge "Base: Add more log macros"
am: 58af713d8a

Change-Id: Ia8a446e8e2609f2d7e31bcfb1eec83fc82bbeebb
2016-09-22 23:59:10 +00:00
Treehugger Robot 58af713d8a Merge "Base: Add more log macros" 2016-09-22 23:56:48 +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
Tao Wu 485153bf44 Merge "We should break from loop after getting connected." am: 53171e5f97 am: 646a70b1fb
am: 298571ec19

Change-Id: I16093f42b297abdd94e97cd26219d86d4a465f09
2016-09-22 22:53:25 +00:00
Tao Wu 0e0cf74c52 Merge "Ignore setsid error in some cases." am: 3562fd0fa8 am: 324acdce69
am: f7756b89e9

Change-Id: I7bc3c1f46fec39fb8fd2fe597633b067ad0a8bda
2016-09-22 22:53:08 +00:00
Dan Albert eb95b1ecca Merge "Add missing include." am: 55123dfa39 am: a8b88e1de7
am: 6f6d2eea16

Change-Id: I498d31c4bb52cd1fba606805000c4bd128708fba
2016-09-22 22:52:57 +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
Josh Gao 6d317aca93 Merge "adb: kill adb_mutex_t, adb_cond_t." am: 7e4d1db957 am: 72c679d6d0
am: 71970fc473

Change-Id: I77f0221da27abb337ce7d8896cd6ad94c04548cf
2016-09-22 22:52:16 +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 0f79b62bf6 Merge "Fix warnings in libutils headers"
am: 65a1633ec3

Change-Id: I65b7448a5aeaa868e40dfdda2b7cd8a6eb54a9e2
2016-09-22 21:55:34 +00:00
Treehugger Robot 65a1633ec3 Merge "Fix warnings in libutils headers" 2016-09-22 21:24:49 +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 85942090f6 Merge "Remove has_trivial_move trait from Vector<T>"
am: 588b3b0c03

Change-Id: I0af14f7684649780f2f98c4cd613d8b946e80466
2016-09-22 19:57:04 +00:00
Andreas Gampe 436f5a031f Base: Add more log macros
Add WOULD_LOG to determine whether a given severity would be logged.

Add LOG_STREAM to have direct access to a logging stream.

Add LOG_S variants that take a fully qualified severity. This allows
complex expressions as parameters, e.g., ternaries for conditional
severity levels.

Add tests.

Bug: 31338270
Test: m
Test: mmma system/core/base && $ANDROID_HOST_OUT/nativetest64/libbase_test/libbase_test64
Change-Id: I242b960594e68caff6db9cd8aaa4ce8aaf90474c
2016-09-22 12:47:40 -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
Tao Wu 298571ec19 Merge "We should break from loop after getting connected." am: 53171e5f97
am: 646a70b1fb

Change-Id: I2fe5ce1bd66c893f3dec4ef8eb8458f935f917ff
2016-09-22 11:55:37 +00:00
Tao Wu f7756b89e9 Merge "Ignore setsid error in some cases." am: 3562fd0fa8
am: 324acdce69

Change-Id: I330be058b8c0d7b175845b30d59f091432d62f6c
2016-09-22 11:55:23 +00:00
Dan Albert 6f6d2eea16 Merge "Add missing include." am: 55123dfa39
am: a8b88e1de7

Change-Id: Ib489aa1a3a940ebdcc2e0afbd4dbb87c5489877b
2016-09-22 11:55:08 +00: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
Josh Gao 71970fc473 Merge "adb: kill adb_mutex_t, adb_cond_t." am: 7e4d1db957
am: 72c679d6d0

Change-Id: I3b726d03c8dc299191a68488e28fe83c3bd89a77
2016-09-22 11:54:05 +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 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
Tao Wu 646a70b1fb Merge "We should break from loop after getting connected."
am: 53171e5f97

Change-Id: I442495aee3fe8815379efc4f039e98c6d61151f1
2016-09-22 08:22:28 +00:00
Tao Wu 324acdce69 Merge "Ignore setsid error in some cases."
am: 3562fd0fa8

Change-Id: I8ff768ce0e4ddd5e2810e40302bf597e2f39387b
2016-09-22 08:22:14 +00:00
Dan Albert a8b88e1de7 Merge "Add missing include."
am: 55123dfa39

Change-Id: Ie0aafdd29e500d1d7c074c73b54e2a7ee8a95e93
2016-09-22 08:21:58 +00:00
Colin Cross 299df0bf01 Merge "Fix warnings in system/ headers"
am: d7f60fd871

Change-Id: I616548e002f517fe9f85b49aef9d9b6a5548127e
2016-09-22 08:21:43 +00:00
Josh Gao 72c679d6d0 Merge "adb: kill adb_mutex_t, adb_cond_t."
am: 7e4d1db957

Change-Id: I3e10b6e3039e3aeb966f8ca27df69b61fa8aa0cc
2016-09-22 08:21:30 +00:00
Ajay Panicker f924c252bd Merge "Remove net_bt_stack group and replace it with bluetooth"
am: 7875407bb7

Change-Id: Idd864e20abbe5d9394c63e92ab8a8ac2b020c2e7
2016-09-22 08:09:39 +00:00
Treehugger Robot 53171e5f97 Merge "We should break from loop after getting connected." 2016-09-22 06:41:49 +00:00
Treehugger Robot 3562fd0fa8 Merge "Ignore setsid error in some cases." 2016-09-22 06:28:51 +00:00
Treehugger Robot 55123dfa39 Merge "Add missing include." 2016-09-22 05:40:11 +00:00
Treehugger Robot d7f60fd871 Merge "Fix warnings in system/ headers" 2016-09-22 02:46:51 +00:00
Tao Wu 9b7341fe57 We should break from loop after getting connected.
Now it always connects to multiple address of same host and just
return one socket while other sockets get leaked.

Also, it cause trouble on machine with dual stack.
adb connect localhost:* just connect to IPv4 and IPv6 at same time
and finally it doesn't work since emulator can only handle one adb
connection.

To test this, start an emulator with non-standar port and killall adb
daemon on linux work station and then do following test.

Test: adb connect localhost:12345;lsof -n -p `pgrep adb`
Change-Id: I1e0f6824efc1db8e179377de068e3b5535aff3f7
2016-09-21 19:45:54 -07:00
Treehugger Robot 7e4d1db957 Merge "adb: kill adb_mutex_t, adb_cond_t." 2016-09-22 02:15:00 +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 a802e570b3 Merge "Hide warning in cutils/trace.h"
am: 5cf3db6d2b

Change-Id: Ie32731764880823560d79aa6cbcc17faf5cd5bf8
2016-09-22 00:55:11 +00:00
Colin Cross 9eb3592e62 Merge "Hide gnu extension warnings in log/log.h"
am: 21049e5c91

Change-Id: Ie25019ffacd234d06e46d40547858009d8341fa3
2016-09-22 00:54:58 +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