Squashed commit of TorchService from cm-11.0

Very minor edits by myself to make compatible with 5.0.  This will be used
as the backbone for the flash-notifications feature.

commit 15d90fc35b6c5dfb44553bbfa8ffac13291f0809
Author: Roman Birg <roman@cyngn.com>
Date:   Thu Aug 28 11:34:00 2014 -0700

    frameworks: extend TorchService to be able to handle sysfs torch config

    Some devices are still using a sysfs node to control the torch. Let's
    support those configurations and properly shut the torch down.

    Change-Id: I5fa1cccdcffad26dbfef4b2ee0eafe1218a5308b
    Signed-off-by: Roman Birg <roman@cyngn.com>

commit 16e98d53596f78b78c5d9031c123770fd59d2036
Author: Danny Baumann <dannybaumann@web.de>
Date:   Thu Aug 14 12:03:33 2014 +0200

    Fix camera usage tracking.

    When a Camera object is finalized, it notifies the torch service that
    it's no longer using the camera. This call used to not check whether the
    caller actually is still using the camera and called release() before,
    so depending on timing of the finalizer, it could happen that e.g. the
    camera app released the camera user record of the torch app, leading to
    the torch usage not being detected on next usage of the camera app.

    Fix that by checking whether the caller of onCameraClosed() actually
    owned the camera prior to releasing the record.
    Also fix synchronization between accesses.

    Change-Id: Ic01cbc3c89ab8d855e4613bfa1b2f548de919b73

    Conflicts:
    	core/java/android/hardware/Camera.java

commit d77084c74719ad0a0ee0d2d12090a49472eeb9a7
Author: Danny Baumann <dannybaumann@web.de>
Date:   Mon Jul 7 14:36:40 2014 +0200

    Fully fix interaction between torch and camera usage.

    For doing this, two things are necessary:
    - The torch shutdown needs to be synchronous, so that the torch app has
      a chance to release the camera before the camera app tries to use it.
    - The torch service needs to track camera usage, so that it can notify
      the torch app if a camera is busy.

    Change-Id: I521091d255ff4c251d97a0e8d65c9d2a80b9dae4

    Conflicts:
    	core/java/android/hardware/Camera.java

commit b55518db23d7ac706626262c97a3134c16a5948e
Author: Roman Birg <roman@cyngn.com>
Date:   Tue Jul 1 15:21:19 2014 -0700

    add framework torch service

    Change-Id: I0c7a055b33fdebe697f23d207b20408e06eb74a8
    Signed-off-by: Roman Birg <roman@cyngn.com>

    Conflicts:
    	core/java/android/hardware/Camera.java

Change-Id: Ib884b23d053b739cde03901ef764793991c9abd0
Flash notifications [1/2]

Trigger a camera flash for incoming notification events.

to do: accelerometer sensor for if the phone is lying flat on it's back?

PS2: whitespace

Change-Id: I07a4447e37bcc4b15760fd3ad18a823c4693722d
Merge changes I07a4447e,Ib884b23d into EXODUS

* changes:
  Flash notifications [1/2]
  Squashed commit of TorchService from cm-11.0
Merge pull request #2 from VanirAOSP/EXODUS

Exodus