534 Commits

Author SHA1 Message Date
Dianne Hackborn
a924dc0db9 Start window manager refactoring.
Move all of the pieces into a new com.android.server.wm package.

Change-Id: I942b7bcfb84ee0f843f47d58e55ffc5a93c0da94
2011-02-17 14:22:17 -08:00
Dianne Hackborn
d94df45b3d Rework thumbnail API to not suffer from IPC failures.
Thumbnails are now requested separately, so we don't exceed the
IPC buffer size limit.

Also implement issue #3349553: Please provide a hook to intercept
fragment-breadcrumb clicks

And maybe fix issue #3439199: Music Notification does not turn on
when app switching out of Music app

Change-Id: Ie939e78cc8ded07b18112760e053185947549f61
2011-02-16 18:53:31 -08:00
Dianne Hackborn
75afc6bfe2 am f1a9ab26: am d23316bc: Merge "Maybe fix issue #3358322: Status and nav bar died while watching youtube" into honeycomb
* commit 'f1a9ab2673a2b5e6f684f7ceced177e3fc749ee7':
  Maybe fix issue #3358322: Status and nav bar died while watching youtube
2011-01-27 22:53:13 -08:00
Dianne Hackborn
f1a9ab2673 am d23316bc: Merge "Maybe fix issue #3358322: Status and nav bar died while watching youtube" into honeycomb
* commit 'd23316bc8b49f269e5adcc91eae5698549faa0a3':
  Maybe fix issue #3358322: Status and nav bar died while watching youtube
2011-01-27 22:50:52 -08:00
Dianne Hackborn
83a6f450bd Maybe fix issue #3358322: Status and nav bar died while watching youtube
Or at least make it better.  Now if we get a failure locking the surface,
we mark to do a full relayout pass later to try to get a new good surface.

Also fix some bugs in how activity manager was classifying processes for
their OOM adjustment to make better choices in what to kill.

Change-Id: I8e4aa86744211ba7693f9828291d8bbf2698274f
2011-01-27 17:17:19 -08:00
Dianne Hackborn
831a010aec am 5640392f: am 2d63144e: Merge "Fix issue #3380072: Switching in and out of gmail not preserving position in label" into honeycomb
* commit '5640392f584c64f048180ac75218b5c7f9281b76':
  Fix issue #3380072: Switching in and out of gmail not preserving position in label
2011-01-26 19:07:46 -08:00
Dianne Hackborn
5640392f58 am 2d63144e: Merge "Fix issue #3380072: Switching in and out of gmail not preserving position in label" into honeycomb
* commit '2d63144ed94dff0832d051ec355f56649244dd4e':
  Fix issue #3380072: Switching in and out of gmail not preserving position in label
2011-01-26 16:28:38 -08:00
Dianne Hackborn
57f1ac4133 Fix issue #3380072: Switching in and out of gmail not preserving position in label
We were doubly-decreasing the task's activity count, so when selected
from recent tasks it would re-launch the last Intent rather than
switching to its current state.

Change-Id: I6e58c930a0755ae0142604d42b5cd2c668a2b492
2011-01-26 13:28:16 -08:00
Dianne Hackborn
8e11b4f4eb am 81ac92df: am 6d92cde2: am 35f4d32d: Merge "frameworks/base: Track owner in appropriate owners list of Uri"
* commit '81ac92df33ba146a51fbbf3d5108379a9eb346b1':
  frameworks/base: Track owner in appropriate owners list of Uri
2011-01-24 14:37:21 -08:00
Dianne Hackborn
81ac92df33 am 6d92cde2: am 35f4d32d: Merge "frameworks/base: Track owner in appropriate owners list of Uri"
* commit '6d92cde287b6399d5c90f3eaccb73602d6d51313':
  frameworks/base: Track owner in appropriate owners list of Uri
2011-01-24 14:34:46 -08:00
Dianne Hackborn
ccb9a0a9f0 am 11a5d424: am b149f5c8: Merge "Fix issue #3302006: Cannot see the dialog lunched from a transparent activity." into honeycomb
* commit '11a5d42454fad1f61eb4874855113c5416396888':
  Fix issue #3302006: Cannot see the dialog lunched from a transparent activity.
2011-01-23 12:05:43 -08:00
Dianne Hackborn
ff801ec713 Fix issue #3302006: Cannot see the dialog lunched from a transparent activity.
The activity manager was not performing the layout pass on the new window,
because its app token was still hidden, because the activity manager / window
manager were still waiting for it to be ready to show.

Just ignore whether the app token is hidden for this case.

Also fixes some problems with animations, and tweaks the ViewConfiguration
values for xlarge screens.

Change-Id: Icbe9c77ba8127d1e02df2d6f27b8e86ec842e50a
2011-01-22 18:13:13 -08:00
Dianne Hackborn
e3e6a157df am 8a0f1756: am 5503d803: Merge "Fix issue #3377999: Activities need to be stopped when sleeping" into honeycomb
* commit '8a0f17560080077b972c97bf9d5b68961f148fe3':
  Fix issue #3377999: Activities need to be stopped when sleeping
2011-01-22 11:54:31 -08:00
Dianne Hackborn
6d92cde287 am 35f4d32d: Merge "frameworks/base: Track owner in appropriate owners list of Uri"
* commit '35f4d32dc2f0c383323e780ecc7e2764704c5d2c':
  frameworks/base: Track owner in appropriate owners list of Uri
2011-01-22 11:50:41 -08:00
Vairavan Srinivasan
91c12c27ef frameworks/base: Track owner in appropriate owners list of Uri
The owner isn't kept track it URI's writeOwners when
grantUriPermissionUncheckedLocked is invoked to provide both
read and write access to the URI. Fix is to check for both
read and write permissions and add owner to appropriate lists.

Change-Id: Id23688b96aefeb0a4911ee52ad47124bc5904fa0
2011-01-21 18:26:06 -08:00
Dianne Hackborn
4eba96bb31 Fix issue #3377999: Activities need to be stopped when sleeping
This is a band-aid over the existing kludgy stopping mechanism
where the semantics of stop are different in the activity manager
than in the clients.

This change is intended to be as unobtrusive as possible, only
impacting the sleep case.  I have a different change that
completely reworks how we stop activities to simply this all
a lot by unifying the semantics between the server and client.
However, it is too late in HC for such an extensive change.  Later
I'll revert this one and put in the better solution.

Change-Id: Id77f2db1ec83469cdd888acb8fbc4679daa7766e
2011-01-21 13:42:26 -08:00
Brad Fitzpatrick
28d5206519 am bd80a12c: resolved conflicts for merge of 9240f16d to honeycomb-plus-aosp
* commit 'bd80a12cba480a0dbb2e9073f35c758d8b396b94':
  StrictMode: class instance limits (track object "leaks")
2011-01-19 15:24:02 -08:00
Brad Fitzpatrick
bfbe577110 StrictMode: class instance limits (track object "leaks")
Change-Id: I2db5a19060c2013078feb88a91caf655469b2f98
2011-01-19 14:52:08 -08:00
Dianne Hackborn
375d008522 am a4605b72: am e6413270: Merge "Just a little \'ol activity manager permission change." into honeycomb
* commit 'a4605b72c278be829b28bfa218cdba461c1667a7':
  Just a little 'ol activity manager permission change.
2011-01-18 22:00:28 -08:00
Dianne Hackborn
6c2c5fc993 Just a little 'ol activity manager permission change.
We no longer enforce permissions for applications that are accessing
their own components.  This allows an application to require a permission
on one of its components that it does not itself have.  This is useful
for example with the new advanced widgets, which require a system-only
permission on the implementing service to ensure the app's data stays
private but it is nice to allow the application to still touch its own
widget service.

Change-Id: I5d61930a083816919545870039ad191314ed48c6
2011-01-18 17:02:33 -08:00
Jeff Brown
db10a638fd am 12116af5: am c8276990: Merge "Add volume down as a safe mode key for Stingray." into honeycomb
* commit '12116af5c422608d609ec884939ee8ceba3279b9':
  Add volume down as a safe mode key for Stingray.
2011-01-16 10:40:20 -08:00
Jeff Brown
c8276990df Merge "Add volume down as a safe mode key for Stingray." into honeycomb 2011-01-14 17:22:53 -08:00
Jeff Brown
b09abc1dd2 Add volume down as a safe mode key for Stingray.
Fixed a race condition during startup.  We need to wait for the input
devices to actually be ready before trying to detect safe mode.

Fixed a problem during safe mode activation where we would try to add
the overlay window but the display was not initialized.  Now we do it
after the system is ready.

Bug: 3134825
Change-Id: I4c043c142ae6bf0d865c79d266d36154eaf00709
2011-01-13 21:18:16 -08:00
Dianne Hackborn
6260570382 am 002fa80d: am 84543705: Merge "Fix issue #3330037: Unnecessary orientations appear..." into honeycomb
* commit '002fa80d1ab0a85c40d0e1a9b1abaff282c028a1':
  Fix issue #3330037: Unnecessary orientations appear...
2011-01-13 21:17:50 -08:00
Dianne Hackborn
94cb2ebfc3 Fix issue #3330037: Unnecessary orientations appear...
...when the device's physical orientation is portrait.

We now hold off on computing app token orientation while preparing
to open or close app tokens.

Also clean up a few other little issues.

Change-Id: Iae125a975c7706fb4d068c872fd172e69854ff15
2011-01-13 21:11:09 -08:00
Dianne Hackborn
a9d8a69a04 am 9aac2e2b: Merge "Referencing of "r.record.name" is occured, when "r.record" is null." into gingerbread
* commit '9aac2e2b9541c424ca02483631b08949f0e90c8c':
  Referencing of "r.record.name" is occured, when "r.record" is null.
2011-01-09 13:56:07 -08:00
lge-aosp
ea278a945a DO NOT MERGE Referencing of "r.record.name" is occured, when "r.record" is null.
Change-Id: I0338c85b562a224d2c478112937fd62d2208e7aa
2011-01-09 13:54:53 -08:00
lge-aosp
c712204d91 Referencing of "r.record.name" is occured, when "r.record" is null.
Change-Id: I625e45923a7fd9f4ac8eb434ed07d452f8e1e0b6
2011-01-09 12:38:34 -08:00
Dianne Hackborn
247fe74c93 Implement issue # 3255887 could CursorLoader offer...
...to throttle contentobserver-based requeries

Why yes, I guess it could.

This also reworks AsyncTaskLoader to not generate multiple
concurrent tasks if it is getting change notifications before
the last background task is complete.

And removes some of the old APIs that had been deprecated but
need to be gone for final release.

And fixes a few little problems with applying the wrong theme
in system code.

Change-Id: Ic7a665b666d0fb9d348e5f23595532191065884f
2011-01-08 18:25:30 -08:00
Adam Powell
947f782411 Fix bug 3245465 - Themed dialog icons
Added light/dark versions of holo dialog icons. Apps using
AlertDialogs that wish to use the system dialog icon should use
setIconAttribute(android.R.attr.alertDialogIcon) instead of
setIcon(android.R.drawable.ic_alert_dialog).

Change-Id: I40793a3164478be5ffa045ededfcab8210753a4b
2011-01-08 13:09:51 -08:00
Mattias Petersson
5f619b7d95 Avoiding cyclic references when unbinding from a service
Cyclic references can occur between a Service object held by an
application and a ServiceRecord object held by the system server.
A part of the problem is that binders are leaked and since many binders
are implemented by inner classes of services these services are also leaked.
This causes low memory problems. The solution is: When a Service is beeing
destroyed, go through the ServiceRecord's all IntentBindRecord and set its
binder references to null. This allows the binder and the service object to
be garbage collected.

Change-Id: I5a257521964851f34c08ffb3908feaad96b1bafe
2011-01-07 07:56:46 +01:00
Johannes Carlsson
d3f36dfdea am 73fef3c7: am b5a8654d: Clear reference to the IIntentReceiver in order to avoid memory leak
* commit '73fef3c7c0986468d75e3ef09d2255c3509a80c9':
  Clear reference to the IIntentReceiver in order to avoid memory leak
2011-01-05 22:48:05 -08:00
Dianne Hackborn
d541f0cbdc am 4302886f: am c91f9fe5: Merge "Avoiding cyclic references when unbinding from a service" into gingerbread
* commit '4302886f8f77c3f53cdc094069f3550dd56bc812':
  Avoiding cyclic references when unbinding from a service
2011-01-05 22:48:00 -08:00
Johannes Carlsson
73fef3c7c0 am b5a8654d: Clear reference to the IIntentReceiver in order to avoid memory leak
* commit 'b5a8654dea9ea8443b41f8ff3668ae4074e13a07':
  Clear reference to the IIntentReceiver in order to avoid memory leak
2011-01-05 19:13:29 -08:00
Johannes Carlsson
b5a8654dea Clear reference to the IIntentReceiver in order to avoid memory leak
When using sendOrderedBroadcast(..) with a BroadcastReceiver the
BroadcastReceiver instance was not released. The reason for this was that
the resultTo field in the BroadcastRecord kept a reference until it was pushed
out of the mBroadcastHistory. This reference in turn kept a reference to the
process side IIntentReceiver (implemented in ReceiverDispatcher$InnerReceiver).
This in turn had a strong reference (through mStrongRef) to the Context.

In order to keep the debug output the resultTo is also kept as a String in the
new resultToString variable.

Change-Id: I4382a22a541c27b3694fb2b78a04ee820b235f8f
2011-01-05 18:59:07 -08:00
Dianne Hackborn
4302886f8f am c91f9fe5: Merge "Avoiding cyclic references when unbinding from a service" into gingerbread
* commit 'c91f9fe542fd1ca9d6da432faeba60d35c4d5c49':
  Avoiding cyclic references when unbinding from a service
2011-01-05 18:55:57 -08:00
Mattias Petersson
3996b41610 Avoiding cyclic references when unbinding from a service
Cyclic references can occur between a Service object held by an
application and a ServiceRecord object held by the system server.
A part of the problem is that binders are leaked and since many binders
are implemented by inner classes of services these services are also leaked.
This causes low memory problems. The solution is: When a Service is beeing
destroyed, go through the ServiceRecord's all IntentBindRecord and set its
binder references to null. This allows the binder and the service object to
be garbage collected.

Change-Id: I5a257521964851f34c08ffb3908feaad96b1bafe
2011-01-05 15:34:11 -08:00
Johannes Carlsson
5897591537 Clear reference to the IIntentReceiver in order to avoid memory leak
When using sendOrderedBroadcast(..) with a BroadcastReceiver the
BroadcastReceiver instance was not released. The reason for this was that
the resultTo field in the BroadcastRecord kept a reference until it was pushed
out of the mBroadcastHistory. This reference in turn kept a reference to the
process side IIntentReceiver (implemented in ReceiverDispatcher$InnerReceiver).
This in turn had a strong reference (through mStrongRef) to the Context.

In order to keep the debug output the resultTo is also kept as a String in the
new resultToString variable.

Change-Id: I4382a22a541c27b3694fb2b78a04ee820b235f8f
2011-01-04 09:15:09 +01:00
Dianne Hackborn
070783f6ea Don't let services in persistent processes be lost after crashing.
Special cases persistent processes to not allow their services to be
force stopped if the processes is crashing multiple times.  Avoid the
annoying issue with the system bar going away if it is sometimes crashing.

Change-Id: Icf421f45e389827d612d70638030da755a8d3344
2010-12-29 16:46:28 -08:00
Dianne Hackborn
fefe3f689b am cc43401c: am 6eef0ca5: Merge "frameworks/base: Fix to release references in ActivityManagerService" into gingerbread
* commit 'cc43401cd10c681238e0be01de8fe14f5da94fb1':
  frameworks/base: Fix to release references in ActivityManagerService
2010-12-23 14:29:36 -08:00
Dianne Hackborn
cc43401cd1 am 6eef0ca5: Merge "frameworks/base: Fix to release references in ActivityManagerService" into gingerbread
* commit '6eef0ca59438a15d14be8a72b6b29f01da91a5b8':
  frameworks/base: Fix to release references in ActivityManagerService
2010-12-23 14:22:32 -08:00
Vairavan Srinivasan
a207ce2aba frameworks/base: Fix to release references in ActivityManagerService
ServiceRecord's bindings is a hashmap to keep track of all active
bindings to the service. This is not cleared when the service is
brought down by activity manager. This adds up the references to
IntentBindRecords and its references to ServiceRecord. Fix is to
clear the bindings.

ServiceRecord's restarter is a reference to the service and is not
cleared when the service is brought down by activity manager. This
adds up the references to ServiceRecord. Fix is to set the reference
to null when the service is brought down by activity manager.

Change-Id: Ica448cd5f60192c8adb23209b5d0e2cf0c04e446
2010-12-23 14:16:56 -08:00
Vairavan Srinivasan
50b9b94411 frameworks/base: Fix to release references in ActivityManagerService
ServiceRecord's bindings is a hashmap to keep track of all active
bindings to the service. This is not cleared when the service is
brought down by activity manager. This adds up the references to
IntentBindRecords and its references to ServiceRecord. Fix is to
clear the bindings.

ServiceRecord's restarter is a reference to the service and is not
cleared when the service is brought down by activity manager. This
adds up the references to ServiceRecord. Fix is to set the reference
to null when the service is brought down by activity manager.

Change-Id: Ica448cd5f60192c8adb23209b5d0e2cf0c04e446
2010-12-23 13:51:48 -08:00
Dianne Hackborn
5f4d643346 Fix issue #3263026: Screen rotation animation is funky...
...with more than one activity visible

Change-Id: I7695108a3540f5dd0a59b792ca3bc84c8f680872
2010-12-21 23:23:26 -08:00
Dianne Hackborn
f642c89964 Merge "Gah forgot this." 2010-12-21 19:21:41 -08:00
Dianne Hackborn
7c0e75e744 Gah forgot this.
Change-Id: I8d2b31020ac309f17b967734e8ca97a36a5fae45
2010-12-21 19:15:40 -08:00
Dianne Hackborn
88819b276b Rework how recent tasks are added.
Now recents is updated every time an activity is resumed.  This
should ensure the recent list is more consistent, in the face of
pressing back or things crashing.

Change-Id: Ibf59419014e549fac55f18633185edcb5ffcaa3c
2010-12-21 18:18:02 -08:00
Dianne Hackborn
7c8a4b3776 Turn thumbnails back on.
Change-Id: I5b895d4f3558cbae3c5920a3672f02e48c00a8b4
2010-12-15 14:58:00 -08:00
Dianne Hackborn
d2835935d2 Fix issue #3258849: Grab thumbnail when exiting an app via back
Also issue #3281400: Rotating a retained instance fragment leaks the fragment manager

And turn off fragment debug logging.

Change-Id: Ibdd7db82bb35618021bcba421ba92ced7cd691c2
2010-12-13 20:41:17 -08:00
Dianne Hackborn
ccc7141313 resolved conflicts for merge of 78e9f4cb to master
Change-Id: I1135361e6d66f524c3f349e2bf1f31bd4191c634
2010-12-13 14:55:25 -08:00