CallButtonPresenter.java revision 3c2a439eb67ec6fb89daf1914ab3ce05e8aaa428
1241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng/* 2241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * Copyright (C) 2013 The Android Open Source Project 3241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * 4241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * Licensed under the Apache License, Version 2.0 (the "License"); 5241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * you may not use this file except in compliance with the License. 6241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * You may obtain a copy of the License at 7241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * 8241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * http://www.apache.org/licenses/LICENSE-2.0 9241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * 10241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * Unless required by applicable law or agreed to in writing, software 11241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * distributed under the License is distributed on an "AS IS" BASIS, 12241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * See the License for the specific language governing permissions and 14241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * limitations under the License 15241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng */ 16241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng 17241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Chengpackage com.android.incallui; 18241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng 19241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Chengimport android.media.AudioManager; 20241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng 21dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordonimport com.android.incallui.AudioModeProvider.AudioModeListener; 22671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordonimport com.android.incallui.InCallPresenter.InCallState; 23671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordonimport com.android.incallui.InCallPresenter.InCallStateListener; 24dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordonimport com.android.services.telephony.common.AudioMode; 25671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordonimport com.android.services.telephony.common.Call; 26bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordonimport com.android.services.telephony.common.Call.Capabilities; 27671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon 28241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng/** 29241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng * Logic for call buttons. 30241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng */ 31150a5c58c67f230c8fd7293b180bbf50aa761480Santos Cordonpublic class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButtonUi> 32dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon implements InCallStateListener, AudioModeListener { 33241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng 34671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon private Call mCall; 359de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon private AudioModeProvider mAudioModeProvider; 363c2a439eb67ec6fb89daf1914ab3ce05e8aaa428Santos Cordon private ProximitySensor mProximitySensor; 37241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng 389de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon public CallButtonPresenter() { 39241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng } 40241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng 41241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng @Override 42241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng public void onUiReady(CallButtonUi ui) { 43241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng super.onUiReady(ui); 449de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon if (mAudioModeProvider != null) { 459de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon mAudioModeProvider.addListener(this); 469de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon } 47dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon } 48dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 49dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon @Override 50dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon public void onUiUnready(CallButtonUi ui) { 519de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon if (mAudioModeProvider != null) { 529de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon mAudioModeProvider.removeListener(this); 539de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon } 54241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng } 55241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng 56150a5c58c67f230c8fd7293b180bbf50aa761480Santos Cordon @Override 57671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon public void onStateChange(InCallState state, CallList callList) { 58e7be13fb0556e62b07bc271b130412d82d7f7521Santos Cordon if (state == InCallState.OUTGOING) { 59e7be13fb0556e62b07bc271b130412d82d7f7521Santos Cordon mCall = callList.getOutgoingCall(); 60e7be13fb0556e62b07bc271b130412d82d7f7521Santos Cordon } else if (state == InCallState.INCALL) { 61efd4282ec4221ec5eefd4155a4ad915adcedca70Santos Cordon mCall = callList.getActiveOrBackgroundCall(); 62671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon } else { 63671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon mCall = null; 64671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon } 65bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon 66bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon updateUi(state, mCall); 67241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng } 68241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng 69dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon @Override 70dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon public void onAudioMode(int mode) { 71dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon getUi().setAudio(mode); 72dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon } 73dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 74dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon @Override 75dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon public void onSupportedAudioMode(int mask) { 76dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon getUi().setSupportedAudio(mask); 77dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon } 78dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 79dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon public int getAudioMode() { 809de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon if (mAudioModeProvider != null) { 819de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon return mAudioModeProvider.getAudioMode(); 829de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon } 839de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon return AudioMode.EARPIECE; 84dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon } 85dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 86dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon public int getSupportedAudio() { 879de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon if (mAudioModeProvider != null) { 889de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon return mAudioModeProvider.getSupportedModes(); 899de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon } 909de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon 919de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon return 0; 92dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon } 93dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 94dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon public void setAudioMode(int mode) { 95dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 96dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon // TODO: Set a intermediate state in this presenter until we get 97dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon // an update for onAudioMode(). This will make UI response immediate 98dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon // if it turns out to be slow 99dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 100dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon Logger.d(this, "Sending new Audio Mode: " + AudioMode.toString(mode)); 101dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon CallCommandClient.getInstance().setAudioMode(mode); 102dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon } 103dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 104dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon /** 105dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon * Function assumes that bluetooth is not supported. 106dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon */ 107dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon public void toggleSpeakerphone() { 108dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon // this function should not be called if bluetooth is available 1099de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon if (0 != (AudioMode.BLUETOOTH & getSupportedAudio())) { 110dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 1119de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon // It's clear the UI is wrong, so update the supported mode once again. 112dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon Logger.e(this, "toggling speakerphone not allowed when bluetooth supported."); 1139de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon getUi().setSupportedAudio(getSupportedAudio()); 114dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon return; 115dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon } 116dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 117dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon int newMode = AudioMode.SPEAKER; 118dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 119dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon // if speakerphone is already on, change to wired/earpiece 1209de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon if (getAudioMode() == AudioMode.SPEAKER) { 121dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon newMode = AudioMode.WIRED_OR_EARPIECE; 122dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon } 123dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 124dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon setAudioMode(newMode); 125dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon } 126dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon 127b94803e83573734d21a32047b21f348cb2305155Chiao Cheng public void endCallClicked() { 128e286f91abd12dee037de19c3836d8002e450a9c9Santos Cordon if (mCall == null) { 129e286f91abd12dee037de19c3836d8002e450a9c9Santos Cordon return; 130e286f91abd12dee037de19c3836d8002e450a9c9Santos Cordon } 131671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon 132b94803e83573734d21a32047b21f348cb2305155Chiao Cheng // TODO(klp): hook up call id. 133671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon CallCommandClient.getInstance().disconnectCall(mCall.getCallId()); 134b94803e83573734d21a32047b21f348cb2305155Chiao Cheng } 135b94803e83573734d21a32047b21f348cb2305155Chiao Cheng 136241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng public void muteClicked(boolean checked) { 137efd4282ec4221ec5eefd4155a4ad915adcedca70Santos Cordon Logger.d(this, "turning on mute: " + checked); 138efd4282ec4221ec5eefd4155a4ad915adcedca70Santos Cordon 1393552ee4b7111b995735d330b2e89bfabc2fd9b61Chiao Cheng CallCommandClient.getInstance().mute(checked); 140241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng getUi().setMute(checked); 141241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng } 142241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng 1438193bc3df6b0726d36a5b7b889ec91c4d59f40c1Santos Cordon public void holdClicked(boolean checked) { 144e286f91abd12dee037de19c3836d8002e450a9c9Santos Cordon if (mCall == null) { 145e286f91abd12dee037de19c3836d8002e450a9c9Santos Cordon return; 146e286f91abd12dee037de19c3836d8002e450a9c9Santos Cordon } 147671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon 148efd4282ec4221ec5eefd4155a4ad915adcedca70Santos Cordon Logger.d(this, "holding: " + mCall.getCallId()); 149efd4282ec4221ec5eefd4155a4ad915adcedca70Santos Cordon 1508193bc3df6b0726d36a5b7b889ec91c4d59f40c1Santos Cordon // TODO(klp): use appropriate hold callId. 151671b221ccadea34fb9327ef5342b26419eb5ca99Santos Cordon CallCommandClient.getInstance().hold(mCall.getCallId(), checked); 1528193bc3df6b0726d36a5b7b889ec91c4d59f40c1Santos Cordon getUi().setHold(checked); 1538193bc3df6b0726d36a5b7b889ec91c4d59f40c1Santos Cordon } 1548193bc3df6b0726d36a5b7b889ec91c4d59f40c1Santos Cordon 15561b7737bc556865097f9ca846bddb562371013fdSantos Cordon public void mergeClicked() { 15661b7737bc556865097f9ca846bddb562371013fdSantos Cordon CallCommandClient.getInstance().merge(); 15761b7737bc556865097f9ca846bddb562371013fdSantos Cordon } 15861b7737bc556865097f9ca846bddb562371013fdSantos Cordon 15961b7737bc556865097f9ca846bddb562371013fdSantos Cordon public void addCallClicked() { 16061b7737bc556865097f9ca846bddb562371013fdSantos Cordon CallCommandClient.getInstance().addCall(); 16161b7737bc556865097f9ca846bddb562371013fdSantos Cordon } 16261b7737bc556865097f9ca846bddb562371013fdSantos Cordon 16361b7737bc556865097f9ca846bddb562371013fdSantos Cordon public void swapClicked() { 16461b7737bc556865097f9ca846bddb562371013fdSantos Cordon CallCommandClient.getInstance().swap(); 16561b7737bc556865097f9ca846bddb562371013fdSantos Cordon } 16661b7737bc556865097f9ca846bddb562371013fdSantos Cordon 1675b9034b5b1b48a4339dd2f893a851cc64d6279dfChristine Chen public void showDialpadClicked(boolean checked) { 1685b9034b5b1b48a4339dd2f893a851cc64d6279dfChristine Chen Logger.v(this, "Show dialpad " + String.valueOf(checked)); 1695b9034b5b1b48a4339dd2f893a851cc64d6279dfChristine Chen getUi().displayDialpad(checked); 1703c2a439eb67ec6fb89daf1914ab3ce05e8aaa428Santos Cordon mProximitySensor.onDialpadVisible(checked); 1715b9034b5b1b48a4339dd2f893a851cc64d6279dfChristine Chen } 1725b9034b5b1b48a4339dd2f893a851cc64d6279dfChristine Chen 173bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon private void updateUi(InCallState state, Call call) { 174bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon final CallButtonUi ui = getUi(); 175bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon if (ui == null) { 176bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon return; 177bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon } 178bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon 179bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon final boolean isVisible = state.isConnectingOrConnected() && 180bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon !state.isIncoming(); 181bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon 18261b7737bc556865097f9ca846bddb562371013fdSantos Cordon ui.setVisible(isVisible); 18361b7737bc556865097f9ca846bddb562371013fdSantos Cordon 18461b7737bc556865097f9ca846bddb562371013fdSantos Cordon Logger.d(this, "Updating call UI for call: ", call); 18561b7737bc556865097f9ca846bddb562371013fdSantos Cordon 18661b7737bc556865097f9ca846bddb562371013fdSantos Cordon if (isVisible && call != null) { 18761b7737bc556865097f9ca846bddb562371013fdSantos Cordon Logger.v(this, "Show hold ", call.can(Capabilities.HOLD)); 18861b7737bc556865097f9ca846bddb562371013fdSantos Cordon Logger.v(this, "Show merge ", call.can(Capabilities.MERGE_CALLS)); 18961b7737bc556865097f9ca846bddb562371013fdSantos Cordon Logger.v(this, "Show swap ", call.can(Capabilities.SWAP_CALLS)); 19061b7737bc556865097f9ca846bddb562371013fdSantos Cordon Logger.v(this, "Show add call ", call.can(Capabilities.ADD_CALL)); 191bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon 192b6ec8a55702f69c1bcb7b3eb1646c363ad9b4d10Santos Cordon ui.setHold(call.getState() == Call.State.ONHOLD); 193b6ec8a55702f69c1bcb7b3eb1646c363ad9b4d10Santos Cordon 19461b7737bc556865097f9ca846bddb562371013fdSantos Cordon ui.showHold(call.can(Capabilities.HOLD)); 19561b7737bc556865097f9ca846bddb562371013fdSantos Cordon ui.showMerge(call.can(Capabilities.MERGE_CALLS)); 19661b7737bc556865097f9ca846bddb562371013fdSantos Cordon ui.showSwap(call.can(Capabilities.SWAP_CALLS)); 19761b7737bc556865097f9ca846bddb562371013fdSantos Cordon ui.showAddCall(call.can(Capabilities.ADD_CALL)); 198bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon } 199bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon } 200bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon 2019de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon public void setAudioModeProvider(AudioModeProvider audioModeProvider) { 2029de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon // AudioModeProvider works effectively as a pass through. However, if we 2039de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon // had this presenter listen for changes directly, it would have to live forever 2049de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon // or risk missing important updates. 2059de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon mAudioModeProvider = audioModeProvider; 2069de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon mAudioModeProvider.addListener(this); 2079de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon } 2089de3d7c5188c02cabf03799f87d494ee7dc702cbSantos Cordon 2093c2a439eb67ec6fb89daf1914ab3ce05e8aaa428Santos Cordon public void setProximitySensor(ProximitySensor proximitySensor) { 2103c2a439eb67ec6fb89daf1914ab3ce05e8aaa428Santos Cordon mProximitySensor = proximitySensor; 2113c2a439eb67ec6fb89daf1914ab3ce05e8aaa428Santos Cordon } 2123c2a439eb67ec6fb89daf1914ab3ce05e8aaa428Santos Cordon 213241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng public interface CallButtonUi extends Ui { 2144df10e20c8a4a5c2b6b1e9d0c895cf205929e8ddChiao Cheng void setVisible(boolean on); 215241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng void setMute(boolean on); 2168193bc3df6b0726d36a5b7b889ec91c4d59f40c1Santos Cordon void setHold(boolean on); 217bc168c4fb0638846c5076a5a35a2e75ee4947908Santos Cordon void showHold(boolean show); 21861b7737bc556865097f9ca846bddb562371013fdSantos Cordon void showMerge(boolean show); 21961b7737bc556865097f9ca846bddb562371013fdSantos Cordon void showSwap(boolean show); 22061b7737bc556865097f9ca846bddb562371013fdSantos Cordon void showAddCall(boolean show); 2215b9034b5b1b48a4339dd2f893a851cc64d6279dfChristine Chen void displayDialpad(boolean on); 222dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon void setAudio(int mode); 223dab149c9b2185be82cbca63cc3980e41444900c0Santos Cordon void setSupportedAudio(int mask); 224241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng } 225241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88Chiao Cheng} 226