History log of /frameworks/base/core/java/android/content/pm/ParceledListSlice.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2f3e35376ada0327b34a71d7c45ac6e6d955d7dc 21-Dec-2015 Jeff Sharkey <jsharkey@android.com> More work towards triaging missing app behavior.

Many places across the platform query package details without
gracefully handling packages or components that go missing for
various reasons. This can cause annoying user data loss, such as
resetting back to built-in apps or dropping of accounts, etc.

This change verifies that system callers have thought about these
edge cases by logging if they use default matching behaviors without
explicitly marking themselves as being "triaged." (The logging is
currently disabled by default.)

Also creates explicit definitions of supported flags for various
incoming PackageManager calls, and defines a clear distinction
between flag types:

-- GET-style flags are used to request additional data that may have
been elided to save wire space.

-- MATCH-style flags are used to include components or packages that
would have otherwise been omitted from a result set by current system
state.

There are a handful of existing GET flags that better fit under the
MATCH definition, so this change clones them to new constants and
marks the old ones as deprecated.

Fixes bug in JobSchedulerService to consider jobs from apps on
external storage. Revert some dialer behavior back to being
untriaged.

Change-Id: I9b6ab0968241e3479bddbd78de0c51e3b9917318
/frameworks/base/core/java/android/content/pm/ParceledListSlice.java
86cbc2bf30a7623b2ad6564cf50ca20f87067ea7 29-Jul-2015 Dianne Hackborn <hackbod@google.com> Work on issue #22765972: Binder transactions running out of address...

...space causing package manager to fail

Lower the maximum IPC size we use in various places, to keep it
under the threshold of becoming dangerous. Now everything tries
to keep not much more than 64k.

Change-Id: I814013097966a7843179e5d581bfdb254c5ae318
/frameworks/base/core/java/android/content/pm/ParceledListSlice.java
44e440cc7e834de7811f005998acb32716835b00 20-Apr-2015 Neil Fuller <nfuller@google.com> Add checks for types in Parcel / avoid class initialization

Make Parcel more stringent to avoid initializing classes
that are not related to Parcelable.

Two new checks:
1) That the class found on the stream implements Parcelable.
2) That the type of the CREATOR field declared on the class
found on the stream actually implements Parcelable.Creator.

For (1) the new check that a class in the stream is actually
Parcelable. This will affect handling of invalid streams or
code that didn't obey the requirements.

For (2) this change could break some apps that had a CREATOR
field in a Parcelable class that was not declared to be
(at least) a Parcelable.Creator: it is no longer sufficient
for the type to implement Parcelable.Creator, the field
must be declared as such.

This change includes doc updates for Parcelable to make
the requirement around the declared type of the CREATOR
field more concrete.

This change also makes the generics slightly tidier/explicit,
annotates code as unchecked where needed and removes some
assumptions that can not be guaranteed with Java's type
system and the current definitions.

For example, there's no guarantee right now that
Parcelable.Creator returns objects that are actually
Parcelable, or that the CREATOR object associated
with a Parcelable will return objects of the surrounding
class. The first we can't do something about without
breaking the public API (due to implementations like
TextUtils.CHAR_SEQUENCE_CREATOR). The second is
currently typically implicitly enforced with an implicit
cast in the (app's) calling code (e.g. callers to
readParcelable() that causes a language-introduced cast
to the type expected). A larger refactoring of Parcel
would be required to ensure that the class that is
produced by Creator is of a type compatible with the
class that declared CREATOR, and is not a goal for this
change.

A fix is included for a class that doesn't implement
Parcelable like it should and would probably fail
check (1).

Bug: 1171613
Change-Id: I31d07516efee29a320e80f4bc4f96aaac628f81c
/frameworks/base/core/java/android/content/pm/ParceledListSlice.java
3df1c38ee098872352086e03d6f1adb16796ee29 07-Nov-2014 Adam Lesinski <adamlesinski@google.com> Fix ParceledListSlice to enforce the same concrete types among its elements.

Bug:17671747
Change-Id: I896f75738e5b464ccb6c03290f139cc2fa72f966
/frameworks/base/core/java/android/content/pm/ParceledListSlice.java
d8e1dbb6bc1fbaf4f2e38c3ba92ced94270deaac 18-Jan-2013 Dianne Hackborn <hackbod@google.com> Rework ParceledListSlice to be much easier to use.

Take advantage of this to return better information about
packages filtered by permissions -- include the permissions
they have in the requested array.

Also fix issue #8026793 (Contact picture shows default pic
while searching for a contact in qsb) by using the base
package name of the Context when reporting the app name
of an operation. Otherwise you could make a resource-only
context for another application and do calls through that
and get reported as the wrong app.

Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
/frameworks/base/core/java/android/content/pm/ParceledListSlice.java
0e2c0f37d98bb5539b0fe41865aaf1add0ff1bb3 16-Apr-2011 Kenny Root <kroot@google.com> 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
/frameworks/base/core/java/android/content/pm/ParceledListSlice.java