6440 Commits

Author SHA1 Message Date
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
Sailesh Nepal
b84663ff34 Merge "Add audio mode APIs" into master-nova 2014-03-25 00:17:01 +00:00
Jose Lima
3be15cb39b am 41c2d2ce: Merge "resolved conflicts for merge of 6c45157c to master"
* commit '41c2d2cec3f46b28f535e9cd7f5b9da02280ccfe':
  Added isGame application tag to the manifest
2014-03-24 15:38:02 -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
e25ad4fbe7 am 1c855178: am 775a097f: am 3c34e5db: am c01e1aeb: Merge "Add HdmiCecManager" into klp-modular-dev
* commit '1c855178e497f7ba788dadb87167f1e6735d10cb':
  Add HdmiCecManager
2014-03-24 14:30:39 -07:00
Chris Craik
58de1c2b7e am 76c30ce3: Merge "Rework Outline API, remove isolatedZVolume remnants"
* commit '76c30ce3c1d8f1a818502aaea2c42c84d6bd3f92':
  Rework Outline API, remove isolatedZVolume remnants
2014-03-24 14:27:11 -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
144de5a5da am 48a5dbd3: Update current.txt for offset attributes.
* commit '48a5dbd3cc5dd8a919983455757dc4c7b82500ab':
  Update current.txt for offset attributes.
2014-03-24 13:31:08 -07: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
Yorke Lee
730793bb19 Merge "Add gateway support to frameworks/base/telecomm" into master-nova 2014-03-24 18:35:57 +00: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
Will Haldean Brown
b51f5112fb am bdb78d82: am ede2a729: am ccd55a92: am f8c78b50: Update current.txt to include windowSwipeToDismiss
* commit 'bdb78d8261c61e8b1c30af7ff2a39cc91026aa02':
  Update current.txt to include windowSwipeToDismiss
2014-03-24 10:38:54 -07: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
Sailesh Nepal
4cff392a2b Add audio mode APIs
Change-Id: Ia7e78b52b6b30f99a9ba066dae558a105dbebd96
2014-03-23 18:20:53 -07: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
a4796e0da7 am 61ada5d3: Merge "Add Activity methods for icons and labels."
* commit '61ada5d330e10a738ba5f085cae5b9b339895d19':
  Add Activity methods for icons and labels.
2014-03-22 16:50:28 -07: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
b7d975eeb6 am 9ae0c8ff: Merge "Add notification category for recommendations."
* commit '9ae0c8ffba5ab50fb02d319a00e56fe42960cb4a':
  Add notification category for recommendations.
2014-03-21 18:40:38 -07:00
Yorke Lee
93fb1d00bc Add gateway support to frameworks/base/telecomm
Add parcelable GatewayInfo class used to store gateway info in
Call and CallInfo.

Add gateway-related string constants to TelecommConstants

Bug: 13477768
Change-Id: I35b2de2d66edeed6273f6cba5329ca0f26264db6
2014-03-21 18:36:26 -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
6418a7d30c am 8a60ded0: Merge "resolved conflicts for merge of a67e34c8 to master"
* commit '8a60ded02614bc8358f89aa9b7cf3f8e7b1383a2':
  Add HDMI-CEC service
2014-03-21 13:23:05 -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
03e5344f06 am 824ad0e6: Merge "Unhide notification category."
* commit '824ad0e6f9c799f5b0faa2024e35fc6e714a681a':
  Unhide notification category.
2014-03-21 07:31:28 -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
3defcfc741 am 6b904c8f: Merge "App widget backup/restore infrastructure"
* commit '6b904c8ffd8c044a9258db495b0cc7e5c5032e59':
  App widget backup/restore infrastructure
2014-03-20 12:53:28 -07: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
f76b62f19e am 8e3feb15: Added accessibility APIs for introspecting interactive windows.
* commit '8e3feb15c5aec2c72b0ef120a1da325e1e8f0dda':
  Added accessibility APIs for introspecting interactive windows.
2014-03-20 09:56:59 -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
f198863c3c am 07cf4da1: Merge "Add stream-level suppression to vibrate/audio services."
* commit '07cf4da1d004b145ba8b9055bbff314ef68528f3':
  Add stream-level suppression to vibrate/audio services.
2014-03-19 15:02:26 -07: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
Sailesh Nepal
ba4cc4e083 Merge "frameworks/base: Use Uri for handle" into master-nova 2014-03-18 19:27:35 +00:00
Shishir Agrawal
2ba480536f Merge "Modify TelephonyManager to expose sendEnvelopeWithStatus instead of sendEnvelope." into master-nova 2014-03-18 18:51:05 +00:00
Ruben Brunk
8725e00648 am 6dc379c7: hal3: Add missing available mode tags.
* commit '6dc379c7bd34d9707ee2ef819a5a07afc2aa9314':
  hal3: Add missing available mode tags.
2014-03-18 11:23:55 -07:00