602 Commits

Author SHA1 Message Date
Jim Miller
1b365921e8 Fix 3201849: Enable hardware acceleration in LockScreen WaveView [DO NOT MERGE]
Change-Id: I07bbed7843857158cd2c1ffd9b184bde7fd5860d
2011-03-10 17:20:21 -08:00
Patrick Dubroy
8620d9533a Remove guard preventing onDetachedFromWindow() from being called
This was the cause of 3510699: Launcher has leaked IntentReceiver.

Change-Id: I7d0e4662314d657f6ac06a9a9d37861f8d8ee975
2011-03-07 11:07:26 -08:00
Jeff Brown
56194ebec6 Wake screen from external HID peripherals.
Added some plumbing to enable the policy to intercept motion
events when the screen is off to handle wakeup if needed.

Added a basic concept of an external device to limit the scope
of the wakeup policy to external devices only.  The wakeup policy
for internal devices should be based on explicit rules such as
policy flags in key layout files.

Moved isTouchEvent to native.

Ensure the dispatcher sends the right event type to userActivity
for non-touch pointer events like HOVER_MOVE and SCROLL.

Bug: 3193114
Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86
2011-03-02 19:57:07 -08:00
Dianne Hackborn
039e634f61 am 4b8c9b74: am 7fff2d19: am 1de4a2ca: am 62619392: Merge "Fix leak when keylock is recreated."
* commit '4b8c9b740528301d3ca60fe3b4b861fcd85ceb0a':
  Fix leak when keylock is recreated.
2011-03-02 12:52:56 -08:00
Dianne Hackborn
d20d5523c7 Merge "Fix issue #3387676 com.android.browser: java.lang.NullPointerException..." 2011-03-01 18:34:01 -08:00
Jim Miller
c13c8d82ae Merge "Fix 3463772: Bring back alarm icon on LockScreen" 2011-03-01 18:17:06 -08:00
Jim Miller
599351e93d Fix 3463772: Bring back alarm icon on LockScreen
Change-Id: Icdf948c774d280e22da84e9241b345244a56befd
2011-03-01 18:14:48 -08:00
Dianne Hackborn
b66ad57ca0 Fix issue #3387676 com.android.browser: java.lang.NullPointerException...
Unable to destroy activity {com.android.browser/com.android.browser.BrowserActivity}:
java.lang.NullPointerException at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:2809)

Add a bunch of guards to not call on to the window callback after the
window is destroyed.

Change-Id: I66ca0705f421bafdfe953d03654c8f78d9e68249
2011-03-01 17:11:08 -08:00
Dianne Hackborn
4b8c9b7405 am 7fff2d19: am 1de4a2ca: am 62619392: Merge "Fix leak when keylock is recreated."
* commit '7fff2d19a24f9f9b669676864dc5652ab179d2fc':
  Fix leak when keylock is recreated.
2011-03-01 11:13:14 -08:00
Adam Powell
d3c9704d3e Fix bug 3497307 - Fix issues with FEATURE_ACTION_MODE_OVERLAY
Properly close down overlay windows when decor is detached. Delay
opening popup overlays to prevent issues when restoring instance
state.

Change-Id: I7ff44ce65e78c0172a12a9ddfe11460c885593ca
2011-02-28 21:40:26 -08:00
Dianne Hackborn
1de4a2ca58 am 62619392: Merge "Fix leak when keylock is recreated."
* commit '626193926df0b3c7236e5c244f30d797d9192e0d':
  Fix leak when keylock is recreated.
2011-02-28 18:03:12 -08:00
Kenneth Andersson
1e0c7ae184 Fix leak when keylock is recreated.
DigitalClock could sometimes leak when the keylock was recreated.
This happened because onDetachedFromWindow() was called BEFORE
onAttachedFromWindow().
This is the flow that causes the memory leak:
1) The LockPatternKeyGuardView is created and added. This will start
a loop dispatching onAttachedToWindow() to all views involved.
2) PatternUnlockScreen.onAttachedToWindow() is called
3) If the configuration has changed since creation, recreateMe() in
LockPatternKeyguardView.java is called.
4) recreateScreens() is called
5) PatternUnlockScreen is removed (to be re-added later) in
LockPatternKeyguardView.recreateUnlockScreen()
6) Since DigitalClock is a part of PatternUnlockScreen, its
onDetachedFromWindow() will be called.
7) The loop started in 1) will continue to dispatch
onAttachedToWindow() - and will eventually call
DigitalClock.onAttachedToWindow()
8) DigitalClock.onAttachedToWindow() registers a receiver that is
normally unregistered in onDetachedFromWindow(). But since
onDetachedFromWindow was already called in 6), it will not be called
again.
9) The receiver has leaked, and it has a reference to DigitalClock,
so that will leak as well, together with its parents e.g.
PatternUnlockScreen and LockPatternKeyguardView

The fix is to wait with the recreation of the screens (in 4) until
the loop (in 1) is finished. This is done by posting this as an event
instead of calling recreateScreens() immediately.

It is possible that this a fix for the root cause mentioned in
"Fix 3106227: use WeakReferences for receivers in DigitalClock class"
8b886fab5496b0b1f5193f21855220176deddc37 by Jim Miller
<jaggies@google.com>.

Change-Id: I6a5f6f49a565d459bf4e285f34f053cc1022286f
2011-02-28 14:09:08 +01:00
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
Jeff Brown
33bbfd2232 Add support for mouse hover and scroll wheel.
Dispatch ACTION_HOVER_MOVE and ACTION_SCROLL through the View
hierarchy as onGenericTouchEvent.  Pointer events dispatched
this way are delivered to the view under the pointer.  Non-pointer
events continue to be delivered to the focused view.

Added scroll wheel support to AbsListView, ScrollView,
HorizontalScrollView and WebView.  Shift+VSCROLL is translated
to HSCROLL as appropriate.

Added logging of new pointer events in PointerLocationView.

Fixed a problem in EventHub when a USB device is removed that
resulted in a long stream of ENODEV errors being logged until INotify
noticed the device was gone.

Note that the new events are not supported by wallpapers at this time
because the wallpaper engine only delivers touch events.

Make all mouse buttons behave identically.  (Effectively we only
support one button.)

Change-Id: I9ab445ffb63c813fcb07db6693987b02475f3756
2011-02-25 17:06:07 -08:00
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
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
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
Jim Miller
226e57563c Merge "Fix 3391330: Use BATTERY_STATUS_FULL as "Charged" state [DO NOT MERGE]" into gingerbread 2011-01-27 18:22:14 -08:00
Jim Miller
c0a1387f0f Fix 3391330: Use BATTERY_STATUS_FULL as "Charged" state [DO NOT MERGE]
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.

Change-Id: Iac6cb78e24f9a696017459cc773c38ef7fe7779f
2011-01-27 18:07:44 -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
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