aboutsummaryrefslogtreecommitdiff
path: root/car-lib/src/android/car/CarAppFocusManager.java
diff options
context:
space:
mode:
authorKeun-young Park <keunyoung@google.com>2016-10-07 15:48:11 -0700
committerKeun-young Park <keunyoung@google.com>2016-10-07 16:07:56 -0700
commit150d8de43e71a624106e90bcc04067414c42ef18 (patch)
tree904b2090cfa8dca892b058ca8c4327055b45670f /car-lib/src/android/car/CarAppFocusManager.java
parentaf2cc99a2e8eea38a75b20b952ea5c0e7ebb4b1b (diff)
downloadCar-150d8de43e71a624106e90bcc04067414c42ef18.tar.gz
CarNotConnectedException cleanup
- any action which can fail without car connection all throws CarNotConnectedException including methods which do not throw now. - drop exceptions from all tearing down methods like stop / release unregister / abandon. bug: 31930987 Change-Id: Ib63866488575def288e7af1c8350d92423262862
Diffstat (limited to 'car-lib/src/android/car/CarAppFocusManager.java')
-rw-r--r--car-lib/src/android/car/CarAppFocusManager.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/car-lib/src/android/car/CarAppFocusManager.java b/car-lib/src/android/car/CarAppFocusManager.java
index e6ddd158fb..d07b5e2f49 100644
--- a/car-lib/src/android/car/CarAppFocusManager.java
+++ b/car-lib/src/android/car/CarAppFocusManager.java
@@ -159,8 +159,7 @@ public final class CarAppFocusManager implements CarManagerBase {
* @param appType
* @throws CarNotConnectedException if the connection to the car service has been lost.
*/
- public void removeFocusListener(OnAppFocusChangedListener listener, @AppFocusType int appType)
- throws CarNotConnectedException {
+ public void removeFocusListener(OnAppFocusChangedListener listener, @AppFocusType int appType) {
IAppFocusListenerImpl binder;
synchronized (this) {
binder = mChangeBinders.get(listener);
@@ -171,7 +170,7 @@ public final class CarAppFocusManager implements CarManagerBase {
try {
mService.unregisterFocusListener(binder, appType);
} catch (RemoteException e) {
- throw new CarNotConnectedException(e);
+ //ignore
}
synchronized (this) {
binder.removeAppType(appType);
@@ -187,8 +186,7 @@ public final class CarAppFocusManager implements CarManagerBase {
* @param listener
* @throws CarNotConnectedException if the connection to the car service has been lost.
*/
- public void removeFocusListener(OnAppFocusChangedListener listener)
- throws CarNotConnectedException {
+ public void removeFocusListener(OnAppFocusChangedListener listener) {
IAppFocusListenerImpl binder;
synchronized (this) {
binder = mChangeBinders.remove(listener);
@@ -201,7 +199,7 @@ public final class CarAppFocusManager implements CarManagerBase {
mService.unregisterFocusListener(binder, appType);
}
} catch (RemoteException e) {
- throw new CarNotConnectedException(e);
+ //ignore
}
}
@@ -282,8 +280,7 @@ public final class CarAppFocusManager implements CarManagerBase {
* @throws CarNotConnectedException if the connection to the car service has been lost.
*/
public void abandonAppFocus(OnAppFocusOwnershipCallback ownershipCallback,
- @AppFocusType int appType)
- throws CarNotConnectedException {
+ @AppFocusType int appType) {
if (ownershipCallback == null) {
throw new IllegalArgumentException("null callback");
}
@@ -297,7 +294,7 @@ public final class CarAppFocusManager implements CarManagerBase {
try {
mService.abandonAppFocus(binder, appType);
} catch (RemoteException e) {
- throw new CarNotConnectedException(e);
+ //ignore
}
synchronized (this) {
binder.removeAppType(appType);
@@ -313,8 +310,7 @@ public final class CarAppFocusManager implements CarManagerBase {
* @param ownershipCallback
* @throws CarNotConnectedException if the connection to the car service has been lost.
*/
- public void abandonAppFocus(OnAppFocusOwnershipCallback ownershipCallback)
- throws CarNotConnectedException {
+ public void abandonAppFocus(OnAppFocusOwnershipCallback ownershipCallback) {
IAppFocusOwnershipCallbackImpl binder;
synchronized (this) {
binder = mOwnershipBinders.remove(ownershipCallback);
@@ -327,7 +323,7 @@ public final class CarAppFocusManager implements CarManagerBase {
mService.abandonAppFocus(binder, appType);
}
} catch (RemoteException e) {
- throw new CarNotConnectedException(e);
+ //ignore
}
}