Fix potential invalid array access if start index is before the
beginning of the array or start + count is past the end of the array.
Update Javadoc for mirror to reflect the usage of "start" and "count".
Change-Id: I7e596de8eae5c518a2b4ff0d28604bd9c59f9d9d
The core backup/restore classes [BackupManager, BackupAgent, RestoreSession, and
RestoreObserver] are now published for 3rd party developers, as well as the suite
of helper classes that exist so far to aid authorship of backup/restore agents.
In conjunction with the API change, the restore-time automatic data wipe has now
been removed: applications are responsible for managing the logic of wipe vs
merge themselves. If the app's agent onRestore() callback throws, the data
is presumed to be incoherent and a wipe is issued via the Activity Manager;
otherwise, no automatic action is ever taken.
Change-Id: I0b3418b829d4689b58b88be3d9c4ace37a8583a9
MemoryFileTest.testPurge() can fail if the process runs
out of file descriptors before the kernel starts purging ashmem areas.
Before, there was no finally block to close the open ashmem
file descriptions, which caused random other tests to fail.
I also changed the size of the memory areas to 10MB, which
should cause it to run out of memory before it runs out of file
descriptors. It now fails with this instead:
java.io.IOException
at android.os.MemoryFile.native_pin(Native Method)
at android.os.MemoryFile.allowPurging(MemoryFile.java:189)
at android.os.MemoryFileTest.testPurge(MemoryFileTest.java:53)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:430)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)
I'm not sure why, but it could be that the kernel is purging the just
allocated area instead of an old one. That seems like bug.
See http://b/issue?id=2203775
Change-Id: Ia7930a714378474dd4c2c6709da40c08e715ab6f
For the system server process, do the disableJitCompilation/startJitCompilation
callbacks depending on whether the system is in safe mode or not.
In addition, if the system is found to be in safe mode, a flag will be set in
the Zygote class which will be used to launch subsequent apps in VM safe mode.
Bug: 2267590
Currently there is no way for an application built against the API to
access East Asian Width data from ICU. This adds an API for applications
to use to access it for correct drawing of international characters.
Change-Id: Iab50698ee555ae2ca8ab4b242cc14aa6e0dc3b48