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.
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.
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.
* 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.
This introduces a new Uri form of Intent with an "intent:" scheme, and a
corresponding update to the parser to handle these, so that the browser
can use this generic facility for starting activities based on the links
that are clicked and allow for web pages to link to arbitrary intents.
There is also a new "package" field on Intent which allows you to limit
the components it finds to a given package. This replaces the new method
that was added to PackageManger for doing this when resolving activities,
and implements it for all Intent queries against the package manager.
* changes:
Replace the stub GoogleTransport with callout to the GoogleTransportService (which lives in vendor/google). Use the Google transport by default. Also, fix a bug: Thread.run() != Thread.start()
This is a workaround for a touch mode issue.
Touch mode is propagated lazily to windows. This causes problems in
the following scenario:
- Type something in the AutoCompleteTextView and get some results
- Move down with the d-pad to select an item in the list
- Move up with the d-pad until the selection disappears
- Type more text in the AutoCompleteTextView *using the soft keyboard*
and get new results; you are now in touch mode
- The selection comes back on the first item in the list, even though
the list is supposed to be in touch mode
Using the soft keyboard triggers the touch mode change but that change
is propagated to our window only after the first list layout, therefore
after the list attempts to resurrect the selection.
The trick to work around this issue is to pretend the list is in touch
mode when we know that the selection should not appear, that is when
we know the user moved the selection away from the list.
This boolean is set to true whenever we explicitely hide the list's
selection and reset to false whenver we know the user moved the
selection back to the list.
When this boolean is true, isInTouchMode() returns true, otherwise it
returns super.isInTouchMode().
This was causing the system server to quietly die. Naughty DBUS!!
Now you will just see errors in the log "DBUS connection disconnected"
on every DBUS call.
There is still the root cause problem of why the DBUS connection disconnects,
which is not addressed by this change.
* changes:
Remove circular dependency in PackageManager. api freeStorage uses PendingIntent from android.app Create a new public IntentSender class that can be used by PackageManager instead. This new class uses IIntentSender internally and can only be created by PendingIntent for now. Provide a new getIntentSender api in PendingIntent to create an instance of this class. Move IIntentSender and IIntentReceiver from android.app to android.content Change imports of IIntentSender and IIntentReceiver to reflect the new package name The PackageManager api has been named as freeStorageWithIntent and will be renamed as freeStorage once the older api(which has been deprecated) will be removed shortly.
Create a new public IntentSender class that can be used by PackageManager instead.
This new class uses IIntentSender internally and can only be created by PendingIntent for now.
Provide a new getIntentSender api in PendingIntent to create an instance of this class.
Move IIntentSender and IIntentReceiver from android.app to android.content
Change imports of IIntentSender and IIntentReceiver to reflect the new package name
The PackageManager api has been named as freeStorageWithIntent and will be renamed as freeStorage
once the older api(which has been deprecated) will be removed shortly.
* changes:
Using Locale to specify language and country for a TTS language to load, rather than a String. Cleanup in doc for TextToSpeech, and addition of queue mode constants.