diff options
author | Scott Mertz <scott@cyngn.com> | 2015-01-31 22:00:34 -0800 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2015-12-27 23:24:21 +0200 |
commit | 5bf49241ffb0c019bfc0484a4fc772540192a739 (patch) | |
tree | b3315f2bb67f1b3c15354a40a778785ad2782e69 /src/com/android/settings/profiles | |
parent | e14b877832637d904ca2b4e16cc0d84a8bba30aa (diff) | |
download | packages_apps_Settings-5bf49241ffb0c019bfc0484a4fc772540192a739.zip packages_apps_Settings-5bf49241ffb0c019bfc0484a4fc772540192a739.tar.gz packages_apps_Settings-5bf49241ffb0c019bfc0484a4fc772540192a739.tar.bz2 |
Profiles: remove unused code
Change-Id: Icfbe90f25f537a673a1b749c217dca9efb6a1c70
Diffstat (limited to 'src/com/android/settings/profiles')
-rw-r--r-- | src/com/android/settings/profiles/ProfilesUtils.java | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/src/com/android/settings/profiles/ProfilesUtils.java b/src/com/android/settings/profiles/ProfilesUtils.java deleted file mode 100644 index 03e9d33..0000000 --- a/src/com/android/settings/profiles/ProfilesUtils.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.android.settings.profiles; - -import android.bluetooth.BluetoothAdapter; -import android.content.ContentResolver; -import android.content.Context; -import android.content.pm.PackageManager; -import android.content.res.Resources; -import android.hardware.Camera; -import android.hardware.display.DisplayManager; -import android.hardware.display.WifiDisplayStatus; -import android.hardware.Sensor; -import android.hardware.SensorManager; -import android.net.ConnectivityManager; -import android.nfc.NfcAdapter; -import android.os.BatteryManager; -import android.os.UserHandle; -import android.provider.Settings; -import android.telephony.TelephonyManager; -import android.text.TextUtils; - -import cyanogenmod.providers.CMSettings; - -import com.android.internal.telephony.PhoneConstants; - -public class ProfilesUtils { - public static boolean deviceSupportsUsbTether(Context ctx) { - ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE); - return (cm.getTetherableUsbRegexs().length != 0); - } - - public static boolean deviceSupportsWifiDisplay(Context ctx) { - DisplayManager dm = (DisplayManager) ctx.getSystemService(Context.DISPLAY_SERVICE); - return (dm.getWifiDisplayStatus().getFeatureState() != WifiDisplayStatus.FEATURE_STATE_UNAVAILABLE); - } - - public static boolean deviceSupportsMobileData(Context ctx) { - ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE); - return cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE); - } - - public static boolean deviceSupportsBluetooth() { - return (BluetoothAdapter.getDefaultAdapter() != null); - } - - public static boolean systemProfilesEnabled(ContentResolver resolver) { - return (CMSettings.System.getInt(resolver, CMSettings.System.SYSTEM_PROFILES_ENABLED, 1) == 1); - } - - public static boolean deviceSupportsNfc(Context ctx) { - return NfcAdapter.getDefaultAdapter(ctx) != null; - } - - public static boolean deviceSupportsCamera() { - return Camera.getNumberOfCameras() > 0; - } - - public static boolean deviceSupportsGps(Context context) { - return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS); - } - - public static boolean adbEnabled(ContentResolver resolver) { - return (Settings.Global.getInt(resolver, Settings.Global.ADB_ENABLED, 0)) == 1; - } - - public static boolean deviceSupportsCompass(Context context) { - SensorManager sm = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); - return (sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null - && sm.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD) != null); - } -} |