Merge commit '2b1aed1021fb472de83c4c0143f2c4452244a0af'
* commit '2b1aed1021fb472de83c4c0143f2c4452244a0af':
Fix Canvas.finalize() for the case where the constructor throws an exception
Merge commit 'fd5f087536dcb04ac9c46f2b19f87a37455390b0'
* commit 'fd5f087536dcb04ac9c46f2b19f87a37455390b0':
Make signature checks on restore work with unsigned apps
Merge commit 'e0b7e916a1259d2dd9c116695607f9877ec56056'
* commit 'e0b7e916a1259d2dd9c116695607f9877ec56056':
Replace the dummy code with Keystore for <keygen> support.
Merge commit '16ce3504c5bf98d95d5c36001f755bb4b15253c9'
* commit '16ce3504c5bf98d95d5c36001f755bb4b15253c9':
Make RestoreHelper and friends also write out the snapshot state.
On restore now, the backup manager gets the signature blocks corresponding to
the restore set from the transport. It then validates those signatures against
the on-device app signatures, and refuses to restore data to an app whose
on-device sig block does not match the backup image's.
Also actually implement 'bmgr transport N' so that we can select the local
transport easily during runtime.
Eat the security exception that is now thrown by the window manager to
retain the old behavior for tests. (We still need to throw the
exception from the WM for the new permission tests.)
- Fix a bug where targetSdkVersion could not be set if minSdkVersion. Stupid, stupid.
Also make sure to fail if minSdkVersion is for a code name. Really stupid.
- Change the API for resize compatibility mode to be a bit in the flags field, instead
of a separate boolean.
- Implement delayed dexopting, to avoid the looong full dexopt during boot. This is
only enabled for "eng" builds. When in this mode, the activity manager will make
sure that a dexopt has been done before loading an .apk into a process, and will
try to avoid displaying ANRs if they are due to the dexopt causing some operation
to take longer than it normally would (though I make no guarantees about this
totally working).
- Add API to Context to get the ApplicationInfo for its package, for easy access to
things like targetSdkVersion.
Merge commit '167dbe0bf1f8d807d1ced400f146b7780eb6c721'
* commit '167dbe0bf1f8d807d1ced400f146b7780eb6c721':
Update RandomBlock to use RandomAccessFile. This helps
* changes:
Update RandomBlock to use RandomAccessFile. This helps prevent certain unusual conditions from corrupting the entropy file. (for example, if Android should happen to crash while a write is in progress)
Merge commit '0bceb77b004a688ca044b794e0622385c6e2953d'
* commit '0bceb77b004a688ca044b794e0622385c6e2953d':
Fixes#1922373. Resolves a case of keys collision in Resources' cache.
InputStream.read() must return values in range [0, 255]. But the previous code
would sign extend when casting to int so return [-128, 127]. Bitwise AND with
0xff to remove sign extension.
Merge commit '07eac016446c63711bebe6e553e98c02d1fe55a5'
* commit '07eac016446c63711bebe6e553e98c02d1fe55a5':
Store the app signatures as part of the backup set
Under a pseudo-app for the Package Manager, we store the app signatures for all
participating applications installed on the device. At restore time we will
restore this first, then ensure that the current on-device signature chain is
compatible with the one in the backup set. If there's a mismatch, this may be a
spoof attempt and we will refuse to restore that app's data.
The restore side of this is not implemented, but the Package Manager agent is
here as well as the backup side theoretically pushing the data now.
Merge commit 'c9dc19bb96d2d77ec50f6e40fc22d1ff615f2044'
* commit 'c9dc19bb96d2d77ec50f6e40fc22d1ff615f2044':
Fix runtime restarts due to sending the wrong flags to dbus.
Merge commit 'b1cdb64877ebd3b8c5182913ff02edd8b54a6982'
* commit 'b1cdb64877ebd3b8c5182913ff02edd8b54a6982':
Allow the qemu.sf.lcd_density property to override the value of ro.sf.lcd_density
In eventLoopMain we were correctly translating from unix events to dbus flags,
but a coding typo then gave the unix events to dbus. Fix this typo.
Also noticed that we were passing raw dbus flags to poll() in another area.
This did not cause any immediate problem, since POLLIN | POLLPRI is harmless
and we do not usually need POLLOUT. But fixed anyway.