699 Commits

Author SHA1 Message Date
Suprabh Shukla
c9d064a380 Added null check in appendSettingToCursor
Added check for null setting before adding to MatrixCursor.

Bug: b/27908871
Change-Id: I0b71c3d5347cad705b8def98fda7e9e463c295e2
2016-04-12 18:45:41 -07:00
Fyodor Kupolov
4c74334c44 Merge "Added getProfileIds method returning array of userIds" into nyc-dev 2016-04-11 16:40:55 +00:00
Daniel U
02ba61203e Copy lockscreen notification settings upon upgrade
Copy the primary values of LOCK_SCREEN_SHOW_NOTIFICATIONS and
LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS into managed profile upon upgrade.

Bug:27673591
Change-Id: I3207b7e5bf844f0df534324220082edbdabe8444
2016-04-08 16:41:15 +01:00
Fyodor Kupolov
7f98aa4aa9 Added getProfileIds method returning array of userIds
Previously many usages of UserManager.getProfiles and getEnabledProfiles
were only using ids of returned users. Given that the list of users needs
to be parceled and unparceled for Binder calls, returning array of ids
minimizes memory usage and serialization time.

A new method getProfileIds was introduced which returns an array of userIds.
Existing method calls were updated where appropriate.

Bug: 27705805
Change-Id: Ic5d5decd77567ba0f749e48837a2c6fa10e812c0
2016-04-07 16:41:57 -07:00
Ruben Brunk
98576cf949 Grant default permissions to preinstalled VrListenerServices.
- While explicitly bound, the package for a single pre-installed
  VrListenerService will be granted permission to access
  notification policy, be bound as a notification listener service,
  and draw system overlays.

Bug: 22855417
Change-Id: I568d5d9c032e0926e47c8ef4b46e3910b6bdf766
2016-03-30 18:48:54 -07:00
Geoff Mendal
0e1850fa22 Import translations. DO NOT MERGE
Change-Id: I52c8272bdf31d1624b5323433ef2f4742158a773
Auto-generated-cl: translation import
2016-03-19 03:57:59 +01:00
Jeff Sharkey
a04c7a7c64 Mark more Bundles as being defusable.
They're destined for the system, so they're okay to look inside.

Bug: 27726127
Change-Id: Ic85c308a8efe6f9b8652952717c72b3c663d328a
2016-03-18 12:20:39 -06: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
Jeff Sharkey
d136e51a99 Defuse Bundles parsed by the system process.
It's easy for apps to throw custom Parcelables into Bundles, but
if the system tries peeking inside one of these Bundles, it triggers
a BadParcelableException.  If that Bundle was passed away from the
Binder thread that delivered it into the system, we end up with a
nasty runtime restart.

This change mitigates this trouble by "defusing" any Bundles parsed by
the system server.  That is, if it encounters BadParcelableException
while unpacking a Bundle, it logs and delivers an empty Bundle as
the result.

Simultaneously, to help catch the system process sticking its
fingers into Bundles that are destined for other processes, a Bundle
now tracks if it's "defusable."  For example, any Intents delivered
through ActivityThread are marked as being defusable, since they've
arrived at their final destination.  Any other Bundles are considered
to be "in transit" and we log if the system tries unparceling them.

Merges several Parcel boolean fields into a flags int.  Add better
docs to several classes.

Bug: 27581063
Change-Id: I28cf3e7439503b5dc9a429bafae5eb48f21f0d93
2016-03-16 14:45:26 -06:00
Geoff Mendal
d629916673 Import translations. DO NOT MERGE
Change-Id: Ied20f8a06f71782e6f15c78d73cb3be49c097b2b
Auto-generated-cl: translation import
2016-03-09 07:27:08 -08:00
Prathmesh Prabhu
fbcaea877c Merge "SettingsProvider: Add default value for SHOW_IME_WITH_HARD_KEYBOARD." into nyc-dev 2016-03-08 19:55:59 +00:00
Amith Yamasani
4b1d8b07e5 Merge "Reorder migration of settings from db to xml" into nyc-dev 2016-03-08 18:35:13 +00:00
Amith Yamasani
bf2ef61770 Reorder migration of settings from db to xml
Make sure we commit the Global table last, so that if the
runtime was restarted before the others were written, we don't
get into an inconsistent state of migration.

Not sure if this fixes the following bug, but it's one thing
that stood out as a possibility.

Bug: 27335488
Change-Id: I4166a157e9ff542b1d5e32797693417375e40581
2016-03-07 17:02:45 -08: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
Prathmesh Prabhu
de16b86930 SettingsProvider: Add default value for SHOW_IME_WITH_HARD_KEYBOARD.
Allow OEMs to override default behaviour wrt. showing IME with a
hardware keyboard is connected. Current behaviour remains unchanged.

BUG: 27503877
BUG: 27484734
Change-Id: I7ed70b195c3ae98471e413b3eecc5d8fcd3dee26
2016-03-04 15:22:24 -08:00
Svetoslav Ganov
67a8d3516c Fix a regression in SettingsProvider
bug24990012

Change-Id: I1631d125df029f559ffc059ffcb73067389184e8
2016-03-02 13:26:43 -08:00
Jeff Sharkey
413573ac59 Offer to cache ringtones in system DE storage.
Ringtones often live on shared media, which is now encrypted with CE
keys and not available until after the user is unlocked.  To improve
the user experience while locked, cache the default ringtone,
notification sound, and alarm sound in a DE storage area.

Bug: 26730753
Change-Id: Ie6ad7790af4c87dd25759df3ed017e3b91a2fb87
2016-02-23 13:27:00 -07:00
Ritesh Reddy
f61a847881 Merge "Enabled Network Policy Backup/Restore." into mm-wireless-dev
am: d9c4bc0c4d

* commit 'd9c4bc0c4db7a8b16d8ea0f58ed0615efc167f47':
  Enabled Network Policy Backup/Restore.
2016-02-10 19:46:20 +00:00
Ritesh Reddy
70cffc57e5 Merge "Enabling SoftAP Configuration Backup." into mm-wireless-dev
am: c4a1188afd

* commit 'c4a1188afd81b4b773e30ec184839bc1a82b355d':
  Enabling SoftAP Configuration Backup.
2016-02-10 18:04:38 +00:00
Ritesh Reddy
adca34a0d6 Enabled Network Policy Backup/Restore.
Added Backup Restore specific NetworkPolicySerializer
to NetworkPolicy Class and related classes.

Change-Id: I2a11e2afae8dd9e0ee0c3356e669a73f6a1361af
2016-02-08 10:41:21 +00:00
Ritesh Reddy
aeb4c06013 Enabling SoftAP Configuration Backup.
SoftAp Conf is backed up as a serialized WifiConfiguration
object.

Change-Id: Ib7f4d130600313a67b710b45df274e15f0baad24
2016-02-08 10:33:13 +00:00
Ritesh Reddy
2400d27a65 Constrained allowable backup versions
Constrained the version on an incoming backup set
to the highest version that the SettingsBackupAgent
can handle. This is to deal with either corrupted backup
sets or newer backup sets (when modifiying/downgrading the
SettingsBackupAgent).

Change-Id: I4d666e8d4541c0b86e656a73744837d03318c4ae
2016-02-02 11:42:26 +00:00
Ritesh Reddy
33117feb6b Revert "Enabled SoftAP Configuration Backup"
This reverts commit 188ae9dc22e0ecc0612c8bfe1efdb0e22acdc43e.

Change-Id: I37e517d0e7a9a17614fa1b6890e1854346fd0138
2016-02-01 16:19:50 +00:00
Ritesh Reddy
e0cbb65e10 Merge "Revert "Enabled NetworkPolicy backup and restore."" 2016-02-01 14:05:04 +00:00
Ritesh Reddy
6b7f0f3061 Revert "Enabled NetworkPolicy backup and restore."
This reverts commit 9f548b00dcdd89e8d557223b8b99269ca7362c2e.

Change-Id: If0081fa34333339e36f9e8b9a34a2e3a84e4638f
2016-02-01 13:47:48 +00:00
Geoff Mendal
f61205150c Import translations. DO NOT MERGE
Change-Id: Ia2f7528a912c5e4a76ec13d0a16aac404244e30f
Auto-generated-cl: translation import
2016-01-27 06:09:58 -08:00
Casey Burkhardt
86b867fd45 Adds Settings.System.FONT_SCALE observer to ActivityManagerService
Changes to Settings.System.FONT_SCALE were not being handled by any service,
which required a device reboot for any changes to take effect.  Changes to
this field by the Settings app worked as expected only because it is able to
poke ActivityManager with an updated configuration, whereas unbundled
applications cannot.

This also ensures the setting value is backed up and doesn't conflict with
a configured value from accessibility onboarding during restore.

Bug:23033258
Change-Id: I98d4aed2f9f5893d054e6b10c4dfda406de8eba2
2016-01-24 04:21:36 -08:00
xinhe
f7705c3ed6 Initial codes for Quality network selection
In this change list, the old WifiAutojoin module is
    refactored initially. The old WifiAutojoinController is
    replaced with a new WifiQualifiedNetworkSelector.
    WifiConfiguration, WifiConfigureStore and
    WifiStateMachine have been modified accordingly. The new
    network selection logic is refactored with a more clear
    and deterministci one. To refer to thedescribed in
    details, in "Quality Network Selection and Connectivity
    Scan Management in N". The link of the document is:
    https://docs.google.com/document/d
    /1JPTa2NEk-PgjCJ16fIrR6ohV-kDKveDlYDOeiMCB2_c

cherry-picked from 8d106780b6a638552749e54e169fc72537d4bccc
and make changes on WiFiConfigurationSerializer.java since
it is not on mm-wireless-dev
Bug:26012244
Change-Id: I44e454544b630b891c9a58a18b5a028edcce580f
2016-01-13 15:06:30 -08:00
Mahaver Chopra
d68cc200ec Merge "Handle null pointer exception" 2016-01-08 20:20:02 +00:00
Anna Galusza
69c952f833 Merge "Add remaining Accessibility Settings to backup list. Note additional settings that should not be restored if they are already set (on account of the new Setup Wizard, which allows critical Accessibility Settings to be set before restore)." 2016-01-08 19:25:01 +00:00
Mahaver Chopra
87648756e3 Handle null pointer exception
Handle null pointer exception, just in case calling entitity doesn't
check.

Change-Id: I1b4809476cc689ad3dfd426e123a64e9a0336c87
2016-01-08 19:23:57 +00:00
Mahaver Chopra
dea471ef54 Added Data roaming user restriction
Added new user restriction DISALLOW_DATA_ROAMING, can only be set
by device owners.

Bug: 24890464
Change-Id: Ic4cb37dd5f9bbffa35f921751488ef7c7ff99452
2016-01-08 18:07:31 +00:00
Anna Galusza
fa7786cbe7 Add remaining Accessibility Settings to backup
list. Note additional settings that should not be
restored if they are already set (on account of
the new Setup Wizard, which allows critical
Accessibility Settings to be set before restore).

Change-Id: I95524abbef20ab12e529a2b1e6165adc7294c3db
2016-01-08 09:28:53 -08:00
Fyodor Kupolov
42f9fe75e6 Merge "Optimized database creation for a new user" 2015-12-18 17:22:04 +00:00
Bryce Lee
bd17928afc resolve merge conflicts of 6b9e5bf0c2 to master.
Change-Id: Idada49313619533bfeb375ee232c942589457fa4
2015-12-18 03:05:20 +00:00
Bryce Lee
9eaa59a1ff Merge "Add setting for declaring disabled bluetooth profiles." into cw-e-dev
am: cf91b45c05

* commit 'cf91b45c05358c81ddaccf3ddd4b1ea6d5295faa':
  Add setting for declaring disabled bluetooth profiles.
2015-12-17 11:45:17 -08:00
Fyodor Kupolov
497b5faba9 Optimized database creation for a new user
If the file doesn't exist, database can be kept in memory. It's safe because
the database will be migrated and disposed of immediately after onCreate
finishes.

Bug: 26237300
Change-Id: Ib37c520f28960c8d6b9ce8dd719ffbcc11a97a58
2015-12-17 10:47:33 -08:00
Bryce Lee
ec85f34812 Add setting for declaring disabled bluetooth profiles.
Bug: 25900899
Change-Id: I420a7c590d72ba10f3e466d15dccfdbb520e810a
2015-12-16 13:32:28 -08:00
Geoff Mendal
5f7eefc8d0 Import translations. DO NOT MERGE
Change-Id: I8dc68f5b6e8579613e61c5a060a9d2fff5729cef
Auto-generated-cl: translation import
2015-12-16 06:08:30 -08:00
Christopher Tate
a89f9d93cb Don't back up / restore EAP network definitions
Bug 25725016

Cherrypick from AOSP.

Change-Id: I6aa11a76e7724a0aaad05a1aa074afa2c429370c
2015-12-10 18:23:22 -08:00
Ritesh Reddy
4d4f0db8d9 Merge changes I2363e66a,If17effb9
* changes:
  Enabled NetworkPolicy backup and restore.
  Enabled SoftAP Configuration Backup
2015-12-10 18:38:42 +00:00
Ritesh Reddy
9f548b00dc Enabled NetworkPolicy backup and restore.
Backing up NetworkPolicy through NetworkPolicyManager API

Bug: 17857156
Change-Id: I2363e66a1b27f50b2454b4550a241a3d84bf4b7c
2015-12-10 16:21:18 +00:00
Ritesh Reddy
188ae9dc22 Enabled SoftAP Configuration Backup
Backing up SoftAP Configuration through WifiManager API.

Bug: 5343116
Change-Id: If17effb98c3489246d817fa3612f3f11b9ead9ab
2015-12-08 10:21:53 +00:00
Suprabh Shukla
269c11eee1 Added default config to enable adding users from lockscreen
A config value is added for enabling/disabling the ability
to add users while screen is locked. The config value, currently false,
is read and applied to the setting only if the user has not set the
value as true/false explicitly.

Bug-Id: b/24662310
Change-Id: Ie00ab0952c64cbc9805794bc0dde350920750026
2015-12-02 17:51:37 -08:00
Geoff Mendal
696953ca25 Import translations. DO NOT MERGE
Change-Id: I4247a09a0c94930c560bf92822248a4fc59903ac
Auto-generated-cl: translation import
2015-11-30 05:57:50 -08:00
Makoto Onuki
28da2e3490 Fix "some user restrictions not working" issue
SettingsProvider used to prevent any changes to certain settings
when the corresponding user restriction is set, which isn't really what
these restrictions mean.
Even if a user restriction is set, it should still changing in the more
restricting direction.

Also stop setting "" to LOCATION_PROVIDERS_ALLOWED, which will simply
be ignored.

Bug 25614198

Change-Id: Ifa8edc2927e21e6c6174620c8c874c86c1dc0f75
2015-11-23 10:48:16 -08:00
Svetoslav Ganov
c47132c205 Merge "Use resolved calling user id" 2015-11-20 21:10:52 +00:00
Svetoslav
d8d25e0038 Use resolved calling user id
bug:25476216

Change-Id: I0093a5c071affaa5f3ca8eeb0e3a7a36b66a3c1f
2015-11-20 13:09:32 -08:00
Chris Tate
3d4e969f4f Merge "Don\'t back up / restore EAP network definitions" am: 14a0981fde am: b5a38f6da5
am: 96333c2e8c

* commit '96333c2e8cd13df55e8c878925f8cd2e9c90ac42':
  Don't back up / restore EAP network definitions
2015-11-20 18:15:52 +00:00
Chris Tate
984f548dca Merge "Don\'t back up / restore EAP network definitions" am: 14a0981fde
am: b5a38f6da5

* commit 'b5a38f6da5f59020e2c32e00d7228ed71c18f70d':
  Don't back up / restore EAP network definitions
2015-11-20 18:10:22 +00:00