ru.noties.debug.Debug Java Examples

The following examples show how to use ru.noties.debug.Debug. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainApplication.java    From Storm with Apache License 2.0 6 votes vote down vote up
@Override
    public void onCreate() {
        super.onCreate();

        Debug.init(true);

        if (sInstance == null) {
            sInstance = this;
        }

        if (!mIsFakeCreate) {
            Storm.getInstance().init(getApplicationContext(), true);
//            Storm.getInstance().registerInstanceCreator(StormObject.class, new InstanceCreator<StormObject>() {
//                @Override
//                public StormObject create(Class<StormObject> clazz) {
//                    return new StormObject();
//                }
//            });
//            RushAndroid.initialize(getApplicationContext());
        }
    }
 
Example #2
Source File: StormTest.java    From Storm with Apache License 2.0 6 votes vote down vote up
@Nullable DatabaseManager open() {

        final BuildConfig.ORM orm = getORM();

        final DatabaseManager manager = new DatabaseManager(
                getContext(),
                orm.getDbName(),
                orm.getDbVersion(),
                new Class[]{
                        StormObject.class
                }
        );

        try {
            manager.open();
        } catch (SQLiteException e) {
            Debug.e(e);
            return null;
        }

        return manager;
    }
 
Example #3
Source File: SampleActivity.java    From ScrollingBackgroundView with Apache License 2.0 5 votes vote down vote up
private Fragment fragment() {
    final String name = getIntent().getStringExtra(ARG_FRAGMENT);
    if (!TextUtils.isEmpty(name)) {
        try {
            final Class<?> cl = Class.forName(name);
            return (Fragment) cl.newInstance();
        } catch (Throwable t) {
            Debug.e(t);
        }
    }
    return null;
}
 
Example #4
Source File: App.java    From Scrollable with Apache License 2.0 4 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    Debug.init(new AndroidLogDebugOutput(BuildConfig.DEBUG));
}
 
Example #5
Source File: AbsTest.java    From Storm with Apache License 2.0 4 votes vote down vote up
@Override
public void run() {
    try {
        setUp();

        for (OpType opType: opTypes) {

            switch (opType) {

                case INSERT:
                    testInsert();
                    break;

                case QUERY_ONE:
                    testQueryOne();
                    break;

                case QUERY_ALL:
                    testQueryAll();
                    break;

                case DELETE_ALL:
                    testDelete();
                    break;
            }
        }

    } catch (Throwable t) {
        Debug.e(t, getClass().getSimpleName());
    } finally {
        tearDown();
    }

    deleteDB();
    post();

    System.gc();

    if (isLast) {
        EventBus.getDefault().post(new TestCompleteEvent());
    }
}