1902 Commits

Author SHA1 Message Date
San Mehat
739e1f8cda Merge "MountService: Add isSecureContainerMounted() API call" 2010-02-09 19:30:34 -08:00
San Mehat
6cdd9c0856 MountService: Add isSecureContainerMounted() API call
Signed-off-by: San Mehat <san@google.com>
2010-02-09 18:46:05 -08:00
David 'Digit' Turner
add1376cde Generate /data/system/packages.list in the PackageManager
This file contains uid + debugFlag + dataPath information for
each non-system installed package. It is meant to be used later
from native code and thus needs to be considerably simpler to
parser than packages.xml.

The file should only be readable by non-system userIds, and its
format is essentially line-based with each line like:

  <pkgName> <uid> <debugFlag> <dataDir>

With:

  <pkgName>    as the package name
  <uid>        as the application-specific user id
  <debugFlag>  either 0 or 1. 1 if the package is debuggable
  <dataDir>    path to the package's data directory

We need the debug flag to allow 'run-as' to only allow
commands to be executed on debuggable packages, even on
production devices.
2010-02-09 18:18:55 -08:00
Christopher Tate
46d4525abc Print the snapshot focus rather than the Window Manager's actual current focus
when dumping key-timeout information around an ANR.

Change-Id: Ia70a71029663fa134078ea9ab40f0a6a7f3945ea
2010-02-09 15:55:03 -08:00
Dianne Hackborn
e83cefcef0 New external storage APIs.
This implements the spec for external storage organization, and
properly reflects how the media scanner organizes the files it finds.

Also includes package manager support for removing app private
files from external storage when the application is uninstalled.

For the new APIs and paths, the main place to look is Environment
and Context.
2010-02-09 14:20:55 -08:00
Ken Shirriff
53d0c7f4a0 Merge "Change key dispatch timeout logging." 2010-02-09 14:05:48 -08:00
San Mehat
59443a673a MountService: Check for failure to unmount when enabling UMS and fix reversed logic
Signed-off-by: San Mehat <san@google.com>
2010-02-09 13:28:45 -08:00
San Mehat
b104340496 Framework: Clean up / Refactor Mount APIs
- Move android.storage.* -> android.os.storage.* and refactor users
 - Refactor generic shares back to explicit ums enable/disable/isEnabled
 - Remove media insert/removed event callbacks (not ready for Froyo)
 - Remove 'label' from volume state change callbacks
 - Add public API functions for enabling/disabling USB mass storage (permissions enforced
   in MountSevice)
 - Remove some stray un-needed import lines
 - Move android.os.IMountService / android.os.IMountServiceListener -> android.os.storage
 - Improve code comments

Updated:
  MountService: Add dup state check and move debugging behind a conditional
  UsbStorageActivity: Fix review comments + a TODO
  StorageNotification: Add @Override tags
  StorageManager: Don't use a static Listener list
  MountService: Reduce bloat and fix == where I meant .equals()
  PackageManagerTests: Update for new API

Signed-off-by: San Mehat <san@google.com>
2010-02-09 11:03:16 -08:00
San Mehat
3ee1317173 NotificationManagerService: Add a listener for storage events
Signed-off-by: San Mehat <san@google.com>
2010-02-09 11:03:15 -08:00
San Mehat
7659117647 Merge "MountService: Harden for pre-boot usage users" 2010-02-09 11:02:44 -08:00
San Mehat
6bdcc06115 Merge "MountService: Add WARN checks to ASEC calls to catch bad users" 2010-02-09 11:02:32 -08:00
San Mehat
18457fd41e Merge "NativeDaemonConnector: Improve error reporting and debug formatting" 2010-02-09 08:59:13 -08:00
San Mehat
c8da710f00 Merge changes I1aabef01,I8dbd0f83
* changes:
  SystemServer: Move MountService startup before NotificationManagerService
  StorageManager: Check for a null MountService
2010-02-09 08:58:23 -08:00
Suchi Amalapurapu
7040ce7866 resolved conflicts for merge of 37a00a36 to master 2010-02-08 23:55:56 -08:00
Mike Lockwood
628fd6d9c1 Network Location unbundling:
The network location and geocode provider services are now started on demand
and their interfaces are now retrieved via bindService().

Remove obsolete LocationManager installLocationProvider() and installGeocodeProvider() methods.

Add abstract class android.location.provider.GeocodeProvider to provide a public wrapper to
the IGeocodeProvider Binder interface. Replaces the LocationManager.GeocodeProvider interface.

Rename LocationProviderImpl to android.location.provider.LocationProvider.

Move LocationManager.reportLocation() to android.location.provider.LocationProvider,
so all methods related to external location providers are now all in one class.

Avoid calling from the Location Manager Service into providers that are disabled so we
do not start the network location service unnecessarily.

Change-Id: If3ed2d5d62b83ba508006711d575cad09f4a0007
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-08 23:20:27 -05:00
San Mehat
207e538350 MountService: Harden for pre-boot usage users
- Connection to native daemon now happens on creation instead of ON_BOOT
- Don't emit share change broadcasts before system is booted
- Protect against public API usage before we're ready

Signed-off-by: San Mehat <san@google.com>
2010-02-08 19:29:58 -08:00
San Mehat
f919cd02df MountService: Add WARN checks to ASEC calls to catch bad users
Signed-off-by: San Mehat <san@google.com>
2010-02-08 19:29:58 -08:00
San Mehat
1ff4371ef2 NativeDaemonConnector: Improve error reporting and debug formatting
Updated:
  NativeDaemonConnector: Put debugging behind a conditional

Signed-off-by: San Mehat <san@google.com>
2010-02-08 19:29:58 -08:00
San Mehat
1bf3f8be7c SystemServer: Move MountService startup before NotificationManagerService
Signed-off-by: San Mehat <san@google.com>
2010-02-08 19:29:58 -08:00
Suchi Amalapurapu
37a00a36fb am 08be55b8: Add null checks when scanning a package. Delete packages whose code and resource paths haven\'t been set correctly.
Merge commit '08be55b8ea917a5273c135a7bdc73e41c8524c05' into eclair-plus-aosp

* commit '08be55b8ea917a5273c135a7bdc73e41c8524c05':
  Add null checks when scanning a package.
2010-02-08 17:27:33 -08:00
Suchi Amalapurapu
08be55b8ea Add null checks when scanning a package.
Delete packages whose code and resource paths haven't been set
correctly.
2010-02-08 17:10:24 -08:00
Christopher Tate
b49ceb3b8b Remember which apps have available restore info in the ancestral dataset
When we perform a full-system restore, remember the set of applications which
have data available in our ancestral dataset.  This is a key filter for not
having to do a round trip to the [remote] storage backend at app-install time
unless it is likely to be fruitful.

Change-Id: I7c77b490c560c581888d84f02f258b2e2d73bc69
2010-02-08 16:29:22 -08:00
Suchi Amalapurapu
b56ae20b22 Rename media resource broadcasts
Add checks for fwdlocked and updated system apps
add more tests
remove duplicate adds
2010-02-08 14:52:25 -08:00
Ken Shirriff
8200b20fe6 Change key dispatch timeout logging.
The mToken logging seems redundant and confusing.
Clarify what sending to <null> means.
Clarify what dispatch state and current state mean.
2010-02-08 11:09:17 -08:00
Chris Tate
cb14ec1305 Merge "Don't hold the backup queue lock across a backup operation" 2010-02-05 12:38:51 -08:00
Mike Lockwood
1688d312e5 Merge "Keep automatic screen brightness monotonically increasing until screen is turned off." 2010-02-05 12:38:02 -08:00
Dan Egnor
97e4494728 Add an AlarmManager API to set the system time (with the proper permissions). 2010-02-05 12:31:41 -08:00
Mike Lockwood
b286541674 Keep automatic screen brightness monotonically increasing until screen is turned off.
This is an experimental change to avoid the light sensor screen fluctuation problem.
We only do this when undocked to since the lighting should be stable in the docked case
and since the dock keeps the screen on we need to be able to adjust the lighting.

Change-Id: I70afcc393f51f2679be8228d6cb993ddc07e5986
BUG: 2387223
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-05 14:33:14 -05:00
Christopher Tate
c61da3136b Don't hold the backup queue lock across a backup operation
This got lost in the shuffle when the backup process was retooled to run
synchronously within a single spun-off HandlerThread.  Formerly it was okay
to hold the lock around the point in time when the backup service thread was
being spun off, but once that became synchronous it wound up locking out
apps' calls to dataChanged(), which in turn led to ANRs.

Bug: 2421333
Change-Id: Icf378e5733af5f28a689c564494486cd3555eca7
2010-02-05 10:41:27 -08:00
Chris Tate
5c1779b8ac Merge "Add single-package restore from an app's most-recent data" 2010-02-04 16:27:42 -08:00
Christopher Tate
8472581aa3 Add single-package restore from an app's most-recent data
Renamed the RestoreSession performRestore() method to restoreAll(), and
added a new restorePackage() method that only restores the single
specified app.  In order to restore an app other than itself, the
caller must hold the android.permission.BACKUP permission.

This change also introduces dataset tracking:  the Backup Manager
persistently remembers both the current backup dataset's identity
and that of the "ancestral" dataset, i.e. the one most recently used
for a whole-device restore such as performed by SetupWizard.  When a
single package is restored via restorePackage(), the selection of
most-recent dataset to use is this:

1. The data from the currently-active backup dataset, if such exists.
   An app that has ever backed up data will therefore get its last-
   known-good data.

2. The app's data from the ancestral dataset, if such exists.  This
   covers the case of a factory reset followed by reinstallation of
   an app at a later time.  The app had not yet backed anything up
   post-wipe, but the old data is in the ancestral dataset and should
   be brought forward when the app reappears.

3. If neither 1. nor 2. exist, there is no data to restore, so just
   skip it and return failure.

Note that the infrastructure to automatically attempt a restore after
an application has been installed does not yet exist; that's coming.

Change-Id: I0ba170df9885128000c46ed28d3dddda3a63a143
2010-02-04 16:01:09 -08:00
Daniel Sandler
64226a49b7 Merge "Add support in StatusBarManager for disabling ticker text." 2010-02-04 15:58:18 -08:00
Daniel Sandler
91e1d0cdda Add support in StatusBarManager for disabling ticker text.
The new flag, DISABLE_NOTIFICATION_TICKER, will be used by
the car dock app (in conjunction with DISABLE_EXPAND) to
minimize distractions to the driver.

It may also be used by the secure lockscreen to avoid
leaking personal information when the screen is on but the
device is locked (e.g. when the desk dock app is running).

Change-Id: Ibc8efde7da7501767163ae0a75f7c369b824e2a2
2010-02-04 15:55:00 -08:00
Ken Shirriff
5c19aeca3d API review: TrafficStats: rename Pkts to Packets
Rename getMobileTxPackets(), getMobileRxPackets(), getTotalTxPackets(),
getMobileRxPackets()

bug 2420318
2010-02-04 14:37:21 -08:00
Kenny Root
8f3ff09556 Merge "resolved conflicts for merge of dd24f599 to master" 2010-02-04 14:26:40 -08:00
Kenny Root
2cce6267a0 resolved conflicts for merge of dd24f599 to master
Change-Id: I57c349c493d69585d4c85e8c0970649708c6bd33
2010-02-04 14:23:39 -08:00
Dianne Hackborn
2a9094d079 Framework part of issue #2391576: Add method to start the Jit and call it 2010-02-04 11:54:34 -08:00
Eric Laurent
dd24f59906 am aead64de: Fix issue: 2413494: [Passion-c] Add TTY support.
Merge commit 'aead64def1fe58c95c086a0ca00cf0b13fa32ef1' into eclair-plus-aosp

* commit 'aead64def1fe58c95c086a0ca00cf0b13fa32ef1':
  Fix issue: 2413494: [Passion-c] Add TTY support.
2010-02-04 09:34:34 -08:00
Robert Greenwalt
d0e18ffb82 First pass at USB Tethering.
bug:2281900
2010-02-04 09:15:06 -08:00
Eric Laurent
aead64def1 Fix issue: 2413494: [Passion-c] Add TTY support.
Handle TTY mode change events received by HeadsetObserver and send information down to AudioHardware with AudioManager.setParameters()

Use setting "tty_mode_uses_heaset_events" in core config.xml to indicate if the product uses this particular
method of indicating the TTY mode change.
2010-02-03 23:35:34 -08:00
Joe Onorato
f1dd37ac28 Merge "Fix 1667521 - system process crash after bad notification" 2010-02-03 20:25:43 -08:00
Joe Onorato
68065e0a19 Fix 1667521 - system process crash after bad notification
The steps to reproduce this were kind of interesting.  You needed to have
a notification with a bogus RemoteViews in the first position in the list,
and then have another notification come in with an earlier timestampe.  In
that case, it would get a bad index for the new (not bogus) view that was
being added.
2010-02-03 20:21:41 -08:00
Dianne Hackborn
fa6bc84e01 Merge "Implement system data migration support." 2010-02-03 18:18:56 -08:00
Dianne Hackborn
b858dfda50 Implement system data migration support.
This adds three new features:

- <original-package android:name="com.foo" /> manifest tag.
  This allows an .apk to specify another package it originally came from,
  propagating all state and data from the old to new package.

- <adopt-permissions android:name="com.foo" /> manifest tag.
  In some more complicated cases, a new .apk may be a combination
  of multiple older .apks that each declared their own permissions.
  This allows you to propagate the permissions from these other
  .apks into the new one.

- A new system/etc/updatecmds directory.
  You can place files here which describe data files to move from
  one package to another.  (See below for details.)

Also in this change: we now clean up the data directories of
.apks that disappear from the system image, and some improvements
to logging and reporting error messages.

A typical file in the updatecmds directory looks like this:

-------
com.google.android.gsf:com.google.android.providers.talk
    databases/talk.db
com.google.android.gsf:com.google.android.googleapps
    databases/gls.db
-------

This says that for com.google.android.sfs, there are two packages to
move files from:

From com.google.android.providers.talk, the file databases/talk.db.
From com.google.android.googleapps, the file databases/gls.db

As part of moving the file, its owner will be changed from the old
package to whoever is the owner of the new package's data directory.

If those two files had existed, after booting you would now have the
files:

/data/data/com.google.android.gsf/databases/talk.db
/data/data/com.google.android.gsf/databases/gls.db

Note that all three of these facilities assume that the older .apk
is completely removed from the newer system.  The WILL NOT work
correctly if the older .apk still remains.
2010-02-03 15:42:02 -08:00
Chris Tate
348f7b9048 Merge "Add auto-restore setting and Backup Manager awareness thereof" 2010-02-03 15:35:28 -08:00
Christopher Tate
cce9da5dc3 Add auto-restore setting and Backup Manager awareness thereof
This setting, like BACKUP_ENABLE, should never be set directly in the secure
settings database.  Instead, it should be manipulated through the new IBackupManager
method setAutoRestore(boolean).

Change-Id: I5c3226ca85b6148bb756d753d7f9e4ea76e878c4
2010-02-03 15:33:52 -08:00
San Mehat
ec4caa0f54 NativeDaemonConnector: Improve NativeDaemonException reporting to include the actual error response
Signed-off-by: San Mehat <san@google.com>
2010-02-03 14:37:43 -08:00
Suchi Amalapurapu
08675a3376 Apps on sdcard: Add new broadcasts
Add new broadcasts ACTION_MEDIA_RESOURCES_AVAILABLE and
ACTION_MEDIA_RESOURCES_UNAVAILABLE that get broadcast by
PackageManagerService when sdcard gets mounted/unmounted
by MountService so that packages on sdcard get recognized by
various system services as being installed/available or
removed/unavailable by the system.
The broadcasts are sent before the actual package cleanup which includes
mounting/unmounting the packages and we force a gc right after so
that any lingering file references to resources on sdcard get
released.
2010-02-02 18:33:29 -08:00
Chris Tate
37b2217600 Merge "Get rid of now-superfluous "backup or restore in progress" tracking" 2010-02-02 15:27:55 -08:00
Christopher Tate
c2af5d3bf8 Get rid of now-superfluous "backup or restore in progress" tracking
Now that backup/restore/etc operations are queued and serialized, we no longer
need to use external state tracking to prevent overlapping operations.

Change-Id: I14f2a5d740cb97ae062aad55a06f49a2be5dd985
2010-02-02 15:24:39 -08:00