4739 Commits

Author SHA1 Message Date
Dianne Hackborn
c652de8141 Implement display overscan support.
The window manager now keeps track of the overscan of
each display, with an API to set it.  The overscan impacts
how it positions windows in the display.  There is a new set
of APIs for windows to say they would like to go into the
overscan region.  There is a call into the window manager to
set the overscan region for a display, and it now has a
concept of display settings that it stores presistently.

Also added a new "wm" command, moving the window manager
specific commands from the "am" command to there and adding
a new now to set the overscan region.

Change-Id: Id2c8092db64fd0a982274fedac7658d82f30f9ff
2013-02-19 12:08:58 -08:00
Tim Murray
ab7a2919a3 Merge "Add MIRRORED_REPEAT." 2013-02-16 02:11:32 +00:00
Tim Murray
6b9b2caf2b Add MIRRORED_REPEAT.
Change-Id: I7565da24912a3c33d8f824da9ea0899a423d3c40
2013-02-15 14:53:09 -08:00
Jeff Sharkey
b65ce57675 Expose longer statfs values, add derived values.
Since fsblkcnt_t is 8 bytes, provide methods to access larger value
instead of casting to int.  This would start being an issue around
8TB filesystems.

Also add convenience methods to calculate values in bytes.

Change-Id: Ib924425d8d6d82785466f611ca71800cc1e952b6
2013-02-13 18:40:35 -08:00
Irfan Sheriff
fdc028383a Expose EAP config API
This API allows apps to setup access to enterprise Wi-Fi networks.

Change-Id: I37573d76b8bd9cad72413afdc4fc62ce57b4dc43
2013-02-13 10:32:58 -08:00
Dianne Hackborn
b47e6c77b3 Merge "Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!" 2013-02-12 23:54:56 +00:00
Dianne Hackborn
56a2301c7a Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!
Change-Id: Ib05a2eb6a03db50074805a437a3639a7d10684a0
2013-02-12 15:41:49 -08:00
Fabrice Di Meglio
d04892d207 Merge "Add BidiFormatter utility" 2013-02-12 23:36:47 +00:00
Svetoslav
90f73928d5 Merge "Adding public event callback instead of the internal one to UiAutomation." 2013-02-12 23:04:57 +00:00
Svetoslav
550b48fa18 Adding public event callback instead of the internal one to UiAutomation.
It appears that com.android.internal.util.Predicate is in the public
APIs but it is in the internal package. Leaking the predicate APIs is
a mistake and while we cannot fix that, this change is adding legit
public filter interface.

bug:8183223

Change-Id: I3e2c0ef685d7a832630aaa3ec2e8eae3fb058289
2013-02-12 15:01:09 -08:00
Svetoslav
0707dbdfc6 Merge "Adding new APIs to UiAutomation." 2013-02-12 22:56:02 +00:00
Jason Sams
d25d037890 Merge "Add FieldPacker contructor that accepts external storage." 2013-02-12 22:22:10 +00:00
Svetoslav
bbfa585d70 Adding new APIs to UiAutomation.
1. Accessibility service may set a flag to request a compressed
   view of the node tree representing the screen. The compressed
   state does not contain nodes that do to react to user actions
   and do not draw content, i.e. they are dumb view managers. This
   compressed hierarchy was very beneficial to the test team and
   this change is exposing the APIs. The compression has to be
   configurable since old tests are written against uncompressed
   view tree. Basically we do not hide the fact that UIAutomation
   is simply an accessibility service with some other useful APIs.

bug:8051095

2. Accessibility service can perform global actions such as opening
   notifications, opening recent apps, etc. These are also needed
   for UI testing since there is no other way to do it via the
   existing UIAutomation APIs. Basically we do not hide the fact
   that UIAutomation is simply an accessibility service with some
   other useful APIs.

bug:8117582

Change-Id: I7b6e24b5f7a973fdada0cc199cff9f882b10720b
2013-02-11 19:59:45 -08:00
Fabrice Di Meglio
57a85740d7 Add BidiFormatter utility
See bug #7587797 Need BidiFormatter class in Android API

Change-Id: I999282b9a4c76d8b4a3fc254b0c12ca95fa6ea4a
2013-02-11 14:27:10 -08:00
Romain Guy
97dcc20e6d Merge "Deprecate useless BitmapDrawable constructor Bug #2590549" 2013-02-08 22:01:05 +00:00
Romain Guy
7ac40e3869 Deprecate useless BitmapDrawable constructor
Bug #2590549

Change-Id: Icb45bf2d9836c43ed0825105f64d7b98afcdcdac
2013-02-08 14:00:15 -08:00
Jason Sams
5b08a2dc78 Add FieldPacker contructor that accepts
external storage.

Change-Id: I9c796f925802b202eae7e0fe1750a10140ef4a47
2013-02-08 11:22:17 -08:00
Tim Murray
eb8c29cb7e Add API entry points for clipped kernels.
Change-Id: Idf474a5ac391c41e9215cd2f03e7f8c4bfb875fa
2013-02-07 15:22:36 -08:00
Jeff Sharkey
92be93a94e Improve TrafficStats UID APIs.
Deprecate transport layer statistics, leaving only the summarized
network layer statistics.

Improve documentation to be clear about layers where measurements
occur, and their behavior since boot.  Under the hood, move to using
xt_qtaguid UID statistics.

Bug: 6818637, 7013662
Change-Id: I9f26992e5fcdebd88c671e5765bd91229e7b0016
2013-02-07 13:59:26 -08:00
Svetoslav
bcc46a0d03 Set accessibility cursor in non-text views with content description.
We support text traversal at a granularity over non-next views with
content description, hence we should support setting the cursor position
in such views.

bug:8134469

Change-Id: I4dba225b0ade795b7a20c201fb906ae7146c065d
2013-02-06 11:58:03 -08:00
Svetoslav
eecedffe42 Renaming some APIs
Change-Id: I9e226d39648796f95dd0e86ffecbb3f93544243b
2013-02-05 14:07:15 -08:00
Santos Cordon
3b53da4934 Merge "Sort out permission around "instant text response"" 2013-02-04 17:58:13 +00:00
Michael Wright
1df477acf6 Add initial plumbing for brightness keys
Change-Id: I595e8a25e6c245e4b22f06df9a8acdbb75e4b041
2013-02-01 16:29:59 -08:00
Fabrice Di Meglio
f8ce2b94df Merge "Fix progress bar and spinner in RTL mode" 2013-01-31 19:28:37 +00:00
Fabrice Di Meglio
2b378cde41 Fix progress bar and spinner in RTL mode
Add "mirrorForRtl" property for ProgressBar (default is "false") and
use it accordingly to the following RTL rules:

- time still goes from left to right
- clocks still rotate clockwise

Change-Id: Ib91ce6ab341aa6097c0f43b13703174a2ee9ec70
2013-01-31 11:20:30 -08:00
Svetoslav
f48a2d30c5 Merge "Add accessibility actions for text editing." 2013-01-31 07:53:43 +00:00
Svetoslav
7c51284d80 Add accessibility actions for text editing.
Currently text editing is pretty hard (certain operations even
impossible) for a blind person. To address the issue this change
adds APIs that enable an accessibility service to perform basic
text editing operations such as copy, paste, cut, set selection,
extend selection while moving at a given granularity.

The new APIs enable an accessibility service to expose a gesture
driven efficient text editing facility.

bug:8098384

Change-Id: I82b200138a3fdf4c0c316b774fc08a096ced29d0
2013-01-30 23:47:17 -08:00
Svetoslav
ec695824af Merge "Remove "enhance web scripts" from settings and make it requested by plug-ins." 2013-01-31 03:16:59 +00:00
Przemyslaw Szczepaniak
647abce570 Deprecate unused and implementation-specific parts of TTS API
Second changeset, first one was committed too hastily.

TTS Voice-data related API was originally written with
one engine in mind (pico sVox TTS). It exposes 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: Ia58af7f218dc1568570712f435782d2003260e82
2013-01-30 09:37:05 +00:00
Dianne Hackborn
e8ae8b8982 Merge "Add GET_CONTENT protocol for allowing multiple selection." 2013-01-29 23:56:20 +00:00
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