Swap volume buttons when the screen is rotated (1/2)

See: http://review.cyanogenmod.org/#/c/14530/

Patch Set 8: Invert the orientation interpretations on tablets

Change-Id: I201febc2827e6fbd347cb0e3f8d3347ad1bc487b
Round off when calculate next step in Seekbar

When the positions for the new step is calculated in
a Seekbar, a rounding error can appear.
This is fixed by round off before casting.

Change-Id: Ie2cf201ef670ccc2297e9bc4c7f415a826e44a41
SystemUI: translation too long fix

see here: https://plus.google.com/u/0/116635047487375994737/posts/JLfLjXwrp9w

Change-Id: Ieae2c2578178f3c82d3535f5bd0b7c6e30729ce3
Base: Mirroring layout on RTL languages [1/2]

When Force RTL layout (in developer options) is sellected on RTL language (Arabic, Hebrew, etc) - mirror back to LTR.
There is another commit (same name but with [2/2]) which just changes the strings to match the new meaning for RTL languages.

Change-Id: Ib051b976db4e15dab9caddcd0d49276b5ada3f13
frameworks/base: Fix the random UI corruption

On low memory device, when a view goes to background. Its HW layer cache
will be destroyed to release memory. There is a very rare case that the
hardware render is not valid when destroy the layer, so the layer is not
destroyed and reused when the view comes to foreground. But the GL
context has changed, so the view is not rendered correctly due to its
HW layer cache. To fix this issue, destroy the layer in a safelyRun. Make
sure the layer is destroyed correctly.

Change-Id: I1c714e1d53db7353d5169e874a7cd0f527c3f67b
CRs-Fixed: 623239
GC: Improve the string parsing for GC parameter setting

Improve the string parsing for GC parameter system property.
Previously we only recoganize plain number for dalvik.vm.heapminfree
and dalvik.vm.heapconcurrentstart, while users tend to use format as
2m.  Improve the string parse to cover such cases.

Change-Id: Iaf0152bc4d77e1caabc307a9a7b0e5b261f8e441
Frameworks: Quiet Hours Automatic Switch (1/2)

Change-Id: I3e09891a60ffc5a11f5b5fabef8e06fb02dc9f5d

Conflicts:
	core/java/android/provider/Settings.java
Frameworks: notify arrayadapter early that data has changed on clear all

Recent clear all. Current behaviour is that we do not update the array adapter at all
due that it gets rebuild on next reload. But in very rare cases it happens that getView
want to update shortly after all is cleared althought the view is not visible anymore.

Whatever just call notifyDataSetChanged after List is cleared to work against it.

Change-Id: I61ca25358ebe164336ba349565459537861c5495
Frameworks: do not kill favorite recent apps

Due of a lot user requests and I basically like the idea (not a fan of clear all apps at all
due that it does not make sense android wise) we ehance the favorite recent apps feature.

This commit basically does not remove the apps from the task list which were marked from the user
as favorite.

3 possibilities:

- No favorites are in the task list - clear all behaves like it was before - all tasks cleared and panel closes

- favorites and non favorites are in the task list - clear all removes all non favorite tasks and favorite tasks stay.
  Yes without fancy animations....we want to be fast ;) - panel stays open

- only favorites are in the list - pinch to zoom out is blocked due that nothing is there to clear all.

single clear of a task with swipe behaves in all cases normal like it was before this change

Change-Id: Ia05562e0f59dfb023aa65ec3a40dd951594dc88e
SystemUI: Remove broadcast from QH toggles

Obsolete per this patch:
	https://gerrit.slimroms.net/#/c/5814/2

PS2: Forgot one

Change-Id: Iaf591304a8993710920149a77d15d29b22514211
Base: fix MultiSelectListPreference NPE

Error AndroidRuntime 25851  Caused by: java.lang.NullPointerException
Error AndroidRuntime 25851         at android.preference.MultiSelectListPreference.onGetDefaultValue(MultiSelectListPreference.java:212)
Error AndroidRuntime 25851         at android.preference.Preference.<init>(Preference.java:268)
Error AndroidRuntime 25851         at android.preference.DialogPreference.<init>(DialogPreference.java:69)
Error AndroidRuntime 25851         at android.preference.DialogPreference.<init>(DialogPreference.java:90)
Error AndroidRuntime 25851         at android.preference.MultiSelectListPreference.<init>

also Cleanup whitespace :/

Change-Id: I3f0a1fba8f6651522e4f0c4e4750b2ce0042314f

Conflicts:
	core/java/android/preference/MultiSelectListPreference.java
base: Add theme support to Ringtone and Profile pickers activities

Patchset 3: Add support for theme RingtonePreference view. The dialog is
            automatically adjusted to the caller activity base theme.
Patchset 4: Don't break the android api

For Ringtones:

http://review.cyanogenmod.org/#/c/61393/

For Profiles:

Usage:

Intent intent = new Intent(ProfileManager.ACTION_PROFILE_PICKER);
intent.putExtra(ProfileManager.EXTRA_PROFILE_DIALOG_THEME, R.style.CustomDialogTheme); <<< Add your custom dialog theme here
startActivityForResult(intent, 0);

Style Usage:

Define an style that inherits from an android base theme

<style name="CustomDialogThemeDark" parent="@*android:style/Theme.Holo.Dialog.Alert">

or

<style name="CustomDialogThemeLight" parent="@*android:style/Theme.Holo.Light.Dialog.Alert">

or define your own dialog style

Change-Id: Icadbcf2c617c51177466989acdab9435066a47a0
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
FWB: Allow disabling of FC dialogs (1/2)

Change-Id: If87aa74ebb45849f6e5fe3a53ce9beeaac28f624

Conflicts:
	core/java/android/provider/Settings.java
Revert "base: recents circle memory indicator fixes"

This reverts commit 49096c7c763d570eeadfcd4d13273609a9131b9b.
Revert "Add a circlular memory indicator to the recent panel view (1/2)"

This reverts commit 8715e183fc85564637539f34580a3b8f8176e41e.
RAM bar (1/2)
- This commit includes small re-sizes to fit transparency in new launcher

Thanks to @kufikugel for hole code ported from 4.3

Change-Id: If1341c1ad5614a1adca07358910a4df85c919966
Lockscreen Notifications: some fixes

Conflicts:
	core/java/android/provider/Settings.java
Lockscreen Blur: Disable if music is playing

Some apps don't employ full screen album art.
In that case album art doesn't override wallpaper & content behind screen is clearly visible.
This fixes that issue.
Fix dest == src bugs in Matrix.cpp.

The main bug was that the AutoJavaFloatArray autoSrc was not passing in
read only. This meant that the destructor overwrote the data which
the autoDst AutoJavaFloatArray had written in it's destructor.
This case only happened if src == dest and the arrays were copies.
Also improved performance by passing in read only a few other places.

Bug: 12570144

Change-Id: Idc8764087dc165433c584b87a0f9d4ed0ec795e8
[ActivityManager]: Fix the activity visibility state not sync between ActivityManager and WindowManager

Symptom:
When press Home key to home screen, user is able to see the activity's window shown on top of wallpaper and below launcher(widgets).

Root Cause:
The ensureActivitiesVisibleLocked() is called pretty often (for example when a new process bound).
If the top activity "B" was finishing, then the previous activity "A" should be visible.
Therefore, the activity "A" window will be set to visible and then launched activity "A", but it does not updates the visible state in ActivityRecord for "A".
There has a timing issue that if a new activity "C" is started, "C" becomes the new top activity and be resumed.
In that case, Activity "A" window will remain visible even if it is behind a full screen activity "C" because the ActivityRecord.visble of "A" is still false, so the window visibility won't be update.
So when user press home key and back to launcher, the surface of activity "A" will be composed on top of wallpaper.

Solution:
Updates ActivityRecord.visible to true for "A". After "C" is started, the "A" will be called WindowManagerService.setAppVisibility() to set invisible, then called onStop() when execute ensureActivitiesVisibleLocked() again.

Change-Id: I536ba04b95d8d274fea6d679a6493e620bc981e2