12515 Commits

Author SHA1 Message Date
Benoit Goby
923bd98f67 Merge "UsbDebuggingManager: Add interface to clear secure adb keys" 2013-02-02 01:56:49 +00:00
Nick Kralevich
1782468c88 Merge "EntropyMixer: add ro.build.fingerprint to the mix" 2013-02-01 23:31:48 +00:00
Nick Kralevich
03ce76081c EntropyMixer: add ro.build.fingerprint to the mix
Change-Id: I001d337f61fef9667dd3289461bbafe574652232
2013-02-01 15:21:50 -08:00
Dianne Hackborn
f265ea9d83 App ops: vibration, neighboring cells, dialing, etc.
Improve handling of vibration op, so that apps are
better blamed (there is now a hidden vibrator API that
supplies the app to blame, and the system now uses this
when vibrating on behalf of an app).

Add operation for retrieving neighboring cell information.

Add a new op for calling a phone number.  This required
plumbing information about the launching package name through
the activity manager, which required changing the internal
startActivity class, which required hitting a ton of code that
uses those internal APIs.

Change-Id: I3f8015634fdb296558f07fe654fb8d53e5c94d07
2013-02-01 15:14:29 -08:00
Svetoslav Ganov
447d94684e "Fixing backwards cmpatibility for enabling explore by touch""
This reverts commit d1ed3cea37e4156eab14b7dc8207a520c9eab700

Change-Id: I622ef034526f8f006a5a233e72487b062020e4f6
2013-02-01 12:24:42 -08:00
Mike Cleron
0214f205f6 Merge "Revert "Fixing backwards cmpatibility for enabling explore by touch"" 2013-02-01 18:57:23 +00:00
Mike Cleron
d1ed3cea37 Revert "Fixing backwards cmpatibility for enabling explore by touch"
This reverts commit 0a9c7c144671f70f5f1af222050bd3ec6b11fe41

Change-Id: I8da530a6d0a57163522d5a63326e787a8d22ecbf
2013-02-01 18:36:41 +00:00
Daniel Sandler
4a900acdef Migrate package notification restrictions to AppOps.
Change-Id: I23064ce3014d2446d009bbdff92b301280e8b989
2013-02-01 13:26:17 -05:00
Svetoslav
97273d50ce Merge "Fixing backwards cmpatibility for enabling explore by touch" 2013-02-01 08:53:24 +00:00
Svetoslav
0a9c7c1446 Fixing backwards cmpatibility for enabling explore by touch
Change-Id: I8cbc4f03223d289547e3f3f6d1f528ad5b4f6f72
2013-02-01 00:47:29 -08:00
Geremy Condra
d4b1d9cf9c Merge changes I4859c8db,I7643024d
* changes:
  Add the TZInfo updater and relevant intent.
  Fix ConfigUpdater for binary files.
2013-01-31 19:24:42 +00: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
Geremy Condra
78a4c718e3 Add the TZInfo updater and relevant intent.
Also add a hook for ConfigUpdateInstallReciever subclasses to
change the delivery of data- in this case, from raw text to
b64 encoded binary.

Change-Id: I4859c8db1cc97c2427310a108b2fef03975df2b4
2013-01-30 17:11:44 -08:00
Wink Saville
75d880dfb0 Merge "Revert "Clean up published network condition reporting."" 2013-01-31 00:32:36 +00:00
Wink Saville
5b7573e835 Revert "Clean up published network condition reporting."
In some cases causes grey ICON's.

This reverts commit 82413d0b2acad73b9a008e0c53392a54f9555cf8

Change-Id: I09f893d03651c3fb9fcb88ee9e5ac7ce6cb6e273
2013-01-31 00:30:13 +00:00
Todd Poynor
afae9d248a Merge "BatteryService: Treat USB charging ports and charging accessories as AC" 2013-01-30 23:20:18 +00:00
Todd Poynor
b86d026a7f Merge "BatteryService: Allow power supplies to switch type between AC and USB" 2013-01-30 23:19:40 +00:00
Todd Poynor
78d8fe4bd6 BatteryService: Treat USB charging ports and charging accessories as AC
Change-Id: If98330b09a1fc44992bb96195804d434a4e20470
2013-01-30 14:24:12 -08:00
Geremy Condra
ad462d2d16 Fix ConfigUpdater for binary files.
Change-Id: I7643024d5d59dcb6c867ad80d32e24e8da83ba0d
2013-01-30 11:26:49 -08:00
Todd Poynor
701bfb1034 BatteryService: Allow power supplies to switch type between AC and USB
Accomodate power_supply drivers that switch between MAINS and USB type
according to the current power source.  Re-read the type attribute when the
power supply is online.

Switch to String8 type for strings stored locally.

Change-Id: Iacce49bf3ad85f35a7295a54df43aff7f94f3100
2013-01-30 11:24:56 -08:00
Satoshi Kataoka
da01da176d Merge "Do not turn on imes unexpectedly with unit tests" 2013-01-30 02:41:47 +00:00
Dianne Hackborn
d4d9364019 Maybe fix build.
Change-Id: Ibad8edb15e7cc332d6c29958a386d32a96f4e755
2013-01-29 16:12:48 -08:00
Dianne Hackborn
7f54ffd029 Merge "Improve configuration of default preferred apps." 2013-01-29 23:43:20 +00:00
Dianne Hackborn
8a2ed1d7c0 Improve configuration of default preferred apps.
The file that defines default preferred apps is now more
robust.  It is no longer a raw dump of the package
manager settings, but instead a more general list of a
target activity and filter.  When reading it, the remaining
information (match value, set of potential matches) is
determined dynamically.

Change-Id: I0edc6e0d2ed3dd2a6e2238992f18f7fc1f51d8d4
2013-01-29 15:18:29 -08: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
91488eed17 Merge changes Ie674e8b2,I0b9448c8
* changes:
  AccessibilityNodeINfo cache not cleared when accessibility is disabled.
  Display magnifier does not release its surface on destroy.
2013-01-29 03:21:12 +00:00
Svetoslav Ganov
d0fd54648c Merge "Adding UI test automation APIs." 2013-01-29 03:16:40 +00:00
Benoit Goby
cd7a17c645 UsbDebuggingManager: Add interface to clear secure adb keys
This is called from Settings that has a button to clear secure
adb public keys installed on the device.

Change-Id: I63ef499c049766ef13ea6cb0594ed6719f35e5f3
2013-01-28 19:15:30 -08:00
Benoit Goby
4daf9b1ba5 Merge "UsbDeviceManager: Don't start UsbDebuggingManager when data is encrypted" 2013-01-29 02:33:44 +00:00
Jeff Brown
5988335aac Merge "Optimize Looper JNI code." 2013-01-29 02:14:21 +00:00
Jeff Brown
864693461b Optimize Looper JNI code.
Use static native methods.

Release the native looper objects as soon as the Looper quits
instead of waiting until the GC finalizer to take care of it.

Change-Id: I02783e48782a8f972ec2138862f700ade33d8e78
2013-01-28 14:25:53 -08:00
Dianne Hackborn
93f770b59f Merge "Fix bug where we could get stuck repeatedly launching an activity." 2013-01-28 20:36:59 +00:00
Dianne Hackborn
0798149082 Fix bug where we could get stuck repeatedly launching an activity.
A previous change to avoid losing activities if their process
happens to be gone at the point of launch (by counting that
activity as having its state saved) has resulted in a problem
where an activity that crashes during launch will be repeatedly
relaunched.

This is fixed here by explicitly keeping track of our attempts
to launch the activity since it was last able to save its state,
and not keeping it around if it looks like the launch is
repeatedly failing.

Change-Id: Icefd952443b7eb1222f233db95e0157fc3dd72d1
2013-01-28 11:38:26 -08:00
Victoria Lease
de07d41f63 Merge "Annotate Locations coming from mock providers" 2013-01-28 17:07:39 +00: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
Benoit Goby
78a9687fc2 UsbDeviceManager: Don't start UsbDebuggingManager when data is encrypted
This avoids showing the confirmation dialog from the decryption screen

Bug: 8019508
Change-Id: I7ff364437f6b8aeea26fa8308aa4fe35b7ede5d7
2013-01-25 16:58:13 -08:00
Dianne Hackborn
b9781fe08c Merge "App ops: you can now turn off operations." 2013-01-25 19:33:11 +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
Laurent Tu
377fc095e1 Merge "Fix GpsLocationProvider.enable/disable/isEnabled" 2013-01-24 23:42:03 +00:00
Laurent Tu
7b5aeca50b Fix GpsLocationProvider.enable/disable/isEnabled
Fix the issue where GpsLocationProvider.isEnabled() returns true when it
is really false (and the other way around), when the handler hasn't
processed the enable/disable messages yet.

This can be systematically reproduced when the caller code is using the
same thread as the thread of the handler in GpsLocationProvider.

For example, this was happening in LocationManagerService.switchUser().
It would start by disabling all the providers (with
updateProviderListenersLocked()), then re-enable them in
updateProvidersLocked() only when isEnalbed()==false, which was in the
wrong state since the GpsLocationProvider.ENABLE message hadn't been
processed yet. As a result, the GpsLocationProvider was disabled upon
startup of the phone.

This is a slight problem for the enable() contract, which specifies that
getStatus() must be handled, getStatus() will be handled but might have
slighty not-up-to-date info in this case.

Bug: 8028017

Change-Id: Iff91a11cc150e9029a6db85b64a10a926e12b0ba
2013-01-24 15:26:02 -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
51ff575d1b Merge "Fix issue #7649720: ANR occur when OTA with lower version..." 2013-01-23 22:46:01 +00:00
Dianne Hackborn
846dda3fa7 Merge "Add new disabled state for "optional" built-in apps." 2013-01-23 22:43:11 +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
Dianne Hackborn
c4d27a7d55 Fix issue #7649720: ANR occur when OTA with lower version...
...of Play Store is included

The issue is that the name of the play store apk on the system
image has changed, and the package manager has a bug when this
happens and it is being hidden by an updated version of the
application that is still a newer version.  In this case it
doesn't do the normal scan of the system apk, but just leaves
its old disabled state.  However if the code path has changed,
this will trip up other code that thinks the system apk has
disappeared (since when it checks for the existence of the apk
with the stored code path, it doesn't find anything).

The fix here is to add a special case to make sure the code
path is updated even if we are otherwise ignoring the hidden
system image package data.

Change-Id: Ic5118f94c078da7a30b53b9cadf7c9844f7ba866
2013-01-22 18:30:17 -08:00
Svetoslav
cb9a61bdc4 Display magnifier does not release its surface on destroy.
Change-Id: I0b9448c8859b0167632652060b08072dc8c9c0a5
2013-01-22 18:11:42 -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
Jeff Sharkey
56dc0e02fc Merge "Tests to assert correct January behavior." 2013-01-23 01:35:21 +00:00