Remove AOSP settings from CMSettings/CMSettingsProvider
Change-Id: I85eee73bf215c72f42067c0e3d2f68946485a10f
This commit is contained in:
parent
4e53461e71
commit
5fdff90050
|
@ -209,16 +209,6 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{
|
|||
|
||||
loadBooleanSetting(db, CMTableNames.TABLE_SECURE, CMSettings.Secure.STATS_COLLECTION,
|
||||
R.bool.def_stats_collection);
|
||||
|
||||
// Global
|
||||
if (mUserHandle == UserHandle.USER_OWNER) {
|
||||
loadSettingsForTable(db, CMTableNames.TABLE_GLOBAL, CMSettings.Global.DEVICE_NAME,
|
||||
getDefaultDeviceName());
|
||||
|
||||
loadIntegerSetting(db, CMTableNames.TABLE_GLOBAL,
|
||||
CMSettings.Global.HEADS_UP_NOTIFICATIONS_ENABLED,
|
||||
R.integer.def_heads_up_enabled);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -277,11 +267,4 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{
|
|||
|
||||
db.insertWithOnConflict(tableName, null, contentValues, SQLiteDatabase.CONFLICT_IGNORE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Gets the default device name
|
||||
*/
|
||||
private String getDefaultDeviceName() {
|
||||
return mContext.getResources().getString(R.string.def_device_name, Build.MODEL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -219,19 +219,6 @@ public class CMSettingsProvider extends ContentProvider {
|
|||
rowsMigrated = migrateCMSettingsForTable(userId,
|
||||
CMDatabaseHelper.CMTableNames.TABLE_SECURE, secureToCmSettingsMap);
|
||||
if (LOCAL_LOGV) Log.d(TAG, "Migrated " + rowsMigrated + " to CM secure table");
|
||||
|
||||
// Migrate global settings
|
||||
if (userId == UserHandle.USER_OWNER) {
|
||||
HashMap<String, String> globalToCmSettingsMap = new HashMap<String, String>();
|
||||
globalToCmSettingsMap.put(Settings.Global.DEVICE_NAME,
|
||||
CMSettings.Global.DEVICE_NAME);
|
||||
globalToCmSettingsMap.put(Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED,
|
||||
CMSettings.Global.HEADS_UP_NOTIFICATIONS_ENABLED);
|
||||
|
||||
rowsMigrated = migrateCMSettingsForTable(userId,
|
||||
CMDatabaseHelper.CMTableNames.TABLE_GLOBAL, globalToCmSettingsMap);
|
||||
if (LOCAL_LOGV) Log.d(TAG, "Migrated " + rowsMigrated + " to CM global table");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1352,24 +1352,6 @@ public final class CMSettings {
|
|||
|
||||
// region Global Settings
|
||||
|
||||
/**
|
||||
* The name of the device
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String DEVICE_NAME = "device_name";
|
||||
|
||||
/**
|
||||
* Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String HEADS_UP_NOTIFICATIONS_ENABLED =
|
||||
"heads_up_notifications_enabled";
|
||||
|
||||
/** @hide */ public static final int HEADS_UP_OFF = 0;
|
||||
/** @hide */ public static final int HEADS_UP_ON = 1;
|
||||
|
||||
// endregion
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue