|
@@ -304,6 +304,8 @@ public class BridgeService extends IntentService {
|
|
private LightControlServiceConnection lightConn = new LightControlServiceConnection();
|
|
private LightControlServiceConnection lightConn = new LightControlServiceConnection();
|
|
public void bindLightControlService() {
|
|
public void bindLightControlService() {
|
|
|
|
|
|
|
|
+ Log.d(TAG, "SecheduledTaskInit : bindLightControlService() called.");
|
|
|
|
+
|
|
// Light Control Service Remote Bind
|
|
// Light Control Service Remote Bind
|
|
Intent lIntent = new Intent();
|
|
Intent lIntent = new Intent();
|
|
lIntent.setClassName("org.iotivity.bridge.homeserver", "org.iotivity.bridge.homeserver.BridgeService");
|
|
lIntent.setClassName("org.iotivity.bridge.homeserver", "org.iotivity.bridge.homeserver.BridgeService");
|
|
@@ -319,7 +321,7 @@ public class BridgeService extends IntentService {
|
|
try {
|
|
try {
|
|
lightControlBinder.unregisterLightControlServiceCallback(lightCallback);
|
|
lightControlBinder.unregisterLightControlServiceCallback(lightCallback);
|
|
Log.d(TAG, "unregister Light Control Service with Remote Client Callback");
|
|
Log.d(TAG, "unregister Light Control Service with Remote Client Callback");
|
|
- unbindService(lightConn);
|
|
|
|
|
|
+ if(lightConn!=null) unbindService(lightConn);
|
|
Log.d(TAG, "unbind Light Control Service with Remote Connection");
|
|
Log.d(TAG, "unbind Light Control Service with Remote Connection");
|
|
} catch (RemoteException ex) {
|
|
} catch (RemoteException ex) {
|
|
Log.e(TAG, "unregister Callback", ex);
|
|
Log.e(TAG, "unregister Callback", ex);
|
|
@@ -763,6 +765,8 @@ public class BridgeService extends IntentService {
|
|
// Unregister all callbacks.
|
|
// Unregister all callbacks.
|
|
rBinder.killCallbacks();
|
|
rBinder.killCallbacks();
|
|
|
|
|
|
|
|
+ Toast.makeText(getApplicationContext(), getString(R.string.killBridgeMessage), Toast.LENGTH_LONG).show();
|
|
|
|
+
|
|
// Bridge Service and Application Process Kill
|
|
// Bridge Service and Application Process Kill
|
|
// android.os.Process.killProcess(Process.myPid());
|
|
// android.os.Process.killProcess(Process.myPid());
|
|
// or below action
|
|
// or below action
|