8680 Commits

Author SHA1 Message Date
Nick Pelly
ea5056e5a7 Add documentation to help developers make an RFCOMM conection to a Bluetooth
serial board. They all use a well-known UUID that is not really explained
anywhere official, and this always trips developers up.

Change-Id: I53bda44b580f472b1ff1ad196b25485b68f4b5d5
2010-02-24 11:19:10 -08:00
Romain Guy
9844b27c05 Merge "Remove unused private assets from Android 1.0." 2010-02-23 16:01:37 -08:00
Romain Guy
3ce488143c Remove unused private assets from Android 1.0. 2010-02-23 16:00:52 -08:00
Brian Carlstrom
778ce48665 Issue 5697: getContextClassLoader returns a non-application classloader
ActivityThread should try to set the value for Java
Thread.getContextClassLoader to the PathClassLoader that loaded the
APK's classes so that Java frameworks that use the Java context class
loader, which is not to be confused with the
android.content.Context.getClassLoader which serves a similar purpose
in the Android framework.

However, we avoid setting the Java context ClassLoader to the APK's
PathClassLoader if there is a static indication that multiple packages
may share the VM, since they could load in an unpredictable order
leading to different values for the thread local Java context
ClassLoader. In this case, we instead use a specially created
WarningContextClassLoader that warns the user the first time the Java
context ClassLoader.

Currently the static indications that a package might share a VM with
other packages are the presence in the AndroidManifest of a
sharedUserId or requesting a non-default application process name.
2010-02-23 15:58:00 -08:00
Joe Onorato
5900dc7c33 Merge "Remove never-used dead code from BackupManager" 2010-02-23 15:09:49 -08:00
Christopher Tate
474507f15a Remove never-used dead code from BackupManager
Change-Id: I93a8341160815e29625a978fee27014beb2c6a26
2010-02-23 15:01:52 -08:00
Jim Miller
2ca759dbf5 Merge "Fix 2463886: Allow delayed fetching of DevicePolicyManager in LockPatternUtils." 2010-02-23 14:16:46 -08:00
Jim Miller
5b0fb3a7e8 Fix 2463886: Allow delayed fetching of DevicePolicyManager in LockPatternUtils.
Today we're seeing a crash that's likely caused by a change in the order in which
system services start.

The crash we're seeing happens in response to user interaction which happens after the
boot process completes, so we should re-fetch the DevicePolicyManager if we weren't
able to get it when LockPatternUtils was constructed.
2010-02-23 13:46:35 -08:00
Doug Zongker
ff592dc2fa fix some minor javadoc errors in AccountManager
Change-Id: Iafc9e5541e56b936a426999e0ae9f99e56dccd51
2010-02-23 12:26:33 -08:00
Adam Powell
925b4da097 Merge "Fixing pressed state in preferences, addresses bug 2310741" 2010-02-23 12:09:07 -08:00
Adam Powell
5375116901 Fixing pressed state in preferences, addresses bug 2310741 2010-02-23 12:05:14 -08:00
Dan Egnor
c0e147d469 Merge "Update AccountManager's javadoc." 2010-02-23 11:57:13 -08:00
Dan Egnor
661f0130de Update AccountManager's javadoc.
Includes several potentially controversial major changes:

- Remove the amount of repeated boilerplate explanations of common
idioms.  I find them much more distracting than useful.  The same
things are explained, but in fewer places.

- Add more narrative/directive information instead of merely descriptive
commentary; I included a lot of "color" about who particular methods are
intended for and why you might use them.

- Add explicit guidance (in the class javadoc) about the common usage pattern.
Explicitly document the auth token invalidation dance, which is highly
nonobvious, had never been written down before, and which GMM got wrong,
creating a Latitude conops nightmare they're still digging out of.

- Explain and justify, as best I can, the overall model of account management:
saved credentials, pluggable authenticators, auth tokens, and so on.  Clarify
some things, like that setPassword() changes the locally cached credential
but does not set the user's password on the server.

- Clarify what the passed-in Activity parameter is used for.  (It seems silly,
but I was confused by this: is it supposed to be the Activity that actually
performs the password prompt or whatever?  No, it's just a Context for the
startActivity() to be launched from.)
2010-02-23 11:53:59 -08:00
Bjorn Bringert
cfe79e9220 Merge "Clean up global search and web search activity finding" 2010-02-23 06:28:31 -08:00
Bjorn Bringert
6cf7a325e6 Clean up global search and web search activity finding
This removes the '*' value for android.app.searchable and
android.app.default_searchable that was previously used by apps to say
that they want global search as their search. I think the only
activity that this will affect is the wallpaper chooser in the
launcher, which doesn't seem like it matters.  It could mean that some
third party code will stop invoking global search, but all they would
need to do is call startSearch() with globalSearch=true instead.

Fixes http://b/issue?id=2377433 and http://b/issue?id=2377429

Change-Id: I0252952b44ae85dab31221b598ed79cc24e2b580
2010-02-23 14:27:43 +00:00
Valentin Kravtsov
d162a114cc Increasing the VS button's touchable area
adding invisible padding to the background buttons

Change-Id: Icb8ff9b31e83049520566c2498e1f82067636897
2010-02-23 11:29:17 +00:00
Dianne Hackborn
9e0f5d9a63 Fix some random bugs.
2185256: After open &close of device keyboard shortcut does not added to Home desktop.

ActivityThread was losing the last saved state when restarting or launching into
a paused state.

2366174: defaults not cleared when they should be

PackageManagerService now removes any preferred activity records for a package
when it is uninstalled.

2154556: Battery stats can have an unbounded number of wake locks

We now start combining wake locks into one shared record when we hit a
maximum limit (currently 20).

2442519: Foreground services can have no notification by providing a bogus one.

If the notification manager rejects our notification, the service is forced to
no longer be in the foreground.

2442383: Finalization issues in com.android.server.am.PendingIntentRecord.java

Cleaned up finalization to call super class and avoid the big activity manager
lock (we still need to use the locks inside of the message system, but these
are much less likely to be a problem).

2284190: Cannot call a phone number using adb

We weren't getting the calling uid/pid in startActivity() if the caller did not
supply an application record.
2010-02-22 20:45:58 -08:00
Makoto Onuki
2f6a01858b Fix bug 2183276: Synchronize all mManagedCursors accesses. 2010-02-22 17:27:57 -08:00
Romain Guy
a2fb0b7918 Merge "Prevent crash in AbsSpinner when the selection is out of sync. Bug #196253" 2010-02-22 17:01:26 -08:00
Romain Guy
afc0155718 Prevent crash in AbsSpinner when the selection is out of sync.
Bug #196253

Also do a little bit of syntax cleanup, remove unused code, etc.
2010-02-22 16:48:47 -08:00
Adam Powell
42122b6aa6 Merge "Standard alert dialogs overscroll only when content scrolls" 2010-02-22 16:36:38 -08:00
Brad Fitzpatrick
fde3290374 Merge "Reduce SQLiteDatabase and ContentResolver EventLog logging thresholds." 2010-02-22 16:32:25 -08:00
Adam Powell
8e4e7263e5 Standard alert dialogs overscroll only when content scrolls 2010-02-22 15:18:14 -08:00
Brad Fitzpatrick
25880968cb Reduce SQLiteDatabase and ContentResolver EventLog logging thresholds.
Turns out the database is used a ton, and not particularly quickly, so
these were spamming the logs at their prior 100ms thresholds.  Setting
it to 500ms now.  (still sub-sampled, so should be ~5x less spammy...)
2010-02-22 15:17:49 -08:00
Romain Guy
17b7d97d71 Merge "Fix bug where calling getButton(int) returns null." 2010-02-22 14:17:52 -08:00
Adam Powell
1efc95f54e Merge "Don't switch layout modes in AbsListView#onTouchModeChanged() Don't stomp mResurrectToPosition for LAYOUT_SPECIFIC in AbsListView#hideSelector()" 2010-02-22 14:14:46 -08:00
Romain Guy
6fe2b22085 Fix bug where calling getButton(int) returns null.
Fixes external bug http://code.google.com/p/android/issues/detail?id=6360
2010-02-22 14:11:40 -08:00
Tobias Haamel
29274dc363 Also fix the API description file after UI_MODE_SERVICE rename. 2010-02-22 22:27:41 +01:00
Vasu Nori
93ed831c90 Merge "fix race condition introduced by CL https://android-git.corp.google.com/g/40395" 2010-02-22 12:58:44 -08:00
Dianne Hackborn
299102f8c3 Merge "Fix missing UI_MODE_SERVICE rename." 2010-02-22 12:57:41 -08:00
Bjorn Bringert
da576e8c84 Merge "Don't start global search from system dialogs" 2010-02-22 12:57:13 -08:00
Tobias Haamel
69fb574e29 Fix missing UI_MODE_SERVICE rename. 2010-02-22 21:54:05 +01:00
Bjorn Bringert
b8144a9c18 Don't start global search from system dialogs
Also, set FLAG_ACTIVITY_NEW_TASK to allow launching
global search from non-activity contexts.

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

Change-Id: I833d5b851f0127fb69165fbfc7d1ee190b320401
2010-02-22 20:48:57 +00:00
Tobias Haamel
5333288354 Manager for controlling the UI modes.
The ui modes can be controlled with the UiModeManager class, which
is can be retrieved as a system service via getSytemService(Context.UIMODE_SERVICE).

The class is necessary so that CarHome can be unbundled and other apps can
disable the car mode. Its currently a hidden class, since I'm not sure if this
is the best way to provide this functionality to the user.
2010-02-22 21:42:39 +01:00
Vasu Nori
ec37e42fb2 fix race condition introduced by CL https://android-git.corp.google.com/g/40395 2010-02-22 12:32:52 -08:00
Dianne Hackborn
21f1bd17b2 Fix issue #2438980: Implement package watcher for voice recognizer service setting
I am getting tired of writing package monitor code, realized this is missing in
a number of places, and at this point it has gotten complicated enough that I
don't think anyone actually does it 100% right so:

Introducing PackageMonitor.

Yes there are no Java docs.  I am still playing around with just what this
thing is to figure out what makes sense and how people will use it.  It is
being used to fix this bug for monitoring voice recognizers (integrating the
code from the settings provider for setting an initial value), to replace
the existing code for monitoring input methods (and fix the bug where we
wouldn't remove an input method from the enabled list when it got
uninstalled), to now monitor live wallpaper package changes (now allowing
us to avoid reverting back to the default live wallpaper when the current
one is updated!), and to monitor device admin changes.

Also includes a fix so you can't uninstall an .apk that is currently enabled
as a device admin.

Also includes a fix where the default time zone was not initialized early
enough which should fix issue #2455507 (Observed Google services frame work crash).

In addition, this finally introduces a mechanism to determine if the
"force stop" button should be enabled, with convenience in PackageMonitor
for system services to handle it.  All services have been updated to support
this.  There is also new infrastructure for reporting battery usage as an
applicatin error report.
2010-02-22 11:27:52 -08:00
Adam Powell
ab3e105282 Don't switch layout modes in AbsListView#onTouchModeChanged()
Don't stomp mResurrectToPosition for LAYOUT_SPECIFIC in AbsListView#hideSelector()
2010-02-22 11:22:31 -08:00
Joe Onorato
bcea8124a1 Merge "Ignore touch down events near the edge of the screen for the purposes of pulling down the windowshade." 2010-02-22 10:56:18 -08:00
Joe Onorato
679dd12fa1 Ignore touch down events near the edge of the screen for the purposes of pulling down the
windowshade.

This makes it happen less often when you pick up the device or push open the keyboard.
2010-02-22 10:52:11 -08:00
Brad Fitzpatrick
4bd222f107 Merge "Don't let email addresses in database names get into the EventLog." 2010-02-22 09:10:19 -08:00
Brad Fitzpatrick
d833023307 Don't let email addresses in database names get into the EventLog.
Because some apps make SQLite database names containing email
addresses, we take care not to log those email addresses in the
EventLog, so other apps with READ_LOGS access can't read them.
2010-02-22 09:09:21 -08:00
Daniel Sandler
7edf7388b8 Merge "Add new action for launching the user's music player app." 2010-02-22 06:32:25 -08:00
Leon Scroggins
4379dca2f4 Change the text for the browser downloads and history views.
Fix for http://b/issue?id=2450232
2010-02-22 09:13:57 -05:00
Daniel Sandler
edcdbb6d3b Add new action for launching the user's music player app.
android.intent.action.MUSIC_PLAYER

http://b/2237931
2010-02-22 09:04:27 -05:00
Chris Tate
232f24e9c1 Merge "Automatically restore app data at install time" 2010-02-19 18:23:45 -08:00
Jim Miller
2cfa2c2f02 Merge "Fix 2448345: Fix tactile feedback bug in password/PIN and pattern unlock." 2010-02-19 18:18:04 -08:00
Christopher Tate
1bb6906c7a Automatically restore app data at install time
When an application being installed defines a backupAgent in its manifest, we
now automatically perform a restore of the latest-known-good data for that app.
This is defined as "data backed up by this app from this handset, if available;
otherwise data for this app as it existed when the device was initially
provisioned."  If neither option exists for the app, no restore action is
taken.

The CL involves major changes in the Backup and Package Managers...

* The Package Manager's act of installing an application has now been split
into two separate phases, with a data-restore phase optionally occurring
between these two PM actions.  First, the details of the install are performed
as usual.  Instead of immediately notifying install observers and issuing the
install-related broadcasts, the in-process install state is snapshotted and
the backup manager notified that a restore operation should be attempted.  It
does this by calling a new API on IBackupManager, passing a token by which it
identifies its in-progress install state.

The backup manager then downloads [if possible] the data for the newly-installed
application and invokes the app's backupAgent to do the restore.  After this
step, regardless of failure, it then calls back into the Package Manager to
indicate that the restore phase has been completed, supplying the token that
was passed in the original notification from the Package Manager.

The Package Manager then runs the final post-install actions: notifying install
observers and sending out all the appropriate broadcasts.  It's only at this
point that the app becomes visible to the Launcher and the rest of the OS.

... and a few other bits and pieces...

* The ApplicationInfo.backupAgentName field has been exposed to the SDK.  This
can be reverted if there's a reason to do so, but it wasn't clear that this
info needs to be hidden from 3rd party apps.

* Debug logging of restore set IDs and operation timeout tokens [used during
any asynchronous Backup Manager operation] are now consistently in hex for
readability.

* We now properly reset our binder identity before calling into the transport
during restore-set operations.  This fixes a permissions failure when a
single-app restore was attempted.

* The 'BackupTest' test app is no longer lumped onto the system partition
by default.

Change-Id: If3addefb846791f327e2a221de97c8d5d20ee7b3
2010-02-19 17:24:07 -08:00
Doug Felt
6ad5a7a7c7 Add a few simple tests of StaticLayout. 2010-02-19 16:23:02 -08:00
Ken Shirriff
35abad216d Add error logging to ContentProviderOperation.
This will dump out the contents of the operation in some error cases
to make debugging easier.
2010-02-19 15:30:44 -08:00
Suchi Amalapurapu
6c81defa3d Merge "Move package from internal to external and vice versa." 2010-02-19 14:27:29 -08:00