Commit Graph

57 Commits

Author SHA1 Message Date
Arne Coucheron
55c755aa72 CMSettings: Add default overlay for forward and reverse lookup
Change-Id: I3510a3e136ef86a8d45847a0bf7a35fb426212f9
2016-07-29 11:17:46 -07:00
d34d
e1c502d3cf LLS: Allow default enabled events to be overlaid
Change-Id: I4607c0cace28c0987c2ed13d04db7c1eb67a1d0b
TICKET: CYNGNOS-3103
2016-06-26 08:34:04 -07:00
Roman Birg
5b6638051e CMSettingsProvider: load provisioned flag when creating DB
If the database needs to be created, it will not be upgraded. So, if the
device was provisioned and the table wasn't created, we don't upgrade
and so we cannot bring the old flag to the new location.

Fix this by setting the new cm provisioned flag on database creation.

Ticket: CYNGNOS-3017

Change-Id: I1e961f1cb2d06c55c1e92ef63c6dbaee17dbc304
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-06-09 11:58:55 -07:00
Danesh M
68665286e8 CMSettings : Move force_show_navbar to global
Keep feature inline with 12.1, only allow owner to
control the feature and mirror across users.

Also add additional checks for moved settings.

Change-Id: Ida11b71bc5ce9463628f8c5d76e59902d47d59bb
2016-05-13 13:35:13 -07: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
Michael Bestas
4a0ad7cfbb CMSettings: Fix upgrade from cm-12.1 after weather changes
* Only the owner can write to the global db

Change-Id: Iec7736c28ff0bc7a35dae8bbc85ca2b1c137da49
2016-05-08 01:15:29 +03:00
Luis Vidal
186ae8353d Set a default temperature unit
Bump the DB version and set a default temperature unit in
global settings

Change-Id: I14f80e1b3fa3ae4a47769c02b5ebd6a905a53e46
TICKET: CYNGNOS-2751
2016-05-06 17:49:03 -07:00
Roman Birg
bf5261c360 CMSettings: add CM_SETUP_WIZARD_COMPLETED key
We need to store the state of _our_ setup wizard.

To not break existing devices' provisioning, copy the current state of the global
provisioned flag to the new key value.

Ticket: CYNGNOS-2431

Change-Id: I3d88361edc126788f42b28efd11f3c7598117138
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-04-22 08:29:38 -07:00
Adnan Begovic
2f2d432495 Revert "Allow to ignore presentation indicator of outgoing calls [1/3]"
This adds public cmsdk symbols to the bootclasspath. :(

  2)   testBootClassPathIsClean(org.cyanogenmod.tests.versioning.unit.ClassPathTest)
java.lang.AssertionError: Jar file /system/framework/telephony-common.jar should not have cyanogenmod.alarmclock.ClockContract$AlarmsColumns !

This reverts commit 3a590c3057.

Change-Id: I03cc2796e84e602933e7132f9181a5822c7f327c
2016-03-10 11:46:03 -08:00
Gabriele M
3a590c3057 Allow to ignore presentation indicator of outgoing calls [1/3]
With some mobile network operators, the presentation indicator of
outgoing calls is always set to either "unknown" or "restricted".
As consequence, the dialed number doesn't show up in clear in the
call history. Allow to ignore the presentation indicator of outgoing
calls to never hide the dialed numbers.

Change-Id: Ia7b9fef3a929e512d8ecb704204b36e3836a056b
2016-03-07 17:06:40 -08: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
Adnan Begovic
c8e4f0066f CMSettingsProvider: Define battery style default.
Change-Id: Ic0cea75783ee5a0a7be3d0a24e57588ca177169a
TICKET: CYNGNOS-2041
2016-02-17 14:11:08 -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
5af31cd0b0 CMSettingsProvider: Get rid of redundant qs tile defaults.
If you've git blamed this commit because your build broke,
  move your default tiles overlay to

     `vendor/cmsdk/cm/res/res/values/config.xml`

  with the entry value of config_defaultQuickSettingsTiles

  TICKET: CYNGNOS-1908
Change-Id: Id721136ce669d420fde46322a339b9517b1a3677
2016-02-08 11:46:10 -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
Adnan Begovic
0d9d1ab12e CMSettings: Introduce concept of protected apps managers.
TICKET: CYNGNOS-84
Change-Id: I06245b0a69eea3474c1c093c5843bd59b5c53a80
2016-01-22 15:14:26 -08:00
Ricardo Cerqueira
20d9638593 Add overlay for SWAP_VOLUME_KEYS_ON_ROTATION
This got lost along the transition

Change-Id: I35f5c6cdd73ff1d4a590fa6980d3214dda2bd740
2016-01-22 18:11:49 +00:00
Edward Wang
b9f80b66fd cmsdk: Load notification led customization defaults
Issue-Id: YAM-34

Change-Id: I67395465eb830ae994d8d796a4dbdae08ade5b01
2016-01-13 16:12:45 -08:00
Adnan Begovic
9734639366 cmsdk: Fix quick pulldown settings, and unhide numerous system settings.
Change-Id: Ibfc41a74ca5e5902ea704919ce076d8442258406
2016-01-02 12:12:37 -08:00
Danesh M
6ff47d4e1b CMSettings : Add default overlay for people lookup
Change-Id: I64db011fbe66045b52536f2c4b9d92e42603bd30
2015-12-22 11:19:24 -08:00
Roman Birg
cb4a990216 Profiles: add isEnabled(); send state changes
Ref: CYNGNOS-1461
Change-Id: Idee9417a2f0b181c8d15cd763859c0a0e581dce6
Signed-off-by: Roman Birg <roman@cyngn.com>
2015-12-21 10:30:15 -08:00
Roman Birg
a61af19bdc cmsdk: add LOCKSCREEN_VISUALIZER_ENABLED
Change-Id: Ia8b11083a54195acfebab76c646987962b798c16
Signed-off-by: Roman Birg <roman@cyngn.com>
2015-12-16 15:40:32 -08:00
Adnan Begovic
be9f6b8f47 CMSettingsProvider: Split default load, don't load global for non-owner.
Any "CALL" into the CMSettingsProvider on a new user triggers the load
  default settings mechanism which may lead to attempting to load "global"
  settings for non owner which is impossible.

Change-Id: Ic8535e3c211aeaccfd3d72c3f9b11eef4d9087b8
2015-12-14 14:21:08 -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
Alexander Martinz
0fa8756f31 Fix build breakage caused by "add default value for QS_USE_MAIN_TILES"
* commit 204ffe00a3

Change-Id: I84d58a31e7f91e448865a05cf947f1e7d3442653
Signed-off-by: Alexander Martinz <eviscerationls@gmail.com>
2015-12-07 23:56:06 +01:00
Roman Birg
204ffe00a3 add default value for QS_USE_MAIN_TILES
Change-Id: I22f1430841b7eec3a01431bfd12ed1591361f46d
Signed-off-by: Roman Birg <roman@cyngn.com>
2015-12-07 13:26:10 -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
AdrianDC
a63e78ba92 cmsdk: Move Notification LEDs settings to CMSettings
* Lights with Screen On
 * LEDs Brightness
 * Multiple LEDs

Change-Id: I8c3f3cae53c834d1d2798d9dece00e3253ccb1db
Signed-off-by: AdrianDC <radian.dc@gmail.com>
2015-11-13 14:13:09 +01: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