582 Commits

Author SHA1 Message Date
Patrick Dubroy
ece945291e Fix 3272590: Long-press on home & menu should be same as click
Change-Id: I151571900f4bb63910ccfb77fc64c8be9676a224
2011-02-24 10:03:23 -08:00
Daniel Sandler
ad788884de Merge "Rotation lock fix for sensor{Landscape,Portrait} activities." 2011-02-23 06:43:16 -08:00
Jeff Brown
1815c0275e Merge "Be more precise about tracking fallback keys." 2011-02-22 16:37:50 -08:00
Jeff Brown
bfaf3b9170 Be more precise about tracking fallback keys.
Only initiate fallback key handling if the first key down was
not handled and there is no other fallback key already in progress.
This prevents spurious fallbacks from being generated when
applications handle the initial down but not repeated downs or the up.

Change-Id: I8a513896cf96b16dc502cd72291926d5532aa2ab
2011-02-22 15:00:50 -08:00
Mike Lockwood
3c85a4e639 Merge "KeyguardManager: Add isKeyguardLocked() and isKeyguardSecure()" 2011-02-22 13:11:11 -08:00
Daniel Sandler
e7e5ac250c Rotation lock fix for sensor{Landscape,Portrait} activities.
E.g. if an app is sensorLandscape and the device rotation is
locked to landscape, the activity should not be allowed to
flip to seascape even if the device is inverted.

If the rotation is locked 90° from the activity's
supported orientations, we must override the lock as before,
but we now suppress the sensor input (confining the activity
to one of its two orientations). This best preserves the
spirit of the rotation lock while still allowing the
activity to run in a supported configuration.

Bug: 3453407
Change-Id: I8ee255e0250ba7e4534f4622ac37b82d31cf9936
2011-02-22 16:10:23 -05:00
Daniel Sandler
2ed6ad6aec Fix the flipping orientation lock.
We were setting ACCELEROMETER_ROTATION to 0 before putting
in the proper USER_ROTATION value, and PhoneWindowManager's
content observer would eagerly rotate the screen to the last
locked orientation before re-rotating to the updated locked
rotation.

Now we set USER_ROTATION first. Additionally, the
content observer is now the only place we set
mUserRotation{,Mode} (previously we would race with it in
setUserRotationMode()).

Bug: 3425657
Change-Id: I04ba1a3631c6d985c2e406c4d148c39fb5c36216
2011-02-22 15:24:55 -05:00
Jeff Brown
cc0c159e9b Add new hover move action and scroll wheel plumbing.
Added support for tracking the mouse position even when the mouse button
is not pressed.  To avoid confusing existing applications, mouse movements
are reported using the new ACTION_HOVER_MOVE action when the mouse button
is not pressed.

Added some more plumbing for the scroll wheel axes.  The values are
reported to Views but they are not yet handled by the framework.

Change-Id: I1706be850d25cf34e5adf880bbed5cc3265cf4b1
2011-02-19 06:14:21 -08:00
Jeff Brown
6f2fba428c Add new axes for joysticks and mouse wheels.
Added API on InputDevice to query the set of axes available.
Added API on KeyEvent and MotionEvent to convert keycodes and axes
to symbolic name strings for diagnostic purposes.
Added API on KeyEvent to query if a given key code is a gamepad button.
Added a new "axis" element to key layout files to specify the
mapping between raw absolute axis values and motion axis ids.
Expanded the axis bitfield to 64bits to allow for future growth.
Modified the Makefile for keyboard prebuilts to run the keymap
validation tool during the build.
Added layouts for two game controllers.
Added default actions for game pad button keys.
Added more tests.
Fixed a bunch of bugs.

Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
2011-02-19 05:23:10 -08:00
Mike Lockwood
520d8bc1d8 KeyguardManager: Add isKeyguardLocked() and isKeyguardSecure()
BUG: 3402847

Change-Id: I725838c9d96617dd4497f9c80417cd623eceb846
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-18 13:27:02 -05:00
Dianne Hackborn
a924dc0db9 Start window manager refactoring.
Move all of the pieces into a new com.android.server.wm package.

Change-Id: I942b7bcfb84ee0f843f47d58e55ffc5a93c0da94
2011-02-17 14:22:17 -08:00
Jim Miller
79a444a0cd Fix 3391330: Use BATTERY_STATUS_FULL as "Charged" state
Some devices that use LiPo batteries do not charge them to 100%
as a safety margin and to preserve battery longevity.  This change
allows KeyguardUpdateMonitor to determine when the battery state should be
reported as "Charged", provided the device sets BATTERY_STATUS_FULL in
that case.

Manual merge of Change-Id: Iac6cb78e24f9a696017459cc773c38ef7fe7779f

Change-Id: I15c316a17108c064bf2c7e657ca908f8767be936
2011-02-15 15:02:11 -08:00
Jim Miller
79628c6662 Fix 3409550: Fix crash caused when max pattern attempts met.
This fixes a bug introduced by a recent change in GB that
fixed a memory leak and subsequent OOM crash.  The code in
cleanUp() is now more aggressive about releasing unused
references because the view is expected to go away afterwards.

However, due to the immediate callback from reportFailedUnlockAttempt(),
the member variables are cleared before we reach the end of the
handler.  The fix is to postpone reporting the failed attempt
until after the rest of the logic has completed.

Change-Id: Ic35eaf17e9921213c8793d00f9008d957a290b88
2011-02-14 16:18:49 -08:00
Adam Powell
ef5a440d0a Fix bug 2955651 - can open normal menu during action modes
Prevent the usual menu pipeline from trying to open the action bar
overflow menu when the action bar is not visible.

Change-Id: I0708d142ad271368baa79351b97aad1533636fe7
2011-02-10 17:57:48 -08:00
Jim Miller
f81a6f67b7 am 2e4b9985: am 6354dd0b: Merge "Fix 3403858: Remove lock icons from status1 area." into honeycomb
* commit '2e4b9985dba629eac5662c32a6684fb7b880aeff':
  Fix 3403858: Remove lock icons from status1 area.
2011-01-28 16:28:55 -08:00
Jim Miller
2e4b9985db am 6354dd0b: Merge "Fix 3403858: Remove lock icons from status1 area." into honeycomb
* commit '6354dd0b3e507b2afebc5ba41cd57866ade5ba94':
  Fix 3403858: Remove lock icons from status1 area.
2011-01-28 16:26:05 -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
bafa3a31f5 am d6874a10: am cfd0bafd: Merge changes Iaa7bc042,Icc312fc9,I50ba06ed into honeycomb
* commit 'd6874a105ee584b1dc60aae2f2af7c78ee875114':
  Make keyguard also ask to turn the back button off, now that it is controlled separately.
  Allow independent control of the back and the other navigation buttons.
  Allow the status bar disable flags to be used as View's system ui visibility fields.
2011-01-28 13:45:51 -08:00
Joe Onorato
d6874a105e am cfd0bafd: Merge changes Iaa7bc042,Icc312fc9,I50ba06ed into honeycomb
* commit 'cfd0bafdebf1fccd3f5a0baed5cad8a539546e9b':
  Make keyguard also ask to turn the back button off, now that it is controlled separately.
  Allow independent control of the back and the other navigation buttons.
  Allow the status bar disable flags to be used as View's system ui visibility fields.
2011-01-28 13:43:22 -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 Brown
32d35b2cfc am 9d925d2d: am da910fd5: Merge "Handle ActivityNotFoundException in the WM policy." into honeycomb
* commit '9d925d2dfdb2a0bd89ff081c1693129f3bf85e77':
  Handle ActivityNotFoundException in the WM policy.
2011-01-26 23:58:10 -08:00
Jeff Brown
9d925d2dfd am da910fd5: Merge "Handle ActivityNotFoundException in the WM policy." into honeycomb
* commit 'da910fd5ea024f214f806d880d86d77bf94497b5':
  Handle ActivityNotFoundException in the WM policy.
2011-01-26 23:54:16 -08:00
Jeff Brown
da910fd5ea Merge "Handle ActivityNotFoundException in the WM policy." into honeycomb 2011-01-26 23:52:41 -08:00
Joe Onorato
7201f3d64a am 7c77bd0e: am e193c468: Merge "Fix 3388705: Explicitly check for low battery level" into honeycomb
* commit '7c77bd0e3dda93242e7dbcfb4754817894483653':
  Fix 3388705: Explicitly check for low battery level
2011-01-26 22:26:15 -08:00
Joe Onorato
7c77bd0e3d am e193c468: Merge "Fix 3388705: Explicitly check for low battery level" into honeycomb
* commit 'e193c4688f9062e1d4dba97413788b6ffa122a55':
  Fix 3388705: Explicitly check for low battery level
2011-01-26 22:23:56 -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
166f26e2c2 am f35d43f9: am 2dc9c784: Merge "Fix issue #3382992: IME close animation stutters from URL bar" into honeycomb
* commit 'f35d43f90b9e4553343a59b217430aaba91b0d1f':
  Fix issue #3382992: IME close animation stutters from URL bar
2011-01-26 19:17:46 -08:00
Dianne Hackborn
f35d43f90b am 2dc9c784: Merge "Fix issue #3382992: IME close animation stutters from URL bar" into honeycomb
* commit '2dc9c784b2fab67a8233318f559e65f444bf0c97':
  Fix issue #3382992: IME close animation stutters from URL bar
2011-01-26 19:08:20 -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
b648c60854 am a4a5ec5e: am 1aadb210: Merge changes I48392c75,Id09437a4,I4a0aa878 into honeycomb
* commit 'a4a5ec5e748f99c40301c9c422b3d36cb44c6081':
  Expose the window flags for lights out mode.
  Make TabletStatusBar call into StatusBarManagerService when it goes out of lights out mode on its own.
  Make FLAG_FULLSCREEN not go into lights out mode anymore.
2011-01-26 11:50:38 -08:00
Joe Onorato
a4a5ec5e74 am 1aadb210: Merge changes I48392c75,Id09437a4,I4a0aa878 into honeycomb
* commit '1aadb2108d7614d9d1ff61b41c6c31cb8d211ab9':
  Expose the window flags for lights out mode.
  Make TabletStatusBar call into StatusBarManagerService when it goes out of lights out mode on its own.
  Make FLAG_FULLSCREEN not go into lights out mode anymore.
2011-01-26 11:48:48 -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
fbe446d7f2 am 391ef42c: am 3168a137: Merge "Fix surface frame size reporting." into honeycomb
* commit '391ef42c92ab97e5c22a720973790696d30576ca':
  Fix surface frame size reporting.
2011-01-25 16:18:59 -08:00
Jeff Brown
391ef42c92 am 3168a137: Merge "Fix surface frame size reporting." into honeycomb
* commit '3168a13723ff0f3f87937457fe33c3518caa4bb9':
  Fix surface frame size reporting.
2011-01-25 14:48:14 -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
76a23f8b2e resolved conflicts for merge of eebc944f to master
Change-Id: I969cf69d2bd6901742d2cdf1bd44344ee7ba9fc7
2011-01-24 16:43:28 -08:00
Jeff Brown
eebc944fd1 am aaa55d3f: Merge "New orientation listener." into honeycomb
* commit 'aaa55d3f45744814907d0809befb49281ced462e':
  New orientation listener.
2011-01-24 15:33:46 -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
10f4126a36 resolved conflicts for merge of faf083ef to master
Change-Id: I316a1b4356f6dba6c3880ccb02dbb2fa00d21a85
2011-01-24 13:16:08 -08:00
Joe Onorato
faf083ef0b am 4c541b13: Merge "visibility ("lights out") API." into honeycomb
* commit '4c541b1303b0ee2b9b0d19bee85d3780c5c4c110':
  visibility ("lights out") API.
2011-01-23 23:36: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
02b74a07de am b2d7b02c: am 8ccea78c: Merge "Fix bug 3299208 - Some apps\' dialogs aren\'t show()ing successfully" into honeycomb
* commit 'b2d7b02c4f3e2a43e65985edc70db52e257dd673':
  Fix bug 3299208 - Some apps' dialogs aren't show()ing successfully
2011-01-23 17:00:52 -08:00
Adam Powell
b2d7b02c4f am 8ccea78c: Merge "Fix bug 3299208 - Some apps\' dialogs aren\'t show()ing successfully" into honeycomb
* commit '8ccea78c01a6098e96189799b46b72cbfeba7bae':
  Fix bug 3299208 - Some apps' dialogs aren't show()ing successfully
2011-01-23 16:12:45 -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