Commit Graph

1130 Commits

Author SHA1 Message Date
Kenny Root
3dee21eb0f Merge "Switch to returnCode for IPackageDeleteObserver" 2011-03-02 08:50:42 -08:00
Kenny Root
c39bb4aaa7 Switch to returnCode for IPackageDeleteObserver
Before the IPackageDeleteObserver only knew whether the deletion
succeeded or failed, but not the reason why.

Bug: 2520191
Change-Id: I1f0d7c04f06c539660b6e17e7e133defb0f61b5b
2011-03-01 09:27:57 -08:00
Mike Lockwood
c4308f01c9 Move USB framework support from android.hardware to android.hardware.usb package
Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01 08:07:20 -08:00
Mike Lockwood
f4ca247158 Add platform features for USB host and USB accessory support.
Also removed config_hasUsbHostSupport framework resource, which is now obsolete.

Change-Id: I6f18cc1c4f68085de8b8363e1b5edff79aff404f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-28 17:00:46 -08:00
Jeff Brown
239f77d20a Fix a regression matching intents when action doesn't matter.
Bug: 3482199
Change-Id: I0960e4396f4e71e9a3fc71146730030a52f96e9f
2011-02-26 16:03:48 -08:00
Dianne Hackborn
e7f972122d Implement issue #3426299: Introduce application "stopped" state
The package manager now keeps track of whether an application is
stopped.  There are new intent flags to control whether intent
filters in a stopped application will match the intent.  This is
currently used in one place, sending broadcasts, so that stopped
apps can not be launched due to background processes.

The package manager during first init makes sure no applications
are in the stopped state.  When new applications are installed,
that begin in the stopped state.  When the activity manager is
launching a component of an application, it ensures the application
is taken out of the stopped state.

The "force stop" button in manage applications will now put an
application back in to the stopped state; it can't go back out
of the stopped state until one of its components is launched by
the activity manager.

There will probably be a few more places where we need to filter
stopped applications out of intent matches, but doing this for
broadcast is a very big first step.

This also introduces a new broadcast that is sent to an application
after it is replaced with a new .apk.  But only if the app is not
in the stopped state.  This makes it a lot easier for developers to
implement code to get their application back in proper running shape
after an upgrade.

Finally another new broadcast is added that is sent to a package's
installer at the first time it is launched.  This allows the installer
to tell the package about it being installed only when it is first
actually used.

Change-Id: I589c53ff0e0ece868fe734ace4439c0d202dca2d
2011-02-25 14:46:27 -08:00
Jesse Wilson
57283d7aba Merge "Save a few bytes on the zygote heap." 2011-02-22 13:20:56 -08:00
Jesse Wilson
179a3bda60 Save a few bytes on the zygote heap.
The default LongSparseArray constructor builds two 10-element
arrays that we don't need.

Change-Id: I83ef4fbd8825109087cbe8990ad66d79eab33e5c
2011-02-17 20:04:54 -08:00
Alon Albert
1bad83adf0 Rename method to discourage use of this in favor of member field
Change-Id: Ie2d1e17e8879ad0f11fe815001fefccdd6603936
2011-02-16 10:29:56 -08:00
Alon Albert
d1c3fe022e Merge "Bring back auto clear backoff on reconnect Also, make sure it works this time by calling onBackoffChanged()" 2011-02-16 10:20:40 -08:00
Alon Albert
ed1d253573 Bring back auto clear backoff on reconnect
Also, make sure it works this time by calling onBackoffChanged()

Bug: 3460736
Change-Id: I0470d6cb0aabd798dab4116d5d135c7a2364ed28
2011-02-16 10:17:49 -08:00
Scott Main
55cdc0c904 am 0ab1b326: am 13033ea5: docs: fix misc broken links
* commit '0ab1b326c72afb2bd7798462fcdd8e5d3b440fd2':
  docs: fix misc broken links
2011-02-15 20:15:00 -08:00
Scott Main
0ab1b326c7 am 13033ea5: docs: fix misc broken links
* commit '13033ea52714d48d754c6bc8fccb18514c645a47':
  docs: fix misc broken links
2011-02-15 20:08:07 -08:00
Scott Main
13033ea527 docs: fix misc broken links
Change-Id: Id7d0ee36398aca452ceb2c3d15982397f58a06c6
2011-02-15 16:00:37 -08:00
Scott Main
121370d25c am 3c565377: am b508d6e2: Merge "docs: fix links to revised fundamentals documents" into honeycomb
* commit '3c5653773d6b48f27aa52d746a7a6f8728d5ba36':
  docs: fix links to revised fundamentals documents
2011-02-08 15:06:54 -08:00
Scott Main
3c5653773d am b508d6e2: Merge "docs: fix links to revised fundamentals documents" into honeycomb
* commit 'b508d6e26e3a1fd68bf637dc29df335f0e7ccd92':
  docs: fix links to revised fundamentals documents
2011-02-08 14:57:45 -08:00
Scott Main
7aee61f5a9 docs: fix links to revised fundamentals documents
Change-Id: Ie2a660cce1d00f924c9fde5c6a00776307e5e1c7
2011-02-08 11:37:44 -08:00
Alon Albert
f313e95821 Merge "Move handing of a "cancel" inside try-finally block" 2011-02-07 12:20:36 -08:00
Alon Albert
9257ec0563 Move handing of a "cancel" inside try-finally block
Bug: 3417906
Change-Id: I87e41c0cdad74e2ba72a7b4d1f059e72d106e105
2011-02-07 10:53:26 -08:00
John Reck
4b7b7ccd66 Fix COMPONENT_ENABLED_STATE check (copy from HC)
This fixes a problem where ai.enabled would be set to false incorrectly,
 causing widgets to not show up in launcher.

Change-Id: I25e11ab9033e1d8d3dcc581edcbe40acdddd1f85
2011-02-02 12:50:23 -08:00
Dianne Hackborn
fe86a7f64c am 723453a7: am e9da0c1d: Merge "Fix issue #3408542: "resizeable" attribute required to get out of compat mode" into honeycomb
* commit '723453a7a77180b47720d3b5e8a9752349b77e2f':
  Fix issue #3408542: "resizeable" attribute required to get out of compat mode
2011-01-31 15:01:16 -08:00
Dianne Hackborn
723453a7a7 am e9da0c1d: Merge "Fix issue #3408542: "resizeable" attribute required to get out of compat mode" into honeycomb
* commit 'e9da0c1de179e3cdb2d3709bde2b5cb6eb192230':
  Fix issue #3408542: "resizeable" attribute required to get out of compat mode
2011-01-31 13:56:24 -08:00
Dianne Hackborn
2bfa2ea1ec Fix issue #3408542: "resizeable" attribute required to get out of compat mode
The "resizeable" attribute of supports-screens was never well documented,
so many apps don't set it.  Assuming that if they are explicitly saying
they support large or xlarge screens then they are also implying that they
are resizeable.

Change-Id: Iaa1ad431c9868254af7581499477bff98ed109e5
2011-01-31 12:34:56 -08:00
Dianne Hackborn
cc322207cc am 97510f6a: am 260c3c77: Fix issue #3381489: IllegalStateException: attempt to re-open...
* commit '97510f6abda493119cbf7db84064291a7edacfc0':
  Fix issue #3381489: IllegalStateException: attempt to re-open...
2011-01-30 18:08:12 -08:00
Dianne Hackborn
97510f6abd am 260c3c77: Fix issue #3381489: IllegalStateException: attempt to re-open...
* commit '260c3c77d9b340164e055f87002c64d78da6e836':
  Fix issue #3381489: IllegalStateException: attempt to re-open...
2011-01-30 18:05:08 -08:00
Dianne Hackborn
260c3c77d9 Fix issue #3381489: IllegalStateException: attempt to re-open...
...an already-closed object: android.database.sqlite.SQLiteQuery

It turns out there is a state we are missing -- the loader is
still needed, but in the inactive list.  In this case the loader
needs to continue holding on to its current data, and not deliver
any new data (which would result in it releasing its old data).

This introduces the new state to Loader, and uses it in
AsyncTaskLoader so all subclasses of that should get the new
correct behavior.

A further improvement would be to unregister CursorLoader's
content listener when going in to this state, but that can
wait for later.

Change-Id: I6d30173b94f8e30b5be31d018accd328cc3388ec
2011-01-30 17:58:49 -08:00
Jeff Brown
2c376fc46c Optimize IntentResolver to reduce lookup time by 50%.
IntentResolver frequently iterates over hundreds of different IntentFilters
and spends much of its time creating iterators and comparing strings.
This change avoids reduces the amount of garbage created by eschewing
iterators where possible.  The FastImmutableArraySet type on its own
provides a 2.5x speed boost compared to repeatedly iterating over a HashSet.

In absolute terms, during orientation changes we spent about 160ms resolving
11 intents and performing 1129 calls to IntentFilter.match.  Now we spend
half of that time.

Change-Id: Ia120e0082c8cf0b572a0317b9ef4a22c766dbad6
2011-01-28 17:34:01 -08:00
Scott Main
c42eb2cce7 am d2b87091: am 0f2e2b8b: Merge "Update package descriptions with editorial revisions. Notably, this removes exessive info about resources from the content package, because it\'s not a good location and the info is avilable in the dev guide, but also added some of the
* commit 'd2b87091cc30c575496eb78ebea88297da775359':
  Update package descriptions with editorial revisions. Notably, this removes exessive info about resources from the content package, because it's not a good location and the info is avilable in the dev guide, but also added some of the info to the Resources class description.
2011-01-26 19:08:55 -08:00
Scott Main
d2b87091cc am 0f2e2b8b: Merge "Update package descriptions with editorial revisions. Notably, this removes exessive info about resources from the content package, because it\'s not a good location and the info is avilable in the dev guide, but also added some of the info to the R
* commit '0f2e2b8b82c7b589bcc603ce57f8ff3d1c947784':
  Update package descriptions with editorial revisions. Notably, this removes exessive info about resources from the content package, because it's not a good location and the info is avilable in the dev guide, but also added some of the info to the Resources class description.
2011-01-26 17:09:21 -08:00
Scott Main
0f2e2b8b82 Merge "Update package descriptions with editorial revisions. Notably, this removes exessive info about resources from the content package, because it's not a good location and the info is avilable in the dev guide, but also added some of the info to the Resources class description." into honeycomb 2011-01-26 17:06:45 -08:00
Fabrice Di Meglio
036dfd0653 am 3782fe2b: am f728411b: Merge "Fix bug #3395355 ("adb shell dumpsys content" should present human readable failure messages instead of error codes)" into honeycomb
* commit '3782fe2b23c4a6fa2e512f1d200ffa85c37bfb14':
  Fix bug #3395355 ("adb shell dumpsys content" should present human readable failure messages instead of error codes)
2011-01-26 15:46:17 -08:00
Fabrice Di Meglio
3782fe2b23 am f728411b: Merge "Fix bug #3395355 ("adb shell dumpsys content" should present human readable failure messages instead of error codes)" into honeycomb
* commit 'f728411ba40d71a40a0cb0dbfcaa44764af17692':
  Fix bug #3395355 ("adb shell dumpsys content" should present human readable failure messages instead of error codes)
2011-01-26 15:42:55 -08:00
Fabrice Di Meglio
f728411ba4 Merge "Fix bug #3395355 ("adb shell dumpsys content" should present human readable failure messages instead of error codes)" into honeycomb 2011-01-26 15:39:24 -08:00
Fabrice Di Meglio
dc2dd88249 Fix bug #3395355 ("adb shell dumpsys content" should present human readable failure messages instead of error codes)
- add human readable error messages

Change-Id: Ib6937684e61aca80b2c3bc78fd67b93c3df61d17
2011-01-26 15:35:47 -08:00
Scott Main
f4f05b8f24 Update package descriptions with editorial revisions.
Notably, this removes exessive info about resources
from the content package, because it's not a good location
and the info is avilable in the dev guide, but also
added some of the info to the Resources class description.

Change-Id: Ie78af26c9cec66314deb98e53078f48e16c08e70
2011-01-26 14:58:19 -08:00
Dianne Hackborn
7f13e47620 am 1a904ded: am 8fca2ecc: Merge "New extra for GET_CONTENT." into honeycomb
* commit '1a904dedbb5a15b3e60cac0fab83a3734701aff6':
  New extra for GET_CONTENT.
2011-01-25 16:19:48 -08:00
Dianne Hackborn
1a904dedbb am 8fca2ecc: Merge "New extra for GET_CONTENT." into honeycomb
* commit '8fca2eccb03b9b8d71ec4a7ec088d617edec4e73':
  New extra for GET_CONTENT.
2011-01-25 15:19:17 -08:00
Dianne Hackborn
c4d0e6fcea New extra for GET_CONTENT.
Change-Id: Ib367c02619ee301d9651dd70d35f7d57aa8a0cbc
2011-01-25 15:16:55 -08:00
Dianne Hackborn
1563966ca0 am 98d169ea: am 5d9d03a0: Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
* commit '98d169eacd65e6278bb8eab354f0278065771e9f':
  Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
2011-01-24 22:31:26 -08:00
Dianne Hackborn
98d169eacd am 5d9d03a0: Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
* commit '5d9d03a0234faa3cffd11502f973057045cafe82':
  Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
2011-01-24 22:12:36 -08:00
Dianne Hackborn
5d9d03a023 Maybe fix issue #3093599: java.lang.IndexOutOfBoundsException...
...Invalid index 0, size is 0 at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:2326)

It looks like if an arrow key is dispatched between the time the
list view is told its data set has changed and it does the resulting
layout pass, we could try to move the position to a now invalid
index.  This may prevent that from happening.

Also put in a better error message if saving state of a fragment
whose target is no longer in the fragment manager.

And fix a bug in PackageManager where we could return a null from
queryIntentActivities().

And add a new API to find out whether a fragment is being removed,
to help fix issue #3306021: NPE at
android.app.AlertDialog.getDefaultDialogTheme(AlertDialog.java)

Next, for new HC apps we can delay committing data to
storage until the activity is stopped.

Finally, use the new multi-threaded AyncTask executor in a few
places, so we don't have worked blocked by long-running tasks from
the application.

Change-Id: I27b2aafedf2e1bf3a2316309889613fa539760f3
2011-01-24 21:23:03 -08:00
Dan Morrill
c63ca57a16 am fe7006c5: am 9dbf1351: Merge "Adding faketouch feature." into honeycomb
* commit 'fe7006c5fc6f972aca2a4471ea5cd7db3947e809':
  Adding faketouch feature.
2011-01-23 14:20:42 -08:00
Dan Morrill
fe7006c5fc am 9dbf1351: Merge "Adding faketouch feature." into honeycomb
* commit '9dbf1351e8cd1d8a320cdc7fecffc876fffb71f1':
  Adding faketouch feature.
2011-01-23 14:18:52 -08:00
Dan Morrill
a537687c38 Adding faketouch feature.
Change-Id: Idff0b059c2f82fa4237d6238710e87dc55ae76a8
2011-01-23 13:36:13 -08:00
Mike Lockwood
e7d511e148 New APIs for USB host support:
UsbManager:
- is now a service retrievable via Context.getSystemService(Context.USB_SERVICE).
- provides support for returning a list all connected USB devices
- broadcasts ACTION_USB_DEVICE_ATTACHED and USB_DEVICE_DETACHED when devices
  are added and removed from the USB host bus

UsbDevice:
- represents an attached USB device.

UsbInterface:
- represents an interface on a USB device
- devices may have multiple interfaces if they provide multiple
   sets of functionality (for example, android phones typically have interfaces
   for both USB mass storage and adb)

UsbEndpoint:
- represents an endpoint on a USB interface
- endpoints are used for sending or receiving data
  (only in one or the other direction)

UsbRequest:
- encapsulates a send or receive request to be sent over an endpoint

Change-Id: Ieef3e434c62760770ea839070cf5eba1a705967a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-22 15:56:09 -08:00
Dmitri Plotnikov
016c6daff0 am b92d08a7: am 48395385: Merge "Hiding the AsyncTaskLoader.waitForLoader method" into honeycomb
* commit 'b92d08a7385f241722b2299a988ab7a55053f6ea':
  Hiding the AsyncTaskLoader.waitForLoader method
2011-01-18 12:10:07 -08:00
Dmitri Plotnikov
b92d08a738 am 48395385: Merge "Hiding the AsyncTaskLoader.waitForLoader method" into honeycomb
* commit '48395385039a0c845bba8913c8d0c76981425aa4':
  Hiding the AsyncTaskLoader.waitForLoader method
2011-01-18 11:18:37 -08:00
Dmitri Plotnikov
4afde4fda3 Hiding the AsyncTaskLoader.waitForLoader method
I introduced this method a couple of weeks ago,
but then we had a chat with Dianne and she made
a good point that rather than having this behavior
on AsyncTaskLoader, we should have it on LoaderManager
and then it will cover all kinds of loaders,
not just the ones inheriting from AsyncTaskLoader.
She suggested that we postpone that work until
after Honeycomb.

Change-Id: I1939956296cddb678791ba652ab5f4a0dd45eea1
2011-01-18 09:41:29 -08:00
Dianne Hackborn
44b628d2f6 am ad81f4ff: am f4c4b666: Merge "Remove old APIs." into honeycomb
* commit 'ad81f4ffb8b8c32afea1a742dbb9bbc734b7a8a1':
  Remove old APIs.
2011-01-18 07:52:19 -08:00
Dianne Hackborn
ad81f4ffb8 am f4c4b666: Merge "Remove old APIs." into honeycomb
* commit 'f4c4b666234d0e5c510c846b13382b77175f10e1':
  Remove old APIs.
2011-01-18 07:34:09 -08:00