938 Commits

Author SHA1 Message Date
Svetoslav Ganov
ee4c0a3c7e Merge \"Fix a race in local settings caches\" into nyc-dev
am: f4ddb7ce30

Change-Id: Ia973ef68382ac359908b83be3dbca485c91d5cd6
2016-06-18 00:38:28 +00:00
Roshan Pius
5db739c67f SettingsBackupAgent: Remove redundant size parameter
Remove the redundant size parameter in wifi backup/restore.

BUG: 28967335
Change-Id: I8ae9b2bf3bc8eb2dd1fd6dd87fe7b1dcf0712382
2016-06-17 16:54:23 -07:00
Svetoslav Ganov
8c35dcc7ae Fix a race in local settings caches
We send a handle to the generation tracker along with the first accessed
setting but don't send the generation id of when the setting was
actually looked up. So by the time the client gets the setting with the
generation tracker from which to get and cache the last generation the
setting may have changed. We need to pass the generation id along with
the value and the generation tracker.

bug:29458487

Change-Id: I0ac4955ba5b10b547f8fe653a7c28e048a4691eb
2016-06-17 15:30:45 -07:00
Roshan Pius
7a2491fa3b Use WifiManager for wifi backup/restore
Use the newly exposed WifiManager API's for backing up/restoring wifi
related data. Remove all other wifi related logic from
SettingsBackupAgent.

There are 3 API's exposed by WifiManager for backup/restore:
1. retrieveBackupData - Data to be backed up in new format.
2. restoreBackupData - Restore from the new backup data format.
3. restoreOldBackupData - Restore from the old backup data format.

BUG: 29075035
BUG: 28967335
Change-Id: I2dc379bc36af0a0824ed51fbe9aaebfd0a0114b0
2016-06-09 13:49:53 -07:00
Bill Yi
4535c0f80c Import translations. DO NOT MERGE
Change-Id: Id381d85225a2de4b0e0c1f2d3fba40143ed738a2
Auto-generated-cl: translation import
2016-06-03 09:43:50 -07:00
Bill Yi
686d0d7cf6 Import translations. DO NOT MERGE
Change-Id: Ie630e761cacbec55840a3de9439aa36835a34b38
Auto-generated-cl: translation import
2016-06-03 09:33:00 -07:00
Bill Yi
fe8451b206 Import translations. DO NOT MERGE
Change-Id: I74b3ff246a5db23b1b41c489e732883349b70b75
Auto-generated-cl: translation import
2016-06-01 05:14:39 -07:00
Bill Yi
c1008fb475 Import translations. DO NOT MERGE
Change-Id: I7dc8f792230a042990272067d70ed46bcbe90ac7
Auto-generated-cl: translation import
2016-05-23 05:28:34 -07:00
Baligh Uddin
cd669b648a Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 28857042
Change-Id: I3e66f964402487321dd1923656d488b514bc68ba
2016-05-21 12:46:09 -07:00
Paul Stewart
25e87ed3be Merge "Don\'t remove existing EAP configurations" into nyc-dev am: c7ad1ac712 am: 7ca542fa99
am: 131b976fe4

* commit '131b976fe4188e38b16a1494a77497c6830c3213':
  Don't remove existing EAP configurations

Change-Id: I329220c073c9ec186082dec253c16882960b258a
2016-05-20 17:54:29 +00:00
Paul Stewart
131b976fe4 Merge "Don\'t remove existing EAP configurations" into nyc-dev am: c7ad1ac712
am: 7ca542fa99

* commit '7ca542fa99362f15da8d3f57b4916d87c1f67eb3':
  Don't remove existing EAP configurations

Change-Id: I9808325df8d34bb2d08f99b384ff5ad07b6a2273
2016-05-20 17:49:10 +00:00
Paul Stewart
bced7c5fb6 Merge "Don\'t remove existing EAP configurations" into nyc-dev
am: c7ad1ac712

* commit 'c7ad1ac712f09c5bc116c66a54a860000b53fa38':
  Don't remove existing EAP configurations

Change-Id: I2678831ad384368a322af859aeadc42fcd2aeda7
2016-05-20 17:45:21 +00:00
Paul Stewart
7ca542fa99 Merge "Don\'t remove existing EAP configurations" into nyc-dev
am: c7ad1ac712

* commit 'c7ad1ac712f09c5bc116c66a54a860000b53fa38':
  Don't remove existing EAP configurations

Change-Id: I743d4b0291b7d0c864d30cb04acd7811428419d0
2016-05-20 17:45:20 +00:00
Paul Stewart
45e6fec2cf Don't remove existing EAP configurations
When merging backed-up configurations with the current supplicant
configuration, we read both configurations into a instance of
WifiNetworkSettings.  No EAP configurations should be restored as
per b/25725016, however existing EAP configurations that already
reside in wpa_supplicant.conf (presumably configured in SUW)
should not be removed in the process.

This CL adds a parameter to the "readNetworks" method to allow it
to select whether or not EAP configurations should be read in.  It
is used to allow the "restoreWifiSupplicant" method to copy in EAP
configurations from the existing wpa_supplicant.conf, but not out
of the backup data.

BUG: 28873992
Change-Id: I8b3e0c1a6629b3f1ca5055b1b2190e6b3ca4c033
2016-05-20 08:22:53 -07:00
Svetoslav Ganov
9b9da8632e Merge "Use the correct handler when persisting the settings state." into nyc-dev am: 967fcfa593 am: 23d729deb8
am: 1db5c20960

* commit '1db5c20960c2b56f7864adece4ecc17465252e5f':
  Use the correct handler when persisting the settings state.

Change-Id: Ie2b13db04cb574d3dbe293801b23a0bb497447d2
2016-05-16 19:59:53 +00:00
Svetoslav Ganov
1db5c20960 Merge "Use the correct handler when persisting the settings state." into nyc-dev am: 967fcfa593
am: 23d729deb8

* commit '23d729deb8d78d5806dec60453174ccfa28b843d':
  Use the correct handler when persisting the settings state.

Change-Id: I1e6002fd970f9eda095a6c1c17f09937cee67aaf
2016-05-16 19:54:37 +00:00
Svetoslav Ganov
8d761fb452 Merge "Use the correct handler when persisting the settings state." into nyc-dev
am: 967fcfa593

* commit '967fcfa5939403017a6edc6d365b2996b915685d':
  Use the correct handler when persisting the settings state.

Change-Id: I6939635dfc93015c4625e50b6431ceb850cfbd1a
2016-05-16 19:50:00 +00:00
Svetoslav Ganov
23d729deb8 Merge "Use the correct handler when persisting the settings state." into nyc-dev
am: 967fcfa593

* commit '967fcfa5939403017a6edc6d365b2996b915685d':
  Use the correct handler when persisting the settings state.

Change-Id: I53fea39e5097512f080f62f3510cc6c7acf87e3c
2016-05-16 19:49:55 +00:00
Svetoslav Ganov
9205749cfe Use the correct handler when persisting the settings state.
bug:28784358

Change-Id: Iba9d569bae67c7ba0c3ab0a486ae14efa84a7acf
2016-05-16 12:36:48 -07:00
Svetoslav Ganov
582ed22116 Merge "Make settings cahches generation mechanism robust." into nyc-dev am: b35301e421 am: d361bbd0db
am: 7cd6a970c0

* commit '7cd6a970c047c06c196cb351d00584180806351e':
  Make settings cahches generation mechanism robust.

Change-Id: I2181d6f48052e4ae3204e39bfb050387065a7fcc
2016-05-13 22:31:32 +00:00
Svetoslav Ganov
7cd6a970c0 Merge "Make settings cahches generation mechanism robust." into nyc-dev am: b35301e421
am: d361bbd0db

* commit 'd361bbd0dbb87d00c6e4abbe32c7866f90ff56bd':
  Make settings cahches generation mechanism robust.

Change-Id: I5c3d4e6b0998396b37506d6842f8b37bb5d76460
2016-05-13 22:29:02 +00:00
Svetoslav Ganov
d361bbd0db Merge "Make settings cahches generation mechanism robust." into nyc-dev
am: b35301e421

* commit 'b35301e421bb08c28425c49ad46a277c96ccb411':
  Make settings cahches generation mechanism robust.

Change-Id: I59566be20a76084f409f0dd57c70337b60339c87
2016-05-13 22:26:29 +00:00
Svetoslav Ganov
1ba77621c6 Merge "Make settings cahches generation mechanism robust." into nyc-dev
am: b35301e421

* commit 'b35301e421bb08c28425c49ad46a277c96ccb411':
  Make settings cahches generation mechanism robust.

Change-Id: Ided07e935f83e96edfec9217bfad9ae2da1fc6fb
2016-05-13 22:26:27 +00:00
Svetoslav Ganov
b35301e421 Merge "Make settings cahches generation mechanism robust." into nyc-dev 2016-05-13 22:22:32 +00:00
Svetoslav Ganov
04df738bcb Make settings cahches generation mechanism robust.
Settings is using a MemoryIntArray to communicate the settings table
version enabling apps to have up-to-date local caches. However, ashmem
allows an arbitrary process with a handle to the fd (even in read only
mode) to unpin the memory which can then be garbage collected. Here we
make this mechanism fault tolerant against bad apps unpinning the ashmem
region. First, we no longer unpin the ashmem on the client side and if
the ashmem region is purged and cannot be pinned we recreate it and
hook up again with the local app caches. The change also adds a test
that clients can only read while owner can read/write.

bug:28764789

Change-Id: I1ef79b4b21e976124b268c9126a55d614157059b
2016-05-13 15:14:14 -07:00
Steven Ng
335e4bdf60 Merge "Add a Global setting for disabling OEM unlocking setting" into nyc-mr1-dev am: e333b2eb81
am: a62fc512da

* commit 'a62fc512dae936ec1d8573cacbd4e649ecd9be1f':
  Add a Global setting for disabling OEM unlocking setting

Change-Id: I8e0f6f00599923be663c9808ffa187bbe014121c
2016-05-13 11:38:43 +00:00
Steven Ng
a62fc512da Merge "Add a Global setting for disabling OEM unlocking setting" into nyc-mr1-dev
am: e333b2eb81

* commit 'e333b2eb81958cc8d27eb687ebd84844a84919ea':
  Add a Global setting for disabling OEM unlocking setting

Change-Id: I625b51c1e257afa095dfacb3bcf481fb2068b56f
2016-05-13 11:36:20 +00:00
Steven Ng
e333b2eb81 Merge "Add a Global setting for disabling OEM unlocking setting" into nyc-mr1-dev 2016-05-13 11:27:59 +00:00
Svet Ganov
5ee89e4d5e Merge "Persist settings on a dedicated background thread" into nyc-dev am: 00749aeb15 am: 21914ba1ae
am: 147e8579c6

* commit '147e8579c635d3167287aeb1bdddba965fb96a3f':
  Persist settings on a dedicated background thread

Change-Id: I309db2d003873a6a69163cdc7680fc5a66b09a03
2016-05-12 20:03:53 +00:00
Svet Ganov
21914ba1ae Merge "Persist settings on a dedicated background thread" into nyc-dev
am: 00749aeb15

* commit '00749aeb15d52151fcc9f9051b525840c49e14ce':
  Persist settings on a dedicated background thread

Change-Id: I31ec418fb5b1338bc8d55eec08568028d42d95a2
2016-05-12 19:57:46 +00:00
Svet Ganov
f4e2832742 Merge "Persist settings on a dedicated background thread" into nyc-dev
am: 00749aeb15

* commit '00749aeb15d52151fcc9f9051b525840c49e14ce':
  Persist settings on a dedicated background thread

Change-Id: I62d1cf9a8955ea949c420c1eb62645bff325da2a
2016-05-12 19:57:42 +00:00
Svetoslav Ganov
00749aeb15 Merge "Persist settings on a dedicated background thread" into nyc-dev 2016-05-12 19:51:58 +00:00
Phil Weaver
0f82a5f261 Merge "Fix a race in settings update." into nyc-dev am: df15e03ed0 am: d56cd1fcab
am: f383e56846

* commit 'f383e56846057e968093bff2b4a1a5d157a7441e':
  Fix a race in settings update.

Change-Id: I7c683987f51f2b90d1cf3a566c62b18c6606ab2d
2016-05-12 16:58:47 +00:00
Phil Weaver
f383e56846 Merge "Fix a race in settings update." into nyc-dev am: df15e03ed0
am: d56cd1fcab

* commit 'd56cd1fcab01b03aa6671522f0be6e69d7ec94fc':
  Fix a race in settings update.

Change-Id: Ia9cee330dafdad14369ca5025ddc4d2710d76a59
2016-05-12 16:56:14 +00:00
Phil Weaver
d56cd1fcab Merge "Fix a race in settings update." into nyc-dev
am: df15e03ed0

* commit 'df15e03ed062493b506f7599ff1e6aff26828485':
  Fix a race in settings update.

Change-Id: I970606b21b1a5cd2d19e0f21077636e68f107c6b
2016-05-12 16:53:49 +00:00
Phil Weaver
27e54131fa Merge "Fix a race in settings update." into nyc-dev
am: df15e03ed0

* commit 'df15e03ed062493b506f7599ff1e6aff26828485':
  Fix a race in settings update.

Change-Id: I6b51cb006e3b729ae8e0bd1060b41eb0ca1bdd68
2016-05-12 15:51:05 +00:00
Phil Weaver
83fec00697 Fix a race in settings update.
Need to invalidate caching before notifying of changes.

Bug: 28621277
Change-Id: I2820b15d2364ecaad7666a820c0c7280ac6b7b4c
2016-05-11 10:55:29 -07:00
Svet Ganov
a8f9026d22 Persist settings on a dedicated background thread
Settings were persisted on the system background thread but during
first boot the device is under heavy load and persisting settings
competes with other system components using the shared background
thread. As a result persisting settings can be delayed much longer
than the expected 200ms. This can cause issues with setup wizard
being skipped/went over and its component disaabled being persisted
but the setting whether the device is provisioned not being
persisted - now if the device boots it will have no SUW but also
the home button would be missing. Generally, we need a tansactional
abstraction in the system process to peform all delayed operations
atomically.

bug:25472484

Change-Id: I8e0cf7ffa32e86e36e777964eb0c3cc7de02d3c3
2016-05-10 08:48:00 -07:00
Guang Zhu
10ff18bcdf Merge "Revert "Persist settings on a dedicated background thread"" into nyc-dev am: 875e99443f am: e3dec83852
am: 46564cbac6

* commit '46564cbac6385d8fe7db04b9abc1a05afab36c85':
  Revert "Persist settings on a dedicated background thread"

Change-Id: Ifd0172605cded3273d11432fdd81db3ccab46a1c
2016-05-10 07:29:46 +00:00
Guang Zhu
46564cbac6 Merge "Revert "Persist settings on a dedicated background thread"" into nyc-dev am: 875e99443f
am: e3dec83852

* commit 'e3dec8385278472435d7e29249ce703e1a2250c4':
  Revert "Persist settings on a dedicated background thread"

Change-Id: I23aec19f10f9953505626f4d19c19de649695a65
2016-05-10 07:24:03 +00:00
Guang Zhu
8de4d5ecca Merge "Revert "Persist settings on a dedicated background thread"" into nyc-dev
am: 875e99443f

* commit '875e99443f6c56d71090b8bedddd71f2b9601787':
  Revert "Persist settings on a dedicated background thread"

Change-Id: If082c93a5868b2a95965458a2c06defe101edd72
2016-05-10 07:18:33 +00:00
Guang Zhu
e3dec83852 Merge "Revert "Persist settings on a dedicated background thread"" into nyc-dev
am: 875e99443f

* commit '875e99443f6c56d71090b8bedddd71f2b9601787':
  Revert "Persist settings on a dedicated background thread"

Change-Id: Ice3e7f7ebe50f85eb0a9f3e04662df5f68963c07
2016-05-10 07:18:29 +00:00
Guang Zhu
5537ce1f94 Revert "Persist settings on a dedicated background thread"
Bug: 25472484

This reverts commit 82b8c92b97d3c7006d7a9f67a9cdb83263d6bf2c.

Change-Id: I1a8c2e186ad74d78f1c82fe508c6f71c438177dc
2016-05-10 07:02:42 +00:00
Svet Ganov
13018d191f Persist settings on a dedicated background thread am: 82b8c92b97 am: f528fb457b
am: 2eacd8e7aa

* commit '2eacd8e7aaab864941f034e8a36481193ff5576c':
  Persist settings on a dedicated background thread

Change-Id: I1d7ca1ddba154439e6a867297d374852075afc0e
2016-05-10 04:02:28 +00:00
Svet Ganov
f528fb457b Persist settings on a dedicated background thread
am: 82b8c92b97

* commit '82b8c92b97d3c7006d7a9f67a9cdb83263d6bf2c':
  Persist settings on a dedicated background thread

Change-Id: I596e8f3ee73b886c79f2b79d47c73111e5f2d0a3
2016-05-10 03:50:47 +00:00
Svet Ganov
b3f1e67921 Persist settings on a dedicated background thread
am: 82b8c92b97

* commit '82b8c92b97d3c7006d7a9f67a9cdb83263d6bf2c':
  Persist settings on a dedicated background thread

Change-Id: I1432822542bf914d106440b3f4bfa0e56b911eb2
2016-05-10 03:50:44 +00:00
Svet Ganov
82b8c92b97 Persist settings on a dedicated background thread
Settings were persisted on the system background thread but during
first boot the device is under heavy load and persisting settings
competes with other system components using the shared background
thread. As a result persisting settings can be delayed much longer
than the expected 200ms. This can cause issues with setup wizard
being skipped/went over and its component disaabled being persisted
but the setting whether the device is provisioned not being
persisted - now if the device boots it will have no SUW but also
the home button would be missing. Generally, we need a tansactional
abstraction in the system process to peform all delayed operations
atomically.

bug:25472484

Change-Id: Icf38e72403b190a8fa9d0554b8dd83ce78da3bc8
2016-05-10 03:39:55 +00:00
Steven Ng
dc20ba69bf Add a Global setting for disabling OEM unlocking setting
+ By default, OEM unlocking setting is enabled.
+ Add a check to prevent oem unlock being flipped if the setting isn't
  enabled.

Bug: 28163088
Change-Id: I087d8d5a1d99a611a8f66ff71a92ec9ea1da4e9f
2016-05-04 19:52:02 +00:00
Baligh Uddin
8a44c3c8d0 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 28463229
Change-Id: Ie10dd0e18292f94995761a098df8c42ee69a0e25
2016-05-03 16:36:29 -07:00
The Android Automerger
750ccd5333 Manually merge branch 'nyc-mr1-dev-plus-aosp' to shortcircuit automerger b/28407115 2016-04-27 22:14:50 +00:00