650 Commits

Author SHA1 Message Date
Tyler Gunn
1e9bfc6461 Fix incorrect android.telecom.Call.Details equality check.
The the android.telecom.Call.Details class provides its own equals
implementation.  Recently added in M is to also check if the mExtras
and mIntentExtras are different.  Unfortunately, Bundles do not implement
equals.  As a result when Telecom calls are parceled and sent to the
InCallServices, this means that the internalUpdate method will always
assume that the Details of a call have changed, even if they have not.
This was causing a LOT of extra calls to onUpdate in the InCall UI (2x the
amount).  Although there is still room for improvement in the number of
callbacks from Telecom, this fix prevents a pretty significant regression
on that front.

Bug: 23218195
Change-Id: I128e996faf60376ed3df1dc848a97c4a7b0482ee
2015-08-19 20:52:13 +00:00
Svet Ganov
52153f4c05 Add GTS test to ensure valid default permission grants - framework
The platform grants runtime permissions by default to apps on the
system image that provide core device use cases which a user expects
to work out-of-the-box. We are now adding a test to ensure that
OEMs cannot pregrant premissions on non approved components.

bug:23043018

Change-Id: Id76717cce0ee59678956bd0be347d3c045fe4c51
2015-08-12 21:57:59 -07:00
Yorke Lee
5346396ba2 Correctly hide setConnectionService
Bug: 22957023
Change-Id: Ia3bd74f2fcc9f9dd5c9298f4505c18ee652436be
2015-08-04 16:07:19 -07:00
Tyler Gunn
335ff2ec7a Add telecom extra keys required for DMR release.
Bug: 22848290
Change-Id: I3328234e3f07d83d0dbe5b61b959344b6cc5cc3f
2015-07-30 14:18:33 -07:00
Sailesh Nepal
cf85562bc9 Default permissions for sim call manager
This CL adds the following permissions by default to the
SIM call manager:
 - microphone
 - phone

BUG: 22790160
Change-Id: Icaf1db6c6943b3ddbd16a946a81d1bfb734d761f
2015-07-28 22:16:25 -07:00
Tyler Gunn
65a3d3430a Add "Call subject" capability to phone accounts.
Indicates whether the phone account supports displaying a subject line
for incoming calls and sending a subject line for outgoing calls.
Supports the IMS Instant Lettering feature.

Bug: 22769741
Change-Id: I6d803dc288bfd6d4e356310a8d10d5468c5d4186
2015-07-27 16:06:16 -07:00
Nancy Chen
660322d825 Merge "Add transcription field to voicemail object and related changes." into mnc-dev 2015-07-17 16:37:43 +00:00
Nancy Chen
5bd3e73a21 Add transcription field to voicemail object and related changes.
Bug: 22542002
Change-Id: I05c18e8f82a4f318fb59228e4d6eb844d64bee30
2015-07-16 18:36:58 -07:00
Roshan Pius
e927ec02f5 Maintain call time across SRVCC (2/3).
When an IMS conference call encounters an SRVCC event requiring a
fallback to GSM/CDMA, we need to maintain the call time for the
conference host across this fallback. So, adding a connectTime attribute
in the underlying conference host's connection object which can be used
to account for the call time from the now inactive conference call into
the new call created.

BUG: 21918593
Change-Id: I13e7ae6e31f004e798776c02ac7a6ac09a10f0bd
2015-07-15 15:47:21 -07:00
Yorke Lee
b63b031cb5 Merge "Standardize stateToString return values" into mnc-dev 2015-07-14 22:00:33 +00:00
Yorke Lee
e911c8d196 Standardize stateToString return values
Bug: 20303674
Change-Id: I884029614c8ce36120c1fc039ef33c0e6736ed5c
2015-07-14 11:39:36 -07:00
Roshan Pius
75c36b681e Correct the comparison done in removeAdapter.
Since addAdapter is storing the proxy binder objects in the adapter set, we need
to compare the underlying binder objects when trying to remove the adapter
from the adapter set. This was resulting in adapters accumulating in adapter
set every time a RemoteService was created.

BUG: 22062692
Change-Id: Ib9cc25a8b95622a524ed5a07d3ef56673669cd27
2015-07-08 17:45:54 -07:00
Roshan Pius
1ca6207a1e Change sequence of call removal from Phone's db.
Since the Call API's callbacks are now fired from handlers, they end up
changing the order in which the callbacks from the Phone and Call API's
are fired. To preserve the below ordering, we move the call removal from
Phone's db to after all the onCallDestoryedcallbacks have executed.
1. Call->onStateChanged
2. Call->onDetailsChanged
3. Call->onCallDestroyed
4. Phone->onCallRemoved

BUG: 22127504
Change-Id: Ice17f727decb516baabbe69adae598ebdf370094
2015-07-08 14:47:36 -07:00
Anthony Lee
930d6b07e3 Merge "Add capability to indicate a conference will never have children." into mnc-dev 2015-07-02 18:33:53 +00:00
Santos Cordon
895d4b8f63 Telecom API council changes.
- adding more javadocs.
- fixing javadoc on isEnabled
- renaming to CONFIGURE_PHONE_ACCOUNT

Bug: 21573551
Change-Id: Ice035b8573a08ea18181a73c9e9a462520a934f1
2015-06-29 16:17:47 -07:00
Tyler Gunn
d409173570 Add capability to indicate a conference will never have children.
Used to mark IMS conference calls so that it is possible to know that we
never expect child calls to be associated with the conference.

Bug: 21085329
Change-Id: I7e5c82622ed382e431d4156878c28b37421e1e35
2015-06-29 09:15:37 -07:00
Santos Cordon
c8cedd5311 Merge "InCallService meta-data [2/4]" into mnc-dev 2015-06-24 17:37:13 +00:00
Santos Cordon
b6acf517ff Merge "Additional javadoc." into mnc-dev 2015-06-24 17:36:58 +00:00
Santos Cordon
f2600eb5ac InCallService meta-data [2/4]
Bug: 21816241

Change-Id: I9af91a1287f652247ef590878759aa277bd925e5
2015-06-23 15:13:39 -07:00
Santos Cordon
7a060d5e2b Additional javadoc.
Change-Id: Iba7f9315521314d066a166ba884ac71c3a9c2496
2015-06-22 10:38:30 -07:00
Sailesh Nepal
000d38ab3c Fix crash when doing conferencing over Wi-Fi
The problem was that we were calling Connection.getAudioState
in the conferencing code. This led to a null pointer exception.

Fix was to add a null pointer check.

BUG: 21957102
Change-Id: Ibad0f6cc70a5bc4a30023beb857125802bc35cd4
2015-06-21 10:25:13 -07:00
Santos Cordon
2c27b9a9fa Clean up SIM CallManager APIs.
Bug: 21499476
Change-Id: Iaded74c6b885b0745dfa85d0b7733bdad75d615a
2015-06-18 16:13:54 -07:00
Yorke Lee
107c4ce2ac Send broadcast when default dialer changes
Add hidden TelecomManager.setDefaultDialer for system apps
to set the default dialer and trigger the broadcast

Bug: 21846308
Change-Id: Ifdd30cd1323ab0157edf7fd966173b6c52df6ba0
2015-06-15 12:36:09 -07:00
Tyler Gunn
8a90866a9a Merge "Correct issues with VideoProvider discovered via CTS tests." into mnc-dev 2015-06-12 21:04:04 +00:00
Yorke Lee
be2a4a248c Fix typo in Call.Details.propertiesToString
Change-Id: I7bb52138912fddef20862f5f7a29a8ec2e0a1d66
2015-06-12 10:10:55 -07:00
Tyler Gunn
84f381b4eb Correct issues with VideoProvider discovered via CTS tests.
While authoring the CTS tests I discovered a few issues with the
VideoProvider.
1. The VideoProvider's default handler should be on the main Looper,
similar to other Telecom components.
2. When calling IVideoCallbacks, the try/catch for RemoteExceptions was
around the for-loop which iterates over the various VideoCallbacks.  If
one was to fail, the other VideoCallbacks would not be called.
3. The mVideoCallbacks hashmap should use a ConcurrentHashMap; in CTS
tests I ran into a few concurrency exceptions related to the various
InCallServices registering callbacks while other methods on the provider
were being called.

Bug: 21802841
Change-Id: Ib0d46daf03554309044e9efaa991a15cb2c4b46b
2015-06-12 09:39:47 -07:00
Tyler Gunn
4e9bbaf043 Add support for specifying looper on VideoProviders.
Added constructor for VideoProviders to allow creating instances where
the Looper is specified.  This is required for creating
VideoProviderProxy instances within Telecom.

Bug: 20232310
Change-Id: Ieb31e499caca9d65ff4b52c287e030c0ceeeb6ee
2015-06-10 10:39:48 -07:00
Tyler Gunn
69c4e2c57e Merge "Remove use of STATE_AUDIO_ONLY in a comparison." into mnc-dev 2015-06-09 22:04:10 +00:00
Tyler Gunn
bc6f12ee42 Remove use of STATE_AUDIO_ONLY in a comparison.
- Cleanup javadoc to make it more explicit how to use STATE_AUDIO_ONLY.
- Use VideoProfile.isAudioOnly() instead of doing == comparison.

Bug: 21645094
Change-Id: I5a67290a996f8f338aebab72a4d3cb57f1b1993b
2015-06-09 14:34:11 -07:00
Yorke Lee
03123839e4 Merge "Rename TelecomManager.EXTRA_INCOMING_CALL_ADDRESS" into mnc-dev 2015-06-09 20:09:57 +00:00
Tyler Gunn
b674d069d8 Merge "Add API docs for RemoteConnection VideoProvider/Callback." into mnc-dev 2015-06-09 19:44:06 +00:00
Yorke Lee
02fb5bc52b Rename TelecomManager.EXTRA_INCOMING_CALL_ADDRESS
Bug: 19696065
Change-Id: Ibe253c8cd66938ea1cd560d443008026eb1005d9
2015-06-09 12:28:06 -07:00
Yorke Lee
04ea7d3b7c Add telecom extra to specify handle for incoming call
Bug: 19696065
Change-Id: Ie7c9e3f982808abd4944cfa7bd3c754b93479f84
2015-06-05 16:00:12 -07:00
Tyler Gunn
295f5d7777 Add API docs for RemoteConnection VideoProvider/Callback.
Bug: 21573551
Change-Id: I434d83fa84f9515634776820b2e6a8004cf693ee
2015-06-04 11:08:54 -07:00
Tyler Gunn
bb6d060585 Merge "API Cleanup: Remove VideoState class." into mnc-dev 2015-06-03 17:13:41 +00:00
Tyler Gunn
87b73f370e API Cleanup: Remove VideoState class.
- Remove VideoState class.
- Replace references to VideoState constants with VideoProfile equivalent.
- Push VideoState static methods into VideoProfile.

Bug: 21573551
Change-Id: I1bca02772b5b7d86643f612824b07faef7618725
2015-06-03 10:09:59 -07:00
Yorke Lee
ac2e3886e3 Merge "Allow default dialer changes and phone account enable/disable via ADB" into mnc-dev 2015-06-03 16:24:17 +00:00
Santos Cordon
15d63c718f Fix ringback return value.
Bug: 21474410
Change-Id: I6e08e89636c3b42c97fc194a314a325245755d09
2015-06-02 15:09:38 -07:00
Yorke Lee
db6da48621 Allow default dialer changes and phone account enable/disable via ADB
Add commands accessible via adb shell that can be used for CTS tests
without the need for adb root
*set-phone-account-enabled
*set-phone-account-disabled
*set-default-dialer
*get-default-dialer

Modify enablePhoneAccount/setDefaultDialer to indicate success.

Remove now unused functionality in ProtectedEnableAccountPreferenceActivity
and ProtectedChangeDefaultDialerActivity.

Bug: 21583012
Change-Id: I542d145cc969334c004b8344fbbb01f278256f9d
2015-06-02 14:23:21 -07:00
Tyler Gunn
29780eecd0 Merge "Cleanup Video API javadoc." into mnc-dev 2015-06-01 22:35:29 +00:00
Tyler Gunn
d46595a673 IMS: Conference fixes
- Set phoneaccount to Conference
- Handle conference call in DIALING state

Change-Id: I549bf664724473f0d5d4450cbc8d96f7b534f43a
Bug: 21376607
2015-06-01 14:53:55 -07:00
Yorke Lee
064fc83b81 Merge "Add ability to modify default dialer via ADB" into mnc-dev 2015-06-01 18:00:50 +00:00
Yorke Lee
5cf2dde3f7 Add ability to modify default dialer via ADB
Add hidden action to TelecomManager

Change-Id: I698c0154f438cdaf78926f12a261cbc0eb807cd0
2015-05-29 14:56:32 -07:00
Tyler Gunn
b702ef8a91 Cleanup Video API javadoc.
- Cleaned up documentation and added more details where possible.
- Also added cross references from the VideoProvider and VideoCall
APIs to make it more clear what the link is between the two.

Bug: 21520606
Change-Id: I0a79450d69841df5850061311a523b37688efc49
2015-05-29 11:51:53 -07:00
Tyler Gunn
2b26e8dcd1 Merge "Un-@hide some missed video APIs." into mnc-dev 2015-05-29 18:18:37 +00:00
Tyler Gunn
a2df92512b Un-@hide some missed video APIs.
- renamed some methods to match what is in the non-remote version of
the API.
- Renamed RemoteConnection.VideoProvider.Listener to Callback.

Bug: 21474356
Change-Id: I4840e19921dafb4db288a4f8362b14d5dfa0aea1
2015-05-29 10:05:46 -07:00
Yorke Lee
d600966c39 Merge "Make ACTION_CONNECTION_SERVICE_CONFIGURE public" into mnc-dev 2015-05-29 00:55:12 +00:00
Yorke Lee
656eeb0402 Make ACTION_CONNECTION_SERVICE_CONFIGURE public
Bug: 21499146
Change-Id: I3b931231807eec0aed91832013c7c055005fc9ad
2015-05-28 16:12:46 -07:00
Santos Cordon
6b7f955c2d Add extras to Connections/Calls. (1/3)
Two major changes:
1) Add the notion of extras to a Connection.  These extras will be
parceled through to InCallService as Call.getExtras()
2) The previously existing Call.getExtras() has been renamed to
getIntentExtras(). This name better describes the fact that these
particular extras are from the original CALL or INCOMING_CALL intents.

Change-Id: I08c1baf4f08d54757f98012f0c08b423a707c53d
2015-05-28 09:43:00 -07:00
Santos Cordon
d8faf70b80 Add intents for enabling phone accounts.
Bug: 20303449
Change-Id: If0057d42373b6964193c562ae8a8487a0299da76
2015-05-20 16:55:59 -07:00