946 Commits

Author SHA1 Message Date
Android (Google) Code Review
58c244125f Merge change 3422 into donut
* changes:
  Check AirplaneMode when enabling Bluetooth has finished.
2009-06-07 21:42:14 -07:00
Daisuke Miyakawa
5c43f735d9 Check AirplaneMode when enabling Bluetooth has finished.
This is part of manual merge from cupcake_dcm to donut.
Should be reviewed by mchan and takaoka.
Original internal CL: 149471-p9
2009-06-08 12:57:55 +09:00
Christopher Tate
8c850b792f Add IRestoreSession interface for the restore flow
Restore is a fairly complicated, somewhat stateful process, so we introduce
a new interface to encapsulate the various bits and pieces into a nicely
separable component.  In particular, this will make it much cleaner to
open and interrogate an expensive-to-construct transport and then reuse it
for the actual restore process itself.
2009-06-07 19:33:20 -07:00
Christopher Tate
b4a6188a74 Add rough-draft restore API set to IBackupTransport
* getAvailableBackups returns the list of backup sets available for restore

* getAppSet() returns the set of apps available from a given backup set

* getRestoreData() streams the full backup data for a given application
(within a given backup set) into a FD; that data will be handed to the
app's backup agent for processing.
2009-06-07 15:30:44 -07:00
Christopher Tate
7b88128e08 Adjust IBackupTransport interface
Instead of just passing a package name to performBackup, pass the whole
PackageInfo struct, explicitly including the list of signatures for the package.
No need to make each transport look this up individually when it's a necessary
part of the backup payload for each app.
2009-06-07 13:55:42 -07:00
Android (Google) Code Review
4e0b13c9a9 Merge change 3348 into donut
* changes:
  Fix AlphabetIndexer.getSectionForPosition()
2009-06-05 14:53:00 -07:00
Suchi Amalapurapu
d299b8194d Add a new attribute to android manifest for defining the GLES version number.
This attribute is parsed by the PackageParser into ConfigurationInfo. The major
and minor version numbers are defined as the higher and lower order bits.
2009-06-05 13:49:09 -07:00
Android (Google) Code Review
7b0d2d933d Merge change 3223 into donut
* changes:
  Adding new Settings.Secure properties for the Text-To-Speech functionality. Those properties are secure to prevent applications from altering the user's settings without his knowledge.
2009-06-05 13:29:21 -07:00
Phil Dubach
1b111bb6e2 Fix AlphabetIndexer.getSectionForPosition()
This did not properly set the cursor position before reading, which
resulted in wrong return values or exceptions in the cursor.
2009-06-05 12:27:59 -07:00
Jean-Michel Trivi
f62ba452bb Adding new Settings.Secure properties for the Text-To-Speech functionality.
Those properties are secure to prevent applications from altering the user's settings without his knowledge.
2009-06-05 11:29:16 -07:00
Android (Google) Code Review
3966536766 Merge change 3317 into donut
* changes:
  Fixes #1899273.
2009-06-05 11:27:52 -07:00
Romain Guy
834f0391b5 Fixes #1899273.
When a "ghost" stroke was showing, events would be intercepted in ListView. This patch modifies the logic used to detect when to still events: either the current stroke is a gesture, or the previous stroke was a gesture.
2009-06-05 11:24:09 -07:00
Android (Google) Code Review
716b56817a Merge change 2934 into donut
* changes:
  Don't crash on null edit url.
2009-06-05 10:12:34 -07:00
Satish Sampath
f9acde2748 Include web search providers in Searchables.
- Along with ACTION_SEARCH we now enumate ACTION_WEB_SEARCH as well so web search providers are covered in the searchables list. This fixes a broken unit test.
- Moved get/setPreferredWebSearchActivity and get-all-web-search-providers implementation to this module when the searchables list gets updated, so that it happens on boot and on package add/remove events and remains up to date. The duplicate code in WebSearchProvider will be removed in a separate change.
- Also made Searchables broadcast an intent when the searchables list got rebuilt, so components such as GlobalSearch/SuggestionSources no longer need to do this on their own.
2009-06-05 10:34:53 +01:00
Android (Google) Code Review
7ebda6f110 Merge change 3265 into donut
* changes:
  A workaround to fix rotation issue. I'm remote now and hard to do troubleshooting (i cannot rotate emulator in nx..)
2009-06-04 18:59:10 -07:00
Mitsuru Oshima
2f5e6b2d31 A workaround to fix rotation issue. I'm remote now and hard to do troubleshooting (i cannot rotate emulator in nx..) 2009-06-04 18:06:27 -07:00
Mike LeBeau
48603e7fed Add new SHOW_WEB_SUGGESTIONS system setting, referenced by the search settings
(in a follow-on change). This setting, to be respected by global search, and which
I will also file a bug to the browser to respect, determines whether live web
suggestions will be shown to the user as they type. For privacy reasons, this
could be considered undesirable, as partial queries can then be sent to the user's
chosen search engine, so a setting was required.
2009-06-05 01:07:20 +01:00
Android (Google) Code Review
54de90635e Merge change 3243 into donut
* changes:
  Fix backup agent unbind
2009-06-04 16:01:41 -07:00
Ken Shirriff
7a9e348c07 Don't crash on null edit url.
bug=1568060
2009-06-04 15:59:48 -07:00
Android (Google) Code Review
12bba91223 Merge change 3238 into donut
* changes:
  Browser edit fields should report variation WEB_EDIT_TEXT.
2009-06-04 15:50:05 -07:00
Android (Google) Code Review
ad8a510fcc Merge change 3227 into donut
* changes:
  Fix int to string mapping of exported properties. The value generated by the mapping in a @ViewDebug.ExportedProperty annotation was always overriden by the resolveId attribute.
2009-06-04 15:12:06 -07:00
Romain Guy
a1f3e4aef1 Fix int to string mapping of exported properties. The value generated by the
mapping in a @ViewDebug.ExportedProperty annotation was always overriden by
the resolveId attribute.
2009-06-04 15:10:46 -07:00
Amith Yamasani
88db3448cf Browser edit fields should report variation WEB_EDIT_TEXT.
This will enable the IME to enable/disable prediction features
for browser fields where the exact type is not very well defined.
Part of the fix for #1743620
2009-06-04 15:07:29 -07:00
Christopher Tate
1885b37913 Fix backup agent unbind
The handwritten binder transaction passing wasn't propagating the agent-destroy
transaction to the client side.  Oops.

Also, remove obsolete run-one-agent code from the backup manager service.
2009-06-04 15:02:37 -07:00
Android (Google) Code Review
b640da8fcb Merge change 3204 into donut
* changes:
  Avoid touching all adapter items when building accessibility event.
2009-06-04 14:12:02 -07:00
Android (Google) Code Review
2a3188672a Merge change 3203 into donut
* changes:
  rename a few files to camel-case, add copyright notices
2009-06-04 14:08:29 -07:00
Amith Yamasani
d296fafab5 Avoid touching all adapter items when building accessibility event.
Only check for enabled items if the list is less than 15 items.
2009-06-04 14:00:20 -07:00
Mathias Agopian
8ae2335a3c rename a few files to camel-case, add copyright notices 2009-06-04 13:53:57 -07:00
Android (Google) Code Review
7835b0b742 Merge change 3192 into donut
* changes:
  Fixes #1882836.
2009-06-04 13:28:20 -07:00
Romain Guy
f993ad5b89 Fixes #1882836.
Prevents the gestures window from leaking. This change does exactly what was
done for the filter popup window: the popup is dismissed in onSaveInstanceState()
as it is the only place that is executed early enough to avoid the dreaded
window leak error.
2009-06-04 13:26:52 -07:00
Android (Google) Code Review
a41962065a Merge change 3074 into donut
* changes:
  Modify the decoding logic in the FD case when a purgeable flag is set, and lower the threshold of bitmap size for using ashmem().
2009-06-04 10:40:17 -07:00
Karl Rosaen
320b2eeeea SearchDialog should only do DialogCursorProtocol stuff when in global search mode. 2009-06-04 17:59:44 +01:00
Karl Rosaen
1c54cf0903 Detect impressions, and cleanup the SearchDialog / SuggestionCursor communication.
(framework portion)

There are now 4 times the search dialog will check with the cursor:
- after data set changed
- when an item is clicked
- when the cursor is about to be closed
- when an item at a particular position is detected as showing

these are now the points where we can add data in either direction, which we use to accomplish:
- finding out whether there are any pending results
- find out if there is a position at which to notify when it is displayed (the "more results" triggering)
- toggling the "more results" button
- sending the max position that was displayed when the cursor is done

the new behavior (in addition to the refactoring) is improved detection of "more results" to trigger the additional sources
(it is now precise), and detection of which items were displayed to the user.
2009-06-04 16:11:47 +01:00
Android (Google) Code Review
241b4c74aa Merge change 3149 into donut
* changes:
  Turn off verbose logging in SearchableInfo, which seems to have been left on by accident.
2009-06-04 07:08:45 -07:00
Mike LeBeau
0f7e914e87 Turn off verbose logging in SearchableInfo, which seems to have been
left on by accident.
2009-06-04 15:07:44 +01:00
Bjorn Bringert
3250fa7371 Remove support for bitmap icons in search suggestions.
This is no longer needed, since content providers can now return
AssetFileDescriptors for in-memory data.
Bitmaps in the suggestion cursor was resopnsible for lots of
unnecessary copying, since all rows are copied out of the database
regardless of how many are displayed in the UI.
2009-06-04 15:04:38 +01:00
Android (Google) Code Review
f762589d1f Merge change 3145 into donut
* changes:
  Add INTENT_ACTION_WEB_SEARCH_SETTINGS (thereby fixing the build too :)).
2009-06-04 06:10:37 -07:00
Mike LeBeau
3a27803b29 Add INTENT_ACTION_WEB_SEARCH_SETTINGS (thereby fixing the build too :)). 2009-06-04 14:09:42 +01:00
Android (Google) Code Review
c08fc64ff6 Merge change 2845 into donut
* changes:
  Allow making AssetFileDescriptors from SQLite blobs.
2009-06-04 03:09:43 -07:00
Christopher Tate
043dadc751 More backup work
* Put in some permission enforcement around agent connection notification
  and full-backup scheduling.
* Full backup now applies to any package, not just backup participants who
  have declared their own android:backupAgent
* The process of running the backup operation on the set of apps who have
  been queued for it is now done in a separate thread, with a notification
  mechanism from the main Backup Manager service to pass along new-agent
  binding knowledge.  There's no longer one do-backup message on the primary
  Handler per target application.
* The new backup thread sets up the desired transport now and passes
  along the newly backed-up data to it for each backup target.  Two
  transports have been defined so far, GoogleTransport and AdbTransport;
  both are stubs at present.

Note that at present the backup data output file seems to be properly
created, but after doBackup() is called on the test app's agent it's
still zero size.
2009-06-03 20:42:15 -07:00
Mitsuru Oshima
9189cabb0b * Moved supports-density tag under manifest
* Refactored Compatibility code
  * Added CompatibilityInfo class
  * Removed getApplicationScale from Context
  * Added Resources#getCompatibilityInfo so that RootView can get the compatibility info w/o going through Context
* Expandable support
  * Added expandable tag under manifest
  * Old application w/o expandable is given the default screen size  ([320, 480] x density).
  * The non-expandable window is centered.
2009-06-03 16:28:10 -07:00
Amith Yamasani
eaeb663bcd Track activity foreground CPU usage for battery stats.
Track the foreground CPU time of an activity so that we can tell if apps are
spending more time in the background compared to foreground.
Update power profile values for screen backlight and GPS.
Fix some javadoc bugs (milliseconds vs. microseconds).
2009-06-03 15:38:24 -07:00
Wei-Ta Chen
2a2c5cd741 Modify the decoding logic in the FD case when a purgeable flag is set,
and lower the threshold of bitmap size for using ashmem().

For the decoding logic, we now go through the "non-purgeable" path if isShareable is false,
irrespective of the value of the purgeable flag.
2009-06-03 14:27:52 -07:00
Bjorn Bringert
33a22dc9c8 Close icon input stream in SuggestionsAdapter.
Before, SuggestionsAdapter would not close input streams after
reading icons from them. This leaks file descriptors and,
in the case of MemoryFiles, virtual address space.
2009-06-03 13:01:24 +01:00
Bjorn Bringert
c55e08e3fc Allow making AssetFileDescriptors from SQLite blobs.
This change adds a new class SQLiteContentHelper, which contains
a static method for creating an AssetFileDescriptor from
an SQLite query that returns a blob.

Internally, this uses a file descriptor for a MemoryFile.

The implementation is temporary. Ideally, the data should be copied
directly from SQLite to the MemoryFile ashmem region, using
sqlite3_blob_read().

This is part of the implementation of http://b/issue?id=1871731
2009-06-03 12:53:43 +01:00
Bjorn Bringert
c1823701cc Handle EOF correctly in MemoryFile input stream.
Before, the variants of MemoryFile.MemoryInputStream.read() would throw
IOException or  IndexOutOfBoundsException if EOF was encountered
before the requested number of bytes was read. This violates
the contract of InputStream.read().

This patch makes read() return the number of bytes available, if any.
If already at EOF, -1 is returned. The patch also adds new tests,
which checks cases where MemoryFile.MemoryInputStream.read()
should throw IndexOutOfBoundsException or return -1. several of these
tests failed with the old code and pass now.

This fixes http://b/issue?id=1881894
2009-06-03 12:53:42 +01:00
Bjorn Bringert
963cd006c4 Allow creating AssetFileDescriptors for MemoryFiles.
This allows content providers to use in-memory data to implement
ContentProvider.openAssetFile(), instead of just normal files
and sockets as before.

To test cross-process use of AssetFileDescriptors for MemoryFiles,
a test content provider and a client for it are added to
AndroidTests.

Fixes http://b/issue?id=1871731
2009-06-03 12:53:42 +01:00
Satish Sampath
8dbe612dc6 Adding internal method replacePreferredActivity.
This was required because we need a way to set the preferred activity for a
particular intent filter based on user selection (in our case the
ACTION_WEB_SEARCH intent filter for selecting the preferred search engine from
the list of available search engines providers). The current
addPreferredActivity call was not sufficient since it leaves the existing
preferred activities in the list and does not remove them, which this call
does.
2009-06-03 07:54:42 +01:00
Romain Guy
9af0b4f7be Add new listener to GestureOverlayView. This listener fires whenever the overlay thinks the user is starting a new gesture. This allows Home to snap the workspace back to its original position during a gesture operation. 2009-06-02 21:59:42 -07:00
Android (Google) Code Review
432900bffb Merge change 2962 into donut
* changes:
  Fixes #1890914.
2009-06-02 15:16:34 -07:00