Added new drag_can_accept and drag_hovered XML attributes and the View
logic to support them. Drawable states are now refreshed automatically
when a drag starts/ends and when a drag crosses the boundary of a
participating view.
Change-Id: I25f8ee02c83b3fa4f27201997d7eabf4be653fd8
Summary:
frameworks/base
- fix profiling to collect data beyond the first snapshot
- avoid many small files, accumulate data over process lifetime
libcore:
- add support for VM specific sampling, trying to cut down overhead
- added support for converting snapshot files to text format
- fixed race in profiler when stopping
dalvik
- added VMStack.setThreadStackTrace interface for filling a stack
trace into an existing StackTraceElement[]
Details:
frameworks/base
Changed snapshots from text to binary hprof format (bumping version to 3)
Changed from one file per snapshot to one file per process lifetime.
Restart profiling after snapshot.
core/java/com/android/internal/os/SamplingProfilerIntegration.java
Add quick test in maybeSnapshot to avoid doing work when the
SamplingProfilerIntegration is disabled. Make maybeSnapshot
private. Remove unneeded memory allocation in handleLowMemory.
core/java/android/app/ActivityThread.java
libcore
Added ThreadSampler interface. This allows VM specific thread
sampling optimizations. The portable version continues to use
Thread.getStackTrace().
dalvik/src/main/java/dalvik/system/profiler/ThreadSampler.java
dalvik/src/main/java/dalvik/system/profiler/PortableThreadSampler.java
dalvik/src/main/java/dalvik/system/profiler/SamplingProfiler.java
Add VMStack.setThreadStackTrace and use in new DalvikThreadSampler
to avoid allocating a full stack trace when only a limited depth
is desired.
dalvik/src/main/java/dalvik/system/profiler/DalvikThreadSampler.java
dalvik/src/main/java/dalvik/system/VMStack.java
Refactored BinaryHprof.readMagic out of BinaryHprofReader so it
can be used by HprofBinaryToAscii converter to probing file
types. Added magic number constant to be shared between readMagic
and BinaryHprofWriter.
dalvik/src/main/java/dalvik/system/profiler/BinaryHprof.java
dalvik/src/main/java/dalvik/system/profiler/BinaryHprofReader.java
dalvik/src/main/java/dalvik/system/profiler/BinaryHprofWriter.java
dalvik/src/main/java/dalvik/system/profiler/HprofBinaryToAscii.java
Removed unneeded HprofWriter interface. Changed to simpler static
interface to write HprofData to binary and text formats.
dalvik/src/main/java/dalvik/system/profiler/HprofWriter.java
dalvik/src/main/java/dalvik/system/profiler/AsciiHprofWriter.java
dalvik/src/main/java/dalvik/system/profiler/BinaryHprofWriter.java
dalvik/src/test/java/dalvik/system/profiler/SamplingProfilerTest.java
Added support for reading snapshot files created by
SamplingProfilerIntegration by stripping the text header to allow
easier conversion to the text format.
dalvik/src/main/java/dalvik/system/profiler/HprofBinaryToAscii.java
Fixed race between Sampler and
SamplingProfiler.stop. SamplingProfiler.stop previously simply
called the Sampler's TimerTask.cancel method, but this does not
wait for a currently running Sampler to finish. The TimerTask
documentation says the only reliable way to do this is to have the
run() cancel itself, so that is what is now done, with new code to
ensure that SamplingProfiler.stop does not return until the
Sampler has been terminated.
dalvik/src/main/java/dalvik/system/profiler/SamplingProfiler.java
dalvik
Refactored VMStack_getThreadStackTrace to create helper getTraceBuf
used to implement new VMStack_setThreadStackTrace. The new version
interface fills an existing StackTraceElement[], avoid allocating
unnecessary StackTraceElements.
vm/native/dalvik_system_VMStack.c
Refactor dvmGetStackTraceRaw to create dvmSetStackTraceRaw which
fills in an existing, potentially smaller, StackTraceElement[].
vm/Exception.c
vm/Exception.h
Change stack depths to be unsigned to avoid signed/unsigned comparison warnings.
vm/Ddm.c
vm/Exception.c
vm/Exception.h
Change-Id: I4b90255e4e1d33ea2b569321c4968b0f3369f251
this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.
NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.
Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
("setCorrectionSpan" was added in Id3abc9ea4d11753cd )
Also..
- Added a class java doc for CorrectionSpan
- Removed FLAG_DEFAULT
- Changed the return type of getSuggestions from Array<CharSequence> to String[]
Change-Id: If5eb091e307a7a40c5b4a70ec1fe6059ecd9fb2d
The uniqueness of InputMethodInfo was guaranteed by mId (like InputMethodInfo#equals), but the hashCode was not implemented in the same way.
This change fixes a problem happening when the user gets the hashCode of InputMethodInfo obtained through IPC.
Change-Id: Ib876c5cb0d778481100597ec31202f94fb7b8f37
- mostly was visible in Settings apps / Wi-Fi networks summary info for each network
- use ceilf() instead of roundf()
Change-Id: I80310a9f00e8f7eb066d8ff03f52ea8f9cd85880
icon+text take dpad focus twice in row
Fix action menu item layout focusability so that only the full item is
focusable. Fix up listeners appropriately.
Change-Id: I127c36404894869a08c5f4472491e3e596563c5c
The input dispatcher sends a HOVER_ENTER to a window before dispatching
it any HOVER_MOVE events. For compatibility reasons, the window will
*also* receive the HOVER_MOVE. When the pointer moves into a different
window or the pointer goes down or when events are canceled for some reason,
the input dispatcher sends a HOVER_EXIT to the previously hovered window.
The view hierarchy behavior is similar. All views under the pointer
receive onHoverEvent with HOVER_ENTER followed by any number of HOVER_MOVE
events. When the pointer leaves a view, the view receives HOVER_EXIT.
Similarly, if a parent view decides to capture hover by returning true
from onHoverEvent, the hovered descendants will receive HOVER_EXIT.
The default behavior of onHoverEvent is to update the view's hovered
state by calling setHovered(true/false). Views can query their current
hovered state using isHovered().
For testing purposes, the hovered state is mapped to the pressed
drawable state. This will change in a subsequent commit with the
introduction of a new hovered drawable state.
Change-Id: Ib76a7a90236c8f2c7336e55773acade6346cacbe
previous state
Hide the action bar upon finishing a mode if it was hidden when the
mode started. If show() is called while the mode is active, the bar
will not hide when the mode finishes.
Change-Id: I7d9b593b9ecd9fa633251abebcdca0d85405252a