Skip to content

Commit 85077f6

Browse files
committed
Fixes #182: Rename RCDevice.shutdown() to RCDevice.release() as this is the one used by Twilio
1 parent f5d0a0d commit 85077f6

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

restcomm.android.client.sdk/src/main/java/org/mobicents/restcomm/android/client/sdk/RCClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public static void shutdown()
144144
list = null;
145145
// Need to make sure that shutdown() will finish its job synchronously.
146146
// Keep in mind that once this block is left device can be claimed by GC
147-
device.shutdown();
147+
device.release();
148148
}
149149
else {
150150
Log.e(TAG, "shutdown(): Warning Restcomm Client already shut down, skipping");

restcomm.android.client.sdk/src/main/java/org/mobicents/restcomm/android/client/sdk/RCDevice.java

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,21 @@ public DeviceImpl.ReachabilityState getReachability()
210210
return reachabilityState;
211211
}
212212

213-
public void shutdown()
214-
{
213+
// 'Copy' constructor
214+
public RCDevice(RCDevice device) {
215+
this.incomingSoundEnabled = device.incomingSoundEnabled;
216+
this.outgoingSoundEnabled = device.outgoingSoundEnabled;
217+
this.disconnectSoundEnabled = device.disconnectSoundEnabled;
218+
this.listener = device.listener;
219+
220+
// Not used yet
221+
this.capabilities = null;
222+
}
223+
224+
/**
225+
* Shuts down and release the Device
226+
*/
227+
public void release() {
215228
this.listener = null;
216229

217230
if (DeviceImpl.isInitialized()) {
@@ -239,24 +252,6 @@ public void run() {
239252
state = DeviceState.OFFLINE;
240253
}
241254

242-
// 'Copy' constructor
243-
public RCDevice(RCDevice device) {
244-
this.incomingSoundEnabled = device.incomingSoundEnabled;
245-
this.outgoingSoundEnabled = device.outgoingSoundEnabled;
246-
this.disconnectSoundEnabled = device.disconnectSoundEnabled;
247-
this.listener = device.listener;
248-
249-
// Not used yet
250-
this.capabilities = null;
251-
}
252-
253-
/**
254-
* Shuts down and release the Device (<b>Not Implemented yet</b>)
255-
*/
256-
public void release() {
257-
258-
}
259-
260255
/**
261256
* Start listening for incoming connections
262257
*/

0 commit comments

Comments
 (0)