Bug 1147736 - Part 3: Deprecate NotifyError. r=aknow

This commit is contained in:
Ben Hsu 2015-04-27 23:29:00 -04:00
parent 8265eee4b9
commit 7d2295e968
7 changed files with 1 additions and 81 deletions

View File

@ -693,26 +693,6 @@ Telephony::SupplementaryServiceNotification(uint32_t aServiceId,
return NS_OK;
}
NS_IMETHODIMP
Telephony::NotifyError(uint32_t aServiceId,
int32_t aCallIndex,
const nsAString& aError)
{
nsRefPtr<TelephonyCall> callToNotify =
GetCallFromEverywhere(aServiceId, aCallIndex);
if (!callToNotify) {
NS_ERROR("Don't call me with a bad call index!");
return NS_ERROR_UNEXPECTED;
}
// Set the call state to 'disconnected' and remove it from the calls list.
callToNotify->UpdateDisconnectedReason(aError);
callToNotify->NotifyError(aError);
callToNotify->ChangeState(nsITelephonyService::CALL_STATE_DISCONNECTED);
return NS_OK;
}
NS_IMETHODIMP
Telephony::NotifyCdmaCallWaiting(uint32_t aServiceId, const nsAString& aNumber,
uint16_t aNumberPresentation,

View File

@ -125,8 +125,6 @@ sync protocol PTelephony {
manages PTelephonyRequest;
child:
NotifyCallError(uint32_t aClientId, int32_t aCallIndex, nsString aError);
NotifyCallStateChanged(nsTelephonyCallInfo[] aAllInfo);
NotifyCdmaCallWaiting(uint32_t aClientId, IPCCdmaWaitingCallData aData);

View File

@ -47,17 +47,6 @@ TelephonyChild::DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor)
return true;
}
bool
TelephonyChild::RecvNotifyCallError(const uint32_t& aClientId,
const int32_t& aCallIndex,
const nsString& aError)
{
MOZ_ASSERT(mService);
mService->NotifyError(aClientId, aCallIndex, aError);
return true;
}
bool
TelephonyChild::RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo)
{

View File

@ -34,10 +34,6 @@ protected:
virtual bool
DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) override;
virtual bool
RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex,
const nsString& aError) override;
virtual bool
RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo) override;

View File

@ -421,16 +421,6 @@ TelephonyIPCService::NotifyConferenceError(const nsAString& aName,
return NS_OK;
}
NS_IMETHODIMP
TelephonyIPCService::NotifyError(uint32_t aClientId, int32_t aCallIndex,
const nsAString& aError)
{
for (uint32_t i = 0; i < mListeners.Length(); i++) {
mListeners[i]->NotifyError(aClientId, aCallIndex, aError);
}
return NS_OK;
}
NS_IMETHODIMP
TelephonyIPCService::SupplementaryServiceNotification(uint32_t aClientId,
int32_t aCallIndex,

View File

@ -331,17 +331,6 @@ TelephonyParent::NotifyConferenceError(const nsAString& aName,
: NS_ERROR_FAILURE;
}
NS_IMETHODIMP
TelephonyParent::NotifyError(uint32_t aClientId,
int32_t aCallIndex,
const nsAString& aError)
{
NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
return SendNotifyCallError(aClientId, aCallIndex, nsString(aError))
? NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP
TelephonyParent::SupplementaryServiceNotification(uint32_t aClientId,
int32_t aCallIndex,
@ -431,14 +420,6 @@ TelephonyRequestParent::NotifyConferenceError(const nsAString& aName,
MOZ_CRASH("Not a TelephonyParent!");
}
NS_IMETHODIMP
TelephonyRequestParent::NotifyError(uint32_t aClientId,
int32_t aCallIndex,
const nsAString& aError)
{
MOZ_CRASH("Not a TelephonyParent!");
}
NS_IMETHODIMP
TelephonyRequestParent::SupplementaryServiceNotification(uint32_t aClientId,
int32_t aCallIndex,

View File

@ -7,7 +7,7 @@
interface nsIMobileCallForwardingOptions;
interface nsITelephonyCallInfo;
[scriptable, uuid(37fb45bb-ae10-4cfd-b24e-d656a9787a0a)]
[scriptable, uuid(80faf34e-286b-4487-bd55-135bd92668b9)]
interface nsITelephonyListener : nsISupports
{
/**
@ -54,20 +54,6 @@ interface nsITelephonyListener : nsISupports
in long callIndex,
in unsigned short notification);
/**
* Called when RIL error occurs.
*
* @param clientId
Indicate the RIL client, 0 ~ (number of client - 1).
* @param callIndex
* Call identifier assigned by the RIL. -1 if no connection
* @param error
* Error from RIL.
*/
void notifyError(in unsigned long clientId,
in long callIndex,
in AString error);
/**
* Called when a waiting call comes in CDMA networks.
*