Wifi: Enable Ad-Hoc (IBSS) network configuration

This adds two public but hidden variables to WifiConfiguration: isIBSS and
frequency. These are used for configuring IBSS mode.

WifiConfigStore is exended to get and set these variables to wpa_supplicant
(via WifiNative).

Change-Id: Iab02c3d738c05c2de036350ea77b78789213e357
Wifi: Add IBSS supported method

Add method isIbssSupported() to WifiManager and related classes to query wether
the driver supports IBSS mode. The query is answered by wpa_supplicants new
command "get_capability modes".

It will only return a correct result after WIFI_STATE_ENABLED has been
reached.

Change-Id: I93aa2fdff94cd897c91ec3beb7e58940d1de7b72

Conflicts:
	services/java/com/android/server/WifiService.java
	wifi/java/android/net/wifi/WifiStateMachine.java
Frameworks: fix volume button swap for tablets (1/2)

Change-Id: Ia2f3afb0fbc80d2a669d8ea9c0ed896352d794bf
FlingTracker can divide by zero and hang StatusBar in an infinite loop

if 2 events have the same timestamp then FlingTracker in PanelView will divide
by zero causing NaNs. the bug is usually triggered by rapid StatusBar up/down
dragging activity and updateCarrierLabelVisibility can then loop indefinitely
looking at NaNs. the user visible symptom is that StatusBar refuses to pull
down and is burning cpu time.

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I0791c6bea953bf03346185fc6aaf44aaea79aace

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
Frameworks: TRDS new qualifier push up qualifier number (1/2)

Hey guys,

after this feature is working really well and a lot roms kanged
it we got a hint to change one thing which is indeed a good
idea to have less problems on AOSP updates and tools like
Apktool can provide us better without doing major changes every
AOSP update.

We pushed the number up to 69.....should be enough for
next years.

Please note for the one who are using our gapps at the moment
this will break actuall gapps till we published the new one
which will be end this week as usual.

After that we will begin to publish the apktool after we had
now enough tests....and who knows maybe the "official" Apktool
will provide us all now. So all in all a good time to change
the qualifier now before it is getting more and more
popular (we saw that first themes are providing us)

cheers

Lars

Change-Id: Ie1aeab38420cb825f6f7c1d0a5220a8bb55fc4c3

Conflicts:
	api/13.xml
	api/14.txt
	api/15.txt
	api/16.txt
	api/17.txt
Frameworks: Fix/part revert for longpress home button

du that the navring for all feature is still not ready
to avoid user complains we bring back longpress navring
on home button back.

At the moment new feature NavRing for all this will be again
removed and replaced by a better function

cheers

Change-Id: I6bf704ad1e98f63258bfef701c908997bbc5d0ca
Frameworks: Fix recent show from navbar sometimes weird

things

cheers

Change-Id: Ib7069be558a3e3ff0c058bb636a09726760863f6

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Frameworks SystemUI: give proper permission for new superuser

Change-Id: Ic66abaa2e9a917e4469328fa6025d0f97a1691d9
LockscreenTargets : Dismiss on target select

Only dismiss prior to activity launch for lockscreen shortcuts,
camera and appwidget picker remain untouched.

Change-Id: I2770c628ce0708570aa6ea0eac9e3cd1d82287fb
Add Camera sound toggle [2/3]

Adds a toggle to disable camera sounds.

Credits: AOKP

Change-Id: I14bdfc1b9558cd41e96149d111da66d93c95150b
Frameworks: make CM's adjust auto brightness configurable (1/2)

added  config_automatic_adjust_brightness_available to
config.xml to give the abillity to turn this feature off.
Reason is that some devices which are using own light sensor
systems (like some sony and htc) cannot be controlled
over that because some sensors are reporting back
wrong values.

Default value: true

but is depending on the config_automatic_brightness_available
value.

cheers

Change-Id: I1ce22fc491b26ae06963219c3a284ebaf8b98023

Conflicts:
	core/res/res/values/symbols.xml
New drawables for expanded desktop

From CM

Change-Id: I38ed7a7abadf777d012c1cd1cad0b1757b6f69ae
Fix race condition in backlight adjustment.

When configuring the automatic backlight levels, there's a race
condition in setting the lux and brightness settings as the settings
provider doesn't allow storing multiple settings atomically. When
deleting rows, there's quite a high chance of DisplayPowerController
picking up a state where the lux values already have the lower number of
rows, but the brightness values do not, effectively leading to an
ArrayIndexOutOfBoundsException.

Fix that by
- waiting a second of cool-down time until applying the settings and
- adding a sanity check for the very unlikely case that the delay
  between writing both values is > 1 second

Change-Id: I44e41530fc5334aaefc4ab7d3a90542f78fabe0c
JIRA:CYAN-755
Low-end devices need help!

-> Check for wakelocks faster
-> More granular hidden apps selection
-> Kill hidden and service_b apps at higher lmk
-> Rearrange OOM values [similar to SuperCharger! But not exact]

Change-Id: If6163a8c15b8c3ec622a44124609be21b4359e36

Conflicts:
	services/java/com/android/server/am/ActivityManagerService.java
Fix Expanded Desktop Tile

Change-Id: Id8cfb3fcc84722d5c549eb75b7fdb3699d5992fe
mdpi drawables for Navigation Bar Quick Launch Shortcuts

Change-Id: Ie7f05ea58916f9a12479e15475eaabcd3931f0d2
Fix all issues introduced in various commits by CM and me.. yeah my bad!

PS 2 : Fixed Build

Change-Id: I25cfa75aec01e4e01c28826410ebca5cc5bcc50f

Conflicts:
	services/java/com/android/server/am/ActivityManagerService.java
Fix Photosphere/Camera FCs

Photosphere is setting a few parameters "blindly"
while the API says it should check the device capabilities first.

On TF101 (and probably other devices) the camera HAL doesn't handle
FLASH_MODE & SCENE_MODE and so it sends the required RuntimeException
for these, which makes Photosphere FC the Camera app.

=> Fix: check device capabilities & ignore these 2 parameters if the device doesn't support them.

Fix based on following Team EOS patch: https://review.teameos.org/#/c/1598/

Change-Id: Idd80299802e9213a3c40414ace3d516d39f47783
keyboard: adding functional alt/shift lights

This is useful for devices that has QWERTY keyboard
and leds for the Alt/Shift (Fn/Caps) keys, like
htc doubleshot.

Depends on libhardware patch for the light ids:
http://review.cyanogenmod.org/34902

Change-Id: I66ebc2d881438f5b51db77eaa885421e65a7da0d
Wifi: Get the list of supported channels

Get the list of supported channels/frequencies from wpa_supplicant and provide
them thru WifiManager.getSupportedChannels();

One channel is represented thru the class WifiChannel which includes channel
number, frequency in MHz and a flag if IBSS mode is allowed on this channel.

Like isIbssSupported() we can only expect a result after WIFI_STATE_ENABLED has
been reached.

Change-Id: I9fc34642b9a0047f6871b180a3a7a69d47b7e2ff

Conflicts:
	services/java/com/android/server/WifiService.java