jobsonp / sipdroid

Automatically exported from code.google.com/p/sipdroid
GNU General Public License v3.0
0 stars 0 forks source link

Cannot find ringer if running with LoopAlarm due to ReceiverRestrictedContext #851

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

Sipdroid version - 2.0.1 running on Android Phone with 2.1

With on_wlan set to true the KeepAlive/LoopAlarm code path is triggered. 
However, the LoopAlarm sets ReceiverRestrictedContext on the Receiver. When an 
incoming call comes in, it picks up this context on the Receiver and fails to 
find a ringtone as it does not have the right permissions to read the ringtone 
from the phone. Attaching stack trace below.

Please let me know
- if there is a fix or workaround for this
- how to avoid having the incoming call operate on the Restricted Context
- what else does this restricted context impact in the call receive/answer flow

Thanks much!

Stack trace - 

02-19 01:39:36.895: ERROR/RingtoneManager(16438): Failed to open ringtone 
content://settings/system/ringtone
02-19 01:39:36.895: WARN/System.err(16438): Error handling a new incoming 
message
02-19 01:39:36.895: WARN/System.err(16438): java.lang.NullPointerException
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.sipdroid.sipua.ui.Receiver.onState(Receiver.java:210)
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.sipdroid.sipua.UserAgent.changeStatus(UserAgent.java:101)
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.sipdroid.sipua.UserAgent.onCallIncoming(UserAgent.java:562)
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.zoolu.sip.call.Call.onDlgInvite(Call.java:261)
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.zoolu.sip.dialog.InviteDialog.onTransRequest(InviteDialog.java:852)
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.zoolu.sip.transaction.InviteTransactionServer.onReceivedMessage(InviteTransa
ctionServer.java:211)
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.zoolu.sip.provider.SipProvider.processReceivedMessage(SipProvider.java:1083)
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.zoolu.sip.provider.SipProvider.onReceivedMessage(SipProvider.java:1195)
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.zoolu.sip.provider.TcpTransport.onReceivedData(TcpTransport.java:148)
02-19 01:39:36.895: WARN/System.err(16438):     at 
org.zoolu.net.TcpConnection.run(TcpConnection.java:175)

Original issue reported on code.google.com by ov.inter...@gmail.com on 21 Feb 2011 at 1:40

GoogleCodeExporter commented 8 years ago
Have you tried Sipdroid 2.1?

Original comment by pmerl...@googlemail.com on 23 Feb 2011 at 8:32

GoogleCodeExporter commented 8 years ago
checked the fix applied in 2.1. From the code, it seems like a NPE check was 
added - - if (oRingtone != null) oRingtone.play();
This prevents the exception, but what about the underlying issue of 
having/finding a rintone to play? How to resolve this issue caused by the 
Restricted context? 

Thanks.

Original comment by ov.inter...@gmail.com on 1 Mar 2011 at 7:39

GoogleCodeExporter commented 8 years ago

Original comment by pmerl...@googlemail.com on 17 Mar 2012 at 8:35

GoogleCodeExporter commented 8 years ago

Original comment by pmerl...@googlemail.com on 19 Mar 2012 at 10:43

GoogleCodeExporter commented 8 years ago
hi....i want to add sipdroid country code in phone calls.how to add it.....

Original comment by pradipsa...@gmail.com on 5 Dec 2012 at 7:04