SystemUI: Custom Tile - add Global && Create Small API

Add forgotten Global table to Custom tile
Adjust Advanced Tile to directly change
	settings rather than sending an
	intent to the Chamber to loop and parse...
	and return to loop and parse again...
	Cleaner and more efficient

API:
Intent Broadcasted:
"com.android.systemui.CHAMBER_FIRED"
Extras:
"setting_key" > Setting being resolved
"setting_value" > Value resolved setting is currently
	set to.
"%" must be added as a flag per the usual usage of getting
	Extras to allow correct parsing.
	I.E. "%setting_key" and "%setting_value"

Intent can be caught by many profile management apps
	such as tasker and llama.  This allows the
	user to catch this intent and change profiles
	update settings, etc. Given that only advanced
	users are using this process anyway, it will
	only be called by those who might take interest
	in using it.

rebase

Change-Id: I275f616977acacb5aa802f89ea019e986bd82844
Merge "SystemUI: Custom Tile - add Global && Create Small API" into kk4.4
Frameworks: apple can do...we can do as well

incredible apple engineers speeded up the overall UI and reduced per default slightly
the animation scales. Well we do as well and reduce it from 1 to 0.75...smooth, looks well
and does not break anything

Change-Id: Icbcc889e49c8d3ab24cf2b1c10bbe0e8bf7e7637
Frameworks: IME cursor controll be consistent

If user has enabled volume button IME cursor control do not show
navbar IME cursor control. One is enough and can be asumed to be the
default one the user is using. So be consistent and just have one enabled.

Change-Id: I1981579ef3ced52ba94bd84d4f4675cea379562e
SystemUI: Fix Advanced Custom Tile location_mode

	location_mode resolver needs to be set
	to "location_last_mode" while the setting
	stored to update location method
	needs to be set to "location_mode"

Change-Id: I744b7c5ea87556825119a7f2bdae0fb988251a58
Framework: Minor shake to secure fixes

Match insecure lockscreen feel completely:
	Allow camera roll to be viewed while
		shake to secure enabled and
		device is currently insecure
	Launch activities as though insecure
		which makes the process faster
		and uses the correct animation

Change-Id: I5752e68c022cdb9b9cbffa1bae4dcb901e23137b
[ActivityManager] Fix a bug: unable to start activity after starting activities during screen off.

Symptom: Unable to start any activity.
Root Cause: ActivityStack.mPausingActivity() points to a destroyed activity of a died process, so that ActivityStackSupervisor.allPausedActivitiesComplete() always returns false.
Solution: Set mPausingActivity to null in ActivityStack.cleanUpActivityLocked().
Reproduce steps:
    a. Turn screen off.
    b. A background service starts an activity X (in process X).
    c. A background service starts a no-history activity Y (in process Y), but the main thread of Y was blocked.
    d. A background service starts Y 3~4 times --> this causes am_failed_to_pause on X.
    e. Main thread of Y is freed finally --> this causes Y crash for android.view.WindowManager$BadTokenException.
    f. Turn screen on, X is shown on screen, but neither back key nor home key can work because mPausingActivity is Y.

Change-Id: I320b3db407e2d4cc745c8ca22a6e548742234242
Mark constructor as accessible in LayoutInflater.

Needed to bypass new access checks for fields, methods, and
constructors.

Change-Id: I8ff0b44a6cb4f4af1c72734bca366d8b89528030
Marquee text RTL improvements

Changed marquee text to scroll according to
the reading direction. Arabic text will
show the right edge and scroll towards
the left edge and vice versa for Latin.

Corrected marquee flicker when scroll animation
finished. The ghost scroll's x position was cast
to int and it made the text flicker when
marquee stops.

Ghost part didn't display for RTL languages.
Added multiplication with
getParagraphDirection to negate the ghost
offset.

Change-Id: I689039118df01a62f73ef0079c857fea1bfcc5a0
Always call super.onCreate().  Always.

Bug 12991134

(cherrypick of commit 9d6376a1d88ab5b3a41ee4400e3aaa4c4ee69e2a)

Change-Id: Ife16ef93408253e3318a06dc0206ab4b88c7f367
[ActivityManager] Reduce report ANR on wrong activity.

Symptom: ANR report on wrong activity.

Root Cause:
  KK changed resume behavior that will not update focus when only resume,
if the activity blocked, it may report ANR on previous focus.
  By original concept, it will try to correct the ANR target,
but the stack of waiting(waitingVisible=true) activity may
different with current top stack.
  If it gets key dispatch timeout, mResumedActivity and mPausingActivity
of its stack will be null becuase it is not top stack.
Then it is unable to change ANR target to the real no response activity.

Solution:
 Use focused stack to get the real culprit.

Reproduce steps:
1.Launch an Activity X from launcher, press home key.
2.Launch X from launcher again, X blocks(sleeps 15sec) in onResume, press back key in the beginning of blocking duration.
3.ANR dialog shows launcher is no response.

Change-Id: I99416ad91e349096f995990f2240a97616fbaf28
Don't allow MemoryFiles of negative length.

Prevents us from converting a (signed) jint into an
(unsigned) size_t and having horrible things happen.

Change-Id: I0f04e2eb9852ae7fc49b435fd0974f56e86751a4
Framework: Ensure Intent.ACTION_USER_PRESENT Is Sent

If the user set a keyguard delay (AOSP-Secure-Delay)
	and the screen turned off, many processes will
	thus assume the user is no longer present (true).
	If the screen is turned on before the keyguard
	enables itself, the USER_PRESENT broadcast is never
	sent and the app/process will not know the user has
	returned to using their device.

Change-Id: I6301848043fbf2d76513a20ae189d28018473202
SystemUI: HI-Translation

Change-Id: If69b8d04f0e51ff577426c8326778fe320945ab2
FB: HI-Translations

Change-Id: I0de54e0ab4e31dcdccfb9b0fdf184f47e6be3595
Framework: All Shake Patches (1/X)

Included:
	Keyguard - Disable Shake if isHidden
	Disabled Shake Apps (1/2)
	Shake Sensitivity (1/2)
	Keyguard Shake Events (1/2)
	Shake To Perform Event (1/2)
	430942 miscellaneous fixes

Change-Id: I47707f51e61ba0d4687e0232d684de7ee6b0eb72
PackageManager: Fix concurrent access to shared state

Stop multiple threads from all calling add on the same HashMap.

Cleanup the use of a boolean flag by removing concurrent writes
to it.

Change-Id: I8d61fe7294dcb67ee7d0d7de88d90d2051c310e6
SystemUI: Smart Pull-Down - Any Notification (1/2)

Change-Id: I8656b75550ea0d30d4c620160221ca22ffe1af92
[1/2] frameworks: Adding old-school (JB like) battery percents style
due to its better visibility.

Also added "No battery" style.

Added percents visibility while charging and
colorizing percents while charging

One selector made obvious

Removing unnecessary code

Setting green color for text 90+% charged

Now bolt color means color of circle battery, not percents

Fixing percentage color while charging for "text only" style

Fixing percentage color for JB style

Adding green percents color when charging and >90% for circles with percents too

Including Juba's changes regarding battery tile with no battery in statusbar
and styles order

Line to long and use static reference

How does it look like:
https://dl.dropboxusercontent.com/u/66673431/BattModPercentScreen1.jpg
https://dl.dropboxusercontent.com/u/66673431/BattModPercentScreen2.jpg

Settings change: https://gerrit.slimroms.net/#/c/5755/

Change-Id: I7505c7e35c252a0fac0bd37db4be33bbff89ef41
Framework: Custom Tile Double-Tap (1/2)

Change-Id: I50461ddea85cb03e5c04b43e6a6b09411dba9a0d