471 Commits

Author SHA1 Message Date
Jim Miller
a3a078e343 Merge "Fix 3201849: Use custom Drawable for bg in lockscreen" into honeycomb 2011-01-12 13:14:33 -08:00
Dianne Hackborn
6014527c35 Add "min size" facility to the Window class.
This allows us to have a new dialog theme that behaves like an alert dialog
for both Dialog and Activity versions.  Very useful with so many more things
being displayed as dialogs on our nice large screen.

Note I didn't change the existing dialog themes to have this behavior, since
it will probably break things.  Instead there is a new variation.  And the
DialogWhenLarge variations now use this for their dialog form, to fix many
of the real new dialogs we have that need this behavior.

Removed the public definition of the one alert dialog theme.  None of the
others have ever been public, this one shouldn't be.

Added new .Panel versions of the Holo themes, like we already had for the
original themes.

Changed the alert dialog layout to no longer use WeightedLinearLayout,
since the window now takes care of that.  This allowed for the removal
of the xlarge version of those layouts.

Change-Id: I0c8372bde25eb9af47404a719b3f07230baf73bf
2011-01-12 10:33:13 -08:00
Jim Miller
39d4b067a7 Fix 3201849: Use custom Drawable for bg in lockscreen
This uses a custom drawable to improve the performance of
rendering a transparent background in LockScreen on devices
without hardware acceleration.

Change-Id: I7aae13070d475c3ac19d91ba5c6cb7d2a83a18ce
2011-01-11 20:30:20 -08:00
Joe Onorato
14770e049e Merge "The status bar half of making the status bar resize when hdmi is plugged in." into honeycomb 2011-01-11 17:09:16 -08:00
Joe Onorato
dc10030581 The status bar half of making the status bar resize when hdmi is plugged in.
Change-Id: Ia349413774ba709fb3242780671c7b459850f4a4
2011-01-11 17:07:41 -08:00
Adam Powell
32aa2c90ee Fix bug 3338079 - Dialog styled activity decor
Fixed a bug in FastScroller that could cause a crash on an empty list
in always-show mode.

Fix holo light button text color

Change-Id: I7b50043d715b9b870eb34808017d743ba64d2e08
2011-01-11 15:57:07 -08:00
Adam Powell
f0ad6e6eaf Fix bug 3333015 - Overflow menu item submenus do not open
Submenus of action bar menus will open as new menus.

Change-Id: I924b87bbea91b0df5e3608ec894530302c0e1d8d
2011-01-10 17:14:51 -08:00
Brett Chabot
3b4fcbc9f1 Add ActivityManager#isRunningInTestHarness() public API.
Replaces use of ro.monkey system property. This new API is controlled by
ro.test_harness.

Bug 3329873

Change-Id: Idb5bbbd9ca691976ef842eec681be34c29915976
2011-01-09 16:31:11 -08:00
Jim Miller
b450a65c1c Fix 3330653: Update lockscreen layouts to match latest mocks [DO NOT MERGE]
This change list:

- simplifies the UI design to reduce the number of
on-screen items by combining Alarm status with the date line.

- updates many of the layout files to match closer to the
final design.

- Simplifies the logic for showing Status1 info. It's now
more predictable and robust.

- updates the layout for tablets

- contains a modified alpha to work well with different backgrounds
(Tested: white, gray, and dark backgrounds)

- updates the tablet icons to something closer to the final size.

Manual merge from Change-Id: Ifb349dfa778e9c91b0649c8d95229607be5af8e5

Change-Id: Ia2a9a2d285102d0208b3a7fcead58d6454d116ae
2011-01-09 13:24:00 -08:00
Dianne Hackborn
247fe74c93 Implement issue # 3255887 could CursorLoader offer...
...to throttle contentobserver-based requeries

Why yes, I guess it could.

This also reworks AsyncTaskLoader to not generate multiple
concurrent tasks if it is getting change notifications before
the last background task is complete.

And removes some of the old APIs that had been deprecated but
need to be gone for final release.

And fixes a few little problems with applying the wrong theme
in system code.

Change-Id: Ic7a665b666d0fb9d348e5f23595532191065884f
2011-01-08 18:25:30 -08:00
Adam Powell
0d69fae5e6 Fix bug 3330683 - Do not show the legacy menu panel for HC apps on
xlarge devices.

Change-Id: Ic268684570a429d8da499c142b23bb20b3fe2b82
2011-01-08 15:08:27 -08:00
Adam Powell
5e3f284baa Fix bug 3200615 - "MenuPopupHelper cannot be used without an anchor"
Add protection against views disappearing before previously posted
Runnables attempt to show a menu anchored to them.

Change-Id: Ia2a322e76665e61feb5bdb92377d5066cb6d5b04
2011-01-07 17:22:25 -08:00
Dianne Hackborn
ad7fa7fa77 WM part of #3293405: Screen needs to be redrawn when HDMI is plugged in
Change-Id: If5ceb28073c6abf14165871bd99cb481b31a863b
2011-01-07 14:07:20 -08:00
Jeff Brown
64da12ab1f Add dispatch key shortcut window callback.
Enables Activities and Dialogs to implement key shortcut behavior.
Useful for global key shortcuts that are not bound to the focused
view or to a menu.

Change-Id: If377d20b227ee1c5cac84c47c9630b2d77f67e2c
2011-01-05 14:51:24 -08:00
Jeff Brown
83c09685f2 Add initial support for cursor-based pointing devices.
Some parts stubbed out but you can plug in a mouse and move
a green cursor around to interact with the UI.

Change-Id: I80d597a7f11d3bd92041890f74b3c77326975e6e
2010-12-29 13:19:53 -08:00
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