The API allows callers to control the default network that is used for
DNS hostname resolution.
Test: atest CtsNetTestCases
Tests in change I00143cafcd3eb1d71e8d5c7ea9c839a99dc6f4ce
Bug: 171540887
Change-Id: I70d8113ae49cd1e0910a6dbc5929b6a157c44f42
The API is the getter couterpart for setprocnetwork.
Use it in NetworkUtils so that the NDK API can be the source of truth
for the process network.
Bug: 171540887
Test: atest CtsNetTestCases
Change-Id: I4c7a302df580cec6315e10d0d49a89cf93597ef0
Add the missing end of group markers to the files
which generate the "end of file while inside a group"
warning.
Bug: 183024041
Test: development/tools/ndk/build_ndk_docs.py 2>&1 \
| grep "end of file while inside a group"
Change-Id: Ib41840bbc72651ad90aaac878d36c233b5284cf3
Fix doc generation error
Bug: 183013620
Test: ./_scripts/update_api_doc.py ~/android/master/ 2>&1 >/dev/null | grep -i input
Before:
android/input.h:680: warning: unable to resolve link to `RELATIVE_X' for \link command
After:
the line above is not present
Change-Id: I995ac91d8bfd53309607e3cdac305adb68d40d78
Named fields for accessing data from the gyroscope and uncalibrated
accelerometer sensor types were mistakenly left out of the union.
Although this data was accessible directly before, these fields make
developers' lives easier.
Fixes: 182903112
Test: compile only
Change-Id: If8189658030fab96b54b79dd318935b9116b5e58
When the 'Finished' message is received inside InputDispatcher, we are
currently providing a callback function that gets executed with the
parameters that are matching the InputMessage fields.
This does not scale well for the case where there is more than 1 type of
InputMessage received from the InputConsumer. We would have to provide 2
callbacks, which is not user-friendly.
The calling code inside InputDispatcher is already aware of the
InputMessage struct, but InputMessage is intended to be a protocol of
communication between input channels, and is not meant to be used
elsewhere. To provide the output of 'finished' signal, we introduce a
new 'Finished' struct into InputPublisher. InputPublisher will now try
to read a message, and will provide a response in that struct.
This approach will also now force the caller to check ok(), which will
increase correctness.
Bug: 167947340
Test: atest inputflinger_tests
Test: TBD
Revert submission 13838212-revert-13780058-receiveFinishedSignal-UGCLLLUBPW
Reason for revert: Relanding with fix
Reverted Changes:
Idb3a44b4a:Revert "Update the usage of receiveFinishedSignal"...
I1e71010f5:Revert "Use Result<InputPublisher::Finished> inste...
Change-Id: I9c425bb7249d43648e558214e40fa35aeaa0bb11
Revert submission 13780058-receiveFinishedSignal
Reason for revert:
Caused severe delay in back navigation on IME-focusable window.
Reverted Changes:
I301c6e9c3:Use Result<InputPublisher::Finished> instead of ca...
I43a0f2d31:Update the usage of receiveFinishedSignal
Bug: 167947340
Fix: 182514338
Test: Manually verified as follows:
1. Set up the device as "Set up offline" mode.
2. adb shell am start -n com.google.android.dialer/.extensions.GoogleDialtactsActivity
3. On one terminal, run adb logcat -s InputMethodManager:*
4. On another terminal, run adb shell input keyevent 4
5. Make sure that the following message is not shown.
"Timeout waiting for IME to handle input event after 2500 ms"
Change-Id: I1e71010f5f4ae268dfcbc3bde50881c2fa3d51d5
When the 'Finished' message is received inside InputDispatcher, we are
currently providing a callback function that gets executed with the
parameters that are matching the InputMessage fields.
This does not scale well for the case where there is more than 1 type of
InputMessage received from the InputConsumer. We would have to provide 2
callbacks, which is not user-friendly.
The calling code inside InputDispatcher is already aware of the
InputMessage struct, but InputMessage is intended to be a protocol of
communication between input channels, and is not meant to be used
elsewhere. To provide the output of 'finished' signal, we introduce a
new 'Finished' struct into InputPublisher. InputPublisher will now try
to read a message, and will provide a response in that struct.
This approach will also now force the caller to check ok(), which will
increase correctness.
Bug: 167947340
Test: atest inputflinger_tests
Change-Id: I301c6e9c39c02692f5565aa8affdcfd0e17bcefc
This CL adds the ability to send a DRAG event through the
InputChannel, and adds the appropriate processing logic to
InputPublisher and InputConsumer.
Bug: 158242495
Test: atest libinput_tests InputPublisherAndConsumerTest
Change-Id: I7aead341a9851facf654024c476bd6d7eaae4590
In order to send the data via socket, we use the InputMessage struct. In
this struct, various fields are stored. This struct's purpose is to
serialize the input event information.
We are storing bools in InputMessage as various integer types. To read
these bools, we compare the integers to 1. It's not very convenient.
To simplify this, let's store bools directly in InputMessage. Bool size
is implementation-dependent, but it's typically 1, so we can just guard
against that with a static_assert.
Bug: 169866723
Test: presubmit
Change-Id: Iae4870fac95e884cc328791c0035df6e31e34a7b
Currently, we are using InputMessage::typeToString, a manually written
function, to print the entry type.
Let's use "NamedEnum" instead to simplify the process of adding new
types.
Bug: 167947340
Test: compile only
Change-Id: I26d0a469bf93adbe2795d8a378c25e6ded891274
Adds infrastructure for the SF Planner, which will support layer
caching/flattening and composition strategy prediction.
Bug: 158790260
Test: atest libcompositionengine_test libsurfaceflinger_unittest
Change-Id: I0d3027cea073fe25f269f3d5e83fe621dfbe7b2b
In this CL we introduce the getDynamicDisplayInfo call
on ISurfaceComposer which replaces the existing
- getDisplayModes
- getActiveDisplayMode
- getColorModes
- getActiveColorMode
- getHdrCapabilities
This way all display properties can be queried atomically.
The current DisplayInfo class is moved to the androd::ui
namespace and it's renamed to StaticDisplayInfo.
ui::DisplayMode is now LightFlattenable and the mode ID is
int32_t instead of size_t in order to prevent serialization
problems.
Additionally we add the ID field to ui::DisplayMode. This
way we no longer need the supported display IDs to be
from 0 to N-1.
Bug: 159590486
Bug: 180539476
Test: presubmit, manually test that device boots
Change-Id: I52b170913ce47cb5df2e8417e6cc95d395df1fda
Very early in Android 12's development, AChoreographer's refresh rate
callbacks were updated to dispatch from DisplayManager rather than from
SurfaceFlinger. Now that we've written a test enforcing this behavior,
update the documentation so that API users can depend on more reliable
behavior.
Bug: 168708518
Test: builds
Change-Id: I4f28c7a8d7b92b45dc2b89ba43595a6f0434d09d
- Add SurfaceStatsCallback to TransactionCompletedListener
- Register a callback in RenderProxy to be called when we have
surface stats from SF via the BLAST callback.
- Instead of finishing a frame for frame metrics reporting
immediately, wait until BLAST callback fires, note GPU completion
time and finish frame.
- Expose GPU_COMPLETION in FrameMetrics
- Modify TOTAL_DURATION to also include GPU_COMPLETION
Test: FrameMetricsListenerTest
Fixes: 171046219
Change-Id: If4b63c6a4c49c9ce2f31410d7f33541b0e6bf594
hwui needs this api to hold a reference to a surface control object passed from java layer.
Bug: 173671170
Test: manual
Change-Id: I1ca9cbe5caad4bdb8594b421e5444d7bdb7b71a8
When the app completes an input event by calling 'finishInputEvent', it
will now notify InputDispatcher about the time when the event was first
read by the app.
This will help InputManager collect dispatching latency statistics.
Sample dumpsys output for validation:
android.view.ViewRootImpl$WindowInputEventReceiver
mInputChannel: da2dbc7 com.google.latencyTester/com.google.latencyTester.activities.MainActivity (client)
mSeqMap: {}
mReceiverPtr:
mInputConsumer:
mResampleTouch = true
mChannel = da2dbc7 com.google.latencyTester/com.google.latencyTester.activities.MainActivity (client)
mMsgDeferred: false
Batches:
Batch:
Message 2277: MOTION action=MOVE
Pointer 0 : x=643.0 y=961.0
mSeqChains:
<empty>
mConsumeTimes:
seq = 2277 consumeTime = 74385633441431
The above dump was acquired during touch of the latencyTester app.
Also verified that normally, mConsumeTimes is empty.
Bug: 169866723
Test: atest inputflinger_tests
Test: adb shell dumpsys activity all | grep -i consume -C 20
Change-Id: Ib173bb38e5decc2e4a6b0cf9bca9aceb32352ec0
Also normalize the non-bionic definitions of __INTRODUCED_IN() to match
the majority.
Bug: http://b/178449269
Test: treehugger
Change-Id: I378a6d8a01999958f397c896a375d38a9de43f8f
Add the audio session ID to the information returned by the PlayerBase
class to AudioPlaybackMonitor via trackPlayer().
Bug: 178909700
Test: atest AudioPlaybackConfigurationTest
Change-Id: Ieb3e075d8edbef846ee5864e68ac5b774ac7cfc1
Bug: 169137236
Test: SANITIZE_HOST=address make imagedecoder_fuzzer
Along with a change in frameworks/base
(I0ffc4e90b4083db79fbb12012e2e1284206b43e3), this will make it possible
to run imagedecoder_fuzzer on the host, for faster fuzzing.
imagedecoder.h:
- define __ANDROID_API__ and __INTRODUCED_IN on non-Android systems, so
methods can be called on those systems.
bitmap.h:
- define __ANDROID_API__ and __INTRODUCED_IN on non-Android systems, so
methods can be called on those systems.
- include <stddef.h>, which is needed on non-Android systems for size_t.
- on Android, unguard types and enums for easier opportunistic usage via
dlsym.
nativewindow/Android.bp
- make libnativewindow_headers host_supported, so that libjnigraphics
can access android/data_space.h
Bug: http://b/179303032
Change-Id: Iefdb4132d6f10f9164be85f4dc6e11883f6fd37e
Merged-In: Iefdb4132d6f10f9164be85f4dc6e11883f6fd37e
Extended InputDevice and EventHub with capabilites to detect and read
external battery status and capacity. This allows devices such as
wireless gamepads to provide battery information to applications.
Bug: 161633432
Test: atest InputDeviceBatteryTest
Change-Id: I3c65166a1f0b055c5b85bad286afd5beb60bb303
Merged-In: I3c65166a1f0b055c5b85bad286afd5beb60bb303
__INTRODUCED_IN() does the right thing automatically now.
Bug: http://b/178449269
Test: treehugger
Change-Id: I94d2ad6fafb6d907793a416db82a9e56f4f61d1c
Merged-In: I94d2ad6fafb6d907793a416db82a9e56f4f61d1c
__INTRODUCED_IN() does the right thing automatically now.
Bug: http://b/178449269
Test: treehugger
Change-Id: I94d2ad6fafb6d907793a416db82a9e56f4f61d1c
Merged-In: I94d2ad6fafb6d907793a416db82a9e56f4f61d1c
Bug: 169137236
Test: SANITIZE_HOST=address make imagedecoder_fuzzer
Along with a change in frameworks/base
(I0ffc4e90b4083db79fbb12012e2e1284206b43e3), this will make it possible
to run imagedecoder_fuzzer on the host, for faster fuzzing.
imagedecoder.h:
- define __ANDROID_API__ and __INTRODUCED_IN on non-Android systems, so
methods can be called on those systems.
bitmap.h:
- define __ANDROID_API__ and __INTRODUCED_IN on non-Android systems, so
methods can be called on those systems.
- include <stddef.h>, which is needed on non-Android systems for size_t.
- on Android, unguard types and enums for easier opportunistic usage via
dlsym.
nativewindow/Android.bp
- make libnativewindow_headers host_supported, so that libjnigraphics
can access android/data_space.h
Change-Id: Iefdb4132d6f10f9164be85f4dc6e11883f6fd37e
__ANDROID_API__ guards are removed in favor of __INTRODUCED_IN macros.
Currently, __INTRODUCED_IN macro does nothing for these headers (it's
meaningful only to the headers processed by versioner which are limited
to binic headers). The plan is to make the macros to tag the declaration
with the availability attribute. Then, when the min_sdk_version of a
caller is set to an API level that is older than the API level of the
APIs, the compiler will provide them as weak symbols and enforce that
calling the APIs are guarded with a runtime check.
For now, these guards are preventing from making a build system change
to let __ANDROID_API__ track the min_sdk_version property instead of the
sdk_version property. With the build system change, __ANDROID_API__ will
suddenly drop for the native modules where min_sdk_version <
sdk_version, which is the case when the modules are included in APEXes.
As a result, some new APIs will be unavailable at build-time. Dropping
the hand-written guards fixes the problem.
Bug: 163288375
Test: m
Change-Id: Ia1292327fd995e847f3d6a5837adef048220fd78
Bug: 160984428
Bug: 170672785
Test: none
The system currently requires decoding the pixels of the frame of an
HEIF/AVIF animated image before the actual duration of that frame can
be retrieved. Rather than handling this (likely temporary) limitation by
- documenting it
- providing extra APIs
- limiting other formats in the same way
remove documentation specifying that animated HEIF is supported.
Developers are likely to be more interested in the other formats (GIF,
WebP) anyway. If they do attempt to animate an HEIF file, they will
still see the default duration specified for the sequence.
Change-Id: I5b97aeddee1311b694d73ac67b6157032d9ad745