aboutsummaryrefslogtreecommitdiff
path: root/third_party/sl4a/src
AgeCommit message (Collapse)Author
2021-12-08Setting class loader before unmarshalling bundle to prevent ↵Cynoc Bediako
java.lang.ClassNotFoundException.
2021-10-19Use Maven Central for snippet-lib releases; clean up Gradle configsXianyuan Jia
2021-10-06Added Notification for O (#111)xianyuanjia
2020-07-29Add support for long arrays as snippet parameters (#105)prateikj
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.
2020-05-14Add a default close method. (#104)Daniel Cardenas
2019-01-28Migrate to `androidx`. (#101)Ang Li
2019-01-28Update toolchain and make the lib build again. (#100)Ang Li
The presubmit command now works and generates a report.
2018-02-26Minor clean ups (#87) (#91)Ang Li
* Remove accidental duplication of example1 source. * Fix apk paths in README.
2018-01-29Support JSONArray parsing. (#89)Ang Li
2018-01-23Fix a crash caused by custom converter (#88)Ang Li
Fix a bug where snippet lib crashes if no converter class is specified.
2018-01-12Support custom converters of non-primitive types. (#86)Ang Li
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.
2017-12-15Revert "Revert "Update gradle, dependency versions and fix lint reported ↵Ang Li
issues (#80)" (#82)" (#83) This reverts commit c0d86eb455d97c0969291755162cd6c7ae7ca689.
2017-12-15Revert "Update gradle, dependency versions and fix lint reported issues ↵Ang Li
(#80)" (#82) This reverts commit aeddc8bcd123ddf6c865622464001fe0f3835b87.
2017-12-15Update gradle, dependency versions and fix lint reported issues (#80)Keith Dart
* 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.
2017-09-05Walk up the stack trace from the correct index (#76)Jinghao Shi
2017-08-22Fix Naming of `Log.APK_LOG_TAG` (#74)Jinghao Shi
2017-08-22remove tabs (#72)David T.H. Kao
2017-08-21Better way to find the name of the calling class of logger (#70)Jinghao Shi
Walk stack instead of hard-coded depth
2017-08-16Remove an error message check that may return null. This will expose … (#68)David T.H. Kao
* 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
2017-06-20Fix format warnings (#66)l-meng
2017-06-19Support of RPC scheduling (#61)l-meng
* 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.
2017-05-25Group methods in help() by class. (#57)Alexander Dorokhine
Fixes #44.
2017-05-24When launching snippet, print protocol version and port to output. (#59)Alexander Dorokhine
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.
2017-05-24Create an example for how to use UIAutomator. (#54)Alexander Dorokhine
UIAutomator requires client-side changes too, which are tracked in https://github.com/google/mobly/issues/166. Fixes #33.
2017-03-13Fix lint for multiple files. (#53)Ang Li
Purely cosmetic changes by AOSP linter.
2017-03-10Invoke RPCs on the main thread if they are tagged with @RunOnUiThread. (#47)Alexander Dorokhine
Fixes concurrency handling in SnippetManager. Fixes #51
2017-03-10Use double-checked locking instead of 'synchronized' in EventCache. (#52)Alexander Dorokhine
* Use double-checked locking instead of 'synchronized' in EventCache.
2017-03-09Clean up Log.java. (#48)Alexander Dorokhine
* 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
2017-02-23Async rpc updates. (#43)Ang Li
* 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.
2017-02-22Add support for asynchronous Rpc (#38)Ang Li
* 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.
2017-02-13Lint source code to AOSP. (#34)Ang Li
* Add linter for the project. * Apply AOSP style. * Bump gradle toolchain version. * Remove unused code. * Fix quotation mark usage.
2017-02-03Fix exception handling in snippets. (#32)Alexander Dorokhine
* 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
2017-01-27Don't explode if the binary into which snippet-lib is linked has junit ↵adorokhine
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.
2016-12-16Propagate exceptions out of SimpleServer instead of returning null. (#9)adorokhine
2016-12-15Handle the ability to properly stop the snippet apk. (#7)adorokhine
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.
2016-12-14Fix handling of closeSl4aSession by writing an empty RPC result.Alexander Dorokhine
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.
2016-12-14Remove unnecessary uses-library in the main manifest.Alexander Dorokhine
2016-12-14Fix notification handling from inside a test apk.Alexander Dorokhine
The context of the target apk must be used for starting the notification in this situation.
2016-12-12Start the snippet server from the instrumentation process, not a separate ↵adorokhine
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.
2016-12-07Remove the 'facade' package and FacadeManager.Alexander Dorokhine
Merge the sdk checking code into SnippetManager. Move the main Snippet interface to the root package.
2016-12-05Minor cleanups to the snippet lib.Alexander Dorokhine
* 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.
2016-12-05Launch snippets as an instrumentation rather than a service.Alexander Dorokhine
This allows us to create snippets that control other apps.
2016-11-28Create a builtin help() RPC.Alexander Dorokhine
Cleans up the RPC description handling and allows removal of a lot of unneeded annotations.
2016-11-09Rename RpcReceiver to Snippet.Alexander Dorokhine
2016-11-09Refactor SL4A to act as an RPC library.Alexander Dorokhine
All facade code has been removed and the project has been moved around into a single source tree.