13331 Commits

Author SHA1 Message Date
Yohei Yukawa
cb56978912 Merge "Use a flag to grant a temporary URI permission." into nyc-mr1-dev 2016-06-27 20:18:51 +00:00
Sanket Padawe
afcc40f818 Merge "Fix documentation of getTelephonyHistogram() api." into nyc-mr1-dev 2016-06-27 19:21:56 +00:00
Sanket Padawe
7f89016579 Fix documentation of getTelephonyHistogram() api.
Bug: 29760459
Change-Id: Ib7c4df81026331f88f6a8776c0042abf4f32c620
2016-06-27 11:57:01 -07:00
Dmitri Plotnikov
b1ca092db8 Merge "Unhiding DEVICE_NAME" into nyc-mr1-dev 2016-06-24 00:23:13 +00:00
Yohei Yukawa
45700fa135 Use a flag to grant a temporary URI permission.
It turns out that we can let the system to call
InputMethodService#exposeContent(InputContentInfo, EditorInfo), which
added in my previous CL [1], during the IME is calling
InputConnection#commitContent() as follows.

  [IME]
  InputContentInfo contentInfo = new InputContentInfo(
          contentUri,
          new ClipDescription(description, new String[]{mimeType}),
          linkUrl);
  getCurrentInputConnection().commitContent(
          inputContentInfo,
          InputConnection.INPUT_CONTENT_GRANT_READ_URI_PERMISSION,
          null);

  [App]
  try {
      contentInfo.requestPermission();
      // Load inputContentInfo.getContentUri() here.
  } finally {
      contentInfo.releasePermission();
  }

This gives us flexibility to let InputConnection#commitContent() do all
the magic for IME developers like other APIs such as
Context#startActivity(), rather than asking them to call one more API to
grant a temporary URI permission like a scenario where
Context#grantUriPermission() is used.

 [1]: I2772889ca01f2ecb2cdeed4e04a9319bdf7bc5a6
      25e0813e6eb6315b1016db805fa9b791b4ae5cc2

Bug: 29450031
Change-Id: I99536cd58c9984af30b0bafb4a1dd25a26634a2d
2016-06-23 17:12:59 -07:00
Tyler Gunn
4b6614e576 Add support for dropping fg video call on answer of audio call.
Adding two new carrier config options:
1. treat_downgraded_video_calls_as_video_calls_bool - when there is an ongoing
call which was previously a video call (or is currently video call), some
carriers require that this is treated as if it is a video call for
telephony logic such as in (2).
2. drop_video_call_when_answering_audio_call_bool - if the user is in an
active video call (see (1)) over wifi, and an incoming audio call comes in,
when this carrier config option is "TRUE", the video call will be dropped
when the audio call is answered.

Adding new connection extra to indicate to the dialer app that answering
a ringing call will cause the current active video call to drop.

Bug: 29275420
Change-Id: Ied5dbabc8ff09045ba41c5eba2136adad10db80e
2016-06-23 12:48:43 -07:00
Andrew Sapperstein
ddb980de05 Merge "Add colorSecondary theme attribute." into nyc-mr1-dev 2016-06-23 18:37:42 +00:00
Ta-wei Yen
fbb87a0591 Merge "Add more configuration state for visual voicemail" into nyc-mr1-dev 2016-06-23 02:28:24 +00:00
Yohei Yukawa
dc42d7dd13 Merge "Add InputMethodService#exposeContent()" into nyc-mr1-dev 2016-06-23 01:25:39 +00:00
Ta-wei Yen
1121017213 Add more configuration state for visual voicemail
Bug: 26944391
Change-Id: I7e0c2649097edca96d6a78fe2dc250a4b4855133
2016-06-22 17:48:52 -07:00
Yohei Yukawa
25e0813e6e Add InputMethodService#exposeContent()
This is a follow up CL to my previous CLs [1][2] that introduced
InputConnection#commitContent(InputContentInfo, Bundle) API to enable
IMEs to send a content to the target application.

With this CL, IME developers are able to temporarily expose
InputContentInfo object to the target package without permanently
granting URI permission.  Although calling IMS#exposeContent() is
allowed only for the IME that is currently selected, the client is able
to request a temporary read-only access even after the current IME is
switched to any other IME as long as the client keeps InputContentInfo
object.

Here is a sample code snippet about how to use this mechanism.

  [IME]
  InputContentInfo contentInfo = new InputContentInfo(
          contentUri,
          new ClipDescription(description, new String[]{mimeType}),
          linkUrl);
  exposeContent(contentInfo, getCurrentInputEditorInfo());
  getCurrentInputConnection().commitContent(inputContentInfo, null);

  [App]
  try {
      contentInfo.requestPermission();
      // Load inputContentInfo.getContentUri() here.
  } finally {
      contentInfo.releasePermission();
  }

 [1]: Iaadf934a997ffcd6000a516cc3c1873db56e60ad
      152944f4909c47917473293b258d266435c6ab35
 [2]: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
      adebb52588b098a1af678d4e33a234ef1ce783b2

Bug: 29450031
Change-Id: I2772889ca01f2ecb2cdeed4e04a9319bdf7bc5a6
2016-06-22 16:31:41 -07:00
Jim Miller
07e0384a4e Enable fingerprint sensor navigation to invoke QuickSettings
- rename "FP_NAV" to more generic "SYSTEM_NAVIGATION"

Fixes bug 28869612

Change-Id: I321240ee54506633d63a29e987b8d8638c652391
2016-06-22 15:18:13 -07:00
Android Build Merger (Role)
4d46efc084 Merge "Merge \"Tweaks to DragAndDropPermissions behavior\" into nyc-dev am: 22faa5ddb1" into nyc-mr1-dev 2016-06-21 23:37:00 +00:00
Yorke Lee
d22536666a Merge \"Tweaks to DragAndDropPermissions behavior\" into nyc-dev
am: 22faa5ddb1

Change-Id: Ia37191b026b85773d27b41b7991238a07e141a12
2016-06-21 23:35:09 +00:00
Dmitri Plotnikov
f19b6ec8bb Unhiding DEVICE_NAME
Bug: 28439637
Change-Id: Iea9efbaf18b2110c21f0d27a3e44fd6590f2d372
2016-06-21 16:22:56 -07:00
Makoto Onuki
b5a012fd6f Shortcut Manager: Address API council feedback and fix TODOs
Bug 29515722
Bug 29516909
Bug 29515090
Bug 29516954
Bug 29515088

Change-Id: Ibe1d27033cbd0fd50d37e3d9945b47551211c568
2016-06-21 14:42:48 -07:00
Andrew Sapperstein
c11df2521e Add colorSecondary theme attribute.
Value is defined only for .Settings themes.

Uses new attribute in SystemUI to set the switch bar background in
System UI Tuner and the edit UI background in Quick Settings.

BUG: 28625050
Change-Id: I840597670fb8826c7e2172c933ff618e52fc9ac1
FIXES: 28625105
FIXES: 29003223
2016-06-21 13:41:02 -07:00
Yorke Lee
c8ad0cd316 Tweaks to DragAndDropPermissions behavior
No longer release permissions in finalize(), so that
apps do not have to maintain a reference to the
DragAndDropPermissions object.

Also make it parcelable, so that permission instances can be
retained across activity instances so that they can be
manually released.

Bug: 29162822

Change-Id: Ie604dd3e83ee45a8665d743449b91857dd54e896
2016-06-21 12:57:52 -07:00
Sanket Padawe
0df9721a08 Merge "Unhide Network types in TelephonyManager" into nyc-mr1-dev 2016-06-21 16:56:24 +00:00
Sanket Padawe
4652826d71 Unhide Network types in TelephonyManager
Bug: 29493935
Change-Id: Ib1bef4a68a962b0f473e07415d46ecff6080ea71
2016-06-20 12:40:07 -07:00
Yohei Yukawa
01e7c10d37 Merge "API Rename: IC#inputContent to IC#commitContent." into nyc-mr1-dev 2016-06-17 23:23:59 +00:00
Makoto Onuki
df6da040e0 Update manifest shortcut XML schema
Use the standard <intent> tag instead of custom tags.

- Also fix setDynamicShortcuts(), which was broken in the previous CL.
- Also tolerate runtime exceptions while parsing XMLs
- Also fix b/29422018 while I'm at it

Bug 29390156
Bug 29077932
Bug 29422018

Change-Id: I2756c9d66c6d7b2962a982d9e57a7d84a5755b28
2016-06-17 11:51:20 -07:00
Yohei Yukawa
adebb52588 API Rename: IC#inputContent to IC#commitContent.
As shown in below, we have already used commit* naming convention in
InputConnection.

 - InputConnection#commitCompletion(CompletionInfo);
 - InputConnection#commitCorrection(CorrectionInfo);
 - InputConnection#commitText(CharSequence, int);

Hence renaming IC#inputContent() to IC#commitContent() would make the
new method more consistent.

Bug: 29450024
Change-Id: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
2016-06-17 10:10:39 -07:00
Hall Liu
81ce5bc113 Merge "Add support for Telecom analytics extensions" into nyc-mr1-dev 2016-06-15 21:24:16 +00:00
Erik Wolsheimer
178bba4589 Add DENSITY_260, DENSITY_300, DENSITY_340
Add supported screen densities to closer match some hardware's physical specifications

BUG: 24132725
Change-Id: I7138d92fa4e1f4320f9068e154bd8318ac0c45c7
2016-06-15 10:33:09 -07:00
Alexander Hills
7816efa6af Merge "Adds a flag to Action.WearableExtender to display actions inline on Wear" into nyc-mr1-dev 2016-06-15 16:02:48 +00:00
Hall Liu
057def534c Add support for Telecom analytics extensions
Add classes for call events and a field for them in
ParcelableCallAnalytics.
Add classes for timing information on user-visible operations.
Add the TelecomAnalytics class as the top-level object for analytics.
Add log session timing information to the TelecomAnalytics class,
independent of individual calls.

Bug: 28623064
Change-Id: Ifee5fdf6b6b341869ff0ff26c4388d357e3d9922
2016-06-14 16:37:10 -07:00
Yohei Yukawa
03f759e87e Merge "Add InputConnection#insertContent()." into nyc-mr1-dev 2016-06-14 00:26:39 +00:00
Brad Ebinger
a3d4baf43b Merge "Add EVENT_CALL_MERGE_FAILED Connection Event" into nyc-mr1-dev 2016-06-13 17:39:19 +00:00
Tao Bao
9aa66d57c6 Merge "Add RecoverySystem.rebootWipeAb() system API." into nyc-mr1-dev 2016-06-13 16:43:46 +00:00
Yohei Yukawa
152944f490 Add InputConnection#insertContent().
Providing an official protocol for IMEs to insert an image to the
application is something that has been requested from many IME
developers to Android OS.  With this CL, IMEs are able to ask
applications to insert a content including image files as follows.

 1. An application that opts in to this protocol specifies a list of
    supported content MIME types in EditorInfo#contentMimeTypes.
 2. When an IME is actively interacting with such an application, the
    IME can call InputConnection#insertContent() with a InputContentInfo
    that contains content URI, metadata (ClipDescription), and an
    optional link URI.
 3. The application can read the stream data from the given content URI
    to insert the content into somewhere in the application.

Detailed design background can be found in the JavaDoc of
InputConnection#insertContent().

Bug: 22830793
Change-Id: Iaadf934a997ffcd6000a516cc3c1873db56e60ad
2016-06-10 19:04:34 -07:00
Tao Bao
1327a97a07 Add RecoverySystem.rebootWipeAb() system API.
It reboots into recovery and securely wipes an A/B device.

Bug: 27253717
Bug: 29159185
Change-Id: I8252894db5c1df48bc4a8728b7f0e0f18aebc44c
2016-06-09 16:57:54 -07:00
Alex Hills
9f08761f08 Adds a flag to Action.WearableExtender to display actions inline on Wear
Bug:28909490
Change-Id: I124bdd0a91ed7d78c527988e390b823dcbd1b85f
2016-06-08 15:42:04 -04:00
Amith Yamasani
211b5b10f6 resolve merge conflicts of 718f321 to nyc-mr1-dev
Change-Id: I0021aa5be1822082d8ff026cafa8c8b6b56b90b5
2016-06-08 18:43:46 +00:00
Amith Yamasani
718f321369 Merge "Add a separate read permission for oem unlock state" into nyc-dev 2016-06-08 17:55:41 +00:00
Makoto Onuki
157b1628fd ShortcutManager: deal with changing resource IDs on app update
- When an app is upgraded, all the resource IDs may change.  So
if a shortcut is previously published with an icon for res ID 100
and the publisher is upgraded, resource #100 may refer to something
different.

- So now the service also remembers resource names for icon resources,
as wells as string resources.  When an app is updated, the service
fetch the updated resource IDs by name.

- Also extract all string resources when a shortcut is published
and persist them, so that even when the original string resources are
removed from the app, the launcher can still show the extracted strings.

- When the system locale changes, re-extract all string resources.

- Also really hide the constants in ShortcutInfo that were
accidentally made public.

Change-Id: I23c29b45c1de5d76175229190a1533c9c62c5960
2016-06-07 16:11:30 -07:00
Brad Ebinger
5eebdd8bb8 Merge "Adds CDMA Voice Privacy Property to Call" into nyc-mr1-dev 2016-06-07 22:14:51 +00:00
Jorim Jaggi
526505da25 Add new attributes for wallpaper info
Adjust test wallpaper to use these attributes.

Also fix some issues where wallpaper got laid out differently in the preview
mode.

Bug: 28770685
Change-Id: I259f3884f5f2c0b723a6a5ce012d45170f64c4c7
2016-06-03 15:50:31 -07:00
Amith Yamasani
d2b21047c8 Add a separate read permission for oem unlock state
New privileged permission READ_OEM_UNLOCK_STATE added
for system privileged apps.

Changing the unlock state still requires the old
permission OEM_UNLOCK_STATE, which is signature protected.

Bug: 28953956
Change-Id: Iedd2ad1d2d1dc3ae91122d7c406e3ee623a47d61
2016-06-03 14:33:26 -07:00
Brad Ebinger
15847070b5 Adds CDMA Voice Privacy Property to Call
Adds the CDMA Enhanced Voice Privacy Property to a Call when it has been
enabled for the call by the network.

Bug: 26931679
Change-Id: I1f5b4a4fb22fe6aaaf0c424ef11925c6058c6e82
2016-06-03 13:34:07 -07:00
Jeff Sharkey
f5b0bf3563 Merge commit '44b24c9b38d87dfd8bee2aca381f18a9106313dc' into manual_merge_44b24c9
Change-Id: Ie4e0b91f5479f43864b86ff013ff8eb7bed6cd86
2016-06-03 13:53:48 -06:00
Makoto Onuki
37087ad710 Merge "ShortcutManager: Implement usage report API" into nyc-mr1-dev 2016-06-03 15:21:45 +00:00
Todd Kennedy
bb8a42da70 Round icons
Allow applications to specify "android:roundIcon" in all places
they can already specify the rectangular "android:icon".

Bug: 28981414
Change-Id: I167163d650db80f4949274d365e7fee9aceacb3a
2016-06-02 15:57:54 -07:00
Makoto Onuki
ac042501c8 ShortcutManager: Implement usage report API
Bug 28536054

Change-Id: I293e8eaad523e3b0d76d562fc381601633451ed3
2016-06-02 15:57:40 -07:00
Makoto Onuki
60585d12e7 Merge "ShortcutManager: API rename" into nyc-mr1-dev 2016-06-01 22:44:11 +00:00
Ta-wei Yen
912e2b2c80 Merge "Add support for source-specific VVM state in VoicemailContract" into nyc-mr1-dev 2016-06-01 21:49:47 +00:00
Ta-wei Yen
c75b215eb3 Add support for source-specific VVM state in VoicemailContract
Negative values of the field CONFIGURATION_STATE, DATA_CHANNEL_STATE,
NOTIFICATION_CHANNEL_STATE is reserved to voicemail source for its'
specific errors. SOURCE_TYPE can be set to help interpret the error
codes.

Typically the OMTP visual voicemail source will set SOURCE_TYPE to the
same value of visual voicemail type set with 
CarrierConfigManager.KEY_VVM_TYPE_STRING, such as "vvm_type_omtp".

For example, the OMTP visual voicemail source could set 
CONFIGURAITON_STATE to -5 and SOURCE_TYPE to "vvm_type_foo", and the
client can find -5 for "vvm_type_foo" means "PIN is not set by the user"

+ Field SOURCE_TYPE
+ Docs to specify negative values are reserved for the source
- Removed hidden helper method SetStatus() and SetQuota(). The 'ignore'
  value is conflicting with reserved values.

Bug:26944391
Change-Id: I0930f684dadd25ae94e3ea68a7658c7ae423e3e3
2016-06-01 20:04:57 +00:00
Makoto Onuki
eddbfecb8d ShortcutManager: API rename
The words "title" and "text" implies that "text" is a secondary label
that's shown with the title, but it turned out the launcher would show
only one of those depending on how much space it has.

So now we change them to "shortLabel" and "longLabel"

Note we're only changing the API surface -- in order to mimimize
the impact to the code, internally we'll keep using the old names.

- Also remove "shortcutRank" while I'm here -- it should be implied
from the order of the XML elements.

Bug 29057378

Change-Id: I3203f63b0318c7462c1c61fef43cf9755fa8c008
2016-06-01 10:09:10 -07:00
Brad Ebinger
2c1c164578 Add EVENT_CALL_MERGE_FAILED Connection Event
Currently, if a call merge failure occurs, we can not try again because
the merge button "gets stuck". This change adds a new Connection Event
that notifies the InCall UI to enable the merge button so that the user
can try again.

Bug: 28847375
Change-Id: I376f6ee446e135577a54aa36ff1dfc77af87261a
2016-05-31 11:09:02 -07:00
Makoto Onuki
c421b31447 Fix build breakage due to res-id changes
Change-Id: I3c8160b277e2dac83b433b5454d18b7253f5d0bd
2016-05-27 16:54:04 -07:00