Revert "Fix fatal exception due to missing looper for current thread."

This reverts commit 74f0e44460096a472c803c77f53b5f703c902916.
Fix a variety of small publicly-reported bugs.

Possible NULL dereference in cmds/bootanimation/BootAnimation.cpp.
https://code.google.com/p/android/issues/detail?id=61556

Missing fclose in core/jni/android_os_Debug.cpp.
https://code.google.com/p/android/issues/detail?id=61546

Bad loop guards in core/jni/android_util_Process.cpp.
https://code.google.com/p/android/issues/detail?id=61557

Assignment to wrong variable in libs/androidfw/AssetManager.cpp.
https://code.google.com/p/android/issues/detail?id=61560

Missing delete[]s in libs/androidfw/ObbFile.cpp.
https://code.google.com/p/android/issues/detail?id=61549

Leaks on error in tools/aapt/Images.cpp.
https://code.google.com/p/android/issues/detail?id=61552

Two missing fclose calls in tools/aapt/Resource.cpp.
https://code.google.com/p/android/issues/detail?id=61553

Missing fclose in tools/aidl/aidl.cpp.
https://code.google.com/p/android/issues/detail?id=61554

Change-Id: I5820f3824e72d07a9acb776cf0af3e7443f5694a
telephony: Add same named operator configuration for some operators

Add same named operator configuration for 404, 405, and 520.
That is, show roaming icon though same named operators.

Bug: 12121959
Change-Id: I9148bab727170f670fd2679db69b123b0526bb32
CompoundButton: Let text can be changed by config

Because CompoundButton freezes text inside onSaveInstanceState, the text
can't be changed automatically after locale of device changed.
Bug from such a case reported via url below:
https://code.google.com/p/android/issues/detail?id=24013

It would be better to don't freeze text for default case and let users
to freeze text if they need manually.

Change-Id: I2d6a192b6ff05a95b21487c2362cbc14691c68cf
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Re-initialize error after attach

If flag for error after attach is not reinitialized, it may cause
NullPointerException on subsequent onAttachedWindow if error text
was reset to null.

Change-Id: I8976c28a6ca71017e5c4b3f29d4eeeb2eda48c38
Keyguard: smooth background change derp fixes

no idea how this could happened. Cleanup, fixes and updates (thanks kyril)

Change-Id: Ia0e4d0000db72b5cdb6fede03791805e34fa311d

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
Revert "SystemUI: update internal state right after hiding transient bars."

This reverts commit 0494668f6e4be73762271be87d1986f34d873bec.

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
PhoneStatusBar: fix massive surface redraws due of animation race

the wifi/carrier label is animated from AOSP via an alpha animation. Problem
is that we quiet often call this on other animations and this will end in a
animation loop which forces massive surface redraws. Whatever to avoid this
do it like for notification shortcuts and set directly the alpha value which
look so or so better in the whole animation.

As well a small code cleanup

Change-Id: If620db28d9c38ce3adeeef59fdf65c6394d45f11
Framework: Minimum Vibration Duration (1/2)

PS2: String description
PS3: Derp spacing
PS4: Derp hiding.

Change-Id: I4f2d4cce90a87016d0c02e67f1566e38dfbc7c37

Conflicts:
	services/java/com/android/server/VibratorService.java
fb: fix multiuser bug in vibrator service

This value can be used by a 3rd party application. This would
result in a crash like it is now. Assign the correct userid
category to resolve that

Change-Id: Id42780ffe2f10f89788af4af0b887142de79fa34
fb: add config.xml option to permanently force permanent menu key

devices like m7 are a kind of hybrid between navbar and hw key devices and
need a menu button in applications although it is categorized as a hw key
device. Give an option to permanently enable the menu key via overlay

Change-Id: I926b1b864e544c51fb225918022730ccab3698b6

Conflicts:
	core/res/res/values/config.xml
	core/res/res/values/slim_symbols.xml
Add Long-Click to Preference Tile

This will open the add tile activity like it was before in JB

Change-Id: Id1ac8f0fd18f7f2dffca56e7edf857536142a6ce
fix remaining blue dialog dividers

Change-Id: I0b4d2d0706f3393933e40d9c70b62aa3c9b68ed5
fb: make QS again rtl aware

we removed on first version the possibility to respect rtl
add it back to be aware.

As well remove the try to fix the tablet on first boot landscape problem
It actually did not fix the problem.

Change-Id: Id71e1d4865bb84831a58813a9efdf47a2f96a1f8
QS: fix wrong measurement on 4 or 5 tiles per row on settingspanelview

Issue was only visible on devices which have settingspanelview (tablets - not flippable)
on boot up on landscape and had 4 or 5 tiles per row set. Problem is that due we have
the same layout situation like in portrait on this devices that the layoutparameter
height needs to be calculated in landscape as well.

Solve it with forcing (on only settingspanelview devices) the calculation on landscape
as well

Change-Id: Ib87485e0892abe798006ba5ffaaf5061d560afd6
QS: no need to rebuild the complete QS on orientationchange

to update just the layout parameter from the container view
is more then enough

As well after theme change we can directly return due that
all gets rebuilded

Change-Id: I93662d611bb79c9bb294707fb2b4e204c060ce0c

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Cursor leakage due to cancellation signal

If a query call was cancelled, the cursor adaptor might leak. The
adaptor is now closed if any exception is thrown during query.

Change-Id: Ic4c2edeaf2fcef56b4ef59484a36d3233aa12dbc
Fix visibility of multiple non-fullscreen activities.

Issue detail:
Assume X, Y are non-fullscreen activities.
 a.Home starts an activity X in task A in application stack.
 b.X starts an activity Y in <task A> or <new task B>
 c.Activity X will be invisible.

How to fix:
Because the function "isActivityOverHome" means an activity is able to see home.
But there may have many non-fullscreen activities between the top non-fullscreen activity and home.
If flag "behindFullscreen" is set, those middle activities will be invisible.
So it should only take care from who is adjacent to home.
Then check two flags frontOfTask(task root) and mOnTopOfHome for constraining the condition.

Change-Id: I60bcea304976414e44835a0a38675aae365e9e19
Fix a JNI local reference leak in MediaDrm

A reference leak was found in the subtitle usecase that also
applies to android_media_MediaDrm.cpp
(Code taken from the similar fix in android_media_MediaPlayer.cpp)

Change-Id: Icc4b25e4adc9a600ff4ac99a7a8478bb55a6e348
Framework: Custom Tiles (1/2)

PS1: Reinvent logic from initial
	implementation
PS3: Clean-up and unlock/collapse
	options.
PS4: Small fix.
PS5: Remove unlock option.
	Too complex for average usage.
PS6: Allow reset button to reset last
	drawable/label.
PS11: Fix "user deleted index while
	above index 0" which would
        display the old drawable
	until the tile was manually
	updated by user.  Small fix.
PSX: Create Dependancy

Change-Id: Ifdfa60b8257290c07e1861903e26c5dea715d036

Conflicts:
	packages/SystemUI/res/values/liquid_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java