Remove mIsRegistered check for setUwbEnabled
Settings is the only client that uses the setUwbEnabled API and does not need to register a callback. Bug: 190599683 Test: CTS and Robotest Change-Id: I2f360189c03b74f2636410dc21fda7041a35f376
This commit is contained in:
@@ -108,16 +108,13 @@ public class AdapterStateListener extends IUwbAdapterStateCallbacks.Stub {
|
||||
*/
|
||||
public void setEnabled(boolean isEnabled) {
|
||||
synchronized (this) {
|
||||
if (!mIsRegistered) {
|
||||
return;
|
||||
} else {
|
||||
try {
|
||||
mAdapter.setEnabled(isEnabled);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed to set adapter state");
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
try {
|
||||
mAdapter.setEnabled(isEnabled);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed to set adapter state");
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user