summaryrefslogtreecommitdiffstats
path: root/core/java/android/bluetooth
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2009-09-28 12:33:17 -0700
committerNick Pelly <npelly@google.com>2009-09-28 13:06:22 -0700
commitaef439e6f825c0cb99a2ac08c8207f48b7a9fe10 (patch)
tree69633f84a5a75b185ca8c97c0108a06d71f75ba7 /core/java/android/bluetooth
parent2dfa6edcd086bb9ce4fbb3b979f3afec93f6cddc (diff)
downloadframeworks_base-aef439e6f825c0cb99a2ac08c8207f48b7a9fe10.zip
frameworks_base-aef439e6f825c0cb99a2ac08c8207f48b7a9fe10.tar.gz
frameworks_base-aef439e6f825c0cb99a2ac08c8207f48b7a9fe10.tar.bz2
Move android.bluetooth.ParcelUuid to android.os.ParcelUuid
Change-Id: I564429d5c5b6a5372b6ff26a53b0d7e518b53631
Diffstat (limited to 'core/java/android/bluetooth')
-rw-r--r--core/java/android/bluetooth/BluetoothAdapter.java1
-rw-r--r--core/java/android/bluetooth/BluetoothDevice.java11
-rw-r--r--core/java/android/bluetooth/BluetoothUuid.java2
-rw-r--r--core/java/android/bluetooth/IBluetooth.aidl2
-rw-r--r--core/java/android/bluetooth/ParcelUuid.aidl19
-rw-r--r--core/java/android/bluetooth/ParcelUuid.java135
6 files changed, 10 insertions, 160 deletions
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 7d94554..e3ec2cc 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -18,6 +18,7 @@ package android.bluetooth;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.os.ParcelUuid;
import android.os.RemoteException;
import android.util.Log;
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index c714f69..d5393ed 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -22,6 +22,7 @@ import android.content.Context;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.ParcelUuid;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.util.Log;
@@ -228,9 +229,9 @@ public final class BluetoothDevice implements Parcelable {
/**
* Broadcast Action: This intent is used to broadcast the {@link UUID}
- * wrapped as a {@link ParcelUuid} of the remote device after it has been
- * fetched. This intent is sent only when the UUIDs of the remote device
- * are requested to be fetched using Service Discovery Protocol
+ * wrapped as a {@link android.os.ParcelUuid} of the remote device after it
+ * has been fetched. This intent is sent only when the UUIDs of the remote
+ * device are requested to be fetched using Service Discovery Protocol
* <p> Always contains the extra field {@link #EXTRA_DEVICE}
* <p> Always contains the extra filed {@link #EXTRA_UUID}
* <p>Requires {@link android.Manifest.permission#BLUETOOTH} to receive.
@@ -309,8 +310,8 @@ public final class BluetoothDevice implements Parcelable {
/**
* Used as an extra field in {@link #ACTION_UUID} intents,
- * Contains the {@link ParcelUuid}s of the remote device which is a parcelable
- * version of {@link UUID}.
+ * Contains the {@link android.os.ParcelUuid}s of the remote device which
+ * is a parcelable version of {@link UUID}.
* @hide
*/
public static final String EXTRA_UUID = "android.bluetooth.device.extra.UUID";
diff --git a/core/java/android/bluetooth/BluetoothUuid.java b/core/java/android/bluetooth/BluetoothUuid.java
index 24ad06a..da0564a 100644
--- a/core/java/android/bluetooth/BluetoothUuid.java
+++ b/core/java/android/bluetooth/BluetoothUuid.java
@@ -16,6 +16,8 @@
package android.bluetooth;
+import android.os.ParcelUuid;
+
import java.util.Arrays;
import java.util.HashSet;
diff --git a/core/java/android/bluetooth/IBluetooth.aidl b/core/java/android/bluetooth/IBluetooth.aidl
index 1bc2f96..2f77ba4 100644
--- a/core/java/android/bluetooth/IBluetooth.aidl
+++ b/core/java/android/bluetooth/IBluetooth.aidl
@@ -16,7 +16,7 @@
package android.bluetooth;
-import android.bluetooth.ParcelUuid;
+import android.os.ParcelUuid;
/**
* System private API for talking with the Bluetooth service.
diff --git a/core/java/android/bluetooth/ParcelUuid.aidl b/core/java/android/bluetooth/ParcelUuid.aidl
deleted file mode 100644
index 70bcc4b..0000000
--- a/core/java/android/bluetooth/ParcelUuid.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-** Copyright 2009, 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 android.bluetooth;
-
-parcelable ParcelUuid;
diff --git a/core/java/android/bluetooth/ParcelUuid.java b/core/java/android/bluetooth/ParcelUuid.java
deleted file mode 100644
index 27166a0..0000000
--- a/core/java/android/bluetooth/ParcelUuid.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (C) 2009 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 android.bluetooth;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.UUID;
-
-/**
- * This class is a Parcelable wrapper around {@link UUID} which is an
- * immutable representation of a 128-bit universally unique
- * identifier.
- */
-public final class ParcelUuid implements Parcelable {
-
- private final UUID mUuid;
-
- /**
- * Constructor creates a ParcelUuid instance from the
- * given {@link UUID}.
- *
- * @param uuid UUID
- */
- public ParcelUuid(UUID uuid) {
- mUuid = uuid;
- }
-
- /**
- * Creates a new ParcelUuid from a string representation of {@link UUID}.
- *
- * @param uuid
- * the UUID string to parse.
- * @return an ParcelUuid instance.
- * @throws NullPointerException
- * if {@code uuid} is {@code null}.
- * @throws IllegalArgumentException
- * if {@code uuid} is not formatted correctly.
- */
- public static ParcelUuid fromString(String uuid) {
- return new ParcelUuid(UUID.fromString(uuid));
- }
-
- /**
- * Get the {@link UUID} represented by the ParcelUuid.
- *
- * @return UUID contained in the ParcelUuid.
- */
- public UUID getUuid() {
- return mUuid;
- }
-
- /**
- * Returns a string representation of the ParcelUuid
- * For example: 0000110B-0000-1000-8000-00805F9B34FB will be the return value.
- *
- * @return a String instance.
- */
- @Override
- public String toString() {
- return mUuid.toString();
- }
-
-
- @Override
- public int hashCode() {
- return mUuid.hashCode();
- }
-
- /**
- * Compares this ParcelUuid to another object for equality. If {@code object}
- * is not {@code null}, is a ParcelUuid instance, and all bits are equal, then
- * {@code true} is returned.
- *
- * @param object
- * the {@code Object} to compare to.
- * @return {@code true} if this ParcelUuid is equal to {@code object}
- * or {@code false} if not.
- */
- @Override
- public boolean equals(Object object) {
- if (object == null) {
- return false;
- }
-
- if (this == object) {
- return true;
- }
-
- if (!(object instanceof ParcelUuid)) {
- return false;
- }
-
- ParcelUuid that = (ParcelUuid) object;
-
- return (this.mUuid.equals(that.mUuid));
- }
-
- public static final Parcelable.Creator<ParcelUuid> CREATOR =
- new Parcelable.Creator<ParcelUuid>() {
- public ParcelUuid createFromParcel(Parcel source) {
- long mostSigBits = source.readLong();
- long leastSigBits = source.readLong();
- UUID uuid = new UUID(mostSigBits, leastSigBits);
- return new ParcelUuid(uuid);
- }
-
- public ParcelUuid[] newArray(int size) {
- return new ParcelUuid[size];
- }
- };
-
- public int describeContents() {
- return 0;
- }
-
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeLong(mUuid.getMostSignificantBits());
- dest.writeLong(mUuid.getLeastSignificantBits());
- }
-}