851 Commits

Author SHA1 Message Date
Dianne Hackborn
81e56d535c Rework how we decide whether to use system or status bar.
The PhoneWindowManager is now responsible for determing this,
since it needs to do this before we can generate the configuration
since we need to take into account the system bar size we will use.

Also the Display should now report the screen height without
including the system bar.

Change-Id: I82dfcc5e327e4d13d82c373c6c870f557a99b757
2011-05-26 10:46:19 -07:00
Daniel Sandler
8c1132e3ce Merge "Framework support for Android Dreams." 2011-05-26 06:01:41 -07:00
Jeff Brown
da97f16c5d am c5c7e047: am d0132e8e: Minor Alt-TAB / Recent Apps Dialog improvements. (DO NOT MERGE)
* commit 'c5c7e047d1a1c56ba55bdfea9391d1907f355dbc':
  Minor Alt-TAB / Recent Apps Dialog improvements. (DO NOT MERGE)
2011-05-25 14:46:25 -07:00
Jeff Brown
b9b9b3e271 am 6f37a7f9: am eea0aa25: Support primitive ALT-TAB style navigation using Recent Apps. (DO NOT MERGE)
* commit '6f37a7f9b6f83fbcc919dc452e72838623e8bb5d':
  Support primitive ALT-TAB style navigation using Recent Apps. (DO NOT MERGE)
2011-05-25 14:46:21 -07:00
Jeff Brown
14c45e2ef9 am 16f1d2ca: am 36001a9f: Merge "Support chorded fallback keys. (DO NOT MERGE)" into honeycomb-mr2
* commit '16f1d2ca00a2c793e510edba5266a6d0998efbfc':
  Support chorded fallback keys. (DO NOT MERGE)
2011-05-25 14:42:30 -07:00
Jeff Brown
d0132e8e18 Minor Alt-TAB / Recent Apps Dialog improvements. (DO NOT MERGE)
Alt-TAB should have different semantics from the APP_SWITCH key
or long-press on HOME.  Accordingly, remove the fallback action
for Alt-TAB and initiate the task switching behavior directly
in the policy.

Modified RecentApplicationsDialog to be more precise about the
initial modifiers that it considers to be holding the dialog.

The dialog is now dismissed by a second press on the APP_SWITCH
key or by a second long press on HOME.

Change-Id: I07e72dc4e1f3cd8edaf357c1d49e79f60d6d1604
2011-05-25 14:37:15 -07:00
Jeff Brown
eea0aa2587 Support primitive ALT-TAB style navigation using Recent Apps. (DO NOT MERGE)
Change-Id: I0296a09519ba9417c208d197ebd996b586ee3daa
2011-05-25 14:37:15 -07:00
Jeff Brown
524ee64b91 Support chorded fallback keys. (DO NOT MERGE)
Also be more careful about canceling fallback keys during focus
transitions, when the application handles the key, or when the
policy decides to do something different.

Fixed a crash due to JNI CallObjectMethod returning an undefined
value (not null) when an exception is thrown.

Fixed a crash due to the policy trying to create a Dialog for
recent apps on the dispatcher thread.  It should happen on the
policy's Looper instead.

Bug: 4187302
Change-Id: I043f82913830f411b3bb4018d6422467b6ca454f
2011-05-24 15:21:46 -07:00
Daniel Sandler
0601eb7953 Framework support for Android Dreams.
A Dream is an activity that is launched by the window
manager after a specified idle time. You might think of this
as a "screen saver", but with the same capacity for
interactivity as any other application.

The window manager maintains a timer (like the screen lock
timer) that is reset on userActivity; the timer is suspended
during wakelocks and when the screen is off.

When the timer elapses, the user's preferred dream module is
launched (by reading Settings.Secure.DREAM_COMPONENT, which
is configured through the Settings app UI).

Like a dock app, the user can install new dreams and a
single application package may contain multiple dream
activities. Unlike the dock mode, however, there is no
"screensaver mode" for the system to manage. This allows us
to offer the user the ability to run a dream at any time, in
addition to making the overall mechanism quite simple.

There is no public API for this facility.

There is, however, a useful/recommended base class for dream
activities in the support library (change I4559a958).

Change-Id: Ied691856f88cfa38a7aca496d015f9a595da72f2
2011-05-24 10:28:52 -04:00
Dianne Hackborn
161e67ff3b resolved conflicts for merge of 06a8ceac to master
Change-Id: Id51574c825affddfac14ad7214c5496d6a3d6e69
2011-05-19 21:44:52 -07:00
Dianne Hackborn
06a8ceacb0 am c851ea56: am 69cb8757: Add new "-swNNNdp" resource qualifier.
* commit 'c851ea5672f6e042c2e89b2a2ce4a2467e1fcd2a':
  Add new "-swNNNdp" resource qualifier.
2011-05-19 19:34:21 -07:00
Dianne Hackborn
69cb87576b Add new "-swNNNdp" resource qualifier.
Change-Id: I0101e88ca9d8d44138bdcaf571f24b0352f4f6ce
2011-05-19 18:23:29 -07:00
Adam Powell
143c529f28 am 21f1d49f: am a7f52d46: Merge "DO NOT MERGE Use action bar overflow menus on large configurations as well as xlarge." into honeycomb-mr2
* commit '21f1d49f0eac47c1ebbabf82f145dc60f988d069':
  DO NOT MERGE Use action bar overflow menus on large configurations as well as xlarge.
2011-05-17 09:55:53 -07:00
Adam Powell
a7f52d4665 Merge "DO NOT MERGE Use action bar overflow menus on large configurations as well as xlarge." into honeycomb-mr2 2011-05-17 09:41:52 -07:00
Adam Powell
b07f943273 DO NOT MERGE Use action bar overflow menus on large configurations as
well as xlarge.

ICS will have a more intelligent way of determining this.

Change-Id: I1ba6460dec09b8259db858c78a9157bb7742c85d
2011-05-16 13:46:38 -07:00
Dianne Hackborn
60e13114eb am 1d340a3c: am 0eac0927: Merge "DO NOT MERGE. From main -- Start work on simulating landscape/portrait when orientation is locked." into honeycomb-mr2
* commit '1d340a3c24913d8750900355cd92ef5742eea11f':
  DO NOT MERGE.  From main -- Start work on simulating landscape/portrait when orientation is locked.
2011-05-16 13:16:45 -07:00
Dianne Hackborn
68066c2f38 DO NOT MERGE. From main -- Start work on simulating landscape/portrait when orientation is locked.
Not yet working, so turned off.

Also fix a bug where the display size configuration became inconsistent
after a configuration change -- we now figure out everything about the
display size when computing a new configuration.

Change-Id: Id155f133c0bf108508a225ef64ed3ca398a90a58
2011-05-16 13:08:07 -07:00
Dianne Hackborn
63446167b9 am fddd927f: am 9d0f2c6d: Merge "DO NOT MERGE: From master -- Fix bug in deciding which rotation to use for an orientation." into honeycomb-mr2
* commit 'fddd927fb78bb206287203f4f447a416b525115a':
  DO NOT MERGE: From master -- Fix bug in deciding which rotation to use for an orientation.
2011-05-16 13:04:49 -07:00
Dianne Hackborn
29735689ce DO NOT MERGE: From master -- Fix bug in deciding which rotation to use for an orientation.
Change-Id: Ie271123271a662f3f753f381ce4c43ad7904dc4a
2011-05-16 12:57:38 -07:00
Daniel Sandler
01defe403f Merge changes I21e9629e,I535ed3ba
* changes:
  Create an XML config flag to turn the navbar off.
  It's lights out for you, navigation bar!
2011-05-11 09:31:08 -07:00
Daniel Sandler
0129b31ff4 Create an XML config flag to turn the navbar off.
This will eventually be replaced by something else, probably
in Configuration, that allows the WM to tell everyone
(including the status bar) whether there exist hardware
home/back/etc. keys.

Change-Id: I21e9629ed43de4a944ad75e5b9d6d4ada8aba23f
2011-05-11 11:54:11 -04:00
Daniel Sandler
1d4d30aebd It's lights out for you, navigation bar!
Views requesting lights out mode will cause the navbar to
disappear (this is useful for viewing videos/photos/etc
using every pixel of the screen).

But there's a catch: any user activity at all will cause the
lights to come back on and the navbar to return.

Change-Id: I535ed3ba9ae7fab3282c402be256add765395b6f
2011-05-11 09:48:52 -04:00
Dianne Hackborn
aa9d84c37e resolved conflicts for merge of 05be6d6f to master
Change-Id: Ic6a6c5bb300f6f1d43f9ed550b284282b4f16212
2011-05-09 19:00:59 -07:00
Dianne Hackborn
05be6d6fe0 am 4907d1d5: am 0c6cbf41: Merge "Better compat mode part one: start scaling windows." into honeycomb-mr2
* commit '4907d1d5e2c7d244b07579b8c52153df69754e85':
  Better compat mode part one: start scaling windows.
2011-05-09 17:10:34 -07:00
Dianne Hackborn
e2515eebf4 Better compat mode part one: start scaling windows.
First step of improving app screen size compatibility mode.  When
running in compat mode, an application's windows are scaled up on
the screen rather than being small with 1:1 pixels.

Currently we scale the application to fill the entire screen, so
don't use an even pixel scaling.  Though this may have some
negative impact on the appearance (it looks okay to me), it has a
big benefit of allowing us to now treat these apps as normal
full-screens apps and do the normal transition animations as you
move in and out and around in them.

This introduces fun stuff in the input system to take care of
modifying pointer coordinates to account for the app window
surface scaling.  The input dispatcher is told about the scale
that is being applied to each window and, when there is one,
adjusts pointer events appropriately as they are being sent
to the transport.

Also modified is CompatibilityInfo, which has been greatly
simplified to not be so insane and incomprehendible.  It is
now simple -- when constructed it determines if the given app
is compatible with the current screen size and density, and
that is that.

There are new APIs on ActivityManagerService to put applications
that we would traditionally consider compatible with larger screens
in compatibility mode.  This is the start of a facility to have
a UI affordance for a user to switch apps in and out of
compatibility.

To test switching of modes, there is a new variation of the "am"
command to do this: am screen-compat [on|off] [package]

This mode switching has the fundamentals of restarting activities
when it is changed, though the state still needs to be persisted
and the overall mode switch cleaned up.

For the few small apps I have tested, things mostly seem to be
working well.  I know of one problem with the text selection
handles being drawn at the wrong position because at some point
the window offset is being scaled incorrectly.  There are
probably other similar issues around the interaction between
two windows because the different window coordinate spaces are
done in a hacky way instead of being formally integrated into
the window manager layout process.

Change-Id: Ie038e3746b448135117bd860859d74e360938557
2011-05-09 17:03:24 -07:00
Joe Onorato
7ba631f8b7 If there is no hdmi available, still record that hdmi is not plugged in.
Bug: 4321927
Change-Id: I583b75477914f6ec0d6cb8c3d6775063202e1dbe
2011-05-04 15:28:00 -07:00
Daniel Sandler
0c19aaaebb Merge "On-screen navigation bar (separate from the status bar)." 2011-05-04 11:26:38 -07:00
Adam Powell
31bb97d240 Fix bug 4361642 - Action menu unresponsive after orientation change
Through invalidating panel menus and action bar initialization it was
possible for instance state restoration to throw out a new menu
already in use. Invalidate the menu if it already exists instead. The
saved instance state will be applied later if a relevant panel menu is
shown.

Change-Id: I6bad7640ecb8d2f5f8ea658e1c68b07d52d108b9
2011-05-03 21:03:24 -07:00
Adam Powell
d1f4207ba5 Fix bug 4355335 - android.app.cts.DialogTest.testContextMenu failing on IRJ28
Change-Id: Icfcd8c2aadd0fb9e49296b8318858317407e1b7f
2011-05-03 17:30:48 -07:00
Adam Powell
0d8ec1d739 Fix bug 4345702 - update action bar tab views when the Tab object is
updated

Also fix a bug with visibility of split action bar views.

Change-Id: Iadd63d5e9b6cb9debab0f7a777e424e4c4807a13
2011-05-03 14:50:08 -07:00
Adam Powell
640a66eac6 Refactoring of action bar internals
Split action bar implementation details. Factor out common components
into AbsActionBar. Layout rules for the lower half of split action
bars.

Change-Id: I6bc39ba6c343055597880a7d4663dd8f30aa4999
2011-05-02 22:12:44 -07:00
Conley Owens
3513e1ca6f am ded7c652: am 893812b2: am e6e3322a: am 8fff7805: Merge "Remove duplicate \'=\' in exception message"
* commit 'ded7c652d754751e6fbde729d66825c69394d1cb':
  Remove duplicate '=' in exception message
2011-04-29 15:11:22 -07:00
Conley Owens
ded7c652d7 am 893812b2: am e6e3322a: am 8fff7805: Merge "Remove duplicate \'=\' in exception message"
* commit '893812b2ee4a640ad398f7f79f90b92d52a5f3b1':
  Remove duplicate '=' in exception message
2011-04-29 14:55:35 -07:00
Adam Powell
9b4bee0f14 Introducing the split action bar.
Apply (or extend) the theme Theme.Holo.SplitActionBarWhenNarrow or
Theme.Holo.Light.SplitActionBarWhenNarrow to enable splitting the
action bar across both the top and bottom of the screen. This places
the action menu along the bottom, leaving more room at the top for
titles, navigation, and custom views and more room at the bottom for
menu items.

TODO: Refine layout of the action menu when placed at the bottom of
the screen. Make action modes split as well.

Change-Id: I92c91f99c533f26aecf6b828ed041386c4f16922
2011-04-28 19:13:25 -07:00
Bernhard Reutner-Fischer
c1a9b03a35 Remove duplicate '=' in exception message
Remove duplicate '=' in IllegalArgumentException of MyAdapter::getItem()

Change-Id: I151a1432a9f54c8d42bae295f3967b0be2223026
2011-04-28 20:06:44 +02:00
Daniel Sandler
8956dbbc5f On-screen navigation bar (separate from the status bar).
In Honeycomb we introduced navigation controls in the status
bar, for xlarge devices without physical buttons. What about
phones? The status bar is pretty cramped already, and
besides, it's at the top of the display most of the time,
not at the bottom where your thumb is likely to be.

Enter the navigation bar. It's a new window type that
appears atop almost everything (including the keyguard); the
window manager subtracts its rectangle from the default
visible rectangle of other windows (including the status bar
and notification shade).

However, it behaves (on phones) like the status bar in that
applications that request fullscreen windows can get access
to those pixels. Well, almost; they need cooperation from
the navigation bar implementation to make the navbar
disappear, just like the status bar.

The current SystemUI implementation of the navigation bar on
phones is still rough, but it has the basics:

 + back, home, and menu keys (NB: we're showing menu all the
   time right now because checking the api level of the
   package owning the top window is currently a poor
   indicator of whether the app requires the menu key)
 + it tries to stick to the same physical end of the device,
   regardless of device orientation (on a phone, this is
   the strip of land closest to the microphone)

Change-Id: Ic613a3351220af0bbfbdef63e1d99cbefd5ed1c2
2011-04-27 15:00:31 -04:00
Adam Powell
526b9313a9 Fix a bug when showing the menu panel with an action bar/menu items
present.

Change-Id: I38cc257661f5a10ccca6ec7625e43e70287129d2
2011-04-22 15:42:05 -07:00
Dianne Hackborn
dacea8ce50 Start work on simulating landscape/portrait when orientation is locked.
Not yet working, so turned off.

Also fix a bug where the display size configuration became inconsistent
after a configuration change -- we now figure out everything about the
display size when computing a new configuration.
2011-04-22 11:23:13 -07:00
Dianne Hackborn
9d13264f6b Fix bug in deciding which rotation to use for an orientation.
Change-Id: Icc928c2188a5865035cafcdab2efd5bae3132b1f
2011-04-21 17:27:42 -07:00
Adam Powell
696cba573e Refactor menu internals.
In the old world, MenuBuilder and MenuItemImpl were responsible for
generating views for any presentation of a menu. MenuBuilder needed to
know any types and resources involved, and the implied caching
semantics did not work well for menus presented within AdapterViews.

In the new world, the MenuPresenter interface takes over the
responsibility of generating views or adapters for menu
items. MenuBuilder/MenuItemImpl still provide extra metadata tracking
used by these presenters. Mutiple presenters may be active for a
single menu at a time. All of this remains internal framework
implementation details.

BaseMenuPresenter provides a simple base for presenters that treats
the host MenuView more like an AdapterView. This allows for less
rebuilding of views when items are added/removed.

Callbacks have been restructured. Calls that relate to the menu itself
are still handled by MenuBuilder.Callback, but calls related to a
specific presentation of a menu are handled by MenuPresenter.Callback
objects attached to a MenuPresenter.

Also add API to programmatically set divider options for LinearLayout
and hidden API so that ActionBarView can have finer-grained control
over divider placement.

Change-Id: I2265b86a084279822908021aec20dfbadc1bb56b
2011-04-19 13:49:39 -07:00
Jim Miller
da3ae8fba8 Use system IME for LockScreen password mode.
Change-Id: I16c4d26fd2aeac2fe1647145b70dfde9d8d26af9
2011-04-14 15:24:40 -07:00
Joe Onorato
43a17654cf Remove the deprecated things from Config.java. These haven't been working since before 1.0.
Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
2011-04-07 19:23:05 -07:00
Jeff Brown
fbfb3dafd9 Merge "Minor Alt-TAB / Recent Apps Dialog improvements." 2011-04-06 15:57:21 -07:00
Jeff Brown
5487500cf3 Minor Alt-TAB / Recent Apps Dialog improvements.
Alt-TAB should have different semantics from the APP_SWITCH key
or long-press on HOME.  Accordingly, remove the fallback action
for Alt-TAB and initiate the task switching behavior directly
in the policy.

Modified RecentApplicationsDialog to be more precise about the
initial modifiers that it considers to be holding the dialog.

The dialog is now dismissed by a second press on the APP_SWITCH
key or by a second long press on HOME.

Change-Id: Idf4d803f51103819057cb655ff3b770b7729e4be
2011-04-06 15:38:05 -07:00
Joe Onorato
ea495d4c1f Move around the HDMI switch detection so we don't try to get the status if we can't listen to it.
Change-Id: I46f4e92923ba010f68109b6d043c817e25dfe650
2011-04-06 11:41:11 -07:00
Jeff Brown
8c769cb9cc Support primitive ALT-TAB style navigation using Recent Apps.
Change-Id: I6dc774326c971826d160c82126fb39acb5b9124b
2011-03-29 17:26:44 -07:00
Jeff Brown
da3d5a91b6 Support chorded fallback keys.
Also be more careful about canceling fallback keys during focus
transitions, when the application handles the key, or when the
policy decides to do something different.

Fixed a crash due to JNI CallObjectMethod returning an undefined
value (not null) when an exception is thrown.

Fixed a crash due to the policy trying to create a Dialog for
recent apps on the dispatcher thread.  It should happen on the
policy's Looper instead.

Bug: 4187302
Change-Id: I659a3fd1bd2325ed36d965f9beb75dacb89790c9
2011-03-29 16:16:55 -07:00
Adam Powell
25ef3030a7 Fix bug 4136005 - Extended menus do not work
Fix for extended panel menus on small-screen devices.

Change-Id: I7788563019648867872d88ac974bfacdce8af385
2011-03-18 16:14:33 -07:00
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
Jim Miller
3fa8a454f6 Fix 3201849: Enable hardware acceleration in LockScreen WaveView
Change-Id: Id64e82fe2e09ac231736d7867cd47b504d79b81b
2011-03-09 19:47:56 -08:00