Merge "Remove IBinder from CarProjectionManager API"
diff --git a/car-lib/api/system-current.txt b/car-lib/api/system-current.txt
index 120676f..df2ac9b 100644
--- a/car-lib/api/system-current.txt
+++ b/car-lib/api/system-current.txt
@@ -59,8 +59,8 @@
method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION) public void registerProjectionListener(@NonNull android.car.CarProjectionManager.CarProjectionListener, int);
method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION) public void registerProjectionRunner(@NonNull android.content.Intent);
method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION_STATUS) public void registerProjectionStatusListener(@NonNull android.car.CarProjectionManager.ProjectionStatusListener);
- method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION) public boolean releaseBluetoothProfileInhibit(android.bluetooth.BluetoothDevice, int, android.os.IBinder);
- method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION) public boolean requestBluetoothProfileInhibit(@NonNull android.bluetooth.BluetoothDevice, int, @NonNull android.os.IBinder);
+ method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION) public boolean releaseBluetoothProfileInhibit(@NonNull android.bluetooth.BluetoothDevice, int);
+ method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION) public boolean requestBluetoothProfileInhibit(@NonNull android.bluetooth.BluetoothDevice, int);
method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION) public void startProjectionAccessPoint(@NonNull android.car.CarProjectionManager.ProjectionAccessPointCallback);
method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION) public void stopProjectionAccessPoint();
method @RequiresPermission(android.car.Car.PERMISSION_CAR_PROJECTION) public void unregisterProjectionListener();
diff --git a/car-lib/src/android/car/CarProjectionManager.java b/car-lib/src/android/car/CarProjectionManager.java
index 7706bf7..8b5bc82 100644
--- a/car-lib/src/android/car/CarProjectionManager.java
+++ b/car-lib/src/android/car/CarProjectionManager.java
@@ -297,17 +297,14 @@
*
* @param device The device on which to inhibit a profile.
* @param profile The {@link android.bluetooth.BluetoothProfile} to inhibit.
- * @param token A {@link IBinder} to be used as an identity for the request. If the process
- * owning the token dies, the request will automatically be released.
* @return True if the profile was successfully inhibited, false if an error occurred.
*/
@RequiresPermission(Car.PERMISSION_CAR_PROJECTION)
public boolean requestBluetoothProfileInhibit(
- @NonNull BluetoothDevice device, int profile, @NonNull IBinder token) {
+ @NonNull BluetoothDevice device, int profile) {
Preconditions.checkNotNull(device, "device cannot be null");
- Preconditions.checkNotNull(token, "token cannot be null");
try {
- return mService.requestBluetoothProfileInhibit(device, profile, token);
+ return mService.requestBluetoothProfileInhibit(device, profile, mToken);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -319,17 +316,13 @@
*
* @param device The device on which to release the inhibit request.
* @param profile The profile on which to release the inhibit request.
- * @param token The token provided in the original call to
- * {@link #requestBluetoothProfileInhibit}.
* @return True if the request was released, false if an error occurred.
*/
@RequiresPermission(Car.PERMISSION_CAR_PROJECTION)
- public boolean releaseBluetoothProfileInhibit(
- BluetoothDevice device, int profile, IBinder token) {
+ public boolean releaseBluetoothProfileInhibit(@NonNull BluetoothDevice device, int profile) {
Preconditions.checkNotNull(device, "device cannot be null");
- Preconditions.checkNotNull(token, "token cannot be null");
try {
- return mService.releaseBluetoothProfileInhibit(device, profile, token);
+ return mService.releaseBluetoothProfileInhibit(device, profile, mToken);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -341,7 +334,7 @@
*
* @param status the reported status that will be distributed to the interested listeners
*
- * @see #registerProjectionListener(CarProjectionListener, int)
+ * @see #registerProjectionStatusListener(ProjectionStatusListener)
*/
@RequiresPermission(Car.PERMISSION_CAR_PROJECTION)
public void updateProjectionStatus(@NonNull ProjectionStatus status) {
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 2df562e..c43547b 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -580,6 +580,7 @@
break;
}
mCarProjectionService.setUiMode(Integer.valueOf(args[1]));
+ break;
default:
writer.println("Unknown command: \"" + arg + "\"");
dumpHelp(writer);