972 Commits

Author SHA1 Message Date
Jeff Sharkey
9a2c2a6da9 Parse network stats using native code.
Switch to parsing detailed network stats with native code, which
is 71% faster than ProcFileReader.

Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
2013-02-13 17:40:49 -08:00
Wink Saville
35185a9ccf Fix broken test.
Change-Id: I8c5649c9b3d917cf13b94d49da44eaf510643df6
2013-02-12 17:07:21 -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
Maggie Benthall
d2726582f1 Fix for SettingsProvider to query for correct user.
insertForUser takes a specified user and attempts to adjust that user's
settings, first looking at their existing settings to determine the difference.
However it was querying the settings for the calling user, rather than for
the user whose settings were being changed.

Also add a test that exercises the fix.

Change-Id: I6ed6fd79154ac1b6e6ab880769ac9081dfff6b80
2013-02-06 18:53:47 -05:00
Xia Wang
eb22ed9171 Fix Connectivity Manager test:
-Due to security change, the test pid is not allowed to broadcast
ACTION_AIRPLANE_MODE_CHANGED intent, which is a pretected intent and
can only be sent by the system, change the test app to use system user id.

Change-Id: I2525e30c13a97d5fcab0fc9537e8fac18e0b5457
2013-02-01 16:44:57 -08:00
Jeff Sharkey
8e7b3b15f7 Support optional values in ProcFileReader.
When new values are added to proc files, we need to handle reading
them from both old and new kernels.  This change supports optionally
reading long values.  Tests to verify.

Bug: 7903145
Change-Id: I9fe250c0486c3cce3cf3d8624f01af01128d1191
2013-01-31 18:27:00 -08:00
Xia Wang
c5401d4451 am 63d25816: am 599f9611: am f3ef10b1: am 2297d1e7: Merge "Fix WiFi test:" into jb-mr1.1-dev
# Via Android Git Automerger (3) and others
* commit '63d258167637309c0c85725ecc9112a88bf57824':
  Fix WiFi test:
2013-01-30 19:03:39 -08:00
Xia Wang
63d2581676 am 599f9611: am f3ef10b1: am 2297d1e7: Merge "Fix WiFi test:" into jb-mr1.1-dev
# Via Android Git Automerger (2) and others
* commit '599f9611aab587d13b4d7bac94fc628c675591a1':
  Fix WiFi test:
2013-01-30 19:01:14 -08:00
Xia Wang
f2991add02 Fix WiFi test:
-- In environment where there are too many APs, sometimes, the AP will not show in the scan list.
    Part of the reason is due to the change that the scanning on each frequency is shortened to save power.
    to avoid that, change the test to connect without scanning.

 -- Increase the timer to wait for WiFi to be connected

Change-Id: If1a72607b3c7ad13dbbf788607665986eaf5b6b3
2013-01-30 18:52:27 -08:00
Jeff Sharkey
ed1ad7fada Merge "Add wrapping support to IndentingPrintWriter." 2013-01-31 00:37:34 +00:00
Jeff Sharkey
71cb446f01 Add wrapping support to IndentingPrintWriter.
When created with a wrapping width, any content longer than the
requested width will be wrapped onto additional lines.  This supports
use-cases like dumping lots of data with printPair().

Improve documentation and add tests to verify behavior.

Change-Id: Ibdfce198f0e69f4df7725544fd1cd02fa029c647
2013-01-30 16:35:35 -08:00
Wink Saville
d21e24bcce Merge "Cleanup StateMachine LogRec handling and get tests working." 2013-01-30 19:44:16 +00:00
Wink Saville
efcc3d3566 Cleanup StateMachine LogRec handling and get tests working.
Change-Id: I13107e846812b16f1c95be11626500dbd7a13b2a
2013-01-30 11:21:22 -08:00
Jeff Sharkey
3029bf225c Check text length when testing for newline.
Also add tests to verify.

Bug: 8102140
Change-Id: I7e5dbff53caeb50bfa0fb4ea5dce73e3c742986a
2013-01-30 11:01:12 -08:00
Satoshi Kataoka
da01da176d Merge "Do not turn on imes unexpectedly with unit tests" 2013-01-30 02:41:47 +00:00
Svetoslav
dc4271ce1d Removing duplicated tests that use hidden APIs
Change-Id: If3e32e8659fcb4dc2186fea668601a93f4556a73
2013-01-29 01:38:48 -08:00
Satoshi Kataoka
f1367b7e90 Do not turn on imes unexpectedly with unit tests
Bug: 7872918

Change-Id: Ie1d74c9fac27de140e7aa85f2eaefcb89aa06ea7
2013-01-28 19:25:55 +09:00
Jeff Sharkey
dda73b5dcd Add LongSparseLongArray with tests.
Change-Id: Iae32ba7647601c587e30834379d7d3c2235c75b0
2013-01-18 16:59:14 -08:00
Irfan Sheriff
77e843a305 Merge "Fix connectivitymanagertest" 2013-01-15 10:36:40 -08:00
Irfan Sheriff
f2488b6328 Fix connectivitymanagertest
Change-Id: If5687eacec0f502c39b102eb5cf7d9383f0ec056
2013-01-15 10:35:02 -08:00
Jeff Sharkey
06c5f8a768 Examine widget hierarchy to find clocks.
When switching to a widget, examine its hierarchy to determine if it
contains TextClocks that show hour and minute for the local timezone.
If so, hide the status bar clock.  Doesn't fix closing walls.

Bug: 7667638
Change-Id: I1e2c40345c9e5eb0193efd70838c7ca9f779190b
2013-01-11 10:49:19 -08:00
Brian Carlstrom
305efe23a3 am 498eaf58: am bc7d5a55: am 537fb0af: Merge "Use most specific attributes for distinguished name display"
* commit '498eaf58ad399e42cf7b3aca020b828c35023288':
  Use most specific attributes for distinguished name display
2013-01-04 17:50:52 -08:00
Brian Carlstrom
bc7d5a55b2 am 537fb0af: Merge "Use most specific attributes for distinguished name display"
* commit '537fb0afe24a520e7b9a2442786b6fb4fe194392':
  Use most specific attributes for distinguished name display
2013-01-04 15:47:39 -08:00
Brian Carlstrom
91154ce658 Use most specific attributes for distinguished name display
Bug: 7894348
Bug: http://code.google.com/p/android/issues/detail?id=41662
Change-Id: I8048a53b8a9a17b384f12b6a4f40071bb3dd3e04
2013-01-04 15:27:24 -08:00
Amith Yamasani
03cb98aecf Move Observer test to servicetests
Change-Id: Ib3493af4eb3185db79004a3cad5473161ed51f71
2012-12-11 11:15:25 -08:00
Amith Yamasani
e03c17f1cb Merge "Move one more test." 2012-12-11 11:08:06 -08:00
Amith Yamasani
814a8d35ae Move one more test.
Change-Id: Iea0e0b5727746f2332db2ab1c1b216326eb50f13
2012-12-11 11:06:21 -08:00
Amith Yamasani
8ff9a156c0 Fix build. Forgot to move this test.
Change-Id: I06aab8ec6e2dac86b65bbeed3587444260fec2e8
2012-12-11 10:42:09 -08:00
Jeff Sharkey
7a96c39c51 Move lingering services to services.jar.
This helps reduce the pressure on framework.jar, and makes it clear
that it should only be used by the system_server.

Bug: 7333397
Change-Id: I0858904239535380fbf30562b793e277d8c3f054
2012-12-11 09:50:50 -08:00
Jeff Sharkey
6dd028cbb9 am 9f43afad: am 68363456: am 7420ab68: Merge "Utility to format human-friendly durations." into jb-mr1.1-dev
* commit '9f43afad9de92fc36dc7b242585ef734e834285c':
  Utility to format human-friendly durations.
2012-11-16 10:37:54 -08:00
Jeff Sharkey
9f43afad9d am 68363456: am 7420ab68: Merge "Utility to format human-friendly durations." into jb-mr1.1-dev
* commit '68363456c1f360c0f1afe637a1f3028519e059ed':
  Utility to format human-friendly durations.
2012-11-15 11:54:43 -08:00
Jeff Sharkey
53f6e8a9b9 Utility to format human-friendly durations.
Bug: 6777872
Change-Id: Ie7ebcb456306f4f88b4707030dd7beda3fc90368
2012-11-13 17:26:39 -08:00
Kenny Root
7b172a49a9 am 58ed5d74: am 768d9e1a: Merge "Correct executable bit for source files"
* commit '58ed5d748c0b9b64845975ef5844ad313de7c3f6':
  Correct executable bit for source files
2012-11-07 13:08:25 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
Xia Wang
e6f2f6cffd am 33185d4f: am f1e32af5: am c86e8dff: Merge "Fix WiFi stress test" into jb-mr1-dev
* commit '33185d4f68b533e1289d1dcc1d88e43fe8462450':
  Fix WiFi stress test
2012-10-31 21:26:11 -07:00
Xia Wang
33185d4f68 am f1e32af5: am c86e8dff: Merge "Fix WiFi stress test" into jb-mr1-dev
* commit 'f1e32af5ae629a1a0f73ee12aa6390ea9e527d32':
  Fix WiFi stress test
2012-10-31 21:23:31 -07:00
Xia Wang
b2a2096903 Fix WiFi stress test
- Disable lock screen after screen is turned on.
   Without disabling lock screen, device will screen off automatically after around 10 seconds

 - Add a longer timer for ping test when the data traffic is stalled.
   For a short ping test, it is hard to tell whether it is a transient issue or a real issue.

   bug# 7426823

Change-Id: If1a560e11dcdff519562bb2a22651d1fd523b5a2
2012-10-31 17:03:23 -07:00
Adam Powell
b09aadeda5 am a23f69a8: am 86e0d95d: Merge "Reattach header view after DPAD scroll."
* commit 'a23f69a8782e0edeff815cfb5275f2864fc1d19e':
  Reattach header view after DPAD scroll.
2012-10-23 15:03:55 -07:00
Adam Powell
a23f69a878 am 86e0d95d: Merge "Reattach header view after DPAD scroll."
* commit '86e0d95de1007d339af467c1484b09878ee528fc':
  Reattach header view after DPAD scroll.
2012-10-23 15:01:43 -07:00
Adam Powell
86e0d95de1 Merge "Reattach header view after DPAD scroll." 2012-10-23 14:04:19 -07:00
Kenny Root
a7fb9d907c am 9396f183: resolved conflicts for merge of a5d29b2c to jb-mr1-dev-plus-aosp
* commit '9396f183c2db5d6167f39a8d5667fb4abcc96e5e':
  Try to free cache before giving up on install
  Robustly add symlink and add for non-primary users
2012-10-19 17:20:03 -07:00
Alon Albert
57286f9706 Add sync reason to dumpsys
Also:
 * add a second history section that logs
 * log mesg as text instead of number
 * dump Sync Status as a table

 Sample log:
Recent Sync History
  #1  : 2012-10-11 15:06:11     USER    0.4s            aagmtest1@gmail.com/com.google u0  com.android.calendar                                  com.google.android.calendar
  #2  : 2012-10-11 15:06:11     USER    0.1s            aagmtest1@gmail.com/com.google u0  subscribedfeeds                                       android.uid.system:1000
    mesg=parse-error
  #3  : 2012-10-11 15:06:11     USER    0.0s            aagmtest1@gmail.com/com.google u0  com.google.android.apps.uploader.PicasaUploadProvider android.uid.system:1000
  #4  : 2012-10-11 15:06:10     USER    0.1s            aagmtest1@gmail.com/com.google u0  com.google.android.gms.plus.action                    android.uid.system:1000

Recent Sync History Extras
  #1  : 2012-10-11 15:06:11     USER   aagmtest1@gmail.com/com.google u0  com.android.calendar                                  Bundle[{feed=aagmtest1@gmail.com, force=true, ignore_settings=true, ignore_backoff=true}]
  #2  : 2012-10-11 15:06:11     USER   aagmtest1@gmail.com/com.google u0  subscribedfeeds                                       Bundle[{ignore_backoff=true, force=true, ignore_settings=true}]
  #3  : 2012-10-11 15:06:11     USER   aagmtest1@gmail.com/com.google u0  com.google.android.apps.uploader.PicasaUploadProvider Bundle[{ignore_backoff=true, force=true, ignore_settings=true}]
  #4  : 2012-10-11 15:06:10     USER   aagmtest1@gmail.com/com.google u0  com.google.android.gms.plus.action                    Bundle[{ignore_backoff=true, force=true, ignore_settings=true}]

Sync Status
Account aagmtest1@gmail.com u0 com.google
=======================================================================
Authority                                           Syncable  Enabled  Delay  Loc  Poll  Per  Serv  User  Tot  Time  Last Sync            Periodic
-------------------------------------------------------------------------------------------------------------------------------------------------------------
com.google.android.apps.currents                    1         true            0    2     1    2     1     6    0:35  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:40  2012-10-13 14:58:13
com.google.android.music.MusicContent               1         true            0    0     1    2     1     4    0:09  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:18  2012-10-13 14:58:13
com.google.android.gms.plus.action                  1         true            0    0     1    1     1     3    0:00  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:15  2012-10-13 14:58:13
com.google.android.apps.magazines                   1         true            0    1     1    2     1     5    0:14  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:00  2012-10-13 14:58:13

Change-Id: Iffeb825e4b4f6217940a39b0dd71e06856f08f3f
2012-10-19 12:39:27 -07:00
Kenny Root
a3e90798b7 Robustly add symlink and add for non-primary users
Amazingly, some apps still don't use the nativeLibraryPath. So add a lib
symlink for non-primary users to fix that.

Also, there was an error when the symlink existed that it would give up.
This shouldn't really happen, but in that case, just remove it and
create a new one to be safe.

Also, move the downgrade code to the appropriate place. This downgrade
case triggered the above symlink existing bug.

Bug: 7318366
Bug: 7371571
Change-Id: Ia175b36d98f00bdc2f2433b909aafd524eb34d15
2012-10-18 15:12:09 -07:00
Xia Wang
2ab453b52b Fix connectivity manager test for tablet with data connection, multi-user support
bug#7366674

Change-Id: Ibbb4becebfc833529e85d8a311366586c5ba54ee
2012-10-17 12:03:29 -07:00
Jeff Sharkey
9d0791bf6a Fix build, only invalidate when creating user.
Bug: 7276595
Change-Id: I322f9d76a682b2d45fc556e35381442458168fe5
2012-10-10 00:01:26 -07:00
Jeff Sharkey
6ab72d74b8 Make RegisteredServicesCache multi-user aware.
RegisteredServicesCache is used to track account authenticators and
sync adapters, which can vary based on user.  This change requires
that callers now provide a userId when making cache requests.  It
continues persisting into a single file for now, which is keyed based
on UID.

It now watches for package broadcasts from all users, and scans
packages on-demand.  It changes cache callers to provide a relevant
userId, and evicts cache entries when users are stopped.

Changes SyncManager to only work with accounts from running users,
only kicking off pending syncs once a user is started.

Bug: 7276595, 7316150
Change-Id: I79466a84aa69aa37e4bd9691c5d6221d3662ff29
2012-10-09 21:39:19 -07:00
Ben Gruver
9dbbfcda81 Merge "Pass the originating uid to the package verifier" into jb-mr1-dev 2012-09-28 10:58:19 -07:00
Jeff Sharkey
625239a054 Migrate more Secure settings to Global.
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.

Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
2012-09-27 16:22:53 -07:00
Ben Gruver
37d83a3caf Pass the originating uid to the package verifier
Bug: 6923241
Change-Id: I85a3e0d53b469543cb0551d3a440d2663b5d0697
2012-09-27 13:02:06 -07:00