Loading src/com/android/settings/dashboard/conditional/ConditionManager.java +12 −4 Original line number Diff line number Diff line Loading @@ -91,8 +91,12 @@ public class ConditionManager { Condition condition = createCondition(Class.forName(clz)); PersistableBundle bundle = PersistableBundle.restoreFromXml(parser); if (DEBUG) Log.d(TAG, "Reading " + clz + " -- " + bundle); if (condition != null) { condition.restoreState(bundle); conditions.add(condition); } else { Log.e(TAG, "failed to add condition: " + clz); } while (parser.getDepth() > depth) { parser.next(); } Loading Loading @@ -150,7 +154,10 @@ public class ConditionManager { private void addIfMissing(Class<? extends Condition> clz, ArrayList<Condition> conditions) { if (getCondition(clz, conditions) == null) { if (DEBUG) Log.d(TAG, "Adding missing " + clz.getName()); conditions.add(createCondition(clz)); Condition condition = createCondition(clz); if (condition != null) { conditions.add(condition); } } } Loading @@ -172,7 +179,8 @@ public class ConditionManager { } else if (NightDisplayCondition.class == clz) { return new NightDisplayCondition(this); } throw new RuntimeException("Unexpected Condition " + clz); Log.e(TAG, "unknown condition class: " + clz.getSimpleName()); return null; } Context getContext() { Loading Loading
src/com/android/settings/dashboard/conditional/ConditionManager.java +12 −4 Original line number Diff line number Diff line Loading @@ -91,8 +91,12 @@ public class ConditionManager { Condition condition = createCondition(Class.forName(clz)); PersistableBundle bundle = PersistableBundle.restoreFromXml(parser); if (DEBUG) Log.d(TAG, "Reading " + clz + " -- " + bundle); if (condition != null) { condition.restoreState(bundle); conditions.add(condition); } else { Log.e(TAG, "failed to add condition: " + clz); } while (parser.getDepth() > depth) { parser.next(); } Loading Loading @@ -150,7 +154,10 @@ public class ConditionManager { private void addIfMissing(Class<? extends Condition> clz, ArrayList<Condition> conditions) { if (getCondition(clz, conditions) == null) { if (DEBUG) Log.d(TAG, "Adding missing " + clz.getName()); conditions.add(createCondition(clz)); Condition condition = createCondition(clz); if (condition != null) { conditions.add(condition); } } } Loading @@ -172,7 +179,8 @@ public class ConditionManager { } else if (NightDisplayCondition.class == clz) { return new NightDisplayCondition(this); } throw new RuntimeException("Unexpected Condition " + clz); Log.e(TAG, "unknown condition class: " + clz.getSimpleName()); return null; } Context getContext() { Loading