536 Commits

Author SHA1 Message Date
Daniel Lehmann
50b1f8d3fc Enable strict mode as a public api to catch sql injections
Bug: 4368912
Change-Id: Ia4919f58cc5264da8758d6cd61d93e031676b74a
2011-06-01 15:24:23 -07:00
Gilles Debunne
2978cef0a7 Fix build, ran update-api
Change-Id: I778604f332bdbee901bf8670cb9397f86e3de7a9
2011-06-01 11:50:29 -07:00
Gilles Debunne
829de65b9a Merge "Select all for text shown as an icon on smaller screens" 2011-06-01 10:13:42 -07:00
Joe Onorato
0d8f66f08d Put the enum constants into the api file.
Bug: 4292741
Change-Id: Ia6d934e1202f818a967ffe469aa5e4f15f4648b5
2011-05-31 18:17:20 -07:00
Matthew Xie
646590ef0a Merge "Add public api BluetoothSocket.isConnected." 2011-05-31 18:04:36 -07:00
Gilles Debunne
5e9af2ddf0 Select all for text shown as an icon on smaller screens
Text has been removed to leave space for 4 icons, that should fit
even in portrait mode.

Note: requires a definitive selectAll icon from designers.

Change-Id: I65547527e9ca872aa8888467f31fa7de9653fa77
2011-05-31 17:05:33 -07:00
Svetoslav Ganov
678ba5c57d Updating the API since I forgot after rebase
Change-Id: I15e0f8235b2981cd637717d13f57e3b71c30575b
2011-05-31 12:52:41 -07:00
Svetoslav Ganov
cc4053e031 Accessibility serviceconfiguration via meta-data
Note: This is a part of two CL change and contains the
      system changes without updates to the settings.

1. Added a mechanism for configuring an accessibility service via
   XML file specified in a meta-data tag (similar to IMEs).

2. Added property for specifying a settings activity for an
   accessibility service.

3. Refactored the APIs in AccessibilityManager to return
   lists of AccessiblityServiceInfo instead ServiceInfo
   since the former describes an AccessibilityService in
   particular (similar to IMEs).

Change-Id: Ie8781bb7e0cdb329e583b6702a612a507367ad7b
2011-05-31 12:04:18 -07:00
satok
9b4157935a Use isAuxiliary instead of ExtraValue for the auxiliary subtypes.
Change-Id: Ibce4f884e697ca789b9942cf3abad43741040a87
2011-05-30 22:44:48 +09:00
Fabrice Di Meglio
5ff0f99b23 Merge "Add support for Gravity BEFORE and AFTER" 2011-05-27 11:28:43 -07:00
Fabrice Di Meglio
6a03640539 Add support for Gravity BEFORE and AFTER
- update layouts
- add Callback2 for RTL aware Drawable
- add unit tests

Change-Id: Ic64d0291e262170aff7297c6580b0b422eaa8d89
2011-05-27 11:23:15 -07:00
Brian Carlstrom
a7284f0e72 Tracking merge of dalvik-dev to master
Adapt to change in the way MockWebServer sets up CONNECT proxies.
  git cherry-pick --no-commit c7e2feee5e7908a019a0de91123c1feb9bdc38bc

React to move of Base64 in libcore
  git cherry-pick --no-commit 119f7ebdd1f8df3a8ff8e3b8056bff725d569253

Expose and document android.net.HttpResponseCache.
  git cherry-pick --no-commit 7b73f0fdb8c032a65c55610541d66385bd8bcbe6)

make update-api

Change-Id: Ieb48b304ea38ee8c2ec01e860d99b1404583889e
2011-05-27 01:21:50 -07:00
Philip Milne
3f8956d82b Introduction of GridLayout.
Change-Id: Ia2ec315e7d29dcc5aa13b080fc6ce00708e9c034
2011-05-26 09:28:26 -07:00
satok
42c5a1666c Fix internal variables and equals in SuggestionSpan
Bug: 4443922

- Instantiating other package's class for the name is complicated, so we changed the internal value for the notification target class from Class to String.
- Implement equals

Change-Id: Iaf7682be777f0027d33c9a3be4609ac01b6950ad
2011-05-26 19:21:35 +09:00
satok
f9f0100862 Add Apis to send notifications when the suggestion was picked
- Due to a strong request from VoiceIME

Bug: 4443922

Change-Id: Ia539de0acf66053e0349daec459d75e36805f6bf
2011-05-26 11:02:31 +09:00
Eric Laurent
dc03c61fe3 Bluetooth SCO audio API improvements.
The AudioManager API to control bluetooth SCO did not provide an easy way for
applications to handle SCO connection errors. When a request to activate SCO with
AudioManager.startBluetoothSco() failed, no state change was indicated via
AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED intent. The application had to
implement a timeout to handle connection failures.

The API change consists in defining a new intent AudioManager.ACTION_SCO_AUDIO_STATE_UPDATED
and deprecate AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED. The new intent
will broacast a new state CONNECTING when the SCO connection is initiated.
The application can monitor changes from CONNECTING to either CONNECTED or DISCONNECTED
states to detect connection success or failure.
An extra indicating the previous state is also added to the new intent.

Also improved BluetoothHeadset service management in AudioService. A disconnection
from the service is not considered as a device or SCO link disconnection. Instead, if the
service interface is not present when a request to activate SCO is received, an
attempt is made to reconnect to the service.

Change-Id: I005fda1caaf74bb7de64fece44e9c7e628e828db
2011-05-25 09:11:46 -07:00
Chet Haase
8d5f808f70 Add more functionality to ViewPropertyAnimator.
Allow ViewPropertyAnimator animations to be started immediately, canceled,
and to have an optional startDelay. This is functionality parallel to that
in the base Animator class.

Change-Id: I391f1810bf697656999bd6e3e63a59e46eb7eb8a
2011-05-24 15:56:41 -07:00
Chet Haase
cca2c98072 Add ability to transition parent hierarchy in layout transitions
This change compensates for changes in the parent hierarchy of
transitioning views. It automatically animates parents with the same
animations as those used for the CHANGING animations run on the container
children.

Change-Id: I86471d16a9070b024cc09c8f6e0f504a881fa99f
2011-05-24 15:29:39 -07:00
Jason parks
e372c17ba7 Merge "Add public API to do NDEF push." 2011-05-24 13:49:51 -07:00
Jason parks
01425365a8 Add public API to do NDEF push.
Change-Id: I102da9bbc6d78577a26fa03ee363a60abc389d6c
2011-05-24 15:22:07 -05:00
Dianne Hackborn
c42b791b74 Merge "resolved conflicts for merge of bbca8133 to master" 2011-05-24 12:44:07 -07:00
Dianne Hackborn
e2c7715c77 resolved conflicts for merge of bbca8133 to master
Change-Id: I81493674dceab848e41d380a77a37e5a9be06db6
2011-05-24 11:27:11 -07:00
Gilles Debunne
970ce73017 Merge "Made getOffsetForPosition public in TextView." 2011-05-24 09:26:44 -07:00
Gilles Debunne
9511b41e05 Made getOffsetForPosition public in TextView.
Bug 4443839

Change-Id: I3e5d6f0fe3a45b068166f682daf3c4163903306e
2011-05-23 18:48:26 -07:00
Matthew Xie
ceb6c9f517 Add public api BluetoothSocket.isConnected.
It's a convenent function to get the connection status of the bluetooth
socket, ie, whether there is an active connection with remote device.
bug 2149043

Change-Id: I4ca4e98c646f70746d838632f3035376b22d579b
2011-05-23 17:47:35 -07:00
Gilles Debunne
f3a135bfba Added a new flag in TextView to disable Suggestions.
This is needed for specific TextEdit (such as AutoCompleteTextField)
which do not want to display the "No suggestions available" message.

Bug 4443830

Change-Id: Ic228b56bacfdf2765e70eb24952ab087556c1f93
2011-05-23 17:15:20 -07:00
Dianne Hackborn
939461300a resolved conflicts for merge of 070a19e0 to master
Change-Id: I855ab02a4e8dd465af67fd23b66c0dace76bd411
2011-05-23 14:10:26 -07:00
Glenn Kasten
817c161ef2 Bug 4184736 unhide MediaPlayer.setTexture
Change-Id: I4c8456465611b717e42c0a11e3ce3b4dc0a34270
2011-05-20 07:30:00 -07:00
Dianne Hackborn
161e67ff3b resolved conflicts for merge of 06a8ceac to master
Change-Id: Id51574c825affddfac14ad7214c5496d6a3d6e69
2011-05-19 21:44:52 -07:00
John Reck
9414b04178 Merge "expandGroup can now animate" 2011-05-19 15:23:58 -07:00
James Dong
3c707256cf Merge "Publish setLocation() method as a public Java API" 2011-05-19 11:51:37 -07:00
Mike Lockwood
90f902afde resolved conflicts for merge of c1730dcf to master
Change-Id: I9e0f9740930c7d3acb51235dd4c67cf2ed54a486
2011-05-19 13:34:44 -04:00
John Reck
63f46e7145 expandGroup can now animate
Add a boolean to have expandGroup animate the same as
 performItemClick does

Change-Id: I652c6fa8f9a7b527572337b11900d653b5285352
2011-05-19 10:10:51 -07:00
Jean-Baptiste Queru
c6b7a0131e Merge 111d17ce
Change-Id: I2e0aa4328bc78eb5bcd987e7bf74b0889d2fae7f
2011-05-19 07:17:00 -07:00
Svetoslav Ganov
d36a699410 Fixing my build fix
Change-Id: I8393e0172367de730123b2fa9d743b1ecb2eb087
2011-05-18 20:50:03 -07:00
James Dong
af3131fe2e Publish setLocation() method as a public Java API
related-to-bug: 4260295

Change-Id: I91b923af8549127eb08f0d7e535cd53ad229e1f6
2011-05-18 09:41:57 -07:00
Fabrice Di Meglio
dff7897548 Merge "View horizontalDirection public attribute resolution to an internal var." 2011-05-17 14:16:43 -07:00
Narayan Kamath
b956f37e37 Pass synthesis request params through to the TTS service.
Change-Id: I1ffd617d8dfa0814382643e3cf6b3ab7417c742a
2011-05-17 09:47:59 +01:00
Jim Miller
3e4df313a6 Fix the build.
Change-Id: I884580f52ebc817cee736f6d1bafbc59bd6662cd
2011-05-16 16:38:06 -07:00
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