base: Add api to toggle flashlight and check if device has flashlight

[micky387] Ported to A13 since
https://github.com/omnirom/android_frameworks_base/commit/a3bcac58cf1c5ddeca0addc1edfba0412da4768a

statusbar service getter borrowed from PhoneWindowManager code

use PackageManager to check if the device has flashlight

use aosp flashcontroller to handle the flash toggle like the flashlight
tile does

Change-Id: I4e8fe3351b408aa55573b191baa1bc742962a85c

base: add camera flash toggle api

    * accepts a boolean to enable/disable camera torch
    * checks if camera flash is present

Change-Id: I4bb47dfa650fb9424db545161a1d7571649f37f7
Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>

base: Flashlight toggle api improvements

being sure mCameraId is initialized.

Change-Id: Ide72c7143c0e04715ca5404cd7f8e02333ac455b
Signed-off-by: Josh Fox (XlxFoXxlX) <joshfox87@gmail.com>
8 files changed