3423 Commits

Author SHA1 Message Date
Kenny Root
2ec4af5920 am 138757db: Merge "Make OBB results a one-way call" into gingerbread
* commit '138757db4f19cb626ef5c1d371d4fca004304a08':
  Make OBB results a one-way call
2011-01-26 09:25:43 -08:00
Kenny Root
b7db2726e9 Make OBB results a one-way call
OBB result back to an application needs to be a one-way binder call.

Bug: 3353699
Change-Id: I0e625914d18a001c2fa9d764ea6463f34cf96743
2011-01-25 17:29:59 -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
Brad Fitzpatrick
6b2b053b5a am 597fa828: Merge "Watchdog can get deadlocked on activity manager" into gingerbread
* commit '597fa828fa2b3cba053f0afeeac877b1ee2d24b7':
  Watchdog can get deadlocked on activity manager
2011-01-18 18:54:25 -08:00
Brad Fitzpatrick
0971a1367f Watchdog can get deadlocked on activity manager
Bug: 3351719
Change-Id: Idf3907709340062849a09dd094137e86256ed739
2011-01-18 16:42:20 -08:00
Irfan Sheriff
ef76b8306f am 4170b463: Merge "Do not add unsolicited events to queue" into gingerbread
* commit '4170b46329ed91e81cf22dba82e2dadc326b3e3d':
  Do not add unsolicited events to queue
2011-01-18 14:43:04 -08:00
Irfan Sheriff
4170b46329 Merge "Do not add unsolicited events to queue" into gingerbread 2011-01-18 14:40:18 -08:00
Jeff Brown
b26c516c03 am 41395459: Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread
* commit '41395459e676cf9ab4059e08446656f145662c2d':
  Filter virtual keys after touches.  (DO NOT MERGE)
2011-01-18 14:38:27 -08:00
Jeff Brown
41395459e6 Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread 2011-01-18 14:31:31 -08:00
Kenny Root
e26aa3f78a am 34d2b41e: Revert "Add the {get,set}PackageObbPaths calls to API"
* commit '34d2b41e48281d1df2c844e004740f008e699093':
  Revert "Add the {get,set}PackageObbPaths calls to API"
2011-01-17 12:23:43 -08:00
Kenny Root
34d2b41e48 Revert "Add the {get,set}PackageObbPaths calls to API"
This reverts commit 6c4d904851772313930f800ac7c323cf90c709bb.

Going with a different tactic that doesn't dump stuff on
PackageManagerService.

Bug: 3214719
Change-Id: I0bbeccf3c21d264deda4256eb53713d2c98284f4
2011-01-17 11:49:22 -08:00
Irfan Sheriff
1cd94ef957 Do not add unsolicited events to queue
Adding unsolicited events to response queue
results in doCommand() returning the wrong
result.

Pulling this change from master.

Bug: 3258529
Change-Id: I2a4b0bd8bb30b31682d7d61ee94a0d246bf10de2
2011-01-16 14:31:55 -08:00
Kenny Root
b220d62bf3 am ea6bf362: Deep clone settings for system package update DO NOT MERGE
* commit 'ea6bf3628140283df24f2652b686d083b0d31ed9':
  Deep clone settings for system package update DO NOT MERGE
2011-01-14 13:05:53 -08:00
Kenny Root
ea6bf36281 Deep clone settings for system package update DO NOT MERGE
The copyFrom() method was not written to create a clone of the
PackageSetting, so just create a new constructor that actually does a
clone.

Bug: 3349588
Change-Id: I24bdce6c3559e097ecb64b61585ef3b12bca491f
2011-01-14 10:32:42 -08:00
Kenny Root
470750793b am e8c04db7: Merge "Add the {get,set}PackageObbPaths calls to API" into gingerbread
* commit 'e8c04db71e347396e9537ead7113ba9f46706e44':
  Add the {get,set}PackageObbPaths calls to API
2011-01-12 15:06:51 -08:00
Kenny Root
e8c04db71e Merge "Add the {get,set}PackageObbPaths calls to API" into gingerbread 2011-01-12 15:03:43 -08:00
Kenny Root
0ee294470d am 6688b6c3: Merge "Allow updated system apps to retain priority" into gingerbread
* commit '6688b6c31765242866fc276cea7fa241fc5b5e7b':
  Allow updated system apps to retain priority
2011-01-12 11:59:49 -08:00
Kenny Root
6688b6c317 Merge "Allow updated system apps to retain priority" into gingerbread 2011-01-12 11:56:25 -08:00
Jeff Brown
6f71d0fedb Filter virtual keys after touches. (DO NOT MERGE)
Adds a new virtualKeyQuietTimeMillis configuration resource that sets
the duration for which virtual keys will be dropped after recent touches
on screen.  The default value is 0; it is intended to be overridden
per device using a resource overlay.

This change is designed to help in two cases:

1. Swipes from touchscreen into virtual key area.
2. Accidental taps in virtual key area while using on-screen keyboard.

Bug: 3089163
Change-Id: Id6733c83c2e2bc8d9553aa0e5c1fd74b741bec6e
2011-01-11 20:56:04 -08:00
Kenny Root
1c6e764275 Allow updated system apps to retain priority
Previously any updated system apps would not be able to have a greater
than 0 priority on an activity intent filter. Moving the priority check
later in the package scanning allows it to apply to updated system
packages as well.

Bug: 2572398
Change-Id: I9fdf7906809518b28b49ffec31afec1442d85d3c
2011-01-11 15:51:46 -08:00
Kenny Root
4aab4bc2a3 am 91c459ec: Copy user info from PackageSetting as well
* commit '91c459ec7dba6d56816ff5cbd92c627e0f718915':
  Copy user info from PackageSetting as well
2011-01-11 12:27:42 -08:00
Kenny Root
91c459ec7d Copy user info from PackageSetting as well
In order not to clobber the internal system's settings, we duplicate it
before putting it back into mPackages, but the PackageSetting has a
couple extra pieces of information that weren't being copied.

Bug: 3339279
Change-Id: I047087ac3477c7b2d5ce23e5e0a5e8c094bd0d3f
2011-01-11 11:04:54 -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
Dianne Hackborn
9aac2e2b95 Merge "Referencing of "r.record.name" is occured, when "r.record" is null." into gingerbread 2011-01-09 13:53:53 -08:00
Chris Tate
69f8d3c667 am bbff7ed4: DO NOT MERGE : Ensure that the first post-restore backup pass is correct
* commit 'bbff7ed44b353ff299b900a1ff50812a082206f0':
  DO NOT MERGE : Ensure that the first post-restore backup pass is correct
2011-01-09 13:31:23 -08:00
Kenny Root
6c4d904851 Add the {get,set}PackageObbPaths calls to API
Add getPackageObbPaths() and setPackageObbPaths() to the public API.

Bug: 3214719
Change-Id: Icb9f2f92f8c59bb3d31317f609854e81abbd1449
2011-01-09 13:20:28 -08:00
Chris Tate
9b1bd2c7d1 am 6ec91731: DO NOT MERGE : Permission fix: don\'t require BACKUP perm for self-restores
* commit '6ec91731cbf6ee1a9a914d341fab9567d1599018':
  DO NOT MERGE : Permission fix: don't require BACKUP perm for self-restores
2011-01-09 13:04:01 -08:00
Chris Tate
bbff7ed44b DO NOT MERGE : Ensure that the first post-restore backup pass is correct
Some restore passes bring an ancestral dataset to the application, but
others instead act to bring an app back into sync with its own most-
recently-saved data.  In the latter case the state file written by the
app after the restore is a correct basis for generating future backup
deltas, but in the former case it is not.

The app should not be required to distinguish between these cases;
the framework has all the information necessary to handle the saved
state correctly following any flavor of restore operation.  This
patch makes the Backup Manager properly cause a full backup pass
following an ancestral-dataset restore.  After a current-set
restore the saved state file is an accurate description for
purposes of continued backup operations, so is preserved.

(Cherrypick from master to gingerbread)

Change-Id: I4bc4e8782a168ecc0795107a340bdbb35060730e
2011-01-09 13:01:45 -08:00
Chris Tate
6ec91731cb DO NOT MERGE : Permission fix: don't require BACKUP perm for self-restores
The public API is not supposed to require the BACKUP permission in order
for an application to restore its own last-known-good backup data.  However,
as currently implemented, BackupManager.requestRestore() [the public API
in question] depends on private Backup Manager methods that *do* enforce
that permission.  The net result is that the method cannot be successfully
used by third party applications: it will throw an exception if attempted.
This CL restructures the permission checking involved.

First, the underlying beginRestoreSession() operation can now be passed a
'null' transport name; if this is done, then the restore session is begun
on whatever the currently-active transport is.  Looking up the name of the
active transport is one of the permission-guarded actions that was required
with the initial implementation.

Second, a package name can now be passed to beginRestoreSession().  If
this is done, then the restore session can only be used to perform a
single-package restore of that one application.  The BACKUP permission is
not required if the caller is tying the restore to its own package name.

In combination, these changes permit BackupManager.requestRestore() to
function without the calling app needing to hold any special permission.
The no-permission case is intentionally quite narrow:  the caller must
hold the permission unless they both (a) pass 'null' for the transport
name, thereby accepting whatever the currently active transport is, and
(b) pass their own package name to restrict the restore session only
to their own app.

External bug http://code.google.com/p/android/issues/detail?id=10094
Internal bug 3197202

(Cherrypick from master to gingerbread)

Change-Id: Ie20b0bd2420345ce6eda178f854680b558f6372a
2011-01-09 12:49:47 -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
95db1cfc74 am cd23823d: Merge "Fix issue # 3227963: SecurityException: Neither user 10023 nor..." into gingerbread
* commit 'cd23823d4f533431c76baa104eb50b7803b3b391':
  Fix issue # 3227963: SecurityException: Neither user 10023 nor...
2011-01-09 11:44:17 -08:00
Dianne Hackborn
cd23823d4f Merge "Fix issue # 3227963: SecurityException: Neither user 10023 nor..." into gingerbread 2011-01-09 11:38:15 -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
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
536feda7b1 am 949fc0ef: Merge "frameworks/base: Fix to release references to previous live wallpaper"
* commit '949fc0efc3203c580372e7713df5331818ae81f1':
  frameworks/base: Fix to release references to previous live wallpaper
2010-12-28 10:38:38 -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
Dianne Hackborn
6eef0ca594 Merge "frameworks/base: Fix to release references in ActivityManagerService" into gingerbread 2010-12-23 14:19:03 -08:00
Dianne Hackborn
949fc0efc3 Merge "frameworks/base: Fix to release references to previous live wallpaper" 2010-12-23 14:17:54 -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
fdfc1b27fe frameworks/base: Fix to release references to previous live wallpaper
The service connection to the previous live wallpaper is unbound when
a new wallpaper is effective. Although the service connection is
unbound it is not disconnected and its reference to wallpaper's
service and engine is still effective. This adds up to the total
JNI references and causes dalvik (hosting system_server) to abort.
Fix is to release the references in clearWallpaperComponentLocked.

Change-Id: Idd2bab83a56d2e6c6dd7ab9be08d5e14887aa384
2010-12-23 14:05:44 -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
Jeff Brown
fa93584a4f am c6f2b3b3: Merge "Fix policy issues when screen is off. (DO NOT MERGE)" into gingerbread
* commit 'c6f2b3b302c06b8b7b81ec7e3a43a7df1813d0e0':
  Fix policy issues when screen is off. (DO NOT MERGE)
2010-12-23 12:43:48 -08:00
Dianne Hackborn
690d20bb53 Fix issue # 3227963: SecurityException: Neither user 10023 nor...
...current process has android.permission.WAKE_LOCK

When updating a system app, we would actually uninstall the package
of the system app, which also meant removing its uid...!  It was just
luck that we would get the same uid when installing the update after
that.  During that time, if anyone tried to do anything related to
that uid, it would be unknown.

This change tweaks how we go about replacing system apps by making
it more like normal apps -- to make this work, if we need to disable
the system app, we generate a new PackageSetting from the current
system app and replace it into our data structures, so we can update
that without trashing the current correct information about the (still
actually there) system app.

Also fixed a problem where we were not killing the currently running
app before installing, like we do when updating a normal application.

And fixed a problem where we were not deleting the /data .apk when
uninstalling a system app update.

And added a new option to the "pm" command to clear the data associated
with an app.

Change-Id: I0e879677849aa42950a3c360bf78ad820e87674b
2010-12-22 16:31:44 -08:00
Jeff Brown
eb9f7a01b0 Fix policy issues when screen is off. (DO NOT MERGE)
Rewrote interceptKeyBeforeQueueing to make the handling more systematic.
Behavior should be identical except:
- We never pass keys to applications when the screen is off and the keyguard
  is not showing (the proximity sensor turned off the screen).
  Previously we passed all non-wake keys through in this case which
  caused a bug on Crespo where the screen would come back on if a soft key
  was held at the time of power off because the resulting key up event
  would sneak in just before the keyguard was shown.  It would then be
  passed through to the dispatcher which would poke user activity and
  wake up the screen.
- We propagate the key flags when broadcasting media keys which
  ensures that recipients can tell when the key is canceled.
- We ignore endcall or power if canceled (shouldn't happen anyways).

Changed the input dispatcher to not poke user activity for canceled
events since they are synthetic and should not wake the device.

Changed the lock screen so that it does not poke the wake lock when the
grab handle is released.  This fixes a bug where the screen would come
back on immediately if the power went off while the user was holding
one of the grab handles because the sliding tab would receive an up
event after screen turned off and release the grab handles.

Bug: 3144874
Change-Id: Iebb91e10592b4ef2de4b1dd3a2e1e4254aacb697
2010-12-22 16:00:21 -08:00
Mattias Petersson
2f209e885a am 1622eee2: Improve performance of WindowState.toString()
* commit '1622eee2e48678b17a4668641957f09213f98905':
  Improve performance of WindowState.toString()
2010-12-22 11:25:32 -08:00