com.android.tools.lint.checks
Class CheckPermissionDetector

java.lang.Object
  extended by com.android.tools.lint.detector.api.Detector
      extended by com.android.tools.lint.checks.CheckPermissionDetector
All Implemented Interfaces:
com.android.tools.lint.detector.api.Detector.JavaScanner

public class CheckPermissionDetector
extends com.android.tools.lint.detector.api.Detector
implements com.android.tools.lint.detector.api.Detector.JavaScanner

Ensures that calls to check permission use the result (otherwise they probably meant to call the enforce permission methods instead)


Nested Class Summary
 
Nested classes/interfaces inherited from class com.android.tools.lint.detector.api.Detector
com.android.tools.lint.detector.api.Detector.ClassScanner, com.android.tools.lint.detector.api.Detector.GradleScanner, com.android.tools.lint.detector.api.Detector.JavaScanner, com.android.tools.lint.detector.api.Detector.OtherFileScanner, com.android.tools.lint.detector.api.Detector.XmlScanner
 
Field Summary
static com.android.tools.lint.detector.api.Issue ISSUE
          Main issue checked by this detector
 
Constructor Summary
CheckPermissionDetector()
          Constructs a new CheckPermissionDetector check
 
Method Summary
 java.util.List<java.lang.String> getApplicableMethodNames()
           
 void visitMethod(com.android.tools.lint.detector.api.JavaContext context, lombok.ast.AstVisitor visitor, lombok.ast.MethodInvocation node)
           
 
Methods inherited from class com.android.tools.lint.detector.api.Detector
afterCheckFile, afterCheckLibraryProject, afterCheckProject, appliesTo, appliesToFolder, appliesToResourceRefs, beforeCheckFile, beforeCheckLibraryProject, beforeCheckProject, checkCall, checkClass, checkInstruction, createJavaVisitor, getApplicableAsmNodeTypes, getApplicableAttributes, getApplicableCallNames, getApplicableCallOwners, getApplicableElements, getApplicableFiles, getApplicableNodeTypes, getSpeed, run, visitAttribute, visitBuildScript, visitDocument, visitElement, visitElementAfter, visitResourceReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.android.tools.lint.detector.api.Detector.JavaScanner
appliesToResourceRefs, createJavaVisitor, getApplicableNodeTypes, visitResourceReference
 

Field Detail

ISSUE

public static final com.android.tools.lint.detector.api.Issue ISSUE
Main issue checked by this detector

Constructor Detail

CheckPermissionDetector

public CheckPermissionDetector()
Constructs a new CheckPermissionDetector check

Method Detail

visitMethod

public void visitMethod(@NonNull
                        com.android.tools.lint.detector.api.JavaContext context,
                        @Nullable
                        lombok.ast.AstVisitor visitor,
                        @NonNull
                        lombok.ast.MethodInvocation node)
Specified by:
visitMethod in interface com.android.tools.lint.detector.api.Detector.JavaScanner
Overrides:
visitMethod in class com.android.tools.lint.detector.api.Detector

getApplicableMethodNames

public java.util.List<java.lang.String> getApplicableMethodNames()
Specified by:
getApplicableMethodNames in interface com.android.tools.lint.detector.api.Detector.JavaScanner
Overrides:
getApplicableMethodNames in class com.android.tools.lint.detector.api.Detector