2969 Commits

Author SHA1 Message Date
Chia-chi Yeh
47f8f0fa70 Add a method to create ParcelFileDescriptors from DatagramSockets.
Change-Id: I16dddb2395628657b140b53a1b2fee5f311b049a
2011-05-12 16:25:27 -07:00
Christopher Tate
4a627c71ff Full local backup infrastructure
This is the basic infrastructure for pulling a full(*) backup of the
device's data over an adb(**) connection to the local device.  The
basic process consists of these interacting pieces:

1. The framework's BackupManagerService, which coordinates the
   collection of app data and routing to the destination.

2. A new framework-provided BackupAgent implementation called
   FullBackupAgent, which is instantiated in the target applications'
   processes in turn, and knows how to emit a datastream that contains
   all of the app's saved data files.

3. A new shell-level program called "bu" that is used to bridge from
   adb to the framework's Backup Manager.

4. adb itself, which now knows how to use 'bu' to kick off a backup
   operation and pull the resulting data stream to the desktop host.

5. A system-provided application that verifies with the user that
   an attempted backup/restore operation is in fact expected and to
   be allowed.

The full agent implementation is not used during normal operation of
the delta-based app-customized remote backup process.  Instead it's
used during user-confirmed *full* backup of applications and all their
data to a local destination, e.g. via the adb connection.

The output format is 'tar'.  This makes it very easy for the end
user to examine the resulting dataset, e.g. for purpose of extracting
files for debug purposes; as well as making it easy to contemplate
adding things like a direct gzip stage to the data pipeline during
backup/restore.  It also makes it convenient to construct and maintain
synthetic backup datasets for testing purposes.

Within the tar format, certain artificial conventions are used.
All files are stored within top-level directories according to
their semantic origin:

apps/pkgname/a/  : Application .apk file itself
apps/pkgname/obb/: The application's associated .obb containers
apps/pkgname/f/  : The subtree rooted at the getFilesDir() location
apps/pkgname/db/ : The subtree rooted at the getDatabasePath() parent
apps/pkgname/sp/ : The subtree rooted at the getSharedPrefsFile() parent
apps/pkgname/r/  : Files stored relative to the root of the app's file tree
apps/pkgname/c/  : Reserved for the app's getCacheDir() tree; not stored.

For each package, the first entry in the tar stream is a file called
"_manifest", nominally rooted at apps/pkgname.  This file contains some
metadata about the package whose data is stored in the archive.

The contents of shared storage can optionally be included in the tar
stream. It is placed in the synthetic location:

shared/...

uid/gid are ignored; app uids are assigned at install time, and the
app's data is handled from within its own execution environment, so
will automatically have the app's correct uid.

Forward-locked .apk files are never backed up.  System-partition
.apk files are not backed up unless they have been overridden by a
post-factory upgrade, in which case the current .apk *is* backed up --
i.e. the .apk that matches the on-disk data.  The manifest preceding
each application's portion of the tar stream provides version numbers
and signature blocks for version checking, as well as an indication
of whether the restore logic should expect to install the .apk before
extracting the data.

System packages can designate their own full backup agents.  This is
to manage things like the settings provider which (a) cannot be shut
down on the fly in order to do a clean snapshot of their file trees,
and (b) manage data that is not only irrelevant but actively hostile
to non-identical devices -- CDMA telephony settings would seriously
mess up a GSM device if emplaced there blind, for example.

When a full backup or restore is initiated from adb, the system will
present a confirmation UI that the user must explicitly respond to
within a short [~ 30 seconds] timeout.  This is to avoid the
possibility of malicious desktop-side software secretly grabbing a copy
of all the user's data for nefarious purposes.

(*) The backup is not strictly a full mirror.  In particular, the
    settings database is not cloned; it is handled the same way that
    it is in cloud backup/restore.  This is because some settings
    are actively destructive if cloned onto a different (or
    especially a different-model) device: telephony settings and
    AndroidID are good examples of this.

(**) On the framework side it doesn't care that it's adb; it just
    sends the tar stream to a file descriptor.  This can easily be
    retargeted around whatever transport we might decide to use
    in the future.

KNOWN ISSUES:

* the security UI is desperately ugly; no proper designs have yet
  been done for it
* restore is not yet implemented
* shared storage backup is not yet implemented
* symlinks aren't yet handled, though some infrastructure for
  dealing with them has been put in place.

Change-Id: Ia8347611e23b398af36ea22c36dff0a276b1ce91
2011-05-10 17:52:51 -07:00
Kristian Monsen
fc77165d44 Deprecating webkit API's that might not be supported in the future
Change-Id: I992ae207f29a95daff991768cc6fe190471978cd
2011-05-10 16:53:51 +01:00
satok
9aabb95781 Add one shot flag to the subtype
Bug: 4257258

Change-Id: I21da9e11c882eea056beb84a2dfb0f28da8a98b1
2011-05-09 19:40:12 +09:00
Marco Nelissen
1b312039a0 Remove MediaStore.Audio.AudioColumns.ALBUM_ART
This column doesn't actually exist in the corresponding table, and
never has, so the presence of this definition is confusing.

Change-Id: I199f9a8effbdc9f45d51060830e3ad83675a0dff
2011-05-06 14:55:48 -07:00
Patrick Dubroy
b51cc1dd63 Merge "Only delay pressed feedback for Views inside a scrolling parent" 2011-05-05 14:59:35 -07:00
Patrick Dubroy
e0a799a2ac Only delay pressed feedback for Views inside a scrolling parent
Add a method on ViewGroup to determine whether it supports scrolling.
This allows us to show the pressed feedback immediately in many cases,
improving responsiveness of buttons, etc.

This patch also lengthens the timeout in order to reduce flashes
when the user is scrolling.

Change-Id: Ieb91ae7a1f8e8f7e87448f2a730381a53947996f
2011-05-05 14:49:20 -07:00
Romain Guy
8f0095cd33 Allows to render with an OpenGL context inside a TextureView.
Change-Id: I59453f7fc3997f0502a1c5d325d37fed376fabc7
2011-05-02 18:32:29 -07:00
Conley Owens
a3dcd0a3f1 Merged "Adjust mBiggerTouchSlopSquare to the suitable value"
Conflicts:
	core/java/android/view/ViewConfiguration.java

Change-Id: I74de006dbb19fd878591bc90955a1c6e74aa084e
2011-04-29 17:49:06 -07:00
Conley Owens
eb8171bcff Merge "Adjust mBiggerTouchSlopSquare to the suitable value" 2011-04-29 10:01:23 -07:00
Adam Powell
9b4bee0f14 Introducing the split action bar.
Apply (or extend) the theme Theme.Holo.SplitActionBarWhenNarrow or
Theme.Holo.Light.SplitActionBarWhenNarrow to enable splitting the
action bar across both the top and bottom of the screen. This places
the action menu along the bottom, leaving more room at the top for
titles, navigation, and custom views and more room at the bottom for
menu items.

TODO: Refine layout of the action menu when placed at the bottom of
the screen. Make action modes split as well.

Change-Id: I92c91f99c533f26aecf6b828ed041386c4f16922
2011-04-28 19:13:25 -07:00
Romain Guy
ad44445c77 Merge "New widget: TextureView Bug #4343984" 2011-04-28 18:47:01 -07:00
Romain Guy
aa6c24c21c New widget: TextureView
Bug #4343984

TextureView can be used to render media content (video, OpenGL,
RenderScript) inside a View.

The key difference with SurfaceView is that TextureView does
not create a new Surface. This gives the ability to seamlessly
transform, animate, fade, etc. a TextureView, which was hard
if not impossible to do with a SurfaceView.
A TextureView also interacts perfectly with ScrollView,
ListView, etc. It allows application to embed media content
in a much more flexible way than before.

For instance, to render the camera preview at 50% opacity,
all you need to do is the following:

mTextureView.setAlpha(0.5f);
Camera c = Camera.open();
c.setPreviewTexture(mTextureView.getSurfaceTexture());
c.startPreview();

TextureView uses a SurfaceTexture to get the job done. More
APIs are required to make it easy to create OpenGL contexts
for a TextureView. It can currently be done with a bit of
JNI code.

Change-Id: Iaa7953097ab5beb8437bcbbfa03b2df5b7f80cd7
2011-04-28 18:46:19 -07:00
Wu-cheng Li
61773dbda3 Merge "Unhide camera focus area and metering area API." 2011-04-27 21:17:52 -07:00
Bjorn Bringert
4bbca889df Expose TTS engine API
This is a new API for writing text-to-speech engines.
The existing API for apps that use TTS remains the same,
with some minor additions.

Change-Id: Id577db449ae0e5baec40621d4a08387dbd755342
2011-04-27 08:25:24 +01:00
Stephen Hines
64e00980a3 Merge "Start ICS header cleanup and finish type matrix." 2011-04-26 13:45:51 -07:00
Wu-cheng Li
f715bf95de Unhide camera focus area and metering area API.
These API are for touch focus.

bug:3475893

Change-Id: I1e213c0bed0c6fe18dcbfb0457c51c52e7cfae30
2011-04-27 01:20:53 +08:00
Adam Powell
c404c4fbc1 Merge "Action bar work for phones" 2011-04-25 17:44:22 -07:00
Adam Powell
dae7824c4b Action bar work for phones
Drop tabs to a second row at < w480dp

Make 9-patches for the cab's "done" button thinner

Add a "disable home" display option to the action bar to turn off
focus and touch feedback when tapping home would do nothing

Change-Id: Ib2eedf311655f02055357321e2e9ad5b9037fed1
2011-04-25 17:42:45 -07:00
Jason Sams
6cc888e77e Start ICS header cleanup and finish type matrix.
Change-Id: If65f96f08c958d330862c543d85dd9d4a0f90e06
2011-04-25 16:09:48 -07:00
Robert Greenwalt
7ada57f8ba Merge "Expose more net types to the public." 2011-04-25 15:05:24 -07:00
Svetoslav Ganov
736c2756bf Touch exploration feature, event bubling, refactor
1. Added an Input Filter that interprets the touch screen motion
   events to perfrom accessibility exploration. One finger explores.
   Tapping within a given time and distance slop on the last exlopred
   location does click and long press, respectively. Two fingers close
   and in the same diretion drag. Multiple finglers or two fingers in
   different directions or two fingers too far away are delegated to
   the view hierarchy. Non moving fingers "accidentally grabbed the
   device for the scrren" are ignored.

2. Added accessibility events for hover enter, hover exit, touch
   exoloration gesture start, and end. Accessibility hover events
   are fired by the hover pipeline. An accessibility event is
   dispatched up the view tree and the topmost view fires it.
   Thus predecessors can augment the fired event. An accessibility
   event has several records and a predecessor can optionally
   modify, delete, and add such to the event.

3. Added onPopulateAccessibilityEvent and refactored the existing
   accessibility code to use it.

4. Added API for querying the currently enabled accessibility services
   by feedback type.

Change-Id: Iea2258c07ffae9491071825d966dc453b07e5134
2011-04-22 18:30:43 -07:00
Robert Greenwalt
6081084e88 Expose more net types to the public.
Ethernet and bluetooth.

Change-Id: Ic499709ffa151c0f27aef497373a8de7289e3e7f
2011-04-22 18:09:03 -07:00
Adam Powell
3fb3d7c4e7 Revert "Touch exploration feature, event bubling, refactor"
This reverts commit ac84d3ba81f08036308b17e1ab919e43987a3df5.

There seems to be a problem with this API change. Reverting for now to
fix the build.

Change-Id: Ifa7426b080651b59afbcec2d3ede09a3ec49644c
2011-04-22 17:23:44 -07:00
Svetoslav Ganov
f9fa622cc0 Merge "Touch exploration feature, event bubling, refactor" 2011-04-22 16:29:07 -07:00
Svetoslav Ganov
ac84d3ba81 Touch exploration feature, event bubling, refactor
1. Added an Input Filter that interprets the touch screen motion
   events to perfrom accessibility exploration. One finger explores.
   Tapping within a given time and distance slop on the last exlopred
   location does click and long press, respectively. Two fingers close
   and in the same diretion drag. Multiple finglers or two fingers in
   different directions or two fingers too far away are delegated to
   the view hierarchy. Non moving fingers "accidentally grabbed the
   device for the scrren" are ignored.

2. Added accessibility events for hover enter, hover exit, touch
   exoloration gesture start, and end. Accessibility hover events
   are fired by the hover pipeline. An accessibility event is
   dispatched up the view tree and the topmost view fires it.
   Thus predecessors can augment the fired event. An accessibility
   event has several records and a predecessor can optionally
   modify, delete, and add such to the event.

3. Added onPopulateAccessibilityEvent and refactored the existing
   accessibility code to use it.

4. Added API for querying the currently enabled accessibility services
   by feedback type.

Change-Id: Iec03c6c3fe298de3f14cb6efdbb9b198cd531a0c
2011-04-21 18:33:52 -07:00
Dianne Hackborn
4c1f4f7144 Merge "Rework display size access." 2011-04-21 16:10:28 -07:00
Dianne Hackborn
44bc17c6b5 Rework display size access.
Applications now get the display size from the window manager.  No
behavior should be changed yet, this is just prep for some real
changes.

Change-Id: I2958a6660895c1cba2b670509600014e55ee9273
2011-04-21 15:17:52 -07:00
Jack Palevich
d793299e87 Add utility method Matrix.perspectiveM
Change-Id: Ic9d5e5d967bbc08acc524c5092ce61a1cdbfd360
2011-04-21 14:52:37 -07:00
Adam Powell
8c4da95f6b Fix the build
Change-Id: I725f0664b5563f6af16929eff59d7a8967600660
2011-04-20 13:58:00 -07:00
Andreas Huber
7454253d91 Merge "Unhide MediaPlayer's setDataSource method that takes optional http headers to be" 2011-04-20 12:23:27 -07:00
Andreas Huber
72e738a428 Unhide MediaPlayer's setDataSource method that takes optional http headers to be
passed to the server.

Change-Id: I3c7ce140b2d9cd2483cf05c8aff9b374feff2f18
related-to-bug: 4315346
2011-04-20 10:55:54 -07:00
Dianne Hackborn
9567a66a5e Deprecate a bunch of APIs.
And clean up some documentation.

Change-Id: I7882183b3daf883b7ac6098d19f88dc7cfbcdf61
2011-04-20 10:26:44 -07:00
Adam Powell
696cba573e Refactor menu internals.
In the old world, MenuBuilder and MenuItemImpl were responsible for
generating views for any presentation of a menu. MenuBuilder needed to
know any types and resources involved, and the implied caching
semantics did not work well for menus presented within AdapterViews.

In the new world, the MenuPresenter interface takes over the
responsibility of generating views or adapters for menu
items. MenuBuilder/MenuItemImpl still provide extra metadata tracking
used by these presenters. Mutiple presenters may be active for a
single menu at a time. All of this remains internal framework
implementation details.

BaseMenuPresenter provides a simple base for presenters that treats
the host MenuView more like an AdapterView. This allows for less
rebuilding of views when items are added/removed.

Callbacks have been restructured. Calls that relate to the menu itself
are still handled by MenuBuilder.Callback, but calls related to a
specific presentation of a menu are handled by MenuPresenter.Callback
objects attached to a MenuPresenter.

Also add API to programmatically set divider options for LinearLayout
and hidden API so that ActionBarView can have finer-grained control
over divider placement.

Change-Id: I2265b86a084279822908021aec20dfbadc1bb56b
2011-04-19 13:49:39 -07:00
Dianne Hackborn
d071ec2b49 Integrate from support lib: fix restore of list state.
The FragmentManager/ListFragment impl was restoring the list
state before setting its adapter.  This caused the list view to
lose the state, since it gets cleared as part of setting the
adapter.  Now the fragment manager waits on restoring the view
hierarchy state until after it has done onActivityCreated(),
at which point we have set the adapter.

It would be nice to make list view less fragile in this regard,
but that is for a different change.

Change-Id: I032d6fe0fefc0dabfae95d44152146029ef5db8e
2011-04-18 14:08:33 -07:00
Dianne Hackborn
47c4156567 Back-port new fragment detach APIs from support lib.
This allow a much cleaner implementation of things like the
fragment pager class.

Change-Id: I433be3d6c24c9a059d908d442bcfddbf1e8e57e5
2011-04-18 10:18:05 -07:00
satok
68f1b78b7b Add an API to get the last used input method subtype
Bug: 4075039

- Voice input requires to know the last used input method subtype.

Change-Id: I603a4fb88a2af5195e52188adfa6585ad80304fa
2011-04-15 13:49:33 +09:00
Urs Fleisch
5819051eee support humidity sensor type
Change-Id: I4156842677e91de0f922284d196147ff61e71a70
2011-04-13 12:52:59 -07:00
Dianne Hackborn
0c5001d776 Add APIs to remove tasks.
You can remove sub-tasks inside of a task, or an entire task.

When removing an entire task, you can have its process killed
as well.

When the process is killed, any running services will get an
onTaskRemoved() callback for them to do cleanup before their
process is killed (and the service possibly restarted).

Or they can set a new android:stopWithTask attribute to just
have the service automatically (cleanly) stopped at this point.

Change-Id: I1891bc2da006fa53b99c52f9040f1145650e6808
2011-04-12 18:28:06 -07:00
Joe Onorato
5e88ac73ce Use the new API file format, and some minor tweaks to the old XML files that make the parser easier.
Change-Id: I9307d0d323f1b65816b3e097bf9c4d92f3962b2f
2011-04-08 16:21:34 -07:00
satok
b3fc1a5b8b Rename CorrectionSpan to SuggestionSpan
Change-Id: I004b2e012b2de4de959a31da1f55b63ca7c14199
2011-04-08 13:43:19 +09:00
Joe Onorato
43a17654cf Remove the deprecated things from Config.java. These haven't been working since before 1.0.
Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
2011-04-07 19:23:05 -07:00
Joe Onorato
ea4af8914a final 12.xml from gingerbread.
Change-Id: I6089b57a22e7d9eaa43979ce8e9990192c83203d
2011-04-07 19:23:03 -07:00
Dianne Hackborn
e17aeb3103 Improve activity manager debug dumps.
Activity manager now does all dump requests into apps
asynchronously, so it can nicely timeout if there is an
app problem.  Also lots of general cleanup of the am
dump output.

Change-Id: Id0dbccffb217315aeb85c964e379833e6aa3f5af
2011-04-07 18:26:15 -07:00
Gilles Debunne
6a839703cd Merge "Word suggestion popup added to EditText." 2011-04-06 17:07:27 -07:00
Jeff Brown
fbfb3dafd9 Merge "Minor Alt-TAB / Recent Apps Dialog improvements." 2011-04-06 15:57:21 -07:00
Jeff Brown
5487500cf3 Minor Alt-TAB / Recent Apps Dialog improvements.
Alt-TAB should have different semantics from the APP_SWITCH key
or long-press on HOME.  Accordingly, remove the fallback action
for Alt-TAB and initiate the task switching behavior directly
in the policy.

Modified RecentApplicationsDialog to be more precise about the
initial modifiers that it considers to be holding the dialog.

The dialog is now dismissed by a second press on the APP_SWITCH
key or by a second long press on HOME.

Change-Id: Idf4d803f51103819057cb655ff3b770b7729e4be
2011-04-06 15:38:05 -07:00
Gilles Debunne
6934044fd7 Word suggestion popup added to EditText.
A double tap on a word will now display a list of suggestions based
on the CorrectionSpans that were added by the IME.

This is a first implementation of this feature. It needs some attention from
designers.

Change-Id: If863107681ce82a1639f21315878f830c2991fb7
2011-04-06 15:04:26 -07:00
Dianne Hackborn
3fc982f41f Add new resource configurations for screen width/height in "dp".
You can now specify resource configuration variants "wNNNdp"
and "hNNNdp".  These are the minimum screen width/height in "dp"
units.  This allows you to do things like have your app adjust
its layout based only on the about of horizontal space available.

This introduces a new configuration change flag for screen size.
Note that this configuration change happens each time the orientation
changes.  Applications often say they handle the orientation change
to avoid being restarted at a screen rotation, and this will now
cause them to be restarted.  To address this, we assume the app can
handle this new config change if its target SDK version is < ICS.

Change-Id: I22f8afa136b4f274423978c570fa7c9855040496
2011-04-06 11:00:37 -07:00
Mike LeBeau
c95c3a3fc7 Merge "Add EXTRA_ORIGIN to RecognizerIntent." 2011-04-05 14:03:55 -07:00