Clean up codes, fix long lines, improve readability, etc

Update copyright date, remove unused variable, import

Change-Id: I731c48c8e5b16cbee5230f1d02109f249b8bab5d
This commit is contained in:
Matthew Xie
2012-06-28 18:41:54 -07:00
parent 744ef74d37
commit b5f144af8e
6 changed files with 26 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011 The Android Open Source Project
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -176,9 +176,9 @@ final class HeadsetProfile implements LocalBluetoothProfile {
}
// This function is added as the AUTO CONNECT priority could not be set by using setPreferred(),
// as setPreferred() takes only boolean input but getPreferred() supports interger output.
// Also this need not implemented by all profiles so this has been added here.
// This function is added as the AUTO CONNECT priority could not be set by using setPreferred(),
// as setPreferred() takes only boolean input but getPreferred() supports interger output.
// Also this need not implemented by all profiles so this has been added here.
public void enableAutoConnect(BluetoothDevice device, boolean enable) {
if (mService == null) return;
if (enable) {
@@ -224,7 +224,8 @@ final class HeadsetProfile implements LocalBluetoothProfile {
if (V) Log.d(TAG, "finalize()");
if (mService != null) {
try {
BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.HEADSET, mService);
BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.HEADSET,
mService);
mService = null;
}catch (Throwable t) {
Log.w(TAG, "Error cleaning up HID proxy", t);