summaryrefslogtreecommitdiffstats
path: root/DeviceSettings/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'DeviceSettings/src/com')
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java162
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java72
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java66
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/Hspa.java67
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/PanelGamma.java60
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java66
-rwxr-xr-xDeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java112
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java84
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/Startup.java39
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/TouchkeyTimeout.java59
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/TouchscreenSensitivity.java59
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java143
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/VibratorIntensity.java59
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeMode.java59
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeNegative.java59
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeOutdoor.java58
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeScenario.java59
17 files changed, 0 insertions, 1283 deletions
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java b/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
deleted file mode 100644
index 7f7970c..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.app.ActionBar;
-import android.app.ActionBar.Tab;
-import android.app.Activity;
-import android.app.Fragment;
-import android.app.FragmentTransaction;
-import android.content.Context;
-import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-import android.support.v13.app.FragmentPagerAdapter;
-import android.support.v4.view.ViewPager;
-
-import com.cyanogenmod.settings.device.R;
-
-import java.util.ArrayList;
-
-public class DeviceSettings extends FragmentActivity {
-
- public static final String SHARED_PREFERENCES_BASENAME = "com.cyanogenmod.settings.device";
- public static final String ACTION_UPDATE_PREFERENCES = "com.cyanogenmod.settings.device.UPDATE";
- public static final String KEY_MDNIE_SCENARIO = "mdnie_scenario";
- public static final String KEY_MDNIE_MODE = "mdnie_mode";
- public static final String KEY_MDNIE_NEGATIVE = "mdnie_negative";
- public static final String KEY_MDNIE_OUTDOOR = "mdnie_outdoor";
- public static final String KEY_PANEL_GAMMA = "panel_gamma";
- public static final String KEY_HSPA = "hspa";
- public static final String KEY_USE_ACCELEROMETER_CALIBRATION = "use_accelerometer_calibration";
- public static final String KEY_CALIBRATE_ACCELEROMETER = "calibrate_accelerometer";
- public static final String KEY_TOUCHSCREEN_SENSITIVITY = "touchscreen_sensitivity";
- public static final String KEY_TOUCHKEY_LIGHT = "touchkey_light";
- public static final String KEY_TOUCHKEY_TIMEOUT = "touchkey_timeout";
- public static final String KEY_VIBRATOR_INTENSITY = "vibrator_intensity";
- public static final String KEY_USE_DOCK_AUDIO = "dock_audio";
-
- ViewPager mViewPager;
- TabsAdapter mTabsAdapter;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- mViewPager = new ViewPager(this);
- mViewPager.setId(R.id.viewPager);
- setContentView(mViewPager);
-
- final ActionBar bar = getActionBar();
- bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
- bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
- bar.setTitle(R.string.app_name);
-
- mTabsAdapter = new TabsAdapter(this, mViewPager);
- mTabsAdapter.addTab(bar.newTab().setText(R.string.category_radio_title),
- RadioFragmentActivity.class, null);
- mTabsAdapter.addTab(bar.newTab().setText(R.string.category_screen_title),
- ScreenFragmentActivity.class, null);
- mTabsAdapter.addTab(bar.newTab().setText(R.string.category_sensors_title),
- SensorsFragmentActivity.class, null);
- mTabsAdapter.addTab(bar.newTab().setText(R.string.category_haptic_title),
- HapticFragmentActivity.class, null);
- mTabsAdapter.addTab(bar.newTab().setText(R.string.category_dock_title),
- DockFragmentActivity.class, null);
-
- if (savedInstanceState != null) {
- bar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0));
- }
- }
-
- @Override
- protected void onSaveInstanceState(Bundle outState) {
- super.onSaveInstanceState(outState);
- outState.putInt("tab", getActionBar().getSelectedNavigationIndex());
- }
-
- public static class TabsAdapter extends FragmentPagerAdapter
- implements ActionBar.TabListener, ViewPager.OnPageChangeListener {
- private final Context mContext;
- private final ActionBar mActionBar;
- private final ViewPager mViewPager;
- private final ArrayList<TabInfo> mTabs = new ArrayList<TabInfo>();
-
- static final class TabInfo {
- private final Class<?> clss;
- private final Bundle args;
-
- TabInfo(Class<?> _class, Bundle _args) {
- clss = _class;
- args = _args;
- }
- }
-
- public TabsAdapter(Activity activity, ViewPager pager) {
- super(activity.getFragmentManager());
- mContext = activity;
- mActionBar = activity.getActionBar();
- mViewPager = pager;
- mViewPager.setAdapter(this);
- mViewPager.setOnPageChangeListener(this);
- }
-
- public void addTab(ActionBar.Tab tab, Class<?> clss, Bundle args) {
- TabInfo info = new TabInfo(clss, args);
- tab.setTag(info);
- tab.setTabListener(this);
- mTabs.add(info);
- mActionBar.addTab(tab);
- notifyDataSetChanged();
- }
-
- @Override
- public int getCount() {
- return mTabs.size();
- }
-
- @Override
- public Fragment getItem(int position) {
- TabInfo info = mTabs.get(position);
- return Fragment.instantiate(mContext, info.clss.getName(), info.args);
- }
-
- public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
- }
-
- public void onPageSelected(int position) {
- mActionBar.setSelectedNavigationItem(position);
- }
-
- public void onPageScrollStateChanged(int state) {
- }
-
- public void onTabSelected(Tab tab, FragmentTransaction ft) {
- Object tag = tab.getTag();
- for (int i=0; i<mTabs.size(); i++) {
- if (mTabs.get(i) == tag) {
- mViewPager.setCurrentItem(i);
- }
- }
- }
-
- public void onTabUnselected(Tab tab, FragmentTransaction ft) {
- }
-
- public void onTabReselected(Tab tab, FragmentTransaction ft) {
- }
- }
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java
deleted file mode 100644
index 4504dd7..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.app.ActivityManagerNative;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.os.UserHandle;
-import android.preference.CheckBoxPreference;
-import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceFragment;
-import android.preference.PreferenceManager;
-import android.preference.PreferenceScreen;
-import android.util.Log;
-
-import com.cyanogenmod.settings.device.R;
-
-public class DockFragmentActivity extends PreferenceFragment {
-
- private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyS2Settings_Dock";
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- addPreferencesFromResource(R.xml.dock_preferences);
- PreferenceScreen prefSet = getPreferenceScreen();
- }
-
- @Override
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
-
- String boxValue;
- String key = preference.getKey();
-
- Log.w(TAG, "key: " + key);
-
- if (key.compareTo(DeviceSettings.KEY_USE_DOCK_AUDIO) == 0) {
- boxValue = (((CheckBoxPreference)preference).isChecked() ? "1" : "0");
- Intent i = new Intent("com.cyanogenmod.settings.SamsungDock");
- i.putExtra("data", boxValue);
- ActivityManagerNative.broadcastStickyIntent(i, null, UserHandle.USER_ALL);
- }
- return true;
- }
-
- public static void restore(Context context) {
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- boolean dockAudio = sharedPrefs.getBoolean(DeviceSettings.KEY_USE_DOCK_AUDIO, false);
- Intent i = new Intent("com.cyanogenmod.settings.SamsungDock");
- i.putExtra("data", (dockAudio? "1" : "0"));
- ActivityManagerNative.broadcastStickyIntent(i, null, UserHandle.USER_ALL);
- }
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java
deleted file mode 100644
index 2ea7147..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.ListPreference;
-import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceFragment;
-import android.preference.PreferenceManager;
-import android.preference.PreferenceScreen;
-import android.util.Log;
-
-import com.cyanogenmod.settings.device.R;
-
-public class HapticFragmentActivity extends PreferenceFragment {
-
- private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyS2Settings_Haptic";
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- addPreferencesFromResource(R.xml.haptic_preferences);
-
- PreferenceScreen prefSet = getPreferenceScreen();
-
- }
-
- @Override
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
-
- String boxValue;
- String key = preference.getKey();
-
- Log.w(TAG, "key: " + key);
-
- return true;
- }
-
- public static boolean isSupported(String FILE) {
- return Utils.fileExists(FILE);
- }
-
- public static void restore(Context context) {
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- }
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/Hspa.java b/DeviceSettings/src/com/cyanogenmod/settings/device/Hspa.java
deleted file mode 100644
index f19eff7..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/Hspa.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.util.AttributeSet;
-import android.preference.ListPreference;
-import android.preference.Preference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceManager;
-
-public class Hspa extends ListPreference implements OnPreferenceChangeListener {
-
- private static final String FILE = "/system/app/SamsungServiceMode.apk";
- private Context mCtx;
-
- public Hspa(Context context, AttributeSet attrs) {
- super(context, attrs);
- this.setOnPreferenceChangeListener(this);
- mCtx = context;
- }
-
- public static boolean isSupported() {
- return Utils.fileExists(FILE);
- }
-
- /**
- * Restore hspa setting from SharedPreferences. (Write to kernel.)
- * @param context The context to read the SharedPreferences from
- */
- public static void restore(Context context) {
- if (!isSupported()) {
- return;
- }
-
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- sendIntent(context, sharedPrefs.getString(DeviceSettings.KEY_HSPA, "23"));
- }
-
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- sendIntent(mCtx, (String) newValue);
- return true;
- }
-
- private static void sendIntent(Context context, String value) {
- Intent i = new Intent("com.cyanogenmod.SamsungServiceMode.EXECUTE");
- i.putExtra("sub_type", 20); // HSPA Setting
- i.putExtra("data", value);
- context.sendBroadcast(i);
- }
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/PanelGamma.java b/DeviceSettings/src/com/cyanogenmod/settings/device/PanelGamma.java
deleted file mode 100644
index 81544a6..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/PanelGamma.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.Context;
-import android.util.Log;
-import android.content.SharedPreferences;
-import android.util.AttributeSet;
-import android.preference.Preference;
-import android.preference.ListPreference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceManager;
-
-public class PanelGamma extends ListPreference implements OnPreferenceChangeListener {
-
- public PanelGamma(Context context, AttributeSet attrs) {
- super(context, attrs);
- this.setOnPreferenceChangeListener(this);
- }
-
- private static final String FILE = "/sys/class/lcd/panel/gamma_mode";
-
- public static boolean isSupported() {
- return Utils.fileExists(FILE);
- }
-
- /**
- * Restore panel gamma setting from SharedPreferences. (Write to kernel.)
- * @param context The context to read the SharedPreferences from
- */
- public static void restore(Context context) {
- if (!isSupported()) {
- return;
- }
-
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_PANEL_GAMMA, "0"));
- }
-
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- Log.d("SGS2","Writing " + ((String)newValue) + " to " + FILE);
- Utils.writeValue(FILE, (String) newValue);
- return true;
- }
-
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java
deleted file mode 100644
index 794732d..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.ListPreference;
-import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceFragment;
-import android.preference.PreferenceManager;
-import android.preference.PreferenceScreen;
-import android.util.Log;
-
-import com.cyanogenmod.settings.device.R;
-
-public class RadioFragmentActivity extends PreferenceFragment {
-
- private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyS2Settings_Radio";
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- addPreferencesFromResource(R.xml.radio_preferences);
-
- PreferenceScreen prefSet = getPreferenceScreen();
-
- }
-
- @Override
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
-
- String boxValue;
- String key = preference.getKey();
-
- Log.w(TAG, "key: " + key);
-
- return true;
- }
-
- public static boolean isSupported(String FILE) {
- return Utils.fileExists(FILE);
- }
-
- public static void restore(Context context) {
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- }
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java
deleted file mode 100755
index fe9f601..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.ListPreference;
-import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceFragment;
-import android.preference.PreferenceManager;
-import android.preference.PreferenceScreen;
-import android.util.Log;
-import com.cyanogenmod.settings.device.R;
-
-public class ScreenFragmentActivity extends PreferenceFragment {
-
- private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyS2Settings_Screen";
-
- private static final String FILE_TOUCHKEY_DISABLE = "/sys/class/sec/sec_touchkey/force_disable";
- private static final String FILE_TOUCHKEY_BRIGHTNESS = "/sys/class/sec/sec_touchkey/brightness";
-
- private mDNIeScenario mmDNIeScenario;
- private mDNIeMode mmDNIeMode;
- private mDNIeNegative mmDNIeNegative;
- private mDNIeOutdoor mmDNIeOutdoor;
- private PanelGamma mPanelGamma;
- private TouchscreenSensitivity mTouchscreenSensitivity;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- addPreferencesFromResource(R.xml.screen_preferences);
- PreferenceScreen prefSet = getPreferenceScreen();
-
- mmDNIeScenario = (mDNIeScenario) findPreference(DeviceSettings.KEY_MDNIE_SCENARIO);
- mmDNIeScenario.setEnabled(mDNIeScenario.isSupported());
-
- mmDNIeMode = (mDNIeMode) findPreference(DeviceSettings.KEY_MDNIE_MODE);
- mmDNIeMode.setEnabled(mDNIeMode.isSupported());
-
- mmDNIeNegative = (mDNIeNegative) findPreference(DeviceSettings.KEY_MDNIE_NEGATIVE);
- mmDNIeNegative.setEnabled(mDNIeNegative.isSupported());
-
- mmDNIeOutdoor = (mDNIeOutdoor) findPreference(DeviceSettings.KEY_MDNIE_OUTDOOR);
- mmDNIeOutdoor.setEnabled(mDNIeOutdoor.isSupported());
-
- mPanelGamma = (PanelGamma) findPreference(DeviceSettings.KEY_PANEL_GAMMA);
- mPanelGamma.setEnabled(mPanelGamma.isSupported());
-
- mTouchscreenSensitivity = (TouchscreenSensitivity) findPreference(DeviceSettings.KEY_TOUCHSCREEN_SENSITIVITY);
- mTouchscreenSensitivity.setEnabled(mTouchscreenSensitivity.isSupported());
-
- if (((CheckBoxPreference)prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_LIGHT)).isChecked()) {
- prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(true);
- } else {
- prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(false);
- }
- }
-
- @Override
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
-
- String key = preference.getKey();
-
- Log.w(TAG, "key: " + key);
-
- if (key.compareTo(DeviceSettings.KEY_TOUCHKEY_LIGHT) == 0) {
- if (((CheckBoxPreference)preference).isChecked()) {
- Utils.writeValue(FILE_TOUCHKEY_DISABLE, "0");
- Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, "1");
- preferenceScreen.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(true);
- } else {
- Utils.writeValue(FILE_TOUCHKEY_DISABLE, "1");
- Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, "2");
- preferenceScreen.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(false);
- }
- }
-
- return true;
- }
-
- public static boolean isSupported(String FILE) {
- return Utils.fileExists(FILE);
- }
-
- public static void restore(Context context) {
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- boolean light = sharedPrefs.getBoolean(DeviceSettings.KEY_TOUCHKEY_LIGHT, true);
-
- Utils.writeValue(FILE_TOUCHKEY_DISABLE, light ? "0" : "1");
- Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, light ? "1" : "2");
- }
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
deleted file mode 100644
index df9cce5..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.ListPreference;
-import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceFragment;
-import android.preference.PreferenceManager;
-import android.preference.PreferenceScreen;
-import android.util.Log;
-
-import com.cyanogenmod.settings.device.R;
-
-public class SensorsFragmentActivity extends PreferenceFragment {
-
- private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyS2Settings_Sensors";
-
- private static final String FILE_USE_ACCELEROMETER_CALIB = "/sys/class/sec/gsensorcal/calibration";
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- addPreferencesFromResource(R.xml.sensors_preferences);
- PreferenceScreen prefSet = getPreferenceScreen();
- }
-
- @Override
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
-
- String boxValue;
- String key = preference.getKey();
-
- Log.w(TAG, "key: " + key);
-
- if (key.compareTo(DeviceSettings.KEY_USE_ACCELEROMETER_CALIBRATION) == 0) {
- boxValue = (((CheckBoxPreference)preference).isChecked() ? "1" : "0");
- Utils.writeValue(FILE_USE_ACCELEROMETER_CALIB, boxValue);
- } else if (key.compareTo(DeviceSettings.KEY_CALIBRATE_ACCELEROMETER) == 0) {
- // when calibration data utilization is disablen and enabled back,
- // calibration is done at the same time by driver
- Utils.writeValue(FILE_USE_ACCELEROMETER_CALIB, "0");
- Utils.writeValue(FILE_USE_ACCELEROMETER_CALIB, "1");
- Utils.showDialog((Context)getActivity(), getString(R.string.accelerometer_dialog_head), getString(R.string.accelerometer_dialog_message));
- }
-
- return true;
- }
-
- public static boolean isSupported(String FILE) {
- return Utils.fileExists(FILE);
- }
-
- public static void restore(Context context) {
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- boolean accelerometerCalib = sharedPrefs.getBoolean(DeviceSettings.KEY_USE_ACCELEROMETER_CALIBRATION, true);
-
- // When use accelerometer calibration value is set to 1, calibration is done at the same time, which
- // means it is reset at each boot, providing wrong calibration most of the time at each reboot.
- // So we only set it to "0" if user wants it, as it defaults to 1 at boot
- if (!accelerometerCalib)
- Utils.writeValue(FILE_USE_ACCELEROMETER_CALIB, "0");
- }
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/Startup.java b/DeviceSettings/src/com/cyanogenmod/settings/device/Startup.java
deleted file mode 100644
index 5296d76..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/Startup.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-public class Startup extends BroadcastReceiver {
-
- @Override
- public void onReceive(final Context context, final Intent bootintent) {
- DockFragmentActivity.restore(context);
- HapticFragmentActivity.restore(context);
- mDNIeScenario.restore(context);
- mDNIeMode.restore(context);
- mDNIeNegative.restore(context);
- mDNIeOutdoor.restore(context);
- RadioFragmentActivity.restore(context);
- ScreenFragmentActivity.restore(context);
- SensorsFragmentActivity.restore(context);
- TouchkeyTimeout.restore(context);
- VibratorIntensity.restore(context);
- }
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/TouchkeyTimeout.java b/DeviceSettings/src/com/cyanogenmod/settings/device/TouchkeyTimeout.java
deleted file mode 100644
index 6ea9bfb..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/TouchkeyTimeout.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import java.io.IOException;
-import android.content.Context;
-import android.util.AttributeSet;
-import android.content.SharedPreferences;
-import android.preference.Preference;
-import android.preference.ListPreference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceManager;
-
-public class TouchkeyTimeout extends ListPreference implements OnPreferenceChangeListener {
-
- public TouchkeyTimeout(Context context, AttributeSet attrs) {
- super(context, attrs);
- this.setOnPreferenceChangeListener(this);
- }
-
- private static final String FILE_TOUCHKEY_TIMEOUT = "/sys/class/sec/sec_touchkey/timeout";
-
- public static boolean isSupported() {
- return Utils.fileExists(FILE_TOUCHKEY_TIMEOUT);
- }
-
- /**
- * Restore touchscreen sensitivity setting from SharedPreferences. (Write to kernel.)
- * @param context The context to read the SharedPreferences from
- */
- public static void restore(Context context) {
- if (!isSupported()) {
- return;
- }
-
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Utils.writeValue(FILE_TOUCHKEY_TIMEOUT, sharedPrefs.getString(DeviceSettings.KEY_TOUCHKEY_TIMEOUT, "3"));
- }
-
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- Utils.writeValue(FILE_TOUCHKEY_TIMEOUT, (String) newValue);
- return true;
- }
-
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/TouchscreenSensitivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/TouchscreenSensitivity.java
deleted file mode 100644
index e066556..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/TouchscreenSensitivity.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import java.io.IOException;
-import android.content.Context;
-import android.util.AttributeSet;
-import android.content.SharedPreferences;
-import android.preference.Preference;
-import android.preference.ListPreference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceManager;
-
-public class TouchscreenSensitivity extends ListPreference implements OnPreferenceChangeListener {
-
- public TouchscreenSensitivity(Context context, AttributeSet attrs) {
- super(context, attrs);
- this.setOnPreferenceChangeListener(this);
- }
-
- private static final String FILE = "/sys/class/sec/sec_touchscreen/tsp_threshold";
-
- public static boolean isSupported() {
- return Utils.fileExists(FILE);
- }
-
- /**
- * Restore touchscreen sensitivity setting from SharedPreferences. (Write to kernel.)
- * @param context The context to read the SharedPreferences from
- */
- public static void restore(Context context) {
- if (!isSupported()) {
- return;
- }
-
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_TOUCHSCREEN_SENSITIVITY, "50"));
- }
-
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- Utils.writeValue(FILE, (String) newValue);
- return true;
- }
-
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java b/DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java
deleted file mode 100644
index d0755ef..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.util.Log;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.SyncFailedException;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
-import android.content.Context;
-
-public class Utils {
-
- private static final String TAG = "GalaxyS2Settings_Utils";
- private static final String TAG_READ = "GalaxyS2Settings_Utils_Read";
- private static final String TAG_WRITE = "GalaxyS2Settings_Utils_Write";
-
- /**
- * Write a string value to the specified file.
- *
- * @param filename The filename
- * @param value The value
- */
- public static void writeValue(String filename, String value) {
- FileOutputStream fos = null;
- try {
- fos = new FileOutputStream(new File(filename), false);
- fos.write(value.getBytes());
- fos.flush();
- // fos.getFD().sync();
- } catch (FileNotFoundException ex) {
- Log.w(TAG, "file " + filename + " not found: " + ex);
- } catch (SyncFailedException ex) {
- Log.w(TAG, "file " + filename + " sync failed: " + ex);
- } catch (IOException ex) {
- Log.w(TAG, "IOException trying to sync " + filename + ": " + ex);
- } catch (RuntimeException ex) {
- Log.w(TAG, "exception while syncing file: ", ex);
- } finally {
- if (fos != null) {
- try {
- Log.w(TAG_WRITE, "file " + filename + ": " + value);
- fos.close();
- } catch (IOException ex) {
- Log.w(TAG, "IOException while closing synced file: ", ex);
- } catch (RuntimeException ex) {
- Log.w(TAG, "exception while closing file: ", ex);
- }
- }
- }
-
- }
-
- /**
- * Write a string value to the specified file.
- *
- * @param filename The filename
- * @param value The value
- */
- public static void writeValue(String filename, Boolean value) {
- FileOutputStream fos = null;
- String sEnvia;
- try {
- fos = new FileOutputStream(new File(filename), false);
- if (value)
- sEnvia = "1";
- else
- sEnvia = "0";
- fos.write(sEnvia.getBytes());
- fos.flush();
- // fos.getFD().sync();
- } catch (FileNotFoundException ex) {
- Log.w(TAG, "file " + filename + " not found: " + ex);
- } catch (SyncFailedException ex) {
- Log.w(TAG, "file " + filename + " sync failed: " + ex);
- } catch (IOException ex) {
- Log.w(TAG, "IOException trying to sync " + filename + ": " + ex);
- } catch (RuntimeException ex) {
- Log.w(TAG, "exception while syncing file: ", ex);
- } finally {
- if (fos != null) {
- try {
- Log.w(TAG_WRITE, "file " + filename + ": " + value);
- fos.close();
- } catch (IOException ex) {
- Log.w(TAG, "IOException while closing synced file: ", ex);
- } catch (RuntimeException ex) {
- Log.w(TAG, "exception while closing file: ", ex);
- }
- }
- }
- }
-
- /**
- * Write the "color value" to the specified file. The value is scaled from
- * an integer to an unsigned integer by multiplying by 2.
- * @param filename The filename
- * @param value The value of max value Integer.MAX
- */
- public static void writeColor(String filename, int value) {
- writeValue(filename, String.valueOf((long) value * 2));
- }
-
- /**
- * Check if the specified file exists.
- * @param filename The filename
- * @return Whether the file exists or not
- */
- public static boolean fileExists(String filename) {
- return new File(filename).exists();
- }
-
-
- public static void showDialog(Context ctx, String title, String message) {
- final AlertDialog alertDialog = new AlertDialog.Builder(ctx).create();
- alertDialog.setTitle(title);
- alertDialog.setMessage(message);
- alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- alertDialog.dismiss();
- }
- });
- alertDialog.show();
- }
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/VibratorIntensity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/VibratorIntensity.java
deleted file mode 100644
index 7a809a5..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/VibratorIntensity.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import java.io.IOException;
-import android.content.Context;
-import android.util.AttributeSet;
-import android.content.SharedPreferences;
-import android.preference.Preference;
-import android.preference.ListPreference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceManager;
-
-public class VibratorIntensity extends ListPreference implements OnPreferenceChangeListener {
-
- public VibratorIntensity(Context context, AttributeSet attrs) {
- super(context, attrs);
- this.setOnPreferenceChangeListener(this);
- }
-
- private static final String FILE = "/sys/vibrator/pwm_val";
-
- public static boolean isSupported() {
- return Utils.fileExists(FILE);
- }
-
- /**
- * Restore vibrator intensity setting from SharedPreferences. (Write to kernel.)
- * @param context The context to read the SharedPreferences from
- */
- public static void restore(Context context) {
- if (!isSupported()) {
- return;
- }
-
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_VIBRATOR_INTENSITY, "50"));
- }
-
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- Utils.writeValue(FILE, (String) newValue);
- return true;
- }
-
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeMode.java b/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeMode.java
deleted file mode 100644
index c7fc94b..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeMode.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.Context;
-
-import android.content.SharedPreferences;
-import android.util.AttributeSet;
-import android.preference.Preference;
-import android.preference.ListPreference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceManager;
-
-public class mDNIeMode extends ListPreference implements OnPreferenceChangeListener {
-
- public mDNIeMode(Context context, AttributeSet attrs) {
- super(context, attrs);
- this.setOnPreferenceChangeListener(this);
- }
-
- private static final String FILE = "/sys/class/mdnie/mdnie/mode";
-
- public static boolean isSupported() {
- return Utils.fileExists(FILE);
- }
-
- /**
- * Restore mdnie user mode setting from SharedPreferences. (Write to kernel.)
- * @param context The context to read the SharedPreferences from
- */
- public static void restore(Context context) {
- if (!isSupported()) {
- return;
- }
-
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_MDNIE_MODE, "1"));
- }
-
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- Utils.writeValue(FILE, (String) newValue);
- return true;
- }
-
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeNegative.java b/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeNegative.java
deleted file mode 100644
index c2ccc7b..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeNegative.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import java.io.IOException;
-import android.content.Context;
-import android.util.AttributeSet;
-import android.content.SharedPreferences;
-import android.preference.Preference;
-import android.preference.ListPreference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceManager;
-
-public class mDNIeNegative extends ListPreference implements OnPreferenceChangeListener {
-
- public mDNIeNegative(Context context, AttributeSet attrs) {
- super(context, attrs);
- this.setOnPreferenceChangeListener(this);
- }
-
- private static final String FILE = "/sys/class/mdnie/mdnie/negative";
-
- public static boolean isSupported() {
- return Utils.fileExists(FILE);
- }
-
- /**
- * Restore mdnie user mode setting from SharedPreferences. (Write to kernel.)
- * @param context The context to read the SharedPreferences from
- */
- public static void restore(Context context) {
- if (!isSupported()) {
- return;
- }
-
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_MDNIE_NEGATIVE, "0"));
- }
-
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- Utils.writeValue(FILE, (String) newValue);
- return true;
- }
-
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeOutdoor.java b/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeOutdoor.java
deleted file mode 100644
index 7fcdacd..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeOutdoor.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.content.SharedPreferences;
-import android.preference.Preference;
-import android.preference.ListPreference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceManager;
-
-public class mDNIeOutdoor extends ListPreference implements OnPreferenceChangeListener {
-
- public mDNIeOutdoor(Context context, AttributeSet attrs) {
- super(context, attrs);
- this.setOnPreferenceChangeListener(this);
- }
-
- private static final String FILE = "/sys/class/mdnie/mdnie/outdoor";
-
- public static boolean isSupported() {
- return Utils.fileExists(FILE);
- }
-
- /**
- * Restore mdnie user mode setting from SharedPreferences. (Write to kernel.)
- * @param context The context to read the SharedPreferences from
- */
- public static void restore(Context context) {
- if (!isSupported()) {
- return;
- }
-
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_MDNIE_OUTDOOR, "0"));
- }
-
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- Utils.writeValue(FILE, (String) newValue);
- return true;
- }
-
-}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeScenario.java b/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeScenario.java
deleted file mode 100644
index a9c935a..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeScenario.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 The CyanogenMod Project
- *
- * 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.cyanogenmod.settings.device;
-
-import android.content.Context;
-
-import android.content.SharedPreferences;
-import android.util.AttributeSet;
-import android.preference.Preference;
-import android.preference.ListPreference;
-import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.PreferenceManager;
-
-public class mDNIeScenario extends ListPreference implements OnPreferenceChangeListener {
-
- public mDNIeScenario(Context context, AttributeSet attrs) {
- super(context,attrs);
- this.setOnPreferenceChangeListener(this);
- }
-
- private static final String FILE = "/sys/class/mdnie/mdnie/scenario";
-
- public static boolean isSupported() {
- return Utils.fileExists(FILE);
- }
-
- /**
- * Restore mdnie "camera" setting from SharedPreferences. (Write to kernel.)
- * @param context The context to read the SharedPreferences from
- */
- public static void restore(Context context) {
- if (!isSupported()) {
- return;
- }
-
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_MDNIE_SCENARIO, "0"));
- }
-
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- Utils.writeValue(FILE, (String) newValue);
- return true;
- }
-
-}