446 Commits

Author SHA1 Message Date
Eric Laurent
357263da0e Add HOTWORD as an AudioSource
- This is a low-priority source that can be preempted by others
- This is required for scenarios where someone wants an alway-on
  graceful microphone

Bug: 10640877.

Change-Id: Idb3577541103717cb713a7a93d3762ad2c2f4710
2013-09-10 18:03:10 -07:00
Sandeep Siddhartha
c73c178374 Add permission checks and unhide the Hotword recognition APIs
- Also tweak the API a little to send an intent on hotword being
  recognized.

Change-Id: I8a3fedaec4e1db595ed058089734d25c7957111e
2013-09-06 12:34:03 -07:00
Amith Yamasani
d304af6989 Remove unused APIs and rename others based on API review
Restrictions challenge is only to be used by device admins.

Bug: 10461761
Change-Id: I3db1249e2ce99f386602de59ed930302bb0a97fb
2013-09-05 09:30:23 -07:00
Tom O'Neill
40a86c24d2 Add LocationManager.MODE_CHANGED_ACTION broadcast
- Currently redundant with PROVIDERS_CHANGED_ACTION, but that may
change in the future

- Part of fix for b/10409275

Change-Id: I12daaf20e6546fd9e9dc71c599967fa0ad95e27f
2013-09-03 18:07:10 -07:00
Santos Cordon
90a5df1ee8 Merge "Revert "Add permissions for the InCallUI Split."" into klp-dev 2013-09-03 17:43:29 +00:00
Santos Cordon
b6c46d2381 Revert "Add permissions for the InCallUI Split."
This reverts commit bf84eb5ed579d13b74c97b995299ca61cafedea6.

Change-Id: I40e311174898a741f5053501290833420355ad03
2013-09-03 17:42:04 +00:00
Santos Cordon
7f60dc5778 Merge "Add permissions for the InCallUI Split." into klp-dev 2013-09-03 16:45:24 +00:00
Santos Cordon
bf84eb5ed5 Add permissions for the InCallUI Split.
Change-Id: Ic759d14acefcea746e0d8e86c0f006d4bc462386
2013-09-03 08:19:17 -07:00
Svetoslav Ganov
86d2db9750 Merge "Print spooler security and some new print service facing APIs." into klp-dev 2013-08-29 22:59:08 +00:00
Svetoslav Ganov
d26d4898fc Print spooler security and some new print service facing APIs.
1. Updated the security mode of the print spooler. Now the spooler
   is not signed with the system key, it is not a privileged app so if
   it gets compromised (PDF rendering is a potential attack vector)
   it cannot access dangerous permissions. Also only the system
   can bind to the spooler.

2. Added APIs for asking a print service to start and stop tracking
   a given printer. This is need for the case when the user selects
   the printer and the print service should do a best effort to keep
   the system updated for the current state of the printer.

3. Added APIs for putting a print job in a blocked state. A print
   service would report the print job as blocked if for some reason
   the printer cannot proceed, e.g. 99 pages are printed but there
   is no paper for the last one. The user has to add more paper
   and the print service can resume the job.

4. Changed the read/write APIs to use ParcelFileDescriptor instead
   of FileDescriptor since the latter does not have a clean API for
   detaching the wrapped Linux file descriptor when one wants to
   push it to native.

5. Added API for getting the size of the printed document so the
   print service can avoid handling big filed over cellular network
   or ask the user if needed.

6. Now the print services that are preinstalled on the system image
   are automatically enabled.

Change-Id: Ia06c311d3d21cabb9e1368f13928e11cd0030918
2013-08-29 15:39:44 -07:00
Wink Saville
7788c61af5 Merge commit '270226b0' into manualmerge
* commit '270226b0':
  Add support for handling mobile provisioning networks.

Conflicts:
	core/java/android/net/CaptivePortalTracker.java
	core/java/android/net/ConnectivityManager.java
	core/java/android/net/IConnectivityManager.aidl
	core/java/android/net/MobileDataStateTracker.java
	core/res/AndroidManifest.xml
	services/java/com/android/server/ConnectivityService.java

Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
2013-08-29 14:57:08 -07:00
Wink Saville
948282b0e6 Add support for handling mobile provisioning networks.
When a sim is new or it has expired it needs to be provisioned
with the carrier. Basically provisioning is associating a sim with
a user account. When a sim isn't provisioned then operators will
restrict access to the network and only allow certain addresses
or services to be used.

This set of changes allows two types of provisioning networks to be
recognized. The first is a network that causes all DNS lookups to be
redirected to a different address than was intended. This is exemplified
by how T-Mobile works.

The second technique uses a special apn for provisioning. An example is
AT&T where lwaactivate is the provisioning apn and broadband is the
normal apn. We first try broadband and if we are unable to connect we
try lwaactivate. When we see the activate we identify it as special and
the ApnContext.isProvisioningApn will return true.

In the future our plan is to create a new network type that can be added
to the apn list, but for now it identified by name.

Here is a list of significant changes:

 - CaptivePortalTracker now only test WiFi networks instead of all networks
 - checkMobileProvisioning checks for provisioning networks and doesn't
   try to ping.
 - IConnectivityManager.aidl changes:
   * getProvisioningOrActiveNetworkInfo was added to and used by Manage
     mobile plan in WirelessSettings so even when there is no active
     network it will still allow provisioning. Otherwise it would report
     no internet connection.
   * setSignInErrorNotificationVisible is used by both
     CaptiviePortalTracker and checkMobileProvisioning so they use the
     same code for the notifications.
   * checkMobileProvisioning was simplified to have only a timeout as
     returning the result is now harder as we abort simultaneous call
     otherwise we'd could get into loops because we now check every time
     we connect to mobile.
 - Enhanced MDST to handle the provisioning network.
 - Added CONNECTED_TO_PROVISIONING_NETWORK to NetworkInfo to make a new
   state so we don't announce to the world we're connected.
 - TelephonyIntents.ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN
   is sent by the low level data connection code to notify Connectivity
   Service that a provisioning apn has connected. This allows CS to
   handle the connection differently than a normal connection.

Bug: 10328264
Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
2013-08-29 08:55:16 -07:00
Jeff Brown
511cd35fcc Docs changes pursuant to API review feedback.
Change-Id: I74c51791192f7fefad4e299d25c91438cbf6ab73
2013-08-23 17:44:47 -07:00
Jeff Brown
7e458235ac Remove input flinger stubs. (DO NOT MERGE)
Bug: 10446930
Change-Id: I6c9fd490f2efd9c359c598eb2a18c4150b446564
2013-08-22 19:31:21 -07:00
Vinit Deshapnde
e2a6d3df12 Merge "Introduce network link quality statistics" into klp-dev 2013-08-22 16:16:45 +00:00
Vinit Deshapnde
1f12cb52a4 Introduce network link quality statistics
This change starts tracking traffic quality data for WiFi and mobile
networks. The quality is tracked based on incidental traffic, and not
on specific measurements. Theoretical bandwidths are hard-coded, as
well as sampling interval; although sampling interval can be changed
by setting a system policy.

Bugs filed to remove shortcomings of this change -

10342372 Change LinkInfo name to something better
10342318 Move hardcoded values of MobileLinkInfo to resources
         so they can be updated without changing code

Bug: 10006249

Change-Id: I83d8c7594da20fe53abbd5e1f909b1f606b035bb
2013-08-21 13:09:01 -07:00
Matthew Xie
e530c41b57 Merge "Protect a bunch of broadcast intents" into klp-dev 2013-08-21 17:51:02 +00:00
Matthew Xie
6b8a6a6e05 Protect a bunch of broadcast intents
All the changed intents are restricted. Only Bluetooth Process can
broadcast/send them.
bug 7622253

Change-Id: I098664bf266ac44b7904f8f79b1804d5130f5cd5
2013-08-20 18:07:25 -07:00
Jason Monk
ff796e5a24 Merge "Change PacProcessor to Android Service" into klp-dev 2013-08-20 23:35:26 +00:00
Jason Monk
9ced3cd9d6 Change PacProcessor to Android Service
This switches the PacProcessor over to an Android Service.  The service
is bound and unbound by the PacManager, which also adds it to the
ServiceManager, allowing for Context-Free access by the PacProxySelector
in all DVMs.

bug:10182711
Change-Id: Id1ff7660be56e8976cdcccd76e041feb47a17a61
2013-08-20 17:36:39 -04:00
Maggie Benthall
da51e68e58 Add methods for managing CAs to DevicePolicyManager(Service)
Guard install/uninstall by enforcing that the caller have the new system-only permission MANAGE_CA_CERTIFICATES.
Also include API methods for asking whether there are any User CA certs
installed, or if one by a particular name is installed in the keystore.

CA certs will be installed via KeyChain into the TrustedCertificateStore.

Bug: 8232670

Change-Id: I17b47a452e72eb4fe556dc6db823a46c6e854be8
2013-08-20 14:30:36 -04:00
Jeff Sharkey
02e4d16ed9 Add GIDs to packages.list, update SD card perms.
Write supplementary GIDs to packages.list for lower-level system
components to parse.

WRITE_EXTERNAL_STORAGE also implies sdcard_r GID. Switch to always
enforce READ_EXTERNAL_STORAGE permission. Update permission docs to
mention new behavior.

Change-Id: I316ba4b21beebb387ac05c80980ae9b38235b37d
2013-08-12 20:31:36 -07:00
Brian Williammee
1ed51627d9 Track latency of captive portal checks
When captive portal check occurs, track its latency, whether or not
we received a response, and whether or not the response was a captive
portal.  Pair with information identifying the access point / base
station, and broadcast it (with a system|signature-protected
permission).

Broadcast only occurs if user has consented to
Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE.

Change-Id: I6fd59954a7ee2cc7acedf064a1465882653b2173
2013-08-06 16:32:44 -07:00
Jeff Brown
7d00affce6 Support public virtual displays.
Refactor the new private virtual display API to also support
creating public virtual displays with various characteristics.
This feature requires special permissions and is only intended
for use by the system.

Change-Id: I44dd19f37cf76ea6d6e313afe42f4a412bd96663
2013-08-02 21:11:07 -07:00
Martijn Coenen
a7397883de NFC: Host-based card emulation APIs.
- New INfcCardEmulation interface to allow apps to interface
  with card emulation system.
- New BIND_NFC_SERVICE permission to prevent malicious apps
  from binding to card emulation services.
- ApduServiceInfo is now in the framework.
- Added constants to Settings.Secure for storing defaults.
- Modified XML grammar a bit.

Change-Id: I56b3fa6b42eb5dc132c91c1386ab1e6bac779059
2013-08-02 17:22:53 -07:00
Amith Yamasani
a418cf21c9 New permission to manage device admins
The previously used permission was doing double duty as the permission
that device admins to check for to ensure that calls are coming from valid
system components.

MANAGE_DEVICE_ADMINS is system|signature and is now required to add/remove
device admins.

Required for:
Bug: 9856348

Change-Id: I64385d2ec734c3957af21b5a5d9cffd8a3bcd299
2013-07-22 10:42:46 -07:00
Robert Greenwalt
538cdb98ef resolved conflicts for merge of 85b5e4c4 to master
Change-Id: Idd0ad9b1504fddf68c4c4cc04731de1eddd204b3
2013-07-19 14:09:30 -07:00
Robert Greenwalt
e182bfe398 Add gservices updater for carrier provisioning url
bug:9623159
Change-Id: I36697ed341353b7a3dbec5afe20241102e76f6f1
2013-07-17 14:05:33 -07:00
Jeff Brown
6c1c0b6cbe Declare permission for accessing input flinger.
Change-Id: I2914b301b74e0d310a9e95e2d6fb5cb72d3e3703
2013-07-15 15:08:39 -07:00
Evan Charlton
10dd2b6464 Merge "Add carrier setup app integration" 2013-07-15 18:31:20 +00:00
Geremy Condra
1df62d2783 Merge "Permissions to protect socket marking settings" 2013-07-11 22:25:14 +00:00
Chad Brubaker
f11e5d3476 Permissions to protect socket marking settings
Add the manifest entries for the net_mark group that protects marking
traffic as from another user in per user routing.

Change-Id: I97932a9e407467a7adc733caea8746a712bc6b68
2013-07-09 13:48:21 -07:00
Evan Charlton
843d5ea5ec Add carrier setup app integration
Add an intent to invoke a native carrier setup app. This is paired
with the INVOKE_CARRIER_SETUP permission, though it is up to the app
to enforce that callers hold this permission.

Change-Id: I317a40675de7e9587de23c028459be2331a2f8a2
2013-06-27 15:06:55 -07:00
Dianne Hackborn
053f61d6a6 Work on issue #9586838: Crash after waking up Hammerhead device
I made the power manager more rigid, not allowing different uids
to use the same wake lock.  This never should happen.  I would
guess there is somewhere that the activity manager is acquiring
the wake lock without clearing the calling identity...  but it is
hard to follow all the paths this may happen in.  So here we add
some checks when acquiring/releasing the wake lock to make sure
it is being done as the system uid.

Also:

- Protect the new activity stack calls with a permission, and
make sure to clear the calling uid once past that.
- Collect uid data from process stats so we can correctly
associate CPU use with a uid even if we don't know about the
pid for some reason.
- Fix battery stats dump commands to clear calling uid before
executing so they aren't broken.

Change-Id: I0030d4f7b614e3270d794ecfc3669139a5703ce9
2013-06-26 19:17:15 -07:00
Amith Yamasani
5fa9f2b127 Merge "Single-user restrictions" 2013-06-26 23:04:32 +00:00
Robert Greenwalt
505e35bca9 am c869696e: am 65f7a95f: am 2f50097a: Merge "Fix power issues around wifi scans." into jb-mr2-dev
* commit 'c869696ef3c1dca3efbc6ce8ab804e8a1b117900':
  Fix power issues around wifi scans.
2013-06-26 11:54:55 -07:00
Robert Greenwalt
8971084258 Fix power issues around wifi scans.
- Sending a broadcast indicating when scan requests could be serviced so that
apps don't request scans we won't do anything with.
- Fix our batt stats accounting so we only count it if we send the request to
the driver.

bug: 8868201
bug: 9496690
Change-Id: I64a4f1c294c848ac64c50d8854ed4a6a1a47f603
2013-06-26 10:00:16 -07:00
Amith Yamasani
655d0e2029 Single-user restrictions
Introduces a new "blocked" state for each package. This is used to temporarily
disable an app via Settings->Restrictions.

PIN creation and challenge activities for use by Settings and other apps. PIN
is stored by the User Manager and it manages the interval for retry attempts
across reboots.

Change-Id: I4915329d1f72399bbcaf93a9ca9c0d2e69d098dd
2013-06-25 16:03:55 -07:00
Svetoslav Ganov
4b9a4d1687 Print - platform APIs
Related changes:
    Skia (inlcude PDF APIs): https://googleplex-android-review.googlesource.com/#/c/305814/
    Canvas to PDF: https://googleplex-android-review.googlesource.com/#/c/319367/
    Settings (initial version): https://googleplex-android-review.googlesource.com/#/c/306077/
    Build: https://googleplex-android-review.googlesource.com/#/c/292437/
    Sample print services: https://googleplex-android-review.googlesource.com/#/c/281785/

Change-Id: I104d12efd12577f05c7b9b2a5e5e49125c0f09da
2013-06-21 18:43:17 -07:00
Jeff Sharkey
6fbb5553a5 Merge "Protect more system broadcasts." 2013-06-13 18:55:21 +00:00
Jeff Sharkey
61277dfcd9 Protect more system broadcasts.
Bug: 8877514
Change-Id: Iaff8a5fbfab2c48bf26ce611fe2caff4f22d9152
2013-06-12 18:16:01 -07:00
Scott Main
81888d5661 am 26bc073d: am fe7c2220: Merge "add NA message for any "signature" level permissions" into jb-mr2-dev
* commit '26bc073dfa32c8122ce194cfc39e2dfc44370fcd':
  add NA message for any "signature" level permissions
2013-06-11 14:13:35 -07:00
Scott Main
93e60b5b26 add NA message for any "signature" level permissions
Change-Id: If76e9e3b7ffc5d97422321db312a03869c407f08
2013-06-10 12:03:07 -07:00
Amith Yamasani
5a3915b06b UX compliance for error messages
Bug: 9122154
Change-Id: I4a64750f11845a230321450bc6a2955cb73e3b6d
2013-05-30 10:37:38 -07:00
Jay Shrauner
049219925f am 66d67241: am 34bed420: Merge "Update CALL_PRIVILEGED docs" into jb-mr2-dev
* commit '66d67241205e857e434bacf1a1e8fb8e3100018d':
  Update CALL_PRIVILEGED docs
2013-05-21 11:06:05 -07:00
Jay Shrauner
592c9fc312 Update CALL_PRIVILEGED docs
Add usage restriction note to CALL_PRIVILEGED permission doc.

Bug:8987211
Change-Id: I3545e2ae30464680e533e3eea0ff9ae913e20ef6
2013-05-17 14:36:42 -07:00
Jeff Sharkey
9ecfee03fa Start fleshing out new storage APIs.
Introduces new DocumentsContract which storage backends must
implement.  Backends surface a simple directory-like organizational
structure that enables a document to appear at multiple locations in
that hierarchy.  Querying a document or the contents of a directory
will return a Cursor populated with DocumentColumns, which includes
simple metadata.

Adds new OPEN_DOC and CREATE_DOC Intents, and permission to protect
storage backends.

Change-Id: Ib4984bc980182b2cedbe552908e5be94604ef085
2013-05-01 17:21:06 -07:00
Jim Miller
c0b676dcc2 Add keyguard background scrim and protection around keyguard APIs
With this change, the system process will put up a scrim in the
event keyguard crashes to protect underlying content.

It also adds permission checks to prevent unathorized access
through the binder APIs.

Cleaned up KeyguardTestActivity to build separately.

Removed unused resources.

Change-Id: I9e370c6bfb7dca68eae9eae304c815fb84a753d2
2013-04-26 14:34:21 -07:00
Igor Murashkin
2d0ed28ff6 am 10ce90ad: am eaebe4c1: Merge "Add new android.permission.CAMERA_DISABLE_TRANSMIT_LED" into jb-mr2-dev
* commit '10ce90adfafa25e417fdefa7510e53bc70bccd7b':
  Add new android.permission.CAMERA_DISABLE_TRANSMIT_LED
2013-04-25 17:01:18 -07:00
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