[gnome-shell/gnome-3-38] ShellUserVerifier: Add method to check if the service name is fingerprint
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-38] ShellUserVerifier: Add method to check if the service name is fingerprint
- Date: Thu, 8 Apr 2021 18:08:56 +0000 (UTC)
commit 1fad3a461e3d3aea7f8d89d1b2a8a8406c32af33
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon Feb 8 17:07:45 2021 +0100
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/1783>
js/gdm/util.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/gdm/util.js b/js/gdm/util.js
index 5d5418bdba..34564bae05 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -427,6 +427,11 @@ var ShellUserVerifier = class {
return serviceName == this._defaultService;
}
+ serviceIsFingerprint(serviceName) {
+ return serviceName === FINGERPRINT_SERVICE_NAME &&
+ this._haveFingerprintReader;
+ }
+
_updateDefaultService() {
if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
this._defaultService = PASSWORD_SERVICE_NAME;
@@ -477,8 +482,7 @@ var ShellUserVerifier = class {
_onInfo(client, serviceName, info) {
if (this.serviceIsForeground(serviceName)) {
this._queueMessage(info, MessageType.INFO);
- } else if (serviceName == FINGERPRINT_SERVICE_NAME &&
- this._haveFingerprintReader) {
+ } 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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]