these hooks are replaced by api_connect/api_disconnect
which serve exactly the same purpose than before.
the old hooks are deprecated because they won't be called
from the gl driver anymore, but instead will be called
by our EGL wrapper. to maintain binary compatibility
it was necessary to introduce these new hooks.
Change-Id: I11756a5d99e3ea3d6fb61b943f82037932dfa56a
The native channel mask values are equal to the Java values, which
differ from other standards simply for legacy reasons. It is
preferrable to use commonly used values, and translate from the
Java constants to the common values when specifying a Java mask.
The new definitions uses the same values and ordering as in
OpenSL ES and other standards.
Change-Id: I879f64b281714c60684cd8b36fe6ae648a555121
Add definitions for the side and elevated channels.
Ccorrect definition of 7.1 mask which uses
the side channels rather than the front half-pan channels.
Change-Id: I5b6f601f6404d782dc46ef47efac9cc8441fef90
Also cleanup the header a bit. Give fixed values to enum
because these can never change. And try to make all
comments C (as opposed to C++)
Change-Id: Ie0914ccd81a0231f32e8c21a8ff730985c5c3607
This change adds three new possible values for the 'api' argument to
native_window_connect: CPU, MEDIA and CAMERA.
Change-Id: I9305a5c0c87ab06a2c2bd7c585f54c7c7470408a
Bug: 5020877
The reset_mask allows either IPv4 and or IPv6 connections
of an interface to be reset.
Bug: 4981919
Change-Id: Id2d9ab90e30091d3d0764c66d4b01b73c0edbfcc
This change adds two new 'perform' setters to set the dimensions and
pixel format of the buffers that will be dequeued from the
ANativeWindow. These new setters provide the same functionality as
_SET_BUFFERS_GEOMETRY, but allow the format and dimensions to be set
independently. The _SET_BUFFERS_GEOMETRY setter is still supported to
maintain backwards compatibility.
Change-Id: Ib49b7798ffebe61eff2c8e4202fc3048cfec7bdd
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>
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>
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>
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
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
This adds a new function to libcutils, partition_wiped().
This is used to determine if a partition is wiped.
Change-Id: Ibb388976c6b5bd3923b62d8f79b2b97748abf6c1
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
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
Just pass them through to their specific GCC builtins. If we find
that the builtins are not performing well or have other issues, we can
pull in existing public implementations and/or write arch-specific
helpers if necessary.
Change-Id: I278e6b73d75fac88808ed4546070d288c06f79e0
Signed-off-by: Dima Zavin <dima@android.com>
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>
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>
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
+ Handle EINTR in accept(), write() and select()
+ Fix a memory leak when deleting the mClients list
+ Fix typo in SocketListener.h
Change-Id: Ie68bb3e2dbefe0dfdaa22a5cd06a42dbc4c0f8aa
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
Ext4 filesystems like to be unmounted before rebooting. The Android system
doesn't have a traditional Linux init setup, and shutting down the system
was not much more than calling sync(2) and reboot(2). This adds a new
function to libcutils called android_reboot(). By default, it calls sync()
and then remounts all writable filesystems as read-only and marks them clean.
There is a flag parameter in which the caller can ask for sync() not to be
called, or to not remount the filesystems as read-only. Then it will call
reboot(2) as directed by the other parameters. This change also updates
adb, init and toolbox to call the new android_reboot() function.
Fixes bugs 3350709 and 3495575.
Change-Id: I16d71ffce3134310d7a260f61ec6f4dd204124a7
Just pass them through to their specific GCC builtins. If we find
that the builtins are not performing well or have other issues, we can
pull in existing public implementations and/or write arch-specific
helpers if necessary.
Change-Id: I278e6b73d75fac88808ed4546070d288c06f79e0
Signed-off-by: Dima Zavin <dima@android.com>
All tools (aapt, aidl, dexdump, etc.) need this flag to open()
binary files, or they risk reading corrupted data on Windows.
A bunch of these tools just conditionaly define O_BINARY in
their C files. Seems it would just make sense to define it globally.
Change-Id: Ia5c0a59e9e77bbdcbce235233555f611207abed8
Also clean up and add timeout to control request transfer
Change-Id: Ibc2d8ac64d0fa90e0a23e6225ce2c49b23bb0d97
Signed-off-by: Mike Lockwood <lockwood@android.com>
Doesn't do IPv6, but removes v4-specific structures from the framework
(netmask, ints for addrs)
bug:2542681
Change-Id: I1110e6f32d42a472b104835a4298e18b391db0a7
This can be used to ask the kernel to disconnect its driver for a device
so usb_device_claim_interface() can claim it instead.
Also increased size of descriptor buffer and added some debugging logs
Change-Id: I4945196d957fb8493716eb9b7e5463c06b168ef1
Signed-off-by: Mike Lockwood <lockwood@android.com>
+ Handle EINTR in accept(), write() and select()
+ Fix a memory leak when deleting the mClients list
+ Fix typo in SocketListener.h
Change-Id: Ie68bb3e2dbefe0dfdaa22a5cd06a42dbc4c0f8aa
Since the "usb" group and ACCESS_USB permission will be used by regular apps
to access USB devices in host mode, we need a separate permission for the
device side MTP driver.
Change-Id: Ibb546b8726d61e041fc7c273f71929624ad1575b
Signed-off-by: Mike Lockwood <lockwood@android.com>
This is a dependency for the DNS proxy CLs.
This CL also adds a new socket for the netd process to inherit which
is owned by the inet group. (so only apps with the INTERNET
permission can use the DNS proxy...)
Change-Id: I8a51924e0ed56c6066f77e6f1b02d39bdadac51e
Add new usb_request struct to replace usb_endpoint, which is no longer needed.
Change-Id: Ia3637b3431a3597caced41bfec677ef0b044a453
Signed-off-by: Mike Lockwood <lockwood@android.com>
This allows converting from unique IDs to USB device names
Change-Id: I8e3b300790c01383aed8e3d4f547b54bcb7c2cd4
Signed-off-by: Mike Lockwood <lockwood@android.com>
We will use this for sharing USB file descriptors across address spaces via Binder
Change-Id: Iadbd3e0a4178f79d1d778fdfd5175f6fe0e2aaf5
Signed-off-by: Mike Lockwood <lockwood@android.com>
During testing of compilation, it was discovered that Cygwin actually
has off64_t.
Also the description was wrong for HAVE_OFF64_T
Change-Id: I6eb73d13da5a53fb03bf99ab7de82bfb6acab058
For platforms that have _FILE_OFFSET_BITS=32 and need to access large
files, we need some way to access 64-bit file APIs. This adds a hint to
allow programs to choose alternate APIs if possible.
Change-Id: Ifdc204df269350a22f52c0e4221e9d7d3b7a57fe
This is a dependency for the DNS proxy CLs.
This CL also adds a new socket for the netd process to inherit which
is owned by the inet group. (so only apps with the INTERNET
permission can use the DNS proxy...)
Change-Id: Ic3475c697913ba85805b4e49801b65e7a1d59289
Merge commit '7e65ede62065925e29b5b18f253758bb280f9383'
* commit '7e65ede62065925e29b5b18f253758bb280f9383':
Define HAVE_STAT_ST_MTIM and disable it under MinGW/Cygwin.
Merge commit '9cd8057b6e8f5fc1254a4ed19e8127b5091b5dce' into gingerbread-plus-aosp
* commit '9cd8057b6e8f5fc1254a4ed19e8127b5091b5dce':
Define HAVE_STAT_ST_MTIM and disable it under MinGW/Cygwin.
This is used by build\libs\host\CopyFile.c
Also define HAVE_PRINTF_ZD since printf %zd is not
supported on MinGW/Cygwin.
This is used by frmk/base/libs/utils/ZipFileRO.cpp
Change-Id: I570ac5dd0a5b256ee67ad62433f1226597da3ea4
ZipFileRO uses pread() to guarantee atomic reads at an offset, so use
the HAVE_PREAD flag to trigger off of. The only platform that doesn't
implement it directly is Windows.
Change-Id: Ic927611dc45b75ff8f672ed59afee5be1ad07ab4
ZipFileRO uses pread() to guarantee atomic reads at an offset, so use
the HAVE_PREAD flag to trigger off of. The only platform that doesn't
implement it directly is Windows.
Change-Id: I52d4e61010bb97e2d50af09943a2e94c0417bb5f
Merge commit 'df2f5a07aecac7be4ac2d1100668a0396fd256e7'
* commit 'df2f5a07aecac7be4ac2d1100668a0396fd256e7':
Qualify the source argument of atomic loads as a const pointer.
Merge commit 'd55f0adfb5ec4202ad5bd5d188e66c0f6a27b0aa' into gingerbread-plus-aosp
* commit 'd55f0adfb5ec4202ad5bd5d188e66c0f6a27b0aa':
Qualify the source argument of atomic loads as a const pointer.
I usually call this a "store/store barrier" for maximum clarity, but
the common way of describing it is "store barrier" or "store fence".
This doesn't use "dmb st" yet since we're waiting on the toolchain
update, but it gets the various macros and inline functions in place
so we can use them in the VM.
Bug 3003477
git cherry-pick 2ba5eec3972b4ce46feb677116534fcd3d136e0a
Change-Id: Ifd2d3588be96aa529d490789436cf48c962021ba
- look in /vendor/firmware/... in addition to /system/etc/firmware/... for firmware loading
- add /vendor/bin to path before /system/bin
- add /vendor/lib to ldpath before /system/lib
- configure appropriate permissions for /system/vendor/bin
- symlink /vendor -> /system/vendor
Change-Id: I0c06ca1e38a44f0c7024cee6cea8907aa93a4532
Merge commit '6fd75635d820754295557c300ccee89c643864cc' into gingerbread-plus-aosp
* commit '6fd75635d820754295557c300ccee89c643864cc':
Fetch peer credentials for local sockets
Fetch the PID, UID, and GID of the remote side of a local socket
connection in case any users of this library class want to check it.
Change-Id: Ia3230e6bc68ab6f93160df9f5996d2bf744b872c
Merge commit '556f09c426084b62c34742ee0810fc97ae37abf7'
* commit '556f09c426084b62c34742ee0810fc97ae37abf7':
It seems that Windows actually does have a header for <stdbool.h>.
Merge commit 'f74af26d1899fd85aa80dd65947dac89ef30a42c' into gingerbread-plus-aosp
* commit 'f74af26d1899fd85aa80dd65947dac89ef30a42c':
It seems that Windows actually does have a header for <stdbool.h>.
Merge commit '095a6a6ecb8039067c077db381bd02abc2496422'
* commit '095a6a6ecb8039067c077db381bd02abc2496422':
get rid of compile time warning: "warning: ‘android_ids’ defined but not used"
Merge commit '739cd9d2d4718913889a15d95c840506a2af04d1' into gingerbread-plus-aosp
* commit '739cd9d2d4718913889a15d95c840506a2af04d1':
get rid of compile time warning: "warning: ‘android_ids’ defined but not used"
Merge commit 'bdcf98ddbf2022ef894dfd7f9278e6f345e2c2df'
* commit 'bdcf98ddbf2022ef894dfd7f9278e6f345e2c2df':
Add API to add a route to IPv4/IPv6 host/gateway.
- adds ifc_set_hwaddr
- adds hwaddr command to netcfg
- code reuse: dhcp_configure calls ifc_configure; inet_ntoa is used for printing
- consistency: use net.XXX.dnsX properties in favor of dhcp.XXX.dnsX properties
(see related change to WifiStateTracker)
- updated system/core/nexus to use new headers, although not sure if
anybody still uses nexus
Change-Id: Idd70c0ac6e89b38e86816578c33eff805d30cac4
From the functionality, the function gglBitBlti() implemented bit-block
(image) transfer operation in which several bitmaps are combined into
one using a raster operator. Renaming to gglBitBlit() should be
explicit.
Change-Id: I23886623b5421131cf7c7bfb8ec67c3809566c93
Merge commit 'f2af88e81af5efb2d585963507f798d5a8b93d67' into gingerbread-plus-aosp
* commit 'f2af88e81af5efb2d585963507f798d5a8b93d67':
Tracking merge of dalvik-dev to gingerbread
Merge commit '1298bb79938cb1f4cf920433b86716bd4108de0f'
* commit '1298bb79938cb1f4cf920433b86716bd4108de0f':
Set the modes for rc.* files in /system/etc
Merge commit '96a2bb622d38f3c875997e4cacb423fa9ef4ea76' into gingerbread-plus-aosp
* commit '96a2bb622d38f3c875997e4cacb423fa9ef4ea76':
Set the modes for rc.* files in /system/etc
This can be used to eliminate race conditions in clients that operate immediately
on the currently connected device list.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Change-Id: I14954b9fcc84239950ead6bdc1a0a888882c2226
Invoking LOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF variadic macros
without the printf format string arg caused compilation errors because the
variable arg list (__VA_ARGS__) was eventually passed to
__android_log_assert() func in place of a required parameter. This error
only occured in debug builds because LOG_ASSERT() is a no-op in release
builds. This change allows debug builds to succeed.
Change-Id: I7e7b7de3e501133468ce083e0e0d6e699dd59667
Signed-off-by: Chris Pearson <christopherx.c.pearson@intel.com>
Merge commit '0796f618775b34e14ff624bcfca828d55183b4c5'
* commit '0796f618775b34e14ff624bcfca828d55183b4c5':
DBUS is not fully implemented. Disable it for now
Merge commit '635dc574e9009f38b34b2e84b6c1a2b5efd2ebc9'
* commit '635dc574e9009f38b34b2e84b6c1a2b5efd2ebc9':
Add a HAVE define for pthread_setname_np().
Merge commit '57dbb2cb3767c625cfc8d15406b2c4d6b53bb7c6' into gingerbread-plus-aosp
* commit '57dbb2cb3767c625cfc8d15406b2c4d6b53bb7c6':
Add a HAVE define for pthread_setname_np().
This is to allow using a thread that is capable of calling through JNI to Java code
to report USB device attached/removed events.
Change-Id: Ia58592607a2c1f4357b31072044f5db5617d7f5b
Signed-off-by: Mike Lockwood <lockwood@android.com>
Due to conflicts with recent WebKit, we need to call it
HAVE_ANDROID_PTHREAD_SETNAME_NP.
https://review.source.android.com/#change,15227 has the original
change, which was reverted after the conflict was found.
Change-Id: I7111960a16505558338756dba91eb50cadb582ff
Include <stddef.h> to get definition of size_t. Remove inclusion
of <stdint.h>, which doesn't seem to be needed.
Change-Id: Ib7ff231b5ec4b8c672084801fbb294a50cb7c3d7
Merge commit '2c4676de62cf8ca7e3759f7f709e29c623495f55'
* commit '2c4676de62cf8ca7e3759f7f709e29c623495f55':
Define inline atomic operations for x86 and ARM.
Merge commit '93b0cb40c18cae594c931677be2b9214420610b7' into gingerbread-plus-aosp
* commit '93b0cb40c18cae594c931677be2b9214420610b7':
Define inline atomic operations for x86 and ARM.
This change moves the ARM definitions into GCC extended inline
assembler. In addition, the same set of x86 definitions are now
shared among all x86 targets.
Change-Id: I6e5aa3a413d0af2acbe5d32994983d35a01fdcb3
Merge commit '67e6fcd19533f54ca37cbe72425f55a40a7f0333'
* commit '67e6fcd19533f54ca37cbe72425f55a40a7f0333':
added vendor ID for http://www.onthegovideo.com/
Fix build - cpu-features is ARM-specific
eliminate a compiler warning: signed/unsigned length
adb: optimize socket-list-walking code
adb: remove unneeded assignment of id to zero
adb: clean up 0 --> NULL for pointers
- creates proper ifc.h and dhcp.h headers for libnetutils
Adds support for UBFX to JIT and Disassembler