719 Commits

Author SHA1 Message Date
Tsu Chiang Chuang
4b1afab106 extend timeout to allow for more time for the device to connect.
Change-Id: If3929ca69a5025c7048d57276813c270229a76db
2012-03-01 12:28:14 -08:00
Tsu Chiang Chuang
4fe25f693a fix NPE in race condition.
Change-Id: Ic1df67f8a5379ff1cd804fb55e143f078e369ccf
2012-02-16 14:46:02 -08:00
Tsu Chiang Chuang
a8c57bf6ad extending timeout to stabilize tests
Change-Id: I2e0a7ae35babdda18ade4f70d61b4c83c9d2c2d9
2012-02-01 15:24:51 -08:00
Xia Wang
8017794091 Remove sleep from test acitivity to avoid ANR when key event is injected
bug#: 5737922

Change-Id: I7871713c5000d122e63127b30d0151b8f5a29bcf
2011-12-19 17:20:04 -08:00
Xia Wang
e63d67eff7 Merge "Add extra 2 minute for wifi to shutdown" into ics-mr1 2011-12-05 15:52:34 -08:00
Xia Wang
10a3e8fae8 Add extra 2 minute for wifi to shutdown
Change-Id: I3cf2fbf5de8b96b75d5e460e4ad822a1947ff6e7
2011-12-05 12:22:47 -08:00
Svetoslav Ganov
d116d7c78a Fixing memory leaks in the accessiiblity layer.
1. AccessibilityInteractionConnections were removed from the
   AccessiiblityManagerService but their DeathRecipents were
   not unregistered, thus every removed interaction connection
   was essentially leaking. Such connection is registered in
   the system for every ViewRootImpl when accessiiblity is
   enabled and inregistered when disabled.

2. Every AccessibilityEvent and AccessiilbityEventInfo obtained
   from a widnow content querying accessibility service had a
   handle to a binder proxy over which to make queries. Hoewever,
   holding a proxy to a remote binder prevents the latter from
   being garbage collected. Therefore, now the events and infos
   have a connection id insteand and the hindden singleton
   AccessiiblityInteaction client via which queries are made
   has a registry with the connections. This class looks up
   the connection given its id before making an IPC. Now the
   connection is stored in one place and when an accessibility
   service is disconnected the system sets the connection to
   null so the binder object in the system process can be GCed.
   Note that before this change a bad implemented accessibility
   service could cache events or infos causing a leak in the
   system process. This should never happen.

3. SparseArray was not clearing the reference to the last moved
   element while garbage collecting thus causing a leak.

bug:5664337

Change-Id: Id397f614b026d43bd7b57bb7f8186bca5cdfcff9
2011-11-29 18:51:30 -08:00
Xia Wang
e571552123 am 2d9f4620: Fix build
* commit '2d9f4620625405b916aa27177a6b5f82f8e5b15d':
  Fix build
2011-11-28 16:53:50 -08:00
Xia Wang
2d9f462062 Fix build
Change-Id: I465d85e4783763f311ed6ec0a09c1edde9712405
2011-11-28 16:49:06 -08:00
Xia Wang
da82236788 am 25261f59: Merge "Increase time between wifi stop and wifi start: set to 2 minutes http://b/issue?id=5629901" into ics-mr0
* commit '25261f59af0d902f239e541b735f7dc31e714b07':
  Increase time between wifi stop and wifi start: set to 2 minutes http://b/issue?id=5629901
2011-11-28 16:02:44 -08:00
Eric Rowe
fca8e9d919 Fix SCO start stop tests.
Change-Id: Idf292bc244a494e2ffb11359e83c0d072907ea3b
Bug-id: http://b/5644683
2011-11-22 19:16:50 -08:00
Xia Wang
a4c2caac05 Increase time between wifi stop and wifi start: set to 2 minutes
http://b/issue?id=5629901

Change on state validation:
  - When network state is broadcast in other network information,
    the test activity will record the state change which cause false
    alarm in the test.

Change-Id: I8bd1e8c04ab97116f3a02ccc5543f34a7e651cda
2011-11-21 21:22:10 -08:00
Tsu Chiang Chuang
b3f2890a8a am 047c4de2: Merge "Adding mobile microbenchmark tests." into ics-mr0
* commit '047c4de2c548960fff428a92099003593cede5f8':
  Adding mobile microbenchmark tests.
2011-11-15 11:10:44 -08:00
Jeff Sharkey
d968670d83 Merge "Conservatively trim data usage stats." into ics-mr1 2011-11-14 23:37:17 -08:00
Jeff Sharkey
7ee8658453 Conservatively trim data usage stats.
Instead of trusting NTP time alone, use the most-conservative of
system clock and NTP.

Bug: 5584564
Change-Id: I5dd87fc009959b1cf0a7d660e385a0b1a8be238b
2011-11-14 20:11:38 -08:00
Tsu Chiang Chuang
d5897dc798 fix for build breakage.
Change-Id: Ie324e46a79923813edd2e5e0c34ede79e6ee3eea
2011-11-14 15:46:16 -08:00
Tsu Chiang Chuang
212efacb84 Adding mobile microbenchmark tests.
Change-Id: Ifcd67b0265045778965aeff8e213c3929da02c3d
2011-11-10 10:21:39 -08:00
Tsu Chiang Chuang
287353a78e Adding mobile microbenchmark tests.
Change-Id: Ifcd67b0265045778965aeff8e213c3929da02c3d
2011-11-10 10:13:14 -08:00
Jeff Sharkey
4abb1b8ef6 Make operation counts monotonically increase.
Bug: 5585704
Change-Id: I5247a68acdb209a4ef0f5aac18944595c295e6ca
2011-11-08 17:35:28 -08:00
Jeff Sharkey
163e6443f2 Correct proc file reader, optimizations.
Moved away from BufferedReader, which only reads the first 8KB of
some proc files because it aggresively fills its buffer.  Optimized
proc parsing, now double the speed.  Tests to cover.

Log when NetworkStats counters roll backwards when subtracting, and
optimizations around findIndex().  When system removes UID, also
remove from last stats snapshot to avoid xt counters from rolling
backwards.

Bug: 5472949, 5458380
Change-Id: I07c08fe5233156fac2b84450f6291868bf9bfaf2
2011-11-02 15:14:11 -07:00
Steve Block
136b1637f8 Fix use of WebView.loadData() to avoid passing invalid encoding
No change in behavior, as invalid encodings have always been ignored.

Bug: 5125738
Change-Id: I23f21ca65a6b14501c74dc2189a55643f1e33c33
2011-10-17 15:11:33 +01:00
Jeff Brown
c755ae3b58 Use MatrixCursor instead of ArrayListCursor.
ArrayListCursor is deprecated, and a duplicate private copy of it
is doubly so.

Delete some tests that are duplicated in the CTS package.

Change-Id: Ib5837b12e39dadba57595906ad621b1feb0d2c0d
2011-10-13 14:24:28 -07:00
Jeff Sharkey
1059c3c30a Move battery stats to xt_qtaguid for data stats.
Replace TrafficStats calls by reading values from xt_qtaguid kernel
module. To keep BatteryStatsImpl changes lightweight, cache recently
parsed stats. Tracks mobile ifaces from ConnectivityService.

Refactor xt_qtaguid parsing into factory outside of NMS. Add stats
grouping based on UID, and total based on limiting filters like iface
prefix and UID.

Bug: 4902271
Change-Id: I533f116c434b77f93355bf95b839e7478528505b
2011-10-09 13:49:08 -07:00
Jeff Brown
270928bd4a Merge changes Idbfeb3cc,I03e8e2e7,Iff9eed78
* changes:
  Fix regression in CursorWindow.getString() Bug: 5332296
  Clean up CursorWindow lifetime. Bug: 5332296
  Fix regression in CursorWindow.copyStingToBuffer. Bug: 5332296
2011-10-07 15:08:24 -07:00
Jeff Brown
7ce745248d Clean up CursorWindow lifetime.
Bug: 5332296

Removed dead code in SQLiteCursor related to the use of a background
query thread.  This code could result in CursorWindows being modified
concurrently or used after free.  This code is broken, unused and
is just in the way.

Added comments to explain how CursorWindow ownership is
supposed to work for AbstractWindowedCursors.  (There are still cases
where cursor windows get dropped on the floor without being closed.
Those will be taken care of in a subsequent patch.)

Cleaned up SQLiteQuery.fillWindow to eliminate duplicate code and
remove bits that were only needed for background loading, like
returning -1.

Change-Id: I03e8e2e73ff0c11df76d63f57df4c5ada06ae1cb
2011-10-07 13:31:00 -07:00
Svetoslav Ganov
b6eca6e669 Accessibility test automation API not working.
1. Due to a previous change that disabled accessibility if not enabled
   and installed serivces are present the automation APIs stopped working
   since they use fake automation service that is not installed.

2. Added clean up of death recipients when binders die.

bug:5374662
bug:5239044

Change-Id: I1f3c8cd1d1c79753a4a64e2b8b2963025abb2939
2011-10-06 14:16:03 -07:00
Jeff Sharkey
905b5891d2 Track xtables summary, move tether stats, time.
Begin tracking xtables summary of data usage to compare with values
reported from /proc/net/dev.  Roll tethering directly into UID stats
to trigger UID stats persisting when crossing threshold.

Include xtables summary and authoritative time in samples.

Bug: 5373561, 5397882, 5381980
Change-Id: Ib7945522caadfbe0864fdf391582dc820f4f371e
2011-10-03 17:21:05 -07:00
Jesse Wilson
de5d7d2508 Test to demonstrate NPE in DefaultRequestDirector
When the HTTP client encountered a server failure while
talking through a proxy, it fails with an NullPointerException
and not an IOException.

Change-Id: I4b287105bf78b832d034557e37e74ce576c7894d
Bug: http://b/5372438
2011-09-27 19:28:32 -04:00
Kenny Root
05ca4c9064 Allow non-required package verifiers
* Verifiers can be specified in the AndroidManifest.xml

* Those verifiers can respond to the new Intent action

* PackageManager API for those verifiers: verifyPendingInstall

Change-Id: I4892bce2e6984871e6e93c60a1ca0dae145f5df5
2011-09-23 16:03:03 -07:00
Tsu Chiang Chuang
5c488ef997 point upload to the correct url.
Change-Id: Ie60c3fb781b1d8cd01b6f09d1666f788e7db6b3a
2011-09-19 10:58:11 -07:00
Tsu Chiang Chuang
e4bbb6ac31 Merge "add upload capabilities to data test." 2011-09-16 17:48:17 -07:00
Tsu Chiang Chuang
e888685bf6 add upload capabilities to data test.
Change-Id: I8465e4b97ff7f48de1150193bcd2b520da1adf00
2011-09-15 12:01:29 -07:00
Kenny Root
04b08bdf19 Merge "Be more forgiving in parsing verifier IDs" 2011-09-15 09:33:06 -07:00
Svetoslav Ganov
ea515aeafa Update the public APIs for finding views by text to optionally use content description.
1. Added flags to the search method to specify whether to match text or
   content description or both.

2. Added test case for the seach by content description.

3. Updated the code in AccessibilityManager service to reflect the latest
   changes there so test automation service works - this is the fake
   service used for UI automation.

Change-Id: I14a6779a920ff0430e78947ea5aaf876c2e66076
2011-09-14 19:40:33 -07:00
Kenny Root
a0f264e1af Be more forgiving in parsing verifier IDs
RFC 4648's Base32 is made to be forgiving for users doing manual entry
of the digits. For this reason we want to be able to parse lowercase
letters as uppercase and number 0 (zero) as letter O along with number
1 (one) as letter I.

Change-Id: Ide760aff84f97c3e06af8bf8d006f36c74033a41
2011-09-14 10:08:19 -07:00
Kenny Root
c924fbd693 Merge "Add verifier device identity" 2011-09-13 17:51:08 -07:00
Kenny Root
0aaa0d9317 Add verifier device identity
This adds a special device identifier that is usable only for device
validation. The user will be presented with this number encoded in
easily-transcribable Base32 in the Developer options of Settings.

Change-Id: I4843f55ee90d689a51d0269b22454ca04c1be7ec
2011-09-13 16:02:43 -07:00
Jeff Sharkey
e44365b539 Merge "Data usage structure optimizations." 2011-09-12 16:50:34 -07:00
Jeff Sharkey
69b0f63af2 Data usage structure optimizations.
Driven by traceview hotspots found in Settings UI.

Change-Id: I614a049523c526b7fcd12fffdf53a3e4723623e4
2011-09-12 16:13:20 -07:00
Ben Komalo
6c048260f3 Merge "Revert encryption mapping for device wipes." 2011-09-11 16:48:32 -07:00
Ben Komalo
13c7197da8 Revert encryption mapping for device wipes.
External storage volumes that were emulated+encrypted needed to have
their encryption mapping removed so that it doesn't try to encrypt the
volume after formatting them.

This just wires through an argument through vold, and assumes that vold
will do the right thing even if there is no encryption mapping set.

Bug: 5017638
Change-Id: I858fae3d12cb415bc34637f520f71220ad9daaad
2011-09-09 14:44:40 -07:00
Neal Nguyen
fbfe6d971d Fixing DownloadManager Test app.
The skip notification version of waitForDownloadOrTimeout wasn't actually
skipping the DownloadManager notification check.

Change-Id: Iee42d9c67e63c9dc45ef5aad8ada7d34c31eeb60
2011-09-08 20:05:32 -07:00
Fabrice Di Meglio
e3bf88da23 Fix bug #5262565 Need to remove CharCount TextDirectionHeuristics
- update unit tests too

Change-Id: I7c518f58a9f17cb679bc3913bdd38243f7ad2195
2011-09-06 11:08:45 -07:00
Fabrice Di Meglio
d32f27aec0 Merge "Fix bug #5199577 TextView with android:password="true" is showing the "dots" on the left even if the password chars are RTL" 2011-08-26 14:05:09 -07:00
Fabrice Di Meglio
7810b5f8cf Fix bug #5199577 TextView with android:password="true" is showing the "dots" on the left even if the password chars are RTL
- force TextView to LOCALE text heuristic when in "password" mode
- remove TEXT_LAYOUT_DIRECTION_UNKNOWN_DO_NOT_USE
- LocaleUtils.getLayoutDirectionFromLocale() returns "LTR" is locale is NULL or ROOT

Change-Id: I182c46aaf2d73c8b18967fffa230bfabec91ed06
2011-08-25 18:43:37 -07:00
Jeff Sharkey
ed191e1fae Merge "Data usage buckets active time, parsing ISE." 2011-08-25 11:13:38 -07:00
Jeff Sharkey
235c47ff3e Merge "Register for kernel global data usage alerts." 2011-08-25 11:13:32 -07:00
Svetoslav Ganov
12bde60b39 Merge "Intra-process view hierarchy interrogation does not work." 2011-08-25 08:54:29 -07:00
Svetoslav Ganov
8bd69610aa Intra-process view hierarchy interrogation does not work.
The content retrieval APIs are synchronous from a client's
perspective but internally they are asynchronous. The client thread
calls into the system requesting an action and providing a callback
to receive the result after which it waits up to a timeout for that
result. The system enforces security and then delegates the request
to a given view hierarchy where a message is posted (from a binder
thread) describing what to be performed by the main UI thread the
result of which it delivered via the mentioned callback. However,
the blocked client thread and the main UI thread of the target view
hierarchy can be the same one, for example an accessibility service
and an activity run in the same process, thus they are executed on the
same main thread. In such a case the retrieval will fail since the UI
thread that has to process the message describing the work to be done
is blocked waiting for a result is has to compute! To avoid this scenario
when making a call the client also passes its process and thread ids so
the accessed view hierarchy can detect if the client making the request
is running in its main UI thread. In such a case the view hierarchy,
specifically the binder thread performing the IPC to it, does not post a
message to be run on the UI thread but passes it to the singleton
interaction client through which all interactions occur and the latter is
responsible to execute the message before starting to wait for the
asynchronous result delivered via the callback. In this case the expected
result is already received so no waiting is performed.

bug:5138933

Change-Id: I382e2d8689f5189110226613c2387f553df98bd3
2011-08-24 16:26:43 -07:00
Jeff Sharkey
558a232006 Data usage buckets active time, parsing ISE.
When recording data usage, measure the actual active time, since
buckets can be quite long.  Offer incrementOperationCount() version
that reads thread stats tag for caller.  Rethrow any NPE as ISE
during stats parsing, which callers already handle.

Bug: 5171812, 5184508, 5180659
Change-Id: I6da80ccc0162be68bee279529e3a23b6f98ebd87
2011-08-24 16:00:39 -07:00