866 Commits

Author SHA1 Message Date
Craig Mautner
2eb15342be Destroy surfaces when display is removed.
Fixes bug 10226153.

Change-Id: I4eb8b14258985768d36745260ad4e62ba6c78844
2013-08-07 13:13:35 -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
Jean-Baptiste Queru
e14afe7163 am 58f26e9d: Merge "The order of child windows is switched"
* commit '58f26e9dfbd3986037fa5e52e8def1cb6b741bc3':
  The order of child windows is switched
2013-07-08 11:21:52 -07:00
takeda.masayuki
1873509153 The order of child windows is switched
By calling WindowManagerService#reAddWindowLocked(), the window object
in DisplayContent.mWindows is rearranged. If this window has children,
the window objects belonging to WindowState.mChildWindows are also
rearranged together. At this time, while DisplayContent.mWindows is
arranged in ascending order of Z-Order, WindowState.mChildWindows is
arranged in descending order. Therefore, if children
(= WindowState.mChildWindows) are added to DisplayContent.mWindows
in the original order, the order of children is switched. I think
that children must be sorted before they are added.

Change-Id: I28a506f17fcd99c801a3faa17cca66fffb291596
2013-07-08 11:08:41 -07:00
Craig Mautner
5729b81ab5 Merge "Add API to convert translucent Activity to opaque." 2013-06-27 21:00:44 +00:00
Craig Mautner
4addfc5f39 Add API to convert translucent Activity to opaque.
Fixes bug 9298778.

Change-Id: If6198f42bdea8aa727a2abc672eb0062aaf63ca3
2013-06-25 16:56:37 -07:00
Dianne Hackborn
8c84109b9f Use FastPrintWriter... everywhere.
One problem this turned up is, because FastPrintWriter does
its own buffering, a lot of code that used to use PrintWriter
would fail -- if it pointed to a StringWriter, there was no
buffering, so it could just immediately get the result.  Now
you need to first flush the FastPrintWriter.

Also added some new constructors to specify the size of buffer
that FastPrintWriter should use.

Change-Id: If48cd28d7be0b6b3278bbb69a8357e6ce88cf54a
2013-06-24 18:16:48 -07:00
Craig Mautner
7a78b39428 Merge "Fix unnecessary and harmful task movement." 2013-06-24 18:38:11 +00:00
Craig Mautner
f0ac5c87f2 Fix unnecessary and harmful task movement.
Changing the focus to a new activity should not move it to the top of
the task stack. When the previous activity fully pauses and the new
focused activity resumes then it will be brought to the top of the
task stack at the proper time. Moving it there prematurely causes the
ActivityManager and WindowManager stack sequences to be out of sync.

Fixes bug 9518153.

Also remove false warnings in validateTopActivitiesLocked() and add
debug for task movement to TaskStack.

Change-Id: Ib57500b07ded97223155cda7ef603aecc9b642c3
2013-06-24 11:29:09 -07:00
Craig Mautner
48d0d18867 Add activity token to display system.
First step in adding activity specific information to displays.
Replace CompatibilityInfoHolder with DisplayAdjustmentsHolder that
holds an activity token in addition to the CompatibilityInfo.

Change-Id: Ie113cd8dd9c62e0b5311204e039a4829096bea68
2013-06-22 15:30:13 -07:00
Craig Mautner
a7cfb4f827 Merge "Fix stack transfer bug." 2013-06-18 23:57:56 +00:00
Craig Mautner
1d001b670e Fix stack transfer bug.
Set the focused stack to the task with the started activity. Do not refocus
when activities report resume.

Add more conditional debug.

Fixes bug 9481679.

Change-Id: Ib7134e88f9a2c8ad1703af0d43442c8bbe4e65dc
2013-06-18 16:55:48 -07:00
Jeff Brown
a506a6ec94 Add an API to allow for creating private virtual displays.
This change enables applications to create a private virtual
display that renders its content to a surface of its own creation.
The display is private in the sense that only the application
that owns the display is allowed to place windows upon it.
Mirroring and blanking is also disabled for these displays.

Bug: 9192512
Change-Id: I852ea07f0c7df1d244e354e3daca3a6960285ca0
2013-06-18 15:32:41 -07:00
Craig Mautner
d213beae75 Don't bring stack forward when moving tasks.
Change-Id: I222eda9e3ea62119c8948a99a63de55b13ca69f4
2013-06-17 12:30:32 -07:00
John Spurlock
80f00c1f23 Remove concept of system bar from window manager.
It was already hardcoded to false, this change removes the dead code.

Change-Id: I5e543344e60f69cb9882a70ba29f7c09404ad9fc
2013-06-14 13:20:17 -04:00
Craig Mautner
037aa8d434 Centralize all system InputEventReceiver monitors.
Implement all system level InputEvent monitors as new
InputEventListeners. Only one InputChannel required and monitoring
can be enabled or disabled by registering with WindowManagerService.

Change-Id: I64714ab858342ed183c62b421098478ffb6637bc
2013-06-12 10:59:16 -07:00
Craig Mautner
8c4a8243c7 Merge "Finish InputEvents." 2013-06-07 21:25:42 +00:00
Craig Mautner
d982e6d965 Finish InputEvents.
StackTapDetector was leaking InputEvents. Fixes bug 9180347.

Change-Id: Ib526768024b54021ca02e6183bae847e217bb68d
2013-06-07 11:05:08 -07:00
Craig Mautner
d76dcdcd98 Make WindowState mUnderStatusBar reflect position.
The mUnderStatusBar variable was always true but now it changes
when the StackBox is no longer directly under the Status Bar.

Change-Id: I0c9db5790bfa9b0e4bb35e389d539fd941d56730
2013-06-06 11:26:15 -07:00
Craig Mautner
fb7044598b Merge "Extend stacks up under status bar" 2013-06-06 00:28:20 +00:00
Craig Mautner
c5a6e44f59 Extend stacks up under status bar
Retain compatibility with earlier behavior. Fixes bug 8685941.

Change-Id: Ida800a2476ba3a18cd97deccbc65c8a02739d118
2013-06-05 17:22:35 -07:00
Adam Powell
04fe6ebb9f Fix a bug resolving the correct icon/logo in action bars
Remove some abstraction-breaking magic in ActionBarView and replace it
with proper resolution of the icon/logo when creating a window. The
old implementation relied on the ActionBarView's context being an
Activity.

Bug 9171554

Change-Id: Idbbb1942622195dcb55e8119f2d64287b07bb509
2013-05-31 15:00:24 -07:00