Home | History | Annotate | Download | only in conditional

Lines Matching refs:clz

93                     String clz = parser.getAttributeValue("", ATTR_CLASS);
94 if (!clz.startsWith(PKG)) {
95 clz = PKG + clz;
97 Condition condition = createCondition(Class.forName(clz));
99 if (DEBUG) Log.d(TAG, "Reading " + clz + " -- " + bundle);
104 Log.e(TAG, "failed to add condition: " + clz);
133 final String clz = mConditions.get(i).getClass().getSimpleName();
134 serializer.attribute("", ATTR_CLASS, clz);
162 private void addIfMissing(Class<? extends Condition> clz, ArrayList<Condition> conditions) {
163 if (getCondition(clz, conditions) == null) {
164 if (DEBUG) Log.d(TAG, "Adding missing " + clz.getName());
165 Condition condition = createCondition(clz);
172 private Condition createCondition(Class<?> clz) {
173 if (AirplaneModeCondition.class == clz) {
175 } else if (HotspotCondition.class == clz) {
177 } else if (DndCondition.class == clz) {
179 } else if (BatterySaverCondition.class == clz) {
181 } else if (CellularDataCondition.class == clz) {
183 } else if (BackgroundDataCondition.class == clz) {
185 } else if (WorkModeCondition.class == clz) {
187 } else if (NightDisplayCondition.class == clz) {
189 } else if (RingerMutedCondition.class == clz) {
191 } else if (RingerVibrateCondition.class == clz) {
194 Log.e(TAG, "unknown condition class: " + clz.getSimpleName());
202 public <T extends Condition> T getCondition(Class<T> clz) {
203 return getCondition(clz, mConditions);
206 private <T extends Condition> T getCondition(Class<T> clz, List<Condition> conditions) {
209 if (clz.equals(conditions.get(i).getClass())) {