An "UpdateLock" works similarly to a wake lock in API: the caller is
providing a hint to the OS that now is not a good time to interrupt
the user/device in order to do intrusive work like applying OTAs.
This is particularly important for headless or kiosk-like products
where ordinarily the update process will be automatically scheduled
and proceed without user or administrator intervention.
UpdateLocks require that the caller hold the new signatureOrSystem
permission android.permission.UPDATE_LOCK. acquire() and release()
will throw security exceptions if this is not the case.
The "is now convenient?" state is expressed to interested parties
by way of a sticky broadcast sent only to registered listeners. The
broadcast is protected; only the system can send it, so listeners
can trust it to be accurate. The broadcast intent also includes a
timestamp (System.currentTimeMillis()) to help inform listeners that
wish to implement scheduling policies based on when the device became
idle.
The API change here is a tiny one: a dump(PrintWriter) method has been
added to the TokenWatcher class to facilitate getting information out
of it for dumpsys purposes. UpdateLock itself is still @hide.
Bug 5543442
Change-Id: I3709c831fc1883d7cb753cd2d3ee8e10a61e7e48
SerialManager: provides access to serial ports
SerialPort: for reading and writing data to and from serial ports
IO with both array based and direct ByteBuffers is supported.
Accessing serial ports requires android.permission.SERIAL_PORT permission
Each platform must configure list of supported serial ports in the
config_serialPorts resource overlay
(this is needed to prevent apps from accidentally accessing the bluetooth
or other system UARTs).
In addition, the platform uevent.rc file must set the owner to the
/dev/tty* files to "system" so the framework can access the port.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Added new API to enable cancelation of SQLite and content provider
queries by means of a CancelationSignal object. The application
creates a CancelationSignal object and passes it as an argument
to the query. The cancelation signal can then be used to cancel
the query while it is executing.
If the cancelation signal is raised before the query is executed,
then it is immediately terminated.
Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
o Add NdefRecord.toMimeType()
Maps the record to a MIME type
o Add NdefRecord.toUri()
Maps the record to a URI
o Add hidden NfcAdapter.dispatch()
Helps test the dispatch path.
o Modify createMime(), createUri() and createExternal():
Do not try and strictly follow RFC requirements for URI or MIME content
types. This just leads to heartbreak - the RFC requirements are too strict.
For example RFC1341 forbids the use of '.' in a MIME type, however this is in
common use in types such as "application/vnd.companyname". I think the best
approach is to only remove 'obvious' whitespace issues, and to convert
uppercase to lowercase as per Android guidelines.
Change-Id: Id686f5f3b05b2dceafad48e1cfcbdb2b3890b854
* commit 'aed4ced6556383483209f454c9e4872e8ad28ebf':
Android U Class: Developing Android Applications for the Enterprise. This class uses a sample app.
This change adds the text for the AndroidU lesson "Designing for Multiple
Screens", which shows how to write applications that adapt properly
to screen size, density and orientation for maximum compatibility.
Update makefile and resources-data.js for rendering source in HTML
Add ZIP file for sample
Change-Id: I671bb3063d5bf02681bc547ffe5262a9df22037a
1. Moving Accerssibility Service sample into ApiDemos since
we are putting all accessibility samples there.
Change-Id: If2deec7f6ad49b0d50112300eda0f7cb48660450
$(LOCAL_BUILT_MODULE) of the module framework points to a
product-specific file (required by dex-preopt), which is nuked by installclean.
While the result of $(java-lib-deps) points to a file in the common
directory.
This change reduces the incremental build time significantly:
It takes around 7 minutes to run "make instalclean && make" without this
change v.s. 3 minutes with this change.
So it will save lots of build time when switching between user, userdebug
and eng builds on the build server.
Change-Id: I832bafca04677af561bb0c28e2e0260f633b96a1
Remote control displays expose an IRemoteControlDisplay interface
which they register through AudioManager.
Remote control clients create a RemoteControlClient object, which
implicitely exposes an IRemoteControlClient interface registered
in AudioService through AudioManager.
AudioService tells all clients and displays when a new client
is the one that should be displayed.
A client's data gets sent to the display when it is valid, or
it sets new data (while being valid).
The implementation for setting metadata and album art is temporary,
and will migrate to the MetadataEditor API in future CLs.
Change-Id: Ibab6ea1d94c68f32482c760c6ae269541f885548
Define a RemoteControlClient interface that applications must
implement and register to be displayed on the lockscreen.
Change-Id: I67276ae653f203e76727432231f1d76535c31942
Extend the media button event registration AudioManager API to
enable applications to register as a client of "remote controls"
and let them provide information meant to be displayed
by the remotes.
AudioService sends a AudioManager.REMOTE_CONTROL_CLIENT_CHANGED
intent to let remote controls know when / from whom they can
retrieve the information to display.
Only application that own audio focus, are the currently
registered media button event receiver, and have registered
a remote control client, are eligible to appear on the
remote control.
To address in future CLs:
- change how a remote control client forces a refresh
- rename methods called under lock to ___Locked()
- make API public
Change-Id: Icca30ab05dac2605ee9246f8acb27a03dcea077a
This changes adds an API for system applications
to enable bluetooth without all the side effects like
auto connection to headsets etc.
Also some tweaks to the adapter state machine
Change-Id: Ib9f22d548a26d72334b300101c8eb0d80f08a4bb
First stage. Get the bones in right now even though
we are not ready on the native side.
Once, we have things underneath working - we will further update the
framework
Change-Id: I4a7dab5cd4267373dc5f8989ae4122f91c384ed5
Bug: 4176026
This CL inherits https://android-git.corp.google.com/g/112600
Spec of TextServiceManager
- Chooses the most applicable TextService(e.g. SpellCheckerService, WordBreakIteratorService..)
for each locale
Spec of SpellCheckerService
- Returns whether the given string is a correct word or not
- Returns Suggestions for the given string
Change-Id: Iaa425c7915fe70767ad0b17bf6c6fbcd2a1200b2