693 Commits

Author SHA1 Message Date
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
Jeff Sharkey
8e9992ae50 Register for kernel global data usage alerts.
Instead of polling every 15 minutes, register for alerts that trigger
when system-wide traffic passes a threshold.  Still mixed with polling
to persist UID stats, but relaxed to 30 minutes.  Currently watches
for every 512kB.

Make persistence decision separately for network versus UID, and use
total delta bytes when making decision.  Use light bootstrap during
systemReady() instead of heavy poll, which had been force-loading all
UID data unnecessarily.

Bug: 5023631
Change-Id: I04b723d6c4bf872fb1028071122dba66a8e1b576
2011-08-23 18:46:14 -07:00
Tsu Chiang Chuang
7a12d6ba14 Merge "fix bandwidth microbenchmark tests." 2011-08-22 11:11:07 -07:00
Tsu Chiang Chuang
6951b1b421 fix bandwidth microbenchmark tests.
Change-Id: I8e8fbfdaca629503061c3199b0a969137fa60e68
2011-08-21 13:36:23 -07:00
Brian Muramatsu
fe62e31914 Test for Settings Intent
Bug 4983978

Change-Id: I4d366bbcacdc12e5d86d22f5fab0e934e4ef66db
2011-08-17 18:11:27 -07:00
Jeff Sharkey
b5d55e302d Foreground/background network stats using sets.
Teach NetworkStats about "counter sets" coming from kernel, and use
them to track usage in foreground/background.  Add AID_NET_BW_ACCT to
system_server so it can control counter sets.

Move to composite key of NetworkIdentitySet, UID, set, and tag when
recording historical usage.  Persisting still clusters by identity,
since that is heaviest object.

Request async stats poll during systemReady() to bootstrap later
delta calculations. Reset kernel counters when UID removed. Update
various tests.

Bug: 5105592, 5146067
Change-Id: Idabec9e3ffcaf212879821515602ecde0a03de8c
2011-08-15 17:30:25 -07:00
Kenny Root
bcc954d772 Manifest digest stored during package scanning
This allows things that scanned an APK to pass a hash of the manifest to
others that would then be able to compare it.

Change-Id: I465f5edf3acab2a952c3d321c8df2247ffe012ea
2011-08-10 14:54:21 -07:00
Chet Haase
cbbd93ae70 Fix ViewPropertyAnimator duration and startDelay issues
getDuration() wasn't returning the correct thing in some cases, and
setStartDelay() had no effect whatsoever. Fixed those.

Change-Id: I89f930535ec1acddf57227937a9ad64986548998
2011-08-08 17:34:25 -07:00
Chet Haase
8b699792b6 Fix cancellation of AnimatorSet when child animation has delay
Previously, AnimatorSet incorrectly checked whether child animations were
'running' to figure out what to cancel. If a child animation was started, but
sitting in a startDelay phase, it was not 'running', so the right cancel/end
events would not propagate.

The fix is to add a new isStarted() API to Animator, which returns true when
the animator has started (but not yet ended), regardless of whether the animator
has a startDelay or not. It's basically a superset of the existing isRunning()
method, which only returns true when an animator has actually started setting values.

Change-Id: I126814cb6637b58295b6d18d9b155235671f99be
2011-08-08 15:05:53 -07:00
Tsu Chiang Chuang
4adcfb3b01 Merge "Bandwidth microbenchmark test app for ICS." 2011-08-04 18:34:53 -07:00
Chet Haase
163efc0285 Merge "Fix AnimatorSet cancellation issues" 2011-08-04 15:47:21 -07:00
Chet Haase
b8f574a165 Fix AnimatorSet cancellation issues
AnimatorSet was incorrectly ignoring cancel() when it was in the
initial startDelay phase. Fix is to change isRunning() to be true if the
animator is also in its delay phase.

Change-Id: I1a8c877de24fa294beea0ba30d495658255b13b3
2011-08-04 14:16:48 -07:00
Jeff Sharkey
63d27a9233 Network stats with varint, omit parcel fields.
Persist NetworkStatsHistory using variable-length encoding; since
most buckets have small numbers, we can encode them tighter. Initial
test showed 44% space savings. Also persist packet and operation
counters.

Let NetworkStatsHistory consumers request which fields they actually
need to reduce parcel overhead.

Tests for verify varint and history field requests, also verify end-
to-end by persisting history into byte[] and restoring. Expose
bandwidth control enabled state. Extend random generation to create
packet and operation counts. Moved operation counts to long.

Fix bug that miscalculated bytes since last persist, which would
cause partial stats loss when battery pulled.

Bug: 4581977, 5023706, 5023635, 5096903
Change-Id: If61e89f681ffa11fe5711471fd9f7c238d3d37b0
2011-08-03 17:21:07 -07:00
Kenny Root
1ebd74acf9 Better error codes for missing files
Make sure that files that don't exist aren't returning bogus 'out of
space' error codes.

Add some Javadoc so I can remember what each thing does in an IDE.

Add copyright header to NativeLibraryHelper

Bug: 3375299
Change-Id: Iac46019160921daca65b21d38897e5165063316e
2011-08-03 16:03:42 -07:00
Tsu Chiang Chuang
33f869951f Bandwidth microbenchmark test app for ICS.
Change-Id: I6fed5c47818f0fe08b9f2c18f1070d3238a469b6
2011-08-02 19:11:41 -07:00
Jeff Sharkey
a63ba59260 Add operation counts to network statistics.
Provide API to increment "operation counts" for a UID and tag, used
to eventually derive bytes/operation stats.  Internally is stored at
network layer, but should belong at data layer.  Switch profiling
to use data layer stats, which are emulated by summarizing network
layer details.

Read packet counts from new /proc/ columns and collect them into
NetworkStatsHistory.  Prevent double-counting by ignoring values from
first snapshot.  Watch for duplicate /proc/ entries.  Update tests
to verify packet and operation counters.

Bug: 5052136, 5097392
Change-Id: I1832f65a2b8a9188f8088f253474a667c21a2f09
2011-07-29 22:24:01 -07:00
Svetoslav Ganov
00aabf7d18 Touch exploration state set to clients asynchronously and depended on talking service being enabled.
1. Upon registration of an accessibility client the latter received only
   the accessiiblity state and waiting for the touch exploration state
   to be sent by the system in async manner. This led the very first
   check of touch exploration state is checked a wrong value to be reported.
   Now a state of the accessibility layer is returned to the client
   upon registration.

2. Removing the dependency on talking accessibility service to be enabled
   for getting into touch exploration mode. What if the user wants to use
   an accessibility service that shows a dialog with the text of the touched
   view?

bug:5051546

Change-Id: Ib377babb3f560929ee73bd3d8b0d277341ba23f7
2011-07-22 17:38:54 -07:00
Jesse Wilson
7a2c813d30 Skip byte order mark (BOM) in JsonReader
Bug: http://code.google.com/p/android/issues/detail?id=18508
Change-Id: I7652080d9ab475c75d0a811a6e2ede4975ebe063
2011-07-20 12:23:23 -07:00
Jesse Wilson
378c368f20 Remove accidental spaces from expected failure message.
Change-Id: I6c004ff09ba12851f57716801d72e9027db00944
2011-07-19 11:29:49 -07:00
Todd Kennedy
783123f79d Add getBlob() to MatrixCursor
Change-Id: I1abfd2fd117a2a31f99e77bd0b395c4ad0cfc6d2
2011-07-19 10:33:41 -07:00
Shimeng (Simon) Wang
ba6e855453 Merge "Add in i18n TLDs and new TLDs to the URL RegEx matcher." 2011-07-19 10:31:52 -07:00
Shimeng (Simon) Wang
52fc810f73 Add in i18n TLDs and new TLDs to the URL RegEx matcher.
also update APIs.

issue: 4384739
Change-Id: I946323d80f85fe43338fdc19c5858356faefa6cc
2011-07-19 10:20:49 -07:00
Bart Sears
07229314af Merge "Revert "Add in i18n TLDs and new TLDs to the URL RegEx matcher."" 2011-07-18 19:45:33 -07:00
Bart Sears
89006fa55c Revert "Add in i18n TLDs and new TLDs to the URL RegEx matcher."
This reverts commit 6050cf65dbdf52f52325dc4513156f9404ffe9d8
2011-07-18 19:43:07 -07:00
Shimeng (Simon) Wang
35ca86d8a4 Merge "Add in i18n TLDs and new TLDs to the URL RegEx matcher." 2011-07-18 18:04:51 -07:00
Shimeng (Simon) Wang
6050cf65db Add in i18n TLDs and new TLDs to the URL RegEx matcher.
issue: 4384739
Change-Id: I96f2263d9a14fc2560583e2719cf7c5ac5c46d9e
2011-07-18 17:24:14 -07:00
Jesse Wilson
a11c2f8674 Merge "Track line and column when parsing JSON." 2011-07-18 14:39:39 -07:00