Age | Commit message (Collapse) | Author |
|
java.lang.ClassNotFoundException.
|
|
|
|
|
|
Specifying a snippet that takes a long array as a parameter, currently fails because there is no explicit conversion specified for the long array type. Using an integer array as an alternative is also problematic, because the size of a Python integer can exceed the size of a Java integer.
|
|
|
|
|
|
The presubmit command now works and generates a report.
|
|
* Remove accidental duplication of example1 source.
* Fix apk paths in README.
|
|
|
|
Fix a bug where snippet lib crashes if no converter class is specified.
|
|
Now users can supply custom logic for object serialization/de-serialization
through a centralized class, and snippet lib will automatically use the custom converters.
Added a new example to demonstrate this feature.
|
|
issues (#80)" (#82)" (#83)
This reverts commit c0d86eb455d97c0969291755162cd6c7ae7ca689.
|
|
(#80)" (#82)
This reverts commit aeddc8bcd123ddf6c865622464001fe0f3835b87.
|
|
* Update to latest build tools.
* Fix lint issues and reformat.
* Add presubmit target.
* Fix IDE reported issues.
* Fix test runner versions in example.
* Review feedback changes.
* Make getPrivateInetAddress a private method.
|
|
|
|
|
|
|
|
Walk stack instead of hard-coded depth
|
|
* Remove an error message check that may return null. This will expose an unknown error that results from not having declared INTERNET permissions
* swap order of string check
* ugh tabs
|
|
|
|
* Support of RPC scheduling
To perform operations while device is disconnected (e.g., USB is off),
RPCs need to be scheduled with certain delay before disconnection
happens.
While device is disconnected, as long as the snippet is still running,
the scheduled RPCs should be able to be executed.
The RPC result could be retrieved as cached events once device get back
online.
|
|
Fixes #44.
|
|
Current messages are:
`SNIPPET START, PROTOCOL <major> <minor>` immediately once snippet starts
`SERVING <port id>` once the server has been successfully launched
This allows us to:
- Know that a snippet launched (versus crashing immediately due to e.g.
classpath issues, so we don't need to bother trying to connect to a dead
snippet
- Know what version of startup and communication protocol it's using so we
can configure the client appropriately and manage compatibility.
- Allow the device side to choose a port number, to avoid the client side
having to pick a port number for the snippet and hoping it's free.
This allows us to manage backwards compatibility and device-side port allocation.
Fixes #10.
Fixes #62.
|
|
UIAutomator requires client-side changes too, which are tracked in https://github.com/google/mobly/issues/166.
Fixes #33.
|
|
Purely cosmetic changes by AOSP linter.
|
|
Fixes concurrency handling in SnippetManager.
Fixes #51
|
|
* Use double-checked locking instead of 'synchronized' in EventCache.
|
|
* Remove unneeded methods. The UI methods are not useful because snippets propagate all exceptions to client side.
* Change tag from sl4a; make it configurable per apk.
Fixes #17
|
|
* Fix a bug where help() fails if AsyncRpc exists.
* Use Bundle instead of JSONObject to hold data in SnippetEvent to
simplify exception handling for adding data.
* Add a dedicated example for async rpc.
|
|
* Add @AsyncRpc annotation to mark Rpc methods that trigger async events.
* Add `EventCache`, which is the repo of events.
* Add `EventSnippet`, which has Rpc methods for client to poll events.
* Add `SnippetEvent` type to represent an event.
* Add `callbackId` field to Rpc protocol's server resp msg.
|
|
* Add linter for the project.
* Apply AOSP style.
* Bump gradle toolchain version.
* Remove unused code.
* Fix quotation mark usage.
|
|
* Don't try to call methods on snippet classes that couldn't be constructed
* Don't obscure the cause of exceptions
* Propagate the entire stack trace to the python side
* Decorate the stacktrace
|
|
tests. (#28)
Prior to this we would have tried to actually execute those tests as part of the 'stop' action.
To avoid this, make an empty junit class and always run that as part of 'stop'.
Fixes #27.
|
|
|
|
Instrumentations cannot be killed with 'pm' (unless the main app is
stopped).
However, starting another instrumentation with the same package kills the
old one, so we just have to make sure to clear the notification when we do
this.
|
|
Without this change, calling closeSl4aSession always gave an error
because the socket would be torn down without any response being received.
Not an issue with upstream sl4a because there is an RPC to implement
closeSl4aSession() which produces its own result.
|
|
|
|
The context of the target apk must be used for starting the
notification in this situation.
|
|
service. (#5)
When run as an androidTest instead of a build flavour, the process
started as a service doesn't see the instrumented app's classpath.
|
|
Merge the sdk checking code into SnippetManager.
Move the main Snippet interface to the root package.
|
|
* Drop Context from snippet constructor. Now that snippets are launched
as instrumentation, they can obtain the right context from
InstrumentationRegistry.
* Remove ACTION_KILL intent; we will stop it using adb if needed.
|
|
This allows us to create snippets that control other apps.
|
|
Cleans up the RPC description handling and allows removal of a lot of unneeded annotations.
|
|
|
|
All facade code has been removed and the project has been moved around into a single source tree.
|