Move ConditionListener to a top level class.

So we can use it later for furture refactoring.

Bug: 112485407
Test: rebuild
Change-Id: Ic3994464cfaff67a56f2d383490860a81f436fbd
This commit is contained in:
Fan Zhang
2018-08-13 17:31:08 -07:00
parent 5aa8e3c661
commit 48ef7e5b6f
3 changed files with 22 additions and 16 deletions

View File

@@ -217,17 +217,6 @@ public class ConditionManager implements LifecycleObserver, OnResume, OnPause {
return mConditions;
}
public List<Condition> getVisibleConditions() {
List<Condition> conditions = new ArrayList<>();
final int N = mConditions.size();
for (int i = 0; i < N; i++) {
if (mConditions.get(i).shouldShow()) {
conditions.add(mConditions.get(i));
}
}
return conditions;
}
public void notifyChanged(Condition condition) {
saveToXml();
Collections.sort(mConditions, CONDITION_COMPARATOR);
@@ -293,10 +282,6 @@ public class ConditionManager implements LifecycleObserver, OnResume, OnPause {
return sInstance;
}
public interface ConditionListener {
void onConditionsChanged();
}
private static final Comparator<Condition> CONDITION_COMPARATOR = new Comparator<Condition>() {
@Override
public int compare(Condition lhs, Condition rhs) {