private void fixProfiles() {
   SettingsStorage settings = SettingsStorage.getInstance();
   ContentValues values = new ContentValues(2);
   int maxFreq = settings.getMaxFrequencyDefault();
   values.put(DB.CpuProfile.NAME_FREQUENCY_MAX, maxFreq);
   int minFreq = settings.getMinFrequencyDefault();
   values.put(DB.CpuProfile.NAME_FREQUENCY_MIN, minFreq);
   Logger.i("Changing frequencies of default profile to min " + minFreq + " and max " + maxFreq);
   Cursor c = null;
   try {
     c =
         contentResolver.query(
             DB.CpuProfile.CONTENT_URI, DB.CpuProfile.PROJECTION_DEFAULT, null, null, null);
     while (c.moveToNext()) {
       contentResolver.update(
           DB.CpuProfile.CONTENT_URI,
           values,
           DB.SELECTION_BY_ID,
           new String[] {Long.toString(c.getLong(DB.INDEX_ID))});
     }
   } finally {
     if (c != null) {
       c.close();
       c = null;
     }
   }
 }