12720 Commits

Author SHA1 Message Date
Jeff Brown
8dd68d794c am 5988335a: Merge "Optimize Looper JNI code."
# Via Android (Google) Code Review (1) and Jeff Brown (1)
* commit '5988335aacdbea5b60b597fa2c52583bc655e30f':
  Optimize Looper JNI code.
2013-01-28 18:18:12 -08: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
f77c053c7d am 93f770b5: Merge "Fix bug where we could get stuck repeatedly launching an activity."
# Via Android (Google) Code Review (1) and Dianne Hackborn (1)
* commit '93f770b59fa1bd0f2a5c18fcfaffd2a1fc54f585':
  Fix bug where we could get stuck repeatedly launching an activity.
2013-01-28 12:39:08 -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
c8d82dd644 am de07d41f: Merge "Annotate Locations coming from mock providers"
# Via Android (Google) Code Review (1) and Victoria Lease (1)
* commit 'de07d41f6396f9f040fed2b6780932d8e5dbb482':
  Annotate Locations coming from mock providers
2013-01-28 09:11:18 -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
1a54aa74f7 am b9781fe0: Merge "App ops: you can now turn off operations."
# Via Android (Google) Code Review (1) and Dianne Hackborn (1)
* commit 'b9781fe08c5b1afba086857aa18b46862550ae88':
  App ops: you can now turn off operations.
2013-01-25 11:37:24 -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
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