Summary:
Sometimes you want to get the sonar client without necessarily wanting to initialize it, for example if you don't have a context object, but still want to get hold of a particular plugin object.
Adds a getInstance method that returns null if not initialized.
Reviewed By: passy
Differential Revision: D9154423
fbshipit-source-id: 65cb46684bc35d9a953dbd958c7cf72aba0015e2
Summary: Allow click to inspect to work when Talkback is running (normal tree expands as usual although ax tree doesn't expand yet). Override onHover of Touchoverlay and onRequestSendAccessibilityEvent in viewRoot to prevent talkback focus when in Click to Inspect mode. Also update layout inspector to persist isSearchActive to prevent build up of TouchOverlayViews when navigating between plugins (which happened if leaving the layout inspector while in Click to Inspect mode).
Reviewed By: danielbuechele
Differential Revision: D9153446
fbshipit-source-id: f76982e8f8cea1e7b7e4c6b9bf73632d101222ef
Summary:
Rename artifacts and release on Bintray. Public release
will be delayed by the manual review by JFrog.
Reviewed By: danielbuechele
Differential Revision: D9179646
fbshipit-source-id: 84c11d545940d1d52b9de9f87b4eb26901290108
Summary:
Add a Button to toggle alignment lines on Sonar interface.
Call sonar plugin in java, sending isAlignmentMode flag.
Changed API for setHighlighted to include alignment mode flag.
Button design to be added in future diffs by @[100003260904633:maximg]
Reviewed By: danielbuechele
Differential Revision: D9123749
fbshipit-source-id: 01c299f299be30dbb695bfb1d8007d63c27643d5
Summary:
Part of a hackathon project. (https://fb.facebook.com/groups/230455004101832/permalink/454928784987785/)
We're adding an alignment mode for Sonar that shows the pixel level alignment.
Reviewed By: danielbuechele
Differential Revision: D9121197
fbshipit-source-id: 21af36fd7eeea631d580ccebff8e648fa276bf35
Summary:
Made sure it builds with both buck and Gradle.
Follow-up to D8865149.
Reviewed By: danielbuechele
Differential Revision: D9178885
fbshipit-source-id: 46efaa532efdc1d59ce76e04be6680e233084881
Summary:
Open the screen by running adb shell
am start -n com.facebook.wakizashi/com.facebook.sonar.android.diagnostics.SonarDiagnosticActivity
Reviewed By: passy
Differential Revision: D8954095
fbshipit-source-id: b4a638bc0ba2f69a69c121c7c1c00fbe47476ee3
Summary:
The plan is to get SonarState to take update events and aggregate them into an object, that can be displayed in the UI so you can see what sonar is currently trying to do, and what if anything is failing.
This is pretty rubbish right now, as it just uses a single string to represent state, this is just the initial version I'll iterate on.
I also need to pass the SonarState into the SonarWebSocketImpl, since that's where a lot of the heavy lifting is done, but as long as something is logging state updates here, it proves the concept.
SonarStateUpdateListener is the interface that will be implemented by android and iOS implementations. These implementations will notify an activity or screen that the state has changed and they should reflect that.
Reviewed By: passy
Differential Revision: D8932114
fbshipit-source-id: fb03babfe92be53771eb4d8f10de7ecdc7f1a6d8
Summary: Ax mode now works with multiple view roots/windows, accessibility focus is also updated when new windows are opened.
Reviewed By: danielbuechele
Differential Revision: D9121844
fbshipit-source-id: 1da9327f5d6a784793db8076c2ad2d84e860ac1c
Summary:
Sonar won't work without the INTERNET permission, so it can talk TCP to the desktop, on localhost.
Also, for genymotion, we use the IP address, so we need ACCESS_WIFI_STATE.
Reviewed By: passy
Differential Revision: D8855239
fbshipit-source-id: 35d0b0bba91daeba35a5de90e5ef87e89ac6bb51
Summary: Highlights the element corresponding to the view talkback is focused on in green in the ax tree (and updates live as talkback moves).
Reviewed By: blavalla
Differential Revision: D9021542
fbshipit-source-id: c3bf6f5625aacb0cd054032b33a50541b88b2eaf
Summary: Shows basic relationship between the AX and nonAX tree litho nodes. When a litho component is selected from the nonAX tree, it's corresponding hostView or lithoView (root of the component tree) is highlighted in the AX tree giving priority to the hostView if it exists. If a hostView is selected in the AX tree, it's corresponding component is selected in the non-AX tree. If a lithoView is selected from the AX tree, it's corresponding lithoView is highlighted in the non-AX tree. This means that each hostView has a one-to-one highlighting between the two trees but lithoViews will have many nodes in the main tree that map to one node in the AX tree (which is accurate to litho components rendering but we may need to change in the future if it is not clear).
Reviewed By: jknoxville
Differential Revision: D8972205
fbshipit-source-id: d136f5b594d0ac1b66a82b35dc7b085186829fc4
Summary: When expanding one tree, the other tree also expands. This expanding jumps over fragments (which are not in the accessibility tree) so that the trees can stay in sync even when there are extra wrappers in the main tree. Need to figure out functionality for litho components (these simply don't expand together right now since the relationship between the trees at these nodes are less obvious).
Differential Revision: D8943229
fbshipit-source-id: 289c3511a6495508b45a62da13ae4c50209e6118
Summary:
This is a big one. Moves all oss plugins to a new place and leaves
stub targets in place. No logic changes. Everything apart from
BUCK files should be unchanged.
Reviewed By: jknoxville
Differential Revision: D8951045
fbshipit-source-id: 8054fb4028181d5cc4a240b1908dab6471cf0a27
Summary:
Those hadn't been updated as part of the move and cause runtime
failures.
Reviewed By: priteshrnandgaonkar
Differential Revision: D8931211
fbshipit-source-id: bc874eeea39134d6da9e16f6771bf0d3d3c02473
Summary:
:third-party doesn't actually export anything. So we don't need to
explicitly depend on it as it messes with the POM generation otherwise.
Reviewed By: jknoxville
Differential Revision: D8913636
fbshipit-source-id: d0da6ed4c47e8d6b7986ec9f12960c9323ad1640
Summary: Switches the tree to use the view hierarchy for Litho nodes rather than Litho component hierarchy since Accessibility services interact with the views rendered. Includes a few more properties in the accessibility sidebar and updates to the segmented sidebar based on derived/non-derived properties for all views. Also adds functions to the AccessibilityUtil to be able to work on the accessibility sidebar while still leaving the non-accessibility sidebar unchanged. Eventually the accessibility panel will be removed from 'normal' mode and the original functions will no longer be necessary.
Reviewed By: blavalla
Differential Revision: D8881739
fbshipit-source-id: 9ce37e8f18025538cba2c86c0895ee38d13d024b
Summary: That's the android package and all references to it.
Reviewed By: jknoxville
Differential Revision: D8875423
fbshipit-source-id: 478bb380012bc1327199d51527a7fe376824fce2
Summary:
This should work with our existing shipit config. Moves the build
files to xplat and sets up a standard gradle directory structure
that we will continue to move more files into.
Reviewed By: jknoxville
Differential Revision: D8859483
fbshipit-source-id: 5df5882a3bcaee36280af68aeaa740290288e0d3
Summary:
Fixed issue with DebugComponentDescriptors being left out of accessibility tree so the AX tree now includes all Litho view nodes (not Litho accessibility nodes yet). Litho drawables have no accessibility properties so these are not included. Also changed default for getAXChildAt to do whatever the original view tree does for that node and added a getAXChildCount function to better customize the accessibility tree.
Segmented the ax sidebar into properties directly form the view and properties derived from the AccessibilityNodeInfo.
Differential Revision: D8861129
fbshipit-source-id: 987683ef45188aa9cb587cc0e5ffba8fbf40136d
Summary:
This moves the native setup to a separate gradle file and unpacks everything outside the build folder. That way we don't throw everything away on every incremental build.
This is an intermediate step to get to a more declarative setup like Fresco has it and get rid of the individual hacks we have for every download.
Pull Request resolved: https://github.com/facebook/Sonar/pull/154
Reviewed By: jknoxville
Differential Revision: D8833812
Pulled By: passy
fbshipit-source-id: 2424c9d6e22e6092c04af344e06939b4a6aba041
Summary: The second tree has access to all AX NodeInfo properties (they are not in the sidebar yet). Infrastructure set up to customize displayed information bassed on what is most useful. Descriptors for views updated to include AX functionality and non-view descriptors AX functions defaulted to null/empty. Non-view nodes (like Fragments, Window, Appication) no longer included in AX tree. Corresponding nodes will be highlighted (although not expanded) on click in either tree.
Differential Revision: D8795800
fbshipit-source-id: cf2333f69bfecca3ff84aae62681c684dfa14bf3
Summary:
Update some build dependencies (gradle, android plugin) and make some
minor cleanups in the gradle files along the way.
Pull Request resolved: https://github.com/facebook/Sonar/pull/151
Reviewed By: priteshrnandgaonkar
Differential Revision: D8818841
Pulled By: passy
fbshipit-source-id: 78b6592dbf967553aadead57a60023a0b5ae79b6
Summary:
Compile against a static version of OpenSSL for better compatibility
with apps that already use OpenSSL in some fashion.
Pull Request resolved: https://github.com/facebook/Sonar/pull/149
Reviewed By: priteshrnandgaonkar
Differential Revision: D8804169
Pulled By: passy
fbshipit-source-id: 4de66a77806a3b3f01b2cf5f253916f2cf6f48e8
Summary:
This saved the state of the network plugin even when switching between plugins using persistedState.
A bug in the Android implementation didn't clear the events that were already sent to the desktop.
Reviewed By: jknoxville
Differential Revision: D8752098
fbshipit-source-id: 152ec5da83958ad8124686f780d39983cbce563f
Summary:
We currently give sonar one event base from java / obj-c code to use for scheduling tasks.
This causes a problem, because we schedule reconnect tasks on the event base, and then these tasks interact with rsocket which schedules it's own tasks.
The problem is that we're passing rsocket the same event base. So the reconnect code executes and blocks waiting for rsocket to connect.
But rsocket can never connect because it never executes because that thread is blocked, so we get deadlock.
Fixing it by giving both processes their own event base / thread.
Reviewed By: danielbuechele
Differential Revision: D8748354
fbshipit-source-id: aa00766059f66fadfecb1970492bbb7107bbbfe4
Summary:
We currently give sonar one event base from java / obj-c code to use for scheduling tasks.
This causes a problem, because we schedule reconnect tasks on the event base, and then these tasks interact with rsocket which schedules it's own tasks.
The problem is that we're passing rsocket the same event base. So the reconnect code executes and blocks waiting for rsocket to connect.
But rsocket can never connect because it never executes because that thread is blocked, so we get deadlock.
This is the first step which just changes the interface to pass two event bases.
The consumers will be changed to pass in different threads next.
Reviewed By: danielbuechele
Differential Revision: D8748350
fbshipit-source-id: 481d6f23644f28fd0f1c786252605287019c999c
Summary: This diff is mainly moving diffs around to open source the Sandbox plugin. I created the MD file writing some docs. The rest is just making our own FB implementation work
Reviewed By: danielbuechele
Differential Revision: D8731839
fbshipit-source-id: 27ac67223c6de9d1be406ab8c06b71b82d5407bc
Summary:
Remove left over from local testing.
Closes https://github.com/facebook/Sonar/pull/127
Reviewed By: danielbuechele
Differential Revision: D8723789
Pulled By: passy
fbshipit-source-id: f08203a441c35860dd5257a0ec147d1bf9c3da60
Summary:
Add the required compiler flag for Folly when building x86_64.
I'll prepare a new release for this shortly.
Depends on #126
Closes https://github.com/facebook/Sonar/pull/128
Reviewed By: danielbuechele
Differential Revision: D8731955
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 9511811b0b51205989a5200ad9d0d8689ca684cb
Summary:
This mirrors the extension support added to the desktop plugin and allows people to dynamically
add extension commands
Reviewed By: danielbuechele
Differential Revision: D8691167
fbshipit-source-id: 60136b960f8bbdfa42b2077d1f5f7b391fc44443
Summary:
This uses OpenSSL 1.1.0h to build and link against. The `.so`s are
precompiled and hand-patched from [this
repository](https://github.com/passy/android-database-sqlcipher). The
patching was necessary to fix the `SONAME` and corresponding `NEEDED`
flags to *not* contain a `.1.1` version suffix as Gradle will refuse to
bundle those.
We basically only use the headers for the remaining part.
The precompiled version contains ABI support for `arm64-v8a`, `armeabi`,
`armeabi-v7a`, `x86` and most importantly `x86_64`. HOWEVER, `x86_64` is
still excluded for now because folly fails to compile due to a missing
compiler flag:
```
error: needs target feature pclmul
```
This should be easily fixable by ensuring that `-mpclmul` is added to
the CFLAGS if we're compiling for an `x86_64` target in the
`CMakeLists.txt` for Folly.
Closes#113.
Closes https://github.com/facebook/Sonar/pull/125
Reviewed By: priteshrnandgaonkar
Differential Revision: D8723636
Pulled By: passy
fbshipit-source-id: 41c61047d2793ebaef5793a3c937c4d628471d6a