diff options
author | Tor Norbye <tnorbye@google.com> | 2012-07-19 17:57:30 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-07-23 15:06:58 -0700 |
commit | 2c611aed27d75bd816b7887b64f98ff1ed87b097 (patch) | |
tree | f73f0d4c49d4eda4c48b8266bf0bffab2a81b06a /eclipse/scripts | |
parent | 4ca1c4d2c780b345854b9824963cd6cf930a7276 (diff) | |
download | sdk-2c611aed27d75bd816b7887b64f98ff1ed87b097.zip sdk-2c611aed27d75bd816b7887b64f98ff1ed87b097.tar.gz sdk-2c611aed27d75bd816b7887b64f98ff1ed87b097.tar.bz2 |
Add lint checks for wakelock and secure random problems
This changeset adds new two lint bytecode-based detectors.
The WakelockDetector looks for problems with wakelocks:
- Calling release() in onDestroy() rather than in onPause()
- Calling acquire() but never calling release() anywhere in the app.
The SecureRandomDetector looks for problems with the SecureRandom
random number generator:
- Calling setSeed() with a fixed number, such as a string literal,
or something equivalent (such as a static field reference of
this or some other class)
- Calling setSeed() and passing in System.nanoTime or
currentTimeMillis since these are considered predictable seeds.
These are both using the new fast-dispatch mechanism for bytecode
detectors in lint. In both cases, there are more complex control flow
we should be checking using flow analysis; that's for an upcoming CL
where we add ASM's analysis library.
Change-Id: Iec2a95b042b8a3e4e976923cc62e9dccf2dfeca5
Diffstat (limited to 'eclipse/scripts')
0 files changed, 0 insertions, 0 deletions