} else { JavaParser.ResolvedField field = (JavaParser.ResolvedField) resolved; if (!field.getContainingClass().matches(FQCN_GRAVITY)) { return false;
if (!method.getContainingClass().matches(LOG_CLS)) { return;
if (!method.getContainingClass().matches("android.database.sqlite.SQLiteDatabase")) { return;
if (containingClass.matches(NOTIFICATION_LISTENER_SERVICE_FQN)) { continue;
ResolvedMethod method = (ResolvedMethod) r; ResolvedClass cls = method.getContainingClass(); if (cls.matches(MOTION_EVENT_CLS)) { mEscapes = false;
@Override public void visitMethod(@NonNull JavaContext context, @Nullable AstVisitor visitor, @NonNull MethodInvocation node) { ResolvedNode resolved = context.resolve(node); if (resolved instanceof ResolvedMethod) { ResolvedMethod method = (ResolvedMethod) resolved; if (method.getContainingClass().matches("android.app.AlarmManager") && method.getArgumentCount() == 4) { ensureAtLeast(context, node, 1, 5000L); ensureAtLeast(context, node, 2, 60000L); } } }
private static boolean isCallOnWebView(JavaContext context, MethodInvocation call) { ResolvedNode resolved = context.resolve(call); if (!(resolved instanceof ResolvedMethod)) { return false; } ResolvedMethod method = (ResolvedMethod) resolved; return method.getContainingClass().matches(WEB_VIEW_CLS); }