Renamed the RestoreSession performRestore() method to restoreAll(), and
added a new restorePackage() method that only restores the single
specified app. In order to restore an app other than itself, the
caller must hold the android.permission.BACKUP permission.
This change also introduces dataset tracking: the Backup Manager
persistently remembers both the current backup dataset's identity
and that of the "ancestral" dataset, i.e. the one most recently used
for a whole-device restore such as performed by SetupWizard. When a
single package is restored via restorePackage(), the selection of
most-recent dataset to use is this:
1. The data from the currently-active backup dataset, if such exists.
An app that has ever backed up data will therefore get its last-
known-good data.
2. The app's data from the ancestral dataset, if such exists. This
covers the case of a factory reset followed by reinstallation of
an app at a later time. The app had not yet backed anything up
post-wipe, but the old data is in the ancestral dataset and should
be brought forward when the app reappears.
3. If neither 1. nor 2. exist, there is no data to restore, so just
skip it and return failure.
Note that the infrastructure to automatically attempt a restore after
an application has been installed does not yet exist; that's coming.
Change-Id: I0ba170df9885128000c46ed28d3dddda3a63a143
The new flag, DISABLE_NOTIFICATION_TICKER, will be used by
the car dock app (in conjunction with DISABLE_EXPAND) to
minimize distractions to the driver.
It may also be used by the secure lockscreen to avoid
leaking personal information when the screen is on but the
device is locked (e.g. when the desk dock app is running).
Change-Id: Ibc8efde7da7501767163ae0a75f7c369b824e2a2
A new Base64 encoder/decoder class. Some benchmarks comparing the
decoder it to those from android.os.Base64Utils (a decode-only native
implementation not accessible to apps) and
org.apache.commons.codec.binary.Base64, all with the JIT enabled:
1k encoded data
APACHE avg: 811 us min: 244 us max: 13671 us
COMMON avg: 263 us min: 30 us max: 4730 us
NATIVE avg: 102 us min: 61 us max: 5493 us
10k encoded data
APACHE avg: 3624 us min: 2746 us max: 23895 us
COMMON avg: 979 us min: 518 us max: 7751 us
NATIVE avg: 817 us min: 762 us max: 3143 us
100k encoded data
APACHE avg: 33167 us min: 31829 us max: 140411 us
COMMON avg: 6047 us min: 5493 us max: 45227 us
NATIVE avg: 10109 us min: 10009 us max: 12451 us
Change-Id: Ic622e3a967a62d57d30bd25b80cbe4e0dd60e764
Note that Rfc822Tokenizer.tokenize(CharSequence text) is already in the SDK
and it just wraps the version I am unhiding.
Change-Id: I1ac3b405a04df960fc1e65ca4797d6f5adf85dc4
Move ContentLoader and FileLoader to this new way
as they involves IO. Will work on CacheLoader later.
Change StreamLoader to contain a Handler instead of
derive from a Handler so that the Handler can be
created in the thread where load() is called.
Rename StreamLoader's old "LoadListener mHandler"
to mLoadListener.
Remove unused import and unreachable exception.
Fix http://b/issue?id=2158613
This improved page_cycler performance in moz/intl by
10-30% as we are not blocked by IO any more.
Handle TTY mode change events received by HeadsetObserver and send information down to AudioHardware with AudioManager.setParameters()
Use setting "tty_mode_uses_heaset_events" in core config.xml to indicate if the product uses this particular
method of indicating the TTY mode change.
The steps to reproduce this were kind of interesting. You needed to have
a notification with a bogus RemoteViews in the first position in the list,
and then have another notification come in with an earlier timestampe. In
that case, it would get a bad index for the new (not bogus) view that was
being added.