Categories CATEGORY_CAR_DOCK and CATEGORY_DESK_DOCK can be assigned to
activities to make them launchable on docked events.
This is a better mechanism than listening for ACTION_DOCK_EVENT with a broadcast receiver.
Change-Id: Ic5f3ab3555ce02ca922bc31ebba41978cefe8bda
Signed-off-by: Mike Lockwood <lockwood@android.com>
* changes:
Remove deadlock in PackageManager when installing or upgrading packages. PM first creates a temporary file from the input package uri before installing it. if the package uri points to a content uri, the content provider has to be retrieved via the ActivityManager which could cause deadlocks with the package manager locks being held. Clean up by always copying or creating temporary files before acquiring these locks. Fix issue when restoring a failed upgrade for third party apps.
This implements support for devices whose hardware can hide
their navigation keys. It works much like the existing keyboardHidden
configuration, and for compatibility uses the same configuration
change bit.
Also add FLAG_TURN_ON_SCREEN for windows, which has the system
cause the screen to be turned on when the window is displayed.
Great fun when used with FLAG_SHOW_WHEN_LOCKED!
Change-Id: I0b867f19af85cfd8786a14cea194b34f7bdd9b7a
This introduces a new activity that you can derive from to implement
a wall paper configuration activity. This is supposed to select
a theme based on whether it is being run to configure a real wallpaper
or a preview, but this is going to be more difficult to do than I
thought. :(
Also fix a problem in the white theme where the list view's background
was being set to white, so it wouldn't work on a transparent bg.
Change-Id: I26d5a8695a3c878a1664eb09900eded57eaff990
PM first creates a temporary file from the input package uri before installing it.
if the package uri points to a content uri, the content provider has to be retrieved via the ActivityManager
which could cause deadlocks with the package manager locks being held.
Clean up by always copying or creating temporary files before acquiring these locks.
Fix issue when restoring a failed upgrade for third party apps.
to prevent apps from changing the hardware behind its back.
Fixes b/2041941 Lock screen flashes the screen very bright before dimming
Change-Id: Ice757f7ae87902bdfb3634471cf44f020ebfaae4
Signed-off-by: Mike Lockwood <lockwood@android.com>
This eliminates the assumption that the proximity sensor will always return
zero distance when it is active.
Change-Id: I6245b074e4c42aeae3a181e6a5087554517046d2
Signed-off-by: Mike Lockwood <lockwood@android.com>
Add changes to have the ability to turn on and off the
automatic light sensing for the device. This is fully configurable
and is by default not present. Vendors should override the ALS setting
to enable the automatic lighting controls.
These changes will add a check box to the Brightness settings menu to give control
to the user to allow the device's display lighting to be controlled via the slide bar
or the auto lighting system.
If the user selects auto then the slide bar will become invisible. Manual mode
will present the slide bar to the user.
Change-Id: I146a6d75b99b08c9b839218ce6b85adf21f9fd73
Signed-off-by: Dan Murphy <D.Murphy@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
This takes care of allowing us to cancel the back button. The
back button is a bear because it is strewn all over the place --
everywhere you can close something, there is some code looking
for the back button that now needs to deal with being canceled.
The main things changed are activity (of course), dialog,
input method, search dialog. There are some other misc places
in the framework (and some I missed here that I will get in a
second pass).
To facility all of this, the key dispatching APIs now provide
a lot more support for dealing with looking for cancelled keys,
and incidentally also provide an actual API for catching long
key presses. This also helped clean up the code in PhoneWindow
where it deals with all of the combinations of key pressed and
releases. (And also allows people to override
Activity.onKeyLongPress() to provide a different long press
action for a standard key like search.)
And while I was doing this, I reworked how we detect long
presses by having this be part of the key event delivered by
the window manager. This should greatly reduce (hopefully
outright eliminate) the problems with long presses being
mis-detected when an application is being slow.
Change-Id: Ia19066b8d588d573df3eee6d96e1c90fdc19f57d
First, fix some issues with the final wallpaper bitmap
we use: ensure it is always 16bpp, and make sure dithering
of its bitmap is turned off. We take of dithering
when loading, to make sure we don't use it when drawing.
Also add new APIs to return the wallpaper with the equivalent
of Launcher's old FastBitmapDrawable. As doing this, also load
the default wallpaper the same way as custom ones, taking care to
resize it as needed at load time.
Finally implement a mechanism for the window manager to wait
for the wallpaper to redraw at its new position before returning
from the application's call to change the offset. This ensures
that the wallpaper better tracks the application. Note that there
is a timeout in this wait that is relatively short, and if it
expires we will run for a while without waiting.
Change-Id: Ife449437746da85958bd447e0a6cf3d2223b398c
Turn off keyboard backlight immediately when keyboard is closed.
Changing keyboard visibility state signals user activity except in the case
where the keyboard is closed and the screen is already off.
Fixes bugs b/1351141 and b/1319625
Change-Id: If4bf2c1dd8e0c2bc08196e443b6103a6041f27e1
Signed-off-by: Mike Lockwood <lockwood@android.com>
The supplicant can take up to 15 seconds to start - setting the number of wifi channels
immediately after requested wifi start often will fail.
Changed to set the number of channels when the supplicant is reported as alive.
bug:2083601
This is a large batch, and covers:
-- Bluetooth Device Discovery --
BluetoothAdapter.ACTION_DISCOVERY_STARTED
BluetoothAdapter.ACTION_DISCOVERY_FINISHED
BluetoothAdapter.startDiscovery()
BluetoothAdapter.cancelDiscovery()
BluetoothAdapter.isDiscovering()
-- Bluetooth bonding (pairing) --
BluetoothAdapter.getBondedDevices()
BluetoothDevice.ACTION_BOND_STATE_CHANGED
BluetoothDevice.EXTRA_BOND_STATE
BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE
BluetoothDevice.BOND_NONE
BluetoothDevice.BOND_BONDING
BluetoothDevice.BOND_BONDED
BluetoothDevice.getBondState()
BluetoothDevice.createBond()
BluetoothDevice.cancelBondProcess()
BluetoothDevice.removeBond()
-- BluetoothClass --
BluetoothDevice.ACTION_CLASS_CHANGED
BluetoothDevice.EXTRA_CLASS
BluetoothDevice.getBluetoothClass()
BluetoothClass.Service.*
BluetoothClass.Device.Major.*
BluetoothClass.Device.*
BluetoothClass.getDeviceClass()
BluetoothClass.getMajorDeviceClass()
BluetoothClass.hasService()
-- Misc BluetoothDevice --
BluetoothDevice.ACTION_ACL_CONNECTED
BluetoothDevice.ACTION_ACL_DISCONNECTED_REQUESTED
BluetoothDevice.ACTION_ACL_DISCONNECTED
BluetoothDevice.ACTION_DISCOVERED
BluetoothDevice.ACTION_NAME_CHANGED
BluetoothDevice.EXTRA_DEVICE
BluetoothDevice.EXTRA_NAME
BluetoothDevice.EXTRA_RSSI
-- Misc BluetoothAdapter --
BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED
BluetoothAdapter.EXTRA_LOCAL_NAME
BluetoothAdapter.checkBluetoothAddress()
I deprecated BluetoothIntent and moved each intent into the class it relates
to.
Change-Id: I877b1280428ab46278b2bc25668bb44cda22dc36
Mark cellular variants with the same availability, regardless of which are currently in use.
Availability just means the radio is enabled and sees the network, but has no guarantees that
we could connect to an APN if requested.
Fix the requestRouteToHost logic to support apn switches without WIFI.
bug:2093841
When we're about to allocate an array based on the restore data for purposes of
unflattening a signature block, don't automatically assume that it's valid. If
it's corrupt [and we've seen this in practice] we can wind up trying to allocate
an array with 1.8 million objects, and throw an OutOfMemoryError, bringing down
the system.
This change arbitrarily decides that no package should have more than 20
signatures in its block, and aborts the restore if the metadata is thus revealed
to be corrupt.
Some more tweaks and fixes to wallpapers. Make sure wallpapers are
told they are not visible when the screen is off. Add some new animations
for transitions across tasks, and fiddle with many of the existing
animations. Clean up the relationship between translucent activities
and animations. Add new API to start a PendingIntent from an
activity.
Change-Id: Ie0bf45fe44081bb6982c75361257a55d9cd9d863
Deprecate BluetoothError.java.
I spent a lot of time experimenting with a class BluetoothError to enumerate
the many error codes returned by the Bluetooth API. But at the end of the day
they were never used. The vast majority of method calls only really need a
true/false error value, and often not even that.
Methods which do need more detailed error enumeration (for example, bonding
failures) can have there own enumerated error codes. But there is no need
for a common set of error codes.
Also change the IPC failed warnings in BluetoothA2dp to Log.e. These indicate
a very serious error.
Introduce BluetoothAdapter.ERROR and BluetoothDevice.ERROR as helper sentinel
values.
Actually being able to configure a wallpaper relies on additional
work in the launcher and wallpapers that will be in another change.
Also note that this breaks all existing wallpapers, since they now
need to include a meta-data item about themselves. This also
will be fixed in another change.
Change-Id: I97d2c2bd07237abc32f92b9147c32530a2f73c71
ViewRoot was using Surface.clear(), which has different behavior
in different processes -- in the system process it would kill the
surface, causing all windows in that process to immediately disappear
instead of animating away.
This change makes Surface.release() public and uses that instead. It
also renames Surface.clear() to Surface.destroy().
Also fixed some issues in the window manager that were causing the
wallpaper to not get immediately resized when the orientation changes
and its target window is removed and re-added.
Change-Id: I2a992e365cf5747511f0bf1193db32dc2525b218
The check for whether the release call is coming from another process was
very broken, and just happened to work by chance. It also never worked for
apps that had code running in two different processes, with one process
using a provider in another of its processes. Also a little cleanup and
debugging logs for provider management, and removal of that increasingly
annoying log about services being stopped.
Change-Id: Ibc298e674db7d35c4b6499fb32e30929a141b670
This is work on the transitions with wallpapers. There are now new
animations specifically for leaving the wallpaper and returning to
it, which allow us to have a consistent animation when entering home
and returning to it. I also renamed the existing animations across
wallpapers, and cleaned up some junk in the various interpolators.
This also now hides the wallpaper surface when it is not visible,
to get rid of the wallpaper flickers people complained about albeit
in a somewhat brutal way. :) (Though really returning us to the
previous behavior with the same previous bugs and name back to them
not being very visible, yay!) There is are also some bug fixes
here and there about managing the wallpaper visibility that this
change revealed.
Change-Id: I913990a9a81651728122ed2e1101b75ed2c36fcb
This is needed to allow the BugReportService to start the dumpstate service.
Change-Id: I12cab23767c919592da102c654b6b80416717661
Signed-off-by: Mike Lockwood <lockwood@android.com>
The new code to rebuild the window list was missing some app tokens.
Also there were a few other smaller bugs floating around.
Change-Id: I7734917af0b76ee4aa304e6a5321401d87640f89
This makes the system a little more careful to not start third party
code until it is ready to.
Also fix a little bug in SyncManager that would cause it to crash
during boot if sync was in a failure state.
Change-Id: Ib2d287d8441d155d393fe740a5f98690895fd358
This addresses a few parts of the bug:
- There was a small issue in the window manager where we could show a window
too early before the transition animation starts, which was introduced
by the recent wallpaper work. This was the cause of the flicker when
starting the dialer for the first time.
- There was a much larger problem that has existing forever where moving
an application token to the front or back was not synchronized with the
application animation transaction. This was the cause of the flicker
when hanging up (now that the in-call screen moves to the back instead
of closing and we always have a wallpaper visible). The approach to
solving this is to have the window manager go ahead and move the app
tokens (it must in order to keep in sync with the activity manager), but
to delay the actual window movement: perform the movement to front when
the animation starts, and to back when it ends. Actually, when the
animation ends, we just go and completely rebuild the window list to
ensure it is correct, because there can be ways people can add windows
while in this intermediate state where they could end up at the wrong
place once we do the delayed movement to the front or back. And it is
simply reasuring to know that every time we finish a full app transition,
we re-evaluate the world and put everything in its proper place.
Also included in this change are a few little tweaks to the input system,
to perform better logging, and completely ignore input devices that do not
have any of our input classes. There is also a little cleanup of evaluating
configuration changes to not do more work than needed when an input
devices appears or disappears, and to only log a config change message when
the config is truly changing.
Change-Id: Ifb2db77f8867435121722a6abeb946ec7c3ea9d3
components by apps which could result in thrashing on the PackageManager. For apps that
do not want to be restarted when such a broadcast is sent, we can just aggregate these broadcasts and
handle them at one go.
Changes include:
New structure to hold pending broadcasts by class name. If a component is enabled or disabled frequently
aggregate component enabled/disabled settings in this structure in a 10 second window and then
send out the accumulated list of broadcasts to the ActivityManager.
A new Handler implementation handles this message
Add new attribute name EXTRA_CHANGED_COMPONENT_NAME in broadcast intent Intent.ACTION_PACKAGE_CHANGED for
additional information for apps like Launcher.
Rename a couple of parameters, the names were too jarring.
Applications can now specify two more aspects of the restore process: whether
they need to run with their own custom Application subclass rather than being
launched in the usual restricted mode during restore, and whether it's okay for
the backup manager to kill the app process once restore has completed. The new
manifest attributes for these are, respectively, android:restoreNeedsApplication
and android:killAfterRestore.
If unspecified in the manifest, restoreNeedsApplication is false, and
killAfterRestore is true.
In order to support kill-after-restore cleanly, this change also adds a new
system-process-only interface to the Activity Manager, which will schedule a
"commit suicide" event on the target app's main thread looper.
The framework backup agents have been given the appropriate new backup
attributes as well.
Some of this is temporary (in particular the two approaches for getting
process memory, one working but horrible, the other not working but
preferred) until I figure out the best way to do it.
Change-Id: I8c8f25062d481fcea22a47d459b083d2fd8a5040