Check for NULL before calling asBinder().

The old asBinder() checked if this == NULL, which is undefined behavior.

Change-Id: Ibde628395ca10dfef0d2f59e81280576f104b83c
Fix comparison of String8 to char* literal

Clang (correctly) interprets

if ("." == sName)

as

if ("." == (const char*)sName)

and recognizes that comparing the pointers isn't what was meant.

With

if (sName == ".")

both clang and gcc see and use String8::operator==(const char *),
ensuring we get the wanted behavior.

Change-Id: Ide240e13214a56f6899f72de3db75dac647e6d4b
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Allow building on clang without __builtin_assume_aligned

Clang versions up to and including 3.5 don't have
__builtin_assume_aligned.
Define it to a reasonable approximation when building with those.

Change-Id: I223ccfda6e6ae55ce29dda5e4cacc1b162728b2c
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Merge "Check for NULL before calling asBinder()."
Fix a namespace collision.

There's already an android::FileSource defined in
media/libstagefright/FileSource.h, and the two can conflict at link
time.

Change-Id: Id8d80e96c68af1c9bb2a153630c84b923a4f4d06
Merge "Fix a namespace collision."
Merge "Fix comparison of String8 to char* literal"
Merge "Allow building on clang without __builtin_assume_aligned"
Fix linkage when building with clang, Intel CC or gcc -O0

This code fails to link when using clang, Intel CC, or gcc -O0 because of the
CHECK_GT statement in WifiDisplaySource::scheduleKeepAlive (explanation
at https://gcc.gnu.org/wiki/VerboseDiagnostics#missing_static_const_definition,
doesn't show up with gcc when optimizations are enabled because the
entire CHECK_GT statement is optimized away).

This fixes https://code.google.com/p/android/issues/detail?id=58221

Change-Id: I43d3629819a01971846c31e9f755d6e0567fb838
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Merge "Fix linkage when building with clang, Intel CC or gcc -O0"
Fix struct vs. class mismatches

Fix class vs. struct mismatches clang whines about.

Change-Id: Ia551c796b6a5df8317943715447d0c28cdbf465a
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Merge "Fix struct vs. class mismatches"
Merge branch 'master' of https://android.googlesource.com/platform/frameworks/av into HEAD