18 Commits

Author SHA1 Message Date
Tobias Haamel
1e84ac5122 Fix permission exception thrown on exit car mode.
Changing the status bar behavior requires special permission.
Since disableCarMode is called out of a context that might not have this
permission, the calling identity is cleared before changing the status
bar behavior.
2010-02-17 13:05:36 -08:00
Bernd Holzhey
bfca3a0056 Add the automatic handling of night/notnight UI modes.
The automatic switching between night/notnight is based on the calulcation of
the civil twilight of the current location. The location is mainly retrieved
from the NetworkLocationProvider.

Automatic switching will only be available, when
1) the device is in UI_MODE_TYPE_CAR
2) the setting for the UI mode are set to 'automatic'

If mode is set to automatic, the next twilight is caluclated and
an alarm is set that timestamp. The alarm will trigger a new calculation
of the twilight and sets the UI_MODE_NIGHT to the appropriate value.

	modified:   services/java/com/android/server/DockObserver.java
	new file:   services/java/com/android/server/TwilightCalculator.java
2010-02-16 17:10:39 +01:00
Daniel Sandler
0e9d2af2d6 New user interface sound effects:
- Low battery. (http://b/2320026)
 - Dock/undock events.
 - Keyguard lock/unlock events.

New system settings have been created to turn these on/off
and to specify the relevant sound files.

[Production notes: The provided low battery sound and dock
sounds were synthesized; the lock screen sounds are
processed samples of a ballpoint pen click mechanism.]

Bug: 2320026
Change-Id: I374285b0f94f59c7555bb8816580f5a8c802e90d
2010-02-12 23:26:12 -05:00
Daniel Sandler
a0430a1860 Disable distracting status bar ticker text in car mode.
Bug: 2420702

Change-Id: I17ade6355b60da5e77d17f3556c86a4aaf40d173
2010-02-12 01:06:22 -05:00
Tobias Haamel
27b28b3f62 Introduce special UI modes for night and car usage.
The device mode is now called ui mode. Furthermore is the order of
precedence for the resources now in such a way that the ui mode needs
to be specified after the orientation and before the density.

The ui mode can be set, like it is done for the locale, as follows:

IActivityManager am = ActivityManagerNative.getDefault();
Configuration config = am.getConfiguration();
config.uiMode = Configuration.UI_MODE_TYPE_CAR | Configuration.UI_MODE_NIGHT_ANY;
am.updateConfiguration(config);

To allow users to disable the car mode and set the night mode the IUiModeManager
interface is used.

The automatic night mode switching will be added in a separate change.
2010-02-11 21:25:58 +01:00
Jim Miller
31f90b62e8 Fix 2385283: Add DevicePolicyManager calls to LockScreen. 2010-01-20 14:48:37 -08:00
Dianne Hackborn
1c633fc89b Implement API to have new broadcasts replace existing broadcasts.
Use this in various places where it should serve no purpose to deliver
both broadcasts.  This is intended to reduce somewhat the flurry of
broadcasts that we churn through during boot.
2009-12-14 15:03:35 -08:00
Jaikumar Ganesh
3fbf7b62bb Add support for Car Dock.
Dr No: Eastham
Bug: 2133530
2009-12-03 11:35:37 -08:00
Mike Lockwood
1d06992536 Do not force screen on when undocking from the desk dock.
The fact that the phone is losing power will do this anyway,
and this fixes (or works around) bug b/2250075
(Desk dock clock app sometimes doesn't exit when removing a sleeping droid from the dock)

Change-Id: I7b8b6cfb44ca16d2d9eb67589cb9d9a108a8de82
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-11-11 18:14:47 -05:00
Dianne Hackborn
4949334d20 Fix issue #2161726: Car dock app bypasses setup wizard
We now just don't send out dock broadcasts/launches when the
device is not provisioned.  Good enough for our purposes.

Change-Id: Iee6384121675e0e9854745ec1168245e8a23a241
2009-10-02 12:38:34 -07:00
Mike Lockwood
733fdf34b6 Disable keyguard while docked when the lock screen is insecure.
Change-Id: If6e11bb49a2cbbe904517e6037d1e8b99fe2717c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-28 19:21:07 -04:00
Dianne Hackborn
9bfb707597 Various fixes and improvements to window, activity.
- New meta-data you can add to a dock activity to have it launched by the
  home key when the device is in that dock.

- Fix a deadlock involving ActivityThread's internal content provider lock.

- New window flag to have a non-secure keyguard entirely dismissed when a
  window is displayed.

- New WindowManagerPolicy APIs to allow the policy to tell the system when
  a change it makes during layout may cause the wall paper or
  overall configuration to change.

- Fix a bug where an application token removed while one of its windows is
  animating could cause the animating window to get stuck on screen.

Change-Id: I6d33fd39edd796bb9bdfd9dd7e077b84ca62ea08
2009-09-22 13:39:34 -07:00
Mike LeBeau
1f6c7e6a2b Change the broadcast intent for dock state changes from a sticky broadcast to
a sticky ordered broadcast. This is so individual apps can override the default
behavior and stop the related dock app from launching.
2009-09-19 18:06:52 -07:00
Mike Lockwood
9092ab4d45 Add support for launching activities when attaching to a car or desk dock.
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>
2009-09-16 14:43:21 -04: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
d0e82cec71 Do not send dock state changed broadcasts until the system has finished booting.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-28 13:36:14 -07:00
Mike Lockwood
e4465e2eac DockObserver: minor cleanup.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-24 13:51:58 -07:00
Dan Murphy
c9f4eaf438 Dock changes:Docking station intents
Docking station intents for dock switch driver.
Add DockObserver and updated Intent.java and systemserver.jave

Signed-off-by: Dan Murphy <D.Murphy@motorola.com>

	modified:   core/java/android/content/Intent.java
	new file:   services/java/com/android/server/DockObserver.java
	modified:   services/java/com/android/server/SystemServer.java

Docking station updates

Add constants for the dock

Signed-off-by: Dan Murphy <D.Murphy@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-17 15:23:24 -04:00