12973 Commits

Author SHA1 Message Date
David Christie
1b9b7b1f1b Fix security issues with LocationManager where apps with coarse permissions
can get location updates too frequently by repeatedly calling getLastKnownLocation
or by registering/unregistering location updates frequently.

Change-Id: Ibd9ce28b0401372b995a0dbfb2f0a984dd11c0b1
2013-04-15 15:31:11 -07:00
Svetoslav Ganov
26257a09a5 Merge "Allow for setting test type as a monkey." into jb-mr2-dev 2013-04-13 00:15:40 +00:00
Emily Bernier
ce70311b67 Merge "Add user restrictions (credentials, user removal)" into jb-mr2-dev 2013-04-12 20:21:36 +00:00
Adam Momtaz
8f6f1f43ee Allow for setting test type as a monkey.
1. This allows UiAutomation type tests to run as if an
   android monkey test is running. This allows applications
   that recognize that they are drive by a test framework and
   avoid performing certain actions such as calling 911.

2. Fixed a bug where the UiAutomation#disconnect() was not
   called when the instrumentation is shutdown.

bug: 8588857

Change-Id: I9e3624dfbe2b8f81f27805711de1098ea2edd03d
2013-04-12 12:54:34 -07:00
Robert Greenwalt
3016244ffb Merge "Add new route.hasGateway() api" into jb-mr2-dev 2013-04-12 19:02:24 +00:00
Robert Greenwalt
ca441ee2f0 Add new route.hasGateway() api
Fixes issues brought in by change to isHostRoute.  isHostRoute
was technically correct, but the callers really wanted hasNextHop
behavior.

bug:8597268
Change-Id: I360761ccfa98b2ba34642f717a78fa71ec1bae4f
2013-04-12 11:22:52 -07:00
Kenny Root
6fd1c85d7f Remove keystore entries when app data cleared
When an application's user data is cleared, the keystore entries need to
be cleared as well. Previously we were only clearing entries when the
application was uninstalled for all users. Now we cover the case of
multiuser as well.

Bug: 8566369
Change-Id: I201c92d0893f0d18e87970dcd59ef6cd904584dc
2013-04-12 10:09:02 -07:00
Svetoslav
14c8c741f7 Merge "Adding APIs for an accessibility service to intercept key events." into jb-mr2-dev 2013-04-12 05:45:43 +00:00
Dianne Hackborn
7b92467179 Fix issue #7643046: Activity.getCallingPackage() bogusly returns null...
...after having to recreate the task stack

Change-Id: Ia354240f3650ddb578f2116a2aa4584e9ffe8508
2013-04-11 18:12:56 -07:00
Emily Bernier
b223f73a69 Add user restrictions (credentials, user removal)
Created constants in current.txt and UserManager.java, modified restrictions access in UserManagerService.java.

Change-Id: If8d778d84af81dcbf5784f6e0afd9ef966cc8ecf
2013-04-11 19:56:49 -04:00
Robert Greenwalt
b7e6a4433b Merge "Routing workaround." into jb-mr2-dev 2013-04-11 23:27:20 +00:00
Svetoslav
c4fccd183f Adding APIs for an accessibility service to intercept key events.
Now that we have gestures which are detected by the system and
interpreted by an accessibility service, there is an inconsistent
behavior between using the gestures and the keyboard. Some devices
have both. Therefore, an accessibility service should be able to
interpret keys in addition to gestures to provide consistent user
experience. Now an accessibility service can expose shortcuts for
each gestural action.

This change adds APIs for an accessibility service to observe and
intercept at will key events before they are dispatched to the
rest of the system. The service can return true or false from its
onKeyEvent to either consume the event or to let it be delivered
to the rest of the system. However, the service will *not* be
able to inject key events or modify the observed ones.

Previous ideas of allowing the service to say it "tracks" the event
so the latter is not delivered to the system until a subsequent
event is either "handled" or "not handled" will not work. If the
service tracks a key but no other key is pressed essentially this
key is not delivered to the app and at potentially much later point
this stashed event will be delivered in maybe a completely different
context.The correct way of implementing shortcuts is a combination
of modifier keys plus some other key/key sequence. Key events already
contain information about which modifier keys are down as well as
the service can track them as well.

bug:8088812

Change-Id: I81ba9a7de9f19ca6662661f27fdc852323e38c00
2013-04-11 16:00:08 -07:00
Robert Greenwalt
ccbe7e6ff1 Merge "Use CONNECTIVITY_INTERNAL for global proxy" into jb-mr2-dev 2013-04-11 21:11:44 +00:00
Jaikumar Ganesh
6d0c1d78f1 Sensor values changes.
1. Remove Sensor Event Pool.
2. Allocate fixed array values for each Sensor added.
   - Needed for backward compatibility.
3. Use SDK checks for backward compatibility for
   rotation vector.

b/8165631

Change-Id: I2d2cf10d3460478ed7af8e6188343f4bb033503c
2013-04-11 10:25:35 -07:00
Amith Yamasani
f900647aa8 Merge "Don't sync from adapters that haven't opted in to restricted accounts" into jb-mr2-dev 2013-04-11 02:21:37 +00:00
Amith Yamasani
9429afba06 Fix a security check in getting app restrictions
Change-Id: I02fbab8765d3f8646d0fe62ee867566d1d14707d
2013-04-10 18:40:51 -07:00
Amith Yamasani
b3a9872549 Merge "Show an error dialog when account type is requested on a limited user" into jb-mr2-dev 2013-04-11 00:27:49 +00:00
Amith Yamasani
9422bdca31 Don't sync from adapters that haven't opted in to restricted accounts
SyncManager should not allow syncing of data from apps that haven't opted
in to viewing restricted accounts in limited users.

Override getIsSyncable() to check if the sync adapter has the manifest
entry to enable restricted accounts of that account type. Return the default
isSyncable state if the adapter has opted in, otherwise return 0 for false.

Bug: 8566533
Change-Id: I3777f1e4fdb8debe1724ab083272e2d9bd2e63f2
2013-04-10 17:06:02 -07:00
Christopher Tate
790518a1a2 Merge "Implicitly enable system apps when updates installed" into jb-mr2-dev 2013-04-10 23:58:37 +00:00
Craig Mautner
cc979c9eae Merge "Debug logging improvement." into jb-mr2-dev 2013-04-10 23:54:29 +00:00
Santos Cordon
acd840d5c3 Merge "Obfuscate any phone numbers that pass through the event log." into jb-mr2-dev 2013-04-10 22:53:08 +00:00
Amith Yamasani
23c8b96a7e Show an error dialog when account type is requested on a limited user
This covers the scenario where an app doesn't find an account of the
required type and requests the account manager to add one of that
type.

Bug: 8537648
Change-Id: I4d9c8842c2d90aa668f16034d3db007dc61714b8
2013-04-10 15:36:54 -07:00
Craig Mautner
66d7730903 Debug logging improvement.
Previously a change to a surface would be logged with the old value
and you had to scroll through the logs to see what the new value
was. This change reflects the change to the surface immediately.

Change-Id: I2a6566466287922d08f4ce2329c61aa46d692ee1
2013-04-10 15:33:26 -07:00
Robert Greenwalt
a9bebc2211 Use CONNECTIVITY_INTERNAL for global proxy
The Global http proxy shouldn't be used by apps, but can be useful in certain
conditions.

bug:8264794
bug:8557674
Change-Id: Ia3cbe542e448d9e74d0492626a13e9fd34ad797a
2013-04-10 15:32:18 -07:00
Jaikumar Ganesh
8ce470dd4b GPS Hardware geofencing.
Add support for doing geofencing in hardware.

Change-Id: I6d5015190e8d84e1f4beb1010ed977a71c1622d0
2013-04-10 15:25:07 -07:00
Michael Wright
f710413692 Merge "Stop marking gamepads as keyboards" into jb-mr2-dev 2013-04-10 21:14:27 +00:00
Dianne Hackborn
8f980e1a5a Merge "Reduce duration of rotation xfade animation." into jb-mr2-dev 2013-04-10 17:48:21 +00:00
Jeff Brown
4dac901f01 Rewrite touch navigation dpad synthesis.
The new implementation more accurately tracks the velocity
of flings and takes care to avoid obvious discontinuities.
The main goal is for a fling to appear to be a linear
extension of the movement already in progress.  The minimum
fling velocity is set to ensure that flings appear to be
fairly smooth despite being discretized.

Use sequences of repeated key events instead of individual
down/up events to represent continuous motions in one
direction which can be helpful for stopping flings at boundaries
such as when flinging the cursor position within a text view.

Compute the movement thresholds based on the physical
size of the touch pad, if known.  If not known, we assume a
nominal size.

Support stopping flings with a tap just like we do for
normal touch events elsewhere in the framework.

Moved the detection of ASSIST swipes into the InputReader
where it belongs.  These swipes must be detected globally
to ensure consistent behavior across the all applications.

Added a custom protocol in EventHub to enable input device
drivers to override the timestamp of the following events
in a packet.  This change enables input device drivers
that have a better idea of when an input event was actually
generated to pass this information to the input system.
Particularly useful with uinput.

Bug: 8583760
Change-Id: I8ef4e827804786d549cfaa00793a2b9dd0fda465
2013-04-10 03:51:18 -07:00
Ying Wang
d8b26d6c42 Merge "Add liblog" into jb-mr2-dev 2013-04-10 05:16:14 +00:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Christopher Tate
32a019d438 Implicitly enable system apps when updates installed
If someone explicitly installs an update to a system-bundled package,
we infer that this means they actually want to use the new code.

Bug 7467302

Change-Id: If2dc6f764bafbb3a5c94cbdd32273c030fd784b9
2013-04-09 17:11:55 -07:00
Robert Greenwalt
979ee3cca3 Routing workaround.
Change our order of operations so that secondary route table
adds succeed.  Working to understand the why of this too.
bug:8361314

Change-Id: Ie25061eb38c62eaa5e60aa8a488496de49bdbd9d
2013-04-09 11:22:56 -07:00
Robert Greenwalt
dbf500aaaf Merge "Turn back on global proxy support." into jb-mr2-dev 2013-04-09 18:15:06 +00:00
Dianne Hackborn
558a3c1b7b Merge "Kill processes when permissions are revoked." into jb-mr2-dev 2013-04-09 17:38:00 +00:00
Dianne Hackborn
f1b782427f Kill processes when permissions are revoked.
Some permissions are associated with gids, so we need to
kill any running processes if their permission is revoked.
We will do this for any permission being revoked, since
the association between gids and permissions can change
over time.

Change-Id: Ieb7408e032539c4f21eb089d65a7a7e6c289f010
2013-04-08 22:28:59 -07:00
Michael Wright
74c8fb601e Stop marking gamepads as keyboards
Change-Id: I0ba49aa3235b2e0a50405cf6d68632e268fe4183
2013-04-08 20:05:32 -07:00
Eric Rowe
3c09715ced Merge "Change dropbox tag for native crashes." into jb-mr2-dev 2013-04-09 00:11:51 +00:00
Robert Greenwalt
00e8d4c1b6 Turn back on global proxy support.
This reverts 138626.

Bug:8557674
Change-Id: I7b117d313c424d75bdeeea507541a96342f256f0
2013-04-08 16:31:26 -07:00
Kenny Root
0eee410e47 Merge "Check outInfo is not null" into jb-mr2-dev 2013-04-08 23:10:50 +00:00
Kenny Root
3b9933d0c2 Check outInfo is not null
Only call keystore if outInfo is not null

Bug: 8568820
Change-Id: I24ab625ad02b8510da489911064453de642b6748
2013-04-08 16:06:24 -07:00
Eric Rowe
88d842cf8a Change dropbox tag for native crashes.
Change-Id: Id2738fc758c3d144e5fdd2c7f1c8617dad129338
2013-04-08 15:00:27 -07:00
Ben Gruver
89454f8331 Merge "Implement event logging for intent firewall" into jb-mr2-dev 2013-04-08 21:40:26 +00:00
Ben Gruver
b1a90d3b14 Merge "Remove the sender package filter from the intent firewall" into jb-mr2-dev 2013-04-08 21:36:37 +00:00
Daniel Sandler
91fe8455d6 Clean up language in forced foreground service notifications.
Old:  [ IC ] %s running
      [ ON ] %s is running

New:  [ IC ] %s is running
      [ ON ] Touch for more information or to stop the app.

Additionally, disallow these misbehaving services from
supplying their own content views; if you attempt to run a
foreground service with icon == 0, this is the notification
you will get, period.

Bug: 8525548
Change-Id: I2bfd7340396ef925885e8c2160a720f9eff07a35
2013-04-08 13:01:02 -04:00
Ben Gruver
8be8df2141 Implement event logging for intent firewall
Change-Id: If79052d07f3e5c02cfdbd0dd00026b01110045c2
2013-04-07 14:29:34 -07:00
Geremy Condra
a1ca6facee Merge "Fix crash in ConfigUpdater when the target dir doesn't exist." into jb-mr2-dev 2013-04-05 21:52:40 +00:00
Michael Wright
bdb706e48d Merge "Pipe through device resolution information" into jb-mr2-dev 2013-04-05 21:43:31 +00:00
Jeff Brown
4a706bc6f1 Merge "Correctly manage the lifecycle of IME InputChannels." into jb-mr2-dev 2013-04-05 20:57:01 +00:00
Geremy Condra
aa3c81e497 Fix crash in ConfigUpdater when the target dir doesn't exist.
Change-Id: I44ee0e3791938da0bf890fb38cd886330c0ee01d
2013-04-05 13:17:07 -07:00
Daniel Sandler
5feceebb89 New NotificationListenerService.
This is the best and only way for apps to listen for
notifications: create a NotificationListenerService, wait
for the NoMan to bind to you (as a result of the user
checking a box somewhere in Settings and agreeing to a
scary dialog box), and you'll start receiving notification
posted and dismissed callbacks. Your service, while enabled,
will also be able to clear one or all notifications.

Use this power wisely.

This change moves StatusBarNotification out of
com.android.internal into android.service.notification.
[Internal customers, including System UI and early users of
the system-only listener binder API, will need to be
updated.]

Bug: 8199624
Change-Id: I1be46f823d4b3ddc901109ec1e085cd6deb740c2
2013-04-05 19:54:44 +00:00