1860 Commits

Author SHA1 Message Date
Dianne Hackborn
9327f4f671 More device policy work: clarify password modes, monkeying.
Clarifies what the password modes mean, renaming them to "quality"
and updating their documentation and the implementation to follow.

Also adds a facility to find out if a monkey is running, which I
need for the api demo to avoid letting it wipe the device.
2010-01-29 17:16:02 -08:00
Neal Nguyen
9205b2effe Merge "Phase 2 of test cleanup: moving test files from AndroidTests closer to their sources." 2010-01-29 16:38:53 -08:00
Christopher Tate
b0dcaaf108 Don't crash on transport unregistration if there is no current transport
Change-Id: Icd0962254ba224a7be27d408dffb25b634f67863
2010-01-29 16:27:04 -08:00
Chris Tate
4a20061f34 Merge "Make backup/restore asynchronous and enforce timeouts" 2010-01-29 15:02:03 -08:00
Christopher Tate
44a2790374 Make backup/restore asynchronous and enforce timeouts
Callouts to app backup agents are now asynchronous, and timeouts are applied if
they take too long, hang, etc.  The initial timeouts are set to 15 seconds on
backup, 60 seconds on restore.  These operations typically run at background
priority, so it's necessary to give them ample time to run.

As part of setting up this asynchronicity, the Backup Manager's internal thread
management has been overhauled.  It now spins off a single HandlerThread at
startup, and runs backup/restore/etc operations *synchronously* in that thread,
applying timeouts as appropriate.  This means we're no longer spinning up new
threads all the time, and furthermore it ensures that we can never have more
than one operation in flight at once.  Later CLs will remove the now-redundant
logic that previously ensured that operations didn't stomp on each other.

Bug: 2053560
Change-Id: Ie4315c219c7ff6dd8f51f2ad6c0872595b18cff1
2010-01-29 14:07:52 -08:00
Mike Lockwood
ef73162887 Support for triggering the lockscreen while the screen is on:
Add new ALLOW_LOCK_WHILE_SCREEN_ON window manager flag, which when set
causes the window manager to put up the lockscreen after the
normal screen timeout has elapsed.

Add plumbing to pass PowerManager.userActivity() to the window manager policy.

Change-Id: I05adc52bad39c56031a08e8ec3cbcf5c2d9b9827
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-29 17:05:04 -05:00
Neal Nguyen
1a44d5dcab Phase 2 of test cleanup: moving test files from AndroidTests closer to their sources.
Most of these are file moves; a couple notable exceptions are the changes due to the move, and fixing up test code:
- database/DatabaseCursorTest.java
- database/DatabaseStatementTest.java
- net/UriTest.java
2010-01-29 13:35:51 -08:00
Suchi Amalapurapu
bd2f531a28 Merge "Fix StringIndexOutOfBoundsException in PackageManagerService" 2010-01-29 08:45:39 -08:00
Daniel Sandler
d425a45f8d Fix build.
(Broken in change Ib94f795c.)
2010-01-29 10:09:04 -05:00
Daniel Sandler
77c292d83e Merge "New full-screen activity for USB mass storage interaction." 2010-01-29 06:22:33 -08:00
Bjorn Bringert
5fd5bfe942 Fix StringIndexOutOfBoundsException in PackageManagerService
The method packageManagerService.getNextCodePath(String oldCodePath,
String prefix, String suffix) threw StringIndexOutOfBoundsException if
oldCodePath does not contain prefix, and prefix is longer than
oldCodePath, or if the preix and suffix overlap.

Fixes http://b/issue?id=2404232

Change-Id: Ib8abb16f8bfd08f607476d9289f46d170c43a076
2010-01-29 12:29:41 +00:00
Chia-chi Yeh
784d53e79b WifiService: allow EAP variables to be unset using empty strings. 2010-01-29 16:26:28 +08:00
Irfan Sheriff
c4a0c2744a Merge "Blacklist APs instead of disable" 2010-01-28 20:46:25 -08:00
Robert Greenwalt
fbf56dc719 am 3e229076: am cc4b4016: Fix the reporting of NO_CONNECTIVITY.
Merge commit '3e229076203cd8cfee0adac44cd3c930dfa0e59c'

* commit '3e229076203cd8cfee0adac44cd3c930dfa0e59c':
  Fix the reporting of NO_CONNECTIVITY.
2010-01-28 14:46:55 -08:00
Robert Greenwalt
64fe5646c5 am 6d626d41: am 5381e4ef: Merge "Refine fix I53e91db7 to apply only to wifi network" into eclair
Merge commit '6d626d41e9db62a0eadb61ccb2aa4081a8b9f6d0'

* commit '6d626d41e9db62a0eadb61ccb2aa4081a8b9f6d0':
  Refine fix I53e91db7 to apply only to wifi network
2010-01-28 13:44:45 -08:00
Daniel Sandler
b94f795c25 New full-screen activity for USB mass storage interaction.
Still TODO: patch into forthcoming callbacks from
MountService so the USB storage activity always shows the
correct state of the device. (Right now it only refreshes
its display onResume.)

Bug: 2299129
2010-01-28 16:18:22 -05:00
Dianne Hackborn
254cb446fa More device admin.
- Clean up device policy manager APIs.
- Implement lockNow().  For now this just turns the screen off to lock the device.
2010-01-28 13:15:57 -08:00
Kenny Root
bdbc925a27 resolved conflicts for merge of b0903104 to master
Change-Id: Iff20980c44d42b41ae411c4201e0927cee19d415
2010-01-28 12:03:49 -08:00
Irfan Sheriff
0049a1bf3f Blacklist APs instead of disable
We currently disable networks upon too many reconnects. This leads to asking
the user input for reconnects. Blacklist it instead.

Bug: 2129037
Change-Id: I23d69daf3964c066ed7f70d32fefb81016f19aa2
2010-01-28 11:27:14 -08:00
Eric Laurent
f1a0f55f71 am 131c5e08: am a59551ba: Merge "Fix issue 2388215: Audio not routed to 3.5mm Headset after removal/insertion." into eclair
Merge commit '131c5e0867d542788cf2dab23b17f2f8cc3d0391'

* commit '131c5e0867d542788cf2dab23b17f2f8cc3d0391':
  Fix issue 2388215: Audio not routed to 3.5mm Headset after removal/insertion.
2010-01-28 10:09:09 -08:00
San Mehat
51e93db940 Merge "Remove destroy asec command when mounting secure container" 2010-01-28 06:50:18 -08:00
Jacek Surazski
8ea25cc1a1 Merge "timestamp field in ApplicationErrorReport was not getting intitialized on ANRs" 2010-01-28 00:09:56 -08:00
Suchi Amalapurapu
40b5110e74 Remove destroy asec command when mounting secure container 2010-01-27 23:46:13 -08:00
Dianne Hackborn
d47c6ed4a9 Bite the bullet and add support for multiple device admins. 2010-01-27 17:31:56 -08:00
Jacek Surazski
41a9fd55ac timestamp field in ApplicationErrorReport was not getting intitialized on ANRs 2010-01-27 16:37:21 -08:00
Dan Egnor
3ae6162d18 Merge "Report tombstone (native crash) data to the dropbox." 2010-01-27 15:06:06 -08:00
Dan Egnor
492c6ed5b6 Report tombstone (native crash) data to the dropbox.
Also uses a shared_prefs file to keep track of which files have been
logged, instead of polluting Settings.Secure with this data.
2010-01-27 14:52:57 -08:00
Dianne Hackborn
8ea138cbf1 More work on device admins:
- You can now show a dynamic message to the user when asking to
  have your DeviceAdmin added.
- A DeviceAdmin can now provide a warning message that is displayed
  before a user disables it.
- Better ordering (and text) of the policy warnings.
- New API to set the maximum failed password attempts before the device
  wipes itself.
- We now store the number of failed unlock attempts in persistent
  storage.
- New managed dialog APIs that will be used by the settings app.

Also a little bit of cleanup as I was working on this - removed the
long unused MailboxNotAvailableException, fixed a java doc in Messenger.
2010-01-27 13:51:53 -08:00
Suchi Amalapurapu
c028be4f3b AppsOnSd feature - Add default container
Add new remote interface to do temporary copies. The new
remote stub handling is done on mHandler thread and doesn't need locking
for now.
Add new InstallArgs class and subclasses to isolate cases for installation.
Move resource deletion for failed installs/upgrades to later on in installation
cycle.
Fix code path for forward locked apps when using scanPackageLI

TODO's
Fix installation paths to completely use InstallArgs based design later on.
Get rid of using flags in various install/uninstall code paths.
Ideally InstallArgs should be created using these flags and used in the
rest of the code.
Function renames.
Revisit mount api's.
2010-01-27 10:26:43 -08:00
San Mehat
02735bc9b7 MountService: Introduce new @hide permissions to protect secure containers.
Signed-off-by: San Mehat <san@google.com>
2010-01-27 06:14:28 -08:00
Dan Egnor
78d5ba9dbc Merge changes Iea11654e,I2242da5a,I66c40e73
* changes:
  Use six dashes instead of five.
  Include more verbose device information with kernel dumps (hardware, bootloader, etc.), and separate the device info headers from the actual dump with a blank line.
  Add package information to dropbox reports for ANR, crash, etc. (Notably including package version codes, to help when we're shipping out-of-cycle unbundled app updates.)
2010-01-26 20:05:20 -08:00
Dan Egnor
2242da5a4f Include more verbose device information with kernel dumps
(hardware, bootloader, etc.), and separate the device info
headers from the actual dump with a blank line.
2010-01-26 17:00:36 -08:00
San Mehat
c2a3947164 MountService: Don't update the storage status when we're unmounted
Signed-off-by: San Mehat <san@google.com>
2010-01-26 16:52:23 -08:00
Dan Egnor
66c40e7366 Add package information to dropbox reports for ANR, crash, etc.
(Notably including package version codes, to help when we're shipping
out-of-cycle unbundled app updates.)
2010-01-26 16:23:11 -08:00
San Mehat
ec3cad8ec6 Merge "MountService: Explicitly query volume state on startup" 2010-01-26 14:18:47 -08:00
San Mehat
7b04317be8 Merge "NativeDaemonConnector: fix doListCommand() to return *all* list elements" 2010-01-26 13:38:41 -08:00
San Mehat
5b77dab234 MountService: Explicitly query volume state on startup
Signed-off-by: San Mehat <san@google.com>
2010-01-26 13:28:50 -08:00
San Mehat
80120b4374 NativeDaemonConnector: fix doListCommand() to return *all* list elements
Signed-off-by: San Mehat <san@google.com>
2010-01-26 13:18:03 -08:00
Chris Tate
b91f4643b6 Merge "Move towards a formal public API for backup and restore" 2010-01-26 12:29:13 -08:00
Dianne Hackborn
8aa2e8939c More device admin work: description, policy control.
There is now a description attribute associated with all components,
that can supply user-visible information about what the component does.
We use this to show such information about device admins, and wallpapers
are also updated to be able to show this in addition to the existing
description in their meta-data.

This also defines security control for admins, requiring that they
declare the policies they will touch, and enforcing that they do
so to be able to use various APIs.
2010-01-26 12:28:15 -08:00
David Turner
508370f0cb Merge "Make PackageManager unpack gdbserver binaries at installation time." 2010-01-26 11:24:47 -08:00
Robert Greenwalt
09ac3c3cbc resolved conflicts for merge of 1f2f23bd to master 2010-01-26 10:09:52 -08:00
San Mehat
d1df8ac6d0 NetworkManagementService: Start service when SystemServer starts up
Signed-off-by: San Mehat <san@google.com>
2010-01-26 07:51:05 -08:00
Christopher Tate
80202c8cb8 Move towards a formal public API for backup and restore
This commit makes a few changes towards establishing a formal application
interface for interacting with the backup/restore mechanism:

1. Introduce public wrapper classes around the various binder interfaces; 3rd
party code will never see the binders directly.

2. Progress update callbacks during a restore sequence now occur on the main
thread, not in a binder thread [and not with system-process permissions!].

3. Rename the BackupManagerService's inner "RestoreSession" class to avoid
ambiguity with the new public "RestoreSession" class.
2010-01-25 19:41:23 -08:00
Robert Greenwalt
3e22907620 am cc4b4016: Fix the reporting of NO_CONNECTIVITY.
Merge commit 'cc4b4016e4b86db012f94bb889e5ca61ff362171' into eclair-plus-aosp

* commit 'cc4b4016e4b86db012f94bb889e5ca61ff362171':
  Fix the reporting of NO_CONNECTIVITY.
2010-01-25 18:56:32 -08:00
Robert Greenwalt
cc4b4016e4 Fix the reporting of NO_CONNECTIVITY.
A refactoring of handleDisconnect instroduced a bug - we were reporting
NO_CONNECTIVITY after any non-primary network (supl, mms, hipri) was lost.

bug:2395006

Change-Id: Ifa9e008872ec646981a35f2c316120cb9685a6a4
2010-01-25 17:54:29 -08:00
Robert Greenwalt
6d626d41e9 am 5381e4ef: Merge "Refine fix I53e91db7 to apply only to wifi network" into eclair
Merge commit '5381e4ef4ef1a05b25fa39ff942f4a95e0ae4750' into eclair-plus-aosp

* commit '5381e4ef4ef1a05b25fa39ff942f4a95e0ae4750':
  Refine fix I53e91db7 to apply only to wifi network
2010-01-25 16:54:28 -08:00
Robert Greenwalt
6e6dec2843 Refine fix I53e91db7 to apply only to wifi network
The original fix eliminated duplicate wifi connectivity changes stemming from
location provder scan's for APs.  These would generate two DISCONNECTED broadcasts every
two minutes and many apps mis-interpreted them.

The fix was to ignore notifications where the major state was the same as the previous one
for each network.  Unfortunately the state of per-apn notifications on cellular is hacky
and so the wifi fix was breaking mms (mms when you're on cellular with a common default+mms apn does
not generate a disconnect notification (apn still connected) so subsequent connect notifications
get dropped as duplicates).

This change refines the previous change so that it only applies to wifi networks.

bug:2392061
Change-Id: I05d8a46a4b55f8d28df8af12e05284e5e68bfc02
drno: ryanpc
2010-01-25 16:23:56 -08:00
David 'Digit' Turner
1edab2b551 Make PackageManager unpack gdbserver binaries at installation time.
Native-debuggable packages contain a lib/<abi>/gdbserver executable.
This patch ensures that the package manager will copy it to the
proper location (/data/data/<appname>/lib) at installation time.

Note that such packages are marked with a new ApplicationInfo flag
named FLAG_NATIVE_DEBUGGABLE, to be used later by the Activity
Manager.
2010-01-25 11:27:08 -08:00
San Mehat
45f6104082 MountService: Add support for renaming secure containers
Signed-off-by: San Mehat <san@google.com>
2010-01-23 08:12:43 -08:00