diff options
author | SzuWei Lin <szuweilin@google.com> | 2020-09-01 18:25:06 +0800 |
---|---|---|
committer | SzuWei Lin <szuweilin@google.com> | 2020-09-01 18:25:06 +0800 |
commit | 8bbf77aa0e0a33785a0607075632ee5a723ffc16 (patch) | |
tree | b5f1104729419d0841e74f56c04f42cea8fd67b6 | |
parent | 3ac79e9b89a8b9972cffed0660dfe59787c17137 (diff) | |
parent | dfaa3af62e8dc7aa1555ef5254cf75e11cd6c3c4 (diff) | |
download | SecureElement-android10-gsi.tar.gz |
Merge branch android10-qpr3-releaseandroid10-gsi
Change-Id: I1a04b3da2cb4ebd0c990ee55c14255ee21038bf5
-rw-r--r-- | src/com/android/se/Terminal.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/com/android/se/Terminal.java b/src/com/android/se/Terminal.java index d21c323..521d696 100644 --- a/src/com/android/se/Terminal.java +++ b/src/com/android/se/Terminal.java @@ -247,22 +247,22 @@ public class Terminal { if (channel == null) { return; } - if (mIsConnected) { - try { - byte status = mSEHal.closeChannel((byte) channel.getChannelNumber()); - /* For Basic Channels, errors are expected. - * Underlying implementations use this call as an indication when there - * aren't any users actively using the channel, and the chip can go - * into low power state. - */ - if (!channel.isBasicChannel() && status != SecureElementStatus.SUCCESS) { - Log.e(mTag, "Error closing channel " + channel.getChannelNumber()); + synchronized (mLock) { + if (mIsConnected) { + try { + byte status = mSEHal.closeChannel((byte) channel.getChannelNumber()); + /* For Basic Channels, errors are expected. + * Underlying implementations use this call as an indication when there + * aren't any users actively using the channel, and the chip can go + * into low power state. + */ + if (!channel.isBasicChannel() && status != SecureElementStatus.SUCCESS) { + Log.e(mTag, "Error closing channel " + channel.getChannelNumber()); + } + } catch (RemoteException e) { + Log.e(mTag, "Exception in closeChannel() " + e); } - } catch (RemoteException e) { - Log.e(mTag, "Exception in closeChannel() " + e); } - } - synchronized (mLock) { mChannels.remove(channel.getChannelNumber(), channel); if (mChannels.get(channel.getChannelNumber()) != null) { Log.e(mTag, "Removing channel failed"); |