|
|
|
@ -774,10 +774,12 @@ public class TorrentsActivity extends ActionBarActivity implements TorrentTasksE
@@ -774,10 +774,12 @@ public class TorrentsActivity extends ActionBarActivity implements TorrentTasksE
|
|
|
|
|
@Background |
|
|
|
|
@OnActivityResult(BarcodeHelper.ACTIVITY_BARCODE_ADDTORRENT) |
|
|
|
|
public void onBarcodeScanned(int resultCode, Intent data) { |
|
|
|
|
if (data != null) { |
|
|
|
|
// We receive from the helper either a URL (as string) or a query we can start a search for
|
|
|
|
|
String query = BarcodeHelper.handleScanResult(resultCode, data, navigationHelper.enableSearchUi()); |
|
|
|
|
onBarcodeScanHandled(data.getStringExtra("SCAN_RESULT"), query); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@UiThread |
|
|
|
|
protected void onBarcodeScanHandled(String barcode, String result) { |
|
|
|
|