4815 Commits

Author SHA1 Message Date
Christopher Tate
4559764e9f Fix deadlock in BackupManagerService
Lock ordering bug.  The fix is to avoid having to hold both locks
simultaneously in one prong of the deadlock.  (Further strengthening:
the code path for potentially acquiring both simultaneously now
begins at a common method, ensuring that lock ordering is always
consistent.)

Change-Id: If9433aff8326fec2ba0e97e96ad2d835b01e2cda
2011-04-04 16:59:21 -07:00
Elliott Hughes
6907891b1f You can't fsync(2) /dev/urandom...
...so don't even try. Doing so leads to this:

W/EntropyService( 1586): unable to load initial entropy (first boot?)
W/EntropyService( 1586): java.io.SyncFailedException: fsync failed: EINVAL (Invalid argument)
W/EntropyService( 1586): 	at java.io.FileDescriptor.sync(FileDescriptor.java:73)
W/EntropyService( 1586): 	at java.io.RandomAccessFile.write(RandomAccessFile.java:694)
W/EntropyService( 1586): 	at java.io.RandomAccessFile.write(RandomAccessFile.java:676)
W/EntropyService( 1586): 	at com.android.server.RandomBlock.toDataOut(RandomBlock.java:88)
W/EntropyService( 1586): 	at com.android.server.RandomBlock.toFile(RandomBlock.java:70)
W/EntropyService( 1586): 	at com.android.server.EntropyService.loadInitialEntropy(EntropyService.java:99)
W/EntropyService( 1586): 	at com.android.server.EntropyService.<init>(EntropyService.java:86)
W/EntropyService( 1586): 	at com.android.server.EntropyService.<init>(EntropyService.java:76)
W/EntropyService( 1586): 	at com.android.server.ServerThread.run(SystemServer.java:139)
W/EntropyService( 1586): Caused by: libcore.io.ErrnoException: fsync failed: EINVAL (Invalid argument)
W/EntropyService( 1586): 	at libcore.io.Posix.fsync(Native Method)
W/EntropyService( 1586): 	at libcore.io.BlockGuardOs.fsync(BlockGuardOs.java:39)
W/EntropyService( 1586): 	at java.io.FileDescriptor.sync(FileDescriptor.java:71)
W/EntropyService( 1586): 	... 8 more

Change-Id: I598a9456eccec0ca087f1568d47b6b8e531de8a8
2011-04-04 12:15:34 -07:00
Chet Haase
09bc5f5b57 Merge "Add logging of graphics acceleration info to bugreports" 2011-04-01 13:28:10 -07:00
Chet Haase
9c1e23baf5 Add logging of graphics acceleration info to bugreports
Change-Id: I9fa4cda6ccf92df9d1c644ccdc0e7274a30106e0
2011-04-01 13:24:53 -07:00
Jeff Brown
bc2278b95f Merge "Add a little input event consistency verifier." 2011-04-01 12:56:35 -07:00
Robert Greenwalt
13ec406381 Fix a bad merge.
Re-add change 103769 (Change-Id: I9e7c94718a5b1f08840b219b304ba3904259a65f) from gingerbread
after the bad merge was reverted by master change 104487
(Change-Id: I8fad7ee11f4b26630f3cc4b31cc9cafbe66b3bf4).

bug:4157610
Change-Id: I96a75d71220cc7886a5b186b415d8dacf6951ca6
2011-04-01 10:51:22 -07:00
Jeff Brown
21bc5c917d Add a little input event consistency verifier.
The idea is to assist with debugging by identifying cases in which
the input event stream is corrupted.

Change-Id: I0a00e52bbe2716be1b3dfc7c02a754492d8e7f1f
2011-03-31 19:57:00 -07:00
Michael Jurka
8fad7ee11f Fix the build
Revert "am 047f9d12: Merge "resolved conflicts for merge of ce6766ea to honeycomb-plus-aosp" into honeycomb-plus-aosp"

This reverts commit 352f2c33d3b8a0b73dcdab98c7a77f698578b048, reversing
changes made to ce8a55db6feae11c1db45a868a7d8a0e7d105471.
2011-03-30 19:57:12 -07:00
Jeff Brown
e028290d01 Merge "Add input filter mechanism for accessibility." 2011-03-30 17:20:56 -07:00
Jeff Brown
a386952528 Merge "Move accessibility manager service to own package." 2011-03-30 17:20:50 -07:00
Jeff Brown
0029c66203 Add input filter mechanism for accessibility.
This patch adds a mechanism for capturing, filtering, transforming
and injecting input events at a very low level before the input
dispatcher attempts to deliver them to applications.  At this time,
the mechanism is only intended to be used by the accessibility
system to implement built-in system-level accessibility affordances.

The accessibility input filter is currently just a stub.
It logs the input events receives and reinjects them unchanged,
except that it transforms KEYCODE_Q into KEYCODE_Z.

Currently, the accessibility input filter is installed whenever
accessibility is enabled.  We'll probably want to change that
so it only enables the input filter when a screen reader is
installed and we want touch exploration.

Change-Id: I35764fdf75522b69d09ebd78c9766eb7593c1afe
2011-03-30 16:55:15 -07:00
Robert Greenwalt
352f2c33d3 am 047f9d12: Merge "resolved conflicts for merge of ce6766ea to honeycomb-plus-aosp" into honeycomb-plus-aosp
* commit '047f9d12976d90d0931a64a256bb4843d77f5e20':
  Fix some alt-network issues.
2011-03-30 16:40:23 -07:00
Brad Fitzpatrick
b9d173ce8f am f6809853: am 7a84a60d: am 1a5a2379: Merge "Unregister callback from binder when vibration is removed"
* commit 'f68098534e42b33cd4588bb2d2ba34ab579e11aa':
  Unregister callback from binder when vibration is removed
2011-03-30 16:37:58 -07:00
Mike Lockwood
d0b4e9611d am 08d5de83: am cd90d1f1: am 44e4b99f: Merge "UsbService: Make USB disconnect handling for accessory mode more robust" into honeycomb-mr1
* commit '08d5de83393dbd4d31893d96e4871a8a3628a2cd':
  UsbService: Make USB disconnect handling for accessory mode more robust
2011-03-30 16:33:40 -07:00
Robert Greenwalt
6244f0fc16 resolved conflicts for merge of ce6766ea to honeycomb-plus-aosp
Change-Id: I4c3c382cc5cd89f8a4437cf17836fb42f9417ee1
2011-03-30 15:03:13 -07:00
Robert Greenwalt
ce6766ea51 am 568845a7: Merge "Fix some alt-network issues." into gingerbread
* commit '568845a766cddc4e4c222b4d9de064f8a48da990':
  Fix some alt-network issues.
2011-03-30 09:30:15 -07:00
Brad Fitzpatrick
f68098534e am 7a84a60d: am 1a5a2379: Merge "Unregister callback from binder when vibration is removed"
* commit '7a84a60d569ef7373fbb6418026b935d48fcd7e7':
  Unregister callback from binder when vibration is removed
2011-03-30 08:20:51 -07:00
Jeff Brown
6e6cd7a566 Move accessibility manager service to own package.
Change-Id: I0d73737a21615f0ff0abc80b757fb8c9bcb50be5
2011-03-30 03:29:30 -07:00
Mike Lockwood
08d5de8339 am cd90d1f1: am 44e4b99f: Merge "UsbService: Make USB disconnect handling for accessory mode more robust" into honeycomb-mr1
* commit 'cd90d1f1173c344738362d24bdc637c355b75645':
  UsbService: Make USB disconnect handling for accessory mode more robust
2011-03-29 22:17:36 -07:00
Mike Lockwood
cd90d1f117 am 44e4b99f: Merge "UsbService: Make USB disconnect handling for accessory mode more robust" into honeycomb-mr1
* commit '44e4b99f823a6d6131f94e67389b705d3b124c0a':
  UsbService: Make USB disconnect handling for accessory mode more robust
2011-03-29 22:16:17 -07:00
Mike Lockwood
4f0f3561ed UsbService: Make USB disconnect handling for accessory mode more robust
Handle the case where the kernel driver is in accessory mode but we failed
to initialize it at the framework level.  On disconnnect, check to see if the
accessory kernel driver is enabled rather than checking mCurrentAccessory.
That way we will restore the USB state in the kernel even if mCurrentAccessory
is null.

Change-Id: I35d458f21a8b21611946da523d0f53723cab0540
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-29 16:59:38 -07:00
Mike Lockwood
35167d95e1 Remove logging from HardwareService flashlight calls
Bug: 4184090

Change-Id: I772b9098e082afcde09ae607d196c1591137fa6d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-28 20:29:14 -07:00
Brad Fitzpatrick
7a84a60d56 am 1a5a2379: Merge "Unregister callback from binder when vibration is removed"
* commit '1a5a2379eb3a6cf16fb153aecbc4ac9e85d3ed42':
  Unregister callback from binder when vibration is removed
2011-03-28 08:15:35 -07:00
Kenny Root
ff5075944e Merge changes Ia7add63e,Ic7571dae
* changes:
  Split dump and annotate users of mPackages lock
  Split PackageManagerService into subclasses
2011-03-25 14:41:34 -07:00
Robert Greenwalt
7cf5b419da Fix some alt-network issues.
Two issues.
1) remove default routes for non-default networks.
2) don't report mobile is the active default network just because
   it is active.

bug:4157610
Change-Id: I9e7c94718a5b1f08840b219b304ba3904259a65f
2011-03-25 08:59:08 -07:00
Adam Cohen
2625feae79 Modifying RemoteViewsFactory interface
-made onDestroy() one way
-moved uncaught exception handling to the application process

Change-Id: I958571a34eaa48b27e441e3a117c109fb2d2c644
2011-03-24 19:50:22 -07:00
Mathias Jeppsson
b23949b745 Unregister callback from binder when vibration is removed
When creating new vibration pattern, a callback is registered
in case binding to caller goes away, by linkToDeath().
Need to unregister this callback when we throw away the vibration.

Change-Id: Ibdf0bd415a539054ac7a66f49b33a864f729c546
2011-03-24 08:49:12 +01:00
Kenny Root
447106fc83 Split dump and annotate users of mPackages lock
Split the dump() command between PMS and Settings.

Try to annotate all users of the mPackages lock in preparation for
switch to reader/writer lock.

Also mark some locals final as I was reading through the usage of the
synchronization on mPackages.

Change-Id: Ia7add63e835e67156edf886f98acebe50cc41f70
2011-03-23 17:20:04 -07:00
Robert Greenwalt
15cb32ed9d am 5635dc93: am 0b6d0445: am ac70fb8b: Merge "Fix adding of default route." into honeycomb-mr1
* commit '5635dc9313dc6ca3ea739e4ca36c42a2c58537e9':
  Fix adding of default route.
2011-03-22 21:40:54 -07:00
Robert Greenwalt
5635dc9313 am 0b6d0445: am ac70fb8b: Merge "Fix adding of default route." into honeycomb-mr1
* commit '0b6d044567b9c3004eb7ed826fd593019cd24352':
  Fix adding of default route.
2011-03-22 21:39:19 -07:00
Robert Greenwalt
0b6d044567 am ac70fb8b: Merge "Fix adding of default route." into honeycomb-mr1
* commit 'ac70fb8be6ea3a6b49d0a8a26e99c25f92013516':
  Fix adding of default route.
2011-03-22 21:37:48 -07:00
Robert Greenwalt
edcb4f9d56 Fix adding of default route.
If you deleted the host routes (started a secondary network like mms, supl
of hipri and then ended it) you would lose the host route to the default
gateway.  Then if you needed to re-add the default gateway route (lost
the connection and removed the default route and then re-established)
you couldn't - can't add a gateway that isn't routable apparently.

This happens if you are in a video chat and lose your connection without
losing the interface (PPP keeps it up for a bit).

Fixed it by having addDefaultRoute first add a hsot route for the gateway
before adding the default route.  This allows the default add to succeed.

bug:3490353
Change-Id: I415e7319832e6456f8757b14c4f79f098a08839b
2011-03-22 18:47:42 -07:00
Kenny Root
cf0b38ca6e Split PackageManagerService into subclasses
Split PackageManagerService from one monolithic class with several inner
classes to several classes. This will help determining how its data
structures can be reshuffled to provide better separation of concerns.

Change-Id: Ic7571daebdcf13ce08e08f34204c5bbf4140139b
2011-03-22 16:17:57 -07:00
Kenny Root
60f7ad8a8b Add generic types and more cleanup
Removing some unused methods, adding generics where possible to avoid
future mistakes, and just more cleanups of warnings.

Change-Id: Ie62206f87dc19544b9dc039faa0159fc46ebc259
2011-03-22 12:55:31 -07:00
Kenny Root
4dfe6ff609 PackageManager: Remove unused methods and more debug flags
Change-Id: Ib44c2b9f3bf8f8ccf6b79771aee7481bd6a0d1e3
2011-03-22 12:49:17 -07:00
Kenny Root
62cc69017a PackageManager: mark some ints final
Change-Id: I72ddeeae6bcd5df291b1c96020a0eca3e6552e41
2011-03-22 12:49:17 -07:00
Kenny Root
9718cf5e58 PackageManager: get rid of Config.LOG[DV]
Change-Id: If7fb1ce80dd36afb980f04687579580992c27f64
2011-03-22 12:49:16 -07:00
Kenny Root
2798942bc4 Reorganize imports for PackageManagerService
Change-Id: I62e6cb8088086a9f5c3983145a08b44b782693e4
2011-03-22 12:49:16 -07:00
Kenny Root
7dca6f1b9c Merge "Remove unused items in setInstallerPackageName" 2011-03-22 12:25:28 -07:00
Mike Lockwood
7672db5968 am 433567b5: am 56063c8d: am dd76dc02: Merge "UsbService: Handle the case where a USB accessory connects as the device is booting" into honeycomb-mr1
* commit '433567b57c96525fb6c1c39e8ccb9780548441ba':
  UsbService: Handle the case where a USB accessory connects as the device is booting
2011-03-20 17:40:07 -07:00
Mike Lockwood
9a612b545e am 65de3c76: DO NOT MERGE: UsbService: Handle the case where a USB accessory connects as the device is booting
* commit '65de3c76874386a5c1ffd26690451ecdef972a9e':
  DO NOT MERGE: UsbService: Handle the case where a USB accessory connects as the device is booting
2011-03-20 17:37:33 -07:00
Mike Lockwood
433567b57c am 56063c8d: am dd76dc02: Merge "UsbService: Handle the case where a USB accessory connects as the device is booting" into honeycomb-mr1
* commit '56063c8d62d0574409a8150d580993c8d8e0f14f':
  UsbService: Handle the case where a USB accessory connects as the device is booting
2011-03-20 17:33:01 -07:00
Mike Lockwood
56063c8d62 am dd76dc02: Merge "UsbService: Handle the case where a USB accessory connects as the device is booting" into honeycomb-mr1
* commit 'dd76dc0297f4c39fefbbc1ac23d9b1add187d9e9':
  UsbService: Handle the case where a USB accessory connects as the device is booting
2011-03-20 17:25:09 -07:00
Mike Lockwood
65de3c7687 DO NOT MERGE: UsbService: Handle the case where a USB accessory connects as the device is booting
Bug: 4129297

Change-Id: I33963b0a667976d8100a60b27d66bfd0d57373e2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-19 14:38:54 -04:00
Mike Lockwood
1c0e543638 UsbService: Handle the case where a USB accessory connects as the device is booting
Bug: 4129297

Change-Id: I8f9d085805fb598572f9b00952c3cd38cfab461b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-19 12:03:46 -04:00
James Dong
2120617f2f am 14438b81: am 970bad67: am be368de7: Merge "Fix missing AOSP copyright headers for more files" into honeycomb-mr1
* commit '14438b81a1fe4d7ebdf8977f3d80a1dd1867c5ad':
  Fix missing AOSP copyright headers for more files
2011-03-17 18:06:51 -07:00
James Dong
14438b81a1 am 970bad67: am be368de7: Merge "Fix missing AOSP copyright headers for more files" into honeycomb-mr1
* commit '970bad677585b3cba1ff1b48db9040c2005bd907':
  Fix missing AOSP copyright headers for more files
2011-03-17 18:00:19 -07:00
James Dong
970bad6775 am be368de7: Merge "Fix missing AOSP copyright headers for more files" into honeycomb-mr1
* commit 'be368de7b7614e89bae8fb59ea4283eba890a2c1':
  Fix missing AOSP copyright headers for more files
2011-03-17 17:55:48 -07:00
Mike Lockwood
cc4d56f9ee am f63113d1: am a5b68f39: am 5982bf66: GPS: Restore XTRA downloading at boot.
* commit 'f63113d158b2afd98b41735ec02c8e800a73d23e':
  GPS: Restore XTRA downloading at boot.
2011-03-17 16:27:39 -07:00
Mike Lockwood
f63113d158 am a5b68f39: am 5982bf66: GPS: Restore XTRA downloading at boot.
* commit 'a5b68f39e2936a83eac0b995992724cd5de6905d':
  GPS: Restore XTRA downloading at boot.
2011-03-17 16:25:01 -07:00