mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 715197 - Robocop: implement isDisplayed(); r=jmaher
This commit is contained in:
parent
0f0e7e3dea
commit
d0b474e6d9
@ -141,9 +141,29 @@ public class FennecNativeElement implements Element {
|
||||
return text.toString();
|
||||
}
|
||||
|
||||
private boolean displayed;
|
||||
|
||||
@Override
|
||||
public boolean isDisplayed() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
final SynchronousQueue syncQueue = new SynchronousQueue();
|
||||
currentActivity = robocop.getCurrentActivity();
|
||||
displayed = false;
|
||||
currentActivity.runOnUiThread(
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
View view = (View)currentActivity.findViewById(id);
|
||||
if(view != null) {
|
||||
displayed = true;
|
||||
}
|
||||
syncQueue.offer(new Object());
|
||||
}
|
||||
});
|
||||
try {
|
||||
syncQueue.take();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return displayed;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user