2041 Commits

Author SHA1 Message Date
Christopher Tate
136b1f927f Fix spurious ANRs involving window shuffling and non-fullscreen activities
Force the event-target bookkeeping to reset when an app explicitly
acknowledges event receipt.  Furthermore, notify the event dispatcher
whenever a new window is created, even if there is nominally an
existing event target window.

These changes in tandem address a subtle race bug in which the event
dispatcher believes that there is an event recipient that it is still
waiting for even when the event in question has been acknowledged;
this results in a spurious ANR.  There were checks in the existing code
that wound up doing the right thing in the case of windows becoming
hidden, but the case of non-fullscreen activities floating over them
[unavailable for input but still visible] exposed the race condition.

Bug: 2432828
Change-Id: I29fb741aace34736b029f9ba43f2c43184366258
2010-02-11 18:07:22 -08:00
Dianne Hackborn
315ada7fbb Get rid of the limit-unlock policy control.
This is merged with force-lock.  These both allow effectively the same thing,
so there is no reason to junk up the user experience with them as separate
entities.
2010-02-11 14:36:30 -08:00
Tobias Haamel
27b28b3f62 Introduce special UI modes for night and car usage.
The device mode is now called ui mode. Furthermore is the order of
precedence for the resources now in such a way that the ui mode needs
to be specified after the orientation and before the density.

The ui mode can be set, like it is done for the locale, as follows:

IActivityManager am = ActivityManagerNative.getDefault();
Configuration config = am.getConfiguration();
config.uiMode = Configuration.UI_MODE_TYPE_CAR | Configuration.UI_MODE_NIGHT_ANY;
am.updateConfiguration(config);

To allow users to disable the car mode and set the night mode the IUiModeManager
interface is used.

The automatic night mode switching will be added in a separate change.
2010-02-11 21:25:58 +01:00
The Android Open Source Project
3941411a21 am 1e90ab54: merge from open-source master
Merge commit '1e90ab542d675616e9370ab7e5add99d7af12587'

* commit '1e90ab542d675616e9370ab7e5add99d7af12587':
  Fixs the incorrect message for SecurityException
  Default RotateDrawable's pivot set to (50%, 50%)
2010-02-11 11:20:40 -08:00
Eric Laurent
777db0c08a Merge "resolved conflicts for merge of 61bb25f2 to master" 2010-02-11 11:16:36 -08:00
Dianne Hackborn
6dee18c5cf New implementation of <original-package> tag.
We now have the new package retain the name of the old package.  This makes
sure that all existing references to it (shortcuts, widgets, etc) will still
work.

This does mean that your package can run under either the old or new name,
depending on whether the user got it with an update.  Buyer beware!

I have tried testing all of the paths of updating, installing another
update in /data, uninstalling the update, updating system with an even
newer update, etc.  I think they all work.  No promises though.
2010-02-11 11:04:49 -08:00
Dan Egnor
c0d71d3723 Merge "Truncate SYSTEM_TOMBSTONE events at the end (take the head), but still truncate the other log files at the start (take the tail)." 2010-02-11 10:47:41 -08:00
Dan Egnor
289e58051d Truncate SYSTEM_TOMBSTONE events at the end (take the head),
but still truncate the other log files at the start (take the tail).
2010-02-11 10:40:49 -08:00
Eric Laurent
d7b92a0ff3 resolved conflicts for merge of 61bb25f2 to master 2010-02-11 10:38:28 -08:00
San Mehat
1ab6d75158 Merge "MountService: Fix some mountset bugs and tighten up some return values" 2010-02-11 10:25:59 -08:00
Dan Egnor
18e9396235 Eliminate dependencies on Checkin, replacing checkin events with EventLog
events (and in one case, a DropBox entry).

Add a simple intent that triggers master-clear (and toggle EFS), given the
right permissions.

Bug: 2264596
Bug: 2350452
Bug: 2264596
2010-02-11 10:22:09 -08:00
The Android Open Source Project
1e90ab542d merge from open-source master 2010-02-11 10:03:02 -08:00
Eric Laurent
61bb25f2f9 am c1eba82b: Merge "Fix issue: 2413494: Add TTY support." into eclair
Merge commit 'c1eba82ba479006045c1d7a4c8ceba116a9602d1' into eclair-plus-aosp

* commit 'c1eba82ba479006045c1d7a4c8ceba116a9602d1':
  Fix issue: 2413494: Add TTY support.
2010-02-11 09:34:59 -08:00
San Mehat
a181b21305 MountService: Fix some mountset bugs and tighten up some return values
Signed-off-by: San Mehat <san@google.com>
2010-02-11 06:50:31 -08:00
Bjorn Bringert
b298351023 Merge "Fix NPE in AppWidgetService.addProvidersForPackageLocked()" 2010-02-11 02:00:24 -08:00
Irfan Sheriff
102d05fa91 get DHCP IP on each connection
The IP state was not being refreshed when the supplicant transitions
from COMPLETED to ASSOCIATED to COMPLETED. This can lead to
a connected state with no real connection due to old IP settings.
The fix refreshes IP on each connection.

Bug: 2329261
Change-Id: I38cd56369ee2d8ab3e0f06f5c9f5712b9b2f35a0
2010-02-10 15:22:58 -08:00
Bjorn Bringert
5f85780db0 Fix NPE in AppWidgetService.addProvidersForPackageLocked()
queryBroadcastReceivers() can return null, so AppWidgetService
should guard against that.

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

Change-Id: I1ba83c0c37622e0280f3dba2fef5eca2cc90c975
2010-02-10 23:09:48 +00:00
Ben Cheng
23085b781e Support per-application switch to execute the VM in safe mode.
The new attribute can be set by adding android:safeMode="true"
in AndroidManifest.xml with the SDK.

Tested with pairing locally compiled SDK with Eclipse and verified that the JIT
(the only component currently included in the safe mode) is indeed disabled
with the new attribute.

Bug: 2267583
2010-02-10 14:51:31 -08:00
Makoto Onuki
a7d7f79c40 Adding null check. 2010-02-10 12:16:29 -08:00
Eric Laurent
7749adfd01 Fix issue: 2413494: Add TTY support.
This is a new implementation of TTY support.
Previous implementation in commit aead64def1fe58c95c086a0ca00cf0b13fa32ef1 is reverted.
The new method does not rely any more on the kernel headset driver to send a UEvent containing
current TTY mode.
2010-02-10 11:23:04 -08:00
San Mehat
d0efb6bc15 Merge "StorageNotification: Move notification / usb storage activity into StatusBarPolicy" 2010-02-10 11:21:50 -08:00
Chander S Pechetty
27f3de6bac Fixs the incorrect message for SecurityException
when injecting a Key, Pointer and Trackball events into the UI across
applications, the corresponding methods throw SecurityException with
incorrect permission message.
INJECT EVENT permission should be INJECT_EVENTS
2010-02-10 22:14:00 +05:30
Mike Lockwood
d03ff94fe5 Clean up interface between LocationManagerService and the location providers:
LocationManagerService now uses new Java interface LocationProviderInterface
rather than LocationProviderProxy to refer to location providers internally.

LocationProviderProxy and the ILocationProvider binder interface are only
used for location providers implemented as services (NetworkLocationProvider)

Built-in location providers (GpsLocationProvider and mock providers) now just
implement LocationProviderInterface rather than using a Binder interface and proxy object.

Delete obsolete and unused TestLocationProvider class.

Change-Id: Id800e7c1864f7c666f8e37125c05896493b9c8c4
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-10 09:41:25 -05:00
San Mehat
4154c07c5c StorageNotification: Move notification / usb storage activity into StatusBarPolicy
Signed-off-by: San Mehat <san@google.com>
2010-02-09 19:33:58 -08:00
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