6292 Commits

Author SHA1 Message Date
Matt Casey
ca04d71853 Merge "Add a mediastore constant for playlists." 2014-03-27 15:43:19 +00:00
Dan Sandler
a55734aaed Introduce CATEGORY_NOTIFICATION_PREFERENCES.
Allows applications to advertise to the system an Activity
where the user can configure the app's notifications. Will
be used by the Settings app.

Change-Id: Iafe7de79e20046d5655fda3f3a3cba9f5db059c4
2014-03-27 00:34:44 -04:00
Alan Viverette
a5df8067ec Make quantum text styles public
Change-Id: I6deab6eb712d0910cddf1e8daeddf4737d39ba58
2014-03-26 18:41:14 -07:00
Dianne Hackborn
27832b0e88 Fix build.
And prevent it from breaking again like this.

Change-Id: I68ca200714420ead41bdaa96fe320260ecddb426
2014-03-26 18:12:10 -07:00
Alan Viverette
2c5d6d742a Merge "Separate ripple animation logic, remove RevealDrawable" 2014-03-27 00:31:53 +00:00
John Hoford
49224acd78 Merge "add Dynamic Drawable (vector graphics for Icons)" 2014-03-27 00:14:14 +00:00
Matt Casey
1dbf1f81e2 Add a mediastore constant for playlists.
This is a followup to https://googleplex-android-review.git.corp.google.com/415218

I'm writing this change at the request of elmas@.

Bug: 13657009
Change-Id: I970cc59a33af2162c2488c4ddf628f7a73009cd6
2014-03-26 17:09:56 -07:00
John Hoford
abb7d134c0 add Dynamic Drawable (vector graphics for Icons)
Change-Id: Id44b7f6d1b8dd073b8ed35e2142a380550f2449b
2014-03-26 16:59:54 -07:00
Alan Viverette
47bf0d95ef Separate ripple animation logic, remove RevealDrawable
Change-Id: I9d0370cea288e6caf518209b5bc94a66a0f9176f
2014-03-26 16:43:07 -07:00
Selim Gurun
5632dc1cf0 Merge "Revert "Support for new gTLDs"" 2014-03-26 22:37:24 +00:00
Selim Gurun
a739994d60 Revert "Support for new gTLDs"
This reverts commit d3ff8bdf92c23d596f3e4701455223f9e3ac8873.

Change-Id: I2006c4fcca54a4bc3b680ea0b0600b359cac6ca3
2014-03-26 22:33:49 +00:00
Selim Gurun
5579eb9b16 Merge "Support for new gTLDs" 2014-03-26 21:42:52 +00:00
Michael Wright
1e3c93975e Adds API for determining confirm and cancel keys.
Bug: 13624048
Change-Id: I9f42eeb9c3a6bdae35eb0d7213fb4ac0fd8dc0d9
2014-03-26 14:40:42 -07:00
Alan Viverette
1cd4612cc0 Fix attribute extraction, use color attrs in Quantum drawables
Removes some unused entries in the Quantum themes and styles and
collapses identical styles since we don't have separate drawables
anymore. Adds some Quantum text appearances as styles.

BUG: 12368046
Change-Id: I9334feb87391cd54ad3b77b297d135de436e1417
2014-03-26 12:33:48 -07:00
Yuhao Zheng
10bf6354a5 Wifi hotspot stack initial hook up
Add a dummy wifi hotspot service for futher development use. This is to
resolve the different between master branch and kwd branch, such that future
development can go into kwd and being auto-merged to master.

bug: 5485670
Change-Id: Ica58de445dd050a9f0b817f8e4accaa2478299c5
2014-03-25 15:00:45 -07:00
Zhijun He
8dda7273db Camera2: Add partial flash state
Bug 13637334

Change-Id: Ife5d943851f3f47d33b05d7450765dd273eb1036
2014-03-25 13:49:30 -07:00
Alan Viverette
840dede901 Unhide touch feedback drawable and wrapper
Change-Id: I98926d4adfb6e8c6130b31c8f4534a1a382d0f3b
2014-03-24 19:54:34 -07:00
Alan Viverette
9bbbee116e Merge "Implement APIs for obtaining, caching themed Drawables" 2014-03-25 01:26:15 +00:00
Alan Viverette
52b999f072 Implement APIs for obtaining, caching themed Drawables
When Drawables are inflated during preload (or otherwise without a theme)
they cache their themeable attributes in their constant state as an array
keyed on attribute index. Drawables inflated with a theme will simply
resolve theme attributes as part of normal inflation, and they will not
cache any themeable attributes.

Drawables obtained from Resources are pulled from theme-specific cache
when possible. If an unthemed Drawable exists in the preload cache, a
new constant state will be obtained for the Drawable and the theme will
be applied by resolving the cached themeable attributes and overwriting
their respective constant state properties. If no cached version exists,
a new Drawable is inflated against the desired theme.

Constant states from themed drawables may be cached if the applied theme
is "pure" and was loaded from a style resource without any subsequent
modifications.

This CL does not handle applying themes to several Drawable types, but it
fully supports BitmapDrawable, GradientDrawable, NinePatchDrawable,
ColorDrawable, and TouchFeedbackDrawable.

BUG: 12611005
Change-Id: I4e794fbb62f7a371715f4ebdf946ee5f9a5ad1c9
2014-03-24 18:00:26 -07:00
Jose Lima
e911813840 resolved conflicts for merge of 6c45157c to master
Change-Id: I95d7f927f4321405318b44a21172b99f3f16e00a
2014-03-24 15:33:25 -07:00
Jinsuk Kim
1c855178e4 am 775a097f: am 3c34e5db: am c01e1aeb: Merge "Add HdmiCecManager" into klp-modular-dev
* commit '775a097f01a349548d2124ae9d7dd562c72eaa27':
  Add HdmiCecManager
2014-03-24 21:25:21 +00:00
Chris Craik
76c30ce3c1 Merge "Rework Outline API, remove isolatedZVolume remnants" 2014-03-24 21:22:36 +00:00
Will Haldean Brown
48a5dbd3cc Update current.txt for offset attributes.
Change-Id: I0f88a6f327edfc207c081e424e3c97edd1451c90
2014-03-24 13:23:42 -07:00
Chris Craik
b49f446c98 Rework Outline API, remove isolatedZVolume remnants
Change-Id: I30c2fe832dcb98fa6329b1a595b3d3aafbdcad6b
2014-03-24 11:37:06 -07:00
John Spurlock
e2cae0a657 am 2b45d84e: Merge "Unhide Notification kind, rename to category." into klp-modular-dev
* commit '2b45d84e24946d0cbbcc577ca3e195c0db687c9a':
  Unhide Notification kind, rename to category.
2014-03-24 17:44:53 +00:00
John Spurlock
2b45d84e24 Merge "Unhide Notification kind, rename to category." into klp-modular-dev 2014-03-24 17:38:44 +00:00
Will Haldean Brown
bdb78d8261 am ede2a729: am ccd55a92: am f8c78b50: Update current.txt to include windowSwipeToDismiss
* commit 'ede2a729c394461e5b3ea674e4762e7e6feed81d':
  Update current.txt to include windowSwipeToDismiss
2014-03-24 17:34:18 +00:00
Jose Lima
d13d701681 am eb2c85df: Merge "Added isGame application tag to the manifest" into klp-modular-dev
* commit 'eb2c85df4b2d8ea5dd3cd08cb0367d5ff666afe6':
  Added isGame application tag to the manifest
2014-03-24 15:53:24 +00:00
Jose Lima
eb2c85df4b Merge "Added isGame application tag to the manifest" into klp-modular-dev 2014-03-24 15:49:18 +00:00
John Spurlock
cf44a124ab Unhide Notification kind, rename to category.
Change-Id: I8e6d5a30dff519d7ed4f38e018646dd2bc55db33
2014-03-24 11:02:36 -04:00
Jinsuk Kim
3c34e5dbbb am c01e1aeb: Merge "Add HdmiCecManager" into klp-modular-dev
* commit 'c01e1aeb0d86bd626684c97d709d4a8e995fddfb':
  Add HdmiCecManager
2014-03-24 12:26:51 +00:00
Jinsuk Kim
c01e1aeb0d Merge "Add HdmiCecManager" into klp-modular-dev 2014-03-23 23:24:44 +00:00
Jinsuk Kim
fbcd503645 Add HdmiCecManager
Introduces HdmiCecManager/HdmiCecClient to provide apps/system components
with the way to access HdmiCecService via Context.getSystemService(HDMI_CEC_SERVICE).

Change-Id: I39da071a328074a4b7b049947943688bd7779c26
2014-03-24 08:19:39 +09:00
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
Selim Gurun
d3ff8bdf92 Support for new gTLDs
Bug: 13006774

Add support for new generic Top-Level Domains (gTLDs) from ICANN
and deprecate the public APIs that depend on them. Due to the
fast profileration of gTLDs, it has become hard to keep this API
up-to-date. Further it already fails to recognize internal domains.
We thus replace them with simple "any letter sequence" regexps.

Change-Id: Ib6cb5360bbb4a02b14bb34acb30d1cc8ddec771b
2014-03-21 15:29:01 -07:00
Jose Lima
12d0b4cd96 Added isGame application tag to the manifest
Added the ability to flag applications as Games in the manifest,
so they can receive a different treatment in the UI.

Change-Id: I4c36bc1a96757030fad58ee050cd68491b31bb6c
2014-03-21 15:14:45 -07:00
Colin Cross
a42cb8b0e2 resolved conflicts for merge of a67e34c8 to master
Change-Id: I597525886260884c9b2dfc7945e01eb8138a58c2
2014-03-21 13:11:02 -07:00
Will Haldean Brown
ccd55a924a am f8c78b50: Update current.txt to include windowSwipeToDismiss
* commit 'f8c78b50fc9f6c81c7ad5d76c81445653dcf3cd9':
  Update current.txt to include windowSwipeToDismiss
2014-03-21 19:02:16 +00:00
Will Haldean Brown
f8c78b50fc Update current.txt to include windowSwipeToDismiss
Change-Id: I5cbee85f7fe852e534a722083feead7359404732
2014-03-21 11:34:13 -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