1141 Commits

Author SHA1 Message Date
Dianne Hackborn
7f58b95f7c Fix to custom scale animations.
These now do something reasonable when performing transitions
across two activities that are both on top of the wallpaper.

Fixed computation of the pivot point of the animations.

Fixed issue where the recents panel was considered a status
bar element for purposes of deciding if the animating elements
are obscured by the status bar, which would result in us not
running the animation correctly.

Change-Id: I4b9b588b80243463e6f087a9703ee886ee281630
2012-04-18 14:58:03 -07:00
Steven Ross
fe444b48ba Always showing FaceUnlock view before bind fixes 6330358
Sets the view to visible directly on the UI thread when feasible
this includes all cases where FaceUnlock is bound.
The delay in processing a message was causing the bug.
This additionally replaces the call in the keyguardview show
with one when the facelockareaview is initialized.

Change-Id: I8511f175d68023372e11d6e76fa1c44df6ac8a3d
2012-04-17 16:36:55 -04:00
Jeff Brown
c2346134bb Extract Vibrator implementation from interface.
Moved the core logic of Vibrator into SystemVibrator, potentially
allowing for the creation of other Vibrator subclasses.

Fixed several places where we were creating new Vibrator
instances unnecessarily instead of getting it from the Context.

It is safe to make Vibrator abstract because its constructor
was hidden from the SDK so it was not possible to subclass it.

Bug: 6334179
Change-Id: I18ece6544c26a7efb2d5099f8346a10aef8a5e18
2012-04-13 04:05:17 -07:00
Dianne Hackborn
ff5b158f69 Keep activities stopped while the lock screen is up.
Tell the activity manager when the lock screen is shown, so it
can keep itself (mostly) in sleep mode during this time, having
the foreground actvities remain in their stopped state.

Change-Id: I71c86d3298f23a98014d7ae36fd540c9df9a64e6
2012-04-12 17:26:55 -07:00
Dianne Hackborn
0c2acffec8 Clean up lock screen hide animation.
We now have an animation to apply to the thing behind the lock
screen animation when it isn't on the wallpaper, which looks
similar to the animation we use when both are on the wallpaper.

In implementing this, cleaned up the code to figure out up-front
which animation to run, getting rid of that kludgy thing that
cleared the window animation if the wallpaper was not being used
for the lower windows.

Change-Id: Ifc4c8a8894ad384124dcf4bbdaab134f1157b0f3
2012-04-12 15:26:11 -07:00
Dianne Hackborn
ed4995d646 Merge "Change window manager to use fixed size for the status bar." 2012-04-12 14:10:41 -07:00
Brian Colonna
3223e2537d Changed FUL calls to more general biometric sensor calls
This is another step toward fix 5460649 - cleanup
LockPatternKeyguardView (LPKV).

After this change, LPKV has minimal knowledge of FUL.  FUL now
implements a new BiometricSensorUnlock interface and LPKV talks to
that interface.  Other biometric sensors can implement the same
interface such that LPKV doesn't need to know much about what type
of biometric sensor is being used or its implementation.

The new interface has better, more general function names, so some
function names in FaceUnlock.java were changed.  Some of the functions
in FaceUnlock.java were also reordered to match the interface.

This change should not change the behavior of FUL.  There are two
places where code functionality was changed:

1) There was a showArea() function and a showAreaWithTimeout()
function that were both called from LPKV.  To simplify the interface,
only a show() function is provided - it takes a timeout and if the
timeout is 0 it doesn't do the timeout.

2) There was a stopIfRunning() function that did a check to make sure
FUL was running.  If FUL was running, it stopped FUL.  Then it
returned a boolean indicating if it had been running.  LPKV sometimes
needs to know if FUL was running so it knows if it should restart FUL.
To simplify the interface, a single stop() function is provided which
returns whether or not it was running.  I believe the 'if running'
check was redundant and that there was no case where calling stop()
when it wasn't running would cause any badness.

Change-Id: I717268f360aed823e603df8e687cd107aa69ae11
2012-04-11 18:53:25 -04:00
Brian Colonna
18ec7a95be Merge "Fix: FUL coming up when phone is powered off from lockscreen" 2012-04-11 15:46:34 -07:00
Brian Colonna
c3cd2500a5 Fix: FUL coming up when phone is powered off from lockscreen
When FUL was enabled and the power was turned off from the lockscreen,
either manually or by timing out, the lockscreen would turn back on
and FUL would start.

I believe this is due to a recently-added 'force' flag, which this
commit removes.

Change-Id: I314125fe52afe1536ab5a4600f39f563e1d58991
2012-04-11 18:35:22 -04:00
Jeff Brown
cdebd54805 Merge "Don't do anything on lid state change by default." 2012-04-11 15:19:41 -07:00
Jeff Brown
2e7760eba0 Don't do anything on lid state change by default.
Because a lid switch can be used to do many things, it's best
if the framework does not do anything by default when the lid is
opened or closed.  The behavior of the lid switch should be
configured on a per-product basis in a config.xml resource overlay.

Bug: 6320088
Change-Id: I9f768dd11d76c3c17c49f46c92f993ee2ff1409f
2012-04-11 15:14:55 -07:00
Dianne Hackborn
de368ff1c9 Change window manager to use fixed size for the status bar.
Unlike the nav bar, it only uses a fixed size for determining
how to layout elements around it; it lets the status bar window
itself be whatever size it wants.

Change-Id: Id04278981ab38915280a47368fccc7ec14bb97ec
2012-04-11 10:39:43 -07:00
Amith Yamasani
f882f1ad4e Bind to the correct face lock service.
When switching users, bind to the correct instance of FaceLock.

Tried to get the facelock screen to show up when switching users, but it
doesn't. Power off/on works, but not switching between users on the
lockscreen. Maybe a timing issue? Or not calling some function to make
the overlay visible?

Change-Id: I9300971331c7f0ed93ae7da28170342629426b20
2012-04-10 15:13:39 -07:00
Brian Colonna
0b2b1feaa2 Merge "Passing useLiveliness flag to FUL in startUi call" 2012-04-10 06:25:26 -07:00
Daniel Sandler
c38cf4c7db Merge "New Android Dreams architecture, disabled for now." 2012-04-10 05:33:07 -07:00
Dianne Hackborn
077ee85317 Fix issue #6309296: Framework returns Configuration.SCREENLAYOUT_SIZE_LARGE for Xoom
Change-Id: I5882e6f6ab249232b69bdc4b8e692716f2fe5efa
2012-04-09 16:27:07 -07:00
Brian Colonna
f66e930e72 Passing useLiveliness flag to FUL in startUi call
Because of changes in support of multi-user functionaity, the FUL
'eye blink' checkbox was no longer enabling liveliness detection.

It no longer makes sense to check the biometric flags (such as the
liveliness flag) inside of the Face Unlock service.  Instead, that
flag is now passed in from lockscreen via the aidl interface when
startUi is called.

Change-Id: I591cf1924fbb24da7d54b94ef29824e5197d3b20
2012-04-09 16:36:28 -04:00
Brian Colonna
82920edd89 Merge "Separated FUL functionality from LockPatternKeyguardView" 2012-04-09 13:25:37 -07:00
Daniel Sandler
7d276c377c New Android Dreams architecture, disabled for now.
Rather than normal Activities (which have a host of problems
when used for this purpose), screen savers are now a
special kind of Service that can add views to its own
special window (TYPE_DREAM, in the SCREENSAVER layer).

Dreams are now launched by the power manager; whenever it is
about to turn the screen off, it asks the window manager if
it wants to run a screen saver instead. (http://b/5677408)

Also, the new config_enableDreams bool allows the entire
feature to be switched on or off in one place. It is
currently switched off (and the APIs are all @hidden).

Change-Id: Idfe9d430568471d15f4b463cb70586a899a331f7
2012-04-09 15:33:26 -04:00
Brian Colonna
9431366ecb Separated FUL functionality from LockPatternKeyguardView
This is the first step toward fix 5460649.  All of the FUL functions
were pulled out of LockPatternKeyguardView into their own FaceUnlock
class.  LockPatternKeyguardView now has an mFaceUnlock member, which
is new'd inside of the LockPatternKeyguardView constructor, passing
it some objects it needs to do FUL.  FUL calls are now made from
LockPatternKeyguardView by doing mFaceUnlock.foo().  Some of the
function names were reduced to avoid redundancy (e.g.
mFaceUnlock.start() instead of mFaceUnlock.startFaceLock()).

This change is just a refactoring and is not intended to change
any functionality.  There will be other cleanups in the near
future...this is basically just the minimum changes needed to get
the FUL functionality into its own class.

Change-Id: I7dc5b22857bbf1659238b0e2d113069f7bf9ffe7
2012-04-09 10:12:32 -04:00
Daniel Sandler
c8cb329147 Fix boot on sw600dp devices.
Soon we'll switch this threshold to 720dp, once the
PhoneStatusBar is ready to support 600dp wide devices. For
now, however, restore the previous behavior.

Bug: 6300512
Change-Id: Ibedb8ffc1b677e3bbe9af230598adb7db278635b
2012-04-05 23:57:26 -04:00
Jeff Brown
ac14351e16 Move some APIs from window manager to input manager.
Simplified input injection API down to just one call.

Removed all input state reading API.  It was only used by the
window manager policy and required a permission that applications
could not obtain.  READ_INPUT_STATE is now unused and deprecated.

Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
2012-04-05 19:33:11 -07:00
Dianne Hackborn
e8644b695d Merge "Fix so that status bar doesn't resize when hiding nav bar." 2012-04-05 19:03:37 -07:00
Dianne Hackborn
9801435820 Fix so that status bar doesn't resize when hiding nav bar.
The status bar now extends behind the nav bar, and uses
fitsSystemWindows to ensure its content is not covered.  We
always report a stable content insets (as if the nav bar is
visible) even if the nav bar is hidden, so the content doesn't
jump when transitioing.  This does mean that if you only hide
the nav bar (and not the status bar), when in landscape you
will end up with a status bar whose right side still leaves
room for the nav bar.  But why the hell would you want to do
that?

Also improve documentation on setSystemUiVisibility().

Change-Id: I8087d875f1214ef0085a91b5ed5c2f35ff2fc1b3
2012-04-05 18:31:41 -07:00
Jim Miller
4350498002 Merge "Fix 6216452: Add search target to lock screen" 2012-04-05 17:31:19 -07:00
Jim Miller
c00fd7ab30 Fix 6216452: Add search target to lock screen
Change-Id: I0784e844fb8e1f904f37d2572c6ddbd6c22e95d1
2012-04-05 17:14:02 -07:00
Jeff Brown
e9bdb31ea1 Merge "Refactor input system into its own service." 2012-04-05 15:30:10 -07:00
JP Abgrall
35bb98d508 Merge "unlock screen: enable DEBUG and track pattern start/cell progress." 2012-04-05 14:55:09 -07:00
Amith Yamasani
2184a985da Merge "Lockscreen settings per user" 2012-04-05 14:43:22 -07:00
Jeff Brown
4532e61584 Refactor input system into its own service.
Extracted the input system from the window manager service into
a new input manager service.  This will make it easier to
offer new input-related features to applications.

Cleaned up the input manager service JNI layer somewhat to get rid
of all of the unnecessary checks for whether the input manager
had been initialized.  Simplified the callback layer as well.

Change-Id: I3175d01307aed1420780d3c093d2694b41edf66e
2012-04-05 14:42:11 -07:00
Amith Yamasani
52c489cd63 Lockscreen settings per user
Move all lockscreen related settings to LockSettingsService.
LockPatternUtils uses this through IPC instead of Secure settings.
Migrate old settings to new database managed by LockSettingsService.
Passwords and patterns are stored in a new per-user location, except
 for the primary user, for backward compatibility.
KeyguardViewMediator and LockPatternKeyguardView listen for changes
to user and updates the lockscreen.

Settings provider will look for Lock settings in the LockSettings
service now for the entries that used to be stored in Settings.

Change-Id: I956cd5b95e2d9d45a6401af7e270e6a5aa2dcc98
2012-04-05 14:03:36 -07:00
Dianne Hackborn
f87d19621d Clean up status bar, system bar, navigation bar management.
The status bar and navigation bar are two completely separate
elements, with their own semantics.  The system bar now classifies
itself as a navigation bar, since that is really how it behaves.

This required rewriting the HDMI resizing code, so that it is
all done by PhoneWindowManager since that is what is responsible
for the size of the navigation bar (and thus now system bar).  This
actually gets rid of a fair amount of code, and means we can also
do the same thing for a pure navigation bar.

Likewise the system bar now has the navigation bar ability to be
hidden when requested by system UI flags.  To get the behavior
we want on Xoom, we only allow the nav bar to be hidden when it
will help provide a better aspect ratio for showing widescreen
videos.

Finally the nav/system bar now animates when hidden and shown.

Change-Id: Ie927154b68376a0b61802f99171ff56b8da92e7a
2012-04-04 16:00:45 -07:00
JP Abgrall
e94d763f69 unlock screen: enable DEBUG and track pattern start/cell progress.
- Turned on DEBUG.
- Added logging for pattern start, and for each cell.

This should help with debugging lockscreen not receiving input when turning
sleeping phone one

Bug: 6258051
Change-Id: Id95e167c2792e80925e8e41c0c624b5bdc222249
2012-04-04 15:11:42 -07:00
Dianne Hackborn
3a3a6cfd8e Add new feature to let apps layout over status bar / system bar.
The main change is a few new flags you can supply to
View.setSystemUiVisibility().  One is a new visibility mode,
SYSTEM_UI_FLAG_FULLSCREEN, which is basically the same as
the global FLAG_FULLSCREEN option for windows, but driven as
part of the system UI state.

There are also three new flags for telling the framework that you
would like to have your application's UI ignore screen
decorations -- SYSTEM_UI_FLAG_LAYOUT_NO_NAVIGATION for going
behind the navigation bar and SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
for ignoring full screen decorations (that is the status bar).

In combination with this you can use SYSTEM_UI_FLAG_LAYOUT_STABLE
to have the framework report consistent insets to your application.

When using NO_NAVIGATION, when the user taps the screen we now
also automatically clear ONLY_CONTENT, so that we atomically show
both UI elements.  This should make it easy for apps like video
players that want to move between fully full-screen and regular
modes.

The ActionBar has also been extended when in overlay mode so
that it will adjust the system window insets to also account
for its space, and allow it to be hidden using the new
SYSTEM_UI_FLAG_FULLSCREEN.

Change-Id: Ic8db1adec49a0f420bfe40c1d92eb21307856d0b
2012-03-30 15:22:04 -07:00
Michael Jurka
50c69b5d8a Merge "Preload recents on phones with hard nav keys" 2012-03-30 05:02:57 -07:00
Michael Jurka
7f2668c846 Preload recents on phones with hard nav keys
Also refactor recents code across Phone/Tablet

Change-Id: Id557c5cb0f7d9378f81c40b20511a5d98bf4078e
2012-03-29 06:28:42 -07:00
Jeff Brown
c97ed10ba8 Merge "Ensure pointer location view is attached to the policy thread." 2012-03-29 03:05:57 -07:00
Jeff Brown
70825161b5 Ensure pointer location view is attached to the policy thread.
Previously we created the PointerLocationView on whatever thread
happened to trigger the call to updateSettings().  There was
also some messiness around having to add or remove the view
while not holding mLock.

Now, just post the work to the policy handler.

This also makes it possible for us to use invalidate() instead
of postInvalidate() in PointerLocationView, which is more efficient.

Change-Id: I0646d7aeecffdc22f6ac56ae3ef951e7a12e2b93
2012-03-29 03:01:10 -07:00
Amith Yamasani
52f1d752f9 Show the current user in power menu
Shows a little indicator next to the current user in the power menu
when multi-user is enabled.

Fixed a bug where Settings was sometimes being launched in the wrong
process when there are 2 instances running.

Change-Id: Iaf2a00f6d1871fd2a88d8982439e445423bb2896
2012-03-28 18:19:29 -07:00
Amith Yamasani
135936072b User management and switching
Broadcast intents that get sent out when users are added/removed/switched.

More work on generating user-specific information in package manager queries.
APIs to update user name and query a user by id.
Removed Package.mSetStopped and mSetEnabled, since they're not user specific.

User removal:
- Cleanup ActivityManager, PackageManager, WallpaperManager, AppWidgetService
  and AccountManager.
- Shutdown processes belonging to the user.

Don't show vibrate option in long-press power if there's no vibrator.

Lock the screen when switching users, to force unlocking.

Change-Id: Ib23a721cb75285eef5fd6ba8c7272462764038fa
2012-03-27 11:23:01 -07:00
Christopher Tate
e90585f89d Add a config resource to disable key-chord screenshotting
The key chord screenshot mechanism introduces significant latency into
processing of volume-key input; enough to be quite noticeable and
annoying on some kinds of device.  This patch introduces a new config
resource entry ("config_enableScreenshotChord"), true by default, so
that products on which this functionality is inapplicable can avoid
its runtime overhead.

Bug 6039047

Change-Id: I968ddf9046741da35988310b7893fae2c0369beb
2012-03-22 15:09:25 -07:00
Jim Miller
d16a4f2967 am d5b5db73: am b7a6f5d7: am 928d3470: Fix 5960562: Show emergency button on PukUnlock screen
* commit 'd5b5db73fcb49a4ca04e9cefc5f5293faba5895e':
  Fix 5960562: Show emergency button on PukUnlock screen
2012-03-20 19:36:33 -07:00
Jim Miller
928d34704b Fix 5960562: Show emergency button on PukUnlock screen
This fixes an issue where the device doesn't show the emergency button
on the SIM PUK unlock screen. The problem was introduced in I3127bfd5
where we allowed the button to be conditionally shown.

Change-Id: I3e2aae2bce89399a2564c3f8a726a8db99cdec86
2012-03-20 15:30:43 -07:00
Jim Miller
b030476d19 Fix 6021938: Improved target support in lock screen
This adds the ability to enable or disable target icons based on the drawable
resource of the target.

It also fixes a bug where we'd show the camera while displaying
the PIN/PUK unlock screen or when it's disabled by DevicePolicyAdmin.

Minor simplification and cleanup KeyguardUpdateMonitor callbacks.

Change-Id: I33fad56a2203bc8b7bcd0300c20478711a56713a
2012-03-19 14:18:13 -07:00
Dianne Hackborn
a4972e951b Add new "options" argument to all startActivity APIs.
This will be used to allow new features to be requested...  such as,
say, a special kind of animation.  Right now there are no options
defined.

Change-Id: I4eb6f27275cdd4bf186f6da316ab93a2372ad4b7
2012-03-14 12:57:14 -07:00
Siva Velusamy
92a8b22e74 ActivityManager: add option to allow OpenGL trace.
This patch adds an option to enable tracing of OpenGL functions.
OpenGL tracing can be enabled by passing "--opengl-trace" option
to am start.  This option requires either a device in debug mode,
or that the application itself has debug permission set.

Change-Id: I77788bfe97c9108943b1f947ce81afe8293d78a0
2012-03-12 12:18:53 -07:00
Jim Miller
fbc46dc3c2 Fix 6028595: Fix reboot loop in AccountUnlock due to null callback
This fixes a bug where the device would get into a reboot loop due to having
a null callback.  The problem was that a recent change caused the callback
to be used indirectly by the constructor before being set.

The solution is to pass the callback to the KeyguardViewBase constructor
which ensures it's ready by the time we call getCallback().

Change-Id: I2598fc5338be99977980e4dea41a096fb2a7ef7e
2012-03-01 16:15:27 -08:00
Wu-cheng Li
75e1ce6335 Use SINGLE_TOP and CLEAR_TOP when starting camera from lock scren.
Add these flags so there is no need to press back key twice to
exit the camera if users slide to camera twice.

bug:6070281

Change-Id: Iadf6ab2798cf9381bc9dc761920f46b022fb6bb8
2012-02-29 21:41:54 +08:00
Michael Jurka
7a3489552c Add shortcut for voice search
On phones with soft nav bar, make long press on
home launch a voice search intent

Change-Id: I69840a96a08524a76e33a306b799222c879db095
2012-02-28 14:37:35 -08:00
Dianne Hackborn
b8678d76c3 resolved conflicts for merge of 210c1a26 to master
Change-Id: Ic44193e62215086c22225f2def5eee3159d26ae8
2012-02-23 10:54:06 -08:00