521 Commits

Author SHA1 Message Date
Mike Lockwood
6aea1154ba DO NOT MERGE: KeyguardManager: Add isKeyguardLocked() and isKeyguardSecure()
BUG: 3402847

Change-Id: I7cb199763e8d5386914b4c2173c9e1579b08674c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-26 14:32:00 -05:00
The Android Open Source Project
b2abd8c424 Mass merge from gingerbread - do not merge
Change-Id: I45dc3596bf4211d8f91c64f2d1d00588878df629
2011-01-30 12:40:38 -08:00
Jim Miller
a6b4ffcc60 Fix 3403858: Remove lock icons from status1 area.
Change-Id: Ib311f7a9dd4c46965263b3cf72994aab5d2dfb0d
2011-01-28 15:54:49 -08:00
Joe Onorato
4671ce56cd Make keyguard also ask to turn the back button off, now that it is controlled separately.
Bug: 3363046
Change-Id: Iaa7bc0428ae4a8f0c133fd699b762e6c4f167d63
2011-01-27 21:41:34 -08:00
Jeff Hamilton
992f75bcd0 resolved conflicts for merge of 6687ecb4 to honeycomb-merge
Change-Id: Id9677d2ef1c03191cf73a7d90e80b57ea686afec
2011-01-27 10:44:21 -06:00
Jeff Brown
da910fd5ea Merge "Handle ActivityNotFoundException in the WM policy." into honeycomb 2011-01-26 23:52:41 -08:00
Joe Onorato
e193c4688f Merge "Fix 3388705: Explicitly check for low battery level" into honeycomb 2011-01-26 22:21:26 -08:00
Jim Miller
b92e18e2df Fix 3388705: Explicitly check for low battery level
This fixes a bug in StatusView believed to be caused by
seeing "invalid charger" update from BatteryService.

The code normally relies on "interesting events", as determined
by KeyguardUpdateMonitor.  I believe something else is
triggering an update (perhaps a SimStateChanged event) that updates
the status without also updating StatusView.mShowingBatteryInfo
and mPluggedIn.

The safer way to do this is to explicitly check the battery
level before telling the user the device needs to be charged.

Change-Id: Ic39ed86c78a157dc9fbdef4d76a9c3db39ccafca
2011-01-26 21:58:28 -08:00
Jeff Brown
f0a3cc5a5f Handle ActivityNotFoundException in the WM policy.
When invoking a registered shortcut for which the activity was not
found, the startActivity throws ActivityNotFoundException.  If this
exception is not caught and handled, then the shortcut key is
dispatched to the application instead of being suppressed as it
should have been.

Found while fixing Bug: 3396233

Change-Id: I0e8e9e3ba09dd403a901d5eae12839734be467ed
2011-01-26 19:32:07 -08:00
Dianne Hackborn
2dc9c784b2 Merge "Fix issue #3382992: IME close animation stutters from URL bar" into honeycomb 2011-01-26 19:04:15 -08:00
Dianne Hackborn
63042d6a03 Fix issue #3382992: IME close animation stutters from URL bar
Gross hack is grosser.

Change-Id: I0a34bf1d7c16c547402318f24776a5f7e8b7552b
2011-01-26 18:56:29 -08:00
Joe Onorato
14782f705e Expose the window flags for lights out mode.
I hadn't wanted to do this, but it makes porting the FLAG_FULLSCREEN
stuff over to this simpler because you don't have to go find a view
to proxy through.

This change also clears the flag everywhere when the window manager
notifies the views that the change has come back.

Change-Id: I48392c7550925bcca50c5bb9e1f263e99de6c7bc
2011-01-26 10:47:39 -08:00
Joe Onorato
644f9c3ad9 Make FLAG_FULLSCREEN not go into lights out mode anymore.
Change-Id: I4a0aa8789f537717f82df4efb6a35108e1ab1784
2011-01-26 10:32:18 -08:00
Jeff Brown
30bc34f191 Fix surface frame size reporting.
The SurfaceHolder provided by the wallpaper service was not reporting
the correct size in getSurfaceFrame().  This broke an optimization in
the ImageWallpaper.  The old code happened to work because calling
lockCanvas on the SurfaceHolder with a null dirty rectangle happened
to have the side-effect of updating the SurfaceHolder's surface frame
size field because it passed mSurfaceFrame as the dirty rect, causing
mSurfaceFrame to be set to the size of the region to be drawn.

However, relying on this side-effect is wrong.  Among other things,
the dirty region could actually be smaller than the surface frame.

This patch fixes WallpaperService, SurfaceView and ViewRoot to ensure
that the surface frame size is always set explicitly and is not modified
by calls to lockCanvas.

Change-Id: I10948f5ec269409ceaf0f7d32b3f6731e9499ebc
2011-01-25 13:10:30 -08:00
Jeff Brown
4519f07e9c New orientation listener.
The objective in this listener is to be more careful about the
signal processing to prevent spurious orientation changes
and to make all of the tweakable factors physically meaningful.

The calibration is defined in terms of time constants and
does not assume a particular discrete sampling rate.  This is
useful because it allows us to change the accelerometer sampling
interval if desired without having to change the calibration.
Moreover, the accelerometer sampling interval can vary +/- 20ms
from one sample to the next even in normal circumstances.

Proposed orientation changes are weighted by confidence factors
that vary exponentially in relation to how close the device
is to the ideal orientation change posture (screen is vertical,
angle is exactly at the midpoint of the orientation quadrant,
and no external acceleration beside gravity).  When not in an ideal
posture, the device takes proportionally longer to settle into a
new orientation state.

Added a little tool to plot the log output of the
WindowOrientationListener.  Check the README for more information
about how to use it.

Change-Id: I787f02d03582ff26367df65eda8d9ce85c5cb343
2011-01-24 13:46:57 -08:00
Joe Onorato
4c541b1303 Merge "visibility ("lights out") API." into honeycomb 2011-01-23 19:26:13 -08:00
Joe Onorato
664644d9e0 visibility ("lights out") API.
1. Views may setSystemUiVisibility() to recommend that
the system chrome (status bar or other UI) show or hide
itself.  (This functionality was previously available only
via the FLAG_FULLSCREEN window flag for some SystemUI
implementations.)

2. Views may register a OnSystemUiVisibilityChangedListener
on a view, and find out when the system UI actually
appears or disappears, allowing apps to coordinate the
appearance of their own UI if desired.

Bug: 3241144
Change-Id: Ia1758d94099182d49a1e3688ea2738ae4995b829
2011-01-23 19:22:52 -08:00
Adam Powell
8ccea78c01 Merge "Fix bug 3299208 - Some apps' dialogs aren't show()ing successfully" into honeycomb 2011-01-23 16:09:54 -08:00
Adam Powell
e571e60a3d Fix bug 3299208 - Some apps' dialogs aren't show()ing successfully
Fix legacy submenus in options menus.

Change-Id: I3d115c72d99dadd5b23f9459fd27277a39de332b
2011-01-23 15:18:46 -08:00
Jeff Brown
892bd76881 Fix SENSOR_LANDSCAPE and SENSOR_PORTRAIT
Fixed a bug in the handling of SENSOR_LANDSCAPE and SENSOR_PORTAIT
on devices that have a natural landscape orientation.  The old code
was disabling 180 degree orientation detection when it shouldn't have.

Change-Id: I484a0aa44b3b8267a7d3b74bdf39c296faa7c6e3
2011-01-23 13:05:44 -08:00
Jim Miller
e25c4d1077 Merge "Fix 3339257: Update lockscreen keyboard to fit Holo theme" into honeycomb 2011-01-19 20:15:49 -08:00
Jim Miller
688435833f Fix 3339257: Update lockscreen keyboard to fit Holo theme
This updates the lockscreen keyboard to be like the
latin-1 IME keyboard and updates it to fit the holo theme.

Fixed some minor issues addressed in review.

Change-Id: I3c6dd8f91be753510e6eadfa9ad913f77038947b
2011-01-19 20:12:34 -08:00
Dianne Hackborn
661b6cfb2b Merge "Okay, new plan for dialogs." into honeycomb 2011-01-18 17:48:22 -08:00
Dianne Hackborn
ef57575887 Okay, new plan for dialogs.
Don't dismiss by default when tapping outside, even for AlertDialog.

If AlertDialog doesn't have any buttons, tapping outside will dismiss it.

Applications can make their own dialogs (or activities looking like
dialogs) can use the existing and new APIs to control this behavior
themselves so that it does the right thing.

Change-Id: I02bfb9161e169de0033200211b3a7ec80080bd83
2011-01-18 17:35:17 -08:00
Adam Powell
6cfc7a0acb Merge "Fix bug 3365208 - Contextual Action Bar is not displayed when the context item is changing" into honeycomb 2011-01-18 16:57:59 -08:00
Adam Powell
a1e6358a4c Fix bug 3365208 - Contextual Action Bar is not displayed when the context item is changing
Change-Id: I9e7ec4ab14c6008397d26c499ccf478f8875f918
2011-01-18 16:51:22 -08:00
Dianne Hackborn
36c84403ec Merge "Fix issue #3362484: Can't dismiss activity picker by tapping outside dialog" into honeycomb 2011-01-18 15:31:21 -08:00
Dianne Hackborn
cfaf8878de Fix issue #3362484: Can't dismiss activity picker by tapping outside dialog
Change-Id: Idc2fe5a86c61e8f94fe9d902a0087a05f6f7918e
2011-01-18 15:28:41 -08:00
Dianne Hackborn
08121bca5b Fix issue #3362666 Activities launched from ongoing notifications don't animate
The phone-oriented code for turning off animations when the screen is entirely
covered by the status bar was not appropriate for the tablet.

Change-Id: Ica3e0db989f16b9187eacd6ecf4ac3d17661dd6d
2011-01-18 11:08:40 -08:00
Jim Miller
6e3212a38b Merge "Fix 3329600: Always enable screen rotation in lockscreen." into honeycomb 2011-01-17 16:23:16 -08:00
Jim Miller
e28016c286 Fix 3329600: Always enable screen rotation in lockscreen.
Sometimes we get the wrong value for the sensor resource we
use to configure lockscreen orientation.  However, the current
UI design has LockScreen always respond to orientation (when
enabled in settings) so we don't need to rely on this for the time-being.

Change-Id: If37314befd25a7b3306500643155523ad4fe6657
2011-01-17 16:12:39 -08:00
Jim Miller
3d7a9707a5 Merge "Fix 3210299: Extend lock screen wake timeout to 10s" into honeycomb 2011-01-17 15:53:42 -08:00
Jim Miller
77274695a7 Fix 3210299: Extend lock screen wake timeout to 10s
Change-Id: I9e4f8761a80271b97ff6411a41664642273baaef
2011-01-17 15:28:21 -08:00
Adam Powell
92cd4d0296 Merge "Fix bug 3360882 - Allow FEATURE_CUSTOM_TITLE and FEATURE_ACTION_MODE_OVERLAY to coexist." into honeycomb 2011-01-16 19:58:51 -08:00
Adam Powell
8f68f4fe79 Fix bug 3360882 - Allow FEATURE_CUSTOM_TITLE and
FEATURE_ACTION_MODE_OVERLAY to coexist.

Fix "custom title" dialog window decor for holo.

Change-Id: Ia732caeb89e12d8d754be31c3bd2faf13a8c95d6
2011-01-16 19:55:21 -08:00
Jim Miller
305093f911 Fix 3005526: Properly update StatusView from Password/PIN unlock
This uses the newly added setHelpMessage() to properly show PIN and
password help in StatusView.

Change-Id: I8662e179e989c6e72f657c81f23b1b2fa7982727
2011-01-16 19:09:15 -08:00
Jim Miller
057d9f16f7 Merge "Fix 3342063: Correctly update StatusView when battery changes." into honeycomb 2011-01-16 17:51:04 -08:00
Jim Miller
fc5001a592 Fix 3342063: Correctly update StatusView when battery changes.
LockScreen wasn't correctly updating StatusView when the battery
status changed.  In addition, the messages aren't supposed to
"pop" when changed, so changed visibility state from GONE to INVISIBLE
when not in use.

Change-Id: Icacbf7e2275c77a28e7e0a9d1247abdbebadcd4f
2011-01-16 17:45:46 -08:00
Jim Miller
6687ecb447 Merge "Fix 3106227: use WeakReferences for receivers in DigitalClock class" into gingerbread 2011-01-16 16:14:52 -08:00
Jim Miller
b47bed9c48 Fix 3355957: Don't hide the keyboard for PIN/Password
BT or USB keyboards currently cause the on-screen keyboard to
be hidden.  This will probably need to be refactored in the
future but the change is too complicated for the current
release.

Change-Id: Ieb655b85622f7c174ed4a5d1c3766d130a9d32f1
2011-01-16 15:48:54 -08:00
Jeff Brown
d04a88cb8e Fix keyboard hidden states.
Bug: 3355957
Change-Id: I7ff8f83421ebd89bacd3ba472e23eeba99732cb1
2011-01-16 14:05:47 -08:00
Jim Miller
8b886fab54 Fix 3106227: use WeakReferences for receivers in DigitalClock class
This works around a bug in the framework where LockScreen wouldn't
get GC'd under certain circumstances which would lead to an OOM
crash.  It now uses WeakReferences for observers inside the
DigitalClock container class and unregisters them if the containing
DigitalClock goes away.

Also removed mLive variable which was unused and could potentially
leak the receivers.

Left mAttached for debugging so we can use it to determine if the
calls to onAttachToWindow() and onDetachFromWindow() are grossly
unbalanced which may be the root cause of the original problem.

Have cleanUp() explicitly clear unused references to make
tracing through hprof references easier.

Change-Id: I99a7e0c356001b05eab5aa729564553666febfea
2011-01-14 18:01:12 -08:00
Jeff Brown
06bc9721d8 Merge "Disable soft keyboard when keyboard attached." into honeycomb 2011-01-14 17:48:09 -08:00
Jeff Brown
4aed78b505 Disable soft keyboard when keyboard attached.
Also hide menu shortcuts everywhere until we can get around to
redesigning the menu UI to be more consistent.

Bug: 3306545
Bug: 3330748
Change-Id: I4d4e19525cdfc93d9aae0dcaa1e6266fb552c5bc
2011-01-14 17:36:55 -08:00
Jeff Brown
c8276990df Merge "Add volume down as a safe mode key for Stingray." into honeycomb 2011-01-14 17:22:53 -08:00
Anders Hammar1
0ce53b47d6 DO NOT MERGE Make the Phone options dialog use current language
The title of the Phone options dialog is displayed using wrong
translation if the user changes the current language setting. Moving
the setTitle call to prepareDialog to ensure that the title gets
updated before the dialog is shown.

Change-Id: I6f8f460789effd22de5be8339cc46667269e78c0
2011-01-14 16:00:47 -08:00
Anders Hammar1
e79223ed41 Make the Phone options dialog use current language
The title of the Phone options dialog is displayed using wrong
translation if the user changes the current language setting. Moving
the setTitle call to prepareDialog to ensure that the title gets
updated before the dialog is shown.

Change-Id: I03ff59c7f4ff711a06b05de7cca94fa928cf67ef
2011-01-14 12:32:16 -08:00
Jeff Brown
b09abc1dd2 Add volume down as a safe mode key for Stingray.
Fixed a race condition during startup.  We need to wait for the input
devices to actually be ready before trying to detect safe mode.

Fixed a problem during safe mode activation where we would try to add
the overlay window but the display was not initialized.  Now we do it
after the system is ready.

Bug: 3134825
Change-Id: I4c043c142ae6bf0d865c79d266d36154eaf00709
2011-01-13 21:18:16 -08:00
Dianne Hackborn
f99f9c5f92 Fix issue #3153930: orphan window left on screen
The problem is that if a window containing children is removed
before the children are, the children may be lost.  This change
(amongst the huge amount of new debugging code) now ensures at
this point that all children windows are removed when the parent
is.

Note that this results in a bunch of error messages now as the
client app tries to continue to do things with that child window.
This is correct, it shouldn't be doing that, and needs to be
fixed to stop it.  But at least it now can't cause the window
manager to leak surfaces.

Change-Id: I7b80dd89ff9de7cb5af1dc759cfa4b31ac29cddc
2011-01-13 14:24:16 -08:00
Jim Miller
a3a078e343 Merge "Fix 3201849: Use custom Drawable for bg in lockscreen" into honeycomb 2011-01-12 13:14:33 -08:00