Commit graph

319 commits

Author SHA1 Message Date
Jeff Sharkey
2e81f58baa Merge "Create groups to protect bandwidth statistics." 2011-06-30 00:19:02 -07:00
Mike J. Chen
2a56688da9 Workaround Motorola ril.so incompatiblity with Netlink changes
To workaround a binary incompatiblity with Motorola's ril.so, I had to
temporarily provide the old constructor for NetlinkListener as well as
a new contructor that takes an additional format argument.
There's still a slight chance of a problem because the size of the
NetlinkListener has changed with the addition of the
mFormat member, but so far I've not seen any obvious problem with that
incompatiblity.

Another way we could have worked around the incompatiblity is to have
netd (the main user of the new format argument to NetlinkListener) keep
track of the format itself in it's NetlinkHandler (derived from NetlinkListener)
and supply it's own version of onDataAvailable() that's almost 100% identical
to NetlinkListener's except for the decode() call.  That would allow us
not to modify NetlinkListener at all.  Worth considering but I think it's
more properly divided right now and we just have to make Motorola fix their
code (and ideally not use our private APIs).

This change should be reverted when Motorola's has fixed their ril to
either not use our private APIs or to use our updated ones.

Change-Id: I255cca6908444e56cbbbed7eef1fa0cf1d8f0918
Signed-off-by: Mike J. Chen <mjchen@google.com>
2011-06-23 18:59:45 -07:00
Mike J. Chen
17260b1468 Cleanup NetlinkListener and NetlinkEvent
To make it easier to be compatible with older existing code, use
default parameters instead of separate functions for setting.

Also, reintroduce the const usage that was not in the original
changes by Stan.

Also fix some indent spacing.

Change-Id: Ice9ec7f0d5c4a0673037e2e04a764d88a98f68eb
Signed-off-by: Mike J. Chen <mjchen@google.com>
2011-06-23 18:59:45 -07:00
Mike J. Chen
ec16b9d47c Revert "Revert "Add NETLINK_ROUTE processing to the netlink client code, so that Ethernet""
This reverts commit 1d504eeb50.

Conflicts:

	libsysutils/src/NetlinkEvent.cpp

Bring back the changes from Stan Chesnutt regarding adding NETLINK_ROUTE
processing.  The original commit message description was:

    Add NETLINK_ROUTE processing to the netlink client code, so that Ethernet
    physical-layer up/down events can be tracked.  Upper layers will use these
    events to enable/disable Ethernet connectivity.

The original change was reverted due to an incompatiblity with Motorola's
ril.so binary.  I'll submit a patch to workaround that incompatiblity
separately.

Change-Id: I4e97ac98833b10543e654c63ecae3b9b8c7db44f
Signed-off-by: Mike J. Chen <mjchen@google.com>
2011-06-23 18:59:45 -07:00
Jeff Sharkey
4f1df18766 Create groups to protect bandwidth statistics.
Introduces new "net_bw_stats" group which will protect reading
detailed bandwidth statistics.  Also introduce "net_bw_acct" group
which will enable specific applications to request that their network
traffic be counted against other UIDs.

Change-Id: Ic0ec04e0d2bb9573f3c2a094ebd6d6a8cae0aae6
2011-06-22 10:01:29 -07:00
Eric Laurent
da38224875 Fixed some audio helper functions
Make sure audio_is_valid_format() is true only
for formats supported by AudioTrack and AudioRecord.
Generalized audio_is_linear_pcm().
Added audio_bytes_per_sample() function.

Change-Id: If588af6c08f09796ab04bccbbd6e720f1e914412
2011-06-16 21:13:43 -07:00
Dima Zavin
28e08dc581 core: move audio_policy.h here from hardware
Change-Id: I6b8c04c975e01f2502d766ed2b9353d3c83193b3
Signed-off-by: Dima Zavin <dima@android.com>
2011-06-13 17:54:33 -07:00
Eric Laurent
3142a203b3 Merge "Config utils improvement" 2011-05-27 10:20:00 -07:00
Eric Laurent
38d14f7604 Merge "Added PCM formats to audio.h" 2011-05-27 10:19:43 -07:00
jeffhao
2b8f76cdbb Tracking merge of dalvik-dev to master
Reordered bootclasspath to allow verification of all framework methods.
  git cherry-pick --no-commit  ec164a0170955fe63106c2576a65bc4ffb1df425

Address CVE-2011-1090.
  git cherry-pick --no-commit  3365288d3c00072689cd9d733e055561cadc87b5

Change-Id: I6a89bc600ced06a0cb84ae1670cb7a6ea39de9c8
2011-05-27 00:50:44 -07:00
Ken Sumrall
e555f54965 Merge "Crypto changes for devices that don't write ext4 fs on wipe" 2011-05-26 20:01:19 -07:00
Ken Sumrall
b05b0b5d3b Crypto changes for devices that don't write ext4 fs on wipe
This adds a new function to libcutils, partition_wiped().
This is used to determine if a partition is wiped.

Change-Id: Ibb388976c6b5bd3923b62d8f79b2b97748abf6c1
2011-05-26 19:42:32 -07:00
Eric Laurent
c3cf1a8278 Config utils improvement
Added a function to free resources allocated by config node tree.

Change-Id: I2ee8ae642899ec4501fa6e490c5be7efaa2d738e
2011-05-26 13:57:03 -07:00
Eric Laurent
9714b27bb4 Added PCM formats to audio.h
Added formats for 32 bit PCM audio to allow direct use of
common audio formats defined in audio.h by audio effect
API defined in audio_effect.h

Change-Id: I5d58c2db8325ca625ab6d2b10cc0d422ba119ca5
2011-05-26 13:52:47 -07:00
Nick Kralevich
7956d759be Merge "rename uevent_checked_recv to uevent_kernel_multicast_recv" 2011-05-26 10:55:09 -07:00
tedbo
1ffdb38213 Fix broken comment on closing #endif in window.h
The closing #endif comment is missing the comment delimiters. This
change adds them and fixes a compile warning about extra tokens after
endif.

Change-Id: If8295aa6fbb2b21c2b56fe57a467dcde79c65de3
2011-05-24 00:55:33 -07:00
Jamie Gennis
da1a1f629b fix a comment typo in system/graphics.h
Change-Id: Ia6471a1c005cdc13833e6b0444e758add5a990e0
2011-05-18 14:42:46 -07:00
Dima Zavin
e8e4be57aa move core audio definitions under system/core
Change-Id: I58b7324edff834b3afa4d9c86452e66f8c29c63b
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-12 11:58:48 -07:00
Nick Kralevich
57de8b8f27 rename uevent_checked_recv to uevent_kernel_multicast_recv
Change-Id: I1839627490080efcbb7269699709064856312f8b
2011-05-11 14:58:24 -07:00
Iliyan Malchev
0ab886bdab move ANativeWindow and friends under system/core
This patch moves the definition of ANativeWindow from frameworks/base into
system/core.  We move ANativeWindow for two reasons.

Firstly, the native-window interface may need to be used by lower-level code
than the framework.  Such code (such as the camera HAL) is not allowed to use
definitions from frameworks/base, since the latter is stacked on top of the
former.  Thus moving (the interface definition) ANativeWindow under system/core
lowers the level at which we can work with windows.

Secondly, this enables an implementation of ANativeWindow that lies outside of
frameworks, enabling quick initial bringup of graphics.

Change-Id: I851b9bb2834bcec73255b5af82f66411e54bb1a5
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-02 19:19:54 -07:00
Iliyan Malchev
66ea3574b6 move non-HAL definitions to syste/core/include
This patch moves camera- and graphics-related definitions out of the hardware
HAL layer and into system/core.  These definitions are used both by the HAL and
by higher-level code as well.  More functionality (e.g., audio definitions)
will be moved here as well.

Change-Id: I225f12374ce54fa393640dce53738267d0d703e9
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-02 19:18:46 -07:00
Iliyan Malchev
3ffd793a1d native_handle.h: fix declaration
Change-Id: I452a517ee6982995318802eb4bbb23bd79401c4d
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-02 17:27:37 -07:00
Dima Zavin
0e02fcab11 Merge "libcutils: add a simple string parameter parsing ("a=b;c=d;") helper utils" 2011-04-27 17:07:12 -07:00
Nick Kralevich
4682abaaa6 am b0d0e260: resolved conflicts for merge of 2baeb898 to honeycomb-plus-aosp
* commit 'b0d0e260bd6118959fa0e2d3c84037b3e0178551':
  Fold uevent message origin checking from init into libcutils.
2011-04-27 13:49:59 -07:00
Nick Kralevich
b0d0e260bd resolved conflicts for merge of 2baeb898 to honeycomb-plus-aosp
Change-Id: Ib3169b3a36aa13ef413da624355b1737e9b76fd9
2011-04-27 13:09:24 -07:00
Nick Kralevich
2baeb89882 am a2842b68: Merge "Fold uevent message origin checking from init into libcutils."
* commit 'a2842b68548c8cdfbf6b3c14480ab04bab9010ea':
  Fold uevent message origin checking from init into libcutils.
2011-04-27 12:31:55 -07:00
Vernon Tang
3f582e92f0 Fold uevent message origin checking from init into libcutils.
Change-Id: I7cbc0cb840d1b4962e6c360fdad9a9c0ce20e87b
2011-04-28 05:16:21 +10:00
Nick Kralevich
bb738d6727 am de35f274: am 03752be0: am 0c297f5e: Merge "Revert "Fold uevent message origin checking from init into libcutils.""
* commit 'de35f2741c4e32e331a92be99f7c04b92b94beb2':
  Revert "Fold uevent message origin checking from init into libcutils."
2011-04-27 10:37:48 -07:00
Nick Kralevich
de35f2741c am 03752be0: am 0c297f5e: Merge "Revert "Fold uevent message origin checking from init into libcutils.""
* commit '03752be0a437d12e19ac73ebe23385fe6f756e2c':
  Revert "Fold uevent message origin checking from init into libcutils."
2011-04-27 10:35:06 -07:00
Nick Kralevich
03752be0a4 am 0c297f5e: Merge "Revert "Fold uevent message origin checking from init into libcutils.""
* commit '0c297f5ebb5ae7af2854f7c07d97bcdd13c159fc':
  Revert "Fold uevent message origin checking from init into libcutils."
2011-04-27 10:32:00 -07:00
Nick Kralevich
de9e65dd65 Revert "Fold uevent message origin checking from init into libcutils."
This reverts commit 8405ec0e75.

The original change does not compile.
2011-04-27 10:21:24 -07:00
Nick Kralevich
3268eda4dc am e3ab4245: am a7cf7ed9: am 282c2ab4: Merge "Fold uevent message origin checking from init into libcutils."
* commit 'e3ab42457077ec2a66bac553e59a7fee08d4fa9e':
  Fold uevent message origin checking from init into libcutils.
2011-04-27 10:00:34 -07:00
Nick Kralevich
e3ab424570 am a7cf7ed9: am 282c2ab4: Merge "Fold uevent message origin checking from init into libcutils."
* commit 'a7cf7ed93486240ca48a407e67c7c3683a3b93aa':
  Fold uevent message origin checking from init into libcutils.
2011-04-27 09:59:14 -07:00
Nick Kralevich
a7cf7ed934 am 282c2ab4: Merge "Fold uevent message origin checking from init into libcutils."
* commit '282c2ab408d487d0995362d1b9aa97fe30d97ebd':
  Fold uevent message origin checking from init into libcutils.
2011-04-27 09:55:20 -07:00
Vernon Tang
8405ec0e75 Fold uevent message origin checking from init into libcutils.
Change-Id: I1a38e611a7ad990f74306ce453740a1eeed2416d
2011-04-27 14:17:15 +10:00
Dima Zavin
0fad7d023f libcutils: add a simple string parameter parsing ("a=b;c=d;") helper utils
Change-Id: Ifabeb75550fa6e351434e6e6d036b19331daf6c1
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-20 19:04:40 -07:00
Carl Shapiro
b60d9ce1fc Make atomic-inline.h usable from ordinary C++ code.
Change-Id: I18dcba9cb3adc22f26403e94df4b2684f51090ed
2011-04-11 20:00:42 -07:00
Brian Carlstrom
6541ef1562 Add keychain user
Change-Id: Id6738d7c97dd58b2043e2cba018797e3b2b4d77a
2011-04-08 14:06:16 -07:00
Jeff Hamilton
18247d74be am ee3420bc: resolved conflicts for merge of 65475f89 to honeycomb-plus-aosp
* commit 'ee3420bc124613827af474684c3015d12742c70d':
  Make the NFC UID forward compatible.
2011-04-05 10:42:19 -07:00
Jeff Hamilton
ee3420bc12 resolved conflicts for merge of 65475f89 to honeycomb-plus-aosp
Change-Id: I9f77e84d887dbe84bb94de0fdd369d8de24fbec3
2011-04-05 12:32:50 -05:00
Jeff Hamilton
65475f89e1 am 336bc321: Make the NFC UID forward compatible.
* commit '336bc321a6e978a273098148e13a82c5e7ec3be5':
  Make the NFC UID forward compatible.
2011-04-04 14:42:38 -07:00
Jeff Hamilton
336bc321a6 Make the NFC UID forward compatible.
Change-Id: Icfa302c22151b3d722ad0da7e58806f74730e1a3
2011-04-01 13:43:01 -05:00
Alexandre Elias
412514ea60 Add ifndef guards to remaining logging macros.
Change-Id: I5fce9bffdb9e52d50059034fd1cc05ba7f0e3b87
2011-03-29 16:24:45 -07:00
Brad Fitzpatrick
4fecade5f2 am cb1e616e: am 7c556549: Merge changes Icdefb5ff,Icd7f5f03
* commit 'cb1e616e3c108a9c8b159bb95c3356acf5797ba2':
  Fix potential race introduced in Icd7f5f03
  SocketClient: add optional reference counting
2011-03-29 08:45:04 -07:00
Jeff Hamilton
be61f39a6b am a6a36c0b: Update the value for the NFC shared UID.
* commit 'a6a36c0b799b84d06b695027d205f21d13a3275b':
  Update the value for the NFC shared UID.
2011-03-24 20:23:35 -07:00
Jeff Hamilton
a6a36c0b79 Update the value for the NFC shared UID.
Change-Id: I47edf39dbdf2ebd41f44ca69aac250d8991dec4c
2011-03-24 21:40:43 -05:00
Brad Fitzpatrick
3549b0dc28 Fix potential race introduced in Icd7f5f03
Digit wrote:

"You probably don't want to close the socket here without updating
c->socket as well. Otherwise, another thread holding a handle to the
client after the c->decRef() could end up sending a message to a
different socket, if the file descriptor index is reused by another
client in the meantime."

Change-Id: Icdefb5ffc0c7607325d7db761e1f04e5d868bfb7
2011-03-22 14:03:11 -07:00
Brad Fitzpatrick
13aa8ad445 SocketClient: add optional reference counting
Needed to fix a race in netd.

Bug: 3438459
Change-Id: Icd7f5f035510235f733a25c0621479d3e644b152
2011-03-22 14:03:08 -07:00
David 'Digit' Turner
100c0e2dab libsysutils: Fix race condition in SocketListener thread.
+ Handle EINTR in accept(), write() and select()
+ Fix a memory leak when deleting the mClients list
+ Fix typo in SocketListener.h

Change-Id: Ie68bb3e2dbefe0dfdaa22a5cd06a42dbc4c0f8aa
2011-03-22 14:02:51 -07:00
Brad Fitzpatrick
4be4e69f01 Fix potential race introduced in Icd7f5f03
Digit wrote:

"You probably don't want to close the socket here without updating
c->socket as well. Otherwise, another thread holding a handle to the
client after the c->decRef() could end up sending a message to a
different socket, if the file descriptor index is reused by another
client in the meantime."

Change-Id: Icdefb5ffc0c7607325d7db761e1f04e5d868bfb7
2011-03-17 17:14:46 -07:00