7004 Commits

Author SHA1 Message Date
Dianne Hackborn
e8c88e6f76 Fix issue #5163456: logspam/tight loop in BatteryStatsImpl
No longer use the old history code.

Change-Id: I878ffe16e0014453c46db6a4f7228a81468d8cb9
2011-08-17 19:09:23 -07:00
Jamie Gennis
9b8fc65b03 SurfaceTexture: fix queues-to-composer
This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of
Surface and SurfaceTextureClient.  Surface now uses the inherited
SurfaceTextureClient implementation of this query.  SurfaceTextureClient
now queries SurfaceFlinger to determine whether buffers that are queued
to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to
some other process).

Change-Id: Iff187e72f30d454229f07f896b438198978270a8
2011-08-17 18:19:00 -07:00
Kenny Root
07714d41e5 Default disable watchdog for vold connection
cryptfs has long-running operations that cause the Watchdog to fire
reliably when encrypting the filesystem. Disable Watchdog on
MountService for this reason.

Change-Id: Id03f5f60c704dcd74a8696ad9f32b5fba5381731
2011-08-17 17:49:30 -07:00
Jeff Sharkey
3a844fcf5a Background data notification, API clean up.
When restricting background data, show ongoing notification to give
easy access to re-enable. Deprecate getBackgroundDataSetting() API
to always return true, since NetworkInfo.isConnected() is new source
of truth. Handle upgrade path by reading from existing secure value,
and kick one last broadcast when changing value. Remove background
data code from ConnectivityService.

Remove warning alerts, since they push ifaces into restricted list;
should only happen when iface has limit.

Bug: 5163559, 5129421
Change-Id: I0064d9d643656a4d32aaae51d4a58bce49fe295f
2011-08-17 14:12:42 -07:00
Adam Cohen
842d9de74f Merge "Getting rid of the (hidden) oldName parameter for widgets" 2011-08-17 11:39:32 -07:00
Adam Cohen
bac26a1205 Getting rid of the (hidden) oldName parameter for widgets
Change-Id: I191cf64ed045fd7cb53e106f337cbeab5a914336
2011-08-17 11:37:58 -07:00
Mathias Agopian
21fb6343ce Merge "as a debug option SrufaceFlinger can now connect to DDMS" 2011-08-17 09:58:33 -07:00
Dianne Hackborn
e518be3085 am 51beb81a: am ee93fd5c: am 7a0d746b: am baaf3ce6: Merge "Handle stopping of services with still bound applications."
* commit '51beb81a8e901020293b7a30a68b405bca71d258':
  Handle stopping of services with still bound applications.
2011-08-16 20:47:39 -07:00
Dianne Hackborn
51beb81a8e am ee93fd5c: am 7a0d746b: am baaf3ce6: Merge "Handle stopping of services with still bound applications."
* commit 'ee93fd5c0d7b0296fca17363ec00dc2ee63a0841':
  Handle stopping of services with still bound applications.
2011-08-16 20:45:19 -07:00
Dianne Hackborn
baaf3ce638 Merge "Handle stopping of services with still bound applications." 2011-08-16 19:29:25 -07:00
Christopher Tate
755bd67a50 Merge "Don't crash if a drag recipient throws an uncaught exception" 2011-08-16 17:03:24 -07:00
Christopher Tate
d9be36c897 Don't crash if a drag recipient throws an uncaught exception
There turn out to be two distinct bugs leading to runtime restarts.

The first, dating from at least Android 3.1, is that following certain kinds
of app crashes we properly clean up the drag-state bookkeeping, but aren't
prepared in the case of the drag-target timeout clock firing with a now-
null drag state in effect.  We now catch that edge condition and don't NPE
(and note that there was already similar code around the separate timeout
when an app is *starting* the drag process).

The second bug is that some new-in-ICS code in the input channel management
wasn't prepared for certain cases where the current touch window could have
become unusable and its input channel torn down summarily in the case of the
aforesaid app crash during drag.  The code now makes sure that there really
is an input channel that needs to be flushed / cancelled prior to attempting
that operation.

Fixes bug 5173534

Change-Id: Idaae158ecfb4b93456ab1425769b669962893c00
2011-08-16 16:09:33 -07:00
repo sync
4a56c437b6 Merge "P2p enhancements" 2011-08-16 14:50:56 -07:00
Chia-chi Yeh
1db7f7940e Merge "VPN: reset legacy VPN when resetting IPv4 addresses." 2011-08-16 14:25:30 -07:00
Mike Lockwood
fadd2b8e0f UsbManager: Use resource IDs for notification IDs
to avoid ID collisions with other system services.

Bug: 5161005

Change-Id: I069fbc40a8764bc85cceeacd04264abd32b62668
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-16 13:45:51 -07:00
Mike Lockwood
e81740442f dumpsys: fix problems with -a option in battery and batteryinfo services
Now the dumpsys battery output will show up in bugreports again.

Change-Id: Id36e87d27e9d3c06dcc17671c81aa1d3fe260d1e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-16 12:53:43 -07:00
Chia-chi Yeh
0c074e6843 VPN: reset legacy VPN when resetting IPv4 addresses.
Currently legacy VPN only works on IPv4, and it should always
turn down when the addresses are changed. It assumed that the
interface will be brought down and up, so the event can be
detected via interfaceStatusChanged(). However, the assumption
was incorrect and the event is actually driver-dependent. To
fix this issue, ConnectivityService now tells VPN that the
interface is down when resetting IPv4 addresses.

Change-Id: I76d15e56552d86635c5b274ca980be5da905a6fb
2011-08-16 10:08:33 -07:00
Robert Greenwalt
8e99d18334 Merge "Flush central DNS cache when things change." 2011-08-16 09:41:54 -07:00
Kenny Root
46d2545db4 Merge "Infrastructure to support package verifier" 2011-08-16 08:35:53 -07:00
Kenny Root
bcc2d40a11 Merge "Throw exception on odd length Signatures" 2011-08-16 08:34:22 -07:00
Mathias Agopian
93d75ec371 as a debug option SrufaceFlinger can now connect to DDMS
this is disabled by default. To enable:
  setprop debug.sf.ddms 1

this debug option requires to restart SurfaceFlinger

Change-Id: Ic2f8050b29911b55bcd21721648b6978700c277d
2011-08-15 20:44:40 -07:00
Dianne Hackborn
34c788096f Merge "Add new am option to profile the launching of an activity." 2011-08-15 18:57:57 -07:00
Jeff Sharkey
b51645ee2c Merge "Foreground/background network stats using sets." 2011-08-15 18:44:15 -07:00
Jeff Sharkey
a06cb34283 Merge "Add NativeDaemonConnector users to watchdog." 2011-08-15 18:43:54 -07:00
Dianne Hackborn
62f20ecf49 Add new am option to profile the launching of an activity.
Change-Id: Ie71a8043eafe41f53a0b3dbb5170276d87acbc9b
2011-08-15 17:55:57 -07:00
Jeff Sharkey
b5d55e302d Foreground/background network stats using sets.
Teach NetworkStats about "counter sets" coming from kernel, and use
them to track usage in foreground/background.  Add AID_NET_BW_ACCT to
system_server so it can control counter sets.

Move to composite key of NetworkIdentitySet, UID, set, and tag when
recording historical usage.  Persisting still clusters by identity,
since that is heaviest object.

Request async stats poll during systemReady() to bootstrap later
delta calculations. Reset kernel counters when UID removed. Update
various tests.

Bug: 5105592, 5146067
Change-Id: Idabec9e3ffcaf212879821515602ecde0a03de8c
2011-08-15 17:30:25 -07:00
Kenny Root
5ab2157bf1 Infrastructure to support package verifier
Allow a package verifier to approve or disapprove of a package being
installed.

Change-Id: Ibfea0f2b1aaa4ab1589a4e59f96144702b9bf94b
2011-08-15 17:26:31 -07:00
Mathias Agopian
994a74747b Merge "have the sensorsevice test print the delay of the first received event" 2011-08-15 17:11:49 -07:00
Mathias Agopian
88b14c5d6d have the sensorsevice test print the delay of the first received event
Change-Id: I89d63122574c3f8790f00512c76d59b463acf18f
2011-08-15 17:10:23 -07:00
Robert Greenwalt
f125a09363 Flush central DNS cache when things change.
Flushes the cache for an interface when
either routes or DNS servers change.

Change-Id: I021305f781be669aaa12074dc1cc21511f49eac4
2011-08-15 14:26:53 -07:00
Jeff Brown
b2a85b69ce Merge "Fix blocked event handling in InputDispatcher. Bug: 5161854" 2011-08-15 13:09:08 -07:00
Jeff Brown
abb4d446a1 Fix blocked event handling in InputDispatcher.
Bug: 5161854

The InputDispatcher contains code to recover from ANRs more quickly
when the user touches a different application.  When triggered,
it sets mNextUnblockedEvent to the next event it should dispatch
(to the next application).  All prior events are dropped.

This change fixes a bug where mNextUnblockedEvent could potentially
never be reset back to NULL if the inbound queue was drained
for some reason.

Change-Id: I21be2f02c9fc770bd260ea414db8bb184df89ada
2011-08-15 12:55:32 -07:00
Jeff Brown
8b65c902ee Merge "Use PARCELABLE_WIRTE_RETURN_VALUE flag in InputChannel. Bug: 5161290" 2011-08-14 20:13:19 -07:00
Adam Powell
40a9784d48 Fix bug 5154361 - New force close dialog text breaks button order rules
Reorder the force close/ANR dialog buttons to better match the new
rules/intent from UX.

Change-Id: I30fed56aabd0cc91d07852807347057176d82aaa
2011-08-14 17:13:10 -07:00
Jeff Brown
0a0ab128a6 Use PARCELABLE_WIRTE_RETURN_VALUE flag in InputChannel.
Bug: 5161290

Replace mDisposeAfterWriteToParcel with code that takes advantage
of the standard Parcel API support for releasing resources after
writing a Binder reply.

This change makes it less likely that InputChannels will leak
accidentally when passed across a Binder.

Change-Id: Id37706e7b88d074e8e4ac687c88f0db8963200f2
2011-08-12 18:08:08 -07:00
Eric Laurent
497b3fe725 Issue 5081351: isWiredHeadsetOn() permission.
AudioManager.isWiredHeadsetOn() should not require permission MODIFY_AUDIO_SETTINGS.
Remove permission checks on all getters in audio policy manager as permission enforcement
is really usefull for setters.
Also deprecate AudioManager.isWiredHeadsetOn() which name and implementation are deceptive.

Change-Id: I38f8df7c26c0d417bf0e2b74e4c11c2d143f2ecd
2011-08-12 17:43:35 -07:00
Mathias Agopian
7b53848d14 Merge "fix an orientation change drawing artifact." 2011-08-12 17:13:01 -07:00
Mathias Agopian
b290b5e3cb fix an orientation change drawing artifact.
a wrong orientation would be briefly shown when
rotation the screen. this happened when the window manager
set a custom transformation and the h/w composer was used.

the custom transformation was applied twice in that case.

Bug: 5037522
Change-Id: Ic1f87b63cd843f4475e4265d1624463825d775c4
2011-08-12 17:09:09 -07:00
Dianne Hackborn
7c0d8472d0 Merge "Fix some crashes that are happening in the system process." 2011-08-12 15:22:32 -07:00
Marco Nelissen
2255a1e64f Don't remove effects on session 0
b/5159902
Change-Id: Id6f29fb1c687069f7480dd81d4745a558f202226
2011-08-12 14:54:56 -07:00
Dianne Hackborn
8e8d65ff5f Fix some crashes that are happening in the system process.
- When shutting down, if the screen goes to sleep there is code
  that tries to do a notifyAll without holding the lock:

java.lang.IllegalMonitorStateException: object not locked by thread before notifyAll()
	at java.lang.Object.notifyAll(Native Method)
	at com.android.server.am.ActivityStack.checkReadyForSleepLocked(ActivityStack.java:776)
	at com.android.server.am.ActivityStack$1.handleMessage(ActivityStack.java:282)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at com.android.server.ServerThread.run(SystemServer.java:603)

- If an invalid Uri object is sent to the system process it can crash because
  the Uri class throws an assertion while unmarshalling.  Change this to an
  IllegalArgumentException so it gets sent back to the caller:

java.lang.AssertionError
	at android.net.Uri$PathPart.readFrom(Uri.java:2224)
	at android.net.Uri$HierarchicalUri.readFrom(Uri.java:1106)
	at android.net.Uri$1.createFromParcel(Uri.java:1689)
	at android.net.Uri$1.createFromParcel(Uri.java:1681)
	at android.content.IContentService$Stub.onTransact(IContentService.java:53)
	at android.content.ContentService.onTransact(ContentService.java:120)
	at android.os.Binder.execTransact(Binder.java:338)
	at dalvik.system.NativeStart.run(Native Method)

- StrictMode can try to access the first index in the stack crawl of a stack crawl
  array of length 0.  Not sure why this happens, but make the code more robust:

java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
	at android.app.ApplicationErrorReport$CrashInfo.<init>(ApplicationErrorReport.java:341)
	at android.os.StrictMode$ViolationInfo.<init>(StrictMode.java:1978)
	at android.os.StrictMode$AndroidBlockGuardPolicy.startHandlingViolationException(StrictMode.java:1097)
	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1068)
	at libcore.io.BlockGuardOs.read(BlockGuardOs.java:137)
	at libcore.io.IoBridge.read(IoBridge.java:426)
	at java.io.FileInputStream.read(FileInputStream.java:179)
	at java.io.InputStream.read(InputStream.java:148)
	at com.android.internal.os.ProcessStats.readFile(ProcessStats.java:804)
	at com.android.internal.os.ProcessStats.getCpuSpeedTimes(ProcessStats.java:564)
	at com.android.internal.os.ProcessStats.getLastCpuSpeedTimes(ProcessStats.java:545)
	at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1470)
	at com.android.server.am.ActivityManagerService.batteryNeedsCpuUpdate(ActivityManagerService.java:1522)
	at com.android.internal.os.BatteryStatsImpl$MyHandler.handleMessage(BatteryStatsImpl.java:110)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1302)

(Also fix this code to not cause strict mode to trigger at all, because there is
no need, because this is just reading stuff from /proc.)

- The system seems to crash during boot if it thinks it needs to rotate
  the screen, when it is trying to take the freeze snapshot way too early.
  There is no need to freeze the screen during boot or if the screen is off:

java.lang.NullPointerException
	at android.view.Surface.init(Native Method)
	at android.view.Surface.<init>(Surface.java:256)
	at com.android.server.wm.ScreenRotationAnimation.<init>(ScreenRotationAnimation.java:91)
	at com.android.server.wm.WindowManagerService.startFreezingDisplayLocked(WindowManagerService.java:8758)
	at com.android.server.wm.WindowManagerService.startAppFreezingScreenLocked(WindowManagerService.java:3971)
	at com.android.server.wm.WindowManagerService.startAppFreezingScreen(WindowManagerService.java:4003)
	at com.android.server.am.ActivityRecord.startFreezingScreenLocked(ActivityRecord.java:515)
	at com.android.server.am.ActivityStack.ensureActivityConfigurationLocked(ActivityStack.java:3997)
	at com.android.server.am.ActivityManagerService.updateConfigurationLocked(ActivityManagerService.java:12535)
	at com.android.server.am.ActivityManagerService.updateConfiguration(ActivityManagerService.java:12439)
	at com.android.server.wm.WindowManagerService.systemReady(WindowManagerService.java:6161)
	at com.android.server.ServerThread.run(SystemServer.java:521)

Change-Id: I85062bb5f6b0909a0f52feedaa75e7611d9d7fbd
2011-08-12 14:20:59 -07:00
Mathias Agopian
91b5398018 SurfaceFlinger doesn't rely on having a custom RefBase destructor
we just use a message to the main thread to
destroy our GLES state.
2011-08-11 22:33:02 -07:00
Michael Jurka
b858ec559e Merge "On device startup, be in touch mode" 2011-08-11 19:49:15 -07:00
Michael Jurka
e99adc70c8 On device startup, be in touch mode
- Solves bug where an icon showed focus state on startup in Launcher. Once the keyboard arrows are used, Launcher enters non-touch mode as usual

Change-Id: I0080f3b72f6c22833c600a1026af0abc35024510
2011-08-11 18:28:01 -07:00
Jeff Brown
61bb11cfa0 Merge "Ensure outValue is set, even when an error occurs." 2011-08-11 18:26:11 -07:00
Jeff Brown
2749668e36 Merge "Exorcise notification panel ghosts. Bug: 5105599" 2011-08-11 17:23:38 -07:00
Jeff Brown
64e35bb006 Merge "Improve touch device configuration. Bug: 5064702" 2011-08-11 17:23:05 -07:00
Jeff Brown
063097545e Ensure outValue is set, even when an error occurs.
Change-Id: If883f60cde28792bd0e108597ced49d69d13136e
2011-08-11 17:10:06 -07:00
Jeff Brown
8bcbbefa3b Exorcise notification panel ghosts.
Bug: 5105599

Don't clear slot data when slot is no longer in use.

The kernel will not resend absolute slot values if they are
unchanged, even if the slot was previously marked unused.

Because the protocol is stateful, this could cause problems if
evdev drops events (marked by SYN_DROPPED) since we cannot
query the initial values of the slots, but there's nothing
we can do.

Change-Id: Ie13e68097fb8ed2542c2f60338b499082cf9e77f
2011-08-11 15:54:54 -07:00
Christopher Tate
7bc4827e36 Merge "Fix partial-read handling during restore" 2011-08-11 15:07:25 -07:00