6205 Commits

Author SHA1 Message Date
Craig Mautner
61ada5d330 Merge "Add Activity methods for icons and labels." 2014-03-22 23:44:37 +00:00
Craig Mautner
2fbd754180 Add Activity methods for icons and labels.
New Activity methods setRecentsLabel(CharSequence) and
setRecentsIcon(Bitmap) have been added. The topmost
activity with either of these set will be returned in
RecentTaskInfo members activityLabel and activityIcon.

Fixes bug 13562992.

Change-Id: Ic15d1d27b733b892a2a940063b105ac48f1ffee5
2014-03-22 16:39:33 -07:00
John Spurlock
9ae0c8ffba Merge "Add notification category for recommendations." 2014-03-22 01:35:46 +00:00
John Spurlock
0a69c8c4bd Add notification category for recommendations.
Change-Id: I3718b8273c3f901aee1b2c2cdc4fcdae25fadcad
2014-03-21 21:33:37 -04:00
Colin Cross
a42cb8b0e2 resolved conflicts for merge of a67e34c8 to master
Change-Id: I597525886260884c9b2dfc7945e01eb8138a58c2
2014-03-21 13:11:02 -07:00
John Spurlock
fd7f1e0039 Unhide notification category.
Rename @hidden Notification.kind -> category, and flesh out
shared values.  Now a single value.

Update framework references, remove unused SystemUpdateService
magic value unused since 2012.

Change-Id: If06d19ff3a8c3125fca1457f5d3c665e2939c66c
2014-03-21 09:25:00 -04:00
Jinsuk Kim
f2fecf48f7 am c61f4dd7: Merge "Add HDMI-CEC service" into klp-modular-dev
* commit 'c61f4dd744b1b0396703aa58eb22fc31d2b7050e':
  Add HDMI-CEC service
2014-03-21 02:37:00 +00:00
Jinsuk Kim
c61f4dd744 Merge "Add HDMI-CEC service" into klp-modular-dev 2014-03-21 02:32:38 +00:00
Christopher Tate
adfe8b86e9 App widget backup/restore infrastructure
Backup/restore now supports app widgets.

An application involved with app widgets, either hosting or publishing,
now has associated data in its backup dataset related to the state of
widget instantiation on the ancestral device.  That data is processed
by the OS during restore so that the matching widget instances can be
"automatically" regenerated.

To take advantage of this facility, widget-using apps need to do two
things:  first, implement a backup agent and store whatever widget
state they need to properly deal with them post-restore (e.g. the
widget instance size & location, for a host); and second, implement
handlers for new AppWidgetManager broadcasts that describe how to
translate ancestral-dataset widget id numbers to the post-restore
world.  Note that a host or provider doesn't technically need to
store *any* data on its own via its agent; it just needs to opt in
to the backup/restore process by publishing an agent.  The OS will
then store a small amount of data on behalf of each widget-savvy
app within the backup dataset, and act on that data at restore time.

The broadcasts are AppWidgetManager.ACTION_APPWIDGET_RESTORED and
ACTION_APPWIDGET_HOST_RESTORED, and have three associated extras:

    EXTRA_APPWIDGET_OLD_IDS
    EXTRA_APPWIDGET_IDS
    EXTRA_HOST_ID [for the host-side broadcast]

The first two are same-sized arrays of integer widget IDs.  The
_OLD_IDS values are the widget IDs as known to the ancestral device.
The _IDS array holds the corresponding widget IDs in the new post-
restore environment.  The app should simply update the stored
widget IDs in its bookkeeping to the new values, and things are
off and running.  The HOST_ID extra, as one might expect, is the
app-defined host ID value of the particular host instance which
has just been restored.

The broadcasts are sent following the conclusion of the overall
restore pass.  This is because the restore might have occurred in a
tightly restricted lifecycle environment without content providers
or the package's custom Application class.  The _RESTORED broadcast,
however, is always delivered into a normal application environment,
so that the app can use its content provider etc as expected.

*All* widget instances that were processed over the course of the
system restore are indicated in the _RESTORED broadcast, even if
the backing provider or host is not yet installed.  The widget
participant is responsible for understanding that these are
promises that might be fulfilled later rather than necessarily
reflecting the immediate presentable widget state.  (Remember
that following a cloud restore, apps may be installed piecemeal
over a lengthy period of time.)  Telling the hosts up front
about all intended widget instances allows them to show placeholder
UI or similarly useful information rather than surprising the user
with piecemeal unexpected appearances.

The AppWidgetProvider helper class has been updated to add a new
callback, onRestored(...), invoked when the _RESTORED broadcast
is received.  The call to onRestored() is immediately followed by
an invocation of onUpdate() for the affected widgets because
they will need to have their RemoteViews regenerated under the
new ID values.

Bug 10622506
Bug 10707117

Change-Id: Ie0007cdf809600b880d91989c00c3c3b8a4f988b
2014-03-20 12:30:51 -07:00
Svetoslav
8e3feb15c5 Added accessibility APIs for introspecting interactive windows.
1. The old introspection model was allowing querying only the active window
   which is the one the user is touching or the focused one if no window is
   touched. This was limiting as auto completion drop downs were not inspectable,
   there was not way to know when the IME toggles, non-focusable windows were
   not inspectable if the user taps them as until a screen-reader starts
   introspecting the users finger is up, accessibility focus was limited to
   only one window and the user couldn't use gestures to visit the whole UI,
   and other things I can't remember right now.

   The new APIs allow getting all interactive windows, i.e. ones that a
   sighted user can interact with. This prevents an accessibility service
   from interacting with content a sighter user cannot. The list of windows
   can be obtained from an accessibility service or the host window from an
   accessibility node info. Introspecting windows obey the same rules for
   introspecting node, i.e. the service has to declare this capability
   in its manifest.

   When some windows change accessibility services receive a new type
   of event. Initially the types of windows is very limited. We provide
   the bounds in screen, layer, and some other properties which are
   enough for a client to determined the spacial and hierarchical
   relationship of the windows.

2. Update the documentation in AccessibilityService for newer event types.

3. LongArray was not removing elements properly.

4. Composite accessibility node ids were not properly constructed as they
   are composed of two ints, each taking 32 bits. However, the values for
   undefined were -1 so composing a 64 long from -1, -1 prevents from getting
   back these values when unpacking.

5. Some apps were generating inconsistent AccessibilityNodeInfo tree. Added
   a check that enforces such trees to be well formed on dev builds.

6. Removed an necessary code for piping the touch exploration state to
   the policy as it should just use the AccessibilityManager from context.

7. When view's visibility changed it was not firing an event to notify
   clients it disappeared/appeared. Also ViewGroup was sending accessibility
   events for changes if the view is included for accessibility but this is
   wrong as there may be a service that want all nodes, hence events from them.
   The accessibility manager service takes care of delivering events from
   not important for accessibility nodes only to services that want such.

8. Several places were asking for prefetching of sibling but not predecessor
   nodes which resulted in prefetching of unconnected subtrees.

9. The local AccessibilityManager implementation was relying on the backing
   service being ready when it is created but it can be fetched from a context
   before that. If that happens the local manager was in a broken state forever.
   Now it is more robust and starts working properly once the backing service
   is up. Several places were lacking locking.

bug:13331285

Change-Id: Ie51166d4875d5f3def8d29d77973da4b9251f5c8
2014-03-20 16:52:59 +00:00
Jinsuk Kim
4f512fb451 Add HDMI-CEC service
This CL adds a system service handling HDMI-CEC protocol. The service
is equipped with the capability sending/receiving HDMI-CEC messages

Not all the messages are in place. Currently it has messages to support
a few features only, as follows:

- One touch play
- System information
- Routing control (partially - active source status maintenance only)
- Device OSD transfer
- Power status

It will be extended to cover the wider usages in the follow up CLs.

The CEC standard version referenced in the implementation is 1.3a.

Change-Id: Ifed0b02f52ebf098eddb3bd0987efbf353b7e8fe
2014-03-20 16:40:22 +09:00
John Spurlock
1af30c7ac4 Add stream-level suppression to vibrate/audio services.
- Add new audio restriction layer to app-ops.  Restrictions add
additional constraints to audio operations at a stream-level.
Restrictions do not affect the persistable state, and are purely
additive: that is, they can only impose additional contstraints, not
enable something that has already been disabled.  Restrictions
also support a whitelisted set of exempt package names.

- Add new audio stream-level checks to app-ops.

- Implement a provisional OP_PLAY_AUDIO suppression to three
java entry points MediaPlayer, AudioTrack, & SoundPool.

- Enhance vibrator api to take stream information as an optional
hint - the constants correspond to AudioManager stream types.
OP_VIBRATE now supports the stream-level restriction check.

- Simplify Vibrator subclasses by adding default implementations
for two .vibrate calls.

- Migrate NoMan's zen-mode control to use the new app-ops
stream-level restriction mechanism.

Change-Id: Ifae8952647202f728cf1c73e881452660c704678
2014-03-19 15:32:51 -04:00
Ruben Brunk
6dc379c7bd hal3: Add missing available mode tags.
Change-Id: I588aacade5c5638967970e2e7eb04924c0ea9cc7
2014-03-18 11:13:44 -07:00
Chris Craik
db62c232b9 Merge "Remove castsShadow and globalCamera APIs" 2014-03-17 21:03:15 +00:00
Chris Craik
34f67f26e3 Remove castsShadow and globalCamera APIs
Change-Id: I5c1c375f45946609b1635d952c5adf55e23bdd60
2014-03-17 13:24:08 -07:00
Dianne Hackborn
4c1d506d7b Merge "Start enforcing explicit intents for Context.bindService()" 2014-03-17 19:30:43 +00:00
Chris Craik
618236fe88 Revert "Remove castsShadow and globalCamera APIs"
This reverts commit 0334c314a5721f49b4d172a9cefe10f157cb28a4.

Change-Id: I64714d17fb877e1b43c65eb44820d1128281c7a2
2014-03-17 19:27:49 +00:00
Dianne Hackborn
10ad98223f Start enforcing explicit intents for Context.bindService()
No longer prints a warning, now throws an exception.

Also fix a bug in UserManagerService that was causing an
exception while booting.

Change-Id: I3b43cfe08067da840b6850b9bed58664d36d34f1
2014-03-17 11:28:36 -07:00
Chris Craik
0334c314a5 Remove castsShadow and globalCamera APIs
Change-Id: I4d81a7849eba60a1a9debce74eedd55d6331842d
2014-03-17 18:13:31 +00:00
Jessica Hummel
03dd22079c Standardize the provisioning intent action.
Change-Id: Iea7f8827cf4b52e2e97e8675687412108dd917e4
2014-03-17 16:53:27 +00:00
Ruben Brunk
38900b1554 Merge "hal3: Add availableHotPixelModes, update modes." 2014-03-15 00:14:56 +00:00
Craig Mautner
421a1dd197 Merge "Launch new tasks with Doc Centric flag." 2014-03-14 21:43:28 +00:00
Craig Mautner
d00f47402c Launch new tasks with Doc Centric flag.
Introduction of new Intent flag FLAG_ACTIVITY_NEW_DOCUMENT. When
this flag is set the target activity will be launched in its own
task. This is the start of the new Doc Centric mode of working.

Change-Id: I719168532134ab2c5ea3300df676c2b2a0e81795
2014-03-14 14:42:23 -07:00
Tim Kilbourn
9b18001ab5 am ec033943: am 9873e099: am 55740325: Merge "Add leanback device features." into klp-modular-dev
* commit 'ec0339437869ebb42a67a2811dc6de31239d5d62':
  Add leanback device features.
2014-03-14 20:50:40 +00:00
Tim Kilbourn
9873e099c3 am 55740325: Merge "Add leanback device features." into klp-modular-dev
* commit '557403250b9accf4f17ab87f636f1722949960a3':
  Add leanback device features.
2014-03-14 20:42:18 +00:00
Ruben Brunk
9d454fd609 hal3: Add availableHotPixelModes, update modes.
Bug: 12957573
Change-Id: I2fd6ef60bf98c53288c2bc343d82a06602474916
2014-03-14 13:35:57 -07:00
Jose Lima
92703e62c1 resolved conflicts for merge of 4882ddfa to master
Change-Id: I179899697c148ac34a67b195e2dbd3df2f9138de
2014-03-13 21:26:48 -07:00
Hui Shu
57ad97fb70 Merge "Add removeApi commandline option for doclava and an empty removed.txt" 2014-03-13 22:11:41 +00:00
Tim Kilbourn
f94b6a93a4 Add leanback device features.
android.software.leanback - the device supports leanback UIs.
android.software.leanback_only - the device ONLY supports leanback UIs.

leanback_only is a hidden feature for now.

Change-Id: I497bd96464125ad81212c804e150f210f3e95af2
2014-03-13 15:02:54 -07:00
Jose Lima
53ac5ef214 am 91726f4e: Merge "Add banner attribute to app manifest" into klp-modular-dev
* commit '91726f4ea7b60025490209ccb2637d712e8d75fd':
  Add banner attribute to app manifest
2014-03-13 18:02:50 +00:00
Jose Lima
f78e312db2 Add banner attribute to app manifest
Change-Id: I28b0dc6dee9623ec7534bb0e741b88f439b48c9f
2014-03-12 18:07:38 -07:00
RoboErik
4224e83642 Merge "Adds a TransportController and TransportPerformer to session" 2014-03-12 22:14:50 +00:00
RoboErik
8ae0f34db9 Adds a TransportController and TransportPerformer to session
This makes transport controls a primitive interface on sessions with
a way to create the performer, register callbacks, and send commands
and updates between controllers and performers. This still needs some
cleanup but has been tested with OneMedia.

Change-Id: I373d35f7ccc383b8421bd14044457467d80425f3
2014-03-12 15:09:42 -07:00
Jose Lima
9d50ea90f7 am c770e064: am dd0db799: am 5f0c0498: Merge "Added LEANBACK_LAUNCHER Intent category" into klp-modular-dev
* commit 'c770e064effb79c33472f54652bd95aa14a8d6ec':
  Added LEANBACK_LAUNCHER Intent category
2014-03-12 15:19:37 +00:00
Neil Fuller
ad895779f8 Merge "Add APIs for better interoperability with Java 1.7" 2014-03-12 11:46:11 +00:00
Jose Lima
dd0db799ee am 5f0c0498: Merge "Added LEANBACK_LAUNCHER Intent category" into klp-modular-dev
* commit '5f0c0498a1382ef955cccca95920ec878fe2a64c':
  Added LEANBACK_LAUNCHER Intent category
2014-03-11 19:19:11 +00:00
Winson Chung
303e1ff1fe Initial changes for recents.
Change-Id: Ide2c202b4a5b25410f0f32bd0a81ccf817ede38f
2014-03-11 12:03:08 -07:00
Jessica Hummel
f72078bdc5 Move the provisioning intents to DevicePolicyManager.
Change-Id: Ibde867b193e64c1fda8d9c84b0d1be36a1592035
2014-03-11 18:05:29 +00:00
Jose Lima
38b75b6126 Added LEANBACK_LAUNCHER Intent category
Change-Id: I4f5ccfa9725106f558972c73abbe3f9435267c75
2014-03-11 10:43:31 -07:00
Alan Viverette
ba346f9d8d Unify touch feedback drawable and reveal drawable
BUG: 13030730
Change-Id: I65a50a00bd76b80bb242b1573b89e443e2e143fe
2014-03-10 19:09:28 -07:00
Robert Shih
f0768d71bd Merge "MediaMuxer: added WebM filetype; open output file RW." 2014-03-10 19:02:34 +00:00
Paul Lawrence
2bc6857532 Merge "Clean up a few minor issues" 2014-03-10 16:41:22 +00:00
Jessica Hummel
409a688fc6 Fix build
Change-Id: Ie0741d34044f4b1ba92de8d9d91502f37b223507
2014-03-10 10:57:01 +00:00
Jessica Hummel
df897d08ce Merge "Extend DeviceAdminReceiver to receive provisioning complete broadcast." 2014-03-10 09:29:25 +00:00
Jeff Brown
2901e0442a am 9e3de5f7: am 6f9f8e7a: am 01b5e765: Merge "Declare KEYCODE_SLEEP and KEYCODE_WAKEUP." into klp-modular-dev
* commit '9e3de5f70d77f7152b25fec6c27b73d037c1376d':
  Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
2014-03-08 05:43:12 +00:00
Jeff Brown
6f9f8e7aad am 01b5e765: Merge "Declare KEYCODE_SLEEP and KEYCODE_WAKEUP." into klp-modular-dev
* commit '01b5e765e59c14cdfb62f1a8684e9116a46874d2':
  Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
2014-03-07 23:39:12 +00:00
Jeff Brown
6212a49a94 Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
These new keys behave in similarly to KEYCODE_POWER but do not
simply toggle between awake and asleep states.

Sleep puts the device to sleep if it is awake.
Wakeup wakes up the device if it is asleep.

Bug: 12938999
Change-Id: I260fb918cc858882fe06fa880910df5763a76c5d
2014-03-07 14:02:55 -08:00
Chris Craik
b3a8b2c823 Hide isolatedZVolume API
Change-Id: Ia3a70aaac3d7027285a7510d6fed9ca3548a0bf1
2014-03-07 13:10:30 -08:00
Neil Fuller
38ce4c0f83 Add APIs for better interoperability with Java 1.7
Must be committed at the same time as the change in libcore
to update the public API footprint.

See commit 803b527995177a798499552ab1d15dbdac2ab976 in libcore.

Change-Id: Ic3af8dc762a20640ea9b7f08c6339fc36982224c
2014-03-07 15:25:29 +00:00
Chris Craik
b7d0cfa0d8 Merge "Add Path.isConvex, and force View outlines to be convex" 2014-03-06 18:18:59 +00:00