summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard/setup
diff options
context:
space:
mode:
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) {