wonjsohn / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

onPreparePanel for voice menu is called when menu closes instead of before menu opens #667

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create activity with voice and touch menu (add some menus)
2. override onPreparePanel and add a logging
3. start activity and say "ok glass"

What is the expected output? What do you see instead?
onPreparePanel is called before the menu is actually visible.
Instead onPreparePanel is often called after the menu was displayed and 
dismissed or an item was selected.
Interestingly, sometimes it is called before and after the menu opens/closes. 
And rarely only before the menu shows. 

=> Basically, it is unpredictable what happens when!

What version of the product are you using? On what operating system?
Google Glass: XE22
AndroidStudio 1.3 RC 3
MacBook Pro OS X 10.10.4

Please provide any additional information below.
The file attached shows a log of the following actions:
1. openOptionsMenu() (touch)
2. dismiss menu (swipe down)
3. openOptionsMenu() (touch)
4. dismiss menu (swipe down)
5. say "ok glass" (voice menu opens)
6. dismiss menu (swipe down)
7. say "ok glass" (voice menu opens)
8. dismiss menu (swipe down)
9. openOptionsMenu() (touch)
10. choose item

As you can see in the log, using the touch menu (options menu), onPrepare is 
called every time (funnily also onCreatePanelMenu). But when calling the voice 
menu with "ok glass", onPreparePanel is called after the menu was dismissed or 
an item selected.

Original issue reported on code.google.com by b...@bfh.ch on 7 Aug 2015 at 8:32

Attachments: