746 Commits

Author SHA1 Message Date
Dianne Hackborn
fb4e1c21ed am 25b49734: Merge "Fix issue #8540550: Screenshots should never have transparency" into jb-mr2-dev
* commit '25b49734cac1ecd17dba2af2a1af8328490236d4':
  Fix issue #8540550: Screenshots should never have transparency
2013-04-17 19:03:09 -07:00
Dianne Hackborn
ca46b87118 Fix issue #8540550: Screenshots should never have transparency
Make sure the thumbnail bitmap is initialized with a black
background.

Change-Id: I87c00d309b7d30b6085a751aa4ae22cf146c74f5
2013-04-17 18:06:22 -07:00
Dianne Hackborn
f5cfab41c3 am a59a19ab: Merge "Fix issue #8512015: VideoView\'s window animates when its position changes" into jb-mr2-dev
* commit 'a59a19abb8f284beb478ff2492493251b91a2847':
  Fix issue #8512015: VideoView's window animates when its position changes
2013-04-15 16:25:05 -07:00
Dianne Hackborn
1c5383ce0b Fix issue #8512015: VideoView's window animates when its position changes
Change-Id: I79eee6b9672b7d72eabe5d20be639c05a6f3d72b
2013-04-15 15:07:21 -07:00
Craig Mautner
98874efb99 am cc979c9e: Merge "Debug logging improvement." into jb-mr2-dev
* commit 'cc979c9eae387d80e4c4129d18991d708dde44a6':
  Debug logging improvement.
2013-04-10 16:57:50 -07:00
Craig Mautner
cc979c9eae Merge "Debug logging improvement." into jb-mr2-dev 2013-04-10 23:54:29 +00:00
Craig Mautner
66d7730903 Debug logging improvement.
Previously a change to a surface would be logged with the old value
and you had to scroll through the logs to see what the new value
was. This change reflects the change to the surface immediately.

Change-Id: I2a6566466287922d08f4ce2329c61aa46d692ee1
2013-04-10 15:33:26 -07:00
Dianne Hackborn
abe0aa78ca am 8f980e1a: Merge "Reduce duration of rotation xfade animation." into jb-mr2-dev
* commit '8f980e1a5ae99d5e34aaef6aac7f38a7d0038631':
  Reduce duration of rotation xfade animation.
2013-04-10 10:51:50 -07:00
Dianne Hackborn
8f980e1a5a Merge "Reduce duration of rotation xfade animation." into jb-mr2-dev 2013-04-10 17:48:21 +00:00
Craig Mautner
d339818d9a am bab9687e: Merge "Make the min layer go down through all windows" into jb-mr2-dev
* commit 'bab9687e6473072d6ff4f7ea5a7b21bcfbf95744':
  Make the min layer go down through all windows
2013-04-05 10:31:35 -07:00
Craig Mautner
bab9687e64 Merge "Make the min layer go down through all windows" into jb-mr2-dev 2013-04-05 17:28:08 +00:00
Craig Mautner
4238e3e4b5 Make the min layer go down through all windows
The min layer was set to only show the windows that matched
the specified app token. But that meant when dialogs were
launched it only showed the dialogs and not the background
windows.

Added improved debugging.

fixes bug 8502844.

Change-Id: I26b49568b872801ec9aa088df20317aa752dacd6
2013-04-05 10:26:19 -07:00
Brian Colonna
5856ee4bd6 am 1eccc0cf: Merge "FUL now restarts when flipping tablet 180 (bug 7484464)" into jb-mr2-dev
* commit '1eccc0cf5f7f33203091c0b475a4ad91570c85cd':
  FUL now restarts when flipping tablet 180 (bug 7484464)
2013-04-02 13:26:23 -07:00
Sangkyu Lee
0438bd692b Fix potential deadlock between LockScreen and WindowManagerService
If LockScreen is enhanced using SurfaceView/GLSurfaceView,
deadlock problem between LockScreen and WindowManagerService
can occur because of IWindow.resized() callback.
And it must lead to watchdog and reset.

IWindow.resized() callback is one-way function so calling resized()
callback of a remote IWindow object is never blocked.
However, calling resized() callback of a local IWindow object
(LockScreen is running on the same system_server process)
is always blocked until resized() callback returns.
Because resized() callback of SurfaceView/GLSurfaceView can lead to
WindowManagerService.relayoutWindow() call, deadlock can occur
between relayoutWindow() and performLayoutAndPlaceSurfacesLockedInner().
(Both functions need locking mWindowMap)

So this patch simulate one-way call when calling resized() callback
of a local IWindow object.

Change-Id: I2a6a5c74ed22d8e6b7a3bea3424ff2879d227105
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>

Conflicts:
	services/java/com/android/server/wm/WindowManagerService.java
2013-04-02 10:28:13 -07:00
Brian Colonna
b1b9a8ac07 FUL now restarts when flipping tablet 180 (bug 7484464)
When a tablet rotates, FUL must be stopped and restarted in a new
position.  90 degree rotations cause a configuration change, causing
FUL to be automatically reconstructed in the new location.  However,
a 180 degree rotation is not a configuration change, so FUL was not
restarting.  A 180 degree rotation happens more often than one might
think.  If you set the tablet down and later picked it up in the
opposite orientation, FUL would not work prior to this fix.

This change adds a rotation watcher to KeyguardFaceUnlockView.  It
watches for 180 degree rotations and stops and restarts FUL
accordingly.

The rotation watcher callback must be unregistered when
KeyguardFaceUnlockView is recreated (as during 90 degree rotation
changes), otherwise the number of rotation watcher callbacks will keep
growing and they will never go away.  This is a problem not just
because there are many callbacks hanging around, but also because the
old callbacks end up trying to access biometric unlock views that no
longer exist, resulting in crashes.  So, a simple function was added
to the window manager to unregister a rotation watcher.

Change-Id: Ie1ef20a9a22b8f4e39918987dff2b8ad444fcfd1
2013-03-29 18:35:43 -04:00
Dianne Hackborn
a57c695bf2 Reduce duration of rotation xfade animation.
Also add code for tracking how long a rotation takes,
and who is causing it to take that time.

Change-Id: Ie3352ddfddd247f5a5c08f7da6bfe6b4da607ba2
2013-03-29 15:03:18 -07:00
Dianne Hackborn
672cf45de7 Change wm commands to return size and density info.
Change-Id: Id25722fe5f0cd9470d04d657f067e5ad29927c98
2013-03-26 15:24:24 -07:00
Craig Mautner
24d88747e9 Reduce situations where black thumbnail occurs.
Pause and retry capturing a thumbnail if the window hasn't yet
been drawn. Still will show black thumbnails if recents is pressed
before window has anything drawn.

Improves bug 7552304.

Change-Id: I550c5a60510bfc4547bbb44451d57b4bc9f49880
2013-03-22 12:07:51 -07:00
Craig Mautner
aea8b0e571 am 7f7ac5b4: am fda1bff8: Merge "Correct the target app token for input method window"
* commit '7f7ac5b4a86be479bdede226fd4a2bddcd8a9a2b':
  Correct the target app token for input method window
2013-03-18 17:50:32 -07:00
Craig Mautner
e50d7fcd97 Properly close Surface when done.
Surface.destroy was not being called. Leading to warning from
StrictMode.

Fixes bug 8388527.

Change-Id: I472fb57ed2c3f6389e53d8f020f3b22b2d0740c8
2013-03-18 10:06:21 -07:00
Carrie Xu
5c97184c3a Correct the target app token for input method window
The root cause is:
There is a defect in window manager service: When a new
activity that can be ime target is added into window manager
but the Z order of input method window don't need to be
changed, then the target app token of input method window
would not be updated to new one. This defect may cause that
the layer of input method window is calculated incorrectly.

The solution:
Correct the target app token for input method window.

Change-Id: I008311e3c9b1cf5fc320b614d8675c183c506d50
2013-03-18 11:45:14 +09:00
Craig Mautner
a99764e597 Add window leak check and possible recovery.
Search output for "!!! LEAK !!!"

For bug 8322020.

Change-Id: I6db572a1c7fe0e6b386ccb0dba08bc376659a75a
2013-03-06 10:22:16 -08:00
Mathias Agopian
f4d6f153e6 Merge "remove suppor for SurfaceControl.FX_SURFACE_SCREENSHOT" into jb-mr2-dev 2013-03-06 03:52:50 +00:00
Mathias Agopian
11e7d88d14 remove suppor for SurfaceControl.FX_SURFACE_SCREENSHOT
the window manager can now use the SurfaceControl.screenshot
API with a "regular" surface.

Change-Id: I76bed81d5e7b078ea1b3e8f96814aba32e9d5405
2013-03-05 14:14:55 -08:00
Dianne Hackborn
e3f23a36d8 Add new WindowId for cross-process monitoring of focus.
This is a class representing a window and providing limited
interaction with it, which can be handed across processes.

Change-Id: I22885f2064a9cc8c68d690a5858c2e28bbb6a0f3
2013-03-05 09:33:48 -08:00
Craig Mautner
2ad920759b Revert ActivityManager changes for tasks. DO NOT MERGE
Keeping all activity=>task changes in master and removing them
from jb-mr2.

Revert "Update histories simultaneously."
Revert "Add null check to setAppGroupId."
Revert "Fix crashing bug in validator."
Revert "Switch topRunning* and moveTaskTo*"
Revert "Begin switch over to task based history."
Revert "Reset and reuse Iterators and don't new() one."
Revert "Remove AppWindowToken lists."
Revert "Fix build."
Revert "Remove unused App methods."
Revert "Stop using AppToken movement and start using Task."
Revert "Replace access to mAppTokens with AppTokenIterator"
Revert "Refactor setAppOpVisibility implementation."
Revert "Add AppWindowTokens to TaskList."
Revert "Make ActivityStack.mHistory private."
Revert "Migrate AppWindowToken lists into DisplayContent."

Change-Id: I5722c9a4956dccb52864207e2967690bc58e4ebb
2013-02-25 17:07:39 -08:00
Dianne Hackborn
c4aad01cbb Formalize overscan metrics.
The window manager now maintains and reports a new formal
"overscan insets" for each window, much like the existing
content and visible insets.  This is used to correctly
position the various UI elements in the various combination
of layout options.  In particular, this allows us to have
an activity that is using fitSystemWindows to have the content
of its UI extend out to the visible content part of the screen
while still positioning its fixed UI elements inside the
standard content rect (and the entire window extending all
the way into the overscan area to fill the screen as desired).

Okay, maybe that is not written so clearly.  Well, it made
my head hurt too, so suffer!

The key thing is that windows now need to know about three
rectangles: the overall rectangle of the window, the rectangle
inside of the overscan area, and the rectangle inside of the
content area.  The FLAG_LAYOUT_IN_OVERSCAN option controls
whether the second rectangle is pushed out to fill the entire
overscan area.

Also did some improvements to debug dumping in the window
manager.

Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
2013-02-22 19:14:37 -08:00
Craig Mautner
12e563fff9 Merge "Create rotation animation modes." 2013-02-22 18:51:21 +00:00
Craig Mautner
3c1743705c Create rotation animation modes.
Allow fullscreen windows to specify crossfade or jumpcut animations
that override the default rotation animation. Only if the incoming
and outgoing topmost windows are fullscreen and both specify the
same animation to use.

Fixes bug 8182773.

Change-Id: I6b3c0020d7bd2cdfba5c66189e114ec62cd54fcf
2013-02-22 10:44:52 -08:00
Craig Mautner
b44de0d910 Update histories simultaneously.
In moveTaskToBackLocked calls that used mHistory were being made
between the times that mTaskHistory and mHistory were modified. This
caused an inconsistent state that led to Windows arranged out of
order. Updating both history stacks at the same time fixes this.

Fixes bug 8244261.

Change-Id: I9669762ad39b06ab6d401122702b74969d4dc658
2013-02-21 20:00:58 -08:00
Craig Mautner
32b44d08e2 Add null check to setAppGroupId.
Fix bug 8217929.

Change-Id: I3bd54c32abcf6683c2fa75a85bf5025f47e09398
2013-02-21 08:26:06 -08:00
Craig Mautner
5161f20925 Fix crashing bug in validator.
Change-Id: I649bb7cfc2b42fbeda478edcaa3a56f3c23d4bc8
2013-02-20 16:54:05 -08:00
Craig Mautner
07aa25dab9 Merge "Switch topRunning* and moveTaskTo*" 2013-02-21 00:39:00 +00:00
Craig Mautner
11bf9a52eb Switch topRunning* and moveTaskTo*
- More of the Activity to Task changeover.
- Fix bug in validateAppTokens().
- Improved validation of changeover.
- Eliminated iterator classes.

Change-Id: I934a208eabfc9a2668e5a6162452e1406f2c8d3a
2013-02-20 16:29:07 -08:00
Daniel Sandler
fd171e43e4 Merge "Switch to system process before modifying rotation." 2013-02-20 21:35:53 +00:00
Daniel Sandler
3de830b82b Switch to system process before modifying rotation.
Bug: 8218133
Change-Id: Ib44d64d48dbdf3095182c409dd2211f6a3b726ad
2013-02-20 15:23:52 -05:00
Craig Mautner
5d9c7be84d Begin switch over to task based history.
- Introduce the task history and add to and remove from it with
verification.

Change-Id: If97e74f5a13f85acdb1521fc6d0b066a7e8584ae
2013-02-19 18:11:33 -08:00
Dianne Hackborn
c652de8141 Implement display overscan support.
The window manager now keeps track of the overscan of
each display, with an API to set it.  The overscan impacts
how it positions windows in the display.  There is a new set
of APIs for windows to say they would like to go into the
overscan region.  There is a call into the window manager to
set the overscan region for a display, and it now has a
concept of display settings that it stores presistently.

Also added a new "wm" command, moving the window manager
specific commands from the "am" command to there and adding
a new now to set the overscan region.

Change-Id: Id2c8092db64fd0a982274fedac7658d82f30f9ff
2013-02-19 12:08:58 -08:00
Mathias Agopian
29479ebe10 clean-up following Surface split
Change-Id: I853a76d92d957ee38a36fcdd280d6407ec316987
2013-02-15 12:47:40 -08:00
Craig Mautner
22ee9aad83 Merge "Reset and reuse Iterators and don't new() one." 2013-02-14 22:22:35 +00:00
Craig Mautner
343ad71d7c Reset and reuse Iterators and don't new() one.
Save time and memory by resuing permanent mTmpXxxIterator for
AllWindowsIterator and AppTokenIterator.

Change-Id: I2e5143364651d9471e9e70eee514d3f45d595468
2013-02-14 12:48:53 -08:00
Mathias Agopian
58a1ca6642 Merge "split Surface in two classes: SurfaceControl and Surface" 2013-02-14 20:25:08 +00:00
Mathias Agopian
3866f0d581 split Surface in two classes: SurfaceControl and Surface
SurfaceControl is the window manager side; it can
control the attributes of a surface but cannot push buffers
to it. Surface on the other hand is the application (producer)
side and is used to push buffers to the surface.

Change-Id: Ib6754c968924e87e8dd02a2073c7a447f729f4dd
2013-02-14 12:19:11 -08:00
Craig Mautner
496bdbba30 Remove AppWindowToken lists.
No longer necessary.

Change-Id: I0d2b96f69152fb93b6ba56f02ce9693ff1370cbc
2013-02-14 10:56:11 -08:00
Craig Mautner
534d136aa6 Merge "Remove unused App methods." 2013-02-14 18:13:26 +00:00
Craig Mautner
f0b36c5590 Merge "Refactor setAppOpVisibility implementation." 2013-02-14 06:22:32 +00:00
Craig Mautner
b0c0b1fd70 Remove unused App methods.
Now that the Task methods have replaced the App methods remove
the App methods.

Change-Id: I0e7432f2c6f99708759ed8c871d20eb5bd38c3c2
2013-02-13 15:24:14 -08:00
Craig Mautner
926f3839d8 Stop using AppToken movement and start using Task.
Change-Id: I5fbd3b2b692e0e127386051f782b1015515ba384
2013-02-13 11:58:56 -08:00
Craig Mautner
30e2d72810 Replace access to mAppTokens with AppTokenIterator
More switching from Activity-based to Task-based control.

Change-Id: Ida47d71a52b875a6a6bd77cb62911053f942da15
2013-02-12 16:03:29 -08:00
Craig Mautner
bea3b60ed1 Merge "Add AppWindowTokens to TaskList." 2013-02-12 23:57:09 +00:00