12707 Commits

Author SHA1 Message Date
Laurent Tu
eb3d4a3b42 am 377fc095: Merge "Fix GpsLocationProvider.enable/disable/isEnabled"
# Via Android (Google) Code Review (1) and Laurent Tu (1)
* commit '377fc095e142b160b5093ed1d3717d0b18aff0f9':
  Fix GpsLocationProvider.enable/disable/isEnabled
2013-01-24 15:44:47 -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
7af76f20cd am d8ba6cc9: Merge "Add new API to propagate contextual data to the assist action"
# Via Android (Google) Code Review (1) and Dianne Hackborn (1)
* commit 'd8ba6cc9217e2e042106870e9d2e70cfd80426d6':
  Add new API to propagate contextual data to the assist action
2013-01-23 14:51:07 -08:00
Dianne Hackborn
3bfd04ff5a am 51ff575d: Merge "Fix issue #7649720: ANR occur when OTA with lower version..."
# Via Android (Google) Code Review (1) and Dianne Hackborn (1)
* commit '51ff575d1bd0337a68ae173ee699ff8298ddb703':
  Fix issue #7649720: ANR occur when OTA with lower version...
2013-01-23 14:48:41 -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
58b33c3d87 am 846dda3f: Merge "Add new disabled state for "optional" built-in apps."
# Via Android (Google) Code Review (1) and Dianne Hackborn (1)
* commit '846dda3fa7a194b57acdb977e443c93c7cddcea1':
  Add new disabled state for "optional" built-in apps.
2013-01-23 14:47:17 -08: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
87b45adcaa am 56dc0e02: Merge "Tests to assert correct January behavior."
* commit '56dc0e02fc0e519a86c5efefe0143001d2563d43':
  Tests to assert correct January behavior.
2013-01-22 17:38:44 -08:00
Jeff Sharkey
56dc0e02fc Merge "Tests to assert correct January behavior." 2013-01-23 01:35:21 +00:00
Jeff Sharkey
1539905b46 Tests to assert correct January behavior.
Change-Id: I162102b6f1b892b79e2f5b96cb0184abb85d00bc
2013-01-22 17:32:53 -08:00
Dianne Hackborn
fd7adedebf Add new disabled state for "optional" built-in apps.
The disabled state allows you to make an app disabled
except for whatever parts of the system still want to
provide access to them and automatically enable them
if the user want to use it.

Currently the input method manager service is the only
part of the system that supports this, so you can put
an IME in this state and it will generally look disabled
but still be available in the IME list and once selected
switched to the enabled state.

Change-Id: I77f01c70610d82ce9070d4aabbadec8ae2cff2a3
2013-01-22 17:10:23 -08:00
Amith Yamasani
7e396710c0 am 172175fe: am 05f1f0ec: am 555b07df: am 2c64b539: am 596532d9: Properly initialize recognition service if the recognizer component changed.
* commit '172175fea9f2c1d2967b53944e33b2f03c021875':
  Properly initialize recognition service if the recognizer component changed.
2013-01-22 15:53:44 -08:00
Amith Yamasani
172175fea9 am 05f1f0ec: am 555b07df: am 2c64b539: am 596532d9: Properly initialize recognition service if the recognizer component changed.
* commit '05f1f0ece8f39e77c96825fb2e3451ebd388adad':
  Properly initialize recognition service if the recognizer component changed.
2013-01-22 15:51:14 -08:00
Amith Yamasani
05f1f0ece8 am 555b07df: am 2c64b539: am 596532d9: Properly initialize recognition service if the recognizer component changed.
* commit '555b07df08dd4c2472374d0767926ebab928dede':
  Properly initialize recognition service if the recognizer component changed.
2013-01-22 15:48:10 -08:00
Amith Yamasani
555b07df08 am 2c64b539: am 596532d9: Properly initialize recognition service if the recognizer component changed.
* commit '2c64b53976a99f28bc7c0612648581f9b93bf8b0':
  Properly initialize recognition service if the recognizer component changed.
2013-01-22 15:46:25 -08:00
Amith Yamasani
2c64b53976 am 596532d9: Properly initialize recognition service if the recognizer component changed.
* commit '596532d9dbea3460dbc989b0316c721ca69f4915':
  Properly initialize recognition service if the recognizer component changed.
2013-01-22 15:43:53 -08:00
Amith Yamasani
596532d9db Properly initialize recognition service if the recognizer component changed.
The getServiceInfo() call directly to IPackageManager does not throw an exception.
The return value needed to be checked for null.

Bug: 8031032
Change-Id: I701b9e8cf3b2406a3b35a486183330489b3d46f5
2013-01-22 15:35:49 -08:00
Victoria Lease
54ca7aef2e Annotate Locations coming from mock providers
LocationManagerService now annotates incoming Location objects that
have come from mock location providers. The new isFromMockProvider()
method can be called on any Location to determine whether the
provider that supplied the Location was a mock location provider.

Bug: 6813235
Change-Id: Ib5140e93ea427f2e0b0036151047f87a02b4d23a
2013-01-22 09:39:47 -08:00
Dianne Hackborn
d9c71435ca am cc743347: Merge "New API to get app op information about a single package."
* commit 'cc7433470f00fac3bbe7835de3ded4b9bf121244':
  New API to get app op information about a single package.
2013-01-18 18:51:48 -08:00
Dianne Hackborn
72e3983d38 New API to get app op information about a single package.
Change-Id: I986453d9bb4161da467fb820b12502464e936483
2013-01-18 18:36:09 -08:00
Robert Greenwalt
02f63f77c2 am 20da885c: Merge "Revert "Second pass tying into dns cache per interface""
* commit '20da885caa27ee8148c61be0ff56451ad6bf8146':
  Revert "Second pass tying into dns cache per interface"
2013-01-18 16:39:07 -08:00
Robert Greenwalt
20da885caa Merge "Revert "Second pass tying into dns cache per interface"" 2013-01-19 00:36:12 +00:00
Robert Greenwalt
63837f455d Revert "Second pass tying into dns cache per interface"
This reverts commit f60f94a89e49c125f4aff6496710a0fb66579545

Change-Id: If52dffd5100a6b03275da0eabfa05e24c5ecada9
2013-01-19 00:34:07 +00:00
Dianne Hackborn
c152e16b07 am 8fea4e72: Merge "Rework ParceledListSlice to be much easier to use."
* commit '8fea4e72e4dcff9fa76168b9e26cf5907102f70b':
  Rework ParceledListSlice to be much easier to use.
2013-01-18 16:20:40 -08:00
Dianne Hackborn
d8e1dbb6bc Rework ParceledListSlice to be much easier to use.
Take advantage of this to return better information about
packages filtered by permissions -- include the permissions
they have in the requested array.

Also fix issue #8026793 (Contact picture shows default pic
while searching for a contact in qsb) by using the base
package name of the Context when reporting the app name
of an operation.  Otherwise you could make a resource-only
context for another application and do calls through that
and get reported as the wrong app.

Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
2013-01-18 13:02:26 -08:00
Wink Saville
0120602c58 am 52dda54b: Merge "Clean up published network condition reporting."
* commit '52dda54b081f3a3fb1cc475128eec820e3d5b21e':
  Clean up published network condition reporting.
2013-01-18 10:44:33 -08:00
Wink Saville
52dda54b08 Merge "Clean up published network condition reporting." 2013-01-18 18:41:39 +00:00
Wink Saville
82413d0b2a Clean up published network condition reporting.
Change-Id: I371c04bcb0547f1133e7ce12a6871aad3b3fdc6b
2013-01-18 09:31:13 -08:00
Satoshi Kataoka
812808b9f6 am 2d43bf6b: Merge "Ensure that the input method dialog is dismissed when changing the hardware keyboard state."
* commit '2d43bf6ba587e1754828b72371832eb89cbdf13b':
  Ensure that the input method dialog is dismissed when changing the hardware keyboard state.
2013-01-17 23:05:20 -08:00
Satoshi Kataoka
2d43bf6ba5 Merge "Ensure that the input method dialog is dismissed when changing the hardware keyboard state." 2013-01-18 07:03:32 +00:00
Satoshi Kataoka
04dd24d4ba Ensure that the input method dialog is dismissed when changing the hardware keyboard state.
Change-Id: I51882ecd2b1a12116f43afff7c23454164a6272b
2013-01-18 13:44:57 +09:00
Robert Greenwalt
6b000be49f am 0f8d1553: Merge "Second pass tying into dns cache per interface"
* commit '0f8d155363c361199a9d9aa5dcdbc4088990f893':
  Second pass tying into dns cache per interface
2013-01-17 09:08:33 -08:00
Dianne Hackborn
f2ca51dbff am 2125dd57: Merge "AppOps: fix nested op tracking, new API to get apps using permissions."
* commit '2125dd57cc3c1c43da9793a2ee4bb8a7bf19f083':
  AppOps: fix nested op tracking, new API to get apps using permissions.
2013-01-17 09:08:27 -08:00
Victoria Lease
04f6c873f2 am b2efa40b: Merge "Prevent OOM death for services under ServiceWatcher\'s care."
* commit 'b2efa40bc37bc83410ef38652f708ea7ef6ab845':
  Prevent OOM death for services under ServiceWatcher's care.
2013-01-17 09:08:22 -08:00
Robert Greenwalt
0f8d155363 Merge "Second pass tying into dns cache per interface" 2013-01-17 16:15:33 +00:00
Dianne Hackborn
2125dd57cc Merge "AppOps: fix nested op tracking, new API to get apps using permissions." 2013-01-17 02:51:11 +00:00
Dianne Hackborn
e799175b6b AppOps: fix nested op tracking, new API to get apps using
permissions.

Change-Id: I20c7bd58febc01d6911a90440867eaacd133c464
2013-01-16 18:10:40 -08:00
Victoria Lease
79d59f0968 DO NOT MERGE Prevent OOM death for services under ServiceWatcher's care.
Change-Id: If87be5769b55368edaf4776189e8f6e51a21eb03

Conflicts:

	services/java/com/android/server/ServiceWatcher.java
2013-01-16 17:37:21 -08:00
Victoria Lease
fd08d1ece5 Prevent OOM death for services under ServiceWatcher's care.
Change-Id: If87be5769b55368edaf4776189e8f6e51a21eb03
2013-01-16 16:21:41 -08:00
Amith Yamasani
0f4210cc01 am d4fe37be: Merge "Rename bindService to bindServiceAsUser to follow convention."
* commit 'd4fe37bee7c7433f32c23cee100c6e05ba0f3b2b':
  Rename bindService to bindServiceAsUser to follow convention.
2013-01-16 15:30:21 -08:00
Amith Yamasani
d4fe37bee7 Merge "Rename bindService to bindServiceAsUser to follow convention." 2013-01-16 23:26:30 +00:00
Amith Yamasani
27b89e6658 Rename bindService to bindServiceAsUser to follow convention.
This is for the multi-user version of bindService, not the original.

Change-Id: Ib2de35941196accf387b1a276a77e6f9af805ec0
2013-01-16 12:30:11 -08:00
Dianne Hackborn
7ed6c6d83b am 35654b61: More work on App Ops service.
* commit '35654b61e8fe7bc85afcb076ddbb590d51c5865f':
  More work on App Ops service.
2013-01-16 12:14:53 -08:00
Dianne Hackborn
35654b61e8 More work on App Ops service.
Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).

Also implement tracking of read/write ops on contacts and the
call log.  This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service.  The contacts provider and call
log provider turn this on for themselves.

This also implements some of the mechanics of being able to ignore
incoming provider calls...  all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).

Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
2013-01-16 12:11:01 -08:00