380 Commits

Author SHA1 Message Date
Jeff Brown
8d20f6b8cb am 40e3af61: am 8abc9e9b: Merge "Don\'t play a sound if a volume key press is canceled." into gingerbread
Merge commit '40e3af61dcbf7e49979a67410f37c4b4523a0bd6'

* commit '40e3af61dcbf7e49979a67410f37c4b4523a0bd6':
  Don't play a sound if a volume key press is canceled.
2010-09-12 18:16:32 -07:00
Jeff Brown
8b7a982d29 Don't play a sound if a volume key press is canceled.
Change-Id: I8e45af20ec83a81565e10be3648b95686fa897af
2010-09-12 18:09:11 -07:00
Joe Onorato
9305647eb6 Plumb lights out mode through from the window manager to the status bar running in the system ui process.
Lights out mode itself isn't implemented.

Change-Id: Ieeef0eb9ae5be23000f770e74e8ee66472f4c673
2010-09-12 13:25:06 -04:00
Jim Miller
bc4603b0b1 Fix 2579224: Add a separate timeout for lockscreen vs display
This change adds a second timeout to the SecuritySettings page
separate from the standard display timeout.

Change-Id: I41fe10e31688308f52695ad3ee30a4b0507112bd
2010-09-01 21:00:30 -07:00
Jim Miller
ee969aa850 Fix 2797185: Show 3D Recents on xlarge device
This fixes a bug where some xlarge devices weren't showing 3D recent apps.
The cause was that the config wasn't guaranteed to be loaded by
the time we reach init() in PhoneWindowManager.

The fix looks at the property on-demand, which can't happen
until after the user sees the home screen, which guarantees the
configuration is loaded.

Change-Id: Ic41196f7a15218033b831e6e9cf9d536e0712844
2010-08-26 20:17:43 -07:00
Jim Miller
e6ad1a8ba2 Fix 2797185: Integrate 3D RecentApps View into system.
This adds 3D recents to the platform.  Enabling it is a
matter of setting 'config_enableRecentApps3D' on devices
capable of supporting it (those with OGLES2.0 at the moment).

Change-Id: Ife7bfe8ca02e7657821b68f915e31b0dab50cd2c
2010-08-25 20:43:00 -07:00
Adam Powell
f4a6ec4e93 Disable FEATURE_ACTION_BAR on windows with incompatible feature sets.
Change-Id: I70c860c72eb9e1f1f123764202334ab714f4f830
2010-08-24 14:18:10 -07:00
Adam Powell
6c6f575423 More ActionBar/config change tweaks. Preserve open overflow menus
Change-Id: Ic8ad2b1e3909fbf84ff4d852ae046a9f9508477c
2010-08-23 10:24:49 -07:00
Steve Howard
dfc8cde5c8 am 1f442104: am e0c8582e: Merge "Improve orientation sensing when waking up while flat." into gingerbread
Merge commit '1f4421048206ca1745ddd6366588759c9c5c38f9'

* commit '1f4421048206ca1745ddd6366588759c9c5c38f9':
  Improve orientation sensing when waking up while flat.
2010-08-21 09:40:22 -07:00
Steve Howard
5eb49583e2 Improve orientation sensing when waking up while flat.
This change makes the window manager pass the currently displayed
orientation to the WindowOrientationListener each time to calls to get
the currently sensed orientation.  Now, when the
WindowOrientationListener doesn't know for sure what the orientation
of the device should be (for example, if the sensed orientation is
flat on a table), then it trusts the already-displayed orientation,
rather than trusting whatever sensors reading it most recently
received.

The main use case this addresses is:
* user uses device in portrait
* user turns off device, puts it in pocket
* while in pocket, screen gets turned on, activating orientaiton
  sensor, which senses landscape orientation
* screen timed out
* user takes device out, places it on a table (or looks down at it,
  holding it flat), and unlocks it

Previously, when the device was unlocked, the
WindowOrientationListener would return landscape orientation based on
its previous sensor readings.  Now, it will override those previous
readings because it knows they never actually took effect and the
device is presently flat.

This change also slightly modifies the way we handle flat orientation,
now completely ignoring data when the tilt distrust is nonzero (even
if the current sensor reading shows non-tilted).

Change-Id: Ia4950a41827f8c53a80487d0c2e83b556df781b9
2010-08-18 14:22:19 -07:00
Adam Powell
04253aa134 Back button closes ActionModes
Change-Id: I763782706ce7aa65a5a11129450d97a2bcb3a625
2010-08-18 11:59:16 -07:00
Dianne Hackborn
291905e34a Maybe fix #2925641: calling onCreateOptionsMenu before attached activity
Also add some APIs to PreferenceActivity.

Change-Id: I85894a3eb9cd3e5adb78b82e85454c0d74773178
2010-08-17 18:53:19 -07:00
Adam Powell
266b1008cf Fix some ActionBar bugs.
* Fix a bug where the options panel would not open on non-xlarge
  screens to show overflow menu items.

* Fix a bug where ActionBarView would try to add a custom nav view
  twice.

* Fix a bug where ActionBarView would expand too far in wrap_content mode

Change-Id: I433ea56524aad885d813ae8743fe2fcefa9649fa
2010-08-16 17:26:11 -07:00
Jae Yong Sung
8171b5182f lock screen for xlarge
Change-Id: Iab9f53609bf24be774752a9960aaaa654d7a614f
2010-08-13 15:08:05 -07:00
Adam Powell
b047208b3b Cleanup on CL 61012
Change-Id: I394909c65a4978be26db063c9f69f1098ab028b3
2010-08-12 10:44:33 -07:00
Adam Powell
f6148c53f9 Fix bug 2911311 and bug 2911700
Integrate the action bar overflow menu better with the options menu lifecycle.

Change-Id: I1e3fdba04b01718c3ee3367f92e5dabe7bc84b5c
2010-08-11 21:56:27 -07:00
Adam Powell
943fbb4f40 Merge "ActionBar overlay mode, height fetching, show/hide" 2010-08-11 17:26:10 -07:00
Jeff Brown
b219a83ff6 am f66f8a58: am 95af0c14: Merge "Add support for the PointerLocation overlay." into gingerbread
Merge commit 'f66f8a58cc4412bd258e1d5b11cac17a617bdc58'

* commit 'f66f8a58cc4412bd258e1d5b11cac17a617bdc58':
  Add support for the PointerLocation overlay.
2010-08-11 16:22:47 -07:00
Adam Powell
6b336f835d ActionBar overlay mode, height fetching, show/hide
Change-Id: Ie931ed26ec885d891d6733132b517a53d95f8491
2010-08-11 16:17:57 -07:00
Jeff Brown
a41ca77fab Add support for the PointerLocation overlay.
This change involves adding a new method to IWindowManager,
monitorInput() that returns an InputChannel to receive a copy of all
input that is dispatched to applications.  The caller must have
the READ_INPUT_STATE permission to make this request (similar to
other window manager methods such as getKeycodeState).

Change-Id: Icd14d810174a5b2928671ef16de73af88302aea0
2010-08-11 14:46:32 -07:00
Adam Powell
f75eeb28de Fix bug 2908822 - open/closePanel should do the right thing with ActionBars
Change-Id: Ic77f9dee864d17046f69c78a1e6d96a49b5c6180
2010-08-10 15:59:40 -07:00
Adam Powell
6dd73b45a4 Fix some lifecycle issues with populating the action bar's menu
Change-Id: I5f63df3260392b09fbb7120986702d01dac5906c
2010-08-06 11:30:35 -07:00
Adam Powell
8e552630e7 Let action modes overlay window content
Change-Id: Ic0512c3e6338e1de15facec0a6650f9da9808a24
2010-08-04 17:42:44 -07:00
Adam Powell
5d27977f9d Action modes without action bar
Change-Id: I0367ab35e598a17980bd373b30828175f6283acc
2010-07-27 21:04:52 -07:00
Romain Guy
ac670c0433 Generate shaders to cover all possible cases.
With this change, all the vertex and fragment shaders used by the GL
renderer are now generated based on a program description supplied
by the caller. This allows the renderer to generate a large number
of shaders without having to write all the possible combinations by
hand. The generated shaders are stored in a program cache.

Change-Id: If54d286e77ae021c724d42090da476df12a18ebb
2010-07-27 19:52:29 -07:00
Adam Powell
6e34636749 Moved context modes into view, renamed to action modes
ContextualMode renamed to ActionMode. Adds a reference to the action
bar and reduces confusion around things named "Context".

Change-Id: Ia5098b1d0799a0ece0810c34e6696eda039fb005
2010-07-26 17:28:45 -07:00
Daniel Sandler
4042744bf8 Disable hiding of the system bar on xlarge devices.
We treat the system bar as "outside" the available screen,
so activities will never be able to draw over (or under!)
that space.

Change-Id: I287a0b1e837e415cf08fc94053c4cc14a7753848
2010-07-21 14:44:52 -04:00
Adam Powell
8028dd32a4 Overflow menu for action bars.
The overflow menu replaces the normal options menu panel for
activities with an action bar. It always appears as the rightmost
action button and is displayed as a dropdown menu. The menu key
summons and dismisses the overflow menu instead of the options panel
where applicable.

Change-Id: I0b4fa7e36f35ab12e2f0c1d12bec79ccab8cc4b1
2010-07-16 10:22:31 -07:00
Adam Powell
e92ea3474d Fix bug 2835056 - ActionBar doesn't update title properly when set in onCreate
Change-Id: I593315db8df0190c2702a87ebef293e5f798823d
2010-07-14 14:46:37 -07:00
Dianne Hackborn
2388ad9eef am f8d9379b: am d76b67c3: IME events are now dispatched to native applications.
Merge commit 'f8d9379bd834573feca085284970cf686993c330'

* commit 'f8d9379bd834573feca085284970cf686993c330':
  IME events are now dispatched to native applications.
2010-07-13 19:50:36 -07:00
Dianne Hackborn
d76b67c340 IME events are now dispatched to native applications.
And also:

- APIs to show and hide the IME, and control its interaction with the app.
- APIs to tell the app when its window resizes and needs to be redrawn.
- API to tell the app the content rectangle of its window (to layout
  around the IME or status bar).

There is still a problem with IME interaction -- we need a way for the
app to deliver events to the IME before it handles them, so that for
example the back key will close the IME instead of finishing the app.

Change-Id: I37b75fc2ec533750ef36ca3aedd2f0cc0b5813cd
2010-07-13 18:36:46 -07:00
Adam Powell
4267534d1c Action Bar now supports submenus as popups.
Change-Id: I1691c16081b3474ed6d6e406f91f5f74a2dc8fcb
2010-07-13 18:14:11 -07:00
Jeff Brown
1a33274d28 resolved conflicts for merge of 167449e5 to master
Change-Id: Ib448e69a726eb45b5c9099d2574e40b8345eee67
2010-07-08 19:01:13 -07:00
Joe Onorato
34bcebca70 Let the window manager place the rest of the windows on screen when the status bar is at the bottom.
Change-Id: I29c43beee047bb99695a34e6b202ff3f8400c8c2
2010-07-07 18:33:14 -04:00
Jeff Brown
00fa7bdd69 More native input dispatch work.
Removed old input dispatch code.
Refactored the policy callbacks.
Pushed a tiny bit of the power manager state down to native.
Fixed long press on MENU.
Made the virtual key detection and cancelation a bit more precise.

Change-Id: I5d8c1062f7ea0ab3b54c6fadb058c4d5f5a9e02e
2010-07-03 19:23:01 -07:00
Adam Powell
89e0645b41 Added context modes to ActionBar API.
Change-Id: I7c3e782cbf01be7bc671b377fb4d706040888833
2010-06-29 14:04:58 -07:00
Dianne Hackborn
f92f8686f9 am 98f7aed6: am 1e4b9f39: Remove InputConsumer, replacing with InputQueue.
Merge commit '98f7aed66b54c365f816fe990de978f61155cde1'

* commit '98f7aed66b54c365f816fe990de978f61155cde1':
  Remove InputConsumer, replacing with InputQueue.
2010-06-23 14:43:31 -07:00
Dianne Hackborn
1e4b9f3936 Remove InputConsumer, replacing with InputQueue.
Change-Id: Ib06907278457aaee842b123adc072840ca3602d8
2010-06-23 14:37:30 -07:00
Dianne Hackborn
320742b15a am e3e2883f: am e24a60aa: Merge "First stab at attaching native event dispatching." into gingerbread
Merge commit 'e3e2883f2232007174ead562610eb01201890d9b'

* commit 'e3e2883f2232007174ead562610eb01201890d9b':
  First stab at attaching native event dispatching.
2010-06-23 10:32:25 -07:00
Dianne Hackborn
a95e4cb62f First stab at attaching native event dispatching.
Provides the basic infrastructure for a
NativeActivity's native code to get an object representing
its event stream that can be used to read input events.

Still work to do, probably some API changes, and reasonable
default key handling (so that for example back will still
work).

Change-Id: I6db891bc35dc9683181d7708eaed552b955a077e
2010-06-22 11:21:50 -07:00
Adam Powell
96675b1df3 Merging ActionBar menu with options menu.
Options menu items may now specify if they would like to appear in the
action bar. Menu items defined in xml may set the showAsAction
attribute to one of "never"(default), "ifRoom", or "always". Action
buttons are populated as follows:

* All showAsAction="always" items become action buttons, even if it
  would crowd the navigation area of the action bar.

* If there is space remaining, showAsAction="ifRoom" items are added
  until no more will fit comfortably.

Action button click events are now handled by the
onOptionsItemSelected method used by the standard options menu.

The construction of options menus now happens earlier in order to
provide data to the action bar. Activities with an action bar can now
expect to have onCreateOptionsMenu called when activity start-up is
complete.

Activity#invalidateOptionsMenu can be used to force a refresh of menu
items where the previous API would use ActionBar#updateActionMenu.

Change-Id: If52ddf1cf9f6926206bcdeadf42072ea2c24fab9
2010-06-17 11:35:43 -07:00
Brett Chabot
83ea9e395e am 685fcf36: am c95812e6: Merge "Move out all framework-tests classes." into gingerbread
Merge commit '685fcf364b84d5ac911ae9cbbc4fec99f36cbd48'

* commit '685fcf364b84d5ac911ae9cbbc4fec99f36cbd48':
  Move out all framework-tests classes.
2010-06-16 14:42:51 -07:00
Brett Chabot
be81f4f15d Move out all framework-tests classes.
Previously tests/framework-tests contained a quarantined set of test classes
that needed access to package-private framework api. Running these tests
normally would cause the dalvik verifier to throw errors.

runtest now has support for turning off the dalvik verifier for frameworks
tests, so move this tests into their recommended location, close to the source
being tested.

Also move policy source into a 'src' folder to accommodate the tests move.

Change-Id: I62f839da185a55bc553b653bf583fd99da438512
2010-06-14 17:23:08 -07:00
Jeff Brown
8e03b7566c resolved conflicts for merge of 9e660c82 to master
Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
2010-06-13 19:16:55 -07:00
Jeff Brown
46b9ac0ae2 Native input dispatch rewrite work in progress.
The old dispatch mechanism has been left in place and continues to
be used by default for now.  To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API.  Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument.  The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points.  The ViewRoot then
provides the InputChannel to the InputQueue.  Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue.  This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event.  Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets).  Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
2010-06-13 17:42:16 -07:00
Joe Onorato
8a5f10b30d resolved conflicts for merge of f7b79151 to master
Change-Id: Ia4538f73d8bade9e6565835d484dcb650830feca
2010-06-09 15:07:16 -07:00
Joe Onorato
8bc6c51419 Require the STATUS_BAR_SERVICE permission for something to be the status bar.
Change-Id: I57b2d296e0d0cef0d256ae6697fffc47188d14df
2010-06-09 14:33:23 -07:00
Dianne Hackborn
b31e84bc45 Add Fragment option menu APIs.
Also fix up how transactions are handled so that a series of transactions
can correctly be created and committed.

Change-Id: I948ba47d49e9b2246a1958bd9eac9dd36dc5a855
2010-06-09 12:26:29 -07:00
Joe Onorato
37166e6d7e am ff97998a: am 4762c2d7: Add expand and collapse. 2010-06-02 22:38:20 -07:00
Joe Onorato
60a83af048 am ee5d0caf: am f3f0e053: Make disable() work. 2010-06-02 22:38:10 -07:00