/** * Returns whether the given method declaration represents a method * where allocating objects is not allowed for performance reasons */ private static boolean isBlockedAllocationMethod(MethodDeclaration node) { return isOnDrawMethod(node) || isOnMeasureMethod(node) || isOnLayoutMethod(node) || isLayoutMethod(node); }
/** * Returns whether the given method declaration represents a method * where allocating objects is not allowed for performance reasons */ private boolean isBlockedAllocationMethod( @NonNull PsiMethod node) { JavaEvaluator evaluator = mContext.getEvaluator(); return isOnDrawMethod(evaluator, node) || isOnMeasureMethod(evaluator, node) || isOnLayoutMethod(evaluator, node) || isLayoutMethod(evaluator, node); }