OSDN Git Service

Break apart queries to getInstalled* API
authorKenny Root <kroot@google.com>
Sat, 16 Apr 2011 00:50:10 +0000 (17:50 -0700)
committerKenny Root <kroot@google.com>
Tue, 19 Apr 2011 16:57:54 +0000 (09:57 -0700)
commit0e2c0f37d98bb5539b0fe41865aaf1add0ff1bb3
treef39c38afc819ce0d75513880cca7fefcdab6925c
parent71a556f24e2b8d489bf81b22fab6fe5e99a9eae0
Break apart queries to getInstalled* API

To avoid blowing past the Binder IPC limit, change the
PackageManagerService to have a DB-like interaction where the client
tells the service the last "row" that it read.

The fact that we use a HashMap instead of a TreeMap makes this
problematic. For now we're just making a new ArrayList for the keys and
then sorting them for each call. This can make the API slower for callers
of this, but it's probably greatly overshadowed by the cost of the data
transfer itself.

Bug: 4064282
Change-Id: Ic370fd148d4c3813ae4f2daffa1a7c28d63d5a09
cmds/pm/src/com/android/commands/pm/Pm.java
core/java/android/app/ContextImpl.java
core/java/android/content/pm/IPackageManager.aidl
core/java/android/content/pm/ParceledListSlice.aidl [new file with mode: 0755]
core/java/android/content/pm/ParceledListSlice.java [new file with mode: 0644]
services/java/com/android/server/PackageManagerService.java