From aa782a28f1a75c3d9bdfdc23b5aa29f039fe085b Mon Sep 17 00:00:00 2001 From: d34d Date: Tue, 10 Nov 2015 10:47:58 -0800 Subject: fw: Move Secure settings to CMSettings This moves all Settings.Secure.* settings that, were added to CyanogenMod, to CMSettings. * KEYBOARD_BRIGHTNESS * BUTTON_BRIGHTNESS * BUTTON_BACKLIGHT_TIMEOUT * DEV_FORCE_SHOW_NAVBAR * ADB_NOTIFY * ADB_PORT * DEVICE_HOSTNAME * KILL_APP_LONGPRESS_BACK * PROTECTED_COMPONENTS * LIVE_DISPLAY_COLOR_MATRIX * ADVANCED_REBOOT * POWER_MENU_ACTIONS * DEFAULT_THEME_COMPONENTS * THEME_PREV_BOOT_API_LEVEL Change-Id: I49e9160177ffc727b20008817ac2b5ce5e89ead5 --- services/usb/Android.mk | 2 ++ .../usb/java/com/android/server/usb/UsbDeviceManager.java | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'services/usb') diff --git a/services/usb/Android.mk b/services/usb/Android.mk index feabf0a..2a9c382 100644 --- a/services/usb/Android.mk +++ b/services/usb/Android.mk @@ -9,4 +9,6 @@ LOCAL_SRC_FILES += \ LOCAL_JAVA_LIBRARIES := services.core +LOCAL_JAVA_LIBRARIES += org.cyanogenmod.platform.internal + include $(BUILD_STATIC_JAVA_LIBRARY) diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index 29a1809..a79c8ea 100644 --- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java +++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java @@ -51,6 +51,7 @@ import android.util.Slog; import com.android.internal.annotations.GuardedBy; import com.android.internal.util.IndentingPrintWriter; import com.android.server.FgThread; +import cyanogenmod.providers.CMSettings; import java.io.File; import java.io.FileNotFoundException; @@ -356,10 +357,10 @@ public class UsbDeviceManager { }; mContentResolver.registerContentObserver( - Settings.Secure.getUriFor(Settings.Secure.ADB_PORT), + CMSettings.Secure.getUriFor(CMSettings.Secure.ADB_PORT), false, adbNotificationObserver); mContentResolver.registerContentObserver( - Settings.Secure.getUriFor(Settings.Secure.ADB_NOTIFY), + CMSettings.Secure.getUriFor(CMSettings.Secure.ADB_NOTIFY), false, adbNotificationObserver); // Watch for USB configuration changes @@ -809,10 +810,10 @@ public class UsbDeviceManager { final int id; boolean usbAdbActive = mAdbEnabled && mConnected; boolean netAdbActive = mAdbEnabled && - Settings.Secure.getInt(mContentResolver, Settings.Secure.ADB_PORT, -1) > 0; + CMSettings.Secure.getInt(mContentResolver, CMSettings.Secure.ADB_PORT, -1) > 0; boolean hideNotification = "0".equals(SystemProperties.get("persist.adb.notify")) - || Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.ADB_NOTIFY, 1) == 0; + || CMSettings.Secure.getInt(mContext.getContentResolver(), + CMSettings.Secure.ADB_NOTIFY, 1) == 0; if (hideNotification) { id = 0; -- cgit v1.1