I use pass sdk v1.2.1, according to the programming guide there is a way to change the text in the standby mode displayed in the fingerprint dialog. The manual says that you should check if the function Spass.DEVICE_FINGERPRINT_AVAILABLE_PASSWORDfor calling is turned on changeStandbyString, something like this:
if(pass.isFeatureEnabled(Spass.DEVICE_FINGERPRINT_AVAILABLE_PASSWORD)) {
mSpassFingerprint.changeStandbyString("Touch your fingerprint or press the button for launching own menu");
}
I try to use it on Galaxy S5 with Android 6.0 and Galaxy S5 Android 5.xx in both cases I get an exception
IllegalStateException: setStandbyString is not supported.
What seems a little strange is that the exception is thrown if the method inside changeStandbyStringreturns true, which is obtained, this is the same method that is called when checking
isFeatureEnabled(Spass.DEVICE_FINGERPRINT_AVAILABLE_PASSWORD);
something looks wrong, any idea?
, android:
public void changeStandbyString(String var1) {
this.f();
if(this.d()) {
throw new IllegalStateException("setStandbyString is not supported.");
} else if(var1 == null) {
throw new IllegalArgumentException("the standby text passed is null.");
} else if(var1.length() > 100) {
throw new IllegalArgumentException("the standby text passed is longer than 100 characters.");
} else {
this.m = var1;
}
}
public boolean isFeatureEnabled(int var1) {
if(this.a == null) {
throw new IllegalStateException("initialize() is not Called first.");
} else {
switch(var1) {
case 0:
return this.a.a();
case 1:
case 2:
return this.a.b();
case 3:
return this.a.c();
case 4:
return this.a.d();
default:
throw new IllegalArgumentException("type passed is not valid");
}
}
}
, d() - , , , , , , if(!this.d()) changeStandbyString, :
public void setDialogTitle(String var1, int var2) {
this.f();
if(!this.b()) {
throw new IllegalStateException("setDialogTitle is not supported.");
} else if(var1 == null) {
throw new IllegalArgumentException("the titletext passed is null.");
} else if(var1.length() > 256) {
throw new IllegalArgumentException("the title text passed is longer than 256 characters.");
} else if(var2 >>> 24 != 0) {
throw new IllegalArgumentException("alpha value is not supported in the titleColor.");
} else {
this.f = var1;
this.g = var2 + -16777216;
}
}
throw new IllegalStateException("setDialogTitle is not supported."); , this.b() false, , isFeaturedEnabled, Spass.DEVICE_FINGERPRINT_CUSTOMIZED_DIALOG (Spass.DEVICE_FINGERPRINT_CUSTOMIZED_DIALOG = 2).