Commit Graph

10989 Commits

Author SHA1 Message Date
Al Sutton 8e01cc6e0b Disable vendor id filtering for OS X.
Companion patch for change I2bf583a27f9a3f98ef006ea62b906a4f89960507.

Due to the use of USB class 0xff it's not possible to register a listener
which uses the OS methods for filtering notifications, so this patch
also introduces a check in the notification listener which checks the
class, subclass, and protocol for the interface each notification relates 
to.

Change-Id: I380cc80f96addc5057660efb2179b35f9378886a
2014-11-21 14:14:58 +00:00
Dan Albert 5d8a5ade62 Merge "Add a pre-C++11 constexpr compatibility macro." 2014-11-20 20:13:20 +00:00
Dan Albert e4c649c9fc Add a pre-C++11 constexpr compatibility macro.
Needed for cases where something should be constexpr if possible, but
not being constexpr is fine if in pre-C++11 code (such as a const
static float member variable).

Bug: 18466763
Change-Id: I635d062575ba2fbc4cbe3a89f730128c404d95e1
2014-11-20 10:47:55 -08:00
Elliott Hughes aa3e17e1b6 Merge "Return path including executable instead of without" 2014-11-20 18:35:12 +00:00
Elliott Hughes 511849507a Merge "Disable vendor id filtering for Linux." 2014-11-20 18:28:06 +00:00
Al Sutton 26b53bb75e Return path including executable instead of without
The previous implementation returned the path the executable was in instead
of returning the path including the executable (i.e. it returned ...bin
instead of ...bin/executable). This is not what the original methods did
and caused the process forking of adb to fail.

This patch corrects the implementation.

Change-Id: Ib58497cab35706041f170c1bc97c31fd5d965f90
2014-11-20 13:33:57 +00:00
Elliott Hughes 55664906a8 Disable vendor id filtering for Linux.
It's time we switched to blacklisting any problematic devices rather than
slowly whitelisting the entire world. This seems to work for me, but let's
see how other people get on before coming back to actually remove the list.

We'll also need to find a Mac to test the equivalent Mac change.

Change-Id: I2bf583a27f9a3f98ef006ea62b906a4f89960507
2014-11-19 22:07:34 -08:00
Yabin Cui 46ee85fcc3 Merge "kill HAVE_PREAD" 2014-11-20 05:15:04 +00:00
Yabin Cui 70160f4454 kill HAVE_PREAD
Bug: 18397613
Change-Id: I3990bd0f95cf38c5a9229180a1ddc699941892fc
2014-11-19 20:47:18 -08:00
Nick Kralevich 606bb5f2e5 Merge "logd: throttle SELinux denials to 20/sec" 2014-11-19 22:02:15 +00:00
Elliott Hughes 20860a28c5 Merge "Fix building on modern versions of Xcode and OS X." 2014-11-19 21:48:32 +00:00
Nick Kralevich c234a1b879 logd: throttle SELinux denials to 20/sec
Impose a limit of 20 selinux denials per second. Denials beyond
that point don't add any value, and have the potential to cause
crashes or denial of service attacks.

Do some other misc cleanup while I'm here.

Bug: 18341932
Change-Id: I6125d629ae4d6ae131d2e53bfa41e1f50277d402
2014-11-19 13:35:36 -08:00
Al Sutton f456d47c50 Fix building on modern versions of Xcode and OS X.
Recent versions of XCode fail to compile the adb and fastboot binaries due to
two functions being deprecated in 10.9 (GetCurrentProcess and
ProcessInformationCopyDictionary), and the use of -Werrror.

This patch replaces the method implementations which use calls to methods
deprecated in the 10.9 SDK with versions which only call non-deprecated methods.

Change-Id: I855bf26aff45093ca9022924f3ecd1b80f2305a8
2014-11-19 19:50:48 +00:00
Yabin Cui 81906d4b0c Merge "kill HAVE_MADVISE" 2014-11-19 04:25:59 +00:00
Yabin Cui 745c5f6ad0 kill HAVE_MADVISE
Change to avoid "unused parameter" warning. 

Bug: 18397020
Change-Id: I4b26de55314c78237daead8e873385b97cafe4d4
2014-11-19 04:03:27 +00:00
Yabin Cui c8ad180983 Merge "kill HAVE_MADVISE" 2014-11-19 03:17:46 +00:00
Yabin Cui 819b480b93 kill HAVE_MADVISE
Bug: 18397020
Change-Id: Ibc8d886d729c51932a403531888214de4e541452
2014-11-18 18:15:40 -08:00
Elliott Hughes 0655d38b0c Merge "Revert "adb: Add USB vendor ID for Honeywell"" 2014-11-18 21:15:44 +00:00
Elliott Hughes 3e01bb85d6 Revert "adb: Add USB vendor ID for Honeywell"
This reverts commit 8c4c8e8988.

Change-Id: Ia1cad862f42e5bea3174ed2cc0eea5232fc0a858
2014-11-18 21:15:28 +00:00
Elliott Hughes 1606883044 Merge "toolbox: enable mkswap to work on block devices" 2014-11-18 19:11:56 +00:00
Andrew Boie d90615cefd toolbox: enable mkswap to work on block devices
Change-Id: I9b71ca3fa09ffbe12dcc4d04229edab80851db4d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2014-11-18 10:42:14 -08:00
Elliott Hughes 91cb2cb341 Merge "toolbox: indicate why swap{on|off} failed" 2014-11-18 17:57:59 +00:00
Yabin Cui 6a56ad28c3 Merge "kill HAVE_TERMIO_H" 2014-11-18 02:22:38 +00:00
Yabin Cui d325e866c4 kill HAVE_TERMIO_H
Bug: 18398307
Change-Id: Idbb89a074cdf16869cae3f667e89472781f37a5f
2014-11-17 18:19:11 -08:00
Elliott Hughes ac252357bb Merge "Remove atomic-inline.h." 2014-11-17 23:08:42 +00:00
Elliott Hughes c3914d2be2 Remove atomic-inline.h.
Change-Id: I3ac0229b9c516744e6a9c9d9e795b43bc9c5636b
2014-11-17 14:38:56 -08:00
Elliott Hughes 3ef0460e86 Merge "Remove the error-prone TARGET_CPU_SMP from system/core." 2014-11-17 19:29:04 +00:00
Elliott Hughes e9ca709a73 Remove the error-prone TARGET_CPU_SMP from system/core.
This means that code that uses libcutils no longer has to ensure that
it's set ANDROID_SMP in the calling code's Android.mk for this to
function correctly.

Change-Id: I80c7ff170cd621106f34d6b74689d6b4f03e4eb7
2014-11-17 11:16:59 -08:00
Marco Nelissen e11d81b37c Merge "Update calls to IInterface::asBinder()" 2014-11-17 18:14:37 +00:00
Marco Nelissen 99f00d5ff3 Update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
2014-11-17 10:06:42 -08:00
Dan Albert e90159b070 Merge "Move debuggerd to libc++." 2014-11-16 01:08:43 +00:00
Dan Albert 917d6f4c73 Merge "Move libutils to libc++." 2014-11-16 01:08:25 +00:00
Dan Albert 80b88cb5d2 Move debuggerd to libc++.
Bug: 15193147
Change-Id: I935a08e98077b688d1735fb5b84a615cb7df8810
2014-11-15 16:35:30 -08:00
Dan Albert 890442a02d Move libutils to libc++.
Bug: 15193147
Change-Id: I85aff3bcabb5ee3c8be9918b7bef0fd1bbfa98e3
2014-11-15 16:32:26 -08:00
Dan Albert 133b7d4a84 Merge "Don't manually link libgtest_main in libion tests." 2014-11-14 21:38:17 +00:00
Dan Albert 29a34a5e7c Merge "Disable the static libcutils tests." 2014-11-14 21:38:07 +00:00
Christopher Ferris a46bf7eb68 Merge "Convert futex to cond wait." 2014-11-14 19:25:17 +00:00
Dan Albert abe8d148b9 Don't manually link libgtest_main in libion tests.
This is actually probably broken right now, since these tests are
getting both the libc++ flavor and stlport flavor of libgtest_main.

Bug: 15193147
Change-Id: Ic2f8dda98240c12591803f3c3522505314a05609
2014-11-14 11:00:46 -08:00
Dan Albert bb28776db0 Disable the static libcutils tests.
The static libcutils tests cannot be built when using libc++ because
there are multiple symbol definition errors between libc++ and libgcc.

Bug: 18389856
Change-Id: I6f41c561f97b3a37477f844e9abf6551524a0fa3
2014-11-14 10:56:34 -08:00
Christopher Ferris 3cdbfdce6a Convert futex to cond wait.
Switch to the better supported pthread_cond to handle the Wait/Wake
functions.

Also, increase the number of simultaneous threads in the thread tests.

Bug: 18381207

(cherry picked from commit db44538387)

Change-Id: Id326a7a7b92cb61573def3f761597c40f3ef2f4b
2014-11-14 10:46:39 -08:00
Andreas Gampe 6ef68b55b7 Merge "System/core: Use memmove" 2014-11-14 00:28:03 +00:00
Hans Boehm 64d7117efc Merge "Second attempt to "Rewrite atomic.h to use stdatomic.h."" 2014-11-14 00:17:19 +00:00
Hans Boehm c56648948c Second attempt to "Rewrite atomic.h to use stdatomic.h."
This should not be committed until win_sdk and aarch64 builds are
fixed in the presence of this CL.

This reverts commit 2789faabfa.

We additionally remove uniprocessor support from the earlier CL,
thus avoiding a potential compiler code reordering issue.

Change-Id: I7207a5ca2efa907a6f757f172d7090a62b2311fe
2014-11-13 15:59:10 -08:00
Andreas Gampe dd060f01f6 System/core: Use memmove
Should use memmove when you expect overlap.

Change-Id: I268a173db40a4be54232958e37aa8a03c2a885ee
2014-11-13 15:50:17 -08:00
Chih-Hung Hsieh 165238d8de Merge "Fix a trivial typo." 2014-11-13 23:40:17 +00:00
Chih-Hung Hsieh 2c776811a4 Fix a trivial typo.
Clang compiler gave a correct warning on this mismatch of
names in #ifndef and #define.

Change-Id: I360f0c40ee98162093dde8f9815a02a54e5b2cb7
2014-11-13 15:33:38 -08:00
Yabin Cui c9582d0239 Merge "kill HAVE_FORKEXEC" 2014-11-13 23:22:14 +00:00
Dan Albert a3f16f22dc Merge "Add LOCAL_MULTILIB := both to Darwin libbacktrace." 2014-11-13 23:00:08 +00:00
Dan Albert 5570c9b174 Add LOCAL_MULTILIB := both to Darwin libbacktrace.
This was previously set for libbacktrace_libc++, but apparently never
was for libbacktrace.

Change-Id: I85dc44b356710c6367f5cea3bc0a4d6c817ca202
2014-11-13 14:55:06 -08:00
Elliott Hughes a78e1a7418 Merge "Sdcard: Initialize the padding output value" 2014-11-13 20:21:05 +00:00