1137 Commits

Author SHA1 Message Date
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
Jeff Sharkey
925cc2a066 More protected broadcasts!
Bug: 26144973
Change-Id: I56f047d7e4b9d7bcf1ac40c98ee381badd909057
2016-03-02 16:21:58 -07:00
Dianne Hackborn
e5ad41bc02 Fix issue #27317952: PendingIntent.getIntent() should be protected
Change-Id: Ib05135cd94f5251942a6fc6df542ed39083f7827
2016-02-29 18:02:43 -08:00
Makoto Onuki
bdb14a30d0 Remove READ_WRITE_CONTACT_METADATA, which is no longer used
Bug 27365657

Change-Id: Iaf1b62991bbb0ccce9488e4e50bc49a12663a2d0
2016-02-25 17:26:06 -08:00
Svetoslav Ganov
5cd52bee32 Merge "Expose removed permissions flag as system API" into nyc-dev 2016-02-23 02:21:01 +00:00
Svet Ganov
2a1376d9df Expose removed permissions flag as system API
There are some permissions that were removed from the platform
and guard nothing but legacy apps may be checking them before
calling APIs. Hence, these apps should get the permissions as
expected despite them being a no-op. To address this the platform
declares removed permissions as normal permissions that are hidden
such that legacy apps can always get them. These permissions are
not shown in the UI. Play needs a way to filter out these
permissions like the platform as they have permissions UI too.

bug:23361760

Change-Id: I10f442dfc09a299ddc5480d8bf2db0bd786aec62
2016-02-22 18:10:49 -08:00
Felipe Leme
66d7588078 Removed bugreport intents from protected list.
These intents are send by Shell, which is not a protected uid, and
already required the android.permission.DUMP permission, hence they are
protected by permission.

BUG: 27287868
Change-Id: Ie7cfe20a119e8abe989186ca2e0ae16454b4cf22
2016-02-22 11:04:03 -08:00
Svet Ganov
9cea80cddd No overlay when permissions shown - framework
bug:26973205

Change-Id: I88395e47649191bb7db6dd8723c49e741ef4f1e4
2016-02-20 17:41:47 +00:00
Jason Monk
5dbd4aad80 SysUI Tuner: Night mode v3
TwilightService:
 - Add support for locking on/off twilight globally
 - Change twilight state to have float amount rather than
   having clients calculate it using the sunrise/set values
 - State controlled through secure setting
 - Override mode which locks to a state for a couple hours then
   resets
 - Add broadcast for SysUI to listen to

Brightness/Power:
 - Updates to handle TwilightService changes
 - Added secure setting to control whether or not to use
   twilight when calculating brightness.

Tuner:
 - UI Overhall
 - NightModeController will set the values of the custom color matrix
   taking into account the current twilight service state and any
   custom calibration set by the user.
 - Probably other stuff.

Change-Id: I213f1f76a143e711c507b2ba7d784f581bfc32b4
2016-02-18 14:06:51 -05:00
Martijn Coenen
087fd6829d Merge "Update protected broadcasts used by NFC." into nyc-dev 2016-02-18 12:25:03 +00:00
Martijn Coenen
5e906f8829 Update protected broadcasts used by NFC.
Change-Id: Ie7d062e83929e1058e19427f6ca624ab3f8ee472
2016-02-18 12:19:39 +01:00
Jeff Sharkey
37fc7a7fc0 More protected broadcasts.
These actions are owned by the system and should not be sent by
third-party apps for security reasons.

Bug: 27171917, 27169730, 27172357, 27163393
Change-Id: I3161cd3c1c37d26a92723b22878dc5aef6f30c47
2016-02-16 09:41:57 -07:00
Rubin Xu
b5f0049f98 Fix typo in filling ACTION_MANAGED_PROFILE_UNLOCKED extras.
Change-Id: Ic949a0d7f72d46d7cc36018b4b0fc54024c3b180
2016-02-15 14:12:32 +00:00
Pavel Zhamaitsiak
d820abddd2 Make ACTION_RADIO_OFF protected
Bug: 25113145
Change-Id: Idcb88cb1fd06d4761ef1f634136f8ec697bf0851
(cherry picked from commit ae6688ca5d2b506eff29ba27c7532513f2da7da8)
2016-02-09 18:16:48 +00:00
Abhijith Shastry
901bbe0667 Merge "Hidden permissions to access blocked numbers." into nyc-dev 2016-02-08 22:40:36 +00:00
Amit Mahajan
c08268e647 Make permission RECEIVE_EMERGENCY_BROADCAST public.
It is required to receive intent SMS_EMERGENCY_CB_RECEIVED_ACTION
which is already public.

Bug: 24914029
Change-Id: I2d5461fcedb2cb347c818ab6f94577008f6af242
(cherry picked from commit 45d9b36fc6a609893022b812084987cda3e3717d)
2016-02-08 22:20:03 +00:00
Abhijith Shastry
d6e1ed5906 Hidden permissions to access blocked numbers.
BUG: 26232372
Change-Id: I213622ef4623dadcf56745798fb3452c57fa4bd5
2016-02-08 14:18:56 -08:00
Chris Wren
10c63d8a12 move assistant to system API
Bug: 26693581
Change-Id: I7e29b8521e2c33683b8032e63da734cfde1dfcc9
2016-02-05 14:55:35 -05:00
Steven Ng
ee081d5bd0 Merge "Add new permission and action for managed provisioning (QR flow)" 2016-02-04 10:24:44 +00:00
Christopher Tate
4cf5a49e54 Mark the idle-maint trigger broadcast 'protected'
Bug: 26942536
Change-Id: I52d6b304fc894cad7957f84946178378c309f621
2016-02-03 16:42:19 -08:00
Felipe Leme
f933871976 Merge "Created a ACTION_RESTRICT_BACKGROUND_CHANGED intent." 2016-02-02 23:59:30 +00:00
Carlos Valdivia
bf33bd4d31 Revert "Permissions: Get rid of GET_ACCOUNTS"
This reverts commit 918c55a67c2bf0cec79f75dec6ca468e914a5fd1.

Change-Id: I995f134336bf61ac1f21052355900ae89d0d6694
2016-02-02 15:01:56 -08:00
Steven Ng
980a1b6fa8 Add new permission and action for managed provisioning (QR flow)
+ Instead of reusing NFC provisioning action, new action and permission
  are introduced for QR code provisioning

Bug: 26240297
Change-Id: Id2632d6c6b9e62bf3cad5bc141430d49df4a2c5d
2016-02-02 17:43:18 +00:00
Shreyas Basarge
a491c07f36 Merge "SyncManager on JobScheduler" 2016-02-01 15:32:58 +00:00
Rubin Xu
c3cd05f8a4 Add DevicePolicyManager APIs for process logging.
Add Device Owner APIs for controlling and retrieving the logs. Retrieving the
logs should be rate limited unless we are at the risk of losing logs due to
constrained buffer space.

Bug: 22860162
Change-Id: I80658f5a14e86d7cfd42402fbc5e98dc11698c0e
2016-02-01 10:28:24 +00:00
Jaewan Kim
54fa566ab7 Merge "PIP: Use StatusBarService to handle PIP key" 2016-01-30 01:06:29 +00:00
Makoto Onuki
6c7185cd20 Fix permission doc
Bug 26406584

Change-Id: I2c443cc52c600edb1ad904e0eb013829caee9897
2016-01-29 16:14:41 -08:00
Shreyas Basarge
8c834c0767 SyncManager on JobScheduler
SyncManager now uses JobScheduler for scheduling
and persistence purposes.

Change-Id: I38c92aedbf4d891ca297644d0b706835aaedfcd6
2016-01-29 22:15:15 +00:00
Jaewan Kim
c552b04cb4 PIP: Use StatusBarService to handle PIP key
Bug: 26591829
Change-Id: I7051fab966e2fc0887b2a21ddbf11aff7e16804b
2016-01-29 18:40:47 +09:00
Felipe Leme
9778f76123 Created a ACTION_RESTRICT_BACKGROUND_CHANGED intent.
This intent will be broadcasted when:

- Global restrict background setting is changed (sent to all packages)
- An individual uid is added to or removed from the whitelist (sent just
  to the packages belonging to that uid).

This intent is only sent to registered receivers.

BUG: 26451391
Change-Id: Ic0a5771f88baa52076ad04764f29098a386463cc
2016-01-28 13:28:11 -08:00
Adam Powell
e7c74cc96e Revert "Pinning components in ChooserActivity"
This reverts commit ec6bc41e1835804533fd21b3ef8047ecd893bcfd.

Bug 26842512

Change-Id: I9fc775d21081885d0e26fca4ade412a18da45b7c
2016-01-28 09:04:20 -08:00
Adam Powell
ec6bc41e18 Pinning components in ChooserActivity
Move ChooserActivity to SystemUI. This is a safer place for it to live
and still be able to persist data to storage.

Add a context menu to long press for chooser targets allowing users to
'pin' a target component from an app. This causes it to sort to the
front of the list so that a user's favorite apps are always available
from share UIs, etc. Similarly, all ChooserTargets from a pinned
component receive an impossibly large boost for sorting so that they
will always appear first.

Bug 26791843

Change-Id: Ib4e603d9d4263403e98ce619287452ddab593044
2016-01-27 17:17:31 -08:00
Peng Xu
a35b5539a9 Dynamic Sensor Discovery Implementation
Defined the dynamic sensor meta data type and UUID of sensor, as well
as the broadcast intent that is related to dynamic sensor status
change.

Modify SensorManager, SystemSensorManager and the JNI layer to support
dynamic sensor discovery.

Added SensorNotificationService to notify apps that sensor connected
or disconnected via broadcast.

Change-Id: I28adfb005357d7e3983d65117d6865830c75027d
2016-01-27 16:37:22 -08:00
Sailesh Nepal
4665f49b9c Merge "Add new public API to allow call screening" 2016-01-27 22:16:59 +00:00
Sailesh Nepal
1bef339b88 Add new public API to allow call screening
This CL adds a new service that the default dialer can implement to
screen incoming calls.

If the service is implemented then Telecom uses it to decide if a call
should be shown to the user or rejected.

Note, I initially tried to simply extend InCallService instead of
creating a whole new service. The problem with this approach is that:
  - this breaks some in call services which show UI as soon as they are
    bound to
  - the in call service lifecycle is tightly coupled to adding and
    removing calls. Call screening happens before a call is added which
    makes it a bad fit to in call service
  - call screening is a function of only the default dialer's in call
    service but the existing code also binds to "controller" call
    services

For these reasons it seemed simpler to just create a new optional
service.

BUG: 22857261
Change-Id: I53f2ef93360e0af19b6ce45af21026be6cf3a7f3
2016-01-27 13:54:12 -08:00
Arunesh Mishra
a772e5fc06 SoundTrigger API improvements.
This CL implements the SoundTrigger API improvements as given in b/22860713. Only the java-level
parts are implemented in this CL.

Key changes include:

* Addition of a SoundTriggerManager/SoundTriggerDetector system API to manage
  the sound-trigger based sound models.
* Addition of a SoundTriggerService service that manages all sound models
  including voice (keyphrase) and sound-trigger based models.
* Includes logic to write sound-trigger based models to the database.
* VoiceInteractionManager service now uses SoundTriggerService instead of
  SoundTriggerHelper.

Bug: 22860713
Change-Id: I7b5c0ed80702527c4460372efeb5e542d3693a69
2016-01-27 12:49:20 -08:00
Carlos Valdivia
3cdbc806ff Merge "Permissions: Get rid of GET_ACCOUNTS" 2016-01-27 00:12:06 +00:00