7619 Commits

Author SHA1 Message Date
Eric Laurent
19ddf0ebb0 AudioFlinger: mix track only when really ready
The addition of low power audio playback mode made that audio buffer consumption
by audio HAL can now happen in bursts. This makes that requesting audio data
from an AudioTrack for mixing can happen at much shorter intervals than before.
This revealed an existing problem where AudioFlinger would consider a track ready
for mixing although not enough frames were ready to completely fill one output buffer,
thus creating short periods of silence.

The fix consists in waiting for enough frames to be ready in AudioTrack buffer before
declaring a track ready for mixing. This minimum is not applied when the track is stopped
to allow the buffer to be emptied completely.

Change-Id: I6d04f9b65db5af85b0b53f0a5674be7ec02f9e9f
2011-11-03 12:16:05 -07:00
Jeff Sharkey
f55ce39224 am 3f9ce4c2: Merge "Verify AppWidget ownership during update." into ics-mr1
* commit '3f9ce4c22ae9b4f0f2208c29f8c93d6ad652a1dc':
  Verify AppWidget ownership during update.
2011-11-03 18:49:05 +00:00
Jeff Sharkey
3f9ce4c22a Merge "Verify AppWidget ownership during update." into ics-mr1 2011-11-03 11:43:52 -07:00
Jeff Sharkey
933decaa5e Verify AppWidget ownership during update.
Bug: 5563081
Change-Id: I528ec944d404989bb21b32ef01feb3d35e23d3ad
2011-11-03 11:26:11 -07:00
Jeff Sharkey
4d81191dd3 am 808ee95d: Merge "Correct proc file reader, optimizations." into ics-mr1
* commit '808ee95dd4244da6ae767d3ddd003ed7b48937d0':
  Correct proc file reader, optimizations.
2011-11-03 07:36:03 +00:00
Jeff Sharkey
808ee95dd4 Merge "Correct proc file reader, optimizations." into ics-mr1 2011-11-03 00:32:22 -07:00
Dianne Hackborn
92049f1d3e am 17bd9a22: Merge "More performance work:" into ics-mr1
* commit '17bd9a22ec993fc9eba060950bc5cecd1e06ffb1':
  More performance work:
2011-11-03 05:35:21 +00:00
Dianne Hackborn
17bd9a22ec Merge "More performance work:" into ics-mr1 2011-11-02 22:31:19 -07:00
Dianne Hackborn
28695e0c70 More performance work:
- ActivityManager now keeps track of previous app as you
  move across the home app.
- Better debug info about why an activity is being destroyed.
- New performance tests.

Change-Id: I3a5ae7cb1b9f1624c6792a4f6184353f532b8f3b
2011-11-02 22:08:41 -07:00
Jeff Sharkey
163e6443f2 Correct proc file reader, optimizations.
Moved away from BufferedReader, which only reads the first 8KB of
some proc files because it aggresively fills its buffer.  Optimized
proc parsing, now double the speed.  Tests to cover.

Log when NetworkStats counters roll backwards when subtracting, and
optimizations around findIndex().  When system removes UID, also
remove from last stats snapshot to avoid xt counters from rolling
backwards.

Bug: 5472949, 5458380
Change-Id: I07c08fe5233156fac2b84450f6291868bf9bfaf2
2011-11-02 15:14:11 -07:00
Robert Greenwalt
45ded48621 am 4a113251: am 451fa13e: Merge "Ignore errors when untethering" into ics-mr0
* commit '4a113251078ad028d1a071ebf5562185275c7039':
  Ignore errors when untethering
2011-11-02 21:32:26 +00:00
Robert Greenwalt
4a11325107 am 451fa13e: Merge "Ignore errors when untethering" into ics-mr0
* commit '451fa13e82ea1226895b41282fdb33bf9fea5d19':
  Ignore errors when untethering
2011-11-02 21:28:33 +00:00
Robert Greenwalt
451fa13e82 Merge "Ignore errors when untethering" into ics-mr0 2011-11-02 14:26:45 -07:00
Robert Greenwalt
731026c2df Ignore errors when untethering
Sometimes the interface is removed before we can untether leading to
errors when cleanup up various rules (iptables).  Do as much as we can
and then let a re-tether result in error if needed.

bug:5536516
Change-Id: Ib1d064ecc8e9022566f9b0e4678b33144906971c
2011-11-02 13:53:28 -07:00
Jeff Sharkey
1a9fedf497 am 9427d688: am db0ab2e7: Merge "Process AMS events in NetworkPolicy handler." into ics-mr0
* commit '9427d688bda2d5b177112a58dcfdbcdfdfe98559':
  Process AMS events in NetworkPolicy handler.
2011-11-02 17:50:25 +00:00
Dianne Hackborn
8f3818c71c am 39cec406: Merge "Add new OOM adjustment for the "previous" process." into ics-mr1
* commit '39cec40697ab3d1d106e0c0c21458b2085c96f00':
  Add new OOM adjustment for the "previous" process.
2011-11-02 17:50:23 +00:00
Dima Zavin
17e25155c0 am a9656df5: am f0ad147f: Merge "BatteryService(jni): properly handle read\'s return value" into ics-mr0
* commit 'a9656df58f75946f3eab4dd660df56c9d878a04e':
  BatteryService(jni): properly handle read's return value
2011-11-02 17:31:47 +00:00
Dianne Hackborn
9e9a64e875 am f136aa34: Merge "Various performance and other work." into ics-mr1
* commit 'f136aa341abaaf7fd6f7632d41a30b2989d93985':
  Various performance and other work.
2011-11-02 17:30:26 +00:00
satok
219e2c7821 am ff93e417: Merge "Resolve memory leak in TextServicesManagerService" into ics-mr1
* commit 'ff93e417a217703a635d8601b835853e07233afd':
  Resolve memory leak in TextServicesManagerService
2011-11-02 17:29:35 +00:00
Jeff Sharkey
9427d688bd am db0ab2e7: Merge "Process AMS events in NetworkPolicy handler." into ics-mr0
* commit 'db0ab2e731d755f64583c5704fa406bc0e7a2af4':
  Process AMS events in NetworkPolicy handler.
2011-11-02 04:16:13 +00:00
Jeff Sharkey
6f7af03cf1 Process AMS events in NetworkPolicy handler.
When a process changes foreground status or dies, NetworkPolicy
updates its internal state with a lock held.  In cases where there
is contention, this can block the AMS handler and prevent other
events, such as broadcasts, from being dispatched.

This change moves the incoming AMS events to an existing internal
NetworkPolicy handler thread, where they can execute without
blocking AMS.

Bug: 5497544
Change-Id: Ie0c620a620fd9f0f4eb02af510bd819efa4deb6a
2011-11-01 19:37:34 -07:00
Dianne Hackborn
f35fe23669 Add new OOM adjustment for the "previous" process.
This is the process that you had previously been interacting with
in the UI before the current one.  Treating it specially should
allow us to improve the scenario of switching back and forth
between two apps.

Also add API constent for ICS MR1.

Change-Id: Ib3fe4df36b270be11dfd6b7e8d107c9994058a4d
2011-11-01 19:25:20 -07:00
Mathias Agopian
f61acdac57 fix an issue where SensorService could request an invalid sensor delay
When the app requests "fastest", the java layer encodes this as a
delay of 0. SensorService was passing this unchanged to the HAL.
However the HAL is required to reject delays lower that the
advertised lower delay.

Change-Id: I92be77acd3af62ffeb49e4b31e24ddcd203510e2
2011-11-01 19:09:41 -07:00
Dima Zavin
a9656df58f am f0ad147f: Merge "BatteryService(jni): properly handle read\'s return value" into ics-mr0
* commit 'f0ad147fc33cf55cd9427010b2cdb3eb89b9eec3':
  BatteryService(jni): properly handle read's return value
2011-11-01 22:32:06 +00:00
Dianne Hackborn
f136aa341a Merge "Various performance and other work." into ics-mr1 2011-11-01 10:42:54 -07:00
Dianne Hackborn
2c84cfc001 Various performance and other work.
- IME service now switches between visible and perceptible depending on
  whether it is being showm, allowing us to more aggressively free its
  memory when not shown.

- The activity display time is no longer delayed by the activity
  transition animation.

- New -R (repeat) option for launching activities with the am command.

- Improved some documentation on Loader to be clear about some methods
  that apps should not normally call.

- FrameworkPerf test now allows you to select individual tests to run.

Change-Id: Id1f73de66dc93d63212183958a72119ad174318b
2011-10-31 16:52:34 -07:00
satok
266d9ad1f8 am f0fd595f: Merge "Hide ime switcher when the screen is turned off." into ics-mr1
* commit 'f0fd595f0f3203fb81cb39a367b2a06647db907d':
  Hide ime switcher when the screen is turned off.
2011-10-31 12:26:21 +00:00
Dianne Hackborn
f82621dc3c am e02c88af: Work on process management.
* commit 'e02c88af7935c72fb90a478375e61e4a94465587':
  Work on process management.
2011-10-31 12:26:15 +00:00
satok
2520ed8cc3 Resolve memory leak in TextServicesManagerService
Bug: 5499490
Change-Id: I3537b0d733a53d4783902a545cd9ecc7e4c2eac1
2011-10-31 19:38:05 +09:00
Dima Zavin
98e044a609 BatteryService(jni): properly handle read's return value
Change-Id: I10f5cf3728424e7f5a0c1b460049102fd00a6246
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-28 23:15:11 -07:00
satok
f0fd595f0f Merge "Hide ime switcher when the screen is turned off." into ics-mr1 2011-10-28 18:25:28 -07:00
Dianne Hackborn
e02c88af79 Work on process management.
Introduce a new concept of "B" services.  All running services are
classified as either A or B.  B services are later in the LRU list.
Their oom_adj is after the home app.  This allows us to better pick
services to kill based on how long they have running, and should
reduce the amount that we end up killing the home app.

This temporarly turns on a debug log when the oom_adj of a process
is changed.  Sorry, I know it is noisy.  This is needed to try to
track down why some processes are being killed.

Also add a flag to the SyncManager's service binding to allow the
syncing process to be more aggressively killed if it has done UI.
This is to address cases we have seen where sync is causing an 80MB
gmail process to be kept around, preventing other process from running.
Now what will happen is that the syncing process will aggressively be
killed by the system, and can then be restarted in a much lighter-weight
state.

Do a little tweak in the power manager to allow us to still do smooth
brightness changes even when the fancy TV off animation is in use.

And get rid of a debug log in the window manager that was accidentally
left in.

Change-Id: I64a8eeaaa1f096bab29c665fbff804c7f1d029e2
2011-10-28 17:15:08 -07:00
Chet Haase
59d04a0ce4 am d568bba5: Merge "Optimize handling of scrolled wallpapers" into ics-mr1
* commit 'd568bba507b0f66d4d57c67b08ade894d2c75e53':
  Optimize handling of scrolled wallpapers
2011-10-28 22:44:16 +00:00
Jeff Sharkey
195ffd3a13 am cc16024f: Merge "Differentiate between system_server and unknown." into ics-mr1
* commit 'cc16024f101c0fca211fcd069b3917becf7a3c00':
  Differentiate between system_server and unknown.
2011-10-28 22:27:38 +00:00
Chet Haase
d568bba507 Merge "Optimize handling of scrolled wallpapers" into ics-mr1 2011-10-28 15:13:27 -07:00
Chet Haase
a8e5a2bcd6 Optimize handling of scrolled wallpapers
Swiping the home screen causes the WindowManagerService to do
a bunch of work to keep the wallpapers in sync. First, it lays out
and places all windows. Also, it notifies the SystemUI process that
the wallpaper position has changed.

The layout/place operation is too much work - we only need to set
the position values for the wallpaper, not relayout the whole system.

The notification mechanism must exist, but should be optional. Most
wallpapers don't care (especially static ImageWallpapers). So we'll
give them a new API (WallpaperService.Engine.setWantsOffsets()) to
allow wallpapers to opt out of this process and avoid the performance
overhead.

Change-Id: I66c38375438937f14f6f5550565b28eb204b1e06
2011-10-28 14:49:23 -07:00
Jeff Sharkey
cc16024f10 Merge "Differentiate between system_server and unknown." into ics-mr1 2011-10-28 12:24:44 -07:00
Jeff Sharkey
a353d2654a Differentiate between system_server and unknown.
Bug: 5531966
Change-Id: I2b64b04f3f5a8760a2314729e8b90e9dd6699cb4
2011-10-28 11:13:27 -07:00
Glenn Kasten
c29982ce93 Bug 5522189 temporary workaround
Change-Id: I21d91d7a24df7bb6e7fc3d0fbc4786d55391fc0e
2011-10-28 10:26:17 -07:00
satok
15452a487a Hide ime switcher when the screen is turned off.
Bug: 5481999
Change-Id: Ifc870f1350db2a67405c05f6de447a69dc050408
2011-10-28 19:42:58 +09:00
Robert Greenwalt
258f52fed3 am 859bf0f2: am 81433a38: Merge "Temp disable Tethering if DUN is required" into ics-mr0
* commit '859bf0f2efb7b5518055893c17aa3a6437023633':
  Temp disable Tethering if DUN is required
2011-10-28 02:53:18 +00:00
Robert Greenwalt
859bf0f2ef am 81433a38: Merge "Temp disable Tethering if DUN is required" into ics-mr0
* commit '81433a38784e64dbc155047a3915cf5eff32840b':
  Temp disable Tethering if DUN is required
2011-10-28 02:13:59 +00:00
Mathias Agopian
5f7a00551d am 7165b92e: Merge "fix Corrupted graphics while playing You Tube on orientation change" into ics-mr1
* commit '7165b92e71bc6a1a741a53dc7968af88e7958f39':
  fix Corrupted graphics while playing You Tube on orientation change
2011-10-27 22:41:29 +00:00
Mathias Agopian
7165b92e71 Merge "fix Corrupted graphics while playing You Tube on orientation change" into ics-mr1 2011-10-27 15:37:33 -07:00
Robert Greenwalt
7962d2f129 am 52201ae5: am 8d059ac5: Merge "Fix Tethering settings." into ics-mr0
* commit '52201ae5421b1efed2568109f3fc37462fdb7c35':
  Fix Tethering settings.
2011-10-27 21:54:09 +00:00
Robert Greenwalt
4efe58d8e7 Temp disable Tethering if DUN is required
Getting source-based routing working is too risk for this point
in the project but tethering is broken otherwise, so disable
the tethering option if DUN is required until we can get a real
fix in.

bug:5495862
Change-Id: I5e852bf30c887599024a8b61af86ffec1d5333af
2011-10-27 14:50:27 -07:00
Robert Greenwalt
52201ae542 am 8d059ac5: Merge "Fix Tethering settings." into ics-mr0
* commit '8d059ac5b186547a86bb92678c7d1cb13fd8ce1c':
  Fix Tethering settings.
2011-10-27 21:46:35 +00:00
Robert Greenwalt
8d059ac5b1 Merge "Fix Tethering settings." into ics-mr0 2011-10-27 13:20:15 -07:00
Mike Lockwood
b453daf952 am d085df31: am aac4184a: Merge "Revert "PowerManagerService: Enable light sensor debug output"" into ics-mr0
* commit 'd085df318afc8b3485afdd81106ce93a13265ebb':
  Revert "PowerManagerService: Enable light sensor debug output"
2011-10-27 13:55:07 +00:00
Mike Lockwood
d085df318a am aac4184a: Merge "Revert "PowerManagerService: Enable light sensor debug output"" into ics-mr0
* commit 'aac4184a5a0ab969140a11e1ef258fcb4cba07a9':
  Revert "PowerManagerService: Enable light sensor debug output"
2011-10-27 13:51:04 +00:00