Skip to content

Commit

Permalink
revoke method on Trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
monossido committed May 30, 2014
1 parent 2ec102e commit c2e0bd3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/com/atooma/plugin/ITriggerPlugin.aidl
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ interface ITriggerPlugin {
List getParameterTitleResources();
List getVariableTitleResources();
void invoke(String ruleId, in ParameterBundle parameters);
void revoke(String ruleId);
int getVersion();
}
6 changes: 6 additions & 0 deletions src/com/atooma/plugin/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ public void invoke(String ruleId, ParameterBundle parameters) throws RemoteExcep

public abstract void onInvoke(String ruleId, ParameterBundle parameters);

public void revoke(String ruleId) throws RemoteException {
onRevoke(ruleId);
}

public abstract void onRevoke(String ruleId);

@Override
public IBinder asBinder() {
return this;
Expand Down
2 changes: 0 additions & 2 deletions src/com/atooma/sdk/AtoomaRegistrationReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.atooma.IAtoomaPluginService;

Expand All @@ -13,7 +12,6 @@ public class AtoomaRegistrationReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {
Log.v("ATOOMAPLUGIN", "onReceive, startService");
context.startService(new Intent(context, getRegisterServiceClass()));
}

Expand Down
6 changes: 0 additions & 6 deletions src/com/atooma/sdk/RegisterService.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import android.content.ServiceConnection;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;

import com.atooma.IAtoomaPluginService;
import com.atooma.plugin.IModulePlugin;
Expand All @@ -20,12 +19,9 @@ public abstract class RegisterService extends Service {

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.v("ATOOMAPLUGIN", "onStartCommand");

mConnection = new ServiceConnection() {

public void onServiceConnected(ComponentName className, IBinder service) {
Log.v("ATOOMA", "onServiceConnected");
mService = IAtoomaPluginService.Stub.asInterface(service);
bound = true;

Expand All @@ -42,7 +38,6 @@ public void onServiceConnected(ComponentName className, IBinder service) {

@Override
public void onServiceDisconnected(ComponentName name) {
Log.v("ATOOMA", "onServiceDisconnected");
bound = false;
}
};
Expand All @@ -51,7 +46,6 @@ public void onServiceDisconnected(ComponentName name) {
Intent i = new Intent();
i.setClassName("com.atooma", "com.atooma.AtoomaPluginService");
bound = bindService(i, mConnection, Context.BIND_AUTO_CREATE);
Log.v("ATOOMAPLUGIN", "try to bind, bound=" + bound);
}
return START_STICKY;
}
Expand Down

0 comments on commit c2e0bd3

Please sign in to comment.