78 Commits

Author SHA1 Message Date
Tyler Gunn
6baa707133 Merge "Add PhoneAccount capability to indicate if VT uses presence." 2015-12-12 00:38:12 +00:00
Julia Reynolds
41c264bae1 Merge "Add importance to notification guts." 2015-12-11 21:41:32 +00:00
Julia Reynolds
ead00aac15 Add importance to notification guts.
Note: the guts are still trucated to the height of the notification.
The slider initially shows the importance of the individual notification,
but changing the slider changes the importance for the whole group
of notifications.

Bug: 22451710

Change-Id: Id6de3aaace2bdb88a8cc5db517002dc7f0e349ae
2015-12-11 14:57:47 -05:00
Jeff Sharkey
b642387b43 Cleaner API for requesting locked status.
Change-Id: I1a5a6703737fb838347eaa292004430f2b9d29c3
2015-12-11 11:15:37 -07:00
Ronghua Wu
31788966a8 Merge "media: Add MIMETYPE_VIDEO_DOLBY_AVC and MIMETYPE_VIDEO_DOLBY_HEVC." 2015-12-11 17:47:43 +00:00
Prashant Malani
04b4819fcf Remove hide annotation from AXIS_SCROLL
Bug: 22836852
Bug: 18707397
Change-Id: I77ec72cf577cb68782b9954f4d40845d723a7685
2015-12-10 15:09:45 -08:00
Ronghua Wu
58a30f1cf6 media: Add MIMETYPE_VIDEO_DOLBY_AVC and MIMETYPE_VIDEO_DOLBY_HEVC.
Bug: 25684127
Change-Id: I535b1971e0fe6b19e5182b09ca04b69b337a8474
2015-12-10 12:36:14 -08:00
Yohei Yukawa
ac0ec1b020 Merge "Use BCP-47 LanguageTag in IME/Spell-Checker." 2015-12-10 17:45:18 +00:00
Insun Kang
880677bdda Merge "MediaRouter: Add getDeviceType() to RouteInfo" 2015-12-10 02:57:29 +00:00
Filip Gruszczynski
ac7518854e Merge "Remaining APIs for freeform window caption." 2015-12-10 01:57:10 +00:00
Tyler Gunn
9a365756b3 Add PhoneAccount capability to indicate if VT uses presence.
Added new PhoneAccount capability used to indicate whether the dialer
should use the presence bit in the contacts provider to determine when
the video call icon is shown or not.

Bug: 20257833
Change-Id: Ifb3cc5b7ff1090d539dfb925dce9f6327de15c46
2015-12-09 15:00:18 -08:00
Jeff Sharkey
98cb23dccf Merge "Slight API renaming, better behavior." 2015-12-09 22:51:43 +00:00
Jeff Sharkey
e13529a4ad Slight API renaming, better behavior.
Rename APIs to reflect that they're storage-related.  Also move
credential-storage APIs to be system API.

Return a null Context when device-encrypted storage isn't
supported.  This is the easiest way to keep legacy apps working when
upgrading from M to N.

Reduce strictness of path checking so we don't crash when working
with special packages like "android".

Bug: 22358539, 26104027
Change-Id: I38c24fc003488186210a6ae3b64270f86e1efe56
2015-12-09 15:22:54 -07:00
Filip Gruszczynski
3dec081967 Remaining APIs for freeform window caption.
The APIs are:
* setting a listener for the area of the caption where we display
control buttons; this is intended for apps that overlay the caption on
their content, so they don't display the content in that area and clash
with the buttons;
* specifying the color pallete of controls in the caption; by default we
try to infer the best color from the theme (dark buttons for light theme
and vice versa), but in case we get it wrong, we allow the developer to
overwrite it;
* specifying the caption background during the resizing; by default we
try to infer a good color from the theme, but in case we do it wrong, we
allow the developer to overwrite this.

The CL also includes merging of layouts decor_caption_dark and
decor_caption_light into a single one. Not only it reduces code
duplication, but also is necessary for allowing adjustment of the
controls color pallete after the layout was created.

Bug: 25486369
Bug: 25818398

Change-Id: Ib87fe849b07df341893ec7873982bf7ab932f6d5
2015-12-09 13:46:30 -08:00
Yin-Chia Yeh
5e7033702a Merge "Camera: add RAW_PRIVATE format" 2015-12-09 20:40:39 +00:00
Ta-wei Yen
6b733f61e9 Merge "Add KEY_VVM_CELLULAR_DATA_REQUIRED_BOOLEAN to CarrierConfigManager" 2015-12-09 20:18:01 +00:00
Yin-Chia Yeh
44581ff4db Camera: add RAW_PRIVATE format
Also add necessary plumbing for RAW_PRIVATE to work for ImageReader.

Bug: 25596619
Change-Id: Ic90f3f44264ac46fae1fafbc27ac64b5319f0970
2015-12-09 11:20:32 -08:00
Chet Haase
709bf2a37c Merge "Revert "Add support for partial view layouts"" 2015-12-09 18:40:06 +00:00
Roozbeh Pournader
3f74371155 Merge "Revert "Fix Build: Revert "Implement locale matching in LocalesList.""" 2015-12-09 17:06:10 +00:00
Narayan Kamath
6f775a8d0f Merge "Track API changes to java.lang.ref.Reference." 2015-12-09 16:19:39 +00:00
Narayan Kamath
12f62b7ec1 Track API changes to java.lang.ref.Reference.
Change-Id: Iea25e3e0efec56106f44d42232e772cf36f76e68
2015-12-09 15:59:03 +00:00
Roozbeh Pournader
2591cc8630 Revert "Fix Build: Revert "Implement locale matching in LocalesList.""
This reverts commit 9c2f0d751d16360a2cd857b1db752f0009481b21.

The original commit, 17b2b2d45854b56de7aa6d1581526e45991274d4, had
missed adding api/test-current.txt.

Change-Id: I26a6325b3cee4c2412ee599f002cc6addb35d36f
2015-12-08 22:28:30 -08:00
Insun Kang
9dd66417ea MediaRouter: Add getDeviceType() to RouteInfo
Bug: 24777080
Change-Id: I5d7b44ec84371fbb9560578ece439e1a00dcdd50
2015-12-09 14:04:09 +09:00
Chet Haase
4610eeff9c Revert "Add support for partial view layouts"
This reverts commit c55d5072ac52cee1811b52406419228fa81119ce.

There were several bugs related to incorrect handling of various
layout issues (layout not being run on containers/views that needed
it), reverting to take another run at it outside of master.

Issue #25980198  requestLayout() sometimes doesn't result in measure/layout for view

Change-Id: Ic0e159cbcf6171652d8fd1bee9ae44a3977cea04
2015-12-08 16:45:23 -08:00
Filip Gruszczynski
d427047d98 Merge "Remove Window.setDecorView API." 2015-12-09 00:13:42 +00:00
Tony Mak
4b97eecf11 Merge "Add Email.ENTEPRISE_CONTENT_FILTER_URI" 2015-12-09 00:11:53 +00:00
Filip Gruszczynski
9b81e406b0 Remove Window.setDecorView API.
We currently don't have a strong use case for this.

Change-Id: I106aaf1224d7934964d9b92628fd3cdd42507c46
2015-12-08 16:07:02 -08:00
Jeff Sharkey
103d61b9f7 Merge "Shift around encryption public APIs." 2015-12-08 22:29:52 +00:00
Jeff Sharkey
7a30a30ebe Shift around encryption public APIs.
There are far too many Context APIs with special directory paths
to replicate device-encryption versions of them all.  Instead, add
methods to clone a Context that explicitly stores its data in either
credential- or device-encrypted storage.

Methods to test the behavior of a given Context.

Bug: 22358539
Change-Id: I6a6290a9b282605ce9a1f82742fc2c4c50536754
2015-12-08 15:24:29 -07:00
Yohei Yukawa
868d19b93b Use BCP-47 LanguageTag in IME/Spell-Checker.
The primary goal of this CL is to make it clear that BCP-47 is the
expected format to annotate locale information for each
{InputMethod, SpellCkecker}Subtype.  In order to avoid possible
compatibility issues, this CL introduce a new "languageTag" attribute
instead of reusing existing "imeSubtypeMode" and "subtypeLocale"
attributes.

For IME developers, this CL changes nothing unless "languageTag"
attribute is specified.  To summarize:

  A: If only legacy locale-string is specified
     (existing IMEs/Spell-Checkers fall into this category):
    -> The system uses locale-string.

  B: If only LanguageTag is specified:
    -> The system uses LanguageTag.

  C: If both locale-string and languageTag are specified:
    -> The system uses LanguageTag.  Legacy locale-string is ignored.

For application developers, there should be some follow-ups CLs because
even with this CL most likely they would still have to take care of
previous versions of Android where:
  - Locale#forLanguageTag()              (N/A in API Level 20 and prior)
  - Locale#toLanguageTag()               (N/A in API Level 20 and prior)
  - InputMethodSubtype#getLocale()       (Deprecated in N)
  - SpellCheckerSubtype#getLocale()      (Deprecated in N)
  - InputMethodSubtype#getLanguageTag()  (N/A in M and prior)
  - SpellCheckerSubtype#getLanguageTag() (N/A in M and prior)
One idea would be is in the official support library to provide a utility
method that takes care of above tasks and just returns a Locale object.
If we had a utility method in the support library, probably not
returning a Locale object from #getLanguageTag() would make sense.

From performance point of view both existing legacy locale-string
attribute and new LanguageTag attribute are just String objects that
travel from XML manifest to system services to applications via IPCs.
Hence there are no performance implications except for having one more
String objects.

Bug: 22858221
Change-Id: I6db107ad2afc7709167f7c4e5d24bd589ac8bd70
2015-12-08 12:27:55 -08:00
Svet Ganov
2acf063da0 Ephemeral cookie API
Add APIs for an ephemeral app to set a cookie which is a small
peice of data cached longer than the app itself. This is useful
for avoiding the user to login every time they use the ephemeral
app. The cookie is stored after an ephemeral app is uninstalled.
Normal apps or ephemeral apps upgraded to full apps can also use
these APIs with the difference that once they are uninstalled
the cookie is deleted.

The cookie size defaults to 16KB and is configurable by a global
settings which can be adjusted via gservices. Also eviction policy
is time based with a default of one month and is configurable by
a global setting which can be adjusted via gservices. If the cert
of the app cahnges (when ephemeral is installed, uninstalled and
installed again) the cooke is wiped to prevent data leaks.

This cahange also adds an API for apps to know whether they run in
an ephemeral mode since it this mode some APIs will not be available.
Another API exposed by this change is private for the system and
exposes all ephemeral apps - installed and uninstalled. Only the
system can call this API. When an ephemeral app is uninstalled the
system stores its name, icon, and permissions. When the app is
reinstalled or a full version is installed the permissions are
propagated.

Change-Id: Id4a73a7750bfbabda0bfcb9bf9018d2062e94367
2015-12-08 19:17:15 +00:00
Robin Lee
254a8371e2 Fix test-api.txt
37317e7c22e89816156e6e9a7abf4c5a59e8440a Commit was generated before
test-api.txt existed.

Change-Id: Ied6ead08826c7635c7da15b91f6e30f29c575fbd
2015-12-08 17:11:04 +00:00
Tony Mak
415369ead5 Add Email.ENTEPRISE_CONTENT_FILTER_URI
Bug: 26074697

Change-Id: Ie1d595828912edf9d998eb2bcc4ba2f6388030b7
2015-12-08 07:39:37 +00:00
Jeff Sharkey
6a6cdafaec APIs to obtain SharedPreferences paths.
Needed for apps that want to migrate SharedPreferences from CE to DE
storage.  Note that a device will only ever enter a CE mode with a
factory reset, so apps should only be using these APIs when they
want to migrate files to a consistent location on non-FBE devices
for simplicity.

Bug: 25503089
Change-Id: Ic846215da1617d116a048e036415ac7ad523b770
2015-12-07 19:25:25 -07:00
Rubin Xu
cc586c5ab1 Merge "Introduce quiet mode state to managed profile users" 2015-12-07 21:52:40 +00:00
Yohei Yukawa
3a346cfe8e Merge "Add subtypeId for SpellCheckerSubtype." 2015-12-07 20:58:02 +00:00
Rubin Xu
0a29ecd8a5 Introduce quiet mode state to managed profile users
Quiet mode means the user will be free from visual and audio interruptions
from apps inside the managed profile, including notifications, widgets and
others. This CL adds the underlying state bit to users and exposes various
APIs to control and query the quiet mode state.

Bug: 22541941
Change-Id: If5f8e5a897843050e83b6ec26cb39561098f12b9
2015-12-07 18:17:46 +00:00
Wale Ogunwale
5f986095be APIs for activity to know when its windowing/pip modes change
Added APIs that allow activities to ask the system if they are currently
in multi-window or picture-in-picture mode and also get notified when
their modes change.

Bug: 25509834
Bug: 25683717
Change-Id: I4b8c316a49940bd6a8b31a93b345f9fd725a4721
2015-12-07 07:40:56 -08:00
Yohei Yukawa
0894319162 Add subtypeId for SpellCheckerSubtype.
What this CL actually does is just copying the existing concept
"subtypeId" from InputMethodSubtype to SpellCheckerSubtype.

To recap, the underlying problem is that the system has stored only the
return value of SpellCheckerSubtype#hashCode() to track the set of
enabled subtypes, and SpellCheckerSubtype#hashCode() has been
implemented as Arrays.hashCode(new Object[] {locale, extraValue}), which
is problematic because:
  - Spell checker developers cannot change "locale" and/or 'extraValue'
    if they want to keep enabled subtypes enabled.
  - Android Framework developers cannot change the hash function even
    when new fields are added if they want to keep enabled subtypes
    enabled.
InputMethodSubtype has had the same issue, and what we did was
introducing a concept "subtypeId", which allows IME developers to
specify the return value of #hashCode().

For instance, suppose that a subtype X has already been used in
production with the following attributes:
  - locale: "tl_PH"
  - extraValues: "key1=value1,key2=value2"

With "subtypeId", you can change the attributes of subtype X without
losing the enabled state of subtype X on devices as follows.
  - locale: "fil_PH"
  - extraValues: "key1=value1,key2=value2,key3=value3"
  - subtypeId: Arrays.hashCode(new Object[] {
            "tl_PH", "key1=value1,key2=value2"})

This CL also deprecates existing public constructor of
SpellCheckerSubtype, which was probably published as a public API by
mistake.  Note that the constructor of SpellCheckerInfo class is @hide.
Also there is no public API that receives SpellCheckerSubtype object
instantiated by developers with custom data.  Making developers to be
able to instantiate SpellCheckerSubtype does not make sense right now.

Bug: 11736916
Bug: 22858221
Change-Id: I98f05c1e9421c47a93769bc4a6fe11b678bc2509
2015-12-04 16:16:47 -08:00
Sandra Kwan
db9df39992 Merge "AccountManager: add finishSession(...) API." 2015-12-04 23:35:20 +00:00
Sandra Kwan
920f6ef983 AccountManager: add finishSession(...) API.
Adding finishSession API to AccountManager and
AbstractAccountAuthenticator.

Change-Id: I153dd2bb6fe01d2e4b10b41e8b553f59da26bd29
2015-12-04 15:32:47 -08:00
Jeff Sharkey
65196ee28b Merge "Add tagging variants for DatagramSocket." 2015-12-04 22:44:40 +00:00
Jeff Sharkey
f0d7633bdc Add tagging variants for DatagramSocket.
Oops, we missed these along the way.

Bug: 25799174
Change-Id: I4ad368f9faee4b1996d605534dce4c2b23dbe200
2015-12-04 15:32:07 -07:00
Jeff Sharkey
0534ac90e5 Merge "Handle non-encryption-aware accounts and sync." 2015-12-04 16:50:38 +00:00
Jeff Sharkey
9d8a1048bb Handle non-encryption-aware accounts and sync.
The system can now boot in a "locked" state where only encryption
aware (EA) components can be safely started.  When in this state,
PackageManager already filters away non-EA components, but system
services like AccountManager and SyncManager need to carefully handle
these temporarily "missing" components.

As a guiding principle, all known Accounts are still present when
the device is locked, but communication with underlying non-EA
authenticators is blocked.

To keep things simple for now, all SyncManager requests are kept
dormant until the user enters the unlocked state.

The core of this logic is that RegisteredServicesCache now works
with all components regardless of EA status, which prevents us from
accidentally thinking a service was removed when the user is locked.

Bug: 25945136
Change-Id: I8714121f6236b00821769023c4df7de1c8a99944
2015-12-04 09:36:39 -07:00
Ricky Wai
ccf15a45cf Merge "Change Contacts.CORP_CONTENT_FILTER_URI to enterprise API" 2015-12-04 16:35:33 +00:00
Ricky Wai
36220e3ed1 Merge "Make Work Directory API as Enterprise API" 2015-12-04 16:34:49 +00:00
Victor Chang
9d7670b466 Merge "Add ENTERPRISE_CONTENT_FILTER_URI to Callable and Phone" 2015-12-04 16:31:57 +00:00
Tomasz Mikolajewski
a4c338aea6 Add a FLAG_ARCHIVE flag to DocumentsContract.
Bug: 20176812
Change-Id: I4bf7c4f228682a68ca5106bfc757fb533e281a86
2015-12-04 19:16:28 +09:00
Yohei Yukawa
b4ea6ddc03 Merge "Introduce EditorInfo#locales." 2015-12-04 01:21:02 +00:00