History log of /packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2f4f0a038dbf9f6372ac8c9b1535f8cc8d0f8256 09-Aug-2016 Hall Liu <hallliu@google.com> Add dumpsys to Telecom analytics output

Output a Base64-encoded proto when Telecom's dumpsys is called with the
"analytics" argument, with an option to clear analytics at the same
time. This is in preparation for moving Connectivity Metrics to GmsCore.

Also fixed a bug in video call analytics and adds a test for it.

Bug: 30600318

Change-Id: I567d769123d78b7e5e2b9e8865fccf36f4f30fae
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
1e37be5dd86a51b90e461f09dc8a89effe4aee21 11-Jul-2016 Tyler Gunn <tgunn@google.com> Finalize multiendpoint functionality.

1) Handle the PULLING state throughout telecom.
2) When parcelling calls to send to InCallServices, remap PULLING state
to DIALING if an InCallService doesn't support external calls. This
ensures compatibility for things like Android Wear/Auto.
3) Ensure add call isn't disabled because of external calls.
4) Modify InCallController to handle changes to whether a call is external
or not. For IncallServices that do not support external calls, we will
add the call when an external call becomes a regular call, and we will
remove it when a regular call becomes external.

Change-Id: I1bf6c1f7e182834c3ab1ed34cd119467a4698993
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
874c0f8fa95a5da5a82e67c1fe39697883d753eb 30-Apr-2016 Hall Liu <hallliu@google.com> Add call events to analytics

Adds a record of events and timing information to analytics for each
call. Also add session timing information independent of calls.

Bug: 28623064
Change-Id: Iea6d4a7482365534a3a0c6c672a969dae8141932
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
05c8a72542ee27d9d6dff7604a273bf0996815c6 01-Apr-2016 Abhijith Shastry <ashastry@google.com> Remove deprecated launchManageBlockedNumbersActivity API implementation.

BUG: 27364137
Change-Id: I2cf108fa0647b368e09ea1946283ae336653380a
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
501b9b3775232bb3033afd9f1fd608dd07d0b91e 07-Mar-2016 Santos Cordon <santoscordon@google.com> Dynamic InCallService switching.

Be able to switch between in-call services UIs.

Created a tree data structure to handle switching between InCallServices
depending on the state of the system. Tree looks like this:

CarModeSwitchingConnection
| |
+------+ +-------+
| |
CarModeConnection EmergencyConnection
|
|
DefaultDialerConnection

Bug: 24571147
Change-Id: I0999fad4185321d5211172aed2f1d60fe8f5fe3a
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
e2e4cdff6dd167ea1ede3eb6ee53468b9a32f0af 18-Mar-2016 Jeff Sharkey <jsharkey@android.com> Mark more Bundles as being defusable.

They're destined for the system, so they're okay to look inside.

Bug: 27726127
Change-Id: I1376f7ac89dcc8ac0e9361ceb572c1a1d7ee7949
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
b1308ec228d8517caddaf0b09d57aacf67c8dcab 01-Mar-2016 Abhijith Shastry <ashastry@google.com> Implement createManageBlockedNumbersIntent API.

BUG: 27364137
Change-Id: Iaced9910db04df73cc3d7503e4ec6c4a3e4fb15a
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
ebe7bbeb63816c69189c7e0b6c5f42139b2f1544 29-Feb-2016 Abhijith Shastry <ashastry@google.com> Stub implementation of createManageBlockedNumbersIntent.

BUG: 27364137
Change-Id: Idb0f56fcbb6b85def7beeff206af732195ea3f47
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
5851fa014a0c6a245f8da96083674622bfce0d9c 23-Feb-2016 Tony Mak <tonymak@google.com> Should check against calling user instead of current user

The bug is introduced in ag/862293.
We should check calling user instead of current user to support work
profile.

BUG: 27313818
Change-Id: I248ed87a71363d9b624013e938391c4fd79977fa
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
62da8e1505f887838dcd4895ebdb23a40b409515 29-Jan-2016 Brad Ebinger <breadley@google.com> Any ConnectionService can now not create a new incoming call

Previously, the PhoneAccountHandle was not checked in
TelecomServiceImpl.addNewIncomingCall, which meant that any unregistered
ConnectionService can add incoming calls to Telecom. A check has been
added that throws a SecurityException if a PhoneAccountHandle is passed
in that is not both Registered and Enabled.

Bug: 26864502
Change-Id: I6f05841423aa1d8e0d3595246f59115286aabfac
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
c926185584d458323465431c296c51fe52f87945 05-Feb-2016 Mohamed <abdalkader@google.com> Add UI to manage blocked numbers.

TESTING/Functionality=
- Adding empty not allowed.
- Rotation: dialogs/general UI.
- Adding same number ignored.
- Non-primary users not allowed to manage blocked numbers.
- Material ripple for delete button.
- Action bar back button exit activity.
- Prevent EditText from stealing focus so talk-back starts
from the beginning.
- Talk back allow user to read row by row in list view.

There are two things left that I will do in a follow-up:
- Alert Dialog Theme.
- Add some validation for the user input

Screenshots: https://drive.google.com/a/google.com/folderview?id=0ByV4lfyID02GTGV1QWRTOGlKWTQ&usp=sharing
Bug: 26917087
Change-Id: If390d863f40162e12b0bd5d06b8bfccaa7fad5b2
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
7a846f5378046320799238dd974606daccfbcbbb 02-Feb-2016 Abhijith Shastry <ashastry@google.com> Stub implementation for managing blocked numbers.

BUG: 26917087
Change-Id: I994426991438a2a604d563ecc8a00863315227f0
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
4475002ecdda92136db1b45d3c5ba0a30932199d 27-Jan-2016 Sailesh Nepal <sail@google.com> Merge "Allow dialer to play incoming call ringtone"
c07b8e190b04e8b3e504478fa808d646d8c88a52 24-Jan-2016 Sailesh Nepal <sail@google.com> Allow dialer to play incoming call ringtone

This CL allows the default dialer app to play the incoming call
ringtone. This is useful because:
- the sound will now be played at the same time the UI is shown.
Previously the sound could be played earlier
- it will be easier for the system to respect the user's do not
disturb setting on a per contact basis

The dialer app can opt into the new behavior by setting a meta-data
value of IN_CALL_SERVICE_RINGING to true.

This CL also notifies the InCallService if silenceRinger was called.

BUG: 22857261
Change-Id: If1d05a922dd9869bc5b58157c67e9144001ee1ad
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
ce68874475498dcb69a543559177d69ac6dae215 26-Jan-2016 Shishir Agrawal <shishir@google.com> Unhiding MSIM APIs.

1. Unhide MSIM APIs in TelephonyManager that already have non-MSIM equivalent
APIs public.
2. Make MSIM API naming consistent (overloaded, no suffix).
3. Unhide APIs in SubscriptionManager that are necessary for MSIM.

Bug: 26772894
Change-Id: I7a1826255370e9a8c7c62516eb49725dce377c8c
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
e091ab90e37845cf4771051a6d2ce0ebadee4fe7 19-Dec-2015 Hall Liu <hallliu@google.com> CallAudioManager refactoring

Separates the handling of audio mode and audio focus into a state
machine and brings ringing, tone generation, and ringbacks under the
control of CallAudioManager.

(cherry picked from commit fc2270137059e855756769752899d613e27d12a8)

Change-Id: Idd765550c907150117b8b66f76e88868ae3785c2
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
72d04b26de0d5f3552be55ec6d0023c6aebaec77 15-Jan-2016 Hall Liu <hallliu@google.com> Merge "Add methods to dump analytics through TelecomManager."
ecd74a56dbce2d15ff46ad3e64a16dfe8b6c734f 13-Jan-2016 Hall Liu <hallliu@google.com> Add methods to dump analytics through TelecomManager.

Implements dumpCallAnalytics in TelecomServiceImpl to export the
contents of Analytics so that it can be uploaded.

Change-Id: Ic2355187967bf5192c803ff8584b1b4ed5cdf1da
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
a993094840386163e9c2aa65a05e14b49d122318 15-Jan-2016 Tony Mak <tonymak@google.com> Updated missed call notification behaviour

Change-Id: Id32110413fbb5fa4ae4c3478e70f54d211b78389

Missed call notification

1. If the phone account has multi user capability, the notification
is shown in current user.

2. If the phone account has no multi user capability, the notification
is shown in the user that owns the phone account of the call

3. Whenever user is switched, reload missed call from database and post
notifications if necessary.

Change-Id: Id32110413fbb5fa4ae4c3478e70f54d211b78389
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
0a6dd30f0f7acab586db9933bd4836148cd91c89 17-Dec-2015 Hall Liu <hallliu@google.com> Add more tests for TelecomServiceImpl

Change-Id: Ieef40369762736c01a331fe4a3cc72bed8928103
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
ecda55454f4993003e71e09a63d20f94a216cc47 04-Dec-2015 Hall Liu <hallliu@google.com> Add unit tests for TelecomServiceImpl

Added unit tests for TelecomServiceImpl and added some refactoring to
avoid static dependencies in TelecomServiceImpl.

Change-Id: I22a54e1e36c3a44dc07f65f534c0b9b6d534abd9
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
11623a354be47205bf3bc686ed8fdfc278958983 25-Nov-2015 Brad Ebinger <breadley@google.com> Adds Telecom Logging to TelecomServiceImpl.

Adds Telecom logging sessions to the major entry points in TelecomServiceImpl
and other modules in order to track the code paths of other processess.

Refactor CallAudioRouteStateMachine to use callbacks in StateMachine to
handle logging.

Change-Id: I48a70afaf2028ace73608be4f825c49af16c1622
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
b2cadb6851ef78ab62c328bf23e327c14aeda536 08-Dec-2015 Hall Liu <hallliu@google.com> Merge "Add analytics recording to Telecom"
3258720f5526f766aa26c19cf01b32ac20d19d1d 18-Nov-2015 Hall Liu <hallliu@google.com> Add analytics recording to Telecom

Adds a way to record interesting information about calls that can then
be uploaded for later analysis.

Change-Id: I029688cbb28ba75c00df64b7c1aa9eda382fde99
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
4a3e2fd2b783c9f667a719237ef527ebe686fe32 04-Dec-2015 Tony Mak <tonymak@google.com> Allow setting default phone account handle per user

The problem we cannot have every users has their own user handle is becoz
we did not store user handle.
Store default phone account handle with user handle, so that every user
can has it owns default phone account handle.

Bug: 25941865

Change-Id: Iad8a920e9ceeb9caa8a7d8bc6a1d2f2dfc8dcd58
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
240656f19c078b4f703d0502ce29114de0d45a50 04-Dec-2015 Tony Mak <tonymak@google.com> Methods in PhoneAccountRegistrar should ask for userhandle explicitly

1. Get calling user handle before calling clearCallingIdentity
2. Methods in PhoneAccountRegistrar asked for the user handle explicitly
instead of trying both current user and calling user
3. Modify isVisibleForUser in PhoneAccountRegistrar,
- PA with CAPABILITY_MULTI_USER is visible to all users including
managed profile (We are still discussing this, but let's assume it
works in this way and change it later if necessary)
- For other PAs, they are only visible within the user they are
registered to.
- TelecomManager.getPhoneAccount is an exception case. The visibility
checking of getPhoneAccount allowing a PhoneAccountHandle from other
profiles in the same user.
Reason:
Telecom passes PhoneAccountHandle to incall UI and incall UI
retrieves PhoneAccount from the handle.
It is because we never bind to managed profile's incall UI, and bind
to its parent user provided one instead. So phone account handle in
managed profile is passed to it's parent user incall UI. And we need
to allow parent user incall UI to retrieve the PhoneAccount from
the handle.

4. Please notice that the default PA account related APIs does not really
support multi-users. The backend (xml storage) does not include user
as a key and it should be able to store one default only and is shared
among all users. This problem is not fixed in this commit.

Bug: 25936882

Change-Id: Ia371723d68247a208a0c1185f6d02f1b5897946a
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
fd3a71fb611005a95c2063bbf082b81dcdfffc3f 30-Nov-2015 Brad Ebinger <breadley@google.com> Merge "Introduce Session logging to CallAudioManager"
72930a80679d461ad694b6555b0749d5fc4e31a8 23-Nov-2015 Brad Ebinger <breadley@google.com> Introduce Session logging to CallAudioManager

Introduces session logging into Telecom's CallAudioManager and
incoming call entry points.

Change-Id: I7419fd5372a363ac21dbec8d4aeb29b05591300d
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
98e6bdc795585b0d332a7eb86245926c8d80609a 25-Nov-2015 Tony Mak <tonymak@google.com> Update calllog insertion logic

Here are behaviors defined by Lilian, we may revisit the behavior later.

1. Calls using multi user PhoneAccount are inserted to all users
except managed profile.

2. Outgoing call placed through work dialer is inserted into managed profile
only.

3. Calls using non-multi user PhoneAccount should be only inserted to
that particular user.

Change-Id: I84f54afb3af38b931b71063608f38d265aa0417c
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
42ef808c284791f21be8675174acc7297418fa45 25-Nov-2015 Tyler Gunn <tgunn@google.com> Add "acceptRingingCall()" API which accepts a videoState.

- Added acceptRingingCall API which accepts a videostate to complement the
existing API.
- Added unit test for acceptRingingCall APIs.

Bug: 20159300
Change-Id: I4166a8b7c470632d0ffc0e75504b081ffeea733d
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
e6276e1d012ea3f93e4dc2a0c8567664dcfd31b3 23-Oct-2015 Tyler Gunn <tgunn@google.com> Fix issue where incorrect call state disables "Home" button.

There is a potential, due to multithreading, for a call to enter a
ringing state, become disconnected, and then finally be added to Telecom
where it will again be set to ringing. The PhoneWindowManager code
uses the TelecomManager API to check if there is a ringing call and to
determine if the home button should be disabled. The aforementioned
circumstances result in the PhoneStateBroadcaster not properly tracking
the current call state. It happens that the Telecom API isRinging method
simply checks the current state in the PhoneStateBroadcaster. In the
scenario for this but, the phone state is stuck in ringing, and as a
result the home button remains disabled.

This CL fixes this on 2 fronts:
1. Correct CallsManager onSuccessfulIncomingCall so that it will not
automatically set the state of a new incoming call to ringing if it has
already been disconnected (this will prevent PhoneStateBroadcaster from
getting the wrong state).
2. Change the Teleco isRinging API to check CallsManager#hasRingingCall(),
which will look at the list of currently tracked calls to determine whether
there is a ringing call (regardless if the PhoneStateBroadcaster has a
potentially inconsistent state).

Bug: 25146970
Change-Id: I6273c72bac5fc7d91e16a8ff8aa12a7081089824
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
a8120c1a5c3a21f911ba36d623c815ed121696d4 29-Oct-2015 Bryce Lee <brycelee@google.com> Fix log message for phone-account unregistration. am: 7bab665150 am: 48fdc2c6dd
am: 091f3e2f34

* commit '091f3e2f345fcb19f7fb8348bd61f282aaf54c54':
Fix log message for phone-account unregistration.
7bab6651504422cddb01921e2d3220b801924bb0 29-Oct-2015 Bryce Lee <brycelee@google.com> Fix log message for phone-account unregistration.

Change-Id: Ib0fa08883e06057080976bc596b437e4bc6a31f8
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
a079d9f3d800ff8cd54a2023bb082ace1ff680c4 29-Oct-2015 Bryce Lee <brycelee@google.com> Broadcast when a phone account is unregistered. am: 7d53dd296f am: b187fecfed
am: 96cd8b536a

* commit '96cd8b536a6ca1db6ea7696b741051c2c558aa69':
Broadcast when a phone account is unregistered.
7d53dd296f876b95e53a8febe284edc90667765e 28-Oct-2015 Bryce Lee <brycelee@google.com> Broadcast when a phone account is unregistered.

The action was previously added but not wired up.

Bug: 25331205
Change-Id: If7b8910928a579c7f86a3bd42f725d4d16dec973
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
370a7a37ef41020fe6d1017927aaf114be331b87 16-Oct-2015 Tyler Gunn <tgunn@google.com> DO NOT MERGE Fix getAllPhoneAccounts() api method

The getAllPhoneAccounts() API method was returning an empty list because
it was it was not being filled with actual accounts from the telecom
registry.

Bug: 23023110
Change-Id: Ia9dc0067dc481c401c5af88011450469580d5682
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
64196864859c3b46502002edacc235fc83f4aa32 13-Oct-2015 Xiaohui Chen <xiaohuic@google.com> clean up USER_OWNER in Telecomm

Bug: 22956426
Change-Id: I7a046d8c05e4e9d3958742a23493979055d39b42
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
e39fe67019511aea6b965d9283a95a776bd21fdd 01-Sep-2015 Yorke Lee <yorkelee@google.com> am ab5b39a7: am f8f73f5f: am defd629b: am aad82da8: am 607a099d: Merge "Enforce CALL_PHONE permission for default/system dialer for non emergency calls" into mnc-dev

* commit 'ab5b39a7d1c2f8c96b2497c3241410e5a4170d0f':
Enforce CALL_PHONE permission for default/system dialer for non emergency calls
cf497c9f72d3f7bac609ca6d5a64ddf2e28f6dbe 29-Aug-2015 Yorke Lee <yorkelee@google.com> Enforce CALL_PHONE permission for default/system dialer for non emergency calls

This CL fixes a bug where a default/system dialer targeting SDK 23 would
be allowed to place phone calls without the CALL_PHONE permission. This is
because for the default/system dialer, the Telecom system was only enforcing
the CALL_PHONE app_op.

In order to enforce runtime permissions for both SDK 23 and pre SDK 23 apps,
both OP_CALL_PHONE and CALL_PHONE permission must be checked.

Bug: 23607431
Change-Id: I57b6388349e0637df02799c14a2850c2c6e5a300
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
650b94810a1b4eaa331bd02f33f4a01c17d87d6c 17-Aug-2015 Nancy Chen <nancychen@google.com> Fix getAllPhoneAccounts() api method, was returning nothing.

The getAllPhoneAccounts() API method was returning an empty list because
it was it was not being filled with actual accounts from the telecom
registry.

Bug: 23023110
Change-Id: Ia9dc0067dc481c401c5af88011450469580d5682
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
86b8e33e74b859427b51651c76c8ec58f57b5f65 31-Jul-2015 Amit Mahajan <amitmahajan@google.com> Add OrSelf to privileged permission check.

Bug: 22857263
Change-Id: Ide7105dfd653e3c271330822fb8cee7cf620e35d
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
fc43ea86697d3d052415cbb4feda7bd508563532 29-Jul-2015 Sailesh Nepal <sail@google.com> Add user ID parameter for getSimCallMangaer

The sim call manager depends on the default dialer
which is a per user setting.

This CL adds a user ID to the getSimCallManager API.

BUG: 22790160
Change-Id: Icaf1db6c6943b3ddbd16a946a81d1bfb734d761f
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
7da7ea937434faa9acc877a521c072fa83f45932 14-Jul-2015 Amit Mahajan <amitmahajan@google.com> Fixed typo (READ_PHONE_STATE to READ_PRIVILEGED_PHONE_STATE)

Bug: 22468536
Change-Id: Ifaff7e62f97ae14a0695c5de3bfe9394b6099505
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
3c2969304cf130119af613a37c50582bcfbf7921 14-Jul-2015 Amit Mahajan <amitmahajan@google.com> Add checks for READ_PRIVILEGED_PHONE_STATE.

Callers will have either PRIVILEGED or regular READ_PHONE_STATE.

Bug: 22468536
Change-Id: I60251f61250a975f4147b027d2539824a728e3b5
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
9427c0fc29869b76116776b1643c208ef3a031c4 27-Jun-2015 Yorke Lee <yorkelee@google.com> Fix SecurityException when adding new incoming call

When checking to see if the caller is the SIM Manager (which now
checks for the default dialer package), make sure to run the
code in Telecom's UID.

Bug: 22047159
Change-Id: Ie460d4cf78308def706a2c8f658451cf649e19c4
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
5dc42ee62c21ee81d51a411a0cfb61653fdf2858 19-Jun-2015 Yorke Lee <yorkelee@google.com> Disallow non-emergency outgoing calls without CALL_PHONE permission

Bug: 21925398
Change-Id: I9cef6cd2c11f767740d03ebce99b8b54efd1f68a
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
59c21a747c31773a67a32675be29c4d0537a3513 11-Jun-2015 Santos Cordon <santoscordon@google.com> Change Sim Call Managers to use default dialer app instead.

Bug: 21499476
Change-Id: I60505ac1699f287656434b55d81aa61d4ae4ce14
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
89b1481f240dba5f17b3b916aab7d20e6b3f92af 15-Jun-2015 Yorke Lee <yorkelee@google.com> Merge "Send broadcast when default dialer changes" into mnc-dev
b3984309ff85330e0f99270d0bcd0e3d48055a6c 15-Jun-2015 Yorke Lee <yorkelee@google.com> Send broadcast when default dialer changes

Bug: 21846308
Change-Id: I9034051644c9351bc73946fe3f5aa64bf080f200
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
43e094ff6115770175578569077d33e3568f62c2 15-Jun-2015 Sailesh Nepal <sail@google.com> Merge "Remove some dead code in TelecomServiceImpl" into mnc-dev
83b686411c2f4ef27f49ce65e862d8f3484d68e2 15-Jun-2015 Sailesh Nepal <sail@google.com> Allow PSTN phone account for incoming calls from connection manager

See ag/648273 for the original change. It looks like this was
partially reverted by the refactoring for.

BUG: 19591608
Change-Id: I1e95cbeff2f1813999501b1acbb2553c095638e2
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
fba9a8ce9664e422e63f4d1d279ffb45b061801d 15-Jun-2015 Sailesh Nepal <sail@google.com> Remove some dead code in TelecomServiceImpl

Change-Id: I151356d1ff68abb164b85de7f24d2145be17b7ed
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
472aa6c4bf9107cf1ba8fd8316c2a56b2039d1ff 11-Jun-2015 Roshan Pius <rpius@google.com> Fail PhoneAccount addition if device is not voice capable.

BUG: 20305650
Change-Id: Id0702fc96e8e70be868fd8bb72252b81e7f1589e
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
3182239b89218ed4253f47490adb77c681715d44 09-Jun-2015 Roshan Pius <rpius@google.com> Reduce log level for "not visible for calling user" logs.

Bug: 19589413
Change-Id: I2ddaa3fd8211e209d68567fa85f3656d21a08e47
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
b2d1d4d53e6dca24413d7999ccf086f8461b1795 05-Jun-2015 Yorke Lee <yorkelee@google.com> Remove permission checks for registerPhoneAccount

Remove permissions required to register call provider
and connection manager.

Bug: 20303674
Change-Id: I14a16a2eadc4f74b41715dcf32e5b57aeb88e63a
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
a83f8a7012309177c75879c731132df0c8fc66f2 03-Jun-2015 Santos Cordon <santoscordon@google.com> Add ringer logging to telecom.

Bug: 21595219
Change-Id: I51ccaf4db1bd5d6238fa8f7e7091d092b75d0c1a
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
71734c2db8a4e412d833b267777dd011e04cc942 02-Jun-2015 Yorke Lee <yorkelee@google.com> 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
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
3188b364c360f83631fe1c7623c0e4252088b3c6 22-May-2015 Santos Cordon <santoscordon@google.com> Protecting PII data.

Bug: 21204385
Change-Id: I95a82e6ae79b728ed75da25be3beedd0e66d5b41
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
7db618571e0e887022344761d1b158e55b7a360d 19-May-2015 Santos Cordon <santoscordon@google.com> Merge "Provide enable property on phone accounts." into mnc-dev
ea5cb93d81099f17654e0fdf9b8eda3bfa89f081 08-May-2015 Santos Cordon <santoscordon@google.com> Provide enable property on phone accounts.

Bug: 20303449
Change-Id: I4b9cb0e29377233ed4fc01757570351ee6e5856e
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
57138a6916678747e585564c691144f781d173cd 19-May-2015 Yorke Lee <yorkelee@google.com> Privileged dialers always have phone-related runtime permissions

Bug: 20266292
Change-Id: If4492d9cdc7806167b9b586764b11187235cfd3a
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
cb0bd8a807c0b7d0c4db9fe9a48ea8cbf2efa97e 18-May-2015 Yorke Lee <yorkelee@google.com> TelecomServiceImpl permissions cleanup

Simplify some code that does permission checks
Allow default dialer to use placeCall API.

Bug: 20266292

Change-Id: Ib31ae5f7debb41df9daa5dce330a7a86ac58e81a
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
ebf2d0f2b4f17e958b0b23d94edc6b0d05334e43 15-May-2015 Santos Cordon <santoscordon@google.com> Add a slew of clearCallingIdentity() invocations to telecom.

We used to use Handlers to move things onto the telecom main thread when
they came in through Binder calls. This also had the effect of
switching to telecom's calling identity.

Since we no longer do that, we need to manually reset the calling
identity to avoid the permissions failures that we've been seeing
lately. This change adds all the checks that are necessary today and
checks which would help down the road if any code changes.

Bug: 20830275
Change-Id: I73e3e2d310a505ac96abe3aed7f2118346c7be1f
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
6d3efb475b495722b32976fe60c1ea5a9838ae53 14-May-2015 Sharvil Nanavati <sharvil@google.com> Fix crash caused by incorrect permission in TelecomServiceImpl.

Without this change, the addNewIncomingCall and addNewUnknownCall
would use the caller's permissions instead of Telecom's permissions.
The caller may not have android.permission.BIND_CONNECTION_SERVICE
resulting in the process crashing.

Bug: 21057492
Change-Id: Ia67d1e32914c814cdff1af987eb72ed1aa759bdb
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
6a2126477ce3f527ecaec807fe4f40cd13ff02b0 09-May-2015 Santos Cordon <santoscordon@google.com> Clean up PhoneAccountRegistrar.

Cleanup lots of duplicate code and consolidate all phone account
retrievals into a single method: getPhoneAccounts(...).

Consolidate checks for capabilities, package-name, uri, and
isVisibleForUser(...). This will be very helpful when
implementing enable/disable for phone accounts.

Bug: 20303449
Change-Id: I24d63cd313876f5d9390f2eb31c0ce79d7cb0ab2
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
29c003e7a3e439376120cbfac088010d3c099fec 05-May-2015 Yorke Lee <yorkelee@google.com> Add hidden methods to set/get default dialer across users

Bug: 20696062
Change-Id: Ib26197c670caed9f2eab3e252c8fbc6102e0d476
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
58061751ecd5d302f57436582fcff82689e2bb6c 04-May-2015 Yorke Lee <yorkelee@google.com> Call restoreCallingIdentity in finally block

Bug: 20822416
Change-Id: Ideadd8093408defe761288ecb9c728637555f351
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
b3feab5a6ad30161726cf2decf4c0b06a78f5d41 30-Apr-2015 Yorke Lee <yorkelee@google.com> Fix issues with UserManager.DISALLOW_OUTGOING_CALL

* Make sure the correct user is checked when using the
TelecomManager.placeCall API.

* Since a toast cannot be shown without an activity context,
show the error using the ErrorDialogActivity instead.

Bug: 20665346
Change-Id: I353cb009e8f90572a52b560259582180898370d2
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
5310196deda80ace064a7d5bc672dbe1974906b9 30-Apr-2015 Yorke Lee <yorkelee@google.com> Add default dialer checks to Telecom/Telephony

Check for the default dialer or the modify phone state permission
for various TelecomManager/TelephonyManager methods.

Make sure to check the user-selected default rather than the
hardcoded package name.

Exercise this code in TestDialerActivity.

Bug: 20304458
Change-Id: Ic04cd8f2ba98e1d54c39549ae89d3e11cd5cdafb
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
e59c55cb20a28001c2a27c6ddaad639cae843832 28-Apr-2015 Yorke Lee <yorkelee@google.com> Simplify DefaultDialerManager

The previous code worked with ComponentNames because it was
based off existing code for the default SMS application.
We only really need the package name however, so simplify the
code by storing and retrieving the package name directly.

Bug: 20304458
Change-Id: Icabd3a9f0f8166c105360494b601160d13767fad
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
69f2f7c78b720c1e9748bd5b277b2b0ab94cac0e 25-Apr-2015 Yorke Lee <yorkelee@google.com> Fix some logspam

No need to log the entire exception when the caller is not
the default dialer. This can happen if the system (which has
MODIFIY_PHONE_STATE) calls a method, and can be confusing
when reading the logs.

Change-Id: I1c48b2a12961ab000995114aed7fe519021549d7
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
5291d4aeda2a4e7bfb6eeb33e0c910e8c14de82c 25-Apr-2015 Yorke Lee <yorkelee@google.com> Add some comments to TelecomServiceImpl

Change-Id: I92d8e83a5f06a08f12e641f8cd9e910baa957caf
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
5b3fc0a2ae85b893e7e971112458391c194f3d2d 24-Apr-2015 Yorke Lee <yorkelee@google.com> Add APIs to getDefaultDialerPackage and getSystemDialerPackage

getDefaultDialerPackage is a public API and will be used by
apps to determine if they are the default dialer.

getSystemDialerPackage is a hidden API and is only used by
system components.

Bug: 20304458
Change-Id: Ifed855ccb8827cb2f62fd13f7c5afc307425ef29
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
b791066bb4661b56dc27faa8585065fdfffada6f 24-Apr-2015 Yorke Lee <yorkelee@google.com> Handle outgoing call broadcast with Telecom's permissions

The default dialer may not have MODIFY_PHONE_STATE permissions
anymore which is needed to start the outgoing call. We've
already checked for permissions at this point so do the
rest of the broadcast with Telecom's permissions.

Bug: 20304411
Change-Id: I50cfa75ae27072237ea7b6b8fe2a5113b8d1d959
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
b2f22a96675c7365535b2300aa0682e483b2a336 24-Apr-2015 Santos Cordon <santoscordon@google.com> Merge "Move CallState and rename PRE_DIAL_WAIT."
92694519535c54f542b4ef3973e9c1934f2feeff 23-Apr-2015 Santos Cordon <santoscordon@google.com> Move CallState and rename PRE_DIAL_WAIT.

CallState was a public API only being used by Telecom so I've moved it
into to Telecom and removed it from the public API. The translation
from CallState to Call.STATE_* was happening on the public Call object
which wasn't ideal (Call.java shouldn't have to know that other
representations of state exist). So I moved the translation into
InCallController.java and what we pass into ParcelableCall is now
Call.STATE_* constants.

Bug: 20532827
Bug: 20532435
Change-Id: I79ce36c7e971c1a49b857506c9a56cfe316069cf
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
a3a3adc39441d3c206400ff26fc117fae2ead5ed 23-Apr-2015 Yorke Lee <yorkelee@google.com> Add TelecomManager.placeCall

Places a new outgoing call using the system telecom service
with the specified parameters.

Making emergency calls using this method requires that the
method-caller is either the user-selected default dialer app
or preloaded system dialer app.

Requires that the caller have the
{@link android.Manifest.permission#CALL_PHONE} permission.

Bug: 20348183
Change-Id: Ieedb5628e8c6be25137944e7c3639dc1d9bc61df
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
f136b2714c5dd4e85d0a875abfa7baa77b29be38 20-Apr-2015 Santos Cordon <santoscordon@google.com> Merge "Add call event logging to telecom."
2685dabdb656f72dfe851215f2e99f82896f052f 18-Apr-2015 Santos Cordon <santoscordon@google.com> Add call event logging to telecom.

This code saves the last 5 calls and prints out all the call-related
events when doing a "dumpsys telecom". This includes dumping all
information about the last 5 calls so that bug reports always contain
information about the calls.

Bug: 18923652

Change-Id: I4dbdea32ba4eea3b3a4158fbae99649dc045cd62
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
38f1a4d91fbf8d97e3acca5bb9ea3622cfb3d0e0 18-Apr-2015 Svet Ganov <svetoslavganov@google.com> Fix build

Change-Id: I900183e04e4aaf10bfb50c15ad00edf5d6953eaa
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
09611181c665403a8d9e70d95b7e0e4361976122 16-Apr-2015 Svet Ganov <svetoslavganov@google.com> Add OP_READ_PHONE_STATE app op - telecomm

Change-Id: Ie89bad3d47679eb99e7a1cfd326f4e81da1d088b
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
4a414e88c32aa39a749733abe2816769836e8b99 16-Apr-2015 Yorke Lee <yorkelee@google.com> Merge "Change hasVoicemailNumber to getVoicemailNumber"
c7f397243309599a88931c6110621bb1b507678a 16-Apr-2015 Vinit Deshpande <vinitd@google.com> Merge changes from topic 'mwd-merge-041515'

* changes:
Fix build issues after the merge
am 817090c..60db0ce from mirror-m-wireless-internal-release
am "DO NOT MERGE Add ability to simulate missed calls"
am 0be7b9d..b3e8a72 from mirror-m-wireless-internal-release
am 959afe0..abcbce4 from mirror-m-wireless-internal-release
fb5ec30b085321ffcc7c3229f9d217a22f3120b2 16-Apr-2015 Yorke Lee <yorkelee@google.com> Change hasVoicemailNumber to getVoicemailNumber

Bug: 20223485

Change-Id: I1db1d77cea5d0fadff116c8f8455438625f84153
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
0785274982d454b4fa036cc7a7aa9dcf768ef074 11-Apr-2015 David Stevens <stevensd@google.com> Open up and fix TelecomManager#addNewUnknownCall

Bug: 20141479
Change-Id: I6d959cf402a5529842263bb71200bbe8601c86ad
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
e3893f1cb332578d7de5ca4c4a1c19f3ce7d3cea 14-Apr-2015 Yorke Lee <yorkelee@google.com> Allow default dialer to silence ringer

Bug: 20142222
Change-Id: If56a84b4ae39dfd3bfca737cdbfab2002a7ac858
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
aa383cca668afd8578a6e007c3ea360768dc52f6 23-Mar-2015 Ihab Awad <ihab@google.com> Further cleanup, and move functionality into TestFixture objects

Change-Id: I62b514ae8fe10f720a60c681968efd2340616eba
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
b63b57e2c35c4769e756f47131c7ebbc0af42c59 23-Mar-2015 Ihab Awad <ihab@google.com> Further cleanup, and move functionality into TestFixture objects

Change-Id: I62b514ae8fe10f720a60c681968efd2340616eba
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
8d5d9ddc66b55b6906364ab3c0e244dab4d58f13 12-Mar-2015 Ihab Awad <ihab@google.com> Make Telecom synchronous

Remove main-thread handlers and add a systemwide lock object.

Change-Id: I6334fdfa6c244836f6375bea302404f61c81301b
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
8de76915ea2772faeb41705aaaeb65f5b3478ac4 17-Feb-2015 Ihab Awad <ihab@google.com> Further refactor Telecom and add tests

Complete refactoring Telecom to remove singletons from the core code.

Introduce a unit test that simulates a full outgoing phone call from
start to hangup.

Change-Id: I8b09cac6eb9b6aeeb0aeba5d8ae032b4c303c08d
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
b600a5f7a9905a86f1270997c03739037bfed48c 07-Mar-2015 Etan Cohen <etancohen@google.com> Amend ag/648273 (Allow PSTN phone account ...)

Amend above CL to build with re-organized TelecomService implementation.

Change-Id: I165549ec3ed27831f90c437c1a83803f56b62a34
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
036171a0f7aa65316569c5a47d2a1a02bc83a249 06-Mar-2015 Sailesh Nepal <sail@google.com> am 2a98c97e: Allow PSTN phone account for incoming calls from connection manager
automerge: 348dcd9

* commit '348dcd9ddb95bee674ceb7dc37f7369ca5970908':
Allow PSTN phone account for incoming calls from connection manager
712f974b989997f1881dbd558a08069cbc18f7cc 06-Mar-2015 Nancy Chen <nancychen@google.com> Fix build breakage.

Because of refactoring, can't directly use the cherrypick as is.

Change-Id: Ic0d7bd95701c955c6277b065e6975e238209ff9f
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
738539670f87caa3edb6ba2b52f0ecba81ea25bd 28-Feb-2015 Santos Cordon <santoscordon@google.com> Broadcast phone account registrations

This is cherry-picked from master

Change-Id: I1ad86c6fde042f1b3b38687800e434dfc82c75e4
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
91fc8099a0690a3367eb206788c9c25ceff31875 15-Feb-2015 Sailesh Nepal <sail@google.com> Fix connection manager bugs related to work profiles

When calling TelecomManager.addNewIncomingCall with an account
that's was not registered we would crash. Fix was to check
for a null phone account.

Various TelecomManager APIs would throw security exceptions when
called from a work profile. Fix was to:
- switch to using APIs that allowed the user to be specified.
For example, using queryIntentServicesAsUse instead of
getServiceInfo
- don't look for work profiles if the calling user isn't the
owner.

The default connection manager (set using a config.xml overlay)
didn't work with work profiles. Fix was to allow the default
connection manager to resolve against the calling process's
user handle.

BUG: 19300886, 19301690, 19301359
Change-Id: I49d75b69dcfc829b74a5483d7a011f17d8d06838
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
78a5e6b9c1595c81f72d7a822617cb78db224e48 06-Feb-2015 Ihab Awad <ihab@google.com> Refactoring for testability

Refactor to a single app singleton, TelecomSystem, which owns the
intialization of the rest of the app.

Change-Id: I3036f200b56f710e7f830b469260a67145c327e7
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
f987d1a6f1d02164210a70b417db2bc14576236c 02-Dec-2014 Santos Cordon <santoscordon@google.com> (Telecom-system part 2) Move telecom intialization from application to service.

Instead of having TelecomApp initialize the global state of telecom, it
will bind to the telecom service and the service itself will
initialize the global state. This prepares telecom to run in the system
process since at that point TelecomAppw will stop running and the
framework will need to use the telecom service to start the global state.

Bug: 18112269
Change-Id: I76cd520e55ba2f58915ea2a7938cffd3cc101bab
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
105d977687d1d0de7cd9420fc140b01404261df1 25-Nov-2014 Evan Charlton <evanc@google.com> Track (and use) UserHandle to make connections

When binding to services, use the UserHandle which registered the
PhoneAccount in order to ensure that the correct user receives the
Intent.

Also make sure that TelecomManager does not leak PhoneAccounts across
profiles, unless the caller is a system-privileged app. PhoneAccounts
will not leak across users, even for system-privileged apps.

Bug: 17421902
Bug: 17421044
Change-Id: I673904a7ae038c88688bba62642e93174e55c308
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
1fdab8a00e601f19d7578c897bfd63d44704cb9b 04-Dec-2014 Nancy Chen <nancychen@google.com> Use TelecomManager to call TelephonyManager#getVoicemailNumber (2/2)

Since we don't want the phone app to call TelephonyManager methods
directly, create a method in TelecomManager to mimic the behavior. The
reason we don't return the voicemail number directly is because once
TelecomManager becomes public, we don't want any old app to be able to
get the SIM's voicemail number.

Bug: 18233678

Change-Id: I7eb9a60ab65aababeef7da7bce3b035dcaa1ad1d
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
64883a9430c9245d4884af05787c79ab16ccdb42 04-Nov-2014 Nancy Chen <nancychen@google.com> Merge "Adn queries for multi-SIM. (3/3)" into lmp-mr1-dev
c28f260236e32c2aa47011bcdc557305c988e7e8 31-Oct-2014 Nancy Chen <nancychen@google.com> Adn queries for multi-SIM. (3/3)

Process Telecom method to take in a subscription account and
return the URI for an ADN query for that account.

Bug: 17917937

Change-Id: Idedbe1c6fc63d21c7673c50c1d7894ba981d27ea
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
6e557e0453352823fba703664eb6fcebad9f961a 03-Nov-2014 Santos Cordon <santoscordon@google.com> Merge "Use new telecom PhoneAccount registration permissions." into lmp-mr1-dev
6be5e8c2a234f60a248c6ae6f4e3803574c20e06 31-Oct-2014 Santos Cordon <santoscordon@google.com> Use new telecom PhoneAccount registration permissions.

Bug: 18106506
Change-Id: Ic825b44c2dc42709073a3990f6a7ca8e372025e9
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
3ab204c11eb56bbf1fa5a0b4343b2382614bb46e 17-Oct-2014 Nancy Chen <nancychen@google.com> Handle MMI for multi-SIM (2/3)

+ Add Telecomm and Telephony methods for handlePinMMIForSubscriber
+ Add Select Account dialog in Dialer for MMI

Bug: 17917937
Change-Id: I47d1a2e9555434bb99759b957fa119dac92eb7cd
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
116549bfd182fab4a5b8f6c314838fa9648a41f2 25-Oct-2014 Evan Charlton <evanc@google.com> Use the public API permissions

Migrate the permissions to the new ones in the android.* namespace
instead of the com.android.server.telecom.* namespace.

Bug: 18114695
Change-Id: I1b8578cbc82e95ea78b4a2166f4a23650a0c375f
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
9451460dfabac4572094abeba04a83dc22bbbc70 24-Oct-2014 Santos Cordon <santoscordon@google.com> am 0ceb5a12: Add permission to CONNECTION_MANAGER PhoneAccount registration.
automerge: 5ae91bd

* commit '5ae91bdbbf00f36eec1d66ed854454611264a787':
Add permission to CONNECTION_MANAGER PhoneAccount registration.
5ae91bdbbf00f36eec1d66ed854454611264a787 24-Oct-2014 Santos Cordon <santoscordon@google.com> am 0ceb5a12: Add permission to CONNECTION_MANAGER PhoneAccount registration.

* commit '0ceb5a12f6fc2d9a4c9abe5361cbf7b4736e1a85':
Add permission to CONNECTION_MANAGER PhoneAccount registration.
0ceb5a12f6fc2d9a4c9abe5361cbf7b4736e1a85 23-Oct-2014 Santos Cordon <santoscordon@google.com> Add permission to CONNECTION_MANAGER PhoneAccount registration.

We need to add a system-level permission for registering PhoneAccounts
to prevent third party apps from registering and being able to
control the call.

Bug: 18100571
Change-Id: I06de9311620b271904babc78f23faff90a15e1a9
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
10feec62cd40c10ccece315db49c33c153c2a231 22-Oct-2014 Nancy Chen <nancychen@google.com> am a4a4bbd9: Merge "Enforce permissions for isVoiceMailNumber." into lmp-sprout-dev

* commit 'a4a4bbd96987f8ccdf040c179001924202c1035d':
Enforce permissions for isVoiceMailNumber.
a29b046bd45069852db2512c1c474b3fc4219353 21-Oct-2014 Nancy Chen <nancychen@google.com> Enforce permissions for isVoiceMailNumber.

Third party apps should not be able to discover a user's voicemail
number. Enforce permission to read state or dialing app only.

Bug: 17925501
Change-Id: Ieba52fe4bb4fbb57819519ded6a113473bf2a012
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
b1c12f0a8ae1fd7402d3ca9c8268e53204020e27 17-Oct-2014 Nancy Chen <nancychen@google.com> am 140004a1: Use Telecom API for checking if a number is voicemail (2/2)

* commit '140004a104402fde514f8a2182dc2d10a4f6917d':
Use Telecom API for checking if a number is voicemail (2/2)
9c95a953c1c39f21e8fb6f4e2fe58441f43b488e 17-Oct-2014 Nancy Chen <nancychen@google.com> am 5610e1de: Merge "Revert "Add API method to extract subscription ID from phone account (2/3)"" into lmp-sprout-dev

* commit '5610e1de7ee7bfb1543efce4a09b60028aba5ba5':
Revert "Add API method to extract subscription ID from phone account (2/3)"
140004a104402fde514f8a2182dc2d10a4f6917d 16-Oct-2014 Nancy Chen <nancychen@google.com> Use Telecom API for checking if a number is voicemail (2/2)

Since we don't want to communicate directly with Telephony in dialer,
call
PhoneNumberUtils.isVoiceMailNumber (a Telephony method) through the
Telecom API. Add a method in TelecomManager to do this.

Bug: 17925501

Change-Id: Id1e5824f27ef40f64b8a03ee912d82d1cc5324ac
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
5610e1de7ee7bfb1543efce4a09b60028aba5ba5 16-Oct-2014 Nancy Chen <nancychen@google.com> Merge "Revert "Add API method to extract subscription ID from phone account (2/3)"" into lmp-sprout-dev
178b3c4a023bb77835a1deecd6288854b48a2244 16-Oct-2014 Nancy Chen <nancychen@google.com> Revert "Add API method to extract subscription ID from phone account (2/3)"

This reverts commit e6c7587d9d208dfb4b62749cfa3ac4f6ff9c0c3a.

Change-Id: I4bdee16074cac190ea90101bf8cb7b40a1315499
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
75a9b63c753c8f52e6edb239095170301694de93 15-Oct-2014 Nancy Chen <nancychen@google.com> am f3ccd9d1: Merge "Add API method to extract subscription ID from phone account (2/3)" into lmp-sprout-dev

* commit 'f3ccd9d13f5451b54bb157625d4ede6dcb32d7f2':
Add API method to extract subscription ID from phone account (2/3)
f3ccd9d13f5451b54bb157625d4ede6dcb32d7f2 15-Oct-2014 Nancy Chen <nancychen@google.com> Merge "Add API method to extract subscription ID from phone account (2/3)" into lmp-sprout-dev
e6c7587d9d208dfb4b62749cfa3ac4f6ff9c0c3a 09-Oct-2014 Nancy Chen <nancychen@google.com> Add API method to extract subscription ID from phone account (2/3)

Since Telephony uses subscription ids and Telecom uses Phone Accounts,
there should be an easy way to interface between the two. Since the
value of the subscription id and "id" of the phone account should be the
same in the case of a SIM phone account, we just need to check that the
phone account in question is a SIM phone account and convert the string
to a long.
This lays in groundwork for the following bugs:

Bug: 17925501
Bug: 17917937
Change-Id: Iee044e3d6b88f598eefd3bafd01d2ca3b5ac0bb8
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
9f040550d16599113df65b6ec8c412f699298a76 15-Oct-2014 Tyler Gunn <tgunn@google.com> Merge "Adding more Telecom state dumping." into lmp-mr1-dev
e732ef425aba8df0229d61b071d4c00553ead469 14-Oct-2014 Yorke Lee <yorkelee@google.com> Send incoming call directly to CallReceiver

Remove CallActivity from the flow that happens when an incoming call
is received. This fixes the problem where the foreground activity is
paused when an incoming call is received. This also has the benefit
of eliminating any potential latency the CallActivity could have
introduced.

Bug: 17703900

Change-Id: Ibed8aa3fb8d1a88fec27435330b26aa1ed4fc3aa
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
9787e0e80d8960cf8b0ca74c7cdc4c4aac97187a 14-Oct-2014 Tyler Gunn <tgunn@google.com> Adding more Telecom state dumping.

Bug: 17730966
Change-Id: I47c83591417784c9484002213230065514b43f63
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
9250e5fa9987c3ab80e11e1955657055f5866539 01-Oct-2014 Yorke Lee <yorkelee@google.com> Add ability to add sim-initiated MO call to UI (3/4)

Pipe an unknown call through CallsManager via various new APIs like
onSuccessfulUnknownCall, onFailedUnknownCall, etc. These are the unknown call's
equivalent of onSuccessfulOutgoingCall and onFailedOutgoingCall.

Only the TelephonyConnectionService is allowed to call this hidden new API
in Telecom.

Also add the ability for TestConnectionService to test this API (although the
check for TelephonyConnectionService must be disabled at build time first).

Bug: 16852844
Change-Id: I5dfdfc1bd4675f6b300a4a55a3098582f9d715a2
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
6dc1c75ff9fbabce11540c2bbe3972159899b414 24-Sep-2014 Yorke Lee <yorkelee@google.com> Split CallActivity into trampoline activity and CallReceiver

Move most of CallActivity logic into CallReceiver. Only significant logic
remaining in CallActivity is checking for OUTGOING_CALL_RESTRICTED and
showing a toast.

Also fixes a bug where the secondary user would never be able to make
a call if the primary user had Google Voice installed, because the
ordered broadcast is sent out for the primary user, allowing Google
voice to cancel it.

Bug: 17579886

Change-Id: Id1689f36503a74e5754b10d019a8b64024d27f77
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
5070b0da14bd2da6f68a1ba011f9125fb9d193c5 20-Sep-2014 Santos Cordon <santoscordon@google.com> Forward CallActivity invocations to the primary user.

Telecom framework runs as the primary user only.

When CALL intents are sent via startActivity, they invoke
telecom.CallActivity on the current user (activities don't allow
specifying them as singleUser="true"). This code checks to see if
CallActivity was invoked from as the secondary user and if so
forwards the intent to the primary user's version of CallActivity.
CallActivity then simply calls directly into the rest of telecom.

NOTE: Telecom already does the right thing when binding to the
In-Call UI so that the UI always shows up under the current user.

Bug: 17253031
Change-Id: Iea7ecf4aa48ed80710a1ed35603cbf4588581afc
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
1c5926fc5f3c828c5b16c25a5154e5a0306ea3e7 17-Sep-2014 Nancy Chen <nancychen@google.com> Replace get*PhoneAccounts* public API methods with new method (2/3)

Hide getCallCapablePhoneAccounts and getPhoneAccountsSupportingScheme
because a third party app should not be able to see all phone accounts
registered. Replace instead with getPhoneAccountsForPackage(Context)
which will only return the phone accounts registered by a particular package.
Also pass available phone accounts for the user to select from through
Telecom to InCallUI so InCallUI will not be calling the Telecom API
directly to get these accounts.

Bug: 17510811

Change-Id: Ia91972bc4cfa938b743f6b3b165a81d4acd58c45
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
ce1a21ef6e0221107383b228c2219b3f0586eb67 17-Sep-2014 Tyler Gunn <tgunn@google.com> Merge "Preparatory work to move Telecom to system service." into lmp-dev
91d43cf9c985cc5a83795f256ef5c46ebb8fbdc1 17-Sep-2014 Tyler Gunn <tgunn@google.com> Preparatory work to move Telecom to system service.

- Removed use of TelecomApp.getInstance() as context.
- Refactored singleton logic and initialization to support being
performed from a SystemService.
- Note: You will see some commented out references to
"import com.android.internal.R"; these must uncommented when the code
is moved to a system service.
- You will also notice in PhoneAccountRegistrar.java a comment block with:
"UNCOMMENT_FOR_MOVE_TO_SYSTEM_SERVICE"
The code in that comment block will replace the existing file path
code.
These were added as a convenience so that I can run a simple sed script
to make the required changes to the code in an automated manner once it
is moved to its new location.

Bug: 17364651
Change-Id: I8e80e9cffc481b688c10a2bca0b59f5ccf8e0fb2
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
a53eb7f3b260c0601f0a01dae597a789450b2872 17-Sep-2014 Sailesh Nepal <sail@google.com> Remove MODIFY_PHONE_STATE requirement for Connection Managers

3rd party apps can't get this permission.

Bug: 17546794
Bug: 17510811
Change-Id: Ic479d4efb1e3aa9f418a0cf9c9a4fd879211b4bc
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
309198ec4d8b2738cf955316ea7a2f9418929fd1 16-Sep-2014 Nancy Chen <nancychen@google.com> Remove ability to enable/disable phoneaccounts (3/6)

Enabling/disabling of phone accounts was only used for SIP accounts and
is no longer necessary for the purpose it was put in.
- Remove all references to enabling/disabling phone accounts
+ Rename getEnabledPhoneAccounts to getCallCapablePhoneAccounts

Bug: 17510811
Change-Id: I5e8a59fe2aaac2563fe4bf97138975e30b45aa3c
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
ee9649b8694f2f6867b99072b8184e998359fc7c 16-Sep-2014 Yorke Lee <yorkelee@google.com> Merge "No longer require READ_PHONE_STATE permission for getCallState" into lmp-dev
97f8c770399a8fcc3ce740129cdc01066f3ae976 16-Sep-2014 Yorke Lee <yorkelee@google.com> No longer require READ_PHONE_STATE permission for getCallState

Bug: 17510808
Change-Id: I4c10d1440fefc85d777516353e4be5245038ed68
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
f1863270a872c18f73fc59ab581194ed203e6612 12-Sep-2014 Ihab Awad <ihab@google.com> Add system feature for ConnectionService API support (3/3)

Bug: 17445268

Change-Id: I01394f91d00401c572b598ea8ffc05b613de5045
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
f86db2e63ec71781ac8214ed6d2603d02266143d 13-Sep-2014 Yorke Lee <yorkelee@google.com> Add getCallState to Telecomm

Use getCallState in TelecommManager.isInCall and isRinging

Bug: 17378767
Change-Id: Id356c03f7fa21297d0376d56e09ce3f45399435b
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java
7cc70b4f0ad1064a4a0dce6056ad82b205887160 13-Sep-2014 Tyler Gunn <tgunn@google.com> Renaming Telecomm to Telecom.

- Changing package from android.telecomm to android.telecom
- Changing package from com.android.telecomm to
com.android.server.telecomm.
- Renaming TelecommManager to TelecomManager.

Bug: 17364651
Change-Id: Ib7b20ba6348948afb391450b4eef8919261f3272
/packages/services/Telecomm/src/com/android/server/telecom/TelecomServiceImpl.java