Skip to content

Commit da01b4a

Browse files
Nick PellyAndroid (Google) Code Review
authored andcommitted
Merge "Make MifareClassic methods more consistent." into gingerbread
2 parents e1e70c5 + e45083b commit da01b4a

File tree

2 files changed

+229
-270
lines changed

2 files changed

+229
-270
lines changed

api/current.xml

Lines changed: 43 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -101246,7 +101246,7 @@
101246101246
deprecated="not deprecated"
101247101247
visibility="public"
101248101248
>
101249-
<method name="authenticateBlock"
101249+
<method name="authenticateSectorWithKeyA"
101250101250
return="boolean"
101251101251
abstract="false"
101252101252
native="false"
@@ -101256,16 +101256,14 @@
101256101256
deprecated="not deprecated"
101257101257
visibility="public"
101258101258
>
101259-
<parameter name="block" type="int">
101259+
<parameter name="sectorIndex" type="int">
101260101260
</parameter>
101261101261
<parameter name="key" type="byte[]">
101262101262
</parameter>
101263-
<parameter name="keyA" type="boolean">
101264-
</parameter>
101265101263
<exception name="IOException" type="java.io.IOException">
101266101264
</exception>
101267101265
</method>
101268-
<method name="authenticateSector"
101266+
<method name="authenticateSectorWithKeyB"
101269101267
return="boolean"
101270101268
abstract="false"
101271101269
native="false"
@@ -101275,17 +101273,15 @@
101275101273
deprecated="not deprecated"
101276101274
visibility="public"
101277101275
>
101278-
<parameter name="sector" type="int">
101276+
<parameter name="sectorIndex" type="int">
101279101277
</parameter>
101280101278
<parameter name="key" type="byte[]">
101281101279
</parameter>
101282-
<parameter name="keyA" type="boolean">
101283-
</parameter>
101284101280
<exception name="IOException" type="java.io.IOException">
101285101281
</exception>
101286101282
</method>
101287-
<method name="decrement"
101288-
return="void"
101283+
<method name="blockToSector"
101284+
return="int"
101289101285
abstract="false"
101290101286
native="false"
101291101287
synchronized="false"
@@ -101294,38 +101290,38 @@
101294101290
deprecated="not deprecated"
101295101291
visibility="public"
101296101292
>
101297-
<parameter name="block" type="int">
101293+
<parameter name="blockIndex" type="int">
101298101294
</parameter>
101299-
<exception name="IOException" type="java.io.IOException">
101300-
</exception>
101301101295
</method>
101302-
<method name="get"
101303-
return="android.nfc.tech.MifareClassic"
101296+
<method name="decrement"
101297+
return="void"
101304101298
abstract="false"
101305101299
native="false"
101306101300
synchronized="false"
101307-
static="true"
101301+
static="false"
101308101302
final="false"
101309101303
deprecated="not deprecated"
101310101304
visibility="public"
101311101305
>
101312-
<parameter name="tag" type="android.nfc.Tag">
101306+
<parameter name="blockIndex" type="int">
101313101307
</parameter>
101308+
<exception name="IOException" type="java.io.IOException">
101309+
</exception>
101314101310
</method>
101315-
<method name="getBlockCount"
101316-
return="int"
101311+
<method name="get"
101312+
return="android.nfc.tech.MifareClassic"
101317101313
abstract="false"
101318101314
native="false"
101319101315
synchronized="false"
101320-
static="false"
101316+
static="true"
101321101317
final="false"
101322101318
deprecated="not deprecated"
101323101319
visibility="public"
101324101320
>
101325-
<parameter name="sector" type="int">
101321+
<parameter name="tag" type="android.nfc.Tag">
101326101322
</parameter>
101327101323
</method>
101328-
<method name="getSectorCount"
101324+
<method name="getBlockCount"
101329101325
return="int"
101330101326
abstract="false"
101331101327
native="false"
@@ -101336,7 +101332,7 @@
101336101332
visibility="public"
101337101333
>
101338101334
</method>
101339-
<method name="getSectorSize"
101335+
<method name="getBlockCountInSector"
101340101336
return="int"
101341101337
abstract="false"
101342101338
native="false"
@@ -101346,10 +101342,10 @@
101346101342
deprecated="not deprecated"
101347101343
visibility="public"
101348101344
>
101349-
<parameter name="sector" type="int">
101345+
<parameter name="sectorIndex" type="int">
101350101346
</parameter>
101351101347
</method>
101352-
<method name="getSize"
101348+
<method name="getSectorCount"
101353101349
return="int"
101354101350
abstract="false"
101355101351
native="false"
@@ -101360,7 +101356,7 @@
101360101356
visibility="public"
101361101357
>
101362101358
</method>
101363-
<method name="getTotalBlockCount"
101359+
<method name="getSize"
101364101360
return="int"
101365101361
abstract="false"
101366101362
native="false"
@@ -101392,22 +101388,11 @@
101392101388
deprecated="not deprecated"
101393101389
visibility="public"
101394101390
>
101395-
<parameter name="block" type="int">
101391+
<parameter name="blockIndex" type="int">
101396101392
</parameter>
101397101393
<exception name="IOException" type="java.io.IOException">
101398101394
</exception>
101399101395
</method>
101400-
<method name="isEmulated"
101401-
return="boolean"
101402-
abstract="false"
101403-
native="false"
101404-
synchronized="false"
101405-
static="false"
101406-
final="false"
101407-
deprecated="not deprecated"
101408-
visibility="public"
101409-
>
101410-
</method>
101411101396
<method name="readBlock"
101412101397
return="byte[]"
101413101398
abstract="false"
@@ -101418,15 +101403,13 @@
101418101403
deprecated="not deprecated"
101419101404
visibility="public"
101420101405
>
101421-
<parameter name="sector" type="int">
101422-
</parameter>
101423-
<parameter name="block" type="int">
101406+
<parameter name="blockIndex" type="int">
101424101407
</parameter>
101425101408
<exception name="IOException" type="java.io.IOException">
101426101409
</exception>
101427101410
</method>
101428-
<method name="readBlock"
101429-
return="byte[]"
101411+
<method name="restore"
101412+
return="void"
101430101413
abstract="false"
101431101414
native="false"
101432101415
synchronized="false"
@@ -101435,13 +101418,13 @@
101435101418
deprecated="not deprecated"
101436101419
visibility="public"
101437101420
>
101438-
<parameter name="block" type="int">
101421+
<parameter name="blockIndex" type="int">
101439101422
</parameter>
101440101423
<exception name="IOException" type="java.io.IOException">
101441101424
</exception>
101442101425
</method>
101443-
<method name="restore"
101444-
return="void"
101426+
<method name="sectorToBlock"
101427+
return="int"
101445101428
abstract="false"
101446101429
native="false"
101447101430
synchronized="false"
@@ -101450,10 +101433,8 @@
101450101433
deprecated="not deprecated"
101451101434
visibility="public"
101452101435
>
101453-
<parameter name="block" type="int">
101436+
<parameter name="sectorIndex" type="int">
101454101437
</parameter>
101455-
<exception name="IOException" type="java.io.IOException">
101456-
</exception>
101457101438
</method>
101458101439
<method name="transceive"
101459101440
return="byte[]"
@@ -101480,7 +101461,7 @@
101480101461
deprecated="not deprecated"
101481101462
visibility="public"
101482101463
>
101483-
<parameter name="block" type="int">
101464+
<parameter name="blockIndex" type="int">
101484101465
</parameter>
101485101466
<exception name="IOException" type="java.io.IOException">
101486101467
</exception>
@@ -101495,32 +101476,24 @@
101495101476
deprecated="not deprecated"
101496101477
visibility="public"
101497101478
>
101498-
<parameter name="block" type="int">
101479+
<parameter name="blockIndex" type="int">
101499101480
</parameter>
101500101481
<parameter name="data" type="byte[]">
101501101482
</parameter>
101502101483
<exception name="IOException" type="java.io.IOException">
101503101484
</exception>
101504101485
</method>
101505-
<method name="writeBlock"
101506-
return="void"
101507-
abstract="false"
101508-
native="false"
101509-
synchronized="false"
101510-
static="false"
101511-
final="false"
101486+
<field name="BLOCK_SIZE"
101487+
type="int"
101488+
transient="false"
101489+
volatile="false"
101490+
value="16"
101491+
static="true"
101492+
final="true"
101512101493
deprecated="not deprecated"
101513101494
visibility="public"
101514101495
>
101515-
<parameter name="sector" type="int">
101516-
</parameter>
101517-
<parameter name="block" type="int">
101518-
</parameter>
101519-
<parameter name="data" type="byte[]">
101520-
</parameter>
101521-
<exception name="IOException" type="java.io.IOException">
101522-
</exception>
101523-
</method>
101496+
</field>
101524101497
<field name="KEY_DEFAULT"
101525101498
type="byte[]"
101526101499
transient="false"
@@ -101598,7 +101571,7 @@
101598101571
visibility="public"
101599101572
>
101600101573
</field>
101601-
<field name="SIZE_UNKNOWN"
101574+
<field name="TYPE_CLASSIC"
101602101575
type="int"
101603101576
transient="false"
101604101577
volatile="false"
@@ -101609,11 +101582,11 @@
101609101582
visibility="public"
101610101583
>
101611101584
</field>
101612-
<field name="TYPE_CLASSIC"
101585+
<field name="TYPE_OTHER"
101613101586
type="int"
101614101587
transient="false"
101615101588
volatile="false"
101616-
value="0"
101589+
value="-1"
101617101590
static="true"
101618101591
final="true"
101619101592
deprecated="not deprecated"
@@ -101642,17 +101615,6 @@
101642101615
visibility="public"
101643101616
>
101644101617
</field>
101645-
<field name="TYPE_UNKNOWN"
101646-
type="int"
101647-
transient="false"
101648-
volatile="false"
101649-
value="5"
101650-
static="true"
101651-
final="true"
101652-
deprecated="not deprecated"
101653-
visibility="public"
101654-
>
101655-
</field>
101656101618
</class>
101657101619
<class name="MifareUltralight"
101658101620
extends="android.nfc.tech.BasicTagTechnology"

0 commit comments

Comments
 (0)