Assign bindService() result to a boolean directly. One less if-else
Bug: 17637058 Change-Id: If2f4db2ebf95f1912a752794a1ab482cf30ab014
This commit is contained in:
@@ -143,9 +143,7 @@ public final class MediaBrowser {
|
||||
|
||||
boolean bound = false;
|
||||
try {
|
||||
if (mContext.bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE)) {
|
||||
bound = true;
|
||||
}
|
||||
bound = mContext.bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE);
|
||||
} catch (Exception ex) {
|
||||
Log.e(TAG, "Failed binding to service " + mServiceComponent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user