setupwizard: Move CMHW to CMSDK

Change-Id: Icc898a22c17486c9e2cc7f2d9d54ca025c134b0d
This commit is contained in:
Steve Kondik 2015-08-17 00:23:08 -07:00 committed by Steve Kondik
parent 62db452188
commit c924af3b33
2 changed files with 10 additions and 11 deletions

View File

@ -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

View File

@ -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) {