1173 Commits

Author SHA1 Message Date
Sudheer Shanka
f5cea03eb0 Reduce shell power over user management.
Remove MANAGE_USERS permission from shell and whitelist it for
some specific functionality.

Bug: 29189712
Change-Id: Ifb37448c091af91991964511e3efb1bb4dea1ff3
2016-06-10 13:05:18 -07:00
Amith Yamasani
d2b21047c8 Add a separate read permission for oem unlock state
New privileged permission READ_OEM_UNLOCK_STATE added
for system privileged apps.

Changing the unlock state still requires the old
permission OEM_UNLOCK_STATE, which is signature protected.

Bug: 28953956
Change-Id: Iedd2ad1d2d1dc3ae91122d7c406e3ee623a47d61
2016-06-03 14:33:26 -07:00
Dianne Hackborn
a8e6f875bc Fix issue #28931042: wtf in system server
More broadcasts (from telephony) that should be protected.

Also put a little more information in the wtf message to
help determine where broadcasts from out of the system process
are coming from.

Change-Id: Ie3df25c883482ca54c7a7c5db57ca609950f5cbc
2016-05-24 15:35:27 -07:00
Sudheer Shanka
0e351a945b Merge "Update docs for DELETE_PACKAGES permission." into nyc-dev 2016-05-10 20:28:37 +00:00
Sudheer Shanka
eaa6c6b540 Update docs for DELETE_PACKAGES permission.
Bug: 28302564
Change-Id: I283b8a5490a189fc90f64aec3278b87a430c2623
2016-05-09 11:44:00 -07:00
Christopher Tate
27d92e4e39 Move the 'pretend idle jobs can run now' broadcast into AMS
It's a protected broadcast, so sending it directly from 'am' is
no longer an option.  This is needed for CTS as well as being
generally useful during app development.

Bug 28406044

Change-Id: I101915a8c6f19454330a8db2079a75023c112582
2016-05-06 11:25:11 -07:00
Ajay Panicker
2759e429d1 Protect TRANSFER_COMPLETE broadcast
Bug: 28621801
Change-Id: Ia90abd00694ae80000f59ee0a17826592fd2159b
2016-05-06 15:11:30 +00:00
Adam Powell
a75d4877af Merge "Have the Resolver/Chooser activities handle resize config changes" into nyc-dev 2016-05-05 16:04:07 +00:00
Adam Powell
46ef0579dd Have the Resolver/Chooser activities handle resize config changes
Both of these activities do additional work and look janky when
rebuilding for a config change, especially in the presence of
multiwindow. As neither of them use layouts or other resources that
vary based on configuration, mark them as handling the relevant config
changes.

Bug 27171954

Change-Id: I38df1d875bcb063d72316b586c4d3f8074c4fad9
2016-05-04 16:47:59 -07:00
TreeHugger Robot
441da79d8a Merge "Marking @SystemApi permissions @hide too." into nyc-dev 2016-05-04 20:50:16 +00:00
Ajay Panicker
2f78bf96d2 List the CONNECTION_STATE_CHANGED broadcast for MAP as protected
Bug: 28527879
Change-Id: Ifb2db87677e92022814bb9704c26009d249ac6ce
2016-05-03 11:24:13 -07:00
Ajay Panicker
65fad18461 List the SDP_RECORD broadcast as protected
Bug: 28257589
Change-Id: I97ef91fa3a7f7ef62fd96ca079e0a6d5a957bc71
2016-05-03 17:32:57 +00:00
Amit Mahajan
a895559a41 Marking @SystemApi permissions @hide too.
Bug: 28287631
Change-Id: Ie0375620689263ebafd6850f2261e090f09521b1
2016-05-02 14:45:46 -07:00
Makoto Onuki
4d36b3a8c5 ShortcutManager: finishing touches
- Change back the throttling quota to 10 calls / day
- Foreground apps are no longer throttled, and when an app comes to
foreground the call counter will be reset.
- When the system locale changes, reset throttling for all packages
for all users.
  See LocalService.onSystemLocaleChangedNoLock() for how it's performed.
  Because the reset must happen before any other apps have a chance to
  publish shortcuts, the logic is not straightforward.

- Added an internal API to reset the throttling upon inline-reply
from a notification.

- Stop supporting icons from "content:" URIs
- Improved javadoc on several APIs.

Also internal refactor needed to this:
- ShortcutUser.getAllPackages()/getAllLaunchers() are no longer
accessible to outer code to prevent accidentally adding/removing the
content.  Outer code should use forAllPackages() / forAllLaunchers().

Bug 27923857

Change-Id: I002511193d1d33718163bb1dabe77610bde58198
2016-05-02 12:02:19 -07:00
Rubin Xu
dae6beda7b Add back protected profile availibility broadcasts.
Bug: 27532254
Change-Id: Ifbf59f64358864cd1d48be5e797c45ec2744eac0
2016-04-25 18:47:36 +01:00
Carlos Valdivia
ffcba67bf9 Merge "Rename GET_PASSWORD_PRIVILEGED and make it signature." into nyc-dev 2016-04-22 22:51:51 +00:00
Carlos Valdivia
714bbd8539 Rename GET_PASSWORD_PRIVILEGED and make it signature.
Now named GET_PASSWORD. Now it is just a signature, not privileged.

Bug: 28295831
Change-Id: Ice93b527edced9546639b6c7096aad933c517548
2016-04-22 15:04:01 -07:00
Svet Ganov
ae0e03a9e0 Cleanup of the PackageInstaller API - Frameworks
The PackageInstaller app manages side-loading apps as well
as permission management. It should be updatable, hence
should rely on system APIs to talk to the platform. This
is the first step of defining an API boundary.

Change-Id: I9814eafd0b22ae03b4b847a7007cdbf14c9e5466
2016-04-22 14:18:32 -07:00
Sujith Ramakrishnan
b5b86c1100 Unbundle RemoteService on TV - part 3
- New service TVRemoteService triggered by SystemServer
- Provider service proxy and watcher for maintaining connections to unbundled
  services which have the BIND_TV_REMOTE_SERVICE permission.
- Shared library to facilitate connections between unbundled service and
  TVRemoteService.
- Unbundled service needs TV_VIRTUAL_REMOTE_CONTROLLER
  permission to be fully functional.

b/23792608

Change-Id: Ief5c6995883d1f7268a73bdd0c920c4c3f42cddb
2016-04-22 12:21:34 -07:00
Rubin Xu
b40667eccd Merge "Remove MANAGED_PROFILE_AVAILABILITY_CHANGED broadcast" into nyc-dev 2016-04-22 09:25:03 +00:00
Trevor Johns
59c9a93fc2 Merge changes from topic 'merge_docs_nyc-dev' into nyc-dev
* changes:
  Remove links to createAndInitializeUser() and createUser()
  Resolve merge conflicts of a5060ee to nyc-dev
2016-04-20 18:35:57 +00:00
Trevor Johns
682c24e228 Resolve merge conflicts of a5060ee to nyc-dev
This undoes the automerger skip which occured in
commit e740c84dc32180214a7fd157105d6c18d30408ee and
replays it as a standard (NOT -s ours) merge.

Change-Id: If5a47be26f73d6a0735c425cd66310a3e2a89086
2016-04-19 02:03:59 -07:00
Rubin Xu
19c2a57c24 Remove MANAGED_PROFILE_AVAILABILITY_CHANGED broadcast
Bug: 27532254
Change-Id: Iaca17355d3ec75fa09c36a5353f40d678cc2c812
2016-04-15 15:17:53 +01:00
Dan Sandler
732bd6cb27 Allow system apps to substitute a different app name in notifications.
This is a privileged permission and is only to be used by
the core OS and related packages whose names are confusing
or misleading when shown in notifications.

The user will always be able to see the true package name by
accessing the notification inspector (longpress or swipe
gesture on the notification row in SystemUI).

Fixes: 26517701
Change-Id: I2b021c9da0757b99df76399666af263668d88070
2016-04-14 13:48:03 +00:00
Jeff Sharkey
e9c752aa37 Another protected broadcast.
Bug: 28133722
Change-Id: I5fe8158a3c66168e1c5482711a487eba55876b73
2016-04-12 10:28:19 -06:00
Ruben Brunk
50e229f1f4 Merge "Add VrManager AIDL interface for use by system apps." into nyc-dev 2016-04-06 21:36:53 +00:00
Ruben Brunk
c7be3beced Add VrManager AIDL interface for use by system apps.
Bug: 27884853
Change-Id: I6de0d291deafe5003070d60866c60d6599312e79
2016-04-06 12:29:40 -07:00
Jeff Sharkey
f9324a8dd9 Protect more broadcasts.
Bug: 28001192
Change-Id: I3a3a48ccfcd75bb91431988aa3495d091d5d00f4
2016-04-05 18:31:00 -06:00
Rubin Xu
e95057ade1 Split ACTION_MANAGED_PROFILE_AVAILABILITY_CHANGED into two.
Add more comment to EXTRA_QUIET_MODE

Bug: 27532254
Change-Id: I68a217561afca8b87f523c62393cdad097d5b75d
2016-04-04 16:08:47 +01:00
Pavel Zhamaitsiak
f3f7965eb3 Merge "Change UCE permissions from dangerous to signatureOrSystem" into nyc-dev 2016-04-01 21:27:32 +00:00
Pavel Zhamaitsiak
d9855c797c Change UCE permissions from dangerous to signatureOrSystem
Bug: 27812202
Change-Id: Icf9d97e4d3f802bc0b3ea26d61835e6471082118
2016-04-01 13:19:34 -07:00
Carlos Valdivia
51b651aea1 introduce GET_PASSWORD_PRIVILEDGED permission.
That will be used to filter in passwords for Session based
AccountManager flows.

Bug: 27590532
Change-Id: I4a6d0540bcff186e416351a6f719600ce35d86a0
2016-04-01 10:55:34 -07:00
Russell Brenner
f8c07d68c1 Merge "Add new permission for am.updateLockTaskPackages()" into nyc-dev 2016-04-01 16:23:25 +00:00
Russell Brenner
b3ad567624 Add new permission for am.updateLockTaskPackages()
Adds android.permission.UPDATE_LOCK_TASK_PACKAGES, available only to
the system and setup wizard, providing access to
updateLockTaskPackages() without registering with the device policy
manager as a device owner.

Bug: 20016740
Change-Id: I6eceb5cece9407c84eabf3a818bb908f95989b91
2016-03-31 17:32:08 -07:00
Alan Viverette
ae4908f41c Remove DayNight theme
Bug: 21854466
Change-Id: I739872112d0ae457d0d4620f9222206072d54b4b
2016-03-31 16:18:27 -04:00
Philip P. Moltmann
9dcb86a48d Add the print service recommendation service
This service connects through the print manager to the print spooler:

PrintSpooler.AddPrintersActivity <-> PrintManager <-> PrintManagerService <-> UserState <-> RemotePrintServiceRecommendationService <-> PrintRecommendationService <-> PrintRecommendationServiceImpl

Hence there is a lot of mindless plumming.

The actual changes are only in the AddPrintersActivity which is extended
to show another list of services: The recommended services.

The PrintServiceRecommendationService is based on the experimenal print
service stubs provider. This provider was contributed the Android by
Mopria. As this services uses Android own network discovery service most
code from the experimental provider goes away. In fact the only logic
left over is the selections of mdns-txt fields to look at and the
printer vendor configuration.

This relies on the Android MDNS to get fixed (Bug: 27696905). This also
does not deal with how to update the recommendation service.

Bug: 24533249
Change-Id: I6edc6e25fc08a50d478b61c71bb8ea158b08624c
2016-03-30 17:21:07 -07:00
Hall Liu
7700ee39ae Update documentation for the READ_PHONE_STATE permission
Bug: 26413825
Change-Id: I58d21ddd6e2ad1cc724648db5839d711d96663fb
2016-03-24 17:34:19 -07:00
Jeff Sharkey
029ae4dcbf Make DISK_SCANNED a protected broadcast.
Bug: 27763115
Change-Id: Ib8b40ff9f4c1f929ac4f07a9d5460a0a593ba080
2016-03-21 17:05:51 -06:00
Pavel Zhamaitsiak
cfedd20d54 ims:rcs: Add UCE interface files for RCS.
Bug: 23222011
Change-Id: I2ce9e60240740acfe70c4a239163fbdbedbd96e0
2016-03-18 16:09:50 -07:00
Jeff Sharkey
8a372a0a28 Refactoring FBE APIs based on council feedback.
Mostly consists of removing the word "encryption" from most APIs,
since we can't actually make promises about the data being encrypted.

Bug: 27531029
Change-Id: Iace9d7c4e64716abf86ed11847c40f3947e1d625
2016-03-17 14:49:08 -06:00
Ian Pedowitz
440ef18fe7 Merge "Revert "Permissions: Get rid of GET_ACCOUNTS"" into nyc-dev 2016-03-15 17:09:53 +00:00
Ian Pedowitz
358e51f3d1 Revert "Permissions: Get rid of GET_ACCOUNTS"
This reverts commit d39600585bcb720d739ef6f0091066e3d4f77765.

Bug: 27665091
Change-Id: I7d017ba7062ac594225229436d2877c7d21fb065
2016-03-15 17:08:27 +00:00
Carlos Valdivia
658e4c5ece Merge "Permissions: Get rid of GET_ACCOUNTS" into nyc-dev 2016-03-15 01:36:26 +00:00
Jeff Sharkey
8731408b11 Offer to cache ContentResolver-related Bundles.
There are a handful of core system services that collect data from
third-party ContentProviders by spinning them up and then caching the
results locally in memory.  However, if those apps are killed due to
low-memory pressure, they lose that cached data and have to collect
it again from scratch.  It's impossible for those apps to maintain a
correct cache when not running, since they'll miss out on Uri change
notifications.

To work around this, this change introducing a narrowly-scoped
caching mechanism that maps from Uris to Bundles.  The cache is
isolated per-user and per-calling-package, and internally it's
optimized to keep the Uri notification flow as fast as possible.
Each Bundle is invalidated whenever a notification event for a Uri
key is sent, or when the package hosting the provider is changed.

This change also wires up DocumentsUI to use this new mechanism,
which improves cold-start performance from 3300ms to 1800ms.  The
more DocumentsProviders a system has, the more pronounced this
benefit is.  Use BOOT_COMPLETED to build the cache at boot.

Add more permission docs, send a missing extra in DATA_CLEARED
broadcast.

Bug: 18406595
Change-Id: If3eae14bb3c69a8b83a65f530e081efc3b34d4bc
2016-03-14 11:45:50 -06:00
Carlos Valdivia
d39600585b Permissions: Get rid of GET_ACCOUNTS
Second attempt. Still need to add strict mode violation checks and
logging.

Bug: 21901286

This reverts commit bf33bd4d31cfec895c96990525b0cb856407c8d6.

Change-Id: I5d73343544c32ce4fc4c377ba44db8e677a1287d
2016-03-13 17:13:54 -07:00
Chris Wren
be3696d425 Merge "rename the asisstant service for the ranker" into nyc-dev 2016-03-08 14:13:45 +00:00
Amit Mahajan
0f90653ca1 Merge "New permission for bypassing premium short code check." into nyc-dev 2016-03-08 01:13:53 +00:00
Ruben Brunk
e24b9a6cfa Add a VR listener service.
Bug: 22855417
Bug: 26724891
Bug: 27364145

- Add an API for VrListenerService, which is bound/unbound
  from the framework when the system VR mode changes.
- Allow only a single bound VrListenerService at a time.
- Monitor allowed VrListenerService implementations from
  VrManagerService and evict services as needed when packages,
  users, or settings change.
- Remove previous VR functionality in NotificationListenerService.
- Add component target to Activity#setVrMode to allow
  explicit selection of the running VrListenerService from
  the current VR activity.

Change-Id: I776335f4441be0e793d3126f2d16faf86a8c621a
2016-03-07 15:54:12 -08:00
Amit Mahajan
e5cd9fa439 New permission for bypassing premium short code check.
Bug: 18326557
Change-Id: I1b05f73103183b851bbef1280d0785ce0a48159a
2016-03-07 21:51:44 +00:00
Chris Wren
e0ba7eb365 rename the asisstant service for the ranker
Bug: 22960980
Change-Id: Ibe57933303a488b01c43a7621a488d425d6f707d
2016-03-07 16:50:27 -05:00