Loading .editorconfig 0 → 100644 +11 −0 Original line number Diff line number Diff line root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = space indent_size = 4 [*.{cc,cpp,c,h}] indent_size = 2 android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +7 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ import java.util.ArrayDeque; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.function.Predicate; Loading Loading @@ -1151,6 +1153,11 @@ public class RemoteDevices { } else if (device.getBondState() == BluetoothDevice.BOND_NONE) { String key = Utils.getAddressStringFromByte(address); mDevices.remove(key); mDeviceQueue.remove(key); // Remove from LRU cache // Remove from dual mode device mappings mDualDevicesMap.values().remove(key); mDualDevicesMap.remove(key); } if (state == BluetoothAdapter.STATE_ON || state == BluetoothAdapter.STATE_TURNING_OFF) { mAdapterService.notifyAclDisconnected(device, transportLinkType); Loading android/app/src/com/android/bluetooth/hid/HidDeviceService.java +6 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.content.Intent; import android.os.Binder; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.Process; import android.os.RemoteException; Loading Loading @@ -91,6 +92,10 @@ public class HidDeviceService extends ProfileService { } private class HidDeviceServiceHandler extends Handler { HidDeviceServiceHandler(Looper looper) { super(looper); } @Override public void handleMessage(Message msg) { if (DBG) { Loading Loading @@ -770,7 +775,7 @@ public class HidDeviceService extends ProfileService { mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), "DatabaseManager cannot be null when HidDeviceService starts"); mHandler = new HidDeviceServiceHandler(); mHandler = new HidDeviceServiceHandler(Looper.getMainLooper()); mHidDeviceNativeInterface = HidDeviceNativeInterface.getInstance(); mHidDeviceNativeInterface.init(); mNativeAvailable = true; Loading android/app/src/com/android/bluetooth/pan/PanService.java +1 −1 Original line number Diff line number Diff line Loading @@ -215,7 +215,7 @@ public class PanService extends ProfileService { } private final Handler mHandler = new Handler() { new Handler(Looper.getMainLooper()) { @Override public void handleMessage(Message msg) { switch (msg.what) { Loading framework/java/android/bluetooth/Attributable.java +5 −7 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ import android.content.AttributionSource; import java.util.List; /** * Marker interface for a class which can have an {@link AttributionSource} * assigned to it; these are typically {@link android.os.Parcelable} classes * which need to be updated after crossing Binder transaction boundaries. * Marker interface for a class which can have an {@link AttributionSource} assigned to it; these * are typically {@link android.os.Parcelable} classes which need to be updated after crossing * Binder transaction boundaries. * * @hide */ Loading @@ -35,8 +35,7 @@ public interface Attributable { /** @hide */ static @Nullable <T extends Attributable> T setAttributionSource( @Nullable T attributable, @NonNull AttributionSource attributionSource) { @Nullable T attributable, @NonNull AttributionSource attributionSource) { if (attributable != null) { attributable.setAttributionSource(attributionSource); } Loading @@ -45,8 +44,7 @@ public interface Attributable { /** @hide */ static @Nullable <T extends Attributable> List<T> setAttributionSource( @Nullable List<T> attributableList, @NonNull AttributionSource attributionSource) { @Nullable List<T> attributableList, @NonNull AttributionSource attributionSource) { if (attributableList != null) { final int size = attributableList.size(); for (int i = 0; i < size; i++) { Loading Loading
.editorconfig 0 → 100644 +11 −0 Original line number Diff line number Diff line root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = space indent_size = 4 [*.{cc,cpp,c,h}] indent_size = 2
android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +7 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ import java.util.ArrayDeque; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.function.Predicate; Loading Loading @@ -1151,6 +1153,11 @@ public class RemoteDevices { } else if (device.getBondState() == BluetoothDevice.BOND_NONE) { String key = Utils.getAddressStringFromByte(address); mDevices.remove(key); mDeviceQueue.remove(key); // Remove from LRU cache // Remove from dual mode device mappings mDualDevicesMap.values().remove(key); mDualDevicesMap.remove(key); } if (state == BluetoothAdapter.STATE_ON || state == BluetoothAdapter.STATE_TURNING_OFF) { mAdapterService.notifyAclDisconnected(device, transportLinkType); Loading
android/app/src/com/android/bluetooth/hid/HidDeviceService.java +6 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.content.Intent; import android.os.Binder; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.Process; import android.os.RemoteException; Loading Loading @@ -91,6 +92,10 @@ public class HidDeviceService extends ProfileService { } private class HidDeviceServiceHandler extends Handler { HidDeviceServiceHandler(Looper looper) { super(looper); } @Override public void handleMessage(Message msg) { if (DBG) { Loading Loading @@ -770,7 +775,7 @@ public class HidDeviceService extends ProfileService { mDatabaseManager = Objects.requireNonNull(AdapterService.getAdapterService().getDatabase(), "DatabaseManager cannot be null when HidDeviceService starts"); mHandler = new HidDeviceServiceHandler(); mHandler = new HidDeviceServiceHandler(Looper.getMainLooper()); mHidDeviceNativeInterface = HidDeviceNativeInterface.getInstance(); mHidDeviceNativeInterface.init(); mNativeAvailable = true; Loading
android/app/src/com/android/bluetooth/pan/PanService.java +1 −1 Original line number Diff line number Diff line Loading @@ -215,7 +215,7 @@ public class PanService extends ProfileService { } private final Handler mHandler = new Handler() { new Handler(Looper.getMainLooper()) { @Override public void handleMessage(Message msg) { switch (msg.what) { Loading
framework/java/android/bluetooth/Attributable.java +5 −7 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ import android.content.AttributionSource; import java.util.List; /** * Marker interface for a class which can have an {@link AttributionSource} * assigned to it; these are typically {@link android.os.Parcelable} classes * which need to be updated after crossing Binder transaction boundaries. * Marker interface for a class which can have an {@link AttributionSource} assigned to it; these * are typically {@link android.os.Parcelable} classes which need to be updated after crossing * Binder transaction boundaries. * * @hide */ Loading @@ -35,8 +35,7 @@ public interface Attributable { /** @hide */ static @Nullable <T extends Attributable> T setAttributionSource( @Nullable T attributable, @NonNull AttributionSource attributionSource) { @Nullable T attributable, @NonNull AttributionSource attributionSource) { if (attributable != null) { attributable.setAttributionSource(attributionSource); } Loading @@ -45,8 +44,7 @@ public interface Attributable { /** @hide */ static @Nullable <T extends Attributable> List<T> setAttributionSource( @Nullable List<T> attributableList, @NonNull AttributionSource attributionSource) { @Nullable List<T> attributableList, @NonNull AttributionSource attributionSource) { if (attributableList != null) { final int size = attributableList.size(); for (int i = 0; i < size; i++) { Loading