From 37de69ae6319ea9c3156c14dbcef9e25645b9059 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 6 Dec 2012 13:20:52 +0100 Subject: [PATCH] Added area settings, moved profile and wifi setting to area. --- AndroidManifest.xml | 3 + res/menu/area_list_context.xml | 4 +- res/values/strings.xml | 7 +- res/xml/area_edit.xml | 29 ++++ res/xml/{profile.xml => profile_edit.xml} | 5 - .../nutomic/pegasus/LocationService.java | 32 ++-- .../nutomic/pegasus/activities/AreaEdit.java | 160 ++++++++++++++++++ .../nutomic/pegasus/activities/AreaList.java | 56 +----- .../pegasus/activities/ProfileEdit.java | 15 +- .../pegasus/activities/ProfileList.java | 9 +- .../nutomic/pegasus/content/AreaColumns.java | 4 +- .../nutomic/pegasus/content/Database.java | 18 +- .../pegasus/content/ProfileColumns.java | 2 - 13 files changed, 242 insertions(+), 102 deletions(-) create mode 100644 res/xml/area_edit.xml rename res/xml/{profile.xml => profile_edit.xml} (92%) create mode 100644 src/com/github/nutomic/pegasus/activities/AreaEdit.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 75ecb16..befd04c 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -27,6 +27,9 @@ + + diff --git a/res/menu/area_list_context.xml b/res/menu/area_list_context.xml index 8b9a874..a067dce 100644 --- a/res/menu/area_list_context.xml +++ b/res/menu/area_list_context.xml @@ -16,8 +16,8 @@ - + diff --git a/res/values/strings.xml b/res/values/strings.xml index 0aea73b..79cae5a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -31,12 +31,16 @@ Welcome This app automatically activates different profiles when you enter certain areas.\n\nTo get started, choose or create an area you are currently at, long click on it and choose \'learn\'. Select the interval you were or will be in the area.\n\nThe app will then apply the associated profile whenever you enter the area (note that inaccuracies of multiple kilometers/miles may occur).\n\nYou can see the current area and profile in the notification. None - Choose Profile Learn Area Rename Area Delete Area Do you really want to delete this area? New Area + Edit Area + + + Profile + Wifi Enabled Next 6 hours @@ -72,7 +76,6 @@ Media Volume Alarm Volume Ringer Mode - Wifi Enabled Keep previous Normal diff --git a/res/xml/area_edit.xml b/res/xml/area_edit.xml new file mode 100644 index 0000000..0c198ab --- /dev/null +++ b/res/xml/area_edit.xml @@ -0,0 +1,29 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/xml/profile.xml b/res/xml/profile_edit.xml similarity index 92% rename from res/xml/profile.xml rename to res/xml/profile_edit.xml index 7c3c5a2..6fafddf 100644 --- a/res/xml/profile.xml +++ b/res/xml/profile_edit.xml @@ -43,9 +43,4 @@ android:entryValues="@array/profileedit_ringer_mode_values" android:persistent="false" /> - - \ No newline at end of file diff --git a/src/com/github/nutomic/pegasus/LocationService.java b/src/com/github/nutomic/pegasus/LocationService.java index 51b5453..cfdd708 100644 --- a/src/com/github/nutomic/pegasus/LocationService.java +++ b/src/com/github/nutomic/pegasus/LocationService.java @@ -25,6 +25,7 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.database.Cursor; +import android.database.DatabaseUtils; import android.media.AudioManager; import android.net.wifi.WifiManager; import android.os.Bundle; @@ -210,20 +211,26 @@ public class LocationService extends Service { // Get area name and ID of the associated profile. Cursor c = db.getReadableDatabase().query( - AreaColumns.TABLE_NAME + " as a, " + CellColumns.TABLE_NAME, - new String[] { AreaColumns.PROFILE_ID, AreaColumns.NAME }, - "a." + AreaColumns._ID + " = " + CellColumns.AREA_ID + " AND " + - CellColumns.CELL_ID + " = ? AND " + - CellColumns.CELL_TYPE + " = ?", - new String[] { Integer.toString(mCurrentCell), - Integer.toString(mNetworkType)}, + AreaColumns.TABLE_NAME + " as a, " + CellColumns.TABLE_NAME + " as c", + new String[] { "a." + AreaColumns.PROFILE_ID, "a." + AreaColumns.NAME, + "a." + AreaColumns.WIFI_ENABLED }, + "a." + AreaColumns._ID + " = c." + CellColumns.AREA_ID + " AND " + + "c." + CellColumns.CELL_ID + " = ? AND " + + "c." + CellColumns.CELL_TYPE + " = ?", + new String[] { Integer.toString(cell), + Integer.toString(mNetworkType) }, null, null, null); - + long profileId = Database.ROW_NONE; String areaName; + if (c.moveToFirst()) { profileId = c.getLong(c.getColumnIndex(AreaColumns.PROFILE_ID)); areaName = c.getString(c.getColumnIndex(AreaColumns.NAME)); + WifiManager wm = (WifiManager) LocationService.this + .getSystemService(Context.WIFI_SERVICE); + wm.setWifiEnabled((c.getInt(c.getColumnIndex(AreaColumns.WIFI_ENABLED)) == 1) + ? true : false); } else { areaName = getResources().getString( @@ -237,7 +244,6 @@ public class LocationService extends Service { ProfileColumns.NOTIFICATION_VOLUME, ProfileColumns.MEDIA_VOLUME, ProfileColumns.ALARM_VOLUME, - ProfileColumns.WIFI_ENABLED, ProfileColumns.RINGER_MODE }, "_id = ?", new String[] { Long.toString(profileId) }, @@ -246,11 +252,8 @@ public class LocationService extends Service { // Apply profile if there is one and set the name for the notification. String profileName; if (c.moveToFirst()) { - Context context = LocationService.this; - AudioManager am = (AudioManager) context + AudioManager am = (AudioManager) LocationService.this .getSystemService(Context.AUDIO_SERVICE); - WifiManager wm = (WifiManager) context - .getSystemService(Context.WIFI_SERVICE); // Value smaller zero means the volume should not change. if (c.getInt(c.getColumnIndex(ProfileColumns.RINGTONE_VOLUME)) >= 0) { @@ -281,9 +284,6 @@ public class LocationService extends Service { ProfileColumns.RINGER_MODE_KEEP) { am.setRingerMode(c.getInt(c.getColumnIndex(ProfileColumns.RINGER_MODE))); } - - wm.setWifiEnabled((c.getInt(c.getColumnIndex(ProfileColumns.WIFI_ENABLED)) == 0) - ? true : false); profileName = c.getString(c.getColumnIndex(ProfileColumns.NAME)); } diff --git a/src/com/github/nutomic/pegasus/activities/AreaEdit.java b/src/com/github/nutomic/pegasus/activities/AreaEdit.java new file mode 100644 index 0000000..714bf5b --- /dev/null +++ b/src/com/github/nutomic/pegasus/activities/AreaEdit.java @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2012 Felix Ableitner + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.github.nutomic.pegasus.activities; + +import android.app.AlertDialog; +import android.content.ContentValues; +import android.content.DialogInterface; +import android.database.Cursor; +import android.os.AsyncTask; +import android.os.Bundle; +import android.preference.CheckBoxPreference; +import android.preference.Preference; +import android.preference.Preference.OnPreferenceChangeListener; +import android.preference.Preference.OnPreferenceClickListener; +import android.preference.PreferenceActivity; +import android.util.Log; +import android.util.Pair; + +import com.github.nutomic.pegasus.LocationService; +import com.github.nutomic.pegasus.R; +import com.github.nutomic.pegasus.content.AreaColumns; +import com.github.nutomic.pegasus.content.Database; +import com.github.nutomic.pegasus.content.ProfileColumns; + +/** + * Allows editing an area, uses Database values (or defaults) to + * initialize, saves to Database. + * + * Using deprecated methods because v4 support library does not have + * PreferenceFragment implementation. + * + * @author Felix Ableitner + * + */ +public class AreaEdit extends PreferenceActivity implements + OnPreferenceChangeListener, OnPreferenceClickListener { + + /** Key for the Intent extra to store the area edited here. */ + public static final String AREA_ID = "area_id"; + + private long mArea; + private Preference mProfile; + private CheckBoxPreference mWifi; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + mArea = getIntent().getExtras().getLong(AREA_ID); + + addPreferencesFromResource(R.xml.area_edit); + + new AsyncTask() { + + @Override + protected Cursor doInBackground(Void... params) { + return Database.getInstance(AreaEdit.this).getReadableDatabase() + .query(AreaColumns.TABLE_NAME, + new String[] { AreaColumns.WIFI_ENABLED }, + AreaColumns._ID + " = ?", + new String[] { Long.toString(mArea) }, + null, null, null); + } + + @Override + protected void onPostExecute(Cursor c) { + c.moveToFirst(); + // TODO: nothing here works + mProfile = findPreference("profile"); + mProfile.setOnPreferenceClickListener(AreaEdit.this); + + mWifi = (CheckBoxPreference) findPreference("wifi_enabled"); + mWifi.setChecked((c.getInt(c.getColumnIndex(AreaColumns.WIFI_ENABLED)) == 1) + ? true : false); + mWifi.setOnPreferenceChangeListener(AreaEdit.this); + } + }.execute((Void) null); + } + + @Override + public boolean onPreferenceChange(Preference preference, Object newValue) { + ContentValues cv = new ContentValues(); + if (preference.equals(mWifi)) { + cv.put(AreaColumns.WIFI_ENABLED, (Boolean) newValue); + } + else if (preference.equals(mProfile)) { + // TODO: does not cause profile to be applied + cv.put(AreaColumns.PROFILE_ID, (Long) newValue); + } + + final ContentValues values = cv; + new Thread(new Runnable() { + + @Override + public void run() { + Database.getInstance(AreaEdit.this).getWritableDatabase() + .update(AreaColumns.TABLE_NAME, + values, + AreaColumns._ID + "= ?", + new String[] { Long.toString(mArea) }); + + LocationService.sendUpdateIntent(AreaEdit.this); + } + }).start(); + return true; + } + + /** + * Show a "pick sound profile" dialog for an area, the selected profile is + * then set to be launched when entering the area. + */ + @Override + public boolean onPreferenceClick(Preference preference) { + final Database db = Database.getInstance(this); + + // Get a pair of all area names and all area IDs. + Cursor c = db.getReadableDatabase().query( + ProfileColumns.TABLE_NAME, + new String[] { ProfileColumns._ID, + ProfileColumns.NAME }, + null, null, null, null, null); + String[] names = new String[c.getCount()]; + Long[] ids = new Long[c.getCount()]; + while (c.moveToNext()) { + ids[c.getPosition()] = c.getLong(c.getColumnIndex(ProfileColumns._ID)); + names[c.getPosition()] = c.getString(c.getColumnIndex(ProfileColumns.NAME)); + } + final Pair p = Pair.create(names, ids); + + new AlertDialog.Builder(this).setTitle(R.string.areaedit_profile) + .setItems(p.first, new DialogInterface.OnClickListener() { + + public void onClick(DialogInterface dialog, final int which) { + new AsyncTask() { + + @Override + protected Void doInBackground(Void... params) { + onPreferenceChange(mProfile, p.second[which]); + return null; + } + }.execute((Void) null); + } + }).show(); + return true; + } +} diff --git a/src/com/github/nutomic/pegasus/activities/AreaList.java b/src/com/github/nutomic/pegasus/activities/AreaList.java index 1358247..0d8cbb6 100644 --- a/src/com/github/nutomic/pegasus/activities/AreaList.java +++ b/src/com/github/nutomic/pegasus/activities/AreaList.java @@ -30,7 +30,6 @@ import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.widget.SimpleCursorAdapter; -import android.util.Pair; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -153,55 +152,9 @@ public class AreaList extends ListActivity { */ @Override protected void onListItemClick(ListView l, View v, int position, long id) { - chooseProfile(id); - } - - /** - * Show a "pick sound profile" dialog for an area, the selected profile is - * then set to be launched when entering the area. - * - * @param area - * The sqlite id of the area to choose a profile for. Set -1 if - * the area does not exist and should be created. - */ - private void chooseProfile(final long area) { - final Database db = Database.getInstance(this); - - // Get a pair of all area names and all area IDs. - Cursor c = db.getReadableDatabase().query( - ProfileColumns.TABLE_NAME, - new String[] { ProfileColumns._ID, - ProfileColumns.NAME }, - null, null, null, null, null); - String[] names = new String[c.getCount()]; - Long[] ids = new Long[c.getCount()]; - while (c.moveToNext()) { - ids[c.getPosition()] = c.getLong(c.getColumnIndex(ProfileColumns._ID)); - names[c.getPosition()] = c.getString(c.getColumnIndex(ProfileColumns.NAME)); - } - final Pair p = Pair.create(names, ids); - - new AlertDialog.Builder(this).setTitle(R.string.arealist_profile_choose) - .setItems(p.first, new DialogInterface.OnClickListener() { - - public void onClick(DialogInterface dialog, final int which) { - new UpdateTask() { - - @Override - protected Long doInBackground(Void... params) { - // Set the new profile in area. - ContentValues cv = new ContentValues(); - cv.put(AreaColumns.PROFILE_ID, p.second[which]); - - db.getWritableDatabase().update(AreaColumns.TABLE_NAME, - cv, - AreaColumns._ID + " = ?", - new String[] { Long.toString(area) }); - return null; - } - }.execute((Void) null); - } - }).show(); + Intent i = new Intent(this, AreaEdit.class); + i.putExtra(AreaEdit.AREA_ID, id); + startActivity(i); } /** @@ -240,9 +193,6 @@ public class AreaList extends ListActivity { .getMenuInfo(); final Database db = Database.getInstance(this); switch (item.getItemId()) { - case R.id.choose: - chooseProfile(info.id); - return true; case R.id.rename: renameArea(info.id, getAreaName((AdapterContextMenuInfo) item.getMenuInfo())); return true; diff --git a/src/com/github/nutomic/pegasus/activities/ProfileEdit.java b/src/com/github/nutomic/pegasus/activities/ProfileEdit.java index 93537ef..7281e20 100644 --- a/src/com/github/nutomic/pegasus/activities/ProfileEdit.java +++ b/src/com/github/nutomic/pegasus/activities/ProfileEdit.java @@ -22,7 +22,6 @@ import android.database.Cursor; import android.media.AudioManager; import android.os.AsyncTask; import android.os.Bundle; -import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; @@ -35,7 +34,7 @@ import com.github.nutomic.pegasus.content.Database; import com.github.nutomic.pegasus.content.ProfileColumns; /** - * Allows editing a sound profile, uses Database values (or defaults) to + * Allows editing a profile, uses Database values (or defaults) to * initialize, saves to Database. * * Using deprecated methods because v4 support library does not have @@ -56,7 +55,6 @@ public class ProfileEdit extends PreferenceActivity implements private VolumePreference mMediaVolume; private VolumePreference mAlarmVolume; private ListPreference mRingerMode; - private CheckBoxPreference mWifiEnabled; /** * Initialize sound profile id from intent (extra "profile_id" must @@ -68,7 +66,7 @@ public class ProfileEdit extends PreferenceActivity implements mProfile = getIntent().getExtras().getLong(PROFILE_ID); - addPreferencesFromResource(R.xml.profile); + addPreferencesFromResource(R.xml.profile_edit); new AsyncTask() { @@ -81,7 +79,6 @@ public class ProfileEdit extends PreferenceActivity implements ProfileColumns.NOTIFICATION_VOLUME, ProfileColumns.MEDIA_VOLUME, ProfileColumns.ALARM_VOLUME, - ProfileColumns.WIFI_ENABLED, ProfileColumns.RINGER_MODE }, "_id = ?", new String[] { Long.toString(mProfile) }, @@ -118,11 +115,6 @@ public class ProfileEdit extends PreferenceActivity implements mRingerMode = (ListPreference) findPreference("ringer_mode"); mRingerMode.setValue(Integer.toString(c.getInt(c.getColumnIndex(ProfileColumns.RINGER_MODE)))); mRingerMode.setOnPreferenceChangeListener(ProfileEdit.this); - - mWifiEnabled = (CheckBoxPreference) findPreference("wifi_enabled"); - mWifiEnabled.setChecked((c.getInt(c.getColumnIndex(ProfileColumns.WIFI_ENABLED)) == 0) - ? true : false); - mWifiEnabled.setOnPreferenceChangeListener(ProfileEdit.this); }; @@ -149,9 +141,6 @@ public class ProfileEdit extends PreferenceActivity implements else if (preference.equals(mRingerMode)) { cv.put(ProfileColumns.RINGER_MODE, Integer.parseInt((String) newValue)); } - else if (preference.equals(mWifiEnabled)) { - cv.put(ProfileColumns.RINGTONE_VOLUME, (Boolean) newValue); - } final ContentValues values = cv; new Thread(new Runnable() { diff --git a/src/com/github/nutomic/pegasus/activities/ProfileList.java b/src/com/github/nutomic/pegasus/activities/ProfileList.java index e559441..a0f27ce 100644 --- a/src/com/github/nutomic/pegasus/activities/ProfileList.java +++ b/src/com/github/nutomic/pegasus/activities/ProfileList.java @@ -256,11 +256,10 @@ public class ProfileList extends ListActivity { ContentValues cv = new ContentValues(); cv.put(ProfileColumns.NAME, getResources() .getString(R.string.profilelist_new)); - cv.put(ProfileColumns.RINGTONE_VOLUME, 5); - cv.put(ProfileColumns.NOTIFICATION_VOLUME, 5); - cv.put(ProfileColumns.MEDIA_VOLUME, 5); - cv.put(ProfileColumns.ALARM_VOLUME, 5); - cv.put(ProfileColumns.WIFI_ENABLED, true); + cv.put(ProfileColumns.RINGTONE_VOLUME, 5 - ProfileColumns.VOLUME_APPLY_FALSE); + cv.put(ProfileColumns.NOTIFICATION_VOLUME, 5 - ProfileColumns.VOLUME_APPLY_FALSE); + cv.put(ProfileColumns.MEDIA_VOLUME, 10 - ProfileColumns.VOLUME_APPLY_FALSE); + cv.put(ProfileColumns.ALARM_VOLUME, 5 - ProfileColumns.VOLUME_APPLY_FALSE); cv.put(ProfileColumns.RINGER_MODE, AudioManager.RINGER_MODE_NORMAL); return Database.getInstance(ProfileList.this).getWritableDatabase() diff --git a/src/com/github/nutomic/pegasus/content/AreaColumns.java b/src/com/github/nutomic/pegasus/content/AreaColumns.java index 9362827..34e35af 100644 --- a/src/com/github/nutomic/pegasus/content/AreaColumns.java +++ b/src/com/github/nutomic/pegasus/content/AreaColumns.java @@ -33,11 +33,13 @@ public class AreaColumns implements BaseColumns { // Columns public static final String NAME = "name"; public static final String PROFILE_ID = "profile_id"; + public static final String WIFI_ENABLED = "wifi_enabled"; public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + _ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + NAME + " TEXT," + - PROFILE_ID + " INTEGER" + + PROFILE_ID + " INTEGER, " + + WIFI_ENABLED + " INTEGER " + ");"; } diff --git a/src/com/github/nutomic/pegasus/content/Database.java b/src/com/github/nutomic/pegasus/content/Database.java index 0007d74..61d739e 100644 --- a/src/com/github/nutomic/pegasus/content/Database.java +++ b/src/com/github/nutomic/pegasus/content/Database.java @@ -38,7 +38,7 @@ public class Database extends SQLiteOpenHelper { private static final String TAG = "Database"; private static final String DATABASE_NAME = "pegasus.db"; - private static final int DATABASE_VERSION = 1; + private static final int DATABASE_VERSION = 2; private static Database mInstance = null; @@ -83,7 +83,6 @@ public class Database extends SQLiteOpenHelper { cv.put(ProfileColumns.NOTIFICATION_VOLUME, 5 - ProfileColumns.VOLUME_APPLY_FALSE); cv.put(ProfileColumns.MEDIA_VOLUME, 9 - ProfileColumns.VOLUME_APPLY_FALSE); cv.put(ProfileColumns.ALARM_VOLUME, 5 - ProfileColumns.VOLUME_APPLY_FALSE); - cv.put(ProfileColumns.WIFI_ENABLED, true); cv.put(ProfileColumns.RINGER_MODE, ProfileColumns.RINGER_MODE_KEEP); long normal = db.insert(ProfileColumns.TABLE_NAME, null, cv); @@ -96,7 +95,6 @@ public class Database extends SQLiteOpenHelper { cv.put(ProfileColumns.NOTIFICATION_VOLUME, 0); cv.put(ProfileColumns.MEDIA_VOLUME, 0 - ProfileColumns.VOLUME_APPLY_FALSE); cv.put(ProfileColumns.ALARM_VOLUME, 0 - ProfileColumns.VOLUME_APPLY_FALSE); - cv.put(ProfileColumns.WIFI_ENABLED, true); cv.put(ProfileColumns.RINGER_MODE, AudioManager.RINGER_MODE_VIBRATE); long silent = db.insert(ProfileColumns.TABLE_NAME, null, cv); @@ -105,6 +103,7 @@ public class Database extends SQLiteOpenHelper { cv.put(AreaColumns.NAME, mContext.getResources() .getString(R.string.sql_area_unknown)); cv.put(AreaColumns.PROFILE_ID, normal); + cv.put(AreaColumns.WIFI_ENABLED, false); db.insert(AreaColumns.TABLE_NAME, null, cv); // Insert "Home" area. @@ -112,6 +111,7 @@ public class Database extends SQLiteOpenHelper { cv.put(AreaColumns.NAME, mContext.getResources() .getString(R.string.sql_area_home)); cv.put(AreaColumns.PROFILE_ID, normal); + cv.put(AreaColumns.WIFI_ENABLED, true); db.insert(AreaColumns.TABLE_NAME, null, cv); // Insert "Work" area. @@ -119,11 +119,23 @@ public class Database extends SQLiteOpenHelper { cv.put(AreaColumns.NAME, mContext.getResources() .getString(R.string.sql_area_work)); cv.put(AreaColumns.PROFILE_ID, silent); + cv.put(AreaColumns.WIFI_ENABLED, true); db.insert(AreaColumns.TABLE_NAME, null, cv); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { + // Move wifi preference from profile to area. + if (oldVersion == 1) { + db.rawQuery("ALTER TABLE " + ProfileColumns.TABLE_NAME + + " DROP wifi_enabled", null); + + db.rawQuery("ALTER TABLE " + AreaColumns.TABLE_NAME + + " ADD " + AreaColumns.WIFI_ENABLED + " INTEGER", null); + ContentValues cv = new ContentValues(); + cv.put(AreaColumns.WIFI_ENABLED, true); + db.update(AreaColumns.TABLE_NAME, cv, null, null); + } } } diff --git a/src/com/github/nutomic/pegasus/content/ProfileColumns.java b/src/com/github/nutomic/pegasus/content/ProfileColumns.java index d737963..eb9c630 100644 --- a/src/com/github/nutomic/pegasus/content/ProfileColumns.java +++ b/src/com/github/nutomic/pegasus/content/ProfileColumns.java @@ -34,7 +34,6 @@ public class ProfileColumns implements BaseColumns { public static final String NOTIFICATION_VOLUME = "notification_volume"; public static final String MEDIA_VOLUME = "media_volume"; public static final String ALARM_VOLUME = "alarm_volume"; - public static final String WIFI_ENABLED = "wifi_enabled"; public static final String RINGER_MODE = "ringer_mode"; @@ -45,7 +44,6 @@ public class ProfileColumns implements BaseColumns { NOTIFICATION_VOLUME + " INTEGER," + MEDIA_VOLUME + " INTEGER," + ALARM_VOLUME + " INTEGER," + - WIFI_ENABLED + " INTEGER," + RINGER_MODE + " INTEGER" + ");";