Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.
Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.
InputManager now maintains a cache of all InputDevice objects
that it has loaded. Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured. This will be fixed in a future change.
Added a fake InputDevice with ID -1 to represent the virtual keyboard.
Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
The purpose of the input device descriptor is to make it possible
to associate persistent settings for each input device, such as the
keyboard layout.
The descriptor is a hash of the information we have about the
device, such as its vendor id, product id, unique id, name,
or location.
Bug: 6110399
Change-Id: Idb80f946819b3f0dbf4e661bb0a753dbc2b60981
These keys are specific to Japanese hardware keyboard which can be
used by input method.
Patch ported from AOSP, with the addition of EISU and KANA mappings.
Change-Id: I647473cdd257458e3b9d134b0fc623eae946c3e0
Move services/powermanager into frameworks/native so audioflinger can
use it. Note that this is not the same as a PowerManagerService,
which is part of systemserver and handles turning the screen on and
off, etc. This is just a binder interface to allow taking wakelocks.
Change-Id: I1142e6d9ddbb651cc19ac07d946fa24d8feed8a3
WebView needs more fine-grained control over the behavior of the
framework upon execution of the display lists. The new status_t
allows WebView to requests its functor to be re-executed directly
without causing a redraw of the entire hierarchy.
Change-Id: I97a8141dc5c6eeb6805b6024cc1e76fce07d24cc
Reorganize SoundPool and JetPlayer code to be ready for the
creation of libmedia_native.
Split SoundPool between libsoundpool (JNI) and libmedia(sound pool implementation).
Remove dependencies on nativehelper/jni.h from JetPlayer.
Change-Id: I130c6014173b714329929dd82c5dfb70b757a610
ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).
Change-Id: I2b4b7adcdf68eb25ee7cba5dd3b69eadf0523af3
Gapless playback for appropriately tagged mp3 and m4a files.
Currently this is implemented in OMXCodec, which most players
use, but should be easy to support in other players as well by
using the SkipCutBuffer utility class.
Change-Id: I748c669adc1cfbe5ee9a7dea2fad945d48882551
It was only used to decide whether to issue a warning.
The warning was issued the first time track was created but
not at re-creation. Now it is a verbose message every time,
not a warning since it happens all the time with key clicks on A2DP.
Change-Id: I9d39f53c0a7eb84b666e55b1b76ff830cf8f37ba
createTrack and openRecord don't need the "old" flags parameter,
which was either audio_policy_output_t or audio_in_acoustics_t
shifted left by 16 bits. But they do need "new" flags, which
are defined by the application use case. Initially, the only
application use case flag is timed output, but others are planned.
For output, the audio_policy_output_t flags are passed to
AudioSystem::getOutput, which returns an audio_io_handle_t, and that
handle is then passed to createTrack. So createTrack doesn't need the
old flags parameter.
For input, the audio_in_acoustics_t flags are passed to
AudioSystem::getInput, which returns an audio_io_handle_t, and that
handle is then passed to openRecord. So openRecord doesn't need the
old flags parameter.
Change-Id: I18a9870911846cca69d420c19fe6a9face2fe8c4
Current AudioTrack implementation enforces that the requested audio
buffer size is at least corresponding the audio latency.
This requirement is too strong and leads to problems with current
stagefright and AudioSink implementations when playing over output
streams with long latency.
Ultimately, the AudioSink design should be changed to specify a minimum
buffer size in time or frames units but not in buffer count units.
Change-Id: I8ba603956f92ac49143a8249572665aa548f2f0f
Conflicts:
media/libmedia/AudioTrack.cpp
There is no graceful way to kill Android application processes.
They typically have many threads running doing various things
When System.exit() is called, those threads just keep going
while the cleanup actions run until the process finally.
Performing shutdown actions can easily cause more harm than good.
For example, closing the Binder driver's file descriptor may
cause other threads waiting on Binder to wake up and then crash
in nasty ways after receiving EBADF.
So when an Android application exits, skip the cleanup and just
call _exit() to end it all.
Bug: 6168809
Change-Id: I29790c064426a0bf7dae7cdf444eea3eef1d5275
The purpose is to let face unlock always get the camera
successfully. What happened was the camera applications may
have opened the camera in onResume under the lock screen.
This API lets face unlock take the camera from the camera
application. A new permission will be added, so other
applicatoins won't be able to take the camera from the face
unlock.
bug:5584464
Change-Id: Ib3d9dcbc2161815b68db42327dc01148453704c6
CameraParameters.h is indirectly required to implement the Camera
HAL. Move it to frameworks/native.
Bug: 6171735
Change-Id: I1bf4db228333be16fc7caa3c51280a9495293011
tracks.
o Newly introduced APIs are (MediaPlayer):
getTrackInfo() / addExternalSource() / enableTrack() / disableTrack().
o Timed text tracks are supported only, for now.
o TODOs:
- Define the audio/video behavior for enableTrack and disableTrack.
- Refactoring AwesomePlayer / TimedTextDriver so that all types of
track index can be managed in the correct order and be ready for
supporting audio/video tracks.
(MediaExtractor and MediaSource for text file might be necessary.)
Change-Id: Idb85e1b3f2ed49a64f377d05472dd6663ce94e07
Log statistics on CPU usage in Hz in addition to wall clock time
Use CPU statistics for all playback threads, not just MIXER
(but they are disabled by default by a compile-time debug macro).
ThreadCpuUsage library:
- Move statistics out of the library and leave that up to the caller
- Add API to determine a CPU's frequency
Change-Id: Ia1011123146e641fcf210ef26e78ae2b4d3b64ad
Some native activities experienced ANRs when the input consumer
deferred an input event due to client-side batching. If the
input channel was fully emptied then the client had no way of
knowing that it should wake up to handle the deferred input event.
This patch also fixes some lock issues in the native activity
input queue implementation. In at least one error case, it
was possible for a function to exit without releasing the lock.
Bug: 6051176
Change-Id: I4d9d843237e69b9834f8d8b360031b677fcab8c3
Currently able to play Ogg Vorbis, PCM WAV and other lossless files seamlessly
by reusing the initial AudioTrack for subsequent players.
Change-Id: Ie7cf6b9076bdf4f9211574456d192c02c04fecc7