Loading Android.mk +0 −2 Original line number Diff line number Diff line Loading @@ -17,8 +17,6 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ play \ libphonenumber LOCAL_JAVA_LIBRARIES += org.cyanogenmod.hardware # Include res dir from chips google_play_dir := ../../../external/google/google_play_services/libproject/google-play-services_lib/res res_dir := $(google_play_dir) res Loading AndroidManifest.xml +0 −2 Original line number Diff line number Diff line Loading @@ -68,8 +68,6 @@ android:theme="@style/Theme.Setup" android:name=".SetupWizardApp"> <uses-library android:name="org.cyanogenmod.hardware" android:required="false" /> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> Loading src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java +14 −18 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.SharedPreferences; import android.content.pm.ThemeUtils; import android.content.res.ThemeConfig; import android.content.res.ThemeManager; import android.hardware.CmHardwareManager; import android.os.Bundle; import android.os.RemoteException; import android.preference.PreferenceManager; Loading Loading @@ -50,8 +51,6 @@ import com.cyanogenmod.setupwizard.util.WhisperPushUtils; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import org.cyanogenmod.hardware.KeyDisabler; public class CyanogenSettingsPage extends SetupPage { public static final String TAG = "CyanogenSettingsPage"; Loading Loading @@ -98,7 +97,9 @@ public class CyanogenSettingsPage extends SetupPage { Settings.Secure.putInt(context.getContentResolver(), Settings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0); KeyDisabler.setActive(enabled); final CmHardwareManager cmHardwareManager = (CmHardwareManager) context.getSystemService(Context.CMHW_SERVICE); cmHardwareManager.set(CmHardwareManager.FEATURE_KEY_DISABLE, enabled); /* Save/restore button timeouts to disable them in softkey mode */ SharedPreferences.Editor editor = prefs.edit(); Loading Loading @@ -181,21 +182,16 @@ public class CyanogenSettingsPage extends SetupPage { } } private static boolean hideKeyDisabler() { try { return !KeyDisabler.isSupported(); } catch (NoClassDefFoundError e) { // Hardware abstraction framework not installed return true; } private static boolean hideKeyDisabler(Context ctx) { final CmHardwareManager cmHardwareManager = (CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE); return !cmHardwareManager.isSupported(CmHardwareManager.FEATURE_KEY_DISABLE); } private static boolean isKeyDisablerActive() { try { return KeyDisabler.isActive(); } catch (Exception e) { return false; } private static boolean isKeyDisablerActive(Context ctx) { final CmHardwareManager cmHardwareManager = (CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE); return cmHardwareManager.get(CmHardwareManager.FEATURE_KEY_DISABLE); } private static boolean hideWhisperPush(Context context) { Loading Loading @@ -331,11 +327,11 @@ public class CyanogenSettingsPage extends SetupPage { needsNavBar = windowManager.needsNavigationBar(); } catch (RemoteException e) { } if (hideKeyDisabler() || needsNavBar) { if (hideKeyDisabler(getActivity()) || needsNavBar) { mNavKeysRow.setVisibility(View.GONE); } else { boolean navKeysDisabled = isKeyDisablerActive(); isKeyDisablerActive(getActivity()); mNavKeys.setChecked(navKeysDisabled); } Loading Loading
Android.mk +0 −2 Original line number Diff line number Diff line Loading @@ -17,8 +17,6 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ play \ libphonenumber LOCAL_JAVA_LIBRARIES += org.cyanogenmod.hardware # Include res dir from chips google_play_dir := ../../../external/google/google_play_services/libproject/google-play-services_lib/res res_dir := $(google_play_dir) res Loading
AndroidManifest.xml +0 −2 Original line number Diff line number Diff line Loading @@ -68,8 +68,6 @@ android:theme="@style/Theme.Setup" android:name=".SetupWizardApp"> <uses-library android:name="org.cyanogenmod.hardware" android:required="false" /> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> Loading
src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java +14 −18 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.SharedPreferences; import android.content.pm.ThemeUtils; import android.content.res.ThemeConfig; import android.content.res.ThemeManager; import android.hardware.CmHardwareManager; import android.os.Bundle; import android.os.RemoteException; import android.preference.PreferenceManager; Loading Loading @@ -50,8 +51,6 @@ import com.cyanogenmod.setupwizard.util.WhisperPushUtils; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import org.cyanogenmod.hardware.KeyDisabler; public class CyanogenSettingsPage extends SetupPage { public static final String TAG = "CyanogenSettingsPage"; Loading Loading @@ -98,7 +97,9 @@ public class CyanogenSettingsPage extends SetupPage { Settings.Secure.putInt(context.getContentResolver(), Settings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0); KeyDisabler.setActive(enabled); final CmHardwareManager cmHardwareManager = (CmHardwareManager) context.getSystemService(Context.CMHW_SERVICE); cmHardwareManager.set(CmHardwareManager.FEATURE_KEY_DISABLE, enabled); /* Save/restore button timeouts to disable them in softkey mode */ SharedPreferences.Editor editor = prefs.edit(); Loading Loading @@ -181,21 +182,16 @@ public class CyanogenSettingsPage extends SetupPage { } } private static boolean hideKeyDisabler() { try { return !KeyDisabler.isSupported(); } catch (NoClassDefFoundError e) { // Hardware abstraction framework not installed return true; } private static boolean hideKeyDisabler(Context ctx) { final CmHardwareManager cmHardwareManager = (CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE); return !cmHardwareManager.isSupported(CmHardwareManager.FEATURE_KEY_DISABLE); } private static boolean isKeyDisablerActive() { try { return KeyDisabler.isActive(); } catch (Exception e) { return false; } private static boolean isKeyDisablerActive(Context ctx) { final CmHardwareManager cmHardwareManager = (CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE); return cmHardwareManager.get(CmHardwareManager.FEATURE_KEY_DISABLE); } private static boolean hideWhisperPush(Context context) { Loading Loading @@ -331,11 +327,11 @@ public class CyanogenSettingsPage extends SetupPage { needsNavBar = windowManager.needsNavigationBar(); } catch (RemoteException e) { } if (hideKeyDisabler() || needsNavBar) { if (hideKeyDisabler(getActivity()) || needsNavBar) { mNavKeysRow.setVisibility(View.GONE); } else { boolean navKeysDisabled = isKeyDisablerActive(); isKeyDisablerActive(getActivity()); mNavKeys.setChecked(navKeysDisabled); } Loading