DescriptionReland: Refactor Chromoting JNI code to use jni/Client (Java changes only).
CL was reverted as the FindBugs step broke on an internal
builder. Relanding with FB suppression.
Original CL description:
This removes globals from jni/JniInterface in favor of passing a
jni/Client instance to code that needs to access the Chromoting
client connection.
The C++ code is unchanged - JniInterface class is still used to
marshall Java <-> C++ calls. JniInterface still holds a singleton
Client connection, but all other globals have been removed (including
the singleton CapabilityManager instance).
Each Activity's onCreate() method gets the singleton Client instance,
and then passes it to objects that need it (for input injection and
so on). This should make it easier to use a fake Client instance for
unit-instrumentation tests.
BUG=526336, 585799
Committed: https://crrev.com/40e8dff71ae626f479e7356515d7bfce0b9b68b0
Cr-Commit-Position: refs/heads/master@{#374924}
Patch Set 1 #
Total comments: 22
Patch Set 2 : rebase #Patch Set 3 : Move singleton from JniInterface to Client #Patch Set 4 : Update some comments #
Total comments: 8
Patch Set 5 : rebase #Patch Set 6 : address comments #Patch Set 7 : fix tests #Patch Set 8 : Suppress FindBugs warning #Messages
Total messages: 32 (13 generated)
|