| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The @SuppressLint annotation can deliberately be placed on not only
classes and methods but on parameters and local variables too.
For AST-based (Java source-based) lint checks, this works fine.
However, some lint checks, such as the API Check, is based on
analyzing the bytecode. Annotations placed on local variables and
parameters do not make it into the .class file, so these annotations
do not work to suppress errors when placed on local variables (or
parameters).
The @TargetApi annotation applies only to the bytecode based API
check, so its metadata only allows the annotation to be placed on
methods and classes and constructors. However, the @SuppressLint
annotation needs to continue to be available for the AST-based checks.
This CL adds a new lint check, a "meta" check, which actually looks
for invalid @SuppressLint annotations, and warns about these. With the
new lint-on-save behavior, this means you instantly get feedback if
you attempt to suppress an annotation in the wrong place. (Note that
the quickfix for adding annotations has always enforced this and
placed annotations out at the method level, but as shown in issue
35049, developers place them there deliberately themselves.)
This CL also fixes an unrelated problem (shown in issue 34198) that
the add suppress annotation code could sometimes add multiple versions
of the same id into the annotation.
Change-Id: I5bc61c6315edfcfc20103d1e580e389dd8e6a09b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changeset adds in the ASM analysis library (an optional part of
the ASM package lint is already using to process bytecode). It also
adds some basic flow analysis to the SecureRandom detector to detect
whether a given dispatch to a field of type java.util.Random is
actually pointing to a java.security.SecureRandom, in which case it
flags calls on it to setSeed() where the argument is a fixed integer.
Change-Id: If85ab9f8db0e801a01f1a3ea845865b4f98e259c
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds shared dispatch for bytecode based rules. We
already have this for XML and Java source trees: detectors can
register interest in a particular element or attribute name, or a
particular method call name, and then the source is processed in a
single pass, and a quick map lookup dispatches to any detectors
interested in that particular item.
This has the important property that adding new detectors does not
linearly slow down lint: it does not process each XML document an
extra time for each newly added rule: the new rule just adds one more
entry into a dispatch table, and only for the specifically interesting
tag name (for example) is there an extra dispatch to the new detector.
This changeset adds a similar mechanism for the ASM based bytecode
detectors. Until now, each detector would be handed the class node of
the outer class. This changeset adds a couple of new dispatch methods:
First, a way to register interests in method calls of a particular
type, and second, a way to registere interest in types of ASM nodes.
In addition to the new visitor, this changeset rewrites a couple of
detectors to use the new dispatch approach (there are new detectors in
the pipeline which will also take advantage of this), and cleans up
handling of positions a bit.
Change-Id: Ib115bd3418b6c63bdcd49fec046e91a73daf38a9
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the emulator window has non-1.0 scaling, the scale is applied
when blitting the Android framebuffer to the host window. For the
OnPost callback, we were not only reading the image back from the
window (so post-scaling), we were also storing it in a 1.0-scaled
buffer. Now we read back from the Android framebuffer image, which is
always 1.0-scaled.
Change-Id: Ia9c974711a9a4b0b19f4b997f65ecc64481b4c6a
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I14041db3996be2afa3bfec82aa1f0a2191eb4872
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rather than launch tests sequentially on each device, launch
them concurrently on all devices. An Eclipse Job is created per
device from which the test tree information is collected and then
tests are run.
Change-Id: I564f04616e2f1dc26571ad7eec77df1d77c0afa9
|
|\ \ \
| | | |
| | | |
| | | | |
test input files."
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
files.
Change-Id: I8e0f8986da5be6a640a8aadb44f9f7c364c84bce
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
app."
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I65d7064efb36002713a3083378af9200331ce793
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ADT uses a "window coordinator" which listens for various window
related events (such as part activation, editors getting maximized
etc) to implement its various layout editor handling (to dock property
sheets within the layout editor unless it's shown in the surrounding
frame), to activate/deactivate editors for keybinding handling, etc.
This did not take into account the possibility of multiple workbench
windows getting opened. This CL adds proper support for this. The
window coordinator is no longer a singleton; there is one instance per
workbench window, and AdtStartup listens for workbench events and
creates or disposes these on demand.
Change-Id: I298d9d82c7aefd684bcb1ace3bee0267e1f94a60
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I78af9a552757f3e28369d5f2de112541b1a8ea98
|
|\ \ \ \ \
| |/ / / / |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Some of the templates require JDK 6 (because they specify @Override on
methods implementing an interface). Rather than attempting to figure
out what the default is and conditionally adding these annotations,
always tie the project to JDK 6 instead, since it's a better language.
This fixes issue 35184: Using the wizard for a JellyBean only
multi-fragment project creates uncompilable code
Change-Id: I434d7b7335ac51110c6044f4ac4765a5a8813c3d
|
|\ \ \ \ \ |
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fix 35225: Change the ADT tooltips for toolbar buttons to be
noun-phrases or verb-phrases (not descriptions)
Change-Id: Idb1b5d30f96d8fd66344562f1087dabe254ee25d
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
|
| |/ / /
| | | |
| | | |
| | | | |
Change-Id: I54c3adee5ff85a91d13740796ef6809707f00333
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | | |
Change-Id: Ie085ec76f9033d50acf086b89748e764b33f5f0c
|
|\ \ \ \ |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Constructors are not like methods: they are not inherited
into subclasses. The Lint API check needed some special
handling of constructors to avoid this, since it was
looking up inherited constructors and treating them as
accessible. In particular that meant it wouldn't flag
new IOException(Throwable) as requiring API 9, since its
superclass had a constructor which also took a Throwable
(with API 1).
Change-Id: I268752be506f12399ce4855d2cf7bec76012e4c2
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes the issue where if you try to create a resource
qualified layout via the layout editor where one already
exists, ADT will overwrite the the contents of the existing
layout. Even worse, if the layout you try to create is the
one you're currently editing, it will replace it with an
empty file.
Change-Id: If3017c1c77d21cf99a4d77e62b46fb079997596e
|
|\ \ \
| |/ /
|/| | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently we allow launching an activity on multiple devices
from a single launch configuration. This CL adds support for
running Junit tests on all connected devices/emulators from
a single launch config.
At the UI level, all test results now show up as children
of per device test suites.
The changes are primarily in 3 different areas:
- In ddmlib, the main change is to save the device name
on which a particular test was run. This information is saved
in the TestIdentifier that is created per test case.
- In ADT, the general launch action (IAndroidLaunchAction) is
modified to support launching on multiple devices. This simply
loops over the existing launch action for each device for
Activity Launch or Empty Launch. The Junit Launch Action
is modified to launch a single Junit UI and collects the
results from all devices and passes it on to the Junit UI.
- ADT's ITestRunListener's are modified to look at the device
on which a test was run and add results in the appropriate
per device test suite.
Change-Id: I936c2db2398fcad16544794441dedc714de9bea8
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This changeset attempts to fix the issue with cut/copy/paste (and
other keybindings) not working properly in the non-layout XML
files. The symptom is that the action appears not to work, but is
actually applied to a different editor.
I haven't figured out why this happens in e4; after you switch focus
the editor action map should switch, but the fix here is to listen for
part changes, and manually reset the action bindings whenever this
happens.
This fixes issue 34630 (as well as several duplicates filed recently).
Change-Id: Ia1134c16ac3323a8a03f2c61182d810b7f7d2589
|
|\ \ \
| |/ /
|/| | |
|
|/ /
| |
| |
| | |
Change-Id: Ieddcad27b077914730dce2456e23b499451391ef
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This CL adds code completion support for <plurals>
elements in resource files.
Change-Id: I96c4bdb4fc677437a7426d394f57e8429c322219
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
Change-Id: Id437ef30e1488c96a46ccea45459694fd23db582
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Lint already had a check for <selector> lists where it detects the
case where you have an empty child not in the last position; this will
match everything, and hide all subsequent states.
This changeset generalizes this check: It makes sure that no state is
fully matched by a previous state.
Change-Id: I43b80beb531e68008d82f6c620739ca179d0f8f8
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | | |
Change-Id: Ia029a8aabdc2cbaff034b1d378ddf51f126d1b56
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Dalvik optimization to automatically inline getters
was introduced in Gingerbread, not Froyo.
Change-Id: If14288aa398206d4eebfa57ccc7ddfabc6dde83d
|
|\ \ \
| |/ /
|/| | |
|