Deactivate multi-thread in multi-dex mode

It should already have been the case, but it wasn't and it crashed.

Change-Id: Icb461d6e43ef2d113f59038d8c2327f3cfaff86c
(cherry picked from commit cf069ca52f2af9f70fcbeac99443f00401d43b4a)
Fix synchronization when preparing ids.

Synchronized blocks were using different locks.
Replaced by a safer version: marking intern method synchronized.
This means synchronizing more than necessary but it had no
mesurable perfomance impact.

Bug 11744785

Change-Id: I35e691232cd6971d13735be9b72969739ef71e09
(cherry picked from commit 5c4883e75b26a002c67bfa1c0053c50e17dbac90)
Fix BufferOverflowException when merging dexes

Bug: 11519714

The bug was due to the fact that when merging 2 dexes, not enough size may be reserved for the "typeLists" section.
This is because we only aligned the sum of the size of both sections.
If both typeLists sections were aligned with 2 and not with 4, we are 4 bytes short when writing.

Change-Id: I73b51eb25434a622143011741a69b88d42507f43
(cherry picked from commit 2241dbe132cf90b58f93c014bdd807405b7f82f5)
Merge "Fix synchronization when preparing ids." into klp-dev
Merge "Deactivate multi-thread in multi-dex mode" into klp-dev
Changed dvmDexCacheStatus to check for odex file first.

This prevents the generation of a new dexfile when an odex file already
exists when switching between Art and Dalvik.

Bug: 13463154
Change-Id: I55ef9abe1fe172ee656550e78556381f95698c33
Merge tag 'android-4.4.3_r1' into HEAD

Android 4.4.3 release 1
dalvik: use memmove_words for word atomic memmove

use memmove_words for word atomic memmove

Change-Id: Ife31c217f7038f5054969b4bbe1108b351881b3b
Dalvik :Increase the upper limit check for DexOpt Deps table

Increasing upper limit check for the Deps table as additonal
jars added causes the dalvik to crash while performing dexopt
on cached jar files. This is needed for passing cts test case
which is part of libcore.java.util.jar.DalvikExecTest class

Change-Id: I6d8d79be2f400585fb89382b1923f2a0494b4393
CR:681070
Dalvik :Increase the upper limit check for DexOpt Deps table

Increasing upper limit check for the Deps table as additonal
jars added causes the dalvik to crash while performing dexopt
on cached jar files. This is needed for passing cts test case
which is part of libcore.java.util.jar.DalvikExecTest class

Change-Id: I13e7f4b0a5f9fe11fceb447ae3f64e8dc4ccf164
CR:697166
Revert "Revert "dalvik: add placeholder for future changes""

This reverts commit cd2251b84a8c15d970267b77e8116ee0b26289e0.

Change-Id: I399e390fbd1e42b935f1e4ac9d905a9d1e635e96
dalvik: Rename perf flag

Change-Id: I5aab012bbe9e461d24011bca3b3c0fa17b22be5f