What steps will reproduce the problem?
(1) Try to ensure that IPH can not be shown while something important is happening.
What is the expected result?
There is an API call I can do to lock and unlock whether IPH can be shown.
What happens instead?
There are no direct API calls that can be made to accomplish this.
Notes:
We should provide an API to take a lock of all IPH. When asked, the Tracker will give out a handle, which ensures that nothing can be shown while it's active. When it's closed, IPH can again be shown. This should be an additional failure-case for the statistics tracking. In the Java-version of the API, we probably want to use a Runnable or Callback<T> or something like that to be invoked when the handle is finished (or a named API).
We should probably also change the API to instead of returning a boolean for ShouldTriggerHelpUI(...), where we also should be returning a handle, which when closed, would conceptually invoke the Dismiss(...) call for the given feature. We should be able to then remove the Dismiss(...) method all together. The handle itself should then of course know the name of the feature it was invoked for (if it's still necessary).
We might have to roll these two parts out over time, depending on how easy it is for users of IPH to hold on to a handle.
This is a different way for fixing issue 775097, but also improves the API.
Comment 1 by bugdroid1@chromium.org
, Nov 17 2017