1121 Commits

Author SHA1 Message Date
Dianne Hackborn
93e462b79d Implement issue #1780928: Need support hiding nav keys.
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
2009-09-15 22:50:40 -07:00
Dianne Hackborn
c562481380 am 6ee7b04d: Merge change 25192 into eclair
Merge commit '6ee7b04d270824214fca0296d0386e0c3d733cdf' into eclair-plus-aosp

* commit '6ee7b04d270824214fca0296d0386e0c3d733cdf':
  Some improvements for wallpaper configuration.
2009-09-15 19:12:08 -07:00
Android (Google) Code Review
6ee7b04d27 Merge change 25192 into eclair
* changes:
  Some improvements for wallpaper configuration.
2009-09-15 22:06:24 -04:00
Mathias Agopian
d071bbd7fb am 49071af7: Merge change 25188 into eclair
Merge commit '49071af7bd19491f21f23a59621227ef48c11146' into eclair-plus-aosp

* commit '49071af7bd19491f21f23a59621227ef48c11146':
  make the window-shade use an opaque surface if possible
2009-09-15 19:02:17 -07:00
Dianne Hackborn
9767e41d92 Some improvements for wallpaper configuration.
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
2009-09-15 18:59:31 -07:00
Mathias Agopian
cc9f52f943 make the window-shade use an opaque surface if possible 2009-09-15 18:23:59 -07:00
Suchi Amalapurapu
ee5ece4a4d 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.
2009-09-15 16:42:20 -07:00
Mike Lockwood
744dfae2e9 am 6d9eebe7: Merge change 25090 into eclair
Merge commit '6d9eebe7320637f0256c077ba5ed6724b5a4ab0d' into eclair-plus-aosp

* commit '6d9eebe7320637f0256c077ba5ed6724b5a4ab0d':
  Move backlight brightness from HardwareService to PowerManager
2009-09-15 13:46:43 -07:00
Mike Lockwood
237a29923a Move backlight brightness from HardwareService to PowerManager
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>
2009-09-15 15:47:09 -04:00
Ken Schultz
dd4819f377 am 74a0b820: Merge change 25089 into eclair
Merge commit '74a0b8209e0228bb48739a4b25e489e2eba2a2c4' into eclair-plus-aosp

* commit '74a0b8209e0228bb48739a4b25e489e2eba2a2c4':
  DockObserver wakes the display when broadcasting a change
2009-09-15 11:53:39 -07:00
Ken Schultz
f02c0740d3 DockObserver wakes the display when broadcasting a change
- normal display timeout applies after wake

Signed-off-by: Ken Schultz <kschultz@motorola.com>
2009-09-15 10:58:05 -04:00
Mike Lockwood
5cf8d00f0c am f73f91c5: Merge change 25012 into eclair
Merge commit 'f73f91c5b1f66bbe4b3ca59b743a62ad5a65853f' into eclair-plus-aosp

* commit 'f73f91c5b1f66bbe4b3ca59b743a62ad5a65853f':
  PowerManagerService: Use 5 cm threshold for the proximity sensor.
2009-09-15 07:38:56 -07:00
Dan Murphy
fce5c3d6ee am 4e3cdf85: Merge change 23619 into eclair
Merge commit '4e3cdf854441b84c15fd9f127127b6d116834c51' into eclair-plus-aosp

* commit '4e3cdf854441b84c15fd9f127127b6d116834c51':
  Add automatic lighting control framework
2009-09-15 07:38:50 -07:00
Mike Lockwood
d20ea369b2 PowerManagerService: Use 5 cm threshold for the proximity sensor.
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>
2009-09-15 02:29:28 -04:00
Dan Murphy
951764b970 Add automatic lighting control framework
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>
2009-09-15 02:29:15 -04:00
Dianne Hackborn
a4160068be am 294cd985: Merge change 24850 into eclair
Merge commit '294cd9856e30daa07efbdd7d925b3fad8cb123de' into eclair-plus-aosp

* commit '294cd9856e30daa07efbdd7d925b3fad8cb123de':
  Last big work on #1991910: Make swipes work with capacitive keys
2009-09-14 18:14:51 -07:00
Dianne Hackborn
83fe3f5592 Last big work on #1991910: Make swipes work with capacitive keys
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
2009-09-14 17:53:52 -07:00
Dianne Hackborn
7c32e4bc30 am d023f9a9: Merge change 24829 into eclair
Merge commit 'd023f9a9a90705410250cd86bc6446c738423a99' into eclair-plus-aosp

* commit 'd023f9a9a90705410250cd86bc6446c738423a99':
  Some optizations to wallpaper drawing/scrolling.
2009-09-14 15:54:08 -07:00
Android (Google) Code Review
d023f9a9a9 Merge change 24829 into eclair
* changes:
  Some optizations to wallpaper drawing/scrolling.
2009-09-14 18:45:42 -04:00
Dianne Hackborn
19382ac1a4 Some optizations to wallpaper drawing/scrolling.
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
2009-09-14 15:29:44 -07:00
Mike Lockwood
f6cd6d63db am 31504f0b: Merge change 24847 into eclair
Merge commit '31504f0bf41f65500c46af448dc3bad2523e70f4' into eclair-plus-aosp

* commit '31504f0bf41f65500c46af448dc3bad2523e70f4':
  PowerManagerService: Fix keyboard backlight support:
2009-09-14 12:45:44 -07:00
Mike Lockwood
a625b38cb3 PowerManagerService: Fix keyboard backlight support:
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>
2009-09-14 15:08:37 -04:00
Robert Greenwalt
905d7f57d4 am f376c837: Merge change 24805 into eclair
Merge commit 'f376c837ea9d5b89c668ff8306f2a404bed4ff05' into eclair-plus-aosp

* commit 'f376c837ea9d5b89c668ff8306f2a404bed4ff05':
  Don't init wifiChannels until after supplicant up
2009-09-11 18:14:10 -07:00
Robert Greenwalt
7c9bf7caa2 Don't init wifiChannels until after supplicant up
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
2009-09-11 17:23:35 -07:00
Nick Pelly
e7eb85cae0 am 005b228c: API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.
Merge commit '005b228cdfb369d9b3b325884c0337ba5968bf8c' into eclair-plus-aosp

* commit '005b228cdfb369d9b3b325884c0337ba5968bf8c':
  API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.
2009-09-10 19:01:25 -07:00
Nick Pelly
005b228cdf API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.
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
2009-09-10 18:52:21 -07:00
Robert Greenwalt
404d8d164f am f3f72003: Merge change 24588 into eclair
Merge commit 'f3f720031932500d92090b0093393651e7a713e0' into eclair-plus-aosp

* commit 'f3f720031932500d92090b0093393651e7a713e0':
  Fix for multi-apn MMS access.
2009-09-10 18:19:24 -07:00
Android (Google) Code Review
f3f7200319 Merge change 24588 into eclair
* changes:
  Fix for multi-apn MMS access.
2009-09-10 21:10:58 -04:00
Robert Greenwalt
8206ff30c2 Fix for multi-apn MMS access.
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
2009-09-10 18:01:01 -07:00
Christopher Tate
b7024b1cf1 am 68f591b1: Merge change 24607 into eclair
Merge commit '68f591b17537cb437ca0b25d00a6d3d08e507abb' into eclair-plus-aosp

* commit '68f591b17537cb437ca0b25d00a6d3d08e507abb':
  Try not to crash the system server because of corrupt restore data
2009-09-10 16:22:15 -07:00
Christopher Tate
5a8a1151e2 Try not to crash the system server because of corrupt restore data
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.
2009-09-10 16:08:47 -07:00
Dianne Hackborn
62e5480a70 am bcbcaa7e: Wallpapers, animations, pending intent.
Merge commit 'bcbcaa7edd32ba67c6290d79f7e7821c4b5b39ac' into eclair-plus-aosp

* commit 'bcbcaa7edd32ba67c6290d79f7e7821c4b5b39ac':
  Wallpapers, animations, pending intent.
2009-09-10 13:06:08 -07:00
Dianne Hackborn
bcbcaa7edd Wallpapers, animations, pending intent.
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
2009-09-10 12:08:50 -07:00
Mike Lockwood
a62c071f61 am 68f6f01c: Merge change 24527 into eclair
Merge commit '68f6f01cf62e0c282b570adf492352a5d4418584' into eclair-plus-aosp

* commit '68f6f01cf62e0c282b570adf492352a5d4418584':
  MountService: Use correct icon for SD card notifications.
2009-09-10 09:25:35 -07:00
Mike Lockwood
a7ef2698a6 MountService: Use correct icon for SD card notifications.
Change-Id: Ia15847c48fce7957f1a376e173d39137b661d51c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-10 11:19:57 -04:00
Nick Pelly
bf765b6c70 am 41140098: Merge change 24274 into eclair
Merge commit '411400980720895c4195c71e181831bc771a5a7b' into eclair-plus-aosp

* commit '411400980720895c4195c71e181831bc771a5a7b':
  API_CHANGE
2009-09-09 11:39:22 -07:00
Nick Pelly
16a54b2861 am aadc9220: Merge change 24202 into eclair
Merge commit 'aadc9220bd04ba8dd016fe634fabf6c91a1ce672' into eclair-plus-aosp

* commit 'aadc9220bd04ba8dd016fe634fabf6c91a1ce672':
  API_CHANGE
2009-09-09 11:39:16 -07:00
Nick Pelly
b24e11baac API_CHANGE
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.
2009-09-09 10:52:18 -07:00
Nick Pelly
de893f5503 API_CHANGE
Another round of Bluetooth API clean up, javadoc'ing and unhide'ing.

-- Symbols for getting/setting bluetooth state --
BluetoothAdapter.ACTION_STATE_CHANGED
BluetoothAdapter.EXTRA_STATE
BluetoothAdapter.EXTRA_PREVIOUS_STATE
BluetoothAdapter.STATE_OFF
BluetoothAdapter.STATE_TURNING_ON
BluetoothAdapter.STATE_ON
BluetoothAdapter.STATE_TURNING_OFF
BluetoothAdapter.isEnabled()
BluetoothAdapter.getState()
BluetoothAdapter.enable()
BluetoothAdapter.disable()

-- Symbols for getting/setting scan mode --
BluetoothAdapter.ACTION_SCAN_MODE_CHANGED
BluetoothAdapter.EXTRA_SCAN_MODE
BluetoothAdapter.EXTRA_PREVIOUS_SCAN_MODE
BluetoothAdapter.SCAN_MODE_NONE
BluetoothAdapter.SCAN_MODE_CONNECTABLE
BluetoothAdapter.SCAN_MODE_DISCOVERABLE
BluetoothAdapter.getScanMode()
BluetoothAdapter.setScanMode()

-- Symbols for getting address/names --
BluetoothAdapter.getAddress()
BluetoothAdapter.getName()
BluetoothAdapter.setName()
2009-09-09 10:52:02 -07:00
Joe Onorato
f6b1edb3af am c19efc4a: Merge change 24183 into eclair
Merge commit 'c19efc4acb5a188650e0e04813899c0a143b4a96' into eclair-plus-aosp

* commit 'c19efc4acb5a188650e0e04813899c0a143b4a96':
  Fix b/2105945 - Windowshade not closed when device locked.
2009-09-08 13:42:16 -07:00
Dianne Hackborn
da2e19c6ad am eb034652: Implement all of the infrastructure for configuring wallpapers.
Merge commit 'eb034652c2037a47ebfd99779e8383bb8bb528af' into eclair-plus-aosp

* commit 'eb034652c2037a47ebfd99779e8383bb8bb528af':
  Implement all of the infrastructure for configuring wallpapers.
2009-09-08 13:41:26 -07:00
Dianne Hackborn
2a5006c195 am c916c044: Merge change 24099 into eclair
Merge commit 'c916c04495292c86051a2c31e90cca26a9bd99c1' into eclair-plus-aosp

* commit 'c916c04495292c86051a2c31e90cca26a9bd99c1':
  Fix issue #2095422: Some fades from opaque to transparent don't work
2009-09-08 13:41:07 -07:00
Dianne Hackborn
72ba75f30c am 510469fb: Merge change 24098 into eclair
Merge commit '510469fbe1ad44c3c6255afb236f51502b6960cc' into eclair-plus-aosp

* commit '510469fbe1ad44c3c6255afb236f51502b6960cc':
  Fix bug where we wouldn't release remote provider references.
2009-09-08 13:41:04 -07:00
Bob Lee
0dbc931754 am 88e62579: Merge change 24060 into eclair
Merge commit '88e625795943dea84b2e7c32f37e71303143b728' into eclair-plus-aosp

* commit '88e625795943dea84b2e7c32f37e71303143b728':
  Integrated the profiler into the framework. We run it all the time if the persist.sampling_profiler
2009-09-08 13:40:51 -07:00
Joe Onorato
f9e0e6bd5e Fix b/2105945 - Windowshade not closed when device locked. 2009-09-08 16:24:36 -04:00
Dianne Hackborn
eb034652c2 Implement all of the infrastructure for configuring wallpapers.
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
2009-09-07 22:48:02 -07:00
Android (Google) Code Review
c916c04495 Merge change 24099 into eclair
* changes:
  Fix issue #2095422: Some fades from opaque to transparent don't work
2009-09-07 10:16:20 -07:00
Android (Google) Code Review
510469fbe1 Merge change 24098 into eclair
* changes:
  Fix bug where we wouldn't release remote provider references.
2009-09-07 10:14:44 -07:00
Dianne Hackborn
0586a1b77a Fix issue #2095422: Some fades from opaque to transparent don't work
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
2009-09-07 01:01:15 -07:00
Dianne Hackborn
a1e989b575 Fix bug where we wouldn't release remote provider references.
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
2009-09-06 21:15:41 -07:00