Remove GB alert drawable from reboot menu

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
Update list of all audio files.

This adds a script that can generate the list from the other
makefiles.

This also regenerates the list.

Bug: 6336895
Change-Id: If1546c4a3f5b1f0d7c3ca79d29383e9843b2a89d

Conflicts:
	data/sounds/AllAudio.mk
Don't include flags in configuration change if their value hasn't changed.

This makes the check in updateFrom() match the logic in diff().

Change-Id: I3ab4e8460f7fbf985ef55b9514a8aa90d401d486
Avoid unnecessary FindClass("java/lang/String").

Use previously retrieved global reference instead.
Check for NULL after creating the global reference.

Change-Id: I21670d2ef0f63ddb5801dd21e7e56359e5519479
Fixed incorrect calculation of dirty invalidation area

Padding was already taken into consideration before calling
invalidateDrawable in ProgressBar.

Change-Id: Id7f23bd15bb19e2294c07adb2acb397100ea97e8
Do not set the network mode differently for LTE+CDMA

ro.telephony.default_network can be set if needed to set a different
value for LTE+CDMA. No need to hardcode preferred network mode in the source code.

Change-Id: Iae65f72a6a3bc31d500c5ecec87368a6f2a5d117
Fix deadlock of WebViewCoreThread

There was a deadlock in destroy process.
Investigation showed that WebViewCoreThread is waiting some
callbacks but in this case WebViewCoreThread can not resume
itself not to call notify method.

Flow:
1. CallbackProxy.sendMessageToUiThreadSync
2. WebViewClassic.destroy()
3. CallbackProxy.blockMessages()
4. CallbackProxy.handleMessage is called via MainThread
5. The WebViewCoreThread deadlock is occured.

The cases we have to call notify method are followings.
OVERRIDE_URL
CREATE_WINDOW
SAVE_PASSWORD
NOTIFY
OPEN_FILE_CHOOSER
JS_ALERT
JS_CONFIRM
JS_PROMPT
JS_UNLOAD
JS_TIMEOUT

Change-Id: I9d95ae500bf6338d77b32b5fa15de7cff5720d0f
Set foreground priority for shutdown receivers.

The broadcast of ACTION_SHUTDOWN has a timeout of 10 seconds. To
reduce the risk of hitting the timeout and speeding up the
shutdown sequence in ShutdownThread we set the priority of the
BroadcastReceivers to FLAG_RECEIVER_FOREGROUND.

We have seen that this change reduces the shutdown time when
the system is under heavy load.

Change-Id: I22cbf6af8cf6fc4bdefaa1c3da8a7eed7e7b7674
handle negative temperature

When the battery temperature drops to below zero, BatteryLevelInit()
fails to show negative temperature. Because the type is unsigned
and the size of bit field is 10 bits.
So to handle negative temperature, change the type of battery temperature
from "char" to "short". And extend the size of temperature bit field
from 10 to 11 bits, which first bit is used for the sign bit.

Before:
31             24                    14                 0
+---------------+---------------------+-----------------+
| Battery Level | Battery temperature | Battery Voltage |
+---------------+---------------------+-----------------+

After:
31           25                      14                 0
+-------------+-----------------------+-----------------+
|Battery Level|  Battery temperature  | Battery Voltage |
+-------------+-----------------------+-----------------+

Bits 31..25: battery level percentage (7 bits unsigned)
Bits 24..14: battery temperature (11 bits signed)
    First bit is used for the sign and others for the temperature
Bits 13..0: battery voltage in 0.001 volt units (14 bits unsigned)

Becuase of changing the format, let the BatteryStatsImpl.VERSION field
increment.

Bug: 8009514
Change-Id: Iaa12f4d3f14e6cf4d73bc1a23d81c60f9677a499

Conflicts:
	core/java/com/android/internal/os/BatteryStatsImpl.java
FastScroller: Fix to use appropriate index

Fix FastScroller to use appropriate index to determine the
the position of a section while calculating the y coordinates
of thumb. In case of last section, use totalItemCount to determine
next section position.

Change-Id: I89bfd483949b5c14f85303b50380a73b4a4e635e
Fix build.

Change-Id: Icdbf7811e7acb8bed372def3beec8385a631713a
Prevent MediaScanner infinite loop with invalid path

including double slash  "/storage/sdcard0/xx//xxx/xxxx"

Change-Id: I112a70c88b5ec662482b79c3151310b9b9b52e40