Live Volume Steps [1/2]

-Created by me(@Meticulus) for the almighty BeanStalk ROM!

-Volume steps changes are instant, no need to reboot!

Change-Id: I1f50a68f5e361976f463b2497e2fea765144e5a1

Conflicts:
	media/java/android/media/AudioService.java

Live Volume Steps [1/2]

lvs: transitioned volume steps volume normalization.

-This calculates an equivalent volume ratio for the new
volume steps.

-example: Volume steps are set at 60. Volume is set at 5. That is
very low volume. Then volume steps are switched to 5. Now you
are instantly in a state were your volume steps are 5 and your
volume is 5. That's full volume! This fixes that issue.

-So it basically keeps the volume from jumping around while your
changing volume steps. It may be a little lower but should be
very close.

Change-Id: I1f50a68f5e361976f463b2497e2fea765144e5a1

Conflicts:
	media/java/android/media/AudioService.java
Quicksettings: Few misc adjustements and fixes.

* Fix sleep time tile label on clean flash boot, was showing unknown till you set it in settings.
  Initialize screen timeout with default 30 seconds (wrongly initialized with 0 that is never compared).
* Use switch statement (better performance wise).
* Bit cleanup for wifi ap tile, useless resources reload.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
Avoid layout passes when updating data activity indicators.

ImageView can optimize out layout passes if old and new drawable have
equal sizes. Take advantage of that by displaying a transparent drawable
with the same size as the in/out drawables when there's no activity
instead of clearing out the drawable in that case.

Added missing code

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java

Change-Id: Iaaa556ffab3ed4be1da8016ed40d0a9c2efcde01

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
Fix the issue that the top of fullscreen dialog is clipped away

The visibility of status bar comes from the top fullscreen window,
not from the focused window.
That has to be taken into account during the calculation of the
decor rect. You can use mTopIsFullscreen for this purpose.

Change-Id: I6159eb2ee389885cf5ab507157f9451841364d2f
core: add support for translucent volume panel

Add support for display the volume panel in translucent mode

Change-Id: I4f21a6cc88282789072a0e71ae696b754a5e083e
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
frameworks/base: move idmap from frameworks/native

idmap depends on libandroidfw, so it should go in frameworks/base.

Change-Id: I3c1db3baa355f53d6b523d60f4377e63eff00c30
Handling HSPAP type in neighboring cell info

The android framework doesn't handle the neighboring
cell info when the device is registered to HSPAP.

Change-Id: I0eb7b845f578d9b0f382f736da76f8185ae38fa9
Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 126640
Fix issue in PhoneNumberUtils.compareLoosely

There is an issue with MMS delivery report where
even if the report was received the status is shown
as pending.

If the number of matched digits is greater than or
equal to MIN_MATCH and if one of the input strings
index has reached the lower limit,
PhoneNumberUtils.compareLoosely should return true.
Currently, it doesn't return true as it is expecting
the index to be < 0 which will not happen for the
following case where country code + number is without
"+" prefix or the number is without country code-

This patch fixes the issue by checking the index <= 0.

Change-Id: I22209e4912388411d863fbd28fe3edb27edbb3b0
Signed-off-by: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jian Luo <luo.jian@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 64234
Show live wallpapers in the recents view

Change-Id: Iefbf4f292b6a9bfdb516f154cc2976db2ba86cde
Don't play the lock sound on screen timeout

Regression from Ia4cd2c856df1573856386e1597dcc0a9600d25a5 /
aa808c4eea4efbcd9aae9525860e223b87a4ed24.

Change-Id: I5422c1784ec8171b45d8b09ba3b0529165b62dbd
Remove java.io.tmpdir assignment in AndroidRuntime.

This value is overridden by the framework anyway
(see ActivityThread.handleBindApplication). Besides,
it doesn't seem like a great idea to let tools clutter
/sdcard/ with temp files.

Change-Id: I26c710cbea7397f89e6103e54a73044a87da95b1
Structure device not freed in error case

In case of an error in the call usb_device_get_fd()
the memory created by usb_open_device() is never
freed.

Added a call to usb_device_close in case of error to
release the allocated memory.

Change-Id: Iaa83674f000242d80604dd30c782236f7afd90c2
Prevent Lockscreen album art from activating FLAG_KEEP_SCREEN_ON

This is a small fix to the showWallpaper method, in which a power
consumption problem has been introduced. This showWallpaper method
toggles the window flag FLAG_SHOW_WALLPAPER, when album art is being
shown in Lockscreen. It is important to set pixel format to
PixelFormat.OPAQUE if flag FLAG_SHOW_WALLPAPER is not being set.

If not, an application that uses window flag FLAG_KEEP_SCREEN_ON
will prevent the keyguard from going to sleep and drain battery.

Change-Id: I1808be28047977ae5ac4dd1168ea25cac8a55a78

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
IndexOutOfBoundsException on addPreference in PreferenceGroup

IndexOutOfBoundsException thrown when attempting to add preference
to PreferenceGroup and at same time removing all preferences in list.
Issue is caused by a race condition in addPreference that retrieves
index of where to add Preference from binary search of mPreferenceList
outside of synchronized lock. If list is cleared after this point but
prior to adding preference on index returned from binarySearch
exception is thrown.

Solved by moving binarySearch to inside synchronized block. This will
allow thread safety while not impacting behavior as result from search
is only ever used from within synchronized block.

Change-Id: Ic1e7954cf977b1ddd6ddba98d4cf771f21fb4d57
Fix for rare INSTALL_FAILED_INSUFFICIENT_STORAGE bug

This fixes a bug that occurs when one application
update fails to remove the old application package
causing any following update attempt to fail falsely
reporting insufficient storage.

Change-Id: I3f30f887d51ce5aca9a35f4833cd832bb7ceaad2
Remove these dots

If airplane mode is toggled, you'll noticed it says NO SERVICE.

This removes the dot

Change-Id: I425dea9bf7afb25d25f58c61e4c0a204c801e20e
Set Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED default value

To be able to customize the "WiFi optimization"
setting we need to set a default value.

Change-Id: I9cd2f204cf46c0b4c70a4a147da2f1d73a708308
Vpn: Setup routes.

Change-Id: Ia00467fbc4324ca5f6dab6e0ff2609cd5de9a423
Add hidden minor version ID for support lib workarounds.

Change-Id: I7940e32c78caaab351fb28d92e5fadbea6292b27
Check the return value of listFiles on the ifw directory

listFiles can return null if the directory doesn't exist

Bug: 10497143
Change-Id: Ie4cbdf18a259a9641669a4e6b9bf49b4879acc67