Skip to content

Commit

Permalink
Fix GZ metro query machine
Browse files Browse the repository at this point in the history
  • Loading branch information
domosekai committed Mar 3, 2022
1 parent 768b5c7 commit 2e6a2b8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.domosekai.cardemulator"
minSdkVersion 19
targetSdkVersion 31
versionCode 14
versionName "1.3.4"
versionCode 15
versionName "1.3.5"
}
buildTypes {
release {
Expand Down
23 changes: 17 additions & 6 deletions app/src/main/java/com/domosekai/cardemulator/HCEService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ class HCEService : HostApduService() {
result = "6F0A84085041592E41505059"
inTU = false
}
"ADF1" ->
if (cardType == TYPE_YCT) {
tran.result = "6F0A84085041592E4D4631586A81"
inTU = false
}
"5041592E5449434C" ->
if (cardType == TYPE_YCT) {
result =
Expand Down Expand Up @@ -824,15 +829,21 @@ class HCEService : HostApduService() {
}
// Update record
"80DC" -> result = ""
// GZ Metro
"C4FE" -> result = "41070B16BEF8F42110010184"
//"C4FE" -> result = "BA9A8B9F34000035C0490032"
"C4FB" -> result = "0002000A"
}

if (result != null) {
if (tran.le > 0 && result.length / 2 > tran.le) {
result = result.take(tran.le * 2)
if (tran.result == "") {
if (result != null) {
if (tran.le > 0 && result.length / 2 > tran.le) {
result = result.take(tran.le * 2)
}
tran.result = result + STATUS_SUCCESS
} else {
tran.result = STATUS_FAILED
}
tran.result = result + STATUS_SUCCESS
} else {
tran.result = STATUS_FAILED
}

rawMessage.value += "Response: ${tran.result}\n\n"
Expand Down

0 comments on commit 2e6a2b8

Please sign in to comment.