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
IME : Fix sym key regression

http://review.cyanogenmod.org/#/c/25787/2 caused the "dismiss" arrow
for ime's to execute back action as well. Reproducible via :

Open sms app->Open message thread->Tap message field->Tap downward arrow on navbar

Expected behaviour : Keyboard should be dismissed
Actual behaviour : Keyboard is dismissed and user is taken to previous screen.

Change-Id: I6ab65b00464fb6e00849d7fd6c8bd438b23ee76b
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: Allow Settings to retrieve country code

This makes getCountryCode behave like getFrequencyBand

This allows Settings to get/set country code like
it can for frequency band.

Change-Id: Id9f00d3a678642c6c142fd1511af820d729507a7
Wi-Fi: Ping the driver for wifi-only devices

Wifi-only devices are not capable to find APs with hidden SSID unless a DRIVER COUNTRY command
will send to wifi driver. This change has:

- Send DRIVER COUNTRY command to ping the driver (to correct the seek of hiddens SSIDs)
- Save mCountryCode as uppercase because the wifi_countrycode_values array is in uppercase.
  Otherwise the preference will not be found.

Patchset 7: Rebase
            Do not set mCountryCode if country is null

Change-Id: Ie0f838aef07eaf683b713f7f0e46ff3c751523ab
Wi-Fi: Pass default country code to driver

This patch reverts partially the change http://review.cyanogenmod.org/#/c/28918/8, and
passing the default country code ("GB") to the driver instead of null.

Change-Id: I7d7115155a0a52261931ffaddaf35f316d095800
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
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