summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard/setup
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-08-17 00:23:08 -0700
committerSteve Kondik <shade@chemlab.org>2015-08-19 05:31:14 -0700
commitc924af3b3314056d02c3a8cd81b0ac8f53b9ea60 (patch)
treea1a19b590da4c0d796942237dd1e10872d56e121 /src/com/cyanogenmod/setupwizard/setup
parent62db4521887b19c9adcbfcf5ecf2df27a9447923 (diff)
downloadpackages_apps_SetupWizard-c924af3b3314056d02c3a8cd81b0ac8f53b9ea60.zip
packages_apps_SetupWizard-c924af3b3314056d02c3a8cd81b0ac8f53b9ea60.tar.gz
packages_apps_SetupWizard-c924af3b3314056d02c3a8cd81b0ac8f53b9ea60.tar.bz2
setupwizard: Move CMHW to CMSDK
Change-Id: Icc898a22c17486c9e2cc7f2d9d54ca025c134b0d
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
index dbfd439..89b7438 100644
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
@@ -27,7 +27,6 @@ import android.content.pm.PackageManager;
import android.content.pm.ThemeUtils;
import android.content.res.ThemeConfig;
import android.content.res.ThemeManager;
-import android.hardware.CmHardwareManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
@@ -58,6 +57,8 @@ import com.cyanogenmod.setupwizard.util.WhisperPushUtils;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
+import cyanogenmod.hardware.CMHardwareManager;
+
public class CyanogenSettingsPage extends SetupPage {
public static final String TAG = "CyanogenSettingsPage";
@@ -106,9 +107,8 @@ public class CyanogenSettingsPage extends SetupPage {
Settings.Secure.putInt(context.getContentResolver(),
Settings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0);
- final CmHardwareManager cmHardwareManager =
- (CmHardwareManager) context.getSystemService(Context.CMHW_SERVICE);
- cmHardwareManager.set(CmHardwareManager.FEATURE_KEY_DISABLE, enabled);
+ final CMHardwareManager hardware = CMHardwareManager.getInstance(context);
+ hardware.set(CMHardwareManager.FEATURE_KEY_DISABLE, enabled);
/* Save/restore button timeouts to disable them in softkey mode */
SharedPreferences.Editor editor = prefs.edit();
@@ -192,15 +192,13 @@ public class CyanogenSettingsPage extends SetupPage {
}
private static boolean hideKeyDisabler(Context ctx) {
- final CmHardwareManager cmHardwareManager =
- (CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE);
- return !cmHardwareManager.isSupported(CmHardwareManager.FEATURE_KEY_DISABLE);
+ final CMHardwareManager hardware = CMHardwareManager.getInstance(ctx);
+ return !hardware.isSupported(CMHardwareManager.FEATURE_KEY_DISABLE);
}
private static boolean isKeyDisablerActive(Context ctx) {
- final CmHardwareManager cmHardwareManager =
- (CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE);
- return cmHardwareManager.get(CmHardwareManager.FEATURE_KEY_DISABLE);
+ final CMHardwareManager hardware = CMHardwareManager.getInstance(ctx);
+ return hardware.get(CMHardwareManager.FEATURE_KEY_DISABLE);
}
private static boolean hideWhisperPush(Context context) {