337 Commits

Author SHA1 Message Date
Svetoslav Ganov
80c904df15 am 8631701b: Allow enabled accessibility service to toggle tocuh exploration after an upgrade to JellyBean.
* commit '8631701bb770f3a4e3b2a139dc282f2244fe86e6':
  Allow enabled accessibility service to toggle tocuh exploration after an upgrade to JellyBean.
2012-08-16 10:36:55 -07:00
Svetoslav Ganov
8631701bb7 Allow enabled accessibility service to toggle tocuh exploration after an upgrade to JellyBean.
1. Before JellyBean touch exploration was a global setting controlled by the user via
   the UI. However, if the enabled accessibility services do not handle touch exploration
   mode, enabling it makes no sense. Therefore, in JellyBean the services request touch
   exploration mode and the user is presented with a dialog to allow that and if she
   does we store that in the database.

   As a result of the above change a user that has enabled  accessibility, touch
   exploration, and some accessibility services running a pre-JellyBean system
   version may lose touch exploration state, thus rendering the device useless unless
   sighted help is provided, since the enabled service(s) are not in the list of
   services to which the user granted a permission to put the device in touch explore
   mode.

   The fix is during a database upgrade to allow allow all enabled accessibility
   services to toggle touch exploration provided accessibility and touch exploration
   are enabled and no services can toggle touch exploration. Note that the user has
   already manually enabled the services and touch exploration which means the she
   has given consent to have these services work in touch exploration mode

bug:6996354

Change-Id: I0af2dc578cc4fbcc90043341035163b876978ab2
2012-08-15 22:13:03 -07:00
Jeff Brown
9630704ed3 Power manager rewrite.
The major goal of this rewrite is to make it easier to implement
power management policies correctly.  According, the new
implementation primarily uses state-based rather than event-based
triggers for applying changes to the current power state.

For example, when an application requests that the proximity
sensor be used to manage the screen state (by way of a wake lock),
the power manager makes note of the fact that the set of
wake locks changed.  Then it executes a common update function
that recalculates the entire state, first looking at wake locks,
then considering user activity, and eventually determining whether
the screen should be turned on or off.  At this point it may
make a request to a component called the DisplayPowerController
to asynchronously update the display's powe state.  Likewise,
DisplayPowerController makes note of the updated power request
and schedules its own update function to figure out what needs
to be changed.

The big benefit of this approach is that it's easy to mutate
multiple properties of the power state simultaneously then
apply their joint effects together all at once.  Transitions
between states are detected and resolved by the update in
a consistent manner.

The new power manager service has is implemented as a set of
loosely coupled components.  For the most part, information
only flows one way through these components (by issuing a
request to that component) although some components support
sending a message back to indicate when the work has been
completed.  For example, the DisplayPowerController posts
a callback runnable asynchronously to tell the PowerManagerService
when the display is ready.  An important feature of this
approach is that each component neatly encapsulates its
state and maintains its own invariants.  Moreover, we do
not need to worry about deadlocks or awkward mutual exclusion
semantics because most of the requests are asynchronous.

The benefits of this design are especially apparent in
the implementation of the screen on / off and brightness
control animations which are able to take advantage of
framework features like properties, ObjectAnimator
and Choreographer.

The screen on / off animation is now the responsibility
of the power manager (instead of surface flinger).  This change
makes it much easier to ensure that the animation is properly
coordinated with other power state changes and eliminates
the cause of race conditions in the older implementation.

The because of the userActivity() function has been changed
so that it never wakes the device from sleep.  This change
removes ambiguity around forcing or disabling user activity
for various purposes.  To wake the device, use wakeUp().
To put it to sleep, use goToSleep().  Simple.

The power manager service interface and API has been significantly
simplified and consolidated.  Also fixed some inconsistencies
related to how the minimum and maximum screen brightness setting
was presented in brightness control widgets and enforced behind
the scenes.

At present the following features are implemented:

- Wake locks.
- User activity.
- Wake up / go to sleep.
- Power state broadcasts.
- Battery stats and event log notifications.
- Dreams.
- Proximity screen off.
- Animated screen on / off transitions.
- Auto-dimming.
- Auto-brightness control for the screen backlight with
  different timeouts for ramping up versus ramping down.
- Auto-on when plugged or unplugged.
- Stay on when plugged.
- Device administration maximum user activity timeout.
- Application controlled brightness via window manager.

The following features are not yet implemented:

- Reduced user activity timeout for the key guard.
- Reduced user activity timeout for the phone application.
- Coordinating screen on barriers with the window manager.
- Preventing auto-rotation during power state changes.
- Auto-brightness adjustment setting (feature was disabled
  in previous version of the power manager service pending
  an improved UI design so leaving it out for now).
- Interpolated brightness control (a proposed new scheme
  for more compactly specifying auto-brightness levels
  in config.xml).
- Button / keyboard backlight control.
- Change window manager to associated WorkSource with
  KEEP_SCREEN_ON_FLAG wake lock instead of talking
  directly to the battery stats service.
- Optionally support animating screen brightness when
  turning on/off instead of playing electron beam animation
  (config_animateScreenLights).

Change-Id: I1d7a52e98f0449f76d70bf421f6a7f245957d1d7
2012-08-15 03:06:24 -07:00
Baligh Uddin
3e300c4693 Import translations. DO NOT MERGE
Change-Id: I95bed23285699c68b623ae0e36600ec5e813db8c
Auto-generated-cl: translation import
2012-08-13 13:20:03 -07:00
Baligh Uddin
63fe5cdc74 Import translations. DO NOT MERGE
Change-Id: I8948cd5b0992133db9dc8e676b5d43b54d672e85
Auto-generated-cl: translation import
2012-08-10 11:14:46 -07:00
Baligh Uddin
03cfc54231 Import translations. DO NOT MERGE
Change-Id: I813d5cfc5f5b60e98f635dc62e9935299c903171
Auto-generated-cl: translation import
2012-08-09 12:32:26 -07:00
John Spurlock
634471edc4 Load default Dream settings into a clean db.
Set the Dream defaults during onCreate, not only onUpgrade.

Bug: 6959513
Change-Id: Ia93097edaf1150813c75b6be809db9c97987868f
2012-08-09 10:41:37 -04:00
Daniel Sandler
5927d957ea Merge "Migrate Dreams default settings to DatabaseHelper." into jb-mr1-dev 2012-08-08 08:47:40 -07:00
Daniel Sandler
fdb7c36a10 Migrate Dreams default settings to DatabaseHelper.
Also switch Dreams on for all charging devices by default.

Change-Id: Iccbcc2906d55214320b2f467e88ba9cb188f4886
2012-08-08 08:38:48 -04:00
Nick Kralevich
45576ccd76 Explicitly export content providers
In a future version of Android, the default value for
<provider android:exported> will change from true to false.
Explicitly set android:exported="true"

Bug: 3306452

Change-Id: Iffe4dca4fefc92bb9f89698f149a87c16a7ce3c5
2012-08-06 17:42:12 -07:00
Wink Saville
33034b13ca Create telephony-common and mms-common - DO NOT MERGE
These have been created to reduce the size and complexity
of frameworks/base.

mms-common was created by moving all of
  frameworks/base/core/java/com/google/android/mms
to:
   frameworks/opt/mms

telephony-common was created by moving some of
   frameworks/base/telephony
to:
   frameworks/opt/telephony

Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
2012-07-17 12:23:09 -07:00
Wink Saville
5362f17ff5 Merge commit '1b003ef0' into mit
* commit '1b003ef0':
  Create telephony-common and mms-common

Change-Id: Ie8876541dbe7f4c933cf7d69910dd204538bc975
2012-07-11 18:15:50 -07:00
Wink Saville
a639b311e9 Create telephony-common and mms-common
These have been created to reduce the size and complexity
of frameworks/base.

mms-common was created by moving all of
  frameworks/base/core/java/com/google/android/mms
to:
   frameworks/opt/mms

telephony-common was created by moving some of
   frameworks/base/telephony
to:
   frameworks/opt/telephony

Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
2012-07-11 16:02:08 -07:00
Svetoslav Ganov
11844b14d0 am 4844fccc: am 5d88c14c: Merge "Ensure screen reader URL gets updated during ICS to JB update." into jb-dev
* commit '4844fccc793078f44c8bffd1707ac589fad14f6e':
  Ensure screen reader URL gets updated during ICS to JB update.
2012-06-25 18:17:07 -07:00
Svetoslav Ganov
4844fccc79 am 5d88c14c: Merge "Ensure screen reader URL gets updated during ICS to JB update." into jb-dev
* commit '5d88c14cd39d1100e28f7e340874655ab7a42904':
  Ensure screen reader URL gets updated during ICS to JB update.
2012-06-25 17:11:12 -07:00
Svetoslav Ganov
5d88c14cd3 Merge "Ensure screen reader URL gets updated during ICS to JB update." into jb-dev 2012-06-25 17:09:24 -07:00
alanv
3a67eb3be4 Ensure screen reader URL gets updated during ICS to JB update.
Bug: 6702042
Change-Id: I771863c53fa420ba0746fce30cd17eb8b2b9fba1
2012-06-22 10:47:28 -07:00
Svetoslav Ganov
1ca3609a70 am e523faa8: am 5070a7f0: Merge "Change hard-coded URL for accessibility script." into jb-dev
* commit 'e523faa84f656785adbbd67414f9a141ec49d800':
  Change hard-coded URL for accessibility script.
2012-06-20 22:34:31 -07:00
Svetoslav Ganov
e523faa84f am 5070a7f0: Merge "Change hard-coded URL for accessibility script." into jb-dev
* commit '5070a7f0f4bf817e884b9e6ea8ee23c99209c50e':
  Change hard-coded URL for accessibility script.
2012-06-20 22:31:05 -07:00
alanv
3ff50a0a8a Change hard-coded URL for accessibility script.
The old version of the script is broken and is cached due to an error in
our gstatic configuration. We had to change the name to avoid hitting the
cached version on external proxies.

Bug: 6702042
Change-Id: I0e5ee8b3a6ae8c7ba11f5760f2f99d4b5614ac97
2012-06-20 16:51:00 -07:00
Amith Yamasani
82f47c95b6 Merge "Disable lockscreen using a system property." 2012-06-12 12:57:18 -07:00
Amith Yamasani
d1645f8d0f Disable lockscreen using a system property.
For factory testing.

Change-Id: Ie5b8be432ab8ad40d8752f978899987c95a5aef9
2012-06-12 11:53:26 -07:00
Jean-Baptiste Queru
01cb25fdde resolved conflicts for merge of 29bea61c to jb-dev-plus-aosp
Change-Id: If582e1fa99691b4e4182c3a9b148fcef5cad251e
2012-06-12 08:13:10 -07:00
Athimoolam Ealumalai
44030b7864 Added support for customization of mobile data setting.
Introduced system property "mobiledata", which will be
used for default behavior of the mobile data connection
either on/off.

This is analog to how the setting for "dataroaming" is
handeled.

Change-Id: Ifae8822dedfa55a515671014e2e29d43c469e701
2012-06-11 15:20:34 +02:00
Christopher Tate
8dfe2b9dd7 Merge restored wifi APs, don't overwrite
We now preserve any already-known AP configuration information when
restoring wifi from backup, instead of flatly overwriting the known
definitions with the historical ones.  This means that if you are
performing setup while connected to an AP unknown in the restored
dataset, you will retain your connection instead of seeing it drop
partway through the restore process because suddenly the supplicant
"forgot" how to connect to it.

Duplicates are resolved by retaining the currently-defined network
configuration and discarding the historical one.

Bug 6443790

Change-Id: I1f44cc6a01fc4ae7c4b680682a10fcb7a0be65dc
2012-05-15 17:18:22 -07:00
Daisuke Miyakawa
3c60eeb133 Have a new constant for "vibrate when ringing" setting
Bug: 6036529
Change-Id: I850d27629a75615647883fdaa2933f337c4824d1
2012-05-08 18:37:41 -07:00
Eric Laurent
bffc3d1bd3 Silent and Vibrate mode clean up
Clean up related to new Vibration policy.
The vibrate behavior is now only derived from:
 - presence of a vibrator on the device
 - current ringer mode selected: NORMAL, VIBRATE or SILENT
If no vibrator is present the ringer mode can only be NORMAL or SILENT.

The control of ringer mode via volume keys when volume keys control the "master"
stream type (RING on phones, MUSIC on tablets) is as follows:
If a vibrator is present:
 VOL- and volume equals 1: NORMAL => VIBRATE
 VOL- and volume equals 0 and not continuous press: VIBRATE => SILENT
 VOL+ and in SILENT mode: SILENT => VIBRATE
 VOL+ and in VIBRATE mode: VIBRATE => NORMAL, volume = 1
If no vibrator is present:
 VOL- and volume equals 0 and not continuous press: NORMAL => SILENT
 VOL+ and in SILENT mode: SILENT => NORMAL, volume = 0

VIBRATE_ON and VIBRATE_IN_SILENT settings are not stored/retreived any more.

AudioService checks and corrects ringer mode and stream volumes if necessary when reading from
DB at boot time.

Also:
 Added dump for stream volumes in AudioService.
 Added device names missing in AudioSystem for USB accessory and USB device.

Issue: 6036529
Issue: 6414950
Issue: 6448163

Change-Id: I77fb821ec63e4e566320cac2701b4ac466e86aef
2012-05-08 15:10:37 -07:00
Irfan Sheriff
4f4f5166c9 Fetch WifiManager instance at the time of use
Bug: 5340393
Change-Id: Idb0a6dbe969bc3c7955134df43b86f28208c73c3
2012-04-27 14:42:42 -07:00
Jeff Brown
47847f3f4d Support enabling WAL using a flag when DB is opened.
Using enableWriteAheadLogging() to enable WAL is inefficient because
we previously disabled WAL mode when the database was opened.
Switching from WAL to PERSIST then back to WAL is inefficient
and could slow down application launch time.  It would be better
to leave the database in WAL mode when we open it to begin with.

To do that, we need to know ahead of time whether we will want to
have WAL enabled for the newly opened database.

Using this flag also reduces the chance that we will encounter
an error enabling WAL mode due to there being other open connections
to the database.

Bug: 6124556
Change-Id: I38ec7a528baeda9f1ef77e25e88b3ca4b6296200
2012-03-23 13:26:26 -07:00
Eric Fischer
e7ee9a0504 Import translations. DO NOT MERGE
Change-Id: I183552feb00f1764db73bf6c7f16d5f5ef0f3b0f
2012-03-12 14:45:39 -07:00
Eric Fischer
6ff1f4fa5d Import translations. DO NOT MERGE
Change-Id: I7cfb3eeb7743f4db15ff591826d16cc316e2d915
2012-03-07 14:03:43 -08:00
Mike Lockwood
79f5a0416f WifiStateTracker: add support for overriding DCHP max retry count in an overlay
Bug: 5551068

Signed-off-by: Mike Lockwood <lockwood@google.com>

Conflicts:

	packages/SettingsProvider/res/values/defaults.xml

Change-Id: I6a6519316a87bd1af39ea9dc51e0d312011135ef
2012-02-16 10:01:44 -08:00
Mike Lockwood
d3c5e1eca1 Allow disabling network stats support in a resource overlay
Bug: 5771240

Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-10 14:44:08 -08:00
Mike Lockwood
2395527c9b SettingsProvider: Allow overridding default value for Setttings.Secure.DEVICE_PROVISIONED
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:24 -08:00
Mike Lockwood
86aeb06635 Load lockscreen.disabled setting on database create as well as upgrade
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:24 -08:00
Mike Lockwood
7bef73900b SettingsProvider: Add support for overriding lockscreen.disabled default value
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:23 -08:00
Mike Lockwood
4b797dd8c1 Allow overriding default STAY_ON_WHILE_PLUGGED_IN setting value in an overlay
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:23 -08:00
Naveen Kalla
fc2cbe9b46 Separate SIM states from Radio states
Radio state reflects the state of the modem. SIM_READY, RUIM_READY,
NV_READY are subscription states and it is possible that the new cards
have multiple subscriptions. Remove the SIM states from Radio State and
introduce a new VOICE_RADIO_TECH message to identify the exact voice
technology. SIM states will continue to be identified from the
SIM_STATUS messages.

Change-Id: Ia67d54f43b6c3340d9cf5c27fcb6f7ef49ef4d40
2011-12-29 15:08:20 -08:00
Amith Yamasani
398c83cc07 Manual merge: Update VIBRATE_ON to a supported value when upgrading from GB.
Bug: 5738552

If value has ringer set to VIBRATE_OFF, we need to update it to the
now default, as VIBRATE_OFF is inconsistent with the new UI controls.

Make sure notification vibrate setting follows ringer vibrate setting.

Change-Id: I0f15a3d1ea8502d542e3178f732cc2503104458f
2011-12-13 10:38:47 -08:00
Amith Yamasani
3066afdc6f Update VIBRATE_ON to a supported value when upgrading from GB.
Bug: 5738552

If value has ringer set to VIBRATE_OFF, we need to update it to the
now default, as VIBRATE_OFF is inconsistent with the new UI controls.

Make sure notification vibrate setting follows ringer vibrate setting.
Change-Id: I6638c8a8729d850e71db10d27a0b50d24dc11f19
2011-12-12 16:24:13 -08:00
Svetoslav Ganov
3ca5a74c17 Make the URL for the JavaScript based screen-reader used by WebView configurable.
The URl from which to inject a screen-reader for WebView accessiblity support should be
configurable because: 1) The accessibility engineering team should be able to point
devices to a staging build of the screen-reader; 2) We would like to be able to change
this URL via the Google services mechanism.

bug:5718543

Change-Id: I3d4d343f1c93e0e0173f04b2912949fe8a3566b9
2011-12-07 14:35:59 -08:00
Amith Yamasani
6243edd818 New and improved silent mode on lockscreen.
3-state item to toggle between Silent/Vibrate/Ringer in long-press power menu.
No volume dialog on lockscreen, unless Power menu is up.

Set VIBRATE_IN_SILENT=1 when upgrading device.

Change-Id: I097d216f96c4abdbd83420e0c477106951b3607d
2011-12-06 14:48:38 -08:00
Svetoslav Ganov
ea25ea7ef3 Merge "Adding a system preference whether to speak passwords in accessibility mode." into ics-mr1 2011-12-06 10:27:04 -08:00
Dianne Hackborn
f5b8671c34 Fix issue #5714517: App shortcuts can result in bad task intents
New API to let you build an Intent whose base configuration is correct,
but has an additional "selector" to pick out the specific app that you
would like launched.

Change-Id: Ide9db6dc60e2844b7696cfe09b28337fe7dd63db
2011-12-05 17:42:41 -08:00
Svetoslav Ganov
55f937abe1 Adding a system preference whether to speak passwords in accessibility mode.
By default we do not speak passwords if the user has no headset. However,
many users find this too restrictive and would like a way to enable
password announcement. While we cannot speak the passwords all the time
,to avoid leaking them, we expose a preference so each user can choose
the option that best works for him/her.

bug:5712607

Change-Id: I6eb0c40834abe5297f7dc74be02d180a5bef0174
2011-12-05 14:54:59 -08:00
Jeff Brown
be6ab576ff Merge "Fix application launch shortcuts." into ics-mr1 2011-11-29 13:13:33 -08:00
Jeff Brown
6651a63834 Fix application launch shortcuts.
Improved quick launch bookmarks to support category-based shortcuts
instead of hardcoding package and class names for all apps.

Added a set of Intent categories for typical applications on the
platform.

Added support for some of the HID application launch usages to
reduce reliance on quick launch for special purpose keys.  Some
keyboard vendors have hardcoded launch keys that synthesize
"Search + X" type key combos.  The goal is to encourage them
to stop doing this by implementing more of HID.

Bug: 5674723
Change-Id: I79f1147c65a208efc3f67228c9f0fa5cd050c593
2011-11-29 12:17:22 -08:00
Eric Fischer
fa56c714f2 Import revised translations. DO NOT MERGE
Change-Id: Ia50fd44ea4492188f481e652caae940acaf961e2
2011-11-29 11:42:53 -08:00
Amith Yamasani
5cd1500cc4 Don't upgrade some settings from GB to ICS.
Copy the value of AUTO_TIME to AUTO_TIME_ZONE.
Don't upgrade screen timeout and auto brightness.

Bug: 5607851, 5217460

Also fix the default for vibrate mode. Bug: 5553900

Change-Id: I1b8d5215d55953f2b686e77bf55fd07110a08b8d
2011-11-16 18:09:15 -08:00
Tom Taylor
994da2ad32 Revert "Add new secure setting for controlling Messaging notifications"
This reverts commit 03da2f00aac04e6565a02cf5a9bf6bb1ec926930.

 Committer: Tom Taylor <tomtaylor@google.com>

 On branch revertsetting
 Changes to be committed:
   (use "git reset HEAD <file>..." to unstage)

	modified:   api/current.txt
	modified:   core/java/android/provider/Settings.java
	modified:   core/java/android/provider/Telephony.java
	modified:   packages/SettingsProvider/res/values/defaults.xml
	modified:   packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

We've decided not to disable messaging notifications with a secure setting.
Instead, all the work will be done within the messaging app itself.

Change-Id: Icde6894e76da1007b6026c8ec7dc56e488453c06
2011-11-10 11:17:38 -08:00