• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.android.server.telecom.components;
2 
3 import com.android.server.telecom.TelecomSystem;
4 
5 import android.content.BroadcastReceiver;
6 import android.content.Context;
7 import android.content.Intent;
8 import android.telecom.Log;
9 
10 /**
11  * Single point of entry for all outgoing and incoming calls. {@link UserCallIntentProcessor} serves
12  * as a trampoline that captures call intents for individual users and forwards it to
13  * the {@link PrimaryCallReceiver} which interacts with the rest of Telecom, both of which run only as
14  * the primary user.
15  */
16 public class PrimaryCallReceiver extends BroadcastReceiver implements TelecomSystem.Component {
17 
18     @Override
onReceive(Context context, Intent intent)19     public void onReceive(Context context, Intent intent) {
20         Log.startSession("PCR.oR");
21         synchronized (getTelecomSystem().getLock()) {
22             getTelecomSystem().getCallIntentProcessor().processIntent(intent);
23         }
24         Log.endSession();
25     }
26 
27     @Override
getTelecomSystem()28     public TelecomSystem getTelecomSystem() {
29         return TelecomSystem.getInstance();
30     }
31 }
32