15380 Commits

Author SHA1 Message Date
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
5d734dbc56 am e1d18f6e: am 0e3df216: am cc81bcec: Merge "Only send storage intents after boot complete"
* commit 'e1d18f6eb0e46b7a71ce7cf9ddb1c60dd7ad054f':
  Only send storage intents after boot complete
2014-01-22 23:57:47 +00:00
Christopher Tate
e1d18f6eb0 am 0e3df216: am cc81bcec: Merge "Only send storage intents after boot complete"
* commit '0e3df21642122ae8a43be1a35723782bdd417b7a':
  Only send storage intents after boot complete
2014-01-22 15:53:58 -08:00
Christopher Tate
cc81bcece4 Merge "Only send storage intents after boot complete" 2014-01-22 23:46:58 +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
Christopher Tate
b450505c2e am a7a9327b: am 5474f085: am 9fc157a4: Merge "FLAG_PRIVILEGED disappears if privileged app is updated and rebooted"
* commit 'a7a9327be8b2b2ee2a461d1a0558c0c7b5b9271c':
  FLAG_PRIVILEGED disappears if privileged app is updated and rebooted
2014-01-22 01:51:34 +00:00
Christopher Tate
a7a9327be8 am 5474f085: am 9fc157a4: Merge "FLAG_PRIVILEGED disappears if privileged app is updated and rebooted"
* commit '5474f085b05b527f7e1dc7c6f536736c2f043fb0':
  FLAG_PRIVILEGED disappears if privileged app is updated and rebooted
2014-01-21 17:48:35 -08:00
Naofumi Harada
719b3b8075 FLAG_PRIVILEGED disappears if privileged app is updated and rebooted
Since Kitkat, an app pre-loaded under /system/priv-app/ has
FLAG_PRIVILEGED. However, if the app updated and the device
rebooted, privileged flag is unset from pkgFlags. This patch
fix issue to assign privileged flag when scanning the updated
packages.

Bug: 12640283

Change-Id: Ic24b5882f65dabdfae9cc39da3d68661bed4fc31
2014-01-21 07:41:11 +00:00
Johan Redestig
0464c07a9e Only send storage intents after boot complete
It is not possible to send a broadcast before the system
boot is completed. If you do it anyway you will get an
IllegalStateException: Cannot broadcast before boot completed.

If a memory card is inserted or removed while the phone is
booting up, there is a risk that the MountService will try to
broadcast a storage intent too early, and cause the device
to crash.

Use FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT to avoid
problems with too early broadcasts.

Change-Id: Ied36a13d235df37c9788e45a35de40d919ae0cd0
2014-01-18 22:46:56 +01: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
Dianne Hackborn
305c61a1c6 am 3a8a8ddd: am 8c359bf4: am c174288d: Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
* commit '3a8a8ddd7cff03e39d4cb104ddb1d0401b6c7ede':
  Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
2014-01-14 01:47:15 +00:00
Dianne Hackborn
3a8a8ddd7c am 8c359bf4: am c174288d: Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
* commit '8c359bf473b4c31407613dbc1473ba49b0297898':
  Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
2014-01-13 17:45:16 -08:00
Dianne Hackborn
c174288d34 Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
Got a little too aggressive about cleaning up service state; need to
avoid removing services from an app until we are in the second loop
doing the final cleanup, otherwise we can leave services around with
restarting their process.

Also fix crash:

W/BinderNative(  667): Uncaught exception from death notification
W/BinderNative(  667): java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
W/BinderNative(  667): 	at android.util.ArraySet.valueAt(ArraySet.java:301)
W/BinderNative(  667): 	at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:2069)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:12412)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3596)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3744)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:1024)
W/BinderNative(  667): 	at android.os.BinderProxy.sendDeathNotice(Binder.java:493)
W/BinderNative(  667): 	at dalvik.system.NativeStart.run(Native Method)
2014-01-13 17:10:03 -08: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
Daniel Cashman
21a801d088 am 0d30e07d: am 3d5ea26f: am 4503409a: Merge "Clear cached locations when location providers disabled Bug: 12118307" into klp-dev
* commit '0d30e07d23e9a2bcea4c1b3e61e12e68f5111fe2':
  Clear cached locations when location providers disabled Bug: 12118307
2014-01-13 18:57:19 +00:00
Daniel Cashman
0d30e07d23 am 3d5ea26f: am 4503409a: Merge "Clear cached locations when location providers disabled Bug: 12118307" into klp-dev
* commit '3d5ea26fbb92b1b780cd9763c0731288f48341a3':
  Clear cached locations when location providers disabled Bug: 12118307
2014-01-13 10:52:54 -08: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
Jeff Sharkey
6fba240b72 am 6d3700b3: am 47235e8b: am 90cadb35: Merge "MountService listeners can not be unregistered"
* commit '6d3700b394c7137ef95580d35223a402a3dd0e7c':
  MountService listeners can not be unregistered
2014-01-13 18:44:43 +00:00
Jeff Sharkey
6d3700b394 am 47235e8b: am 90cadb35: Merge "MountService listeners can not be unregistered"
* commit '47235e8b5ce6c622a1182933404cf5a17fcd35dc':
  MountService listeners can not be unregistered
2014-01-13 10:42:07 -08:00
Jeff Sharkey
90cadb3515 Merge "MountService listeners can not be unregistered" 2014-01-13 18:35:32 +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
5d8936b4cf am 27581792: am 54f99137: am 3747768b: Merge "Fix visibility of multiple non-fullscreen activities."
* commit '275817929a584b220a54b5c8206c7a7425da16d4':
  Fix visibility of multiple non-fullscreen activities.
2014-01-11 00:05:55 +00:00
Craig Mautner
275817929a am 54f99137: am 3747768b: Merge "Fix visibility of multiple non-fullscreen activities."
* commit '54f991375a9c7c2a256e6aec7d4a223be8d36b39':
  Fix visibility of multiple non-fullscreen activities.
2014-01-10 16:03:06 -08: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
0bb2a4deee Merge "Call moveHomeStack before moving any stack." into klp-modular-dev 2014-01-10 16:43:19 +00: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
Amith Yamasani
22eba28e90 Only compile the services jar and so when using mmm
Don't build the tests when using "mmm frameworks/base/services"

Change-Id: If1895598381bd0fce0b4d7f5e879f154d8fc44d0
2014-01-09 15:38:12 -08:00
Ying Wang
ba09ada20e Include subdirectory Android.mks.
Change-Id: I6e6bc721dbcf127b52f2a60f255c9fc677d3be29
(cherry picked from commit c459bfea7e7be4343387dee137d4a5be9742fd91)
2014-01-09 20:41:57 +00:00
riddle_hsu
446ef1de8d Fix visibility of multiple non-fullscreen activities.
Issue detail:
Assume X, Y are non-fullscreen activities.
 a.Home starts an activity X in task A in application stack.
 b.X starts an activity Y in <task A> or <new task B>
 c.Activity X will be invisible.

How to fix:
Because the function "isActivityOverHome" means an activity is able to see home.
But there may have many non-fullscreen activities between the top non-fullscreen activity and home.
If flag "behindFullscreen" is set, those middle activities will be invisible.
So it should only take care from who is adjacent to home.
Then check two flags frontOfTask(task root) and mOnTopOfHome for constraining the condition.

Change-Id: I60bcea304976414e44835a0a38675aae365e9e19
2014-01-09 20:24:34 +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
Mike Lockwood
d9e708e365 am 12ec2e6d: am 99206593: am 9607d78f: Merge "Added missing USB device descriptor fields needed for intent filters"
* commit '12ec2e6d71bc69ca11946f7f051931863c934273':
  Added missing USB device descriptor fields needed for intent filters
2014-01-08 16:05:29 +00:00
Mike Lockwood
12ec2e6d71 am 99206593: am 9607d78f: Merge "Added missing USB device descriptor fields needed for intent filters"
* commit '992065938a95e5273b22dea009b8581bcc693e61':
  Added missing USB device descriptor fields needed for intent filters
2014-01-08 08:01:42 -08:00
Mike Lockwood
9607d78f51 Merge "Added missing USB device descriptor fields needed for intent filters" 2014-01-08 15:56:13 +00:00