1465 Commits

Author SHA1 Message Date
Jim Miller
402f0c8123 Merge "Refactor Carrier text as a movable module." into jb-mr1-dev 2012-09-18 17:00:38 -07:00
Jim Miller
772db427a7 Merge "Selectively enable back button in keyguard for security screens." into jb-mr1-dev 2012-09-18 15:32:04 -07:00
Jim Miller
f9cb7ba158 Refactor Carrier text as a movable module.
We seem to move carrier text around a lot. Rather than moving the support code,
this creates a smart text field that updates itself.

Change-Id: I9b5b7b22813e944f673a50e952742a1ac38c0e08
2012-09-17 22:31:56 -07:00
Jim Miller
931be0ee0c Merge "Don't show empty widget in the case where a widget can't be inflated" into jb-mr1-dev 2012-09-17 22:30:27 -07:00
Jim Miller
99a3cae55b Don't show empty widget in the case where a widget can't be inflated
If the use deletes the widget by disabling a package or removing it,
we used to show a placeholder widget.  Now it skips the widget if it's
not available.

Change-Id: I8582139bf982e41f3f16b5c002e248c5717290aa
2012-09-17 20:53:51 -07:00
Adam Cohen
5b50a25e6d Enabling hardware layers while overscrolling widget pager
Change-Id: I94bef1aa614f91b115105adbb409def8027f3651
2012-09-17 14:11:14 -07:00
Jim Miller
e23ab8b1ac Selectively enable back button in keyguard for security screens.
This enables the back button on secure keyguard screens so the user can
get back to the initial screen.

Partial fix for bug 7094419

Change-Id: I4dc0ac8facfd2930ccb60710c36015ec1d2c8aa6
2012-09-16 15:50:37 -07:00
Adam Cohen
6253985988 Merge "Second pass on Keyguard multi-user switcher" into jb-mr1-dev 2012-09-16 14:46:55 -07:00
Adam Cohen
24b351ab74 Second pass on Keyguard multi-user switcher
-> animating active user to inactive, fading out lock
   selector, freezing screen, then switching users
-> for now, just using a fade, but this will likely
   see iteration

Change-Id: I3acc0b53f2cbf132741e3e0529e2e53fa2824542
2012-09-16 14:46:02 -07:00
Jim Miller
b45965f519 Merge "Fix keyguard timeout dialog messages" into jb-mr1-dev 2012-09-16 11:57:23 -07:00
Dianne Hackborn
d65afc65ea Merge "More multi-user stuff." into jb-mr1-dev 2012-09-16 00:05:46 -07:00
Dianne Hackborn
5dc5a00e7e More multi-user stuff.
- New public APIs to find out when a user goes to the foreground,
  background, and is first initializing.
- New activity manager callback to be involved in the user switch
  process, allowing other services to let it know when it is safe
  to stop freezing the screen.
- Wallpaper service now implements this to handle its user switch,
  telling the activity manager when it is done.  (Currently this is
  only handling the old wallpaper going away, we need a little more
  work to correctly wait for the new wallpaper to get added.)
- Lock screen now implements the callback to do its user switch.  It
  also now locks itself when this happens, instead of relying on
  some other entity making sure it is locked.
- Pre-boot broadcasts now go to all users.
- WallpaperManager now has an API to find out if a named wallpaper is
  in use by any users.

Change-Id: I27877aef1d82126c0a1428c3d1861619ee5f8653
2012-09-15 23:58:55 -07:00
Jim Miller
08b2b6bfe2 Fix keyguard timeout dialog messages
This fixes an issue where the attempt count was incorrect.  We now show the
dialog *after* reporting the failed attempt.

This also fixes an issue where the text wasn't being reset in the password dialog
of keyguard.

Fixes bugs 7170545 and 7120895

Change-Id: Iba2009705373758acca6e10bd670eb34744bece9
2012-09-14 19:15:45 -07:00
Amith Yamasani
a87826c345 Merge "Fix face unlock for multiple users" into jb-mr1-dev 2012-09-14 14:11:58 -07:00
Amith Yamasani
4b4b954ddf Fix face unlock for multiple users
Bug: 7152537

Not all instances of LockPatternUtils are getting updated with the current user, so
query it directly from the Activity Manager.

Change-Id: I46395c3e00feecd0edfe4228f8d7966f425519f2
2012-09-14 13:36:29 -07:00
Jim Miller
f229e4d3eb Add support for settings for lock widgets
Change-Id: Iade094c6f32a7653bdbbd4921d345d68f2443ff4
2012-09-14 12:31:24 -07:00
Jim Miller
6fba0a0c72 Music in keyguard improvements
- fix overscroll issue with workaround described in bug 7137941
- ignore noisy signals from music player that sometimes hide it

Change-Id: I6a25674ce7157bd70409f56881ec62644f5fce9b
2012-09-12 16:38:56 -07:00
Jim Miller
4f77268c8a Merge "Initial pass at adding Music control to new keyguard." into jb-mr1-dev 2012-09-12 16:16:21 -07:00
Jim Miller
ff2aa0bc89 Initial pass at adding Music control to new keyguard.
- View is now added or removed based on AudioManager status
- Reduced depth of hierarchy by making KeyguardTransportControl a KeyguardWidgetFrame
- Return to the status view when we return to keyguard (onScreenTurnedOn)

Change-Id: Id7f9310ce4e7daf663471117564e5670f61b1471
2012-09-11 16:21:29 -07:00
Amith Yamasani
9c673b0536 Merge "Go back to keyguard if user is switched in lock screen" into jb-mr1-dev 2012-09-11 16:12:16 -07:00
Amith Yamasani
d979dd7fbc Go back to keyguard if user is switched in lock screen
This is not the preferred solution, but at least it is not incorrect.

Bug: 7144478
Change-Id: Iec26723b21ff5c64546d57f9d8744a3bf2929862
2012-09-11 15:53:37 -07:00
Jim Miller
752ef4e0f8 Merge "This enables the back button in keyguard" into jb-mr1-dev 2012-09-11 13:58:40 -07:00
Jim Miller
d03a555835 Attempt to fix blank keyguard issue
This is an attempt to fix bug 7137389. It forces a layout when the screen
comes back on, which should alleviate the issue.

Change-Id: I00a3829f1662a8db99d947856ca11660b4bfb805
2012-09-10 20:46:36 -07:00
Jim Miller
eeabf94226 Merge "Allow pattern to start from outside pattern view" into jb-mr1-dev 2012-09-10 18:13:57 -07:00
Amith Yamasani
5bf7800de6 Merge "Force keyguard if there are multiple users" into jb-mr1-dev 2012-09-10 18:12:42 -07:00
Amith Yamasani
b70ff9a181 Force keyguard if there are multiple users
Otherwise there would be no way to switch users if a user chooses None as lock screen.

Also adjust some layout params for Preference items to align the icons and text.

Change-Id: Ib11bb961edaef90de280bc7137d10b68765aea98
2012-09-10 18:11:46 -07:00
Christopher Tate
c09cdce1b0 Update airplane-mode manipulation for the new Settings namespace
Quick Settings and global actions (aka longpress-Power) toggles are
included in this CL.  The Settings app manipulations are updated in
a different CL because that's a different git package.

Bug 7132230

Change-Id: I50838f5e8d7b25a750d2bcae90bf384b09816dbb
2012-09-10 16:50:57 -07:00
Jim Miller
5737534aba Allow pattern to start from outside pattern view
This effectively makes the pattern view slippery, which enables the
user to start their pattern outside the view and cross the view.

Fixes bug 7118762

Change-Id: I085c5ec8f7ccd2fc37a10606a8925078dc44be13
2012-09-10 15:55:54 -07:00
Wu-cheng Li
41bd89f6b6 Merge "Pass EXCLUDE_FROM_RECENTS when starting secure camera." into jb-mr1-dev 2012-09-09 23:39:36 -07:00
Jim Miller
644ea77b4f This enables the back button in keyguard
When pressed, the back button now takes the user to the selector screen.

Change-Id: Ib8d86c6fe0b46de5ad482d526783b4542fdb3336
2012-09-09 14:35:09 -07:00
Jim Miller
1ac44eb94d Merge "Don't hide the PIN keyboard even when a physical keyboard is present." into jb-mr1-dev 2012-09-07 18:36:46 -07:00
Jim Miller
e46efc0460 Enable lazy-loading of security views in keyguard
This change removes all but the default KeyguardSelectorView from KeyguardViewHost
to (1) reduce the overall memory footprint (2) reduce initial layout inflation
time and (3) avoid initializing the camera until needed by face unlock.

Fixes bug 7127666

Change-Id: Ibac1838dd7a490dcadbfab5bdfdd82734b69055a
2012-09-07 18:07:59 -07:00
Dianne Hackborn
d888399ad4 Explicitly specify current user everywhere home is started.
Change-Id: I58d86136de7f9cef1eaf72793d0e200b852d7355
2012-09-07 17:48:06 -07:00
Jim Miller
ac8f5751f5 Don't hide the PIN keyboard even when a physical keyboard is present.
Originally this was done for aesthetics when we had a physical keyboard on
devices.  The code also used to hide the PIN keyboard when a BT keyboard is
attached.

We now always show the keyboard, even when a physical keyboard is present.

Change-Id: I8e1f3af200071382bfe267c28d92062758ebb790
2012-09-07 16:48:41 -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
Wu-cheng Li
2ab0113b1e Pass EXCLUDE_FROM_RECENTS when starting secure camera.
Camera started from the secure lock screen does not
show all the pictures in the camera roll. If users
launch camera from recent apps, they may enter secure
camera mode accidentally. Pass EXCLUDE_FROM_RECENTS
flag to prevent this.

bug:7053266
Change-Id: I0ad526d919dac02f358b25493777d7d73da6987f
2012-09-07 18:03:35 +08: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
Jim Miller
a56f8f7ca2 Merge "Fix EmergencyDialer button on devices without telephony hardware" into jb-mr1-dev 2012-09-06 18:45:18 -07:00
Brian Muramatsu
b75111df9b Merge "Add wireless to KeyguardUpdateMonitor isPluggedIn" into jb-mr1-dev 2012-09-06 17:59:36 -07:00
Jim Miller
47df44aad7 Fix EmergencyDialer button on devices without telephony hardware
This fixes showing the emergency dialer on devices without telephony.
Two fixes were required: 1. Move emergency dialer code to the view
that contains it (KeyguardSelectorView).  2. Always call onPause()
or onResume() in onScreenTurnedOff() and onScreenTurnedOn(), respectively.

Fixes bug 7117895

Change-Id: I96769fdda8478b6b60f46f7470bed2279ea2de72
2012-09-06 17:54:13 -07:00
Craig Mautner
9e130e70ef Merge "Limit certain actions to default Display." into jb-mr1-dev 2012-09-06 16:30:34 -07:00
Adam Cohen
66b9fb1662 Iintial stab at multi-user switcher on Keyguard
Change-Id: I604a769ef43c354a8eeadb415e413c19ca02571d
2012-09-06 14:35:56 -07:00
Brian Muramatsu
a92a01bb0b Add wireless to KeyguardUpdateMonitor isPluggedIn
Bug 7114383

It looks like this wasn't carried over from the old keyguard.

Change-Id: I79d47ac36d84289a3afd9d6df6582a6c8e541181
2012-09-05 21:54:39 -07:00
Craig Mautner
69b0818179 Limit certain actions to default Display.
Stop messing up PhoneWindowManager state when passing in windows
from non-default Display.

Change-Id: I472f7a13c5e2241fbf1f79ae1c8045fd92af016c
2012-09-05 19:54:32 -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
d2d4a64565 Merge "Keep local reference to KeyguardStatusViewManager so it doesn't get GC'd" into jb-mr1-dev 2012-09-05 18:25:43 -07:00
Jim Miller
6212cc0d3f Keep local reference to KeyguardStatusViewManager so it doesn't get GC'd
This fixes a bug where we'd stop updating the status view in keyguard
because KeyguardStatusViewManager had no references.

It also fixes a bug where KeyguardUpdateMonitor wasn't removing objects
because objects were being compared with WeakReferences rather than the
content of the WeakReferences.

Bug:7095359

Change-Id: I2d9df6097b2270655ad3662bcf7a6757e0515363
2012-09-05 18:14:29 -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