summaryrefslogtreecommitdiff
path: root/service/java/com/android/server/bluetooth/BluetoothManagerService.java
diff options
context:
space:
mode:
Diffstat (limited to 'service/java/com/android/server/bluetooth/BluetoothManagerService.java')
-rw-r--r--service/java/com/android/server/bluetooth/BluetoothManagerService.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/service/java/com/android/server/bluetooth/BluetoothManagerService.java b/service/java/com/android/server/bluetooth/BluetoothManagerService.java
index 3e8f8fd016..6a1c28beb0 100644
--- a/service/java/com/android/server/bluetooth/BluetoothManagerService.java
+++ b/service/java/com/android/server/bluetooth/BluetoothManagerService.java
@@ -2603,9 +2603,14 @@ public class BluetoothManagerService extends IBluetoothManager.Stub {
}
// Make sure BT process exit completely
- //int[] pids = Process.getPidsForCommands(
- // new String[]{ "com.android.bluetooth" });
int[] pids = null;
+ try {
+ pids = (int[]) Class.forName("android.os.Process")
+ .getMethod("getPidsForCommands", String[].class)
+ .invoke(new String[]{ "com.android.bluetooth" });
+ } catch (Exception e) {
+ Log.e(TAG, "Error to call getPidsForCommands");
+ }
if (pids != null && pids.length > 0) {
for(int pid : pids) {
Log.e(TAG, "Killing BT process with PID = " + pid);