1547 Commits

Author SHA1 Message Date
Cibu Johny
8666663e6e View horizontalDirection public attribute resolution to an internal var.
Change-Id: Id87ab188faef27ff039cf6a400118707ee74a27d
2011-05-16 16:03:31 -07:00
Fabrice Di Meglio
b5dde704cd Merge "Adding horizontalDirection public attribute for View." 2011-05-16 15:13:10 -07:00
Cibu Johny
7632cb9be5 Adding horizontalDirection public attribute for View.
Change-Id: Ic8a03447252e4e155c3ee874b1d8c8ac0bc9f7f5
2011-05-16 15:08:27 -07:00
Jeff Sharkey
43be174888 Add Socket tagging for granular data accounting.
Introduces public API to apply "tags" to track data traffic originating
from the current thread.  (Under the hood, the tags are maintained and
applied in BlockGuard.)  Also adds tag/untag methods for developers who
maintain their own Socket pools.

Change-Id: Ic2dd3155559a93a7b613c7853748d4c44fb3a39e
2011-05-13 18:19:00 -07:00
Svetoslav Ganov
73162196e7 Merge "Factored out the Accessibility vertical initialization." 2011-05-13 14:19:17 -07:00
Svetoslav Ganov
30401328c1 Factored out the Accessibility vertical initialization.
1. Accessibility events were filled with data in
   dispatchPopulateAccessibilityEvent and
   onPopulateAccessibilityEvent. These events have
   two axis of population 1) up the class
   hierarchy to populate information for the event
   source; 2) down the view hierarchy to populated
   all the text contained in the source including
   its descendants. These two axis of population
   were done in on population pass now the populating
   the source properties happens in initializeAccessiblityEvent
   and the text in onPopulateAccessibilityEvent which
   is called from dispatchPopulateAccessiblityEvent.

2. Removed the string description from events fired from
   CompoundButton since the event has isChecked()
   property and it is responsibility of the clients
   to decide what utterrance to use and if to use such
   for announcing the checked state.

Change-Id: I5d7f75cf8a87a7a4b3bb7b311e8e642ec9a0faa5
2011-05-13 14:18:37 -07:00
Jeff Brown
65f47d8810 Merge "Add initial API for stylus and mouse buttons." 2011-05-13 12:14:27 -07:00
Jeff Brown
fe9f8ab03a Add initial API for stylus and mouse buttons.
Added the concept of pointer properties in a MotionEvent.
This is currently used to track the pointer tool type to enable
applications to distinguish finger touches from a stylus.

Button states are also reported to application as part of touch events.

There are no new actions for detecting changes in button states.
The application should instead query the button state from the
MotionEvent and take appropriate action as needed.

A good time to check the button state is on ACTION_DOWN.

As a side-effect, applications that do not support multiple buttons
will treat primary, secondary and tertiary buttons identically
for all touch events.

The back button on the mouse is mapped to KEYCODE_BACK
and the forward button is mapped to KEYCODE_FORWARD.

Added basic plumbing for the secondary mouse button to invoke
the context menu, particularly in lists.

Added clamp and split methods on MotionEvent to take care of
common filtering operations so we don't have them scattered
in multiple places across the framework.

Bug: 4260011
Change-Id: Ie992b4d4e00c8f2e76b961da0a902145b27f6d83
2011-05-13 12:11:17 -07:00
Dianne Hackborn
39cf8c97c3 resolved conflicts for merge of ec85619f to master
Change-Id: Id820ddcb9d19341a1b383b3bef7659a2c0621cfa
2011-05-12 18:37:33 -07:00
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
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
Steve Block
b25825a1b1 Add FrameLayout.getMeasureAllChildren()
Currently the counterpart to FrameLayout.setMeasureAllChildren() is
FameLayout.getConsiderGoneChildrenWhenMeasuring(). This change
deprecates FameLayout.getConsiderGoneChildrenWhenMeasuring() in favor of
a new FrameLayout.getMeasureAllChildren() method.

Change-Id: Id26ec8b3966bd1553d5fd708ad76049069fcaeef
2011-04-28 14:58:55 +01: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
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