Commit Graph

35 Commits

Author SHA1 Message Date
Danny Baumann 9382b6a75f CMSettingsProvider: remove per-user cursor observation
We don't need it because we don't support using the returned cursor
directly, and it can cause deadlocks when being called from platform
code.

Change-Id: I2f85be1152569ba27e4622d310d867e20965faa3
2017-03-13 04:51:13 +00:00
Roman Birg 256a7350ce CMSettings: don't trample user metrics setting on upgrade
During an upgrade, we try to migrate values which are
considered to be LEGACY settings to the new provider, however
because of a bad upgrade path, we need to check if the key exists in the
new database AND the old database, and then we can skip it in that case.

Ticket: CYNGNOS-2740

Change-Id: I5d6bc8399ccc328f4190ed7508c27bd9d5de1b9d
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-05-11 14:45:14 -07:00
Roman Birg 60a4ebcb43 cmsdk: insert dnd & edit tiles for 12.1 -> 13.0 upgrade
Ref: CYNGNOS-1924

Change-Id: I6d221e143dc91ec3dbc1c9a1877754f2b98b732e
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-02-19 11:40:44 -08:00
d34d e67ae8f648 CMSettings: Enforce correct permission for writing settings
If an application is writing to SECURE or GLOBAL they should only
be required to hold the WRITE_SECURE_SETTINGS permission and not
both.

Change-Id: Ife14b5e19340f04e2e3b7ebba121104253d1dc88
2016-02-11 11:29:46 -08:00
Adnan Begovic ad6f85c69e CMSettingsProvider: Don't trample default values on migrate.
Since the migration is invoked even on a clean flash, with
  no means of knowing what scenario we're coming from. Assume
  that all null values are to be dropped and default values are
  to be given precedence.

Change-Id: I10eb2f4650c379422268423dbc011b49f77ed910
TICKET: CYNGNOS-1721
2016-01-26 16:52:54 -08:00
Adnan Begovic d0d4ce972e CMSettings: Fix defaults load on provider creation.
The database is innaccessible during creation through
  the android resolver interfaces, thus, no defaults were
  loaded even though the code would execute.

  So rewrite the DatabaseHelper to create a singular bulk transaction
  per table when default settings are to be loaded, and provide
  verification tests for the CMSettingsProvider.

TICKET: CYNGNOS-1706
Change-Id: I3d8c5f25704ec9620fe57b82865531fb976a516f
2016-01-25 18:06:39 -08:00
Yvonne Wong fc97734c06 CMSettings: Add secure validators and relocate protected apps validator
Move validators from CMSettings.System into CMSettings,
add validators for CMSettings.Secure, and move protected apps validator
from CMSettings.System to CMSettings.Secure

Change-Id: I9f4e1bef7ff5be100376d2d03d34483d12938158
2015-12-07 15:17:35 -08:00
Adnan Begovic 144146eb17 CMSettingsProvider: Only enable component if already disabled.
Each CALL method would renable and already enabled component,
  cut down on log spam.

Change-Id: Ie58c75e32c828b1ce8b1017620b5a3b073830bbd
2015-12-03 17:11:24 -08:00
Adnan Begovic 2be0eef4dd CMSettingsProvider: Change migration pref.
The previous migration step should've never happened,
  change the default shared pref to a different location to
  force trigger a migration on devices where the previous iteration
  of settings migration already happened.

Change-Id: I6b466d37910c31dbf58d37fd631807d7dd2dbae3
2015-11-20 15:28:10 -08:00
d34d f7f6d14148 CMSettings: Validate name and value for System settings
Verify that the name and value being inserted/updated are correct.

Change-Id: I0243556701b1d303ca52135178b055c2fd87671c
2015-11-19 18:23:28 -08:00
Danesh M c25b6157bc CMSDK : Keep track of legacy settings
Change-Id: I192d8033f2cd65cffc88f97089cb2ef2b02a566d
2015-11-16 15:53:56 -08:00
d34d b59538ccd0 CMSettings: Move Global settings to CMSettings
Change-Id: Ib054409d5ad790e011e12ecbc6786bf3562a1b80
2015-11-12 17:23:39 -08:00
Danesh M e3950819b3 CMSettings : Relocate settings to cm settings provider
Change-Id: I805d2e384ebbc8a603eb5387ed9d182b87a9b722
2015-11-12 14:38:39 -08:00
d34d 930eaf7c4d CMSettings: Move Secure settings to CMSettings
This moves all Settings.Secure.* settings that, were added to
CyanogenMod, to CMSettings.

Change-Id: Ieaac288bfcb6189b3bc393484d27e441d805aea2
2015-11-12 10:12:13 -08:00
Adnan Begovic 59febe112d cmsdk: Move T9_SEARCH_INPUT_LOCALE to CMSettings.
Change-Id: I446ecc4e2b5981a86218fa8867ab771d422dce21
2015-11-11 15:12:53 -08:00
Adnan Begovic 1f6c75a4cf cmsdk: Move NAVBAR_LEFT_IN_LANDSCAPE to CMSettings.
Change-Id: I415288feef8d32613f9a7f8bbe1b748eaa7d459d
2015-11-11 13:31:46 -08:00
Adnan Begovic 5659f5355d cmsdk: Move RECENTS_SHOW_SEARCH_BAR to CMSettings.
Change-Id: Ie34d57b547eb27f4f7629ed6d1fd9cced0ce7fff
2015-11-11 13:20:29 -08:00
Adnan Begovic 063c9854b2 cmsdk: Move STATUS_BAR_SHOW_WEATHER to CMSettings.
Change-Id: I792e8d04c1b70749db78f0bd5142d489aebd6d51
2015-11-11 12:38:26 -08:00
Adnan Begovic 6694ce0ca0 cmsdk: Move DOUBLE_TAP_SLEEP_GESTURE to CMSettings.
Change-Id: I88b255a5ddeff9520905c4a8b612c9fdbf3b4411
2015-11-11 12:26:40 -08:00
Adnan Begovic a09defa3c9 cmsdk: Move LiveDisplay settings and resources.
Change-Id: I6d0c3f8b645e2c8cca059ff343a774eab1933a9b
2015-11-10 18:10:54 -08:00
Adnan Begovic b006e980e7 cmsdk: Move WIFI_AUTO_CONNECT_TYPE to CMSettings.
Change-Id: I3a0447006d29cc8d2b1bbed6f841ce9ae55be94f
2015-11-10 14:15:12 -08:00
Adnan Begovic dac1c3eac1 cmsdk: Move lookup provider logic to CMSettings.
Change-Id: I239b1d5b56b940e591547ab1c50b6c1d34af586c
2015-11-10 13:31:03 -08:00
Adnan Begovic b2093b969f CMSettingsProvider: Map LegacyCMSettings to CMSettings constants.
Change-Id: I07537650cc536877ec4492af43e88ce8d60342fd
2015-11-10 12:05:03 -08:00
Adnan Begovic d977ffa305 CMSettingsProvider: Make sure to migrate proxmity settings.
Change-Id: I434a88220191a6491f6e0f001e72a26a45f8043f
2015-11-09 18:13:11 -08:00
Adnan Begovic 50fc22b8a1 cmsdk: Move battery light settings to CMSettings.
Change-Id: I11a80bdeab369f851017c516039adc6400572b09
2015-11-09 16:24:29 -08:00
Adnan Begovic 0a21c75cb5 cmsdk: Move numerous buttons settings into CMSettings.
Change-Id: I7a0832745b9d81ad8d20afad8f17865932c6aad1
2015-11-09 10:31:01 -08:00
Adnan Begovic f3583e75dc CMSettings: Add migrate step for NAV_BUTTONS.
Change-Id: Ia17ccba0e0b66ee35f3ac7f125f909dc010514d6
2015-11-06 11:30:45 -08:00
Adnan Begovic 6a79d5714c cmsdk: Fix cm settings provider tests.
Change-Id: Iedb9c3278f5fa872ffd28682fb3ef48ceb163dba
2015-11-05 17:06:22 -08:00
Adnan Begovic 8c65e15e74 cmsdk: Finish migrating "last app" logic to cmsdk.
Change-Id: I94dbd41639c734f53000b975685bf42d046a7e84
2015-11-05 17:06:22 -08:00
Adnan Begovic 27a874f307 CMSettingsProvider: Define legacy constants within package.
Change-Id: Iceb06730a19b7b1d5d7633f3f85be9bb2a4ab195
2015-10-09 14:56:14 -07:00
Yvonne Wong 5fdff90050 Remove AOSP settings from CMSettings/CMSettingsProvider
Change-Id: I85eee73bf215c72f42067c0e3d2f68946485a10f
2015-10-09 14:26:53 -07:00
Yvonne Wong 5c29aa4e50 CMSettings: Remove write check in query method and add values for heads up notification
Change-Id: I72ad8039757da5e66809134bdddd463c512de157
2015-10-07 11:23:44 -07:00
Yvonne Wong 05d0129478 Add way to migrate CM specific settings to CMSettingsProvider
issue-id: CYNGNOS-829

Change-Id: I08743ebf9ffd3846ae501ed41e396b1556dc41cf
2015-09-25 13:17:19 -07:00
Yvonne Wong e2daff9588 CMSettingsProvider: Remove attempts at closing sqlite db
Change-Id: I89c83d2c8fa0cfc19bacb96fa145ffa93bd4ce0d
2015-09-21 17:31:56 -07:00
Yvonne Wong 0eb2999091 Add CMSettingsProvider and CMDatabaseHelper
issue-id: CYNGNOS-828

Change-Id: I01c08c0e432d6a941950a565e5ab6664664e2a7f
2015-08-31 13:52:27 -07:00