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.)
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.
ro.sf.lcd_density is usually defined in the build.prop file which is parsed by init
before anything else. Since its name begins with "ro.", this property is write-once
and cannot later be modified, e.g. in /system/etc/init.goldfish.sh.
In other words, you cannot use "emulator -prop ro.sf.lcd_density=<value>", since
it is impossible to override the value defined in build.prop
This patch modifies the system to recognize "qemu.sf.lcd_density" as an override
value, which can be set with "emulator -prop qemu.sf.lcd_density=<value>", forcing
a specific density.
A later patch will allow the emulator to automatically set this property depending
on AVD hardware configuration settings.
The Resources class keeps a cache of known resources. The keys used by the
cache are stored as int primitives. For any given drawable resource, a key
is built thusly:
TypeValue.assetCookie << 24 | TypedValue.data
In the case of a plain color drawable, assetCookie always equals -1, that
is 0xFF once right-shifted and the data contains the color value. Which
means the key for the following two colors is the same:
0xFF000000
0x00000000
Because of the int storage and the use of the (constant in this case)
asset cookie, the alpha channel of a color is ignored. That means that
if you first load an opaque black color (0xFF000000), subsequent loads
of a totally transparent black color (0x00000000) will give you an
opaque black color.
A workaround is to use a transparent color that is not black,
0x00000001 for instance. Note that this issue would arise with any color
and any opacity level.
The solution to fix this issue is simply to change the cache to use
longs instead of ints to represent the keys. A key thus becomes:
TypedValue.assetCookie << 32 | TypedValue.data
This allows us correct storage of all colors at the cost of a few bytes.
The tradeoff is that we can keep caching ColorDrawable, which is
definitely worth it.
Merge commit '7153739a92dda971fd865defae0747bec921d8af'
* commit '7153739a92dda971fd865defae0747bec921d8af':
Grouping under TextToSpeech.Engine the constants to be used by
* changes:
Grouping under TextToSpeech.Engine the constants to be used by a TTS engine implementation or a settings application for default values, and data integrity check return codes.
Merge commit '77dcf735ff3115ef20244408313823d489d88143'
* commit '77dcf735ff3115ef20244408313823d489d88143':
Work around the Czech lack of abbreviated month names.
Merge commit '5ad76ef5ee1b437b4c07ed0be78ec7cc16c81dfe'
* commit '5ad76ef5ee1b437b4c07ed0be78ec7cc16c81dfe':
load entropy data at boot. Periodically write entropy data to disk.