Rename callbackevents to topic/subscribers

This commit is contained in:
topjohnwu
2017-08-04 00:12:11 +08:00
parent 2ecbca303b
commit 8e7b8825f5
16 changed files with 137 additions and 137 deletions
@@ -20,15 +20,15 @@ import android.view.MenuItem;
import android.view.View;
import com.topjohnwu.magisk.components.Activity;
import com.topjohnwu.magisk.utils.CallbackEvent;
import com.topjohnwu.magisk.utils.Shell;
import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.magisk.utils.Utils;
import butterknife.BindView;
import butterknife.ButterKnife;
public class MainActivity extends Activity
implements NavigationView.OnNavigationItemSelectedListener, CallbackEvent.Listener {
implements NavigationView.OnNavigationItemSelectedListener, Topic.Subscriber {
private final Handler mDrawerHandler = new Handler();
private SharedPreferences prefs;
@@ -110,13 +110,13 @@ public class MainActivity extends Activity
}
@Override
public void onTrigger(CallbackEvent event) {
public void onTopicPublished(Topic topic) {
recreate();
}
@Override
public CallbackEvent[] getRegisterEvents() {
return new CallbackEvent[] { getApplicationContext().reloadActivity };
public Topic[] getSubscription() {
return new Topic[] { getApplicationContext().reloadActivity };
}
public void checkHideSection() {