After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763605 - Don't ask to unlock if the device is already unlocked
Don't ask to unlock if the device is already unlocked
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: afc backend and volume monitor
git master
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2016-03-14 11:41 UTC by Bastien Nocera
Modified: 2016-06-09 10:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
afc: Add pairing dialogue specific message (3.07 KB, patch)
2016-06-06 16:36 UTC, Bastien Nocera
none Details | Review
afc: Add pairing dialogue specific message (3.08 KB, patch)
2016-06-07 14:37 UTC, Bastien Nocera
committed Details | Review
afc: Add specific errors for trust dialogue errors (1.62 KB, patch)
2016-06-08 11:54 UTC, Bastien Nocera
none Details | Review
afc: Add specific errors for trust dialogue errors (1.73 KB, patch)
2016-06-08 11:56 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2016-03-14 11:41:19 UTC
The "Try again" message only mentions unlocking the phone with a passcode, and not with TouchID:
       message = g_strdup_printf (_("The device “%s” is locked. Enter the passcode on the device and click “Try again”."), display_name);

We'd need to do something similar to:
http://stackoverflow.com/questions/26026563/ios8-check-if-device-has-touch-id
but from the remote side.

We might also want to mention the need to press the "Trust" button.
Comment 1 Ondrej Holy 2016-03-15 08:35:38 UTC
I have no idea how this works in detail, but it seems to me it isn't necessary to check whether the device has TouchID or not. Wouldn't be enough to just change the message as follows?

"The device “%s” is locked. Unlock the device, press the “Trust” button and click “Try again”."
Comment 2 Bastien Nocera 2016-03-15 11:30:27 UTC
Either way, we'll need to change the message. So what the message ends up being depends on what the device offers as hints.
Comment 3 Bastien Nocera 2016-06-06 16:36:54 UTC
Created attachment 329206 [details] [review]
afc: Add pairing dialogue specific message

When a pairing dialogue is shown on the device, don't tell the user that
the device is locked, rather that they need to click "Trust".
Comment 4 Ondrej Holy 2016-06-07 11:05:35 UTC
Review of attachment 329206 [details] [review]:

This somehow makes sense with the patch from Bug 767297, however I would merge those patches and replace the code by one switch...

::: daemon/gvfsbackendafc.c
@@ +615,3 @@
+        message = g_strdup_printf (_("The device “%s” is locked. Enter the passcode on the device and click “Try again”."), display_name);
+      }
+    else if (lerr == LOCKDOWN_E_PAIRING_DIALOG_PENDING)

LOCKDOWN_E_PAIRING_DIALOG_RESPONSE_PENDING?
Comment 5 Bastien Nocera 2016-06-07 14:37:19 UTC
Created attachment 329281 [details] [review]
afc: Add pairing dialogue specific message

When a pairing dialogue is shown on the device, don't tell the user that
the device is locked, rather that they need to click "Trust".
Comment 6 Ondrej Holy 2016-06-08 07:37:36 UTC
Review of attachment 329281 [details] [review]:

Ok, looks good!
Comment 7 Bastien Nocera 2016-06-08 10:04:44 UTC
(In reply to Ondrej Holy from comment #4)
> Review of attachment 329206 [details] [review] [review]:
> 
> This somehow makes sense with the patch from Bug 767297, however I would
> merge those patches and replace the code by one switch...

String freeze break... One I can commit to gnome-3-20, the other not.
Comment 8 Bastien Nocera 2016-06-08 11:54:20 UTC
Created attachment 329375 [details] [review]
afc: Add specific errors for trust dialogue errors

Add specific errors for when the user refuses trust on the device, or
repeatedly tries to connect to it but the device is locked, or the
dialogue still showing on the device.
Comment 9 Bastien Nocera 2016-06-08 11:56:28 UTC
Created attachment 329376 [details] [review]
afc: Add specific errors for trust dialogue errors

Add specific errors for when the user refuses trust on the device, or
repeatedly tries to connect to it but the device is locked, or the
dialogue still showing on the device.
Comment 10 Ondrej Holy 2016-06-08 12:35:49 UTC
Review of attachment 329376 [details] [review]:

Ok
Comment 11 Bastien Nocera 2016-06-09 10:00:57 UTC
Attachment 329281 [details] pushed as 77dbecd - afc: Add pairing dialogue specific message
Attachment 329376 [details] pushed as df8a093 - afc: Add specific errors for trust dialogue errors