Fixed cancel() not working correctly

The method handleMessage(Message msg) from mHandler variable was
not checking if the timer was cancelled, so
sendMessageDelayed(obtainMessage(MSG), delay) was keeping the
timer alive. The patch simply adds a boolean and checks if the
CountDownTimer was cancelled before calling
sendMessageDelayed(obtainMessage(MSG), delay)

bug: https://code.google.com/p/android/issues/detail?id=58668

Change-Id: Ic6bbb9d33a3616f8503db222513cc14ad2270cb8
Signed-off-by: jl1990 <jlcarrasco1990@gmail.com>
Vpn: Setup routes.

Change-Id: Ia00467fbc4324ca5f6dab6e0ff2609cd5de9a423
Remove java.io.tmpdir assignment in AndroidRuntime.

This value is overridden by the framework anyway
(see ActivityThread.handleBindApplication). Besides,
it doesn't seem like a great idea to let tools clutter
/sdcard/ with temp files.

Change-Id: I26c710cbea7397f89e6103e54a73044a87da95b1
Structure device not freed in error case

In case of an error in the call usb_device_get_fd()
the memory created by usb_open_device() is never
freed.

Added a call to usb_device_close in case of error to
release the allocated memory.

Change-Id: Iaa83674f000242d80604dd30c782236f7afd90c2
Volumes in Settings/Sound is slow to start

There is a delay after pressing volume menu item
there is a delay until the Volume popup is shown.

The reason for this is that the initialization of
the different seekbars is slow and run in the main
thread. More specifically the call to get the
ringtone from the RingtoneManager is causing this
delay.

Moving the call to the ringtone manager to the
handler thread used to play ringtones to make
the launch of the volume dialog a bit snappier.

Change-Id: I76da0226592468debd542d67164b37b2b59897c7
Hide emergency label if signal bars are hidden

Change-Id: I2eb77829fce57170641edcd268b5df603013d674
Added ProfileTile [1/2]

Change-Id: I74548af63531a245c700cc5b50f97919de7cfcf8
Revert "Hide emergency label if signal bars are hidden"

This reverts commit f2e52616e3a9715d3abdb96970c02cd404a1653f.
fixes

Change-Id: I581016a076b45f332a48f2e1757b990221f7ae6b
Revert "Volumes in Settings/Sound is slow to start"

This reverts commit fca70cb4d0f63bf1706422e81a6be8cce8e4b8f7.
Revert "Structure device not freed in error case"

This reverts commit 0c8b1b95a386bcff315353afb4305ec50de2d1f6.
Revert "Remove java.io.tmpdir assignment in AndroidRuntime."

This reverts commit dc4156fcffc21591b929cb6f0156b0904f44d774.
Revert "Vpn: Setup routes."

This reverts commit f5f7911d853aa4e93f44bb2cb869c8c6d6b1587e.
Revert "Fixed cancel() not working correctly"

This reverts commit 309cd6d1e625b48347405ea4623915c501be5819.