From dac1c3eac168916677bcf7c28b24fb12e7d3593d Mon Sep 17 00:00:00 2001 From: Adnan Begovic Date: Tue, 10 Nov 2015 13:31:03 -0800 Subject: [PATCH] cmsdk: Move lookup provider logic to CMSettings. Change-Id: I239b1d5b56b940e591547ab1c50b6c1d34af586c --- .../cmsettings/CMSettingsProvider.java | 77 +++++++++++++++++++ .../cyanogenmod/providers/CMSettings.java | 56 ++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMSettingsProvider.java b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMSettingsProvider.java index f8763b4..b478a6e 100644 --- a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMSettingsProvider.java +++ b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMSettingsProvider.java @@ -510,6 +510,67 @@ public class CMSettingsProvider extends ContentProvider { * @hide */ public static final String PROXIMITY_ON_WAKE = CMSettings.System.PROXIMITY_ON_WAKE; + + /** + * Enable looking up of phone numbers of nearby places + * + * @hide + */ + public static final String ENABLE_FORWARD_LOOKUP = CMSettings.System.ENABLE_FORWARD_LOOKUP; + + /** + * Enable looking up of phone numbers of people + * + * @hide + */ + public static final String ENABLE_PEOPLE_LOOKUP = CMSettings.System.ENABLE_PEOPLE_LOOKUP; + + /** + * Enable looking up of information of phone numbers not in the contacts + * + * @hide + */ + public static final String ENABLE_REVERSE_LOOKUP = CMSettings.System.ENABLE_REVERSE_LOOKUP; + + /** + * The forward lookup provider + * + * @hide + */ + public static final String FORWARD_LOOKUP_PROVIDER = + CMSettings.System.FORWARD_LOOKUP_PROVIDER; + + /** + * The people lookup provider + * + * @hide + */ + public static final String PEOPLE_LOOKUP_PROVIDER = + CMSettings.System.PEOPLE_LOOKUP_PROVIDER; + + /** + * The reverse lookup provider + * + * @hide + */ + public static final String REVERSE_LOOKUP_PROVIDER = + CMSettings.System.REVERSE_LOOKUP_PROVIDER; + + /** + * The OpenCNAM paid account ID + * + * @hide + */ + public static final String DIALER_OPENCNAM_ACCOUNT_SID = + CMSettings.System.DIALER_OPENCNAM_ACCOUNT_SID; + + /** + * The OpenCNAM authentication token + * + * @hide + */ + public static final String DIALER_OPENCNAM_AUTH_TOKEN = + CMSettings.System.DIALER_OPENCNAM_AUTH_TOKEN; } /** @@ -576,6 +637,22 @@ public class CMSettingsProvider extends ContentProvider { CMSettings.System.ENABLE_MWI_NOTIFICATION); systemToCmSettingsMap.put(LegacyCMSettings.PROXIMITY_ON_WAKE, CMSettings.System.PROXIMITY_ON_WAKE); + systemToCmSettingsMap.put(LegacyCMSettings.ENABLE_FORWARD_LOOKUP, + CMSettings.System.ENABLE_FORWARD_LOOKUP); + systemToCmSettingsMap.put(LegacyCMSettings.ENABLE_PEOPLE_LOOKUP, + CMSettings.System.ENABLE_PEOPLE_LOOKUP); + systemToCmSettingsMap.put(LegacyCMSettings.ENABLE_REVERSE_LOOKUP, + CMSettings.System.ENABLE_REVERSE_LOOKUP); + systemToCmSettingsMap.put(LegacyCMSettings.FORWARD_LOOKUP_PROVIDER, + CMSettings.System.FORWARD_LOOKUP_PROVIDER); + systemToCmSettingsMap.put(LegacyCMSettings.PEOPLE_LOOKUP_PROVIDER, + CMSettings.System.PEOPLE_LOOKUP_PROVIDER); + systemToCmSettingsMap.put(LegacyCMSettings.REVERSE_LOOKUP_PROVIDER, + CMSettings.System.REVERSE_LOOKUP_PROVIDER); + systemToCmSettingsMap.put(LegacyCMSettings.DIALER_OPENCNAM_ACCOUNT_SID, + CMSettings.System.DIALER_OPENCNAM_ACCOUNT_SID); + systemToCmSettingsMap.put(LegacyCMSettings.DIALER_OPENCNAM_AUTH_TOKEN, + CMSettings.System.DIALER_OPENCNAM_AUTH_TOKEN); int rowsMigrated = migrateCMSettingsForTable(userId, CMDatabaseHelper.CMTableNames.TABLE_SYSTEM, systemToCmSettingsMap); diff --git a/src/java/cyanogenmod/providers/CMSettings.java b/src/java/cyanogenmod/providers/CMSettings.java index 3216184..70ae894 100644 --- a/src/java/cyanogenmod/providers/CMSettings.java +++ b/src/java/cyanogenmod/providers/CMSettings.java @@ -913,6 +913,62 @@ public final class CMSettings { * @hide */ public static final String PROXIMITY_ON_WAKE = "proximity_on_wake"; + + /** + * Enable looking up of phone numbers of nearby places + * + * @hide + */ + public static final String ENABLE_FORWARD_LOOKUP = "enable_forward_lookup"; + + /** + * Enable looking up of phone numbers of people + * + * @hide + */ + public static final String ENABLE_PEOPLE_LOOKUP = "enable_people_lookup"; + + /** + * Enable looking up of information of phone numbers not in the contacts + * + * @hide + */ + public static final String ENABLE_REVERSE_LOOKUP = "enable_reverse_lookup"; + + /** + * The forward lookup provider + * + * @hide + */ + public static final String FORWARD_LOOKUP_PROVIDER = "forward_lookup_provider"; + + /** + * The people lookup provider + * + * @hide + */ + public static final String PEOPLE_LOOKUP_PROVIDER = "people_lookup_provider"; + + /** + * The reverse lookup provider + * + * @hide + */ + public static final String REVERSE_LOOKUP_PROVIDER = "reverse_lookup_provider"; + + /** + * The OpenCNAM paid account ID + * + * @hide + */ + public static final String DIALER_OPENCNAM_ACCOUNT_SID = "dialer_opencnam_account_sid"; + + /** + * The OpenCNAM authentication token + * + * @hide + */ + public static final String DIALER_OPENCNAM_AUTH_TOKEN = "dialer_opencnam_auth_token"; } /**