summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk3
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java18
2 files changed, 10 insertions, 11 deletions
diff --git a/Android.mk b/Android.mk
index 3f1db8c..5d38a2e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,7 +15,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-v4 \
android-support-v13 \
play \
- libphonenumber
+ libphonenumber \
+ org.cyanogenmod.platform.sdk
# Include res dir from chips
google_play_dir := ../../../external/google/google_play_services/libproject/google-play-services_lib/res
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) {