Revert "camera: change camera node permissions and add certain parameters."

  Cleanup cruft

Change-Id: Ie934ee627c6a513ca99f942b054a13d626f6d903
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
Revert "Increase CMD_ARGS_MAX in FrameworkListener"

This reverts commit d4f511e813c22e4d522688951db9c10feede99f9.

Change-Id: I9c6921a57b83dfff97cbdf1c9b690318e9279e53
Revert "init: Properly detect hardware revision"

This reverts commit 0c808df126a5225d4dbe477b928fcaf85a01c55c.

Change-Id: Ic7c34417e42843ce0d7ceb3ef5dc61dd35448a7a
Remove the adb usb vendor id whitelist.

If there are bad vendors, we should blacklist them. Whitelisting the entire
world is crazy.

Change-Id: I1f4c27fd34fc420e2a3b4b2c8749198030db69f1

Disable vendor id filtering for Linux.

It's time we switched to blacklisting any problematic devices rather than
slowly whitelisting the entire world. This seems to work for me, but let's
see how other people get on before coming back to actually remove the list.

We'll also need to find a Mac to test the equivalent Mac change.

Change-Id: I2bf583a27f9a3f98ef006ea62b906a4f89960507

Disable vendor id filtering for OS X.

Companion patch for change I2bf583a27f9a3f98ef006ea62b906a4f89960507.

Due to the use of USB class 0xff it's not possible to register a listener
which uses the OS methods for filtering notifications, so this patch
also introduces a check in the notification listener which checks the
class, subclass, and protocol for the interface each notification relates
to.

Change-Id: I380cc80f96addc5057660efb2179b35f9378886a
system: Support for offloading Java audio tracks

Offload Java audio tracks if the property is set.
This is used to avoid mixing in audioflinger and
to apply effects in DSP. Also update function to
calculate bytes per sample for offload format.

Change-Id: I0705e70a806a335e372e844de8a1210fbfe58cd7
logd: throttle SELinux denials to 20/sec

Impose a limit of 20 selinux denials per second. Denials beyond
that point don't add any value, and have the potential to cause
crashes or denial of service attacks.

Do some other misc cleanup while I'm here.

Bug: 18341932
Change-Id: I6125d629ae4d6ae131d2e53bfa41e1f50277d402
healthd: Reinitialize mChargerNames for every battery update

Booting up the device without the usb sets the usb power supply
type as UNKNOWN. Due to this mChargerNames gets incorrectly
initialized at bootup. The value of usb power supply type changes
at run-time. So it makes sense to update mChargerNames everytime
we have a battery related update.

Change-Id: I2ec9f9a420ca61814d43c316b418ce94de3691bc
audio: Add 24-bit offload format to audio_bytes_per_sample

Change-Id: I238f302beadf8ba7705ffcb70639fb32be4ff2c4
init: Make restorecon_recursive work for /data/

In the following commit:

    commit f2b7ee765516c84a9995e3acdc8fbcd7dc1b33cc
    Author: Stephen Smalley <sds@tycho.nsa.gov>
    Date:   Thu Feb 6 13:52:52 2014 -0500

    Apply restorecon_recursive to all of /data.

they removed all the adhoc restorecon_recursive of subdirectories
of /data/ and replaced it with:

    # Set SELinux security contexts on upgrade or policy update.
    restorecon_recursive /data

Unfortunately, that is a no-op because restorecon doesn't recurse
through /data/ unless you add a FORCE flag.

Since the expectation seems to be that the recursive restorecon
in init will actually work, update the built-in to add the force
flag and a flag to allow /data/data to also be recursed through.

[RC: Removed the DATADATA flag. It throws a ton of errors, and it's
supposed to be handled by seapp_contexts, not file_contexts. The actual
root paths, however, now get their individual restorecon calls so that
installd can deal with them]

Change-Id: I435c505188e924b27ef2e6a2e0ee0a6951e43f0e
Add sample audit.rules file.

To use:
adb push audit.rules /data/misc/audit
adb reboot

Change-Id: I3ffc7cccf59d31454f4fcdc6cabbc9a7894cc6ff
Add SIGHUP Handler to rotate log files

Sending SIGHUP to auditd will now cuase a log
file rotation to occur.

Change-Id: I03525e2876c7310eb3569e3adc4deeba68b18a66
Signed-off-by: William Roberts <wroberts@tresys.com>
Add audit watch rule support and bugfixes

Add libaudit support for adding directory watch rules.
Add rule parsing support to auditd.
Rule format matches auditctl. Currently only supports -w and -e.
Fields supported are uid, euid, suid, fsuid, loginuid, gid, egid, sgid, fsgid and success.
Fields allow further limiting of matches, for example:
 -w /system -pwa -F uid!=system -F success=1
will match a write on /system that was successful and done by a uid other than system

Retry on EAGAIN from recvfrom on the audit netlink socket.
Always enable audit syscall functionality on start of auditd.

Signed-off-by: Joshua Brindle <brindle@quarksecurity.com>

Change-Id: I74a94dbffde835a27539559427f22b73a4c7ea24
Healthd: charger: allow override of LED/BACKLIGHT paths

Change-Id: Ib7372e441d554e16ffc20ce43993ee78cdc5b187
healthd: Detect power supply type for all charger devices

Power supply type is not determined via the device name,
hence iterate over all available devices in the subsystem
node and read the type from device file.

  shell@hammerhead:/ $ ls /sys/class/power_supply
  ac
  batt_therm
  battery
  touch
  usb
  wireless

<4>[ 3184.867782] healthd: touch: Unknown power supply type
<4>[ 3184.868039] healthd: batt_therm: Unknown power supply type
<6>[ 3184.880506] healthd: battery l=89 v=4181 t=25.5 h=2 st=2 c=-288 chg=u
<4>[ 3184.890362] healthd: touch: Unknown power supply type
<4>[ 3184.890549] healthd: batt_therm: Unknown power supply type
<6>[ 3184.899419] healthd: battery l=89 v=4181 t=25.5 h=2 st=2 c=-59 chg=u
<4>[ 3184.908756] healthd: touch: Unknown power supply type
<4>[ 3184.908984] healthd: batt_therm: Unknown power supply type
<6>[ 3184.919672] healthd: battery l=89 v=4181 t=25.6 h=2 st=2 c=-25 chg=u

Change-Id: I863bfab95193899460237b51997e0418eeb4ee2c
adb: host: Provide better sideload status

 * Show data transfer in MB and in multiple of the file size.

 * Show a spinner to indicate liveness, which is updated at least once
   per second regardless of data transfer.

 * Do not allow sideload of zero sized files.

Change-Id: I1bd0df6a8183fad5a502fc26a7e789c27d24f71a
adb: Fix host build

Change-Id: I173e920aa836bb0327bfae235022de011f3e2b99
set /system/etc/init.d/* permissions

ported from CM7

Change-Id: I3422c392248673fd7a8c8b45f34678097e553b5b
init: create symlinks to mtd block device nodes

Given a device in the form of "/devices/virtual/mtd/mtd0/mtdblock0":
* Creates symlinks for mtd block devices in
  /dev/block/mtd/mtd<partition number>
* Creates symlinks based on partition name in
  /dev/block/mtd/by-name/<partition name>

Change-Id: Id8d61be88935a0ef83297d1d5e453d8ba0d586de
fastboot: Add missing fastboot USB IDs

Change-Id: I1616e9e6a57652aa919f979833c0e19479343966
Merge remote-tracking branch 'slim/lp5.0-caf' into lp-caf

Conflicts:
	healthd/BatteryMonitor.cpp