1 package com.android.dialer.simulator.service; 2 3 interface ISimulatorService { 4 /** 5 * Makes an incoming call by simulator api. 6 * @param callerId is the number showing on incall UI. 7 * @param presentation is one of types of a call e.g. Payphone, Restricted, etc.. check 8 * {@link TelecomManager} for more information. 9 * */ makeIncomingCall(String callerId, int presentation)10 void makeIncomingCall(String callerId, int presentation); 11 /** 12 * Makes an incoming call. 13 * @param callerId the number showing on incall UI. 14 * @param presentation one of types of a call e.g. Payphone, Restricted, etc.. check 15 * {@link TelecomManager} for more information. 16 * */ makeOutgoingCall(String callerId, int presentation)17 void makeOutgoingCall(String callerId, int presentation); 18 /** 19 * Makes an incoming enriched call. 20 * Note: simulator mode should be enabled first. 21 * */ makeIncomingEnrichedCall()22 void makeIncomingEnrichedCall(); 23 /** 24 * Makes an outgoing enriched call. 25 * Note: simulator mode should be enabled first. 26 * */ makeOutgoingEnrichedCall()27 void makeOutgoingEnrichedCall(); 28 /** 29 * Populate missed call logs. 30 * @param num the number of missed call to make with this api. 31 * */ populateMissedCall(int num)32 void populateMissedCall(int num); 33 /** Populate contacts database to get contacts, call logs, voicemails, etc.. */ populateDataBase()34 void populateDataBase(); 35 /** Clean contacts database to clean all exsting contacts, call logs. voicemails, etc.. */ cleanDataBase()36 void cleanDataBase(); 37 /** 38 * Enable simulator mode. After entering simulator mode, all calls made by dialer will be handled 39 * by simulator connection service, meaning users can directly make fake calls through simulator. 40 * It is also a prerequisite to make an enriched call. 41 * */ enableSimulatorMode()42 void enableSimulatorMode(); 43 /** Disable simulator mode to use system connection service. */ disableSimulatorMode()44 void disableSimulatorMode(); 45 }