Revert "Framework: Forward port Power menu reboot by DvTonder"

This reverts commit 707cc14b36ad430f4c34de77853cab7178de97d0.
Revert "Framework: Add Advanced reboot (2 of 2) By DvTonder"

This reverts commit 08c3c6f9f9dd0fe7c2d74eca62e4b0dd656f6f80.

Conflicts:

	core/res/res/values/symbols.xml
Base: Fix tethering (softap) startup.

The interface must be started after firmware reload. If it's not
started, the driver is unable to configure it.

Thanks to Emerson Pinter <dev@pinter.com.br> for the jb version of this.

Change-Id: I7a6698a6d7e776f5f3c61f6ee83d284a81a8eec8
Signed-off-by: Rohan Mathur <rohanmathur34@gmail.com>

Conflicts:

	core/res/res/values/symbols.xml
bootanim: Don't cache textures if they're expected to use a lot of VRAM

bootanimation cached all the textures generated until the animation
was completed.
For Hi-res animations with lots of frames (like the new CM9 anim on
xhdpi devices), this implied using large amounts of video RAM, more
than most devices actually have available, causing the animation to
stall (and in some cases, gralloc to lock up); so if an animation is
expected to use a lot of RAM (rough estimation based on frame size
and number of frames), disable cache entirely and generate the textures
on demand

Change-Id: I65b6358d8ddda4350e1f150034c340b22aba5f27
bootanimation: performance enhancements

This patch implements two simple performance enhancements, which
might benefit devices. They are completely opt-in by setting
the following variables.

  * TARGET_BOOTANIMATION_PRELOAD: will preload the bootanimation
    zip to memory; this is handy on devices where the storage
    might be slow. By preloading it, we get quick access to the
    zip file, and the animation doesn't stutter.

  * TARGET_BOOTANIMATION_TEXTURE_CACHE: allows maintainers to
    force texture cache on/off.

Also fixes the sign warnings related to int / size_t comparison

Change-Id: Ibfd04caf019bcac9ba9f80f8c3eadca397a998d1
bootanimation: fix usage of LOGW

Change-Id: I1d59df9f44f414d80058a532644cbbb40e22c701
bootanimation: allow using RGB565 instead of ARGB8888

RGB565 uses considerably less memory, and together with texture
cache, it allows us to offer a really smooth bootanimation on
not so powerful devices.

Change-Id: I9da8fd7e6a587b5895519dd0983ec9b8f676771b
Make ImageView drawable update more efficient in some cases.

When updating the view's drawable via setImageResource or setImageURI,
make sure to skip the layout pass if the old and new drawable have equal
sizes. This follows what is already done for setDrawable().

Change-Id: If73d225e38d0a2f7c616c4aeb33f67bdaed390f1
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.

Change-Id: Iaaa556ffab3ed4be1da8016ed40d0a9c2efcde01
Add Tuenti to not showing R on signal bar

That is a virtual carrier and is always on Roaming because of some compatibilities issues with Movistar(real carrier).

Change-Id: I838c03e9a3ec4945fb8a9b3d6ce229fc8d5f6b40
base: added national roaming info for Play in Poland

http://jira.omnirom.org/browse/OMNI-105

Users of Play in Poland (MCC 260 MNC 06) can roam on
Plus, T-Mobile, Orange (MNCs 01/02/03)

Change-Id: I8ea62b0ca40bac9ced11802ee8ef583d6392a199
AudioService: Restore volumes after boot and when a headset is plugged

The correct volume levels for <device>_speaker and <device>_headset are not restored after booting and when a headset device is plugged in or out.

This fixes a glitch where the first volume change event causes the volume to be reset to the last stored value instead of increasing/decreasting it by one step.
base: fix external sdcard mountpoint

It needs to add that line on init.xxxx.rc on rootdir folders.

"chown root root /mnt/media_rw"

Needed for devices that has some troubles mounting storages.

Credits: http://forum.xda-developers.com/showthread.php?t=2537793

Change-Id: I0c9e2ae5439c8d8a762904e2760eb6590ce77a62
Disable touch while using the stylus (Galaxy Note)

Android 4.0 cannot form multitouch events from multiple input
devices. So it is not possible to report one touchpoint from the
stylus position and, at the same time, another touchpoint from a
finger touch. Instead, when a new input device starts up the currently
active input is cancelled. This is highly undesirable while writing
with the pen.

The easiest solution is to ignore non-stylus touch events while the
stylus is within range (hovering) of the touchscreen. For example,
N-trig digitizers implement this in hardware. But wacom digitizers do
report pen data simultaneously with touch data. This patch disables
(non-stylus) touch input within 50ms of stylus data. On my Galaxy
Note this is necessary to make stylus input usable.

Change-Id: I22a71bfac3473da711227420d06e438e56df00b0
Base: Prevent lock/unlock sound during music playback

Lock/unlock sound mixes in with music and causes
lag and distortion.

Change-Id: Ide6c2cdd9b56379619ffc485d80f0106d23dec10
Parse UUID string with Long.parseLong

Integer.parseInt throws an NFE for values greater than 0x7fffffff.

Change-Id: I4a67c96e1fcdb68b22447f98bc898638c8c317a0
ActivityManagerService: stay away from zombie content providers

When the lowmemorykiller kills a content provider in an unfortunate
moment, an innocent client app can become attached to a zombie provider
and be unconditionally killed moments after, when the dead provider is
being removed.
Prevent this race by addition of isAlive function to Process.java that
determines whether a process is still running and is not only a zombie,
add a check of the state of the provider process to getContentProviderImpl.

Change-Id: Id753b8dab103e4b447c4138468938ca9f5cb857d
ContentProviderRecord: Remove external process reference when finalized

ContentProviderRecords is removed from provider map by activity manager service
when the process hosting the content providers terminates and this causes GC
to free the content provider records but the reference to external process
using the content provider isn't cleared. Fix is to clear the reference and
unlink for death notification.

Change-Id: I67fd10cee57b02257792d0c9b4569fe11dea7648
PackageInfo class incorrectly referenced as a struct.

Change-Id: Ie38b2b3ed82a6d5f99b6c574af53ae5bda7371d5
Smooth Spinners: Makes the loading "spinner" animation smoother in non-holo apps

The loading "spinner" animation is quite jerky by default when the progress xml's from
drawable are called in applications that don't use the holo progress animation. The holo
"spinner" animation is already smooth by default. This makes every other "spinner"
animation smooth.

We've been changing this value in all ROM's we release, both AOSP and CM based ones
as well as stock ROM's, since it gives a more polished look to the entire system. In the past
3 years we've been using this small tweak we have not noticed anything that would
adversely affect battery life or system operations as a whole.

Signed-off-by: Sar Castillo <sar.castillo@gmail.com>