8305 Commits

Author SHA1 Message Date
Kenny Root
0c191624fb Remove "protect" command from installd
No one uses the "protect" command anymore, so remove it from installd.

Change-Id: Ia990bae6f95cd6e317496f5dd173ec15164d7164
2012-09-09 12:12:43 -07:00
Svetoslav Ganov
add52a975a Viewport should zoom out when screen magnification is disabled.
1. If screen magnification is disabled when the screen is in a
   magnified state we have to zoom out since otherwise the user
   is stuck in a magnified state without ability to pan/zoom/
   toggle magnification which renders the device useless.

bug:7131030

Change-Id: I8f3339f31310448ec8742f3101c1fdc61a6a5f83
2012-09-09 11:13:58 -07:00
Svetoslav Ganov
5b1720e11d Merge "Viewport should zoom out when screen magnification is disabled." into jb-mr1-dev 2012-09-09 10:50:34 -07:00
Svetoslav Ganov
6d0df874ce Viewport should zoom out when screen magnification is disabled.
1. If screen magnification is disabled when the screen is in a
   magnified state we have to zoom out since otherwise the user
   is stuck in a magnified state without ability to pan/zoom/
   toggle magnification which renders the device useless.

bug:7131030

Change-Id: Ia620954fbd594e7cd470e43b89d9ed04c0397c3c
2012-09-09 10:46:10 -07:00
Jeff Brown
20ec8ac586 Merge "Improve Wifi display discovery API." into jb-mr1-dev 2012-09-09 00:23:59 -07:00
Jeff Brown
180bbc7181 Improve Wifi display discovery API.
Change-Id: I4d46503e5413f52da16f79bbc9c631cc5ae9c178
2012-09-08 23:15:00 -07:00
Amith Yamasani
8f008e737a Merge "More multi-user methods in PM" into jb-mr1-dev 2012-09-08 20:20:57 -07:00
Amith Yamasani
151ec4c9f8 More multi-user methods in PM
pm can list installed packages by user now.

Bug: 6926465

Change-Id: I822311bfd6e7e2d6fb315fc484739fbf953c9bb6
2012-09-08 19:14:00 -07:00
Jeff Brown
8e81013231 Merge "Make display manager tell input system about viewports." into jb-mr1-dev 2012-09-08 18:19:14 -07:00
Jeff Brown
d728bf514f Make display manager tell input system about viewports.
The window manager is no longer responsible for telling the
input system about the display viewport.

Change-Id: I932882bae55decef55f25093bb2a7ebac1620bb1
2012-09-08 18:12:57 -07:00
Jeff Brown
1edf63ef4c Merge "Enable auto-brightness adjustment feature with system prop." into jb-mr1-dev 2012-09-08 15:53:50 -07:00
Jeff Brown
631938f26d Enable auto-brightness adjustment feature with system prop.
This feature is experimental and disabled by default.

Change-Id: I183534370da7613557e4d1535f556873f8a763df
2012-09-08 15:11:11 -07:00
Jeff Brown
b0d10aa983 Merge "Add new wifi display discovery API." into jb-mr1-dev 2012-09-08 14:55:02 -07:00
Jeff Brown
0597100f91 Merge "Retry wifi display connections." into jb-mr1-dev 2012-09-08 14:53:58 -07:00
Jeff Brown
e08ae388d6 Add new wifi display discovery API.
The API is quite simple.  There are a few extra functions
on DisplayManager to scan, connect and disconnect from
wifi displays and get status, and a single protected
broadcast sent when the status changes.

Change-Id: Ic91dbab5ee818e790b27fa32e1a1e93788793be0
2012-09-08 14:53:34 -07:00
Christopher Tate
4ea283a05f Merge "Sanity-check existence of restore agent" into jb-mr1-dev 2012-09-07 18:40:12 -07:00
Dianne Hackborn
5d75052b2d Merge "Add Binder.getCallingUserHandle()." into jb-mr1-dev 2012-09-07 18:35:02 -07:00
Dianne Hackborn
74ee8652e0 Add Binder.getCallingUserHandle().
Change-Id: I2a7eedfdc7baeeb4c2cd2ca0153aa95e0cf0bf45
2012-09-07 18:33:18 -07:00
Christopher Tate
e7287a0791 Sanity-check existence of restore agent
When a restore dataset includes data for an app that used to have
a backup agent, but does not in the currently-installed version, we
were merrily trying to bring up the agent for restore anyway, and
crashing.  Now we don't do that; we check whether there's actually
going to be an agent to handle the data before doing any of the
heavy work.

Bug 7130695

Change-Id: I0a38c2a8bb51d4a140a72d22896fa58d98ebaa02
2012-09-07 18:32:12 -07:00
Dianne Hackborn
824b959dfc Merge "Explicitly specify current user everywhere home is started." into jb-mr1-dev 2012-09-07 18:01:23 -07:00
Jeff Brown
0cfebf28b1 Retry wifi display connections.
Change-Id: I48c62c7e272c2696022ddeea1c3107d24a9431b8
2012-09-07 17:50:58 -07:00
Jeff Brown
4d0b562554 Disable hardcoded wifi display adapter.
Change-Id: Id0f7d59b6eafa8794ff7616cf54a0b94ba78c763
2012-09-07 17:50:56 -07:00
Dianne Hackborn
d888399ad4 Explicitly specify current user everywhere home is started.
Change-Id: I58d86136de7f9cef1eaf72793d0e200b852d7355
2012-09-07 17:48:06 -07:00
Svetoslav Ganov
0458a69d4d Merge "Fixing off by one error in the ScreenMagnifier." into jb-mr1-dev 2012-09-07 17:34:01 -07:00
Svetoslav Ganov
2cee686498 Fixing off by one error in the ScreenMagnifier.
Change-Id: Ia0ccfb6b354b7a18633e7cf26647c6436ebf5c08
2012-09-07 17:33:09 -07:00
Jeff Brown
72018294cc Merge "Make mirroring automatic based on Windows on display." into jb-mr1-dev 2012-09-07 16:01:37 -07:00
Jeff Brown
7017e48380 Merge "Add support for Wifi display." into jb-mr1-dev 2012-09-07 16:00:13 -07:00
Nick Kralevich
cd620591b7 Merge "installd: fix forward locking symlink" into jb-mr1-dev 2012-09-07 15:58:44 -07:00
rich cannings
1275abd013 Merge "Move verification settings to Settings.Global" into jb-mr1-dev 2012-09-07 15:54:13 -07:00
Dianne Hackborn
cd42ce5d61 Merge "Fix crash when setting wallpaper from non-primary user." into jb-mr1-dev 2012-09-07 15:52:37 -07:00
Dianne Hackborn
11941fd651 Fix crash when setting wallpaper from non-primary user.
When accessing a content provider, there is a check for whether
the provider can run in the caller's process; if so, even if the
provider is currently published, we return to the caller that it
can run locally.

This check was broken -- it had an old condition that allowed
content providers owned by the system UID to run in any other UID's
process.  This is wrong, since by definition the other
UIDs would not be able to access the data under the original UID.

We ran into this because the activity picker is part of the
android platform manifest, so runs as the system process.  However
it needs to run as the user who invoked it, so when coming from the
non-primary user we spin up a "system" process running as a uid of
that user.  Now when that process tries to access the settings
provider, the broken check would think that a new instance of the
settings provider should be created in the caller's process.

Change-Id: I7bf495ed8370cb271bdaec073d5b7dda9e38c546
2012-09-07 15:50:26 -07:00
Nick Kralevich
7de350a913 installd: fix forward locking symlink
installd was not creating a compatibility symlink when
installing a forward locked application.  Fix.

Bug: 7121527
Change-Id: Ied507ab2b759d8658af563e6ac8f0dbb0d286cce
2012-09-07 15:48:11 -07:00
Craig Mautner
df4a94e21c Merge "Fix incorrect indexing calculation." into jb-mr1-dev 2012-09-07 15:48:07 -07:00
Craig Mautner
efb735dbaf Fix incorrect indexing calculation.
Fixes bug 7129583.

Change-Id: Ia395a7acded05686668d5b3cee09d49025a9f339
2012-09-07 15:40:24 -07:00
rich cannings
4d8fc793f0 Move verification settings to Settings.Global
Move Settings.Secure.PACKAGE_VERIFIER_ENABLE,
Settings.Secure.PACKAGE_VERIFIER_TIMEOUT,
Settings.Secure.PACKAGE_VERIFIER_DEFAULT_RESPONSE to
Settings.Global.PACKAGE_VERIFIER_ENABLE,
Settings.Global.PACKAGE_VERIFIER_TIMEOUT,
Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE, respectively.

Bug: 7082362
Change-Id: I21fde031a330563891c0129132f3d6369ac5e7a5
2012-09-07 15:34:08 -07:00
Amith Yamasani
5fc626639a Merge "Resolve the correct home intent for secondary users" into jb-mr1-dev 2012-09-07 15:28:09 -07:00
Amith Yamasani
259d5e56a8 Resolve the correct home intent for secondary users
Fix some searches through the Activity stack.

This allows SetupWizard to be launched for the second user.

Change-Id: Icd306319f511c902557bd9985d80dda228e32d96
2012-09-07 15:04:36 -07:00
Christopher Tate
62df6eb508 Refer to STAY_ON_WHILE_PLUGGED_IN via the Global namespace
It moved from System to Global, so writes are not automatically redirected
to the new namespace (else apps would start crashing).

Bug 7126575

Change-Id: Ief31fcb5a6107a098da04d30d146e16921dee776
2012-09-07 15:00:54 -07:00
Craig Mautner
722285e199 Make mirroring automatic based on Windows on display.
Tell the display manager whenever a given logical display
contains interesting windows.  If so, then the display
manager arranges to show that content on a physical display,
otherwise it ignores the logical display and makes its
associated primary physical display mirror the default
display.

Assign DisplayContents when Displays are added, remove them when
Displays are removed, and update the DisplayInfo when Displays
change.

Change-Id: I36e08ec538055acabe1e24cdd12c40de4e47a158
2012-09-07 14:46:32 -07:00
Christopher Tate
c0be8c85b0 Merge "Refer to STAY_ON_WHILE_PLUGGED_IN in the global namespace" into jb-mr1-dev 2012-09-07 14:22:59 -07:00
Christopher Tate
ad73532041 Refer to STAY_ON_WHILE_PLUGGED_IN in the global namespace
This is the one relevant setting that moved from System to Global,
a move that we do not automatically redirect on writes.

Change-Id: I7b26d0c364695c4a10a7cd477db3dfcfe89d7ef5
2012-09-07 14:19:43 -07:00
Dianne Hackborn
5e03e2ca7d More multi-user stuff:
- New (hidden) isUserRunning() API.
- Maintain LRU list of visited users.
- New FLAG_IS_DATA_ONLY for ApplicationInfo.
- Clean up pending intent records when force-stopping a user (or package).
  (Also fixes bug #6880627: PendingIntent.getService() returns stale
  intent of force stopped app)
- Fix force-stopping when installing an app to do the force-stop across
  all users for that app.
- When selecting which processes to kill during a force stop, do this
  based on the actual packages loaded in the process, not just process
  name matching.
- You can now use --user option in am when starting activities, services,
  and instrumentation.
- The am --user option accepts "current" and "all" as arguments.
- The pm uninstall command now uninstalls for all users, so it matches
  the semantics of the install command.
- PhoneWindowManager now explicitly says to start home in the current
  user.
- Activity manager call to retrieve the MIME type from a content provider
  now takes a user argument, so it will direct this to the proper user.
- The package manager uninstall paths are now implemented around
  PackageSetting, not PackageParser.Package.  This allows them to work
  even if the application's apk has been removed (in which case it only
  exists as a PackageSetting, not the PackageParser.Package parsed from
  the apk).

Change-Id: I3522f6fcf32603090bd6e01cc90ce70b6c5aae40
2012-09-07 13:55:23 -07:00
Jeff Brown
cbad976b2a Add support for Wifi display.
Change-Id: I99693786cf9d07d07d3400046c55eb4933730b80
2012-09-07 13:26:31 -07:00
Matthew Xie
240a90d278 Merge "Fault tolerance in Bluedroid" into jb-mr1-dev 2012-09-07 00:07:23 -07:00
Syed Ibrahim M
1223e5a311 Fault tolerance in Bluedroid
When bluetooth process gets crashed/killed/stopped by Android
system, BluetoothManagerService will re-start AdapterService
to recover from the crash appropriately.

Change-Id: Iacb1a06a8245089517bbbd57de1378ca8ce4b41e
2012-09-06 23:55:41 -07:00
Jeff Sharkey
9545dc020e Include primary flag in StorageVolume.
Bug: 7003520
Change-Id: Iaae2ae22253820c954c51e0199c31087bc825f3f
2012-09-06 23:15:20 -07:00
Svetoslav Ganov
6da5827193 Merge "Screen magnification - feature - framework." into jb-mr1-dev 2012-09-06 18:57:43 -07:00
Svetoslav Ganov
1cf70bbf96 Screen magnification - feature - framework.
This change is the initial check in of the screen magnification
feature. This feature enables magnification of the screen via
global gestures (assuming it has been enabled from settings)
to allow a low vision user to efficiently use an Android device.

Interaction model:

1. Triple tap toggles permanent screen magnification which is magnifying
   the area around the location of the triple tap. One can think of the
   location of the triple tap as the center of the magnified viewport.
   For example, a triple tap when not magnified would magnify the screen
   and leave it in a magnified state. A triple tapping when magnified would
   clear magnification and leave the screen in a not magnified state.

2. Triple tap and hold would magnify the screen if not magnified and enable
   viewport dragging mode until the finger goes up. One can think of this
   mode as a way to move the magnified viewport since the area around the
   moving finger will be magnified to fit the screen. For example, if the
   screen was not magnified and the user triple taps and holds the screen
   would magnify and the viewport will follow the user's finger. When the
   finger goes up the screen will clear zoom out. If the same user interaction
   is performed when the screen is magnified, the viewport movement will
   be the same but when the finger goes up the screen will stay magnified.
   In other words, the initial magnified state is sticky.

3. Pinching with any number of additional fingers when viewport dragging
   is enabled, i.e. the user triple tapped and holds, would adjust the
   magnification scale which will become the current default magnification
   scale. The next time the user magnifies the same magnification scale
   would be used.

4. When in a permanent magnified state the user can use two or more fingers
   to pan the viewport. Note that in this mode the content is panned as
   opposed to the viewport dragging mode in which the viewport is moved.

5. When in a permanent magnified state the user can use three or more
   fingers to change the magnification scale which will become the current
   default magnification scale. The next time the user magnifies the same
   magnification scale would be used.

6. The magnification scale will be persisted in settings and in the cloud.

Note: Since two fingers are used to pan the content in a permanently magnified
   state no other two finger gestures in touch exploration or applications
   will work unless the uses zooms out to normal state where all gestures
   works as expected. This is an intentional tradeoff to allow efficient
   panning since in a permanently magnified state this would be the dominant
   action to be performed.

Design:

1. The window manager exposes APIs for setting accessibility transformation
   which is a scale and offsets for X and Y axis. The window manager queries
   the window policy for which windows will not be magnified. For example,
   the IME windows and the navigation bar are not magnified including windows
   that are attached to them.

2. The accessibility features such a screen magnification and touch
   exploration are now impemented as a sequence of transformations on the
   event stream. The accessibility manager service may request each
   of these features or both. The behavior of the features is not changed
   based on the fact that another one is enabled.

3. The screen magnifier keeps a viewport of the content that is magnified
   which is surrounded by a glow in a magnified state. Interactions outside
   of the viewport are delegated directly to the application without
   interpretation. For example, a triple tap on the letter 'a' of the IME
   would type three letters instead of toggling magnified state. The viewport
   is updated on screen rotation and on window transitions. For example,
   when the IME pops up the viewport shrinks.

4. The glow around the viewport is implemented as a special type of window
   that does not take input focus, cannot be touched, is laid out in the
   screen coordiates with width and height matching these of the screen.
   When the magnified region changes the root view of the window draws the
   hightlight but the size of the window does not change - unless a rotation
   happens. All changes in the viewport size or showing or hiding it are
   animated.

5. The viewport is encapsulated in a class that knows how to show,
   hide, and resize the viewport - potentially animating that.
   This class uses the new animation framework for animations.

6. The magnification is handled by a magnification controller that
   keeps track of the current trnasformation to be applied to the screen
   content and the desired such. If these two are not the same it is
   responsibility of the magnification controller to reconcile them by
   potentially animating the transition from one to the other.

7. A dipslay content observer wathces for winodw transitions, screen
   rotations, and when a rectange on the screen has been reqeusted. This
   class is responsible for handling interesting state changes such
   as changing the viewport bounds on IME pop up or screen rotation,
   panning the content to make a requested rectangle visible on the
   screen, etc.

8. To implement viewport updates the window manger was updated with APIs
   to watch for window transitions and when a rectangle has been requested
   on the screen. These APIs are protected by a signature level permission.
   Also a parcelable and poolable window info class has been added with
   APIs for getting the window info given the window token. This enables
   getting some useful information about a window. There APIs are also
   signature protected.

bug:6795382

Change-Id: Iec93da8bf6376beebbd4f5167ab7723dc7d9bd00
2012-09-06 18:56:17 -07:00
Jeff Sharkey
2b0442f330 Merge "Event logging for lockdown VPN state changes." into jb-mr1-dev 2012-09-06 18:34:17 -07:00
Jeff Sharkey
91c6a64a04 Event logging for lockdown VPN state changes.
Bug: 7079350
Change-Id: I3670efe7f09c0fca55552b6a04a2be159b9beb3c
2012-09-06 18:33:14 -07:00