Find ICallServiceProviders on the device.

Uses package manager to find all ICallServiceProviders registered on the
system. This CL does not do the work of actually binding to the
providers.

Change-Id: I63cb3f73727e49542c09edf021fe010adf8ce90f
diff --git a/src/com/android/telecomm/CallActivity.java b/src/com/android/telecomm/CallActivity.java
index 54424e4..7258ef0 100644
--- a/src/com/android/telecomm/CallActivity.java
+++ b/src/com/android/telecomm/CallActivity.java
@@ -17,6 +17,7 @@
 package com.android.telecomm;
 
 import android.app.Activity;
+import android.content.Context;
 import android.content.Intent;
 import android.content.res.Configuration;
 import android.os.Bundle;
@@ -95,12 +96,17 @@
         String handle = intent.getDataString();
         ContactInfo contactInfo = null;
         try {
-          mCallsManager.processOutgoingCallIntent(handle, contactInfo);
+            // we use the application context because the lifetime of the call services bound on
+            // this context extends beyond the life of this activity.
+            Context context = getApplicationContext();
+
+            mCallsManager.processOutgoingCallIntent(handle, contactInfo, context);
         } catch (RestrictedCallException e) {
-          // TODO(gilad): Handle or explicitly state to be ignored.
+            // TODO(gilad): Handle or explicitly state to be ignored.
         } catch (CallServiceUnavailableException e) {
-          // TODO(gilad): Handle or explicitly state to be ignored. If both should be ignored, consider
-          // extending from the same base class and simplify the handling code to a single catch clause.
+            // TODO(gilad): Handle or explicitly state to be ignored. If both should be ignored,
+            // consider extending from the same base class and simplify the handling code to a
+            // single catch clause.
         }
     }
 }