384 Commits

Author SHA1 Message Date
Igor Murashkin
f640bb9bbb Add new android.permission.CAMERA_DISABLE_TRANSMIT_LED
This system-only permission allows a service to disable the transmit LED
when a camera is in use.

Bug: 8554573
Change-Id: I64f7e3fcdc8ded8be3904650bd0c91d3b8f10dd4
2013-04-24 15:08:12 -07:00
Svetoslav
688a6977cf Replacing accessibility service permissions with capability attributes.
Accessibility services can perform special operations such as retrieve
the screen content, enable explore by touch, etc. To ensure the user
is aware that the service will perform special operations we were using
permissions. However, the special operations cannot be performed unless
the service is really enabled by the user and it is at this point that
we want to notify the user about the service capabilities.

This change adds capability attributes to the accessibility service's
meta-data XML file. The service has to declare the capability and when
it is enabled we show the user the capabilities in the warining dialog.

bug:8633951

Change-Id: Id3442dc71dad018e606888afdc40834682fdb037
2013-04-18 17:45:44 -07:00
Dirk Dougherty
f6878b009a Doc change: Eat some permissions group comments.
Change-Id: I6db06ed80fbc9e3d71c2a029cc50a6fa954d35b9
2013-04-18 16:55:21 -07:00
Robert Greenwalt
5d1a182a8a Merge "Secure broadcasts." into jb-mr2-dev 2013-04-18 18:45:53 +00:00
Robert Greenwalt
68b13ba12f Secure broadcasts.
Prevents 3rd party spoofing.

bug:7622253
Change-Id: I1e1a9887afe009d060205e349c31e3aefba2ea5b
2013-04-18 10:34:13 -07:00
Dianne Hackborn
84c7111c4b Fix issue #8032572: Android app permission help text "null"...
...for "Microphone / Record audio"

Change-Id: Ie839b055771950e1078fa66506a007203338cfb5
2013-04-17 11:18:10 -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
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
Jaikumar Ganesh
8ce470dd4b GPS Hardware geofencing.
Add support for doing geofencing in hardware.

Change-Id: I6d5015190e8d84e1f4beb1010ed977a71c1622d0
2013-04-10 15:25: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
Ben Gruver
633dc9bcef Add a config updater component for the intent firewall
Change-Id: I43f6defa16691099592bf87e75f2d1a732135cf3
2013-04-04 19:46:22 -07:00
Geremy Condra
77118fb55e Add SELinux updater and Settings-based enforcement switch.
Bug: 8116902
Change-Id: Ifac495026a354dac7655c28ea2188499a2a319aa
2013-03-29 16:52:56 -07:00
Dianne Hackborn
a40cfeb55f Fix issue #8470131: Process thrash kills battery
Protect app widget broadcasts from abuse.

In this case the app was sending an APPWIDGET_UPDATE broadcast
without specifying a target, which (a) should not be allowed (you
should not be able to send updates to other apps), and (b) resulted
in every single potential app widget in the system being launched...
which was about 75 of them.

Change-Id: I9d48733610ce6d5a7c32e69a3e06b9f33bd79a34
2013-03-25 17:49:36 -07:00
Dianne Hackborn
71b0017759 Merge "Fix issue #8410116: "Disable your screen lock" permission..." into jb-mr2-dev 2013-03-21 17:13:50 +00:00
Dianne Hackborn
3ad2769ba5 Fix issue #8410116: "Disable your screen lock" permission...
...appears under "Storage" section

Change-Id: I55673c559551797aae3a0dd80e90c573a028b4b0
2013-03-18 10:53:09 -07:00
Jeff Sharkey
02ffba940c Handle finished bugreports, share from private.
Show notification when a bugreport is finished, letting the user
launch a SEND_MULTIPLE intent to share them.  Add dialog that warns
user about contents before sharing.  Since bugreports are now stored
in private app data of the Shell app, use FileProvider to build Uris
that we can grant others access to.

Define BUGREPORT_FINISHED as being a protected broadcast.  Delete
older bugreports automatically to reclaim disk space.  Migrate any
Intent extras to ClipData when building PendingIntents.

Add --receiver-permission support to am shell command.

Bug: 7005318
Change-Id: If6c607dbcf137362d5887eac482ff7391563890f
2013-03-13 16:42:38 -07:00
Svetoslav
aa7cc1e2ab Merge "Adding idle maintenance service." 2013-02-20 19:11:07 +00:00
Svetoslav
b3038ec7cf Adding idle maintenance service.
It is beneficial that there is a mechanism on the platform
to notify applications whether it is safe to perform somehow
expensive operations while the user is not using the device.
Thus, user experience will not be degraded. An example is
discarding of unused blocks on a mounted file system instead
of doing this on every write operation.

bug:8056794

Change-Id: I708bad9d3ce6c8f1d5a1c05c0abf46f81a3d464b
2013-02-15 11:04:11 -08:00
Russell Brenner
108da0cfa4 Adjust captive portal test for setup wizard
During setup wizard, perform captive portal test without the typical
delays.

Change-Id: If596948e732966817aae6201440e87e19be0c2f8
2013-02-14 11:02:10 -08:00
Daniel Sandler
fde19b106b New API to request a list of current notifications.
The ACCESS_NOTIFICATIONS permission is signature|system only.

Change-Id: I41338230aee9611117cbdac251c1b6b6c3cebf00
2013-02-07 15:43:02 -05:00
Santos Cordon
3b53da4934 Merge "Sort out permission around "instant text response"" 2013-02-04 17:58:13 +00: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
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
Doug Zongker
58395e71ce am 9c4ba4fe: am b616f0c2: add android.permission.LOOP_RADIO for access to loop radio device
# Via Android Git Automerger (1) and Doug Zongker (1)
* commit '9c4ba4fe752b131b01aa402389c96eb8f24764b8':
  add android.permission.LOOP_RADIO for access to loop radio device
2013-01-29 17:09:03 -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
Doug Zongker
b616f0c239 add android.permission.LOOP_RADIO for access to loop radio device
Change-Id: I811d70fa67aa758122678809f32b8aade42ced0f
2013-01-29 10:39:13 -08: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
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
Dianne Hackborn
a06de0f29b New "app ops" service.
Initial implementation, tracking use of the vibrator, GPS,
and location reports.

Also includes an update to battery stats to also keep track of
vibrator usage (since I had to be in the vibrator code anyway
to instrument it).

The service itself is only half-done.  Currently no API to
retrieve the data (which once there will allow us to show you
which apps are currently causing the GPS to run and who has
recently accessed your location), it doesn't persist its data
like it should, and no way to tell it to reject app requests
for various operations.

But hey, it's a start!

Change-Id: I05b8d76cc4a4f7f37bc758c1701f51f9e0550e15
2013-01-09 12:47:47 -08:00
Daisuke Miyakawa
149ceec6eb Sort out permission around "instant text response"
- Remove SEND_SMS_NO_CONFIRMATION

- Add SEND_RESPOND_VIA_MESSAGE Permission
  This permission is held by the phone and applications that want to
  handle respond-via-message should require this permission of the
  sender.  This permission is signature/system and currently only held
  by the Phone app.

Bug: 5108429
Change-Id: Ib611368d488de2f8e1e853f550eb2c654305eda4
2012-12-06 16:24:48 -08:00
Nick Kralevich
a4405ba6ea Add new protected broadcasts
According to the javadocs for these intents, they are all
protected intents.  It appears the original author forgot
to add them to this file.

Change-Id: I025061716d5707f10939019f2bc5bc3d4d23b04f
2012-12-06 15:22:11 -08:00
Nick Kralevich
a170bb81d5 Remove duplicate AndroidManifest.xml entries.
The automerger added the entries twice...

Change-Id: I7910cb2126b339b0c8aee11051db1a2de8ae26ae
2012-12-05 16:11:42 -08:00
Nick Kralevich
849f5188e3 am 6643ea82: resolved conflicts for merge of 011132a7 to jb-mr1-dev
* commit '6643ea823bf8b0726da0518ffecfcc7a9f60f87d':
  Secure a handful of framework broadcasts
2012-11-30 10:35:44 -08:00
Nick Kralevich
6643ea823b resolved conflicts for merge of 011132a7 to jb-mr1-dev
Change-Id: I304ef91eef99526dec348a59b12c0934173bcfcb
2012-11-30 10:23:56 -08:00
Robert Greenwalt
b8da0376f2 Secure a handful of framework broadcasts
At least one of these was getting spoofed in the wild.
We don't want to go too far this late in the game, but this is a good start.

bug:7622253
(cherry picked from commit 47918ae3b4e7ebb54711884e9ff9d0300591ab8b)

Conflicts:

	core/res/AndroidManifest.xml

Change-Id: I118b31489fe7add5b8d69289cab9f4e8ab269495
2012-11-29 13:06:23 -08:00
Robert Greenwalt
47918ae3b4 Secure a handful of framework broadcasts
At least one of these was getting spoofed in the wild.
We don't want to go too far this late in the game, but this is a good start.

bug:7622253
Change-Id: Id8ec2778b15fe001e6fd0d5a010181bb21c52ad8
2012-11-28 16:42:32 -08:00
Scott Main
2681faafae docs: explain implicit permissions applied by sdk versions
bug: 7453055

Change-Id: I59ba2de6108b5209ff0db6b084fc0a887c5f2cce
2012-11-01 15:59:22 -07:00
Geremy Condra
7dcacd559a Change android.permission.SERIAL_PORT to signature|system.
Bug: 7367956
Change-Id: I0bc65936ba59c43c18d9a6ba52affff4c921f2fb
2012-11-01 14:10:21 -07:00
Scott Main
277b352d9f docs: update description for location permissions
bug: 6996667

Change-Id: I3b5d706d98b56386a88b33a343721ff7432063b9
2012-11-01 10:55:02 -07:00
Michael Jurka
fc753c0cf6 Use new keyguard appwidget picker
Also, remove ability to filter widgets by feature
in appwidget picker in anticipation of api change

Change-Id: I325de0b98f03d3a250758d504229ea27794b5330
2012-10-31 16:53:04 -07:00
Geremy Condra
a1f739ea83 Merge "Change android.permission.SERIAL_PORT to signature|system." into jb-mr1-dev 2012-10-18 23:59:37 -07:00
Geremy Condra
c29f35b8f4 Change android.permission.SERIAL_PORT to signature|system.
Bug: 7367956
Change-Id: I0bc65936ba59c43c18d9a6ba52affff4c921f2fb
2012-10-17 14:06:31 -07:00
Matthew Xie
fca9d63635 Add multi user support for bluetooth
Create a BLUETOOTH_STACK permission to share between all users of
Bluetooth apk. Bluetooth Manager binds to apk of current user
bug 6925422

Change-Id: I2df5546e977c2d77bc66d97d12479d933826922a
2012-10-04 18:35:42 -07:00
Jatin Lodhia
7c3586c576 Merge "Make the theme for choose account and choose account type dialogs same." into jb-mr1-dev 2012-09-28 18:50:20 -07:00
Dianne Hackborn
3ff8e1a800 Merge "Fix issue #7211769 and #7244492, thrash around on #7226656." into jb-mr1-dev 2012-09-28 15:54:44 -07:00
Dianne Hackborn
d4ac8d7b3d Fix issue #7211769 and #7244492, thrash around on #7226656.
Issue #7211769: Crash dialog from background user has non-working "report"

The report button now launches the issue reporter for the correct user.
Also for crashes on background users, either disable the report button,
or simply don't show the dialog depending on the build config.

Issue #7244492: Bugreport button in Quick Settings doesn't actually do anything

Now they do.

Issue #7226656: second user seeing primary user's apps

I haven't had any success at reproducing this.  I have tried to tighten up
the path where we create the user to ensure nothing could cause the
user's applications to be accessed before the user it fully created and thus
make them installed...  but I can't convince myself that is the actual problem.

Also tightened up the user switch code to use forground broadcasts for all
of the updates about the switch (since this is really a foreground operation),
added a facility to have BOOT_COMPELTED broadcasts not get launched for
secondary users and use that on a few key system receivers, fixed some debug
output.

Change-Id: Iadf8f8e4878a86def2e495e9d0dc40c4fb347021
2012-09-28 15:37:22 -07:00
Jatin Lodhia
856b01e7e4 Make the theme for choose account and choose account type dialogs same.
Contacts app uses a custom account picker which calls the system account picker
when an account needs to be added. The system accout picker invokes choose
accout type dialog which overlays over the system acccount picker. Because these
two dialog boxes use different themes, he one behind is wider than the one in
foreground and ends up looking like a thin black strip protruding from the two
sides.
Bug: 6980517

Change-Id: Ia8b23767d995dcbe1a58087cb4bfbee140c2c744
2012-09-28 10:53:37 -07:00
Robert Greenwalt
c6fa237dae Use updatable file for premium-sms filter
The data is really to big for a gservices-driven secure setting.

bug:7221402
Change-Id: Ie3d4a1a0aeb69b9ef8fad360fa7ec32e927644e8
2012-09-28 10:24:09 -07:00
Svetoslav Ganov
7befb7deb2 Global gesture to toggle Accessibility system-wide.
1. This change adds a global gesture for enabling accessibility.
   To enable this gesture the user has to allow it from the
   accessibility settings or use the setup wizard to enable
   accessibility. When the global gesture is enabled the user
   can long press on power to bring the global actions dialog
   and then hold with two fingers for a few seconds to enable
   accessibility. The appropriate feedback is also provided.

2. The global gesture is writing directly into the settings for
   the current user if performed when the keyguard is not on. If
   the keygaurd is on and the current user has no accessibility
   enabled, the gesture will temporary enable accessibility
   for the current user, i.e. no settings are changed, to allow
   the blind user to log into his account. As soon as a user
   switch happens the new user settings are inherited. If no
   user change happens after temporary enabling accessibility
   the temporary changes will be undone when the keyguard goes
   away and the device will works as expected by the current user.

bug:6171929

3. The initialization code for the owner was not executed due
   to a redundant check, thus putting the accessibility layer in
   an inconsistent state which breaks pretty much everything.

bug:7240414

Change-Id: Ie7d7aba80f5867b7f88d5893b848b53fb02a7537
2012-09-27 20:33:20 -07:00