History log of /frameworks/base/core/java/android/os/BaseBundle.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
983055231b999e450def3e3df377fb4e23420711 06-May-2017 Dianne Hackborn <hackbod@google.com> Fix issue #37360626: Apps can schedule alarms (and other things) with temp whitelist

There is now an IBinder "token" that must be specified when setting
the whitelist duration for an Intent. To have the whitelist supplied,
the caller to send a PendingIntent must pass in the same token. The
PendingIntent and IntentSender classes now internally maintain this token
to pass in when their send() is called.

The big complexity for making this work is we now need to associate this
whitelist token correctly with the actual PendingIntent objects that
applications and other code is getting. To do this, we propagate the
token in the Notification object, and have a new API on Parcel that allows
us to make it available to PendingIntent when it is unmarshalled. And
this allows to deal with PendingIntents appearing in nested bundles, as
we can propagate that information from the original Parcel to the new
Parcel that Bundle keeps to delay unmarshalling.

Test: manual
Change-Id: Idda00490ccfe2be37e4ab21354b9ab7528a52750
/frameworks/base/core/java/android/os/BaseBundle.java
7da13d7c3e5b48c0410ae869c5679652de97e5aa 05-Apr-2017 Dianne Hackborn <hackbod@google.com> Add new "work queue" feature to JobScheduler.

This gives semantics similar to the start command
queue of services.

The implementation is currently lacking in URI permission
grant handling of the work intents; that will be coming
in a follow-up change.

This includes a first step of adjusting/fixing locking
within JobSchedulerService. The JobServiceContext class
has a bunch of stuff it does that assumes it doesn't need
locking because it schedules the work on a handler. However,
to be able to correctly implement the work finish flow (that
takes care of stopping the job when there is no more work),
we can't dispatch these asynchronously so need to get rid of
that and just do explicit locking.

The switch to explicit locking is half-way there (again the
remaining part will be a follow-on CL). Right now we have
the locking, but still also the handler. But it turns out
there were a number of things we were doing without a lock
held where we actually should have been holding a lock, so
this is better anyway.

Test: new tests added

Change-Id: Iebd098046209b28e60fd2f4d855d7f91cd3a8b03
/frameworks/base/core/java/android/os/BaseBundle.java
a47223f99b6b7ade4ae909c458d975eb487062b3 30-Mar-2017 Dianne Hackborn <hackbod@google.com> Implement issue #36590595: Add ability to associated a ClipData with JobInfo

Yum!

Also needed to have a Context.revokeUriPermission() variant that is sane,
so reasonable CTS tests can be written.

Test: new ClipDataJobTest added.

Change-Id: Ia3135ea788a6e32c971bae7dab3a844d0ef4139c
/frameworks/base/core/java/android/os/BaseBundle.java
2510b37518fd2fa227a9399b9269dd9a04ceb8d9 04-Mar-2017 Dianne Hackborn <hackbod@google.com> Fix issue #35813125: API Review: android.os > Bundle

- Renamed deepcopy to deepCopy.
- Clarified docs about when a shallow vs. deep copy happens.

Test: booted and ran

Change-Id: I2b4400770d781ff51423cd1c860454742e1d3c9c
/frameworks/base/core/java/android/os/BaseBundle.java
694753465b577509cecba33a90fb7cb6d50f5533 15-Dec-2016 Amith Yamasani <yamasani@google.com> Fix for race in writeToParcel and unparcel

Don't access the parcelled data while it might be recycled
by another thread.

Also make a local reference of mMap, which could be modified
by another thread.

Bug: 33325384
Test: Hard to repro, so no test
Change-Id: I77f6545ac174236a3da69c0c0f3a01b2eda3f34b
/frameworks/base/core/java/android/os/BaseBundle.java
4e1fa3c476629acc44e28ee6ccb5f88f10ee6a14 05-May-2016 Dianne Hackborn <hackbod@google.com> resolve merge conflicts of a14aac9 to master

Change-Id: If92c42a9e6fbc3cccd24fa2677f0e4c34d65c923
d8e877d27d8e5a87446b9e1030325edad268d9e3 04-May-2016 Dianne Hackborn <hackbod@google.com> Maybe fix issue #28457907: Pebble app crash + reboot

Fix this long-standing multi-threading issue in Bundle
when multiple threads are trying to read from a Bundle
and conflict to due unparceling.

There are two critical sections this protects: writing
the bundle in to a parcel (when it is doing this from
the bundle's already parcelled representation), and
unparcelling a bundle into its map of entries.

Change-Id: I5470002f090e63dd623a573da6c204d3b5b661f4
/frameworks/base/core/java/android/os/BaseBundle.java
74755c9eb56083191348ed8d844bb30df67130d5 21-Apr-2016 Andreas Gampe <agampe@google.com> resolve merge conflicts of 7983723 to master

Change-Id: I1e903d23598c8066b9103499287a7ee04d33c75a
52764cba5968888180ceedf717d85e08ffd747cc 20-Apr-2016 Andreas Gampe <agampe@google.com> Frameworks/base: Add holder to BaseBundle

Move EMPTY_PARCEL into an inner holder class. Add holder to
preloaded-classes. Clean up dependencies.

Allows to compile-time initialize:
* android.os.BaseBundle
* android.os.Bundle
* android.os.PersistableBundle
* android.telephony.CarrierConfigManager

Bug: 27265238
Change-Id: Ib8017aa419c2985963b3c68a8046462a38652ef2
/frameworks/base/core/java/android/os/BaseBundle.java
b3bf559a77f5f89437687240b79d41d201ea540b 19-Apr-2016 Jeff Sharkey <jsharkey@android.com> Merge "Disable "defusable" logging for now." into nyc-dev am: d3a25ad am: ea54db6
am: df6d014

* commit 'df6d01463adf4b96bdd4dc317ac7b479bb2bc0d4':
Disable "defusable" logging for now.

Change-Id: I6458200608363a58c8a769fdcc4d309bb4e8de91
cb45951cad9d403fd9933d723657d6d5838f5e59 18-Apr-2016 Jeff Sharkey <jsharkey@android.com> Disable "defusable" logging for now.

Bug: 28240784
Change-Id: I2c259867a8169eef220fb9faea6cdcafdde675b8
/frameworks/base/core/java/android/os/BaseBundle.java
383eb0256e1b00050f9d392dfc6e11b6fb2d83a4 31-Mar-2016 Amith Yamasani <yamasani@google.com> Merge "Fix a deadlock due to wtf in BaseBundle" into nyc-dev am: 27c49d5
am: 54ef247

* commit '54ef24779fee7060c3da52e8973a3e1240ac3d10':
Fix a deadlock due to wtf in BaseBundle

Change-Id: I739db48b3133ff963a786bb9b00aa8f842883ef8
2387932b74699c4d5baa493271e999e31b09d2b8 31-Mar-2016 Amith Yamasani <yamasani@google.com> Fix a deadlock due to wtf in BaseBundle

Use Slog.wtf instead of Log.wtf, so that it is
asynchronously reported.

Mark incoming application restrictions as defusable
since they are being unparceled.

Bug: 27811728
Change-Id: I166de69a74417e439ec5ef9159fbbfbfe711dde6
/frameworks/base/core/java/android/os/BaseBundle.java
7029a23b381ca40d1661353fdf81333c7bc308d6 17-Mar-2016 Jeff Sharkey <jsharkey@android.com> Merge "Defuse Bundles parsed by the system process." into nyc-dev am: c4b0ade
am: a0f6318

* commit 'a0f6318f44244ec4e916d3abecf157beb4fefc8c':
Defuse Bundles parsed by the system process.
d136e51a99df5275eaafdde407e89e78c02b829b 10-Mar-2016 Jeff Sharkey <jsharkey@android.com> Defuse Bundles parsed by the system process.

It's easy for apps to throw custom Parcelables into Bundles, but
if the system tries peeking inside one of these Bundles, it triggers
a BadParcelableException. If that Bundle was passed away from the
Binder thread that delivered it into the system, we end up with a
nasty runtime restart.

This change mitigates this trouble by "defusing" any Bundles parsed by
the system server. That is, if it encounters BadParcelableException
while unpacking a Bundle, it logs and delivers an empty Bundle as
the result.

Simultaneously, to help catch the system process sticking its
fingers into Bundles that are destined for other processes, a Bundle
now tracks if it's "defusable." For example, any Intents delivered
through ActivityThread are marked as being defusable, since they've
arrived at their final destination. Any other Bundles are considered
to be "in transit" and we log if the system tries unparceling them.

Merges several Parcel boolean fields into a flags int. Add better
docs to several classes.

Bug: 27581063
Change-Id: I28cf3e7439503b5dc9a429bafae5eb48f21f0d93
/frameworks/base/core/java/android/os/BaseBundle.java
af00108ca4e8e3de7c6d155891b74d43c18f5eba 08-Mar-2016 Makoto Onuki <omakoto@google.com> resolve merge conflicts of 1ca3800c44 to master

Change-Id: I4657cdf99900cd555c3109605e8cbdbb0fed79e6
6f7362d92573e4ae693bc513dca586d6a4eb087b 04-Mar-2016 Makoto Onuki <omakoto@google.com> Introducing ShortcutManager

What's supported:
- Most APIs are implemented, except for SM.updateShortcuts(),
the icon APIs in LA, and LA.startShortcut().
- Persisting information, except for icons
- Throttling

In addition, now PersistableBundle has a public copy
constructor from a Bundle. (Do we want to @hide it?)

TODOs:
- Add icon support
- Implement missing APIs
- Listen to PACKAGE_* broadcasts and do clean-up
- Support multi-launcher apps (pinned shortcuts per launcher)
- Dev option to reset throttling
- Load throttling config from Settings
- Backup & restore
- Figure out LauncherApps permissions (BIND_APPWIDGETS??)
- Other minor TODOs in the code
- Better javadoc

Note: This requires Idf2f9ae816e1f3d822a6286a4cf738c14e29a45e

Bug 27325877

Change-Id: Ia5aa555a4759df5f79a859338f1dc5e624cd0e35
/frameworks/base/core/java/android/os/BaseBundle.java
ba60473a6539d16bef8720d79b5559512303bddf 11-Feb-2016 Dianne Hackborn <hackbod@google.com> Implement transient extras for jobs.

You can now associate an arbitrary Bundle of extras with a job,
as long as the job is not persisted.

Also implement deep-copy of Bundle.

Change-Id: I7890d627492b664d9b1f039e8cb82f8868de7be3
/frameworks/base/core/java/android/os/BaseBundle.java
a6d4744e894fe2d580f0a0ec0970f171d29ae40b 17-Dec-2015 Samuel Tan <samueltan@google.com> Merge "Add comments to keep Java and native binder PersistableBundle in sync" am: 6de926a7d6
am: 4981ae9083

* commit '4981ae908349767fee7976cc82c54a7fb00ee4fd':
Add comments to keep Java and native binder PersistableBundle in sync
3cefe6a991ba650375e663e7095266e2273d2372 14-Dec-2015 Samuel Tan <samueltan@google.com> Add comments to keep Java and native binder PersistableBundle in sync

Add comments stating that certain methods of the Java binder framework
should be kept in sync with the corresponding methods mirrored in the
native PersistableBundle implementation.

BUG: 25815410
Change-Id: I475b2e9a527291eea58c8178cd733c444dfcfed5
/frameworks/base/core/java/android/os/BaseBundle.java
1619ed4706a0bf906d967ab7987cd4c475ac3462 22-Sep-2015 Adam Lesinski <adamlesinski@google.com> Fix security issues when using Parcel.setDataPosition() with untrusted input

When seeking forward in the Parcel, adding the extracted size to the Parcel.dataPosition()
can result in an overflow. Guard against this.

Bug:23909429
Change-Id: If37cdebbf05a92810300363d1a6ecd8b42b6da26
/frameworks/base/core/java/android/os/BaseBundle.java
a83ce1dd2ad3a6b71e90ff4845afc1299fe17b9d 11-Mar-2015 Dianne Hackborn <hackbod@google.com> More work on collecting assist data.

Optimize parceling of AssistData (which is now renamed to
AssistStructure) by pooling duplicated class name strings.

Change text associated with a view node to a CharSequence,
so styling information comes along.

Include global text attributes -- size, colors, etc.

Introduce a new AssistContent structure, which allows us
to propagate information about the intent and data the
activity is looking at. This further allows us to propagate
permission grants, so the assistant can dig in to that data.
The default implementation propagates the base intent of an
activity, so if for example you bring up the assistant while
doing a share the assistant itself has the same information
and access that was given to the share activity (so it could
for example share it in another way if it wanted to).

Did some optimization of loading PersistableBundle from xml,
to avoid duplicating hash maps and such.

Changed how we dispatch ACTION_ASSIST to no longer include
the more detailed AssistStructure (and new AssistContent)
data when launching; now the example code that intercepts
that needs to be sure to ask for assist data when it starts
its session. This is more like it will finally be, and allows
us to get to the UI more quickly.

Change-Id: I88420a55761bf48d34ce3013e81bd96a0e087637
/frameworks/base/core/java/android/os/BaseBundle.java
c6a65dff3d9ed3e75f9f4f5abbf24e3d10bdba8b 02-Mar-2015 Scott Kennedy <skennedy@google.com> Annotate Bundle with @Nullable

Change-Id: Ide572124deea8271ca5c47009acb62603d644363
/frameworks/base/core/java/android/os/BaseBundle.java
73bdf9761be2abdd85efc5fce165f3fa80fcfa65 10-Dec-2014 Craig Mautner <cmautner@google.com> Add put/getBoolean/Array to PersistableBundle

Due to popular demand the methods putBoolean(), getBoolean(),
putBooleanArray() and getBooleanArray() have been added to
PersistableBundle.

Fixes bug 18390436.

Change-Id: Id133ba902aca774f98529e36ce560e873b88ad5b
/frameworks/base/core/java/android/os/BaseBundle.java
aeaf87fe452353371b36da42e5beccca3150ab08 26-Jun-2014 Narayan Kamath <narayan@google.com> Update javadoc for android.os.Bundle.

Call out the fact that defaultValue is returned if a null
mapping exists for a given key.

bug: https://code.google.com/p/android/issues/detail?id=68453

(cherry picked from commit ca2197b0457b1626b95a053d835ceaca43ac0286)

Change-Id: Iec70478ae091bb222be6e9ef9726c817395e9e23
/frameworks/base/core/java/android/os/BaseBundle.java
0a8e160eb56f3b8f504b37349a79ec4edb7e5039 29-May-2014 Craig Mautner <cmautner@google.com> Change PersistableBundle API per council's request

Fixes bug 15192573.

Change-Id: Ib98ef132c8c12e68e805cb3c0b1f7ae75940f17c
/frameworks/base/core/java/android/os/BaseBundle.java