5596 Commits

Author SHA1 Message Date
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
Adam Cohen
66b9fb1662 Iintial stab at multi-user switcher on Keyguard
Change-Id: I604a769ef43c354a8eeadb415e413c19ca02571d
2012-09-06 14:35:56 -07:00
Baligh Uddin
49a7387418 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-06 11:47:29 -07:00
Jim Miller
5830cb2882 Cosmetic code changes to face unlock after review.
Change-Id: I6e4face14c1585ed7123ae9c055b5ac3ccc86395
2012-09-05 18:54:18 -07:00
Jim Miller
000464ac01 Initial pass at re-enabling face unlock in new keyguard.
Change-Id: I187629f9c4bfd810f11c73416db6e41b56f09a45
2012-09-05 16:12:26 -07:00
Jim Miller
27230f076a Merge "Better flow for SIM PIN/ SIM PUK screens in keyguard." into jb-mr1-dev 2012-09-05 13:45:30 -07:00
Jean-Baptiste Queru
f389f2820c resolved conflicts for merge of 7749a1c5 to jb-mr1-dev
Change-Id: If30a6a4ded996749b34f6a975481a97006cbcf97
2012-09-05 12:21:50 -07:00
Baligh Uddin
18621bd682 Import translations. DO NOT MERGE
Change-Id: I49e9d1c98c3f72140527cb978e7ef341f2532ce4
Auto-generated-cl: translation import
2012-09-05 12:17:50 -07:00
Jean-Baptiste Queru
b4ac801c47 am 1ca2fee9: Merge "Make default value of auto-sync in SyncStorageEngine configurable"
* commit '1ca2fee9547dbdd7008211ac318b1f8f40ce1e35':
  Make default value of auto-sync in SyncStorageEngine configurable
2012-09-05 12:10:44 -07:00
Daniel Sandler
256a1b4dac Merge "The default notification LED color is now white." into jb-mr1-dev 2012-09-05 05:45:51 -07:00
Brian Muramatsu
580e9f72e0 Merge "Make battery shutdown temperature configurable" into jb-mr1-dev 2012-09-04 22:48:36 -07:00
Satoshi Kataoka
0d727c714b Merge "Add subtypeId for keeping enabled "InputMethodSubtype"s even if subtype parameters are changed" into jb-mr1-dev 2012-09-04 20:27:50 -07:00
Jim Miller
4b09dd31fb Better flow for SIM PIN/ SIM PUK screens in keyguard.
We now fade between security screens when not coming from selection view.
In the case of SIM PIN/PUK screens, this means we show the user's security
screen without going back to the selector view.

This change also adds a fade animation for when we go between security screens
without going back to the selector view.

This also fixes a bug where we were invoking two checks for the SIM
state - one for ACTION_DOWN and another for ACTION_UP.

Change-Id: I260f9a2e0316cbf26ec7621f774bfdf9956ca488
2012-09-04 16:16:17 -07:00
Jim Miller
175ae55c0d Merge "Update DevicePolicyManager with ability to disable keyguard widgets" into jb-mr1-dev 2012-09-04 15:20:42 -07:00
Fabrice Di Meglio
035ce2ca92 Merge "Add support for "-rtl" in resources" into jb-mr1-dev 2012-09-04 15:01:03 -07:00
Brian Muramatsu
f3c74f3499 Make battery shutdown temperature configurable
Bug 7079455

Change-Id: I448f21231bf0548ef975f99482576acb24a1a70e
2012-09-04 14:29:15 -07:00
Jim Miller
167611811d Merge "Keyguard bug fixes" into jb-mr1-dev 2012-09-04 14:16:48 -07:00
Jim Miller
b8ec470617 Update DevicePolicyManager with ability to disable keyguard widgets
Change-Id: I5876e9e180b2a995aaa355fbbb2b67cebb86104d
2012-09-04 13:52:36 -07:00
Baligh Uddin
599943e48b Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-04 09:31:42 -07:00
Satoshi Kataoka
e62e6d8731 Add subtypeId for keeping enabled "InputMethodSubtype"s even if subtype parameters are changed
Bug: 6752230
Change-Id: I3a2d512e395fe8645edf6ab82108948b927c629a
2012-09-04 15:29:03 +09:00
Yameng Huang
2b5d0ea5e9 Make default value of auto-sync in SyncStorageEngine configurable
This will make the default value of the automatic synchronization
in the SyncStorageEngine configurable with overlays for use by
vendors who want or have legal requirements to have the synchronization
off by default.

Change-Id: Iabdb355c4a1169fe8e254e91c43e162c5913d5e0
2012-09-03 12:49:31 +02:00
Daniel Sandler
a7ee006b6d The default notification LED color is now white.
We've been setting this per-device for forever; it's time to
just change the platform default (was 00ff00).

Bug: 7094412
Change-Id: I5fbd126580cf06e59958bab32a333b21359d01a9
2012-08-31 23:37:21 -04:00
Jim Miller
d36ebe03c9 Keyguard bug fixes
Bug:7088530 Lockscreen falsely states "Wrong PIN"
Bug:7091531 Owner name no longer shown on slide to unlock screen, Nakasi
Bug:7091131 When entering a SIM PIN, focus is not put onto the pin entry box
Change-Id: I5c7e957083b25a3445804ea092d962163d187fa1
2012-08-31 19:33:42 -07:00
Jeff Brown
f83ec83891 Merge "More improvements to the display manager." into jb-mr1-dev 2012-08-31 15:49:17 -07:00
Jeff Brown
3b9a4160c9 Merge "Initial draft of high-level multi-display APIs." into jb-mr1-dev 2012-08-31 15:48:26 -07:00
Jeff Brown
4ed8fe75e1 More improvements to the display manager.
Added more complete support for logical displays with
support for mirroring, rotation and scaling.

Improved the overlay display adapter's touch interactions.

A big change here is that the display manager no longer relies
on a single-threaded model to maintain its synchronization
invariants.  Unfortunately we had to change this so as to play
nice with the fact that the window manager wants to own
the surface flinger transaction around display and surface
manipulations.  As a result, the display manager has to be able
to update displays from the context of any thread.

It would be nice to make this process more cooperative.
There are already several components competing to perform
surface flinger transactions including the window manager,
display manager, electron beam, overlay display window,
and mouse pointer.  They are not manipulating the same surfaces
but they can collide with one another when they make global
changes to the displays.

Change-Id: I04f448594241f2004f6f3d1a81ccd12c566bf296
2012-08-31 15:42:46 -07:00
Jeff Brown
a492c3a7b2 Initial draft of high-level multi-display APIs.
This patch introduces the ability to create a Context that
is bound to a Display.  The context gets its configuration and
metrics from that display and is able to provide a WindowManager
that is bound to the display.

To make it easier to use, we also add a new kind of Dialog
called a Presentation.  Presentation takes care of setting
up the context as needed and watches for significant changes
in the display configuration.  If the display is removed,
then the presentation simply dismisses itself.

Change-Id: Idc54b4ec84b1ff91505cfb78910cf8cd09696d7d
2012-08-31 15:42:45 -07:00
Jim Miller
58a2950b66 Merge "Lots of keyguard improvements - Fix "too many attempts" dialogs - Fix account unlock mechanism so the user can use email account as backup for pattern unlock - Add mechanism to support future account recovery from non-pattern screen - Tune animation timing for flipping security view. - Move password field to the top of the security view - Add padding and visual feedback to navigation area button" into jb-mr1-dev 2012-08-31 13:57:27 -07:00
Baligh Uddin
464fb99b91 Import translations. DO NOT MERGE
Change-Id: Ifec4a4a20b1dbe717c83778d48582fc071282fc8
Auto-generated-cl: translation import
2012-08-31 08:28:20 -07:00
Baligh Uddin
0cc2e9b2e9 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-30 22:16:42 -07:00
Jim Miller
258341c377 Lots of keyguard improvements
- Fix "too many attempts" dialogs
- Fix account unlock mechanism so the user can use email account as backup for pattern unlock
- Add mechanism to support future account recovery from non-pattern screen
- Tune animation timing for flipping security view.
- Move password field to the top of the security view
- Add padding and visual feedback to navigation area button

Fixes bugs 7088482, 7088631

Change-Id: I23099feae3b7446ec291d8f860601bfc12f9edd8
2012-08-30 21:40:44 -07:00
rich cannings
a2875f481b Merge "Notify verifiers that verification is complete" into jb-mr1-dev 2012-08-30 20:35:08 -07:00
Adam Powell
dc2cf24ecf Integrate new assets from UX that include layout bounds.
Change-Id: I682b3f693d8eedb741ea689f56363532cde32132
2012-08-30 18:06:38 -07:00
rich cannings
d1b5cfc94a Notify verifiers that verification is complete
Send the Intent.ACTION_PACKAGE_VERIFIED to all verifiers when
verification is complete (either one verifier verified the package or a
timeout occurred). Details of what occurred is in a new extra,
PackageManager.EXTRA_VERIFICATION_RESULT.

Bug: 7048930
Change-Id: I4f9855a29b0eb6d77f469891402c69e2e8922945
2012-08-30 16:00:59 -07:00
Jeff Sharkey
e217ee4d7a Access to all users' external storage.
System services holding this permission have external storage bound
one level higher, giving them access to all users' files.

Bug: 7003520
Change-Id: Ib2bcb8455740c713ebd01f71c9a2b89b4e642832
2012-08-30 10:37:51 -07:00
Jim Miller
07cb030c4e Fix keyguard layout on tablet
Bug:7084961
Change-Id: I6415aa736bf9e2b71a288716e3125429be2b663c
2012-08-30 10:24:40 -07:00
Adam Cohen
b07e89f6fd Merge "Integrate overscroll into KeyguardWidgetView." into jb-mr1-dev 2012-08-29 19:49:02 -07:00
Baligh Uddin
8b9df6cccd Import translations. DO NOT MERGE
Change-Id: Id3259e8368d2ab53d1f8b16d756806b4ca520c39
Auto-generated-cl: translation import
2012-08-29 19:04:43 -07:00
Jim Miller
f2dfc351de Integrate overscroll into KeyguardWidgetView.
This integrates overscroll behavior into keyguard.

Change-Id: I19c0f70c85a4ebb0ddd3f433b6f88a992f40919b
2012-08-29 18:42:21 -07:00
Dianne Hackborn
12631ec35e Merge "Start implementing concept of "running" users." into jb-mr1-dev 2012-08-29 18:15:07 -07:00
Jeff Brown
d5ea3b4647 Merge "Add initial multi-display support." into jb-mr1-dev 2012-08-29 15:43:55 -07:00
Jeff Brown
bd6e1500ae Add initial multi-display support.
Split the DisplayManager into two parts.  One part is bound
to a Context and takes care of Display compatibility and
caching Display objects on behalf of the Context.  The other
part is global and takes care of communicating with the
DisplayManagerService, handling callbacks, and caching
DisplayInfo objects on behalf of the process.

Implemented support for enumerating Displays and getting
callbacks when displays are added, removed or changed.

Elaborated the roles of DisplayManagerService, DisplayAdapter,
and DisplayDevice.  We now support having multiple display
adapters registered, each of which can register multiple display
devices and configure them dynamically.

Added an OverlayDisplayAdapter which is used to simulate
secondary displays by means of overlay windows.  Different
configurations of overlays can be selected using a new
setting in the Developer Settings panel.  The overlays can
be repositioned and resized by the user for convenience.

At the moment, all displays are mirrors of display 0 and
no display transformations are applied.  This will be improved
in future patches.

Refactored the way that the window manager creates its threads.
The OverlayDisplayAdapter needs to be able to use hardware
acceleration so it must share the same UI thread as the Keyguard
and window manager policy.  We now handle this explicitly as
part of starting up the system server.  This puts us in a
better position to consider how we might want to share (or not
share) Loopers among components.

Overlay displays are disabled when in safe mode or in only-core
mode to reduce the number of dependencies started in these modes.

Change-Id: Ic2a661d5448dde01b095ab150697cb6791d69bb5
2012-08-29 15:34:17 -07:00
Jim Miller
c134885e6f Merge "Replace keyguard with new implementation" into jb-mr1-dev 2012-08-29 12:52:09 -07:00
Jim Miller
dcb3d84b82 Replace keyguard with new implementation
This change refactors keyguard to be more modular and maintainable.  More
specifically, it replaces the top-level view with just one device-dependent
view that contains two views: a widget area and a security area.

The widget area can be populated with custom widgets.

The security area contains the current security method as dictated by
the stored password quality.

This change contains both the old and the new keyguard with the old keyguard
still enabled.  The new keyguard will be enabled in a subsequent change.

Change-Id: Id75286113771ca1407e9db182172b580f870b612
2012-08-29 12:36:26 -07:00
Dianne Hackborn
80a4af2bbc Start implementing concept of "running" users.
The activity manager now keeps track of which users are running.

Initially, only user 0 is running.

When you switch to another user, that user is started so it is
running.  It is only at this point that BOOT_COMPLETED is sent
for that user and it is allowed to execute anything.

You can stop any user except user 0, which brings it back to the
same state as when you first boot the device.  This is also used
to be able to more cleaning delete a user, by first stopping it
before removing its data.

There is a new broadcast ACTION_USER_STOPPED sent when a user is
stopped; system services need to handle this like they currently
handle ACTION_PACKAGE_RESTARTED when individual packages are
restarted.

Change-Id: I89adbd7cbaf4a0bb72ea201385f93477f40a4119
2012-08-28 16:30:55 -07:00
Baligh Uddin
b210018760 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-28 15:51:02 -07:00
rich cannings
2deaa3698d Merge "Add permission checks for Verification API calls" into jb-mr1-dev 2012-08-28 15:14:26 -07:00
rich cannings
7e67151b91 Add permission checks for Verification API calls
Ensure that only applications with
android.Manifest.permission.PACKAGE_VERIFICATION_AGENT can call application
verification APIs, like PackageManager.verifyPendingInstall and
PackageManager.extendVerificationTimeout

Bug: 7049083
Change-Id: I5fc28b37e864d67cd319a1ed9d03a90dd15ad052
2012-08-28 14:00:46 -07:00
Baligh Uddin
3b87a57aca Import translations. DO NOT MERGE
Change-Id: Ia11f923dfd05112764cd795034e5a8b33b2d67fe
Auto-generated-cl: translation import
2012-08-28 13:10:55 -07:00
Baligh Uddin
81efbb30f0 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-27 16:17:57 -07:00