58 Commits

Author SHA1 Message Date
Jeff Brown
be83e4a08e am 38f96e50: Add support for injecting events into ActivityContainers. (DO NOT MERGE)
* commit '38f96e5020b3e82b98fe97b0be363a5ad185860f':
  Add support for injecting events into ActivityContainers. (DO NOT MERGE)
2014-02-12 00:37:24 +00:00
Jeff Brown
38f96e5020 Add support for injecting events into ActivityContainers. (DO NOT MERGE)
Modified ActivityView to inject touch events it receives back into
its activity container.  The container then injects the event into
the input system along with the display id of the underlying virtual
display.

Enhanced the input system to support concurrent dispatch of touch
events on multiple displays which is required for this to work.

Change-Id: I9cf1870db3be6f99a52ed9a1e3ceafe42c940093
2014-02-11 14:43:04 -08:00
Narayan Kamath
a9d171bd5b am 5c770dfb: am b823bd45: Merge "Use long to store pointers in ConsumerIrService"
* commit '5c770dfba2846ee173d147fd974f8e9f073c1534':
  Use long to store pointers in ConsumerIrService
2014-02-11 16:34:08 +00:00
Jeff Brown
25df673b84 am 1b51c9cb: Merge "Make SystemService constructor take a Context." into klp-modular-dev
* commit '1b51c9cb96fe2a0818289857a016521eed1ec183':
  Make SystemService constructor take a Context.
2014-02-11 08:18:34 +00:00
Jeff Brown
1b51c9cb96 Merge "Make SystemService constructor take a Context." into klp-modular-dev 2014-02-11 04:12:02 +00:00
Jeff Brown
b880d880c6 Make SystemService constructor take a Context.
This change simplifies the process of initializing a SystemService
by folding the onCreate() step back into the constructor.  It removes
some ambuiguity about what work should happen in the constructor and
should make it possible for services to retain most of their final
fields after refactoring into the new pattern.

Change-Id: I25f41af0321bc01898658ab44b369f9c5d16800b
2014-02-10 20:01:43 -08:00
Craig Mautner
2d6b55aaa9 am 312ba86b: Change task removal sequence
* commit '312ba86b476fa1d83864a7d465135cc9a4e94ad8':
  Change task removal sequence
2014-02-11 02:20:15 +00:00
Craig Mautner
312ba86b47 Change task removal sequence
- Remove task after removing activity. Removing the task before
removing the activity led to problems when the task was still needed.

- In WindowManager wait for activity manager to remove the task.
Previously was automatically removing the task when the last activity
was removed.

Fixes bug 12957434.

Change-Id: I7f6b1f09a2e2a845f177f337769075c9376f8bdb
2014-02-10 17:55:01 -08:00
Craig Mautner
779d204abe am 9ef471f7: Don\'t remove Activities and Tasks until animation done
* commit '9ef471f7f2f59de032d7cb9c3c7241486109979e':
  Don't remove Activities and Tasks until animation done
2014-02-07 23:37:53 +00:00
Christopher Tate
88daefd407 am 379bb6ed: am ff27e6bc: Merge "Use canonical path for /vendor/app"
* commit '379bb6ed4ea4de035569b04018f84d7ce95a8036':
  Use canonical path for /vendor/app
2014-02-07 23:37:03 +00:00
Craig Mautner
9ef471f7f2 Don't remove Activities and Tasks until animation done
Just like stacks and displays, activities and tasks need to stick
around until animations have completed.

Change-Id: I54fe8f6855d60cbc3a25cbc6e762defd5ac50bf5
2014-02-07 13:11:47 -08:00
Dan Sandler
9e07c1c4f3 am 6b1f3acd: am 6ea720ba: Merge "Make sure to turn off led after pulse()"
* commit '6b1f3acdf0f0806c0b3826d1c4ea43bd6cc6f021':
  Make sure to turn off led after pulse()
2014-02-07 16:05:31 +00:00
Craig Mautner
38f7dcd7dc DO NOT MERGE. Test for Configuration differences before changing.
Changing Configuration first and then testing for changes yields a
result indicating no change.

Fixes bug 12904769.

Change-Id: If7e39e843f15b1143d9877497d595511afabd020
2014-02-06 12:27:20 -08:00
Adam Lesinski
7f41663141 Merge "Check feature bits before loading optional services" into klp-modular-dev 2014-02-06 20:13:21 +00:00
Craig Mautner
1bf2b87347 Defer detach until animations are complete.
Allowing the detach of ActivityStack from DisplayContent to happen
immediately was causing all sorts of problems associated with not
having a Display to complete the animations.

Waiting for animations to complete before either the detach or the
display removal fixes those problems.

Change-Id: I8a5663bfac5c3c1084ff4fcc451e0e38e8080265
2014-02-05 15:37:40 -08:00
Craig Mautner
dc548483ae Move activities from DisplayContent to TaskStack
Now that activities and tasks can be detached from a display do not
keep their state within the DisplayContent class. All such state is
now moved to the TaskStack class with this change.

Change-Id: Ie6b1811e9ec3f545782bad8c3461bd4f2d336b93
2014-02-05 13:35:24 -08:00
Adam Lesinski
898c13df7b Check feature bits before loading optional services
At startup, we check with PackageManager whether a system service is
available before attempting to load it. A system service is available
if its associated feature (similar to hardware features) is present.
This does not remove unavailable services from the compiled jar.

Change-Id: I13571805083aa4e65519a74acb52efd17b9fb3d7
2014-02-05 19:26:40 +00:00
Craig Mautner
df88d73092 Add IIntentSender to ActivityContainer.startActivity
PendingIntents and IntentSenders can now be launched. Still does not
work once the host activity has been paused and resumed.

Window manager TaskStacks now exist independently of Displays and app
windows persist after Displays are removed below them. Attaching the
stack to a new Display does not yet restore the windows to it.

Fixes bug 12747909.

Change-Id: I509007ee23fda400b353f483cf6ecce08177763b
2014-02-04 15:10:13 -08:00
Hui Lu
3cab7fc1b8 Merge "Add proxy as another network." into klp-modular-dev 2014-01-30 22:58:48 +00:00
Hui Lu
1c5624a012 Add proxy as another network.
Change-Id: I70cb6ac5604c4f0d6a752a291c40de2445ae98bb
2014-01-30 17:26:18 -05:00
Narayan Kamath
583b7b1671 am 39a789bf: am 7ae1726d: am aa9ba887: am 6e09eb4c: Merge "AArch64: Make graphics classes 64-bit compatible"
* commit '39a789bf6efd5c3478a442e60e896cae371fd04c':
  AArch64: Make graphics classes 64-bit compatible
2014-01-28 19:26:29 +00:00
Craig Mautner
af17925f94 am 45b68ac3: am 09325627: am 245b58d6: am baf2c7a4: Merge "[ActivityManager]: Fix the activity visibility state not sync between ActivityManager and WindowManager"
* commit '45b68ac3a7acb7af95fdfc5c0e31560b3c28c9f8':
  [ActivityManager]: Fix the activity visibility state not sync between ActivityManager and WindowManager
2014-01-28 18:17:31 +00:00
Craig Mautner
38eda9c42b Remove unnecessary logging.
Fixes bug 12593710.

Change-Id: I55c33bb4d6c9e17e810be7cc033e01fb9d2d6cf7
2014-01-24 17:26:52 -08:00
Christopher Tate
222496f82f am 5d734dbc: am e1d18f6e: am 0e3df216: am cc81bcec: Merge "Only send storage intents after boot complete"
* commit '5d734dbc56cd2d4350f4a35f1bedbb6b40247e5c':
  Only send storage intents after boot complete
2014-01-23 00:01:01 +00:00
Christopher Tate
46c95dfc10 am b450505c: am a7a9327b: am 5474f085: am 9fc157a4: Merge "FLAG_PRIVILEGED disappears if privileged app is updated and rebooted"
* commit 'b450505c2e0d0dfd67bc228961a00a6eaaf092df':
  FLAG_PRIVILEGED disappears if privileged app is updated and rebooted
2014-01-22 01:55:07 +00:00
Jeff Brown
4ccb823a9f Refactor display manager service to new pattern.
Transform DisplayManagerService into a SystemService and start cleaning
up other local services that it uses from window manager and input manager.

Clean up service thread initialization.

Remove unnecessary static variables from ActivityManagerService.

It's starting to become clear that we really need a better way to manage
service dependencies.  Boot phases don't quite cut it.

Change-Id: If319dbd7cbfbd4812fe55ece969e818d4b20755b
2014-01-16 22:16:42 -08:00
Jeff Brown
6f357d3284 Start untangling system server early bootstrapping.
Refactored SystemServer to get rid of a bunch of legacy cruft related
to how the ServerThread used to be started up.

Create system context first when system server starts.  This removes
the tangled initialization order dependency that forced us to start
the activity manager service before most anything else.

Moved factory test related constants into the FactoryTest class.

Partially migrated Installer, ActivityManagerService, and
PowerManagerService to the new SystemService pattern.  There's more
work to be done here, particularly around the lifecycle of the
power manager.

Bug: 12172368
Change-Id: Ia527dd56e3b3fd90f9eeb41289dbe044921230d4
2014-01-16 11:24:58 -08:00
Jeff Brown
02cc684e42 Delete unused power manager functionality.
timeSinceScreenWasLastOn() was used by Watchdog previously but is no
longer so we can remove it.

Change-Id: I91c324b6c98c1aeb85f64b0296a41240e6c2ef4f
2014-01-16 11:24:58 -08:00
Craig Mautner
593a4e6f98 Fix NPE when destroyActivity occurs after detach.
*** FATAL EXCEPTION IN SYSTEM PROCESS: ActivityManager
 java.lang.NullPointerException
 	at com.android.server.am.ActivityStack.removeTask(ActivityStack.java:3627)
 	at com.android.server.am.ActivityStack.removeActivityFromHistoryLocked(ActivityStack.java:2693)
 	at com.android.server.am.ActivityStack.activityDestroyedLocked(ActivityStack.java:2878)
 	at com.android.server.am.ActivityStack$ActivityStackHandler.handleMessage(ActivityStack.java:296)
 	at android.os.Handler.dispatchMessage(Handler.java:102)
 	at android.os.Looper.loop(Looper.java:136)
 	at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1868)

Change-Id: Ifaf0fe6c62d1f63897d57dc96b4d86d8111b45db
2014-01-15 17:59:22 -08:00
Craig Mautner
34b73dfaa3 Cleanup after ActivityView
- Release Surface and VirtualDisplay when shutting down ActivityView.
- Shut down child stacks when relaunching parent activity.

Change-Id: I60314b2b43bd2da5406cf6ec871293b5baca157c
2014-01-15 17:47:51 -08:00
Craig Mautner
9cfb2e5f4c Merge "Retain stacks even if they are empty." into klp-modular-dev 2014-01-15 01:07:15 +00:00
Dianne Hackborn
6873e17d4b am 305c61a1: am 3a8a8ddd: am 8c359bf4: am c174288d: Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
* commit '305c61a1c6816549b225719518df5b29a17f0f42':
  Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
2014-01-14 01:53:07 +00:00
Craig Mautner
5c44c51c2a Merge "Use new DisplayManager flag to show own content only." into klp-modular-dev 2014-01-14 00:00:00 +00:00
Craig Mautner
529cbcd0af Use new DisplayManager flag to show own content only.
Change-Id: I8b2666e5849e57b5eb2ed73ed3d5e39da2dbd55d
2014-01-13 12:55:33 -08:00
Craig Mautner
04a0ea60ac Retain stacks even if they are empty.
Previously stacks would be removed when the last ActivityRecord was
removed. This causes problems for ActivityContainers which persist and
permit activities to be launched into an empty stack.

Change-Id: Ia79ac65d17c42eff3a7b1321980c21b29996001b
2014-01-13 12:51:26 -08:00
Daniel Cashman
94827c3484 am 21a801d0: am 0d30e07d: am 3d5ea26f: am 4503409a: Merge "Clear cached locations when location providers disabled Bug: 12118307" into klp-dev
* commit '21a801d0885d65f128b84a593140b07fd0d4e980':
  Clear cached locations when location providers disabled Bug: 12118307
2014-01-13 19:00:37 +00:00
Jeff Sharkey
38c65b1f70 am 6fba240b: am 6d3700b3: am 47235e8b: am 90cadb35: Merge "MountService listeners can not be unregistered"
* commit '6fba240b72e9ae2bc66c98b058e78aecd568ae3f':
  MountService listeners can not be unregistered
2014-01-13 18:47:41 +00:00
Craig Mautner
cf6e0d686f Merge "Add display synchronously." into klp-modular-dev 2014-01-13 05:33:51 +00:00
Craig Mautner
ad25fa36cb Add display synchronously.
Adding the virtual display to window manager through a handler message
causes timing issues. Add the display directly to fix it.

Change-Id: I3ad6b16ce6dff2a48abd120a8e873e11a028e2c3
2014-01-12 21:26:09 -08:00
Craig Mautner
da9b87a709 am 5d8936b4: am 27581792: am 54f99137: am 3747768b: Merge "Fix visibility of multiple non-fullscreen activities."
* commit '5d8936b4cfdb14941536e533c2cc376e99b9f7d5':
  Fix visibility of multiple non-fullscreen activities.
2014-01-11 00:09:22 +00:00
Craig Mautner
d7c97a798f Merge "Remove misleading warnings." into klp-modular-dev 2014-01-10 23:06:50 +00:00
Craig Mautner
330a6bd8a6 Remove misleading warnings.
Error messages that are obsolete and/or incorrect.

Fixes bug 12421138.

Change-Id: I43f095048757f7ae9bff47abed594dd34d8387ce
2014-01-10 15:05:29 -08:00
Craig Mautner
93884a5b35 Fix invalid stackId bug.
Eliminate race condition by executing window manager createStack
directly from activity manager.

Change-Id: I2dda276d07d0ae09c7c958980bc5ebffe72ebd92
2014-01-10 13:28:10 -08:00
Craig Mautner
4504de5d5a Implement ActivityView.
With an existing ActivityContainer a caller can now create an
ActivityView which consists of a new VirtualDisplay immediately
attached to the ActivityContainer.

Change-Id: Id70333dcbef55d524a87df8f8c92d72ca5579364
2014-01-10 10:54:55 -08:00
Craig Mautner
fefeef8249 Call moveHomeStack before moving any stack.
Order matters, otherwise mFocusedStack and mLastStack aren't updated
correctly.

Fixes bug 12478856.

Change-Id: I12e4334678bb3af49d1ff26c4003def3e8d987c2
2014-01-10 08:40:23 -08:00
Jeff Brown
b6d9eb875a Merge "Add flag to force public virtual display to show own content." into klp-modular-dev 2014-01-09 02:12:59 +00:00
Craig Mautner
88bfc6ddc8 Merge "Extend stack management to other displays." into klp-modular-dev 2014-01-08 17:33:42 +00:00
Mike Lockwood
43bc1c07d2 am d9e708e3: am 12ec2e6d: am 99206593: am 9607d78f: Merge "Added missing USB device descriptor fields needed for intent filters"
* commit 'd9e708e365d94e83ec135f1486129febd3f8eaea':
  Added missing USB device descriptor fields needed for intent filters
2014-01-08 16:08:17 +00:00
Narayan Kamath
e853de1f10 am 2d87407e: am 136c0219: am c156021d: am 8a927cfa: Merge "Fix a bug introduced in change 73712"
* commit '2d87407e5765228a3469b9681ebff6c0c7eee140':
  Fix a bug introduced in change 73712
2014-01-08 13:06:55 +00:00
Narayan Kamath
3f7b8d0c6c resolved conflicts for merge of 92ae0347 to klp-modular-dev
Change-Id: I703aea4f20985a4bbda0f685254721d6480bb20f
2014-01-08 12:19:40 +00:00