fixed crashing when removing mods

This commit is contained in:
huangyuhui committed 2015-12-29 20:35:40 +08:00
1 parent e3f0254736
commit 3471b4fec7
20 files changed
+152 -243

No files matched your search

@@ -1,12 +1,12 @@
/**
* Copyright 2013 Netflix, Inc.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,7 +23,8 @@ import rx.subscriptions.Subscriptions;
import rx.util.functions.Action0;
import rx.util.functions.Func0;
/* package */abstract class AbstractScheduler implements Scheduler {
/* package */
abstract class AbstractScheduler implements Scheduler {
@Override
public Subscription schedule(Action0 action) {
@@ -41,12 +42,9 @@ import rx.util.functions.Func0;
}
private static Func0<Subscription> asFunc0(final Action0 action) {
return new Func0<Subscription>() {
@Override
public Subscription call() {
action.call();
return Subscriptions.empty();
}
return () -> {
action.call();
return Subscriptions.empty();
};
}