456 Commits

Author SHA1 Message Date
Dianne Hackborn
07f3d66497 Fix issue #3194697: default orientation for portrait-mode apps on stingray is backward?
Change-Id: Ia01963d1dcdda12ef1b4c56af2bd389e5dadbce1
2010-12-22 12:31:31 -08:00
Jeff Brown
caab4d0a50 Update shortcuts.
Also modified the shortcut key handling so that it drops chorded
Search+X keys when even if no shortcut was found.  Without this
change, pressing an unhandled shortcut causes the Search widget to
pop up and the character to be typed.

Bug: 3022227
Change-Id: Ic0921428bd1270604ca28caf1f8493727127f4ed
2010-12-13 23:27:17 -08:00
Dianne Hackborn
ccc7141313 resolved conflicts for merge of 78e9f4cb to master
Change-Id: I1135361e6d66f524c3f349e2bf1f31bd4191c634
2010-12-13 14:55:25 -08:00
Dianne Hackborn
e4a5951925 Fix issue #3154576: battery stats checkin should include UID -> packages+ map
Includes some other small fixes to battery collection and a few
other things.

Output of package info looks like this:

5,0,i,uid,1000,com.android.settings
5,0,i,uid,1000,com.android.providers.subscribedfeeds
5,0,i,uid,1000,com.android.providers.settings
5,0,i,uid,1000,com.android.server.vpn
5,0,i,uid,1000,android
5,0,i,uid,1000,com.android.systemui
5,0,i,uid,1000,com.google.android.backup
5,0,i,uid,1001,com.android.phone
5,0,i,uid,1001,com.android.providers.telephony
5,0,i,uid,1022,com.android.nfc
5,0,i,uid,10021,com.google.android.location
5,0,i,uid,10021,com.google.android.syncadapters.calendar
5,0,i,uid,10021,com.google.android.gsf
5,0,i,uid,10021,com.google.android.syncadapters.contacts
5,0,i,uid,10026,com.android.providers.downloads.ui
5,0,i,uid,10026,com.android.providers.media
5,0,i,uid,10026,com.android.providers.drm
5,0,i,uid,10026,com.android.providers.downloads
5,0,i,uid,10032,com.android.launcher
5,0,i,uid,10039,com.google.android.gm
5,0,i,uid,10041,com.google.android.gallery3d
5,0,i,uid,10049,com.android.providers.calendar

Change-Id: I9e38f254eef146339113ad270f5c6e8b60fb7a1d
2010-12-13 14:31:40 -08:00
Jeff Brown
c1fb48d77c Improve shortcut handling.
Shortcut keys invoked using Meta are handled as fallback actions instead
so applications can handle Meta however they like.

Change-Id: I28955bac5bba9a399eed2fc6c9b73bba3f4bf383
2010-12-08 17:10:48 -08:00
Jeff Brown
49ed71db42 Add support for fallback keycodes.
This change enables the framework to synthesize key events to implement
default behavior when an application does not handle a key.
For example, this change enables numeric keypad keys to perform
their associated special function when numlock is off.

The application is informed that it is processing a fallback keypress
so it can choose to ignore it.

Added a new keycode for switching applications.

Added ALT key deadkeys.

New default key mappings:
- ESC -> BACK
- Meta+ESC -> HOME
- Alt+ESC -> MENU
- Meta+Space -> SEARCH
- Meta+Tab -> APP_SWITCH

Fixed some comments.
Fixed some tests.

Change-Id: Id7f3b6645f3a350275e624547822f72652f3defe
2010-12-07 17:35:26 -08:00
Daniel Sandler
2ee1856f81 Merge "Hide navigation buttons and clock on lockscreen." 2010-12-06 11:15:45 -08:00
Adam Powell
7e06ea80f7 Fix bug 3245210 - Bad window style for action modes for light holo dialog theme
Also fixed some issues with the overlay action mode window styles.

Change-Id: Ie4cf43f6ccf720ef0090ca8bd667fb6d78152f93
2010-12-05 18:29:10 -08:00
Daniel Sandler
3e8f5a2c1b Hide navigation buttons and clock on lockscreen.
(This introduces a StatusBarManager disable flag to ask the
status bar to hide just the clock, which might be useful in
other situations, such as clock/dock apps.)

Bug: 3130393
Change-Id: Ia08627508518e2ed3713ffbf856e4ec42952b3a8
2010-12-03 15:55:04 -05:00
Adam Powell
049dd3d4a4 Fix bug 3248786 - silly monkeys.
Change-Id: I41306cae06a7b4fd3852e0760ae668c8d6eacc5d
2010-12-02 13:45:30 -08:00
Daniel Sandler
59485d7442 Do not allow lights out mode for old apps.
Legacy applications using FLAG_FULLSCREEN do so principally
to get as much screen real estate as possible; reducing
clutter is usually a secondary concern. The new UI style
takes care of the latter for the most part, and the former
is irrelevant because the xlarge system bar never goes away.

Lights out---and with it the disappearance of important
systemwide navigation controls---is probably *not* something
these apps are expecting!  Consider a game: it might want
FLAG_FULLSCREEN on phone to take over your entire display,
but might also rely on menu (to pause the game or bring up
options) and home (to allow you to exit). Lights out makes
these tasks much harder on the user because those buttons
aren't visible anymore.

So, to mitigate this potentially confusing situation, we now
disable lights out for fullscreen legacy apps.

[Hack, er, cleverness alert: We use NEEDS_MENU_KEY as a
shorthand for "legacy app." This flag is set by
pre-Honeycomb apps by default, but even an app built against
the current API can request this flag; be forewarned that if
you do, you won't get lights out mode in this particular
system bar implementation when you use FLAG_FULLSCREEN.]

Change-Id: If90d8354114ba45f9485b935b87ee575a30b9f87
2010-12-02 01:27:23 -05:00
Adam Powell
8515ee846b Fix bug 3240444 - add OnMenuVisibilityListener for action bar.
Fix bug 3180015 - leaking window handles on configuration change for
action bar dropdown menus

Rename ActionBar.NavigationCallback to something more consistent with
the rest of the API.

Change-Id: Ic1fb4c07484c57a72649b30e27d220b18cda6cdf
2010-12-01 13:03:44 -08:00
Jeff Brown
1f2451007c Ensure the ShortcutManager uses the correct key character map.
The ShortcutManager used to only receive the key code of the key event
that triggered the shortcut.  This change now provides the shortcut
manager with the whole key event so it can look up the associated
character using the correct key character map.

To make this more efficient, added a mechanism for recycling
key events.  At the moment it is only used by key events owned by the
system process, since clients of the existing API (such as Views)
might continue to hold on to key events after dispatch has finished so
they would break if the key event were recycled by the framework.

Deprecated KeyCharacterMap.BUILT_IN_KEYBOARD.

Change-Id: I4313725dd63f2be01c350c005a41c7fde9bc67e8
2010-11-30 18:50:17 -08:00
Jeff Brown
47e6b1b5ee Support non-orientation aware keyboards and other devices.
Fixed a bug with dpad keys on external keyboards being rotated
according to the display orientation by adding a new input device
configuration property called "keyboard.orientationAware".

Added a mechanism for overriding the key layout and key character
map in the input device configuration file using the new
"keyboard.layout" and "keyboard.characterMap" properties.

Also added "trackball.orientationAware", "touch.orientationAware" and
"touch.deviceType" configuration properties.

Rewrote the configuration property reading code in native code
so that it can be used by EventHub and other components.

Added basic support for installable idc, kl, and kcm files
in /data/system/devices.  However, there is no provision for
copying files there yet.

Disabled long-press character pickers on full keyboards so that
key repeating works as expected.

Change-Id: I1bd9f0c3d344421db444e7d271eb09bc8bab4791
2010-11-30 17:15:49 -08:00
Jim Miller
2a98a4cbaa Fix 3024522: Add "no lock screen" support to the framework.
This adds a new feature where LockScreen can be disabled to
allow the device to go straight to the home screen when
powered on.

Change-Id: I288e8d5359442c042ae7911340885877a864faff
2010-11-29 15:39:08 -08:00
Joe Onorato
50262e587c Long press on home shouldn't open recents
Change-Id: Iafb8205878768b74a833528532ab399d44b04263
2010-11-26 14:04:54 -08:00
Dianne Hackborn
a111187a5b Change rotation freeze to all be implemented in window manager.
Lots of work for no visible change in behavior, but now we can
do some fancier stuff...

Also allow rotation in all 4 directions.

Change-Id: I7e5e9537c5e359f69b83c10f65cc1ce95f371461
2010-11-24 10:41:07 -08:00
Joe Onorato
29fc2c9705 Allow status bar panels to be on top of the status bar.
Change-Id: I3c74ece5f7042e6302717f4263746d59d5447ec9
2010-11-24 10:26:50 -08:00
Joe Onorato
46b0d6861c Turn off the long press on home action
Change-Id: I8b083e9e9b8bde4751264de18e5400434b315848
2010-11-23 15:54:43 -08:00
Dianne Hackborn
621e17de87 Implement issue #3221502: New APIs to support new back stack / task navigation
What this adds:

- A new Intent activity flag to completely replace an existing task.
- A new Intent activity flag to bring the current home task up behind
  a new task being started/brought to the foreground.
- New versions of startActivity() that take an array of Intents to be
  started, allowing applications to start a task in a specific state.
- A public moveTaskToFront() method on ActivityManager, with a new flag
  that allows the caller to have the task moved to the front with the
  current home task immediately behind it.

Change-Id: Ie8028d09acffb5349d98043c67676daba09f75c8
2010-11-22 18:35:55 -08:00
Dianne Hackborn
0a3ab5d632 Goodbye title_bar_shadow.
May you rest in HELL.

Change-Id: I1e9e5f509a7860e4aeb4f6598b8c6551a59a8714
2010-11-19 15:59:21 -08:00
Dianne Hackborn
8e11ef0d94 Some work on issue #3201795: Improve transition when keyboard comes up
Now try to slide dialogs if they end up moving due to the IME (or
other system things) showing/hiding.  Pretty hackish, but seems to
work.

Change-Id: Icd297e941cf847fa920c9605145c46be63043d52
2010-11-18 19:57:49 -08:00
Jeff Brown
6b53e8daa6 Added support for full PC-style keyboards.
BREAKING CHANGE: Redesigned the key character map format to
accomodate full keyboards with more comprehensive suite of modifiers.
Old key character maps will not work anymore and must be updated.
The new format is plain text only and it not compiled to a binary
file (so the "kcm" tool will be removed in a subsequent check-in).

Added FULL keyboard type to support full PC-style keyboards.

Added SPECIAL_FUNCTION keyboard type to support special function
keypads that do not have any printable keys suitable for typing
and only have keys like HOME and POWER

Added a special VIRTUAL_KEYBOARD device id convention that maps
to a virtual keyboard with a fixed known layout.  This is designed
to work around issues injecting input events on devices whose
built-in keyboard does not have a useful key character map (ie.
when the built-in keyboard is a special function keyboard only.)

Modified several places where events were being synthesized
to use the virtual keyboard.

Removed support for the "qwerty" default layout.
The new default layout is "Generic".  For the most part "qwerty"
was being used as a backstop in case the built-in keyboard did
not have a key character map (probably because it was a special
function keypad) and the framework needed to be able to inject
key events anyways.  The latter issue is resolved by using the
special VIRTUAL_KEYBOARD device instead of BUILT_IN_KEYBOARD.

Added the concept of a key modifier behavior so that
MetaKeyKeyListener can distinguish between keyboards that use
chorded vs. toggled modifiers.

Wrote more robust key layout and key character map parsers
to enable support for new keyboard features and user installable
key maps.

Fixed a bug in InputReader generating key ups when keys
are released out of sequence.

Updated tons of documentation.

Currently QwertyKeyListener is being used for full keyboards
with autotext and capitalization disabled.  This mostly works
but causes some problems with character pickers, etc.
These issues will be resolved in subsequent changes.

Change-Id: Ica48f6097a551141c215bc0d2c6f7b3fb634d354
2010-11-18 09:49:03 -08:00
Yuling Liu
7dda196e34 Change hide() to dismiss() to avoid memory leak.
Change-Id: I4a5acb123c673c75a48c3e77566cdca4760d8576
2010-11-17 18:05:26 -08:00
Adam Powell
bf85f43e48 Add protection for ActionMode-related window callbacks that may not
implement new methods.

Change-Id: Id4463ee97366187ba43b0966f79aa8bd34f7fa1d
2010-11-15 22:16:50 -08:00
Adam Powell
debf3bed9e Fix bug 2948913 - provide lifecycle notifications for action modes
Change-Id: I432e29a7bddb18bc32dfbe21a8ecd7d83158e3a0
2010-11-15 20:59:29 -08:00
Adam Powell
c028a5ee7e Merge "Fix a couple interactions between action bar and options menus" 2010-11-15 16:49:35 -08:00
Adam Powell
8d12e20162 Fix a couple interactions between action bar and options menus
Fix bug 3129937 - Activity.openOptionsMenu not calling onPrepareOptionsMenu

Fix bug 3070720 - actionbar android.R.id.home isn't dispatched to fragments

Change-Id: I4a154941595583cdec7d1dffbeac9c8340781fa0
2010-11-15 16:44:17 -08:00
Mathias Agopian
dab0014acc am 99866c11: am 9e291a4b: Merge "Revert "allow all 4 orientations"" into gingerbread
* commit '99866c111bd72a6cc9be17b127cd40ec9396ca7d':
  Revert "allow all 4 orientations"
2010-11-15 13:22:13 -08:00
Dianne Hackborn
7eec10e6c9 Get rid of the extended themes.
We now decide whether to use a bitmap background based on whether the
window's drawing is hardware accelerated.  To do this, there is a new
"state_accelerated" that state list drawables can be parameterized on,
and the standard window background uses this to select a solid color
or bitmap drawable as appropriate.

Introduces a little hackery to have wm preview windows pretend like
they are hardware accelerated even if they aren't, so the preview looks
closer to the actual app.

Also Add a DialogWhenLarge variation for the light theme.

Change-Id: I215a79d5df65ba3eed52ab363cade9d8218a6588
2010-11-14 14:23:42 -08:00
Mathias Agopian
f9ce879e5c Revert "allow all 4 orientations"
This reverts commit 1d8d0159e72556ea20aba325fb27d8470282e1ba.

Change-Id: Iffd8cbad98ff7e498032df1d226f4fbc7cde95b1
2010-11-13 22:02:13 -08:00
Adam Powell
6af97e1c20 Revised assets for progress bars and indeterminate progress spinners.
Add support in ActionBar for activity-wide progress APIs.

Add ability for progress bars to set a target framerate rather than
the 5fps previously used.

Clean up some more dialog layouts using hardcoded styles rather than
theme attributes.

Change-Id: I8e88c7595e27c0b6f7829b598f2b084ac8501ae3
2010-11-12 19:06:40 -08:00
Dianne Hackborn
55d3bae235 Merge "Change recents UIs to do task switches." 2010-11-12 18:18:15 -08:00
Jeff Brown
46e75294d5 Enable touch splitting for all windows by default.
New default only applies to applications with targetSdkVersion >=
HONEYCOMB.  Old applications default to no touch splitting for
their windows.

In addition, enabled split touch for various system windows.

Bug: 3049580
Change-Id: Idc8da9baa2cd8e1e4e76af8967d7b6a5ccb94427
2010-11-12 14:53:43 -08:00
Dianne Hackborn
b677746bd8 Change recents UIs to do task switches.
When switching to a recent task that is currently active, do a
task switch instead of a start activity, so the activity is brought
back in its exact same state.

Also fix problem in phone recents where the icon would disappear
after you touch it.

Change-Id: Id5c8478f8c33c90f52fbb4d969037d2bf5af9fff
2010-11-12 12:44:19 -08:00
Jeff Brown
3915bb845b Tell system server whether the app handled input events.
Refactored ViewRoot, NativeActivity and related classes to tell the
dispatcher whether an input event was actually handled by the application.

This will be used to move more of the global default key processing
into the system server instead of the application.

Change-Id: If06b98b6f45c543e5ac5b1eae2b3baf9371fba28
2010-11-08 12:49:43 -08:00
Joe Onorato
51387974f0 Merge "Move the volume, media, call, camera and search key handling from PhoneWindow to a new PhoneFallbackEventHandler class that is used for all windows, not just ones with decors." 2010-11-08 10:59:27 -08:00
Hiroshi Lockheimer
d44266cec3 am 01128df3: am ce22d608: Merge "allow all 4 orientations" into gingerbread
* commit '01128df3c442b87f601d9c13ff2ebd54b015925d':
  allow all 4 orientations
2010-11-06 16:24:45 -07:00
Joe Onorato
86f6786032 Move the volume, media, call, camera and search key handling from
PhoneWindow to a new PhoneFallbackEventHandler class that is used
for all windows, not just ones with decors.

Bug: 3155146
Change-Id: Ib070fa3e523e3564b225bca576c08012fef4f416
2010-11-05 18:58:29 -07:00
Daniel Sandler
1b815d6805 Rotation lock bugfix.
We were using a stale version of the accelerometer rotation
setting when figuring out what the current rotation lock
state is.

Change-Id: I7780617c875a8f6c9697e829642f86f9f664df89
2010-11-05 10:24:27 -04:00
Mathias Agopian
1d8d0159e7 allow all 4 orientations
Change-Id: Ia01b234d7d4e55cd4d8776e2a003ecf0cbd7d06f
2010-11-04 19:45:16 -07:00
Dianne Hackborn
e213677037 Push the jumpDrawablesToCurrentState() thing off everywhere it should be.
Also add a new interface that items in AbsListView can implement to
adjust the bounds of the selection shown for them.  This will allow
contacts to use list view's regular selection facility rather than
implementing something special in their item views.

Change-Id: I29cbdbc7122111ee97e47fe7d6ec55ff07be79cc
2010-11-04 15:34:41 -07:00
Daniel Sandler
b73617de46 Rotation lock.
IWindowManager now supports two new methods,
freezeRotation() and thawRotation(), that allow a caller to
temporarily stash the device's current rotation as the
default rotation (when no other constraints are present).

The system bar uses this to implement a user-accessible
rotation lock by calling freezeRotation() and then turning
off accelerometer-based display rotation; unless overridden
by an app, the display will continue to appear in the frozen
rotation until the rotation is unlocked by the user (either
via the rotation lock icon in the system bar or by checking
"rotate screen automatically" in Settings).

Bug: 2949639
Change-Id: Icd21c169d1053719590e72401f229424b254622f
2010-11-04 16:55:29 -04:00
Jim Miller
0c91a8ee93 Minor tweaks to lockscreen animation:
Remove transition delay to show home.
Add new constants to allow finer tuning of "success" animation.
Transition all items to transparent on successful unlock.

Change-Id: Id9f57b9bfc08be840d9282f987925617d2b42ea1
2010-11-03 21:55:18 -07:00
Jeff Brown
b0418da0e7 Add plumbing for volume mute key.
Full support for the volume mute key will be implemented in a
later change.

Bug: 2912307
Change-Id: I98c27d6360f159c8b7447e04b45f442eff87b38a
2010-11-02 17:31:39 -07:00
Jeff Brown
4d396052de Fix policy issues when screen is off.
Rewrote interceptKeyBeforeQueueing to make the handling more systematic.
Behavior should be identical except:
- We never pass keys to applications when the screen is off and the keyguard
  is not showing (the proximity sensor turned off the screen).
  Previously we passed all non-wake keys through in this case which
  caused a bug on Crespo where the screen would come back on if a soft key
  was held at the time of power off because the resulting key up event
  would sneak in just before the keyguard was shown.  It would then be
  passed through to the dispatcher which would poke user activity and
  wake up the screen.
- We propagate the key flags when broadcasting media keys which
  ensures that recipients can tell when the key is canceled.
- We ignore endcall or power if canceled (shouldn't happen anyways).

Changed the input dispatcher to not poke user activity for canceled
events since they are synthetic and should not wake the device.

Changed the lock screen so that it does not poke the wake lock when the
grab handle is released.  This fixes a bug where the screen would come
back on immediately if the power went off while the user was holding
one of the grab handles because the sliding tab would receive an up
event after screen turned off and release the grab handles.

Fixed a couple of issues where media keys were being handled inconsistently
or not at all, particularly in the case of the new PAUSE, PLAY
and RECORD keys.

Bug: 3144874
Change-Id: Ie630f5fb6f128cfdf94845f9428067045f42892c
2010-11-01 15:00:25 -07:00
Joe Onorato
6c586dbb97 Long press on menu no longer opens the IME.
Bug: 3063616
Change-Id: I6f13300d2dc2f7fa549c7329e9b5509b6d4ffd5d
2010-11-01 12:25:08 -07:00
Dianne Hackborn
dea3ef7967 Add new resize mode to not resize, new web input types.
Change-Id: Ib098c03793d08532c3c099b59d0cc6b567e54900
2010-10-29 16:59:15 -07:00
Dianne Hackborn
82de1aecd1 Fix issue #3083761: windowSoftInputMode="adjustPan" ignored on stingray
The code for the new always-there status bar was a bit too brute-force,
and also impacting things like the IME.  We now implement this by
actually having an explicit concept of "display size" that the status bar
can carve out from everyone else.

Change-Id: I1963d0b07f52e8d8dc3c836227da9bf5d3f2e8b9
2010-10-28 11:28:39 -07:00
Marco Nelissen
a6face4d40 Plumb KEYCODE_MEDIA_PAUSE and KEYCODE_MEDIA_PLAY up through the framework.
b/2764237

Change-Id: I9a20974fa0b7527230258f7d0bf829a031673a9d
2010-10-25 12:07:07 -07:00