I did the same as some previous code which copied code from the zxing
library and put it in the com.google.zxing namespace (but left the license
in tact - is this okay for Apache 2.0 stuff?). The reason was that they
encourage copying the relevant two files into your project and modifying
as neccesary. In this case, it wasn't about modifying for functionalities
sake, but rather for android support libraries sake. The upstream version
doesn't support android.support.v4.app.Fragments, only android.app.Fragments.
Hooking up the intent integrator from zxing almost removes the need for
the refactoring which made FDroid.java responsible for handling "new repo"
intents. However, there is still the one case of the user not using
the QR code, but rather a web browser to connect to a swap. That is, they
will click a link on the other phones web browser, which directs them to
initiate the swap. Thus, we still need FDroid.java to be able to distinguish
between a "swap" new repo request, and a regular "add repo" new repo request.
In the process, I also commented out the "It's not working" button.