8292 Commits

Author SHA1 Message Date
Glenn Kasten
882c0a20c5 Use audio_in_acoustics_t consistently
Change-Id: I0a9dd668fb2e57b1c3ece3190588194974b99062
2012-01-27 13:31:54 -08:00
Glenn Kasten
c14639a9a1 Merge "Use audio_source_t consistently" 2012-01-27 09:06:00 -08:00
Glenn Kasten
c1f63ddba7 Merge "AudioStreamIn and AudioStreamOut" 2012-01-27 07:22:30 -08:00
Glenn Kasten
6562dadf3c Merge "Declare methods in binder opcode order" 2012-01-27 07:19:53 -08:00
Glenn Kasten
591993f162 Merge "Use enum effect_state consistently" 2012-01-27 07:19:10 -08:00
Glenn Kasten
86012869b8 Merge "Use enum track_state consistently" 2012-01-27 07:18:23 -08:00
Glenn Kasten
0f0fbd9441 Use audio_source_t consistently
Was a mix of audio_source_t, uint8_t, and int.

Related fixes:
 - fix comments in MediaRecorder.java
 - AudioPolicyService server side was not checking source parameter at
   all, so if the client wrapper was bypassed, invalid values could be
   passed into audio HAL
 - JNI android_media_AudioRecord_setup was checking source for positive
   values, but not negative values. This test is redundant, since already
   checked at Java and now checked by AudioPolicyService also, but might
   as well make it correct.

Change-Id: Ie5e25d646dcd59a86d7985aa46cfcb4a1ba64a4a
2012-01-26 16:50:19 -08:00
Glenn Kasten
5b0135e41b AudioStreamIn and AudioStreamOut
These are immutable, so make the fields const.
getOutput() and getInput() methods are now const.

Change-Id: I128246ebd56ea50b3e542be43f2aa1bcb55f1373
2012-01-26 15:58:07 -08:00
Glenn Kasten
efd511a925 Cleanup thread types
Use type_t instead of int for thread types.
Initialize ThreadBase::mType in constructor and make it const.

Change-Id: I43d141388b9639e4783c30b97dbda5688bf7555f
2012-01-26 15:45:12 -08:00
Glenn Kasten
0ae4d97689 Declare methods in binder opcode order
This makes it easier to compare interface and implementation.

Change-Id: Ie060e43dec348902abcf40f5a610cec639d6d0d3
2012-01-26 14:34:30 -08:00
Glenn Kasten
789fef1f83 Use enum mixer_state consistently
Change-Id: I5b71ed20f939dfc4b98143334b7aa064d282f584
2012-01-26 14:23:47 -08:00
Glenn Kasten
452d6d6efe Use enum effect_state consistently
Also fix indentation

Change-Id: I393ef9e37ffceed5ad4a78df439726ae1fe139df
2012-01-26 14:20:34 -08:00
Glenn Kasten
563562032d Use enum track_state consistently
Change-Id: Ie5ebb7befa092e1de1e4df9c6e2d51e6bcfd176a
2012-01-26 14:13:43 -08:00
Wink Saville
b675f516da Merge "Add additional debug" 2012-01-25 14:04:59 -08:00
Wink Saville
c7d7eafb66 Add additional debug
When ConnectivityService#startUsingNetworkFeature is called and the
special network is not available output some additional information.

Change-Id: I34b226a208596fa6418f1f37a0feec1d274d493c
2012-01-25 13:47:54 -08:00
Robert Greenwalt
1095335191 am 44f64c96: Merge "Filter our v6 address from tethering dns." into ics-mr1
* commit '44f64c965776ae65ff85ef8c37afb7e14483bdf2':
  Filter our v6 address from tethering dns.
2012-01-25 11:30:39 -08:00
Eric Laurent
172870f37d am 535b0264: am 7eeaf3f0: Merge "AudioFlinger: refine mixer sleep time logic" into ics-mr1
* commit '535b0264a4cfa790e549bd9cd09980788f1375f4':
  AudioFlinger: refine mixer sleep time logic
2012-01-25 08:57:23 -08:00
Mathias Agopian
1d99795d73 improve SurfaceFlinger dumpsys
It is now possible to say:

dumpsys SurfaceFlinger --latency

to print latency information about all windows

dumpsys SurfaceFlinger --latency window-name

to print the latency stats of the specified window

for instance: dumpsys SurfaceFlinger --latency SurfaceView

The data consists of one line containing global stats, followed by
128 lines of tab separated timestamps in nanosecond.

The first line currently contains the refresh period in nanosecond.
Each 128 following line contains 3 timestamps, of respectively
the app draw time, the vsync timestamp just prior the call to set and
the timestamp of the call to set.

Change-Id: Ib6b6da1d7e2e6ba49c282bdbc0b56a7dc203343a
2012-01-24 18:22:56 -08:00
Robert Greenwalt
03d58bc656 Filter our v6 address from tethering dns.
Don't support IPv6 yet, and the tools crash when they see one, so
filter them out.

bug:5913888
Change-Id: Id7096aa70da4e3cc8e4702b0b489c0228a100db9
2012-01-24 16:44:50 -08:00
Jamie Gennis
b335fad470 hack up frame latency measurement
Change-Id: I6d9a466a23285304f0e229a5649815636ab5d6af
2012-01-24 15:41:50 -08:00
Eric Laurent
535b0264a4 am 7eeaf3f0: Merge "AudioFlinger: refine mixer sleep time logic" into ics-mr1
* commit '7eeaf3f07aa6fb10639d9f96c1367eb98c3e8839':
  AudioFlinger: refine mixer sleep time logic
2012-01-24 11:51:50 -08:00
Eric Laurent
dd347d515d am 41773d46: Merge "DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""" into ics-mr1
* commit '41773d46556aa47d4322ff89fdaf7d1345c2d1f2':
  DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""
2012-01-24 11:51:47 -08:00
Jeff Sharkey
629c6765ca Merge "Move network stats to FileRotator pattern." 2012-01-24 11:49:51 -08:00
Eric Laurent
7eeaf3f07a Merge "AudioFlinger: refine mixer sleep time logic" into ics-mr1 2012-01-24 11:49:39 -08:00
Eric Laurent
41773d4655 Merge "DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""" into ics-mr1 2012-01-24 11:49:16 -08:00
Robert Greenwalt
67cda1a0ec am f449ea9e: Merge "Use the carrier-given dns addrs for tethering." into ics-mr1
* commit 'f449ea9e96162698f4ec6d62c70750eb50744da7':
  Use the carrier-given dns addrs for tethering.
2012-01-24 11:42:21 -08:00
Robert Greenwalt
f449ea9e96 Merge "Use the carrier-given dns addrs for tethering." into ics-mr1 2012-01-24 11:40:19 -08:00
Dianne Hackborn
08cec4ee46 am a5853595: am 47163685: Merge "Another attempt at issue #5823276: home repaints after full-screen app is exited" into ics-mr1
* commit 'a5853595165a6395ca41bbc17a3dd88e12259ad1':
  Another attempt at issue #5823276: home repaints after full-screen app is exited
2012-01-24 11:39:49 -08:00
Dianne Hackborn
a585359516 am 47163685: Merge "Another attempt at issue #5823276: home repaints after full-screen app is exited" into ics-mr1
* commit '47163685eb90f9520e7ae0ac0984b4e1535e8e5b':
  Another attempt at issue #5823276: home repaints after full-screen app is exited
2012-01-24 11:37:02 -08:00
Dianne Hackborn
47163685eb Merge "Another attempt at issue #5823276: home repaints after full-screen app is exited" into ics-mr1 2012-01-24 11:33:15 -08:00
Jeff Sharkey
63abc37356 Move network stats to FileRotator pattern.
Split existing network stats into two separate classes: a recorder
which generates historical data based on periodic counter snapshots,
and a collection of historical data with persistance logic.

Recorder keeps a pending history in memory until outstanding data
crosses a specific threshold.  Persisting is handled through a given
FileRotator.  This pattern significantly reduces disk churn and
memory overhead.  Separate UID data from UID tag data, enabling a
shorter rotation cycle.  Migrate existing stats into new structure.

Remove "xt" stats until iptables hooks are ready.  Avoid consuming
Entry values when recording into NetworkStatsHistory.  Assign
operation counts to default route interface.

Introduce "Rewriter" interface in FileRotator with methods to enable
rewriteAll().  Introduce IndentingPrintWriter to handle indenting in
dump() methods.

Bug: 5386531
Change-Id: Ibe086230a17999a197206ca62d45f266225fdff1
2012-01-24 11:13:14 -08:00
Svetoslav Ganov
79311c4af8 Speedup the accessibility window querying APIs and clean up.
1. Now when an interrogating client requires an AccessibilibtyNodeInfo
   we aggressively prefetch all the predecessors of that node and its
   descendants. The number of fetched nodes in one call is limited to
   keep the APIs responsive. The prefetched nodes infos are cached in
   the client process. The node info cache is invalidated partially or
   completely based on the fired accessibility events. For example,
   TYPE_WINDOW_STATE_CHANGED event clears the cache while
   TYPE_VIEW_FOCUSED removed the focused node from the cache, etc.
   Note that the cache is only for the currently active window.
   The ViewRootImple also keeps track of only the ids of the node
   infos it has sent to each querying process to avoid duplicating
   work. Usually only one process will query the screen content
   but we support the general case. Also all the caches are
   automatically invalidated so not additional bookkeeping is
   required. This simple strategy leads to 10X improving the
   speed of the querying APIs.

2. The Monkey and UI test automation framework  were registering a
   raw event listener for accessibility events and hence perform
   connection and cache management in similar way to an AccessibilityService.
   This is fragile and requires the implementer to know internal framework
   stuff. Now the functionality required by the Monkey and the UI automation
   is encapsulated in a new UiTestAutomationBridge class. To enable this
   was requited some refactoring of AccessibilityService.

3. Removed the *doSomethiong*InActiveWindow methods from the
   AccessibilityInteractionClient and the AccessibilityInteractionConnection.
   The function of these methods is implemented by the not *InActiveWindow
   version while passing appropriate constants.

4. Updated the internal window Querying tests to use the new
   UiTestAutomationBridge.

5. If the ViewRootImple was not initialized the querying APIs of
   the IAccessibilityInteractionConnection implementation were
   returning immediately without calling the callback with null.
   This was causing the client side to wait until it times out. Now
   the client is notified as soon as the call fails.

6. Added a check to guarantee that Views with AccessibilityNodeProvider
   do not have children.

bug:5879530

Change-Id: I3ee43718748fec6e570992c7073c8f6f1fc269b3
2012-01-23 20:13:58 -08:00
Dianne Hackborn
b7ff51bde9 Another attempt at issue #5823276: home repaints after full-screen app is exited
This is between the two previous attempts.  I returned the part from the
original that was breaking gallery, but have some new code to detect when
something about the window params has changed that would require a
layout pass to make sure we still do a layout then, even if the window is
not currently visible.

Change-Id: I07745e1f66022583e3076b84cc8bbe8bd2acd48f
2012-01-23 19:15:27 -08:00
Eric Laurent
0609231f4f AudioFlinger: refine mixer sleep time logic
When an AudioTrack is in underrun state, the AudioFlinger mixer will
sleep for a short period of time to give the app a chance to fill the
AudioTrack buffer. If the AudioTrack is still not ready during next mixing round,
the mixer will proceed with other tracks.

If an application keeps a steady underrun condition, the AudioFlinger mixer will
alternate between ready and not ready states. In the longer term this will cause the
audio HAL to underrun.
There is a mechanism to reduce the sleep period if the mixer is not ready several times in a
row but this mechanism is defeated by the alternating ready/not ready conditions.

The fix consists in only increasing sleep time if the mixer is ready for at least two
consecutive times.

Issue 5904527.

Change-Id: Id0139bca9be8c4e425ec6d428515c4d8f718e8c9
2012-01-23 18:56:59 -08:00
Eric Laurent
0b08965558 DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""
This reverts commit b918035d34422a2041b6ec8c09c566bb93345b40.

Change-Id: I093bcfa56ad54a080b930208b6b79169d33581fb
2012-01-23 18:37:07 -08:00
Jim Miller
eda775cc89 am 9f080e2a: am 44760b10: Merge "Revert "Fix 5797764: Increase lock screen\'s thread priority"" into ics-mr1
* commit '9f080e2a5bc6a268934e32201c69ea8a86900396':
  Revert "Fix 5797764: Increase lock screen's thread priority"
2012-01-23 15:53:17 -08:00
Jim Miller
9f080e2a5b am 44760b10: Merge "Revert "Fix 5797764: Increase lock screen\'s thread priority"" into ics-mr1
* commit '44760b106a4bafcf83fb356bf91683db40e0e5a2':
  Revert "Fix 5797764: Increase lock screen's thread priority"
2012-01-23 15:51:23 -08:00
Jim Miller
44760b106a Merge "Revert "Fix 5797764: Increase lock screen's thread priority"" into ics-mr1 2012-01-23 15:49:32 -08:00
Jim Miller
54dbbce1c3 Revert "Fix 5797764: Increase lock screen's thread priority"
This reverts commit 6d6a70a33746ef5147ab146f1802f0db424dd2f1

This doesn't appear to have a measurable impact for this issue.
2012-01-23 15:24:42 -08:00
Justin Ho
feb1d988c8 am fee5a860: Merge "DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"" into ics-mr1
* commit 'fee5a860a8355cda071ff23644e943414ba7f65d':
  DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"
2012-01-23 15:13:19 -08:00
Justin Ho
b918035d34 DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"
This reverts commit 71c4496a9757438afd30b4404824f296f6158a49.

Change-Id: Iff10c49ea728bb10023ddeb50a3b708db770fff2
2012-01-23 15:02:41 -08:00
Dianne Hackborn
fd1c5ed370 New screen rotation animation design.
We now have an animation that can start as soon as we detect to
rotate the screen, and have a different phase once the new UI
is ready to complete the transition into it.

Change-Id: I05b9c12a699232acbddc36b4a994a4452db71476
2012-01-23 12:52:43 -08:00
Dianne Hackborn
d9ea468d6a New brightness setting to adjust auto-brightness mode.
Change-Id: Icfec22be99d8c79e9ff5720b80fb9dacbba36134
2012-01-23 12:01:00 -08:00
Robert Greenwalt
7df80fa4e8 Use the carrier-given dns addrs for tethering.
This fixes a complaint from carriers (that we used 8.8.8.8), but also
fixes the case where there is only room for one live radio
connection: the secondary connection (tethering) doesn't have a
default route to prevent on-device traffic from slipping out on the
tethering connection, but tethered dns is proxied through dnsmasq, so
it is appearing as on-device traffic and is unroutable.  By switching
to the carrier-indicated dns servers we can use the host-routes
already set for those and kill two bugs with one fix.

bug:5898904
Change-Id: Ida8777687994f353b2d4f2c7db5d6ea4b6ac3882
2012-01-23 11:29:37 -08:00
Andy McFadden
30f1312b3c Merge "Use Map.Entry, not HashMap.Entry" 2012-01-23 09:34:17 -08:00
Jim Miller
8ffd2cccf0 am b1c7785c: am eaa11a72: Merge "Fix 5797764: Increase lock screen\'s thread priority" into ics-mr1
* commit 'b1c7785c1110e171d3dd3deb259b1caeed0b9da6':
  Fix 5797764: Increase lock screen's thread priority
2012-01-23 09:18:36 -08:00
Dianne Hackborn
02d37b9731 resolved conflicts for merge of 892d11f4 to master
Change-Id: I21eca0002100d898e167a25aaa46d896deca2a11
2012-01-20 18:42:07 -08:00
Christopher Tate
65f87ec733 Merge "Fix shared-storage full backup" 2012-01-20 17:59:06 -08:00
Christopher Tate
73d7369e0f Fix shared-storage full backup
The special shared-storage step was mistakenly writing its data directly
to the USB output pipe rather than to the proper stacked data handling
chain that applies compression and encryption.  Fix this by getting rid
of the custom handling of the shared-storage data, instead folding it
into the normal data handling flow [with a small amount of additional
management because e.g. it doesn't need a "manifest" pseudofile in the
archive stream].

Fixes bug 5897791

Change-Id: I3995b07963334d2f8cce49b247c87d3d3ff93bed
2012-01-20 17:41:41 -08:00
Glenn Kasten
0f73d75da0 Merge "Remove AudioFlinger dependencies on client" 2012-01-20 17:16:36 -08:00