690 Commits

Author SHA1 Message Date
Fyodor Kupolov
b96be50703 am 57cced94: am 9c5f1c33: am 421eaa78: Merge "Fixed NPE when dumpSettings is called with a null cursor" into mnc-dev
* commit '57cced9462224227675d732881c6f51a30cdb150':
  Fixed NPE when dumpSettings is called with a null cursor
2015-06-11 23:10:36 +00:00
Fyodor Kupolov
9c5f1c334b am 421eaa78: Merge "Fixed NPE when dumpSettings is called with a null cursor" into mnc-dev
* commit '421eaa7813e33ea1bbce398e5940e6ab477c759d':
  Fixed NPE when dumpSettings is called with a null cursor
2015-06-11 22:41:34 +00:00
Fyodor Kupolov
1f450dbfbc Fixed NPE when dumpSettings is called with a null cursor
Bug: 20070414
Change-Id: I15d5d2ae27a7892807221421778082e0f29a36ff
2015-06-11 15:25:59 -07:00
Geoff Mendal
1c82486499 Import translations. DO NOT MERGE
Change-Id: I17f57ae7b07121c5748e69f0bd4c1e838a9373fe
Auto-generated-cl: translation import
2015-06-08 07:12:43 -07:00
Geoff Mendal
68a7f4e4ee Import translations. DO NOT MERGE
Change-Id: Ieb9a927ed34ff9376261ac96b77ac648b34258e1
Auto-generated-cl: translation import
2015-06-03 10:15:23 -07:00
Svetoslav
b12280202d am d5464b9d: am 80c2cc14: am 815be147: Merge "Use AtomicFile APIs correctly when reading." into mnc-dev
* commit 'd5464b9d07f6d5cf39d8173d5a026ce457dc458f':
  Use AtomicFile APIs correctly when reading.
2015-06-01 15:47:32 +00:00
Geoff Mendal
117889ac05 Import translations. DO NOT MERGE
Change-Id: I8e46c3c2c16b5cfa66bb696299ed32f4ff43ef26
Auto-generated-cl: translation import
2015-05-29 17:55:54 -05:00
Svetoslav
80c2cc14e1 am 815be147: Merge "Use AtomicFile APIs correctly when reading." into mnc-dev
* commit '815be147a35452d52feb0610ff11d8645351ad9f':
  Use AtomicFile APIs correctly when reading.
2015-05-29 20:51:58 +00:00
Svetoslav
815be147a3 Merge "Use AtomicFile APIs correctly when reading." into mnc-dev 2015-05-29 20:05:43 +00:00
Svetoslav
3dcdd37b66 Use AtomicFile APIs correctly when reading.
21280155

Change-Id: I354ebac8fc91d8f28eec6016474a9521ff2a490d
2015-05-29 13:01:37 -07:00
Geoff Mendal
642c4fc527 Import translations. DO NOT MERGE
Change-Id: I6fbaa6bb785894851b344f414fe5c8f830adbde3
Auto-generated-cl: translation import
2015-05-29 09:10:35 -05:00
Svetoslav
f8bfda1a0e am e7759cca: am 61d91058: am eff64986: Merge "Do not call out of the settings provider with a lock held" into mnc-dev
* commit 'e7759cca2743ad04b81e44b3ad314d7b6c2417ca':
  Do not call out of the settings provider with a lock held
2015-05-21 12:45:01 +00:00
Svetoslav
61d910583d am eff64986: Merge "Do not call out of the settings provider with a lock held" into mnc-dev
* commit 'eff649862be8db389cf8480efa50ca1106dd2117':
  Do not call out of the settings provider with a lock held
2015-05-21 00:45:41 +00:00
Svetoslav
7ec28e8513 Do not call out of the settings provider with a lock held
bug:20443441

Change-Id: I704520b75f5deaeeb1b4098cda0783c667e8cdd1
2015-05-20 17:24:13 -07:00
Wojciech Staszkiewicz
b41aab7b5c am b8ee07d1: am e2ad30ef: am be752b1f: Merge "Pass charset to XmlPullParser.setInput instead of null" into mnc-dev
* commit 'b8ee07d10c8a8494cb658c3bc3f58f404b949db6':
  Pass charset to XmlPullParser.setInput instead of null
2015-05-14 21:23:12 +00:00
Wojciech Staszkiewicz
e2ad30ef51 am be752b1f: Merge "Pass charset to XmlPullParser.setInput instead of null" into mnc-dev
* commit 'be752b1f28f1f3724b235e3f0a77b4c07c40e631':
  Pass charset to XmlPullParser.setInput instead of null
2015-05-14 10:34:55 +00:00
Wojciech Staszkiewicz
9e9e2e73c6 Pass charset to XmlPullParser.setInput instead of null
Passing null to XmlPullParser.setInput forces it to do additional
work, which can be easily avoided if we know the charset beforehand.

bug: b/20849543

Change-Id: Iaff97be9df2d0f99d7af8f19f65934439c9658e2
2015-05-14 10:24:34 +01:00
Geoff Mendal
18d9823ef4 Import translations. DO NOT MERGE
Change-Id: Ie70f9077c3e51b08528ca37c3614b065ab44c68b
Auto-generated-cl: translation import
2015-05-13 20:47:17 -07:00
Geoff Mendal
ddb2898e0c Import translations. DO NOT MERGE
Change-Id: Id77a38821a3010d4ec978c489d787df9b6424fb6
Auto-generated-cl: translation import
2015-05-13 06:42:57 -07:00
Jason Monk
9de4cc5770 am d8ee3c77: am deb356dd: am 2df11817: Merge "Add control for double tap to wake setting" into mnc-dev
* commit 'd8ee3c770fc0619e053a5aa793938d13a354acf4':
  Add control for double tap to wake setting
2015-05-12 15:09:36 +00:00
Jason Monk
27bbb2d0a1 Add control for double tap to wake setting
Bug: 16875464
Change-Id: Ic1ad910dd38acbc68ef040b2acdf3696ec2c2e4e
2015-05-12 10:12:32 -04:00
John Spurlock
f6cf58d0b5 am fba5881d: am 1593d94b: am fb9a664b: Merge "Zen: Reset zen + ringer modes on upgrades to M." into mnc-dev
* commit 'fba5881d1ccb2f22efb34783a482a36f1b189f93':
  Zen: Reset zen + ringer modes on upgrades to M.
2015-05-11 21:18:59 +00:00
John Spurlock
e11ae11631 Zen: Reset zen + ringer modes on upgrades to M.
Bug: 20886649
Change-Id: I79d0b4a31eb9d54c5e5d4cd80236fdb8340dfeb2
2015-05-11 16:20:16 -04:00
Geoff Mendal
a6d47cc33d Import translations. DO NOT MERGE
Change-Id: I953f5c61ff75db1c513013a2023114f5ff4d7b14
Auto-generated-cl: translation import
2015-05-01 20:02:45 -07:00
Geoff Mendal
6db4699a62 Import translations. DO NOT MERGE
Change-Id: I3ceb55bbf8af3bae4922724c7afb0f503f806349
Auto-generated-cl: translation import
2015-04-29 07:50:55 -05:00
Adrian Roos
8150d2a2a1 Require explicit userId in LockPatternUtils
Bug: 18931518
Change-Id: Ib03f37df9135f0324a998c62d165d8eea46328c8
2015-04-28 11:49:00 -07:00
Svet Ganov
8de348095f DO NOT MERGE Do not clean up global/system settings on package unintalls.
Legacy apps can write their own entries in the system settings and
when they get uninstalled these are hanging around forever polluting
the settings table. We keep track of which settings an app added and
when the app is uninstalled we drop its custom entries. The trouble
was that we did the same thing for global and secure settings with
no explicit list of platform defined settings. Hence, if say a test
signed by the platform certificate touches platform defined global
or secure settings and is then uninstalled, we would drop the platform
defined entries portentially crippling the system.

bug:20113160

Change-Id: Ia21694f6326ad4a1795c4666027b366e26c05a23
(cherry picked from commit b128540dc741c424d4f652419686882b7a3bfa06)
2015-04-27 17:49:35 +00:00
Geoff Mendal
f748bb3051 Import translations. DO NOT MERGE
Change-Id: Ic375b06aab79b9b7d17754eba4dd9d182a669734
Auto-generated-cl: translation import
2015-04-24 23:58:45 -07:00
Svet Ganov
e723e54650 Revert some unnecessary changes in handling XML read
Change-Id: I3bbbc3159930d80e2e1f28fa9c0035ae5029d4b8
2015-04-23 11:58:26 -07:00
Svet Ganov
ba0821ed3b Make read/write from/to XML persistent state more robust.
When writing critical state to XML an excpetion can lead to creating
a malformed XML that is later parsed and may put the device in a bad
state. Hence, on any error while writing we should bail out and drop
the partially write state on the floor.

Corollary, any error on parsing can lead to having a partially read
state that is not consistent which may lead to writing this bad state
back to disk. Hence, on any error while parsing we should bail as
our current state may be unrecoverable.

Change-Id: Ia050c16198cb583f8a51263ad2035dbb948052b8
2015-04-22 13:42:54 -07:00
Andres Morales
8fa5665f0e Wire up GateKeeper to LockSettingsService
Adds:
- Communication to GKService
- password upgrade flow
- enroll takes previous credential

Change-Id: I0161b64642be3d0e34ff4a9e6e3ca8569f2d7c0a
2015-04-13 18:38:45 -07:00
Jeff Sharkey
1b8ef7e316 Parcelable objects for Disk/Volume.
Will eventually be used by SystemUI and/or Settings.

Also fix SettingsProvider NPE.

Bug: 19993667, 19909433
Change-Id: Ie326849ac5f43ee35f728d9cc0e332b72292db70
2015-04-04 14:40:46 -07:00
Jeff Brown
fd93eaf278 Merge "Clarify settings update code." 2015-04-02 23:12:51 +00:00
Svet Ganov
c9755bc4f2 Fix a regression in settings parsing
Change-Id: I222bac482a843112ae031b00c83e3765ea6b456c
2015-03-28 13:21:22 -07:00
Svet Ganov
8440ca3934 Relax the parsing code in settings provider.
The practice in the system server is to have lenient parsing code
to avoid the whole system being unusable due to a single XML error.

Change-Id: Idf44031edf5221966f3352ca2f83e284973ab95f
2015-03-27 17:58:40 -07:00
Jeff Brown
503cffc181 Clarify settings update code.
Change-Id: I650ff827bc31eacff2efcdba84e6ef41016ad51c
2015-03-26 18:08:51 -07:00
Christopher Tate
7b9a28c7f0 Back up and restore the set of enabled IMEs
The restored set of enabled IMEs/subtypes is merged into the
current state of the system, rather than simply replacing it.
This is because we do not want to accidentally disable or
reconfigure something that the user is currently relying on.

There's a certain amount of repetitive activity here, rebuilding
the enabled-state data structures in a different format, but it's
important for maintainability that the restore code be able to
rely on the core InputMethodUtils implementation of reading/writing
the settings element.

Bug 19822542

Change-Id: If0104151b3526da6ecc669adde3119a239ecafeb
2015-03-23 16:28:21 -07:00
Geoff Mendal
273c6f2e00 Import translations. DO NOT MERGE
Change-Id: I0acc044f88445fe6d48f84bcaee6a971409ad144
Auto-generated-cl: translation import
2015-03-21 02:02:20 -05:00
Svetoslav Ganov
e1519582ab Revert "Persist settings on a normal priority thread."
This reverts commit d289e64a2d7c8efba78b9066b647ee321eba701a.

Change-Id: Ic9455b538e0be8b9a4e4672f99b14978e70d2911
2015-03-17 22:00:37 +00:00
Christopher Tate
2d4aadca94 Merge restored accessibility enable state, don't overwrite
We do not want to accidentally disable the user's currently-enabled
accessibility service(s); presumably they turned them on during
setup for a reason.  We now merge the prior + current states rather
than simply replacing the current state with the former.

Bug 19427367

Change-Id: I96eb47df57318c88066c5da6862f23f656639148
2015-03-16 17:39:07 -07:00
Christopher Tate
6597e3435f Notification listener backup & restore
We now back up & restore the set of enabled notification listeners.  Post-
restore, a listener that had been enabled on the ancestral device will be
enabled on the current device as soon as it's installed, matching the
user's previous configuration.  After this has happened the enable/disable
state for that app is not "sticky"; disabling it again will work as
expected.

The infrastructure for accomplishing this is general: it can be leveraged
by any ManagedServices derivative.  There's a bit of extra wiring in the
settings provider to support the restore-time information flow as well.
This is because ManagedServices -- like many other parts of the system --
monitors writes to the settings provider and does work in response to new
writes of the elements that it cares about.  Unfortunately this means that
there is no way to use the BackupAgent's restoreFinished() hook to post-
process the restored data: by the time it is run, the ManagedService's
observers have already executed and culled any unknown components from
the description that was just pushed into settings.

As of this patch, the settings provider's restore logic knows that a
particular settings element will require a message to interested observers
about the restore-driven change.  The message is delivered as a broadcast,
and is sent after the new value has been committed to the settings db.
Adding other system ManagedService handling that parallels this will only
require adding a new corresponding entry to the table of individual settings
for which the relevant "this settings element is being restored" broadcast
is sent, found in SettingsHelper.

(It isn't sent for all settings elements because very few settings elements
have semantics that require it; 3rd party code won't be running yet during
platform restore anyway; and sending up to hundreds of broadcasts during
setup & restore is far from ideal.)

Bug 19254153

Change-Id: Ib8268c6cb273862a3ee089d2764f3bff4a299103
2015-03-16 16:24:28 -07:00
Svetoslav
d289e64a2d Persist settings on a normal priority thread.
We were doing the work for persisting settings on a background
priority thread and as a result persistence was not happening
correctly on a low end devices. Now we use a worker thread with
normal priority.

bug:19611897

Change-Id: I378c6e324935f5e3def8b986bd48486bfab55265
2015-03-13 12:08:45 -07:00
Raph Levien
174fa280d1 Fix XML parsing crash in SettingsProvider
A previous change added more whitespace to settings_global.xml to
improve human readability, but the parser is overly picky in ignoring
whitespace. This patch makes it accept all whitespace strings.

Bug: 19696812
Change-Id: I3ebb8f6df2e25f4e6b6841da743be3f3a91e2442
2015-03-11 14:37:45 -07:00
Svetoslav
c3f56c3cb5 Make settings XML files readable
Change-Id: I320f5419e045d257dc5ccbf81a9434f9b9d38564
2015-03-10 16:53:35 -07:00
Amith Yamasani
072543f580 Backup/restore owner info from locksettings
Backup the owner info string and whether or not
owner info is to be shown on the lockscreen.

Watch for changes to the two settings in LockSettingsService
and inform backup manager.

Bump up version numbers for the new entity.

Bug: 19300363
Change-Id: I35485c961d18b26be68873f4d5eeedc5ae513cc8
2015-02-18 16:03:25 -08:00
Christopher Tate
8561ff98cd am 32f216c3: am 8cd95aba: am 56238eaa: am 129ea76a: Fix wifi AP backup
* commit '32f216c359540219905bbe0295da31e594d83f5f':
  Fix wifi AP backup
2015-02-18 11:39:01 +00:00
Svetoslav
b596a2c5bf Location settings not properly set.
Settings provider has special handling for location providers. The
code to set the location providers was calling itself recursively
instead of updating the setting value.

bug:19361236

Change-Id: I1ef1932c7faa8226b52123aa3f23f38048258328
2015-02-17 21:41:05 -08:00
Christopher Tate
32f216c359 am 8cd95aba: am 56238eaa: am 129ea76a: Fix wifi AP backup
* commit '8cd95aba2f97eb552d437c185b156ba964886a6e':
  Fix wifi AP backup
2015-02-18 02:23:06 +00:00
Christopher Tate
8cd95aba2f am 56238eaa: am 129ea76a: Fix wifi AP backup
* commit '56238eaaa3688c9a9858058f4dc63aade7092d9b':
  Fix wifi AP backup
2015-02-18 02:17:57 +00:00
Christopher Tate
56238eaaa3 am 129ea76a: Fix wifi AP backup
* commit '129ea76a4a129fb3e8e997e8c604c0712e8a9d73':
  Fix wifi AP backup
2015-02-18 02:07:55 +00:00