Restore a few external allocation constants for compatibility.
Aspects of the external allocation facility were exposed through the
VMDebug getAllocCount method. In a previous change I removed all of
the references to external allocation from getAllocCount. This had
the unfortunate side effect of breaking some CTS tests and causing the
VM to abort if the old constants were provided to getAllocCount on an
asserts enabled dalvik build.
The straight forward workaround seems to be to restore the special
treatment of these values in getAllocCount for as long as we support
the public interfaces of the external allocation facility. An easier
way out may have been to make the failure case of getAllocCount return
0 instead of -1 and aborting on an asserts build. Without some
analysis of API usage in market I would prefer to not change the -1
return value to 0 as it seems the thread counts currently return -1.
This change also eliminates the conditional export of the enum values
related to external allocation. Those values are published API so it
makes no sense to maintain a way to guard their inclusion.
Change-Id: I49c173e0ec305536760c7aec15eebdc29213fc56
2 files changed