/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2015 Umeng, Inc
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package org.simple.eventbus.demo;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;

import org.simple.eventbus.EventBus;
import org.simple.eventbus.Subcriber;
import org.simple.eventbus.ThreadMode;

public class MainActivity extends FragmentActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_activity);
    }

    @Override
    protected void onDestroy() {

        EventBus.getDefault().unregister(this);
        // TODO Auto-generated method stub
        super.onDestroy();
    }

    @Subcriber
    private void updateTime(String time) {
        Log.e("", "### update time = " + time);
    }

    @Subcriber(tag = "my_tag")
    private void updateTimeWithTag(String time) {
        Log.e("", "### update time with my_tag, time = " + time);
    }

    @Subcriber(tag = "my_tag", mode = ThreadMode.ASYNC)
    private void updateTimeAsync(String time) {
        Log.e("", "### update time async , time = " + time);
    }

}

@@ -1255,148 +1255,8 @@
 ity;
-%0Aimport android.util.Log;%0A%0Aimport org.simple.eventbus.EventBus;%0Aimport org.simple.eventbus.Subcriber;%0Aimport org.simple.eventbus.ThreadMode;
 %0A%0Apu
@@ -1479,619 +1479,6 @@
   %7D%0A
-%0A    @Override%0A    protected void onDestroy() %7B%0A%0A        EventBus.getDefault().unregister(this);%0A        // TODO Auto-generated method stub%0A        super.onDestroy();%0A    %7D%0A%0A    @Subcriber%0A    private void updateTime(String time) %7B%0A        Log.e(%22%22, %22### update time = %22 + time);%0A    %7D%0A%0A    @Subcriber(tag = %22my_tag%22)%0A    private void updateTimeWithTag(String time) %7B%0A        Log.e(%22%22, %22### update time with my_tag, time = %22 + time);%0A    %7D%0A%0A    @Subcriber(tag = %22my_tag%22, mode = ThreadMode.ASYNC)%0A    private void updateTimeAsync(String time) %7B%0A        Log.e(%22%22, %22### update time async , time = %22 + time);%0A    %7D%0A%0A
 %7D%0A

remove useless code in demo