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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user