7635 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Mike Lockwood
aac4184a5a Merge "Revert "PowerManagerService: Enable light sensor debug output"" into ics-mr0 2011-10-27 06:49:12 -07:00
Mathias Agopian
01d650ed42 fix Corrupted graphics while playing You Tube on orientation change
Bug: 5432124
Change-Id: If948b9797b1ec6fff80ca5ea94508abcaced9f31
2011-10-26 15:11:59 -07:00
Dianne Hackborn
c6592d2eb8 am 67a1b7d6: Merge "Fix issue #5508024: Rotation jank seen in live wallpapers" into ics-mr0
* commit '67a1b7d6e5857d0ecdd1aa9d50d10189e5776c11':
  Fix issue #5508024: Rotation jank seen in live wallpapers
2011-10-26 12:22:31 +00:00
Dianne Hackborn
3ec891ae80 Fix issue #5508024: Rotation jank seen in live wallpapers
Fix a few places where we would unfreeze the screen too early.
Now that we are no longer relying on surface flinger freezing, we
can't depend on it keeping the screen frozen until surfaces get
drawn.

Change-Id: Icb03bf30c9599a5e2016817bfa5ca6458adc7249
2011-10-25 14:14:26 -07:00
Ed Heyl
e49cf107e2 merge ics-mr0
Change-Id: I4f0b2bb1b1136c9467e9d55f57f5333153cae65d
2011-10-25 20:47:51 +00:00
satok
1bfe6e95a1 Merge "Fix a bug where surface crashes when the enter animation starts while the exit animation has not yet finished" into ics-mr1 2011-10-25 10:48:23 -07:00
Mike Lockwood
ae92eb3496 Revert "PowerManagerService: Enable light sensor debug output"
This reverts commit 22d12ab14cefa8d9a59e63945f57b4f809849c76.

Bug: 5505809
2011-10-25 10:11:46 -04:00
Mike Lockwood
9dc20214f5 Merge "Reset cached light sensor values when toggling auto-brightness mode" into ics-mr0 2011-10-25 07:02:52 -07:00
Mike Lockwood
141fc9868b Merge "Revert "PowerManagerService: Remove assumption that light sensor will always send a value as soon as it is enabled."" into ics-mr0 2011-10-25 07:02:45 -07:00
Mike Lockwood
2ffe0ad391 Always use fresh NTP time for GPS
This is especially important when AGPS is disabled

Bug: 5355661

Change-Id: I072dbe1ddf43aa24c8fc39b750040504a1633c53
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-10-25 09:47:05 -04:00
Mike Lockwood
320a10ad8c Reset cached light sensor values when toggling auto-brightness mode
Now the screen brightness will readjust to ambient lighting when toggling
auto-brightness on and off in Settings or the Power Widget.

Bug: 5486091

Change-Id: Ic98939fe1c59cb8def0f84266e48ca00329d6b30
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-10-25 09:16:28 -04:00
Mike Lockwood
55174b663b Revert "PowerManagerService: Remove assumption that light sensor will always send a value as soon as it is enabled."
The correct behavior for the light sensor is to immediately report a value
when it is enabled, so this change should not be necessary.

Bug: 5426212

This reverts commit 5dca30affc517879315b3a928c78756cbc9cf689.
2011-10-25 08:34:29 -04:00
satok
cef37fb481 Fix a bug where surface crashes when the enter animation starts while the exit animation has not yet finished
Bug: 5446482
Change-Id: I2e9f2e91ab5e8b22896d12e08fac76c72c997274
2011-10-25 18:05:05 +09:00
Xavier Ducrohet
e869ca9626 CherryPick f9e455 from master to mr0. do not merge.
Fix software GL renderer.

Change-Id: I7273a8e65c23a0032d155ea6572de2923791e411
2011-10-24 13:29:26 -07:00
Robert Greenwalt
49348e77b6 Fix Tethering settings.
Two issues.  A mcc/mnc-driven overlay means that the config at boot may not be
the config we wish to use - the sim card is read later which may switch the
config.  Changed to read the configuration each time rather than once at boot.
Second, the secure-setting override was always trumping the resource config
as we weren't discriminating between a not-set default and a real setting.
This meant the config could never make DUN-required.

bug:5495862
Change-Id: Icd4e90ac1d32bbb704c0ff9cc69e954fb0a0b58c
2011-10-21 17:01:39 -07:00
Xavier Ducrohet
2f4ce2ecd0 Merge "Fix software GL renderer." 2011-10-21 16:22:15 -07:00
Xavier Ducrohet
f9e4551367 Fix software GL renderer.
Change-Id: I07ab2709fa694e41aa3fcc5b9dfc809f55853ab4
2011-10-21 16:18:48 -07:00
Mathias Agopian
9ec98cd134 am aa938c8d: Merge "mDirtyRegion is single threaded, but could be accessed from a hwc thread" into ics-mr0
* commit 'aa938c8d9c0e71c9b556657cb33794210ce6ebf8':
  mDirtyRegion is single threaded, but could be accessed from a hwc thread
2011-10-21 16:00:00 -07:00
Mathias Agopian
6497eabf0e mDirtyRegion is single threaded, but could be accessed from a hwc thread
We now have mInvalidateRegion which holds the region to invalidate, it
can be set from any thread as long as mInvalidateLock is held. We use
fine-grained locking here because mInvalidateRegion can be set from anywhere,
in particular frmo HWC callbacks.

Bug: 5466774
Change-Id: Iafca20aa3f5b25a87755e65bde7b769aa8f997bc
2011-10-21 15:41:01 -07:00
Dianne Hackborn
6ec96ec404 am 943da7b8: Merge "Fix issue #5342788: Setting wallpaper from gallery set default..." into ics-mr0
* commit '943da7b895b7cc69cdaed7979cff422a7dbaac19':
  Fix issue #5342788: Setting wallpaper from gallery set default...
2011-10-21 14:38:31 -07:00
Mike Lockwood
186e21d8fb am 6b6bfb18: Merge "PowerManagerService: Enable light sensor debug output" into ics-mr0
* commit '6b6bfb187412e4845c89d866eff0b87b6d0a5541':
  PowerManagerService: Enable light sensor debug output
2011-10-21 13:59:05 -07:00
Dianne Hackborn
943da7b895 Merge "Fix issue #5342788: Setting wallpaper from gallery set default..." into ics-mr0 2011-10-21 12:45:07 -07:00
Dianne Hackborn
3da318202f Fix issue #5342788: Setting wallpaper from gallery set default...
...wallpaper first time IRK81.

We were monitoring for file creates when those are not needed, and
receiving the initial file create was causing us to be confused.

Change-Id: Iccd3b7492c82895dba87f25c4881c538f300d342
2011-10-21 12:29:10 -07:00
Mike Lockwood
22d12ab14c PowerManagerService: Enable light sensor debug output
Bug: 5426212

Change-Id: I46ca01eee8d69f7bd6fc63e53506ba42c3fe537d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-10-21 09:05:05 -04:00
satok
48019c65ed am 2cf1cf09: Fix possible NPE
* commit '2cf1cf098513807ffd3420ae106f438e943d0cd8':
  Fix possible NPE
2011-10-20 23:35:27 -07:00
satok
2cf1cf0985 Fix possible NPE
Bug: 5494803
Change-Id: I6f9d0076405ab7c99076a1168198c2ee70ad5082
2011-10-21 15:25:23 +09:00
Mathias Agopian
10b4503f2b am 16bece04: Merge "added dpi and refresh rate info in SF\'s dumpsys" into ics-mr0
* commit '16bece04bdbac9af5228436f70267ec5763315de':
  added dpi and refresh rate info in SF's dumpsys
2011-10-20 17:48:02 -07:00