setupwizard: Move CMHW to CMSDK
Change-Id: Icc898a22c17486c9e2cc7f2d9d54ca025c134b0d
This commit is contained in:
parent
62db452188
commit
c924af3b33
@ -15,7 +15,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
|
|||||||
android-support-v4 \
|
android-support-v4 \
|
||||||
android-support-v13 \
|
android-support-v13 \
|
||||||
play \
|
play \
|
||||||
libphonenumber
|
libphonenumber \
|
||||||
|
org.cyanogenmod.platform.sdk
|
||||||
|
|
||||||
# Include res dir from chips
|
# Include res dir from chips
|
||||||
google_play_dir := ../../../external/google/google_play_services/libproject/google-play-services_lib/res
|
google_play_dir := ../../../external/google/google_play_services/libproject/google-play-services_lib/res
|
||||||
|
@ -27,7 +27,6 @@ import android.content.pm.PackageManager;
|
|||||||
import android.content.pm.ThemeUtils;
|
import android.content.pm.ThemeUtils;
|
||||||
import android.content.res.ThemeConfig;
|
import android.content.res.ThemeConfig;
|
||||||
import android.content.res.ThemeManager;
|
import android.content.res.ThemeManager;
|
||||||
import android.hardware.CmHardwareManager;
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.RemoteException;
|
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.ConnectionResult;
|
||||||
import com.google.android.gms.common.GooglePlayServicesUtil;
|
import com.google.android.gms.common.GooglePlayServicesUtil;
|
||||||
|
|
||||||
|
import cyanogenmod.hardware.CMHardwareManager;
|
||||||
|
|
||||||
public class CyanogenSettingsPage extends SetupPage {
|
public class CyanogenSettingsPage extends SetupPage {
|
||||||
|
|
||||||
public static final String TAG = "CyanogenSettingsPage";
|
public static final String TAG = "CyanogenSettingsPage";
|
||||||
@ -106,9 +107,8 @@ public class CyanogenSettingsPage extends SetupPage {
|
|||||||
|
|
||||||
Settings.Secure.putInt(context.getContentResolver(),
|
Settings.Secure.putInt(context.getContentResolver(),
|
||||||
Settings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0);
|
Settings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0);
|
||||||
final CmHardwareManager cmHardwareManager =
|
final CMHardwareManager hardware = CMHardwareManager.getInstance(context);
|
||||||
(CmHardwareManager) context.getSystemService(Context.CMHW_SERVICE);
|
hardware.set(CMHardwareManager.FEATURE_KEY_DISABLE, enabled);
|
||||||
cmHardwareManager.set(CmHardwareManager.FEATURE_KEY_DISABLE, enabled);
|
|
||||||
|
|
||||||
/* Save/restore button timeouts to disable them in softkey mode */
|
/* Save/restore button timeouts to disable them in softkey mode */
|
||||||
SharedPreferences.Editor editor = prefs.edit();
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
@ -192,15 +192,13 @@ public class CyanogenSettingsPage extends SetupPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean hideKeyDisabler(Context ctx) {
|
private static boolean hideKeyDisabler(Context ctx) {
|
||||||
final CmHardwareManager cmHardwareManager =
|
final CMHardwareManager hardware = CMHardwareManager.getInstance(ctx);
|
||||||
(CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE);
|
return !hardware.isSupported(CMHardwareManager.FEATURE_KEY_DISABLE);
|
||||||
return !cmHardwareManager.isSupported(CmHardwareManager.FEATURE_KEY_DISABLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isKeyDisablerActive(Context ctx) {
|
private static boolean isKeyDisablerActive(Context ctx) {
|
||||||
final CmHardwareManager cmHardwareManager =
|
final CMHardwareManager hardware = CMHardwareManager.getInstance(ctx);
|
||||||
(CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE);
|
return hardware.get(CMHardwareManager.FEATURE_KEY_DISABLE);
|
||||||
return cmHardwareManager.get(CmHardwareManager.FEATURE_KEY_DISABLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean hideWhisperPush(Context context) {
|
private static boolean hideWhisperPush(Context context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user