Commit Graph

244 Commits

Author SHA1 Message Date
Chih-Hung Hsieh
ac5cd96fe2 am dbab409c: Merge "Avoid two warnings from clang."
* commit 'dbab409c49ca5dd6686912d0b3eeb19ef1c37a3e':
  Avoid two warnings from clang.
2014-11-04 01:24:07 +00:00
Chih-Hung Hsieh
8e5337de2c Avoid two warnings from clang.
Clang compiler warns about undefined static functions like getReturnString
before all references are removed inside IF_LOG_COMMANDS.
To remove such warnings, we can leave those static functions defined
and the compiler will remove them at the end when they are not used.

Add a cast to long before converting from int to void*,
to avoid type cast warnings on 64 bit targets.

BUG: 17043248
Change-Id: Ica31101522279d2c8eacc90e2939767002fb827b
2014-10-31 18:38:00 +00:00
Dan Albert
759115cd6d am 9cc84950: Merge "Don\'t check if this == NULL."
* commit '9cc849500df0bba42d3ed19b90c38ff1dffd2262':
  Don't check if this == NULL.
2014-10-15 22:52:43 +00:00
Dan Albert
9cc849500d Merge "Don't check if this == NULL." 2014-10-15 22:45:07 +00:00
Narayan Kamath
4335d35c71 am 9ea09757: Fix broken error check in Parcel::readBlob
* commit '9ea09757fa63ad2a9bea9c846b51c1210d69c79f':
  Fix broken error check in Parcel::readBlob
2014-10-09 12:50:12 +00:00
Narayan Kamath
9ea09757fa Fix broken error check in Parcel::readBlob
mmap returns MAP_FAILED (which is -1) and not NULL on
failure.

Diagnosed by cferris.

bug: 17909809

Change-Id: I609788ebf94742ef88af002d2d3f3bc9b9e520ac
2014-10-08 17:37:38 +01:00
Jesse Hall
5cc3b8b4c8 am 78639c22: Merge "Parcel: extra validation/debug code for writeDupFileDescriptor" into lmp-dev
* commit '78639c22acfa5e56d87fd6fe8340d083536b29fc':
  Parcel: extra validation/debug code for writeDupFileDescriptor
2014-10-06 22:45:57 +00:00
Jesse Hall
ccf851f108 Parcel: extra validation/debug code for writeDupFileDescriptor
Temporary extra debug validation for b/17477219: a Parcel recipient is
getting a positive but invalid fd unexpectedly. Trying to track down
where it's coming from.

Debug code for bug: 17477219
Change-Id: Idb1e71621025a3928c7adc88fd44790e1abd2a01
2014-10-06 15:23:56 -07:00
Michael Lentine
df035b91df am 36462d9d: Merge "Add more logging for dup(fd) failure" into lmp-dev
* commit '36462d9de00105ae46ee3dbb0f644fa6af599f97':
  Add more logging for dup(fd) failure
2014-10-02 19:18:26 +00:00
Michael Lentine
36273c991b Add more logging for dup(fd) failure
Bug: 17477219
Change-Id: Ide0ae16d777c9af783023c705c18a93c00999147
2014-10-02 18:13:02 +00:00
Dianne Hackborn
e4499526ee am 5ee2c9d2: Work on issue #17656716: Unhandled exception in Window Manager
* commit '5ee2c9d20c0fbecf6b4a482eb8d8bfdf85d0d424':
  Work on issue #17656716: Unhandled exception in Window Manager
2014-09-30 20:23:02 +00:00
Dianne Hackborn
5ee2c9d20c Work on issue #17656716: Unhandled exception in Window Manager
Try to clean up the code paths coming in and out of binder IPCs to
plug any places where we could disrupt the gather flag of a thread,
causing it to keep gathering stack crawls (which is the thing that
is causing our strict mode data to become so large).

We now take care of saving and restoring this state in the core
IPC code path, not at the Java layer.

Change-Id: I73d564778da127bdce00f304225930e7f2318293
2014-09-30 11:30:03 -07:00
Dan Albert
1474f8864f Don't check if this == NULL.
Entering a method with this == NULL is undefined behavior. Clang whines
about this.

Change-Id: Ibde628395ca10dfef0d2f59e81280576f104b83c
2014-09-16 17:52:06 -07:00
Hans Boehm
e03abcd61b am 4a7001ca: Merge "Work around C11 const atomic restrictions."
* commit '4a7001cae482e3c9410001360374c8fe9d5a2846':
  Work around C11 const atomic restrictions.
2014-09-12 15:54:52 +00:00
Hans Boehm
c0df68bb80 Work around C11 const atomic restrictions.
Cast away the const qualifier in BBinder::findObject.  C11, unlike C++11,
does not allow loads from const atomics.  This is widely regarded as
a bug (see WG14 DR 459).  This is a hack to work around it until it's
officially fixed in the spec.

load_const_atomic was adapted from commit
1e8587a479fd8b1ce9b594298a93f517816e8f15

I don't think we want to dignify this by putting it into a header file.

Bug:17067219
Change-Id: Icbfcbda2722e6f80d2bb065a0bb3ec7634bcacb2
2014-09-11 14:49:09 -07:00
Hans Boehm
553231f65e Fix CAS argument type.
Gcc apparently doesn't check; clang does.

Bug:17067219
Change-Id: I184084a5063131dbc857c63f97e70e78a05e1a76
(cherry picked from commit 1ddaadb598)
2014-09-02 23:26:16 -07:00
Hans Boehm
08ff802151 Revert "Revert "Revert "Revert "Remove incorrect android_atomic_...64 use.""""
After fixing b/16874785.

This reverts commit f010a05c7e.

Original comment, which actually describes the effect of this:

Change the mExtras field in Binder.h to be a stdatomic.h atomic
value, and replace references to it with proper stdatomic.h calls.
This removes one of a small number of remaining 64 bit
android_atomic references.  It also replaces the erroneously
non-atomic read accesses to mExtras.

It would be better if this used the C++11 <atomic> facility,
but we don't quite have that yet.

Fixes

Bug:16513433

Change-Id: I1645ca5d6f60595bf5d388913665ce4b8780b26d
(cherry picked from commit 3effababf2)
2014-09-02 16:11:46 -07:00
Hans Boehm
02a1c2cb37 am efc0b35f: Merge "Fix CAS argument type."
* commit 'efc0b35fbd256bb3e225f4a1b953d0895ee3e99a':
  Fix CAS argument type.
2014-08-19 22:28:41 +00:00
Elliott Hughes
cb3b7ce1d8 am 703b60ce: Merge "Use gettid directly in binder."
* commit '703b60ce39e52d319074adf53704d33f9c16dbbd':
  Use gettid directly in binder.
2014-08-18 19:34:22 +00:00
Hans Boehm
efc0b35fbd Merge "Fix CAS argument type." 2014-08-16 04:28:29 +00:00
Hans Boehm
1ddaadb598 Fix CAS argument type.
Gcc apparently doesn't check; clang does.

Bug:17067219
Change-Id: I184084a5063131dbc857c63f97e70e78a05e1a76
2014-08-19 13:42:54 -07:00
Elliott Hughes
fa6ad07c4e Use gettid directly in binder.
Bug: 17048545
Change-Id: I1df378135961e085a52f6cc5694ad74cd73aac19
2014-08-18 10:38:38 -07:00
Hans Boehm
dc1fb90857 am a0187a9c: Merge "Revert "Revert "Revert "Revert "Remove incorrect android_atomic_...64 use."""""
* commit 'a0187a9c83cb042b4cb92dac59214247bb7affcf':
  Revert "Revert "Revert "Revert "Remove incorrect android_atomic_...64 use.""""
2014-08-13 00:19:23 +00:00
Hans Boehm
3effababf2 Revert "Revert "Revert "Revert "Remove incorrect android_atomic_...64 use.""""
After fixing b/16874785.

This reverts commit f010a05c7e.

Change-Id: I1645ca5d6f60595bf5d388913665ce4b8780b26d
2014-08-12 22:56:00 +00:00
Hans Boehm
d87319ddc8 am f491f497: Merge "Revert "Revert "Revert "Remove incorrect android_atomic_...64 use.""""
* commit 'f491f497b2a4ba5a0ec60b291cce4ffb3be3d33c':
  Revert "Revert "Revert "Remove incorrect android_atomic_...64 use."""
2014-08-09 02:50:38 +00:00
Hans Boehm
f010a05c7e Revert "Revert "Revert "Remove incorrect android_atomic_...64 use."""
This reverts commit 66629e0de5.

Change-Id: Ic298b345d0e500d18e4297b00e755ce3340f13fb
2014-08-09 01:17:13 +00:00
Hans Boehm
e0b96dbf2a am 6e5316b1: Merge "Revert "Revert "Remove incorrect android_atomic_...64 use."""
* commit '6e5316b1dac10bed0d81f4b2942e4a8749cd67b2':
  Revert "Revert "Remove incorrect android_atomic_...64 use.""
2014-08-09 00:38:27 +00:00
Hans Boehm
66629e0de5 Revert "Revert "Remove incorrect android_atomic_...64 use.""
This reverts commit 9dc5c269f7.
Adds a stdint.h include in case stdatomic.h stops including that.

Change-Id: If3dd1db1f1132c0f2dc1efb0a44617d3f36d7cfb
2014-08-08 17:14:30 -07:00
Hans Boehm
9e0ef391e8 am 735082ea: Merge "Revert "Remove incorrect android_atomic_...64 use.""
* commit '735082ea156d91cf72c241e9134abc22038c8f13':
  Revert "Remove incorrect android_atomic_...64 use."
2014-08-06 22:56:57 +00:00
Hans Boehm
9dc5c269f7 Revert "Remove incorrect android_atomic_...64 use."
This reverts commit 88b7541d68.

Change-Id: Ie701c308451a3697bb167aff119318b932133f90
2014-08-06 22:45:13 +00:00
Hans Boehm
52bfb70cf8 am c11eca81: Merge "Remove incorrect android_atomic_...64 use."
* commit 'c11eca81e66892eb62a03b4553055197d122fe5b':
  Remove incorrect android_atomic_...64 use.
2014-08-06 21:21:05 +00:00
Chong Zhang
2cbba477be add noteResetVideo/Audio to IBatteryStats
Bug: 12979595
Change-Id: Ida474e539a3af0a85ec157a66bbf986430c8020e
2014-07-23 21:51:56 +00:00
Hans Boehm
88b7541d68 Remove incorrect android_atomic_...64 use.
Change the mExtras field in Binder.h to be a stdatomic.h atomic
value, and replace references to it with proper stdatomic.h calls.
This removes one of a small number of remaining 64 bit
android_atomic references.  It also replaces the erroneously
non-atomic read accesses to mExtras.

It would be better if this used the C++11 <atomic> facility,
but we don't quite have that yet.

Bug: 16513433
Change-Id: Ibabb88d05025187ee1ce6c7f1aa670b133a547f8
2014-07-23 11:35:13 -07:00
Chong Zhang
bd42d38b16 update battery status for audio/video
Bug: 12979595

Change-Id: Ic8e8d625becc6d1050f840ad63b7423f388eeba3
2014-07-22 23:08:53 +00:00
Narayan Kamath
7da40c0a84 Remove Parcel::writeIntPtr.
All uses of this API have been removed. It should
never have been made public in the first place.

bug: 15424960
Change-Id: Id07d24ec95b2b393e6da138a7e8a9a4ecebeca94
2014-06-12 15:26:39 +01:00
Narayan Kamath
f905bc3bdc Remove Parcel::writeIntPtr.
All uses of this API have been removed. It should
never have been made public in the first place.

bug: 15424960

(cherry picked from commit 7da40c0a84)

Change-Id: I8d89f62dbdaee7149ef908e0c97417b85e0c48a2
2014-06-13 10:27:33 +01:00
Narayan Kamath
065e9c86e2 Merge "Fix mips build for libbinder." 2014-06-04 14:53:08 +00:00
Narayan Kamath
2f1f742b90 Fix mips build for libbinder.
Mips specific code was using an uninitialized variable.

(cherry picked from commit 2c68d380c9)

Change-Id: I6b562b3f6d2084b72e747736cbf43684c2049f8e
2014-06-04 15:34:16 +01:00
Narayan Kamath
87947be618 Merge "Fix mips build for libbinder." 2014-06-04 14:32:59 +00:00
Narayan Kamath
2c68d380c9 Fix mips build for libbinder.
Mips specific code was using an uninitialized variable.

Change-Id: I445043c76ebfa420b26376ade60f8068b4ea0b11
2014-06-04 15:05:13 +01:00
Mark Salyzyn
b09b936d8e am f0a24759: am a28750ee: Merge "binder: Turn on -Werror"
* commit 'f0a2475905786d5457e7af838ac714acbfdafa4f':
  binder: Turn on -Werror
2014-06-03 20:54:48 +00:00
Mark Salyzyn
f0a2475905 am a28750ee: Merge "binder: Turn on -Werror"
* commit 'a28750eec38c848230adfeef28725b29cc36a9da':
  binder: Turn on -Werror
2014-06-03 20:48:35 +00:00
Mark Salyzyn
d4ecccfd20 binder: Turn on -Werror
Change-Id: I0ee785927a7ae5f731b02176b0b781b87c22a24e
2014-06-03 11:11:45 -07:00
Mark Salyzyn
edcf7f4d3a binder: rm utils/Debug.h as unutilized
Change-Id: I52eb8b64b71cec7ffd4560e902daf358fda98b4a
2014-05-30 16:51:18 +00:00
Mark Salyzyn
b8b3c536f4 am ea3f1da9: am 1ce5ecbe: am 63645c69: Merge "binder: rm utils/Debug.h"
* commit 'ea3f1da9013b33ecf3f3f8771393c1754a9aec59':
  binder: rm utils/Debug.h
2014-05-29 21:09:57 +00:00
Mark Salyzyn
ea3f1da901 am 1ce5ecbe: am 63645c69: Merge "binder: rm utils/Debug.h"
* commit '1ce5ecbe3286380f5ff7ace289369ed006e9b40a':
  binder: rm utils/Debug.h
2014-05-29 21:06:36 +00:00
Mark Salyzyn
1ce5ecbe32 am 63645c69: Merge "binder: rm utils/Debug.h"
* commit '63645c69e03cf3862c52cfde6cbd5f5143ccd38a':
  binder: rm utils/Debug.h
2014-05-29 20:29:32 +00:00
Mark Salyzyn
317ff37cf7 binder: rm utils/Debug.h
Change-Id: I16931919a26c16a0d701771c93fa7fe1c6f60ef8
2014-05-29 13:10:03 -07:00
Ying Wang
f736f2f5da am 114d71ce: am 214b4a61: am 8155ce81: Merge "Remove unused LOCAL_LDLIBS."
* commit '114d71ce7c6ec1ce0327c812a42966c4258b4a46':
  Remove unused LOCAL_LDLIBS.
2014-05-08 18:23:58 +00:00
Ying Wang
114d71ce7c am 214b4a61: am 8155ce81: Merge "Remove unused LOCAL_LDLIBS."
* commit '214b4a61ac3fa63e35c79157d3acf0d8b692b3ac':
  Remove unused LOCAL_LDLIBS.
2014-05-07 23:01:19 +00:00