Remove Hugo

This commit is contained in:
serso 2016-02-07 12:30:52 +01:00
parent 3d33ae6b64
commit 8bd412a315
9 changed files with 14 additions and 21 deletions

View File

@ -24,7 +24,6 @@ apply plugin: 'com.android.application'
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'signing' apply plugin: 'signing'
apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'com.jakewharton.hugo'
android { android {
compileSdkVersion 23 compileSdkVersion 23

View File

@ -4,7 +4,6 @@ import android.os.Bundle;
import android.support.annotation.StringRes; import android.support.annotation.StringRes;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.view.*; import android.view.*;
import hugo.weaving.DebugLog;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
@ -15,7 +14,6 @@ public abstract class BaseFragment extends Fragment {
protected FragmentUi ui; protected FragmentUi ui;
@DebugLog
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -35,7 +33,6 @@ public abstract class BaseFragment extends Fragment {
protected void inject(@Nonnull AppComponent component) { protected void inject(@Nonnull AppComponent component) {
} }
@DebugLog
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view = ui.onCreateView(inflater, container); final View view = ui.onCreateView(inflater, container);

View File

@ -36,7 +36,6 @@ import android.view.*;
import android.widget.TextView; import android.widget.TextView;
import butterknife.Bind; import butterknife.Bind;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import hugo.weaving.DebugLog;
import org.solovyev.android.Activities; import org.solovyev.android.Activities;
import org.solovyev.android.Android; import org.solovyev.android.Android;
import org.solovyev.android.calculator.history.History; import org.solovyev.android.calculator.history.History;
@ -153,7 +152,6 @@ public class CalculatorActivity extends BaseActivity implements SharedPreference
return result; return result;
} }
@DebugLog
@Override @Override
public void onCreate(@Nullable Bundle savedInstanceState) { public void onCreate(@Nullable Bundle savedInstanceState) {
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
@ -205,7 +203,6 @@ public class CalculatorActivity extends BaseActivity implements SharedPreference
} }
} }
@DebugLog
@Override @Override
protected void inject(@Nonnull AppComponent component) { protected void inject(@Nonnull AppComponent component) {
super.inject(component); super.inject(component);

View File

@ -26,9 +26,9 @@ import android.content.SharedPreferences;
import android.os.Handler; import android.os.Handler;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.util.Log; import android.util.Log;
import android.util.TimingLogger;
import com.squareup.leakcanary.LeakCanary; import com.squareup.leakcanary.LeakCanary;
import com.squareup.otto.Bus; import com.squareup.otto.Bus;
import hugo.weaving.DebugLog;
import jscl.MathEngine; import jscl.MathEngine;
import org.acra.ACRA; import org.acra.ACRA;
import org.acra.ACRAConfiguration; import org.acra.ACRAConfiguration;
@ -99,20 +99,31 @@ public class CalculatorApplication extends android.app.Application implements Sh
@Inject @Inject
ActivityLauncher launcher; ActivityLauncher launcher;
@DebugLog @Nonnull
private final TimingLogger timer = new TimingLogger("App", "onCreate");
@Override @Override
public void onCreate() { public void onCreate() {
timer.reset();
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
final Languages languages = new Languages(preferences); final Languages languages = new Languages(preferences);
timer.addSplit("languages");
onPreCreate(preferences, languages); onPreCreate(preferences, languages);
timer.addSplit("onPreCreate");
super.onCreate(); super.onCreate();
timer.addSplit("super.onCreate");
initDagger(); initDagger();
timer.addSplit("initDagger");
onPostCreate(preferences, languages); onPostCreate(preferences, languages);
timer.addSplit("onPostCreate");
timer.dumpToLog();
} }
@DebugLog
private void initDagger() { private void initDagger() {
component = DaggerAppComponent.builder() component = DaggerAppComponent.builder()
.appModule(new AppModule(this)) .appModule(new AppModule(this))
@ -122,7 +133,6 @@ public class CalculatorApplication extends android.app.Application implements Sh
history.init(initThread); history.init(initThread);
} }
@DebugLog
private void onPostCreate(@Nonnull SharedPreferences preferences, @Nonnull Languages languages) { private void onPostCreate(@Nonnull SharedPreferences preferences, @Nonnull Languages languages) {
App.init(this, languages); App.init(this, languages);
@ -157,7 +167,6 @@ public class CalculatorApplication extends android.app.Application implements Sh
} }
} }
@DebugLog
private void onPreCreate(@Nonnull SharedPreferences preferences, @Nonnull Languages languages) { private void onPreCreate(@Nonnull SharedPreferences preferences, @Nonnull Languages languages) {
// first we need to setup crash handler and memory leak analyzer // first we need to setup crash handler and memory leak analyzer
if (AcraErrorReporter.ENABLED) { if (AcraErrorReporter.ENABLED) {

View File

@ -28,7 +28,6 @@ import android.content.res.Resources;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
import hugo.weaving.DebugLog;
import org.solovyev.android.Check; import org.solovyev.android.Check;
import org.solovyev.android.calculator.text.TextProcessor; import org.solovyev.android.calculator.text.TextProcessor;
import org.solovyev.android.calculator.text.TextProcessorEditorResult; import org.solovyev.android.calculator.text.TextProcessorEditorResult;
@ -40,7 +39,6 @@ import javax.annotation.Nonnull;
import static android.util.TypedValue.COMPLEX_UNIT_SP; import static android.util.TypedValue.COMPLEX_UNIT_SP;
import static android.util.TypedValue.applyDimension; import static android.util.TypedValue.applyDimension;
@DebugLog
public class DisplayView extends AutoResizeTextView { public class DisplayView extends AutoResizeTextView {
@Nonnull @Nonnull

View File

@ -27,7 +27,6 @@ import android.content.SharedPreferences;
import com.squareup.otto.Bus; import com.squareup.otto.Bus;
import com.squareup.otto.Subscribe; import com.squareup.otto.Subscribe;
import hugo.weaving.DebugLog;
import org.solovyev.android.Check; import org.solovyev.android.Check;
import org.solovyev.android.calculator.text.TextProcessorEditorResult; import org.solovyev.android.calculator.text.TextProcessorEditorResult;
import org.solovyev.android.calculator.view.EditorTextProcessor; import org.solovyev.android.calculator.view.EditorTextProcessor;
@ -56,7 +55,6 @@ public class Editor {
textProcessor = new EditorTextProcessor(preferences); textProcessor = new EditorTextProcessor(preferences);
} }
@DebugLog
public void init() { public void init() {
bus.register(this); bus.register(this);
} }

View File

@ -31,7 +31,6 @@ import android.support.annotation.LayoutRes;
import android.support.annotation.StyleRes; import android.support.annotation.StyleRes;
import android.util.SparseArray; import android.util.SparseArray;
import android.view.ContextThemeWrapper; import android.view.ContextThemeWrapper;
import hugo.weaving.DebugLog;
import jscl.AngleUnit; import jscl.AngleUnit;
import jscl.NumeralBase; import jscl.NumeralBase;
import org.solovyev.android.Check; import org.solovyev.android.Check;
@ -60,7 +59,6 @@ public final class Preferences {
throw new AssertionError(); throw new AssertionError();
} }
@DebugLog
static void setDefaultValues(@Nonnull SharedPreferences preferences) { static void setDefaultValues(@Nonnull SharedPreferences preferences) {
// renew value after each application start // renew value after each application start
Gui.showFixableErrorDialog.putDefault(preferences); Gui.showFixableErrorDialog.putDefault(preferences);

View File

@ -30,7 +30,6 @@ import android.text.TextUtils;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.squareup.otto.Bus; import com.squareup.otto.Bus;
import com.squareup.otto.Subscribe; import com.squareup.otto.Subscribe;
import hugo.weaving.DebugLog;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.solovyev.android.Check; import org.solovyev.android.Check;
@ -158,7 +157,6 @@ public class History {
public History() { public History() {
} }
@DebugLog
public void init(@NonNull Executor initThread) { public void init(@NonNull Executor initThread) {
Check.isMainThread(); Check.isMainThread();
bus.register(this); bus.register(this);

View File

@ -5,7 +5,6 @@ buildscript {
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.5.0' classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
} }
} }