コード例 #1
0
 @Override
 public void conference(String callId1, String callId2) {
   SomeArgs args = SomeArgs.obtain();
   args.arg1 = callId1;
   args.arg2 = callId2;
   mHandler.obtainMessage(MSG_CONFERENCE, args).sendToTarget();
 }
コード例 #2
0
 @Override
 public void onPostDialContinue(String callId, boolean proceed) {
   SomeArgs args = SomeArgs.obtain();
   args.arg1 = callId;
   args.argi1 = proceed ? 1 : 0;
   mHandler.obtainMessage(MSG_ON_POST_DIAL_CONTINUE, args).sendToTarget();
 }
コード例 #3
0
 @Override
 public void onAudioStateChanged(String callId, AudioState audioState) {
   SomeArgs args = SomeArgs.obtain();
   args.arg1 = callId;
   args.arg2 = audioState;
   mHandler.obtainMessage(MSG_ON_AUDIO_STATE_CHANGED, args).sendToTarget();
 }
コード例 #4
0
 @Override
 public void rejectWithMessage(String callId, String message) {
   SomeArgs args = SomeArgs.obtain();
   args.arg1 = callId;
   args.arg2 = message;
   mHandler.obtainMessage(MSG_REJECT_WITH_MESSAGE, args).sendToTarget();
 }
コード例 #5
0
 @Override
 public void answerVideo(String callId, int videoState) {
   SomeArgs args = SomeArgs.obtain();
   args.arg1 = callId;
   args.argi1 = videoState;
   mHandler.obtainMessage(MSG_ANSWER_VIDEO, args).sendToTarget();
 }
コード例 #6
0
 @Override
 public void createConnection(
     PhoneAccountHandle connectionManagerPhoneAccount,
     String id,
     ConnectionRequest request,
     boolean isIncoming,
     boolean isUnknown) {
   SomeArgs args = SomeArgs.obtain();
   args.arg1 = connectionManagerPhoneAccount;
   args.arg2 = id;
   args.arg3 = request;
   args.argi1 = isIncoming ? 1 : 0;
   args.argi2 = isUnknown ? 1 : 0;
   mHandler.obtainMessage(MSG_CREATE_CONNECTION, args).sendToTarget();
 }
コード例 #7
0
 @Override
 public void executeMessage(Message msg) {
   SomeArgs args;
   switch (msg.what) {
     case MSG_START_CONFIRMATION:
       args = (SomeArgs) msg.obj;
       if (DEBUG)
         Log.d(
             TAG,
             "onConfirm: req="
                 + ((Request) args.arg2).mInterface
                 + " prompt="
                 + args.arg3
                 + " extras="
                 + args.arg4);
       onConfirm(
           (Caller) args.arg1,
           (Request) args.arg2,
           (CharSequence) args.arg3,
           (Bundle) args.arg4);
       break;
     case MSG_START_COMPLETE_VOICE:
       args = (SomeArgs) msg.obj;
       if (DEBUG)
         Log.d(
             TAG,
             "onCompleteVoice: req="
                 + ((Request) args.arg2).mInterface
                 + " message="
                 + args.arg3
                 + " extras="
                 + args.arg4);
       onCompleteVoice(
           (Caller) args.arg1,
           (Request) args.arg2,
           (CharSequence) args.arg3,
           (Bundle) args.arg4);
       break;
     case MSG_START_ABORT_VOICE:
       args = (SomeArgs) msg.obj;
       if (DEBUG)
         Log.d(
             TAG,
             "onAbortVoice: req="
                 + ((Request) args.arg2).mInterface
                 + " message="
                 + args.arg3
                 + " extras="
                 + args.arg4);
       onAbortVoice(
           (Caller) args.arg1,
           (Request) args.arg2,
           (CharSequence) args.arg3,
           (Bundle) args.arg4);
       break;
     case MSG_START_COMMAND:
       args = (SomeArgs) msg.obj;
       if (DEBUG)
         Log.d(
             TAG,
             "onCommand: req="
                 + ((Request) args.arg2).mInterface
                 + " command="
                 + args.arg3
                 + " extras="
                 + args.arg4);
       onCommand(
           (Caller) args.arg1, (Request) args.arg2, (String) args.arg3, (Bundle) args.arg4);
       break;
     case MSG_SUPPORTS_COMMANDS:
       args = (SomeArgs) msg.obj;
       if (DEBUG) Log.d(TAG, "onGetSupportedCommands: cmds=" + args.arg2);
       args.arg1 = onGetSupportedCommands((Caller) args.arg1, (String[]) args.arg2);
       break;
     case MSG_CANCEL:
       args = (SomeArgs) msg.obj;
       if (DEBUG) Log.d(TAG, "onCancel: req=" + ((Request) args.arg1).mInterface);
       onCancel((Request) args.arg1);
       break;
     case MSG_TASK_STARTED:
       if (DEBUG) Log.d(TAG, "onTaskStarted: intent=" + msg.obj + " taskId=" + msg.arg1);
       onTaskStarted((Intent) msg.obj, msg.arg1);
       break;
     case MSG_TASK_FINISHED:
       if (DEBUG) Log.d(TAG, "onTaskFinished: intent=" + msg.obj + " taskId=" + msg.arg1);
       onTaskFinished((Intent) msg.obj, msg.arg1);
       break;
     case MSG_CLOSE_SYSTEM_DIALOGS:
       if (DEBUG) Log.d(TAG, "onCloseSystemDialogs");
       onCloseSystemDialogs();
       break;
     case MSG_DESTROY:
       if (DEBUG) Log.d(TAG, "doDestroy");
       doDestroy();
       break;
   }
 }