886 Commits

Author SHA1 Message Date
Craig Mautner
b3370cec71 Debug for b/10689184.
Change-Id: I67b7a4bd7fb902b0d0275af0665625593dc1af00
2013-09-19 12:55:19 -07:00
Craig Mautner
bc65c1dbcc Merge "Do not assign InputMethod to non-input windows." into klp-dev 2013-09-17 22:13:10 +00:00
Craig Mautner
22b9a5e0aa Do not assign InputMethod to non-input windows.
The InputMethod window was being assigned to the bottommost
window as a fall-through situation when no window could receive
input. This fix changes that so that if the bottommost window
cannot receive IME input then the InputMethod will be unassigned.

In most ANRs associated with bug 10689184 mInputMethodTarget
was assigned to the Wallpaper window and the InputMethod was
placed directly above it. When the ANR occurred the window that
was awaiting focused was then always placed immediately above the
InputMethod. This fix will keep that situation from happening.

Change-Id: Ic247e8132a907f2712a9f8a89e43c099142ec851
2013-09-17 14:50:56 -07:00
Craig Mautner
b1885b8588 More debugging for b/106899184
Change-Id: I729a2c5bae087713765d782daaa7309ee6cd5b5a
2013-09-17 09:35:20 -07:00
Craig Mautner
5845812780 Add debug logging for b/10689184.
Focus is now on focus. Remove logging when fixed.

Change-Id: Ic0cd2d6bd4e65dac9dd40f4745dd12fb84f687ce
2013-09-15 14:18:54 -07:00
Igor Murashkin
2cad64c0fb Merge "Surface: Change OutOfResourcesException to be a runtime exception" into klp-dev 2013-09-11 18:28:07 +00:00
Jeff Brown
bd181bb832 Propagate input ANR reason to activity manager log.
Make it a little easier to diagnose input dispatch timeouts by
providing the detailed reason as the ANR annotation in the log.

Bug: 10689184
Change-Id: Ie18fd9ad066b0673d1f57c030e027ad0085f4650
2013-09-10 16:44:24 -07:00
Igor Murashkin
a86ab640f7 Surface: Change OutOfResourcesException to be a runtime exception
- Deprecates SurfaceTexture.OutOfResourcesException, it wasn't used
- Make all JNI code throw only Surface.OutOfResourcesException
- Get rid of redundant SurfaceControl.OutOfResourcesException

Bug: 10566539
Change-Id: I58126260771b9ccff6a69c672ce7719b9f98138d
2013-09-09 21:53:59 -07:00
Craig Mautner
61f0f9ada5 Merge "When adding a window evaluate all tasks." into klp-dev 2013-08-27 21:20:52 +00:00
Craig Mautner
018be3da7b When adding a window evaluate all tasks.
Previously the code was adding a window based only on the tasks on
the stack belonging to the window being added. But if a window from
another stack was on top the window would be added out of order.

In particular when there was a dialog over the launcher app and the
device was rotated, the launcher window was being added over the
dialog. This caused the launcher icons to obscure the dialog and for
the dialog buttons to be untouchable.

Fixes bug 9984067.

Change-Id: I9a57eb641d118f4a90e98af8ca77127ab5364e79
2013-08-27 13:25:17 -07:00
John Spurlock
ef4adae5de Allow wallpaper to extend into the entire screen.
Previously it was constrained to displayInfo.appWidth/appHeight
which comes from PWM.getNonDecorDisplayWidth/Height, which includes
the nav bar.

Also adjust window layout to entire screen.

This allows wallpaper to extend into the navigation bar region,
important if the nav bar is hidden or transparent.

Bug:10505328
Change-Id: Ia6057b9c57b476a48f3b2d8b6368fd631e944a3e
2013-08-27 12:56:41 -04:00
Jeff Brown
0b31d812ab Drop touch events when no window was touched.
Prevent spurious ANRs in the case where an input event is simply
undeliverable because there is no window at the touched location.
Previously, we would assume that we were just waiting for an
application to start and become available to handle the event but
this assumption is no longer valid.

Monkeys in particular have a tendency to inject events outside
of the boundaries of the display which results in spurious ANRs.
So we should just reject them.

Bug: 9774124
Change-Id: I5c40ce4c942f0557593a229dc5253a0e0bdb8466
2013-08-22 20:07:08 -07:00
keunyoung
1eb0637f2a fix race condition when a new display is added
- When a new display is added, display add event triggers handleDisplayAddedLocked in
  WindowManagerService asynchronously.
- After creating virtual display, application can move on and call addWindow before
  handleDisplayAddedLock is called.
- Application's addWindow leads into creating a new DisplayContent, and a window will be added there.
- But when handleDisplayAddedLocked is called later, it will create a new DisplayContent for the
  display, and the window added by the application will be lost.
- This CL tries to fix the issue by checking the presence of DisplayContent before creating a new
  one.

bug: 9975297

Change-Id: I9fac7ffb57c3e1effa8f0e950539cfae73e7e1c6
2013-08-12 16:21:14 -07:00
Craig Mautner
0dd303cfdb Merge "Put animation background behind visible wallpaper" into klp-dev 2013-08-10 18:52:39 +00:00
Craig Mautner
6201c2ac41 Put animation background behind visible wallpaper
The new wallpaper positioning associated with multiple activity stacks
put animation backgrounds in front of the wallpaper. This caused
hideous jank. Testing for visible wallpaper and moving the background
behind it fixes the jank.

Fixes bug 10078282.
Possibly fixes bug 10247094.

Change-Id: I3f4e07accd7276d59725192081904b791f77781f
2013-08-10 11:48:18 -07:00
Craig Mautner
8efb0a4d81 Add extra layout pass after draw finished.
Once content has been drawn another pass through layout is required
to set mHasContent in the LogicalDisplay. Previously this pass was
occuring because of a delayed animation step. When timing of that
step changed that pass occurred before the draw completed. This is
why Presentations were immediately displayed in jb-mr1 and not
jb-mr2.

Fixes bug 10154780.

Change-Id: I0075c5a73d5cdf972e73fdd59c1fde46df64e245
2013-08-09 14:32:58 -07:00
Jeff Brown
ef981a40aa Fix propagation of display overscan information.
Fix several problems in the way that the overscan was plumbed in
which could result in information not being delivered to applications.
There was also a violation of certain invariants regarding the
immutability of returned DisplayInfo objects.

Bug: 10213771
Change-Id: I21184a14305e44278b5e81353bf95d511e8517fb
2013-08-07 14:33:50 -07:00
Jeff Brown
18ec40c44c Merge "Destroy surfaces when display is removed." 2013-08-07 21:32:32 +00:00
Mathias Agopian
9fb9a1c5c1 Merge "Fix a bug where window animation could be janky" 2013-08-07 20:36:26 +00:00
Craig Mautner
2eb15342be Destroy surfaces when display is removed.
Fixes bug 10226153.

Change-Id: I4eb8b14258985768d36745260ad4e62ba6c78844
2013-08-07 13:13:35 -07:00
Mathias Agopian
9c72281d97 Fix a bug where window animation could be janky
SurfaceControl.closeTransaction() will block until the transaction
takes effect and this happens at the next vsync -- in practice
it means this call blocks for ~15ms.

Immediately after that we ask the choreographer to schedule the
next frame, which will happen at the next vsync. depending the
timing, this would cause the window manager to animate at 30 fps
instead of 60.

This is fixed here by calling the choreographer before we
call closeTransaction().

In the near future, we should be able to fix this by using
an offseted vsync for the window manager and it won't need
closeTransaction() to block at all.

Bug: 10209014
Change-Id: I33d0c5ecfc25154b2859f3023a8cda6e641826bf
2013-08-07 12:07:24 -07:00
Craig Mautner
dee8bf0eb5 Create SurfaceSession before creating DimLayer.
Fixes "java.lang.IllegalArgumentException: session must not be null"

Change-Id: Id7e77a44e59e5169ed8944682ab79783631182dd
2013-08-07 09:24:11 -07:00
Craig Mautner
9d808b1f48 Add home StackBox to all DisplayContent.
Each display needs a stack and a stack box to contain windows.

Fixes bug 10161525.

Change-Id: Ic617cdf5a082ae68f0589e826ecbb37d8fba52ac
2013-08-06 18:07:13 -07:00
Craig Mautner
5c7132560a Merge "Add force default orientation." 2013-08-03 22:32:04 +00:00
Craig Mautner
46ac6fa614 Add force default orientation.
Devices can be configured to remain in their default landscape or
portrait orientation by setting config_forceDefaultOrientation true
in overlay/.../values/config.xml.

Activities that desire to run in the non-default orientation are
supported by creating a logical display within the physical display.
Transitions to and from the activity perform a crossfade rather than
the normal rotation animation.

Also, improve SurfaceTrace debug output.

Fixes bug 9695710.

Change-Id: I053e136cd2b9ae200028595f245b6ada5927cfe9
2013-08-02 16:23:58 -07:00
Dianne Hackborn
635a6d5a0b Fix some oom tuning and display size stuff.
Fix a problem where we would not respect the device's
override display density/size if those had been reset at
some point (to an empty string).

Tweak the tuning of low RAM devices to consider 480x800 as
the base line resolution.  That is our target these days.

Improve output of oom and meminfo to include this tuning
information.

Change-Id: Ic9a85b0391b075178c4ac17e64086ef21889f430
2013-07-29 17:17:31 -07:00
Craig Mautner
67a60426d8 Update configuration before setting override size.
PhoneWindowManager.setInitialDisplaySize() uses Resources to determine
the height of the Status and Navigation bars. Previous to this CL the
Configuration was being updated after setInitialDisplaySize() was
called which caused the Status and Navigation Bar heights to use the
initial size and density and not the override values. This fix moves
the updateConfiguration after the override values are read in but
before setInitialDisplaySize() is called.

Fixes bug 9966940.

Change-Id: If5b033f520e14f32080d0f2aebbdc6bdae714f88
2013-07-25 12:29:12 -07:00
Craig Mautner
358a8cc678 Merge "Add null check to StackBox containment test." 2013-07-22 22:54:15 +00:00
Craig Mautner
dc725fe93b Add null check to StackBox containment test.
Relies on mFirst and mSecond being non-null exactly when mStack is
null.

Fixes bug 9774735.

Change-Id: Ib0b463560b4bf69fdf05afe61ebe94ea0034a3ad
2013-07-22 13:56:31 -07:00
Chet Haase
07cb345877 am 09a68ac9: am dbc51de4: am 53771e5f: Merge "Remove useless/repetitive code"
* commit '09a68ac943e0d21ad61a94ed4eac1d6099657602':
  Remove useless/repetitive code
2013-07-22 09:05:13 -07:00
Chet Haase
09a68ac943 am dbc51de4: am 53771e5f: Merge "Remove useless/repetitive code"
* commit 'dbc51de44fe4f9a7f81528204250de32ec405d39':
  Remove useless/repetitive code
2013-07-22 09:02:06 -07:00
Chet Haase
dbc51de44f am 53771e5f: Merge "Remove useless/repetitive code"
* commit '53771e5f955f67035cf6b6432c34171a18ab14dc':
  Remove useless/repetitive code
2013-07-22 08:59:30 -07:00
Craig Mautner
acb837fe63 Merge "Fix home activity and user switch interactions." 2013-07-19 23:07:51 +00:00
Craig Mautner
ac6f843c91 Fix home activity and user switch interactions.
- Make sure Home activity goes in the correct task and on the correct
stack.
- Do not allow different users to be in the same task.
- Do not set stacks aside for each user.

Fixes bug 9775492.

Change-Id: I0e7954e917aac8482a1015a36923e02914e2b692
2013-07-19 16:05:59 -07:00
Craig Mautner
70eac41f70 am a64325f6: am 7c6be10d: Remove iterators (DO NOT MERGE)
* commit 'a64325f6e70569255ff395a85ec161f3230f9e35':
  Remove iterators (DO NOT MERGE)
2013-07-19 13:37:22 -07:00
Craig Mautner
0f4ab97c23 Access sparse array in correct manner
Was using get() for iteration. Consequence of cl 331550.

Fixes bug 9902476.

Change-Id: I4ec08d0421411981db8b8fba7342e9a3db606ce1
2013-07-19 11:07:29 -07:00
Colin Cross
ef96fd9009 Add properties to override size and density
Add properties ro.config.density_override and ro.config.size_override
to provide build-time virtual screen sizes.  A device with no
override set with "wm size" will use the size specified by the property.
"wm size reset" will go back to the physical size.

Change-Id: I07a585eb2e0f91365fac2b64c53de3af138a2a85
2013-07-18 17:09:56 -07:00
John Spurlock
332d84a567 Merge "Fix View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION." 2013-07-17 00:20:36 +00:00
John Spurlock
7045aaa21e Fix View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION.
If a window's task stack has no sibling, restore old behavior
of allowing frame to go below the nav bar.

Bug:9884905
Change-Id: Ifc38901a6633cf431dba8740a65258d0618c0fd0
2013-07-16 19:42:23 -04:00
Craig Mautner
b48fe0ec5e Merge "Remove iterators." 2013-07-16 21:45:32 +00:00
Craig Mautner
f8924150b3 Remove iterators.
Remove DisplayContentsIterator and AllWindowsIterator. These were cute
but they take up valuable resources. Iterate over ArrayList members
in their place.

Change-Id: I1d8a3b040175cb88b98f6a7e97cab06d17d5706b
2013-07-16 13:45:29 -07:00
Craig Mautner
7c6be10d31 Remove iterators (DO NOT MERGE)
Remove DisplayContentsIterator and AllWindowsIterator. These were cute
but they take up valuable resources. Iterate over ArrayList members
in their place.

Change-Id: Ie0c537608532cfb36f34d976cc6eacd21bad98cd
2013-07-16 13:07:48 -07:00
Cyril Mottier
5f5882ffa8 Remove useless/repetitive code
fixScale(float) method has been extracted from the code but the original
code has been kept in place. Because of this, the animation scale is 
"fixed" twice which is not necessary. This patch, simply call 
fixScale(float) once and stores the result of it in the scale variable.

Change-Id: I50aeacbc2c13ebbf447506ae4309d50c0e313837
2013-07-15 15:38:10 +02:00
keunyoung
27116e35e8 Merge "add TYPE_PRIVATE_PRESENTATION window type" 2013-07-12 23:03:21 +00:00
keunyoung
a446bf0e8c add TYPE_PRIVATE_PRESENTATION window type
- This window type can be used for Presentation created on top of virtual
  private display.
- There can be PRIVATE_PRESENTATION specific policy / behavior, but for now,
  there is nothing special.

Change-Id: I9fde0f0376e57fcc60000d3a3f8657a21ef58993
2013-07-12 14:41:10 -07:00
Amith Yamasani
abee69bc08 am 8361a9f7: am 1a1a7c08: am 06a441de: Merge "Pass along the user id to AttributeCache requests" into jb-mr2-dev
* commit '8361a9f719b6a416a40134951daf28297b6e0670':
  Pass along the user id to AttributeCache requests
2013-07-12 11:25:24 -07:00
Amith Yamasani
8361a9f719 am 1a1a7c08: am 06a441de: Merge "Pass along the user id to AttributeCache requests" into jb-mr2-dev
* commit '1a1a7c0878320b94d01da6bdfaa857c85b4199a3':
  Pass along the user id to AttributeCache requests
2013-07-12 11:21:27 -07:00
Amith Yamasani
4befbecfcc Pass along the user id to AttributeCache requests
Bug: 9759331
Change-Id: Ib96ba6a89c58edc207021aa43a2b67b4f6c50117
2013-07-10 16:18:01 -07:00
Craig Mautner
5eda9b3301 Add convertToTranslucent to API.
Rename convertToOpaque to convertFromTranslucent. Add the
counterpart to Activity.convertFromTranslucent() for returning from
opaque to a translucent Activity. The caller should wait until
TranslucentConversionListener.onTranslucentConversionComplete() is
called before actually changing the background to translucent.

Change-Id: Id04b026bcc4dd8bad9a33a7af126e1bb28fb9c03
2013-07-09 14:50:12 -07:00
Jean-Baptiste Queru
c6376b54ba am a998fa2d: am e14afe71: am 58f26e9d: Merge "The order of child windows is switched"
* commit 'a998fa2df957ad3f1c860d5ab8903041cf53a2f0':
  The order of child windows is switched
2013-07-08 11:27:51 -07:00