817 Commits

Author SHA1 Message Date
Jeff Sharkey
c065a8af15 Merge "Begin collecting xtables iface counters." into jb-dev 2012-05-04 12:53:02 -07:00
Kenny Root
03f22533a7 Merge "Fix some problems with ASECs" into jb-dev 2012-05-02 22:46:55 -07:00
Kenny Root
bf023589b3 Fix some problems with ASECs
On devices that had external storage, permissions weren't set correctly
on non-forward-locked applications. Also, moving forward locked
applications didn't work since DefaultContainerService wasn't able to
read it.

Fixed some faulty unit tests as well.

Bug: 6427212
Change-Id: I5c1f0bf5278549069c78939f0708c4c43a7d4006
2012-05-02 17:09:57 -07:00
Jeff Sharkey
2d6c580262 Support full 32 bits for socket tags.
Bug: 5321184
Change-Id: Iadb3a4ad541ef012cea35b70ad440eca4c879f42
2012-05-02 16:01:14 -07:00
Jeff Sharkey
e8914c3627 Begin collecting xtables iface counters.
Add method to parse new iface_stat_fmt proc stats, or return null
when kernel support is unavailable. Add test and remove older, unused
parsing code. Create new "xt" recorder to persist the new xtables
counters when available.

Add SSID support to NetworkIdentity to fix policy tests.

Bug: 6422414
Change-Id: I77f70e9acb79a559ab626f3af5c4f3599801ed43
2012-05-01 21:04:26 -07:00
Jeff Brown
c458ce98ce Add support for using the lid switch to turn off the screen.
Added a config option to allow the lid switch to turn off the
screen.  This is a closer match to what a lid switch should be
doing.

Removed an old feature to bypass keyguard when keyboard is visible
because the way it was plumbed in made bad assumptions about
the meaning of the lid switch.  Also, the last product we shipped
that had a physical keyboard turned this config option off.
So away it goes.  We can bring it back someday if we really want it.
It's questionable how useful the feature is anyhow, since it only
works when the keyguard is unsecure and when the lid switch is
unlikely to be jostled in the user's pocket.

Fixed a bug where we would tell the power manager that the keyboard
was visible even if the lid switch did not control the keyboard.
This used to cause the power manager to try to set the keyboard
brightness, which doesn't work.

Bug: 6377115
Bug: 6406726
Change-Id: Ic84b71d09563d51c92cd1cf132fa8bdee6509103
2012-04-30 15:48:42 -07:00
Kenny Root
6dceb88f1c Allow forward locked apps to be in ASECs
We couldn't put forward-locked apps in ASEC containers before since we
didn't have any permissioned filesystems. This adds the ability for
forward-locked applications to be in ASEC containers.

This means that forward locked applications will be able to be on the SD
card now.

This change also removes the old type of forward-locking that placed
parts of apps in /data/app-private.  Now all forward-locked applications
will be in ASEC containers.

Change-Id: I17ae0b0d65a4a965ef33c0ac2c47e990e55707ad
2012-04-25 14:17:02 -07:00
Chris Wren
54dfa5d90e Don't allow children of a SizeAdaptiveLayout to measure outside their declared range of valid sizes.
Bug: 6377749
Change-Id: Ie706006eee9c0ed8dda468212a652941b8e20be0
2012-04-24 16:14:31 -04:00
Gilles Debunne
0b568ff179 Merge "TextView's sub display lists have tighten bounds" 2012-04-20 10:56:05 -07:00
Chris Wren
d84e593746 fix press feedback on notification rows
Change-Id: I50de2f4d6142c2553428abc853c820f4354d0640
Bug: 6362246
2012-04-20 09:40:11 -07:00
Gilles Debunne
157aafcbee TextView's sub display lists have tighten bounds
An editable TextView caches text rendering inside an adaptive
number of sub display lists. The bounds of these use to be those
of the entire View.

This CL creates block display lists with tighten bounds, so that
(a still-to-be-implemented) quick rejection can occur.

Also cleaned-up the contradictory translations that were used to
handle the TextView's internal scroll and removed the invalidation
of display lists in that case.

TODO: When internal scroll sets a tighter clipping rect, quick
reject the creation and display of the clipped display lists.

Also renamed blockEnds to a more explicit blockEndLines.

Change-Id: I7d79bea78d06d19b6935aef75ff7aa7df2594050
2012-04-19 18:06:46 -07:00
Chet Haase
3d100d97a5 Merge "Fix logic of animator start/cancel/end callbacks" 2012-04-18 07:41:45 -07:00
Craig Mautner
a51a9564fd Add call-stack reporting methods into Debug
Added two public methods to Debug. These methods return a String
indicating the caller (getCaller()) or callers (getCallers(int depth))
of the calling method. The String indicates the class, method and line
number of the caller(s). Similar to using Throwable.fillInStackTrace()
but much more concise.

Change-Id: I53d0085aa50e4501d28e8eb3ad5b91ef700ac218
2012-04-17 17:25:50 -07:00
Chet Haase
17cf42cb85 Fix logic of animator start/cancel/end callbacks
The callbacks for animators in some corner cases were not being
called correctly. For example, startDelayed animators that were
started and then ended didn't send out the proper events.

This CL fixes that logic. Specifically:
- An animator that is end()'d will implicitly start() itself and then
assign an end value. This was already the case, but listeners were not
getting notified. Now this situation causes callbacks to listeners for
both the start and end events.
- startDelayed animators that are end()'d or cancel()'d prior to finishing
the startDelay phase will send out events (start and cancel/end, as appropriate)
to listeners.

Change-Id: I40a0f2fdb19d9ec7c3726a91363686c6ecb7d915
2012-04-17 13:58:44 -07:00
Chris Wren
3a59d6e26d A layout that switches between its children based on the requested layout height.
Change-Id: I5a4e5892fbed7cab2470e458a38accbbcb05ae51
2012-04-17 09:06:21 -07:00
Kenny Root
b7c24702c2 Better error reporting for PackageManager tests
The unit tests were eating failure reasons. Remove some assertions so
the useful messages percolate up to the JUnit report.

Change-Id: Ica8efe403ca3eb4f0c4f2a18939a22085f74a08f
2012-04-15 12:46:22 -07:00
Kenny Root
52c5acacd4 Build "install" resource for PMS tests
All the APKs in the FrameworkCoreTests's res/raw directory should be
built by source.

This change makes one more built from source that was causing test
failures with mismatched certificates.

Change-Id: I1baed15477ee39c45d3d77f9b02b81f771a16ca2
2012-04-15 12:40:14 -07:00
Svetoslav Ganov
4213804541 Accessibility focus - framework
Usefulness: Keep track of the current user location in the screen when
            traversing the it. Enabling structural and directional
            navigation over all elements on the screen. This enables
            blind users that know the application layout to efficiently
            locate desired elements as opposed to try touch exploring the
            region where the the element should be - very tedious.

Rationale: There are two ways to implement accessibility focus One is
           to let accessibility services keep track of it since they
           have access to the screen content, and another to let the view
           hierarchy keep track of it. While the first approach would
           require almost no work on our part it poses several challenges
           which make it a sub-optimal choice. Having the accessibility focus
           in the accessibility service would require that service to scrape
           the window content every time it changes to sync the view tree
           state and the accessibility focus location. Pretty much the service
           will have to keep an off screen model of the screen content. This
           could be quite challenging to get right and would incur performance
           cost for the multiple IPCs to repeatedly fetch the screen content.
           Further, keeping virtual accessibility focus (i.e. in the service)
           would require sync of the input and accessibility focus. This could
           be challenging to implement right as well. Also, having an unlimited
           number of accessibility services we cannot guarantee that they will
           have a proper implementation, if any, to allow users to perform structural
           navigation of the screen content. Assuming two accessibility
           services implement structural navigation via accessibility focus,
           there is not guarantee that they will behave similarly by default,
           i.e. provide some standard way to navigate the screen content.
           Also feedback from experienced accessibility researchers, specifically
           T.V Raman, provides evidence that having virtual accessibility focus
           creates many issues and it is very hard to get right.
           Therefore, keeping accessibility focus in the system will avoid
           keeping an off-screen model in accessibility services, it will always
           be in sync with the state of the view hierarchy and the input focus.
           Also this will allow having a default behavior for traversing the
           screen via this accessibility focus that is consistent in all
           accessibility services. We provide accessibility services with APIs to
           override this behavior but all of them will perform screen traversal
           in a consistent way by default.

Behavior:  If accessibility is enabled the accessibility focus is the leading one
           and the input follows it. Putting accessibility focus on a view moves
           the input focus there. Clearing the accessibility focus of a view, clears
           the input focus of this view. If accessibility focus is on a view that
           cannot take input focus, then no other view should have input focus.
           In accessibility mode we initially give accessibility focus to the topmost
           view and no view has input focus. This ensures consistent behavior accross
           all apps. Note that accessibility focus can move hierarchically in the
           view tree and having it at the root is better than putting it where the
           input focus would be - at the first input focusable which could be at
           an arbitrary depth in the view tree. By default not all views are reported
           for accessibility, only the important ones. A view may be explicitly labeled
           as important or not for accessibility, or the system determines which one
           is such - default. Important views for accessibility are all views that are
           not dumb layout managers used only to arrange their chidren. Since the same
           content arrangement can be obtained via different combintation of layout
           managers, such managers cannot be used to reliably determine the application
           structure. For example, a user should see a list as a list view with several
           list items and each list item as a text view and a button as opposed to seeing
           all the layout managers used to arrange the list item's content.
           By default only important for accessibility views are regared for accessibility
           purposes. View not regarded for accessibility neither fire accessibility events,
           nor are reported being on the screen. An accessibility service may request the
           system to regard all views. If the target SDK of an accessibility services is
           less than JellyBean, then all views are regarded for accessibility.
           Note that an accessibility service that requires all view to be ragarded for
           accessibility may put accessibility focus on any view. Hence, it may implement
           any navigational paradigm if desired. Especially considering the fact that
           the system is detecting some standard gestures and delegates their processing
           to an accessibility service. The default implementation of an accessibility
           services performs the defualt navigation.

bug:5932640
bug:5605641

Change-Id: Ieac461d480579d706a847b9325720cb254736ebe
2012-04-13 19:05:24 -07:00
Jeff Sharkey
8fc27e8b87 Support metered Wi-Fi NetworkPolicy.
Add networkId field to NetworkIdentity to identify Wi-Fi networks by
SSID.  Add support for policies without usage cycles.

Only apply mobile policies when SIM state is ready, which is cleaner
than just checking for airplane mode.  Also avoids creating no-op
default policies when subscriberId is null.

Bug: 3001465, 3291052
Change-Id: I1f8aaa49a5db306df022c402ea7f3f5d4bc0cfc7
2012-04-05 16:02:25 -07:00
Jeff Sharkey
b14ad8cc8c Migrate to shared MockWebServer.
Bug: 4726601
Change-Id: Ibbe71b5785a64bd2883c46b83e721fba9a25afa2
2012-03-29 14:17:03 -07:00
Gilles Debunne
f31af70915 Merge "Added a unit test for DynamicLayout#updateBlocks" 2012-03-28 17:49:24 -07:00
Kenny Root
fb32ab903a Update Wifi tests
Wifi tests used old WifiConfiguration values. This updates it to the new
values.

Change-Id: I14498aebba50f906181fa377b84855eae3d046fc
2012-03-27 21:12:08 -07:00
Gilles Debunne
1e130b2abc Added a unit test for DynamicLayout#updateBlocks
Change-Id: I1824ebeae2bbb5c60a65de36fe1696bf003347c9
2012-03-26 16:39:25 -07:00
Jesse Wilson
e300d82828 Merge "Add an API to expose Next Protocol Negotiation (NPN)." 2012-03-26 10:14:44 -07:00
Jesse Wilson
f5fb5e8096 Add an API to expose Next Protocol Negotiation (NPN).
Bug: http://b/4190756
Change-Id: If904f7ff440391a6adb2963eb2ecb990140ab7cc
2012-03-25 19:43:01 -04:00
Amith Yamasani
483f3b06ea Package restrictions per user
Packages can be enabled/disabled per user.
This requires maintaining stopped/launched states and
enabled / disabled components and packages per user.

Refactored pm.Settings and PackageSettingsBase to keep
track of states per user.

Migrated the stopped-packages.xml to users/<u>/package-restrictions.xml

Changed intent resolution to handle individual user restrictions.
Bunch of IPackageManager calls now have a userId argument.
Make AppWidgetService handle removals of packages.

Added some tests for pm.Settings and PackageManager.

Change-Id: Ia83b529e1df88dbcb3bd55ebfc952a6e9b20e861
2012-03-22 10:08:24 -07:00
David Hu
ca4aab9cd7 BandwidthTestCase
A test case that measures bandwidth metrics when annotated with
android.test.BandwidthTest and adds the metrics to the status bundle

Change-Id: I085110c66c7fcf651aefeeac3d4cdf5bd438ff67
2012-03-19 18:33:58 -07:00
Jake Hamby
3e3c3f80a9 Add support for CMAS warning notifications over CDMA.
Refactor SMS Cell Broadcast support to enable receiving CMAS warning
notifications over CDMA. The CellBroadcastReceiver app must also be
updated with the corresponding change. All cell broadcasts are now
delivered as a Parcelable SmsCbMessage object in the "message" extra
of the SMS_CB_RECEIVED_ACTION or SMS_EMERGENCY_CB_RECEIVED_ACTION,
instead of as a GSM/UMTS "pdu" byte array.

Existing functionality for ETWS and CMAS alerts over GSM/UMTS continues
to be supported using the new radio-technology independent SmsCbMessage
and related objects. Test cases are added to verify that valid and
invalid broadcast data is handled appropriately.

Unit testing discovered a bug in the BitwiseOutputStream utility class
used by the added test cases. When the BitwiseOutputStream object must be
expanded (in the private possExpand() method), the mEnd field is not
updated to the new array size. This causes a new array to be allocated
on every new write, and for all data beyond the original array allocation
to be replaced with zeroes. Fixed by adding a line to possExpand() to
update mEnd. Added a test case to BitwiseStreamsTest to verify the fix.
Besides the test cases, BitwiseOutputStream is only used by BearerData in
two places, both of which allocate a sufficient initial buffer. So the
bug in BitwiseOutputStream is not critical to fix for normal operation,
but should be fixed so that the test cases using it function correctly.

Bug: 5856308
Change-Id: I201ecbf11607fd200aaae3cbb32561efabf65672
2012-03-13 15:31:33 -07:00
Fabrice Di Meglio
41efc44754 Merge "Move LocalUtil unit tests from Frameworks to CTS" 2012-03-13 12:51:59 -07:00
Fabrice Di Meglio
1103beee44 Move LocalUtil unit tests from Frameworks to CTS
Change-Id: I9f3333a4fdf7ccbe71e5bd5a9bd0104551efb724
2012-03-13 12:49:53 -07:00
Xia Wang
4b87e4a56c Merge "Fix test flakiness" 2012-03-12 17:55:18 -07:00
Xia Wang
6d3c2f0cad Fix test flakiness
Disable soft AP before start the wifi stress test.
If soft AP test failed with AP enabled, the wifi client can not be
enabled.

Change-Id: Ie6950f6b5b662727f2e811d9b81aeb0f4f7cda91
2012-03-12 13:58:45 -07:00
Fabrice Di Meglio
05f692e805 Merge "Make Gravity RTL APIs public" 2012-03-12 10:54:42 -07:00
Fabrice Di Meglio
e8dc07dcdb Make Gravity RTL APIs public
- also move unit tests to CTS
- also small improvement for View Javadoc

Change-Id: I166d5a10f4a00f1b46c90468c8b11906b438e1ea
2012-03-09 17:32:16 -08:00
Xia Wang
d65a4f62fe Merge "Allow CM/WIFI tests running with wifi-only flag." 2012-03-09 17:17:51 -08:00
Xia Wang
776cca3b3a Allow CM/WIFI tests running with wifi-only flag.
Change-Id: I12ab8f6f0335574a5af6db497ed76e6d5fec3ab7
2012-03-09 16:59:39 -08:00
Ken Wakasa
f76a50ce8f Fix obvious typos under frameworks/base/core
Change-Id: Ia5fc3db1bb51824e7523885553be926bcc42d736
2012-03-09 22:48:43 +09:00
Xia Wang
21b4d6b7a5 Merge "Fix CM test http://b/issue?id=6125619" 2012-03-08 16:01:00 -08:00
Xia Wang
27284da88c Fix CM test
http://b/issue?id=6125619

Change-Id: I33306619424ab54281aaf592c78581179ebbfc6e
2012-03-08 15:57:26 -08:00
Amith Yamasani
28ca8f9f95 Merge "Make SyncManager and AccountManagerService multi-user aware." 2012-03-08 15:55:20 -08:00
Amith Yamasani
04e0d265e3 Make SyncManager and AccountManagerService multi-user aware.
AccountManagerService
- Maintain multiple account lists, one per user
- Keep multiple databases of accounts
- Account db moved to /data/system/users/<userid>/

SyncManager
- SyncStorageEngine keeps track of multiple users' accounts.
- SyncQueue maintained as a single instance, queueing requests from
  multiple users.
- Changed some methods to take userId arguments
- Removed some deadc0de
- Store the userId in the SyncOperation, so we know which provider
  instance to bind to when queued operations are processed.

ContentService
- Pass along the userid to sync manager calls.

ActivityManagerService:
- Fixed a bug in cancelIntentSender
- Don't bring other user's task forward when resetting tasks.

Updated tests

Change-Id: If317340ef68e902787aa3f5ceb4cf96f14aea695
2012-03-08 10:52:36 -08:00
Jeff Sharkey
8f409bcd4b Merge "Caliper benchmarks for Parcel." 2012-03-07 12:07:01 -08:00
Jeff Sharkey
a197e37f7f Caliper benchmarks for Parcel.
Bug: 6111276
Change-Id: I4b89e4c14d2dc20e71bbaed78f285e6d539a1f0f
2012-03-06 17:21:01 -08:00
Fabrice Di Meglio
42b40c0ed8 Merge "Fix bug #4972463 Update CTS tests for TextView textDirection" 2012-03-06 11:48:14 -08:00
Fabrice Di Meglio
e9c0d1495b Fix bug #4972463 Update CTS tests for TextView textDirection
- move unit tests from Frameworks to CTS

Change-Id: I4598d8e99850f49e660c5bb3fb6025e71c635635
2012-03-05 16:22:22 -08:00
Jonathan Dixon
3c90952036 Refactor WebView to be a thin proxy class
Splits interface and implementation; all client calls are forwarded
to an abstract WebViewProvider interface, and the existing implementation
moved into the WebViewClassic implementor of this interface.

Originally taken from a snapshot from the development branch, by:
git diff HEAD 9a4c328a54cc05e5 | git apply
- but then rebased to keep up to date with master

Interdepends on webkit and Browser changes:
https://android-git.corp.google.com/g/158979
https://android-git.corp.google.com/g/167911

Change-Id: I91403f32654ff308934e95c832d17b292a7d9b2e
2012-03-02 11:17:47 +00:00
Tsu Chiang Chuang
756fe38d08 am 6053b195: am bb69bde5: am 3e701270: Merge "extend timeout to allow for more time for the device to connect." into ics-mr1
* commit '6053b195bcd49676b46b2257f6e1da04d0b4d9a5':
  extend timeout to allow for more time for the device to connect.
2012-03-01 17:12:55 -08:00
Irfan Sheriff
d3975a9177 Fix WifiManager async API
Fix the current asynchronous API to use callback like the way
was done with p2p API.

In the process, fix the use of WPS

Change-Id: Ib6f8714cf51b3525b655948268804e7eaaf17587
2012-03-01 13:57:23 -08:00
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
Jake Hamby
b303b42816 Merge "Revert "Add support for CMAS warning notifications over CDMA." I'll submit again when the app change is ready." 2012-02-29 14:04:48 -08:00