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

Conflicts:
	core/java/android/view/inputmethod/InputMethodManager.java
Fix divisions by zero on boot.

Change I976ffae3a56d411b00026f86b16efa9743a23293 introduced a problem
where depending on the rotation settings the WM override display
configuration would be filled with invalid values.
Fix that by correctly checking that the display is ready prior to
setting the override configuration.

Change-Id: Ia3fd7603d9c1212cd32536803b4c12390a798606

Conflicts:
	services/java/com/android/server/wm/WindowManagerService.java
Power Menu: Update the Expanded Desktop drawable

Also add a proper "off" state.

Patch Set 2-4: Add to symbols.xml
Patch Set 5: Remove the useless extra sw600dp-xhdpi drawable

Change-Id: I111982a4985bba19353dd4f3872e5b21e73dd5f9
Revert "am: Allow more hidden apps on devices with lots of RAM"

 * This isn't actually needed on 4.2+

This reverts commit 03a420191d8063a8def901b1955b7c477185d62d.

Change-Id: I1c4ef3c9c00882bf2c36ad042c368bacc0f9220f
LockscreenTargets : Dismiss on target select

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

Change-Id: I2770c628ce0708570aa6ea0eac9e3cd1d82287fb
Remove opaque check in GLRenderer when preparing dirty region.

Since preserved swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new process. This prevents
garbage to be present from the previous process in the color buffer.

CRs-Fixed: 391492, 403067, 405916

Change-Id: I1f72a3dee2f5d58a984f4cd367c9f7bf08ab9d6a

Conflicts:

	libs/hwui/OpenGLRenderer.cpp

[PATCH] Remove opaque check in preparing dirty region

Since preserved swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new rocess. This prevents
garbage to be present from the previous process in the color buffer.

(cherry picked from commit 2b5e584e2615852b68a69bb529c6926190246b64)

Change-Id: I92a4fa35e0746f12fcd736e21fd30d9c4b644a8a
CRs-Fixed: 391492, 403067, 405916

Conflicts:

	libs/hwui/OpenGLRenderer.cpp

Enable scissor when preparing dirty rect that is opaque

Now enabling scissor before setting it in the opaque case, previously was not doing so.

Change-Id: I1ea904cf01603096e423556090564291ab712d36
CRs-Fixed: 465346
Depends-on: 278453
Tighten enforcement of file modes.

Bug: 8275867
Change-Id: I4da14f2dd0049aca69636999696c1f3c02b3b792