791 Commits

Author SHA1 Message Date
Dianne Hackborn
c9dc93e5ca Merge "Start combining threads in system process." 2013-05-03 01:48:55 +00:00
Dianne Hackborn
8d044e8bc2 Start combining threads in system process.
This introduces four generic thread that services can
use in the system process:

- Background: part of the framework for all processes, for
work that is purely background (no timing constraint).
- UI: for time-critical display of UI.
- Foreground: normal foreground work.
- IO: performing IO operations.

I went through and moved services into these threads in the
places I felt relatively comfortable about understanding what
they are doing.  There are still a bunch more we need to look
at -- lots of networking stuff left, 3 or so different native
daemon connectors which I didn't know how much would block,
audio stuff, etc.

Also updated Watchdog to be aware of and check these new
threads, with a new API for other threads to also participate
in this checking.

Change-Id: Ie2f11061cebde5f018d7383b3a910fbbd11d5e11
2013-05-02 17:42:40 -07:00
Craig Mautner
0e415c6662 A better fix for bug 8740202.
Continue to layout windows that are animating away. Otherwise they
don't track with their parent windows that may be moving at the
same time.

Change-Id: Ic5b762ee538219fd6193e27dde6c245cbaa098df
2013-04-29 16:18:29 -07:00
Craig Mautner
6601b7bdeb Exclude regions from the tap detector.
Fix typing on the keyboard causing focus to shift stacks.

Change-Id: I4ec9ccdbe35e27f4860a5bdf0e2818f58e53b873
2013-04-29 10:29:11 -07:00
Craig Mautner
eda67299cf Generic refactoring for clarity.
- Log.* was being interspersed with Slog.*.
- WindowState Rects were being converted to local variables making
it harder to find all references to them.

Change-Id: I868a32028604d46dbbc15b005a440f0571336293
2013-04-28 13:50:14 -07:00
Craig Mautner
ccb825dde6 Merge "Clean up FocusedStackFrame layer setting." 2013-04-28 16:02:47 +00:00
Craig Mautner
f76664673e Clean up FocusedStackFrame layer setting.
- Putting the stack frame above the highest app window layer ends up
putting it over the IME when the caret popup is showing. This puts
the stack frame layer above the highest non-child window layer.

- Also change the timing so the layer isn't applied until all other
layers are also being applied.

Change-Id: Ic5f142998822ac1e3890a2943cda7fc86a7e7974
2013-04-28 08:58:21 -07:00
Andreas Huber
b551c6d959 Fix wfd crash after disconnect due to null pointer exception in
WindowManagerService.java

Change-Id: I661f9c73d481da88661793ad529c0807cf74a5e7
2013-04-26 11:54:53 -07:00
Craig Mautner
eb95786fd3 Pause activities when leaving.
Missed a spot where an activity that is launching another was not
being paused. Fixes bug 8640130. At least in one case.

Release mWindowMap as soon as it is no longer needed.

Change-Id: Id2c63d3d715b98741e2ebe3c9985cb1e9ca5ffbc
2013-04-24 15:34:32 -07:00
Craig Mautner
d3c933875c Fix deadlock.
Grabbing StackTapDetector before grabbing mWindowMap doesn't play well
with grabbing mWindowMap and then StackTapDetector.

Change-Id: I40daa4c940930b1ebbb587edc1958e84321d6d7f
2013-04-24 14:31:51 -07:00
Craig Mautner
858d8a6583 Fix user switching.
- Save and restore WindowManager stack states.
- Maintain ActivityManager activity states based on the stack
the activity is in.

Fixes bug 8646641.

Change-Id: I16c76c7708ab49121c3884a7e5bf219898b92d3f
2013-04-23 19:33:42 -07:00
Craig Mautner
cf910b0c71 Add tap detector for switching stack focus.
- New InputEventReceiver for detecting taps outside of focused stack
boundaries.
- Fixed bug that wasn't pausing the non-focused window when returning
home.

Change-Id: Ia51d312a7c029abc01eb5df1102814cc29d33b47
2013-04-23 19:33:27 -07:00
Craig Mautner
7bb0ae0d45 Merge "Add null test and remove redundant call." 2013-04-18 21:31:27 +00:00
Craig Mautner
f06b8c1788 Add null test and remove redundant call.
- Did not handle the case where mTaskIdToTask returned null.
Fixes bug 8646178.
- updateInputWindowsLw() was being called in removeWindows
immediately after it was called in performLayoutAndUpdateSurfaces.

Change-Id: I1b8bcfadcc93f8c6638fd4247b426af77feeee23
2013-04-18 14:27:28 -07:00
Craig Mautner
ab0a890412 Merge "Add transparent frame around focused stack." 2013-04-18 19:57:43 +00:00
Craig Mautner
a9a3fb1da3 Add transparent frame around focused stack.
- Also fix bugs when removing stack.

Change-Id: I3e0e3029f512f086601add00ccf34b2fea84296d
2013-04-18 10:02:38 -07:00
Dianne Hackborn
a6e8ebb12f am fb4e1c21: am 25b49734: Merge "Fix issue #8540550: Screenshots should never have transparency" into jb-mr2-dev
* commit 'fb4e1c21eddf07fad7b36ac5e19dd2d479e71c5c':
  Fix issue #8540550: Screenshots should never have transparency
2013-04-17 19:07:03 -07:00
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
Craig Mautner
29219d963d Steady improvement to multi stack.
- Fix back button behavior with two stacks. Stopping activities were
held in that state indefinitely. This change causes IDLE_NOW_MSG to
be sent immediately for the last activity in a stack.

- Touch in non-focused stack was being ignored because of focus tests
in AbsListView.

- Change the focused stack when the activity focus changes. Renamed
mMainStack to mFocusedStack to reflect this.

- Resume all top stack activities when resuming.

- Assign intent task to ActivityRecord if it doesn't have a task.
Fixes bug 8433463.

Change-Id: I8d3c806234511697bc209ab99890730ffa514d20
2013-04-17 13:54:48 -07:00
Craig Mautner
bbcc289dad Merge "Incremental repairs to side by side stacks." 2013-04-17 01:58:51 +00:00
Craig Mautner
53078b25c9 Merge "Implement stack splitting and task movement." 2013-04-17 01:58:15 +00:00
Craig Mautner
4cd0c13f8f Incremental repairs to side by side stacks.
- Add taskId parameter to createStack() so stacks are pre-populated
with a task.
- Keep track of stack access order in DisplayContent so getTasks
returns in MRU order.
- Set touchableRegion in InputMonitor so modal touching does not
extend beyond stack boundary.
- Fix stack merging so that deleting a stack results in a new
stack the size of the two children.

Change-Id: I62a6ba0a34f34dd7ec866b440bf04595379e19e8
2013-04-16 18:55:07 -07:00
Dianne Hackborn
11dfb30c2f am f5cfab41: am a59a19ab: Merge "Fix issue #8512015: VideoView\'s window animates when its position changes" into jb-mr2-dev
* commit 'f5cfab41c3ea1eb0cd99f7a9387af7df2b2e5991':
  Fix issue #8512015: VideoView's window animates when its position changes
2013-04-15 21:54:39 -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
967212cb54 Implement stack splitting and task movement.
Split stacks and move tasks between them. Layout the windows
according to the new stack split.

After layout content rectangles are known split the available area
between all stack boxes. Then use those values for future layout.

Provide stack contents to ActivityManager.

Change-Id: I9746e6185445633810d506be514d0b7b540a7f99
2013-04-15 13:46:47 -07:00
Craig Mautner
de4ef020ec Implement separate stacks.
One for home activity(s), one for other activities. Coordination
between the stacks is handled by the ActivityStackSupervisor.

Change-Id: I11395edea501d2f84a18a6a8bced1ce3d0797dad
2013-04-12 15:45:47 -07:00
Craig Mautner
c1dedb6fc4 Merge "Prepare WindowManager for multiple stacks." 2013-04-12 22:41:36 +00:00
Craig Mautner
9903d8bf78 Merge "Separate stacks into Home and others." 2013-04-12 22:40:35 +00:00
Craig Mautner
7a078314b4 am 98874efb: am cc979c9e: Merge "Debug logging improvement." into jb-mr2-dev
* commit '98874efb994faca3bf253e9547cbb6227d44eb38':
  Debug logging improvement.
2013-04-10 17:00:47 -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
229f1aadf9 am abe0aa78: am 8f980e1a: Merge "Reduce duration of rotation xfade animation." into jb-mr2-dev
* commit 'abe0aa78caf81b24af0b45700801fc1f867cfa0e':
  Reduce duration of rotation xfade animation.
2013-04-10 11:01:28 -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
d5d5d0f4b8 Prepare WindowManager for multiple stacks.
Create concept of home stack. When moving a new task to the top
move the home stack back.

Change-Id: I2e352722da0c4785b19227713bc30c0850d187b1
2013-04-06 19:01:32 -07:00
Craig Mautner
9e4f28cfa1 Separate stacks into Home and others.
Change-Id: I9434ee6cd9e8a8baf24d4e4ee5a15e99cf11f227
2013-04-06 19:01:32 -07:00
Craig Mautner
e1197547a0 am d339818d: am bab9687e: Merge "Make the min layer go down through all windows" into jb-mr2-dev
* commit 'd339818d9a261974e535cd25797d7a614a17657d':
  Make the min layer go down through all windows
2013-04-05 10:33:53 -07: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
c849fbcf3d resolved conflicts for merge of 5856ee4b to master
Change-Id: I60ba85bc246b9cf25d467b2099535aad47f82ca7
2013-04-02 17:16:55 -04: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
Craig Mautner
08426453f3 am 79b468dc: Merge "Fix potential deadlock between LockScreen and WindowManagerService" into jb-mr2-dev-plus-aosp
* commit '79b468dcaab89f52394132d5ee733c6a01bad7e9':
  Fix potential deadlock between LockScreen and WindowManagerService
2013-04-02 11:04:37 -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
5ab6d90578 am a4820789: am 5871b258: Merge "Change wm commands to return size and density info." into jb-mr2-dev
* commit 'a4820789136c814e1e9ae26d5a0712e1c7fd4dd5':
  Change wm commands to return size and density info.
2013-03-26 17:28:16 -07:00