|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.android.tools.lint.detector.api.Detector
com.android.tools.lint.checks.WakelockDetector
public class WakelockDetector
Checks for problems with wakelocks (such as failing to release them) which can lead to unnecessary battery usage.
| 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.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
Problems using wakelocks |
| Constructor Summary | |
|---|---|
WakelockDetector()
Constructs a new WakelockDetector |
|
| Method Summary | |
|---|---|
void |
afterCheckProject(com.android.tools.lint.detector.api.Context context)
|
void |
checkCall(com.android.tools.lint.detector.api.ClassContext context,
org.objectweb.asm.tree.ClassNode classNode,
org.objectweb.asm.tree.MethodNode method,
org.objectweb.asm.tree.MethodInsnNode call)
|
protected int |
dfs(ControlFlowGraph.Node node)
Search from the given node towards the target; return false if we reach an exit point such as a return or a call on the way there that is not within a try/catch clause. |
java.util.List<java.lang.String> |
getApplicableCallNames()
|
| Methods inherited from class com.android.tools.lint.detector.api.Detector |
|---|
afterCheckFile, afterCheckLibraryProject, appliesTo, appliesToFolder, appliesToResourceRefs, beforeCheckFile, beforeCheckLibraryProject, beforeCheckProject, checkClass, checkInstruction, createJavaVisitor, getApplicableAsmNodeTypes, getApplicableAttributes, getApplicableCallOwners, getApplicableElements, getApplicableFiles, getApplicableMethodNames, getApplicableNodeTypes, getSpeed, run, visitAttribute, visitDocument, visitElement, visitElementAfter, visitMethod, 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.ClassScanner |
|---|
checkClass, checkInstruction, getApplicableAsmNodeTypes, getApplicableCallOwners |
| Field Detail |
|---|
public static final com.android.tools.lint.detector.api.Issue ISSUE
| Constructor Detail |
|---|
public WakelockDetector()
WakelockDetector
| Method Detail |
|---|
public void afterCheckProject(@NonNull
com.android.tools.lint.detector.api.Context context)
afterCheckProject in class com.android.tools.lint.detector.api.Detector@Nullable public java.util.List<java.lang.String> getApplicableCallNames()
getApplicableCallNames in interface com.android.tools.lint.detector.api.Detector.ClassScannergetApplicableCallNames in class com.android.tools.lint.detector.api.Detector
public void checkCall(@NonNull
com.android.tools.lint.detector.api.ClassContext context,
@NonNull
org.objectweb.asm.tree.ClassNode classNode,
@NonNull
org.objectweb.asm.tree.MethodNode method,
@NonNull
org.objectweb.asm.tree.MethodInsnNode call)
checkCall in interface com.android.tools.lint.detector.api.Detector.ClassScannercheckCall in class com.android.tools.lint.detector.api.Detectorprotected int dfs(ControlFlowGraph.Node node)
node - the current node
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||