@@ -35,7 +35,7 @@ public class KMAndroidSEApplet extends KMKeymasterApplet implements OnUpgradeLis
3535 // Magic number version
3636 private static final byte KM_MAGIC_NUMBER = (byte ) 0x82 ;
3737 // MSB byte is for Major version and LSB byte is for Minor version.
38- private static final short CURRENT_PACKAGE_VERSION = 0x0100 ;
38+ private static final short KM_PERSISTENT_DATA_STORAGE_VERSION = 0x0100 ;
3939
4040 private static final byte KM_BEGIN_STATE = 0x00 ;
4141 private static final byte ILLEGAL_STATE = KM_BEGIN_STATE + 1 ;
@@ -79,7 +79,7 @@ public class KMAndroidSEApplet extends KMKeymasterApplet implements OnUpgradeLis
7979 KMAndroidSEApplet () {
8080 super (new KMAndroidSEProvider ());
8181 if (!UpgradeManager .isUpgrading ()) {
82- packageVersion = CURRENT_PACKAGE_VERSION ;
82+ packageVersion = KM_PERSISTENT_DATA_STORAGE_VERSION ;
8383 }
8484 }
8585
@@ -448,8 +448,8 @@ private boolean isUpgradeAllowed(short version) {
448448 boolean upgradeAllowed = false ;
449449 short oldMajorVersion = (short ) ((version >> 8 ) & 0x00FF );
450450 short oldMinorVersion = (short ) (version & 0x00FF );
451- short currentMajorVersion = (short ) (CURRENT_PACKAGE_VERSION >> 8 & 0x00FF );
452- short currentMinorVersion = (short ) (CURRENT_PACKAGE_VERSION & 0x00FF );
451+ short currentMajorVersion = (short ) (KM_PERSISTENT_DATA_STORAGE_VERSION >> 8 & 0x00FF );
452+ short currentMinorVersion = (short ) (KM_PERSISTENT_DATA_STORAGE_VERSION & 0x00FF );
453453 // Downgrade of the Applet is not allowed.
454454 // Upgrade is not allowed to a next version which is not immediate.
455455 if ((short ) (currentMajorVersion - oldMajorVersion ) == 1 ) {
0 commit comments