1885 Commits

Author SHA1 Message Date
Svetoslav
3822896e22 Remove "enhance web scripts" from settings and make it requested by plug-ins.
Currently we have an "enhance web accessibility" setting that has to be
enabled to make sure web content is accessible. We added the setting to
get user consent because we are injecting JavaScript-based screen-reader
pulled from the Google infrastructure. However, many users do not know
that and (as expected) do not read the user documentation, resulting in
critique for lacking accessibility support in WebViews with JavaScript
enabled (Browser, Gmail, etc).

To smoothen the user experience now "enhance web accessibility" is a
feature an accessibility plug-in can request, similarly to explore by
touch. Now a user does not need to know that she has to explicitly
enable the setting and web accessibility will work out-of-the-box.

Before we were showing a dialog when a plug-in tries to put the device
in a touch exploration mode. However, now that we have one more feature
a plug-in can request, showing two dialogs (assume a plug-in wants both
features) will mean that a user should potentially deal with three
dialogs, one for enabling the service, and one for each feature. We
could merge the dialogs but still the user has to poke two dialogs.

It seems that the permission mechanism is a perfect fit for getting
user permission for an app to do something, in this case to enable
an accessibility feature. We need a separate permission for explore
by touch and enhance web accessibility since the former changes the
interaction model and the latter injects JavaScript in web pages. It
is critical to get user consent for the script injection part so we
need a well-documented permission rather a vague umbrella permission
for poking accessibility features. To allow better grouping of the
accessibility permissions this patch adds a permission group as well.

bug:8089372

Change-Id: Ic125514c34f191aea0416a469e4b3481ab3200b9
2013-01-29 13:56:22 -08:00
Svetoslav
573a18ccd8 Merge "Fixing the build" 2013-01-29 10:10:30 +00:00
Svetoslav
f5f7d9751a Fixing the build
Change-Id: I8d47c7094efc8ff458cdac58a761d5f187c8fc32
2013-01-29 02:08:54 -08:00
Svetoslav
686f20c264 Merge "Removing duplicated tests that use hidden APIs" 2013-01-29 09:40:25 +00:00
Svetoslav
dc4271ce1d Removing duplicated tests that use hidden APIs
Change-Id: If3e32e8659fcb4dc2186fea668601a93f4556a73
2013-01-29 01:38:48 -08:00
Svetoslav
3a34d17412 Fixing the build
Change-Id: Ief7654775307c829a60e65217ae821aa6801303c
2013-01-28 19:55:35 -08:00
Svetoslav Ganov
d0fd54648c Merge "Adding UI test automation APIs." 2013-01-29 03:16:40 +00:00
Dianne Hackborn
fdb3f094ca Add GET_CONTENT protocol for allowing multiple selection.
Change-Id: I4c14d32112523d7ab603b2a4e374849dd1c3eff6
2013-01-28 15:10:48 -08:00
Victoria Lease
de07d41f63 Merge "Annotate Locations coming from mock providers" 2013-01-28 17:07:39 +00:00
Dianne Hackborn
5e45ee6752 App ops: you can now turn off operations.
Also add new ops for calendar and wi-fi scans, finish
implementing rejection of content provider calls, fix
issues with rejecting location calls, fix bug in the
new pm call to retrieve apps with permissions.

Change-Id: I29d9f8600bfbbf6561abf6d491907e2bbf6af417
2013-01-25 11:25:48 -08:00
Dianne Hackborn
d8ba6cc921 Merge "Add new API to propagate contextual data to the assist action" 2013-01-23 22:47:57 +00:00
Dianne Hackborn
f9c5e0fe83 Add new API to propagate contextual data to the assist action
When launching an assist, we have a new API allowing the
current foreground activity/application to provide additional
arbitrary contextual information that is stuffed in the
assist intent before it is launched.

Change-Id: I0b2a6f5a266dc42cc0175327fa76774f814af3b4
2013-01-23 14:39:13 -08:00
Svetoslav Ganov
80943d8daa Adding UI test automation APIs.
This change adds APIs support for implementing UI tests. Such tests do
not rely on internal application structure and can span across application
boundaries. UI automation APIs are encapsulated in the UiAutomation object
that is provided by an Instrumentation object. It is initialized by the
system and can be used for both introspecting the screen and performing
interactions simulating a user. UI test are normal instrumentation tests
and are executed on the device.

UiAutomation uses the accessibility APIs to introspect the screen and
a special delegate object to perform privileged operations such as
injecting input events. Since instrumentation tests are invoked by a shell
command, the shell program launching the tests creates a delegate object and
passes it as an argument to started instrumentation. This delegate
allows the APK that runs the tests to access some privileged operations
protected by a signature level permissions which are explicitly granted
to the shell user.

The UiAutomation object also supports running tests in the legacy way
where the tests are run as a Java shell program. This enables existing
UiAutomator tests to keep working while the new ones should be implemented
using the new APIs. The UiAutomation object exposes lower level APIs which
allow simulation of arbitrary user interactions and writing complete UI test
cases. Clients, such as UiAutomator, are encouraged to implement higher-
level APIs which minimize development effort and can be used as a helper
library by the test developer.

The benefit of this change is decoupling UiAutomator from the system
since the former was calling hidden APIs which required that it is
bundled in the system image. This prevented UiAutomator from being
evolved separately from the system. Also UiAutomator was creating
additional API surface in the system image. Another benefit of the new
design is that now test cases have access to a context and can use
public platform APIs in addition to the UiAutomator ones. Further,
third-parties can develop their own higher level test APIs on top
of the lower level ones exposes by UiAutomation.

bug:8028258

Also this change adds the fully qualified resource name of the view's
id in the emitted AccessibilityNodeInfo if a special flag is set while
configuring the accessibility service. Also added is API for looking
up node infos by this id. The id resource name is relatively more stable
compared to the generaed id number which may change from one build to
another. This API facilitate reuing the already defined ids for UI
automation.

bug:7678973

Change-Id: I589ad14790320dec8a33095953926c2a2dd0228b
2013-01-22 17:56:53 -08:00
Dianne Hackborn
fd7adedebf Add new disabled state for "optional" built-in apps.
The disabled state allows you to make an app disabled
except for whatever parts of the system still want to
provide access to them and automatically enable them
if the user want to use it.

Currently the input method manager service is the only
part of the system that supports this, so you can put
an IME in this state and it will generally look disabled
but still be available in the IME list and once selected
switched to the enabled state.

Change-Id: I77f01c70610d82ce9070d4aabbadec8ae2cff2a3
2013-01-22 17:10:23 -08:00
Victoria Lease
54ca7aef2e Annotate Locations coming from mock providers
LocationManagerService now annotates incoming Location objects that
have come from mock location providers. The new isFromMockProvider()
method can be called on any Location to determine whether the
provider that supplied the Location was a mock location provider.

Bug: 6813235
Change-Id: Ib5140e93ea427f2e0b0036151047f87a02b4d23a
2013-01-22 09:39:47 -08:00
Jeff Sharkey
66a017b634 Always give ContentResolver a valid Context.
Also add MockContentResolver constructor to provide a Context, and
move to singleton ActivityThread, since there is only one inside
each process.  This makes ActivityThread accessible from threads like
InstrumentationThread.

Change-Id: Ib8b18f1b9bba8820ff412d782a43511066eabf24
2013-01-17 18:25:47 -08:00
Dianne Hackborn
e799175b6b AppOps: fix nested op tracking, new API to get apps using
permissions.

Change-Id: I20c7bd58febc01d6911a90440867eaacd133c464
2013-01-16 18:10:40 -08:00
Yorke Lee
02f304f721 Allow supplying extras when assigning QuickContactsBadge
Add assignContactFromEmail(String, boolean, Bundle)
and assignContactFromPhone(String, boolean, Bundle)
that allow the caller to provide a bundle of extras to
pre-populate the ContactEditorFragment with if a contact
is not found with the requested email address or phone number.

Bug: 7038382
Change-Id: Ib77fa484e1c39cb60d7acc27efe3a3fcf3fee62f
2013-01-14 11:38:39 -08:00
Adam Cohen
b00d9f0e07 Updating new widget api to account for view type count
Change-Id: Iab3a905aaec0b42ef31cd23e0711f6f7bf299486
2013-01-10 19:23:39 -08:00
Nick Kralevich
ee49a3a007 Merge "Add K api version." 2013-01-09 16:11:06 -08:00
Nick Kralevich
6b0fb36870 Merge "Revert "App home directories are now 0700 for targetSdkVersion > 17"" 2013-01-09 16:10:14 -08:00
Nick Kralevich
a985c3bb14 Add K api version.
Change-Id: I2b74e06f8bda8b23c5cc4280af4b18a5ad66a6c2
2013-01-09 16:03:14 -08:00
Nick Kralevich
1506921e8e Revert "App home directories are now 0700 for targetSdkVersion > 17"
This reverts commit 92091fa9636403728fe94cc83400495a8612c2d3.

Bug: 7966399
Bug: 7208882
2013-01-09 15:54:56 -08:00
Martijn Coenen
2e9f65f978 Merge "Make NfcAdapter states public and fix build." 2013-01-09 12:28:44 -08:00
Martijn Coenen
e55fe4f3bb Make NfcAdapter states public and fix build.
Change-Id: Idb2dd5e524cda5e3c03d4f2689266fa03be4ea13
2013-01-09 12:27:22 -08:00
Martijn Coenen
8a9120f04e Merge "Make NfcAdapter STATE_CHANGED intent action public." 2013-01-09 11:45:15 -08:00
Martijn Coenen
4ba5eaf7f3 Make NfcAdapter STATE_CHANGED intent action public.
Bug: 5141885
Change-Id: Ia357409a51fb45f1739bb37940fa746f94fa9056
2013-01-09 11:41:16 -08:00
Przemyslaw Szczepaniak
176baa7de1 Revert "Deprecate unused and implementation-specific parts of TTS API"
This reverts commit 8a3d9f03199b93e07a5f5edc14660eab6cd233e7

Change-Id: I5a5c18f72ae2ea73c21dc27c7469c68d6b4b4c24
2013-01-09 03:36:23 -08:00
Przemyslaw Szczepaniak
8a3d9f0319 Deprecate unused and implementation-specific parts of TTS API
TTS Voice-data related API was originally written with
one engine in mind (pico sVox TTS). It exposes some implementation
details that should be private to the engine implementation.

- Deprecating fields of ACTION_CHECK_TTS_DATA results that were
used by sVox language packs to find out location of voice data.
Those fields are TTS engine implementation details and should be
private:
EXTRA_VOICE_DATA_ROOT_DIRECTORY
EXTRA_VOICE_DATA_FILES
EXTRA_VOICE_DATA_FILES_INFO

- Deprecating fields of ACTION_CHECK_TTS_DATA request that are
providing unnescesary functionality (it can be easily done on client
side):
EXTRA_CHECK_VOICE_DATA_FOR

- Deprecating some of the return codes of ACTION_CHECK_TTS_DATA - they
are specific to sVox pico voice data and in all cases can be replaced
by CHECK_VOICE_DATA_FAIL result code.
CHECK_VOICE_DATA_BAD_DATA
CHECK_VOICE_DATA_MISSING_DATA
CHECK_VOICE_DATA_MISSING_VOLUME

- Changing semantics of ACTION_TTS_DATA_INSTALLED intent. It's now
more generic and covers any change of available voice data set (so, not only
adding languages, but also removing them should trigger broadcast. Adding and
removing features to existing locale (like embedded synthesis) should be marked
by broadcast as well).

- Deprecating its EXTRA_TTS_DATA_INSTALLED result field - client should discover
the change by running ACTION_CHECK_TTS_DATA intent.

- Making GetSampleText intent public again - it's used by most TTS engines to
provide unique demonstation data.

- Deprecating TextToSpeech.OnUtteranceCompletedListener - it was replaced
by UtteranceProgressListener in API level 15, but no one put deprecation tag
on it.

Change-Id: I6609cde5c50236457f14955e2e7c0481b2b217ec
2013-01-09 03:08:29 -08:00
Alon Albert
35d67ec31a Merge "Put some useful information in User-Agent Header" 2013-01-07 09:18:52 -08:00
Jason Sams
8140d7b0f6 yuv
Change-Id: I3e99740250f1a3cb356bf6906528abc71f8cee2e
2013-01-02 11:20:29 -08:00
Jason Sams
69bf687e53 Merge "Add API support for 3D allocations." 2012-12-28 11:53:46 -08:00
Jason Sams
d1c306a9e6 Add API support for 3D allocations.
Change-Id: I19c525f90135d83caec545e77e8f61a957d220ee
2012-12-27 20:26:41 -08:00
Tim Murray
0562a0dcc1 Merge "Add USAGE_SHARED for Allocations." 2012-12-19 13:03:38 -08:00
Tim Murray
00bb454bd0 Add USAGE_SHARED for Allocations.
Change-Id: I61efafffaa649df68762d9ae29e029cd1e1bc6bc
2012-12-19 13:01:03 -08:00
Alon Albert
8ac6a63a94 Put some useful information in User-Agent Header
Put information in User-Agent:
* Build fingerprint
* Calendar or CalendarSyncAdapter package name + version code
* Package name of app making changes to provider for uphill syncs

Example:
google/mantaray/manta:K/MASTER/eng.aalbert.20121217.140040:eng/dev-keys:com.google.android.calendar:201212060:com.google.android.calendar Google-HTTP-Java-Client/1.11.0-beta (gzip)

Change-Id: Ief8f57809ce240df4f5c662c703dcb80dab47367
2012-12-17 17:30:02 -08:00
Tim Murray
eef623900c Merge "Add struct for controlling clipping in Java." 2012-12-17 13:21:55 -08:00
Tim Murray
fbfaa85363 Add struct for controlling clipping in Java.
Change-Id: Iac747e492c680530553909b0389b230fbc654e30
2012-12-17 12:10:55 -08:00
Svetoslav Ganov
0bf39c8073 Merge "Refactoring of the screen magnification feature." 2012-12-14 17:12:12 -08:00
Svetoslav Ganov
545252f4fd Refactoring of the screen magnification feature.
1. This patch takes care of the case where a magnified window is covering an unmagnigied
   one. One example is a dialog that covers the IME window.

bug:7634430

2. Ensuring that the UI automator tool can connect and correctly dump the screen.

bug:7694696

3. Removed the partial implementation for multi display magnification. It adds
   unnecessary complexity since it cannot be implemented without support for
   input from multiple screens. We will revisit when necessary.

4. Moved the magnified border window as a surface in the window manager.

5. Moved the mediator APIs on the window manager and the policy methods on the
   WindowManagerPolicy.

6. Implemented batch event processing for the accessibility input filter.

Change-Id: I4ebf68b94fb07201e124794f69611ece388ec116
2012-12-14 16:27:27 -08:00
Nick Kralevich
92091fa963 App home directories are now 0700 for targetSdkVersion > 17
Pass targetSdkVersion to installd so it knows the appropriate
permissions to apply to the app's home directory.

Bug: 7208882
Change-Id: Ia62ed36b32ee5af01077fb10a586024411be8ed4
2012-12-14 11:53:10 -08:00
Adam Cohen
3366cb2a01 Merge "Adding simple ArrayList API for collection widgets" 2012-12-13 17:50:11 -08:00
Adam Cohen
50f3d1bae8 Adding simple ArrayList API for collection widgets
Change-Id: I4d6c909d1d2c0bdd1ddc8329445cea0e78a5ce7c
2012-12-13 14:52:30 -08:00
Przemyslaw Szczepaniak
b46533732c Set default language in new TTS clients.
A recent change altered semantics of getLanguage call to return client
language instead of service language. This solved problems
with interferences between two clients using different lanaguages.

This change created a bug - new TTS client instance have no language set.
Since reading user preferences requires additional permissions I've
added new tts service method - getClientDefaultLanguage that will return
user preferences.

I've also added new client method, getDefaultLanguage, that allow easy
access to this data.

Bug: 7666482
Change-Id: Ieb7d2ba3a99d20c513add97f054874720a1cd82e
2012-12-13 03:21:30 -08:00
Irfan Sheriff
fdb9138c40 Merge "Expose more details in broadcasts" 2012-12-12 09:29:13 -08:00
Irfan Sheriff
3a67e2515b Expose more details in broadcasts
Expose details in broadcasts and do the necessary clean up alongside

Change-Id: I9011d51675a233aa3542f097c8a489c2095103b1
2012-12-11 22:00:14 -08:00
Christopher Tate
1423fa30c2 am 1de62393: am 534de491: Merge "Make immersive mode public & imply update locking" into jb-mr1-aah-dev
* commit '1de623939090993d03a7c398d09e2d13950d682b':
  Make immersive mode public & imply update locking
2012-12-11 16:15:38 -08:00
Christopher Tate
1de6239390 am 534de491: Merge "Make immersive mode public & imply update locking" into jb-mr1-aah-dev
* commit '534de491e6522465a7ad12d7cba9b2f80deab364':
  Make immersive mode public & imply update locking
2012-12-11 16:13:51 -08:00
Christopher Tate
73c2aee40a Make immersive mode public & imply update locking
Activity.setImmersive(boolean) / android:immersive="bool" are now public.
In addition, if the foreground activity is immersive then an update lock
will be held on its behalf.  This lets applications such as movie players
suppress the display of intrusive notifications, OTA-availability dialogs,
and the like while they are displaying content that ought not to be
rudely interrupted.

The update lock aspect of this mode is *advisory*, not binding -- the
update mechanism is not actually constrained; it simply uses this information
in deciding whether/when to prompt the user.  It's more a guideline than
a rule.

Bug 7681380

Change-Id: I3c412a84cbf3933e3bf0168f2c71c54a86e4b7e5
2012-12-10 18:40:57 -08:00
Daisuke Miyakawa
149ceec6eb Sort out permission around "instant text response"
- Remove SEND_SMS_NO_CONFIRMATION

- Add SEND_RESPOND_VIA_MESSAGE Permission
  This permission is held by the phone and applications that want to
  handle respond-via-message should require this permission of the
  sender.  This permission is signature/system and currently only held
  by the Phone app.

Bug: 5108429
Change-Id: Ib611368d488de2f8e1e853f550eb2c654305eda4
2012-12-06 16:24:48 -08:00