938 Commits

Author SHA1 Message Date
Marco Nelissen
1ea9a20dce am ee1d541e: Merge "Use SoundPool instead of Ringtone."
* commit 'ee1d541ec89e1d2724a382c90276586e2c28b278':
  Use SoundPool instead of Ringtone.
2011-09-29 13:14:25 -07:00
Marco Nelissen
ee1d541ec8 Merge "Use SoundPool instead of Ringtone." 2011-09-29 13:13:17 -07:00
Marco Nelissen
d5545bd0a9 Use SoundPool instead of Ringtone.
The lock screen was using Ringtone for the lock/unlock sounds, which
meant two new MediaPlayers were created every time a sound needed to
be played. In addition, the Ringtone was assigned to a local variable,
which means it could go be garbage collected and finalized while it
was still playing.
For short sounds that need to be played repeatedly, SoundPool is a
better option anyway, so use that instead.
b/5382634

Change-Id: I8794cbb24604fa7c03032bd5e32ceab37a858054
2011-09-29 12:52:04 -07:00
Mike Cleron
8d61759236 am 2d56123b: Merge "Fix lockscreen Bug: 5391404"
* commit '2d56123b110ff20dd849875be328f1712d128dee':
  Fix lockscreen Bug: 5391404
2011-09-29 12:38:48 -07:00
Justin Ho
b9a4b3c18a Fix lockscreen
Bug: 5391404

Change-Id: I021a37705b72ab1990f7651fecbe743a8af4e372
2011-09-29 12:33:28 -07:00
Adam Powell
62816ac56c am 8f847653: Merge "Fix bug 5386915 - Action mode is intercepting touches it shouldn\'t be"
* commit '8f847653859d9f4c0e0d54f390673b7dccf0b5eb':
  Fix bug 5386915 - Action mode is intercepting touches it shouldn't be
2011-09-28 22:48:15 -07:00
Adam Powell
e0b6cd14ac Fix bug 5386915 - Action mode is intercepting touches it shouldn't be
Standalone action mode windows should not be touch modal.

Change-Id: Ia3bab69b3ac344837093a17c4b58451bcc3471bf
2011-09-28 22:06:39 -07:00
Brian Colonna
d378ba38ba am a50d6625: Merge "Fix 5385186 - Face Unlock no longer shown when first booted"
* commit 'a50d66255288f3ee61bf673630451a2157e6e99e':
  Fix 5385186 - Face Unlock no longer shown when first booted
2011-09-28 19:14:44 -07:00
Brian Colonna
cfdd6242eb Fix 5385186 - Face Unlock no longer shown when first booted
Face Unlock used to show on first boot via an onScreenTurnedOn()
callback.  At some point something changed and this no longer gets
called at boot time.  This left us in the state where the black box
was covering the backup method, but Face Unlock was not starting.

Instead of finding a new way to make Face Unlock start at boot, it
was decided that it is probably best for it not to start at boot
anyway.  So much is happening at boot time, including camera
initialization, that trying to make this work right might cause more
problems than it solves.

This fix moves the code that makes the black box cover the backup
method.  Instead of happening when the layout is originally created,
it now happens in the show() function, which gets called not only
when the screen is turned on, but also before the screen turns off,
such that it is ready to go when the screen turns back on.  This not
only keeps the black box from displaying on boot (because show()
doesn't get called at boot time), but also makes sure the black box is
already there before the screen is turned on, preventing any glitches
that may briefly show the underlying backup method.

Change-Id: I99bdae561a70918b5f12ea5badff08b07d74403c
2011-09-28 20:20:55 -04:00
Brian Colonna
63c04f8b0e am d90172e0: Merge "Pulled out part of onScreenTurnedOn() into show() function"
* commit 'd90172e05fbc912975264814c54bbcfc12cd91f9':
  Pulled out part of onScreenTurnedOn() into show() function
2011-09-28 16:31:34 -07:00
Brian Colonna
d90172e05f Merge "Pulled out part of onScreenTurnedOn() into show() function" 2011-09-28 16:29:48 -07:00
Adam Powell
71a4a8182b am 8917838b: Merge "Fix bug 5386180 - Wire up action bar home/up for dialogs"
* commit '8917838b533c97dfd391371bfe3eaa811c3cd3b7':
  Fix bug 5386180 - Wire up action bar home/up for dialogs
2011-09-28 16:03:46 -07:00
Adam Powell
8917838b53 Merge "Fix bug 5386180 - Wire up action bar home/up for dialogs" 2011-09-28 16:02:13 -07:00
Adam Powell
915ce0d917 Fix bug 5386180 - Wire up action bar home/up for dialogs
Action bars in dialogs are largely an undocumented "feature" but they
do work - with the exception of this since it previously relied on the
host being an Activity. Make it work.

Change-Id: I52ae24c3bfdd9766e4c0f035183e7f148a4e0162
2011-09-28 15:53:55 -07:00
Brian Colonna
4284e9d19a Pulled out part of onScreenTurnedOn() into show() function
The onScreenTurnedOn() function in LockPatternKeyguardView was
actually being called in two cases - when the screen was turned on,
AND when the show() function was called in KeyguardViewManager, which
actually happens just before the screen is turned off.  Face Unlock
functionality was added to the onScreenTurnedOn() function, not
expecting that the function was also being called just before the
screen turns off.  This causes Face Unlock to run when the screen is
turned off, preventing it from running when the screen is turned on.
This was not obvious during testing because it's not a problem when
testing from the lock screen.  To reproduce the problem you must log
in successfully, then turn the screen off, wait, and turn it back on.

The solution was to pull the non-face unlock functionality from
onScreenTurnedOn() into its own function called show(), which is
called from the KeyguardViewManager show() function and also called
from onScreenTurnedOn().  In this way, the onScreenTurnedOn()
functionality is not changed, but the show() function can be used
for the onScreenTurnedOn() functionality minus the Face Unlock stuff.

One exception to note - I left setting mScreenOn inside of
onScreenTurnedOn() and didn't pull it into show()...that seems like
the correct thing to do.

Change-Id: I9dcc144c7842112c4d35eb3f8b4ab1cd42c05675
2011-09-28 12:08:58 -04:00
Brian Colonna
1653f83e38 am 0c66f052: Merge "Fix 5323545 - FaceLock no longer appears when taking a call"
* commit '0c66f0526751ad3f97636b834ea957659a65048b':
  Fix 5323545 - FaceLock no longer appears when taking a call
2011-09-28 06:16:18 -07:00
Brian Colonna
267cb2b284 Fix 5323545 - FaceLock no longer appears when taking a call
Prior to this fix if the screen was off and a call was received, the
onScreenTurnedOn() callback would bring up the FaceLock service,
which would cover the phone interface.  It now requires the call state
to be CALL_STATE_IDLE to start FaceLock.  When the phone interface
closes, the user is left at the backup lock screen.  Bringing FaceLock
up after a call ends does not seem like the correct thing to do.

While working near the FaceLock callback code, the sleepDevice()
callback was removed because it is no longer used (Fix 5327896).

Some cleanup was also done with regards to KeyguardViewManager.
FaceLock calls were being made from the KeyguardViewManager in
onScreenTurnedOn() and onScreenTurnedOff() via an interface to
LockPatternKeyguardView.  This level of indirection was removed
because it can just be handled inside of the corresponding calls
in LockPatternKeyguardView.  Likewise the FaceLock functionality
inside of hide() in KeyguardViewManager is now in
onDetachedFromWindow() in LockPatternKeyguardView.  Overall this
is much cleaner, especially considering interfacing through
KeyguardViewBase was a bit of a hack.

Patch Set 2:

- Now using KeyguardUpdateMonitor to get phone state

- Removed unnecessary wrapper functions for hiding / viewing
  FaceLock area
  - These were really only there because at one point I was calling
    them from KeyguardViewManager and the naming was confusing

- Removed if(DEBUG) from a couple of log messages that are actually
  warnings that shouldn't show up and I want to know if they happen
  even if I don't have DEBUG set to true

Change-Id: Id7befc47dd421156ff6cdb3aaf62fc76fe9cfad2
2011-09-27 12:45:13 -04:00
Jim Miller
feafcd8edc am a2f00da3: am b4f0a9f3: Merge "Fix 5326463: rework sim state handling in lockscreen" into ics-factoryrom
* commit 'a2f00da374cd0d9776bc6c4e1cf3c3def990270b':
  Fix 5326463: rework sim state handling in lockscreen
2011-09-26 20:42:53 -07:00
Jim Miller
a2f00da374 am b4f0a9f3: Merge "Fix 5326463: rework sim state handling in lockscreen" into ics-factoryrom
* commit 'b4f0a9f3894c1f039168ad672f4aa194999c7cdd':
  Fix 5326463: rework sim state handling in lockscreen
2011-09-26 20:40:59 -07:00
Jim Miller
3f5f83b54f Fix 5326463: rework sim state handling in lockscreen
Previously it was possible to get an inconsistent state because there
were two paths that updated the lock screen sim state.  This reworks
the data flow to ensure the same path is always used to update the state.

KeyguardUpdateMonitor now correctly updates the entire state of the callee
whenever a new callback is registered.

In addition, KeyguardUpdateMonitor now caches the phone state in order
to avoid a round-trip binder call in updateEmergencyCallButtonState().
This avoids a condition that could make lockscreen unresponsive while
updating the emergency call button state.

KeyguardStatusViewManager also ensures the TransportControlView is
hidden when created to ensure we don't inappropriately update the carrier
line while waiting for the first callbacks to update the status lines.

Change-Id: I6b3975b703a7d90bac8d0fe29fbc0f1d9c5e0e7d
2011-09-26 15:17:05 -07:00
Brian Colonna
cdf5eec7d9 am 0e86bc07: Merge "FaceLock is now closed if emergency dial button is pressed"
* commit '0e86bc07886bbd7e2b9166d1e6c7b5dc94d14217':
  FaceLock is now closed if emergency dial button is pressed
2011-09-26 06:04:51 -07:00
Brian Colonna
0e86bc0788 Merge "FaceLock is now closed if emergency dial button is pressed" 2011-09-26 06:03:02 -07:00
Jeff Brown
c976aec618 am 4c253119: Merge "Prevent unintended rotations. Bug: 4981385"
* commit '4c253119db0ce753e46ec3809b54b9e357d363db':
  Prevent unintended rotations. Bug: 4981385
2011-09-23 18:29:49 -07:00
Jeff Brown
4c253119db Merge "Prevent unintended rotations. Bug: 4981385" 2011-09-23 18:28:01 -07:00
Jeff Brown
c0347aa19f Prevent unintended rotations.
Bug: 4981385

Changed the orientation listener to notify the policy whenever
its proposed orientation changes, and changes the window manager
to notify the orientation listener when the actual orientation
changes.  This allows us to better handle the case where the
policy has rejected a given proposal at one time (because the
current application forced orientation) but might choose
to accept the same proposal at another time.

It's important that the proposal always be up to date.  A proposal
becomes irrelevant as soon as the phone posture changes such
that we can no longer determine the orientation with confidence
(such as when a device is placed flat on a table).

Simplified the orientation filtering.  Now we just wait 200ms
for the device to be still before issuing a proposal.  The idea
is that if the device is moving around a lot, we assume that
the device is being picked up or put down or otherwise in
the process of being moved.  We don't want to change the rotation
until that's all settled down.  However, we do want to tolerate
a certain amount of environmental noise.

(The previous confidence algorithm was also designed along
these lines but it was less direct about waiting for things
to settle.  Instead it simply made orientation changes take
longer than usual while unsettled, but the extra delay was often
too much or too little.  This one should be easier to tune.)

Change-Id: I09e6befea1f0994b6b15d424f3182859c0d9a530
2011-09-23 17:26:09 -07:00
Brian Colonna
ae1c653770 am 93b19cbe: Merge "Changed result of entering credentials after forgot pattern"
* commit '93b19cbe4bb48ab2c67180c2b6cd93e1e26edf31':
  Changed result of entering credentials after forgot pattern
2011-09-23 15:11:33 -07:00
Brian Colonna
93b19cbe4b Merge "Changed result of entering credentials after forgot pattern" 2011-09-23 15:09:15 -07:00
Adam Powell
e245c11dfb am 6ed1bfb1: Merge "Fix bug 5341139 - bottom bar stays if app wants to handle orientation change"
* commit '6ed1bfb1b68071d64a8ab145cc249d37377f9758':
  Fix bug 5341139 - bottom bar stays if app wants to handle orientation change
2011-09-23 15:07:53 -07:00
Adam Powell
6ed1bfb1b6 Merge "Fix bug 5341139 - bottom bar stays if app wants to handle orientation change" 2011-09-23 15:06:30 -07:00
Dianne Hackborn
0ba3f30655 am a982ad19: Merge "Fix issue #5173952: Opening a Notification From Lock Screen..."
* commit 'a982ad19d2aee54f714fa3ad9ee4ddbac08dc0fe':
  Fix issue #5173952: Opening a Notification From Lock Screen...
2011-09-23 14:56:48 -07:00
Adam Powell
a05aba9c50 Fix bug 5341139 - bottom bar stays if app wants to handle orientation
change

Let action bars move between split/unsplit mode on configuration
changes if set to split when narrow.

Change-Id: I13f5115a65247cb1878ee823493ca8e2b6ba4cf6
2011-09-23 14:23:30 -07:00
Dianne Hackborn
90c52de286 Fix issue #5173952: Opening a Notification From Lock Screen...
...Should Skip Unsecure Lockscreen (ICS)

Also while I am in there, clean up logging of intent objects to include
even less sensitive information, while showing the true Intent in dump
output (since apps can't get to that).

Change-Id: I35fed714645b21e4304ba38a11ebb9c4c963538e
2011-09-23 13:39:33 -07:00
Brian Colonna
eef1ae1d91 FaceLock is now closed if emergency dial button is pressed
Previously facelock would remain on top of the dial keypad until it
timed out.

Change-Id: Iaf1b3b0040fbfcb5c32e3db7b0466d2a6f89dc1d
2011-09-23 15:52:18 -04:00
Brian Colonna
aae641bc64 Changed result of entering credentials after forgot pattern
After pressing forgot pattern and entering credentials, it used to
bring you to the screen to choose a new pattern.  Now you are brought
to the screen to choose any unlock method.  The reason for this change
is that both Pattern and FaceLock are valid possibilities when a
pattern is forgotten since FaceLock can use a pattern as a backup
method.

Change-Id: Ide28a780771a50952e72c3c06e1f71cbcb48f834
2011-09-23 14:37:11 -04:00
John Wang
85248df45e am 5298a8c7: am dd6d1bbd: Merge "Update PUK unlock screen." into ics-factoryrom
* commit '5298a8c71ae0125b32cc9e00062b9be370d9a043':
  Update PUK unlock screen.
2011-09-22 23:44:43 -07:00
Adam Cohen
e8feb4a59c am a0c7a576: am 08ee7fa4: Merge "Fixing emergency dialer flicker on lock screen (issue 5314293)" into ics-factoryrom
* commit 'a0c7a5765dbbd255f9a122ba8829ca44032acde0':
  Fixing emergency dialer flicker on lock screen (issue 5314293)
2011-09-22 23:44:41 -07:00
John Wang
5298a8c71a am dd6d1bbd: Merge "Update PUK unlock screen." into ics-factoryrom
* commit 'dd6d1bbd15c4e5cf1b3e0ac34c96f29fb04863c6':
  Update PUK unlock screen.
2011-09-22 23:39:37 -07:00
Adam Cohen
a0c7a5765d am 08ee7fa4: Merge "Fixing emergency dialer flicker on lock screen (issue 5314293)" into ics-factoryrom
* commit '08ee7fa463aee5e83f77789e9a99f17a34ab68b4':
  Fixing emergency dialer flicker on lock screen (issue 5314293)
2011-09-22 23:39:33 -07:00
Adam Powell
2fb627239a am 9b01e30c: Merge "Fix bug 5355912 - SearchView in ActionBar with Theme.Holo.Light.DarkActionBar gets black text"
* commit '9b01e30ceaf76a0c2a20fe9398c0b1d295136e3a':
  Fix bug 5355912 - SearchView in ActionBar with Theme.Holo.Light.DarkActionBar gets black text
2011-09-22 19:33:45 -07:00
Adam Powell
d65b3b99f0 Fix bug 5355912 - SearchView in ActionBar with
Theme.Holo.Light.DarkActionBar gets black text

Make sure that menus generated for use in action bars get themed correctly.

Change-Id: I14ba676d296c785514425d40d89e62dc4ff1da1a
2011-09-22 18:53:15 -07:00
Jason Simmons
8e64fca6f1 resolved conflicts for merge of fb49cd95 to ics-aah
Change-Id: I55cfbddf87914bbdb74998b1676b245182f3a6fd
2011-09-22 16:36:14 -07:00
John Wang
dd6d1bbd15 Merge "Update PUK unlock screen." into ics-factoryrom 2011-09-22 15:44:40 -07:00
Dianne Hackborn
400110902e Fix issue #5355844: PowerManager does not call screenTurningOn after boot.
Be more explicit about initialization -- power manager never sends
screen update when first initializing, phone window manager retreives
current screen state and applies that itself when initializing.

Change-Id: I8294ed36d700e186c1637754df8c8183721c15dd
2011-09-22 13:37:48 -07:00
John Wang
7f3eb49ad5 Update PUK unlock screen.
1. Make Pin and Puk focusable EditText.
2. Add hint text for pin and puk.
3. Update focusEntry logic.

bug:5243771
Change-Id: I65bd52510bbbf0ebd7830ecac7e31159ae750c6c
2011-09-22 11:59:46 -07:00
Jeff Brown
b59b66266c am b35914bb: Merge "Disallow 180 rotation for phones. Bug: 4981385"
* commit 'b35914bb90c0650f65bdc7bdca1de24c2fd0179f':
  Disallow 180 rotation for phones. Bug: 4981385
2011-09-21 21:11:40 -07:00
Jeff Brown
088663e846 am a829e166: Merge "Handle orientation changes more systematically. Bug: 4981385"
* commit 'a829e16681903e6a41901145195f88bf9d952f88':
  Handle orientation changes more systematically. Bug: 4981385
2011-09-21 21:11:37 -07:00
Jeff Brown
b35914bb90 Merge "Disallow 180 rotation for phones. Bug: 4981385" 2011-09-21 21:09:15 -07:00
Jeff Brown
a829e16681 Merge "Handle orientation changes more systematically. Bug: 4981385" 2011-09-21 21:09:10 -07:00
Jeff Brown
d3187e39b0 Disallow 180 rotation for phones.
Bug: 4981385

Change-Id: Icaed9cfe4ee9771ca5951abcd1173024d87a024b
2011-09-21 19:26:44 -07:00
Jeff Brown
01a98ddbdf Handle orientation changes more systematically.
Bug: 4981385

Simplify the orientation changing code path in the
WindowManager.  Instead of the policy calling setRotation()
when the sensor determined orientation changes, it calls
updateRotation(), which figures everything out.  For the most
part, the rotation actually passed to setRotation() was
more or less ignored and just added confusion, particularly
when handling deferred orientation changes.

Ensure that 180 degree rotations are disallowed even when
the application specifies SCREEN_ORIENTATION_SENSOR_*.
These rotations are only enabled when docked upside-down for
some reason or when the application specifies
SCREEN_ORIENTATION_FULL_SENSOR.

Ensure that special modes like HDMI connected, lid switch,
dock and rotation lock all cause the sensor to be ignored
even when the application asks for sensor-based orientation
changes.  The sensor is not relevant in these modes because
some external factor (or the user) is determining the
preferred rotation.

Currently, applications can still override the preferred
rotation even when there are special modes in play that
might say otherwise.  We could tweak this so that some
special modes trump application choices completely
(resulting in a letter-boxed application, perhaps).
I tested this sort of tweak (not included in the patch)
and it seems to work fine, including transitions between
applications with varying orientation.

Delete dead code related to animFlags.

Handle pausing/resuming orientation changes more precisely.
Ensure that a deferred orientation change is performed when
a drag completes, even if endDragLw() is not called because the
drag was aborted before the drop happened.  We pause
the orientation change in register() and resume in unregister()
because those methods appear to always be called as needed.

Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
2011-09-21 19:26:15 -07:00