Loading services/core/java/com/android/server/BluetoothManagerService.java +0 −30 Original line number Diff line number Diff line Loading @@ -81,7 +81,6 @@ import com.android.server.pm.UserRestrictionsUtils; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.Locale; Loading Loading @@ -786,35 +785,6 @@ class BluetoothManagerService extends IBluetoothManager.Stub { return mIsHearingAidProfileSupported; } @Override /** @hide */ public java.util.List<String> getSystemConfigEnabledProfilesForPackage(String packageName) { if (Binder.getCallingUid() != Process.BLUETOOTH_UID) { Slog.w(TAG, "getSystemConfigEnabledProfilesForPackage(): not allowed for non-bluetooth"); return null; } SystemConfig systemConfig = SystemConfig.getInstance(); if (systemConfig == null) { return null; } android.util.ArrayMap<String, Boolean> componentEnabledStates = systemConfig.getComponentsEnabledStates(packageName); if (componentEnabledStates == null) { return null; } ArrayList enabledProfiles = new ArrayList<String>(); for (Map.Entry<String, Boolean> entry : componentEnabledStates.entrySet()) { if (entry.getValue()) { enabledProfiles.add(entry.getKey()); } } return enabledProfiles; } private boolean isDeviceProvisioned() { return Settings.Global.getInt(mContentResolver, Settings.Global.DEVICE_PROVISIONED, 0) != 0; Loading Loading
services/core/java/com/android/server/BluetoothManagerService.java +0 −30 Original line number Diff line number Diff line Loading @@ -81,7 +81,6 @@ import com.android.server.pm.UserRestrictionsUtils; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.Locale; Loading Loading @@ -786,35 +785,6 @@ class BluetoothManagerService extends IBluetoothManager.Stub { return mIsHearingAidProfileSupported; } @Override /** @hide */ public java.util.List<String> getSystemConfigEnabledProfilesForPackage(String packageName) { if (Binder.getCallingUid() != Process.BLUETOOTH_UID) { Slog.w(TAG, "getSystemConfigEnabledProfilesForPackage(): not allowed for non-bluetooth"); return null; } SystemConfig systemConfig = SystemConfig.getInstance(); if (systemConfig == null) { return null; } android.util.ArrayMap<String, Boolean> componentEnabledStates = systemConfig.getComponentsEnabledStates(packageName); if (componentEnabledStates == null) { return null; } ArrayList enabledProfiles = new ArrayList<String>(); for (Map.Entry<String, Boolean> entry : componentEnabledStates.entrySet()) { if (entry.getValue()) { enabledProfiles.add(entry.getKey()); } } return enabledProfiles; } private boolean isDeviceProvisioned() { return Settings.Global.getInt(mContentResolver, Settings.Global.DEVICE_PROVISIONED, 0) != 0; Loading