Skip to content

Commit

Permalink
core & plugin sources, plugin assets
Browse files Browse the repository at this point in the history
  • Loading branch information
TuxPaper committed Mar 22, 2020
1 parent a1664b6 commit 7da8a03
Show file tree
Hide file tree
Showing 2,954 changed files with 799,303 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ google-services.json


# Exclude plugins since they take up lots of space.. use updatePlugins.sh to get them locally
/BiglyBT/src/coreFlavor/assets/plugins/
/BiglyBT/src/coreFlavor/assets/plugins.zip
/BiglyBT/libs/*_*.*.*.jar


1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion BiglyBT/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
// Mjr, Mnr, Patch, BuildNo
// Even patch #: Release
// Odd patch #: WIP
versionCode 1020502
versionCode 1020504
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
Expand Down Expand Up @@ -182,6 +182,7 @@ dependencies {
implementation project(':Android-DirectoryChooser')

debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2'
implementation project(':core')
}

afterEvaluate {
Expand Down
Binary file removed BiglyBT/libs/BiglyBT-core-android.jar
Binary file not shown.
Binary file added BiglyBT/src/coreFlavor/assets/plugins.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import androidx.appcompat.view.ActionMode.Callback;
import androidx.appcompat.view.menu.MenuBuilder;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.core.view.MenuItemCompat;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.recyclerview.widget.RecyclerView;
Expand Down Expand Up @@ -1018,6 +1020,16 @@ public boolean onCreateActionMode(ActionMode mode, Menu menu) {
frag.onCreateActionMode(mode, menu);
}

int numItems = menu.size();
for (int i = 0; i < numItems; i++) {
MenuItem item = menu.getItem(i);
if (item != null && item.getIcon() != null) {
MenuItemCompat.setIconTintList(item,
ContextCompat.getColorStateList(requireContext(),
R.color.actionmode));
}
}

SubMenu subMenu = menu.addSubMenu(R.string.menu_global_actions);
subMenu.setIcon(R.drawable.ic_menu_white_24dp);
subMenu.getItem().setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,48 @@
android:icon="@drawable/ic_launch"
android:showAsAction="ifRoom"
android:title="@string/action_sel_launch"
app:iconTint="?android:attr/textColorPrimary"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/action_sel_launch_stream"
android:icon="@drawable/ic_stream"
android:showAsAction="ifRoom"
android:title="@string/action_sel_launch"
app:iconTint="?android:attr/textColorPrimary"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/action_sel_save"
android:icon="@drawable/ic_menu_save"
android:showAsAction="ifRoom"
android:title="@string/action_sel_save"
app:iconTint="?android:attr/textColorPrimary"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/action_sel_priority_up"
android:icon="@drawable/ic_speedometer"
android:showAsAction="ifRoom"
android:title="@string/action_sel_priority_up"
app:iconTint="?android:attr/textColorPrimary"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/action_sel_priority_down"
android:icon="@drawable/ic_slowometer"
android:showAsAction="ifRoom"
android:title="@string/action_sel_priority_down"
app:iconTint="?android:attr/textColorPrimary"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/action_sel_file_unwanted"
android:icon="@drawable/ic_trash_24dp"
android:showAsAction="ifRoom"
android:title="@string/action_set_unwanted"
app:iconTint="?android:attr/textColorPrimary"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/action_sel_file_wanted"
android:icon="@drawable/ic_download_white"
android:showAsAction="ifRoom"
android:title="@string/action_set_wanted"
app:iconTint="?android:attr/textColorPrimary"
app:showAsAction="ifRoom"/>
</menu>
20 changes: 20 additions & 0 deletions BiglyBT/src/main/res/color/actionmode.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ This program is free software; you can redistribute it and/or
~ modify it under the terms of the GNU General Public License
~ as published by the Free Software Foundation; either version 2
~ of the License, or (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program; if not, write to the Free Software
~ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?android:attr/textColorPrimary"/>
</selector>
1 change: 1 addition & 0 deletions core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
24 changes: 24 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apply plugin: 'java-library'

sourceSets {
main {

java {
srcDirs = ['src','plugins']
}

resources {
includes = [ '**/*.properties' ]
srcDirs = ['src','plugins']
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleDependency
compile 'commons-cli:commons-cli:1.4'
}

sourceCompatibility = "1.8"
targetCompatibility = "1.8"
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
/*
* Created on Aug 28, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details ( see the LICENSE file ).
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/



package com.aelitis.azureus.core.networkmanager.impl.utp;

import java.net.InetSocketAddress;
import java.nio.ByteBuffer;

import com.biglybt.core.util.AddressUtils;

import com.biglybt.core.networkmanager.ConnectionEndpoint;
import com.biglybt.core.networkmanager.ProtocolEndpoint;
import com.biglybt.core.networkmanager.ProtocolEndpointFactory;
import com.biglybt.core.networkmanager.ProtocolEndpointHandler;
import com.biglybt.core.networkmanager.Transport;
import com.biglybt.core.networkmanager.Transport.ConnectListener;

public class
ProtocolEndpointUTP
implements ProtocolEndpoint
{
private static UTPConnectionManager manager;

public static void
register(
UTPConnectionManager _manager )
{
manager = _manager;

ProtocolEndpointFactory.registerHandler(
new ProtocolEndpointHandler()
{
public int
getType()
{
return( ProtocolEndpoint.PROTOCOL_UTP );
}

public ProtocolEndpoint
create(
InetSocketAddress address )
{
return( new ProtocolEndpointUTP( address ));
}

public ProtocolEndpoint
create(
ConnectionEndpoint connection_endpoint,
InetSocketAddress address )
{
return( new ProtocolEndpointUTP( connection_endpoint, address ));
}
});
}

private ConnectionEndpoint ce;
private InetSocketAddress address;

private
ProtocolEndpointUTP(
ConnectionEndpoint _ce,
InetSocketAddress _address )
{
ce = _ce;
address = _address;

ce.addProtocol( this );
}

private
ProtocolEndpointUTP(
InetSocketAddress _address )
{
ce = new ConnectionEndpoint(_address );
address = _address;

ce.addProtocol( this );
}

public void
setConnectionEndpoint(
ConnectionEndpoint _ce )
{
ce = _ce;

ce.addProtocol( this );
}

public int
getType()
{
return( PROTOCOL_UTP );
}

public InetSocketAddress
getAddress()
{
return( address );
}

public InetSocketAddress
getAdjustedAddress(
boolean to_lan )
{
return( AddressUtils.adjustTCPAddress( address, to_lan ));
}

public ConnectionEndpoint
getConnectionEndpoint()
{
return( ce );
}

public Transport
connectOutbound(
boolean connect_with_crypto,
boolean allow_fallback,
byte[][] shared_secrets,
ByteBuffer initial_data,
int priority,
ConnectListener listener )
{
UTPTransport t = new UTPTransport( manager, this, connect_with_crypto, allow_fallback, shared_secrets );

t.connectOutbound( initial_data, listener, priority );

return( t );
}

public String
getDescription()
{
return( address.toString());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Created on 16 Jun 2006
* Created by Paul Gardner
* Copyright (C) 2006 Aelitis, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* AELITIS, SAS au capital de 46,603.30 euros
* 8 Allee Lenotre, La Grille Royale, 78600 Le Mesnil le Roi, France.
*
*/

package com.aelitis.azureus.core.networkmanager.impl.utp;

import com.biglybt.core.networkmanager.ProtocolEndpoint;
import com.biglybt.core.networkmanager.TransportEndpoint;

public class
TransportEndpointUTP
implements TransportEndpoint
{
private ProtocolEndpoint pe;

public
TransportEndpointUTP(
ProtocolEndpoint _pe )
{
pe = _pe;
}

public ProtocolEndpoint
getProtocolEndpoint()
{
return( pe );
}
}
Loading

0 comments on commit 7da8a03

Please sign in to comment.