ShellUserVerifier: Add method to check if the service name is fingerprint
We have multiple places where we check if we're handling a fingerprint event, so let's add a common public function so that it can be used also by the authPrompt. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>
This commit is contained in:
parent
09602ae2ae
commit
f7685dc224
@ -474,6 +474,11 @@ var ShellUserVerifier = class {
|
||||
return serviceName == this._defaultService;
|
||||
}
|
||||
|
||||
serviceIsFingerprint(serviceName) {
|
||||
return this._fingerprintReaderType !== FingerprintReaderType.NONE &&
|
||||
serviceName === FINGERPRINT_SERVICE_NAME;
|
||||
}
|
||||
|
||||
_updateDefaultService() {
|
||||
if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
||||
this._defaultService = PASSWORD_SERVICE_NAME;
|
||||
@ -527,8 +532,7 @@ var ShellUserVerifier = class {
|
||||
_onInfo(client, serviceName, info) {
|
||||
if (this.serviceIsForeground(serviceName)) {
|
||||
this._queueMessage(info, MessageType.INFO);
|
||||
} else if (serviceName == FINGERPRINT_SERVICE_NAME &&
|
||||
this._fingerprintReaderType !== FingerprintReaderType.NONE) {
|
||||
} else if (this.serviceIsFingerprint(serviceName)) {
|
||||
// We don't show fingerprint messages directly since it's
|
||||
// not the main auth service. Instead we use the messages
|
||||
// as a cue to display our own message.
|
||||
|
Loading…
Reference in New Issue
Block a user