Add BluetoothTimeoutException.
Test: Skip Test. Will be covered by other tests.
Bug: 200231384
Change-Id: I290c1dc94c07180f079f9a8484c22dbb8145c0e3
diff --git a/nearby/service/java/com/android/server/nearby/common/bluetooth/BluetoothException.java b/nearby/service/java/com/android/server/nearby/common/bluetooth/BluetoothException.java
index 83d4a232..db2e1cc 100644
--- a/nearby/service/java/com/android/server/nearby/common/bluetooth/BluetoothException.java
+++ b/nearby/service/java/com/android/server/nearby/common/bluetooth/BluetoothException.java
@@ -20,10 +20,12 @@
* {@link Exception} thrown during a Bluetooth operation.
*/
public class BluetoothException extends Exception {
+ /** Constructor. */
public BluetoothException(String message) {
super(message);
}
+ /** Constructor. */
public BluetoothException(String message, Throwable throwable) {
super(message, throwable);
}
diff --git a/nearby/service/java/com/android/server/nearby/common/bluetooth/BluetoothTimeoutException.java b/nearby/service/java/com/android/server/nearby/common/bluetooth/BluetoothTimeoutException.java
new file mode 100644
index 0000000..30fd188
--- /dev/null
+++ b/nearby/service/java/com/android/server/nearby/common/bluetooth/BluetoothTimeoutException.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2021 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.nearby.common.bluetooth;
+
+/**
+ * {@link Exception} thrown during a Bluetooth operation when a timeout occurs.
+ */
+public class BluetoothTimeoutException extends BluetoothException {
+
+ /** Constructor. */
+ public BluetoothTimeoutException(String message) {
+ super(message);
+ }
+
+ /** Constructor. */
+ public BluetoothTimeoutException(String message, Throwable throwable) {
+ super(message, throwable);
+ }
+}