Commit graph

407 commits

Author SHA1 Message Date
Jeff Brown
e66293900b Set HAVE_LOCALTIME_R to 1 when defined.
SQLite 3.7.10 tests the value of the HAVE_LOCALTIME_R macro
if it is defined, so we set it to 1.

Change-Id: I8c34ec362813018f86aea57d1b36b7639d0dd96d
2012-01-19 16:31:57 -08:00
David 'Digit' Turner
7913bc05be libcutils: Use proper private header to access C library's <time.h> extension
The strftime_tz() function is not a standard C library function and should not
appear in <time.h>. Instead, it is being moved to <bionic_time.h>, a private
header only available to platform libraries.

Change-Id: I4dc18939b9380725dfaa20c9e417296363bc52f4
2012-01-13 13:38:40 +01:00
Steve Block
ceabb17306 Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE
Bug: 5449033
Change-Id: I991dc84c366d8f33e5439894c23df561bbc50b83
2012-01-10 21:13:57 +00:00
Steve Block
8f2e8b0a45 am a9b84a7e: Add ALOG version of LOG_ASSERT
* commit 'a9b84a7e0b3ecb389a62bc6abb8c2fea3a4a30a6':
  Add ALOG version of LOG_ASSERT
2012-01-10 11:32:17 -08:00
Steve Block
a9b84a7e0b Add ALOG version of LOG_ASSERT
This is now required by some projects.

Change-Id: If4015c6a9f2391b205d2886bcf7f6e51f371ce08
2012-01-09 22:50:36 +00:00
Steve Block
01dda204cd Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: Ibcffdcf620ebae1c389446ce8e9d908f11ac039c
2012-01-08 11:03:26 +00:00
Steve Block
ae8b56c0d1 Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: I1e070511b6a538e9f1c94657356437a457d58882
2012-01-05 22:25:38 +00:00
Steve Block
fe71a61e5b Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: I4951baa981f09a84ce483e3d1bd0f9ebe009035f
2012-01-04 19:23:34 +00:00
Steve Block
8d66c49258 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: I9244d927f14c750cd359ebffb1fc1c355a755d5a
2012-01-03 22:32:30 +00:00
Steve Block
e7e7fac974 Add ALOG versions of LOGD, LOGI, LOGW and LOGE
These are now required by some projects.

Change-Id: I0d51c950178504474d803620a6cd1c9f084804b5
2011-12-29 11:58:24 +00:00
Jesse Hall
e565492c6c am 3bc5e452: am 7cd3e0a3: Document ANativeWindow\'s buffer refcounting
* commit '3bc5e452808514c48cdb5d2c3ca14c022aeecf6f':
  Document ANativeWindow's buffer refcounting
2011-12-13 12:25:10 -08:00
Jesse Hall
3bc5e45280 am 7cd3e0a3: Document ANativeWindow\'s buffer refcounting
* commit '7cd3e0a3a2f9b104cd6c04f699ae62c4577787e2':
  Document ANativeWindow's buffer refcounting
2011-12-13 12:23:14 -08:00
Jesse Hall
7cd3e0a3a2 Document ANativeWindow's buffer refcounting
Change-Id: I5454e90afd1a1b7d4a75c503f8dca712dba33790
2011-12-12 16:54:14 -08:00
Wu-cheng Li
601b5f416e Merge "Add camera focus move message." 2011-11-29 16:54:18 -08:00
Wu-cheng Li
3dc54060c1 Add camera focus move message.
bug:5534973
Change-Id: I45213b1a4db3dbcfc0ab124689f27a88335fb26b
2011-11-29 14:28:54 +08:00
Jeff Brown
b75a9a833b Merge "Improve backtrace formatting." 2011-11-22 12:57:15 -08:00
Jeff Brown
19b39f371b Improve backtrace formatting.
Show the symbol offset, when available.

Centralized formatting of native stack traces in libcorkscrew.
It's handy for automated tools if all stacks look the same.
Since we already made them all look them same, we might as well
do the formatting in just one place.

Do not strip the Thumb bit on ARM.  This fixes an off-by-one
issue that could happen when resolving a PC that was at the
very beginning of a Thumb function, since the symbol table would
have the Thumb bit set but since we stripped the bit from our
PC, we would be looking for an address one byte before the
one listed in the symbol table.  It's also quite useful to see
whether a given function is executing in Thumb mode just by glancing
at the PC.

Change-Id: Icaa29add85ce0bcafe24d5ce2098e138d809e2ab
2011-11-22 12:13:46 -08:00
Nick Pelly
3544e33247 am 3d547e0d: am f9c1fcc5: Merge "Replace vendor specific NfcGoogle.apk with generic Nfc.apk" into ics-mr1
* commit '3d547e0dda7ad58108a219c7ef20bab426d5ea38':
  Replace vendor specific NfcGoogle.apk with generic Nfc.apk
2011-11-21 21:08:24 -08:00
Nick Pelly
3d547e0dda am f9c1fcc5: Merge "Replace vendor specific NfcGoogle.apk with generic Nfc.apk" into ics-mr1
* commit 'f9c1fcc505d59fd87392e6af7341b1737f186081':
  Replace vendor specific NfcGoogle.apk with generic Nfc.apk
2011-11-21 16:05:27 -08:00
Nick Pelly
097b4ed410 Replace vendor specific NfcGoogle.apk with generic Nfc.apk
The access control changes allow us to just use Nfc.apk with
the regular platform certificate, instead of the custom signed
NfcGoogle.apk. So we can compeltely get rid of vendor/google/apps/NfcGoogle
and just build it out of packages/apps/Nfc now.

The package name is also reverted from com.android.nfc3 to com.android.nfc

The NFC uid needs to get bumped (25 to 27) to allow the cert change.

Bug: 5608249
Change-Id: I5e178b469e5210cd231ba5f4ea57aa666b3d8893
2011-11-21 14:55:59 -08:00
Jean-Baptiste Queru
17aad1469a Revert "Fix build"
This reverts commit 25a89e771a.
2011-11-15 13:59:05 -08:00
Steve Block
98520ab9a6 am 67b11cba: am 25a89e77: Fix build
* commit '67b11cba5bccd0cdc3ce6117a19c5f036f95d35f':
  Fix build
2011-11-15 13:07:22 -08:00
Steve Block
67b11cba5b am 25a89e77: Fix build
* commit '25a89e771aae292193244852166564e83e36232b':
  Fix build
2011-11-15 11:10:09 -08:00
Steve Block
25a89e771a Fix build
Change-Id: Icbe57024e6018600d47a68132f53f15d7602dc92
2011-11-15 10:58:49 -08:00
Jeff Brown
f0c5872637 Improve stack unwinder robustness.
Keep track of whether memory maps are readable.  Use the information
in try_get_word to try to avoid accidentally dereferencing an invalid
pointer within the current process.  (Note that I haven't ever
seen that happen during normal unwinding, but it pays to be
a little more careful.)

Refactored try_get_word a little to make it easier to pass it the
needed state for validation checks by way of a little memory_t struct.

Improved how the memory map for the current process is cached.  This is
important because we need up to date information about readable maps.
Use a 5 second cache expiration.

Improved the PC -> LR fallback logic in the unwinder so we can
eke out an extra frame sometimes.

Fixed a bug reading ELF program headers.  The phnum & phentsize
fields are half-words.  We were incorrectly interpreting
phnum as a whole word.

Used android_atomic_* operations carefully in the unwinder
to prevent possible memory races between the dumper and the dumpee.
This was highly unlikely (or even impossible due to the presence
of other barriers along the way) but the code is clearer now about
its invariants.

Fixed a bug in debuggerd where the pid was being passed to have
its stack dump taken instead of the tid, resulting in short
stacks because ptrace couldn't read the data if pid != tid.
Did a full sweep to ensure that we use pid / tid correctly everywhere.

Ported old code from debuggerd to rewind the program counter back
one instruction so that it points to the branch instruction itself
instead of the return address.

Change-Id: Icc4eb08320052975a4ae7f0f5f0ac9308a2d33d7
2011-11-04 01:11:04 -07:00
Jean-Baptiste Queru
1941c91389 am 4ef824e9: am 71619f13: am 604f52e3: Reconcile with AOSP master
* commit '4ef824e9481625270aa065cc4d0625e8c8d9e0df':
2011-10-28 15:43:04 +00:00
Steve Block
4ddc88e73e am 16210c12: am 31a02dba: Fix build
* commit '16210c12bc0a8dab5523289de1e51b6fe8d38053':
  Fix build
2011-10-28 15:38:18 +00:00
Steve Block
16210c12bc am 31a02dba: Fix build
* commit '31a02dba709166df30b7c3352222c550146d7c81':
  Fix build
2011-10-28 15:36:45 +00:00
Steve Block
31a02dba70 Fix build
Change-Id: Icbe57024e6018600d47a68132f53f15d7602dc92
2011-10-28 15:38:20 +01:00
Steve Block
69f4cd7f5a Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: Ib453f869977a6e909095a578bbf0420851f887d2
2011-10-26 09:59:23 +01:00
Steve Block
5fb44952f6 Rename (IF_)LOG() to (IF_)ALOG() DO NOT MERGE
Bug: 5449033
Change-Id: Id318736a9caa58c6da2683f8663699ce998e79d8
2011-10-25 16:28:35 +01:00
Jeff Brown
501edd29b8 Add a new library for collecting stack traces.
Supports collecting the stack trace of the current thread,
another thread in the same process, or a thread in a
different process (using ptrace).

Change-Id: Ica2594e4436edde4ceb7bcc3d78e6c31a7902cbf
2011-10-22 16:42:59 -07:00
Wu-cheng Li
5babfad445 am baad2843: Update camera documentation about face detection.
* commit 'baad2843a1af443aa251be510c4476159d064d20':
  Update camera documentation about face detection.
2011-10-12 21:14:15 -07:00
Wu-cheng Li
baad2843a1 Update camera documentation about face detection.
bug:5169599
Change-Id: I5280137cee5401fadec36cae732ecb78a2d44dc3
2011-10-13 12:07:05 +08:00
Romain Guy
6bcd4d3e73 Add ANDROID_API macro to export symbols
Change-Id: I55294713c8dd1ac32d6013d084f1bb502fc3572f
2011-10-12 13:45:59 -07:00
Wu-cheng Li
8d43cb6edb Allow CAMERA_CMD_SET_DISPLAY_ORIENTATION to change during preview.
bug:5422679
Change-Id: Ia4a09328bd9e1d36af680be4d065bc08cf0dec0f
2011-10-07 17:19:18 +08:00
Jeffrey Tinker
134959a621 Merge "Create drmrpc group for security services" 2011-10-04 10:53:47 -07:00
Jeffrey Tinker
7005c03754 Create drmrpc group for security services
Bug 4598045

Change-Id: I5550203927146fd6864408b3ac2f5e6f5d2b1d77
2011-09-30 12:40:25 -07:00
David Turner
9892aa5d04 Merge "Fix SocketListener socket leak issue." 2011-09-29 18:44:18 -07:00
Lorenzo Colitti
15c8c3ebf0 Merge "Support adding, deleting, and clearing IPv6 addrs." 2011-09-29 09:04:23 -07:00
Xianzhu Wang
4520246d35 Fix SocketListener socket leak issue.
The problem was: if a socket is shared between SocketListener and another
thread, only if the last reference is removed by SocketListener can the socket
be closed, otherwise the socket will leak. This sometimes happens in netd's
dnsproxyd.

This change let the SocketClient own the socket and close the socket when
the SocketClient is destructed.

Change-Id: I2865fbfe9ee4d8b3e43d7e02919dbb2d261f70de
2011-09-29 13:42:32 +08:00
Lorenzo Colitti
47ddb515b7 Support adding, deleting, and clearing IPv6 addrs.
- Provide a function to add and delete IPv4/IPv6 addresses
  using netlink.
- Provide a function that clears all IP addresses on an
  interface that can be used by netd.

Also, a couple of cleanups:

- Update the header file to match reality, and include the
  header file in the implementation. Also fix a caller that
  has an incorrect method signature.
- Fix whitespace in Android.mk.

Change-Id: Ifba9d60cdfffb0b7e5c3b9c6ab328f5f77d259c4
2011-09-28 17:12:13 -07:00
Mathias Agopian
918638c775 enable HAVE_DLADDR, since... we have it
Change-Id: I02baa1f7d3383e93a43fa04de1d39f7398e971bc
2011-09-28 12:17:00 -07:00
JP Abgrall
243123fb41 libcutils: qtaguid: Support new functions, add tag resource tracking.
* Add support for
  deleteTagData(tag, uid)
  setCounterSet(counterSetNum, uid)
  setPacifier(on)

* Add resource tracking
(If only kernel process termination had a hook)
Because the xt_qtaguid netfilter module needs to keep track of
tagged sockets, it needs a way to know when the process owning
the socket has died.
Normally the app will untag the sockets. But not on crash.
So the process opens the qtaguid misc dev, which is closed on crash,
at which point the xt_qtaguid can force-untag the processes sockets,
and thus allowing their refcount to go down and release them.

* Add pacifier support
 Add function to enable/disable pacification of the xt_qtaguid
 kernel module. (mostly for debugging)

Change-Id: I7f2228e65208046dd37ec1c7407ee307d5ba9b99
2011-09-14 15:00:40 -07:00
Dima Zavin
f48b23688c core: Add a standalone charger UI binary
This can be launched from an 'on charger' section in init, which
is processed if androidboot.mode=charger is supplied on kernel
command line.

This is a standalone binary that has a simple "user interface"
and allows the standard production kernel to run while charging.
This removes the burden from the bootloader to get low-power mode
working.

Currently, the device will "power-on" (i.e. reboot) into normal
mode if the power key is pressed for X seconds, and will also
power down the device if the usb/ac cable is removed for Y seconds.

Change-Id: I780594b99211cb09de7f8519a69c5962eb91348a
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-04 15:41:36 -07:00
Dima Zavin
da04c52ab1 init/cutils: move list utility code to cutils from init
Change-Id: I357ceee813700297d8343159f22a07659e768d41
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-02 12:11:18 -07:00
Dima Zavin
8f91282ebe init/cutils: move kernel logging interface to libcutils from init
Change-Id: Ia0f91b1fcd6cae69d76bf3dd841340958db938a8
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-02 12:11:17 -07:00
Dima Zavin
2d55e02d0f libcutils/init: move uevent socket opening code to libcutils
Change-Id: I90adf78c0eb6185505f2bf7b62e96e25ab918345
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-02 12:11:17 -07:00
Mathias Agopian
c9b06951e0 another attempt at fixing the SDK build.
Change-Id: I2b96cf7d046b694b232f0699257e4e0608fda660
2011-08-11 22:35:31 -07:00
Mathias Agopian
7934d18aa6 really fix the SDK build and fix THE build
Change-Id: I994cccf01bcafedc9ea11648eafc20300c58878b
2011-08-11 19:26:39 -07:00