996 Commits

Author SHA1 Message Date
Jeff Brown
c1e7b21825 Merge "Improve input device calibration format." into gingerbread 2010-10-15 01:15:08 -07:00
Jeff Brown
78a76fea28 Merge "Revert to using epoll_wait()." into gingerbread 2010-10-14 22:18:43 -07:00
Jeff Brown
c6d282bb82 Improve input device calibration format.
Added support for calibrating touch size for devices that report
size as an area measurement rather than as a width.
Fixed some bugs.

Bug: 3096045
Change-Id: I30a12e73752883516ed054f8af407204bca45814
2010-10-14 21:44:16 -07:00
Mathias Agopian
d4e03f3742 addresses parts of 3096779 and 3097475
3097475: Animation setting should control the screen on animation
3096779: CRT power-on animation can briefly show the top app instead of lockscreen

There is now a parameter that controls wether the ON and/or OFF animation are
performed. we also always clear the screen to black on power off, to make
sure it won't briefly appear on power on.
HOWEVER, 3096779 is not 100% fixed in the case where we're doing the animation
because there is a race, where SF doesn't wait (b/c it doesn't know) for the
framework to have redrawn the lockscreen.

Change-Id: Ie0f02c9225fcdf24b1e8907e268eb7da2c5b0a03
2010-10-14 14:57:34 -07:00
Kenny Root
bdf8034c65 Merge "OBB: use PBKDF2 for key generation." into gingerbread 2010-10-13 18:29:43 -07:00
Kenny Root
3b1abba6bb OBB: use PBKDF2 for key generation.
Switch to using PBKDF2 for the key generation for OBBs. Any previously
generated OBBs will stop being read correctly. A small pbkdf2gen program
is available to allow generation of appropriate keys with the salts.

Bug: 3059950
Change-Id: If4305c989fd692fd1150eb270dbf751e09c37295
2010-10-13 18:25:33 -07:00
Mathias Agopian
011b5bcc03 Merge "implement part of [3094280] New animation for screen on and screen off add support for screen on animation" into gingerbread 2010-10-13 15:55:57 -07:00
Mathias Agopian
2d2b803a92 implement part of [3094280] New animation for screen on and screen off
add support for screen on animation

Change-Id: If50cf52ae04b95b42da7d74cf7fa96d5cb54d238
2010-10-13 14:28:26 -07:00
Andreas Huber
312644cdbb Merge "Support for writing to MPEG2 transport stream files." into gingerbread 2010-10-13 09:14:40 -07:00
Andreas Huber
165c657966 Merge "HTTP Live content that are tagged as complete are now seekable." into gingerbread 2010-10-13 09:14:13 -07:00
Andreas Huber
9adf466021 Support for writing to MPEG2 transport stream files.
Change-Id: If3b7a807bc224a4b1cb2236537c3ebdc5aee0d97
2010-10-12 16:05:23 -07:00
Andreas Huber
54d09724e3 HTTP Live content that are tagged as complete are now seekable.
Change-Id: I9d0d2f009f883e5baf3e9de8c5c0aa05760e4bde
related-to-bug: 2368598
2010-10-12 14:32:10 -07:00
Mathias Agopian
aab758e879 turn off the electron beam
Change-Id: I335fb6719f1d5a3f1c6f37a046fd1c2c4ed2bbc6
2010-10-12 14:16:11 -07:00
Kenny Root
b4de3dca96 Merge "OBB: rearrange to be entirely asynchronous" into gingerbread 2010-10-11 17:24:54 -07:00
Kenny Root
af9d667ccf OBB: rearrange to be entirely asynchronous
Rearrange structure of MountService handling of OBBs to be entirely
asynchronous so we don't rely on locking as much. We still need the
locking to support dumpsys which has been improved to output all the
data structures for OBBs.

Added more tests to cover more of the error return codes.

Oh and fix a logic inversion bug.

Change-Id: I34f541192dbbb1903b24825889b8fa8f43e6e2a9
2010-10-11 17:22:03 -07:00
Jeff Brown
b931a1b418 Fix an event injection bug when the policy is bypassed.
Added the concept of a "trusted" event to distinguish between events from
attached input devices or trusted injectors vs. other applications.
This change enables us to move certain policy decisions out of the
dispatcher and into the policy itself where they can be handled more
systematically.

Change-Id: I4d56fdcdd31aaa675d452088af39a70c4e039970
2010-10-11 16:26:13 -07:00
Jeff Brown
b699726018 Added more robust tracking and cancelation of events.
This change fixes several issues where events would be dropped in the
input dispatch pipeline in such a way that the dispatcher could not
accurately track the state of the input device.

Given more robust tracking, we can now also provide robust cancelation
of input events in cases where an application might otherwise become
out of sync with the event stream due to ANR, app switch, policy decisions,
or forced focus transitions.

Pruned some of the input dispatcher log output.

Moved the responsibility for calling intercept*BeforeQueueing into
the input dispatcher instead of the input reader and added support for
early interception of injected events for events coming from trusted
sources.  This enables behaviors like injection of media keys while
the screen is off, haptic feedback of injected virtual keys, so injected
events become more "first class" in a way.

Change-Id: Iec6ff1dd21e5f3c7feb80ea4feb5382bd090dbd9
2010-10-10 14:45:51 -07:00
Andreas Huber
f72dd0190e Merge "Disable 10secs forward/backward seeking for rtsp as seek is a very expensive operation there. Decouple the 10sec forward/backward button functionality from seekbar functionality." into gingerbread 2010-10-08 11:16:07 -07:00
Andreas Huber
10b9b3f3fe Disable 10secs forward/backward seeking for rtsp as seek is a very expensive operation there. Decouple the 10sec forward/backward button functionality from seekbar functionality.
Change-Id: I016e79b688774f8ee91ac53216197b5fb9cb41b2
related-to-bug: 3073955
2010-10-08 10:16:24 -07:00
Eric Laurent
b3bdf3f008 Added getter for session Id to AudioSink
Added a method to expose the audio session id at AudioSink interface
so that the AudioPlayer in stagefright can retrieve it.

Also:
- Fixed audio effect send level not being initialized in mediaplayer.
- Fixed compilation error when LOGV is enabled in mediaplayer JNI

Change-Id: I4bb55454fd63d646e0e677692d737c4843fb05fb
2010-10-07 18:23:03 -07:00
Jeff Brown
a97e50f20d Revert to using epoll_wait().
This change depends on the kernel having been patched to use hrtimers
instead of jiffies for scheduling epoll timeouts.

Change-Id: I216bc1c4f565e67ebcb3d2ba4280cb615932bb9e
2010-10-07 16:17:57 -07:00
Jeff Brown
d577cfd73a Merge "Switch Looper back to using poll() instead of epoll()." into gingerbread 2010-10-07 13:29:56 -07:00
Jeff Brown
415d8c3819 Switch Looper back to using poll() instead of epoll().
Added a couple of micro-optimizations to avoid calling wake() unnecessarily
and reduce JNI overhead slightly.

Fixed a minor issue where we were not clearing the "next" field of Messages
returned by the MessageQueue so the Message would hold on to its successor
and potentially prevent the GC from collecting it if the message were leaked
somehow.

Change-Id: I488d29417ce0cdd7d0e447cda76ec978ef7f811c
2010-10-07 13:26:39 -07:00
Andreas Huber
4c19bf9833 Work to support switching transport streams mid-stream and signalling discontinuities to the decoder.
Change-Id: I7150e5e7342e1117c524856b204aadcb763e06ed
related-to-bug: 2368598
2010-10-07 11:41:43 -07:00
Andreas Huber
1e19416383 On this particular device the hardware video decoder spits out buffers that don't actually contain our video data, so we cannot use them to restore the video frame after suspend/resume.
Change-Id: I1b8fe68c1766299844fe84ebbff49cb8b3e4cc7c
related-to-bug: 3070094
2010-10-07 09:19:25 -07:00
Andreas Huber
c743f4506f Make sure to call AudioTrack::stop() instead of AudioTrack::pause() after submitting all samples to AudioTrack to make sure those remaining samples are actually played out.
Change-Id: Id574a0203efcb5e565f1b0fe77869fc33b9a9d56
2010-10-05 13:53:39 -07:00
Jeff Brown
19dfc83c37 Make secure views tolerate IME overlays.
Change-Id: I3cf09b9d91045f4d9c558b4aace482a7b0bbd3d8
2010-10-05 12:26:23 -07:00
Mathias Agopian
8ddd2c72ee fix [2835280] Add support for cancelling buffers to ANativeWindow
There is a new ANativeWindow::cancelBuffer() API that can be used to
cancel any dequeued buffer, BEFORE it's been enqueued. The buffer is
returned to the list of availlable buffers. dequeue and cancel are not
mutually thread safe, they must be called from the same thread or
external synchronization must be used.

Change-Id: I86cc7985bace8b6a93ad2c75d2bef5c3c2cb4d61
2010-10-04 20:10:11 -07:00
Mathias Agopian
19058877df Merge "refactored screenshot code" into gingerbread 2010-10-04 20:04:42 -07:00
James Dong
6f1c7bda39 Merge "Fixed an issue where the reserved free space in the file writer was larger than intended" into gingerbread 2010-10-04 18:37:48 -07:00
Mathias Agopian
597c7f67b5 refactored screenshot code
the core screenshot function now can capture the screen at any lower resolution
performing bilinear filtering.

we also now have some client code to interface with the screenshot service.

it's now possible to request a screenshot at a lower resolution.

Change-Id: I33689bba98507ab928d0898b21596d0d2fe4b953
2010-10-04 17:36:17 -07:00
James Dong
6a9e39ac55 Fixed an issue where the reserved free space in the file writer was larger than intended
The problem was that even though user does not explicitly request the max file size
limit via MediaRecorder.setMaxFileSize(), the file writer sets an implicit file
size limit if 32-bit file offset is used on user's behalf. The reserved free space
is estimated based on the file size, if the file size limit is set by the user.

The fix is to add an extra bool to tell the difference between an
explit requested file size and an implicit file limit and use that
to set the estimated moov box size accordingly.

Change-Id: I731aca6c7833aa764ed7b905edb77721577471b3
2010-10-04 16:54:59 -07:00
Kenny Root
259ec46e8e Use pread() in ZipFileRO for Linux
AssetManager instances are created by zygote and passed to all its
children so that they don't have to individually open
frameworks-res.apk. This creates a problem for determining the current
file offset when using lseek() on those files, because you can't
guarantee the cross-process locking of a mutex. Luckily, Linux
implements pread() to get around this suckiness.

The problem is that only Linux implements this, so we have to keep the
old locking for use on host builds with aapt and friends. aapt doesn't
have this same problem of sharing file descriptors across forked
processes, so we can keep the local AutoMutex to protect accesses of
those files.

Change-Id: Ibe9f11499a53fe345f50fbaea438815ec0fd363e
2010-10-04 15:17:19 -07:00
Kenny Root
b58b27142a Merge "ZipFileRO: moar logging and wrap close" into gingerbread 2010-10-04 07:28:20 -07:00
Jeff Brown
7342bb9693 Wait for initial device scan to finish before updating config.
This change narrows the opportunity for a race condition setting the
resource Configuration while devices are being updated.

Change-Id: I58efa563f4129ab0fce7108511d16a99dff7e451
2010-10-01 18:55:43 -07:00
Kenny Root
6cb241f902 ZipFileRO: moar logging and wrap close
There is apparently still a race upon reading the entry Local File
Header that can't be tracked down, so move the LFH check inside the
mutex-protected block so we can call lseek again to see where we are
when we log an error.

Also, close() can fail so use TEMP_FAILURE_RETRY on it so we don't
unwittingly leak file descriptors when Mean Mr. EINTR comes a-knocking.

Change-Id: I753abad0bd882fe28f7281c406fa76f64393ef4c
2010-10-01 18:30:59 -07:00
Jeff Brown
f2f4871830 Minor logging changes to input dispatcher to help with debugging.
Added dumpsys reporting to EventHub.
Made the formatting a bit clearer.
Added 'Locked' suffix to some internal methods of EventHub.

Change-Id: Ic449560bcce378f6361895d27c66854e9724abb0
2010-10-01 18:05:13 -07:00
Jeff Brown
0eaf3931a3 Support haptic feedback for virtual keys defined in key layout.
Change-Id: I83e4108a87332692e03791dc066206becbc7941f
2010-10-01 15:08:56 -07:00
Eric Laurent
4712baab81 Issue 3032913: improve AudioTrack recovery time
This issue showed that when an AudioTrack underruns during a too long period
of time and is therefore disabled by audioflinger mixer, it takes an additional
delay of up to 3 seconds to recover.
This fix adds a simple mechanism to recover immediately when the client application
is ready to write data again in the AudioTrack buffer

Also throttle warnings on record overflows

Change-Id: I8b2c71578dd134b9e60a15ee4d91b70f3799cb3d
2010-09-30 17:21:23 -07:00
Jeff Brown
ef3d7e8611 Move verbose logging of device capabilities to dumpsys.
Change-Id: I5d55eaebfdf049bd1ac1e7bab2758886cfefc9d7
2010-09-30 15:34:48 -07:00
Kenny Root
05105f7abe Update OBB API to include callbacks
Add a callback for users of the StorageManager API to be able to receive
notifications when the requested operation completes for mountObb and
unmountObb.

Add NDK API to get to ObbInfo like the Java API has.

Also update the docs for the API and remove the "STOPSHIP" comments.

Change-Id: I23a4409c7f8b74d3169614beba920b4d667990a4
2010-09-28 17:23:26 -07:00
Andreas Huber
be04506195 Merge "Instead of constantly polling the AudioPlayer to see if it reached EOS or finished seeking, initiate the notification from the AudioPlayer when the event happens." into gingerbread 2010-09-28 12:02:35 -07:00
Andreas Huber
2b359ed5b5 Instead of constantly polling the AudioPlayer to see if it reached EOS or finished seeking, initiate the notification from the AudioPlayer when the event happens.
Change-Id: I43875b6adaf96d4e982ef3dfc3d6c8f7034ac51d
related-to-bug: 3036592
2010-09-28 11:56:39 -07:00
Andreas Huber
4769f57948 Merge "Vorbis files may have more samples encoded that should be used, i.e. we have to trim samples at the end of the stream. This is crucial for proper looping of some audio files." into gingerbread 2010-09-28 11:46:41 -07:00
Andreas Huber
3a9cc8cef4 Merge "Squashed commit of the following:" into gingerbread 2010-09-28 11:27:33 -07:00
Andreas Huber
38ae220bb7 Vorbis files may have more samples encoded that should be used, i.e. we have to trim samples at the end of the stream. This is crucial for proper looping of some audio files.
related-to-bug: 3036592
Change-Id: Ib142b171c829ed74156c0281d9d4543fcc96c802
2010-09-28 11:26:03 -07:00
Jeff Brown
14a288da6a Merge "Add suuport for splitting touch events across windows." into gingerbread 2010-09-27 12:33:14 -07:00
Andreas Huber
c751eccad3 Squashed commit of the following:
commit 29a4d3effb05a2e074cb0693316ab1977baeb0b6
Author: Andreas Huber <andih@google.com>
Date:   Mon Sep 27 12:01:32 2010 -0700

    Fully working implementation of MPEG2TSWriter (for AAC and AVC sources).

    Change-Id: I8a32a47565b647bf6c078c520e39565e08ea0d84

commit f4dec4c3899f3be393508e180d6c07e249d3335e
Author: Andreas Huber <andih@google.com>
Date:   Mon Sep 27 10:36:31 2010 -0700

    More reliable identification of MPEG2 transport streams. Don't keep scanning forever in case the stream does not have both audio and video tracks.

    Change-Id: Icc5b4e8be145b2805e8776559546a6818342aea7

commit 4fe3cc942f9b3d3cf54138b828c41214aa916dd2
Author: Andreas Huber <andih@google.com>
Date:   Mon Sep 27 08:23:39 2010 -0700

    test code

    Change-Id: I16560a17661407d06497f99ff88230724bb898af

commit 64d988b24f49f179a90fa677be11c823959e734b
Author: Andreas Huber <andih@google.com>
Date:   Thu Sep 23 14:42:52 2010 -0700

    First shot at supporting writing to an MPEG2 transport stream.

    Change-Id: Ie537939a99fa3ddc0c7661c47c18277584817c74

Change-Id: If78fd034af8f6e8ceac8dbeff96d5ecb3f6b96dc
2010-09-27 12:04:43 -07:00
Jeff Brown
01ce2e9eee Add suuport for splitting touch events across windows.
This feature is currently used to enable dragging the start and end
selection handles of a TextView at the same time.  Could be used for
other things later.

Deleted some dead code in ArrowKeyMovementMethod and CursorControllers.

Change-Id: I930accd97ca1ca1917aab8a807db2c950fc7b409
2010-09-26 22:20:12 -07:00
Mathias Agopian
beabe75a84 Merge changes I1f7c4535,I741c68a2 into gingerbread
* changes:
  simple test app for screen capture API
  add support for [1974164] Be able to take a screen shot on the device
2010-09-24 18:02:10 -07:00