3391 Commits

Author SHA1 Message Date
Svetoslav Ganov
58d37b55bd Multi-user support for the accessibility layer.
1. This change converts the accessibility manager service to
   maintain a state per user. When the user changes the services
   for the user that is going away are disconnected, the local
   accessibility managers in the processes for this user are
   disabled, the state is swapped with the new user's one, and
   the new user state is refreshed.

   This change updates all calls into the system to use their
   user specific versions when applicable. For example, regisetring
   content observers, package monitors, calls into other system
   services, etc.

   There are some components that are shared across users such
   as UI created by the system process and the SystemUI package.
   Such components are managed as a global state shared across
   all users and are updated accordingly on a user switch. Since
   the SystemUI is running in a normal app process this change
   adds hidden APIs on the local window manager to allow the
   SystemUI to notify the accessibility layer that it will run
   accross users.

   Calls to AccessibiltyManager's isEnabled(), isTouchExplorationEnabled()
   and sendAccessibilityEvent return false or a are a nop for a
   background user sice he should not send accessibility events,
   and should not perform touch exploration.

   Update the internal accessibility tests due to changes in the
   AccessibilityManager.

   This change also fixes several issues that were encountered
   such as calling out the accessibility manager service with a
   lock held.

   Removed some incorrect debugging code from the TouchExplorer
   that was leading to a system crash.

bug:6967373

Change-Id: I2cf32ffdee1d827a8197ae4ce717dc0ff798b259
2012-09-21 16:48:07 -07:00
Philip Milne
2f6d882952 Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()
Change-Id: I71c24ea10093ece07a0780e97bc641ff548c1a44
2012-09-21 15:54:41 -07:00
Baligh Uddin
2be31d890a Import translations. DO NOT MERGE
Change-Id: I84b2f0c629da551293130a0a31024b4bf8172d56
Auto-generated-cl: translation import
2012-09-21 14:12:27 -07:00
Victoria Lease
09016ab4dd Do not use passive GPS data for COARSE only apps.
FusionEngine now attaches a secondary location that has never seen
GPS data to its result. LocationFudger uses the GPS-less location so
that COARSE apps never see data from the GPS provider.

When the previous location is updated, the previous GPS-less location
is carried over if the location update was GPS-only.

Additionally, apps without FINE permission are not notified when GPS
location changes, and any attempt to use GPS_PROVIDER without FINE
permission is met by a stern SecurityException.

Bug: 7153659
Change-Id: I12f26725782892038ce1133561e1908d91378a4a
2012-09-21 13:45:41 -07:00
John Spurlock
268118df8a Migrate away from lightsOut() in BeanBagDream.
Bug:7211867
Change-Id: Ic81a61e368b44fa22db4fffac912219d9f2ca951
2012-09-21 16:41:14 -04:00
Winson Chung
3ed6f9456a Showing QuickContacts card, adding brightness bar timeout and width, fixing wifi display icon visibility. (Bug 7186309, Bug 7175023)
Change-Id: Iea717e97bf90301bef68b06e1a35644e24ab029d
2012-09-21 11:59:12 -07:00
Baligh Uddin
537d47f510 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-21 08:24:52 -07:00
Daniel Sandler
ced8d21f5a Add string for 'Ethernet'.
Bug: 6676469
Change-Id: Icbeb3e96b8580850a8392f443dc277488631bcab
2012-09-21 07:32:04 -07:00
Daniel Sandler
1227233b6f Merge "Bugreport in Quick Settings (if you turn it on)." into jb-mr1-dev 2012-09-21 05:54:24 -07:00
Daniel Sandler
a2facc33cd Merge "Fix the seesaw behavior on the status panels." into jb-mr1-dev 2012-09-21 05:53:05 -07:00
Daniel Sandler
c19d4488ea Bugreport in Quick Settings (if you turn it on).
Bug: 7190871
Change-Id: I8d10f18daed08aac1878cf6ba8937855d9494abd
2012-09-21 01:48:21 -04:00
Dianne Hackborn
d3724b951e Merge "Don't load views before onResume called." into jb-mr1-dev 2012-09-20 19:13:56 -07:00
Baligh Uddin
776dbf230f Import translations. DO NOT MERGE
Change-Id: I5e352f655b608f7db3ceb81c92170448580559f0
Auto-generated-cl: translation import
2012-09-20 16:02:22 -07:00
Craig Mautner
ca6da00f6c Don't load views before onResume called.
Views were being kicked off when RecentsTaskLoader was being started
from BaseStatusBar.toggleRecentsActivity. Then RecentTasksLoader called
RecentsPanelView.onTasksLoaded which invalidated the Adapter and loaded
the item views. All this before window manager had determined that the
Activity should be rotated and providing a new Configuration.

This fix waits for the Activity to resume before allowing the Adapter
to be invalidated.

Fixes bug 7138698.

Change-Id: I0df67ff2e07a0e0b69cc3b52e9843f90ce763704
2012-09-20 14:54:37 -07:00
Christopher Tate
b756445429 Multiuser awareness in content observer infrastructure
Content observers are registered under the calling user's identity,
not under the provider host's identity (unless the caller is using
the new permissioned entry points that allow observers to be
registered for a different user's view of the data).  The most important
implication of this is that when the settings provider is directly
queried, the Cursor returned to the app is wired for change notifications
based on that calling app's user.

Note that it is not possible to use query() / insert() to read/write
data for different users.  All such manipulations should use the
standard get* / put* methods in Settings.*.

Bug 7122169

Change-Id: If5d9ec44927e5e56e4e7635438f4ef48a5430986
2012-09-20 13:58:16 -07:00
Daniel Sandler
198a0306e5 Fix the seesaw behavior on the status panels.
The code in onMeasure that attempts to accommodate changing
child boundaries (i.e. an expanding/collapsing notification)
was locking the window size to the child measurement, even
though another window was trying to seesaw it closed. We now
only activate the rubberband behavior when the size of the
children changes, not on each onMeasure().

Lots of other small fixes to the panel expansion logic, too,
including ensuring that the expanded fraction doesn't jump
to 1.0f when the panel content hasn't been laid out yet
(causing the entire screen to become dim for a second thanks
to PhoneStatusBarView.panelExpansionChanged).

This change also restores the ability of Binder clients
(such as accessibility systems) to expand and collapse the
status bar.

Bug: 7008196
Bug: 6995518
Bug: 6628429
Change-Id: Ib0244a27aef2b4dbe19be98f7e039a9d38f1b80e
2012-09-20 16:50:52 -04:00
John Spurlock
e0de5bfff2 Merge "Fire "dreaming started" and "dreaming stopped" broadcasts." into jb-mr1-dev 2012-09-20 05:45:54 -07:00
Jeff Brown
89d5546d7f Add support for remembering Wifi display devices.
Add a setting to globally disable Wifi display.

Fixed a bug where the wifi display broadcast receiver
was running on the wrong thread.

Removed the wifi-display QuickSettings dialog, all functionality
has been moved to Settings.

Bug: 7178216
Bug: 7192799
Change-Id: I9796baac8245d664cf28fa147b9ed978d81d8ab9
2012-09-19 22:04:44 -07:00
Baligh Uddin
c8d33ad10e Import translations. DO NOT MERGE
Change-Id: If5bb36909e7536aedb40b72ba0899568dce7264c
Auto-generated-cl: translation import
2012-09-19 16:23:58 -07:00
John Spurlock
f4f6b4c8b0 Fire "dreaming started" and "dreaming stopped" broadcasts.
Dream manager now fires broadcast intents when entering + exiting
dreamland (except when testing).

Power manager can now listen for dreams ending, using polling only
as a backstop.

Also:
 - Bullet-proof dream-manager/dream against known failure modes
 - Add new read/write dream permissions
 - Refactor dream-manager to delegate work + state management into
   a new DreamController class, via a handler

Bug:6999949
Bug:7152024
Change-Id: I986bb7812209d8c95ae1d660a5eee5998a7b08b1
2012-09-19 17:36:50 -04:00
Dianne Hackborn
09ad0832e0 Merge "Switch to showing top-most thumbnail of recent apps." into jb-mr1-dev 2012-09-19 11:40:18 -07:00
Dianne Hackborn
15491c6a72 Switch to showing top-most thumbnail of recent apps.
The way it should have been, and with the new recents enter animation
the way it must be.

Added a new method to retrieve this thumbnail, since it would be less
efficient to use the existing API (which always returns the "base"
thumbnail).  Probably at some point that existing API should be tweaked
to always return the top thumbnail instead, but that is for a later time.

Also removed code that would clear the thumbnail associated with an
activity when it is resumed.  I don't think there should ever be a
reason to clear a thumbnail -- it's much better to have *something*
for the task, even if it is a little out of date.

Change-Id: I83e6ca6403eb2df5e4de3009dfe8c210e8cf8d5b
2012-09-19 11:25:40 -07:00
Baligh Uddin
7b6ec1f6fd Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-19 09:14:59 -07:00
Winson Chung
688ca4708b Merge "Fixing crash in emulator due to no BluetoothAdapter. (Bug 7188166)" into jb-mr1-dev 2012-09-18 15:34:37 -07:00
Winson Chung
84dbf462f8 Fixing crash in emulator due to no BluetoothAdapter. (Bug 7188166)
Change-Id: I63fe4b229a8a460170df153e71b7ad65655dfad1
2012-09-18 14:48:00 -07:00
Christopher Tate
6b58fde99a Merge "Settings provider needs to send notifications as itself" into jb-mr1-dev 2012-09-18 13:35:59 -07:00
Daniel Sandler
63bcc14c43 Merge "Remove settings and rotation buttons from notification panel." into jb-mr1-dev 2012-09-18 13:33:21 -07:00
Christopher Tate
c8459dc85e Settings provider needs to send notifications as itself
... and not as its ultimate caller, who may be a less-privileged
application.  Fixes bug 7188309

Change-Id: Iffd37b8da84f683bf665bf3d48c0b7fbc8dd721d
2012-09-18 13:27:36 -07:00
Baligh Uddin
76a10e86ca Import translations. DO NOT MERGE
Change-Id: I52f25aba49edd4070c02b351adefeeb764e15866
Auto-generated-cl: translation import
2012-09-18 10:15:46 -07:00
Christopher Tate
f1aa107b18 Merge "Per-user content observer APIs" into jb-mr1-dev 2012-09-17 17:34:00 -07:00
Christopher Tate
16aa973617 Per-user content observer APIs
Callers with INTERACT_ACROSS_USERS_FULL permission can now observe content
for a given user's view (and can notify content uri changes targeted to a
specific user).  An observer watching for UserHandle.USER_ALL will see all
notifications for the given uri across all users; similarly, a notifier
who specifies USER_ALL will broadcast the change to all observers across
all users.

The API handles both USER_ALL or USER_CURRENT, and explicitly forbids
any other "pseudouser" designations.

This CL also revs the Settings provider to notify with USER_ALL for
changes to global settings, and with only the affected user's handle
for all other changes.

Bug 7122169

Change-Id: I94248b11aa91d1beb0a36432e82fe5725bb1264f
2012-09-17 16:35:36 -07:00
Winson Chung
f9c6a10d3f Merge "Making QS scrollable and making numerous tweaks." into jb-mr1-dev 2012-09-17 14:59:45 -07:00
Winson Chung
5f623011db Making QS scrollable and making numerous tweaks.
- Updating new assets (all line up)
- Updating brightness tile to reflect auto state
- Fixing network tile asset colors
- Adding press feedback

Change-Id: I857f141258eefec65243454cb69905cbd2a10bf6
2012-09-17 14:59:39 -07:00
Michael Jurka
7109aad6a1 Merge "Fix issue where recents would not show up sometimes" into jb-mr1-dev 2012-09-17 13:29:03 -07:00
Michael Jurka
cbe69206c0 Fix issue where recents would not show up sometimes
Change-Id: Iea78f447b71ae23630c76c8982e69c780eef9df6
2012-09-17 11:51:18 -07:00
Baligh Uddin
5dbeb6a8ff Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-17 08:55:59 -07:00
Siva Velusamy
9d7657c5b5 Merge "PhoneStatusBar: Fix NPE while accessing quick settings." into jb-mr1-dev 2012-09-17 08:42:05 -07:00
Daniel Sandler
6e5fe432f3 Remove settings and rotation buttons from notification panel.
Thanks to quick settings, these are redundant.

Bug: 7142026
Change-Id: If38abda3635c4f11a7fa7fa221f4d821f998e445
2012-09-16 15:34:36 -04:00
Christopher Tate
2892dfbeaf Merge "Fix default population of wifi settings" into jb-mr1-dev 2012-09-14 17:59:00 -07:00
Christopher Tate
6f5a9a9652 Fix default population of wifi settings
Various wifi settings that are explicitly defaulted did not get their
default code properly converted to refer to the correct settings
database table.

A collection of moved-to-Global settings that had not yet been
marked @deprecated in the Secure.* namespace are now so marked.

Also updated the namespace used to refer to wifi settings from the
Wifi Service.  These changes are cosmetic, but they do eliminate a
number of runtime log messages.

Bug 7153671

Change-Id: I9e5b6464d025cfb480ef97373996e38e82f90593
2012-09-14 17:57:35 -07:00
Daniel Sandler
8dd9206abb Fix NPE in rotation lock QS.
Bug: 7172228
Change-Id: I3ac35e18fe7ce5af13ee4c54dabae80df696c819
2012-09-14 17:29:21 -07:00
Siva Velusamy
537421bed2 PhoneStatusBar: Fix NPE while accessing quick settings.
Fixes Bug 7137026

Change-Id: Id156cf8ebb1a31202015a167185a6588283128f8
2012-09-14 14:48:58 -07:00
Winson Chung
4f49d9450f Adding data type overlay to network tile.
Change-Id: Iae3c188e2f7f03bd1ebaddc756021be312ddb0aa
2012-09-14 14:02:07 -07:00
Baligh Uddin
4a0c3b1ff0 Import translations. DO NOT MERGE
Change-Id: Ie3512f874a89b0d99d4533a9d0620aaa5b85b555
Auto-generated-cl: translation import
2012-09-14 12:51:51 -07:00
Winson Chung
49321ec4fb Merge "Suppress ExpandHelper on quick settings." into jb-mr1-dev 2012-09-14 12:27:55 -07:00
Winson Chung
d4726d062e Adding rotation lock tile to quick settings (on tablets).
Change-Id: Ia68c07051acc1f0f42dde0b1322db034b5d54506
2012-09-14 12:28:40 -07:00
Christopher Tate
0dbc410800 Merge "Fix Settings writes to a different user" into jb-mr1-dev 2012-09-14 11:35:19 -07:00
Baligh Uddin
1a5efec6a0 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-13 21:49:37 -07:00
Christopher Tate
78d2a66ac1 Fix Settings writes to a different user
Oops.  Stacked bugs:  first, the desired user handle was not properly
being passed from the call() entry point to the database operations;
then on top of that, the client-side cache management was still
looking in the local user's cache for the data, so a request to read
a different user's settings would return the local user's instead if
that key was already known to the local user's cache.

Reads and writes of a different user's settings are now uncached,
so they're relatively much slower.  They're rare, however, so this
is not something to worry about unless we encounter a real world
case where it's a significant factor.

This CL also adds a bit of cross-user settings read/write testing
to the existing provider suite.  These new tests caught both the
known wrong-user-write bug and discovered the client-side cache
bug, so yay.

Finally, the existing wholesale mutual-exclusion approach would
deadlock in certain circumstances due to the fact that the
settings database creation code might have to call out to the
Package Manager while populating the bookmark/shortcut table,
and the Package Manager would then call back into the settings
provider in the course of handling that request.  The synchronization
regime has been significantly tightened up now: now the database
code [which is known to deal with concurrency itself] is allowed
to cope with multiple parallel openers of the same db; this
allows the settings provider to avoid calling out to other parts
of the system even implicitly while its internal lock is held.

Change-Id: Ib77d445b4a2ec658cc5c210830f6977c981f87ed
2012-09-13 19:15:54 -07:00
Winson Chung
ed1395f398 Updating Wifi/Mobile tiles to reflect actual connection state with new assets.
Change-Id: Ic1cd78c77f94f1c9cf9bbc1bcea3082ca536d94c
2012-09-13 18:16:02 -07:00