diff options
author | Justin Klaassen <justinklaassen@google.com> | 2018-04-15 00:41:15 -0400 |
---|---|---|
committer | Justin Klaassen <justinklaassen@google.com> | 2018-04-15 00:41:15 -0400 |
commit | b8042fc9b036db0a6692ca853428fc6ab1e60892 (patch) | |
tree | 82669ea5d75238758e22d379a42baeada526219e /android/se/omapi/Channel.java | |
parent | 4d01eeaffaa720e4458a118baa137a11614f00f7 (diff) | |
download | android-28-b8042fc9b036db0a6692ca853428fc6ab1e60892.tar.gz |
Import Android SDK Platform P [4719250]HEADmastermainandroidx-work-releaseandroidx-webkit-releaseandroidx-viewpager2-releaseandroidx-versionedparcelable-releaseandroidx-vectordrawable-releaseandroidx-transition-releaseandroidx-sqlite-releaseandroidx-sharetarget-releaseandroidx-security-security-crypto-releaseandroidx-savedstate-releaseandroidx-room-releaseandroidx-recyclerview-releaseandroidx-recyclerview-recyclerview-selection-releaseandroidx-preference-releaseandroidx-paging-releaseandroidx-paging-legacy-releaseandroidx-navigation-releaseandroidx-mediarouter-releaseandroidx-media2-releaseandroidx-media2-media2-widget-releaseandroidx-media-releaseandroidx-master-releaseandroidx-localbroadcastmanager-releaseandroidx-loader-releaseandroidx-lifecycle-releaseandroidx-jetifier-releaseandroidx-g3-releaseandroidx-fragment-releaseandroidx-exifinterface-releaseandroidx-enterprise-releaseandroidx-core-releaseandroidx-core-core-role-releaseandroidx-coordinatorlayout-releaseandroidx-concurrent-releaseandroidx-compose-releaseandroidx-collection-releaseandroidx-camerax-releaseandroidx-browser-releaseandroidx-biometric-releaseandroidx-benchmark-releaseandroidx-autofill-releaseandroidx-arch-core-releaseandroidx-appcompat-releaseandroidx-annotation-releaseandroidx-annotation-annotation-experimental-releaseandroidx-activity-releaseandroid-arch-work-releaseandroid-arch-navigation-release
/google/data/ro/projects/android/fetch_artifact \
--bid 4719250 \
--target sdk_phone_armv7-win_sdk \
sdk-repo-linux-sources-4719250.zip
AndroidVersion.ApiLevel has been modified to appear as 28
Change-Id: I9ec0a12c9251b8449dba0d86b0cfdbcca16b0a7c
Diffstat (limited to 'android/se/omapi/Channel.java')
-rw-r--r-- | android/se/omapi/Channel.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/android/se/omapi/Channel.java b/android/se/omapi/Channel.java index c8efede3..5db3c1a9 100644 --- a/android/se/omapi/Channel.java +++ b/android/se/omapi/Channel.java @@ -39,7 +39,7 @@ import java.io.IOException; * * @see <a href="http://globalplatform.org">GlobalPlatform Open Mobile API</a> */ -public class Channel { +public final class Channel implements java.nio.channels.Channel { private static final String TAG = "OMAPI.Channel"; private Session mSession; @@ -64,7 +64,7 @@ public class Channel { * before closing the channel. */ public void close() { - if (!isClosed()) { + if (isOpen()) { synchronized (mLock) { try { mChannel.close(); @@ -76,21 +76,21 @@ public class Channel { } /** - * Tells if this channel is closed. + * Tells if this channel is open. * - * @return <code>true</code> if the channel is closed or in case of an error. - * <code>false</code> otherwise. + * @return <code>false</code> if the channel is closed or in case of an error. + * <code>true</code> otherwise. */ - public boolean isClosed() { + public boolean isOpen() { if (!mService.isConnected()) { Log.e(TAG, "service not connected to system"); - return true; + return false; } try { - return mChannel.isClosed(); + return !mChannel.isClosed(); } catch (RemoteException e) { Log.e(TAG, "Exception in isClosed()"); - return true; + return false; } } |