Here is the code in QueryMetadata that set this:

it = var.find("internet_connectivity");
    if (it != var.end())
    {
        internet_connectivity_ = it->second.get_bool() ? 
QueryMetadata::Connected : QueryMetadata::Disconnected;
    }
    else
    {
        internet_connectivity_ = QueryMetadata::Unknown;
    }

So, the only way for this not to be set is if the status isn't passed in
by the caller.

ActionMetadata and PerformAction derive from QueryMetadata, so they get
this setting for free. At least going by this brief look, I'd say that
the shell doesn't set the status for activation and preview.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scopes-shell in
Ubuntu.
https://bugs.launchpad.net/bugs/1502282

Title:
  "unknown" connectivity status problematic

Status in The Savilerow project:
  New
Status in unity-scopes-api package in Ubuntu:
  Confirmed
Status in unity-scopes-shell package in Ubuntu:
  Confirmed

Bug description:
  metadata provides a scope a network connectivity status enum with three 
possible states:
  * connected
  * disconnected
  * unknown

  Sometimes unknown is the current state. This is quite problematic
  because in general a scopes that queries the network (that is, most
  scopes) need to know whether there is network or is not network and
  depending on this either make the network queries or display an error
  message.

  A status of unknown connectivity leaves the scope with no valid option:
  * the scope could assume the network is down and provide the user an error 
message. But often the network is not actually down, so this interrupts the 
user's flow unnecessarily
  *  the scope could assume the network is up, but this is dangerous if it is 
not up

To manage notifications about this bug go to:
https://bugs.launchpad.net/savilerow/+bug/1502282/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to