Commit Graph

3354 Commits

Author SHA1 Message Date
Arve Hjønnevåg 1670f831a5 init.rc: Fix permissions on /sys/power/state and /sys/power/wakeup_count
Change-Id: I06a1a2affebdf64f008eaa61a0851f1e832059c5
2012-03-20 20:34:24 -07:00
Benoit Goby 3236b7a4d3 Merge "adb: Remove unused flags" 2012-03-20 16:11:42 -07:00
Kenny Root 77a62ceac5 MinGW does not have sys/cdefs.h
Change-Id: I5cafafce8488d355ed3865a9fd1173fbebbc5b03
2012-03-20 13:46:30 -07:00
Colin Cross e888674074 Merge "init: manually set controlling tty for console services" 2012-03-19 23:56:00 -07:00
Kenny Root 418fbe66e0 Merge "Add cdefs decoration to list.h" 2012-03-19 17:42:15 -07:00
Jeff Brown 5e0621f78a qsort_t was only defined in glibc 2.8
Change-Id: I646bac8ed4d94bf75a33b886e700c91c3837bc32
2012-03-19 15:39:08 -07:00
Jeff Brown 4a6b384f60 Provide portable wrapper for qsort_r.
qsort_r() is declared differently on BSD and GNU libc and
may be absent on other platforms.

Provide qsort_r_compat() which should work everywhere.

Change-Id: I17a9026573b1ed971ff7d79895e7eb41ba108807
2012-03-19 14:07:26 -07:00
Jeff Brown 14d0c6c7c0 Add missing includes.
Caused warnings about implicitly defined malloc() and sprintf().

Change-Id: Ia56309adc11caf5801ffd88e374c512b785cfd93
2012-03-19 14:06:50 -07:00
Dima Zavin c4edb9ec90 Merge "cutils: str_parms: when deleting entry, need to also remove key" 2012-03-19 09:56:14 -07:00
Glenn Kasten b1108c8594 Merge "audio_channel_in/out_mask_from_count" 2012-03-19 07:31:50 -07:00
Colin Cross 50fb5a6933 init: manually set controlling tty for console services
Normally, calling open on a tty will set that tty as the process
group controlling tty if none already exists.  However, if the tty
is /dev/console, the kernel will never automatically set it as the
controlling tty.  Call the TIOCSCTTY manually on the fd, which will
always attempt to set it as the controlling tty.

Fixes ctrl-c on the console shell when androidboot.console is not
passed on the kernel command line and the default /dev/console is
used.

Change-Id: I449cc41b47e93ac38ad6987413bb54131e1ec0cd
2012-03-18 15:39:59 -07:00
Benoit Goby 9f1af8cde9 adb: Remove unused flags
BUILD_ADBD is always true

ANDROID_GADGET is not used in the code anymore. adbd now checks at
runtime if /dev/android_adb is present

Change-Id: If6c3278606c79cc74d1ef5978e7b8e3a4513aef8
2012-03-16 15:29:34 -07:00
Kenny Root 0009b73ed8 Add cdefs decoration to list.h
In case someone includes this from C++ code.

Change-Id: I3b5a8bde5b5b9e8dcee64abaf33383f21eff7046
2012-03-15 21:45:07 -07:00
Glenn Kasten 0ad682cdde Merge "Add get_sched_policy_name() and use in ps and top" 2012-03-15 15:45:19 -07:00
Glenn Kasten 86c7cc8189 Add get_sched_policy_name() and use in ps and top
This will make it easier to add additional policies (cgroups) if needed.
Also added comments to the sched_policy APIs.

Change-Id: I33ce1cc4deae10983241f7391294b7a512d2c47c
2012-03-15 15:10:45 -07:00
Dima Zavin c4c631a15f Merge "cutils: str_parms: free the key if the value was replaced during create/add" 2012-03-15 13:24:17 -07:00
Jean-Michel Trivi 427d2b43c2 Fix switch indentation in audio_bytes_per_sample
Align "case" keyword with "switch" keyword.

Change-Id: I57ef96253fb1fc925315b557ea27ccc35f63c2f8
2012-03-15 10:18:42 -07:00
Wu-cheng Li 019524a60e Merge "Add camera ping command and release message." 2012-03-14 23:42:21 -07:00
Dima Zavin efd7501d53 cutils: str_parms: when deleting entry, need to also remove key
When removing one entry, we can't just remove it from the map since
key will not be freed. So, instead, search through the map for the key
and free it once it is found.

Change-Id: Id745c166a4acc5ea25f6d6cdbfe4f8fbc21cbbb3
Reported-by: Xin Qian <xqian@marvell.com>
Signed-off-by: Dima Zavin <dima@android.com>
2012-03-14 23:17:11 -07:00
Dima Zavin 86bfbe3cae cutils: str_parms: free the key if the value was replaced during create/add
Change-Id: I9f31da62f10f78ed11693a7c04e2be29b0790c93
Reported-by: Xin Qian <xqian@marvell.com>
Signed-off-by: Dima Zavin <dima@android.com>
2012-03-14 23:17:11 -07:00
Glenn Kasten 89f7ba3df8 audio_channel_in/out_mask_from_count
Change-Id: I879d188cf64ea1dbfa1a0574dee77119c2b08e26
2012-03-14 17:06:13 -07:00
Nick Kralevich 820571f4c3 Merge "init.rc: Add documentation" 2012-03-14 16:23:57 -07:00
Nick Kralevich f3ef1271f2 init.rc: Add documentation
Android developers should never place files in /data/local/tmp.
Files or directories in /data/local/tmp can be minipulated by the
shell user.

Android developers should never create world-writable files
or directories. This is a common source of security vulnerabilities.

Change-Id: I6d2cd620ab49d8ca3f39282f7d2ed682a9ba91c3
2012-03-14 15:36:47 -07:00
Wu-cheng Li 2923c0ba52 Add camera ping command and release message.
The problem is both face unlock and camera application try to open
the hardware camera at the same time. A new camera open API is
added to let face unlock take the camera away from the existing
client. The release message is used to notify the existing client,
so it has time to release the hardware camera and clean up.

If existing client tries to use the camera after it is released,
the method will return error. It is still possible that the
camera has been taken and the existing client has not got the
notification. When any method returns error, the existing client
can use ping command to check whether the camera has been released.
If yes, the client can silently finish the app itself or show a
toast if it wants.

bug:5584464

Change-Id: I87f9f7db2f7b2b70ab2405f9b3da0d8946d6a01b
2012-03-14 10:35:53 +08:00
Andrew Hsieh 9d4dbf4835 Merge "Added rules to build 64-bit libraries: lib64cutils.a and lib64log.a" 2012-03-13 16:28:08 -07:00
Dianne Hackborn 1a87808b30 Merge "Forget name for AID_SDCARD_R." 2012-03-12 15:22:44 -07:00
Dima Zavin eccfb08f38 Revert "cutils: str_parms: make test executable build for host instead"
This reverts commit 7d31e6e533.
2012-03-12 15:06:05 -07:00
Dima Zavin cf7d2849cb Merge "cutils: str_parms: make test executable build for host instead" 2012-03-12 13:47:42 -07:00
Dima Zavin 21750e7941 Merge "cutils: str_parms: test str_parms_add_str too" 2012-03-12 13:47:34 -07:00
Dima Zavin 4736a1bb83 Merge "cutils: str_parms: need to also dup the key when adding to hash" 2012-03-12 13:47:23 -07:00
Dianne Hackborn 5d3aadbeca Forget name for AID_SDCARD_R.
Change-Id: Ib65fdf4211bef77057009e31295e610f8ba64b44
2012-03-12 11:15:38 -07:00
Dima Zavin 7d31e6e533 cutils: str_parms: make test executable build for host instead
Change-Id: I711e03aaf859107c697c6dcb82e0ab83e94570ba
Signed-off-by: Dima Zavin <dima@android.com>
2012-03-12 11:03:38 -07:00
Dima Zavin a603e40f9e cutils: str_parms: test str_parms_add_str too
Change-Id: I93f0e577aff6b8ff23a44e29f9942a26545b6dc8
Signed-off-by: Dima Zavin <dima@android.com>
2012-03-12 11:03:38 -07:00
Dima Zavin 70b93034f3 cutils: str_parms: need to also dup the key when adding to hash
Change-Id: Iabdd2061cbc36c6f4d4eb6e46bd757b5b52e0027
Signed-off-by: Dima Zavin <dima@android.com>
2012-03-12 11:03:38 -07:00
Selim Gurun 6ac770fc52 Do not generate SIGPIPE errors in SocketCLient.
This change is to make sure the users of library does not crash
if they are not handling SIGPIPE properly.

Change-Id: I4ea80d6bfc26a4bca6b901959ae3060b059d46d3
2012-03-12 10:20:42 -07:00
Robert Greenwalt 63d84d049a Merge "Fix pointer arith." 2012-03-09 15:12:34 -08:00
Robert Greenwalt 7599bfcf13 Fix pointer arith.
Sending 3digit code, null, binary-length and data.  Current code sends
3digit code, space, null, binary-length, binary-data.

The space should not be sent.

Change-Id: I1df00a3e70805b39b6105966c7f3c613461a6858
2012-03-09 11:55:51 -08:00
Dianne Hackborn 6ff1bee167 Merge "Add AID_SDCARD_R." 2012-03-08 18:31:20 -08:00
Andy McFadden fcb4553dbb Merge "Reduce suicidal tendencies" 2012-03-08 17:11:38 -08:00
Eric Laurent b015977acb Merge "audio policy: added flag for primary output" 2012-03-08 15:45:23 -08:00
Andy McFadden 424e07fcf6 Reduce suicidal tendencies
Some changes to debuggerd:

(1) Send a SIGSTOP to the target process before doing any of the
PTRACE_ATTACH work.  This causes the threads that weren't hit by
the signal to stop moving, which seems to get rid of the "ptrace
detach failed: No such process" problems that result in missed
stack traces and debuggerd self-immolation.

(2) SIGPIPE was in the list of "interesting" signals caught by
debugger_signal_handler(), but debuggerd didn't recognize it, and
you'd get "unexpected signal 13" complaints.  It's now in the list.

(3) Fixed a bit-rotted XLOG.

Change-Id: I33297ea6b09ce450671c07dc25846f684afbf480
2012-03-08 15:42:30 -08:00
Chia-chi Yeh d890925e24 am 0fc8abe1: am e2e8bd93: am 5ebced39: init.rc: update the permission of /data/local.
* commit '0fc8abe1f661e341ea3c7112d5311f72482e2c16':
2012-03-08 14:33:20 -08:00
Chia-chi Yeh 89c5926f08 am 0b32a75b: am c8d1a0e1: am 5ebced39: init.rc: update the permission of /data/local.
* commit '0b32a75b7c7f25bd9ab325f44626c402fd9b9b23':
  init.rc: update the permission of /data/local.
2012-03-08 14:31:23 -08:00
Dianne Hackborn 50458cf76e Add AID_SDCARD_R.
Change-Id: I47f650e415e06c0b69790ffefea7f208c910ebd7
2012-03-08 14:30:32 -08:00
Chia-chi Yeh 0fc8abe1f6 am e2e8bd93: am 5ebced39: init.rc: update the permission of /data/local.
* commit 'e2e8bd93becae10f1cc40bb28a581cb4a36d0154':
2012-03-08 14:30:22 -08:00
Chia-chi Yeh 0b32a75b7c am c8d1a0e1: am 5ebced39: init.rc: update the permission of /data/local.
* commit 'c8d1a0e18e008009fe75aa2cc7d3deace0479fce':
  init.rc: update the permission of /data/local.
2012-03-08 14:29:14 -08:00
Chia-chi Yeh c8d1a0e18e am 5ebced39: init.rc: update the permission of /data/local.
* commit '5ebced39093d1223566166b8cc6abfe6729c487d':
  init.rc: update the permission of /data/local.
2012-03-08 14:27:08 -08:00
Chia-chi Yeh e2e8bd93be am 5ebced39: init.rc: update the permission of /data/local.
* commit '5ebced39093d1223566166b8cc6abfe6729c487d':
  init.rc: update the permission of /data/local.
2012-03-08 14:26:42 -08:00
Eric Laurent 11fd2beea0 audio policy: added flag for primary output
Added a flag for output stream attributes indicating a primary
audio output stream.
The primary audio output stream is unique on a platform and receives all volume,
routing and parameters related to telephony use case.

Change-Id: Ic50b3c02cc60805031f26b819da6cf9ad65ad11c
2012-03-08 13:18:20 -08:00
Selim Gurun 7bf4c45f84 Add a utility function to send a code + binary msg
Add a utility function to SocketClient to send a c-string code
prepended to a binary message. This is necessary to be able to
send a binary message while keeping compatible with underlying
text-based protocol.

Change-Id: Ifc6562003a687577d7deb50260533a5147ae4f97
2012-03-07 16:19:52 -08:00